content
stringlengths
1
15.9M
\section{Introduction} \label{sec:intro} Deep learning models are vulnerable to adversarial perturbations. This is especially true in image classification in computer vision. This weakness is unfortunatley undermining the developement of `Artificial Intelligence'. In particular, adversarial attacks are a serious threat for security oriented applications. Attackers willing to bypass security countermeasures might use the deep learning models as the weakest link. A deluge of research papers now propose defenses to block such an attacker, and adaptive attacks against these defenses. This is an endless arms race, and systematic benchmarks to evaluate the state of the threat are greatly required. It is currently extremely difficult to have a clear view on what is truly working in this domain. The cliché is that no two papers report the same statistics for the same attack against the same model over the same image set. This is mostly due to that an attack is an algorithm with many parameters. Its power is indeed highly dependent of these parameters. These values are rarely specified in research papers. There exist benchmarks in the litterature, such as \texttt{ARES}~\cite{Dong:2020aa}\xspace, \texttt{RobustBench}~\cite{Croce:2020aa}\xspace, \texttt{RobustVision}~\cite{Lab:aa}\xspace, \texttt{ADBD}~\cite{Chen:2020ab}\xspace. They aim at providing a better understanding of the robustness of image classifiers. Yet, they fall short because their slowness prevents them from tackling large image dataset like ImageNet. They only operate on CIFAR-10 or MNIST. Also, they resort to attacks which are not all state-of-the-art. This paper proposes \texttt{RoBIC}\xspace, to consider these concerns and develop a benchmark tool to measure the robustness of image classifiers in a modern setup. \section{The benchmark} \label{sec:benchmark} This section justifies the recommendations made in our benchmark and defines the measure of robustness. \textbf{Pixel domain.} Our benchmark is dedicated to image classification. As a consequence, the distortion is defined on the pixel domain: An image $I$ is defined in the space $\llbracket0,255\rrbracket^n$ with $n=3RC$ pixels for 3 color channels, $R$ rows and $L$ columns. Most papers in the field measure distortion after the transformation of the image in a tensor $x\in\mathcal{X}^n$. This is a mistake preventing a fair comparison: for most models $\mathcal{X}=[0,1]$, but for some others $\mathcal{X}=[-1,1]$ or $\mathcal{X}=[-3,3]$. Our benchmark assumes that an adversarial image is above all an image, \textit{i.e.}\xspace\ a discrete object $I_a\in\llbracket0,255\rrbracket^n$. Again, most attacks output a continuous tensor $x_a\in\mathcal{X}^n$, neglecting the quantization. This is a mistake: in real-life, the attacker has no access to $x_a$, which is an auxiliary data internal of the model. \textbf{Distortion.} The distortion is defined as the root mean square error: $d(I_a,I_o) := \|I_a - I_o\|_2 / \sqrt{n}$. This is easily interpretable: if $I_{a,i} = I_{o,i} \pm \epsilon$, $\forall i\in\llbracket 1,n\rrbracket$, then $d(I_o,I_a)=\epsilon$. It is easily translated into a PNSR as image processing professionals do: $\mathrm{PSNR} = 48.13 - 20\log_{10}(d(I_o,I_a))$ dB. Adversarial perturbations usually spread all over the image and have small amplitude like in invisible watermarking. This is a case where measures based on $\ell_2$ norm remain good indicators of the quality. A perceptual similarity is obviously better, but more complex and less interpretable. \textbf{Test set.} The input of the model is a natural and large image. Assessing the robustness of models on specific dataset like MNIST (almost black and white), or on tiny images like CIFAR does not reflect the complexity of the problem. Our benchmark considers natural images of at least $224\times 224$ pixels as provided in ImageNet. The test set is a secret subset of $1000$ images. Otherwise, attackers or defenders may tweak their algorithms for a particular set. \textbf{Operating characteristic.} An attack is a process outputting an image $I_a = \mathcal{A}(I_o, M, \Pi)$, where $I_o$ is the original image, $M$ is the target model, and $\Pi$ is a set of attack parameters. The ground truth label of $I_o$ is denoted by $y_o$. The boolean function $\mathbb{1}(I_a,y_o) = [M(I_a)\neq y_o]$ indicates whether the attack deludes model $M$ in the untargeted attack scenario: the predicted class $M(I_a)$ is different than the ground truth. The game between attack $\mathcal{A}$ and model $M$ over the test set is summarized by the operating characteristic $D\to P(D)$ relating the distortion $D$ and the probability of success $P(D)$: \begin{equation} P(D) := n^{-1}\sum_{i: d(I_{a,i},I_{o,i})\leq D }^{n} \mathbb{1}(I_{a,i},y_{o,i}). \end{equation} In other words, $P(D)$ is the fraction of images that the attack succeeded to hack within a distortion budget $D$. Alternatively, a defender is interested in the accuracy function $\eta(D) := 1-P(D)$. The value $\eta(0)$ is the classical accuracy of the model over original images. Function $\eta(D)$ is by construction non increasing and should converge to 0 as the distortion $D$ increases. \textbf{Measure of robustness.} After observing many accuracy functions for different models and attacks, we notice that they share the same prototype: \begin{equation} \eta(D) = \eta(0)~e^{-\lambda D} \quad \text{with } \lambda \in \mathbb{R^+}. \end{equation} Like in nuclear physics, we define the half-distortion $D_{\nicefrac{1}{2}}$ as the distortion needed to reduce to half the initial accuracy: \begin{equation} \label{eq:HD} \eta(D_{\nicefrac{1}{2}}) = \eta(0)/2,\quad D_{\nicefrac{1}{2}} = \lambda^{-1}\log(2). \end{equation} This approximation is verified experimentally with an average coefficient of determination $R^2$ of 99\%. The half-distortion $D_{\nicefrac{1}{2}}$ will be the keystone of the proposed metric of robustness. A model is then characterized by three separated concepts: its generalization ability $\eta(0)$ and its robustnesses $D_{\nicefrac{1}{2}}$ against black-box and white-box attacks. \section{Difficulties} \label{sec:difficulties} This sections explains the difficulties for setting up a benchmark measuring the robustness of image classifiers. \subsection{Notation} An attack is a process forging an image $I_a = \mathcal{A}(I_o, M, \Pi)$, where $I_o$ is the original image, $M$ is the target model, and $\Pi$ is a set of attack parameters. The ground truth label of $I_o$ is denoted by $y_o$. The boolean function $\mathbb{1}(I_a,y_o) = [M(I_a)\neq y_o]$ tells whether the attack deludes classifier $M$ in the untargeted attack scenario: the prediction $M(I_a)$ is not the ground truth. The distortion between $I_o$ and $I_a$ is denoted by $d(I_a,I_o)$. Some statistics like the probability of success and the average distortion are extracted from the adversarial images forged from the test set. They depend on the attack $\mathcal{A}$ and its set of parameters $\Pi$. Therefore, it can not play the role of a measure of robustness of a given model. The first difficulty is to get rid off the impact of parameters $\Pi$. \subsection{The best effort mode} The parameters $\Pi$ have a huge impact on the power of an attack. For instance, some attacks like \FGSM~\cite{Goodfellow:2015aa}\xspace, \IFGSM~\cite{Kurakin:2017aa}\xspace, \PGD~\cite{Kurakin:2017aa}\xspace are distortion constrained in the sense that $\Pi$ is strongly connected to a distortion budget. If this budget is small, the probability of the success of the attack is small. If it is large, this probability is close to 1 but the distortion is too big. Hence, it is hard to find the best setting to make these attacks competitive. Our strategy, so-called `best effort mode', reveals the intrinsic power of an attack by finding the best setting for any image: $I_a = \mathcal{A}(I_o, M, \Pi^\star)$ with \begin{equation} \Pi^\star = \arg\min_{\Pi:\mathbb{1}(\mathcal{A}(I_o, M, \Pi),y_{o})=1} d(\mathcal{A}(I_o, M, \Pi),I_o). \end{equation} The best effort mode makes the measurement of the robustness independent from an arbitrary global setting $\Pi$. Yet, it is costly in terms of computations. Attacks with few parameters are preferred since the search space is smaller. \subsection{Worst case attacks} A second difficulty is to make the robustness score independent of the attack. Ideally, we would like to know the worst case attack to certify the robustness of a model. An option proposed by benchmarks \texttt{RobustVision}~\cite{Lab:aa}\xspace and \texttt{ARES}~\cite{Dong:2020aa}\xspace is to consider a set of $J = 11$ attacks as outlined in table \ref{table:benchmarks_comparison}. This is again costly as each image of the test set has to be attacked $J$ times. Yet, a benchmark happens to be useful if it is fast enough so to assess the robustness of many models. The best effort mode over an ensemble of attacks is out of reach. This is the reason why we need to focus on fast worst case attacks in the sense that they achieve their best effort mode within limited complexity. Section \ref{sec:fast} focuses on these attacks. \subsection{The choice of the metric} The game between attack $\mathcal{A}$ and model $M$ over the test set is summarized by the operating characteristic $D\to P(D)$ relating the distortion $D$ and the probability of success $P(D)$: \begin{equation} P(D) := n^{-1}\sum_{i: d(I_{a,i},I_{o,i})\leq D }^{n} \mathbb{1}(I_{a,i},y_{o,i}). \end{equation} In other words, $P(D)$ is the fraction of images that the attack succeeded to hack within a distortion budget $D$. Many benchmarks gauge the robustness by $P(D_b)$ at an arbitrary distortion $D_b$: \textit{e.g.}\xspace\ \texttt{RobustBench}~\cite{Croce:2020aa}\xspace score is $P(D = 0.5)$. This measure is pointwise and dependent on $\eta(0)$. \section{The benchmark} \label{sec:benchmark} This section justifies the recommendations made in our benchmark and defines the measure of robustness. \textbf{Pixel domain.} Our benchmark is dedicated to image classification. As a consequence, the distortion is defined on the pixel domain: An image $I$ is defined in the space $\llbracket0,255\rrbracket^n$ with $n=3RC$ pixels for 3 color channels, $R$ rows and $L$ columns. Most papers in the field measure distortion after the transformation of the image in a tensor $x\in\mathcal{X}^n$. This is a mistake preventing a fair comparison: for most models $\mathcal{X}=[0,1]$, but for some others $\mathcal{X}=[-1,1]$ or $\mathcal{X}=[-3,3]$. We outline that an adversarial image is above all an image, \textit{i.e.}\xspace\ a discrete object $I_a\in\llbracket0,255\rrbracket^n$. Again, most attacks output a continuous tensor $x_a\in\mathcal{X}^n$, neglecting the quantization. This is a mistake: in real-life, the attacker has no access to $x_a$, which is an auxiliary data internal of the model. \textbf{Distortion.} The distortion is defined as the root mean square error: $d(I_a,I_o) := \|I_a - I_o\|_2 / \sqrt{n}$. This is easily interpretable: if $I_{a,i} = I_{o,i} \pm \epsilon$, $\forall i\in\llbracket 1,n\rrbracket$, then $d(I_o,I_a)=\epsilon$. It is easily translated into a PNSR as image processing professionals do: $\mathrm{PSNR} = 48.13 - 20\log_{10}(d(I_o,I_a))$ dB. Adversarial perturbations usually spread all over the image and have small amplitude like in invisible watermarking. This is a case where measures based on $\ell_2$ norm remain good indicators of the quality. A perceptual similarity is obviously better, but more complex and less interpretable. \textbf{Test set.} The input of the model is a natural and large image. Assessing the robustness of models on specific dataset like MNIST (almost black and white), or on tiny images like CIFAR does not reflect the complexity of the problem. Our benchmark considers natural images of at least $224\times 224$ pixels as provided in ImageNet. \textbf{Measure of robustness.} \label{subsec:half_distortion} Let us define the accuracy function $\eta(D) := 1-P(D)$. The value $\eta(0)$ is the classical accuracy of the model over original images. Function $\eta(D)$ is by construction non increasing and should converge to 0 as the distortion $D$ increases. After observing many accuracy functions $\eta$ for different models and attacks, we notice that they share the same prototype: \begin{equation} \eta(D) = \eta(0)~e^{-\lambda D} \quad \text{with } \lambda \in \mathbb{R^+}. \end{equation} Like in nuclear physics, we define the half-distortion $D_{\nicefrac{1}{2}}$ as the distortion needed to reduce to half the initial accuracy: \begin{equation} \label{eq:HD} \eta(D_{\nicefrac{1}{2}}) = \eta(0)/2,\quad D_{\nicefrac{1}{2}} = \lambda^{-1}\log(2). \end{equation} This approximation is verified experimentally with an average coefficient of determination $R^2$ of 99\%. The half-distortion $D_{\nicefrac{1}{2}}$ will be the keystone of the proposed metric of robustness. A model is then characterized by three separated concepts: its generalization ability $\eta(0)$ and its robustnesses $D_{\nicefrac{1}{2}}$ against black-box and white-box attacks. \section{Difficulties} \label{sec:difficulties} The half distortion is a statistics extracted from the adversarial images forged from the test set. It depends on the attack $\mathcal{A}$ and its set of parameters $\Pi$. Therefore, it can not play the role of a measure of robustness of a given model. The first problem is to get rid off the impact of parameters $\Pi$. \subsection{The best effort mode} As mentioned in the introduction, parameters $\Pi$ have a huge impact on the power of an attack. For instance, some attacks like \FGSM~\cite{Goodfellow:2015aa}\xspace, \IFGSM~\cite{Kurakin:2017aa}\xspace, \PGD~\cite{Kurakin:2017aa}\xspace are distortion constrained in the sense that $\Pi$ is strongly connected to a distortion budget. If the distortion budget is small, the probability of the success of the attack is small. If it is large, this probability is close to 1 but the distortion is too big. Hence, it is hard to find the best setting to make these attacks competitive. Our strategy, so-called `best effort mode', reveals the intrinsic power of an attack by finding the best setting for any image: $I_a = \mathcal{A}(I_o, M, \Pi^\star)$ with \begin{equation} \Pi^\star = \arg\min_{\Pi:\mathbb{1}(\mathcal{A}(I_o, M, \Pi),y_{o})=1} d(\mathcal{A}(I_o, M, \Pi),I_o). \end{equation} The best effort mode makes the measurement of $D_{\nicefrac{1}{2}}$ independent from an arbitrary setting $\Pi$. Yet, it is costly in terms of computations. Attacks with few parameters are preferred. \subsection{Worst case attacks} A second difficulty is to make $D_{\nicefrac{1}{2}}$ independent of the attack. Ideally, we would like to know the worst case attack in order to certify the robustness of a model. An option proposed by benchmarks \texttt{RobustVision}~\cite{Lab:aa}\xspace and \texttt{ARES}~\cite{Dong:2020aa}\xspace is to consider a set of $J$ attacks. This is again costly as each image of the test set has to be attacked $J$ times. Yet, a benchmark happens to be useful if it is fast enough so to assess the robustness of many models. The best effort mode over an ensemble of attacks is out of reach. This is the reason why we need to focus on fast worst case attacks in the sense that they achieve their best effort mode within limited complexity. \section{Fast Attacks} \label{sec:fast} The recent trend in adversarial examples is to design fast attacks with state-of-the-art performances. \subsection{Fast black-box attacks} In the black-box decision based setup, the attacker can query a model and observes the predicted class. The complexity of the attack is gauged by the number of queries $K$ needed to find an adversarial image of low distortion. There has been a huge improvement on the amount of queries recently. Brendel \textit{et al.}\xspace report in the order of one million of queries for one image in one of the first decision based black-box \texttt{BA}~\cite[Fig.~6]{Brendel:2018aa}. Then, the order of magnitude went down to tens of thousands~\cite[Fig.~4]{Chen:2020aa} \cite[Fig.~5]{Li:2020aa} and even some thousands in~\cite[Fig.~2]{Rahmati:2020aa}. Current benchmarks use others black-box attacks, which are either decision-based (\texttt{Square Attack}~\cite{andriushchenko2020square} in \texttt{RobustBench}~\cite{Croce:2020aa}\xspace is score-based), or not state-of-the-art (like Gaussian noise in \texttt{RobustVision}~\cite{Lab:aa}\xspace, or \texttt{BA}~\cite{Brendel:2018aa} in \texttt{ARES}~\cite{Dong:2020aa}\xspace). \SURFREE~\cite{Maho:2020aa}\xspace and \RAYS~\cite{Chen:2020ab}\xspace are the only \emph{decision-based} papers with less than one thousand of calls on ImageNet. Yet, \RAYS~\cite{Chen:2020ab}\xspace is designed to minimize the $\ell_\infty$ distortion, whereas $\SURFREE~\cite{Maho:2020aa}\xspace$ targets $\ell_2$. Sect.~\ref{sec:Experiments} investigates which attack is the best candidate for a fast benchmark. \subsection{Fast white-box attacks} In the white-box setup, the attacker can compute a loss function and its gradient thanks to auto-differentiation and back-propagation. The complexity is usually gauged by the number of gradient computations. Current benchmarks use different white-box attacks: \texttt{RobustBench}~\cite{Croce:2020aa}\xspace relies on \PGD~\cite{Kurakin:2017aa}\xspace (with 2 parameters $\Pi$), \texttt{RobustVision}~\cite{Lab:aa}\xspace use \DEEPFOOL~\cite{7780651}\xspace, and \texttt{ARES}~\cite{Dong:2020aa}\xspace \CW~\cite{carlini2017towards}\xspace. Again, the need for powerful but fast attacks is of utmost importance for a practical benchmark. A promising attack is \BP~\cite{Zhang:2021aa}\xspace designed for low complexity budget. Its first stage finds an adversarial example as quickly as possible. It is nothing more than a gradient descent of the loss $L$ with acceleration. At iteration $t+1$: \begin{equation} \label{eq:BP} I_a^{(t+1)} = I_a^{(t)} - \alpha\gamma(t+1) \eta\left(\nabla L(I_a^{(t)})\right), \end{equation} where $I_a^{(0)} = I_o$, $\eta(x) = x/\|x\|_2$, and $\gamma(t)$ is a series of increasing values, hence the acceleration. Stage 1 finishes when $I_a^{(t+1)}$ becomes adversarial. Stage 2 aims at lowering the distortion while maintaining the image adversarial (see~\cite{Zhang:2021aa}). We develop a variant to aggressively downsize the number of gradient computations. Parameter $\alpha$ is heuristically set up to $0.03$ in~\cite{Zhang:2021aa}. This value is certainly too big for images close to the class boundary and too small for those further away. One costly option is the best effort mode which finds the best $\alpha$ thanks to a line search (see Sect.~\ref{sec:difficulties}). We propose the following simple method inspired by \DEEPFOOL~\cite{7780651}\xspace. When applying~\eqref{eq:BP} to the first order approximation of the loss: \begin{equation} L(I_o+p) \approx L(I_o) + p^\top \nabla L(I_o),\\ \end{equation} then $\eta\left(\nabla L(I_a^{(t)})\right)=\eta(\nabla L(I_o))$ and \texttt{BP} cancels the loss for \begin{equation} \label{eq:Alpha} \alpha = \frac{L(I_o)}{\|\nabla L(I_o)\|_2\sum_{j=1}^\kappa\gamma(k) } \end{equation} within $\kappa$ iterations. We fix $\kappa = \lfloor K/3\rfloor$ where $K$ is the total iteration budget encompassing stages 1 and 2. Sect.~\ref{sec:Experiments} compares these attacks to identify the worst case. \subsection{Quantization} The adversarial samples are quantified in the pixel domain to create images. The first option considers the quantization as a post-processing not interfering with the attack. The second option performs quantization at the end of any iteration These options are tested on several black and white box attacks. The quantization will be a post-processing for white-box attacks as recommended in~\cite{10.1145/3369412.3395062}, whereas the second option give better results on black-box attacks. \section{Experiments} \label{sec:Experiments} All the attacks are run on 1000 ImageNet images from the ILSVRC2012's validation set with size $n = 3 \times 224 \times 224$. \subsection{Selecting the worst case attacks} \textbf{Black box attacks}: Figure~\ref{fig:distortion_evolution_BB} compares the evolution of the half-distortion~\eqref{eq:HD} in function of the query amount for four decision-based black-box attacks: \SURFREE~\cite{Maho:2020aa}\xspace, \RAYS~\cite{Chen:2020ab}\xspace, \GEODA~\cite{Rahmati:2020aa}\xspace, and \QEBA~\cite{Li:2020aa}\xspace. \texttt{SurFree}\xspace and \texttt{RayS}\xspace reach their best effort within 3000 queries, while \texttt{QEBA}\xspace and \texttt{GeoDA}\xspace do not since their $D_{\nicefrac{1}{2}}$ still decrease after 5000 queries. Yet, \texttt{SurFree}\xspace obtains quantified adversarials with much lower distortion. Therefore, our benchmark only needs this attack. The number of queries is kept at 5000 to be sure to reach the optimal value of $D_{1/2}$. \begin{figure}[t] \centering \includegraphics[width=0.7\columnwidth]{./pics/Black_box_quantified.pdf} \caption{Evolution of $D_{\nicefrac{1}{2}}$ with the complexity budget for black box setup. Attacks on EfficientNet~\cite{pmlr-v97-tan19a}} \label{fig:distortion_evolution_BB} \end{figure} \begin{figure}[t] \centering \includegraphics[width=0.7\columnwidth]{./pics/white_box_evolution.pdf} \caption{Evolution of $D_{\nicefrac{1}{2}}$ with the complexity budget for white box setup. Attacks on EfficientNet~\cite{pmlr-v97-tan19a}} \label{fig:distortion_evolution_WB} \end{figure} \textbf{White box attacks}: Figure~\ref{fig:distortion_evolution_WB} compares three white-box-attacks in the best effort mode: \PGD~\cite{Kurakin:2017aa}\xspace, \CW~\cite{carlini2017towards}\xspace, and \BP~\cite{Zhang:2021aa}\xspace with our trick~\eqref{eq:Alpha}. They all reach the same $D_{\nicefrac{1}{2}}$ when given a large complexity budget. Yet, \texttt{BP}\xspace converges faster than the others. Our benchmark uses this version of \texttt{BP}\xspace to evaluate the white-box-robustness. \begin{table}[b] \centering \resizebox{\linewidth}{!}{% \setlength\tabcolsep{2pt} \begin{tabular}{|c|c|c|c|c|} \hline Benchmark & Domain & Nb. attacks & Measures & Runtime \\ \hline \texttt{RoBIC}\xspace & $\llbracket 0, 255 \rrbracket ^n $ & 1 WB + 1 BB & Half-distortion $\ell_2$ & 43s \\ \hline \texttt{RobustBench}~\cite{Croce:2020aa}\xspace & $[0, 1]^n$ & 3 WB + 1 BB & Success-Rate for & 48s \\ & & & fixed budget ($\ell_2$ or $\ell_{\infty}$) & \\ \hline \texttt{ADBD}~\cite{Chen:2020ab}\xspace & $[0, 1]^n$ & 1 BB & Distance $\ell_\infty$ & 360s\\ \hline \texttt{RobustVision}~\cite{Lab:aa}\xspace & $[0, 1]^n$ & 6 WB + 5 BB & Median Distance $\ell_2$ & 200s\\ \hline \texttt{ARES}~\cite{Dong:2020aa}\xspace & $[0, 1]^n$ & 5 WB + 10 BB & Success-Rate vs Budget & Too long\\ & & & ($\ell_2$, $\ell_{\infty}$ or queries) & \\ \hline \end{tabular} } \caption{Benchmarks Comparison. Average Runtimes per ImageNet Image with ResNet50~\cite{madry2018towards}.} \label{table:benchmarks_comparison} \end{table} \subsection{Comparison with other benchmarks} Table~\ref{table:benchmarks_comparison} lists several benchmarks. Most of them evaluate the robustness as the success-rate under a prescribed $\ell_2$ or $\ell_{\infty}$ distortion budget. But, these budgets are set arbitrarily or even not constant within the same benchmark for \texttt{RobustML}\xspace. Our half-distortion~\eqref{eq:HD} is parameter-free. It returns an accurate, reliable and fair measurement of robustness. Some benchmarks need many attacks to get a full vision of the robustness: \texttt{ARES}~\cite{Dong:2020aa}\xspace and \texttt{RobustVision}~\cite{Lab:aa}\xspace use 11 attacks. This is too time-consuming. On the contrary, \texttt{ADBD}~\cite{Chen:2020ab}\xspace focuses on a single black-box attack, which is indeed outdated. \texttt{RobustBench}~\cite{Croce:2020aa}\xspace condenses four attacks in one measure elegantly: for a given image, if the first simple attack does not succeed within the distortion budget, then the second more complex one is launched \textit{etc.} The total runtime heavily depends on the distortion budget. Yet, black-box and white-box attacks use different mechanisms. Our benchmark reports a measurement for each separately. \begin{table}[t] \centering \resizebox{\linewidth}{!}{% \setlength\tabcolsep{2pt} \begin{tabular}{|c|r||c|c|c|} \hline Model & Parameters & Accuracy & \multicolumn{2}{|c|}{$D_{\nicefrac{1}{2}}$ } \\ & (millions) & $\eta(0)$ & white box & black box \\ \hline AlexNet~\cite{DBLP:journals/corr/Krizhevsky14} & 62.38 & 56.8 & 0.19 & 2.17 \\ CSPResNeXt50~\cite{wang2020cspnet} & 20.57 & 84.6 & 0.13 & 4.48 \\ DualPathNetworks 68b ~\cite{10.5555/3294996.3295200} & 12.61 & 83.8 & 0.08 & 3.82 \\ MixNet Large~\cite{2019arXiv190709595T} & 7.33 & 84.2 & 0.12 & 2.96 \\ MobileNetV2~\cite{Sandler_2018_CVPR} & 5.83 & 80.1 & 0.09 & 2.90 \\ ReXNet 200~\cite{2020arXiv200700992H} & 16.37 & 85.4 & 0.14 & 3.89 \\ RegNetY 032~\cite{Radosavovic2020} & 19.44 & 85.8 & 0.11 & 4.94 \\ SEResNeXt50 32x4d~\cite{hu2018senet} & 27.56 & \bf 85.9 & 0.12 & \bf 5.01 \\ VGG16~\cite{DBLP:journals/corr/SimonyanZ14a} & 138.00 & 74.9 & 0.09 & 2.44 \\ \hline EfficientNet AdvProp~\cite{Xie_2020_CVPR_advprop} & 5.29 & 84.3 & \bf 0.31 & 4.35 \\ EfficientNet EdgeTPU Small~\cite{pmlr-v97-tan19a} & 5.44 & 82.8 & 0.15 & 3.16 \\ EfficientNet NoisyStudent~\cite{Xie_2020_CVPR_ns} & 5.29 & 82.7 & 0.19 & 2.37 \\ EfficientNet~\cite{pmlr-v97-tan19a} & 5.29 & 82.8 & 0.17 & 3.56 \\ \hline ResNet50 (torchvision)~\cite{He_2016_CVPR} & 25.56 & 77.9 & 0.10 & 2.77 \\ ResNet50 (timm)~\cite{He_2016_CVPR} & 25.56 & 80.5 & 0.15 & 4.35 \\ ResNet50 AdvTrain~\cite{madry2018towards} & 25.56 & 60.8 & \bf 2.56 & \bf 9.88 \\ \hline \end{tabular} } \caption{Benchmark of models with 1.000 ImageNet Images} \label{table:our_benchmark_results} \end{table} \subsection{Benchmarking models} Table~\ref{table:our_benchmark_results} compares standard models from \textit{timm}~\cite{rw2019timm} and \textit{torchvision}~\cite{10.1145/1873951.1874254} libraries. Here are some intriguing results. \textbf{Robustness in white box \textit{vs.} black box}. One does not imply the other. Fig.~\ref{fig:half_distortion_plot} even shows a negative correlation. However, some models escape this rule. For instance, VGG16 is neither robust in black box nor in white box. EfficientNet AdvProp~\cite{Xie_2020_CVPR_advprop} follows the opposite trend. We believe that black-box robustness reveals the complexity of the borders between classes, and white-box robustness indicates how close natural images are from the borders. This highlights the importance of having two different measurements. \textbf{The importance of the training procedure.} There is on average a factor 20 between the half-distortions in white and black box. This factor drops to 4 and 10 for the models adversarially trained: ResNet50~\cite{madry2018towards}, EfficientNet AdvProp~\cite{Xie_2020_CVPR_advprop}. Table~\ref{table:our_benchmark_results} lists four EfficientNet models sharing the same architecture but different training procedures. Their accuracies are similar but there is up to a factor of 2 between the robustnesses. The same holds on the three variants of Resnet50. The gaps in accuracy and robustness are noticeable with standard models from \textit{timm}~\cite{rw2019timm} and \textit{torchvision}~\cite{10.1145/1873951.1874254}. It is even more visible with adversarial training from \cite{madry2018towards}: the gain in robustness is impressive but at the cost of a big drop in accuracy. \begin{figure}[t] \centering \includegraphics[width = 0.9 \columnwidth]{./pics/half_distortion_white_box_black_box.pdf} \caption{Black-box $D_{\nicefrac{1}{2}}$ as a function of white-box $D_{\nicefrac{1}{2}}$.} \label{fig:half_distortion_plot} \end{figure} \section{Conclusion} The paper introduces a rigorous benchmark based on a new and independent measurement of robustness: the half distortion. \texttt{RoBIC}\xspace is faster than the other benchmarks. This allows to tackle larger images which is more realistic. In addition to the accuracy, \texttt{RoBIC}\xspace gives the black box robustness, and white box robustness. We believe that the first indicates how far away the class boundaries lie from the images whereas the last reflects how curved are the boundaries. As the other benchmarks, two limitations hold: The network must be differentiable to run a white box attack, and deterministic to run a black box attack. \section{Notes de preparation} Liste des benchmarks concurrents: \begin{itemize} \item ADBD: \RAYS~\cite{Chen:2020ab}\xspace also proposes ADBD (Average Distance to Boundary Decision) as a measure of robustness. It is based on $L_\infty$, 1000 CIFAR-10 images, black-box only 4000 queries. see \url{https://github.com/uclaml/RayS}. \item RobustBench~\cite{Croce:2020aa}: standardized benchmark (no adaptive attacks), $L_\infty$ or $L_2$ attacks, mostly CIFAR10. Measure = Adversarial accuracy under a given $\epsilon$ distortion budget. \url{https://robustbench.github.io/}. Pipeline of attacks, remove attacks if previous success to attack. \item Robust Vision Benchmark: \url{github.com/bethgelab/robust-vision-benchmark} or \url{https://robust.vision/benchmark/leaderboard/}. Best Effort for a given attack. Measure = median of $L_2$ norm over all attacks in best effort. ImageNet. 11 attacks, results not clear. \item ARES~\cite{Dong:2020aa} \url{https://github.com/thu-ml/ares}. Still under development but there is 11 attacks Many curves: one curve for each model for each attacks. Show curves: accuracy vs perturbation budget and accuracy vs attack strength - \item Robust-ML: \url{https://github.com/robust-ml/robustml}. Adaptive attacks. specific benchmark. Only CW is used (see robustbench paper) and the parameters are fitted manually for each model. It's not really to compare models and defenses but more Carlini wagner \end{itemize}• \begin{table}[h] \centering \resizebox{\linewidth}{!}{% \setlength\tabcolsep{2pt} \begin{tabular}{|c|c|c|c|c|c|c|} \hline & \multicolumn{2}{|c|}{Our} & \multicolumn{2}{|c|}{RobustBench~\cite{Croce:2020aa}} & \multicolumn{2}{|c|}{ADBD~\cite{Chen:2020ab}} \\ Model & Time & Score & Time & Score & Time & Score \\ \hline AlexNet~\cite{DBLP:journals/corr/Krizhevsky14} & 59 min & 2.17 & \textbf{2 min} & 0\% & 450 min & 0.0018 \\ \hline EfficientNet~\cite{pmlr-v97-tan19a} & 61 min & 3.56 & \textbf{7 min} & 2\% & 830 min & 0.0057 \\ \hline ResNet50~\cite{madry2018towards} & \textbf{73 min} & 9.88 & 80 min & 56\% & Too long & \\ \hline \end{tabular} } \caption{Runtimes to evaluate the robustness of a model with 100 ImageNet images.} \label{table:benchmark_runtimes} \end{table} \textbf{Runtimes}: we compare our runtime with \texttt{RobustBench}~\cite{Croce:2020aa}\xspace with $\ell_2=0.5$ and ADBD run with $40000$ queries. \texttt{RobustVision}~\cite{Lab:aa}\xspace and \texttt{RobustML}\xspace are missing in this comparison because the parameters or attacks are not clearly given. We evaluate them on 100 ImageNet images. In table \ref{table:benchmark_runtimes}, \texttt{RobustBench}~\cite{Croce:2020aa}\xspace is faster than us on AlexNet~\cite{DBLP:journals/corr/Krizhevsky14} and EfficientNet~\cite{pmlr-v97-tan19a}. Its pipeline makes the benchmark faster by removing images that have already been successfully attacked. If the model is not very robust, like AlexNet, it could be very fast. However, this stategy this strategy is not as useful if the model is robust. For example, they is slower than ours for ResNet50~\cite{madry2018towards}. They also set a distance $\ell_p$ to remove images below this distance. \texttt{ARES}~\cite{Dong:2020aa}\xspace and \texttt{RobustML}\xspace have this too. But its arbitrarily fixed to $\ell_2=0.5$ and $\ell_{\infty}=8/255$. The smaller this fixed distance is, the more challenging but slower the benchmark will be. We decided to establish an objective measure by the half-life. This allows us to have a finer vision of the robustness, but require to attack all the images. Moreover, except the different runtime, all the different benchmark in \ref{table:benchmark_runtimes} give the same ranking.\\ \section{Notes de preparation} Liste des benchmarks concurrents: \begin{itemize} \item ADBD: \RAYS~\cite{Chen:2020ab}\xspace also proposes ADBD (Average Distance to Boundary Decision) as a measure of robustness. It is based on $L_\infty$, 1000 CIFAR-10 images, black-box only 4000 queries. see \url{https://github.com/uclaml/RayS}. \item RobustBench~\cite{Croce:2020aa}: standardized benchmark (no adaptive attacks), $L_\infty$ or $L_2$ attacks, mostly CIFAR10. Measure = Adversarial accuracy under a given $\epsilon$ distortion budget. \url{https://robustbench.github.io/}. Pipeline of attacks, remove attacks if previous success to attack. \item Robust Vision Benchmark: \url{github.com/bethgelab/robust-vision-benchmark} or \url{https://robust.vision/benchmark/leaderboard/}. Best Effort for a given attack. Measure = median of $L_2$ norm over all attacks in best effort. ImageNet. 11 attacks, results not clear. \item ARES~\cite{Dong:2020aa} \url{https://github.com/thu-ml/ares}. Still under development but there is 11 attacks Many curves: one curve for each model for each attacks. Show curves: accuracy vs perturbation budget and accuracy vs attack strength - \item Robust-ML: \url{https://github.com/robust-ml/robustml}. Adaptive attacks. specific benchmark. Only CW is used (see robustbench paper) and the parameters are fitted manually for each model. It's not really to compare models and defenses but more Carlini wagner \end{itemize}• \begin{table}[h] \centering \resizebox{\linewidth}{!}{% \setlength\tabcolsep{2pt} \begin{tabular}{|c|c|c|c|c|c|c|} \hline & \multicolumn{2}{|c|}{Our} & \multicolumn{2}{|c|}{RobustBench~\cite{Croce:2020aa}} & \multicolumn{2}{|c|}{ADBD~\cite{Chen:2020ab}} \\ Model & Time & Score & Time & Score & Time & Score \\ \hline AlexNet~\cite{DBLP:journals/corr/Krizhevsky14} & 59 min & 2.17 & \textbf{2 min} & 0\% & 450 min & 0.0018 \\ \hline EfficientNet~\cite{pmlr-v97-tan19a} & 61 min & 3.56 & \textbf{7 min} & 2\% & 830 min & 0.0057 \\ \hline ResNet50~\cite{madry2018towards} & \textbf{73 min} & 9.88 & 80 min & 56\% & Too long & \\ \hline \end{tabular} } \caption{Runtimes to evaluate the robustness of a model with 100 ImageNet images.} \label{table:benchmark_runtimes} \end{table} \textbf{Runtimes}: we compare our runtime with \texttt{RobustBench}~\cite{Croce:2020aa}\xspace with $\ell_2=0.5$ and ADBD run with $40000$ queries. \texttt{RobustVision}~\cite{Lab:aa}\xspace and \texttt{RobustML}\xspace are missing in this comparison because the parameters or attacks are not clearly given. We evaluate them on 100 ImageNet images. In table \ref{table:benchmark_runtimes}, \texttt{RobustBench}~\cite{Croce:2020aa}\xspace is faster than us on AlexNet~\cite{DBLP:journals/corr/Krizhevsky14} and EfficientNet~\cite{pmlr-v97-tan19a}. Its pipeline makes the benchmark faster by removing images that have already been successfully attacked. If the model is not very robust, like AlexNet, it could be very fast. However, this stategy this strategy is not as useful if the model is robust. For example, they is slower than ours for ResNet50~\cite{madry2018towards}. They also set a distance $\ell_p$ to remove images below this distance. \texttt{ARES}~\cite{Dong:2020aa}\xspace and \texttt{RobustML}\xspace have this too. But its arbitrarily fixed to $\ell_2=0.5$ and $\ell_{\infty}=8/255$. The smaller this fixed distance is, the more challenging but slower the benchmark will be. We decided to establish an objective measure by the half-life. This allows us to have a finer vision of the robustness, but require to attack all the images. Moreover, except the different runtime, all the different benchmark in \ref{table:benchmark_runtimes} give the same ranking.\\
\section*{Resumen} \addcontentsline{toc}{chapter}{Resumen} \end{center} \medskip \begin{quote} Esta tesis está dedicada al estudio de las propiedades termodinámicas de un gas magnetizado de bosones vectoriales neutros a toda temperatura, con el fin de proporcionar ecuaciones de estado que permitan descripciones más generales y precisas de los fenómenos astrofísicos. Para ello, a partir del espectro energético derivado de la teoría de Proca, se obtienen expresiones analíticas para las magnitudes termodinámicas válidas a toda temperatura, así como sus límites no relativistas. A través de estas expresiones, y considerando el sistema en condiciones astrofísicas (densidades de partículas, temperaturas y campos magnéticos en el orden de los posibles en las Estrellas de Neutrones), se investigan la condensación de Bose-Einstein, las propiedades magnéticas y las ecuaciones de estado del gas, haciendo especial énfasis en la influencia de las antipartículas y el campo magnético. En todos los casos los resultados se comparan con sus análogos obtenidos en los límites de baja temperatura y no relativista, pues ello permite establecer los rangos aproximados de validez de dichas aproximaciones y lograr una mejor comprensión de sus efectos en el sistema estudiado. \end{quote} \begin{center} \section*{Abstract} \addcontentsline{toc}{chapter}{Abstract} \end{center} \medskip \begin{quote} This thesis is dedicated to study the thermodynamic properties of a magnetized neutral vector boson gas at any temperature, with the aim to provide equations of state that allow more general and precise descriptions of astrophysical phenomena. The all--temperature analytical expressions for the thermodynamic magnitudes, as well as their non-relativistic limits, are obtained starting from the energy spectrum given by Proca's theory. With these expressions, and considering the system under astrophysical conditions (particle densities, temperatures and magnetic fields in the order of the estimated for Neutron Stars), we investigate the Bose-Einstein condensation, the magnetic properties and the equations of state of the gas, making a special emphasis on the influence of antiparticles and magnetic field. In all cases, the results are compared with their analogues in the low temperature and the non-relativistic limits. This allows us to establish the ranges of validity of these approximations and to achieve a better understanding of their effects on the studied system. \end{quote} \vfill \cleardoublepage \section*{Agradecimientos} \end{center} \begin{quote} \begin{flushright} Mis primeras l\'ineas de agradecimiento tienen que ser para mis tutoras porque sencillamente son las mejores. Primeramente, a Gretel, por proponerme la genial idea de trabajar en temas de astrof\'isica, y a Aurora, por aceptarme como estudiante de maestría aun sabiendo que no ten\'ia ninguna formación teórica. Por el conocimiento compartido y sobre todo por el tiempo dedicado. Por la paciencia en mis per\'iodos de vagancia. A Gretel, en particular, por la paciencia infinita con mis errores tipográficos que por cierto también parecían infinitos. Por la amistad, y por los momentos de diversión; \end{flushright} \begin{flushright} A mis padres, por el amor, el apoyo, el \'animo y por la confianza depositada en m\'i; \end{flushright} \begin{flushright} Al ICIMAF, por abrirme las puertas y brindarme un lugar donde continuar con mi vocación científica. En general, por todas las oportunidades que han contribuido a mi formaci\'on profesional; \end{flushright} \begin{flushright} A mis compa\~{n}eros del departamento de Física Teórica del ICIMAF: Diana, Yamila, Gaby, Duvier, Dariel, Samantha, Elizabeth, Jorgito, Hugo, Augusto y Cabo, porque es un grupo de trabajo donde el compa\~{n}erismo sobra y es muy agradable trabajar en ese tipo de ambiente. En especial quiero agradecer a Diana quien fue de mucha ayuda en mis inicios en LaTex y en Mathematica; \end{flushright} \begin{flushright} A Mercy, secretaria de la Facultad de Física, por la dulzura y amabilidad mostrada en lo referente a todos los temas burocráticos de la maestría; \end{flushright} \begin{flushright} A Sergio, por el amor y cari\~{n}o en las etapas finales de la tesis. A Gabriela, por ser mi mejor amiga y aguantarme en mis periodos de estrés y, sobre todo, por estar siempre para m\'i cuando necesito hablar y desahogarme. A Rey, por prestarme sus computadoras para realizar mis cálculos m\'as rápido ; \end{flushright} \begin{flushright} A todos mi amigos del grupo de teatro "Monopolo Magnetico'': Gretel, Joeluis, Sandra, Vicente, Adri\'an, Alejandro, Landy y Yanela, y de mi banda "Jones Rock Band'': Tony, Rey Luis, Ernesto, Javi y B\'arbaro. Porque todos ellos hacen que mi vida sea m\'as alegre y bonita. \end{flushright} \end{quote} \vfill \cleardoublepage \pagestyle{plain} \chapter{C\'alculo del calor espec\'ifico no relativista} \label{appA} El procedimiento para calcular el calor espec\'ifico depende de si estamos en presencia de la fase condensada o no. Comencemos con el caso en que ya hay condensado, ya que el cálculo es más simple. En en el condesado $C_{V_{NR}}$ es: \begin{equation}\label{eq36} C_{V_{NR}}=\frac{\partial}{\partial T}\bigg[-\frac{3}{2}\Omega_{NR}(\mu,T,B)-kB[N_{+}-N_{-}]\bigg], \end{equation} \noindent luego de derivar: \begin{eqnarray}\label{eq37}\nonumber C_{V_{NR}}(\mu,T,B)=\frac{3}{2}S_{NR}(\mu,T,B)-\frac{3}{2}\frac{kB}{T}[N_{+}-N_{-}]+\frac{kB}{T^2}\left(\frac{mT}{2\pi}\right)^{3/2}\\ \times[(\mu+kB)g_{1/2}(z_{+})-(\mu-kB)g_{1/2}(z_{-})], \end{eqnarray} \noindent sustituyendo $\mu=-kB$ queda: \begin{eqnarray} \label{eq38} C_{V_{NR}}(-kB,T,B)=\frac{3}{2}S_{NR}(-kB,T,B)-\frac{3}{2}\frac{kB}{T}[N_{+}-N_{-}]+2\left(\frac{kB}{T}\right)^2\left(\frac{mT}{2\pi}\right)^{3/2}g_{1/2}(z_{-}). \end{eqnarray} \noindent En la fase no condensada $N=N_{+}+N_{-}+N_{0}$ ya que $N_{gs}=0$ y se cumple: \begin{eqnarray}\label{eq39} \bigg(\frac{mT}{2\pi}\bigg)^{3/2}=\frac{1}{g_{3/2}(z_{+})+g_{3/2}(z_{-})+g_{3/2}(z_{0})}. \end{eqnarray} Utilizando la identidad anterior podemos reescribir la densidad de energía Ec.(\ref{eq2.12}): \begin{eqnarray}\label{eq39.1} \frac{E_{NR}(\mu,T,B)}{N}=\frac{3}{2}T\bigg[\frac{g_{5/2}(z_{-})+g_{5/2}(z)+g_{5/2}(z_{+})}{g_{3/2}(z_{-})+g_{3/2}(z)+g_{3/2}(z_{+})}\bigg]-k B \bigg[\frac{g_{3/2}(z_{-})-g_{3/2}(z_{+})}{g_{3/2}(z_{-})+g_{3/2}(z)+g_{3/2}(z_{+})} \bigg], \end{eqnarray} \noindent y escribir el calor específico como: \begin{eqnarray}\label{eq40}\nonumber \frac{C_{V_{NR}}}{N}= \frac{3}{2}\bigg[\frac{g_{5/2}(z_{-})+g_{5/2}(z)+g_{5/2}(z_{+})}{g_{3/2}(z_{-})+g_{3/2}(z)+g_{3/2}(z_{+})}\bigg]+ \frac{3}{2} T \frac{\partial}{\partial T} \bigg[\frac{g_{5/2}(z_{-})+g_{5/2}(z)+g_{5/2}(z_{+})}{g_{3/2}(z_{-})+g_{3/2}(z)+g_{3/2}(z_{+})}\bigg]- \\ -k B \frac{\partial}{\partial T} \bigg[\frac{g_{3/2}(z_{-})-g_{3/2}(z_{+})}{g_{3/2}(z_{-})+g_{3/2}(z)+g_{3/2}(z_{+})} \bigg]. \end{eqnarray} \noindent Vamos a llamarle $ D_{1}$ a la derivada del segundo término de (\ref{eq40}) y $ D_{2}$ a la del tercer término, ya que las calcularemos por separado. Como, $ \frac {\partial} {\partial T} [g_{3/2} (z_{-}) + g_{3/2} (z) + g_{3/2} (z_{+})] =-\frac{3}{2}\frac{1}{T} \left(\frac{2\pi}{mT}\right)^{3/2}$ y usando (\ref{eq38}) obtenemos: \begin{eqnarray}\label{eq41} \nonumber \frac{\partial}{\partial T}[g_{3/2}(z_{-})]=-\frac{3}{2}\frac{1}{T}g_{3/2}(z_{-}),\\ \nonumber \frac{\partial}{\partial T}[g_{3/2}(z)]=-\frac{3}{2}\frac{1}{T}g_{3/2}(z),\\ \frac{\partial}{\partial T}[g_{3/2}(z_{+})]=-\frac{3}{2}\frac{1}{T}g_{3/2}(z_{+}). \end{eqnarray} \noindent Utilizando la siguiente fórmula de recurrencia de la función polilogartímica $ z_{i} \frac {\partial} {\partial z_{i}} [g_{\nu} (z_{i})] = g_{\nu-1} (z_{i}) $ se obtiene: \begin{eqnarray}\label{eq42} \frac{\partial}{\partial T}g_{3/2}(z_{i})=\frac{\partial }{\partial z_{i}}[g_{3/2}(z_{i})] \frac{\partial z_{i}}{\partial T} \Longrightarrow \frac{1}{z_{i}}\frac{\partial z_{i}}{\partial T} = \frac{\partial}{\partial T} [g_{3/2}(z_{i})] \frac{1}{g_{1/2}(z_{i})}, \end{eqnarray} luego: \begin{eqnarray}\label{eq43} \nonumber D_{1}= \frac{ \frac{\partial}{\partial z_{-}}[g_{5/2}(z_{-})] \frac{\partial z_{-}}{\partial T}+ \frac{\partial}{\partial z}[g_{5/2}(z)] \frac{\partial z}{\partial T}+ \frac{\partial}{\partial z_{+}}[g_{5/2}(z_{+})] \frac{\partial z_{+}}{\partial T}}{g_{3/2}(z_{-})+g_{3/2}(z)+g_{3/2}(z_{+})} \\ - \frac{g_{5/2}(z_{-})+g_{5/2}(z)+g_{5/2}(z_{+})}{[g_{3/2}(z_{-})+g_{3/2}(z)+g_{3/2}(z_{+})]^{2}}\frac{\partial}{\partial T} [g_{3/2}(z_{-})+g_{3/2}(z)+g_{3/2}(z_{+})]. \end{eqnarray} \noindent Haciendo uso de $\frac{\partial}{\partial T} [g_{\nu}(z_{\pm})]=-\frac{(\mu\pm k B)}{T^{2}}g_{\nu-1}(z_{\pm}),\;\frac{\partial}{\partial T}[g_{\nu}(z)]=-\frac{\mu}{T^{2}}g_{\nu-1}(z),$ (\ref{eq41}) y (\ref{eq42}) es f\'acil llegar a: \begin{eqnarray}\label{eq44} D_{1}= -\frac{3}{2}\frac{1}{T}\frac{\frac{[g_{3/2}(z_{-})]^{2}}{g_{1/2}(z_{-})}+\frac{[g_{3/2}(z)]^{2}}{g_{1/2}(z)}+\frac{[g_{3/2}(z_{+})]^{2}} {g_{1/2}(z_{+})}}{g_{3/2}(z_{+})+g_{3/2}(z)+g_{3/2}(z_{+})}+ \frac{3}{2}\frac{1}{T} \frac{g_{5/2}(z_{-})+g_{5/2}(z)+g_{5/2}(z_{+})}{g_{3/2}(z_{-})+g_{3/2}(z)+g_{3/2}(z_{+})}, \end{eqnarray} \begin{eqnarray}\label{eq45} D_{2}=0. \end{eqnarray} \noindent Finalmente obtenemos el calor espec\'ifico en la fase no condensada: \begin{eqnarray}\label{eq46} \frac{C_{V_{NR}}(\mu,T,B)}{N}=\frac{15}{4}\frac{g_{5/2}(z_{-})+g_{5/2}(z)+g_{5/2}(z_{+})}{g_{3/2}(z_{-})+g_{3/2}(z)+g_{3/2}(z_{+})}-\frac{9}{4} \frac{\frac{[g_{3/2}(z_{-})]^{2}}{g_{1/2}(z_{-})}+\frac{[g_{3/2}(z)]^{2}}{g_{1/2}(z)}+\frac{[g_{3/2}(z_{+})]^{2}} {g_{1/2}(z_{+})}}{g_{3/2}(z_{+})+g_{3/2}(z)+g_{3/2}(z_{+})}. \end{eqnarray} \chapter{An\'alisis de convergencia de la susceptibilidad magn\'etica relativista en presencia del condensado} \label{appB} Analicemos la convergencia del primer t\'ermino de $\chi_{st}$ en la Ec. (\ref{eqChist}): \begin{equation}\label{Eqb1} \sum_{s}\sum_{n=1}^{\infty} \frac{k^2m^2s^2}{\pi^2(2-bs)^2}(z^n-z^{-n})K_0(nm\beta\sqrt{1-bs}). \end{equation} \noindent Sumando por $s=-1,0,1$ queda: \begin{equation} \sum_{n=1}^{\infty}\bigg\{ \frac{k^2m^2}{\pi^2(2-b)^2}(z^n-z^{-n})K_0(nm\beta\sqrt{1-b})+\frac{k^2m^2}{\pi^2(2+b)^2}(z^n-z^{-n})K_0(nm\beta\sqrt{1+b})\bigg\}, \end{equation} \noindent cuando $n\rightarrow\infty$,$\;$ $K_0(nm\beta\sqrt{1\pm b})\sim \frac{\sqrt{\pi}e^{-nm\beta\sqrt{1\pm b}}}{\sqrt{2nm\beta\sqrt{1\pm b}}}$; por tanto, para $n>>1$ se cumple que: \begin{equation} a_n(s=\pm1)=(e^{n\mu\beta}-e^{-n\mu\beta})K_0(nm\beta\sqrt{1\pm b})\approx\frac{\sqrt{\pi}(e^{n\beta(\mu-m\sqrt{1\pm b})}+e^{-n\beta(\mu+m\sqrt{1\pm b})})}{\sqrt{2nm\beta\sqrt{1\pm b}}}. \end{equation} \noindent En el condensado $\mu=m\sqrt{1-b}$, por tanto: \begin{equation}\label{Eqb4} a_n(s=-1)=\frac{\sqrt{\pi}(e^{nm\beta(\sqrt{1-b}-\sqrt{1+ b})}+e^{-nm\beta(\sqrt{1-b}+\sqrt{1+ b})})}{\sqrt{2nm\beta\sqrt{1+b}}}, \end{equation} \noindent y \begin{equation}\label{Eqb5} a_n(s=1)=\frac{\sqrt{\pi}(1+e^{-nm\beta2\sqrt{1-b}})}{\sqrt{2nm\beta\sqrt{1-b}}}. \end{equation} \noindent Cuando $n\rightarrow\infty$, la Ec.(\ref{Eqb4}) tiende a cero exponencialmente, mientras que la Ec.(\ref{Eqb5}) tiende a cero como $1/\sqrt{n}$, por tanto, la suma infinita de $a_n(s=1)$ no converge. En los otros t\'erminos de $\chi_{st}$ con $s=1$ pasa lo mismo, pero como est\'an divididos por $n$, tienden a cero como $\frac{1}{n^{3/2}}$ y no hay problemas de convergencia. Luego $\chi_{st}$ no converge para $T<T_c$. Para campo finito la convergencia de $\chi^{\pm}$ se logra porque el t\'ermino infinito en $\chi_{st}$ se compensa con el segundo sumando de $\chi_{gs}$: \begin{equation}\label{Eqb6} -\sum_{s}\sum_{n=1}^{\infty} \frac{k^2m^2s\sqrt{1-bs}}{\pi^2\sqrt{1-b}(2-bs)}(z^n-z^{-n})K_0(nm\beta\sqrt{1-bs}), \end{equation} \noindent que tambi\'en tiende a cero como $1/\sqrt{n}$ cuando $n\rightarrow\infty$. Sin embargo, para $b=0$ la Ec.(\ref{Eqb6}) se anula cuando sumamos por $s$, no hay nada que compense el infinito de $\chi_{st}$ y, como consecuencia, $\chi^{\pm}(\mu,T,0)$ diverge para $T<T_c$. \chapter{Preliminares} \label{cap1} Este capítulo tiene carácter introductorio. En él se presenta el sistema de unidades utilizado en la tesis, se discuten las principales características de la condensación de Bose-Einstein, y se explica la metodología a seguir para el estudio termodinámico del gas magnetizado de bosones vectoriales neutros a través de un ejemplo: un gas de bosones vectoriales neutros a campo magn\'etico cero. \section{Unidades y magnitudes f\'isicas utilizadas } En astrofísica y en f\'isica de part\'iculas es habitual y conveniente usar el sistema de unidades naturales (UN). Este sistema se define haciendo en todas las ecuaciones $\hbar=c=k_B=1$, donde $\hbar$ es la constante de Planck, c es la velocidad de la luz en el vac\'io y $k_B$ es la constante de Boltzman. En la tesis, todas las ecuaciones están escritas en este sistema de unidades y las magnitudes que se encuentran en ellas están expresadas en potencias de MeV: \begin{eqnarray}\nonumber [longitud]=[tiempo]=[masa]^{-1}=[energ\'ia]^{-1}=[temperatura]^{-1}. \end{eqnarray} Los factores de conversi\'on para obtener las magnitudes en el Sistema Internacional de unidades a partir de las UN son: \begin{eqnarray}\nonumber 1m&=&5.07\times 10^{13}MeV^{-1},\\ \nonumber 1kg&=& 5.61\times 10^{29}MeV,\\ \nonumber 1s&=& 1.52\times 10^{21}MeV^{-1},\\ \nonumber 1K&=& 8.61\times 10^{-11}MeV,\\ \nonumber 1J&=& 6.24\times 10^{12}MeV,\\ \nonumber 1T&=&10^4G=0.699\times 10^{-9}MeV^2. \end{eqnarray} En los gráficos, las magnitudes se reportan o bien adimensionalizadas, o en las unidades m\'as usadas para ellas, a fin de que nuestros resultados puedan compararse fácilmente con los reportados en la literatura especializada. Por ello, la masa se expresa en MeV y la densidad de partículas en $cm^{-3}$; el campo magn\'etico se da en Gauss(G), la presi\'on en MeV/fm$^3$ y la temperatura en Kelvin (K). La densidad de masa nuclear $\rho_N$ para los neutrones corresponde a una densidad de part\'iculas $N$ de aproximadamente $10^{38}cm^{-3}$. Todos los c\'alculos num\'ericos de la tesis se realizaron para un gas de bosones vectoriales neutros con masa $2m_n$ y momento magn\'etico $2k_n$, donde $m_n = 939,565 MeV$ y $k_n=8.65\times 10^{-5}$MeV$^{-1}$ son la masa y el momento magn\'etico del neutr\'on \cite{Zyla:2020zbs}, a fin de facilitar su comparación con lo obtenido en \cite{tesisgretel}. Es importante aclarar que aunque el apareamiento de neutrones solo tiene lugar para temperaturas $T\lesssim 10$ keV \cite{gezerlis2014pairing}, nuestro estudio no pierde fuerza por esto, ya que en todos los casos la presentaci\'on y discusi\'on de los resultados ha sido hecha de manera general y sus conclusiones son v\'alidas más allá de la part\'icula escogida. \section{Espectro energético del gas magnetizado de bosones vectoriales neutros} Los bosones neutros con spin uno en presencia de un campo magnético pueden ser descritos a través de una extensión del lagrangiano de Proca que incluya las interacciones entre las partículas y el campo electromagnético \cite{PhysRev.131.2326,PhysRevD.89.121701}: \begin{eqnarray}\label{Lagrangian} L = -\frac{1}{4}F_{\mu\nu}F^{\mu\nu}-\frac{1}{2} \rho^{\mu\nu}\rho_{\mu\nu} + m^2 \rho^{\mu}\rho_{\mu} +i m \kappa(\rho^{\mu} \rho_{\nu}-\rho^{\nu}\rho_{\mu}) F_{\mu\nu}. \end{eqnarray} En la Ec.~(\ref{Lagrangian}) los índices $\mu$ y $\nu$ van de $1$ a $4$, $F^{\mu\nu}$ es el tensor del campo electromagnético y $\rho_{\mu\nu}$, $\rho_{\mu}$ son variables independientes del campo que cumplen \cite{PhysRev.131.2326}: \begin{equation}\label{fieldeqns} \partial_{\mu} \rho_{\mu\nu}-m^2 \rho_{\nu}+ 2i \kappa m \rho_{\mu} F_{\mu\nu}=0,\quad\quad \rho_{\mu\nu} = \partial_{\mu} \rho_{\nu} - \partial_{\nu} \rho_{\mu}. \end{equation} De la variación del lagrangiano con respecto al campo $\rho_{\mu}$ se obtienen las ecuaciones de movimiento, que en el espacio de los momentos pueden escribirse como: \begin{equation} \left((p_{\mu}^2 + m^2)\delta_{\mu\nu} -p_{\mu} p_{\nu} - 2 i \kappa m F_{\mu \nu}\right)\rho_{\mu} = 0. \end{equation} En lo que sigue de la tesis el campo magnético se considerará uniforme, constante y en la dirección $z$: $\textbf{B}=(0,0,B)$. Con ello, uno puede partir de la Ec.~(\ref{fieldeqns}) y obtener el hamiltoniano generalizado de Sakata-Taketani para la función de onda de seis componentes que describe el sistema de bosones vectoriales magnetizados \cite{PhysRev.131.2326, PhysRevD.89.121701} siguiendo el procedimiento descrito en \cite{PhysRev.131.2326}. El hamiltoniano es \cite{tesisgretel}: \begin{equation}\label{hamiltonian} \hat{H} = \sigma_3 m + (\sigma_3 + i \sigma_2) \frac{\textbf{p}^2}{2 m} - i \sigma_2 \frac{(\textbf{p}\cdot\textbf{S})^2}{m} -(\sigma_3 - i \sigma_2) \kappa \textbf{S} \cdot \textbf{B}, \end{equation} \noindent con $\textbf{p}=(p_{\perp},p_3)$, donde $p_3$ es la componente del momentum paralela al campo magnético y $p_{\perp}=p_1^2 + p_{2}^2$ es la componente perpendicular. $\sigma_{i}$ son las matrices de Pauli\footnote{ $\begin{array}{ccc}\sigma_1= \left( \begin{array}{cc}0 & 1 \\1 & 0 \end{array} \right), & i\sigma_2= \left( \begin{array}{cc} 0 & 1 \\ \text{-}1 & 0\end{array} \right), &\sigma_3= \left( \begin{array}{cc}1&0\\0&\text{-}1\end{array} \right) \end{array}$ \\[1pt]} de $2\times2$, $S_{i}$ son las matrices de $3\times3$ de spin uno en una representación en la que $S_3$ es diagonal y $\textbf{S} = \{S_1,S_2,S_3\}$\footnote{ $\begin{array}{ccc} S_1=\frac{1}{\sqrt{2}} \left( \begin{array}{ccc} 0 & 1& 0\\ 1 & 0 & 1\\ 0 & 1 & 0 \end{array}\right), & S_2=\frac{i}{\sqrt{2}} \left( \begin{array}{ccc} 0 & \text{-}1& 0\\ 1 & 0 & \text{-}1\\ 0 & 1 & 0 \end{array} \right), & S_3= \left( \begin{array}{ccc} 1 & 0& 0\\ 0 & 0 & 0\\ 0 & 0 & \text{-}1\end{array}\right)\end{array}$}. A partir del hamiltoniano pueden obtenerse las ecuaciones de movimiento para el momento $\textbf{p}$ y la posición $\textbf{r}$: \begin{eqnarray} \frac{\partial \textbf{p}}{\partial t} = i [\hat{H},\textbf{p}], \hspace{1.5cm}\frac{\partial \textbf{r}}{\partial t} = i [\hat{H},\textbf{r}] \end{eqnarray} \noindent donde $[a,b] = ab-ba$ es el conmutador de $a$ y $b$. Las ecuaciones de movimiento quedan: \begin{equation} \label{motion} \frac{\partial \textbf{p}}{\partial t}=\vec{0}, \end{equation} \begin{equation} \label{motionr} m \frac{\partial \textbf{r}}{\partial t}= (\sigma_3 - i \sigma_2) \textbf{p} + i \sigma_2 [\textbf{S}, \textbf{p}, \textbf{S}]. \end{equation} De la Ec.~(\ref{motion}) se sigue que los bosones vectoriales neutros se mueven libremente en la dirección paralela al campo así como en la perpendicular \cite{tesisgretel}. Esto es una diferencia con respecto al caso de los bosones vectoriales cargados, en el cual la componente del momento perpendicular al campo está cuantizada \cite{Elizabeth}. Los autovalores del hamiltoniano dan lugar al espectro de los bosones: \begin{eqnarray}\label{eq0.9} \epsilon(p_3,p_{\perp},B,s)= \sqrt{m^2+p_3^2+p_{\perp}^2-2kBs\sqrt{m^2+p_{\perp}^2}}, \end{eqnarray} \noindent donde $s=0,\pm 1$ son los autovalores del spin \cite{tesisgretel}. La componente perpendicular del momentum $p_{\perp}$ se acopla al campo magn\'etico reflejando la simetría axial que impone al sistema el campo magn\'etico. El estado b\'asico para un bos\'on neutro de spin uno se obtiene al hacer $p_3=p_{\perp}=0$ y $s=1$: \begin{eqnarray}\label{eq0.10} \epsilon(0,B)=\sqrt{m^2-2kBm}=m\sqrt{1-b}, \end{eqnarray} donde $b=B/B_c$ y $B_c=m/2k$. De la expresión (\ref{eq0.10}) podemos ver que a medida que B aumenta, la energía del estado básico disminuye hasta hacerse cero en $B=B_c$, y compleja más allá de este valor. Por tanto, para $B\geq B_c$ el sistema se vuelve inestable. La Ec.(\ref{eq0.10}) nos permite definir el momento magn\'etico efectivo de cada part\'icula como \cite{tesisgretel}: \begin{equation} d=-\frac{\partial \varepsilon(0,B)}{\partial B}=\frac{k m}{\sqrt{m^2-2mk B}}=\frac{k}{\sqrt{1-b}}\label{magmoment}, \end{equation} de donde se sigue que el sistema tiene un comportamiento param\'agnetico, pues $d>0$, algo que ser\'a importante en la discusi\'on de las propiedades magn\'eticas, al igual que la divergencia de $d$ cuando $b \rightarrow 1$ $(B \rightarrow B_c)$ . Cuando $p_3, p_{\perp}, kB<<m$ los efectos relativistas dejan de ser apreciables. En este caso, teniendo en cuenta que $\sqrt{m^2+p_{\perp}^2}\sim m+\frac{p_{\perp}^2}{2m}$ y $p_3^2+p_{\perp}^2=p^2$, la ecuación (\ref{eq0.9}) se transforma en: \begin{eqnarray}\label{eq0.13} \epsilon(p_3,p_{\perp},B,s)\approx\sqrt{m^2+p^2-2kBsm-2s\frac{kB\; p_{\perp}^2}{2m}}. \end{eqnarray} \noindent El t\'ermino $\frac{kB\; p_{\perp}^2}{2m}$ de la expresión anterior se puede despreciar ya que es de tercer orden. Luego, haciendo el desarrollo en serie de Taylor de $m\sqrt{1+(\frac{p}{m})^2-\frac{2kBs}{m}}$ hasta el segundo orden, obtenemos el siguiente espectro para el gas de bosones vectoriales neutros en el límite no relativista (NR): \begin{eqnarray}\label{eq0.14} \epsilon_{NR}(p,B,s)=m+\frac{p^2}{2m}-skB. \end{eqnarray} Para simplificar las expresiones termodinámicas que obtendremos a partir del espectro NR, vamos a reescalar la Ec.(\ref{eq0.14}) con respecto al término constante de la masa a través de la sustitución $\epsilon\rightarrow \epsilon-m$. Esto es equivalente a hacer $\mu\rightarrow\mu-m$ en el potencial termodinámico. La única magnitud que se ve afectada por este cambio es la densidad de energía total $E$. Pero ella se puede corregir fácilmente sumándole el t\'ermino $mN$. Finalmente, el espectro no relativista queda: \begin{eqnarray}\label{eq0.15} \epsilon_{NR}(p,B,s)=\frac{p^2}{2m}-skB. \end{eqnarray} \section{Condensado de Bose-Einstein}\label{CBE} Una de las caracter\'isticas m\'as sobresalientes de los gases bos\'onicos es la ocurrencia de la condensaci\'on de Bose-Einstein (CBE). Este estado de la materia fue predicho por Albert Einstein en 1924, a partir de estudios previos de Satyendra Nath Bose. Einstein obtuvo, de manera te\'orica, que al enfriar un sistema bosónico por debajo de cierta temperatura cr\'itica se produce una concentraci\'on de las part\'iculas en el nivel de mínima energía, al contrario de lo que ocurre para un sistema fermiónico, en el que un comportamiento similar está prohibido por el Principio de exclusión de Pauli. La ocupaci\'on del estado fundamental de un sistema cu\'antico por un número macrosc\'opico de part\'iculas es lo que se conoce como CBE. A pesar de los numerosos intentos llevados a cabo durante más de siete décadas para producir este fen\'omeno en el laboratorio, no fue hasta junio de 1995 que se logró el primer condensado \cite{anderson1995observation}. Este se obtuvo al enfriar un vapor diluido de aproximadamente dos mil átomos de rubidio-87 por debajo de $170$ nK a través de una combinación de enfriamiento por láser y enfriamiento por evaporación magnética. En los últimos 20 a\~{n}os se han obtenido numerosos CBE en diferentes sistemas atómicos \cite{nikuni2000bose,fried1998bose,bradley1997bose,sebastian2005characteristic}. Incluso, recientemente se ha producido el condensado de Bose-Einstein en la estación espacial internacional, confirmando que los efectos gravitatorios pueden despreciarse en su obtenci\'on \cite{becker2018space}. En este epígrafe resumiremos los principales supuestos teóricos que dan lugar al CBE en aras de facilitar la discusiones físicas de las propiedades magnéticas del gas de bosones. Para el análisis partiremos de la teoría cuántica de campo a temperatura finita, ya que ella incluye todos efectos que nos interesan: la descripción relativista para el gas de bosones y la discusión de las antipartículas. En teoría cuántica de campos a temperatura finita se denomina “carga” $\widehat{Q}$ a cualquier número cuántico conservado. La carga conservada asociada con el n\'umero de bosones se define como \cite{haber1981thermodynamics}: \begin{equation}\label{eq1.10.1} Q=\sum_{p}\frac{1}{e^{(\epsilon(p)-\mu)/T}-1}-\sum_{p}\frac{1}{e^{(\epsilon(p)+\mu)/T}-1}. \end{equation} El primer y segundo término de la expresión anterior corresponden al número de partículas $N^{+}$ y antipartículas $N^{-}$ respectivamente. Como podemos apreciar, $N^{+}$ y $N^{-}$ no se conservan por separado; lo que se conserva es su diferencia $N^{+}-N^{-}$ determinada por la temperatura $T$ y el potencial qu\'imico $\mu$ del sistema \cite{haber1981thermodynamics}. Para que $N^{+}$ y $N^{-}$ sean definidas positivas, de la expresión (\ref{eq1.10.1}) se llega a la importante conclusión de que $|\mu|\leq m$. Por otra parte, nótese que el signo de $Q$ depende de si $\mu$ toma valores positivos o negativos, y esto indica si las partículas superan en número a las antipartículas o viceversa. Algo interesante a destacar es el hecho de que no hay ninguna restricción matemática para que el número de antipartículas sea mayor que el de partículas. Sin embargo, hasta ahora las evidencias experimentales y observacionales sugieren que vivimos en un universo donde la materia prima sobre la antimateria, una preferencia que la física aún no logra explicar. El experimento ALPHA en el CERN está dedicado precisamente al estudio de las propiedades de la antimateria a fin de mejorar nuestro entendimiento de la misma \cite{bertsche2005alpha,ahmadi2017observation}. Si en la Ec.(\ref{eq1.10.1}) hacemos el paso de la suma a una integral sobre $p$, la densidad de carga o densidad de part\'iculas $N=Q/V$ se convierte en: \begin{equation}\label{eq1.10.3} N=\frac{1}{2\pi^2}\int_{0}^{\infty} p^2dp \bigg[\frac{1}{e^{(\epsilon(p)-\mu)/T}-1}-\frac{1}{e^{(\epsilon(p)+\mu)/T}-1}\bigg]. \end{equation} La ecuación anterior constituye una fórmula implícita para $\mu$ como función de $N$ y $T$. Para $|\mu|<m$, la dependencia $\mu(N,T)$ siempre puede ser determinada. En cambio, si $\mu=\pm m$ el integrando de la Ec.(\ref{eq1.10.3}) diverge en $\epsilon(p=0)=m$. En este caso hay dos posibilidades que dependen de la dimensión y el espectro del sistema \cite{beckmann1979bose}. La primera es que la integral de la Ec.(\ref{eq1.10.3}) diverja para $\mu=\pm m$; esto significa que no existe ningún par de valores de $N$ y $T$ para los cuales $\mu$ sea igual a la energía mínima del sistema. La segunda posibilidad es que la integral converja aún cuando $\mu=\pm m$, y esto significa que existen ciertos valores (c\'iticos) de $N$ y $T$ a partir de los cuales $\mu=\pm m$. En tal caso es posible demostrar que la Ec.(\ref{eq1.10.3}) solo describe a las part\'iculas en los estados excitados \cite{haber1981thermodynamics,haber1982finite}. Por tanto, la diferencia entre el valor de la Ec.(\ref{eq1.10.3}) y el número total de partículas en el sistema corresponde al n\'umero de bosones en el estado fundamental, es decir, al número de bosones condensados. En los casos en que la CBE es posible, la densidad de carga puede escribirse de manera general como: \begin{eqnarray}\label{condL} N = \left\{ \begin{array}{ccc} N_{gs} + \frac{1}{2\pi^2}\int_{0}^{\infty} p^2dp \bigg[\frac{1}{e^{(\epsilon(p)-\mu)/T}-1}-\frac{1}{e^{(\epsilon(p)+\mu)/T}-1}\bigg], & \mu=\pm m,\,\, T< T_c,\,\,N> N_c \\ & \\ \frac{1}{2\pi^2}\int_{0}^{\infty} p^2dp \bigg[\frac{1}{e^{(\epsilon(p)-\mu)/T}-1} -\frac{1}{e^{(\epsilon(p)+\mu)/T}-1}\bigg],& |\mu|<m,\,\, T\geq T_c,\,\, N\leq N_c \end{array} \right., \end{eqnarray} donde $N_{gs}$ es el número de partículas en el estado básico. A pesar de que el CBE es comúnmente caracterizado como un fenómeno de baja temperatura, en realidad está determinado por la relación entre la temperatura y la densidad de partículas. La región condensada está delimitada por $T<T_c$ y $N>N_c $, como se sigue de la Ec.(\ref{condL}) y se ha representado en la Figura \ref{potencialquimico1}. \begin{figure}[h!] \centering \includegraphics[width=0.49\linewidth]{fig1.png} \includegraphics[width=0.49\linewidth]{fig2.png} \caption{\label{potencialquimico1} Representaci\'on esquemática de la dependencia del potencial qu\'imico con la temperatura y la densidad de part\'iculas para un gas ideal de bosones no relativistas (panel derecho) y relativista (panel izquierdo). En todos los casos, la condición para la ocurrencia del condensado es $\mu = \pm \epsilon(p=0)$.} \end{figure} Si la densidad es lo suficientemente alta, la condensación puede ocurrir incluso a temperaturas relativistas $T_c>>m$, un escenario en el que las antipartículas juegan un papel muy importante, como veremos a continuación. En el límite ultrarelativista se cumple que $T,p>>m$ y $T>>\mu$, y lo usual es aproximar el espectro de energía a $\epsilon(p) \cong p$ y despreciar los t\'erminos que contienen a $\mu/T$ en la definición de $N$. Pero n\'otese que si se desprecia $\mu/T$ en la Ec.(\ref{eq1.10.3}) el término de las partículas se cancela con el de las antipartículas. Para no perder la información relacionada con el potencial químico es necesario realizar un desarrollo en serie de Taylor de la función $1/(e^{(p\pm \mu)/T}-1)$ alrededor de $\mu/T = 0$ hasta segundo orden. De esta forma se obtiene \cite{haber1981thermodynamics,burakovsky1996new}: \begin{equation}\label{eq1.10.4} |N|\cong \frac{\mu}{\pi^2 T}\int_{0}^{\infty} p^2dp \bigg[\frac{e^{p/T}}{(e^{p/T}-1)^2} \bigg] \cong \frac{\mu T^2}{3}. \end{equation} Por el contrario, si desde un incio no se consideran las antipartículas, al tomar el límite ultrarrelativista $N$ queda: \begin{equation}\label{eq1.10.4b} N\cong \frac{1}{2\pi^2}\int_{0}^{\infty} p^2dp \bigg[\frac{1}{(e^{p/T}-1)} \bigg] \cong \frac{\zeta[3]T^3}{\pi^2}, \end{equation} \noindent donde $\zeta$ es la funci\'on zeta de Riemann. La temperatura cr\'itica $T_c$ y la densidad de part\'iculas en el estado fundamental serían: \begin{eqnarray}\label{eq1.10.6} T_c= \begin{cases} \left(\frac{3|N|}{m}\right)^{1/2},& \text{con antipart\'iculas},\\ \\ \left(\frac{\pi^2N}{\zeta[3]}\right)^{1/3},& \text{sin antipart\'iculas}, \end{cases} \end{eqnarray} y \begin{eqnarray}\label{eq1.10.5} N_{gs}= \begin{cases} |N|\left[1-\left(\frac{T}{T_c}\right)^2\right],& \text{con antipart\'iculas},\\ \\ N\left[1-\left(\frac{T}{T_c}\right)^3\right],& \text{sin antipart\'iculas}. \end{cases} \end{eqnarray} Despreciar las antipartículas al estudiar el CBE relativista en el régimen de altas temperaturas $T>>m$ conduce a resultados incorrectos. Esto se aprecia claramente a partir de la Ec.(\ref{eq1.10.5}), pues la dependencia entre el número de partículas en el condensado y la temperatura es cuadrática cuando se tienen en cuenta las antipartículas, y cúbica cuando estas se desprecian. En el l\'imite no relativista (tratado en el pr\'oximo ep\'igrafe) $N_{gs}$ depende de $T^{3/2}$ (Ec.(\ref{eq1.15})). Por otra parte, la Ec.(\ref{eq1.10.6}) muestra que tener en cuenta a las antipartículas implica una dependencia entre $T_c$ y la masa del bosón. Este resultado tiene implicaciones interesantes para $m\rightarrow 0$, pues en este caso $T_c \rightarrow \infty$ y $N_0=N$. Luego, la carga neta de un gas ideal de bosones no masivo reside en el estado fundamental\footnote{Esto no sucede así para un gas de fotones porque en este caso la ausencia de un número cuántico conservado impide la condensación \cite{haber1981thermodynamics}.}. Como se mencionó en el epígrafe anterior, uno de los efectos del campo magnético sobre un sistema de bosones vectoriales neutros consiste en la disminución de la energía de su estado básico (Ec.(\ref{eq0.10})). En consecuencia, en los próximos capítulos veremos que al aumentar el campo magnético, aumenta la temperatura de condensación. De la Ec.(\ref{eq1.10.6}) con antipart\'iculas también se sigue que para obtener la condensación a temperaturas relativistas $T_c>>m$, tiene que cumplirse que $N>>m^3$. Por el contrario, en el régimen no relativista lo que se cumple es $N<<m^3$, resultado que puede encontrarse en cualquier libro de física estadística estándar \cite{huang1987statistical}. En otras palabras, las altas densidades favorecen la condensación en el sentido de que esta se puede obtener a temperaturas altas. \section{Propiedades termodinámicas del gas de bosones vectoriales neutros a $B=0$} \label{cap2} \subsection{Gas no relativista} Un gas queda descrito teóricamente si se conoce su ecuaci\'on de estado, y esta siempre se puede obtener a partir del potencial termodinámico por unidad de volumen $\Omega(\mu,T)$. Este potencial para el gas no relativista de bosones se calcula como \cite{CarlosR}: \begin{equation} \label{eq0.1w} \Omega(\mu,T)=- T\int_{\epsilon_{min}}^\infty d\epsilon \; g(\epsilon)\; \ln\bigg[\bigg(1-e^{\frac{\mu-\epsilon}{T}}\bigg)^{-1}\bigg], \end{equation} \noindent donde $g(\epsilon)$ es la densidad de estados: \begin{equation}\label{eq1.10} g(\epsilon)=\sum_{-s}^s \sum_{p} \delta\left[\epsilon-\frac{p^2}{2m}\right]=\frac{(2m)^{3/2}}{4 \pi^2} \epsilon^{1/2},\quad\; 0\leq\epsilon<\infty. \end{equation} \noindent Sustituyendo la Ec.(\ref{eq1.10}) en la Ec.(\ref{eq0.1w}) el potencial termodinámico queda: \begin{equation}\label{eq1.2} \Omega_{NR}(\mu,T)=-\bigg(\frac{m}{2\pi}\bigg)^{3/2}T^{5/2}g_{5/2}(z), \end{equation} \noindent siendo $g_{(5/2)}=\sum_{l=1}^{\infty}\frac{z^l}{l^{5/2}}$ la funci\'on polylogar\'itmica de orden $5/2$ y $z=e^{\mu/T}$ la fugacidad. \noindent La densidad de partículas se determina derivando la Ec.(\ref{eq1.2}) con respecto a $\mu$: \begin{equation}\label{eq1.12} N(\mu,T,0)=N_{gs}-\left(\frac{\partial\Omega_{NR}(\mu,T)}{\partial\mu}\right)_{T}=N_{gs}+\bigg(\frac{mT}{2 \pi}\bigg)^{3/2}g_{(3/2)}(z). \end{equation} \noindent Para una densidad fija, la fracci\'on de part\'iculas en el estado fundamental puede calcularse como: \begin{eqnarray}\label{eq1.15} \frac{N_{gs}}{N}= \begin{cases} 0 & T>T_c\\ 1-\left(\frac{T}{T_c}\right)^{3/2} & T<T_c. \end{cases} \end{eqnarray} \noindent Los parámetros críticos $T_c(N)$ y $N_c(T)$, Ec.(\ref{eq1.15b}), se obtienen evaluando la Ec.(\ref{eq1.12}) en la condición del condensado, que para el gas ideal de bosones no relativistas es $\mu =0$: \begin{eqnarray}\label{eq1.15b} T_c(N)=\frac{2 \pi}{m}\bigg(\frac{N}{g_{(3/2)}(1)}\bigg)^{2/3},\;\;\;\;N_c(T)=\bigg(\frac{mT}{2 \pi}\bigg)^{3/2}g_{(3/2)}(1). \end{eqnarray} La Figura \ref{particlefraction1} muestra la fracción de partículas en los estados excitados $N_{NR}/N$ y en el estado fundamental $N_{gs}/N$ para $N=1.30 \times 10^{39}cm^{-3}$. \begin{figure}[h!] \centering \includegraphics[width=0.55\linewidth]{particlefractioncap1.png} \caption{\label{particlefraction1} Fracción de partículas en función de la temperatura para $N=1.30 \times 10^{39}cm^{-3}$. La línea verde es la fracción de partículas en el estado fundamental. La línea azul corresponde a la fracción de partículas no condensadas.} \end{figure} En la misma se observa que el número de partículas en el condensado es cero siempre que la temperatura est\'e por encima de $T_c$, mientras que por debajo de $ T_c $ las part\'iculas comienzan a caer en el estado de m\'inima energ\'ia. A $T = 0$, se obtiene lo que se denomina el condensado puro, es decir, todas las partículas están en el estado fundamental. El resto de las magnitudes termodinámicas, dígase la presi\'on, la energ\'ia interna, la entrop\'ia y la la capaciad calor\'ifica por unidad de volumen tienen la forma: \begin{eqnarray}\label{energia2} P_{NR}(\mu,T)&=&-\Omega_{NR}(\mu,T),\\\label{entropia} S_{NR}(\mu,T)&=&-\left(\frac{\partial\Omega_{NR}(\mu,T)}{\partial T}\right)_{\mu}=-\frac{5}{2}\frac{\Omega_{NR}}{T}-N\ln z,\\\label{energia} E_{NR}(\mu,T)&=&\Omega_{NR}(\mu,T)+TS_{NR}(\mu,T)-\mu \left(\frac{\partial\Omega_{NR}(\mu,T)}{\partial\mu}\right)_{T}=-\frac{3}{2}\Omega_{NR}(\mu,T), \end{eqnarray} \begin{eqnarray}\label{Cv} C_{V_{NR}}(\mu,T)=\left(\frac{\partial E_{NR}(\mu,T)}{\partial T}\right)_{\mu}= \begin{cases} \frac{15}{4} \left(\frac{m}{2\pi}\right)^{3/2}T^{5/2} g_{(5/2)}(z),&\text{CBE},\\ \frac{15}{4}N\frac{g_{(5/2)}(z)}{g_{(3/2)}(z)}-\frac{9}{4}N\frac{g_{(3/2)}(z)}{g_{(1/2)}(z)},& \text{Gas Libre}. \end{cases} \end{eqnarray} Como la energ\'ia del estado fundamental para el gas no relativista es cero $\epsilon(p=0)=0$, las part\'iculas que se encuentran en este estado no contribuyen a la energ\'ia interna del sistema, ni a la presi\'on, ya que no tienen energ\'ia cin\'etica ($p=0$). De la Ec.(\ref{entropia}) se obtiene que $S_{NR} = 0$ para $T = 0$, lo que est\'a en concordancia con con la Tercera Ley de la Termodinámica \cite{huang1987statistical}. Esto significa que la fase condensada tiene entropía cero. La Figura \ref{Cv1} muestra el calor específico por partícula en función de la temperatura. Del gráfico podemos ver el pico bien definido que indica la transición de fase al estado condensado. Por debajo de la temperatura cr\'itica el calor espec\'ifico decrece como $T^{3/2}$ y a altas temperaturas tiende a $3/2$. \begin{figure}[h!] \centering \includegraphics[width=0.55\linewidth]{Cv1.png} \caption{\label{Cv1} Calor espec\'ifico por part\'icula como funci\'on de la temperatura para el gas de bosones no relativistas a campo magnético cero.} \end{figure} Para que el gas quede completamente descrito termodinámicamente se hace necesario conocer la dependencia del potencial qu\'imico $\mu(N,T)$ con respecto a la temperatura y la densidad de part\'iculas fuera del estado condensado. Hallar $\mu(N,T)$ es equivalente a hallar $z(N,T)$. El potencial qu\'imico puede tomar valores entre $-\infty<\mu\leq0$, luego la fugacidad est\'a acotada entre $0<z\leq1$, y la condensaci\'on ocurre para $z=1$. La expresión de la fugacidad en la fase condensada y de gas libre es: \begin{equation}\label{eq1.13} z(N,T,0)= \begin{cases} 1, & \text{CBE},\\ N-\bigg(\frac{mT}{2 \pi}\bigg)^{3/2}g_{(3/2)}(z)=0, & \text{Gas Libre}. \end{cases} \end{equation} \subsection{Gas relativista} \label{MTBR} El espectro del gas de bosones relativistas no magnetizados se obtiene haciendo $B=0$ en la expresi\'on (\ref{eq0.9}). En ausencia de campo magn\'etico la simetría esférica es recuperada, por tanto $p_3^2+p_{\perp}^2=p^2$ y el espectro queda: $\sqrt{p^2+m^2}$. El potencial termodinámico y la densidad de estados son en este caso: \begin{equation} \label{eq0.1x} \Omega^{\pm}(\mu,T,0)=-T\int_{\epsilon_{min}}^\infty d\epsilon \; g_{R}(\epsilon)\; \ln\left[\left(\left(1-e^{\frac{\mu-\epsilon}{T}}\right)\left(1-e^{\frac{-\mu+\epsilon}{T}}\right)\right)^{-1}\right], \end{equation} \begin{eqnarray}\label{eq7} g_{R}(\epsilon)=\sum_{s}\sum_{\vec{p}}\delta \bigl[\epsilon-\sqrt{p^2+m^2}\bigr] =\frac{4\pi V}{(2\pi)^3}(2s+1)\;2\epsilon\;\sqrt{\epsilon^2-m^2},\;\;\; \epsilon\geq m. \end{eqnarray} \noindent Haciendo uso de: \begin{equation} ln(1-x)=-\sum_{n=1}^{\infty}\frac{x^n}{n} \, , \end{equation} y de: \begin{equation} \int_u^{\infty}x(x^2-u^2)^{\nu-1}e^{-\alpha x}dx=2^{\nu-\frac{1}{2}}(\sqrt{\pi})^{-1}u^{\nu+\frac{1}{2}}\Gamma(\nu)K_{\nu+\frac{1}{2}} \, , \end{equation} el potencial termodinámico queda \cite{su2008thermodynamic}: \begin{equation}\label{eq1.22} \Omega^{\pm}(\mu,T)=-\bigg(\frac{m^2T^2}{2\pi^2}\bigg)\sum_{n=1}^{\infty}\frac{z^n+z^{-n}}{n^2}K_2(nm/T), \end{equation} \noindent donde $K_{\alpha}$ es la funci\'on de MacDonald de orden $\alpha$. En la Ec.(\ref{eq1.22}) se han tomado en cuenta las antipartículas a través del término $z^{-n}$, mientras que $z^{n}$ corresponde a las partículas. La dependencia del potencial qu\'imico para el caso relativista es diferente a la no relativista, como se muestra esquem\'aticamente en el panel derecho de la Figura \ref{potencialquimico1}. Aquí los valores posibles de $\mu$ están acotados entre $0<\mu\leq m$, luego la fugacidad podrá tomar valores entre $1< z\leq e^{m/T}$, y el estado condensado se alcanza cuando $z=e^{m/T}$. Las densidades de partículas ($N^{+}$) y antipartículas ($N^{-}$) que se obtienen luego de derivar el potencial termodinámico Ec.(\ref{eq1.22}) con respecto a $\mu$ son: \begin{eqnarray}\label{eq1.23} N^{+}(\mu,T)=\frac{m^2T}{2 \pi^2}\sum_{n=1}^{\infty}\frac{z^{n}}{n}K_2(nm/T), \end{eqnarray} \begin{eqnarray}\label{eq1.24} N^{-}(\mu,T)=\frac{m^2T}{2 \pi^2}\sum_{n=1}^{\infty}\frac{z^{-n}}{n}K_2(nm/T). \end{eqnarray} \noindent Donde ahora $N_{ext}=N^{+}(\mu,T)-N^{+}(\mu,T)$ es la densidad carga en los estados excitados. Las ecuaciones (\ref{eq1.23}) y (\ref{eq1.24}) est\'an en concordancia con las obtenidas en\cite{elmfors1995condensation,beckmann1979bose}. Como se muestra en el panel derecho de la Figura \ref{potencialquimico1}, cuando $T\rightarrow \infty$ el potencial químico tiende a cero $\mu\rightarrow 0$, lo que implica $N^{-}\rightarrow N^{+} y \;\;N_{ext}\rightarrow0$, esto es lo que se conoce como vac\'io caliente \cite{perez2006negative}. La Figura \ref{particlefraction} muestra la fracci\'on de part\'iculas $N^+(\mu,T)/N$, antipart\'iculas $N^-(\mu,T)/N$ y partículas en el estado fundamental $N_{gs}/N$ para $N=1.30 \times 10^{39}cm^{-3}$. \begin{figure}[h!] \centering \includegraphics[width=0.49\linewidth]{particlefraction1.png} \includegraphics[width=0.49\linewidth]{particlefraction2.png} \caption{\label{particlefraction} Fracción de partículas, antipartículas y partículas en el condensado en función de la temperatura. La línea verde es la fracción de partículas en el estado fundamental. La línea azul continua corresponde a la fracción de partículas y la línea azul discontinua corresponde a la fracción de antipartículas.} \end{figure} El panel derecho de la Figura \ref{particlefraction} es la continuaci\'on en temperatura del panel izquierdo; esta separación se realizó para que los efectos que queremos resaltar puedan observarse mejor. Como podemos ver en el panel izquierdo, $N_{gs}=0,\; \forall T>T_c$, lo que corresponde al gas libre, mientras que $N_{gs} \neq 0,\; \;\forall T<T_c$, lo que corresponde a un estado donde el gas libre y el condensado coexisten. Por otro lado, la contribución de las antipartículas comienza a ser importante para $ T \simeq \frac{1}{5}m $, mientras que para $ T\gtrsim m$ las fracciones de partículas y antipartículas ya son del mismo orden. Este es el vac\'io caliente que se mencion\'o antes. Por tanto, en este rango de temperaturas la presencia de las antipartículas podr\'ia tener una influencia importante en algunas propiedades termodinámicas del gas, tales como la presión y la magnetización. \noindent Las expresiones (\ref{energia2})-(\ref{Cv}) para el gas relativista se transforman en: \begin{eqnarray}\label{eq1.25} P(\mu,T)&=&-\Omega^{\pm}(\mu,T),\\ S(\mu,T)&=&-\frac{2}{T}\Omega^{\pm}(\mu,T)-\frac{\mu}{T}(N^{+}-N^{-})\\ \nonumber &+&\frac{m^3}{4\pi^2}\sum_{n=1}^{\infty}\frac{z^n+z^{-n}}{n}[K_1(nm/T)+K_3(nm/T)],\\ \label{eq1.26} E(\mu,T)&=&-\Omega^{\pm}(\mu,T)\\\nonumber &+&\frac{m^3T}{4\pi^2}\sum_{n=1}^{\infty}\frac{z^n+z^{-n}}{n}[K_1(nm/T)+K_3(nm/T)],\\ C_V(\mu,T)&=&S(\mu,T)+\bigg\{\frac{m^3}{4\pi^2}\sum_{n=1}^{\infty}\frac{z^n+z^{-n}}{n}[K_1(nm/T)+K_3(nm/T)]\\ \nonumber &+&\frac{m^4}{8\pi^2T}\sum_{n=1}^{\infty}(z^n+z^{-n})[K_0(nm/T)+2K_2(nm/T)+K_4(nm/T)]\\ \nonumber &-&\frac{\mu}{T}\frac{m^3}{4\pi2}\sum_{n=1}^{\infty}(z^n-z^{-n})[K_1(nm/T)+K_3(nm/T)]\bigg\}. \end{eqnarray} La Figura \ref{Cv2} muestra el calor específico por partícula en función de la temperatura para el gas relativista. \begin{figure}[h!] \centering \includegraphics[width=0.55\linewidth]{Cvb0.png} \caption{\label{Cv2} Calor espec\'ifico por part\'icula como funci\'on de la temperatura para el gas de bosones relativistas.} \end{figure} Del gráfico podemos ver el pico bien definido que indica la transición de fase al estado condensado al igual que en el caso no relativista. La principal diferencia con respecto al caso no relativista es que a altas temperaturas $C_{V}$ ya no tiende a $3/2$, sino que aumenta debido a la presencia de las antipartículas. En lo que resta de la tesis, los c\'alculos aqu\'i presentados a $B=0$ se extender\'an a $B\neq0$ para el caso no relativista (Cap\'itulo 2) y el caso relativista (Cap\'itulo 3). Las expresiones a $B=0$ ser\'an usadas para comprobar la validez de las expresiones con campo magn\'etico haciendo $B\rightarrow0$ en ellas. Adem\'as, el caso $B=0$ ser\'a incluido en los gr\'aficos para estudiar el efecto del campo magn\'etico en las magnitudes termodin\'amicas. \chapter{Estudio termodin\'amico del gas magnetizado de bosones vectoriales neutros en el l\'imite no relativista} \label{cap2} En este capítulo se estudian las propiedades termodinámicas de un gas magnetizado de bosones vectoriales neutros en el l\'imite no relativista. Entre ellas, la condensación de Bose-Einstein, que depende de todos los parámetros involucrados en el problema: temperatura, densidad de partículas y campo magnético; las ecuaciones de estado, y las propiedades magnéticas del gas. Este estudio recoge los resultados originales de la autora publicados en \cite{suarez2019non}. \section{Potencial termodinámico} Partiendo del espectro (\ref{eq0.15}), $\epsilon(p)=\vec{p}^{\:2}/2m -sk B$, la densidad de estados del GBVN no relativista en presencia de un campo magn\'etico externo constante y uniforme $\vec{B}=(0,0,B)$ se determina por: \begin{eqnarray}\label{eq2.1}\nonumber g_{NR}(\epsilon)&=& \sum_{s=-1,0,1} \sum_{\vec{p}} \delta\left(\epsilon-\frac{\vec{p}^{\:2}}{2m}+sk B\right)\\ &=& \sum_{\vec{p}} \delta\left(\epsilon-\frac{\vec{p}^{\:2}}{2m}-k B\right)+ \delta\left(\epsilon-\frac{\vec{p}^{\:2}}{2m}\right)+ \delta\left(\epsilon-\frac{\vec{p}^{\:2}}{2m}+k B\right). \end{eqnarray} \noindent N\'otese que en (\ref{eq2.1}) tenemos tres posibles estados de spin: $ s=-1,0,1 $, ya que los bosones son vectoriales. Usando el cambio de sumatoria a integral $\sum_{ \vec{p}}=\frac{V}{(2\pi )^3}\int_{-\infty}^\infty dp_{x} \int_{-\infty}^\infty dp_{y} \int_{-\infty}^\infty dp_{z}, $ y pasando a coordenadas esféricas se obtiene: \begin{eqnarray}\label{eq2.3.0} g_{NR}(\epsilon)= \frac{mV}{2\pi^2} \left[\int_0^{\infty} p^2 \delta(\epsilon-\frac{\vec{p}^{\:2}}{2m}+kB)dp+\int_0^{\infty} p^2 \delta(\epsilon-\frac{\vec{p}^{\:2}}{2m})dp+\int_0^{\infty} p^2 \delta(\epsilon-\frac{\vec{p}^{\:2}}{2m}-kB)dp \right]. \end{eqnarray} Con el cambio de variables $x_i=p^2/2m+ikB$, donde $i=0,\pm1$ y la propiedad $\int_0^{\infty} f(x)\delta(x-a)dx=f(a)$ finalmente la densidad de estados queda: \begin{eqnarray}\label{eq2.3} g_{NR}(\epsilon)= \frac{ mV}{2\pi^2} \left[ \sqrt{2m(\epsilon_{-}-k B)}+ \sqrt{2m \epsilon_{0}} + \sqrt{2m(\epsilon_{+}+k B)} \right], \end{eqnarray} \begin{eqnarray}\nonumber \;\;\;kB\leq\epsilon_{-}<\infty,\;\;\;\;0\leq\epsilon_{0}<\infty,\;\;\;\;-kB\leq\epsilon_{+}<\infty. \end{eqnarray} \noindent Con la densidad de estados obtenida en la Ec.(\ref{eq2.3}) se calcula el potencial termodinámico \cite{CarlosR}: \begin{equation} \label{eq0.1} \Omega_{NR}(\mu,T,B)=-T\int_{\epsilon_{min}}^\infty d\epsilon \; g_{NR}(\epsilon)\; \ln\left[\left(1-e^{\frac{\mu-\epsilon}{T}}\right)^{-1}\right], \end{equation} \begin{eqnarray}\nonumber \Omega_{NR}(\mu,T,B)= \frac{ mV}{2\pi^2}\bigg(\int_{kB}^{\infty}d\epsilon\sqrt{2m(\epsilon-k B)}\ln[1-ze^{-\epsilon/T}]+ \int_{0}^{\infty}d\epsilon\sqrt{2m\epsilon}\ln[1-ze^{-\epsilon/T}] \bigg)\\\label{eqpotencial} +\int_{-kB}^{\infty}d\epsilon\sqrt{2m(\epsilon+k B)}\ln[1-ze^{-\epsilon/T}]. \end{eqnarray} N\'otese que en esta expresi\'on los l\'imites de integraci\'on son diferentes de acuerdo con el valor del spin. Luego de integrar por la energ\'ia, obtenemos el potencial termodin\'amico NR dividido en tres sumandos, uno por cada estado de spin: \begin{eqnarray}\label{eq2.4a} \Omega_{NR}(\mu,T,B)&=&\Omega_{-_{NR}}(\mu,T,B)+\Omega_{0_{NR}}(\mu,T,B)+\Omega_{+_{NR}}(\mu,T,B),\\\label{eq2.4b} \Omega_{NR}(\mu,T,B)&=&-\bigg(\frac{m}{2 \pi}\bigg)^{3/2}T^{5/2}[g_{5/2}(z_{-})+g_{5/2}(z)+g_{5/2}(z_{+})] \end{eqnarray} \noindent donde $z_{i}=z e^{i\frac{\kappa B}{T}}$ con $i=\pm1$. \section{Condensaci\'on de Bose-Einstein y propiedades magn\'eticas} Comenzaremos el estudio de la condensación de Bose-Einstein calculando la densidad de partículas \begin{equation}\label{eq2.5} N = N_{gs}(T,B) +N_{NR}(\mu,T,B), \end{equation} \noindent donde $N_{gs}$ representa las partículas en el condensado, y $N_{NR} = -d\Omega_{NR}/d\mu$ las part\'iculas en los estados excitados. Despu\'es de hacer la derivada con respecto a $\mu$ en (\ref{eq2.4a}), la densidad de part\'iculas toma la forma: \begin{eqnarray}\label{eq2.6} N &=&N_{gs}(T,B) + N_{-}(\mu,T,B)+N_{0}(\mu,T,B)+N_{+}(\mu,T,B),\\ N &=& N_{gs}(T,B) +\bigg(\frac{mT}{2 \pi}\bigg)^{3/2}[g_{3/2}(z_{-})+ g_{3/2}(z)+ g_{3/2}(z_{+})] .\label{eq2.7} \end{eqnarray} Las curvas de los parámetros críticos $N_c(T, b)$ y $T_c(N, b)$ se obtienen evaluando la Ec.(\ref{eq2.7}) en la condición del condensado. Para el gas no relativista esta condición es $\mu =-kB$, por tanto: \begin{eqnarray}\label{eq2.6b} N_c=\bigg(\frac{mT_c}{2 \pi}\bigg)^{3/2}[g_{3/2}(e^{-2kB/T_c})+ g_{3/2}(e^{-kB/T_c})+ g_{3/2}(1)]. \end{eqnarray} A partir de la Ec.~(\ref{eq2.6b}), la temperatura cr\'itica del condensado fue calculada numéricamente en función de $ N $ y $ B $ como se muestra en el panel izquierdo en la Figura \ref{f2.1}. \begin{figure}[h!] \centering \includegraphics[width=0.49\linewidth]{TCvsB.pdf} \includegraphics[width=0.49\linewidth]{particledensity.png} \caption{\label{f2.1}Panel izquierdo: temperatura crítica en función del campo magnético para varios valores de la densidad de partículas. Panel derecho: densidad de partículas por estado de spin en función de la temperatura para $ N=1.30\times10^{39}$cm$^{-3}$ y $b=0.5$.} \end{figure} El panel izquierdo de la Figura \Ref{f2.1} muestra cómo crece la temperatura crítica a partir de su valor en $ B = 0 $: \begin{equation}\label{eq2.8a} T_{c}(0)= \frac{2\pi}{m} \left( \frac{N}{3 g_{3/2}(1)} \right)^{2/3}, \end{equation} \noindent hasta la saturación cuando $B \rightarrow \infty$: \begin{eqnarray}\label{eq2.8b} T_{c}(\infty)=\frac{2\pi}{m} \left( \frac{N}{ g_{3/2}(1)} \right)^{2/3}. \end{eqnarray} Estos valores extremos de la temperatura crítica del CBE están en concordancia con los obtenidos en \cite{yamada1982thermal}. El comportamiento asintótico de $ T_c $ con el aumento del campo magnético nos brinda información valiosa sobre la influencia de $ B $ en el CBE de las partículas no relativistas. En la región de campo magnético débil ($B\rightarrow 0$) el incremento de $ B $ aumenta $ T_c $ de manera notable, lo que lleva al sistema a la condensación. Pero cuando el campo magnético es fuerte, sus cambios apenas afectan la temperatura crítica. Por tanto, a densidad de partículas fija, el efecto del campo magnético en el CBE es aumentar la temperatura crítica, de manera que cuanto más débil es el campo, más sensible es el sistema al mismo. N\'otese también que aunque la temperatura crítica del CBE aumenta con la densidad de partículas, la raz\'on entre los dos valores extremos $ T_c (\infty) /T_c(0) = \sqrt[3]{9} $ es constante. Es interesante observar el comportamiento de la fracción de partículas en el estado fundamental $N_{gs}/N $ y por estado de spin $ N_{i} / N $, $ {i=-,0,+} $ en función de la temperatura (panel derecho de la Figura~\Ref{f2.1}). En la región de alta temperatura, $ T \gg m $, $ N_{gs}=0 $ y $ N_{i} / N\rightarrow 1/3 $ para todo $ i $, debido a que esta regi\'on es dominada por el desorden térmico. Cuando $ T $ disminuye, el efecto del campo magnético comienza a notarse y la fracción de partículas con spin alineado al campo magn\'etico, (es decir $ N_{+} / N$), se convierte en la dominante. Este comportamiento continúa a través de la región de baja temperatura $ T \ll m $ siendo el próximo cambio apreciable cuando $ T=T_c $. En este punto, la fracción de partículas en el estado fundamental deja de ser cero y aumenta con la disminución de la temperatura hasta que alcanza su valor m\'aximo, $ 1 $, en $ T = 0 $ (donde $ N_{i} / N=0 $ para todo $ i $). Dado que en el estado fundamental $s=1$, se espera que para un gas de bosones vectoriales que ha estado magnetizado, exista una magnetización distinta de cero incluso cuando $B \rightarrow 0$. Para verificar esto, calculemos la magnetización del gas: \begin{equation}\label{eq2.9} M_{NR}(\mu,T,B)=k N_{gs} -\left(\frac{\partial \Omega_{NR}(\mu,T,B)}{\partial B}\right) = k(N_{gs} + N_{+}- N_{-}), \end{equation} \noindent y grafiqu\'emosla en la Figura~\ref{f2.2} a $N$ fija y varios valores de $B$. \begin{figure}[h!] \centering \includegraphics[width=0.55\linewidth]{magetization.png} \caption{\label{f2.2} Magnetizaci\'on como funci\'on de la temperatura para $N=1.30\times10^{39}$cm$^{-3}$ y diferentes valores del campo magn\'etico.} \end{figure} Las curvas en este gráfico concuerdan con las del panel derecho de la Figura~\ref{f2.1}: $ M \rightarrow 0 $ para altas $ T $, mientras que $ M \rightarrow k N $ cuando $ T \rightarrow 0 $. La característica m\'as sobresaliente de la Figura~\ref{f2.2} es que esto sucede también para $ B = 0 $, es decir, el gas muestra una magnetización espontánea que en este caso no se debe a una interacción entre el spin de las partículas sino al condensado, pues para $ B = 0 $, $ M \neq 0 $ solo cuando $ T <T_c $. Este fenómeno, conocido como ferromagnetismo de Bose-Einstein \cite{yamada1982thermal,simkin1999magnetic}, es un resultado de gran relevancia astrofísica, pues la magnetización espontánea podría funcionar como fuente de campo magnético en el interior de los objetos compactos. La aparición de una magnetización espontánea también se puede obtener mediante la sustitución directa de $ B = 0 $ en la ecuación~(\ref{eq2.9}), que da $ M (B = 0) = k N_ {gs} $, y su conexión con el condensado puede estudiarse a partir del comportamiento del calor espec\'ifico y la susceptibilidad magn\'etica del gas. Para $T<T_c$ el calor espec\'ifico por unidad de volumen tiene la forma: \begin{eqnarray} \label{eq2.10a} C_{V_{NR}}(\mu=-kB,T,B)=\frac{3}{2}S_{NR}-\frac{3}{2}\frac{kB}{T}[N_{+}-N_{-}]+2\left(\frac{kB}{T}\right)^2\left(\frac{mT}{2\pi}\right)^{3/2}g_{1/2}((e^{-2kB/T})), \end{eqnarray} \noindent mientras que para $T>T_c$: \begin{eqnarray}\label{eq2.10b} C_{V_{NR}}(\mu,T,B)=\frac{15}{4}N\frac{g_{5/2}(z_{-})+g_{5/2}(z)+g_{5/2}(z_{+})}{g_{3/2}(z_{-})+g_{3/2}(z)+g_{3/2}(z_{+})}-\frac{9}{4}N \frac{\frac{[g_{3/2}(z_{-})]^{2}}{g_{1/2}(z_{-})}+\frac{[g_{3/2}(z)]^{2}}{g_{1/2}(z)}+\frac{[g_{3/2}(z_{+})]^{2}} {g_{1/2}(z_{+})}}{g_{3/2}(z_{+})+g_{3/2}(z)+g_{3/2}(z_{+})}. \end{eqnarray} \noindent En ambos casos el procedimiento para obtener $C_{V_{NR}}$ resulta bastante largo; sus detalles se muestran en el Ap\'endice A. Por otra parte, para calcular la susceptibilidad magn\'etica basta derivar (\ref {eq2.9}) con respecto a $B$. Teniendo en cuenta que $ \frac {\partial}{\partial B}g_{\nu} (z_{i}) = \frac{k} {T}g_{\nu-1}(z_{i}) $, se obtiene: \begin{equation}\label{eq2.10c} \chi_{NR}(\mu,T,B)= \begin{cases} 2 \frac{k^{2}}{T\lambda^{3}}g_{1/2}(e^{-2kB/T}), & \text{CBE},\\ \frac{k^{2}}{T\lambda^{3}}[g_{1/2}(z_{+})+g_{1/2}(z_{-})],& \text{Gas Libre.} \end{cases} \end{equation} La Figura \ref{susceptibilities} muestra el calor específico y la susceptibilidad magn\'etica en función de la temperatura para varios valores del campo magnético. \begin{figure}[h!] \centering \includegraphics[width=0.49\linewidth]{heatcapacity.png} \includegraphics[width=0.49\linewidth]{susceptibility.png} \caption{\label{susceptibilities} Calor específico y susceptibilidad magn\'etica en función de la temperatura para varios valores del campo magnético y $N=1$.$30\times10^{39}$cm$^{-3}$.} \end{figure} Los máximos de ambas magnitudes ocurren a $T_c$, señalando así la transición de fase al condensado ferromagnético. A medida que $B$ aumenta, $T_c$ también y ello se refleja en un movimiento en la posición de los máximos de $C_{V_{NR}}$ y $\chi_{NR}$ de $T_{0}$ hacia $T_{\infty}$. En el l\'imite de alta temperatura $T>>m$ el calor específico tiende a $3/2$ como predice la teoría clásica de los gases. Una cuestión interesante, también relacionada con el ferromagnetismo de Bose-Einsten, aparece cuando hacemos el campo magn\'etico cero en la Ec.(\ref{eq2.10c}). En la región no condensada $z_{-}=e^{-2kB/T}$, en consecuencia si $ B = 0 \Longrightarrow z_{-} = 1 $. La función polilogar\'itmica de orden $1/2$ diverge en $1$, por tanto, en toda esta regi\'on la susceptibilidad magn\'etica est\'a indefinida: \begin{equation}\label{eq48} \chi(\mu,T,0)= \begin{cases} \infty, & \text{CBE},\\ 2 \frac{2\kappa^{2}}{T\lambda^{3}}g_{1/2}(z), & \text{Gas Libre.} \end{cases} \end{equation} \section{Ecuaciones de estado} Como consecuencia de la ruptura de la simetría rotacional $SO(3)$ producida por el campo magnético, el tensor de energía-momento de un gas cuántico magnetizado se vuelve anisotrópico y la presión se separa en dos componentes, una paralela, $ P_{\parallel}$, y la otra perpendicular, $P_{\perp}$, al eje magnético (ecuaciones (\ref{presionpara}) y (\ref{presionper})) \cite{Chaichian:1999gd}. Luego las EdE para el GBVN magnetizado en el límite no relativistas son: \begin{eqnarray}\label{EoS} E_{NR}(\mu,T,B) &=&\Omega_{NR}(\mu,T,B) + \mu N -T S_{NR}(\mu,T,B), \label{energia}\\ P_{\parallel_{NR}}(\mu,T,B)&=& -\Omega_{NR}(\mu,T,B), \label{presionpara} \\ P_{\perp_{NR}}(\mu,T,B)&=& -\Omega_{NR}(\mu,T,B) -{\mathcal M}_{NR}(\mu,T,B) B. \label{presionper} \end{eqnarray} \noindent La entrop\'ia del gas bajo estudio es: \begin{eqnarray}\label{eq2.11} S_{NR}(\mu,T,B)\hspace{-0.1cm}=\hspace{-0.1cm}-\left(\frac{\partial\Omega_{NR}(\mu,T,B)}{\partial T}\right)_{\mu,B}\hspace{-0.35cm}= -\frac{5}{2}\frac{\Omega_{NR}(\mu,T,B)}{T} - \mu \frac{N_{NR}(\mu,T,B)}{T} - \kappa B \frac{N_+ - N_-}{T}. \end{eqnarray} \noindent Combinando la Ec.~(\ref{eq2.4b}) y las Ecs.~(\ref{eq2.7}) y (\ref{eq2.11}), llegamos a la densidad de energía: \begin{eqnarray}\label{eq2.12} E_{NR}(\mu,T,B)=-\frac{3}{2} \Omega_{NR}(\mu,T,B)- kB[N_{+}-N_{-}], \end{eqnarray} Las EdE, Ecs.~(\Ref{presionpara}), (\ref{presionper}) y (\ref{eq2.12}), pueden usarse para modelar objetos compactos magnetizados cuya composición incluya bosones magnetizados que admitan una descripción no relativista. Sin embargo, debe tenerse en cuenta que en dependencia de la temperatura, el campo magnético y la densidad de partículas, la presión perpendicular puede ser negativa. El panel izquierdo de la Figura~\Ref{f2.3} muestra las presiones en función del campo magnético para $N=1.3\times 10^{39}$cm$^{-3} $ y varios valores de la temperatura. Para campo magnético cero, $ P_{\parallel} = P_{\perp}$ y el sistema es isotrópico. Si $B\ne 0 $ la diferencia entre las presiones aumenta cuando disminuye la temperatura o aumenta el campo magnético. A partir de este gráfico es evidente que el campo magnético apenas afecta la presión paralela, mientras que su contribución es muy importante para la perpendicular. Desde un punto de vista microscópico, esto se debe a que el campo magnético disminuye el momento perpendicular de las partículas, pero no afecta el paralelo. Macroscópicamente, este efecto se expresa en el término sustractivo $ -M_{NR}B $ (tenga en cuenta que $ M_{NR}> 0 $) que aparece en la presión perpendicular. Es por eso que $ P_{\perp}$ siempre es menor que $P_{\parallel} $ y disminuye hasta valores negativos con el aumento del campo magnético. Dado que el efecto de una presión perpendicular negativa es empujar las partículas hacia el eje magnético, esto puede interpretarse como que el sistema se vuelve inestable. Este tipo de inestabilidad se ha observado previamente en otros gases cuánticos magnetizados y se conoce como colapso magnético transversal \cite{Chaichian:1999gd, Aurora2003EPJC,Felipe:2002wt,Elizabeth,Quintero2017AN}. \begin{figure}[h] \centering \includegraphics[width=0.49\linewidth]{presionPervsb.png} \includegraphics[width=0.49\linewidth]{densidadcritica.png} \caption{\label{f2.3} Panel izquierdo: presiones paralela y perpendicular en función del campo magnético para diferentes valores de temperatura y $ N=1$.$30\times 10^{39}$cm$^{-3} $. Panel derecho: diagrama de fases para el colapso magnético transversal para varios valores de la temperatura; las líneas discontinuas representan la solución de $ P_{\perp} (T, B, N) = 0 $ a temperatura fija; para cada temperatura, la región de inestabilidad ha sido sombreada.} \end{figure} El panel derecho de la Figura~\Ref{f2.3} muestra el diagrama de fases del colapso magnético en el plano del campo magnético y la densidad de partículas, para varios valores de la temperatura. Las líneas discontinuas representan la solución de $ P_{\perp} (T, B, N) = 0 $ a una temperatura fija. El gas es estable en la región por debajo de las líneas e inestable sobre ellas. En $T\neq0 $ y $ B=0 $, se necesita un número infinito de partículas para que el sistema se vuelva inestable, un resultado esperado ya que el campo magnético es la causa de la inestabilidad. Cuando $ T = 0 $ y $ B\neq0 $, $ P_{\parallel} = 0 $ y $P_{\perp}=-M_{NR}B $ siempre es negativa, es decir, el estado condensado puro es inestable para cualquier valor del campo magnético distinto de cero. En el caso de que ambos, la temperatura y el campo magnético, sean diferentes de cero, la disminución de la temperatura favorece el colapso, así como el aumento del campo magnético. Además, la Figura \ref{f2.3} también muestra que el colapso se ve favorecido por el aumento de la densidad de partículas, ya que cuanto más denso es el gas, mayores son $ M_{NR} $ y $ T_c $. En consecuencia, para una temperatura y un campo magnético fijos, el aumento de $N $ disminuye la presión térmica $ -\Omega_{NR} (\mu, T, B) $ y aumenta la presión magnética $ -M_{NR}B $, llevando a $ P_{\perp} $ a tomar valores negativos. En este sentido, el colapso impone un límite superior a las densidades de partículas que pueden existir dentro de estrellas compactas con un campo magnético dado. No obstante, es importante señalar que dada la composición heterogénea de las estrellas, la aparición o no del colapso magnético dependerá de las presiones y, por lo tanto, de la respuesta magnética de todas las especies presentes. \chapter{Estudio termodin\'amico del gas magnetizado de bosones vectoriales neutros relativistas} \label{cap3} Este capítulo est\'a dedicado a las propiedades termodinámicas del gas relativista de bosones vectoriales neutros en presencia de un campo magn\'etico constante y uniforme. En él se obtienen las expresiones analíticas de las magnitudes termodinámicas a toda temperatura y se investiga la influencia de las antipart\'iculas y el campo magnético en la condensación de Bose-Einstein, en la magnetización y en las ecuaciones de estado del sistema. Al mismo tiempo, se estudian la validez del límite no relativista discutido en el capitulo anterior y del límite de baja temperatura tomado en \cite{tesisgretel}. Este cap\'itulo también recoge resultados originales de la autora, algunos de los cuales ya se encuentran publicados en \cite{de2019bose}. \section{Extensi\'on a toda temperatura. Magnitudes termodinámicas} El potencial termodin\'amco por unidad de volumen del gas de bosones vectoriales neutros relativistas en presencia de un campo magnético externo constante y uniforme $\vec{B}=(0,0,B)$, fue previamente obtenido en \cite{tesisgretel}. El potencial termodinámico del gas relativista, $\Omega^{\pm}(\mu,T,b)$, puede separarse en dos términos: \begin{equation}\label{eq3.1} \Omega^{\pm}(\mu,T,b)=\Omega_{st}(\mu,T,b)+\Omega_{vac}(b) \, . \end{equation} En la expresi\'on anterior $\Omega_{st}(\mu,T,b)$ representa la contribucci\'on estadística, que puede ser escrita en funci\'on de la contribuci\'on de las part\'iculas y antipart\'iculas, $\Omega_{st}(\mu,T,b)=\Omega^{+}_{st}(\mu,T,b)+\Omega^{-}_{st}(\mu,T,b)$, siendo: \begin{eqnarray}\label{eq3.2a} \Omega_{st}^{+}(\mu,T,b) = - \sum_{s} \sum_{n=1}^{\infty} \frac{z^{ n}}{n^2}\! \bigg\{\frac{y_0^2T^2}{2 \pi^2}K_2(ny_0/T) + \frac{\alpha n T}{2 \pi^2} \int_{y_0}^{\infty}\frac{x^2}{\sqrt{x^2+\alpha^2}}K_1(nx/T)\bigg\} \, , \end{eqnarray} \begin{eqnarray}\label{eq3.2b} \Omega_{st}^{-}(\mu,T,b) = - \sum_{s} \sum_{n=1}^{\infty} \frac{z^{-n}}{n^2}\! \bigg\{\frac{y_0^2T^2}{2 \pi^2}K_2(ny_0/T) + \frac{\alpha n T}{2 \pi^2} \int_{y_0}^{\infty}\frac{x^2}{\sqrt{x^2+\alpha^2}}K_1(nx/T)\bigg\} \, , \end{eqnarray} \noindent donde $y_0=m\sqrt{1-sb}$ y $\alpha=mbs/2$. El segundo t\'ermino de la Ec.~(\ref{eq3.1}) es la contribución del vacío y se escribe: \begin{eqnarray}\label{eq3.3} \Omega_{vac}(b) & = & -\frac{m^4}{288\pi}(b^2(66-5b^2)-3(6-2b-b^2)(1-b)^2 \ln(1-b)\\ && -3(6+2b-b^2)(1+b)^2\ln(1+b)). \nonumber \end{eqnarray} Como se puede apreciar de la Ec.(\ref{eq3.3}), la contribución de vacío se anula cuando $b=0$, es por ello que no se mencionó al realizar el estudio del GBVN a campo cero en el epígrafe \ref{MTBR}. El estudio llevado a cabo en \cite{tesisgretel} toma el l\'imite $T<<m$ en la Ec.~(\ref{eq3.1}) para luego obtener las magnitudes termodinámicas. El potencial termodinámico estadístico y las ecuaciones de estado que se obtienen al hacer el l\'imite de baja temperatura son: \begin{eqnarray}\label{eq3.4a} \Omega_{st}^{T\ll m}(\mu',T,b)=\frac{(m\sqrt{1-b})^{3/2}T^{5/2}}{2^{1/2}\pi^{3/2}(2-b)} g_{5/2}(e^{\mu'/T}), \end{eqnarray} \begin{eqnarray}\label{eq3.4b} N^{T\ll m}(\mu',T,b)=\frac{(m\sqrt{1-b})^{3/2}T^{3/2}}{2^{1/2}\pi^{3/2}(2-b)} g_{3/2}(e^{\mu'/T}), \end{eqnarray} \begin{eqnarray}\label{eq3.4c} E^{T\ll m}(\mu',T,b)=m\sqrt{1-b}\;N+\Omega_{vac}(b)-\frac{3}{2}\Omega_{st}^{T\ll m}(\mu',T,b)+T\frac{\partial \mu'}{T}, \end{eqnarray} \begin{equation}\label{eq3.4cc} P^{T\ll m}_{\parallel}(\mu',T,b)=-\Omega^{T\ll m}_{st}(\mu',T,b)-\Omega_{vac}(b), \end{equation} \begin{equation}\label{eq3.4ccc} P^{T\ll m}_{\perp}(\mu',T,b)=P^{T\ll m}_{\parallel}(\mu',T,b)-bB_c\;\mathcal{M}^{T\ll m}(\mu',T,b), \end{equation} \begin{equation}\label{eq3.13} \mathcal{M}^{T\ll m}(\mu',T,b)=\frac{kN}{\sqrt{1-b}}-\frac{kT^{3/2}}{2^{3/2}\pi^2(1-b)^{3/2}}g_{3/2}(e^{\mu'/T})+\mathcal{M}_{vac}(b), \end{equation} \noindent con: \begin{eqnarray}\label{eq3.4d} \mu'\simeq - \frac{\zeta(3/2)T}{4\pi}\bigg(1-\bigg(\frac{T_c^{T\ll m}}{T}\bigg)^{3/2}\bigg)\Theta(T-T_c^{T\ll m}), \end{eqnarray} \noindent y: \begin{eqnarray}\label{eq3.4f} T_c^{T\ll m}= \frac{1}{m\sqrt{1-b}}\bigg(\frac{2^{1/2}\pi^{3/2}(2-b)N}{\zeta(3/2)}\bigg)^{2/3}. \end{eqnarray} \noindent En la Ec.(\ref{eq3.4d}), $\Theta(x)$ es la función paso unitario de Heaviside y $\mathcal M_{vac}(b)$ viene dada por la Ec.(\ref{eq3.8}). A diferencia de lo que se hizo en \cite{tesisgretel}, en los próximos epígrafes de la tesis partiremos de las expresiones generales Ecs.~(\ref{eq3.2a}) y (\ref{eq3.2b}) para obtener las magnitudes termodinámicas a toda temperatura. \section{Antipart\'iculas} La consecuencia más importante de usar las Ecs.~(\ref{eq3.2a}) y (\ref{eq3.2b}) en lugar de su l\'imite de baja temperatura es que en ellas se conserva la contribución de las antipartículas. Para tener una idea de cómo la presencia del campo magnético afecta la aparición de las antipartículas, estudiaremos la densidad de partículas relativista, que se escribe: $N=N_{gs}+N_{st}(\mu,T,b)$, donde $N_{gs}$ es la densidad de part\'iculas en el estado fundamental y $N_{st}(\mu,T,b)=N^{+}(\mu,T,b)-N^{-}(\mu,T,b)$ es la derivada con respecto a $\mu$ de los potenciales termodinámicos (\ref{eq3.2a}) y (\ref{eq3.2b}), y representa la densidad total de partículas en los estados excitados: \begin{eqnarray}\label{eq5} N_{st}(\mu,T,b) = \sum_{s} \sum_{n=1}^{\infty}\frac{z^{ n}-z^{ -n}}{n} \bigg\{\frac{y_0^2T}{2 \pi^2} K_2(ny_0/T) + \frac{\alpha n}{2 \pi^2} \int_{y_0}^{\infty}\frac{x^2}{\sqrt{x^2+\alpha^2}}K_{1}(nx/T)\bigg\} \, . \end{eqnarray} \noindent La Figura \ref{f3.01} muestra la fracci\'on de part\'iculas $N^+(\mu,T,b)/N$ y antipart\'iculas $N^-(\mu,T,b)/N$ no condensadas para $N=1.30 \times 10^{39}cm^{-3}$ y varios valores de campo magn\'etico. \begin{figure}[h!] \centering \includegraphics[width=0.55\linewidth]{particlefractionvariosb.png} \caption{\label{f3.01} Fracción de partículas y antipartículas no condensadas en función de la temperatura para varios valores de campo magn\'etico. Las líneas continuas corresponden a la fracción de partículas y las discontinuas a la de antipartículas. Las líneas horizontales se\~{n}alan la temperatura cr\'itica $T_c(b)$. } \end{figure} Como se vio en el Cap\'itulo 1, la densidad de antipartículas comienza a ser apreciable para temperaturas tales que $T\gtrsim m/5$ (Figura \ref{particlefraction}). La nueva información aportada por la Figura \ref{f3.01} es que el campo magnético favorece la aparición de las antipartículas. No obstante, para que este efecto sea apreciable se requieren campos magnéticos cercanos al crítico (nótese que las curvas para $b=0$ y $b=0.1$ son prácticamente iguales). \section{Condensaci\'on de Bose-Einstein} Para estudiar el efecto del campo magnético y de las antipart\'iculas, así como las consecuencias de tomar el l\'imite de baja temperatura, en la condensación de Bose-Einstein, compararemos la curva cr\'itica $N_c(T,b)$ que se obtiene a partir de la expresi\'on (\ref{eq5}) con las obtenidas en el l\'imite no relativista (Cap\'itulo 2) y en el l\'imite de baja temperatura estudiado en \cite{tesisgretel}. A fin de facilitar la lectura de los gráficos, utilizaremos la siguiente nomenclatura: (R) para referirnos al gas relativista a toda temperatura, (NR) para la aproximaci\'on no relativista y (BT) para el l\'imite de baja temperatura. La curva $N_c(T, b)$ se obtiene evaluando la densidad de partículas en la condición del condensado. Para el gas relativista esta condición es $\mu = m \sqrt{1-b}$, por tanto: \begin{eqnarray}\label{eq3.5} N_c(T,b)=\hspace{-0.1cm}\sum_{s} \sum_{n=1}^{\infty}\frac{e^{nm\sqrt{1-b}/T}-e^{-nm\sqrt{1-b}/T}}{n}\bigg\{\frac{y_0^2T}{2 \pi^2} K_2(ny_0/T) + \hspace{-0.1cm}\frac{\alpha n}{2 \pi^2} \int_{y_0}^{\infty}\hspace{-0.3cm}\frac{x^2}{\sqrt{x^2+\alpha^2}}K_{1}(nx/T)\bigg\}. \end{eqnarray} La Figura \ref{f3.1} muestra el diagrama de fases del condensado en el plano $N-T$ para $B=0$ y $B=10^{16}$ G. \begin{figure}[h!] \centering \includegraphics[width=0.49\linewidth]{PhaseDiagramB=0.png} \includegraphics[width=0.49\linewidth]{PhaseDiagramB=1016G.png} \caption{\label{f3.1} Diagrama de fases del condensado. La región blanca corresponde al estado de gas libre. La región sombreada corresponde al condensado. La líneas se\~{n}alan las curvas cr\'iticas $N_c(T,b)$ para diferentes descripciones del gas de bosones vectoriales neutros.} \end{figure} A B=0 hay una diferencia muy notable entre el límite de baja temperatura y los otros dos casos. Esto se debe a que al tomar el l\'imite $T<<m$ en el potencial termodin\'amico, se desprecian los términos correspondientes a los estados de spin $s=0,-1$, y el único t\'ermino que sobrevive es el del estado $s=1$. Como consecuencia, una vez tomado el l\'imite de baja temperatura en presencia de campo magnético no es posible recuperar las expresiones de campo cero haciendo $b=0$ en las Ecs.(\ref{eq3.4a}-\ref{eq3.13}). Por tanto, es de esperar que este límite solo funciones bien a campos magnéticos relativamente fuertes. En este sentido, las expresiones para toda temperatura obtenidas en la tesis, Ec.(\ref{eq5}-\ref{eq8}), tienen la fortaleza de que no implican ninguna pérdida de información relacionada con el spin. Por otra parte, para $B=0$ la curva relativista y no relativista se separan alrededor de $T \sim m$, indicando la importancia de las ant\'iparticulas a esas temperaturas. A $B=10^{16}$ G la curva cr\'itica en el l\'imite de baja temperatura comienza a diferenciarse de las otras dos para $T\gtrsim 10^{-3}m$, demostrando que para este valor de campo magn\'etico existe una regi\'on de temperatura en donde el l\'imite $T<<m$ s\'i es apropiado. Al igual que para campo cero, las curvas relativista y no relativista se separan alrededor de $T \sim m$. La Figura \ref{f3.1} aporta dos valores relevantes de temperatura: $T\sim10^{-3}m$, que señala el momento en que los efectos de la temperatura comienzan a ser relevantes en el gas magnetizado, y $T\sim m$ que marca el punto en que los efectos relativistas (la presencia de las antipartículas) deben tomarse en cuenta. Por \'ultimo, vale la pena se\~{n}alar que los resultados mostrados en la Figura 3.2 concuerdan con los del epígrafe \ref{CBE}, donde se mostr\'o que para que el gas de Bose se condense a temperaturas relativistas $T_c>>m$ se debe cumplir $N_c>>m^3$. Estudiemos ahora con mayor profundidad c\'omo afecta el campo magn\'etico la validez de los l\'imites NR y BT. Para ello fijemos la densidad de part\'iculas en $N=1.30 \times 10^{39}cm^{-3}$ y grafiquemos la temperatura cr\'itica del condensado como funci\'on del campo magnético (Figura \ref{f3.2}). \begin{figure}[h!] \centering \includegraphics[width=0.55\linewidth]{Tcvsb2.png} \caption{\label{f3.2} Temperatura cr\'itica del CBE como funci\'on del campo magnético para $N=1.30 \times 10^{39}cm^{-3}$. La región blanca corresponde al estado de gas libre. La región sombreada corresponde al estado condensado. Las l\'ineas corresponden a las curvas cr\'iticas $T_c(b)$ para diferentes descripciones del gas de bosones vectoriales neutros.} \end{figure} La Figura \ref{f3.2} muestra que el comportamiento asintótico de la $T_c$ no relativista con el aumento del campo magn\'etico constituye una diferencia importante entre este y los casos relativistas. En estos últimos, la temperatura crítica siempre aumenta con $b$ y diverge cuando $b\rightarrow1$ (es decir cuando $ B\rightarrow B_c $). El comportamiento distinto de la curva no relativista a campo fuerte es una consecuencia de suponer $kB<<m$ para la obtención del espectro no relativista, lo que significa que en este caso el campo magnético se considera débil. Por tanto, es natural que en el límite NR no se describa bien la región de campo fuerte. Por otra parte, para $B\lesssim 0.2B_c$ la curva del l\'imite de baja temperatura comienza a discrepar de las curvas relativista y no relativista. Esto era de esperarse, pues ya sabemos que este l\'imite no funciona bien a medida que $b\rightarrow 0$. Sin embargo, cuando el campo magnético es lo suficientemente fuerte para que los efectos de la temperatura no sean los dominantes, el comportamiento del gas en el límite de baja temperatura no difiere del obtenido para toda temperatura. Como ya habíamos dicho antes, al tomar el límite de baja temperatura se desprecian los términos correspondientes a los estados de spin $s=0,-1$ y el único estado que sobrevive es el $s=1$. Esto es análogo a hacer una aproximación de campo fuerte, por lo que es lógico que el límite de baja temperatura no describa correctamente la región de campo débil. Por lo tanto, otra fortaleza de la tesis consiste en que las expresiones para toda temperatura obtenidas en ella describen correctamente tanto la región de campo débil como la de campo fuerte. Finalmente, n\'otese que hacer $b=0$ en la Ec.(\ref{eq3.4f}) es análogo a hacer $b\rightarrow\infty$ en la expresi\'on de la $T_c$ no relativista Ec.(\ref{eq2.8b}), pues al aumentar el campo magnético se favorece al estado de spin $s=1$. \section{Propiedades magn\'eticas} La magnetización del gas relativista puede escribirse como la suma de tres términos: la magnetización estad\'istica $\mathcal{M}_{st}(\mu,T,b)$, la del vacío $\mathcal{M}_{vac}(b)$ y la de las partículas que se encuentran en el estado básico $\mathcal{M}_{gs}(T,b)$: \begin{equation}\label{eq3.6} \mathcal{M}^{\pm}(\mu,T,b)=\mathcal{M}_{st}(\mu,T,b)+\mathcal{M}_{vac}(b)+\mathcal{M}_{gs}(T,b). \end{equation} \noindent La contribución estadística se calcula derivando $\Omega_{st}(\mu,T,b)$ con respecto al campo magnético. Para ello reescribamos el potencial termodinámico estadístico de la siguiente manera: \begin{equation}\label{eqb1} \Omega_{st}(\mu,T,b)=-\sum_{s} \sum_{n=1}^{\infty} \!\frac{z^n+z^{-n}}{n}\bigg\{\frac{A_1(T,b)}{n}+A_2(T,b)\bigg\}, \end{equation} \noindent donde: \begin{equation}\label{eqb2} A_1(T,b)=\frac{m^2(1-bs)T}{2\pi^2}K_2(nm\sqrt{1-bs}/T), \end{equation} \begin{equation}\label{eqb3} A_2(T,b)=\frac{mbsT}{4\pi^2}\int_{m\sqrt{1-bs}}^{\infty}\frac{x^2}{\sqrt{x^2+(mbs/2)^2}}K_2(nx/T)\;dx. \end{equation} Entonces, la contribución estadística a la magnetización queda: \begin{equation}\label{eqb4} \mathcal{M}_{st}(\mu,T,b)=-\frac{\partial \Omega_{st}(\mu,T,b)}{\partial b}\frac{\partial b}{\partial B}=\frac{2k}{m}\sum_{s} \sum_{n=1}^{\infty} \!\frac{z^n+z^{-n}}{n}\bigg\{\frac{1}{n}\frac{\partial A_1(T,b)}{\partial b}+\frac{\partial A_2(T,b)}{\partial b}\bigg\}. \end{equation} \noindent La derivada de la expresión (\ref{eqb2}) es: \begin{equation}\label{eqb5} \frac{\partial A_1(T,b)}{\partial b}=\frac{m^2y_0\;nsT}{4\pi^2}K_1(ny_0/T), \end{equation} \noindent mientras que para derivar la integral de la expresión (\ref{eqb3}) utilizaremos la siguiente propiedad: \begin{equation}\label{eqb8} \frac{\partial}{\partial x}\int_{a(x)}^{b(x)}f(x,t)dt=\int_{a(x)}^{b(x)}\frac{\partial}{\partial x}[f(x,t)]dt+f[b(x)]b'(x)-f[a(x)]a'(x). \end{equation} \noindent Con ella la derivada de (\ref{eqb2}) queda: \begin{eqnarray}\label{eqb9} \frac{\partial A_1(T,b)}{\partial b}=\frac{msT}{4\pi^2}\int_{y_0}^{\infty}\frac{x^2}{\sqrt{x^2+\alpha^2}} K_1(nx/T)\;dx -\frac{\alpha^3T}{2\pi^2b}\int_{y_0}^{\infty}\frac{x^2}{(x^2+\alpha^2)^{3/2}}K_1(nx/T)\;dx\\ +\frac{\alpha^2y_0T}{\pi^2b(2-bs)}K_1(ny_0/T), \end{eqnarray} \noindent con lo cual se obtiene, despu\'es de simplificar: \begin{equation}\label{eq3.7} \mathcal{M}_{st}(\mu,T,b)=\hspace{-0.1cm}\sum_{s} \sum_{n=1}^{\infty} \!\frac{z^n+z^{-n}}{n}\bigg\{\frac{my_0ks\;T}{\pi^2(2-bs)}K_1(ny_0/T)+\hspace{-0.1cm}\frac{ksT}{2\pi^2}\int_{y_0}^{\infty}\hspace{-0.3cm}\frac{x^4}{(x^2+\alpha^2)^{3/2}}K_1(nx/T)\;dx\bigg\}. \end{equation} \noindent De esta expresi\'on es evidente que las part\'iculas/antipart\'iculas en el estado con spin perpendicular al campo magnético, es decir con $s=0$, no contribuyen a la magnetización del gas. La contribución del vacío se calcula derivando la Ec.(\ref{eq3.3}) con respecto al campo magnético: \begin{equation}\label{eq3.8} \mathcal{M}_{vac}(b)=-\frac{k m^3}{72 \pi}(7b(b^2-6)-3(2b^3-9b+7)\log(1-b)-3(2b^3-9b-7)\log(1+b)). \end{equation} Para obtener la contribución de las partículas que se encuentran en el estado fundamental multiplicamos el momento magnético efectivo de cada partícula $d=k/\sqrt{1-b}$, que aumenta con la intensidad del campo magnético, por la densidad de partículas que se encuentran en ese estado: \begin{equation}\label{eq3.9} \mathcal{M}_{gs}(T,b)=\frac{k}{\sqrt{1-b}}N_{gs}(T,b). \end{equation} \noindent Sustituyendo las Ecs.(\ref{eq3.7}), (\ref{eq3.8}) y (\ref{eq3.9}) en la Ec.(\ref{eq3.6}) obtenemos la magnetizaci\'on total del gas relativista a toda temperatura. La Figura \ref{f3.3} muestra la magnetizaci\'on como funci\'on de la temperatura para las diferentes descripciones del gas de bosones vectoriales neutros. En el gr\'afico hemos incluido a modo de referencia la contribuci\'on del vac\'io. Los c\'alculos se hicieron para $N=1.30 \times 10^{39}cm^{-3}$ y dos valores de campo magn\'etico, $B=10^{18}G$ y $B=5\times 10^{18}G$. \begin{figure}[h!] \centering \includegraphics[width=0.49\linewidth]{Mb01.png} \includegraphics[width=0.49\linewidth]{Mb05.png} \caption{\label{f3.3} Magnetizaci\'on como funci\'on de la temperatura para $N=1.30 \times 10^{39}cm^{-3}$. La l\'inea negra de rayas y puntos corresponde a la contribución del vacío. } \end{figure} Para $B=10^{18}G$ la magnetización del vacío es despreciable, y las curvas correspondientes a la magnetización total del gas relativista y los límites NR y BT coinciden para $T=0$ y son iguales a $ k N/\sqrt{1-b}$. A medida que la temperatura aumenta, la magnetización en el l\'imite no relativista decrece y va a cero cuando $T$ tiende a infinito, como vimos en el Cap\'itulo 2. La magnetizaci\'on del gas relativista muestra este mismo comportamiento hasta $T\sim 0.2\;m$; a partir de este valor $\mathcal{M}^{\pm}(\mu,T,b)$ crece. Este cambio en la monoton\'ia est\'a asociado a las antipart\'iculas, pues alrededor de estas temperaturas su densidad comienza a ser apreciable (v\'ease la Figura \ref{f3.01}), y su aporte a la magnetización tambi\'en. N\'otese que la presencia de las antipart\'iculas aumenta la magnetizaci\'on en varios \'ordenes. En el l\'imite de baja temperatura, la magnetizaci\'on tambi\'en decrece cuando $T$ aumenta, pero su comportamiento es bien diferente de los otros dos casos, pues se vuelve negativa alrededor de $T\sim0.5\;m$ (el punto donde la curva termina). No obstante, esto no implica que el gas tenga a esas temperaturas un comportamiento diamagnético, sino que es consecuencia de haber despreciado los estados con $s=0$ y $s=-1$, y no es, por tanto, un resultado f\'isicamente correcto. Este comportamiento de la magnetizaci\'on BT refuerza el hecho de que este l\'imite solo es v\'alido para $T\lesssim10^{-3}\;m$. En el caso de $B=5 \times10^{18}G$, el comportamiento de la magnetizaci\'on es similar, salvo por el hecho de que ahora $\mathcal M_{vac}$ es mayor que el m\'aximo de $\mathcal{M}_{NR}$. En consecuencia, la magnetizaci\'on de los gases relativistas aumenta alrededor de $T=0$. El campo magn\'etico favorece la aproximaci\'on de baja temperatura y vemos que la magnetizaci\'on en este l\'imite coincide en un mayor intervalo de temperatura con la del gas relativista. Esto se debe a que mientras mayor sea el campo magn\'etico m\'as part\'iculas se encuentran en el estado con $s=1$. Por \'ultimo, es bueno resaltar que los gr\'aficos de la magnetizaci\'on muestran la importancia de considerar los efectos de las antipart\'iculas y el vac\'io, que normalmente se desprecian. Analicemos ahora qu\'e sucede con la magnetizaci\'on del gas relativista cuando $b \rightarrow 0$. Recordemos que en el Cap\'itulo 2 este l\'imite nos condujo al ferromagnetismo de Bose-Einstein. Al hacer $b=0$ en la Ec.(\ref{eq3.7}) se obtiene: \begin{equation}\label{eq3.10} \mathcal{M}_{st}(\mu,T,0)=\sum_{s} \sum_{n=1}^{\infty} \!\frac{z^n+z^{-n}}{n}\bigg\{\frac{m^2ksT}{2\pi^2}K_1(nm/T)+\frac{ksT}{2\pi^2}\int_{m}^{\infty}xK_1(nx/T)\;dx\bigg\}, \end{equation} \noindent pero al sumar por $s=\pm1$ la expresión anterior se anula. En ausencia de campo magnético, el t\'ermino de la magnetización del vacío también es cero al igual que $\mathcal{M}_{gs}(T,0)=\kappa N_{gs}(T)$ por encima de la temperatura de condensaci\'on. Sin embargo, para $T<T_c$, $M_{gs}(T,0) = \kappa N_{gs}(T) \neq 0$ y obtenemos que la magnetizaci\'on total es diferente de cero, aunque $B=0$: \begin{equation}\label{eq3.11} \mathcal{M}^{\pm}(\mu,T,0)=\mathcal{M}_{gs}(T,0). \end{equation} Esto evidencia el comportamiento ferromagnético del gas relativista de bosones vectoriales neutros siempre que la condensación esté presente. Al igual que en el l\'imite no relativista, la aparici\'on del ferromagnetismo de Bose-Einstein se asocia a la condensación, ya que en el estado fundamental del gas magnetizado $s=1$. Para comprobar lo planteado en el párrafo anterior calcularemos como en el Capítulo 2, la capacidad calorífica y la susceptibilidad magnética. Las expresiones a toda temperatura para la entrop\'ia y la energ\'ia interna por unidad de volumen del gas magnetizado de bosones vectoriales neutros son: \begin{eqnarray}\label{eq8} S^{\pm}(\mu,T,b)=-\frac{2}{T}\Omega_{st}(\mu,T,b)-\frac{\mu}{T}(N^{+}(\mu,T,b)-N^{-}(\mu,T,b))\\\nonumber +\sum_{s}\sum_{n=1}^{\infty}\frac{z^n+z^{-n}}{n}\bigg\{\frac{y_0^3}{4\pi^2}[K_1(ny_0/T)+K_3(ny_0/T)]\\ +\frac{\alpha n}{2\pi^2T}\int_{y_0}^{\infty}\frac{x^3}{\sqrt{x^2+\alpha^2}}K_0(nx/T)dx \bigg\},\nonumber \end{eqnarray} \begin{eqnarray}\label{eq9} E^{\pm}(\mu,T,b)= -\Omega_{st}(\mu,T,b)+\Omega_{vac}(b)\\\nonumber +\sum_{s}\sum_{n=1}^{\infty}\frac{z^n+z^{-n}}{n}\bigg\{\frac{y_0^3T}{4\pi^2}[K_1(ny_0/T)+K_3(ny_0/T)]\\ +\frac{\alpha n}{2\pi^2}\int_{y_0}^{\infty}\frac{x^3}{\sqrt{x^2+\alpha^2}}K_0(nx/T)dx \bigg\},\nonumber \end{eqnarray} Derivando la Ec.(\ref{eq9}) con respecto a $T$ se obtiene la capacidad calor\'ifica: \begin{eqnarray}\label{eqCv1} C_V^{\pm}(\mu,T,b)=S^{\pm}(\mu,T,b)+\sum_{s}\sum_{n=1}^{\infty}\frac{z^n+z^{-n}}{n}\bigg\{\frac{y_0^3}{4\pi^2}[K_1(ny_0/T)+K_3(ny_0/T)]\\\nonumber +\frac{y_0^4n}{8 \pi^2T}[K_0(ny_0/T)+2K_2(ny_0/T)+K_4(ny_0/T)]+\frac{\alpha n^2}{2\pi^2T^2} \int_{y_0}^{\infty}\frac{x^4K_1(nx/T)dx}{\sqrt{x^2+\alpha^2}}\bigg\} \\\nonumber -\frac{\mu}{T}\sum_{s}\sum_{n=1}^{\infty}(z^n-z^{-n})\bigg\{\frac{y_0^3}{4\pi^2}[K_1(ny_0/T)+K_3(ny_0/T)] +\frac{\alpha n}{2\pi^2T}\int_{y_0}^{\infty}\frac{x^3 K_0(nx/T)dx}{\sqrt{x^2+\alpha^2}}\bigg\}. \end{eqnarray} \noindent La susceptibilidad magn\'etica se obtiene derivando $\mathcal M^{\pm}$ con respeto a $B$: \begin{equation}\label{eqChi} \chi^{\pm}(\mu,T,b)= \begin{cases} \chi_{st}(\mu,T,b)+\chi_{vac}(b)+\chi_{gs}(\mu,T,b),& \text{CBE},\\ \chi_{st}(\mu,T,b)+\chi_{vac}(b),& \text{Gas Libre}, \end{cases} \end{equation} \noindent donde \begin{equation}\label{eqChivac} \chi_{vac}(b)=\frac{k^2m^2}{4\pi}[-b^2+(2b^2-3)\log(1-b)+(2b^2-3)\log(1+b)], \end{equation} \begin{eqnarray}\label{eqChist} \chi_{st}(\mu,T,b)= \sum_{s}\sum_{n=1}^{\infty}\frac{(z^n-z^{-n})}{n}\bigg\{ \frac{4k^2\alpha^2n}{\pi^2b^2(2-bs)}K_0(ny_0/T)+\\\nonumber \frac{4k^2 s \alpha T(4-3bs)}{\pi^2(2-bs)^3}K_1(ny_0/T)-\frac{3 k^2 s^2 \alpha T}{2\pi^2}\int_{y_0}^{\infty}\frac{x^4K_1(nx/T)dx}{(x^2+\alpha^2)^{5/2}}\bigg\}, \end{eqnarray} \noindent y \begin{eqnarray}\label{eqChigs} \chi_{gs}(\mu,T,b)= \frac{k^2}{m\sqrt{(1-b)^3}}N_{gs} -\frac{2k^2}{m\sqrt{1-b}}\sum_{s}\sum_{n=1}^{\infty}(z^n-z^{-n})\\\nonumber \times\bigg\{\frac{m^3s\sqrt{1-bs}}{2\pi^2(2-bs)}K_1(ny_0/T) +\frac{ms}{4\pi^2}\int_{y_0}^{\infty}\frac{x^4K_1(nx/T)dx}{(x^2+\alpha^2)^{3/2}} \bigg\}. \end{eqnarray} Algo a tener en cuenta a la hora de calcular num\'ericamente la susceptibilidad magn\'etica es que el primer t\'ermino de $\chi_{st}$ diverge para $T<T_c$, sin embargo $\chi^{\pm}(\mu,T,b)$ converge a campo finito debido a que esa divergencia se compensa con el segundo t\'ermino de $\chi_{gs}$. A campo cero, $\chi_{st}(\mu,T,0)$ diverge para todo $T<T_c$ (los detalles de este an\'alisis pueden ser consultados en el Ap\'endice B). Esto \'ultimo tambi\'en se obtuvo en el Cap\'itulo 2 para la susceptibilidad no relativista, Ec.(\ref{eq48}), y parece estar relacionado con el ferromagnetismo de Bose-Einstein, ya que se observa en las mismas condiciones de temperatura y campo, es decir a $B=0$ y $T<T_c$. La Figura \ref{f3.31} muestra el calor espec\'ifico y la susceptibilidad magn\'etica como funci\'on de la temperatura para $N=1.30 \times 10^{39}cm^{-3}$ y varios valores del campo magn\'etico. \begin{figure}[h!] \centering \includegraphics[width=0.49\linewidth]{Cvvariosb.png} \includegraphics[width=0.49\linewidth]{chivariosb.png} \caption{\label{f3.31} Calor espec\'ifico y susceptibilidad magn\'etica como funci\'on de la temperatura para $N=1.30 \times 10^{39}cm^{-3}$ y varios valores del campo magn\'etico. Las l\'ineas de rayas y puntos corresponden a la contribución del vacío y las líneas continuas verticales a $Tc(b)$.} \end{figure} Al igual que en el caso no relativista, los picos de $C_{V}^{\pm}(\mu,T,b)$ y $\chi^{\pm}(\mu,T,b)$ ocurren en la temperatura de condensación (las líneas verticales continuas), indicando el paso del sistema del comportamiento paramagnético al ferromagnético. Esto refuerza nuestra conclusión de que el comportamiento ferromagnético del gas por debajo de $T_c$ es una consecuencia de la condensación. También podemos ver que la presencia de las antipartículas hace que el calor específico por partícula aumente con la temperatura en vez de tender a $3/2$ como en el caso no relativista. Otro aspecto interesante del panel derecho de la Figura \ref{f3.31} es el comportamiento a altas temperaturas de la susceptibilidad magn\'etica. A $B=0$, $\chi^{\pm}$ disminuye con $T$ hasta hacerse cero como en el caso no relativista. No obstante, a campo magn\'etico finito $\chi^{\pm}\rightarrow\chi_{vac}$ cuando $T$ aumenta. Esto es consistente con el hecho de que la magnetizaci\'on relativista aumenta con la temperatura en lugar de anularse. Como ya vimos, esto es una consecuencia directa de la presencia de una fracci\'on finita de antipart\'iculas en el sistema. \section{Presiones anisotr\'opicas} En este epígrafe estudiaremos las ecuaciones de estado del gas magnetizado, en particular el comportamiento con la temperatura de sus presiones paralela y perpendicular: \begin{equation}\label{eq7} P^{\pm}_{\parallel}(\mu,T,b)=-\Omega^{\pm}(\mu,T,b), \end{equation} \begin{equation}\label{eq7a} P^{\pm}_{\perp}(\mu,T,b)=P^{\pm}_{\parallel}(\mu,T,b)-\frac{bm}{2k}\mathcal{M}^{\pm }(\mu,T,b). \end{equation} La Figura \ref{f3.3} muestra la dependencia de las presiones con la temperatura para $N=1.30 \times 10^{39}cm^{-3}$ y varios valores de campo magn\'etico. A modo de referencia se han dibujado tambi\'en las curvas correspondientes a la presión del vacío. \begin{figure}[h!] \centering \includegraphics[width=0.55\linewidth]{presionvariosb.png} \caption{\label{f3.3} Presiones paralela y perpendicular como funciones de la temperatura para $N=1.30 \times 10^{39}cm^{-3}$ y varios valores del campo magn\'etico. Las l\'ineas de rayas y puntos corresponden a la contribución del vacío. Las l\'ineas continuas constituyen la presión paralela y las discontinuas la presión perpendicular.} \end{figure} En este gr\'afico pueden identificarse claramente dos regiones. En la primera, $T>m$, la diferencia entre las presiones paralela y perpendicular es despreciable, as\'i como tambi\'en son despreciables las diferencias que pudieran existir entre las presiones a valores de $B$ distintos. Esta es, por tanto, una regi\'on dominada por la temperatura. En la segunda región, $T<m$, es notable la diferencia entre las presiones pues en ella domina el campo magnético. A medida que la temperatura disminuye $P^{\pm}_{\parallel}$ tiende a la presi\'on del vac\'io, mientras que $P^{\pm}_{\perp}$ se hace negativa. Esto sucede porque a medida que m\'as part\'iculas del gas pasan al condensado, $\Omega^{\pm}_{st}(\mu,T,b) \rightarrow 0$, y $\Omega^{\pm}_{vac}(b)$ y $-B \mathcal M^{\pm}$ se convierten en los t\'erminos dominantes en las presiones paralela y perpendicular respectivamente. Por otra parte, n\'otese en la Figura \ref{f3.3} c\'omo el aumento del campo magn\'etico aumenta la presi\'on del vac\'io y la temperatura a la cual la $P^{\pm}_{\perp}$ se hace cero, facilitando as\'i la ocurrencia del colapso magn\'etico del gas, tal y como sucede tambi\'en en l\'imite no relativista analizado en el Cap\'itulo 2. Las diferencias entre las presiones que resultan del c\'alculo relativista presentado en este cap\'itulo y sus l\'imites NR y BT pueden apreciarse en la Figura \ref{f3.4}. \begin{figure}[h!] \centering \includegraphics[width=0.49\linewidth]{Presionparalela.png} \includegraphics[width=0.49\linewidth]{Presionparpendicular.png} \caption{\label{f3.4} Presiones paralela y perpendicular como funciones de la temperatura para $N=1.30 \times 10^{39}cm^{-3}$ y $B=10^{18}$G. La l\'inea negra de rayas y puntos corresponde a la contribución del vacío. Las l\'ineas naranja, negra y negra discontinua son las presiones en las diferentes descripciones del gas de bosones vectoriales neutros. La l\'inea horizontal corresponde a la temperatura cr\'itica del CBE. } \end{figure} Dichas diferencias son, en t\'erminos generales, tres: Primero, la presencia de las antipart\'iculas en la regi\'on de altas temperaturas, que ocasiona una diferencia de varios \'ordenes entre las presiones relativistas y no relativistas. Segundo, que en los dos casos relativistas el comportamiento de la presi\'on paralela a bajas temperaturas es dominado por la presi\'on del vac\'io, mientras que en el l\'imite no relativista $P_{\parallel}$ tiende a cero con $T$. Y tercero, que el valor de la temperatura para la cual $P_{\perp}=0$ se subestima en el l\'imite no relativista, mientras que se sobreestima en la aproximaci\'on de baja temperatura. \chapter*{Conclusiones} \addcontentsline{toc}{chapter}{Conclusiones} A fin de contribuir al desarrollo de descripciones cada vez más precisas y realistas de los objetos y fenómenos astrofísicos, al iniciar el trabajo que culmina con la presentación de esta tesis nos propusimos estudiar las propiedades termodinámicas de un gas magnetizado de bosones vectoriales neutros a toda temperatura. Como resultado, en la tesis se presentan, por primera vez hasta donde sabemos, las expresiones analíticas exactas para las ecuaciones de estado de un gas magnetizado de bosones vectoriales neutros a toda temperatura, y su límite no relativista, incluidas la magnetización y las segundas derivadas del potencial termodinámico ($C_v$ y $\chi$). Estas EdE están listas para ser utilizadas en cualquier problema (astro)físico que así lo requiera. El estudio numérico de la termodinámica de este gas en condiciones astrofísicas, permitió ver la influencia relativa de los parámetros del problema (densidad, campo magnético y temperatura) en la ocurrencia de distintos fenómenos. En particular, fueron investigados la condensación de Bose-Einstein, las propiedades magn\'eticas y la anisotrp\'ia en las presiones que es típica de los gases cuánticos magnetizados. A partir de los resultados obtenidos, arribamos a las siguientes conclusiones: \begin{itemize} \item En dependencia de si $T$ es mayor o menor que la masa de los bosones, existen dos reg\'imenes bien diferenciados en el comportamiento del gas. Para $T<<m$, dominan en el sistema los efectos del campo magn\'etico, mientras que si $T>>m$ dominan los efectos de la temperatura, siendo el m\'as importante de ellos la existencia de una fracci\'on no despreciable de antipart\'iculas en el caso del gas relativista. \item En los dos casos estudiados, la transición de fase al CBE depende de la temperatura, la densidad de partículas y el campo magnético, de manera tal que al aumentar la densidad de partículas o el campo magnético, así como al disminuir la temperatura, el condensado puede aparecer. \item La relevancia de las antipart\'iculas en el gas relativista se evidencia claramente en todas las magnitudes. En general, la densidad de antipart\'iculas deja de ser despreciable alrededor de $T\sim0.2\;m$ para $N=1.30\times10^{39}$cm$^{-3}$, aunque sus efectos se manifiestan con más fuerza para $T \gtrsim m$, siendo ambos valores de temperatura, al parecer, bastante independientes del campo magn\'etico. Esto \'ultimo cobra especial importancia en los casos de la magnetizaci\'on y la presi\'on del gas, pues la aparici\'on de las antipart\'iculas en el r\'egimen de altas temperaturas implica un aumento de varios \'ordenes en ambas magnitudes. De manera que las ant\'iparticulas podr\'ian estar conectadas tanto a la producci\'on y mantenimiento de los altos campos magn\'eticos estelares, como a la estabilidad gravitacional de los objetos astron\'omicos. \item Por debajo de la temperatura crítica del CBE, el gas muestra, para todas las descripciones estudiadas, una magnetización espontánea. La aparici\'on del ferromagnetismo de Bose-Einstein se asocia a la condesaci\'on, lo que fue demostrado a trav\'es del estudio de $C_v$ y $\chi$. La capacidad de los gases vectoriales de magnetizarse espont\'aneamente podr\'ia contarse tambi\'en entre las causas de que originan y mantienen el campo magn\'etico en entornos astrof\'isicos. \item Como sucede con otros gases cuánticos magnetizados, la presencia del campo magnético impone su simetría axial al sistema y separa las presiones en dos componentes, una a paralela y otra perpendicular al eje magnético. La presión paralela aumenta con el campo magnético, mientras que la perpendicular disminuye. Bajo ciertas condiciones, la presión perpendicular puede ser negativa y el sistema se vuelve inestable. Como se mostró, esta inestabilidad es causada por el campo magnético, mientras que la temperatura se opone a ella. Por otro lado, aumentar la densidad de partículas también desestabiliza el gas. Esto impone un límite superior a las densidades de bosones permitidas en los objetos astronómicos para una temperatura y un campo magnético dado. \end{itemize} Finalmente, la comparación entre el cálculo relativista general y los límites no relativista y de baja temperatura permitió establecer los rangos de validez de dichas aproximaciones y sus efectos en el sistema estudiado. Aunque las expresiones obtenidas para las magnitudes termodin\'amicas en el l\'imite no relativista son v\'alidas para toda temperatura, esta aproximaci\'on no toma en cuenta la producci\'on de antipart\'iculas a altas temperaturas, ni los efectos de vac\'io, que pueden llegar a ser muy importantes para el gas magnetizado en la región de bajas temperaturas. En cambio, encontramos que el l\'imite de baja temperatura solo es aplicable para campos magnéticos fuertes. Las limitantes halladas en ambas aproximaciones con respecto al c\'alculo relativista a toda temperatura demuestran su importancia, y reafirman la necesidad y relevancia del trabajo llevado a cabo en la presente tesis. \chapter*{Recomendaciones} \addcontentsline{toc}{chapter}{Recomendaciones} Al contar con las ecuaciones de estado para el gas de bosones vectoriales neutros a toda temperatura, podemos darle continuidad a los estudios previos de las estrellas de bosones y obtener las modificaciones que sufren los observables a consecuencia de la temperatura, así como investigar otros fenómenos relacionados con esta, como el enfriamiento de la estrella y diferentes tipos de emisión. \section*{Agradecimientos} \vfill \begin{quote} \begin{flushright} \textit{Dedicatoria aquí} \end{flushright} \end{quote} \vfill \cleardoublepage \pagestyle{plain} \chapter*{Introducción} \label{intro} \addcontentsline{toc}{chapter}{Introducción} Uno de los problemas más desafiantes de la física moderna consiste en el estudio de la materia en condiciones extremas -densidades supranucleares y campos magnéticos fuertes-, y la determinación de las ecuaciones de estado (EdE) asociadas a ella \cite{weber2017pulsars}. La interacción fuerte, que es la dominante a densidades nucleares o superiores, se explica actualmente a través de la cromodinámica cuántica (QCD por sus siglas en inglés de \textit{Quantum Chromodynamics}). Esta teoría tiene la limitante de que no permite usar m\'etodos perturbativos para la descripci\'on de hadrones con masas menores que $2$ GeV \cite{buballa2005njl}. Desde el punto de vista experimental, el problema tambi\'en es complejo, debido a que todavía no se ha logrado obtener materia a densidades mayores que la densidad de saturación nuclear $\rho_N\simeq2.4\times10^{14}g/cm^3$. Por otra parte, se sabe que existen configuraciones estelares estables que contienen materia en una de las formas m\'as densas que se puede encontrar en el Universo. De modo que, hoy en día, los entornos astrofísicos son unos de los mejores escenarios para investigar las propiedades de la materia superdensa. En particular, las estrellas de neutrones (ENs) son excelentes laboratorios naturales, pues son objetos con tiempo de vida prácticamente infinito, cuyas densidades pueden llegar a ser de hasta un orden de magnitud mayor que las de los núcleos atómicos\cite{weber2017pulsars}. La idea de una estrella compuesta esencialmente por neutrones fue desarrollada en 1934 por los astrónomos Baade y Zwicky, a solo dos a\~{n}os del descubrimiento del neutr\'on \cite{weber2017pulsars}. Siguiendo esa propuesta, Tolman, Oppenheimer y Volkoff llevaron a cabo los primeros cálculos teóricos de la estructura macrosc\'opica de estas estrellas \cite{oppenheimer1939massive}. Sin embargo, tuvieron que pasar más de 30 años hasta que, en 1967, la estudiante de doctorado Jocelyn Bell, analizando observaciones en ondas de radio, descubriera en el cielo una serie de pulsos coherentes con un período corto y muy regular, asociados a una fuente puntual, a la que se denominó “pulsar”(\textit{pulsating star}) y que apenas un año después fue identificada como una estrella de neutrones altamente magnetizada en rotaci\'on \cite{weber2017pulsars}. En la actualidad, más de 1500 púlsares han sido detectados solamente en nuestra galaxia \cite{Camenzind}. Las ENs tienen masas del orden de $M\sim1.5 M_{\odot}$\footnote{$M_{\odot}=1.989\times10^{30}$kg es la masa del Sol.}, radios de $R\sim10$ km, densidad de masa bari\'onica $\rho\sim10^7-10^{15}g/cm^{3}$, temperaturas $T\sim10^5-10^{11}$ K, y campos magnéticos que alcanzan valores entre $10^9-10^{15}$G en su superficie y hasta $10^{18}$G en su interior \cite{lattimer2007neutron}. Su estructura interna se divide en capas. De afuera hacia adentro encontramos \textit{la atmósfera} de unos centímetros de espesor; \textit{la envoltura} que es una capa de alrededor de unos cientos de metros, con densidades que varían entre $10^4g/cm^{3}<\rho<10^6g/cm^{3}$ y materia compuesta por n\'ucleos atómicos y electrones no relativistas; \textit{la corteza}, con aproximadamente 1km de grosor, que se separa en exterior e interior; y el núcleo. En la \textit{corteza externa}, a densidades tales que $ 7\times 10^6 g/cm^3<\rho<4.3\times 10^{11} g/cm^3$, los electrones se vuelven relativistas, mientras que los n\'ucleos at\'omicos (metales m\'as ligeros), forman una red s\'olida. En la \textit{corteza interna}, las densidades oscilan entre $4.3\times10^{11} g/cm^3$ y $2\times10^{14}g/cm^3$ aproximadamente y los electrones comienzan a penetrar en el n\'ucleo at\'omico produciendo el decaimiento-$\beta$ inverso. A medida que el número de neutrones aumenta en los núcleos atómicos, estos se vuelven más densos y llega un punto ($\rho\sim4.3\times10^{11} g/cm^3$) en el que los neutrones comienzan a brotar fuera el núcleo en lo que se conoce como el goteo de neutrones \cite{Camenzind}. El núcleo de la estrella ocupa el $90\%$ de su volumen y contiene la mayoría de su masa, pudiendo alcanzarse en él densidades superiores a $\rho_N$. A pesar de que las ENs han sido ampliamente estudiadas todavía no existe un consenso en cuanto a la materia que forma su núcleo. Esto se debe a la imposibilidad de realizar experimentos a densidades supranucleares que descarten o corroboren los diferentes modelos te\'oricos propuestos, y a que las observaciones aún no son concluyentes. El punto de partida en la descripci\'on te\'orica de las ENs es siempre el estudio termodinámico de la materia que la compone, ya que a partir de este se obtienen las ecuaciones de estado que se utilizan en el cálculo de sus observables macroscópicos (masa, radio, campo magnético, momento de inercia, momento cuadrupolar de masa, período de rotación, etc.). Por ello resulta en extremo importante que dichos estudios sean lo más realistas y completos posible. Todo modelo teórico de las ENs parte de suponer el n\'ucleo compuesto por un gas de neutrones, protones y electrones con una peque\~{n}a fracci\'on de muones \cite{Camenzind}. Sin embargo, a densidades mayores que la densidad nuclear, los momentos de Fermi de los nucleones son tan altos que pueden ocurrir reacciones de creación de otras part\'iculas como hiperones o mesones\cite{weber2017pulsars,baldo2003neutron}, o surgir fases ex\'oticas de la materia como el plasma de quarks y gluones, el superfluido de nucleones o las fases superconductoras de color \cite{weber2017pulsars,baldo2003neutron,chavanis2012bose,quintero2017anisotropic,latifah2014bosons}. Una de las hip\'otesis m\'as populares en la modelaci\'on del n\'ucleo de las ENs, es aquella que considera que en \'el los protones y neutrones se encuentran apareados \cite{chavanis2012bose,latifah2014bosons,quintero2019self}. En dependencia de la fortaleza de atracción entre los fermiones, los pares pueden comportarse como pares de Cooper (fermiones débilmente ligados) o bosones efectivos (fermiones fuertemente ligados) \cite{sedrakian2006nuclear,gusakov2004enhanced,lombardo2005superfluid}. Aunque los modelos derivados de estos dos casos, a saber, los de estrellas de neutrones con interior superfluido y los de estrellas de bosones, datan de más de cincuenta años, ellos han vuelto a tomar auge en la última década \cite{chavanis2012bose,latifah2014bosons,chamel2017superfluidity,sedrakian2019superfluidity,pethick2015bose}. Esto último gracias a los excelentes resultados obtenidos al ajustar la curva de enfriamiento del objeto compacto que se encuentra en el centro de Cassiopea A con un modelo de EN con interior superfluido \cite{shternin2011cooling}, y a la demostración experimental de que la superfluidez y la condensación de Bose-Eisntein (CBE) son los estados extremos del fenómeno de apareamiento de fermiones \cite{sun2010relativistic,sedrakian2006nuclear,astrakharchik2005momentum,leggett2012bec}. Recientemente, en el grupo de investigaci\'on al que se adscribe esta tesis, varios estudios han sido dedicados a este tipo de modelo para el n\'ucleo de las ENs formadas por neutrones apareados que se comportan como bosones efectivos \cite{angulo2017thermodynamic,quintero2017anisotropic,quintero2019self}. En particular, referidos a los efectos de los altos campos magn\'eticos de estas estrellas en sus propiedades macrosc\'opicas y microsc\'opicas, y a la b\'usqueda de mecanismos que expliquen la generaci\'on de los mismos. Incluir al campo magn\'etico en la modelaci\'on de las ENs es un paso crucial en el camino hacia modelos cada vez m\'as realistas, pues estas estrellas son objetos fuertemente magnetizados, y se ha demostrado que las propiedades magnéticas de las partículas que las componen tienen una influencia importante en su fenomenología y estructura \cite{alvear2019anisotropic,terrero2019modeling,perez2019modeling,quintero2019self}. En el caso de las estrellas de bosones estudiadas en \cite{tesisgretel} el campo magn\'etico cobra gran importancia porque a las densidades t\'ipicas del núcleo de estos objetos, los pares de neutrones que se forman son vectoriales \cite{sedrakian2019superfluidity,baldo19983,tamagaki1970superfluid}. Por otra parte, la presencia del campo magn\'etico enriquece much\'isimo la fenomenolog\'ia de los gases bos\'onicos de spin uno. En el caso de bosones vectoriales cargados, la cuantizaci\'on del momento perpendicular de las part\'iculas en niveles de Landau induce un cambio en la naturaleza de la transici\'on de fase al condensado, que deviene difusa, es decir, no ocurre a una temperatura crítica definida sino que lo hace gradualmente en un intervalo de temperatura \cite{ROJAS1996148, Khalilov1997,Khalilov1999,PEREZROJAS2000,Rojas1996BoseEinsteinCM}. Por el contrario, en el caso de gases magnetizados de bosones vectoriales neutros la transición de fase al condensado es normal y se ve favorecida por la presencia del campo magn\'etico \cite{tesisgretel,angulo2017thermodynamic}. Pero ya sea el gas cargado o neutro, los gases bos\'onicos de spin uno presentan una interesante propiedad conocida como ferromagnetismo de Bose-Einstein, que consiste en la aparición de una magnetizaci\'on espontánea a $B=0$, un fenómeno que podría estar conectado con el origen de los campos magnéticos estelares \cite{angulo2017thermodynamic,yamada1982thermal,Rojas1996BoseEinsteinCM,PEREZROJAS2000}. En los trabajos previos sobre el gas magnetizado de bosones vectoriales neutros\footnote{Bosones vectoriales neutros pueden ser mesones, átomos, y otros pares de fermiones con carga neta cero y spin uno.} y los modelos de estrellas asociados a ellos, llevados a cabo en nuestro grupo de investigaci\'on, la descripci\'on termodinámica de este sistema de part\'iculas fue hecha en el l\'imite de baja temperatura ($T<<m$). Como veremos en la tesis, el límite de baja temperatura es equivalente a hacer una aproximación de campo magnético fuerte, que al aplicarse a pares de bosones compuestos por dos neutrones requerir\'ia el uso de campos a partir de $B\sim 10^{19}$G, un orden por encima que los campos magn\'eticos m\'as intensos esperados en el interior de las ENs. De ah\'i que extender a toda temperatura los estudios termodinámicos previos del gas de bosones vectoriales neutros (GBVN) \cite{tesisgretel} implicar\'ia adem\'as obtener expresiones exactas en la regi\'on de campo magn\'etico d\'ebil. Este fue el propósito inicial de la tesis, sin embargo, a medida que avanzamos en los cálculos nos dimos cuenta de que ir más allá del límite $T<<m$ no solo permite obtener expresiones más generales y realistas para las EdE en esa regi\'on de temperatura, sino también estudiar la f\'isica de la regi\'on de alta temperatura, y en especial, la contribución de las antipartículas, usualmente despreciadas. Si bien es cierto que en el caso de bosones compuestos por dos neutrones temperaturas tales que $T\gtrsim m$ ($T\gtrsim 10^{13}$K) no son realistas (son demasiado altas tanto para los entornos astrof\'isicos \cite{Camenzind} como para existencia del par\cite{sedrakian2019superfluidity}), la caracterización del GBVN a toda temperatura s\'i podr\'ia ser relevante en el caso de bosones m\'as ligeros, y ser útil en otras ramas de la física, como la física de materia condensada \cite{Simkin_1999}, y la física de colisionadores de iones pesados \cite{ayala1997density,begun2006particle,su2008thermodynamic}. De modo que el estudio realizado en la tesis rebas\'o nuestras pretensiones originales y demostr\'o ser interesante en s\'i mismo. De acuerdo con todo lo anterior, el \textbf{objetivo general de la presente tesis es estudiar las propiedades termodinámicas de un gas magnetizado de bosones vectoriales neutros a toda temperatura}, a fin de proporcionar ecuaciones de estado que permitan descripciones más generales y precisas de los objetos y fenómenos astrofísicos. Para ello nos proponemos los siguientes objetivos específicos: \begin{itemize} \item Obtener una expresión para toda temperatura del potencial termodinámico de un gas magnetizado de bosones vectoriales neutros en el límite no relativista. \item Obtener las ecuaciones de estado de este gas y estudiar sus propiedades termodinámicas. \item A partir de la expresión obtenida en \cite{tesisgretel} para toda temperatura del potencial termodinámico de un gas magnetizado de bosones vectoriales neutros relativistas, obtener las ecuaciones de estado de dicho gas a toda temperatura y estudiar sus propiedades termodinámicas. \item Comparar los resultados obtenidos para el gas relativista de bosones vectoriales neutros a toda temperatura, con los resultados en los límites no relativista y de baja temperatura para determinar los rangos de validez de dichas aproximaciones y sus efectos en el sistema estudiado. \end{itemize} A fin de cumplir los objetivos propuestos, la tesis se divide en tres capítulos, conclusiones, recomendaciones y dos apéndices. En el Capítulo 1 se tratan todos los aspectos preliminares como las unidades y magnitudes físicas utilizadas en la tesis, se discuten las propiedades fundamentales de la condensación de Bose-Einstein y se explica el procedimiento general utilizado en los cálculos termodinámicos a través del caso a $B=0$. El Capítulo 2 se dedica al estudio del gas magnetizado de bosones vectoriales neutros en el l\'imite no relativista, mientras que en el Cap\'itulo 3 se presenta la descripción totalmente relativista de este gas. Los principales resultados y aportes de la tesis se resumen en las conclusiones, mientras que en las recomendaciones se delinean los caminos por los cuales pensamos dar continuidad a la investigación. En el apéndice A se explican los detalles del c\'alculo del calor espec\'ifico en el límite no relativista. El apéndice B recoge algunas cuestiones importantes del cálculo de la susceptibilidad magnética en el caso relativista.
\section{A. Extensive Proof for Section Face alignment} Denote $\mathbf{I}^a_i$ as the transferred image based on landmarks $R_i$. We seek an optimized affine transformation matrix $\mathbf{T}_i^*$ to transfer a face image $\mathbf I$ to $\mathbf{I}^a_i$. It can be proved: \begin{equation} \label{eq:cal_matrix} \begin{aligned} \mathbf{T}_i^* & = \text{argmin}_\mathbf{T} \| \mathbf{T}[ldmks(\mathbf I)] - R_i\|_2 \\ & = \text{argmin}_\mathbf{T} \| \mathbf{T}[ldmks(\mathbf I)] - \mathbf{A}_iR_0 \|_2 \\ & = \text{argmin}_\mathbf{T} \| \mathbf{A}_i^{-1}\mathbf{T}[ldmks(\mathbf I)] - R_0 \|_2 \\ & = \mathbf{A}_i\mathbf{T}_0^* \end{aligned} \end{equation} \section{B. Datasets Details} The number of identities and images of datasets in the benchmark are listed in Table \ref{table:datasets}. \begin{table}[H] \begin{center} \small \begin{tabular}{c|c|c} \hline Datasets & \; \#Identity & \; \#Image \\ \hline CASIA & 10575 & 0.49M \\ [0.5ex] MS-Celeb-1M-v1c & 86,876 & 3.92M \\ LFW & 5,749 & 13,233 \\ CALFW & 5,749 & 12,174 \\ CPLFW & 5,749 & 11,652 \\ AgeDB-30 & 568 & 16,488 \\ MultiPIE & 337 & 0.75M \\ IJB-A & 500 & 25,813 \\ CCW & 6,317 & 41,373 \\ \textit{Reduced MS-Celeb-1M-v1c} & 30,000 & 0.90M \\ \hline \end{tabular} \caption{Face datasets of FAPS benchmark.} \label{table:datasets} \end{center} \end{table} For a fair comparison, we choose datasets with intact face images for the benchmark. CFP-FP is not included due to heavily truncated images. LFW is collected in unconstrained environments with high color jittering and illumination variations. AgeDB-30's primary difficulty lies in the large age gaps and CPLFW has large face pose variations. CALFW demonstrates the age challenge in the wild. MultiPIE is a large multi-view face recognition benchmark. It splits the test data on different yaw angles. We test our model on subsets of $\pm 90^{\circ}, \pm 75^{\circ}, \pm 60^{\circ}$ yaw angles to evaluate the performance in a large pose situation. The protocol from \cite{Zhou2018} are followed, where the last 137 subjects with 13 poses, 20 illuminations and neutral expression are selected for testing. Euler angle distributions of full MS-Celeb-1M-v1c and \textit{Reduced MS-Celeb-1M-v1c} are enforced to be consistent to reduce the gaps between two datasets. We also test the proposed FAPS on IJB-A after training on the large scale dataset MS-Celeb-1M-v1c. Compared with previous datasets, the faces in IJB-A have larger variations and present a more unconstrained scenario. \section{C. Setting Details} Due to the length constraint, we list the some settings here: \begin{itemize} \item During training, the weight decay is set to 0.0005 and the momentum is 0.9. \item All image pixel values are subtracted with the mean 127.5 and divided by 128. \item During training, horizontally flipping with probability 0.5 are used as the data augmentation. \item During searching, the weight decay is set to 0.0015. The statistics of all the Batch Normalization (BN) operations are recalculated once the alignment policy changed. \item Cosine annealing learning rate that decays from 0.1 to 0.00001 is applied as LR-scheduler to smooth the process. \item The momentum is set to 0 to eliminate the impact of the input changes. \item The random seeds are all set to ``1234" during searching and training process. \item During testing, for a straightforward comparison on MultiPIE, no further training or finetuning on the first 200 subjects are conducted. \end{itemize} \section{D. Generalization of the searched policy} We evaluate the performance consistency between ResNet18 and ResNet50. Since searching and training networks differs, it's essential to ensure the generalization of the searched policy. We train ResNet18 on CASIA with the same settings as ResNet50. Table \ref{table:casia_r18} shows the results. Our searched alignment policy outperforms the compared methods at all datasets, much like the results of ResNet50 in Table \ref{table:casia_r50_1}. It reveals that searching with ResNet18 won't introduce a performance gap. \begin{table}[H] \begin{center} \small \begin{tabular}{c|c|c|c|c} \hline Alignment Policy & LFW & AgeDB-30 & CALFW & CPLFW \\ \hline ArcFace (190,-7) & 99.10 & 93.18 & 89.05 & 78.43 \\ MFR (198,-15) & 99.12 & 93.30 & 89.45 & 79.22 \\ \hline \textit{TigthROI} (160,0) & 99.02 & 93.73 & 88.78 & 79.30 \\ \textit{SuperROI} (232,0) & 99.18 & 93.38 & 88.80 & 79.22 \\ \hline FAPS$_C$ (192,4) & \textbf{99.20} & \textbf{94.02} & \textbf{89.47} & \textbf{80.28} \\ \hline \end{tabular} \caption{\normalsize{Verification performance (\%) with different alignment policies on ResNet18.}} \label{table:casia_r18} \end{center} \end{table} \section{Introduction} Face recognition is a long-standing topic in the research community of computer vision. A standard pipeline of the recognition framework consists of four individual steps: locating faces with bounding boxes and fiducial points, aligning face images using a pre-defined template, extracting face representations and representation comparing. The second step, also named as face alignment (in Fig. \ref{fig:align}), serves as deforming face images such that fiducial points are spatially aligned and simplifies the recognition task by normalizing the in-plane rotation, scale and translation variations. However, most recent works \cite{taigman2014deepface,sun2014deep,schroff2015facenet,liu2017sphereface,Deng_2019_CVPR,kang2019attentional} on face recognition focus on designing loss functions and exploring network structures. In contrast, the alignment procedure before model training is less studied. In this paper, we first explore the effects of the alignment templates\cite{Deng_2019_CVPR,zhu2019large,guo2020learning} on face recognition performance. Face features can be divided into two sets depending on the zone where they are located: internal features, including eyes, nose and mouth, and external features, composed by the hair, chin and face outline. The benefits of external information have been observed in some early works \cite{lapedriza2005external,Andrews2010Internal}, but they are rarely discussed in the modern face recognition framework \cite{taigman2014deepface,schroff2015facenet,liu2017sphereface,Deng_2019_CVPR}. Significant differences in the 1v1 results are observed by using templates with different degrees of external features involved, as illustrated in Fig. \ref{fig:intro_1}. An open problem arises: \textit{is there an optimal template such that the produced face region gives the best recognition performance?} Specifically, it remains unknown whether fewer backgrounds or irrelevant textures to face (e.g., hair, forehead) benefit face recognition. Besides, it is unclear whether the optimal template generalizes well across various conditions including the pose, age and illumination. \begin{figure} \centering \includegraphics[width=0.42\textwidth]{fig/fig1.pdf} \caption{\normalsize{Verification results based on different face templates. Models $M_i, i=1,2,3,4$ are trained with samples aligned by templates $T_i, i=1,2,3,4$ respectively. Significant differences between cosine similarities are observed.} } \label{fig:intro_1} \end{figure}{} Instead of manually designing templates, we propose to automate the process of finding the optimal template for recognition. To this end, we decompose differences of templates into \textit{vertical shift} and \textit{crop size}, and construct a well-defined discrete searching space. We call the \textit{vertical shift} and \textit{crop size} pair an alignment policy. The equivalence relation of the alignment policy and the template is described and proved in Section Face Alignment, and illustrated in Fig. \ref{fig:align}. The template searching space is thus projected to the cropping box space spanned by \textit{vertical shift} and \textit{crop size}. A straightforward way to search for the template is using the grid search. However, grid search is inefficient and costly. For example, the total size of searching space in our work is 93 and the grid search for the optimal template on the dataset like CASIA \cite{yi2014learning} is rather time-consuming (costs about \textbf{9102} GPU hours with 8 Tesla V100 GPUs) In this paper, we propose an evolution-based method named Face Alignment Policy Search (FAPS) to efficiently searches for the optimal template. FAPS jointly trains a population of models with evolving templates. Inspired by PBT \cite{jaderberg2017population}, we reuse the partially trained weights to accelerate the searching procedure, as training from scratch on a large-scale dataset is time-consuming. To improve the generality of the partially trained model, we set the upper bound of search space as \textit{SuperROI} such that the models have the knowledge of all the facial parts and can concentrate on the more informational area. The original \textit{explore} in PBT mainly considers perturbing the hyperparameter from a better-performing population or resampling new hyperparameter from originally defined distribution, while ignores the relations among different templates in our problem. To accelerate the discovering of better \textit{crop size} and \textit{vertical shift}, we propose \textit{Intersection based Crossover} to combine the strength of well-performing templates (Fig. \ref{fig:crossover}). Until now, searching for alignment in face recognition is less-studied and there exists no common protocol for evaluation, thus we introduce a well-designed benchmark(including LFW \cite{huang2008labeled}, AgeDB-30 \cite{moschoglou2017agedb} and MultiPIE \cite{gross2010multi}, \textit{etc.}) to evaluate the searched face crop template. Our main contributions include: (i) To the best of our knowledge, we explore and highlight the effects of alignment templates on face recognition for the first time. (ii) We construct a well-defined searching space by decomposing the template searching into \textit{crop size} and \textit{vertical shift} searching, and propose an efficient method named FAPS for template searching. (iii) A well-designed benchmark is proposed to evaluate the searched policy. Extensive experiments on the proposed benchmark validate the efficacy of FAPS. \section{Background} \noindent \textbf{Face Alignment} is used to align faces to a unified distribution and reduce the geometric variations. The most commonly adopted way is applying a 2D affine transformation to calibrate facial landmarks to predefined 2D \cite{Wang2018,Deng_2019_CVPR,wang2017normface,liu2017sphereface} or 3D templates \cite{Taigman2014, guo2020towards}. Besides the affine transformation, some other works learn non-rigid transformations. For example, ReST \cite{wu2017recursive} introduces a recursive spatial transformer to learn complex transformation. \cite{Zhou2018} use local homography transformations estimated by a rectification network to rectify faces. These methods aim for alignment-free through learning alignment jointly with the recognition network in an end-to-end fashion. Despite their achievements, additional computational cost and loss of identity information limit their usage in real-world applications. Apart from the types of transformation, another critical element of alignment is how to design a proper facial template. Some early works \cite{lapedriza2005external,Andrews2010Internal} have observed performance improvements when including some external face features (\textit{i.e.}, hair, chin and face outline) compared to using internal face features alone (\textit{i.e.}, eyes, nose and mouth). One optimal solution is to apply multi-patches methods \cite{Sun2014,Sun2014a,SunWT14a,LiuDBH15} which process an image via multiple templates and dump them to different recognition models. Although this strategy improves performances, it requires too much additional computational costs and carefully designed ensemble methods. In our work, we compare the performance of a set of templates and aim to find the optimal one for the face recognition task. \noindent \textbf{Hyperparameter Optimization}. As face alignment policy is a hyperparameter for face recognition, our work closely correlates with the hyperparameter optimization\cite{feurer2019hyperparameter} problem which automatically tunes the hyperparameters. An RL-based method called AutoAugment \cite{cubuk2019autoaugment} is proposed to train a controller to search for the best data augmentation policy based on specific datasets and models. Apart from the RL-based methods, evolution-based methods \cite{jaderberg2017population,ho2019population} spring recently. For example, PBT \cite{jaderberg2017population} jointly trains a population of models and searches for their hyperparameters with evolution to improve the models' performances. \textit{Exploit} and \textit{explore} are the two most important strategies of PBT. \textit{Exploit} is responsible for copying better weights and hyperparameters from a well-performing model to the inferior one. \textit{Explore} creates new hyperparameters for the poor-performing model by either resampling new hyperparameters from the originally defined prior distribution or perturbing the copied hyperparameters from a well-performing model. These two strategies make PBT faster and more effective. In this work, inspired by PBT, we develop a novel evolution-based method named FAPS to search for a better face alignment strategy. The \textit{exploit} and \textit{explore} from PBT are also adopted in our method. \section{Methodology} In this section, we first review the face alignment process via 2D affine transformations and demonstrate that template searching can be decomposed into searching \textit{crop size} and \textit{vertical shift}. Then we detail the proposed FAPS. \subsection{Face Alignment}\label{alignment_analysis} We define one alignment template as a composition of landmarks $R_i$ with cropped area $[0, 0, w_b, w_b]$ (a $w_b\times w_b$ rectangle with top left point [0, 0]). In this work, facial landmarks in all templates share the same shape. To be more specific, any $R_i$ can be transformed from one base landmarks $R_0$ by scaling $s_i$ and shifting $x_i, y_i$ over the x, y axis respectively as shown in Fig. \ref{fig:align}. \begin{figure}[htb!] \centering \includegraphics[width=0.48\textwidth]{fig/align.pdf} \caption{\normalsize{An overview of the face alignment process. Assuming we have a template with landmarks $R_i$ and cropping rectangle from point (0, 0) to point $(w_b, w_b)$. $R_i$ can be transferred from $R_o$ by scaling $s_i$ and shifting $[x_i, y_i]$, \textit{i.e.,} $ R_i = \mathbf{A}_i R_0 = \left[ \small{\begin{matrix} s_i & -s_i & x_i \\ s_i& s_i & y_i \\ 0 & 0 & 1 \end{matrix}} \right] R_0 $. The source image $\mathbf{I}$ is transferred to $\mathbf{I}_0^a$ and $\mathbf{I}_i^a$ based on landmarks $R_0$ and $R_i$ respectively. We prove that the result $\mathbf{I}_i^{align}$ aligned by the current template is the same as resizing cropped image $\mathbf{I}_0^{crop}$. Therefore, the aligned image from an arbitrary template can be got by cropping and resizing from the same image $\mathbf{I}_0^a$.}} \label{fig:align} \end{figure} One face image $\mathbf I$ is aligned to landmarks $R_i$ by a 2D affine transformation $\mathbf T$. Denote $\mathbf{I}^a_i$ as the transferred image based on landmarks $R_i$. We seek an optimized affine transformation matrix $\mathbf{T}_i^*$ to transfer a face image $\mathbf I$ to $\mathbf{I}^a_i$. It can be proved that $\mathbf{T}_i^*=\mathbf{A}_i\mathbf{T}_0^*$. Then we have $\mathbf{I}^a_i = \mathbf{T}^*[\mathbf I] = \mathbf{A}_i\mathbf{T}_0^*[\mathbf I] = \mathbf{A}_i\mathbf{I}^a_0$, which shows that the transferred image based on landmarks $R_i$ can be achieved by performing transformation $\mathbf{A}_i$ on the $\mathbf{I}^a_0$. The final aligned image is the area $[0, 0, w_b, w_b]$ of transferred image $\mathbf{I}^a_i$, which is given by the following steps: 1) Transfer image $\mathbf I$ to $\mathbf{I}^a_0$ based on the base landmarks $R_0$. 2) Crop the image with area $[x_i, y_i, w_b\cdot s_i, w_b\cdot s_i]$. 3) Resize the area by size $[w_b, w_b]$. Therefore, instead of designing various templates and aligning a face multiple times, we simplify the processes by aligning once by the base template $R_0$ and operating (crop + resize) on the same image $\mathbf{I}^a_0$. In our implementation, landmarks in all templates are placed to be horizontally symmetric, which makes $x_i=0$. Let $m_i=w_b\cdot s_i$, $\delta_i = y_i/s_i$, our target now is to find the optimal $m^*, \delta^*$. We call $\textbf{\textit{p}} = \{m, \delta\}$ an alignment policy and each policy represents a corresponding template. \subsection{Search Space}\label{sec:search_space} To facilitate the search process, we place the base face landmarks $R_0$ to a $300\times 300$ canvas with the mid-point of the nose (red point in Figure \ref{fig:search_space}(a)) at the center. We denote this template as $T_p$. After aligning an image to $R_0$, FAPS searches for the optimal region to simulate the effects of applying different templates. A candidate region is determined by 1) \textit{crop size} $m$ which controls the tightness of cropped face and 2) \textit{vertical shift} $\delta$ which controls the center of cropped area. Some examples are presented in Fig. \ref{fig:search_space}(c). Denote $\mathcal{P}$ as the union of all candidate $\textbf{\textit{p}}$, \textit{i.e.,} the search space. We define the search space as follows: With upper bound $m_{max}$ and $\delta=0$, the selected region is able to cover both internal and external face features (Fig. \ref{fig:search_space}(b)). While with $m_{min}$ and $\delta=0$, only indispensable facial parts (eyes, nose, mouth) are kept as shown in Fig. \ref{fig:search_space}(c). Through the variation of vertical shift $\delta$, some facial features are dropped and some new features are included in the input. When $m$ is set to the smallest scale $m_{min}$, this phenomenon becomes more obvious (Fig. \ref{fig:search_space}(c)). If $\delta$ is set to the maximum value $\delta_{max}$, only the eyebrows are preserved, the forehead is almost omitted. When $\delta$ is set to the minimum value $\delta_{min}$, only the mouth is preserved, the chin is dropped. With such an extreme setting of $\delta$, the importance of different facial areas can be discovered. \\ \begin{figure} \centering {\includegraphics[width=0.35\textwidth]{fig/search_space.png}} \caption{\normalsize{An overview of the search space: (a) The face image is $300\times300$ after aligned with base landmarks $R_0$. The red landmark point is placed in the center of the canvas. (b) The red box ($\{m=m_{max}, \delta=0\}$) shows the upper bound of the search space. (c) The input facial image varies rapidly with different $\delta$ and fixed crop size $m_{min}$. When $\delta$ is 0, indispensable facial parts (eyes, nose, mouth) and half of the forehead and chin are kept. The forehead is almost removed when $\delta=\delta_{max}$. When setting $\delta$ to $\delta_{min}$, the forehead is well-preserved while the chin is dropped.} } \label{fig:search_space} \end{figure} \subsection{Search Strategy}\label{sec:search_strategy} Denote the recognition model as $f$ and its weights as $w$, we represent model trained with images aligned by $\textbf{\textit{p}}$ as $f(w|\textbf{\textit{p}})$. Let $\mathcal{L}_{train}$ and $\text{ACC}_{val}$ be the training loss and validation accuracy, respectively. The process of finding the optimal alignment policy can be formulated as: \begin{align} \textbf{\textit{p}}^* & = \text{argmax}_{\textbf{\textit{p}}\in \mathcal{P}} \text{ACC}_{val}(f(w^*|\textbf{\textit{p}})) \label{eq:simple_format1} \\ \textit{s.t.} & \ w^* = \text{argmin}_w\ \mathcal{L}_{train}\ {f(w|\textbf{\textit{p}})} \label{eq:simple_format2} \end{align} \begin{figure*}[htb!] \centering \includegraphics[width=0.88\textwidth, height=0.30\textwidth]{fig/main_method.pdf} \caption{\normalsize{Overview of the proposed FAPS. {\normalfont We first initialize a fixed population of models with \textit{SuperROI} $\textbf{\textit{p}}_0$. After each epoch, each model's accuracy $v$ on the validation set is calculated. If an under-performing model meets \textit{requirement1}, the \textit{Intersection based Crossover} will be operated on the model. Then a new alignment policy is generated by combining the policies of two well-performing models. If an inferior model meets \textit{requirement2}, \textit{exploit} and \textit{explore} will be performed. To be more specific, model weights are copied by those of a superior model and new alignment policy is generated by disturbing a superior policy.}}} \label{fig:main_method} \end{figure*} To find the optimal solution, the trivial approach like grid search is to traverse all possible $\textbf{\textit{p}}$. In this way, model $f$ needs to be trained $|\mathcal{P}|$ times, which is time-consuming and inefficient. Inspired by Population based Training (PBT)\cite {jaderberg2017population}, we train a fixed population of models with different $\textbf{\textit{p}}$ in parallel. The ``exploit-and-explore" procedure is applied to the worse performing models at a certain interval, where the inferior model clones the weight of better performing model and updates the alignment policy through perturbing this well-performing model's $\textbf{\textit{p}}$. The model can be trained with a new $\textbf{\textit{p}}$ without reinitialized. The total computation is largely reduced to a single optimization process (Fig. \ref{fig:main_method}). \subsubsection{SuperROI} To improve the generality of partial trained model when cloning the weights, we initialize $\textbf{\textit{p}}$ to $\{m_{max}, 0\}$ as shown in Fig. \ref{fig:search_space} (b), $\textit{i.e.}$, an initialized Region of Interest (ROI) containing all internal features (eyes, nose and mouth) and external features (jaw-line, ears, part of the hair, \textit{etc.}). Under this setting, beginning models can have the capacity to handle information from all facial parts. When switching to other policies, the facial region can be a part of the initial one and no new facial parts are introduced. Models only need to learn the trade-offs from current features, \textit{i.e.}, learn to focus on remaining facial parts and ignore removed ones. This process shares the spirit of the supernet in Neural Architecture Search \cite{chen2019detnas,guo2019single,chu2019fairnas}, consequently, we name $\textbf{\textit{p}}_0=\{m_{max}, 0\}$ as \textit{SuperROI}. \subsubsection{Intersection based Crossover}\label{sec:crossover} The original \textit{explore} of PBT either re-samples new hyperparameter directly from the originally defined prior distribution or perturbs the current hyperparameter from a well-behaved population to upgrade the weak-behaved population. The former strategy, which resembles random search \cite{bergstra2012random}, can relieve the problem of local minima but cannot guarantee qualities of sampled hyperparameters. The later strategy is analogous to the mutation in genetic algorithms and has a high probability of finding better hyperparameter. However, it generates new hyperparameter depending on one particular hyperparameter each time instead of hyperparameters of well-behaved populations, which may lead to unstable results. Besides the above hyperparameter generation methods, the common trend of well-behaved ones is not fully utilized. Inspired by crossover in genetic algorithms \cite{spears1993crossover}, we propose \textit{Intersection based Crossover} to facilitate the discovering of better alignment policy $\textbf{\textit{p}}$ during search (Fig. \ref{fig:crossover}). Suppose there exist two well-performing policies $\textbf{\textit{p}}_1=\{m_1, \delta_1\}, \textbf{\textit{p}}_2=\{m_2, \delta_2\}$ and the corresponding facial areas are $A_1, A_2$ respectively. Their intersection area $A_{1,2} = A_1 \cap A_2 $ is highly possible to contain rich facial information that benefits face recognition. Policies generated by trivial crossover ($\{m_1, \delta_2\}$ and $\{m_2, \delta_1\}$) can possibly represent regions that differ a lot from both $A_1, A_2$, which therefore fail to cover the intersection area. Instead, \textit{Intersection based Crossover} finds the policy whose region has the largest similarity with $A_{1,2}$. Denote $A(\textbf{\textit{p}})$ as the face region represented by policy $\textbf{\textit{p}}$ and $\textbf{iou}(A(\textbf{\textit{p}}), A_{1,2}) = \frac{A(\textbf{\textit{p}}) \cap A_{1,2}}{A(\textbf{\textit{p}}) \cup A_{1,2}}$, we update the policy $\textbf{\textit{p}}$ and model weights $w$ by Eq.\ref{eq:iou_3} and Eq.\ref{eq:iou_4}: \begin{equation} \textbf{\textit{p}}^\prime \leftarrow \text{argmax}_{\textbf{\textit{p}}\in \mathcal{P}} \textbf{iou}(A(\textbf{\textit{p}}), A_{1,2}) \label{eq:iou_3} \end{equation} \begin{equation} w^\prime \leftarrow w_{i^*},\ s.t.\ i^* = \text{argmax}_{i \in \{1,2\}}\ \textbf{iou}(A(\textbf{\textit{p}}^\prime), A_i) \label{eq:iou_4} \end{equation} \begin{figure}[htb!] \centering \includegraphics[width=0.38\textwidth]{fig/crossover.pdf} \caption{\normalsize{Illustration of \textit{Intersection based Crossover}. $\textbf{\textit{p}}_1 \text{ and } \textbf{\textit{p}}_2$ are alignment policies of two well-performing populations. Their corresponding regions are $A_1$ and $A_2$, $A_{1,2} = A_1 \cap A_2$ represents the shared area ((red rectangle)). Our \textit{Intersection based Crossover} finds a policy $p^\prime$ which has the largest IOU scores with $A_{1,2}$ (yellow rectangle). As a result, $p^\prime$ inherits the intersection area. The $\textbf{iou}$ function decides whose weight can be cloned to the inferior model. The IOU score of $A_1 \text{ and } A^\prime$ is larger, hence $w_1$ is chosen.}} \label{fig:crossover} \end{figure} \subsection{Implementation} \label{sec:implementation} The alignment template search process is elaborated in Algorithm \ref{alg:A}. The details of the main function are below:\\ \textbf{Step:} In each step, we train the model in one epoch through SGD with ArcFace loss \cite{Deng_2019_CVPR}.\\ \textbf{Eval:} We evaluate the current model on our validation set, the verification rate is calculated as the validation accuracy.\\ \textbf{Ready:} A model is ready to go through the exploit-and-explore or \textit{Intersection based Crossover} process once 1 epoch has elapsed.\\ \textbf{Requirement1:} The model's validation accuracy $v$ is between the bottom $1/4$ and $3/8$ of the population.\\ \textbf{Requirement2:} The model's validation accuracy $v$ is in the bottom $1/4$ of the population.\\ \textbf{Exploit:} Get the weight $w$ and alignment policy $\textbf{\textit{p}}$ of a model that has validation accuracy $v$ in the top $1/4$.\\ \textbf{Explore:} See Algorithm \ref{alg:explore} for the \textit{explore} function. For $m$ and $\delta$, we either perturb the original value or uniformly resample them from all possible values.\\ \textbf{Intersection based Crossover:} We choose two well-performing models $f(w_1|\textbf{\textit{p}}_1)$ and $f(w_2|\textbf{\textit{p}}_2)$ whose validation accuracies are in the top $1/4$ to generate the new alignment policy $\textbf{\textit{p}}^\prime$. If $\textbf{\textit{p}}^\prime$ is already deployed by the current models, an extra \textit{explore} will be applied to $\textbf{\textit{p}}^\prime$. \begin{algorithm}[] \small{ \caption{\small{Face Alignment Policy Search(FAPS).}} \label{alg:A} \begin{algorithmic}[1] \Require{Current policy search space $\mathcal{P}$, \textit{SuperROI} $\textbf{\textit{p}}_0 = \{m_{max}, 0\}$, population size of models $\textit{N}$.} \State \!\!\!\! Initialize $\textit{N}$ models $f(w|\textbf{\textit{p}}_0)$ \\ \textbf{for} {each model $f(w|\textbf{\textit{p}}_0)$ (asynchronously in parallel)} \\ \quad \!\!\! \textbf{while} {not end of training} \\ \quad \!\!\! \quad \!\!\! $w\leftarrow \text{step}(w|\textbf{\textit{p}})\quad $ \!\!\!\!\!\! \Comment{train current model with policy $\textbf{\textit{p}}$} \\ \quad \!\!\! \quad \!\!\! $v\leftarrow {ACC}_{val}(f(w|\textbf{\textit{p}}))$ \Comment{evaluation} \\ \quad \!\!\! \quad \!\!\! \textbf{if} {ready($f, v$)} \textbf{then}\\ \quad \!\!\! \quad \!\!\! \quad \!\!\! check $v$'s performance among all models \\ \quad \!\!\! \quad \!\!\! \quad \!\!\! \textbf{if} {$v$ meets \textit{requirement1} } \textbf{then} \\ \quad \!\!\! \quad \!\!\! \quad \!\!\! \quad \!\!\! generate $w^\prime, \textbf{\textit{p}}^\prime$ via \textit{Intersection based Crossover} \\ \quad \!\!\! \quad \!\!\! \quad \!\!\! \quad \!\!\! \textbf{If} {$\textbf{\textit{p}}^\prime$ doesn't exist currently} \textbf{then} \\ \quad \!\!\! \quad \!\!\! \quad \!\!\! \quad \!\!\! \quad \!\!\! $w, \textbf{\textit{p}} \leftarrow w^\prime, \textbf{\textit{p}}^\prime $ \\ \quad \!\!\! \quad \!\!\! \quad \!\!\! \quad \!\!\! \textbf{else} \\ \quad \!\!\! \quad \!\!\! \quad \!\!\! \quad \!\!\! \quad \!\!\! $w, \textbf{\textit{p}} \leftarrow \textit{explore}(w^\prime, \textbf{\textit{p}}^\prime)$ \\ \quad \!\!\! \quad \!\!\! \quad \!\!\! \textbf{elif} {$v$ meets \textit{requirement2} } \textbf{then} \\ \quad \!\!\! \quad \!\!\! \quad \!\!\! \quad \!\!\! get $w^\prime, \textbf{\textit{p}}^\prime$ through \textit{exploit} \\ \quad \!\!\! \quad \!\!\! \quad \!\!\! \quad \!\!\! $w, \textbf{\textit{p}} \leftarrow \textit{explore}(w^\prime, \textbf{\textit{p}}^\prime) $ \\ \quad \!\!\! \quad \!\!\! \quad \!\!\! update model populations with new $f(w|\textbf{\textit{p}})$ \\ return \textbf{\textit{p}} with highest $v$ among training \end{algorithmic} } \end{algorithm} \begin{algorithm} \small{ \caption{\small{The FAPS explore function. When revising the alignment policy based on the current one, the change value is amplified by magnitude parameters.}} \label{alg:explore} \begin{algorithmic}[1] \Require {current alignment policy $\textbf{\textit{p}}=\{m, \delta\}$, \textit{SuperROI}, magnitude parameters $\textbf{\textit{s}} = \{s_{m}, s_{\delta}\}$} \\ \textbf{for}{ \textit{param} in $\textbf{\textit{p}}$} \\ \quad \!\!\! \textbf{if} {random(0, 1) \textless 0.2} \textbf{then}\\ \quad \!\!\! \quad \!\!\! random sample \textit{param} uniformly from search space \\ \quad \!\!\! \textbf{else} \\ \quad \!\!\! \quad \!\!\! \textit{level} = [0,1,2,3] with probability [0,1, 0.3, 0.3, 0.3] \\ \quad \!\!\! \quad \!\!\! \textbf{if} {random(0,1) \textless 0.5} \textbf{then}\\ \quad \!\!\! \quad \!\!\! \quad \!\!\! $param = param - level \times \textbf{\textit{s}}_{param}$ \\ \quad \!\!\! \quad \!\!\! \textbf{else} \\ \quad \!\!\! \quad \!\!\! \quad \!\!\! $param = param + level \times \textbf{\textit{s}}_{param}$ \\ \quad \!\!\! \quad \!\!\! Clip \textit{param} to stay within \textit{SuperROI} \end{algorithmic} } \end{algorithm} \section{Experiments} \subsection{FAPS Benchmark} \label{sec:faps_benchmark} To evaluate the influence of different alignment templates and the effectiveness of the proposed FAPS, we introduce a well-designed benchmark which includes searching set, training set, validation set and test set. We present our proposed benchmark in Table \ref{table:benchmark}. The scale of the training dataset is an important factor for face recognition. We separately employ CASIA \cite{yi2014learning} and MS-Celeb-1M \cite{guo2016ms} as middle-scale and large-scale training and searching datasets. For CASIA, we use the full dataset as the searching data and training data. For MS-Celeb-1M, we use MS-Celeb-1M-v1c \footnote{\url{http://trillionpairs.deepglint.com/overview}} which remains the completeness of facial images and is highly clean for training. Searching on the MS-Celeb-1M-v1c directly requires too many computational resources. To reduce the searching time, we sample 30000 identities with 30 images per identity from the whole dataset. This subset is named \textit{Reduced MS-Celeb-1M-v1c}. Considering different data distributions and characteristics among datasets of the searching set, we enrich the variety of validation set to ensure the generalization of searched policies. The validation set is designed considering the main challenges of face recognition like age, pose and illumination variations. As a result, we build a validation dataset named Cross Challenge in the Wild (CCW), the images are from three datasets in unconstrained environments: LFW\cite{huang2008labeled}, AgeDB-30\cite{moschoglou2017agedb} and CPLFW \cite{zheng2018cross}. The test set including LFW, AgeDB-30, CALFW \cite{zheng2017cross}, CPLFW, MultiPIE \cite{gross2010multi} and IJB-A \cite{klare2015pushing}. More details of the benchmark are presented in Appendix. \subsection{Experimental Settings} We detect the faces by adopting the s3fd detector \cite{zhang2017s3fd} and localize 68 landmarks via FAN \cite{bulat2017far}. Images are affined according to the predefined $300\times300$ average face template $T_p$ as shown in Fig. \ref{fig:search_space}(a). Faces are cropped and resized with different alignment policies for searching, but with consistent policies for training, validation and testing. The cropped faces are then resized to $112\times112$. The widely used ResNets \cite{he2016deep} with embedding structure \cite{Deng_2019_CVPR} are employed as our recognition networks. The embedding dimension is set to 512. To accelerate the searching process, ResNet18 is adopted as the searching network. ResNet50 is used to train on the training set. ArcFace \cite{Deng_2019_CVPR} is served as the loss function during searching and training. We implement FAPS with PyTorch \cite{paszke2019pytorch} and Ray Tune \cite{moritz2018ray}. During searching, the population size of models $\textit{N}$ is set to 8. The crop size $m_{max} \text{ and } m_{min}$ are set to 232 and 160, respectively. The vertical shift $\delta_{max} \text{ and } \delta_{min}$ are 24 and -32. We set the magnitude parameter of crop size $s_{m}=8$ and the magnitude parameter of vertical shift $s_\delta=4$. Under this setting, we have 93 candidates in the template searching space $\mathcal{P}$. More setting details are shown in Appendix. \begin{table} \begin{center} \small \begin{tabular}{c|c|c} \hline Benchmark & CASIA & MS-Celeb-1M-v1c \\ \hline Searching Set & CASIA & \textit{Reduced MS-Celeb-1M-v1c} \\ \hline Training Set & CASIA & MS-Celeb-1M-v1c \\ \hline \multirow{1}{*}{Validation Set} & CCW & CCW \\ \hline \multirow{5}{*}{Test Set} & LFW & LFW \\ & AgeDB-30 & AgeDB-30 \\ & CPLFW & CPLFW \\ & CALFW & CALFW \\ & MultiPIE & MultiPIE \\ & & IJB-A \\ \hline \end{tabular} \caption{\normalsize{FAPS Benchmark}} \label{table:benchmark} \end{center} \end{table} \subsection{Compared Methods} For comparison, we map the widely-used 5-points template presented in ArcFace \cite{Deng_2019_CVPR} to the predefined $300\times 300$ template $T_p$, which results in policy $\textbf{\textit{p}}=\{190,-7\}$. Another 25-points alignment template utilized by MFR \cite{guo2020learning} and works \cite{zhu2019large,guo2018face} is mapped to $\{198, -15\}$. We call policy $\{m_{min}, 0\} = \{160, 0\}$ the \textit{TightROI} which involves few external face features. \textit{SuperROI} as well as the aforementioned three policies are treated as compared policies. We further compare the proposed FAPS with the spatial-transform based methods ReST \cite{wu2017recursive} and GridFace\cite{Zhou2018}. Fig. \ref{fig:experiment_analysis} shows some aligned faces with different policies. ReST and GridFace coupled alignment with recognition network, they can hardly be mapped into our search space. \subsection{Searching on CASIA}\label{sec:casia_} In this section, CASIA is used as the searching and training sets. The corresponding validation/test sets are presented in Table \ref{table:benchmark}. FAPS's searching process takes \textbf{131} GPU hours with 8 Tesla V100 GPUs. As a comparison, the grid search method with ResNet18 takes about \textbf{9102} GPU hours. With the searched alignment policy, we train the ResNet50 from scratch for 32 epochs. The learning rate is initialized by 0.1 and divided by 10 at epoch 20 and 28. Results are summarized in Table \ref{table:casia_r50_1} and Table \ref{table:ms1m_res2} (results of the baseline will be discussed in Ablation Study). We denote the searched alignment policy FAPS$_C$(192,4). Obviously, FAPS$_C$(192,4) surpasses the compared policies on all test datasets. For example, on LFW, FAPS$_C$(192,4) outperforms all other policies, especially the \textit{TigthROI}. With the same training dataset, FAPS$_C$(192,4) achieves a 0.45\% improvement above ReST. On AgeDB-30 and CALFW, FAPS$_C$(192,4) shows significant improvements over the best results from compared policies by 0.78\% and 1.15\%. As shown in Fig. \ref{fig:experiment_analysis}, FAPS$_C$(192,4) drops more hair than ArcFace's and MFR's but remains more chin. This indicates that hair is not helpful for face recognition with age challenge as people's hairstyles usually change during their lifetime, while the chin and the outline of chin remain unchanged. For profile faces, FAPS$_C$(192,4) gains improvement over other compared policies on CPLFW, MultiPIE $\pm 75^{\circ}$ and MultiPIE $\pm 90^{\circ}$. On the less challenging MultiPIE $\pm 60^{\circ}$, FAPS$_C$(192,4) performs as good as MFR and \textit{TightROI}. These results show FAPS's searched alignment policy gains superiority over handcrafted ones for faces with large pose variations. This mainly because profile faces are aligned to one side of the images (as shown in Fig. \ref{fig:experiment_analysis}). Policies with too small crop sizes (\textit{e.g.}, \textit{TightROI}) filter out useful face features, while large crop sizes (\textit{e.g.}, \textit{SuperROI}) can bring irrelevant features and background noise. In contrast, our FAPS can find a trade-off and therefore can focus on key features. \begin{table} \begin{center} \small \resizebox{\columnwidth}{!}{ \begin{tabular}{c|c|c|c|c|c} \hline Training Set & Method & LFW & AgeDB-30 & CALFW & CPLFW \\ \hline \multirow{6}{*}{CASIA} & ReST & 99.03 & - & - & - \\ \cline{2-6} & ArcFace (190,-7) & 99.43 & 94.42 & 90.92 & 85.15\\ & MFR (198,-15) & 99.43 & 94.47 & 91.15 & 84.75 \\ \cline{2-6} & \textit{TigthROI} (160,0) & 99.17 & 94.23 & 91.15 & 85.07 \\ & \textit{SuperROI} (232,0) & 99.43 & 94.47 & 90.48 & 83.97 \\ \cline{2-6} & baseline (184,4) & 99.45 & 95.03 & 91.07 & \textbf{85.88} \\ & FAPS$_{C}$ (192,4) & \textbf{99.48} & \textbf{95.25} & \textbf{92.07} & 85.43 \\ \hline \hline \multirow{6}{*}{MS1M} & GridFace & 99.70 & - & - & - \\ \cline{2-6} & ArcFace (190,-7) & 99.72 & 98.02 & 95.23 & 87.98 \\ & MFR (198,-15) & 99.77 & 97.78 & 95.47 & 87.28 \\ \cline{2-6} & \textit{TigthROI} (160,0) & 99.73 & 97.95 & 95.47 & 88.13 \\ & \textit{SuperROI} (232,0) & 99.77 & \textbf{98.25} & 95.47 & 88.05 \\ \cline{2-6} & FAPS$_{C}$ (192,4) & 99.78 & 98.10 & \textbf{95.78} & 88.12 \\ & FAPS$_{M}$ (200,4) & \textbf{99.82} & 98.08 & 95.65 & \textbf{88.95} \\ \hline \end{tabular} } \caption{\normalsize{Verification performance (\%) at different alignment policies with ResNet50 backbone. MS1M: MS-Celeb-1M-v1c. FAPS$_{C}$(192,4) and FAPS$_{M}$(200,4) denote the policies searched on CASIA and \emph{Reduced MS-Celeb-1M-v1c}, respectively. }} \label{table:casia_r50_1} \end{center} \end{table} \begin{figure}[htb!] \centering \includegraphics[width=0.44\textwidth]{fig/experiment_analysis.pdf} \caption{\normalsize{Face images aligned with different templates. {\normalfont The first two rows show faces of the same person in CALFW. Faces of the last two rows are from MultiPIE $\pm 90^{\circ}$ subset and MultiPIE $0^{\circ}$ subset respectively, they are the same identity as well.} }} \label{fig:experiment_analysis} \end{figure} \subsection{Searching on MS-Celeb-1M-v1c} \begin{table} \begin{center} \small \begin{tabular}{c|c|c|c|c} \hline Training Set & Method & $\ \pm 90^{\circ}$ \ & $\ \pm 75^{\circ}$ & $\ \pm 60^{\circ}$ \\ \hline \multirow{6}{*}{CASIA} & ArcFace (190,-7) & 89.5 & 97.0 & 99.3 \\ & MFR (198,-15) & 91.2 & 97.7 & \textbf{99.7} \\ \cline{2-5} & \textit{TigthROI} (160,0) & 90.8 & 97.6 & \textbf{99.7} \\ & \textit{SuperROI} (232,0) & 90.7 & 97.1 & 99.3 \\ \cline{2-5} & baseline (184,4) & 90.4 & 97.5 & 99.6 \\ & FAPS$_C$ (192,4) & \textbf{91.7} & \textbf{98.3} & \textbf{99.7} \\ \hline \hline \multirow{6}{*}{MS1M} & GridFace & 75.4 & 94.7 & 99.2 \\ \cline{2-5} & ArcFace (190,-7) & 70.4 & 98.8 & \textbf{100.0} \\ & MFR (198,-15) & 71.9 & 98.9 & \textbf{100.0} \\ \cline{2-5} & \textit{TigthROI} (160,0) & 68.7 & 98.4 & \textbf{100.0} \\ & \textit{SuperROI} (232,0) & 70.7 & 98.0 & 99.9 \\ \cline{2-5} & FAPS$_C$ (192,4) & 74.6 & \textbf{99.0} & \textbf{100.0} \\ & FAPS$_M$ (200,4) & \textbf{76.6} & 98.8 & \textbf{100.0} \\ \hline \end{tabular} \caption{\normalsize{Rank-1 recognition rates (\%) for different poses at different alignment policies on MultiPIE with ResNet50 backbone. FAPS$_{C}$(192,4) and FAPS$_{M}$(200,4) denote the policies searched on CASIA and \emph{Reduced MS-Celeb-1M-v1c}, respectively.}} \label{table:ms1m_res2} \end{center} \end{table} In this section, \textit{reduced MS-Celeb-1M-v1c} is used as the searching data. The searching process takes \textbf{234} GPU hours with 8 Tesla V100 GPUs, while the grid search method takes more than \textbf{4812} GPU hours. After the searching phase, we train ResNet50 for 16 epochs from scratch with the searched alignment policy on the full data, with learning rate initialized as 0.1 and dropped by 10 at the 8th and 14th epochs. Results are showed in Table \ref{table:casia_r50_1}, \ref{table:ms1m_res2}, \ref{table:ms1m_ijba}. When compared with other handcrafted alignment policies, FAPS's searched policy on \textit{Reduced MS-Celeb-1M-v1c} (FAPS$_M$(200,4)) outperforms other policies on almost all datasets. On LFW, FAPS$_M$(200,4) outperforms the human-designed policies by at least 0.05\%. As the performance on LFW is almost saturated around 99.80\%, the improvement is nonnegligible. On CALFW, FAPS$_M$(200,4) outperforms other handcrafted alignment policies by almost 0.2\%. For profile faces, the searched policy FAPS$_M$(200,4) can obviously boost the performance on both CPLFW and MultiPIE $\pm 90^{\circ}$ by 0.82\% and 4.7\%. On the challenging dataset IJB-A, FAPS$_M$(200,4) achieves best verification and identification performance. With the same training data MS1M, our FAPS$_M$(200,4) achieves a 0.12\% improvement above GridFace on LFW. On MultiPIE $\pm 90^{\circ}$, $\pm 75^{\circ}$ and $\pm 60^{\circ}$, FAPS$_M$(200,4) surpasses GridFace by clear margins. On IJB-A, FAPS$_M$(200,4) gains obvious improvement on verification accuracy(3.0\% and 7.3\%) it also shows superiority on identification accuracy. To further verify the generalization of our searched template, we train ResNet50 on MS-Celeb-1M-v1c with the policy FAPS$_C$(192,4) which searched on CASIA. When compared with handcrafted alignment policies, FAPS$_C$(192,4) also gains better performance on almost all the datasets while a little bit inferior to FAPS$_M$(200,4)'s. It shows improvements on LFW, CALFW, MultiPIE $\pm 90^{\circ}$, $\pm 75^{\circ}$ and gains comparable performance on CPLFW and MultiPIE $\pm 60^{\circ}$. On IJB-A, FAPS$_C$(192,4) boosts the verification accuracy with FAR at 0.001 and the Rank-1 accuracy. These results show the generalization of the searched alignment policies of FAPS. Once searched on one dataset, the searched policy can further improve the recognition performance when trained on different datasets. On both CASIA and MS-Celeb-1M-v1c, the searched alignment policies gain better performance. It shows that compared to current human-designed alignment templates, the optimal one can be searched by FAPS to facilitate the face recognition performance. The searched alignment policy can also generalize across different training datasets. Moreover, although the searched alignment policy of MS-Celeb-1M-v1c is different from CASIA's, the input facial area decided by the two searched policies are almost overlapped (IOU 0.92). Almost all chin and part of the forehead are contained for both policies. The results show that adding proper external facial features is beneficial to recognition. \begin{table} \begin{center} \small \resizebox{\columnwidth}{!}{ \begin{tabular}{c|c|c|c|c} \hline Method $\downarrow$ & \multicolumn{2}{|c}{Verification} & \multicolumn{2}{|c}{Identification} \\ Metric $\rightarrow$ & @FAR = 0.01 & @FAR = 0.001 & @Rank-1 & @Rank-5 \\ \hline GridFace & 92.1 $\pm$ 0.8 & 83.9 $\pm$ 1.4 & 92.9 $\pm$ 1.0 & 96.2 $\pm$ 0.5\\ \hline ArcFace (190,-7) & 94.5 $\pm$ 0.6 & 87.1 $\pm$ 1.4 & 93.1 $\pm$ 0.8 & 95.5 $\pm$ 0.4 \\ MFR (198,-15) & 94.7 $\pm$ 0.6 & 88.6 $\pm$ 1.0 & 93.7 $\pm$ 0.7 & 96.0 $\pm$ 0.6 \\ \hline \textit{TigthROI} (160,0) & 93.6 $\pm$ 0.8 & 82.1 $\pm$ 2.8 & 92.4 $\pm$ 0.7 & 95.0 $\pm$ 0.6 \\ \textit{SuperROI} (232,0) & 95.1 $\pm$ 0.7 & 87.4 $\pm$ 1.9 & 93.7 $\pm$ 0.8 & 95.8 $\pm$ 0.5 \\ \hline FAPS$_C$ (192,4) & 94.8 $\pm$ 0.6 & 89.7 $\pm$ 1.4 & 93.8 $\pm$ 0.8 & 95.9 $\pm$ 0.5 \\ FAPS$_M$ (200,4) & \textbf{95.1 $\pm$ 0.6} & \textbf{91.2 $\pm$ 0.6} & \textbf{94.1 $\pm$ 0.7} & \textbf{96.4 $\pm$ 0.4} \\ \hline \end{tabular} } \caption{\normalsize{Results on IJB-A with searched policies FAPS$_C$(192,4) and FAPS$_M$(200,4). The training set is MS-Celeb-1M-v1c.}} \label{table:ms1m_ijba} \end{center} \end{table} \subsection{Ablation Study} \subsubsection{Effectiveness of Intersection based Crossover} \label{sec:ablation_IOU} We first evaluate \textit{Intersection based Crossover}, the method we proposed to facilitate the discovering of better alignment policies. To analyze its impact, we search for the CASIA's alignment policy under the same setting as that in section Searching on CASIA, but without \textit{Intersection based Crossover}. The searched policy without \textit{Intersection based Crossover} is named baseline. The results are summarized in Table \ref{table:casia_r50_1} and \ref{table:ms1m_res2}. The policy FAPS$_C$(192,4) discovered with \textit{Intersection based Crossover} shows better results compared to the baseline at almost all test datasets. Specifically, FAPS$_C$(192,4) outperforms baseline by 1.0\% at CALFW, 1.3\% and 0.8\% at MultiPIE $\pm 90^{\circ}$ and $\pm 75^{\circ}$. At CPLFW, FAPS$_C$(192,4) is slightly inferior to baseline. The reason may be CPLFW has more background noise and occlusion than MultiPIE. The facial area decided by FAPS$_C$(192,4) is a bit larger than baseline's, which means more noise involved. \section{Conclusions} In this paper, we explore the effects of different alignment templates on face recognition and propose a fast and effective alignment policy search method named FAPS. The searched templates via FAPS achieve better recognition performance compared to human-designed ones on multiple test datasets and generalize across different training datasets. Besides, our searched templates reveal that except for the internal facial features like eyes, nose and mouth, external features like chin and jawline are helpful for face recognition. This also sheds some light on the further development of face recognition. \section{Acknowledgments} This work was supported in part by the National Key Research \& Development Program (No. 2020AAA0140002), Chinese National Natural Science Foundation Projects \#61876178, \#61806196, \#61976229.
\section{Introduction}\label{sec:intro} \vspace{-0cm} Future wireless networks are expected to support a new breed of wireless technologies that not only require very high data rates, but also mandate very low communications latency \cite{semiari2019integrated}. Among these emerging services include, but not limited to, factory automation, autonomous vehicular platoon systems, swarm of unmanned aerial vehicles (UAVs), and user interactions via wireless extended reality applications \cite{rappaport2019wireless}. Despite their unique service requirements, these applications are similar in a number of key aspects: 1) they mainly rely on direct device-to-device (D2D) or machine-to-machine (M2M) communications among a group of user equipment (UE), 2) the communication network is formed over \emph{multi-hop} D2D or M2M links, and 3) substantial traffic (e.g., sensing data) must be managed within very short (sub-millisecond) time intervals These unique characteristics motivate leveraging the large available bandwidth at very high-frequency bands, particularly over the terahertz (THz) frequencies (collectively considered as $0.1-10$ THz)\cite{rajatheva2020white, 9145080}. In fact, compared with the frequency bands considered in the fifth-generation (5G) new radio specifications\footnote{In particular, frequency range 1 (sub-6 GHz) and frequency range 2 (sub-100 GHz) millimeter wave (mmWave) bands.}, THz spectrum can offer an order of magnitude larger bandwidth, suitable for managing large sensing information required in autonomous systems. Additionally, deployment of advanced phased arrays (composed of many antenna elements) with very small form-factors is feasible at THz frequencies. This allows UEs to leverage large array processing gains and form highly directional multi-hop links to cope with the large atmospheric absorption at THz frequency bands, achieve extremely high data rates, and extend the communication range to form larger D2D or M2M networks (e.g., UAV swarm or vehicular platoons). However, one of the key challenges for establishing directional links at high-frequency bands is the lack of full or even partial knowledge of the channel state information (CSI) at the transceivers during the initial access \cite{barati2016initial}. Therefore, prior to the actual data transmissions, UEs have to follow a process, known as \emph{beam training}, during which the transceivers direct the antenna array gain toward different directions to find the optimal spatial path that maximizes the received power. As UEs move and the propagation environment changes, the beam training process must be repeated to find the best spatial path and maintain high data rates across the network. Moreover, in multi-hop communications, the overall link performance (e.g., data rate) depends on the performance of all the constituent single-hope links~\cite{1638547}. Hence, for multi-hop THz communications, the beam training process must be completed jointly for multiple links at every transmission block, leading to substantial time overhead. Thus far, substantial work has been done to optimize the beam training process, particularly for communications below 100 GHz \cite{desai2014initial,wang2009beam,xiao2016hierarchical,noh2017multi,hashemi2018efficient,hussain2019second,hur2013millimeter,jeong2015random,alkhateeb2014channel}. The authors in \cite{jeong2015random} propose an exhaustive search beam training, which sequentially tests all possible beam pairs in the angle domain between a base station (BS) and a UE and chooses the precoding/combining codeword that yields maximum received signal power. The main drawback of this approach is that scanning the angular space via sequential search is very time consuming, particularly in THz communications that require very high resolution angular search to achieve the so-called pencil beams. To reduce the beam training time overhead, the hierarchical beam training is developed in \cite{alkhateeb2014channel,noh2017multi,hur2013millimeter,hussain2019second,xiao2016hierarchical,hashemi2018efficient,desai2014initial,wang2009beam}. This technique allows BSs/UEs to scan the angular space with wider beams, and then, narrow down the search space and the beamwidth over multiple training stages. While this approach has been widely adopted to decrease the training time, its performance is highly dependent on the codebook design. In \cite{desai2014initial}, the authors present a fast discovery hierarchical search strategy to decrease the delay of exhaustive search. The authors in \cite{wang2009beam} propose an analog beamforming strategy using a hierarchical scheme for a single-hop transmission scenario. In \cite{xiao2016hierarchical}, an efficient hierarchical codebook is designed by jointly exploiting sub-array and deactivation antenna processing techniques. The work in \cite{alkhateeb2014channel} presents a hierarchical multi-resolution codebook based on hybrid beamforming precoding in a single-UE mmWave system. In \cite{noh2017multi}, the authors introduce a Discrete Fourier Transform (DFT) based multi-level codebook design that yields beam patterns with near-uniform gains at each training level. In \cite{asadi2018fml}, the authors propose an online learning algorithm to solve the problem of beam training in mmWave vehicular systems based on a contextual multi-armed bandit (MAB) method. In \cite{hashemi2018efficient}, an online stochastic optimization problem is solved as a unimodal MAB problem to improve beam training in mmWave networks. In fact, the authors utilize the correlation and unimodality properties to decrease the search space and maximize the received energy. The authors in \cite{hussain2019second} consider a beam-training scheme based on Bayesian MAB to maximize the throughput of the mmWave systems in a single-UE scenario. While the hierarchical beam training schemes developed in \cite{alkhateeb2014channel,noh2017multi,hur2013millimeter,hussain2019second,xiao2016hierarchical,hashemi2018efficient,desai2014initial,wang2009beam}, reduce the time overhead compared to the sequential search, they only focus on single-UE, single-hop communications mainly at mmWave frequency bands. As we will show in this paper, the hierarchical beam training schemes can lead to large beam training overhead and performance degradation when applied directly to multi-hop THz links. In fact, the time overhead of existing hierarchical beam training schemes can scale linearly with the number of UEs, which makes them inefficient for multi-hop THz communications. The main contribution of this paper is a novel hierarchical beam training scheme to reduce the time overhead of the beam training process and enhance the performance for multi-hop THz communication links. To this end, we formulate an optimization problem that aims to maximize the overall spectral efficiency of the multi-hop THz link by finding the optimal number of training levels in hierarchical beam search, jointly for all the constituent single-hop links. In particular, instead of performing the hierarchical search for a pre-defined number of training levels, the proposed scheme dynamically determines the number of training levels for each single-hop link while considering the performance of other links. Hence, the proposed scheme can effectively reduce the beam training overhead and increase the available time for data communication during each transmission block. To solve this problem, we propose a new algorithm that builds on an MAB strategy to efficiently learn the optimal values for the number of search levels during the hierarchical beam training, without requiring prior knowledge about the CSI. The simulation results show that compared with the conventional hierarchical beam training with a fixed number of training levels, the proposed algorithm yields up to 75\% performance gain in terms of spectral efficiency. The rest of the paper is organized as follows. Section II presents the system model. Section III describes the problem formulation based on the proposed hierarchical beam training with dynamic training levels. The proposed algorithm is presented in Section IV. Simulation results are provided in Section V and conclusions are presented in Section VI. \begin{figure}[t!] \centering \centerline{\includegraphics[width=8cm]{./Figures/Model.pdf}}\vspace{-1em} \caption{\small An example of multi-hop THz communication composed of line-of-sight (LOS) and non-LOS (NLOS) D2D/M2M links.}\vspace{-.3cm} \label{model} \end{figure} \section{System Model} Consider a network of $K$ UEs in a set $\mathcal{K}$ that communicate with one another over a multi-hop THz link. Let $u_1\leftrightarrow u_{2}\leftrightarrow \cdots\leftrightarrow u_{K}$ denote the multi-hop THz link where $u_{k}\leftrightarrow u_{k+1}$ represents a single-hop bi-directional THz link between UE $u_k$ to UE $u_{k+1}$. As an example, Fig. \ref{model} shows a two-hop THz communication $u_{1}\leftrightarrow u_{2}\leftrightarrow u_{3}$. We note that more complex structures for the multi-hop network (e.g., mesh or star networks) can be built based on the considered structure, i.e., a connected polytree graph with each node having a maximum degree of two. To form the directional links, each UE $u_k$ is equipped with a uniform linear array composed of $N$ antenna elements. \subsection{Channel model} Given an azimuth steering direction $\psi \in \left[-\frac{\pi}{2}, \frac{\pi}{2}\right]$, the transceiver's response vector of a UE is given by \begin{align} \boldsymbol{a}(\theta) = \left[ 1, e^{-j2\pi \frac{d}{\lambda}\theta}, \cdots, e^{-j2\pi \frac{d}{\lambda}(N -1)\theta}\right]^{T}, \end{align} where $d$ is the antenna spacing, $\lambda$ is the wavelength, and $\theta = \sin(\psi)$. For the channel model at high-frequency bands, it is widely accepted to consider an LOS link or an NLOS link with a single spatial path associated with a cluster of scatterers (as shown in Fig.~\ref{model})\cite{noh2017multi,hussain2019second}. In fact, for an arbitrary single-hop THz link $u_i \leftrightarrow u_{j}$, the multiple-input multiple-output (MIMO) channel matrix can be written as \begin{align}\label{channel} \mathbf{H}_{ij} = \beta \boldsymbol{a}(\theta_i)\boldsymbol{a}^H(\theta_j), \end{align where $\theta_i$ and $\theta_j$ are, respectively, the angle-of-departure (AoD) and the angle-of-arrival (AoA) associated with the spatial path for the link between UEs $u_i$ and $u_j$. In addition, $\beta$ is the small-scale fading channel gain which is modeled as a zero-mean, complex Gaussian random variable with variance $\sigma_{\beta}^2$, i.e., $\beta \sim \mathcal{CN}(0,\sigma_{\beta}^2)$. \subsection{Beam training and data transmissions} We consider the transmission of data frames, each composed of $L$ time slots. Denoting $T_c$ as the channel coherence time and $\tau$ as the duration of each time slot, $L$ is selected such that $L\tau \ll T_c$. At the beginning of each frame, $L'$ time slots are allocated for the beam training between the transmitter and the receiver of a THz link. Hence, $L-L'$ time slots will be assigned for the transmission of data symbols. For an arbitrary link from UE $u_i$ to UE $u_j$, the received signal over the MIMO channel at a given time slot can be represented as \begin{align} r_{j} = \sqrt{p_{j}}\boldsymbol{v}^H \mathbf{H}_{ij}\boldsymbol{w} x + \boldsymbol{v}^H\boldsymbol{n}, \end{align} where $x$ is the transmitted symbol with $\mathbbm{E}\{ |x|^2\}=1$ and $p_{j}$ is the omni-directional received power (i.e., transmit power after impacted by the path loss) at the receiver $j$. The additive white Gaussian noise (AWGN) vector $\boldsymbol{n} \in \mathbbm{C}^{N}$ has a zero mean with $\mathbbm{E}\{\boldsymbol{n} \boldsymbol{n}^H\} = \sigma_{n}^2 \mathbf{I}_{N}$. Moreover, $\boldsymbol{w} \in \mathbbm{C}^{N}$ and $\boldsymbol{v} \in \mathbbm{C}^{N}$ represent, respectively, the beamforming and combining vectors. These vectors are selected from a pre-defined codebook and satisfy $\lVert \boldsymbol{w} \rVert^2= \lVert \boldsymbol{v} \rVert^2 = 1$. With this model, the received signal-to-noise ratio (SNR) is \begin{align}\label{eq:SNR} \gamma_{i,j} = \frac{p_j}{\sigma_n^2}|\boldsymbol{v}^H \mathbf{H}_{ij}\boldsymbol{w}|^2. \end{align} Accordingly, the spectral efficiency of a single-hop link between UEs $u_i$ and $u_j$ is \begin{align} R_{i,j} = \left[1-\mathbbm{P}(\gamma_{i,j} < \gamma_{\text{th}})\right]\left(1-\frac{L'_{i,j}}{L}\right)\log_2(1 + \gamma_{i,j}), \end{align}where $\gamma_{\text{th}}$ denotes the minimum required SNR and $\mathbbm{P}(\gamma_{i,j} < \gamma_{\text{th}})$ represents the outage probability. Next, we describe why the time overhead of beam training in multi-hop THz communications can severely impact the performance and we justify the need for new solutions to optimize the beam training for multi-hop THz links. \section{Multi-Resolution Beam Training With Dynamic Training Levels} Here, we first focus on analyzing the beam training time overhead $L'$ in multi-hop THz networks. As described in Sec.~\ref{sec:intro}, the sequential search will result in a significant time overhead to establish bi-directional THz links. Therefore, in this section, we first briefly overview the hierarchical (also known as multi-resolution) search as a widely adopted beam training scheme and analyze its time overhead for multi-hop THz communications. Then, we propose an optimization problem to maximize the performance of multi-hop THz links by effectively reducing the beam training time overhead. \subsection{Time overhead of hierarchical beam training for multi-hop THz communications}\label{Sec:III.A} The hierarchical beam training is a technique which allows a UE to start the search using codewords with wide beamwidths, and then, fine-tune the search (i.e., narrow down the angular search space and the beamwidth) at each subsequent level throughout the search process. While different multi-resolution codebooks have been proposed in the literature, here, we build our framework based on the phase-shifted DFT codebook introduced in \cite{noh2017multi} due to: 1) efficient DFT-based implementation, and 2) near-uniform antenna gain over the beamwidths. As shown in Fig. \ref{DFT_BF}, the hierarchical beam training process requires $M$ training levels to complete the beam training at a transmitter with $\mathcal{W}^{(m)} = \{\boldsymbol{w}_1^{(m)},\boldsymbol{w}_2^{(m)}, \cdots, \boldsymbol{w}_{q_m}^{(m)}\}$ representing the set of $q_m$ beamforming codewords at the $m$-th level. Using the phase-shifted DFT codebook design, we can construct each codeword as \begin{align}\label{codebook1} \boldsymbol{w}_i^{(m)} = \frac{\sqrt{q_m}}{N} \sum_{k} a_k(\theta_k)e^{j\omega_m k}, \end{align} where $ (i-1)\frac{N}{q_m}+1 \leq k \leq i\frac{N}{q_m}$ and $\theta_k = -1 + \frac{2k-1}{N}$. In addition, $\omega_m$ represents the phase shift added to reduce the antenna gain fluctuations of the codeword over its beamwidth of $\frac{2\pi}{q_m}$. To perform the beam training for a single link, beam search can start at the transmitter while the receiver operates with an omni-directional array gain and provides the index of best codeword to the transmitter over a feedback channel. Then, the transmitter sends training signals using the selected beam training codeword and the beam training can be repeated at the receiver. To implement this process, we use an $s_k$-way decision tree which allows a UE $k$ to only send $s_k$ training signals at each level of the hierarchical search and complete the beam training at $M_k = \log_{s_k}N$ levels. Considering that only one training signal is sent per time slot, the time overhead of beam training for a single-hop link $u_k \leftrightarrow u_{k+1}$ will be \begin{align} L'_{k,k+1} &= s_k M_k + s_{k+1} M_{k+1} \notag \\ &= s_k \log_{s_k}N + s_{k+1} \log_{s_{k+1}}N. \end{align} To establish a multi-hop communications with $K$ THz links, we consider a time-division multiple access (TDMA) hierarchical beam training, i.e., the beam training is performed sequentially across the single-hop links. With this in mind, the time overhead increases with the order $O(Ks\log_{s}N)$, if $s_i = s, \forall i$. For example, for the two-hop link in Fig. \ref{model} with $N=64$, $s=4$, the time overhead of the beam training will be $L' = 48$. To better evaluate this time overhead within the total frame duration, let 5 Km/h be the maximum UE velocity. Then, at 240 GHz carrier frequency and with 120 KHz subcarrier spacing, the total number of time slots within the channel coherence time will be $L=108$. Thus, the beam training overhead for a two-hop THz link will be close to $30\%$ which is significantly large. Here, we note that simultaneous beam training schemes (e.g., in \cite{8648139}) that are designed for cellular downlink transmissions cannot be applied to distributed D2D/M2M networks considered in this work. That is because such schemes require a central node (e.g., a base station) to separate and group UEs in the spatial domain and manage the interference resulting from concurrent beam trainings. Next, we propose a new beam training approach to reduce this substantial delay overhead in multi-hop THz communications. \begin{figure}[t!] \centering \centerline{\includegraphics[width=7cm]{./Figures/DFT_BF_Fig.pdf}}\vspace{-1em} \caption{\small Example of hierarchical beam training process at the transmitter with $M=3$, $q_m \in [8,16,64]$, and $\omega_m = 2.24$. At each stage, the selected codeword is shown in red. The dashed line represents a $45^\circ$AoD.}\vspace{-0.5cm} \label{DFT_BF} \end{figure} \subsection{Problem Formulation} The performance of the multi-hop link $u_1 \leftrightarrow u_{2} \leftrightarrow \cdots \leftrightarrow u_{K}$ depends on the spectral efficiency of the involved single-hop links $u_{k}\leftrightarrow u_{k+1}$, for $1\leq k<K$. More generally, with a decode-and-forward scheme, the overall spectral efficiency of the multi-hop THz link between two arbitrary UEs $u_i,u_j \in \mathcal{K}$, with $1\leq i<K$ and $i< j\leq K$, is\\ $R_{i,j} =$ \begin{align}\label{multihop_rate} \left[\prod_{i\leq k<j}\mathbbm{P}(\gamma_{k,k+1} \!\geq\! \gamma_{\text{th}})\right]\!\!\left(1\!-\! \frac{L'_{i,j}}{L}\right)\!\!\left(\frac{1}{j-i}\right)\log_2(1\!+\!\gamma_{\text{min}}), \end{align} where $L'_{i,j} = \sum_{k}L'_{k,k+1}$, $j-i$ is the number of hops, and $\gamma_{\text{min}} = \min\{ \gamma_{k,k+1}\}$ for $i\leq k < j$. In fact, (8) implies that the link with the smallest SNR, $\gamma_{\text{min}}$, will limit the overall spectral efficiency of the multi-hop communication, irrespective of the beam training and the resulting SNR value at other links \cite{1638547}. Hence, selecting larger $M$ values at other links (with $\gamma_{k,k+1}>\gamma_{\text{min}}$) will only increase the beam training overhead without increasing the overall spectral efficiency $R_{i,j}$ of the multi-hop THz link. Thus, \emph{we can increase the performance of a multi-hop THz link by optimizing the number of search levels $M$ during the hierarchical beam training}. In fact, given $\gamma_{\text{th}}$, we must find the optimal value for the number of levels $1 \leq m^* \leq M$ so as to maximize the spectral efficiency of the multi-hop link. For a single-hop link $u_k\leftrightarrow u_{k+1}$, let $\gamma_{k,k+1}^{(m_k)}$ denote the SNR when beam training is performed up to the $m_k$-th level at the transceivers. This SNR can be calculated by substituting the selected beamforming and combining vectors at the $m_k$-th level in \eqref{eq:SNR}. With this in mind, we aim to find the optimal vector $\boldsymbol{m} = [m_i,m_{i+1},\cdots, m_{j-1}]$ for the multi-hop THz link, such that \begin{subequations} \begin{IEEEeqnarray}{rCl}\label{eq:OPT} \argmax_{ \boldsymbol{m}}\,\,\, &&R_{i,j}\label{eq:OPT:a}\\ \text{s.t.,}\,\,\, &&\gamma_{\text{min}} = \min\left\{\gamma^{(m_k )}_{k,k+1}\right\} ,\,\,\, i \leq k < j,\label{eq:OPT:b}\\ && L'_{i,j} < \Bigl\lfloor \frac{L}{K-1}\Bigr\rfloor(j-i),\label{eq:OPT:c}\\ && m_k \in \{ 1, 2, \cdots, M_k \},\,\,\, i \leq k < j.\label{eq:OPT:d} \end{IEEEeqnarray} \end{subequations} The first constraint in \eqref{eq:OPT:b} shows that $\gamma_{\text{min}}$ is calculated based on the SNR at the selected search levels. Assuming that the total number of time slots is uniformly allocated to each single-hop link, and let $\lfloor . \rfloor$ denote the floor operation, then, the constraint in \eqref{eq:OPT:c} guarantees that the time overhead of beam training is less than the allocated time slots to the THz link with $j-i$ hops. In addition, the feasibility constraint in \eqref{eq:OPT:d} ensures that $m_k$ at the transceivers of the $k-i+1$-th single-hop link does not exceed the number of training levels in the conventional multi-resolution beam training. Next, we develop a new approach to solve the proposed problem for hierarchical beam training with \emph{dynamic training levels}. \section{Proposed Hierarchical Beam Training Algorithm for Multi-Hop THz Communications} Clearly, the objective function in \eqref{eq:OPT:a} is not a monotonic function of $\boldsymbol{m}$, since $\log_2(1+ \gamma_{\text{min}})$ can be an increasing function of $m_k$ parameters, while the pre-log factor, $1- L'_{i,j}/L$, is a decreasing function $m_k$ variables in $\boldsymbol{m}$. To solve the proposed problem in \eqref{eq:OPT:a}-\eqref{eq:OPT:d}, we note that it is very challenging to derive the outage probability as a function of $\boldsymbol{m}$. Moreover, the CSI of the MIMO channel for each link and $\gamma_{\text{min}}$ are not known prior to the beam training phase. Hence, it is not feasible to solve the proposed problem in \eqref{eq:OPT:a}-\eqref{eq:OPT:d} via standard optimization techniques. To this end, we develop a new beam training approach, based on reinforcement learning, to find the optimal $\boldsymbol{m}$ for a multi-hop THz link while considering the joint performance of its constituent single-hop links. \begin{table}[t] \footnotesize \centering \caption \vspace*{-0cm}Proposed Hierarchical Beam Training Algorithm with Dynamic Training Levels }\vspace*{-0.2cm} \begin{tabular}{p{8 cm}} \hline \vspace*{-0em} $\textbf{Inputs:}$\,\,$\mathcal{K}$, $\gamma_{\text{th}}$, $\omega_m$, $\varepsilon_0$, $s_k$, $t=0$. \hspace*{1em} \While{(t $\le$ T)} { $\textbf{Step 1:}$ Optimize the number of training levels using the epsilon-decay strategy: a. With probability $1-\varepsilon_t$, select the arm with the current maximum average reward. Otherwise, select an arm $\boldsymbol{l}^t \in \mathcal{L}$ randomly. Then, increase $t$ to $t+1$. b. Update the value of $\varepsilon_t$ using $\varepsilon_t$ = $\varepsilon_{t-1}(1000/(1000+t))$. $\textbf{Step 2:}$ a. Using the selected arm, follow the hierarchical beam training described in Section III. b. Calculate the reward from (8) and update the average reward for the selected arm. } $\textbf {Output:}$ The arm with maximum average reward.\\ \hline \end{tabular}\label{algo1}\vspace{-0.5cm} \end{table} In fact, we can formulate the optimization problem in \eqref{eq:OPT:a}-\eqref{eq:OPT:d} as an MAB problem, in which the transceivers of the multi-hop link (acting as the agents) explore different choices for a vector $\boldsymbol{l}$ (analogous to an arm in an MAB problem) with the $k$-th element being $l_k=M_k-m_k=\log_{s_k}N-m_k$ for $i\leq k<j$. Here, the integer variable $l_k$ ($0\leq l_k<M_k$) represents the number of reduced search levels for beam training at the transmitter and receiver of the link $k$. After playing an arm $\boldsymbol{l}$ from a set of all possible arms $\mathcal{L}$, the UEs of the multi-hop link will receive a random reward $P_{i,j}(\boldsymbol{l})$ which is equal to the spectral efficiency in \eqref{multihop_rate}. To determine the size of the set $\mathcal{L}$, we note that each $l_k$ can take $M_k$ integer values from $0$ to $M_{k}-1$. Therefore, for the multi-hop link $u_1\leftrightarrow u_{2}\leftrightarrow \cdots\leftrightarrow u_{K}$, the total number of arms will be equal to $\Pi_{k=1}^{K-1}M_k$. The key advantage of the MAB-based solution is that it enables the transceivers across the multi-hop THz link to jointly find the optimal solution for \eqref{eq:OPT:a}-\eqref{eq:OPT:d}, in presence of stochastic noise and channel variations. The transceivers of the multi-hop link can try only one arm $\boldsymbol{l} \in \mathcal{L}$ at each trial (i.e., block transmission of $L$ time slots). Within this MAB framework, we define the regret $\zeta(T)$ after $T$ trial as \begin{align} \zeta(T) = \sum_{t=1}^T P_{i,j}(\boldsymbol{l}^*)-P_{i,j}(\boldsymbol{l}^t), \end{align} where $\boldsymbol{l}^*$ is the optimal arm with elements $l_k^*=M_k-m_k^*$ where $m_k, i\leq k<j$ is the solution of the proposed problem in \eqref{eq:OPT}-\eqref{eq:OPT:d} and $\boldsymbol{l}^t$ is the played arm at round $t$ with an associated reward $P_{i,j}(\boldsymbol{l}^t)$. The objective is to find a strategy that selects $\boldsymbol{l}^t$, for $1\leq t\leq T$, such that $\lim_{T \rightarrow \infty}\zeta(T)=0$. Clearly, such strategy will converge to the solution of the proposed problem in \eqref{eq:OPT:a}-\eqref{eq:OPT:d}. The proposed algorithm is summarized in Table~\ref{algo1} which builds on the epsilon-decay strategy to solve the MAB problem. The reason for employing the epsilon-decay strategy is that it can properly maintain the tradeoff between exploration versus exploitation during the learning process, particularly if the size of the set $\mathcal{L}$ is not too large. With this in mind, for a given set of input parameters, the proposed algorithm follows a two-step process during each trial (i.e., a transmission block of $L$ time slots). In Step 1 of an arbitrary trial $t$, the transceivers of the multi-hop link select an arm $\boldsymbol{l}^t \in \mathcal{L}$ based on the epsilon-decay strategy. That is, the algorithm chooses a random arm with probability $\varepsilon_t$ or selects the arm with the highest current average reward with probability $1-\varepsilon_t$. Once an arm is selected, the transceivers follow the hierarchical beam search according to the selected arm. That is, the transceivers of the $k$-th single-hop link will follow the beam training process explained in Sec. III for up to $m_k=M_k - l_k$ training levels. After receiving the instantaneous reward in (8) for the $t$-th trial, the average reward for the selected arm will be updated and the process is repeated until up to $T$ arms are played. The output of the algorithm will be the arm $\boldsymbol{l}^*$ with the maximum average reward. \section{Simulation Results} \begin{table}[t!] \footnotesize \centering \caption{\vspace*{-0cm} Simulation Parameters}\vspace*{-0.2cm} \begin{tabular}{|>{\centering\arraybackslash}m{0.9cm}|>{\centering\arraybackslash}m{3.7cm}|>{\centering\arraybackslash}m{2.5cm}|} \hline \bf{Notation} & \bf{Parameter} & \bf{Value} \\ \hline $f_c$ & Carrier frequency & $240$ GHz\\ \hline $N$ & Number of antennas & $64$ \\ \hline $s_k$ & Number of training signals & $4$ \\ \hline $\omega_m$ & Phase shift parameter of the DFT-based codebook & $2.24$ {rad/s}\\ \hline $v$ & UE maximum speed & $5$ km/h \\ \hline $\sigma_{\beta}$ & Channel gain standard deviation & $1$\\ \hline -- & Subcarrier spacing & $120$ kHz \cite{xing2018propagation} \\ \hline $\gamma_{\text{th}}$ & Minimum required SNR & $-50$ dB \\ \hline $N_0$ & Noise power spectral density & $-204$ dBm/Hz\cite{ekti2017statistical} \\ \hline -- & Path loss exponent & $2.02$ dB \cite{xing2018propagation} \\ \hline \textit{B} & Total system bandwidth & 4 GHz \cite{ekti2017statistical} \\ \hline \end{tabular}\label{tabsim1}\vspace{-0.5cm} \end{table} In this section, we present the simulation results and show the performance of the proposed algorithm in terms of its convergence, the statistics of the achievable spectral efficiency, and the probability of miss detection at the receivers of the multi-hop THz link. For simulations, we consider three UEs communicating with one another over a two-hop THz link, as shown in Fig.~\ref{model}. The distances between UEs 1 and 2 and UEs 2 and 3 are, respectively, 30 m and 5 m. The received SNR in \eqref{eq:SNR} is calculated at the output of the matched filter where the length of the filter is calculated based on sampling the training signal at the Nyquist rate. Both links have the same transmit SNR, ranging from 20 dB to 60 dB. Simulation parameters are summarized in Table~\ref{tabsim1}. We compare the performance of the proposed beam training with dynamic training levels (labeled as ``Hierarchical, Dynamic'') with two other baseline schemes: 1) The conventional hierarchical beam training described in Sec.~\ref{Sec:III.A} (labeled as ``Hierarchical, Fixed''), and 2) The hierarchical beam training with a random number of training levels (labeled as ``Hierarchical, Random''). The performance was evaluated by averaging the results over sufficiently large Monte Carlo runs. Figure.~\ref{sim:fig1} shows the average regret resulting from the proposed MAB-based algorithm versus the number of trials for different values of the transmit SNR. Here, the average regret is computed by averaging the regret in (12) over large independent runs. From Fig.~\ref{sim:fig1}, we observe that the regret decreases rapidly, showing the fast convergence of the proposed learning approach in presence of channel fading, random AoA/AoD, and the receiver noise. The results show that the proposed beam training algorithm successfully converges to the optimal solution within a reasonably small number of trials. As an example, for 40 dB transmit SNR, the average regret will be less that $10^{-5}$ after 100 trials. In Fig.~\ref{sim:fig2}, we compare the average spectral efficiency of the two-hop THz link versus the transmit SNR for the proposed approach and the two baseline schemes. Clearly, the spectral efficiency increases with higher transmit SNR values. The results in Fig.~\ref{sim:fig2} also show that the proposed algorithm outperforms the other two schemes, with up to $17\%$ and $75\%$ performance gains compared to, respectively, the ``Hierarchical, Random'' and ``Hierarchical, Fixed'' approaches at 60 dB transmit SNR. \begin{figure}[t!] \centering \centerline{\includegraphics[width=8.2cm]{./Figures/ConvergenceNewLOG1.pdf}}\vspace{-1em} \caption{\small Average regret versus the number of trials.}\vspace{-.3cm} \label{sim:fig1} \end{figure} \begin{figure}[t!] \centering \centerline{\includegraphics[width=8.2cm]{./Figures/DataRate.pdf}}\vspace{-1em} \caption{\small Average spectral efficiency of the two-hop THz link versus the transmit SNR. }\vspace{-.3cm} \label{sim:fig2} \end{figure} \begin{figure}[t!] \centering \centerline{\includegraphics[width=8.2cm]{./Figures/CDF.pdf}}\vspace{-1em} \caption{\small The CDF of spectral efficiency of the two-hop THz link at $50$ dB transmit SNR.}\vspace{-.3cm} \label{sim:fig3} \end{figure} \begin{figure}[t!] \centering \centerline{\includegraphics[width=8.3cm]{./Figures/ProbMissLog.pdf}}\vspace{-1em} \caption{\small Probability of miss detection versus transmit SNR. }\vspace{- .3cm} \label{sim:fig4} \end{figure} Figure.~\ref{sim:fig3} presents the cumulative distribution function (CDF) of the spectral efficiency of the two-hop THz link resulting from the proposed algorithm and the two baseline beam training schemes at 50 dB transmit SNR. The figure indicates that although the ``Hierarchical, Random'' algorithm is more efficient than the ``Hierarchical, Fixed'' scheme, its performance is not comparable to the proposed approach. In fact, the figure shows that the proposed algorithm achieves a spectral efficiency greater than 2 bps/Hz with about 0.9 probability. However, this probability is only $0.5$ for the "Hierarchical, Random" scheme while the "Hierarchical, Fixed" cannot achieve the 2 bps/Hz spectral efficiency. While the proposed scheme can effectively optimize the performance of the multi-hop THz link (as shown in Figs. 3-5), reducing the number of training levels can impact the detection of training signals from noise. In fact, as the proposed scheme reduces the number of training levels, the effective antenna gain can be reduced and the receivers' detectors may not be able to detect the actual training signal from noise particularly at low transmit SNR values. To study this effect, Fig.~\ref{sim:fig4} compares the probability of miss detection of the proposed algorithm with the two other baseline schemes. For the signal detection, we use the Neyman-Pearson detector with a fixed probability of false alarm ($P_{\text{FA}}$) of 0.01. Based on the results in Fig.~\ref{sim:fig4}, the probability of miss detection decreases as we increase the transmit SNR. Moreover, Fig.~\ref{sim:fig4} shows that the performance degradation for the proposed scheme is negligible compared to the ``Hierarchical, Fixed'' scheme. Comparing the results of Figs. 4-6, we observe that the proposed scheme can significantly improve the spectral efficiency of multi-hop THz communications without any major impact on the detection of training signals. \section{Conclusions} In this paper, we have proposed a novel beam training approach, based on reinforcement learning to optimize the performance of multi-hop THz communication links. First, we have shown the substantial time overhead of conventional hierarchical beam training schemes when applied to multi-hop THz communications. Then, to address this challenge, we have introduced a new hierarchical beam training scheme with dynamic training levels to effectively reduce the time overhead of the beam training process and maximize the multi-hop link's performance. To find the optimal number of training levels across the multi-hop link, we have formulated an optimization problem that maximizes the spectral efficiency, while considering the beam training time constraints. To solve the problem with no prior CSI knowledge of the links during the beam training phase, we proposed an MAB-based algorithm that can effectively find the optimal training levels with reasonably fast convergence. The simulation results have shown that the proposed approach can yield up to 75\% and 17\% performance gains in spectral efficiency, compared to, respectively, the hierarchical beam training with a fixed and random number of training levels. \begin{comment} to form highly directional links and extend the communications range. We model the pencil-beam antenna radiation pattern at the SBS via widely-used sectorized model as follows: \begin{align}\label{antenna_gain} G(\theta) = \begin{cases} G_{\text{max}}, & |\theta-\theta_b|<\hat{\theta},\\ G_{\text{min}}, & \text{otherwise}, \end{cases} \end{align} where $G_{\text{max}}$ and $G_{\text{min}}$ represent, respectively, the antenna gain at the main lobe and side lobes. Moreover, $\theta$, $\hat{\theta}$ and $\theta_b$ are, respectively, the azimuth angle $\theta \in [0,2\pi ]$, the beamwidth of the main lobe, and the antenna boresight. The model in \eqref{antenna_gain} can also be adopted for antenna radiation pattern at UEs. As shown in the SBS has a beamforming codebook with $K$ predefined directions that cover the entire angular space. \section{Link Reliability Detection as a Sequential Testing Problem} \end{comment} \begin{comment} \section{Simulation Results} We validate our analytical results by simulating the proposed protocol in a multi-band WLAN. The number of STAs varies from $J=5$ to $50$. The considered network is simulated in MATLAB and the total simulation time extends to $500$ seconds. We consider $\alpha_j\!=\!\alpha, j\in \mathcal{J}$ to simplify the performance analysis. In this case, can be written as: The effect of $\alpha$ and $\beta$ on the network performance will be evaluated subsequently. For $\mu$W communications, we consider the basic access scheme\footnote{Other access schemes such as request-to-send/clear-to-send (RTS/CTS) mechanisms can be applied similarly.} in which the receiving STA will send an acknowledgment (ACK) signal after successfully decoding the sent packet. Hence, $T_s$, $T_c$ and $T_\text{FST}$ are calculated as~follows: \begin{align} &T_s = \Gamma+\text{SIFS}+\text{ACK}+\text{DIFS}+2\delta,\notag\\ &T_c = \Gamma+\text{DIFS}+\delta,\notag\\ &T_{\text{FST}} =\text{SETUP\textunderscore REQ} + \text{SETUP\textunderscore RES}+2\text{ACK}+4\delta, \end{align} where $\Gamma$ is the required time for transmitting PHY header $H_{\text{PHY}}$, MAC header $H_{\text{MAC}}$, and payload $B^{\mu\text{W}}$ of a $\mu$W packet. Moreover, $\delta$ models the propagation delay. $T_\text{FST}$ is calculated based on the FST procedure, as composed of sending FST Setup Request/Response frames, each followed by an ACK signal. Here, we note that FST ACK Request/Response frames are sent over the mmW frequency band, thus, they are not included in the time overhead. All network parameters are summarized in Table~\ref{tabsim}. \end{comment} \begin{comment} Therefore, we can decompose the problem into independent unconstrained optimization problems at each link as follow: \begin{align}\label{eq:OPT2} \!\!\!\!\!\!\argmax_{ l_k}\,\,\, &&f(m_k)\!\!\left(1\!-\! \frac{L'_{k,k+1}(l_k)}{L}\right)\log_2\left(1\!+\!\gamma^{(m_k )}_{k,k+1}\right)\! \end{align} where $m_k = M-l_k = \log_{\hat{m}_k}N-l_k$, and hence, the integer variable $l_k$ ($0\leq l_k <\log_{\hat{m}_k}N$) represents the number of reduced search levels for beam training at the transmitter and receiver of the $k$-th link. If $\hat{m}_k = \hat{m}_{k+1} = \hat{m}$, the time overhead of beam training at the $k$-th link will be $L'_{k,k+1}(l_k) = 2\hat{m}(\log_{\hat{m}}N-l_k)$. Moreover, \begin{align} f(m_k) = \mathbbm{P}\left(\gamma^{(m_k )}_{k,k+1} \geq \max\{\gamma_{\text{min}}, \gamma_{\text{th}}\}\right), \end{align} where $\min\left\{\gamma^{(m_k )}_{k,k+1}\right\}$ \end{comment} \bibliographystyle{IEEEbib} \section{Introduction}\label{sec:intro} \vspace{-0cm} Future wireless networks are expected to support a new breed of wireless technologies that not only require very high data rates, but also mandate very low communications latency \cite{semiari2019integrated}. Among these emerging services include, but not limited to, factory automation, autonomous vehicular platoon systems, swarm of unmanned aerial vehicles (UAVs), and user interactions via wireless extended reality applications \cite{rappaport2019wireless}. Despite their unique service requirements, these applications are similar in a number of key aspects: 1) they mainly rely on direct device-to-device (D2D) or machine-to-machine (M2M) communications among a group of user equipment (UE), 2) the communication network is formed over \emph{multi-hop} D2D or M2M links, and 3) substantial traffic (e.g., sensing data) must be managed within very short (sub-millisecond) time intervals These unique characteristics motivate leveraging the large available bandwidth at very high-frequency bands, particularly over the terahertz (THz) frequencies (collectively considered as $0.1-10$ THz)\cite{rajatheva2020white, 9145080}. In fact, compared with the frequency bands considered in the fifth-generation (5G) new radio specifications\footnote{In particular, frequency range 1 (sub-6 GHz) and frequency range 2 (sub-100 GHz) millimeter wave (mmWave) bands.}, THz spectrum can offer an order of magnitude larger bandwidth, suitable for managing large sensing information required in autonomous systems. Additionally, deployment of advanced phased arrays (composed of many antenna elements) with very small form-factors is feasible at THz frequencies. This allows UEs to leverage large array processing gains and form highly directional multi-hop links to cope with the large atmospheric absorption at THz frequency bands, achieve extremely high data rates, and extend the communication range to form larger D2D or M2M networks (e.g., UAV swarm or vehicular platoons). However, one of the key challenges for establishing directional links at high-frequency bands is the lack of full or even partial knowledge of the channel state information (CSI) at the transceivers during the initial access \cite{barati2016initial}. Therefore, prior to the actual data transmissions, UEs have to follow a process, known as \emph{beam training}, during which the transceivers direct the antenna array gain toward different directions to find the optimal spatial path that maximizes the received power. As UEs move and the propagation environment changes, the beam training process must be repeated to find the best spatial path and maintain high data rates across the network. Moreover, in multi-hop communications, the overall link performance (e.g., data rate) depends on the performance of all the constituent single-hope links~\cite{1638547}. Hence, for multi-hop THz communications, the beam training process must be completed jointly for multiple links at every transmission block, leading to substantial time overhead. Thus far, substantial work has been done to optimize the beam training process, particularly for communications below 100 GHz \cite{desai2014initial,wang2009beam,xiao2016hierarchical,noh2017multi,hashemi2018efficient,hussain2019second,hur2013millimeter,jeong2015random,alkhateeb2014channel}. The authors in \cite{jeong2015random} propose an exhaustive search beam training, which sequentially tests all possible beam pairs in the angle domain between a base station (BS) and a UE and chooses the precoding/combining codeword that yields maximum received signal power. The main drawback of this approach is that scanning the angular space via sequential search is very time consuming, particularly in THz communications that require very high resolution angular search to achieve the so-called pencil beams. To reduce the beam training time overhead, the hierarchical beam training is developed in \cite{alkhateeb2014channel,noh2017multi,hur2013millimeter,hussain2019second,xiao2016hierarchical,hashemi2018efficient,desai2014initial,wang2009beam}. This technique allows BSs/UEs to scan the angular space with wider beams, and then, narrow down the search space and the beamwidth over multiple training stages. While this approach has been widely adopted to decrease the training time, its performance is highly dependent on the codebook design. In \cite{desai2014initial}, the authors present a fast discovery hierarchical search strategy to decrease the delay of exhaustive search. The authors in \cite{wang2009beam} propose an analog beamforming strategy using a hierarchical scheme for a single-hop transmission scenario. In \cite{xiao2016hierarchical}, an efficient hierarchical codebook is designed by jointly exploiting sub-array and deactivation antenna processing techniques. The work in \cite{alkhateeb2014channel} presents a hierarchical multi-resolution codebook based on hybrid beamforming precoding in a single-UE mmWave system. In \cite{noh2017multi}, the authors introduce a Discrete Fourier Transform (DFT) based multi-level codebook design that yields beam patterns with near-uniform gains at each training level. In \cite{asadi2018fml}, the authors propose an online learning algorithm to solve the problem of beam training in mmWave vehicular systems based on a contextual multi-armed bandit (MAB) method. In \cite{hashemi2018efficient}, an online stochastic optimization problem is solved as a unimodal MAB problem to improve beam training in mmWave networks. In fact, the authors utilize the correlation and unimodality properties to decrease the search space and maximize the received energy. The authors in \cite{hussain2019second} consider a beam-training scheme based on Bayesian MAB to maximize the throughput of the mmWave systems in a single-UE scenario. While the hierarchical beam training schemes developed in \cite{alkhateeb2014channel,noh2017multi,hur2013millimeter,hussain2019second,xiao2016hierarchical,hashemi2018efficient,desai2014initial,wang2009beam}, reduce the time overhead compared to the sequential search, they only focus on single-UE, single-hop communications mainly at mmWave frequency bands. As we will show in this paper, the hierarchical beam training schemes can lead to large beam training overhead and performance degradation when applied directly to multi-hop THz links. In fact, the time overhead of existing hierarchical beam training schemes can scale linearly with the number of UEs, which makes them inefficient for multi-hop THz communications. The main contribution of this paper is a novel hierarchical beam training scheme to reduce the time overhead of the beam training process and enhance the performance for multi-hop THz communication links. To this end, we formulate an optimization problem that aims to maximize the overall spectral efficiency of the multi-hop THz link by finding the optimal number of training levels in hierarchical beam search, jointly for all the constituent single-hop links. In particular, instead of performing the hierarchical search for a pre-defined number of training levels, the proposed scheme dynamically determines the number of training levels for each single-hop link while considering the performance of other links. Hence, the proposed scheme can effectively reduce the beam training overhead and increase the available time for data communication during each transmission block. To solve this problem, we propose a new algorithm that builds on an MAB strategy to efficiently learn the optimal values for the number of search levels during the hierarchical beam training, without requiring prior knowledge about the CSI. The simulation results show that compared with the conventional hierarchical beam training with a fixed number of training levels, the proposed algorithm yields up to 75\% performance gain in terms of spectral efficiency. The rest of the paper is organized as follows. Section II presents the system model. Section III describes the problem formulation based on the proposed hierarchical beam training with dynamic training levels. The proposed algorithm is presented in Section IV. Simulation results are provided in Section V and conclusions are presented in Section VI. \begin{figure}[t!] \centering \centerline{\includegraphics[width=8cm]{./Figures/Model.pdf}}\vspace{-1em} \caption{\small An example of multi-hop THz communication composed of line-of-sight (LOS) and non-LOS (NLOS) D2D/M2M links.}\vspace{-.3cm} \label{model} \end{figure} \section{System Model} Consider a network of $K$ UEs in a set $\mathcal{K}$ that communicate with one another over a multi-hop THz link. Let $u_1\leftrightarrow u_{2}\leftrightarrow \cdots\leftrightarrow u_{K}$ denote the multi-hop THz link where $u_{k}\leftrightarrow u_{k+1}$ represents a single-hop bi-directional THz link between UE $u_k$ to UE $u_{k+1}$. As an example, Fig. \ref{model} shows a two-hop THz communication $u_{1}\leftrightarrow u_{2}\leftrightarrow u_{3}$. We note that more complex structures for the multi-hop network (e.g., mesh or star networks) can be built based on the considered structure, i.e., a connected polytree graph with each node having a maximum degree of two. To form the directional links, each UE $u_k$ is equipped with a uniform linear array composed of $N$ antenna elements. \subsection{Channel model} Given an azimuth steering direction $\psi \in \left[-\frac{\pi}{2}, \frac{\pi}{2}\right]$, the transceiver's response vector of a UE is given by \begin{align} \boldsymbol{a}(\theta) = \left[ 1, e^{-j2\pi \frac{d}{\lambda}\theta}, \cdots, e^{-j2\pi \frac{d}{\lambda}(N -1)\theta}\right]^{T}, \end{align} where $d$ is the antenna spacing, $\lambda$ is the wavelength, and $\theta = \sin(\psi)$. For the channel model at high-frequency bands, it is widely accepted to consider an LOS link or an NLOS link with a single spatial path associated with a cluster of scatterers (as shown in Fig.~\ref{model})\cite{noh2017multi,hussain2019second}. In fact, for an arbitrary single-hop THz link $u_i \leftrightarrow u_{j}$, the multiple-input multiple-output (MIMO) channel matrix can be written as \begin{align}\label{channel} \mathbf{H}_{ij} = \beta \boldsymbol{a}(\theta_i)\boldsymbol{a}^H(\theta_j), \end{align where $\theta_i$ and $\theta_j$ are, respectively, the angle-of-departure (AoD) and the angle-of-arrival (AoA) associated with the spatial path for the link between UEs $u_i$ and $u_j$. In addition, $\beta$ is the small-scale fading channel gain which is modeled as a zero-mean, complex Gaussian random variable with variance $\sigma_{\beta}^2$, i.e., $\beta \sim \mathcal{CN}(0,\sigma_{\beta}^2)$. \subsection{Beam training and data transmissions} We consider the transmission of data frames, each composed of $L$ time slots. Denoting $T_c$ as the channel coherence time and $\tau$ as the duration of each time slot, $L$ is selected such that $L\tau \ll T_c$. At the beginning of each frame, $L'$ time slots are allocated for the beam training between the transmitter and the receiver of a THz link. Hence, $L-L'$ time slots will be assigned for the transmission of data symbols. For an arbitrary link from UE $u_i$ to UE $u_j$, the received signal over the MIMO channel at a given time slot can be represented as \begin{align} r_{j} = \sqrt{p_{j}}\boldsymbol{v}^H \mathbf{H}_{ij}\boldsymbol{w} x + \boldsymbol{v}^H\boldsymbol{n}, \end{align} where $x$ is the transmitted symbol with $\mathbbm{E}\{ |x|^2\}=1$ and $p_{j}$ is the omni-directional received power (i.e., transmit power after impacted by the path loss) at the receiver $j$. The additive white Gaussian noise (AWGN) vector $\boldsymbol{n} \in \mathbbm{C}^{N}$ has a zero mean with $\mathbbm{E}\{\boldsymbol{n} \boldsymbol{n}^H\} = \sigma_{n}^2 \mathbf{I}_{N}$. Moreover, $\boldsymbol{w} \in \mathbbm{C}^{N}$ and $\boldsymbol{v} \in \mathbbm{C}^{N}$ represent, respectively, the beamforming and combining vectors. These vectors are selected from a pre-defined codebook and satisfy $\lVert \boldsymbol{w} \rVert^2= \lVert \boldsymbol{v} \rVert^2 = 1$. With this model, the received signal-to-noise ratio (SNR) is \begin{align}\label{eq:SNR} \gamma_{i,j} = \frac{p_j}{\sigma_n^2}|\boldsymbol{v}^H \mathbf{H}_{ij}\boldsymbol{w}|^2. \end{align} Accordingly, the spectral efficiency of a single-hop link between UEs $u_i$ and $u_j$ is \begin{align} R_{i,j} = \left[1-\mathbbm{P}(\gamma_{i,j} < \gamma_{\text{th}})\right]\left(1-\frac{L'_{i,j}}{L}\right)\log_2(1 + \gamma_{i,j}), \end{align}where $\gamma_{\text{th}}$ denotes the minimum required SNR and $\mathbbm{P}(\gamma_{i,j} < \gamma_{\text{th}})$ represents the outage probability. Next, we describe why the time overhead of beam training in multi-hop THz communications can severely impact the performance and we justify the need for new solutions to optimize the beam training for multi-hop THz links. \section{Multi-Resolution Beam Training With Dynamic Training Levels} Here, we first focus on analyzing the beam training time overhead $L'$ in multi-hop THz networks. As described in Sec.~\ref{sec:intro}, the sequential search will result in a significant time overhead to establish bi-directional THz links. Therefore, in this section, we first briefly overview the hierarchical (also known as multi-resolution) search as a widely adopted beam training scheme and analyze its time overhead for multi-hop THz communications. Then, we propose an optimization problem to maximize the performance of multi-hop THz links by effectively reducing the beam training time overhead. \subsection{Time overhead of hierarchical beam training for multi-hop THz communications}\label{Sec:III.A} The hierarchical beam training is a technique which allows a UE to start the search using codewords with wide beamwidths, and then, fine-tune the search (i.e., narrow down the angular search space and the beamwidth) at each subsequent level throughout the search process. While different multi-resolution codebooks have been proposed in the literature, here, we build our framework based on the phase-shifted DFT codebook introduced in \cite{noh2017multi} due to: 1) efficient DFT-based implementation, and 2) near-uniform antenna gain over the beamwidths. As shown in Fig. \ref{DFT_BF}, the hierarchical beam training process requires $M$ training levels to complete the beam training at a transmitter with $\mathcal{W}^{(m)} = \{\boldsymbol{w}_1^{(m)},\boldsymbol{w}_2^{(m)}, \cdots, \boldsymbol{w}_{q_m}^{(m)}\}$ representing the set of $q_m$ beamforming codewords at the $m$-th level. Using the phase-shifted DFT codebook design, we can construct each codeword as \begin{align}\label{codebook1} \boldsymbol{w}_i^{(m)} = \frac{\sqrt{q_m}}{N} \sum_{k} a_k(\theta_k)e^{j\omega_m k}, \end{align} where $ (i-1)\frac{N}{q_m}+1 \leq k \leq i\frac{N}{q_m}$ and $\theta_k = -1 + \frac{2k-1}{N}$. In addition, $\omega_m$ represents the phase shift added to reduce the antenna gain fluctuations of the codeword over its beamwidth of $\frac{2\pi}{q_m}$. To perform the beam training for a single link, beam search can start at the transmitter while the receiver operates with an omni-directional array gain and provides the index of best codeword to the transmitter over a feedback channel. Then, the transmitter sends training signals using the selected beam training codeword and the beam training can be repeated at the receiver. To implement this process, we use an $s_k$-way decision tree which allows a UE $k$ to only send $s_k$ training signals at each level of the hierarchical search and complete the beam training at $M_k = \log_{s_k}N$ levels. Considering that only one training signal is sent per time slot, the time overhead of beam training for a single-hop link $u_k \leftrightarrow u_{k+1}$ will be \begin{align} L'_{k,k+1} &= s_k M_k + s_{k+1} M_{k+1} \notag \\ &= s_k \log_{s_k}N + s_{k+1} \log_{s_{k+1}}N. \end{align} To establish a multi-hop communications with $K$ THz links, we consider a time-division multiple access (TDMA) hierarchical beam training, i.e., the beam training is performed sequentially across the single-hop links. With this in mind, the time overhead increases with the order $O(Ks\log_{s}N)$, if $s_i = s, \forall i$. For example, for the two-hop link in Fig. \ref{model} with $N=64$, $s=4$, the time overhead of the beam training will be $L' = 48$. To better evaluate this time overhead within the total frame duration, let 5 Km/h be the maximum UE velocity. Then, at 240 GHz carrier frequency and with 120 KHz subcarrier spacing, the total number of time slots within the channel coherence time will be $L=108$. Thus, the beam training overhead for a two-hop THz link will be close to $30\%$ which is significantly large. Here, we note that simultaneous beam training schemes (e.g., in \cite{8648139}) that are designed for cellular downlink transmissions cannot be applied to distributed D2D/M2M networks considered in this work. That is because such schemes require a central node (e.g., a base station) to separate and group UEs in the spatial domain and manage the interference resulting from concurrent beam trainings. Next, we propose a new beam training approach to reduce this substantial delay overhead in multi-hop THz communications. \begin{figure}[t!] \centering \centerline{\includegraphics[width=7cm]{./Figures/DFT_BF_Fig.pdf}}\vspace{-1em} \caption{\small Example of hierarchical beam training process at the transmitter with $M=3$, $q_m \in [8,16,64]$, and $\omega_m = 2.24$. At each stage, the selected codeword is shown in red. The dashed line represents a $45^\circ$AoD.}\vspace{-0.5cm} \label{DFT_BF} \end{figure} \subsection{Problem Formulation} The performance of the multi-hop link $u_1 \leftrightarrow u_{2} \leftrightarrow \cdots \leftrightarrow u_{K}$ depends on the spectral efficiency of the involved single-hop links $u_{k}\leftrightarrow u_{k+1}$, for $1\leq k<K$. More generally, with a decode-and-forward scheme, the overall spectral efficiency of the multi-hop THz link between two arbitrary UEs $u_i,u_j \in \mathcal{K}$, with $1\leq i<K$ and $i< j\leq K$, is\\ $R_{i,j} =$ \begin{align}\label{multihop_rate} \left[\prod_{i\leq k<j}\mathbbm{P}(\gamma_{k,k+1} \!\geq\! \gamma_{\text{th}})\right]\!\!\left(1\!-\! \frac{L'_{i,j}}{L}\right)\!\!\left(\frac{1}{j-i}\right)\log_2(1\!+\!\gamma_{\text{min}}), \end{align} where $L'_{i,j} = \sum_{k}L'_{k,k+1}$, $j-i$ is the number of hops, and $\gamma_{\text{min}} = \min\{ \gamma_{k,k+1}\}$ for $i\leq k < j$. In fact, (8) implies that the link with the smallest SNR, $\gamma_{\text{min}}$, will limit the overall spectral efficiency of the multi-hop communication, irrespective of the beam training and the resulting SNR value at other links \cite{1638547}. Hence, selecting larger $M$ values at other links (with $\gamma_{k,k+1}>\gamma_{\text{min}}$) will only increase the beam training overhead without increasing the overall spectral efficiency $R_{i,j}$ of the multi-hop THz link. Thus, \emph{we can increase the performance of a multi-hop THz link by optimizing the number of search levels $M$ during the hierarchical beam training}. In fact, given $\gamma_{\text{th}}$, we must find the optimal value for the number of levels $1 \leq m^* \leq M$ so as to maximize the spectral efficiency of the multi-hop link. For a single-hop link $u_k\leftrightarrow u_{k+1}$, let $\gamma_{k,k+1}^{(m_k)}$ denote the SNR when beam training is performed up to the $m_k$-th level at the transceivers. This SNR can be calculated by substituting the selected beamforming and combining vectors at the $m_k$-th level in \eqref{eq:SNR}. With this in mind, we aim to find the optimal vector $\boldsymbol{m} = [m_i,m_{i+1},\cdots, m_{j-1}]$ for the multi-hop THz link, such that \begin{subequations} \begin{IEEEeqnarray}{rCl}\label{eq:OPT} \argmax_{ \boldsymbol{m}}\,\,\, &&R_{i,j}\label{eq:OPT:a}\\ \text{s.t.,}\,\,\, &&\gamma_{\text{min}} = \min\left\{\gamma^{(m_k )}_{k,k+1}\right\} ,\,\,\, i \leq k < j,\label{eq:OPT:b}\\ && L'_{i,j} < \Bigl\lfloor \frac{L}{K-1}\Bigr\rfloor(j-i),\label{eq:OPT:c}\\ && m_k \in \{ 1, 2, \cdots, M_k \},\,\,\, i \leq k < j.\label{eq:OPT:d} \end{IEEEeqnarray} \end{subequations} The first constraint in \eqref{eq:OPT:b} shows that $\gamma_{\text{min}}$ is calculated based on the SNR at the selected search levels. Assuming that the total number of time slots is uniformly allocated to each single-hop link, and let $\lfloor . \rfloor$ denote the floor operation, then, the constraint in \eqref{eq:OPT:c} guarantees that the time overhead of beam training is less than the allocated time slots to the THz link with $j-i$ hops. In addition, the feasibility constraint in \eqref{eq:OPT:d} ensures that $m_k$ at the transceivers of the $k-i+1$-th single-hop link does not exceed the number of training levels in the conventional multi-resolution beam training. Next, we develop a new approach to solve the proposed problem for hierarchical beam training with \emph{dynamic training levels}. \section{Proposed Hierarchical Beam Training Algorithm for Multi-Hop THz Communications} Clearly, the objective function in \eqref{eq:OPT:a} is not a monotonic function of $\boldsymbol{m}$, since $\log_2(1+ \gamma_{\text{min}})$ can be an increasing function of $m_k$ parameters, while the pre-log factor, $1- L'_{i,j}/L$, is a decreasing function $m_k$ variables in $\boldsymbol{m}$. To solve the proposed problem in \eqref{eq:OPT:a}-\eqref{eq:OPT:d}, we note that it is very challenging to derive the outage probability as a function of $\boldsymbol{m}$. Moreover, the CSI of the MIMO channel for each link and $\gamma_{\text{min}}$ are not known prior to the beam training phase. Hence, it is not feasible to solve the proposed problem in \eqref{eq:OPT:a}-\eqref{eq:OPT:d} via standard optimization techniques. To this end, we develop a new beam training approach, based on reinforcement learning, to find the optimal $\boldsymbol{m}$ for a multi-hop THz link while considering the joint performance of its constituent single-hop links. \begin{table}[t] \footnotesize \centering \caption \vspace*{-0cm}Proposed Hierarchical Beam Training Algorithm with Dynamic Training Levels }\vspace*{-0.2cm} \begin{tabular}{p{8 cm}} \hline \vspace*{-0em} $\textbf{Inputs:}$\,\,$\mathcal{K}$, $\gamma_{\text{th}}$, $\omega_m$, $\varepsilon_0$, $s_k$, $t=0$. \hspace*{1em} \While{(t $\le$ T)} { $\textbf{Step 1:}$ Optimize the number of training levels using the epsilon-decay strategy: a. With probability $1-\varepsilon_t$, select the arm with the current maximum average reward. Otherwise, select an arm $\boldsymbol{l}^t \in \mathcal{L}$ randomly. Then, increase $t$ to $t+1$. b. Update the value of $\varepsilon_t$ using $\varepsilon_t$ = $\varepsilon_{t-1}(1000/(1000+t))$. $\textbf{Step 2:}$ a. Using the selected arm, follow the hierarchical beam training described in Section III. b. Calculate the reward from (8) and update the average reward for the selected arm. } $\textbf {Output:}$ The arm with maximum average reward.\\ \hline \end{tabular}\label{algo1}\vspace{-0.5cm} \end{table} In fact, we can formulate the optimization problem in \eqref{eq:OPT:a}-\eqref{eq:OPT:d} as an MAB problem, in which the transceivers of the multi-hop link (acting as the agents) explore different choices for a vector $\boldsymbol{l}$ (analogous to an arm in an MAB problem) with the $k$-th element being $l_k=M_k-m_k=\log_{s_k}N-m_k$ for $i\leq k<j$. Here, the integer variable $l_k$ ($0\leq l_k<M_k$) represents the number of reduced search levels for beam training at the transmitter and receiver of the link $k$. After playing an arm $\boldsymbol{l}$ from a set of all possible arms $\mathcal{L}$, the UEs of the multi-hop link will receive a random reward $P_{i,j}(\boldsymbol{l})$ which is equal to the spectral efficiency in \eqref{multihop_rate}. To determine the size of the set $\mathcal{L}$, we note that each $l_k$ can take $M_k$ integer values from $0$ to $M_{k}-1$. Therefore, for the multi-hop link $u_1\leftrightarrow u_{2}\leftrightarrow \cdots\leftrightarrow u_{K}$, the total number of arms will be equal to $\Pi_{k=1}^{K-1}M_k$. The key advantage of the MAB-based solution is that it enables the transceivers across the multi-hop THz link to jointly find the optimal solution for \eqref{eq:OPT:a}-\eqref{eq:OPT:d}, in presence of stochastic noise and channel variations. The transceivers of the multi-hop link can try only one arm $\boldsymbol{l} \in \mathcal{L}$ at each trial (i.e., block transmission of $L$ time slots). Within this MAB framework, we define the regret $\zeta(T)$ after $T$ trial as \begin{align} \zeta(T) = \sum_{t=1}^T P_{i,j}(\boldsymbol{l}^*)-P_{i,j}(\boldsymbol{l}^t), \end{align} where $\boldsymbol{l}^*$ is the optimal arm with elements $l_k^*=M_k-m_k^*$ where $m_k, i\leq k<j$ is the solution of the proposed problem in \eqref{eq:OPT}-\eqref{eq:OPT:d} and $\boldsymbol{l}^t$ is the played arm at round $t$ with an associated reward $P_{i,j}(\boldsymbol{l}^t)$. The objective is to find a strategy that selects $\boldsymbol{l}^t$, for $1\leq t\leq T$, such that $\lim_{T \rightarrow \infty}\zeta(T)=0$. Clearly, such strategy will converge to the solution of the proposed problem in \eqref{eq:OPT:a}-\eqref{eq:OPT:d}. The proposed algorithm is summarized in Table~\ref{algo1} which builds on the epsilon-decay strategy to solve the MAB problem. The reason for employing the epsilon-decay strategy is that it can properly maintain the tradeoff between exploration versus exploitation during the learning process, particularly if the size of the set $\mathcal{L}$ is not too large. With this in mind, for a given set of input parameters, the proposed algorithm follows a two-step process during each trial (i.e., a transmission block of $L$ time slots). In Step 1 of an arbitrary trial $t$, the transceivers of the multi-hop link select an arm $\boldsymbol{l}^t \in \mathcal{L}$ based on the epsilon-decay strategy. That is, the algorithm chooses a random arm with probability $\varepsilon_t$ or selects the arm with the highest current average reward with probability $1-\varepsilon_t$. Once an arm is selected, the transceivers follow the hierarchical beam search according to the selected arm. That is, the transceivers of the $k$-th single-hop link will follow the beam training process explained in Sec. III for up to $m_k=M_k - l_k$ training levels. After receiving the instantaneous reward in (8) for the $t$-th trial, the average reward for the selected arm will be updated and the process is repeated until up to $T$ arms are played. The output of the algorithm will be the arm $\boldsymbol{l}^*$ with the maximum average reward. \section{Simulation Results} \begin{table}[t!] \footnotesize \centering \caption{\vspace*{-0cm} Simulation Parameters}\vspace*{-0.2cm} \begin{tabular}{|>{\centering\arraybackslash}m{0.9cm}|>{\centering\arraybackslash}m{3.7cm}|>{\centering\arraybackslash}m{2.5cm}|} \hline \bf{Notation} & \bf{Parameter} & \bf{Value} \\ \hline $f_c$ & Carrier frequency & $240$ GHz\\ \hline $N$ & Number of antennas & $64$ \\ \hline $s_k$ & Number of training signals & $4$ \\ \hline $\omega_m$ & Phase shift parameter of the DFT-based codebook & $2.24$ {rad/s}\\ \hline $v$ & UE maximum speed & $5$ km/h \\ \hline $\sigma_{\beta}$ & Channel gain standard deviation & $1$\\ \hline -- & Subcarrier spacing & $120$ kHz \cite{xing2018propagation} \\ \hline $\gamma_{\text{th}}$ & Minimum required SNR & $-50$ dB \\ \hline $N_0$ & Noise power spectral density & $-204$ dBm/Hz\cite{ekti2017statistical} \\ \hline -- & Path loss exponent & $2.02$ dB \cite{xing2018propagation} \\ \hline \textit{B} & Total system bandwidth & 4 GHz \cite{ekti2017statistical} \\ \hline \end{tabular}\label{tabsim1}\vspace{-0.5cm} \end{table} In this section, we present the simulation results and show the performance of the proposed algorithm in terms of its convergence, the statistics of the achievable spectral efficiency, and the probability of miss detection at the receivers of the multi-hop THz link. For simulations, we consider three UEs communicating with one another over a two-hop THz link, as shown in Fig.~\ref{model}. The distances between UEs 1 and 2 and UEs 2 and 3 are, respectively, 30 m and 5 m. The received SNR in \eqref{eq:SNR} is calculated at the output of the matched filter where the length of the filter is calculated based on sampling the training signal at the Nyquist rate. Both links have the same transmit SNR, ranging from 20 dB to 60 dB. Simulation parameters are summarized in Table~\ref{tabsim1}. We compare the performance of the proposed beam training with dynamic training levels (labeled as ``Hierarchical, Dynamic'') with two other baseline schemes: 1) The conventional hierarchical beam training described in Sec.~\ref{Sec:III.A} (labeled as ``Hierarchical, Fixed''), and 2) The hierarchical beam training with a random number of training levels (labeled as ``Hierarchical, Random''). The performance was evaluated by averaging the results over sufficiently large Monte Carlo runs. Figure.~\ref{sim:fig1} shows the average regret resulting from the proposed MAB-based algorithm versus the number of trials for different values of the transmit SNR. Here, the average regret is computed by averaging the regret in (12) over large independent runs. From Fig.~\ref{sim:fig1}, we observe that the regret decreases rapidly, showing the fast convergence of the proposed learning approach in presence of channel fading, random AoA/AoD, and the receiver noise. The results show that the proposed beam training algorithm successfully converges to the optimal solution within a reasonably small number of trials. As an example, for 40 dB transmit SNR, the average regret will be less that $10^{-5}$ after 100 trials. In Fig.~\ref{sim:fig2}, we compare the average spectral efficiency of the two-hop THz link versus the transmit SNR for the proposed approach and the two baseline schemes. Clearly, the spectral efficiency increases with higher transmit SNR values. The results in Fig.~\ref{sim:fig2} also show that the proposed algorithm outperforms the other two schemes, with up to $17\%$ and $75\%$ performance gains compared to, respectively, the ``Hierarchical, Random'' and ``Hierarchical, Fixed'' approaches at 60 dB transmit SNR. \begin{figure}[t!] \centering \centerline{\includegraphics[width=8.2cm]{./Figures/ConvergenceNewLOG1.pdf}}\vspace{-1em} \caption{\small Average regret versus the number of trials.}\vspace{-.3cm} \label{sim:fig1} \end{figure} \begin{figure}[t!] \centering \centerline{\includegraphics[width=8.2cm]{./Figures/DataRate.pdf}}\vspace{-1em} \caption{\small Average spectral efficiency of the two-hop THz link versus the transmit SNR. }\vspace{-.3cm} \label{sim:fig2} \end{figure} \begin{figure}[t!] \centering \centerline{\includegraphics[width=8.2cm]{./Figures/CDF.pdf}}\vspace{-1em} \caption{\small The CDF of spectral efficiency of the two-hop THz link at $50$ dB transmit SNR.}\vspace{-.3cm} \label{sim:fig3} \end{figure} \begin{figure}[t!] \centering \centerline{\includegraphics[width=8.3cm]{./Figures/ProbMissLog.pdf}}\vspace{-1em} \caption{\small Probability of miss detection versus transmit SNR. }\vspace{- .3cm} \label{sim:fig4} \end{figure} Figure.~\ref{sim:fig3} presents the cumulative distribution function (CDF) of the spectral efficiency of the two-hop THz link resulting from the proposed algorithm and the two baseline beam training schemes at 50 dB transmit SNR. The figure indicates that although the ``Hierarchical, Random'' algorithm is more efficient than the ``Hierarchical, Fixed'' scheme, its performance is not comparable to the proposed approach. In fact, the figure shows that the proposed algorithm achieves a spectral efficiency greater than 2 bps/Hz with about 0.9 probability. However, this probability is only $0.5$ for the "Hierarchical, Random" scheme while the "Hierarchical, Fixed" cannot achieve the 2 bps/Hz spectral efficiency. While the proposed scheme can effectively optimize the performance of the multi-hop THz link (as shown in Figs. 3-5), reducing the number of training levels can impact the detection of training signals from noise. In fact, as the proposed scheme reduces the number of training levels, the effective antenna gain can be reduced and the receivers' detectors may not be able to detect the actual training signal from noise particularly at low transmit SNR values. To study this effect, Fig.~\ref{sim:fig4} compares the probability of miss detection of the proposed algorithm with the two other baseline schemes. For the signal detection, we use the Neyman-Pearson detector with a fixed probability of false alarm ($P_{\text{FA}}$) of 0.01. Based on the results in Fig.~\ref{sim:fig4}, the probability of miss detection decreases as we increase the transmit SNR. Moreover, Fig.~\ref{sim:fig4} shows that the performance degradation for the proposed scheme is negligible compared to the ``Hierarchical, Fixed'' scheme. Comparing the results of Figs. 4-6, we observe that the proposed scheme can significantly improve the spectral efficiency of multi-hop THz communications without any major impact on the detection of training signals. \section{Conclusions} In this paper, we have proposed a novel beam training approach, based on reinforcement learning to optimize the performance of multi-hop THz communication links. First, we have shown the substantial time overhead of conventional hierarchical beam training schemes when applied to multi-hop THz communications. Then, to address this challenge, we have introduced a new hierarchical beam training scheme with dynamic training levels to effectively reduce the time overhead of the beam training process and maximize the multi-hop link's performance. To find the optimal number of training levels across the multi-hop link, we have formulated an optimization problem that maximizes the spectral efficiency, while considering the beam training time constraints. To solve the problem with no prior CSI knowledge of the links during the beam training phase, we proposed an MAB-based algorithm that can effectively find the optimal training levels with reasonably fast convergence. The simulation results have shown that the proposed approach can yield up to 75\% and 17\% performance gains in spectral efficiency, compared to, respectively, the hierarchical beam training with a fixed and random number of training levels. \begin{comment} to form highly directional links and extend the communications range. We model the pencil-beam antenna radiation pattern at the SBS via widely-used sectorized model as follows: \begin{align}\label{antenna_gain} G(\theta) = \begin{cases} G_{\text{max}}, & |\theta-\theta_b|<\hat{\theta},\\ G_{\text{min}}, & \text{otherwise}, \end{cases} \end{align} where $G_{\text{max}}$ and $G_{\text{min}}$ represent, respectively, the antenna gain at the main lobe and side lobes. Moreover, $\theta$, $\hat{\theta}$ and $\theta_b$ are, respectively, the azimuth angle $\theta \in [0,2\pi ]$, the beamwidth of the main lobe, and the antenna boresight. The model in \eqref{antenna_gain} can also be adopted for antenna radiation pattern at UEs. As shown in the SBS has a beamforming codebook with $K$ predefined directions that cover the entire angular space. \section{Link Reliability Detection as a Sequential Testing Problem} \end{comment} \begin{comment} \section{Simulation Results} We validate our analytical results by simulating the proposed protocol in a multi-band WLAN. The number of STAs varies from $J=5$ to $50$. The considered network is simulated in MATLAB and the total simulation time extends to $500$ seconds. We consider $\alpha_j\!=\!\alpha, j\in \mathcal{J}$ to simplify the performance analysis. In this case, can be written as: The effect of $\alpha$ and $\beta$ on the network performance will be evaluated subsequently. For $\mu$W communications, we consider the basic access scheme\footnote{Other access schemes such as request-to-send/clear-to-send (RTS/CTS) mechanisms can be applied similarly.} in which the receiving STA will send an acknowledgment (ACK) signal after successfully decoding the sent packet. Hence, $T_s$, $T_c$ and $T_\text{FST}$ are calculated as~follows: \begin{align} &T_s = \Gamma+\text{SIFS}+\text{ACK}+\text{DIFS}+2\delta,\notag\\ &T_c = \Gamma+\text{DIFS}+\delta,\notag\\ &T_{\text{FST}} =\text{SETUP\textunderscore REQ} + \text{SETUP\textunderscore RES}+2\text{ACK}+4\delta, \end{align} where $\Gamma$ is the required time for transmitting PHY header $H_{\text{PHY}}$, MAC header $H_{\text{MAC}}$, and payload $B^{\mu\text{W}}$ of a $\mu$W packet. Moreover, $\delta$ models the propagation delay. $T_\text{FST}$ is calculated based on the FST procedure, as composed of sending FST Setup Request/Response frames, each followed by an ACK signal. Here, we note that FST ACK Request/Response frames are sent over the mmW frequency band, thus, they are not included in the time overhead. All network parameters are summarized in Table~\ref{tabsim}. \end{comment} \begin{comment} Therefore, we can decompose the problem into independent unconstrained optimization problems at each link as follow: \begin{align}\label{eq:OPT2} \!\!\!\!\!\!\argmax_{ l_k}\,\,\, &&f(m_k)\!\!\left(1\!-\! \frac{L'_{k,k+1}(l_k)}{L}\right)\log_2\left(1\!+\!\gamma^{(m_k )}_{k,k+1}\right)\! \end{align} where $m_k = M-l_k = \log_{\hat{m}_k}N-l_k$, and hence, the integer variable $l_k$ ($0\leq l_k <\log_{\hat{m}_k}N$) represents the number of reduced search levels for beam training at the transmitter and receiver of the $k$-th link. If $\hat{m}_k = \hat{m}_{k+1} = \hat{m}$, the time overhead of beam training at the $k$-th link will be $L'_{k,k+1}(l_k) = 2\hat{m}(\log_{\hat{m}}N-l_k)$. Moreover, \begin{align} f(m_k) = \mathbbm{P}\left(\gamma^{(m_k )}_{k,k+1} \geq \max\{\gamma_{\text{min}}, \gamma_{\text{th}}\}\right), \end{align} where $\min\left\{\gamma^{(m_k )}_{k,k+1}\right\}$ \end{comment} \bibliographystyle{IEEEbib}
\section{Introduction} \label{sec1} Ordinary or partial differential equations (PDEs) are powerful tools to describe many real life engineering and scientific processes. A wide body of numerical methods based on finite differences, finite elements, and boundary elements are available to approximately solve the governing equations for the response quantities of interest. In particular, Finite element method (FEM) has become state-of-the-art since it offers a simple way to solve very high resolution models in various computational physics problems, ranging from structural mechanics, thermodynamics to nano-bio mechanics~\citep{hughes2012finite}. Nevertheless, the FEM is deterministic in nature and is therefore limited to describe the general characteristics of a real life system. The considerable influence of inherent uncertainties on system behavior has led the scientific community to recognize the importance of a stochastic approach to realistic engineering systems~\citep{Dai2015A}. More than ever, the goal becomes to represent and propagate uncertainties from the available data to the desired results through PDEs within the framework of stochastic equations~\citep{najm2009uncertainty, le2010spectral}. The modelling of uncertainties consists in defining a suitable probability space $( {\Theta, \Sigma, \cal{P}} )$, where $\Theta$ denotes the space of elementary events, $\Sigma$ is a $\sigma $-algebra defined on $\Theta$ and $\cal{P}$ is a probability measure. In this paper, we consider the structural stochastic response $u\left( \theta \right)$ of the problem is a stochastic function, with value in a certain function space, which has to verify almost surely the stochastic partial differential equations (SPDEs) discretized by stochastic finite element equations~\citep{Xiu2002The} as \begin{equation} \label{eq:SFEM} K\left( \theta \right)u\left( \theta \right) = F\left( \theta \right) \end{equation} where $K\left( \theta \right)$ is an operator representing properties of the physical model under investigation, which can be considered the stochastic stiffness matrix and $F\left( \theta \right)$ is a stochastic load vector. Randomness on the model can be formalized as a dependency of the operator and loads on the elementary event $\theta \in \Theta$ and it's a great challenge to solve Equation \eqref{eq:SFEM} in the high dimensional stochastic space $\Theta$. As an extension of deterministic FEM, stochastic finite element method (SFEM)~\citep{ghanem2003stochastic, Matthies2005Galerkin} has become a common tool for the solution of Equation \eqref{eq:SFEM}. Given the representation of uncertain system parameters and environmental source in terms of random fields, it becomes possible to integrate discretization methods for the response and random fields to arrive at a system of random algebraic equations. Two prominent variants of the SFEM are the non-intrusive methods and the Galerkin-type methods. Although various non-intrustive methods, e.g., Monte Carlo simulation~\citep{Papadrakakis1996Robust}, or regression and projection methods~\citep{blatman2008sparse}, can be readily applied to compute the response statistics to an arbitrary degree of accuracy, this is the method of last resort since the attendant computational cost can be prohibitive for real life problems. The Galerkin-type spectral methods~\citep{Xiu2002The, ghanem2003stochastic, Nouy2009Recent}, which are developed for linear SFEM, provide an explicit functional relationship between the random input and output, hence allow easy evaluation of the statistics of the stochastic system response. These methods transform Equation \eqref{eq:SFEM} arising from spatial discretization of SPDEs into a deterministic finite element equation by stochastic Galerkin projection, but the size of the deterministic finite element equation is significantly higher than that of the original SPDEs. Although several iterative solvers have been developed to decrease the substantial computational requisite~\citep{Ghanem1996Precondition, keese2005hierarchical}, the difficulty to build efficient preconditioners and memory requirements still limit their use to small-scale and low-dimensional stochastic problems. Also, the Curse of Dimensionality in stochastic spaces makes these methods more inefficient. For this line of approach to be successful in practice, it is crucial to have general-purpose and highly efficient numerical schemes for the solution of stochastic finite element equation \eqref{eq:SFEM}. In this article, we develop a highly efficient numerical method for the explicit and high precision solution of Equation \eqref{eq:SFEM} with application to structural responses that involve uncertainties. An universal construct of solution to stochastic finite element (SFE) equations is firstly developed, which is independent on the types of SFE problems. Based on the construct of this solution, we further develop a numerical algorithm for solving SFE equations. The representations of the stochastic solutions are applicable for high-dimensional stochastic problems, and more importantly, the stochastic analysis and deterministic analysis in the solution procedure can thus be implemented in individual space. In this way, the proposed algorithm for the solution of SFE equation integrate the advantages of the non-instrusive methods and the Galerkin-type methods simultaneously, and thus have great potential for uncertainty quantifications in structural analysis. The paper is organized as follows: Section \ref{sec2} briefly introduces the series expansion methods of random fields simulation and the derivation of stochastic finite element equations. A new method outlines for solving stochastic finite element equations is described in Section \ref{sec3}. Following this, the algorithm implementation of the proposed method is elaborated in Section \ref{sec4}. Three practical problems are used to demonstrate the accuracy and effectiveness of the proposed method in Section \ref{sec5}. Some conclusions and prospects are discussed in Sections \ref{sec6}. \section{Stochastic finite element method} \label{sec2} \subsection{Random fields expansion} \label{sec21} In the framework of SFEM for structural analysis, uncertain physical parameters usually consists of the Young modulus, Poisson's ratio, yield stress, cross section geometry of physical systems, earthquake loading, wind loads, etc. In most cases, due to the lack of relevant experimental data, assumptions are made regarding probabilistic characteristics of random fields, sunch as Gaussian or non-Gaussian, stationary or non-stationary, etc~\citep{Dai2017A, Stefanou2009The}. The first step in applying the FEM to problems involving one or more of the random parameters is to model random fields based on the assumptions of probabilistic characteristics, thus random fields discretization is a key step in the numerical solutions of stochastic finite element equations. In order to derive stochastic finite element equations effectively, explicit expressions of random fields are also crucial. In general, we represent random fields by an enumerable set of random variables, and the series expansion of a second-order random field $\omega (x,\theta )$, which is indexed on a bounded domain $D$, can be expressed as \begin{equation} \label{RF} \omega \left( {x,\theta } \right) = \sum\limits_{i = 0}^M {{\xi _i}\left( \theta \right){\omega _i}\left( x \right)} \end{equation} where $\left\{ {{\xi _i}\left( \theta \right)} \right\}_{i = 0}^M$ and $\left\{ {{\omega _i}\left( x \right)} \right\}_{i = 0}^M$ are random variables and deterministic functions, respectively, and $M$ is the number of retained items. Equation \eqref{RF} can be obtained by some methods for discretization of random fields. Various discretization techniques are available in the literature for approximating random fields including shape function methods, optimal linear estimation, weighted integral methods, orthogonal series expansion~\citep{sudret2000stochastic, 2010Identification}. As a special case of the orthogonal series expansion, Karhunen-Lo\'{e}ve expansion is the most commonly used method in SFEM, and it has a form as \begin{equation} \label{KL} \omega \left( {x,\theta } \right) = {\omega _0}\left( x \right){\rm{ + }}\sum\limits_{i = 1}^M {{\xi _i}\left( \theta \right)\sqrt {{\lambda _i}} {\omega _i}\left( x \right)} \end{equation} where ${\omega _0}\left( x \right)$ is the mean function of the random field $\omega \left( {x,\theta } \right)$, $\left\{ {{\lambda _i}} \right\}_{i = 1}^M$ and $\left\{ {{\omega _i}\left( x \right)} \right\}_{i = 1}^M$ are eigenvalues and eigenfunctions of the covariance function ${C_{\omega \omega }}\left( {{x_1},{x_2}} \right)$ of the random field $\omega \left( {x,\theta } \right)$, and they are solutions of the homogenous Fredholm integral equation of the second kind~\citep{ghanem2003stochastic, phoon2002simulation}, \begin{equation} \label{KLIE} \int_D {{C_{\omega \omega }}\left( {{x_1},{x_2}} \right){\omega _i}\left( {{x_1}} \right)d{x_1}} = {\lambda _i}{\omega _i}\left( {{x_2}} \right) \end{equation} Due to the symmetry and the positive definiteness of covariance kernel ${C_{\omega \omega }}\left( {{x_1},{x_2}} \right)$, the eigenfunctions $\left\{ {{\omega _i}\left( x \right)} \right\}_{i = 1}^M$ form a complete orthogonal set satisfying the equation \begin{equation} \label{Wi_O} \int_D {{\omega _i}\left( x \right){\omega _j}\left( x \right)dx} = {\delta _{ij}} \end{equation} where $\delta _{ij}$ is the Kronecker delta function. An explicit expression for the random variables $\left\{ {{\xi _i}\left( \theta \right)} \right\}_{i = 1}^M$ in Equation \eqref{RF} can be obtained by \begin{equation} \label{KeSi} {\xi _i}\left( \theta \right) = \frac{1}{{\sqrt {{\lambda _i}} }}\int_D {\left[ {\omega \left( {x,\theta } \right) - {\omega _0}\left( x \right)} \right]{\omega _i}\left( x \right)dx} \end{equation} which is a set of uncorrelated standardized random variables and satisfy \begin{equation} \label{KeSi_O} E\left\{ {{\xi _i}\left( \theta \right)} \right\} = 0,~E\left\{ {{\xi _i}\left( \theta \right){\xi _j}\left( \theta \right)} \right\} = {\delta _{ij}} \end{equation} where $E\left\{ \cdot \right\}$ is the expectation operator. The Karhunen-Lo\`{e}ve expansion \eqref{KL} offers a unified and powerful tool~\citep{phoon2002simulation, phoon2005simulation} for representing stationary and nonstationary, Gaussian and non-Gaussian random fields with explicitly known covariance functions. Karhunen-Lo\`{e}ve expansion is optimal among series expansion methods in the global mean square error with respect to the number of random variables in the representation, which means that only a few terms $M$ are required in order to capture most of randomness, thus it has received much attentions in many disciplines. In stochastic finite element analysis, it has been widely used to discretize the random fields representing the randomness of structures and excitations. It is worth mentioning that the implementation of Karhunen-Lo\`{e}ve expansion requires solutions of the integral equation \eqref{KLIE} with the covariance function as the integral kernel. Although only a limited number of analytical eigen-solutions are available~\citep{ghanem2003stochastic}, the solution of the integral equation can be numerically approximated for random fields with arbitrary covariance functions. For random fields that are defined on two- and three-dimensional domains, the finite element method becomes the only available method for the discretization of the multi-dimensional integral eigenvalue problems~\citep{2019An, zheng2017simulation}. In this paper, the generation of the finite element mesh for random fields is same to that for responses. \subsection{Stochastic finite element equations} \label{sec22} We simply recall the deterministic finite element method of the relevant formulation before dealing with stochastic problems. The deterministic finite element method in linear elasticity defined on $\Omega$ eventually derive a $N \times N$ linear system \begin{equation} \label{FEM} Ku = F \end{equation} where $N$ is the number of degrees of freedom, $K$, $u$, $F$ are global stiffness matrix, displacement vector and load vector, respectively. By assembling the element stiffness matrices $k^e$, the global stiffness matrix $K$ can be obtained as \begin{equation} \label{EleK} {k^e} = \int_{{\Omega _e}} {{B^T}DBd{\Omega _e}} \end{equation} where $B$ and $D$ stand for the strain matrix and the elasticity matrix, respectively. We suppose that the material Young's modulus is a random field~\citep{sudret2000stochastic} and can be written as the form in Equation \eqref{KL}, \begin{equation} \label{DM} D\left( {x,\theta } \right) = {D_0}\left[ {{\omega _0}\left( x \right){\rm{ + }}\sum\limits_{i = 1}^M {{\xi _i}\left( \theta \right)\sqrt {{\lambda _i}} {\omega _i}\left( x \right)} } \right] \end{equation} where $D_0$ is a constant matrix, and random variables $\left\{ {{\xi _i}\left( \theta \right)} \right\}_{i = 1}^M$ construct a $M$-dimensional stochastic space. By substituting Equation \eqref{DM} into Equation \eqref{EleK}, the element stiffness matrix thus becomes as, \begin{equation} \label{keR} {k^e}\left( \theta \right) = k_0^e + \sum\limits_{i = 1}^M {{\xi _i}\left( \theta \right)k_i^e} \end{equation} where $k_0^e$ is the mean element stiffness matrix given by \begin{equation} \label{keR0} k_0^e = \int_{{\Omega _e}} {{\omega _0}\left( x \right){B^T}{D_0}Bd{\Omega _e}} \end{equation} and $k_i^e$ are deterministic matrices given by \begin{equation} \label{keRi} k_i^e = \int_{{\Omega _e}} {\sqrt {{\lambda _i}} {\omega _i}\left( x \right){B^T}{D_0}Bd{\Omega _e}} \end{equation} The stochastic global stiffness matrix $K\left( \theta \right)$ in the stochastic finite element equation \eqref{eq:SFEM} is obtained by assembling the stochastic element stiffness matrices ${k^e}\left( \theta \right)$, \begin{equation} \label{KGR} K\left( \theta \right) = \sum\limits_{i = 0}^M {{\xi _i}\left( \theta \right){K_i}} \end{equation} where ${\xi _0}\left( \theta \right) \equiv 1$ and global matrices $K_i$ are obtained by assembling element matrices $k_i^e$ in the way similar to the deterministic case. In a similar way, we can get the stochastic global load vector as \begin{equation} \label{FGR} F\left( \theta \right) = \sum\limits_{l = 0}^Q {{\eta _l}\left( \theta \right){F_l}} \end{equation} After assembling the stochastic global stiffness matrix $K\left( \theta \right)$ and the stochastic global load vector $F\left( \theta \right)$, the stochastic finite element equation \eqref{eq:SFEM} can be rewritten as \begin{equation} \label{SFE0} \left( {\sum\limits_{i = 0}^M {{\xi _i}\left( \theta \right){K_i}} } \right)u\left( \theta \right) = \sum\limits_{l = 0}^Q {{\eta _l}\left( \theta \right){F_l}} \end{equation} The high precision solution of Equation \eqref{SFE0} is one of the most important problems of the stochastic finite element method. Spectral stochastic finite element method (SSFEM)~\citep{xiu2010numerical, ghanem2003stochastic} is a popular method in the past few decades. SSFEM represents the stochastic response $u\left( \theta \right)$ through polynomial chaos expansion (PCE) and transform Equation \eqref{SFE0} into a deterministic finite element equation by stochastic Galerkin projection. The size of the deterministic finite element equation depends directly on the number of terms retained in the PCE and the number of degrees of freedom $N$, and the computational cost for the solution of this system is much larger than that of the original problem. Although several improved methods~\citep{Ghanem1996Precondition, nouy2010proper} have been developed to decrease computational costs, the Curse of Dimensionality still limit SSFEM to low-dimensional stochastic problems, thus it is crucial to develop a new method for the solution of Equation \eqref{SFE0}. \section{A new method for solving stochastic finite element equations}\label{sec3} In order to avoid the difficulties of SSFEM, in this section, we propose a new method for solving the sochastic finite element equation \eqref{SFE0} defined in low- and high-dimensional stochastic spaces. A natural idea is to represent the stochastic solution $u\left( \theta \right)$ of Equation \eqref{SFE0} by use of random field expansions, however common methods are inactive since we almost know nothing about $u\left( \theta \right)$ except the governing equation \eqref{SFE0}. Inspired by Karhunen-Lo\`{e}ve expansion \eqref{KL} and the general spectral decomposition~\citep{nouy2007generalized}, we construct the $u\left( \theta \right)$ as \begin{equation} \label{u0} u\left( \theta \right) = \sum\limits_{i = 1}^\infty {{\lambda _i}\left( \theta \right){d_i}} \end{equation} where $\left\{ {{\lambda _i}(\theta )} \right\}_{i = 1}^\infty$ are random variables and $\left\{ {{d_i}} \right\}_{i = 1}^\infty$ are deterministic discretized basis vectors. Similar to the orthogonal conditions Equation \eqref{Wi_O} and \eqref{KeSi_O} of Karhunen-Lo\`{e}ve expansion, the following bi-orthogonal condition is introduced \begin{equation} \label{OrC} d_i^T{d_j} = {\delta _{ij}},~E\left\{ {{\lambda _i}\left( \theta \right){\lambda _j}\left( \theta \right)} \right\} = {\kappa _i}{\delta _{ij}} \end{equation} where $E\{ \cdot \}$ is the expectation operator and ${\kappa _i} = E\{ {\lambda _i^2( \theta )} \}$. It is shown in expansion \eqref{u0} that the solution space of $u\left( \theta \right)$ is decoupled into a stochastic space and a deterministic space and it allows to compute $\left\{ {{\lambda _i}(\theta )} \right\}_{i = 1}^\infty$ in the stochastic space and $\left\{ {{d_i}} \right\}_{i = 1}^\infty$ in the deterministic space, respectively. In this way, the difficulties in expanding the unknown solution random field of Equation \eqref{eq:SFEM} can be overcome. One only requires to seek a set of deterministic orthogonal vectors $\left\{ {{d_i}} \right\}_{i = 1}^\infty$ and the corresponding uncorrelated random variables $\left\{ {{\lambda _i}(\theta )} \right\}_{i = 1}^\infty$ such that the expanded solution in Equation \eqref{u0} satisfies the Equation \eqref{eq:SFEM}. In practical, we truncate Equation \eqref{u0} at the $k$-th term as, \begin{equation} \label{uk} {u_k}\left( \theta \right) = \sum\limits_{j = 1}^k {{\lambda _j}\left( \theta \right){d_j}} \end{equation} As mentioned above, neither $\left\{ {{d_i}} \right\}_{i = 1}^k$ nor $\left\{ {{\lambda _i}(\theta )} \right\}_{i = 1}^k$ is known a priori, a natural choice is to successively determine these unknown couples $\left\{ {{\lambda _i}\left( \theta \right), {d_i}} \right\}$ one after another via iterative methods. In order to compute the couple $\left( {{\lambda _k}\left( \theta \right),{d_k}} \right)$, we suppose that the approximate solution $u_{k-1}(\theta)$ has been obtained, then substituting Equation \eqref{uk} into Equation \eqref{eq:SFEM} yields, \begin{equation} \label{Kuk} K\left( \theta \right)\left[ {\sum\limits_{j = 1}^{k - 1} {{\lambda _j}\left( \theta \right){d_j}} + {\lambda _k}\left( \theta \right){d_k}} \right] = F\left( \theta \right) \end{equation} If random variable ${\lambda _k}(\theta )$ has been determined (or given an initial value), the $d_k$ can be determined using stochastic Galerkin method and a dedicated iteration~\citep{nouy2007generalized}, this corresponds \begin{equation} \label{Elambda} E\left\{ {{\lambda _k}(\theta )K(\theta )\left[ {\sum\limits_{j = 1}^{k - 1} {{\lambda _j}\left( \theta \right){d_j}} + {\lambda _k}(\theta ){d_k}} \right]} \right\} = E\left\{ {{\lambda _k}(\theta )F(\theta )} \right\} \end{equation} Considering Equation \eqref{KGR} and \eqref{FGR}, the Equation \eqref{Elambda} about $d_k$ can be simplified as, \begin{equation} \label{Eq_d} \left( {\sum\limits_{i = 0}^M {{c_{ikk}}{K_i}} } \right){d_k} = \sum\limits_{l = 0}^Q {{b_{kl}}{F_l}} - \sum\limits_{i = 0}^M {\sum\limits_{j = 1}^{k - 1} {{c_{ijk}}{K_i}{d_j}} } \end{equation} where \begin{equation} \label{Cijk} {c_{ijk}} = E\left\{ {{\xi _i}\left( \theta \right){\lambda _j}\left( \theta \right){\lambda _k}\left( \theta \right)} \right\}, \; {b_{kl}} = E\left\{ {{\eta _l}\left( \theta \right){\lambda _k}\left( \theta \right)} \right\} \end{equation} Once $d_k$ has been determined in Equation \eqref{Eq_d}, the random variable ${\lambda _k}(\theta )$ can be subsequently updated via the similar procedure. This requires to multiply ${d_k}$ on both sides of Equation \eqref{Kuk} to yield \begin{equation} \label{Mul_dk} d_k^TK\left( \theta \right)\left[ {\sum\limits_{j = 1}^{k - 1} {{\lambda _j}\left( \theta \right){d_j}} + {\lambda _k}\left( \theta \right){d_k}} \right] = d_k^TF\left( \theta \right) \end{equation} Considering Equation \eqref{KGR} and \eqref{FGR}, the Equation \eqref{Mul_dk} about ${\lambda _k}(\theta )$ can be simplified as, \begin{equation} \label{Eq_lambda} \left( {\sum\limits_{i = 0}^M {{g_{ikk}}{\xi _i}\left( \theta \right)} } \right){\lambda _k}\left( \theta \right) = \sum\limits_{l = 0}^Q {{h_{kl}}{\eta _l}\left( \theta \right)} - \sum\limits_{i = 0}^M {\sum\limits_{j = 1}^{k - 1} {{g_{ijk}}{\xi _i}\left( \theta \right){\lambda _j}\left( \theta \right)} } \end{equation} where \begin{equation} \label{Gijk} {g_{ijk}} = d_k^T{K_i}{d_j}, \; {h_{kl}} = d_k^T{F_l} \end{equation} The classical SSFEM is to represent the stochastic solution of nodes $\left\{ {{u_i}\left( \theta \right)} \right\}_{i = 1}^N$ in terms of a set of polynomial chaos and transforms the original stochastic finite element equation into a deterministic finite element equation with size $N \times \frac{{\left( {M + p} \right)!}}{{M!p!}}$, where $\left( \cdot \right)!$ represents the factorial operator, $N$, $M$ and $p$ are the number of system degrees of freedom, the number of random variables and the order of polynomial chaos expansion, respectively. The size of the deterministic finite element equation is significantly higher than that of the original stochastic finite element equation. For instance, the size is $1 \times 10^6$ when $N = 1000$, $M = 10$ and $p = 4$, which leads to the Curse of Dimensionality, and is prohibitive for problems with high stochastic dimensions and large scales. The method in this paper decouples the original stochastic finite element equation into a deterministic finite element equation \eqref{Eq_d} with size $N$ and one-dimensional stochastic algebraic equation \eqref{Eq_lambda}. The iteration process of Equation \eqref{Elambda} and \eqref{Mul_dk} was used in the paper~\citep{nouy2007generalized} to solve linear stochastic partial differential equations and subsequently applied to time-dependent and nonlinear problems~\citep{nouy2009generalized, nouy2010priori}. The key of this method is to transform the original SPDE to a deterministic PDE and a stochastic algebraic equation like Equation \eqref{Eq_lambda}. The method for solving Equation \eqref{Eq_lambda}-like is to represent the random variable $\lambda_k(\theta)$ in terms of a set of polynomial chaos and transforms Equation \eqref{Eq_lambda}-like into a deterministic equation with size $\frac{{\left( {M + p} \right)!}}{{M!p!}}$, which greatly alleviates the Curse of Dimensionality, but is still prohibitive for problems with high stochastic dimensions. In order to avoid this difficulty, we develop a simulation method to determine $\lambda_k(\theta)$. For each realization of $\{ {\theta ^{(r)}}\} _{r = 1}^R$, the ${\lambda _k}({\theta ^{(r)}})$ can be obtained by solving \eqref{Eq_lambda} as, \begin{equation} \label{Sam_lambda} {\lambda _k}\left( {{\theta ^{\left( r \right)}}} \right) = \frac{{\sum\limits_{l = 0}^Q {{h_{kl}}{\eta _l}\left( {{\theta ^{\left( r \right)}}} \right)} - \sum\limits_{i = 0}^M {\sum\limits_{j = 1}^{k - 1} {{g_{ijk}}{\xi _i}\left( {{\theta ^{\left( r \right)}}} \right){\lambda _j}\left( {{\theta ^{\left( r \right)}}} \right)} } }}{{\sum\limits_{i = 0}^M {{g_{ikk}}{\xi _i}\left( {{\theta ^{\left( r \right)}}} \right)} }} \end{equation} It is important to note that Equation \eqref{Sam_lambda} has become a one-dimensional linear algebraic equation about ${\lambda _k}({\theta ^{(r)}})$. Compared to classic methods, we do not need to choose the type and order of polynomial chaos. The total computational cost for determining $\{ {\lambda _k}({\theta ^{(r)}})\} _{r = 1}^R$ is very low even for high stochastic dimensions, which hopefully avoid the Curse of Dimensionality. Then statistical methods are readily introduced to obtain $\lambda_k(\theta)$ from samples $\{ {\lambda _k}({\theta ^{(r)}})\} _{r = 1}^R$. Hence, this method will be particularly appropriate for a wide class of high-dimensional stochastic problems in practice. \section{Algorithm implementation}\label{sec4} \begin{algorithm}[h] \caption{Algorithm for solving linear stochastic finite element equations} \label{alg1} \begin{algorithmic}[1] \While {${\varepsilon _{global}} > {\varepsilon _1}$} \label{step1} \State initialize $\lambda _k^{(0)}(\theta )$ \label{step2} \While {${\varepsilon _{local}} > {\varepsilon _2}$} \label{step3} \State compute $d_k^{\left( j \right)}$ by solving Equation \eqref{Eq_d} \label{step4} \State orthogonalization $d_k^{\left( j \right)} \bot {d_i},\; i = 1, \cdots, k - 1$ by Equation \eqref{OrDL} and normalization $d_k^{\left( j \right)} = \frac{{d_k^{\left( j \right)}}}{{\left\| {d_k^{\left( j \right)}} \right\|}}$ \label{step5} \State compute $\lambda _k^{(j)}(\theta )$ by Equation \eqref{Sam_lambda} \label{step6} \State orthogonalization $\lambda _k^{\left( j \right)}\left( \theta \right) \bot {\lambda _i}\left( \theta \right),\; i = 1, \cdots, k - 1$ by Equation \eqref{OrDL} \label{step7} \State compute local error ${\varepsilon _{local}}$, $j=j+1$ \label{step8} \EndWhile \label{step9} \State update $u(\theta )$ as ${u_k}(\theta ) = \sum\limits_{i = 1}^{k - 1} {{\lambda _i}(\theta ){d_i}} + {\lambda _k}(\theta ){d_k}$ \label{step10} \State compute global error ${\varepsilon _{global}}$, $k=k+1$ \label{step11} \EndWhile \label{step12} \end{algorithmic} \end{algorithm} The above procedure for solving the stochastic finite element equation \eqref{eq:SFEM} is summarized in Algorithm \ref{alg1}, which consists of a outer loop procedure and a inner loop procedure. The inner loop, which is from step \ref{step3} to \ref{step9}, is used to determine the couple of $(\lambda_k(\theta), d_k)$. With an initial random variable $\lambda _k^{\left( 0 \right)}\left( \theta \right)$ given in step \ref{step2}, $d_k^{\left( j \right)}$ can be determined in step \ref{step4} and \ref{step5}, where superscript $j$ represents the \emph{j}-th round of iteration. With the obtained $d_k^{\left( j \right)}$, the random variable $\lambda _k^{\left( j \right)}\left( \theta \right)$ is then updated in step \ref{step6} and \ref{step7}. While the outer loop, which is from step \ref{step1} to \ref{step12}, corresponds to recursively building the set of couples and then generates a set of couples such that the approximate solution in step \ref{step10} satisfies Equation \eqref{eq:SFEM}. Note that both $d_k^{\left( j \right)}$ and $\lambda _k^{\left( j \right)}\left( \theta \right)$ require orthogonalizations such that the bi-orthogonal condition in Equation \eqref{OrC} holds along the whole process, here we use the Gram-Schmidt Orthogonalization method in step \ref{step5} and \ref{step7}. It is written as, \begin{equation} \label{OrDL} \left\{ {\begin{array}{*{20}{l}} {d_k^{\left( j \right)} = d_k^{\left( j \right)} - \sum\limits_{i = 1}^{k - 1} {\left( {d_k^{\left( j \right)T}{d_i}} \right){d_i}} }\\ {\lambda _k^{\left( j \right)}\left( \theta \right) = \lambda _k^{\left( j \right)}\left( \theta \right) - \sum\limits_{i = 1}^{k - 1} {\frac{{E\left\{ {\lambda _k^{\left( j \right)}\left( \theta \right){\lambda _i}\left( \theta \right)} \right\}}}{{E\left\{ {\lambda _i^2\left( \theta \right)} \right\}}}{\lambda _i}\left( \theta \right)} } \end{array}} \right.,k \ge 2 \end{equation} For practical purposes, a certain number of truncated items are retained of the solution $u\left( \theta \right)$. The truncation criterion in step \ref{step1} is considered as a global error, which is defined as, \begin{eqnarray} \label{err_glo} {\varepsilon _{global}} &= &\frac{{E\left\{ {\Delta u_k^2\left( \theta \right)} \right\}}}{{E\left\{ {u_k^2\left( \theta \right)} \right\}}} = \frac{{E\left\{ {\lambda _k^2\left( \theta \right)} \right\}d_k^T{d_k}}}{{\sum\limits_{i = 1}^k {\sum\limits_{j = 1}^k {E\left\{ {{\lambda _i}\left( \theta \right){\lambda _j}\left( \theta \right)} \right\}d_i^T{d_j}} } }} \nonumber\\ &= &\frac{{E\left\{ {\lambda _k^2\left( \theta \right)} \right\}}}{{\sum\limits_{i = 1}^k {E\left\{ {\lambda _i^2\left( \theta \right)} \right\}} }} \end{eqnarray} which measures the contribution of the $k$-th couple $\left( {{\lambda _k}\left( \theta \right),{d_k}} \right)$ to the stochastic solution $u\left( \theta \right)$ and converges to the final solution when it achieves the required precision. Further, the stop criterion for computing each couple $\left( {{\lambda _k}\left( \theta \right),{d_k}} \right)$ is considered as a local error and defined as, \begin{eqnarray} \label{err_loc} {\varepsilon _{local}} = \frac{{\left\| {d_k^{(j)} - d_k^{(j - 1)}} \right\|}}{{\left\| {d_k^{(j - 1)}} \right\|}} = \left\| {d_k^{(j)} - d_k^{(j - 1)}} \right\| \end{eqnarray} which measures the difference between $d_k^{(j)}$ and $d_k^{(j-1)}$ and the calculation is stopped when $d_k^{(j)}$ is almost the same as $d_k^{(j-1)}$. \section{Applications}\label{sec5} The numerical implementation of the proposed method is illustrated with the aid of three practical applications. The first application consists of an electric pylon frame with stochastic material properties and a stochastic load. The second application is a roof truss under stochastic wind loads defined in low-dimensional and high-dimensional stochastic spaces, which is to illustrate the efficiency of applying the proposed method to high-dimensional stochastic problems. The third example tests the ability of the proposed method for dealing with a large-scale engineering problem given by computing the deformation of a tunnel under the action of self-weight. These three exampls serve to verify the validity and accuracy of the proposed method and demonstrate that there is the same solution construct for different problems. \subsection{Response of electric pylon frame with stochastic material property}\label{Example-1} In this problem, we consider a frame system as shown in Figure \ref{fig_e1_01}, which is a electric pylon frame consisting of 91 elements with square cross-sections. A load $P$ is applied vertically downward at the far right tip of the arm of the pylon. Clamped boundary conditions are applied at the base of the frame model. Spatial nodes of the electric pylon frame model are defined in Table \ref{tab_e1}. All elements of the electric pylon frame are constructed of 300M steel and have identical cross-sectional areas. Deterministic material properties are given as, mass density $\rho = 7.8\rm{{g \mathord{\left/{\vphantom {g {c{m^3}}}} \right.\kern-\nulldelimiterspace} {c{m^3}}}}$, cross-sectional area $\overline{A}=4\rm{c{m^2}}$, Young's modulus $\overline{E} = 200\rm{GPa}$. \begin{figure \centerline{\includegraphics[width=0.4\linewidth]{figures/E1_1.pdf}} \caption{91-element electric pylon frame \label{fig_e1_01}} \end{figure} \begin{table \caption{Nodal definitions of the electric pylon frame \label{tab_e1}} \centering \begin{tabular}{rrrrrrrrrrrr} \toprule \bf{node} & $x$ & $y$ & \bf{node} & $x$ & $y$ \bf{node} & $x$ & $y$ & \bf{node} & $x$ & $y$ \\ \midrule \bf{1} & 12.11 & 0.00 & \bf{13} & 29.96 & 29.73 & \bf{25} & 14.70 & 48.45 & \bf{37} & 38.92 & 51.32\\ \bf{2} & 36.58 & 0.00 & \bf{14} & 17.44 & 33.76 & \bf{26} & 17.93 & 48.45 & \bf{38} & 12.11 & 51.92 \\ \bf{3} & 15.18 & 9.53 & \bf{15} & 21.16 & 33.76 & \bf{27} & 21.88 & 48.45 & \bf{39} & 16.15 & 51.92\\ \bf{4} & 24.47 & 9.53 & \bf{16} & 27.78 & 33.76 & \bf{28} & 26.97 & 48.45 & \bf{40} & 20.03 & 51.92 \\ \bf{5} & 33.67 & 9.53 & \bf{17} & 31.41 & 33.76 & \bf{29} & 31.01 & 48.45 &\bf{41} & 24.47 & 51.92 \\ \bf{6} & 17.77 & 17.61 & \bf{18} & 19.06 & 36.34 & \bf{30} & 34.16 & 48.45 & \bf{42} & 28.91 & 51.92\\ \bf{7} & 24.47 & 17.61 & \bf{19} & 29.88 & 36.34 & \bf{31} & 36.74 & 48.45 & \bf{43} & 32.71 & 51.92 \\ \bf{8} & 31.09 & 17.61 & \bf{20} & 14.54 & 41.77 & \bf{32} & 40.38 & 48.45 & \bf{44} & 36.74 & 51.92 \\ \bf{9} & 20.43 & 25.69 & \bf{21} & 34.32 & 41.77 & \bf{33} & 48.86 & 48.45 & \bf{45} & 12.11 & 60.00 \\ \bf{10} & 28.51 & 25.69 & \bf{22} & 0.00 & 48.45 & \bf{34} & 6.46 & 50.31 & \bf{46} & 36.74 & 60.00\\ \bf{11} & 18.90 & 29.73 & \bf{23} & 8.56 & 48.45 & \bf{35} & 42.40 & 50.31 & \\ \bf{12} & 24.47 & 29.73 &\bf{24} & 12.11 & 48.45 & \bf{36} & 10.01 & 51.32 & \\ \bottomrule \end{tabular} \end{table} The response of the electric pylon forced under a load $P$ deeply depends on these parameters. In order to better reflect the structural response influenced by material and load variabilities, we consider the stochastic tensile stiffness and the stochastic bending stiffness as, \begin{equation} \label{EA_EI} EA = \left( {{\xi _1}\left( \theta \right) + 0.2{\xi _2}\left( \theta \right)} \right)\overline {EA},~ EI = \left( {{\xi _3}\left( \theta \right) + 0.2{\xi _4}\left( \theta \right)} \right)\overline {EI} \end{equation} and consider a stochastic load $P\left( \theta \right)$ as \begin{equation} \label{StoP} P\left( \theta \right) = \left( {1 + {\xi _5}\left( \theta \right) + {\xi _6}\left( \theta \right)} \right)\overline{P} \end{equation} where $\overline{P} = 1000\rm{N}$. Indepdent random variables $\left\{ {{\xi _i}\left( \theta \right)} \right\}_{i = 1}^6$ in Equation \eqref{EA_EI} and \eqref{StoP} satisfy \begin{equation} \label{RVs} \log \left\{ {{\xi _i}\left( \theta \right)} \right\}_{i = 1}^4 \sim N\left( {0,0.3} \right),~{\xi _5}\left( \theta \right),{\xi _6}\left( \theta \right) \sim N\left( {0,0.1} \right) \end{equation} Similar to the derivation of Equation \eqref{SFE0}, a stochastic finite element equation for this problem can be obtained as, \begin{equation} \label{E1_SFEM} \left( {\sum\limits_{i = 1}^4 {{\xi _i}\left( \theta \right){K_i}} } \right)u\left( \theta \right) = \left( {1 + \sum\limits_{i = 5}^6 {{\xi _i}\left( \theta \right)} } \right)F \end{equation} \begin{figure \centerline{\includegraphics[width=0.6\linewidth]{figures/E1_2.pdf}} \caption{Displacement components $\left\{ {{d_i}} \right\}_{i = 1}^2$ (top) and PDFs of corresponding random variables $\left\{ {{\lambda _i}\left( \theta \right)} \right\}_{i = 1}^2$ (bottom) \label{E1_DL}} \end{figure} \begin{figure \centerline{\includegraphics[width=0.6\linewidth]{figures/E1_3.pdf}} \caption{Comparison of PDFs between the Monte Carlo simulation and the proposed method \label{E1_pdf}} \end{figure} In order to solve Equation \eqref{E1_SFEM} by use of Algorithm \ref{alg1}, the convergence criterias are set as $\varepsilon _1 = \varepsilon _2 = 10^{ - 6}$, $R = 1 \times 10^4$ random samples, i.e. $\left\{ {{\xi _i}\left( {{\theta ^{\left( r \right)}}} \right)} \right\}_{r = 1}^{1 \times {{10}^4}},~i = 1, \cdots ,2$, are given in Equation \eqref{E1_SFEM} and $\{ \lambda _k^{(0)}({\theta ^{(r)}})\} _{r = 1}^{1 \times {{10}^4}}$ are adopt in step \ref{step2} in Algorithm \ref{alg1}. In this example, only two retained terms in Equation \eqref{uk}, the displacement components $\left\{ {{d_i}\left( {x,y} \right)} \right\}_{i = 1}^2$ and probability density functions (PDFs) of corresponding random variables $\left\{ {{\lambda _i}\left( \theta \right)} \right\}_{i = 1}^2$ shown in Figure \ref{E1_DL}, can achieve the required precision, which demonstrates the high efficiency of the proposed method. It is seen from Figure \ref{E1_DL} that, the second random variable ${\lambda _2}\left( \theta \right)$ is very small and makes almost no contributions to the approximate solution ${u_2}\left( \theta \right)$. In practical, we determine whether step \ref{step2} in Algorithm \ref{alg1} converges through computing the second term, thus the displacement component $d_2$ and the random variable ${\lambda _2}\left( \theta \right)$ are necessary. Further we compare the proposed method with existing methods, including Monte Carlo simulation~\citep{Papadrakakis1996Robust} and spectral stochastic finite element method (SSFEM)~\citep{xiu2010numerical, ghanem2003stochastic}. Here Hermite Polynomial Chaos (PC) of 6 standard Gaussian random variables are adopted in the SSFEM, and the order of PC is set as $p=3$ and $p=4$. We test the computational efficiency of these methods by use of a personal laptop (dual-core, Intel i7, 2.40GHz) and the computational times of the proposed method, PC ($p=3$), PC ($p=4$) and $1 \times {10^6}$ standard Monte Carlo simulations are 3.4s, 71.9s, 474.9s and 1412.7s, respectively, which demonstrates the high efficiency of the proposed method. Based on above methods, the resulted approximate PDFs of the response of the far right tip of the arm of the electric pylon are seen from Figure \ref{E1_pdf}. The result of the two-term approximation of the proposed method is in very good accordance with that from the Monte Carlo simulation, while the PC method requires fourth order ($p=4$) to achieve a similar accuracy. In addition, our method is based on random samples, thus can avoid choosing the order $p$ of PC basis. We observe in practice that the number of random samples has less influence on the computational cost. In the general case, the sample size is enough when it is sufficient to describe the statistical characteristics of the random variables. \subsection{Response of roof truss under stochastic wind loads}\label{Example-2} In this example, we consider the stochastic response of a roof truss under a stochastic wind load acting vertically downward on the roof. The roof truss, as shown in Figure \ref{fig_e2_01}, includes 185 spatial nodes and 664 elements, where material properties of all members are set as Young's modulus $E = 209{\mathop{\rm GPa}\nolimits}$ and cross-sectional areas $A = 16{{\mathop{\rm cm}\nolimits} ^2}$. \begin{figure}[h] \centerline{\includegraphics[width=0.7\linewidth]{figures/E2_1.pdf}} \centerline{\includegraphics[width=0.7\linewidth]{figures/E2_2.pdf}} \caption{Model of the roof truss\label{fig_e2_01}} \end{figure} The stochastic wind load is a random field with the covariance function ${C_{FF}}\left( {{x_1},{y_1};{x_2},{y_2}} \right) = \sigma _F^2{e^{ - {{\left| {{x_1} - {x_2}} \right|} \mathord{\left/ {\vphantom {{\left| {{x_1} - {x_2}} \right|} {{l_x}}}} \right. \kern-\nulldelimiterspace} {{l_x}}} - {{\left| {{y_1} - {y_2}} \right|} \mathord{\left/ {\vphantom {{\left| {{y_1} - {y_2}} \right|} {{l_y}}}} \right. \kern-\nulldelimiterspace} {{l_y}}}}}$, where the variance function $\sigma _F^2 = 0.15$, the correlation lengths ${l_x} = {l_y} = 24$, and it can be expanded by use of Karhunen-Lo\`{e}ve expansion Equation \eqref{KL} with a $M$-term truncated as \begin{equation} \label{E2_RF} f\left( {x,y,\theta } \right) = \sum\limits_{i = 0}^{M} {{\xi _i}\left( \theta \right){f_i}\left( {x,y} \right)} \end{equation} where ${\xi _0}\left( \theta \right) \equiv 1$ and the mean function ${f_0}\left( {x,y} \right) = 10{\mathop{\rm kN}\nolimits}$. $\left\{ {{f_i}\left( {x,y} \right)} \right\}_{i = 1}^M$ is obtained by solving Equation \eqref{KL}. Based on the expansion Equation \eqref{E2_RF} of the stochastic wind load, the following stochastic finite element equation is obtained, \begin{equation} \label{E2_SFEM} Ku\left( \theta \right) = \sum\limits_{i = 0}^{M} {{\xi _i}\left( \theta \right){F_i}} \end{equation} In this example, the initializations give the random samples $\left\{ {{\xi _i}\left( {{\theta ^{\left( r \right)}}} \right)} \right\}_{r = 1}^{1 \times {{10}^4}},~i = 1, \cdots ,M$ and the initial random variable samples $\{ \lambda _k^{(0)}({\theta ^{(r)}})\} _{r = 1}^{1 \times {{10}^4}}$, and set the convergence criterias as $\varepsilon _1 = \varepsilon _2 = 10^{ - 6}$. We first consider a low-dimensional case by choosing $M=10$. \begin{figure* \centerline{\includegraphics[width=1.0\textwidth]{figures/E2_3.pdf}} \centerline{$\bf{(a)}$.~Displacement components $\left\{ {{d_i}} \right\}_{i = 1}^8$\label{fig_e2_021}} \begin{minipage}[t]{0.585\linewidth} \centerline{\includegraphics[width=1.0\linewidth]{figures/E2_4.pdf}} \centerline{$\bf{(b)}$.~PDFs of $\left\{ {{\lambda _i}\left( \theta \right)} \right\}_{i = 1}^8$ \label{fig_e2_022}} \end{minipage} \begin{minipage}[t]{0.415\linewidth} \centerline{\includegraphics[width=1.0\linewidth]{figures/E2_5.pdf}} \centerline{$\bf{(c)}$.~Iterative errors of $k$ retained items \label{fig_e2_023}} \end{minipage} \caption{Solutions of the couples $\left\{ {{\lambda _i}\left( \theta \right),{d_i}} \right\}_{i = 1}^8$ and iterative errors of the solving process \label{fig_e2_02}} \end{figure*} It is seen from Figure \ref{fig_e2_02}c that the displacement components $\left\{ {{d_i}} \right\}$ and corresponding random variables $\left\{ {{\lambda _i}\left( \theta \right)} \right\}$ can be determined after 8 iterations, which demonstrates the fast convergence rate of the proposed method. Correspondingly, the number of couples $\left( {{\lambda _k}\left( \theta \right),{d_k}} \right)$ that constitute the stochastic response is adopted as $k=8$. As shown in Figure \ref{fig_e2_02}a and Figure \ref{fig_e2_02}b, with the increasing of the number of couples, the ranges of corresponding random variables are more closely approaching to zero, indicating that the contribution of the higher order random variables to the approximate solution decays dramatically. For the maximum displacement of the whole roof truss, the resulted approximate PDF compared with $1 \times {10^6}$ standard Monte Carlo simulations (MCS) is seen in Figure \ref{fig_e2_03}, which indicates that the result of eight-term approximation is in very good accordance with that from the Monte Carlo simulation. According to our experience, further increasing the number of couples will not significantly improve the accuracy since the series in Equation \eqref{uk} has converged and thus the first few couples dominate the solution of the problem. This example demonstrates the success of our proposed construct of the stochastic solution and Algorithm \ref{alg1} for the solution of practical problems. \begin{figure*}[hp] \begin{minipage}[t]{0.49\linewidth} \centerline{\includegraphics[width=1.0\linewidth]{figures/E2_6.pdf}} \caption{Comparison of PDFs between the MCS and Algorithm \ref{alg1} \label{fig_e2_03}} \end{minipage} \begin{minipage}[t]{0.49\linewidth} \centerline{\includegraphics[width=1.0\linewidth]{figures/E2_7.pdf}} \caption{Time costs of different stochastic dimensions $M = 10 \sim 1000$\label{E2_time}} \end{minipage} \end{figure*} One of the main purposes the proposed method is to solve high-dimensional stochastic problems. Here we introduce the high-dimensional stochastic problems by choosing $M=100 \sim 1000$, and test the computational efficiency of different stochastic dimensions by use of a personal laptop (dual-core, Intel i7, 2.40GHz). Computational costs for solving Equation \eqref{E2_SFEM} of different stochastic dimensions are shown in Figure \ref{E2_time}, which indicates that our proposed algorithm is efficient for high stochastic dimensions. The computational costs do not increase dramatically as the dimensions increase and is almost linear with the stochastic dimensions, which demonstrates the sucess of the proposed method for avoiding the Curse of Dimensionality. \subsection{Deformation of tunnel under the action of self-weight}\label{Example-3} This example is to compute the deformation of a tunnel under the action of self-weight~\citep{XRQ2006}. In order to reduce the size of the stochastic finite element equation while ensuring the accuracy, triangle elements with gradients are used to generate a fine mesh for the tunnel structure and a coarse mesh for the rock, totally including 2729 nodes and 5145 triangle elements, as shown in Figure \ref{fig_e3_01}. Material properties and thicknesses of all components are seen from Table \ref{tab_e3}, here we consider the Young's modulus of components as a random field with the mean value shown in Table \ref{tab_e3} and the covariance function ${C_{EE}}\left( {{x_1},{y_1};{x_2},{y_2}} \right) = \sigma _E^2{e^{ - {{\left| {{x_1} - {x_2}} \right|} \mathord{\left/ {\vphantom {{\left| {{x_1} - {x_2}} \right|} {{l_x}}}} \right. \kern-\nulldelimiterspace} {{l_x}}} - {{\left| {{y_1} - {y_2}} \right|} \mathord{\left/ {\vphantom {{\left| {{y_1} - {y_2}} \right|} {{l_y}}}} \right. \kern-\nulldelimiterspace} {{l_y}}}}}$, where variance function $\sigma _E = 0.1$, correlation lengths ${l_x} = 10$, ${l_y} = 20$. Similar to Example \ref{Example-2}, we model the Young's modulus random field by use of Karhunen-Lo\`{e}ve expansion with 10 terms, and derive a stochastic finite element equation. \begin{figure \centerline{\includegraphics[width=0.55\linewidth]{figures/E3_1.pdf}} \centerline{\includegraphics[width=0.55\linewidth]{figures/E3_2.pdf}} \caption{Model of the tunnel (top) and the finite element mesh (bottom) \label{fig_e3_01}} \end{figure} \begin{table* \caption{Descriptions of materials properties \label{tab_e3}} \centering \begin{tabular}{lrrrr} \toprule & Young's modulus & Poisson's ratio & mass density & thickness \\ & (GPa) & & ($\rm{{{kg} \mathord{\left/ {\vphantom {{kg} {{m^3}}}} \right. \kern-\nulldelimiterspace} {{m^3}}}}$) & ($\rm{m}$) \\ \midrule rock & 2.0 & 0.25 & 2200 & \\ rock reinforcement & 2.6 & 0.20 & 2300 & 2.80 \\ concrete lining & 28.5 & 0.20 & 2500 & 0.20 \\ backfilling concrete & 18.5 & 0.20 & 2300 & 0.50 \\ concrete spray & 28.5 & 0.20 & 2200 & 0.95 \\ \bottomrule \end{tabular} \end{table*} Given the random samples $\left\{ {{\xi _i}\left( {{\theta ^{\left( r \right)}}} \right)} \right\}_{r = 1}^{1 \times {{10}^4}},~i = 1, \cdots ,10$, the initial random variable samples $\{ \lambda _k^{(0)}({\theta ^{(r)}})\} _{r = 1}^{1 \times {{10}^4}}$ and set the convergence criterias as $\varepsilon _1 = 10^{ - 8}$, $\varepsilon _2 = 10^{ - 6}$, displacements $\left\{ {{d_i}} \right\}$ and corresponding random variables $\left\{ {{\lambda _i}\left( \theta \right)} \right\}$ can be determined after 6 iterations, as shown in Figure \ref{fig_e3_02}{\bf{d}}, which indicates the high efficiency of the proposed method. Figure \ref{fig_e3_02}({\bf{a}}--{\bf{c}}) shows the displacement components $\left\{ {{d_i}} \right\}_{i = 1}^6$ and PDFs of corresponding random variables $\left\{ {{\lambda _i}\left( \theta \right)} \right\}_{i = 1}^6$, where Figure \ref{fig_e3_02}{\bf{a}} and {\bf{b}} are the displacement components in the $x$ direction (horizontal direction) and $y$ direction (vertical direction), respectively. Mean values and variances of the displacement are shown in Figure \ref{fig_e3_03}$\bf{a}$ and $\bf{b}$, and as a part of the whole displacement (shown in Figure \ref{fig_e3_01} bottom), mean values and variances of the tunnel displacement are seen from Figure \ref{fig_e3_03}$\bf{a_0}$ and $\bf{b_0}$. \begin{figure* \begin{minipage}[t]{0.5\linewidth} \centerline{\includegraphics[width=1.0\textwidth]{figures/E3_3.pdf}} \centerline{$\bf{(a)}$.~Displacement $\left\{ {{d_i}} \right\}_{i = 1}^6$ in $x$ direction \label{fig3_dx}} \end{minipage} \begin{minipage}[t]{0.5\linewidth} \centerline{\includegraphics[width=1.0\textwidth]{figures/E3_4.pdf}} \centerline{~~~~~~$\bf{(b)}$.~Displacement $\left\{ {{d_i}} \right\}_{i = 1}^6$ in $y$ direction \label{fig_3_dy}} \end{minipage} \begin{minipage}[t]{0.595\linewidth} \centerline{\includegraphics[width=1.0\textwidth]{figures/E3_5.pdf}} \centerline{$\bf{(c)}$.~PDFs of $\left\{ {{\lambda _i}\left( \theta \right)} \right\}_{i = 1}^6$ \label{fig3_lam}} \end{minipage} \begin{minipage}[t]{0.44\linewidth} \centerline{\includegraphics[width=1.0\textwidth]{figures/E3_6.pdf}} \centerline{$\bf{(d)}$.~Iterative errors of $k$ retained items \label{fig1}} \end{minipage} \caption{Solutions of the couples $\left\{ {{\lambda _i}\left( \theta \right),{d_i}} \right\}_{i = 1}^6$ and iterative errors of the solving process \label{fig_e3_02}} \end{figure*} Both tunnel displacements and rock displacements can be captured efficiently, which once again demonstrates the effectiveness of the proposed method. Comparing with Figure \ref{fig_e3_02}($\bf{a}$--$\bf{c}$) and Figure \ref{fig_e3_03}$\bf{a}$, we observe that the first retained item, i.e. $E\left\{ {{\lambda _1}\left( \theta \right)} \right\}{d_{x1}}$ and $E\left\{ {{\lambda _1}\left( \theta \right)} \right\}{d_{y1}}$, can roughly approximate the mean displacements in the $x$ direction and $y$ direction. For most cases, the mean displacement considering uncertainties is very close to the displacement obtained from the deterministic case, but considering uncertainties can be better to reflect the variabilities of displacements, which is of great significance for structure design and evaluation, such as reliability analysis and sensitivity analysis~\citep{Dai2014An}. It is seen from Figure \ref{fig_e3_03}$\bf{b}$ that, randomness in this example has more influence on the variance of the tunnel displacement in the $x$ direction and less influence on that in the $y$ direction, which provides a potential way for the design and evaluation of tunnel structures considering uncertainties. \begin{figure*}[!h] \begin{minipage}[t]{0.5\linewidth} \centerline{\includegraphics[width=1.0\textwidth]{figures/E3_7.pdf}} \centerline{$\bf{(a)}$.~Means in the $x$ and $y$ direction \label{fig331}} \end{minipage} \begin{minipage}[t]{0.5\linewidth} \centerline{\includegraphics[width=1.0\textwidth]{figures/E3_8.pdf}} \centerline{$\bf{(b)}$.~Variances in the $x$ and $y$ direction \label{fig332}} \end{minipage} \begin{minipage}[t]{0.5\linewidth} \centerline{\includegraphics[width=1.0\textwidth]{figures/E3_9.pdf}} \centerline{$\bf{(a_0)}$.~Means of the tunnel displacement \label{fig333}} \end{minipage} \begin{minipage}[t]{0.5\linewidth} \centerline{\includegraphics[width=1.0\textwidth]{figures/E3_10.pdf}} \centerline{~~~~~~~~$\bf{(b_0)}$.~Variances of the tunnel displacement \label{fig334}} \end{minipage} \caption{Means and variances of the displacement in the $x$ and $y$ direction} \label{fig_e3_03} \end{figure*} \section{Conclusions}\label{sec6} In this paper, we develop a method for solving stochastic finite element equations and illustrate its accuracy and efficiency on three practical examples. The proposed method sovles stochastic problems by use of a universal solution construct and a dedicated iterative algorithm. It allows to solve high-dimensional stochastic problems with very low computational costs, which has been illustrated on numerical examples. Thus it appears as a powerful way to avoid the Curse of Dimensionality. In addition, since the stochastic analysis and deterministic analysis in the solving procedure are implemented in their individual spaces, the existing FEM and ODE codes can be readily incorporated into the computatinoal procedure. In these senses, this method is particulary appropriate for large-scale and high-dimensional stochastic problems of practical interests and has great potential in uncertainty quantification of practical problems in science and engineering. In the follow-up research, it hopefully further applies the proposed method to a wider range of uncertainty quantification, such as reliability analysis, sensitivity analysis, etc. \section*{Acknowledgments} This research was supported by the Research Foundation of Harbin Institute of Technology and the National Natural Science Foundation of China (Project 11972009). These supports are gratefully acknowledged. \nocite{*}
\section{Introduction} Gesture is produced as part of deliberate action and signs, involving the motion of the up body, especially the arms, hands, and fingers. Video-based classification makes an essential component in gesture recognition. It has been applied to many human-centred tasks, such as apparent personality analysis \cite{li2020cr}, sign language recognition \cite{cui2019deep} and human-computer interaction (HCI) \cite{wang2016largei}. The handcrafted features \cite{wan2013one, wan2015explore} are always used for gesture recognition in the early years. The powerful feature representation ability of deep learning also promotes the application of neural networks in the field of gesture recognition \cite{li2016large,miao2017multimodal,simonyan2014two,narayana2018gesture}. For most of the deep learning-based gesture recognition methods, some popular networks like ResNet \cite{he2016deep}, SENet \cite{hu2018squeeze} and Inflated 3D Network (I3D) \cite{carreira2017quo} are usually employed as the backbone for gesture recognition. Although these networks have achieved great success in many tasks, it still worth pointing that the same modules are shared from shallow to deep layers in these networks. Even the modules in networks like I3D that employ multi-branch structure to improve the width and diversity are fixed and all the same through the network. However, features in the early stage and late stage are quite different. Features in the early stage are low-level features, which show the visual texture in each frame, whereas the high-level features in the late stage are abstracted and more related to the class of gestures. Therefore, it is not suitable to use the same structure to learn different features, and then we need to make the network more adaptive and automatically determine what the shape is for different parts of it. \begin{figure*}[ht] \centering \includegraphics[width=0.95\linewidth]{img/network_new.pdf} \caption{The pipeline of the proposed method. (a) the structure of the entire RAAR3DNet. (b) the inner structure of automatically rebuilt cell1, cell2, and cell3. Each cell is composed of two input nodes, four intermediate nodes and one output node. The output node is obtained by combing features from intermediate nodes with some reduction operation (\emph{e}.\emph{g}., concatenation), which are marked as the dashed lines in (b). We take the I3D network as the backbone, and utilize NAS to automatically rebuild the structure of Inception Modules in it. The reconstructed network shows different structure to fit multi-scale features. Cell1 and cell2, which are in the early and middle stage of the network, tend to employ convolution kernels with small receptive fields to capture the low-level texture features more easily, whereas cell3s at the end of the network perform dilated convolution operations to capture the more abstract and semantically high-level features. } \label{fig:pipeline} \end{figure*} Meanwhile, one of the most significant challenge hindering the improvement of recognition accuracy is the influence of gesture-irrelevant factors, such as backgrounds, different clothes of performers, and so on. The various textures and appearances could mislead the network to learn inconsequential or less important features. For dynamic gesture recognition from a video sequence, we believe it is vital to focus on gesture movements, such as hands, arms or elbows of the performers. Many researchers notice that it is critical to make the network focusing on the gesture regions both spatially and temporally. Modules such as hand detector~\cite{wang2016largec,liu2017continuous}, and additional modalities of data like optical flow \cite{li2017largea} or saliency \cite{li2017largeb} are widely used via combining with the raw RGB (and depth) data to design different algorithms. However, most of them require extra offline operations (\emph{e}.\emph{g}., hand detection, optical flow calculation) in advance. It would increase time complexity because of using hand detector network in the testing stage. Therefore, it may be more reasonable if the attention maps of gesture regions are learned along with the task of gesture recognition in the same network. Inspired by the above discussions, we propose a regional attention with architecture-rebuilt 3D network for dynamic gesture recognition based on RGB-D data, which is illustrated in Fig.\ref{fig:pipeline}. We take the I3D\footnote{We still utilize a two-stream configuration - with one I3D network trained on RGB inputs, and another on depth inputs.} network as the backbone and employ the theory of NAS to find the optimal combination of different operations in each module of the network. To make the network focus on the gesture regions, we propose a regional attention module DSA, which includes a static attention sub-module (SAtt) and dynamic attention sub-module (DAtt). For static attention, we learn a heatmap of hands or body for each frame with the supervision of the Gaussian map of skeleton keypoints. It indicates where the hands/arms are and highlights these regions. For dynamic attention, we present a fast approximate rank pooling algorithm to learn the accumulated dynamic images, which reduces the time complexity a lot when compared with the traditional rank pooling techniques \cite{bilen2016dynamic,bilen2017action} and thus can give a real-time dynamic image computation. Then with the DSA structure applied, the network can pay attention to the gesture regions spatiotemporally. Our contributions can be summarized as three-fold: (1) We replace the structure-fixed modules in the general network with automatically reconstructed cells via NAS. The cells in the early, middle, and late stages of the network can have different structures and learn the low-level and high-level features more adaptively. (2) We propose a stackable attention structure, called DSA, to generate attention map in both spatial and temporal space. DSA consists of the SAtt and DAtt sub-modules. SAtt highlights the hands/arms features via an online learnable Gaussian skeleton heatmap while DAtt captures the gesture motions via the proposed fast approximate rank pooling algorithm with decreasing the time complexity to a large extent. (3) Extensive experiments that prove the integration of our designs can ultimately improve the performance of gesture recognition. Experiments demonstrate that our method can strike the balance between good performance and low computation burden, and outperform those top techniques on two large-scale gesture datasets. \section{Related Work} \subsection{Evolution of Approaches for Gesture Recognition} The study on gesture taxonomies and representations has been continued for many years. Early methods are often based on handcrafted features \cite{klaser2008spatio,wan20143d}. Recently, the rapid progress of deep learning boosts many deep neural network-based feature extraction methods. The 2D convolutional neural network (CNN) and its derivations combining different branches for RGB and optical flow data \cite{simonyan2014two} are first used for gesture/action recognition tasks. Then some works~\cite{tran2015learning,li2017largea,carreira2017quo} use the 3D CNN for recognizing gestures, whereas some other methods~\cite{zhu2017multimodal,zhang2018attention} employ LSTM and its variants to model the temporal relationships for the gestures. There are also some methods \cite{wang2016largei,wang2018cooperative} exploited the features like dynamic images instead of the raw RGB-D data and used them as the inputs for gesture recognition. Besides the RGB-D data, some other modalities of data like optical flow \cite{li2017largeb,miao2017multimodal} or saliency video \cite{li2017largea,duan2018unified} are also employed for improving the performance. \subsection{Neural Architecture Search in Action Recognition} Our work is driven by Neural Architecture Search (NAS)~\cite{liu2018darts,xu2019pc}. The development of NAS can be summarized in three branches: 1) based on reinforcement learning\cite{zoph2018learning}. 2) based on evolution \cite{real2019regularized,real2017large} and 3) based on gradient \cite{liu2018darts,xu2019pc}. Thanks to the recent high-efficiency and high-precision search methods of NAS, many NAS-based single-modal and multi-modal methods have been applied in action and gesture recognition tasks~\cite{zhang2020sar, yu2020searching}. Peng \emph{et al}.\cite{peng2019video} first attempted to automatically design a neural network for video action recognition tasks through NAS. At the same time, in order to reduce search costs, they introduced a temporal segmentation method that reduced the computational cost without losing global video information. Qiu \emph{et al}.\cite{qiu2017learning} proposed Scheduled Differentiable Architecture Search (DAS), which can efficiently and automatically explore the network structure through gradient descent in images and videos. P{\'e}rez-R{\'u}a \emph{et al}.\cite{perez2019mfas} proposed a general multi-modal neural architecture search method (MFAS) , which solved the problem of finding a good architecture for multi-modal classification problems. Wang \emph{et al}. \cite{wang2020attentionnas} propose a novel search space for spatiotemporal attention cells (AttentionNAS) for video classification tasks. Different from the work of others, we utilize NAS to make the network automatically rebuild the structure of modules in the I3D to capture different levels of feature representations at different layers more adaptively. \begin{figure}[ht] \centering \includegraphics[width=0.8\linewidth]{img/att.pdf} \caption{The detail of DSA module. It has two sub-modules of dynamic attention (DAtt) and static attention (SAtt), which are sequentially combined together.} \label{fig:hsatt} \end{figure} \subsection{Attention Mechanism in Gesture Recognition} Attention mechanism has been wildly used in both low-level and high-level tasks like pose estimation \cite{chu2017multi}, object detection \cite{li2019zoom} and image restoration \cite{li2019lap}. As the interference of backgrounds, the clothes of performers and the diversity of presentation for the same gesture are still the barrier for improving the recognition accuracy, many researchers also employ the attention mechanism to guide the network to focus on the gesture itself through the video. Some methods concentrate on the regions of gesture in each frame. Liu \emph{et al}. \cite{liu2017continuous} leverage the faster R-CNN \cite{ren2015faster} as the hand detector to highlight the corresponding regions. Lin \emph{et al}.~\cite{lin2018large} utilize both detected hands and skeleton information to further focus on the gesture. The work~\cite{narayana2018gesture} uses a focus of attention network (FOANet) to extract global raw data, local left and right hand regions via different networks. The other ones mainly concern about the motion information among frames. In \cite{li2017largeb,miao2017multimodal}, the additional modality of optical flow data is used to capture the movements in videos. Zhang \emph{et al}. \cite{zhang2018attention} explore attention modules used in different gates of the LSTM when incorporating it and the 3D CNNs \cite{tran2015learning}. Although with these techniques the network can focus on the gestures, extra modalities of data served as an input of the network or offline training process for models like hand detector are always inevitable. On the contrary, the attention module of DSA in our method does not require any other data except for the RGB-D ones from the original dataset. The module can also be learned end-to-end within the recognition network, and it makes the network easier to apply to different situations with less time complexity. Meanwhile, since the DSA highlights both body parts in each frame and the movements through the adjacent frames, it facilitates the advantage of the temporal and spatial attention concurrently. \section{Proposed Method} \subsection{Overview of the Network} The pipeline of RAAR3DNet is shown in Fig.\ref{fig:pipeline}. The network takes the I3D network as the backbone, and leverages NAS to automatically find the optimal structure for early, middle and late stage of the network to replace the original shape-fixed Inception Modules. Meanwhile, to better focus on the location and movement information of gesture-related parts like hands and arms, as show in Fig.\ref{fig:hsatt}, a stackable regional attention module DSA is embedded in the network. \subsection{Local Network Structure Search in I3D } \label{sec:net_search} We use PC-darts \cite{xu2019pc}, which based on gradient descent and more efficient than darts \cite{liu2018darts}, to search more efficient architecture for gesture recognition. In the search stage, we search and rebuild more adaptively structures and replace the Inception Modules in the I3D network with them. As shown in Fig.\ref{fig:pipeline}, because the features in different stages of the backbone have different solutions, we design three kinds of cells to learn the different levels of features. Specifically, we replace the first two Inception Modules in the I3D with \textbf{\textit{cell1}}, the middle five Inception Modules with \textbf{\textit{cell2}}, and the last two Inception Models with \textbf{\textit{cell3}}. Each cell represents a directed acyclic graph (DAG) with $k$ nodes $\{ m\}_{i=0}^{k-1}$. Each node indicates an output of a network layer, and each edge $(i, j)$ of the DAG indicates the information flow from node $m_i$ to $m_j$, which consists of the candidate operations weighted by the architecture parameter $\alpha^{(i,j)}$. Different from the I3D network which only employ three operation '$Conv\_1 \times 1 \times 1$', '$Conv\_3 \times 3 \times3$' and '$Max\_pooling\_3\times3\times3$' in the original Inception Module, we add two extra operations: '$Conv\_1 \times 3 \times3$' and '$Conv\_3 \times 1 \times1$' to perform convolution either in spatial or temporal domain only. That is because the size of features in the spatial domain (the height and width of frame) and temporal domain (the number of frames) differ a lot. Consequently, it is not necessary to perform the spatial and temporal convolution together all the time. Besides, a novel operator, dilated convolution '$dil\_3\times3\times3$', is introduced into search space for searching more powerful architecture. So the final search space $\mathcal{O}$ we defined includes seven candidate operations: '$Zero$', '$Identity$', '$dil\_3\times3\times3$', '$Conv\_1 \times 1 \times 1$', '$Conv\_3 \times 3 \times3$', '$Conv\_1 \times 3 \times3$', '$Conv\_3 \times 1 \times1$', where '$Zero$' and '$Identity$'mean no feature flow connection, direct feature flow without any convolution/pooling operations, respectively. '$Conv\_x\times y\times z$' and '$dil\_x\times y\times z$' represent 3D vanilla and dilated convolution that kernel with the size of $x\times y\times z$ , respectively. Similar to the work of \cite{xu2019pc}, the architecture parameters $\alpha^{(i,j)}$ are optimized via the stochastic mini-batch gradient descent algorithm. Specially, for each edge $(i,j)$, we can formulate it by a function $o'^{(i,j)}(\cdot)$ where $o'^{(i,j)}(m_i) = \sum_{o \in \mathcal{O}} \eta_{o}^{(i,j)} ~\cdot ~ o(m_i)$ . Softmax $\eta_{o}^{(i,j)} =\sum_{o\in \mathcal{O} } \frac{exp(\alpha_{o}^{(i,j)})}{\sum_{{o}''\in \mathcal{O}}exp(\alpha_{{o}''}^{(i,j)})}$ is utilized to relax architecture parameter $\alpha^{(i,j)}$ into operation weight $o \in \mathcal{O}$. The intermediate node can be denoted as $m_j = \sum_{i<j}~o'^{(i,j)}(m_i)$. And the output node $m_{k-1}$ concat all the intermediate nodes. The cross-entropy loss is utilized for the training loss $\mathcal{L}_{train}$ and validation loss $\mathcal{L}_{val}$. Then the network parameters $w$ and architecture parameters $\alpha^{(i,j)}$ are learned via solving the bi-level optimization problem: \begin{equation}\label{eq:nas} \begin{split} &\mathop{min}\limits_{\alpha }\quad \mathcal{L}_{val} (w^{*}(\alpha), \alpha), \\ &s.t. \quad w^{*}(\alpha)=arg ~ min_{w}~ \mathcal{L}_{train}(w, \alpha) \end{split} \end{equation} When the search converging, the optimal operation between the pair of node $(i,j)$ can be obtained by replacing each mixed operation $o'^{(i,j)}$ with the most likely operation: $o^{(i,j)}=\arg\max_{o \in \mathcal{O}, o \neq zero} ~\alpha_{o}^{(i,j)}$. \subsection{Dynamic-static Attention} In the DSA module, two kinds of attention are learned by two sub-modules of dynamic attention and static attention, respectively. In the dynamic attention module, we used our proposed fast approximate rank pooling to learn the motion of gestures, whereas a Gaussian guidance heatmap is learned in the static attention module under the train-phase-only supervision of skeleton data. \subsubsection{\textit{Dynamic Attention Sub-module}} The dynamic attention sub-module concerns the effective motion information among frames. We aggregate the intermediate spatiotemporal-structural information into a dynamic image instead of using the 3D manipulation directly like \cite{tran2015learning} to avoid time-consuming processing. To improve efficiency, we propose a fast approximate rank pooling algorithm based on \cite{bilen2016dynamic}, and it can reduces time complexity drastically. {\flushleft \textit{Dynamic Image via Fast Approximate Rank Pooling.}} According to \cite{smola2004tutorial}, the rank pooling map can be obtained via solving a convex optimization problem using the objective function of RankSVM. This process is known as rank pooling~\cite{fernando2017rank}. According to the work\cite{bilen2017action}, the approximation of rank pooling can be defined as: \begin{equation}\label{eq:arp} \mathbf{d}^{*} \propto \sum\limits_{t_1>t_2}{V_{t_1}-V_{t_2}}=\sum\limits_{t=1}^T{\beta_t V_t}, \end{equation} where $T$ is the length of the video clip and $\beta_t=2t-T-1$. $V_t$ is the feature map of time step $t$. The result of Eq.(\ref{eq:arp}) is the dynamic image $DI$. In this computation, the time complexity is related to the number of frames, for a $T$-frame video clip, the time consumption can be up to $T(T-1)...1=T!$, and it is still high when processing a long-term video. \iffalse The rank pooling map can be obtained via solving a convex optimization problem using the objective function of RankSVM~\cite{smola2004tutorial} in Eq.(\ref{eq:rp}): \begin{equation}\label{eq:rp} \begin{split} \mathbf{d^{*}}=&\underset{\mathbf{d}}{\operatorname{argmin}} \{ \frac{\lambda}{2} \| \mathbf{d} \|^2 + \frac{2}{T(T-1)} \times \\ &\sum_{q>t}\operatorname{max}\{ 0, 1-S(q, \mathbf{d}) +S(t, \mathbf{d}) \} \}, \end{split} \end{equation} where $T$ is the video length, the first term is the parameter regularizer in SVM and the second term refers to how many incorrect pairs ranked by the ranking function $S(t,\mathbf{d})$. {\color{blue}{$\forall t_1 > t_2$, if we have $S(t_1, \mathbf{d}) > S(t_2, \mathbf{d})+1$, this pair is considered correctly.}} This process is known as rank pooling~\cite{fernando2017rank}. \fi To simplify the processing of approximating rank pooling, we further study Eq.(\ref{eq:arp}), and achieve the fast approximate rank pooling via computing the relation between the dynamic image of frame $n$ to $m (m>n)$ and that of frame $n+1$ to $m+1$ as: \begin{equation}\label{eq:DInotime} \begin{split} DI(n+1,m+1)=&DI(n,m)+(m-n)\times V(I_n)+ \\ &V(I_{m+1})-2\sum\limits_{l=n+1}^m V(I_l) \end{split} \end{equation} where $I_n$ is the first frame of last dynamic image, and $I_{m+1}$ is the last frame of the current dynamic image. The last term is the overlapped part between two dynamic images. In this way, the computation of dynamic image can be irrelevant to the number of frames. After obtaining the dynamic image, at each time $t$, we do the normalization for the rank parameters as: \begin{equation}\label{eq:rp} DI_{\{c,x,y\}} = \frac{DI_{\{c,x,y\}}-DI_{\rm{min}}}{DI_{\rm{max}}-DI_{\rm{min}}}, \end{equation} where $DI_{(c,x,y)}$ represents the dynamic image at $c$-th channel and the coordinate of $(x,y)$. $DI_{\rm{min}}$ and $DI_{\rm{max}}$ are the minimum and maximum of the dynamic image, respectively. \begin{figure}[ht] \centering \includegraphics[width=0.9\linewidth]{img/heatmapnet.jpg} \caption{The framework of our HeatmapNet used for guidance heatmap generation. With the Gaussian skeleton map derived via OpenPose \cite{cao2017realtime} the ground truth, we learn a heatmap to indicate the hand/arm regions via a lightweight sub-network, which is composed of several cascaded Heatmap Blocks. These blocks can learn a increasingly clear heatmap stage-by-stage. } \label{fig:HeatmapNet} \end{figure} {\flushleft \textit{Structure of Dynamic Attention Sub-module.}} Considering the value of dynamic images varies along with the amplitude of movement, which may be out of the range $[0, 1]$. Therefore, we first apply the normalization to the dynamic images. The batch normalization \cite{ioffe2015batch} is conducted to eliminate the influence of distribution inside a mini-batch: \begin{equation} {DI_{\rm{norm}}(t)} = (\frac{{DI(t)} -E[{DI(t)}]}{\sqrt{Var[{DI(t)}]}}) \times \gamma + \beta, \end{equation} where the expectation $E$ and variance $Var$ are computed over the training data set so that this normalization can consider the data distribution in the mini-batch, $\gamma$ and $\beta$ are the scale and shift parameter of the Batch Normalization layer. We add 1 to each pixel of the guidance map to avoid the zero-value attention map, which may lead a vanishing of feature maps. Then we can get the DAtt guided feature map $O_{D,t}^{l}$ as: \begin{equation}\label{eq:+1} O_{D,t}^{l} = [(DI_{\rm{norm}}^{l} + 1) \odot f_t^{l}] \otimes f_t^{l}. \end{equation} where $O_{D,t}^l$ is the guided feature map of layer $l$ at time step $t$ and $DI_{\rm{norm}}^{l}$ is dynamic gesture feature map of layer $l$ at time step $t$. Then, on each channel of the feature map $f_t^l$ , we use the element-wise product operation $\odot$ to generate the attention map. After that, $O_{D,t}^l$ can be derived by the $1\times 1$ convolution of the corresponding attention map and the feature map $f_t^l$ , which we describe with $\otimes$ in Eq.(\ref{eq:+1}). Finally, the shape of $O_{D,t}^l$ is the same as $f_t^l$. \textit{\textbf{Static Attention Sub-module.}} \label{sec:SAtt} Being aware of the location of hands and arms is important to avoid the interference by gesture-irrelevant factors. Therefore, we try to highlight the location of hands/arms in each frame via the static attention sub-module. It is guided by a heatmap, which is related to the location of keypoints in hands/arms regions. The heatmap is derived from a lightweight online gesture region heatmap generation network – HeatmapNet. \textit{\textbf{HeatmapNet.}} As shown in Fig.\ref{fig:HeatmapNet}, to derive the ground truth of hands/arms' location, we first employ the OpenPose \cite{cao2017realtime} to generate skeleton data from raw RGB videos. Then we obtain the Gaussian skeleton map according to Eq.(\ref{eq:gaussianmap}): \begin{equation}\label{eq:gaussianmap} \mathcal{H}_t = \mathcal{G}(I_t, P_t, \sigma), \end{equation} where $I_t$ and $P_t$ are the input frame and the skeleton points at time $t$, and its corresponding Gaussian map is represented as $\mathcal{H}_t$, which is generated via Gaussian function $\mathcal{G}$ with standard deviation $\sigma$. After having the Gaussian map as the ground truth, the HeatmapNet is used to learn the static guidance heatmap. Considering the cascaded network is always used in high-level vision tasks \cite{newell2016stacked} to learn both global and local cues and refine the details of feature map, we also use a cascaded structure to predict the static guidance map. In each stage of the network, we have a heatmap block (HMBlock) for prediction. The prediction of static guidance map for time step $t$ at stage $s$ can be formulated as: \begin{equation}\label{eq:skblock} \tilde{h}_t^s = \begin{cases} \mathcal{F}_{\theta}(I_t) & s=1\\ \mathcal{F}_{\theta}(I_t, \tilde{h}_t^{s-1}) & s>1, \end{cases} \end{equation} where $\mathcal{F}_{\theta}$ is the residual block with parameter $\theta$. $I_t$ is the input frame at time step $t$ and $\tilde{h}_t^{s-1}$ is the predicted map at the previous stage $s-1$. With the stage-wise learning of the heatmap, the regions related to the gesture can be highlighted more apparently, Finally, the guidance maps in all the stages are combined by averaging via Eq.(\ref{eq:average}): \begin{equation}\label{eq:average} h_{t} = \frac{1}{S}\sum_{s=1}^{S}{\tilde{h}_{t}^{s}}, \end{equation} where $S$ is the number of stages. To better guide the features of gesture in both low-level and high-level, we then generate multi-scale guidance maps by max pooling. The size of these heatmaps is in accord with those of corresponding feature maps. Then the static guidance maps are fed into different layers of the network to highlight the gesture-relevant regions. Here we use MSE loss $\mathcal{L}^{m}_{hm}$ to learn the guidance heatmap. It needs to be emphasized that unlike the previous methods \cite{liu2017continuous,wang2017largei} based on the detection techniques (\emph{i}.\emph{e}., faster R-CNN \cite{ren2015faster}) through the training and test phase, the HeatmapNet is only learned in the training phase, and avoids employing extra input data or complex computation when recognizing gestures. We only use the original skeleton data generated via OpenPose algorithm \cite{cao2017realtime} in the training phase, and in the inference phase, we only need to input the original image without additional skeleton information. And our network can automatically focus on the performer's hands and arms. Meanwhile, The FLOPs of our HMBlock is about $5.51\times10^8$, whereas that of faster R-CNN is about 36 times of ours at $2.02\times10^{10}$. Therefore, the addition of HMBlock in the training phase will not increase the burden of learning too much. Through the SAtt sub-module, we can obtain the guided feature map $O_{S,t}^l$ as Eq.~(\ref{eq:ssatt}): \begin{equation}\label{eq:ssatt} O_{S, t}^{l}=[(h_t^{l}+1)] \odot f_t^{l}] \otimes f_t^{l}, \end{equation} where $O_{S,t}^l$ is the guided feature map of layer $l$ at time step $t$ and $h_t^{l}$ is static gesture heatmaps of layer $l$ at time step $t$. $h_l^t$ is generated via the HeatmapNet. Similar to the dynamic attention sub-module, the processing of "adding 1" to each pixel and the process for shape consistency are also conducted before the element-wise multiplication. \subsection{Network Training\label{sec:train}} The entire network can be trained in an end-to-end manner after overall network architecture is searched out. The main branch of gesture recognition with RGB/depth data is trained together with the branch of HeatmapNet. The parameter of the main branch is learned by minimizing the cross-entropy loss $\mathcal{L}^{m}_{cls}$. Meanwhile, the online heatmap sub-network is trained together to learn a guidance heatmap via the MSE loss $\mathcal{L}^{m}_{hm}$. Then we jointly optimize the entire network with a multi-task loss function. The Loss function can be expressed as: \begin{equation}\label{eq:1st_loss} \begin{split} \mathcal{L}^{m} &= \mathcal{L}^{m}_{cls} + \gamma \mathcal{L}^{m}_{hm} \\ &= -\sum\limits_{k=1}^K p^{m}_k log(\hat{p^{m}_k}) + \gamma ||\mathcal{F}_{\theta}(I^m)-\mathcal{H}||^2, \end{split} \end{equation} where $m$ indicates the modality of data, which can be either RGB or depth. $p_k=\{p_1,p_2,\dots,p_K\}$ is the ground-truth probability distribution of the $k$-th class of the gesture, and $\hat{p_k}$ is its estimation. $\mathcal{H}$ is the ground truth Gaussian skeleton map, and $\mathcal{F}_{\theta}(\cdot)$ is the mapping function the sub-network learning for HMBlocks as mentioned in Section \ref{sec:SAtt}. $\gamma$ is the balancing parameter and we have $\gamma=100$ in this paper. \section{Experiments} \subsection{Datasets} We evaluate our method and compare it with other state-of-the-art methods on two RGB-D gesture datasets: Chalearn IsoGD dataset \cite{wan2016chalearn} and NvGesture dataset \cite{molchanov2016online}. Meanwhile, we also conduct the ablation studies on a hand-centred action dataset, THU-READ dataset \cite{tang2017action,tang2018multi} to show the generality of our network. \subsection{Experimental Setup} Our experiments are all conducted with Pytorch on the NVIDIA RTX 2080 Ti GPU. During the training process, the inputs are spatially resized to $256\times 256$ and then cropped into $224\times224$ randomly in the training stage, and are center cropped into $ 224\times 224$ in the test stage. The data is fed into the network with a mini-batch of 64 samples. For optimization, We use the SGD optimizer to train our network with the weight decay of 0.0003 and the momentum of 0.9. The learning rate is initially fixed as 0.01 and if the accuracy on the validation set not improved every 3 epochs, it is reduced by 10 times. The training work is stopped after 80 epochs or when the learning rate is under 1e-5. \subsection{Comparison with State-of-the-art Methods} Our method is compared with recent state-of-the-art methods on IsoGD and NvGesture dataset. Table \ref{tab:IsoGD} shows the comparison on IsoGD dataset. Since most of methods release their result on the validation subset, we also conduct experiments on it for a fair comparison. \begin{table}[ht] \centering \resizebox{1\linewidth}{!}{ \begin{tabular}{c c c} \toprule Method & Modality & Accuracy (\%) \\ \midrule c-ConvNet \cite{wang2018cooperative} & RGB &36.60\\ C3D-gesture \emph{et al}. \cite{li2017largeb} & RGB & 37.28 \\ AHL \cite{Hu2018Learning} &RGB & 44.88 \\ ResC3D \cite{miao2017multimodal} &RGB &45.07 \\ 3DDSN \cite{duan2018unified} & RGB &46.08 \\ 3DCNN+LSTM \cite{zhang2017learning} & RGB &51.31 \\ attentionLSTM \cite{zhang2018attention} & RGB & 55.98 \\ Redundancy+AttentionLSTM \cite{zhu2019redundancy} & RGB & 57.42 \\ \textbf{RAAR3DNet(Ours)} &RGB &\textbf{62.66} \\ \midrule c-ConvNet \cite{wang2018cooperative} & Depth &40.08\\ C3D-gesture \cite{miao2017multimodal} & Depth & 40.49 \\ ResC3D \cite{li2017largea} &Depth &48.44 \\ AHL \cite{Hu2018Learning} &Depth & 48.96 \\ 3DCNN+LSTM \cite{zhang2017learning} & Depth &49.81 \\ attentionLSTM \cite{zhang2018attention} & Depth & 53.28 \\ Redundancy+AttentionLSTM \cite{zhu2019redundancy} & Depth & 54.18 \\ 3DDSN \cite{duan2018unified} & Depth &54.95 \\ \textbf{RAAR3DNet(Ours)} &Depth &\textbf{60.66} \\ \midrule c-ConvNet \cite{wang2018cooperative} & RGB-D & 44.80\\ AHL \cite{Hu2018Learning} &RGB-D & 54.14\\ 3DCNN+LSTM \cite{zhang2017learning} &RGB-D & 55.29 \\ Redundancy+AttentionLSTM \cite{zhu2019redundancy} & RGB-D & 61.05 \\ \textbf{RAAR3DNet(Ours)} & RGB-D &\textbf{66.62} \\ \bottomrule \end{tabular} } \caption{Results on IsoGD dataset. } \label{tab:IsoGD} \end{table} As can be seen in Table \ref{tab:IsoGD}, our proposed method achieves the best performance on all conditions of using single RGB/depth data and using the fusion of them. For RGB data, our method outperforms the second-best one, \cite{zhu2019redundancy} at about $5\%$, even though their methods are trained with a complex combination of Res3D, Gated convLSTM and 2D CNNs. Ours is also $17\%$ higher than ResC3D \cite{li2017largea}, which achieves 1st place in the 2nd round of Chalearn LAP large-scale isolated gesture recognition challenge. The performance on the depth data is a little lower than that on RGB data. That may because the texture showing the details of fingers is not available in depth data. However, the recognition result on depth data is similar to that on RGB data. Ours also outperform the second-best one, 3DDSN \cite{duan2018unified} about $6\%$. The performance on the fusion RGB-D data also shows the effectiveness of our method, which outperforms Zhu \emph{et al}.'s method at about $5.6\%$. \begin{table}[ht] \centering \resizebox{1\linewidth}{!}{ \begin{tabular}{c c c} \toprule Method & Modality & Accuracy (\%) \\ \midrule HOG+HOG$^2$ \cite{ohn2014hand} &RGB & 24.50 \\ Simonyan \emph{et al}. \cite{simonyan2014two} &RGB & 54.60 \\ Wang \emph{et al}. \cite{wang2016robust} &RGB & 59.10 \\ C3D \cite{tran2015learning} &RGB & 69.30 \\ R3DCNN \cite{molchanov2016online} &RGB & 74.10 \\ GPM \cite{gupta2019progression} &RGB & 75.90 \\ PreRNN \cite{yang2018making} &RGB & 76.50 \\ ResNeXt-101 \cite{kopuklu2019real} &RGB & 78.63 \\ MTUT \cite{abavisani2019improving} &RGB & 81.33 \\ \textbf{RAAR3DNet(Ours)} &RGB &\textbf{85.83}\\ \midrule HOG+HOG$^2$ \cite{ohn2014hand} &Depth & 36.30 \\ SNV \cite{yang2014super} &Depth &70.70 \\ C3D \cite{tran2015learning} &Depth & 78.80 \\ R3DCNN \cite{molchanov2016online} &Depth & 80.30 \\ ResNeXt-101 \cite{kopuklu2019real} &Depth & 83.82 \\ PreRNN \cite{yang2018making} &Depth & 84.40 \\ MTUT \cite{abavisani2019improving} &Depth & 84.85 \\ GPM \cite{gupta2019progression} &Depth & 85.50 \\ \textbf{RAAR3DNet(Ours)} &Depth &\textbf{86.67}\\ \midrule HOG+HOG$^2$ \cite{ohn2014hand} &RGB-D & 36.90 \\ I3D \cite{carreira2017quo} &RGB-D & 83.82 \\ PreRNN \cite{yang2018making} &RGB-D & 85.00 \\ MTUT \cite{abavisani2019improving} &RGB-D & 85.48 \\ GPM \cite{gupta2019progression} &RGB-D & 86.10 \\ \hline human & &88.4 \\ \hline \textbf{RAAR3DNet(Ours)} &RGB-D &\textbf{88.59} \\ \bottomrule \end{tabular} } \caption{Results on the NvGesture dataset.} \label{tab:NVGesture} \end{table} The comparison on NvGesture dataset is shown in Table \ref{tab:NVGesture}. As can be seen, our method can still achieve a competitive result on this dataset. Compared with the method of MTUT \emph{et al}. \cite{molchanov2016online}, which uses a combination of time-consuming models of C3D and LSTM, our network achieves about $4.5\%$ improvement on RGB data. Meanwhile, it outperforms GPM \cite{gupta2019progression}, the second-best result on depth data at about $1.17\%$. The gap between the performance of ours and GPM becomes more significant on the fusion of RGB-D data at $2.49\%$. Noticing that our result is also better than the human recognition accuracy even without auxiliary data like IR as provided in that dataset. It shows the effectiveness of our network architecture searching strategy and the attention module for improving the recognition performance. \begin{figure}[ht] \centering \includegraphics[width=0.40\textwidth]{img/response.pdf} \caption{Visualization of feature maps in the early, middle and late stage of the network. The feature maps from top to bottom are with the I3D, I3D with DSA module and our ultimate RAAR3D network, respectively. } \label{fig:featuremap} \end{figure} \subsection{Ablation Studies} In this section, we perform several groups of experiments to verify the effect of each component of our network, including the idea of automatically searching the architecture of network and the spatiotemporal DSA module. \textit{\textbf{Effect of Network Architecture Searching.}} Here we first compare the performance of the baseline raw I3D network and our proposed network on three different datasets - IsoGD, NvGesture and THU-READ dataset. As shown in Table \ref{tab:i3d}, with a sophisticated network structure that searched via NAS, the performance on three datasets can be about $1\%$ higher than the original I3D network on RGB data and about $2\%$ higher on depth data. To better illustrate the effect of architecture searching, we also visualize the features of the original I3D network and those of the reconstructed network in Fig.\ref{fig:featuremap}. From the visualization result we can clearly find that via searching the optimal structure of network, the response of the background and other gesture-irrelevant regions in the feature maps is decreased significantly. It shows that searching and reconstructing the internal structure of a network architecture can make it more suitable for the specific task and extract more reasonable features. \textit{\textbf{Effect of Attention Mechanism.}} Table \ref{tab:att} shows the influence of different attention schemes. For a fair comparison, we remove other modules and only take the original I3D network as the baseline. We give the result of the original I3D, the network only with dynamic attention or static attention, and finally the entire DSA module. As shown in Table \ref{tab:att}, \begin{table}[ht] \centering \resizebox{0.47\textwidth}{!}{ \begin{tabular}{c|c|c|c|c} \hline \hline \multirow{2}{*}{\diagbox{Dataset}{Network}} &\multicolumn{2}{c|}{I3D} &\multicolumn{2}{c}{RAAR3DNet (w/o DSA)} \\ \cline{2-5} & RGB &Depth & RGB &Depth \\ \hline IsoGD & 59.15\% & 56.64\% & \textbf{61.13}\% &\textbf{58.32} \% \\ NvGesture & 81.67\% &83.12\% & \textbf{82.50}\% &\textbf{85.83}\% \\ THU-READ & 65.50\% & 67.50\% &\textbf{67.92}\% & \textbf{68.75}\% \\ \hline \hline \end{tabular} } \caption{Comparisons with raw I3D and RAAR3DNet on the Gesture and Action dataset.} \label{tab:i3d} \end{table} the DSA module can improve the performance at about 3\% on the basic I3D network, which implies the attention mechanism plays a very important role in the video-based recognition tasks since it can help the network to focus on the most noteworthy regions. Compared with the dynamic attention sub-module, the gain brought by static attention is a little higher. The reason for it may be the details of hands/arms is more important for recognizing some subtle differences. Therefore, the highlight of regions of hands/arms contributes more to the improvement. \section{Conclusion} In this paper, we propose a regional attention with searched architecture 3D network for gesture recognition basing on RGB-D data. We take the I3D network as the backbone, and employ NAS to search the optimal connection among features in different stages of it. In this way, the structure of the network can fit the low-level and high-level features better and improves the recognition result. Meanwhile, we also design a stackable attention module of DSA to guide the network to pay more attention to the hand/arm regions in each frame and the motion trajectory among video sequence. Finally, comparisons with state-of-the-art methods on two gesture datasets prove the effectiveness of the proposed method. \begin{table}[ht] \centering \begin{threeparttable} \begin{tabular}{c|c|c} \hline \multirow{2}{*}{Strategy} &\multicolumn{2}{c}{Recognition Rate} \\ \cline{2-3} & RGB &Depth \\ \hline baseline(I3D) &81.67\% &83.12\% \\ DAtt &83.54\% &84.58\% \\ SAtt &83.75\% &85.21\% \\ DSA(DAtt+SAtt) &\textbf{84.79\%} &\textbf{85.83\%} \\ \hline \end{tabular} \end{threeparttable} \caption{Performance of attention modules on the NVGesture dataset. Where DAtt and SAtt indicate the dynamic attention module and static attention module, respectively.} \label{tab:att} \end{table} \section{Acknowledgments} This work was supported by the Chinese National Natural Science Foundation Projects $\#$61961160704, $\#$61876179, $\#$62002271, $\#$61772396, $\#$61772392, $\#$61902296, the External cooperation key project of Chinese Academy Sciences $\#$ 173211KYSB20200002, the Key Project of the General Logistics Department Grant No.AWS17J001, Science and Technology Development Fund of Macau (No.~0010/2019/AFJ, 0025/2019/AKP), the National Key R\&D Program of China under Grant $\#$2018YFC0807500, the Fundamental Research Funds for the Central Universities $\#$JBF180301, Xi’an Key Laboratory of Big Data and Intelligent Vision $\#$201805053ZD4CG37. \section{Overview} In this supplementary material, we provide a more detailed analysis of our methods and experiments that are not shown in the main paper. we first present the details of the proposed attention modules, including the derivation of the fast approxmiate rank pooling and the operations in each block of SAtt and DAtt, visualize the neural activation maps of them. Finally, we compared the neural activation maps of the I3D and RAAR3DNet networks on the random 10 samples of the NV-Gesture test dataset to further prove the effectiveness of the method that automatically rebuilt structure through the network via NAS. \section{Dynamic-static Attention } \subsection{\textit{Details of the DAtt sub-module}} \label{datt} The details of the derivation of Eq.4, which are not given in the manuscript are as follow: To compute the dynamic image between frame $n$ and $m (m>n)$, according Eq.3 in the manuscript, we have: \begin{small} \begin{equation}\label{Eq:DIn} \begin{split} DI(n,m)& = V(I_{n+1}-I_{n}) \\ & + V(I_{n+2}-I_{n}) + V(I_{n+2}-I_{n+1}) \\ & ... \\ & + V(I_{m}-I_{n}) + V(I_{m}-I_{n+1}) + ... + V(I_{m}-I_{m-1}) \end{split} \end{equation} \end{small} Similarly, the dynamic image between frame $n+1$ and $m+1$ can be: \begin{small} \begin{equation}\label{Eq:DIn+1} \begin{split} DI(n+1,m+1)& = V(I_{n+2}-I_{n+1}) \\ & + V(I_{n+3}-I_{n+1}) + V(I_{n+3}-I_{n+2})\\ & \dots \\ & + V(I_{m+1}-I_{n+1}) + V(I_{m+1}-I_{n+2}) + \\ & \dots + V(I_{m+1}-I_{m}) \end{split} \end{equation} \end{small} Combine Eq.(\ref{Eq:DIn}) and Eq.(\ref{Eq:DIn+1}), we have: \begin{small} \begin{equation}\label{Eq:DIcombine} \begin{split} DI(n+1,m+1)& = DI(n,m) \\ & - V(I_{n+2}-I_{n}) + V(I_{n+2}-I_{n}) + \\ & \dots + V(I_{m}-I_{n}) \\ & + V(I_{m+1}-I_{n+1}) + V(I_{m+1}-I_{n+2}) + \\ &\dots + V(I_{m+1}-I_{m}), \end{split} \end{equation} \end{small} Sort Eq.(\ref{Eq:DIcombine}), then we can derive the computation of $DI(n+1,m+1)$ as: \begin{equation}\label{eq:DInotime} \begin{split} DI(n+1,m+1)=&DI(n,m)+(m-n)\times V(I_n)+ \\ &V(I_{m+1}))-2\sum\limits_{l=n+1}^m V(I_l) \end{split} \end{equation} \begin{figure}[!h] \centering \subfigure[RGB frame]{\includegraphics[width=0.32\linewidth]{img/RGB_1.png}} \subfigure[DAtt map]{\includegraphics[width=0.32\linewidth]{img/RP_1.jpg}} \subfigure[SAtt map]{\includegraphics[width=0.325\linewidth]{img/heatmap1.jpg}} \caption{An example of dynamic image and gaussian skeleton map. (a) Input RGB image; (b) Dynamic image; (c) The static attention map learned from the gaussian skeleton map.} \label{fig:sample1} \end{figure} The size of features and attention maps in the DAtt is shown in Table \ref{tab: DAtt}. The feature $f_t^l$ derived from the previous layer is with the shape of $N \times C \times T \times H \times W$, which are the number of batch size, channel, depth (\emph{i}.\emph{e}., the number of frames for the video), height and weight of the feature map, respectively. For each stage of the network, in order to eliminate the influence of distribution inside a mini-batch, we first apply the normalization to the dynamic images. Take the first block as an example, we perform batch normalization \cite{ioffe2015batch} on input images, and get the output $DI_t^{1}$ with the dimension of $N \times 192 \times 16 \times 28 \times 28$ for batch size, channel, depth, height and weight. And then we use some basic operations (\emph{i}.\emph{e}., Adding 1 to each pixel of the guidance map, element-wise product operation and convolution operation) to achieve the dynamic attention and obtain the output feature map $O_{D,t}^{1}$ with the size of $N \times 192 \times 16 \times 28 \times 28$. For the second to three stages, we did the same operation to fuse the two features, the only difference is that the dimensions of the input SAtt sub-module are different at each stage. As shown in Fig.\ref{fig:sample1}(b), the dynamic image captures the movement of the performer's hands/arms since the pixel of the image is changing in the temporal dimension. \begin{table}[!h] \centering \scalebox{0.8}{ \begin{tabular}{c|c|c|c|c} \hline \hline Module & & &Layer & Output Size \\ \hline \hline \multirow{24}{*}{\textbf{DAtt}}& \multirow{7}{*}{stage1} & $f_t^{1}$& Input & $N \times 192 \times 16 \times 28 \times 28$\\ \cline{3-5} &&\multirow{6}{*}{Block1 } &$DI_t^{1}$& $N \times 192 \times 16 \times 28 \times 28$\\ &&& BatchNorm2d & $N \times 192 \times 16 \times 28 \times 28$ \\ &&&Add 1 & $N \times 192 \times 16 \times 28 \times 28$ \\ &&& $\odot$ & $N \times 192 \times 16 \times 28 \times 28$ \\ &&& $\otimes$ & $N \times 192 \times 16 \times 28 \times 28$ \\ &&& Output & $N \times 192 \times 16 \times 28 \times 28$ \\ \cline{2-5} & \multirow{7}{*}{stage2} & $f_t^{2}$& Input & $N\times 256 \times 8 \times 14 \times 14$\\ \cline{3-5} &&\multirow{6}{*}{Block2 } &$DI_t^{2}$ & $N\times 256 \times 8 \times 14 \times 14$ \\ &&&BatchNorm2d &$N\times 256 \times 8 \times 14 \times 14$ \\ &&&Add 1 & $N\times 256 \times 8 \times 14 \times 14$ \\ &&& $\odot$ &$N\times 256 \times 8 \times 14 \times 14$ \\ &&& $\otimes$ & $N\times 256 \times 8 \times 14 \times 14$ \\ &&& Output & $N\times 256 \times 8 \times 14 \times 14$ \\ \cline{2-5} & \multirow{7}{*}{stage3} & $f_t^{3}$& Input & $N\times 512 \times 4 \times7 \times 7$\\ \cline{3-5} &&\multirow{6}{*}{Block3 } & $DI_t^{3}$ &$N\times 512 \times 4 \times7 \times 7$\\ &&&BatchNorm2d &$N\times 512 \times 4 \times7 \times 7$ \\ &&&Add 1 & $N\times 512 \times 4 \times7 \times 7$ \\ &&& $\odot$ &$N\times 512 \times 4 \times7 \times 7$ \\ &&& $\otimes$ & $N\times 512 \times 4 \times7 \times 7$ \\ &&& Output & $N\times 512 \times 4 \times7 \times 7$ \\ \cline{2-5} \hline \hline \end{tabular} } \caption{Details about the features size in the DAtt sub-module, which is used to capture the motion information among frames. DAtt is embedded in the RAAR3DNet in three stages. } \label{tab: DAtt} \end{table} \subsection{\textit{Details of the SAtt sub-module}} \label{satt} The size of features and attention maps in the SAtt is shown in Table \ref{tab: SAtt}. The features $f_t^l$ from previous DAtt sub-module are with the different shapes in different stage. For each stage of the network, we first generate the static guidance maps through our lightweight network - HeatmapNet, and its dimension is $N \times 1 \times 224 \times 224$ for batch size, channel, height and weight. Take the block 1 as an example, to make its dimension consistent with the dimensions of features $f_t^l$, we change its height and weight to $28$ by max-pooling and extend its depth to $16$ by concatenating the attention map $16$ times. Then we obtain the guidance map $h_t^l$. Owing to the same size between $h_t^l$ and $f_t^l$, similar to DAtt, we also use some basic operations (\emph{i}.\emph{e}., Adding 1 to each pixel of the guidance map, element-wise product operation and convolution operation ) to achieve the static attention and obtain the output feature map $O_t^l$ with the size of $N \times 192 \times 16 \times 28 \times 28$. Then the $O_t^l$ is taken as the input as the succeed next layer's input. For the second to three stages, we did the same operation to fuse the two features, the only difference is that the dimensions of the input next layer are different at each stage. As shown in Fig.\ref{fig:sample1}(c), the static attention mainly helps outline the region of performer‘s hands and arms. \begin{table}[!h] \centering \scalebox{0.8}{ \begin{tabular}{c|c|c|c|c} \hline \hline Module & & &Layer & Output Size \\ \hline \hline \multirow{20}{*}{\textbf{SAtt}}& \multirow{6}{*}{stage1} & $f_t^{1}$& Input & $N \times 192 \times 16 \times 28 \times 28$ \\ \cline{3-5} &&\multirow{5}{*}{Block1 } & $h_t^{1}$ & $N \times 192 \times 16 \times 28 \times 28$ \\ &&&Add 1 & $N \times 192 \times 16 \times 28 \times 28$ \\ &&& $\odot$ & $N \times 192 \times 16 \times 28 \times 28$ \\ &&& $\otimes$ & $N \times 192 \times 16 \times 28 \times 28$ \\ &&& Output & $N \times 192 \times 16 \times 28 \times 28$ \\ \cline{2-5} & \multirow{6}{*}{stage2} & $f_t^{2}$ & Input & $N\times 256 \times 8 \times 14 \times 14$ \\ \cline{3-5} &&\multirow{5}{*}{Block2 } & $h_t^{2}$ & $N\times 256 \times 8 \times 14 \times 14$ \\ &&&Add 1 & $N\times 256 \times 8 \times 14 \times 14$ \\ &&& $\odot$ & $N\times 256 \times 8 \times 14 \times 14$ \\ &&& $\otimes$ & $N\times 256 \times 8 \times 14 \times 14$ \\ &&& Output & $N\times 256 \times 8 \times 14 \times 14$ \\ \cline{2-5} & \multirow{6}{*}{stage3} & $f_t^{3}$ & Input & $N\times 512 \times 4 \times7 \times 7$ \\ \cline{3-5} &&\multirow{4}{*}{Block3 } & $h_t^{3}$ & $N\times 512 \times 4 \times7 \times 7$ \\ &&&Add 1 & $N\times 512 \times 4 \times7 \times 7$ \\ &&& $\odot$ & $N\times 512 \times 4 \times7 \times 7$ \\ &&& $\otimes$ &$N\times 512 \times 4 \times7 \times 7$ \\ &&& Output & $N\times 512 \times 4 \times7 \times 7$ \\ \cline{2-5} \hline \hline \end{tabular} } \caption{Details about the size of features in the SAtt sub-module, which is used to indicate the location of hands and arms in a video frame. Along with the three groups of blocks in the RAAR3DNet, the SAtt sub-module also has three stages, and the shape of data changes in different stages. } \label{tab: SAtt} \end{table} \begin{figure*}[!h] \centering \scalebox{0.9}{ \includegraphics[width=0.9\linewidth]{img/visualize_feature.png} } \caption{Feature visualization from I3D assembled with varied attention modules on the NV-Gesture dataset. The last four rows represent the neural activation with I3D, DAtt, SAtt, and DSA, respectively.} \label{fig:vis_feature} \end{figure*} \section{Visualization and Analysis}\label{sec:heatmap}} \subsection{\textit{Feature Visualization of the Attention Module}} The feature maps of our attention modules are visualized in Fig.\ref{fig:vis_feature}. Comparing with the original I3D, it can be seen that the proposed DAtt and SAtt sub-modules can significantly enhance the spatial and temporal representation, respectively. And our DSA module can finally fuses these two kinds of attention to drive model to focus more on the trajectories arms and hands. Specifically, we find SAtt mainly helps outline the region of performers. Compared with the feature maps without any attention mechanism, the features of SAtt can steadily depict where the body, the arm and the hand of the performer is. The DAtt features, on the other hand, are less related to the outline of performer but closely tied to the intensity of movement. Then the movement paths are highlighted in the DAtt features. In addition, integrating the advantages of SAtt and DAtt, the DSA can have a very significant effect on the appearance of feature maps, which indicates the contextual information of the movement path. The DSA module not only marks the regions related to the gesture, like the arm of the performer, but also distinguishes the ranges of motion at different positions of the video sequence. It effectively avoids the impact of gesture-irrelevant regions, which have a high response in the features without attention mechanism, especially when there is a drastic movement like raising or dropping the arm. Therefore, our DSA module can better guide the network to focus on the hands/arms and give a more accurate prediction. \begin{figure*}[!h] \centering \scalebox{1.0}{ \subfigure[]{\includegraphics[width=0.45\linewidth]{img/I3D_feature1.png}} \subfigure[]{\includegraphics[width=0.45\linewidth]{img/Aut_features1.png}} } \caption{Feature response of the random 10 samples in RGB modality on NV-Gesture test dataset. (a) Neural activation of I3D. (b) Neural activation of RAAR3DNet.} \label{fig:neur_act} \end{figure*} \subsection{\textit{Feature Visualization of the RAAR3DNet}} The feature maps (before Max-pool $3\times3\times3 $ in RAAR3DNet) are visualized in Fig.\ref{fig:neur_act}. Comparing with the original I3D network, it can be seen that the proposed RAAR3DNet are able to capture the movement information from hands and arms, and gesture-irrelevant regions in the feature maps is decreased significantly due to the benefit from the searching and reconstructing the internal structure of a network architecture. \bibliographystyle{aaai21}
\section{Introduction}\label{sec1} Let $A\subset\mathbb{N}_{+}$ be given and take $n\in\mathbb{N}$. By a partition of a non-negative integer $n$ with parts in $A$, we mean any representation of $n$ in the form $$ n=a_{1}+\ldots+a_{k}, $$ where $a_{i}\in A$. In particular, if $A=\mathbb{N}_{+}$, then $p(n)$ is the famous partition function introduced by L. Euler and extensively studied by S. Ramanujan. The function $p(n)$ counts the number of partitions with parts in $\mathbb{N}_{+}$, i.e., unrestricted partitions of $n$. The literature concerning arithmetic properties of functions counting various partitions is enormous. However, the theory is concentrated mainly on the case when the set $A$ is a sum of disjoint arithmetic progressions. In this case, the theory is especially rich because of the connections with modular forms and the general theory of $q$ series (see for example \cite{And1}). One can say that the counting function $A(x)=\#\{a\in A:\;a \leq x\}$ is linear in this case, i.e., $A(x)=O(x)$. There is also a nice theory connected with the set of powers of a fixed integer $m$ (so-called $m$-partitions), i.e., in this case, we have that $A(x)$ has logarithmic growth, i.e., $A(x)=O(\log x)$. On the other side, we know too much about the arithmetic behavior of functions counting partitions into $d$-th powers, where $d\in\mathbb{N}_{\geq 2}$ is fixed. In this case, we have $A=\{k^{d}:\;k\in\mathbb{N}\}$, and thus the growth of $A(x)$ is of the type $x^{1/d}$, and is between two cases mentioned earlier. Let $p_{d}(n)$ denotes the number of partitions of $n$ into $d$-th powers. From the general principles, we know that the ordinary generating function of the sequence $(p_{d}(n))_{n\in\mathbb{N}}$ has the form $$ P_{d}(q)=\sum_{n=0}^{\infty}p_{d}(n)q^{n}=\prod_{n=1}^{\infty}\frac{1}{1-q^{n^{d}}}. $$ Very little is know about the arithmetic properties of the sequence $(p_{d}(n))_{n\in\mathbb{N}}$. It seems that up to date the main line of research was the investigations devoted to asymptotic behavior of $p_{d}(n)$. Let us recall that G. H. Hardy and S. Ramanujan claimed \cite{HR}, and E. Maitland Wright proved \cite{MW}, that $$ \log p_{d}(n)\sim (d+1)\left(\frac{1}{d}\Gamma\left(1+\frac{1}{d}\right)\zeta\left(1+\frac{1}{d}\right)\right)^{\frac{d}{d+1}}n^{\frac{1}{d}}. $$ The proof of Maitland Wright was very complicated and was simplified by R. Vaughan in the case $d=2$ \cite{V}, and in the general case by A. Gafni \cite{AG}. The proofs of Vaughan and Gafni are based on the circle method approach. Note that recently a new proof, used only saddle point method, was presented by G. Tanenbaum, J. Wu, and Y.-L. Li \cite{TWL}. However, according to our best knowledge, besides identities between partitions into $d$-th powers of various types, which can be deduced from simple manipulations of infinite products and recent result of Ciolan \cite{Cio} who proved that the number of partitions into squares with an even number of parts is asymptotically equal to that of partitions into squares with an odd number of parts, there are no theoretical or experimental results. The absence of such studies was the main motivation for our research. Let us describe the content of the paper in some details. In Section \ref{sec2} we prove some congruences for functions counting various type of partitions into $d$-th powers, where $d\in\mathbb{N}_{\geq 2}$. In particular, if $A_{2,p_{2}}(n)$ denotes the denotes the number of partitions into $d$-th powers of integers not divisible by $2$ or $p_{2}$, and $B_{2,p_{2}}(n)$ denotes the number of partitions of $n$ into distinct $d$-th powers not divisible by $p_{2}^{d}$, where each part has one among $2^{d}-1$ colors, then $A_{2,p_{2}}(n)\equiv B_{2,p_{2}}(n)\pmod*{2}$. In Section \ref{sec3}, we present many computational observations based on our computer experiments. In particular, we state several questions and conjectures concerning arithmetic behavior of the sequence $(p_{d}(n))_{n\in\mathbb{N}}$ for $d=2, 3, 4, 5$. \section{A class of congruences}\label{sec2} This short section is devoted to the proof of a class of congruences involving partitions into $d$-th powers under certain restrictions. More precisely, let $p_{1}, p_{2}\in\mathbb{N}_{\geq 2}$ and assume that $(p_{1}, p_{2})=1$. Let $A_{p_{1},p_{2}}(n)$ denote the number of partitions into $d$-th powers of integers not divisible by $p_{1}^{d}$ or $p_{2}^{d}$. It is easy to see that the generating function for the sequence $(A_{p_{1},p_{2}}(n))_{n\in\mathbb{N}}$ is the following $$ \mathcal{A}_{p_{1},p_{2}}(q)=\sum_{n=0}^{\infty}A_{p_{1},p_{2}}(n)q^{n}=\prod_{n=1}^{\infty}\frac{(1-q^{(p_{1}n)^{d}})(1-q^{(p_{2}n)^{d}})}{(1-q^{n^{d}})(1-q^{(p_{1}p_{2}n)^{d}})}. $$ We prove the following \begin{thm}\label{thm2} Let $d\in\mathbb{N}_{+}, n\in\mathbb{N}$ and $p_{1}, p_{2}\in\mathbb{N}_{\geq 2}$. Let $B_{p_{1},p_{2}}(n)$ denote the number of partitions of $n$ into distinct $d$-th powers not divisible by $p_{2}^{d}$, where each part has one among $p_{1}^{d}-1$ colors, and let $C_{p_{1},p_{2}}(n)$ denote the number of partitions of $n$ into $d$-th powers not divisible by $p_{2}^{d}$, where each part has one among $p_{1}^{d}-1$ colors. \begin{enumerate} \item If $p_{1}=2$ and $p_{2}$ is odd, then $A_{2,p_{2}}(n)\equiv B_{2,p_{2}}(n)\pmod*{2}$. \item If $p_{1}\in\mathbb{P}_{\geq 3}$ and $p_{2}\in\mathbb{N}_{\geq 2}, p_{1}\nmid p_{2}$, then for $n\geq 1$ we have $$ \sum_{i=0}^{n}A_{p_{1},p_{2}}(i)C_{p_{1},p_{2}}(n-i)\equiv 0\pmod*{p_{1}}. $$ \end{enumerate} \end{thm} \begin{proof} From the general theory, it is easy to see that the generating functions of the sequences $(B_{p_{1},p_{2}}(n))_{n\in\mathbb{N}}, (C_{p_{1},p_{2}}(n))_{n\in\mathbb{N}}$ are \begin{align*} \mathcal{B}_{p_{1},p_{2}}(q)&=\sum_{n=0}^{\infty}B_{p_{1},p_{2}}(n)q^{n}=\prod_{n=1}^{\infty}\left(\frac{1+q^{n^{d}}}{1+q^{(p_{2}n)^{d}}}\right)^{p_{1}^{d}-1},\\ \mathcal{C}_{p_{1},p_{2}}(q)&=\sum_{n=0}^{\infty}C_{p_{1},p_{2}}(n)q^{n}=\prod_{n=1}^{\infty}\left(\frac{1-q^{(p_{2}n)^{d}}}{1-q^{n^{d}}}\right)^{p_{1}^{d}-1}. \end{align*} To get the proof of our theorem we recall a well known property of formal power series with integer coefficients: if $f\in\mathbb{Z}[[q]]$ and $p$ is a prime number, then for each $k\in\mathbb{N}_{+}$ we have $f(q^{p^{k}})\equiv f(q)^{p^{k}}\pmod*{p}$. Let $p_{1}$ be prime. Using the mentioned property we note the following chain of modulo $p_{1}$ equivalences: \begin{align*} \sum_{n=0}^{\infty}A_{p_{1},p_{2}}(n)q^{n}&=\prod_{n=1}^{\infty}\frac{(1-q^{(p_{1}n)^{d}})(1-q^{(p_{2}n)^{d}})}{(1-q^{n^{d}})(1-q^{(p_{1}p_{2}n)^{d}})}\equiv \prod_{n=1}^{\infty}\frac{(1-q^{n^{d}})^{p_{1}^{d}}(1-q^{(p_{2}n)^{d}})}{(1-q^{n^{d}})(1-q^{(p_{2}n)^{d}})^{p_{1}^{d}}}\\ &\equiv \prod_{n=1}^{\infty}\left(\frac{1-q^{n^{d}}}{1-q^{(p_{2}n)^{d}}}\right)^{p_{1}^{d}-1}\pmod*{p_{1}}. \end{align*} However, if $p_{1}=2$, then we clearly have $$ \prod_{n=1}^{\infty}\left(\frac{1-q^{n^{d}}}{1-q^{(p_{2}n)^{d}}}\right)^{2^{d}-1}\equiv \prod_{n=1}^{\infty}\left(\frac{1+q^{n^{d}}}{1+q^{(p_{2}n)^{d}}}\right)^{2^{d}-1}=\sum_{n=0}^{\infty}B_{2,p_{2}}(n)q^{n} $$ and by comparison of coefficients on both sides of extreme expressions our first result follows. If $p_{1}\geq 3$, then $$ \prod_{n=1}^{\infty}\left(\frac{1-q^{n^{d}}}{1-q^{(p_{2}n)^{d}}}\right)^{p_{1}^{d}-1}=\prod_{n=1}^{\infty}\left(\frac{1-q^{(p_{2}n)^{d}}}{1-q^{n^{d}}}\right)^{1-p_{1}^{d}}=\left(\sum_{n=0}^{\infty}C_{p_{1},p_{2}}(n)\right)^{-1}, $$ and thus $$ \mathcal{A}_{p_{1},p_{2}}(q)\mathcal{C}_{p_{1},p_{2}}(q)\equiv 1\pmod*{p_{1}}. $$ Consequently, by comparison of coefficients on both sides of the above congruence, we get the second part of our theorem. \end{proof} \begin{rem} {\rm If we assume that $p_{1}, p_{2}$ are both primes then performing the same reasoning as in the proof of the theorem above with respect to modulus $p_{2}$ instead of $p_{1}$, then we get an additional congruence $$ \mathcal{A}_{p_{1},p_{2}}(q)\mathcal{C}_{p_{2},p_{1}}(q)\equiv 1\pmod*{p_{2}}. $$ We thus have the following congruence $$ \mathcal{A}_{p_{1},p_{2}}(q)\equiv \frac{a}{C_{p_{1},p_{2}}(q)}+\frac{b}{C_{p_{2},p_{1}}(q)}\pmod*{p_{1}p_{2}}, $$ where $a, b$ are the unique solutions of the system of congruences $$ a\equiv 1\pmod*{p_{1}},\quad a\equiv 0\pmod*{p_{2}},\quad b\equiv 0\pmod*{p_{1}},\quad b\equiv 1\pmod*{p_{1}}. $$ Consequently, we get the congruence $$ \sum_{i_{1}+i_{2}+i_{3}=n}A_{p_{1},p_{2}}(i_{1})C_{p_{1},p_{2}}(i_{2})C_{p_{2},p_{1}}(i_{3})\equiv aC_{p_{2},p_{1}}(n)+bC_{p_{1},p_{2}}(n)\pmod*{p_{1}p_{2}}. $$ } \end{rem} \begin{rem} {\rm It should be noted that the number $A_{2,p_{2}}(n)$ has also a different interpretation. More precisely, if $D_{p_{2}}(n)$ denotes the number of partitions into $d$-th powers of odd integers in which no part appears more then $p_{2}^{d}-1$ times, then $A_{2,p_{2}}(n)=D_{p_{2}}(n)$. Indeed, this can be deduced from the general theorem concerning partition ideals \cite[Theorem 8.4]{And0} or can be directly proved by performing simple manipulations of infinite products. We owe this accurate remark to G. Andrews \cite{And2}. } \end{rem} \section{Questions and conjectures concerning the sequence $(p_{d}(n))_{n\in\mathbb{N}}$}\label{sec3} Let $d\in\mathbb{N}_{\geq 2}$ be fixed. In this section we state some questions and conjectures concerning certain aspects of arithmetic behavior of functions counting $d$-th power partitions. Let us write $$ P_{d}(q)=\prod_{n=1}^{\infty}\frac{1}{1-q^{n^{d}}}=\sum_{n=0}^{\infty}p_{d}(n)q^{n}. $$ Using standard method of logarithmic differentiation we get that $$ q\frac{P_{d}'(q)}{P_{d}(q)}=\sum_{n=1}^{\infty}\frac{n^{d}q^{n^{d}}}{1-q^{n^{d}}}=\sum_{n=1}^{\infty}\sigma^{(d)}(n)q^{n}, $$ where $$ \sigma^{(d)}(n)=\sum_{k^{d}|n}k^{d}, $$ with the usual convention that $\sigma^{(d)}(0)=0$. Consequently, after simple manipulations we get the recurrence relation satisfied by the sequence $(p_{d}(n))_{n\in\mathbb{N}}$: $$ np_{d}(n)=\sum_{i=0}^{n-1}\sigma^{(d)}(i)p_{d}(n-i), \quad p_{d}(0)=1. $$ This formula can be used to compute $p_{d}(n)$ in terms of $p_{d}(i), i<n$. However, even for relative small values of $n$ the computations are slow. It would be interesting whether there exist a different recurrence formula for $p_{d}(n)$ allowing faster computation for big values of $n$. For $d=2, 3, 4, 5$ we computed the coefficients $p_{d}(n)$ for $n\leq 10^{5}$. In order to compute these coefficients we use the following approach. First of all we note that $$ P_{d}(q)-\prod_{i=1}^{\left \lceil 10^{5/d}\right\rceil }\frac{1}{1-q^{i^{d}}}=O(q^{10^{5}+1}), $$ i.e., instead of working with infinite product $P_{d}(q)$, it is enough to work with a rational function. Thus, if we write $$ P_{d,k}(q)=\prod_{i=1}^{k}\frac{1}{1-q^{i^{d}}}=\sum_{n=0}^{\infty}p_{d,k}(n)q^{n}, $$ then $p_{d,k}(n)=p_{d}(n)$ for $n\leq k^{d}$. Note that for fixed $k, d$ the sequence $(p_{d,k}(n))_{n\in\mathbb{N}}$ satisfies linear type sequence. More precisely, we have $p_{d,1}(n)=1$ and for $k\geq 2$ the following relations hold: $$ p_{d,k}(n)=p_{d,k-1}(n),\;\mbox{for}\;n\leq k^{d},\quad p_{d,k}(n)=p_{d,k-1}(n)+p_{d,k}(n-k^d)\;\mbox{for}\;n\geq k^{d}. $$ We used the above observation to compute $p_{d}(n)$ for $d=2$ and $n\leq 10^5$ and $p_{d}(n)$ for $d=3, 4, 5$ and $n\leq 10^{6}$. Thus, in order to compute $p_{2}(n)$ for $n\leq 10^{5}$ we need to take $k=\lceil 10^{5/2}\rceil=317$. Similarly, in order to compute $p_{d}(n)$ for $d=3, 4, 5$ for $n\leq 10^6$ we take $k=10^2, 32, 16$, respectively. All computations were performed on a typical laptop with 16 GB of memory and i7 type processor. Based on our data we formulate several question and conjectures. We start with the following natural \begin{conj}\label{conjP0} Let $d\in\mathbb{N}_{\geq 2}$ and $m\in\mathbb{N}_{\geq 2}$ be given, and take $r\in\{0,\ldots,m-1\}$. Then there are infinitely many values of $n\in\mathbb{N}$ such that $p_{d}(n)\equiv r\pmod*{m}$. \end{conj} The next question concerns asymptotic behavior of the number of solutions of the congruence $p_{d}(n)\equiv r\pmod*{m}$, where $m\in\mathbb{N}_{\geq 2}$ and $r\in\{0,\ldots,m-1\}$. \begin{ques}\label{quesP1} Let $d\in\mathbb{N}_{\geq 2}$ and $m\in\mathbb{N}_{\geq 2}$ be given, and take $r\in\{0,\ldots,m-1\}$. Do the values of $p_{d}(n)\bmod{m}$ are equidistributed modulo $m$? More precisely, does the equality \begin{equation*} \limsup_{N\rightarrow +\infty}\frac{\#\{n\leq N:\;p_{d}(n)\equiv r\pmod*{m}\}}{N}=\frac{1}{m}. \end{equation*} hold? \end{ques} This is very difficult question. We do not even know any equidistribution modulo $m$ result for the classical partition function $p(n)=p_{1}(n)$ for any $m$. In fact, the expectation is that for $m$ co-prime to 6 the values of $p_{1}(n)\bmod{m}$ are not equidistributed. However, it is not clear what to expect in our situation because there is not connections to modular forms and Galois representations as in case of classical partition function. However, our computations of the quantities $$ \#\{n\leq m_{d}:\;p_{d}(n)\equiv r\pmod*{m}\} $$ for $d=2, 3, 4, 5$ seems to confirm Conjecture \ref{conjP0} and the equality stated in Question \ref{quesP1} (at least for $m\leq 10$). See the Table 1, Table 2, Table 3 and Table 4, below. \begin{equation*} \begin{array}{c||cccccccccc} \hline m\backslash r & 0 & 1 & 2 &3 &4 &5 &6 & 7& 8 & 9 \\ \hline \hline 2 & 50299 & 49702 & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} \\ 3 & 33373 & 33249 & 33379 & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} \\ 4 & 25252 & 24695 & 25047 & 25007 & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} \\ 5 & 19940 & 20125 & 19971 & 19955 & 20010 & \text{} & \text{} & \text{} & \text{} & \text{} \\ 6 & 16769 & 16454 & 16735 & 16604 & 16795 & 16644 & \text{} & \text{} & \text{} & \text{} \\ 7 & 14121 & 14272 & 14320 & 14401 & 14257 & 14301 & 14329 & \text{} & \text{} & \text{} \\ 8 & 12679 & 12288 & 12496 & 12371 & 12573 & 12407 & 12551 & 12636 & \text{} & \text{} \\ 9 & 11158 & 11081 & 11033 & 10941 & 11186 & 11239 & 11274 & 10982 & 11107 & \text{} \\ 10 & 10001 & 10025 & 10024 & 9866 & 10085 & 9939 & 10100 & 9947 & 10089 & 9925 \\ \hline \end{array} \end{equation*} \begin{center} Table 1. Values of $\#\{n\leq 10^{5}:\;p_{2}(n)\equiv r\pmod*{m}\}$ for $0\leq r\leq m-1\leq 9$. \end{center} \begin{equation*} \begin{array}{c||cccccccccc} \hline m\backslash r& 0 & 1 & 2 &3 &4 &5 &6 & 7& 8 & 9 \\ \hline \hline 2 & 500013 & 499988 & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} \\ 3 & 333942 & 333563 & 332496 & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} \\ 4 & 250099 & 249905 & 249914 & 250083 & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} \\ 5 & 199907 & 200126 & 200490 & 199879 & 199599 & \text{} & \text{} & \text{} & \text{} & \text{} \\ 6 & 167109 & 166685 & 166026 & 166833 & 166878 & 166470 & \text{} & \text{} & \text{} & \text{} \\ 7 & 142501 & 142721 & 142969 & 143340 & 142937 & 142913 & 142620 & \text{} & \text{} & \text{} \\ 8 & 125203 & 124636 & 125023 & 125198 & 124896 & 125269 & 124891 & 124885 & \text{} & \text{} \\ 9 & 111451 & 111275 & 111186 & 111459 & 110992 & 110438 & 111032 & 111296 & 110872 & \text{} \\ 10 & 100033 & 100134 & 100021 & 99625 & 99713 & 99874 & 99992 & 100469 & 100254 & 99886 \\ \hline \end{array} \end{equation*} \begin{center} Table 2. Values of $\#\{n\leq 10^{6}:\;p_{3}(n)\equiv r\pmod*{m}\}$ for $0\leq r\leq m-1\leq 9$. \end{center} \begin{equation*} \begin{array}{c||cccccccccc} \hline m\backslash r& 0 & 1 & 2 &3 &4 &5 &6 & 7& 8 & 9 \\ \hline \hline 2 & 500517 & 499484 & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} \\ 3 & 333153 & 333474 & 333374 & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} \\ 4 & 250463 & 249010 & 250054 & 250474 & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} \\ 5 & 200555 & 199837 & 199524 & 200091 & 199994 & \text{} & \text{} & \text{} & \text{} & \text{} \\ 6 & 166388 & 166699 & 167354 & 166765 & 166775 & 166020 & \text{} & \text{} & \text{} & \text{} \\ 7 & 143174 & 142713 & 143172 & 142658 & 142908 & 142621 & 142755 & \text{} & \text{} & \text{} \\ 8 & 125224 & 124544 & 125595 & 125373 & 125239 & 124465 & 124459 & 125101 & \text{} & \text{} \\ 9 & 111012 & 111100 & 111214 & 111263 & 111238 & 111071 & 110878 & 111136 & 111089 & \text{} \\ 10 & 100310 & 99810 & 99660 & 99706 & 100135 & 100245 & 100027 & 99864 & 100385 & 99859 \\ \hline \end{array} \end{equation*} \begin{center} Table 3. Values of $\#\{n\leq 10^{6}:\;p_{4}(n)\equiv r\pmod*{m}\}$ for $0\leq r\leq m-1\leq 9$. \end{center} \begin{equation*} \begin{array}{c||cccccccccc} \hline m\backslash r& 0 & 1 & 2 &3 &4 &5 &6 & 7& 8 & 9 \\ \hline \hline 2 & 500386 & 499615 & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} \\ 3 & 334253 & 332498 & 333250 & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} \\ 4 & 249768 & 249985 & 250618 & 249630 & \text{} & \text{} & \text{} & \text{} & \text{} & \text{} \\ 5 & 199971 & 199526 & 200089 & 200380 & 200035 & \text{} & \text{} & \text{} & \text{} & \text{} \\ 6 & 167002 & 166054 & 166940 & 167251 & 166444 & 166310 & \text{} & \text{} & \text{} & \text{} \\ 7 & 143141 & 142701 & 142907 & 143029 & 142768 & 143046 & 142409 & \text{} & \text{} & \text{} \\ 8 & 124187 & 125010 & 125168 & 125302 & 125581 & 124975 & 125450 & 124328 & \text{} & \text{} \\ 9 & 111905 & 111078 & 110740 & 110779 & 111233 & 111095 & 111569 & 110187 & 111415 & \text{} \\ 10 & 100264 & 99955 & 100250 & 100380 & 100301 & 99707 & 99571 & 99839 & 100000 & 99734 \\ \hline \end{array} \end{equation*} \begin{center} Table 4. Values of $\#\{n\leq 10^{6}:\;p_{5}(n)\equiv r\pmod*{m}\}$ for $0\leq r\leq m-1\leq 9$. \end{center} In the context of classical partition function of Euler, i.e., $p(n)=p_{1}(n)$, where there are plenty of triples $a, b, m$, where $m\in\mathbb{N}_{\geq 5}$ and $a, b\in\mathbb{N}_{+}$, such that $p(an+b)\equiv 0\pmod*{m}$ for all $n\in\mathbb{N}$, one can ask the following: \begin{ques} Let $d\in\mathbb{N}_{\geq 2}$ be fixed. Does there exist $m\in\mathbb{N}_{\geq 2}, r\in\{0,\ldots, m-1\}$, and positive integers $a, b$ such that for each $n\in\mathbb{N}$ we have $p_{d}(an+b)\equiv r\pmod*{m}$? \end{ques} In the considered range we were unable to find a single quadruple $(m, r, a, b)$ and $d\in\{2,3,4,5\}$ such that $p_{d}(an+b)\equiv r\pmod*{m}$ for $n=0,1\ldots, 100$. In order to guarantee that $100a+b\leq 10^{5}$ we considered the range $a\in\{2,\ldots, 999\}, b\in\{0,\ldots, a-1\}$. This may suggest that even if there are quadruplets $(m, r, a, b)$ such that $p_{d}(an+b)\equiv r\pmod*{m}$ for all $n$, they are rare. \bigskip Let us recall that a sequence $(a_{n})_{n\in\mathbb{N}}$ is convex, if $2a_{n}\leq a_{n-1}+a_{n+1}$ for $n\geq 1$. We formulate the following general \begin{conj} Let $d\in\mathbb{N}_{\geq 2}$. Then there is an integer $N_{d}$ such that for all $n\geq N_{d}$ we have $2p_{d}(n)\leq (p_{d}(n-1)+p_{d}(n+1))\left(1-\frac{1}{n^d}\right)$. In particular the sequence $(p_{d}(n))_{n\geq N_{d}}$ is convex. \end{conj} The above conjecture can be seen as a natural generalization of log-concavity of the classical partition function $p(n)=p_{1}(n)$. We checked that $$ 2p_{2}(n)\leq (p_{2}(n-1)+p_{2}(n+1))\left(1-\frac{1}{n^2}\right)\quad\mbox{for} \quad n\in\{379, \ldots, 10^{5}-1\}, $$ and $$ 2p_{3}(n)\leq (p_{3}(n-1)+p_{3}(n+1))\left(1-\frac{1}{n^3}\right)\quad\mbox{for} \quad n\in\{6769, \ldots, 10^{6}-1\}, $$ and $$ 2p_{4}(n)\leq (p_{4}(n-1)+p_{4}(n+1))\left(1-\frac{1}{n^4}\right)\quad\mbox{for} \quad n\in\{239603, \ldots, 10^{6}-1\}, $$ i.e., we believe that $N_{2}=379, N_{3}=6769, N_{4}=239603$. It seems that the number $N_{5}$ (if is exists) is $\geq 10^{6}$. \bigskip Let us recall that a sequence $(a_{n})_{n\in\mathbb{N}}$ of positive reals is log-concave, if $a_{n}^{2}\geq a_{n-1}a_{n+1}$ for $n\geq 1$, i.e., the sequence $(-\log a_{n})_{n\in\mathbb{N}}$ is convex. We formulate the following general. \begin{conj} Let $d\in\mathbb{N}_{\geq 2}$. Then there is an integer $M_{d}$ such that for all $n\geq M_{d}$ we have $$ p_{d}^{2}(n)\geq p_{d}(n-1)p_{d}(n+1)\left(1+\frac{1}{n^{d}}\right). $$ In particular the sequence $(p_{d}(n))_{n\geq M_{d}}$ is log-concave. \end{conj} We checked that $$ p_{2}^{2}(n)\geq p_{2}(n-1)p_{2}(n+1)\left(1+\frac{1}{n^{2}}\right)\quad\mbox{for} \quad n\in\{1086, \ldots, 10^{5}-1\}, $$ and $$ p_{3}^{2}(n)\geq p_{3}(n-1)p_{3}(n+1)\left(1+\frac{1}{n^{3}}\right)\quad\mbox{for} \quad n\in\{15656, \ldots, 10^{6}-1\}, $$ and $$ p_{4}^{2}(n)\geq p_{4}(n-1)p_{4}(n+1)\left(1+\frac{1}{n^{4}}\right)\quad\mbox{for} \quad n\in\{637855, \ldots, 10^{6}-1\}, $$ i.e., we believe that $M_{2}=1042, M_{3}=15656, M_{4}=637855$. It seems that the number $ M_{5}$ (if it exists) is $\geq 10^{6}$. It is very likely that using the classical asymptotic formula for $p_{d}(n)$ of Wright \cite{MW} or its current improvements, the above conjecture can be resolved. It should be noted that an analogous result for Euler partition function $p(n)$, i.e., the case of $d=1$ of the above conjecture, was proved by DeSalvo and Pak \cite{DeSP} and recently generalized by Hou and Zhang \cite{HZ}.
\section{Introduction} A strongly regular graph (SRG) with parameters $(v,\,k,\,\lambda,\,\mu)$ is an undirected graph with $v$ vertices, each one has $k$ edges and every two adjacent or non-adjacent vertices have $\lambda$ or $\mu$ common neighbours respectively. A special subset of SRG are conference graphs with parameters $k = \frac{v-1}2$, $\lambda = \frac{v-5}4$ and $\mu = \frac{v-1}4$. Conference graphs are related to symmetric conference matrices, i.e., matrices $C$ with 0 on the diagonal and $\pm1$ off the diagonal such that $C^2 = (n-1)I_n$, where $n$ is the order of $C$ and $I_n$ is the identity matrix of order $n$. An existence of a SRG for given parameters is a question of a great interest. There are several necessary conditions, however, for many parameters it is unknown whether there is such a SRG. All feasible sets with $v\leqslant 1300$ with constructions for known graphs are tracked at Andries Brouwer's website \cite{brouwer}. Until recently, the smallest unknown case was a conference graph with the parameters $(65,\,32,\,15,\,16)$. Denote $J_n$ a matrix of order $n$ consisting of ones, $c_n(x) = 1+x+x^2+\ldots+x^{n-1}$. It is well known that if $A$ is an adjacency matrix of a SRG with the parameters $(v,\,k,\,\lambda,\,\mu)$, it must satisfy the equations \begin{equation} \label{main_eq} A^2 + (\mu - \lambda) A = (k - \mu)I_n + \mu J_n,\;\;\;\; AJ_n = k J_n, \end{equation} where $n = v$. Also denote $M_n(R)$ a ring of matrices of order $n$ over a ring $R$. \section{Circulant matrices and matrix blocks} Suppose we a trying to find some solution of a matrix equation, but iterating over all possible matrices would take too much time. We can try to search for a matrix with some specific structure, for example, we can suppose it consists of circulant blocks. In this section we'll see how to represent such matrices as polynomial matrices of a smaller order. It might be easier to search for solutions having this specific form, but there is no guarantee that such a solution would exist, even if there is a solution of the original equation. Suppose we have two circulant matrices $B,\,C \in M_m(\Z)$, i.e. $B_{ij} = b_{(i-j)\!\!\! \mod m}$ and $C_{ij} = c_{(i-j)\!\!\! \mod m}$. There is a one-to-one correspondence between such matrices and polynomials in $\Z[x]/(x^m-1)$, namely, $B$ and $C$ correspond to $b(x) = \sum\limits_{i=0}^{m-1} b_i x^i$ and $c(x) = \sum\limits_{i=0}^{m-1} c_i x^i$ respectively. Note that the product $BC$ is also a circulant matrix with the corresponding polynomial $b(x) c(x) \pmod{x^m-1}$. Now, if a matrix $B \in M_{lm}(\Z)$ can be split into $l\times l$ blocks, where each block $B_{ij} \in M_m(\Z)$ is circulant, we consider the matrix $B(x) \in M_l(\Z[x] / (x^m-1))$ consisting of the polynomials $b_{ij}(x)$ corresponding to these blocks $B_{ij}$. If another matrix $C \in M_{lm}(\Z)$ has the same structure and corresponds to $C(x) \in M_l(\Z[x] / (x^m-1))$, their product $BC$ also has the same structure, i.e., consists of $l\times l$ circulant blocks, and its corresponding polynomial matrix is $B(x)\cdot C(x) \pmod{x^m-1}$. For example, consider the adjacency matrix $B$ of the Petersen graph, a SRG with the parameters $(10,\,3,\,0,\,1)$. $$ \left( \begin{array}{ccccc|ccccc} 0 & 1 & 0 & 0 & 1 & 1 & 0 & 0 & 0 & 0 \\ 1 & 0 & 1 & 0 & 0 & 0 & 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 1 & 0 & 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 & 1 & 0 & 0 & 0 & 1 & 0 \\ 1 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 1 \\ \hline 1 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 1 & 0 \\ 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 1 \\ 0 & 0 & 1 & 0 & 0 & 1 & 0 & 0 & 0 & 1 \\ 0 & 0 & 0 & 1 & 0 & 1 & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 1 & 0 & 1 & 1 & 0 & 0 \\ \end{array} \right) $$ Note that $B^2 + B = 2I_{10} + J_{10}$, and that $B$ consists of 4 blocks $5\times5$, each one is a circulant matrix corresponding to the polynomials $x+x^4$, $1$, $1$, and $x^2+x^3$ respectively. So the matrix $B$ can be `compacted' to $$ B(x) = \begin{pmatrix} x+x^4 & 1 \\ 1 & x^2 + x^3 \\ \end{pmatrix} $$ such that $B^2(x) + B(x) \equiv 2I_2 + c_5(x) J_2 \pmod{x^5-1}$. Note that if a `compacted' matrix can be split into circulant blocks too, we can repeat this procedure, using a different polynomial variable. To illustrate this, consider the Hoffman–Singleton graph, a SRG with the parameters $(50,\,7,\,0,\,1)$. For brevity we won't write its adjacency matrix here, but note it can be compacted to $$ B(x,\,y) = \begin{pmatrix} x+x^4 & 1 + x (y + y^4) + x^4 (y^2 + y^3) \\ 1 + x^4 (y + y^4) + x (y^2 + y^3) & x^2 + x^3 \\ \end{pmatrix} $$ such that $B^2(x,\,y) + B(x,\,y) \equiv 6I_2 + c_5(x)c_5(y)J_2 \pmod{x^5-1,\,y^5-1}$. Taking its $y$-coefficients, we can expand it to the larger matrix $B(x) \in M_{10}(\Z[x] / (x^5-1))$ such that $B^2(x) + B(x) \equiv 6I_{10} + c5(x)J_{10} \pmod{x^5-1}$. $B(x)$ in turn can be expanded to $B \in M_{50}(\Z)$ such that $B^2 + B = 6I_{50} + J_{50}$. Since $B$ is also a symmetric matrix consisting of zeros and ones and $BJ_{50} = 7J_{50}$, it is the adjacency matrix of a SRG with the parameters $(50,\,7,\,0,\,1)$. So if we a searching for some solution of some matrix equation, say, $A^2 + pA = qI_n + rJ_n$, where $n = ml$, we can try to search for a matrix consisting of $l\times l$ circulant blocks, and to reduce this matrix equation to $A^2(x) + pA(x) \equiv qI_l + r\,c_m(x)J_l \pmod{x^m-1}$. We can also consider this congruence modulo some factors of $x^m-1$, for example, $x-1$. Of course if we want $A$ to consist only of zeros and ones, polynomial coefficients of $A(x)$ must also be zeros and ones. Furthermore, if we are looking for a symmetric matrix, $A(x)$ must satisfy the congruence $A^T(x) \equiv A(x^{m-1}) \pmod{x^m-1}$, in other words, $A_{ji}(x) \equiv A_{ij}(x^{m-1})\pmod{x^m-1}$. \section{Searching for $srg(65,\,32,\,15,\,16)$} Now let's search for a SRG with the parameters $(65,\,32,\,15,\,16)$. Its adjacency matrix $A \in M_{65}(\Z)$ must satisfy the equations $A^2 + A = 16I_{65} + 16J_{65}$ and $AJ_{65} = 32J_{65}$, according to (\ref{main_eq}). Keeping the previous section in mind, we can suppose that $A$ can be split into $5\times5$ circulant blocks; or in $13\times13$ circulant blocks; or that the whole $A$ is circulant. Unfortunately, neither approach works. In the first case $A$ is reduced to a matrix $A_5(x) \in M_5(\Z[x] / (x^{13}-1))$ such that $$ A^2_5(x) + A_5(x) \equiv 16I_5 + 16c_{13}(x) J_5 \pmod{x^{13}-1}. $$ By taking $x = \zeta_{13} = e^{2\pi i/13}$, we get $A^2_5(\zeta_{13}) + A_5(\zeta_{13}) = 16I_5$. The eigenvalues of $A_5(\zeta_{13})$ are the solutions of the equation $\lambda^2 + \lambda = 16$, i.e., $\frac{-1\pm\sqrt{65}}2$. Thus $tr(A_5(\zeta_{13})) = k \frac{-1+\sqrt{65}}2 + (5-k) \frac{-1-\sqrt{65}}2$, where $0\leqslant k\leqslant 5$, and for any such $k$ $tr(A_5(\zeta_{13})) \in \Q(\sqrt{65})\setminus \Q$. On the other hand, $tr(A_5(x)) \in \Z[x]$, so $tr(A_5(\zeta_{13})) \in \Z[\zeta_{13}]$. However, one can easily check that $\sqrt{65} \notin\Q(\zeta_{13})$. Similarly, $A$ can't consist of $13\times13$ circulant blocks, as $\sqrt{65}\notin\Q(\zeta_5)$. If $A$ itself is circulant, it corresponds to a polynomial $a(x) \in \Z[x]/(x^{65}-1)$, where $a^2(x) + a(x) \equiv 16 + 16c_{65}(x) \pmod{x^{65}-1}$. Once again we can take $x = \zeta_5$ and conclude there is no such matrix. Instead, let's try the following modification. The first row of $A$ has 32 ones, so without loss of generality we may assume $A_{1j}=1$ for $2\leqslant j\leqslant33$ and $A_{1j}=0$ for $34\leqslant j\leqslant65$. Denote $B=(1\,1\,\ldots\,1\,0\,0\,\ldots\,0) = (A_{1j})$, $2\leqslant j\leqslant65$, $C=(A_{ij})\in M_{64}(\Z)$, $i,j\geqslant2$. Then the matrix $A$ can be written as $$ \begin{pmatrix} 0 & B \\ B^T & C \\ \end{pmatrix} $$ The equality $A^2 + A = 16I_{65} + 16J_{65}$ holds iff the following 3 equalities hold: \begin{equation} \label{components_64} \begin{cases} 0^2 + B B^T + 0 = 32 \\ 0 B + BC + B = 16 J_{1,64} \\ B^T B + C^2 + C = 16 I_{64} + 16J_{64} \\ \end{cases} \end{equation} Here $J_{1,64}$ is the matrix of size $1\times64$ consisting of ones. The first equality of (\ref{components_64}) obviously holds. The second is equivalent to \begin{equation} \label{partial_sums_C1} \sum\limits_{i=1}^{32} C_{ij} = \begin{cases} 15, & j \leqslant 32, \\ 16, & j \geqslant 33. \\ \end{cases} \end{equation} Since we also need $AJ_{65} = 32J_{65}$, it follows from (\ref{partial_sums_C1}) that \begin{equation} \label{partial_sums_C2} \sum\limits_{i=33}^{65} C_{ij} = 16\;\;\forall j \end{equation} Denote $H_{64} = 16J_{64} - B^T B$, the matrix consisting of 4 blocks $15J_{32}$, $16J_{32}$, $16J_{32}$, and $16J_{32}$. Also denote $H_{2n} \in M_{2n}(\Z)$ the matrix consisting of 4 blocks $15J_{n}$, $16J_{n}$, $16J_{n}$, and $16J_{n}$. The last equation of (\ref{components_64}) can be rewritten as $$ C^2 + C = 16I_{64} + H_{64}, $$ and now we'll apply the method described in the previous section to this equation. Suppose $C$ consists of $4\times4$ circulant blocks of order 16, i.e. it can be `compacted' to $C(x) \in M_4(\Z[x]/(x^{16}-1))$ such that \begin{equation} \label{c_pmod_eq} C^2(x) + C(x) \equiv 16I_4 + c_{16}(x)H_4 \pmod{x^{16}-1}. \end{equation} Let's take this congruence modulo $x-1$ first: $$ C^2(1) + C(1) = 16I_4 + 16H_4 $$ As all polynomial coefficients of $C(x)$ must be zeros or ones, elements of $C(1)$ must be non-negative integers. By a simple brute-force one can find there are just four such matrices, two of them are \begin{equation} \label{matrices_c1} C(1) = \begin{pmatrix} 7 & 8 & 6 & 10 \\ 8 & 7 & 10 & 6 \\ 6 & 10 & 8 & 8 \\ 10 & 6 & 8 & 8 \\ \end{pmatrix}, \begin{pmatrix} 9 & 6 & 7 & 9 \\ 6 & 9 & 9 & 7 \\ 7 & 9 & 6 & 10 \\ 9 & 7 & 10 & 6 \\ \end{pmatrix}, \end{equation} and the other two are obtained from these two by permuting the third and the fourth rows and columns, so we won't consider them. Note that if we successfully expand such matrices into $C\in M_{64}(\Z)$, the equalities (\ref{partial_sums_C1}) and (\ref{partial_sums_C2}) will hold. Next, we consider the congruence (\ref{c_pmod_eq}) modulo $x+1$. $$ C^2(-1) + C(-1) = 16I_4. $$ If $f(x)\in\Z[x]$ is any polynomial with non-negative coefficients and $f(1)=a$ is known, $f(-1)$ must be a value from $-a$ to $a$ of the same parity, i.e. $f(-1)\in\{-a,\,-a+2,\,-a+4,\,\ldots,\,a-2,\,a\}$. So if we know the matrix $C(1)$, we can search for the matrix $C(-1) \equiv C(1) \pmod2$ with coefficients less or equal to those of $C(1)$ in absolute values. Using a brute-force approach, we find that each matrix in (\ref{matrices_c1}) produces 32 possible matrices $C(-1)$; we can keep only 10 of them for the first and 10 for the second, the rest will be their permutations. For brevity we won't list them all, just one of them obtained from the second matrix (\ref{matrices_c1}): \begin{equation} \label{example_cm1} C(-1) = \begin{pmatrix} 1 & -2 & -3 & -1 \\ -2 & 1 & -1 & -3 \\ -3 & -1 & -2 & 2 \\ -1 & -3 & 2 & -2 \\ \end{pmatrix} \end{equation} Next, we consider the congruence (\ref{c_pmod_eq}) modulo $x^2+1$, trying to find possible values of $C(i)$. $$ C^2(i) + C(i) = 16I_4. $$ Again, if $f(x)\in\Z[x]$ has non-negative coefficients and we know $f(1)=a$ and $f(-1)=b\equiv a\pmod2$, possible values of $f(i)$ have the real part in $\{-\frac{a+b}2,\,-\frac{a+b}2+2,\, \ldots,\,\frac{a+b}2-2,\,\frac{a+b}2\}$ and the imaginary part in $\{-\frac{a-b}2,\,-\frac{a-b}2+2 ,\,\ldots,\,\frac{a-b}2-2,\,\frac{a-b}2\}$. Again, we use brute-force to find possible matrices $C(i)$, given $C(1)$ and $C(-1)$. Recall that in order for the final matrix $C$ to be symmetric, we need $C^T(x) \equiv C(x^{15}) \pmod{x^{16}-1}$, therefore $C(i) = C^T(-i)$. It turns out there are 1422 possible values of $C(i)$ for the first matrix in (\ref{matrices_c1}) and 1224 for the second. One of $C(i)$ corresponding to (\ref{example_cm1}) is \begin{equation} \label{example_ci} C(i) = \begin{pmatrix} 1 & -2 & -i & -3 i \\ -2 & 1 & -3 i & -i \\ i & 3 i & -2 & 2 \\ 3 i & i & 2 & -2 \\ \end{pmatrix} \end{equation} Similarly, given $C(1)$, $C(-1)$ and $C(i)$, we find possible matrices $C(\zeta_8)$, where $\zeta_8 = \frac{\sqrt2(1+i)}2$, such that $$ C^2(\zeta_8) + C(\zeta_8) = 16I_4 $$ and $C^T(\zeta_8) = C(-\zeta_8^3)$. One of possible values corresponding to (\ref{example_cm1}) and (\ref{example_ci}) is $$ C(\zeta_8) = \begin{pmatrix} -1 - 2 \zeta_8 + 2 \zeta_8^3 & 2 \zeta_8^2 & -1 + \zeta_8^2 - \zeta_8^3 & \zeta_8 \\ -2 \zeta_8^2 & -1 + 2 \zeta_8 - 2 \zeta_8^3 & -\zeta_8 & 1 - \zeta_8^2 - \zeta_8^3 \\ -1 + \zeta_8 - \zeta_8^2 & \zeta_8^3 & 2 \zeta_8 - 2 \zeta_8^3 & -2 \zeta_8^2 \\ -\zeta_8^3 & 1 + \zeta_8 + \zeta_8^2 & 2 \zeta_8^2 & -2 \zeta_8 + 2 \zeta_8^3 \\ \end{pmatrix} $$ Given $C(1)$, $C(-1)$, $C(i)$ and $C(\zeta_8)$ (the values of $C(x)$ modulo $x-1$, $x+1$, $x^2+1$ and $x^4+1$), we can calculate $C(x) \pmod{x^8-1}$: \begin{multline} \label{example_cx} \begin{array}{lcrr} C_{11}(x) & \equiv & 1 + x^2 + 2 x^3 + 2 x^4 + 2 x^5 + x^6 & \pmod{x^8-1}, \\ C_{12}(x) & \equiv & x + 2 x^2 + x^3 + x^5 + x^7 & \pmod{x^8-1}, \\ C_{13}(x) & \equiv & x + x^2 + x^3 + x^4 + x^5 + 2 x^7 & \pmod{x^8-1}, \\ C_{14}(x) & \equiv & 1 + x + x^2 + 2 x^3 + x^4 + x^6 + 2 x^7 & \pmod{x^8-1}, \\ C_{22}(x) & \equiv & 1 + 2 x + x^2 + 2 x^4 + x^6 + 2 x^7 & \pmod{x^8-1}, \\ C_{23}(x) & \equiv & 1 + x^2 + 2 x^3 + x^4 + x^5 + x^6 + 2 x^7 & \pmod{x^8-1}, \\ C_{24}(x) & \equiv & 1 + x + x^3 + x^5 + x^6 + 2 x^7 & \pmod{x^8-1}, \\ C_{33}(x) & \equiv & 2 x + x^2 + x^6 + 2 x^7 & \pmod{x^8-1}, \\ C_{34}(x) & \equiv & 2 + x + x^3 + 2 x^4 + x^5 + 2 x^6 + x^7 & \pmod{x^8-1}, \\ C_{44}(x) & \equiv & x^2 + 2 x^3 + 2 x^5 + x^6 & \pmod{x^8-1}. \\ \end{array} \end{multline} (The rest $C_{ij}(x)$ can be calculated from $C_{ij}(x)\equiv C_{ji}(x^7)\pmod{x^8-1}$). Note that this $C(x)$ satisfies the congruence $$ C^2(x) + C(x) \equiv 16I_4 + c_{16}(x) H_4 \pmod{x^8-1}. $$ The next step would be to lift the last congruence to $\pmod{x^{16}-1}$, or, equivalently, given $C(1)$, $C(-1)$, $C(i)$ and $C(\zeta_8)$ to find possible values of $C(\zeta_{16})$, $\zeta_{16} = e^{2\pi i/16}$. Unfortunately, a brute-force doesn't yield any such matrices. Another approach could be to introduce a new variable $y$ and try to find a matrix $C(x,\,y)$ such that $$ C^2(x,\,y) + C(x,\,y) \equiv 16I_4 + c_8(x) c_2(y) H_4 \pmod{x^8-1,\,y^2-1} $$ We could then expand $C(x,\,y)$ into $C(x)\in M_8(\Z[x]/(x^8-1))$ and then into $C\in M_{64}(\Z)$. However, a brute-force doesn't find any such matrices either. \section{Last step} Consider again the calculated matrices $C(x) \pmod {x^8-1}$ such that $ C^2(x) + C(x) \equiv 16I_4 + 2c_{8}(x) H_4 \pmod{x^8-1}$ (one of them is (\ref{example_cx})). Let's expand them into symmetric matrices $D\in M_{32}(\Z)$ consisting of $4\times4$ circulant blocks of order 8 such that \begin{equation} \label{d_32} D^2 + D = 16I_{32} + 2H_{32}. \end{equation} Suppose now that $C$ consists of $32\times32$ circulant blocks of order 2, therefore it can be compacted into $\widetilde{C}(x)\in M_{32}(\Z[x]/(x^2-1))$ such that \begin{equation} \label{congr_32} \widetilde{C}^2(x)+\widetilde{C}(x) \equiv 16I_{32} + c_2(x) H_{32} \pmod{x^2-1} \end{equation} Furthermore, suppose that $\widetilde{C}(1)$ is one of the matrices $D$ we just found. Denote $E = \widetilde{C}(0)$, so that $\widetilde{C}(x) = E + (D - E)x$. Then (\ref{congr_32}) is equivalent to the two same congruences modulo $x-1$ and $x+1$, where the first one holds because of (\ref{d_32}) and the second is $$ (2E-D)^2 + (2E-D) = 16I_{32}. $$ After simple transformations we obtain \begin{equation} \label{de_eq} 2E^2 - ED - DE + E - D + H_{32} = 0. \end{equation} We can take this equation modulo 2 to get rid of the square term $E^2$: \begin{equation} \label{de_eq_mod} ED + DE + E + D + H_{32} \equiv 0 \pmod2. \end{equation} This is a linear equation with respect to $E$. We can solve it as a system of linear equations of $E_{ij}$. There are several requirements for the final matrix $C$, they impose restrictions on $E$. First, $C$ must be symmetric, so must be $E$. Second, all elements of $C$ must be 0 or 1, so must be the elements of $E$ and $D-E$ (and therefore, finding $E \pmod2$ is enough to find $E$). Thus, $D_{ij}=0$ implies $E_{ij}=0$, $D_{ij}=2$ means $E_{ij}=1$, and for $D_{ij}=1$ $E_{ij}$ can be either 0 or 1. Finally, $C$ can have only zeros on the main diagonal because it is an adjacency matrix of a graph, thus $E_{ii}=0$. We can iterate over all solutions of (\ref{de_eq_mod}) with such restrictions and check if they also satisfy (\ref{de_eq}). Unfortunately, there are too many solutions, so it may be infeasible to try them all. For example, for the matrix $D$ constructed from (\ref{example_cx}) the solutions of (\ref{de_eq_mod}) form an affine space of dimension 62, giving $2^{62}\approx4.6\cdot 10^{18}$ possible matrices to check. So we need to reduce the set of solutions somehow. Note that if we multiply some rows and columns of $C(x)$ with the same indices by $x \pmod {x^2-1}$, the congruence (\ref{congr_32}) will still hold. In the matrix $C$ that would mean a permutation of some pairs of rows and columns, or in the final graph it would be a permutation of some vertices pairs, and in the matrix $E$ that corresponds to adding $1\pmod2$ to some rows and columns. Therefore, if for every row $i$ we denote $g(i) = \min\{j:\ D_{ij}=1\}$, we may assume without loss of generality that $E_{i,g(i)}=0$ if $1\leqslant g(i)<i$. This additional restriction can reduce the dimension of solutions of (\ref{de_eq_mod}). For example, for the matrix $D$ obtained from (\ref{example_cx}) there would be just $2^{32}\approx4.3\cdot10^9$ solutions, so it is now feasible on a modern computer to iterate over all of them, checking whether (\ref{de_eq}) holds. And luckily one of such matrices indeed satisfies this equation. $$ E = \begin{pmatrix} 0 0 0 1 1 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1 \\ 0 0 0 0 1 1 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 1 0 0 1 0 1 0 1 0 0 0 \\ 0 0 0 0 0 1 1 1 0 1 0 0 1 0 0 1 0 1 0 0 1 0 1 0 1 1 1 1 0 1 1 0 \\ 1 0 0 0 0 0 1 1 1 0 1 0 1 1 1 0 0 0 1 0 1 1 1 1 0 0 1 0 0 1 1 0 \\ 1 1 0 0 0 0 1 1 0 0 0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 0 0 1 0 0 1 1 \\ 1 1 1 0 0 0 0 1 0 0 0 0 1 0 1 1 0 1 0 0 1 0 1 0 1 1 0 0 1 0 0 1 \\ 0 1 1 1 1 0 0 0 1 1 0 1 0 1 0 1 1 1 0 0 0 1 0 1 0 1 0 0 0 1 1 1 \\ 0 0 1 1 1 1 0 0 0 1 0 0 1 0 1 0 1 0 0 1 1 0 1 0 0 1 1 1 0 1 1 0 \\ 0 0 0 1 0 0 1 0 0 1 1 0 1 0 0 1 1 0 1 1 1 0 1 1 0 1 0 0 0 0 0 1 \\ 0 0 1 0 0 0 1 1 1 0 1 1 0 1 0 1 1 1 0 1 1 0 0 0 1 0 0 0 0 0 0 0 \\ 1 0 0 1 0 0 0 0 1 1 0 1 1 0 1 0 1 1 0 0 0 1 0 0 1 1 1 0 0 1 0 1 \\ 0 1 0 0 1 0 1 0 0 1 1 0 1 1 0 1 0 0 1 1 0 0 1 0 0 0 1 0 1 0 1 0 \\ 0 0 1 1 0 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 0 0 1 1 0 0 1 1 1 0 0 0 \\ 0 0 0 1 1 0 1 0 0 1 0 1 1 0 1 0 1 1 1 0 1 1 0 0 0 0 1 1 1 1 0 0 \\ 0 0 0 1 1 1 0 1 0 0 1 0 1 1 0 1 0 1 1 0 0 1 0 0 0 1 0 0 0 1 1 0 \\ 0 0 1 0 0 1 1 0 1 1 0 1 0 0 1 0 0 0 1 1 0 1 1 1 0 0 1 0 0 0 1 1 \\ 0 1 0 0 1 0 1 1 1 1 1 0 1 1 0 0 0 1 0 0 0 0 0 1 1 1 0 1 1 0 1 0 \\ 0 0 1 0 0 1 1 0 0 1 1 0 1 1 1 0 1 0 1 0 0 0 0 1 1 1 0 0 1 1 0 1 \\ 0 0 0 1 0 0 0 0 1 0 0 1 0 1 1 1 0 1 0 1 0 0 0 0 1 1 1 1 0 0 1 0 \\ 0 0 0 0 1 0 0 1 1 1 0 1 1 0 0 1 0 0 1 0 1 1 0 0 1 1 0 1 1 0 0 1 \\ 0 1 1 1 0 1 0 1 1 1 0 0 0 1 0 0 0 0 0 1 0 1 1 0 1 1 1 0 1 1 0 0 \\ 0 1 0 1 1 0 1 0 0 0 1 0 0 1 1 1 0 0 0 1 1 0 1 1 1 1 1 1 0 1 0 0 \\ 0 0 1 1 1 1 0 1 1 0 0 1 1 0 0 1 0 0 0 0 1 1 0 1 0 0 1 1 1 0 1 1 \\ 1 0 0 1 0 0 1 0 1 0 0 0 1 0 0 1 1 1 0 0 0 1 1 0 0 0 0 1 1 1 1 1 \\ 0 1 1 0 1 1 0 0 0 1 1 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 1 0 1 1 0 \\ 0 0 1 0 0 1 1 1 1 0 1 0 0 0 1 0 1 1 1 1 1 1 0 0 0 0 0 0 1 0 1 1 \\ 0 1 1 1 0 0 0 1 0 0 1 1 1 1 0 1 0 0 1 0 1 1 1 0 0 0 0 0 1 1 0 1 \\ 1 0 1 0 1 0 0 1 0 0 0 0 1 1 0 0 1 0 1 1 0 1 1 1 1 0 0 0 0 1 1 0 \\ 0 1 0 0 0 1 0 0 0 0 0 1 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 0 0 1 1 \\ 0 0 1 1 0 0 1 1 0 0 1 0 0 1 1 0 0 1 0 0 1 1 0 1 1 0 1 1 0 0 0 1 \\ 0 0 1 1 1 0 1 1 0 0 0 1 0 0 1 1 1 0 1 0 0 0 1 1 1 1 0 1 1 0 0 0 \\ 1 0 0 0 1 1 1 0 1 0 1 0 0 0 0 1 0 1 0 1 0 0 1 1 0 1 1 0 1 1 0 0 \\ \end{pmatrix} $$ From this matrix and from $D$ we can construct $C(x)\in M_{32}(\Z[x]/(x^2-1))$, then we can expand $C(x)$ to $C\in M_{64}(\Z)$. Then by adding a row and a column of $B$ (32 ones followed by 32 zeros) we finally obtain the adjacent matrix $A$ of a SRG with the parameters $(65,\,32,\,15,\,16)$, we also write this matrix below. One can easily check that it consists only of zeros and ones, that it is symmetric, that each row has 32 ones, and each two rows $i$, $j$ have 15 or 16 common ones, depending on $A_{ij}$. Note that we can also construct a symmetric conference matrix of order 66 from it by replacing all $1$ with $-1$, then all $0$ with 1, keeping zeros on the main diagonal and adding a row and a column of ones. A square of such matrix is equal to $65I_{66}$. One can also compute the automorphism group of this SRG. It consists of 32 elements, thus the graph is not vertex-transitive. In fact, its vertex orbits are $\{1\}$, $\{2,\,3,\,\ldots,\,33\}$, and $\{34,\,35,\,\ldots,\,65\}$. Here is the adjacency matrix of the SRG: \phantom{aaa}\\ $01111111111111111111111111111111100000000000000000000000000000000$ \\ $10100011111110100000111010001000100010101010100110101011101000111$ \\ $11000101111111000001011100010001000101010101000111010101110001011$ \\ $10001000111111101010001110100010011000101101001001101100111010001$ \\ $10010001011111110100010111000100011001010010110001110011011100010$ \\ $10100010001111111001000011101001000110001100110011011101001111000$ \\ $11000100010111111000100101110000100110010011001100111010110110100$ \\ $11101000100011111100010001011100001001100101010100001110101101101$ \\ $11110001000101111010001000111010010001100010101010010111010011110$ \\ $11111010001001011000100100010110110010011001010011000011101011011$ \\ $11111100010000111001000010001111001100011000101100100101110100111$ \\ $11111110100010010010001001000101101100100110010011110000111010110$ \\ $11111111000100001100010000100011110011000110001101101001011101001$ \\ $10111111110000100111000100010001010100101001100100111010001111010$ \\ $11011111101001000110100010001000101011010001100011011100010110101$ \\ $10001111111100001011101001000100010010110100011000110111000101101$ \\ $10010111111010010101110000100010001101001010011001001110100011110$ \\ $10001001000011101011110001100011110001011100110110110000100010111$ \\ $10010000100101110101101001100101101000111011001111001001000101011$ \\ $10100100001001011110111100011001011100010110101011101010001000101$ \\ $11000010010000111111011010011000111010001111010101110100010001010$ \\ $11101001000010001101101111000110010110100011101011011100100100010$ \\ $11110000100100010011110110100110001111000101110100111011000010001$ \\ $10111010010001000001011011110001101011110000111010101110110001000$ \\ $11011100001000100000111101101001110101101001011101010111001000100$ \\ $10001111000100010110010110111100010100111010010110001101110010001$ \\ $10010110100010001110001111011010001011011100001110010011101100010$ \\ $10100011110001000001100101101110111101001111000010100101011100100$ \\ $11000101101000100001100011110111011010110110100101000010111011000$ \\ $10001001011100010010011001011011101111001011101000010000101111001$ \\ $10010000111010001100011000111101110110110101110000001001010110110$ \\ $10100100001111000111000110001110100011110011011100100100001011110$ \\ $11000010010110100110100110010111000101101100111011000010010101101$ \\ $00011000110011010101110011011010000110100000001111110001011011101$ \\ $00011001001100101011101100111100000111000000010111101000111101110$ \\ $00100110001101001001011011010110111001101000000101011010010110111$ \\ $01000110010010110000111100101111011001110000000010111100001111011$ \\ $00101001100010101100001110110101101110011010000001110111000011101$ \\ $01010001100101010010010111001011110110011100000001101110100101110$ \\ $00101010011000110111000101101011000011100111000001011011110000111$ \\ $01010100011001001110100011110100100101100110100000111101101001011$ \\ $00110101000110010101101000111010100000111001110001110110111100001$ \\ $01001010100110001011110001011101000001011001101001101111011010010$ \\ $00110011010001100010111010010111000000010110011101011101101110100$ \\ $01001100101001100101011100001110100000001110011010111011110111000$ \\ $00001101010100011100101111000011101000000101100110001111011011110$ \\ $00010010101010011011010110100101110000000011100110010110111101101$ \\ $01100011001011000110101011101001011100000001011000100011110111011$ \\ $01100100110100100111010101110000111010000000111001000101101110111$ \\ $00111100010110101011110010001000111101110111000010000011100111000$ \\ $01011010001111010101101100010001011011101110100100000101100110100$ \\ $00101110100101110100111010100100010111011101101000000000111001110$ \\ $01010111000011101011011101000010001110111011110000000001011001101$ \\ $00110101101000111000110111010001000011101111011010100000010110011$ \\ $01001011110001011001001110101000100101110110111101000000001110011$ \\ $01101100111010010010001011110010010001011011110111101000000101100$ \\ $01110011011100001100010101101100001000111101101111110000000011100$ \\ $00111010101110100000100101011010111100010110111100011100000001011$ \\ $01011101010111000001000010111101011010001111011010011010000000111$ \\ $00001111001011110010010000110110101110100101101111100111000000010$ \\ $00010110110101101100001001001111010111000011110111100110100000001$ \\ $00100101110011011010100100001101111011101000111101011001110000000$ \\ $01000011101100111101000010010011111101110001011010111001101000000$ \\ $01101000111101001110110000100011001110111010010110010110011100000$ \\ $01110001011010110111001001000100110111011100001110001110011010000$ \\
\section{Abstract} Quantum phase transitions (QPTs) are usually associated with many-body systems in the thermodynamic limit when their ground states show abrupt changes at zero temperature with variation of a parameter in the Hamiltonian. Recently it has been realized that a QPT can also occur in a system composed of only a two-level atom and a single-mode bosonic field, described by the quantum Rabi model (QRM). Here we report an experimental demonstration of a QPT in the QRM using a trapped ion. We measure the spin-up state population and the average phonon number of the ion as two order parameters and observe clear evidence of the phase transition via adiabatic tuning of the coupling between the ion and its spatial motion. An experimental probe of the phase transition in a fundamental quantum optics model without imposing the thermodynamic limit opens up a window for controlled study of QPTs and quantum critical phenomena. \end{abstract} \maketitle \section{Introduction} Quantum phase transitions (QPTs) have become one of the focuses of condensed matter physics. Unlike classical phase transitions that occur at finite temperature, a QPT can occur at zero temperature under quantum fluctuations \cite{RevModPhys.69.315,Vojta_2003,sachdev2011quantum}. When a control parameter, such as the external magnetic field or the doping of a component, is scanned across a quantum critical point, the ground state of the system changes abruptly, characterized by a spontaneous symmetry breaking or a change in the topological order \cite{Vojta_2003,RevModPhys.75.913}. Studies of QPTs usually consider many-body systems in the thermodynamic limit, with the particle number $N$ approaching infinity \cite{sachdev2011quantum}. However, it was recently realized that a QPT can also occur in a small system with only two constituents, a two-level atom and a bosonic mode, described by the quantum Rabi model (QRM) \cite{PhysRevA.85.043821,PhysRevB.69.113203,PhysRevA.70.022303,PhysRevA.81.042311,PhysRevA.82.025802,PhysRevA.87.013826,PhysRevLett.115.180404,PhysRevLett.118.073001} which is one of the simplest models of light-matter interactions. Its Hamiltonian can be expressed as (throughout this paper we set $\hbar=1$ for simplicity) \begin{equation} \label{eq:rabi_model} \hat{H}_{\mathrm{QRM}}=\frac{\omega_\mathrm{a}}{2} \hat{\sigma}_{z}+\omega_\mathrm{f} \hat{a}^{\dagger} \hat{a}+\lambda\left(\hat{\sigma}_{+}+\hat{\sigma}_{-}\right)\left(\hat{a}+\hat{a}^{\dagger}\right), \end{equation} where $\hat{a}^{\dagger}$ ($\hat{a}$) is the bosonic mode creation (annihilation) operator and $\hat{\sigma}_+$ ($\hat{\sigma}_-$) is the two-level system raising (lowering) operator; $\omega_\mathrm{a}$, $\omega_\mathrm{f}$ and $\lambda$ are the atomic transtion frequency, the field mode frequency and the coupling strength between the two subsystems, respectively. This model has been widely studied in multiple paramter regions with many experimental platforms. When $|\omega_\mathrm{a}-\omega_\mathrm{f}|\ll|\omega_\mathrm{a}+\omega_\mathrm{f}|$ and $\lambda/\omega_\mathrm{f}\ll1$ are fulfilled, the rotating wave approximation (RWA) can be used to simplify the QRM to the Jaynes-Cummings model (JCM) \cite{1443594,Pedernales2015} which has been investigated first in cavity QED \cite{Miller_2005,Walther_2006,RevModPhys.73.565} and trapped ions \cite{RevModPhys.75.281}, and then in other platforms such as quantum dots \cite{RevModPhys.79.1217} and circuit QED \cite{Wallraff2004,Devoret1169}. When $\lambda$ becomes comparable to $\omega_\mathrm{a}+\omega_\mathrm{f}$, the RWA breaks down leading to the ultra-strong coupling regime ($\lambda/\omega_\mathrm{f} \gtrsim 0.1$) and deep-strong coupling regime ($\lambda/\omega_\mathrm{f} \gtrsim 1$) \cite{Pedernales2015}. Many exotic dynamical properties in these regimes have been observed recently in a plenty of quantum systems such as circuit QED \cite{PhysRevLett.105.237001,Niemczyk2010,Braumuller2017,Forn-Diaz2017,Yoshihara2017,Langford2017}, photonic system \cite{PhysRevLett.108.163601}, semiconductor system \cite{PhysRevLett.102.186402,Gunter2009} and trapped ions \cite{PhysRevX.8.021027}. In the trapped-ion systems, previous works on the simulation of the QRM have been performed in various regimes. For $\omega_\mathrm{a}=0,\omega_\mathrm{f}\neq0$, the QRM reduces to the spin-dependent force Hamiltonian which is crucial in trapped-ion quantum computation \cite{SDF,Sackett2000,PhysRevA.72.062316,PhysRevLett.112.190502}. For $\omega_\mathrm{a}\neq0,\omega_\mathrm{f}=0$, the Dirac equation has been simulated with trapped ions \cite{Gerritsma2010,PhysRevLett.106.060503}. For $\omega_\mathrm{a}=0,\omega_\mathrm{f}=0$, the coupling-only regime can be realized and it has been exploited to engineer the Schr\"odinger cat state \cite{Lo2015,PhysRevLett.116.140402} and the grid state \cite{PhysRevX.8.021001,Fluhmann2019}. By controlling the experimental parameters, Ref.~\cite{PhysRevX.8.021027} has access to the ultra-strong and the deep-strong coupling regimes. However, most of the previous works focus on the evolution dynamics governed by the QRM Hamiltonian in multiple regimes. Our work realizes the model Hamiltonian in a special parameter region $\omega_\mathrm{a}\gg\omega_\mathrm{f}$, which allows the study of a QPT with the phases controlled by the coupling strength $\lambda$ in the QRM. In Ref.~\cite{PhysRevLett.115.180404}, it has been shown that an order parameter, the rescaled photon number in the bosonic mode, is shown to stay zero in the normal phase while acquiring positive values in the superradiant phase with a spontaneous breaking of the $Z_2$ parity symmetry. The ground state of the system exhibits nonanalytical behavior at the critical point, supporting a second-order phase transition at zero temperature \cite{PhysRevLett.115.180404}. We experimentally demonstrate this type of QPT without the conventional thermodynamic limit of a large number of particles. Through laser driving near the blue and the red motional sidebands, we use a single trapped $\ensuremath{^{171}\mathrm{Yb}^+~}$ ion to simulate the QRM Hamiltonian with adjustable parameters \cite{Pedernales2015,PhysRevX.8.021027}. We perform a slow quench on the control parameter and measure the average atomic-level population and the average phonon number as the order parameters on both sides of the transition point. The experiments are repeated for the increasing ratios of $\omega_\mathrm{a}$ and $\omega_\mathrm{f}$, with the limit $\omega_\mathrm{a}/\omega_\mathrm{f}\to\infty$ analogous to the thermodynamic limit \cite{PhysRevLett.115.180404}. From the qualitative behavior of the order parameters under the increasing ratios, we obtain strong evidence of the QPT in the QRM, although the ratio parameter is still not large enough for a precise scaling analysis of the critical phenomenon. Our work simulates the QRM in a special parameter region and develops a tool for adiabatic passages that allows the controlled study of a QPT, and showcases the possibility of exploring the universal QPT properties using the trapped-ion system, which has a number of tunable experimental knobs that can be used for a controlled study of the QPT and the critical phenomena under influence of various effects. \section{Results} \textbf{The quantum critical point in the quantum Rabi model.} To study the QPT, the low-energy effective Hamiltonian in the limit $\omega_\mathrm{a}/\omega_\mathrm{f}\to\infty$ has been derived in Ref.~\cite{PhysRevLett.115.180404}. When the control parameter $g\equiv2\lambda/\sqrt{\omega_\mathrm{a}\omega_\mathrm{f}} < 1$, the effective Hamiltonian in the normal phase is given by $\hat{H}_{\mathrm{np}}=\omega_\mathrm{f} \hat{a}^{\dagger} \hat{a}- g^{2}\omega_\mathrm{f} (\hat{a}+\hat{a}^{\dagger})^{2} / 4 - \omega_\mathrm{a}/2$ with the qubit frozen in its ground state; and when $g>1$ we have the effective Hamiltonian in the superadiant phase $\hat{H}_{\mathrm{sp}} = \omega_\mathrm{f} \hat{a}^{\dagger} \hat{a} - \omega_\mathrm{f}(\hat{a}+\hat{a}^{\dagger})^{2}/(4 g^{4})- \omega_\mathrm{a} (g^{2}+g^{-2})/4$ in a displaced frame of the bosonic mode, with the qubit ground state now rotated toward the x axis due to its strong coupling to the bosonic mode. This generates non-zero spin and bosonic population in the ground state of the superradiant phase. Hence, we can utilize both the rescaled bosonic mode number ($n_{\mathrm{f}}\equiv(\omega_\mathrm{f} / \omega_\mathrm{a}) \langle \hat{a}^{\dagger} \hat{a} \rangle$) and the spin population ($n_\mathrm{a}=1+\langle \hat{\sigma}_{z} \rangle$) at ground state as the order parameters: in the limit $\omega_\mathrm{a}/\omega_\mathrm{f}\to \infty$, we have $n_\mathrm{f}=0 (n_\mathrm{a}=0)$ when $g<1$ and $n_\mathrm{f}=(g^{4}-g_{\mathrm{c}}^{4}) / (4 g^{2}) (n_{\mathrm{a}}=1-g^{-2})$ for $g>1$ \cite{PhysRevLett.115.180404,PhysRevLett.118.073001}. \begin{figure*}[tbp] \includegraphics[width=0.95\linewidth]{figure1.pdf} \caption{\textbf{Schematic for experimental observation of QPT in the quantum Rabi model.} \textbf{a}. Schematic experimental setup. The $\ensuremath{^{171}\mathrm{Yb}^+~}$ ion is confined in the middle of a four-blade Paul trap, with the principal axes of the secular motion along the $x$, $y$ and $z$ directions. Two counter-propagating $355\,\unit{nm}$ pulsed-laser beams are focused on the ion, with a nonzero differential wave vector component along the $x$ direction. The two laser beams are controlled by two acousto-optic modulators (AOMs). AOM1 is driven by a radio-frequency (RF) signal from a phase-locked loop (PLL) \cite{PLL} and AOM2 is controlled by an arbitrary waveform generator (AWG). \textbf{b}. Schematic level structure of $\ensuremath{^{171}\mathrm{Yb}^+~}$. The two qubit states are two ${}^2S_{1/2}$ hyperfine ground states $\ket{\uparrow}=\ket{F=1,m_F=0}$ and $\ket{\downarrow}=\ket{F=0,m_F=0}$, at the separation $\omega_q\approx 2\pi\times 12.6\,\unit{GHz}$. The Raman transition is mediated by a virtual level about $2\pi \times 33\,\unit{THz}$ above the ${}^2P_{1/2}$ levels. The differential frequencies of the laser beams are tuned close to the blue and the red motional sidebands, i.e. $\omega_{x}-\delta_b$ and $-(\omega_{x}+\delta_r)$ from the carrier transition. The legend at lower right shows clearly that the purple beam and the blue (red) beam form a near-blue-sideband (near-red-sideband) Raman transition. \textbf{c}. The $355\,\unit{nm}$ pulsed laser has a frequency-comb structure \cite{frequencycomb} with the repetition rate $\omega_{\mathrm{rep}}\approx 2\pi\times 118.695\,\unit{MHz}$. With small frequency adjustments in the AOMs, the desired Raman transitions can be achieved between distant teeth of the frequency combs. \textbf{d}. Relative positions of the carrier transition (black) and two motional sidebands (red and blue) in solid lines and the bichromatic Raman-transition frequencies (red and blue) in dashed lines.} \label{Fig 0} \end{figure*} \textbf{Experimental setup.} We use a single $\ensuremath{^{171}\mathrm{Yb}^+~}$ ion confined in a linear Paul trap to simulate the QRM, as shown in Fig.~\ref{Fig 0}a. By performing the Doppler cooling followed by a resolved sideband cooling \cite{RevModPhys.75.281}, the spatial motion of the ion along one of its principal axes $x$, with the frequency $\omega_x=2\pi\times 2.35\,\unit{MHz}$, is cooled close to the ground state. Its motional degree of freedom can be well described as a quantum harmonic oscillator, and thus serves as the bosonic mode in the QRM. The two hyperfine states in the ground-state manifold ${}^2S_{1/2}$ are chosen as the qubit states, i.e. $\ket{\uparrow}=\ket{F=1,m_F=0}$ and $\ket{\downarrow}=\ket{F=0,m_F=0}$, with a frequency difference $\omega_q\approx 2\pi\times 12.6\,\unit{GHz}$ as shown in Fig.~\ref{Fig 0}b. We use two counter-propagating $355\,\unit{nm}$ pulsed-laser beams to manipulate the hyperfine qubit through Raman transition. The pulsed laser has a frequency-comb structure as shown in Fig.~\ref{Fig 0}c, which can help bridge the large frequency gap $\omega_q$ between the two levels \cite{frequencycomb}; the undesired teeth of the frequency combs can effectively produce a fourth-order AC Stark shift \cite{PhysRevA.94.042308}, which we carefully measure and compensate in the experiment (see Methods for more details). Two acousto-optic modulators (AOMs) are used to fine-tune the frequencies and the amplitudes of the laser beams for driving the Raman transition. The orientation of the laser beams are chosen such that there is a nonzero differential wave vector component $\Delta k_x$ along the $x$ axis. Let us first consider a single pair of Raman beams with the frequency and the phase difference $\Delta\omega$ and $\Delta\phi$ generating a Rabi frequency $\Omega$. The laser-ion coupling Hamiltonian is given by $\hat{H}_{\mathrm{couple}}=\Omega \cos (\Delta k_x \cdot \hat{x}-\Delta \omega \cdot t+\Delta\phi) \hat{\sigma}_{x}$ \cite{transverse-phonon-modes}, where $\hat{x}=x_0(\hat{a}+\hat{a}^{\dagger})$ is the ion-position operator with $x_0$ being the ground state wave-packet width. Considering the Lamb-Dicke approximation $\eta\sqrt{2\bar{n}+1}\ll 1$ where $\eta\equiv \Delta k_x x_0$ is the Lamb-Dicke parameter and $\bar{n}$ is the average phonon number of the motional state (see Supplementary Information for more details about the correction of the Lamb-Dicke approximation), we transfer $\hat{H}_{\mathrm{couple}}$ into the interaction picture of the uncoupled Hamiltonian $\hat{H}_{0}=\omega_{q}\hat{\sigma}_{z} / 2 +\omega_{x} \hat{a}^{\dagger} \hat{a}$, and get the interaction Hamiltonian $\hat{H}_r=(\eta \Omega_r/2) (\hat{a} \hat{\sigma}_{+} e^{i \delta_{r} t}+\hat{a}^{\dagger} \hat{\sigma}_{-} e^{-i \delta_{r} t})$ if the frequency difference $\Delta\omega$ is tuned close to the red motional sideband with $\delta_{r}=\omega_q-\omega_x-\Delta\omega$, and $\hat{H}_b=(\eta \Omega_b/2) (\hat{a}^{\dagger} \hat{\sigma}_{+} e^{i \delta_{b} t} + \hat{a} \hat{\sigma}_{-} e^{-i\delta_{b} t})$ when $\Delta\omega$ is tuned close to the blue sideband with $\delta_{b}=\omega_q+\omega_x-\Delta\omega$. In order to construct the QRM Hamiltonian, we employ the bichromatic Raman beams as shown in Fig.~\ref{Fig 0} driving the red and the blue sidebands simultaneously \cite{Sackett2000,SDF,PhysRevA.72.062316} using the specific implementation proposed and realized recently in Ref.~\cite{Pedernales2015,PhysRevX.8.021027}, as shown in Fig.~\ref{Fig 0}b. If we set the two Rabi frequencies to be the same $\Omega_r=\Omega_b=\Omega$ (in the experiment we can calibrate them such that the imbalance $\abs{\Omega_{r}-\Omega_{b}}/\abs{\Omega_r+\Omega_{b}} \le 2\%$), the resulting Hamiltonian is $\hat{H}_{rb}=(\eta\Omega/2)\hat{\sigma}_{+} (\hat{a} e^{i \delta_r t} + \hat{a}^{\dagger} e^{i\delta_b t})+h.c.$ which corresponds to the interaction picture Hamiltonian with respect to the uncoupled Hamiltonian $\hat{H}_0'=-(\delta_{b}+\delta_{r})\hat{\sigma}_{z} / 4 - (\delta_{b}-\delta_{r})\hat{a}^{\dagger} \hat{a} / 2$ \cite{Pedernales2015}, \begin{equation} \begin{aligned} \label{6} \hat{H}^I_{rb}=& \frac{\delta_{b}+\delta_{r}}{4} \hat{\sigma}_{z}+\frac{\delta_{b}-\delta_{r}}{2} \hat{a}^{\dagger} \hat{a}\\ & +\frac{\eta \Omega}{2}\left(\hat{\sigma}_{+}+\hat{\sigma}_{-}\right)\left(\hat{a}+\hat{a}^{\dagger}\right). \end{aligned} \end{equation} We clearly see the transformed Hamiltonian is exactly the QRM Hamiltonian if we identify $\omega_{\mathrm{a}}=(\delta_{b}+\delta_{r})/2$, $\omega_{\mathrm{f}}=(\delta_{b}-\delta_{r})/2$ and $\lambda=\eta\Omega/2$. From our definition, the control parameter is $g\equiv 2\lambda/\sqrt{\omega_\mathrm{a}\omega_\mathrm{f}}=2\eta\Omega/\sqrt{\delta_b^2-\delta_r^2}$. Since the uncoupled Hamiltonian $\hat{H}_0'$ commutes with our desired observables, the spin ($\hat{\sigma}_z$) and the phonon ($\hat{a}^{\dag}\hat{a}$) population, their measurements will not be affected by this transformation \cite{Pedernales2015}. By controlling the experimental parameters $\delta_b$, $\delta_r$ and $\Omega$, we can achieve the simulation in the regime $\omega_\mathrm{a}\gg\omega_\mathrm{f}$ where an observation of a QPT is possible. \begin{figure}[tbp] \includegraphics[width=0.95\linewidth]{figure2.pdf} \caption{\textbf{Spin-up state population versus sideband Rabi frequency.} By setting $\delta_b=2 \pi\times 52.0\,\unit{kHz}$ and $\delta_r=2\pi\times48.0\,\unit{kHz}$, we keep the ratio parameter $R=\omega_\mathrm{a}/\omega_\mathrm{f}=25$ fixed. As we increase the sideband Rabi frequency $\Omega_{\mathrm{SB}}$ (bottom axis) linearly with time (top axis), i.e $\Omega_{\mathrm{SB}}=\Omega_{\mathrm{max}}t/\tau_{q}$ where $\Omega_{\mathrm{max}}=2\pi\times 14.2\,\unit{kHz}$ and the quench time $\tau_q=2\,\unit{ms}$ are two pre-determined parameters, the control parameter $g(t)=2\Omega_{\mathrm{SB}}(t)/\sqrt{\delta_b^2-\delta_r^2}$ goes up accordingly. With a duration time $t$, we prepare a target state under $g(t)$ and measure the spin-up state population by florescence detection. Every orange dot is the average of 20 rounds of measurements of the spin-up state population, corrected by subtracting the $1.0\%$ dark-state detection error as the background; the error bar is estimated as one standard deviation of the 20-round outcomes (see Supplementary Information for more details about the error bar estimation). For each round of measurement, we repeat the experiment sequence for 500 shots and take the average. The blue curve is the theoretical value by directly solving the time-dependent Schr\"odinger equation under the QRM Hamiltonian. The vertical dashed line is an indication of the quantum critical point $g_\mathrm{c}=1$ (corresponding to $\Omega_{\mathrm{SB}}^\mathrm{c}=2\pi\times 10\,\unit{kHz}$). The inset shows the florescence detection scheme of $\ensuremath{^{171}\mathrm{Yb}^+~}$ ions \cite{PhysRevA.76.052314}.} \label{Fig 1} \end{figure} \textbf{Observation of quantum phase transition from the spin population.} To observe the QPT from the normal phase to the superradiant phase in the QRM Hamiltonian, we consider two measurable order parameters, the spin-up state population $(1+\langle \hat{\sigma}_{z} \rangle)/2$ \cite{PhysRevLett.118.073001} and the average phonon number $\langle\hat{a}^\dag \hat{a}\rangle$ \cite{PhysRevLett.115.180404}. As the control parameter $g$ rises from zero to above the quantum critical point, the $Z_2$ parity symmetry is broken and these two values at the ground state will accordingly increase from zero to a non-zero value. However, it is hard to prepare the ground state of a general Hamiltonian \cite{doi:10.1137/080734479}, and since the energy gap closes at the quantum critical point, we are not able to adiabatically scan the control parameter across this point without generating the quasi-particle excitations into the system \cite{PhysRevLett.115.180404}. Therefore, in this experiment we perform slow quench on the control parameter as suggested by Ref.~\cite{PhysRevLett.115.180404}, and compare the measured values with the theoretical predictions. First we set $\delta_b=2 \pi\times 52.0\,\unit{kHz}$ and $\delta_r=2\pi\times48.0\,\unit{kHz}$, which corresponds to a ratio $R\equiv \omega_{\mathrm{a}}/\omega_{\mathrm{f}}=25$ between the atomic transition frequency and the field mode frequency in the QRM. Under this finite ratio, the energy gap at the quantum critical point becomes finite which is around $0.4\omega_{\mathrm{f}}=2\pi\times0.8\,\unit{kHz}$ \cite{PhysRevLett.115.180404}, indicating that the quench time should at least be $1.25\,\unit{ms}$ such that the prepared state does not deviate too much from the true ground state. After sideband cooling, we initialize the ion in the ground state $\ket{\downarrow,n=0}$. Then we linearly increase the sideband Rabi frequency such that $\Omega_{\mathrm{SB}}(t)\equiv\eta\Omega(t)=\Omega_{\mathrm{max}} t/\tau_{q}$ where $\Omega_{\mathrm{max}}=2\pi\times 14.2\,\unit{kHz}$ and the quench time $\tau_q=2\,\unit{ms}$ are two pre-determined parameters. In other words, the time to reach the critical point $\Omega_{\mathrm{SB}}^\mathrm{c}=\sqrt{\delta_b^2-\delta_r^2}/2=2\pi\times 10\,\unit{kHz}$ is about $1.4\,\unit{ms}$. We expect the quantum state of the system to follow the slow quench of the control parameter $g(t)=\Omega_{\mathrm{SB}}(t) / \Omega_{\mathrm{SB}}^\mathrm{c}$. Hence with a duration time $t$, we generate the target state under a specific coupling strength of the QRM and measure the order parameters. The spin-up state population can be measured by a resonant driving on the $|{}^2S_{1/2},F=1\rangle \to |{}^2P_{1/2},F=0\rangle$ cyclic transition of the $\ensuremath{^{171}\mathrm{Yb}^+~}$ ion and a detection of the scattered photon counts \cite{PhysRevA.76.052314}. The result is shown in Fig.~\ref{Fig 1}. Every orange data point is the average of 20 rounds of measurements of the spin-up state population and has been corrected by subtracting the $1.0\%$ dark-state detection error which arises from the small residual off-resonant coupling of the detection laser to the bright state \cite{PhysRevA.76.052314} as the background. For each round of measurement, the outcome is acquired by averaging over 500 shots of the experiment sequence. The error bar is estimated by one standard deviation of the 20 rounds. We clearly observe the increase of the order parameter $(1+\langle \hat{\sigma}_{z}\rangle)/2$ after the quantum critical point (the vertical dashed line in Fig.~\ref{Fig 1}) despite the relatively low sharpness due to the finite ratio parameter $R$, which agrees well with the numerical simulation (the blue curve in Fig.~\ref{Fig 1} from numerically solving the time-dependent Schr\"odinger equation of the QRM Hamiltonian). \begin{figure*}[tbp] \includegraphics[width = 0.95\linewidth]{figure3.pdf} \caption{\textbf{Average phonon number versus sideband Rabi frequency.} Again we set $\delta_b=2 \pi\times 52.0\,\unit{kHz}$ and $\delta_r=2\pi\times48.0\,\unit{kHz}$, thus the ratio parameter $R=\omega_\mathrm{a}/\omega_\mathrm{f}=25$. With the same quench process as above, we prepare the target states and measure the corresponding average phonon numbers. \textbf{a}. Each black dot is a measured average phonon number for a specific ground state. Its value and the error bar are determined according to (b-e). The blue curve is the theoretical result by solving the time-dependent Schr\"odinger equation. The inset shows the blue sideband scheme for analyzing the phonon number distribution: before the measurement, we optically pump the spin state into $\ket{\downarrow}$ \cite{PhysRevA.76.052314} with tiny influence to the phonon state population; then we drive the blue sideband transition for various time interval and fit the obtained spin-up state population to extract the phonon distribution. For the leftmost data point in the normal phase, \textbf{b} presents the experimental data (black dots, averaged over 200 shots) and the fitted curve (blue line), and \textbf{c} shows the fitted population $p_k$ ($k=0,\,1,\,\cdots$) with the covariance matrix shown in the inset. The error bar in (a) is computed from this covariance matrix as one standard deviation for the average phonon number. Similarly \textbf{d} and \textbf{e} show the results for the rightmost data point in (a) in the superradiant phase. More details can be found in Methods.} \label{Fig 2} \end{figure*} \textbf{Observation of quantum phase transition from the phonon number.} Next we consider another order parameter, the average phonon number. After the slow quench of the QRM Hamiltonian, a short optical pumping pulse of $5\,\unit{\mu s}$ is applied to pump the internal state of the ion (qubit state) into $\ket{\downarrow}$ \cite{PhysRevA.76.052314} with negligible effect on the motional state (phonon state) population. Then we drive the blue-sideband transition between $\ket{\downarrow,n}$ and $\ket{\uparrow,n+1}$ ($n=0,\,1,\,\cdots$) for various time interval $t$. By fitting the resultant spin-up state population, we can reconstruct the population of different phonon states, thus calculating the average phonon number \cite{PhysRevLett.76.1800,RevModPhys.73.565,Hofheinz2008,Hofheinz2009,PhysRevLett.76.1796,RevModPhys.75.281,Kienzler53,Lo2015,PhysRevLett.116.140402}. With the same experimental parameters as above, the results are shown in Fig.~\ref{Fig 2}. Each black dot in Fig.~\ref{Fig 2}a is the calculated average phonon number from the phonon population distribution with the error bar estimated by one standard deviation. In Fig.~\ref{Fig 2}b we show an example for the blue sideband signal of the leftmost data point in Fig.~\ref{Fig 2}a. The measured spin-up state population is fitted by the blue curve to give the phonon state population $\{p_k\}$ ($k=0,\,1,\,\cdots$) with a suitable truncation. The fitting result is shown in Fig.~\ref{Fig 2}c with a covariance matrix (inset) representing the correlation between different $p_k$'s, from which we further deduce the standard deviation of the average phonon number, assuming a joint Gaussian distribution \cite{Nonlinear}. More details can be found in Methods. As we can see, for this data point we get a very low average phonon number, consistent with the fact that it is deep in the normal phase. Similarly, Fig.~\ref{Fig 2}d and Fig.~\ref{Fig 2}e show the results for the rightmost data point in Fig.~\ref{Fig 2}a. Here we get much faster oscillation at the beginning of the blue sideband data owing to the much higher phonon number population (the sideband Rabi oscillation frequency $\sim \sqrt{n+1}\eta\Omega$) in the superradiant phase, as well as much faster decay since the phonon number has a wider distribution. In this case we get larger uncertainty in each fitted $p_k$. However, they are strongly correlated as shown by the off-diagonal elements of the covariance matrix (inset of Fig.~\ref{Fig 2}e), and we still get a reasonable error bar for the average phonon number. Finally, in Fig.~\ref{Fig 2}a we further compare the measured average phonon number with the theoretical values from numerically solving the time-dependent Schr\"odinger equation. Again these results agree well within the error bars. It should be pointed out that the fourth order AC Stark shift induced by the laser beams is not zero in our setup \cite{PhysRevA.94.042308}, and will increase as we gradually turn up the coupling strength of the QRM in the above experiments. Therefore they cannot be compensated by a static frequency shift in the laser beams, but require a dynamic compensation by phase modulation of the laser as shown in Methods. Also note that for our slow quench dynamics to maintain quantum coherence, the total quench time $\tau_q$ should be shorter than the motional decoherence time $\tau_d$ of the trapped ion. The motional coherence of our system is largely affected by the $50\,\unit{Hz}$ noise from the AC power line. Therefore we use a line-trigger to lock the experimental sequence to the AC signal from the power line, which extends the motional decoherence time to over $5\,\unit{ms}$. \begin{figure*}[tbp] \includegraphics[width = 0.95\linewidth]{figure4.pdf} \caption{\textbf{Average phonon number versus sideband Rabi frequency under different experimental parameters.} Each dot is an average phonon number measured in the same way as in Fig.~\ref{Fig 2}, with the error bar representing one standard deviation. In \textbf{a}, \textbf{b} and \textbf{c}, we vary the ratio parameter $R$, the total quench time $\tau_q$ and the motional decoherence time $\tau_d$, respectively, while keeping the other parameters the same as those in Fig.~\ref{Fig 2}. \textbf{a}. We keep $\Omega_{\mathrm{SB}}^\mathrm{c}=2\pi\times10\,\unit{kHz}$ and $\tau_q=2\,\unit{ms}$. Then we need $\delta_b=2\pi\times41.3\,\unit{kHz}$ and $\delta_r=2\pi\times36.1\,\unit{kHz}$ for $R=15$ and $\delta_b=2\pi\times26.8\,\unit{kHz}$ and $\delta_r=2\pi\times17.9\,\unit{kHz}$ for $R=5$. \textbf{b}. We keep $\Omega_{\mathrm{SB}}^\mathrm{c}=2\pi\times10\,\unit{kHz}$, $R=25$, but use different quench time $\tau_q$. \textbf{c}. We keep $\Omega_{\mathrm{SB}}^\mathrm{c}=2\pi\times10\,\unit{kHz}$, $R=25$ and $\tau_{q}=2\,\unit{ms}$, but vary the motional decoherence time $\tau_d$ by turning on ($\tau_d=5.5\,\unit{ms}$) or off ($\tau_d=0.7\,\unit{ms}$) the locking of the experimental sequence to the $50\,\unit{Hz}$ reference. The curves in \textbf{a} and \textbf{b} are from numerical simulation without considering the motional decoherence, similar to the $\tau_d=\infty$ curve in \textbf{c}. The other two curves in \textbf{c} include the motional decoherence effect by numerically solving a Lindblad master equation (see Methods for more details). The difference between $\tau_d=\infty$ and $\tau_d=5.5\,\unit{ms}$ is very small for the quench time $\tau_q=2\,\unit{ms}$, thus justifies our simplification of $\tau_d=\infty$ for \textbf{a}, \textbf{b} and the previous numerical simulations.} \label{Fig 3} \end{figure*} \textbf{Scaling of the order parameter with respect to various experimental parameters.} Finally we consider the scaling of the order parameter with respect to different experimental parameters. For this purpose, the average phonon number is the preferred observable because it can vary in a wider range than the spin-up state population. Our results are summarized in Fig.~\ref{Fig 3} where we change the ratio parameter $R$, the total quench time $\tau_q$ and the motional decoherence time of the ion $\tau_d$, while keeping the other parameters the same. Figure~\ref{Fig 3}a considers different ratios $R=(\delta_b+\delta_r)/(\delta_b-\delta_r)$ by keeping the critical sideband Rabi frequency $\Omega_{\mathrm{SB}}^\mathrm{c}=2\pi\times10\,\unit{kHz}$ fixed. Hence we can deduce $\delta_{b(r)}=\Omega_{\mathrm{SB}}^\mathrm{c} (\sqrt{R} \pm 1/\sqrt{R})$ from the ratio parameter $R$. As expected, the sharpness of the curve and the final average phonon number are positively correlated with the ratio parameter, and approach nonanalytical behavior in the limit $R\to\infty$ (see Supplementary Information for a further discussion about the finite-ratio scaling). In Fig.~\ref{Fig 3}b, we vary the quench time $\tau_q$ to study its effect on the order parameter. A shorter quench time leads to a larger deviation from the adiabatic evolution, thus the prepared state has larger deviation from the true ground state. Only for long enough quench time can the prepared states have large enough overlap with the real ground states, hence show the clear evidences of the QPT. In Fig.~\ref{Fig 3}c we study the influence of finite motional decoherence time $\tau_d$ of the trapped ion. To keep the quantum nature of the system during the slow quench dynamics, the quench time should be within the coherence time of the system. As is mentioned above, the motional coherence of our trap is largely affected by the $50\,\unit{Hz}$ noise from the AC power line. By locking the experimental sequence to the $50\,\unit{Hz}$ reference, the coherence time is above $5\,\unit{ms}$; while if we turn off the locking, the coherence time will drop below $1\,\unit{ms}$. This phenomenon is also reported in Ref.~\cite{Henning-Kaufmann}. We conduct the experiments with the locking turned on and off, respectively. As expected, the sharpness of the curve reduces for shorter coherence time. The results agree well with the theoretical prediction for a motional decoherence time $\tau_d=5.5\,\unit{ms}$ and $\tau_d=0.7\,\unit{ms}$ respectively from solving the Lindblad master equation (see Methods). We also perform a simulation using the Schr\"odinger equation without considering any decoherence, which is labelled as $\tau_d=\infty$. This curve is very close to that for $\tau_d=5.5\,\unit{ms}$, which justifies our numerical simulation using Schr\"odinger equation in Figs.~\ref{Fig 1}, \ref{Fig 2}a, \ref{Fig 3}a and \ref{Fig 3}b, for $\tau_q\le 2\,\unit{ms}$. We also notice that the heating of the motional mode and the decoherence of the qubit state are potential sources of errors in the experiments. However, in our system the heating rate measured by the standard method \cite{motional-heating-rate,PhysRevA.61.063418} is well below $50\,$quanta/s and the qubit coherence time measured by the Ramsey method using Raman transition is greater than $50\,\unit{ms}$ which is mainly limited by the coherence of the PLL \cite{PLL}. Both have negligible effect on the measured order parameters as discussed in Methods. \section{Discussion} To sum up, we have successfully observed a QPT from the normal phase to the phonon superradiance phase associated with the QRM simulated by a single trapped ion. Through slow quench dynamics, we measure the spin-up state population and the average phonon number as the order parameters and observe them changing from near zero to large values when the control parameter is tuned across the quantum critical point. For the average phonon number, the change becomes sharper when the ratio parameter increases, analogous to approaching closer to a thermodynamic limit. The strong controllability of the trapped-ion system also allows us to vary the experimental parameters and study their influence on the phase transition. We also note that in Ref~\cite{PhysRevLett.118.073001}, a method to observe the universal scaling with spin-up state population was proposed. However, considering some technical difficulties, it is not possible for our system to observe the critical phenomena currently (see Supplementary Information for more discussions about this). To further study the finite-ratio scaling, we will either need to reduce the experimental noise and to upgrade the experimental setup to get more accurate results near the critical point for larger frequency ratio $R$; or we may need to develop different scaling methods which use data points farther away from the critical point. Our work is a first step towards the more detailed studies of the QPT in the QRM, including the critical dynamics and the universal scaling \cite{PhysRevLett.115.180404,PhysRevLett.118.073001}. With reservoir engineering \cite{Myatt2000,Kienzler53}, it is also possible to observe the dissipative phase transition in the QRM \cite{PhysRevA.97.013825}. Besides, our method can be directly extended to study the QPT in the many-body version of the QRM, i.e. the Dicke model \cite{PhysRev.93.99,PhysRevLett.108.043003,PhysRevA.85.043821} when we increase the number of the trapped ions. \section{Methods} \textbf{AC Stark shift compensation.} Our $355\,\unit{nm}$ pulsed laser has a frequency comb structure with a repetition rate $\omega_{\mathrm{rep}}\approx 2\pi \times 118.695\,\unit{MHz}$ and a bandwidth of about $200\,\unit{GHz}$. It can be used to bridge the transition between the two qubit levels with a frequency difference around $\omega_q\approx 2\pi\times 12.6\,\unit{GHz}$, without the need of large frequency shifts between the two Raman beams \cite{frequencycomb}. In Fig.~\ref{Fig 0}a, suppose AOM1 introduces a frequency shift of $\omega_{\mathrm{AOM1}}$, which is dynamically varied to compensate the fluctuation of the repetition rate $\omega_{\mathrm{rep}}$ \cite{PLL}, and AOM2 leads to a frequency shift $\omega_{\mathrm{AOM2},r(b)}$ for the red (blue) component of the bichromatic laser beams. The closest differential frequencies to the sideband transitions will be $\Delta\omega_{r(b)}=n \times \omega_{\mathrm{rep}}+\omega_{\mathrm{AOM1}}-\omega_{\mathrm{AOM2},r(b)}$ with $n=107$, the span number of the frequency-comb pairs as shown in Fig.~\ref{Fig 0}c. As we have mentioned in the main text, when tunning the sideband Rabi frequency from zero to a specific value, the AC Stark shift induced by the off-resonant coupling of the undesired frequency-comb pairs will also increase continuously. This is a common shift to $\delta_r$ and $\delta_b$, which changes $\delta_r+\delta_b$ and hence the ratio parameter $R$. For the $355\,\unit{nm}$ pulsed laser we use, when the sideband Rabi frequency is set to $2\pi \times 14.2\,\unit{kHz}$, the AC Stark shift can reach over $2\pi \times 10\,\unit{kHz}$ measured by the standard Ramsey method \cite{PhysRevLett.90.143602}. Such a large shift has non-negligible effect on the order parameters and must be compensated during the slow quench dynamics. Before each round of experiment, we calibrate the AC Stark shift $\Delta_{\mathrm{ac}}$ under the QRM Hamiltonian with different sideband Rabi frequencies $\Omega_{\mathrm{SB}}$ and fit it according to $\Delta_{\mathrm{ac}} = \alpha \Omega^2_{\mathrm{SB}}$ where $\alpha$ is a proportionality constant. Then when performing the slow quench experiment, we correct the frequency of the blue (red) component in the bichromatic beams as $\omega_{b(r)}(t)=\omega_{b(r)}(0)+\Delta_{\mathrm{ac}}(t)$, to make the detuning $\delta_{b(r)}$ fixed. This can be realized by phase modulating the driving RF signals on AOM2, which can be conveniently implemented by an AWG as shown in Fig.~\ref{Fig 0}a with a pre-determined waveform loading to its memory. The waveform for the pulse is given by $A(t)\cos(\omega_{\mathrm{AOM2},r(b)} t-\int_{0}^t\Delta_{\mathrm{ac}}(t) \mathrm{d}t)$, where $\omega_{\mathrm{AOM2},r(b)}$ is a pre-set driving frequency of AOM2 at the beginning of the experiment and the driving amplitude $A(t)\propto\Omega_{\mathrm{SB}}(t)$ is also calibrated before the experiment. \textbf{Phonon number distribution measurement.} To measure the phonon number of a quantum state of the spin-phonon system, we trace out the spin part by optically pumping it to $\ket{\downarrow}$ \cite{PhysRevA.76.052314} within a duration of $5\,\unit{\mu s}$ so that its influence to the motional state can be neglected. Then we apply a blue sideband pulse with various duration $t$ and measure the resultant spin-up state population $P_{\uparrow}(t)$. It can be fitted by \cite{RevModPhys.75.281,PhysRevLett.76.1796,PhysRevX.8.021027} \begin{equation} \label{8} P_{\uparrow}(t)=\frac{1}{2}\left[1 - \sum_{k=0}^{k_{\mathrm{max}}} p_ke^{-\gamma_k t}\cos (\Omega_{k,k+1} t)\right], \end{equation} where $p_k$ is the occupation of the phonon number state $\ket{k}$, $\gamma_k$ is a number-state-dependent empirical decay rate of the Rabi oscillation where we adopt a commonly used form $\gamma_k\propto (k+1)^{0.7}$ \cite{RevModPhys.75.281,PhysRevLett.76.1796,PhysRevX.8.021027}, $\Omega_{k,k+1}=\sqrt{k+1}\Omega_{\mathrm{SB}}$ is the number-state-dependent sideband Rabi frequency, and $k_{\mathrm{max}}$ is the cutoff in the phonon number. If the hyperparameter $k_{\mathrm{max}}$ in the fitting model is too small, we will lose the high-phonon population and thus limited to a small average phonon number; however, if $k_{\mathrm{max}}$ is chosen too large, the uncertainty in the fitting will increase because we need to fit more parameters; and the risk of misjudgement of high-phonon population from the noise of the blue-sideband signals will also increase (see Supplementary Information for more details about the choice of $k_{\mathrm{max}}$). After fitting the phonon state population $P=(p_0,\,p_1,\,\cdots)^T$ with its covariance matrix $\Sigma$, we can compute the average phonon number $\bar{n} = N \cdot P$ where $N=(0,\,1,\,\cdots)$ is a row vector representing the phonon number basis. Assuming the fitted parameters follow a joint Gaussian distribution \cite{Nonlinear} (see Supplementary Information for more details about this assumption), we can estimate the variance of $\bar{n}$ as $\sigma_{\bar{n}}^2 = N \Sigma N^T$. \textbf{Error analysis and numerical simulation.} To consider the motional decoherence effect, we numerically solve the master equation with the Lindblad superoperator $L[\hat{O}]\hat{\rho} \equiv \hat{O} \hat{\rho} \hat{O}^\dag - \hat{O}^\dag \hat{O}\hat{\rho} / 2 - \hat{\rho} \hat{O}^\dag \hat{O} / 2$ of dephasing type \cite{PhysRevA.62.053807}: $\dot{\hat{\rho}}(t)=-i[\hat{H}, \hat{\rho}(t)] + L[\sqrt{2\Gamma_m}\hat{a}^\dag\hat{a}]\hat{\rho}$, where $\Gamma_{\mathrm{m}}=1/\tau_d$ is the dephasing rate with the decoherence time $\tau_d$. In Fig.~\ref{Fig 3}c with the line-trigger on (off), we set $\tau_d=5.5\,\unit{ms}$ ($0.7\,\unit{ms}$) which is within the range of our daily measurement (see Supplementary Information for more detials about the motional coherence measurement), to fit the experimental data. For the motional heating and the qubit decoherence, we add the Lindblad superoperators $L[\sqrt{\gamma n_{\mathrm{th}}}\hat{a}^\dag]+L[\sqrt{\gamma (n_{\mathrm{th}}+1)}\hat{a}]$ \cite{PhysRevA.62.053807} and $L[\sqrt{2\Gamma_q}\hat{\sigma}_{+}\hat{\sigma}_{-}]$ \cite{quantum-optics}, respectively, where $\gamma n_{\mathrm{th}}\approx\gamma (n_{\mathrm{th}}+1)$ is the motional heating rate which is below $50\,\mathrm{s}^{-1}$ and $\Gamma_{q}$ is the qubit decoherence rate which is below $20\,\mathrm{s}^{-1}$ in our system. As we have mentioned in the main text, the effects of these two terms are negligible from numerical simulation. All the Lindblad superoperators we used in the master equation just represent the results in the lab frame (describing the experimental decay), and does not represent decay in the simulated system frame (describing the QRM decay). The fluctuation of the trap frequency (motional mode frequency $\omega_x$), which is within $2\pi\times\,150\unit{Hz}$ after applying the RF power stabilization \cite{doi:10.1063/1.4948734}, can be the main error source on the ratio parameter $R$, because the trap frequency fluctuation is asymmetrical for $\delta_r$ and $\delta_b$ (see Fig.~\ref{Fig 0}d), causing $\delta_b-\delta_r$ to change, thus the ratio parameter. Under $2\pi\times150\,\unit{Hz}$ trap frequency fluctuation, the uncertainty for $R=25,\,15,\,5$ are $\pm1.7$, $\pm0.82$ and $\pm0.16$, respectively. Other sources of errors can be from the phonon number fitting beacuse some noise in the blue-sideband signals may be incorrectly recognized as a high-phonon population and cause the fitting error; and from the fluctuation of the AC Stark shift due to the fluctuation of the laser repetition rate and the laser intensity. Consider a $1\%$ sideband Rabi freqeuncy fluctuation (i.e. $1\%$ of $2\pi\times14.2\,\unit{kHz}$ for maximal estimation) and $2\pi\times30\,\unit{Hz}$ fluctuation of the repetition rate, the standard deviation of the fluctuated AC Stark shift from a theoretical calculation \cite{PhysRevA.94.042308} can reach about $2\pi\times400\,\unit{Hz}$. Under this value, the ratio parameter uncertainty for $R=25,\,15,\,5$ are $\pm0.20$, $\pm0.15$ and $\pm0.09$, respectively. \bigskip \textbf{Data Availability:} The data that support the findings of this study are available from the corresponding authors upon reasonable request. \textbf{Code Availability:} The code used for numerical simulations is available from the corresponding authors upon reasonable request. \textbf{Acknowledgements:} This work was supported by the National key Research and Development Program of China (2016YFA0301902), the Beijing Academy of Quantum Information Sciences, the Frontier Science Center for Quantum Information of the Ministry of Education of China, and the Tsinghua University Initiative Scientific Research Program. X.Z. acknowledges in addition support from the National Natural Science Foundation of China (11704408, 91836106) and the Beijing Natural Science Foundation (Z180013). Y.K.W. acknowledges support from Shuimu Tsinghua Scholar Program and the International Postdoctoral Exchange Fellowship Program. \textbf{Competing interests:} The authors declare that there are no competing interests. \textbf{Author Information:} Correspondence and requests for materials should be addressed to L.M.D. (<EMAIL>). \textbf{Author Contributions:} L.M.D. proposed and supervised the project. M.L.C., W.D.Z., Q.X.M., Y.J., L.H., X.Z., Z.C.Z. carried out the experiment. Z.D.L. and Y.K.W. carried out the theoretical analysis. M.L.C., Y.K.W., and L.M.D. wrote the manuscript. \section{Supplementary Information} \subsection{Note on the error bar estimation} \textbf{Error bar estimation in the spin population experiment.} In the spin population experiment, there are mainly two types of experimental noise we are considering: one is the intrinsic quantum fluctuation and the other is the extrinsic fluctuation of control parameters and environmental parameters. During one round of the experiment, the system is relatively stable and we are mainly concerned with the quantum projection noise \cite{PhysRevA.47.3554}. It arises because the quantum state is not an eigenstate of the observable, say, the spin-up state population and thus by repeating the experiment we get different outcomes even if we prepare the same quantum state. This noise can be suppressed by increasing the number of measurements. By averaging over 500 shots in each experimental round, we get the average spin-up state population with the quantum projection noise suppressed to $1/\sqrt{500}$, which is small compared with other experimental noise. On the other hand, the prepared quantum states can differ due to the long-term fluctuation of control parameters and environmental parameters. This noise cannot be suppressed by increasing the number of measurements and we regard this as the dominant error source in our experiment. These effects include fluctuation in laser intensity, laser repetition rate, temperature, air pressure, etc. Therefore, we conduct the experiment for 20 rounds, each at a different time with the time interval on the order of several minutes. We then use the standard deviation of the 20-round outcomes to estimate the error bar. \textbf{Error bar estimation in the phonon number experiment.} When estimating the error bar of the average phonon number, we need to make an assumption about the distribution of the experimental noise. Under the common assumption of independent and identically distributed Gaussian noise of the experimental data, it can be shown that the fitted parameters also follow a joint Gaussian distribution (see e.g. Theorem 2.1 of Ref.~\cite{Nonlinear}.), which is what we use in this work. We want to emphasize that this assumption is used in lots of experiments when extracting parameters by fitting the experimental data, and is implicitly used in many scientific computing softwares like MATLAB when fitting parameters. \subsection{Note on the choice of the $k_{\mathrm{max}}$ in the phonon number distribution fitting} We use the lowest cutoff number that can ensure the total occupation of all the Fock states to be above $95\%$ as $k_{\mathrm{max}}$ in the phonon number distribution fitting. We take the phonon number distribution of the state with the largest average phonon number in this experiment as an example to show how we choose a proper $k_{\mathrm{max}}$. In Fig.~\ref{Fig:phonon number distribution}a, the extracted average phonon number is $11.54\pm0.71$ while the total occupation $\sum_{k=0}^{k_{\mathrm{max}}} p_k$ is around $95.6\%$ with a cutoff number 23 (which can be seen from the horizontal axis). When we continue to increase the cutoff number to 24 (Fig.~\ref{Fig:phonon number distribution}b) and 25 (Fig.~\ref{Fig:phonon number distribution}c), the results of the phonon number distribution are nearly the same with the total occupation around $95.9\%$ and the average phonon number $11.63\pm0.73\,(0.74)$. However, when the cutoff number is set to 26 (Fig.~\ref{Fig:phonon number distribution}d), the phonon number distribution dramatically changes and the error bar of the occupation of the Fock states after $\ket{12}$ becomes very large, indicating that overfitting occurs. Also, according to the numerical simulation, the total occupation number above the Fock state $\ket{24}$ (including $\ket{24}$) is only $0.13\%$, contributing an average phonon number around 0.03 to this state, which is much smaller than the error due to the fitting of about 0.7. Hence, this also justifies the choice of the cutoff number 23. \begin{figure*}[tbp] \centering \includegraphics[width = 0.8\linewidth]{Fig1.pdf} \caption{\textbf{Phonon number distribution with different cutoff number $k_{\mathrm{max}}$.} The phonon number distribution with cutoff number $k_{\mathrm{max}}=23$ in \textbf{a}, $k_{\mathrm{max}}=24$ in \textbf{b}, $k_{\mathrm{max}}=24$ in \textbf{c} and $k_{\mathrm{max}}=24$ in \textbf{d}. The error bar is one standard deviation from the fitting program. The extracted average phonon number is $11.54\pm0.71$ while the total occupation $\sum_{k=0}^{k_{\mathrm{max}}} p_k$ is around $95.6\%$ in \textbf{a}. The results of the phonon number distribution are nearly the same with the total occupation around $95.9\%$ and the average phonon number $11.63\pm0.73\,(0.74)$ in \textbf{b} and \textbf{c}. However, when the cutoff number is set to 26 (\textbf{d}), the phonon number distribution dramatically changes and the error bar of the occupation of the Fock states after $\ket{12}$ becomes very large, indicating that overfitting occurs.} \label{Fig:phonon number distribution} \end{figure*} The reason why the total occupation in our fitting is only around $95\%$ may be due to the state preparation and measurement error (SPAM error) during the blue-sideband pulse analysis (described in Methods). For instance, even if we can ideally prepare the phonon ground state, i.e. only the Fock state $\ket{0}$ is occupied and the only non-zero occupation is $p_0$. We can easily see that $p_0$ is the contrast of the sinusoidal spin-up state population curve used to extract the occupation number. However, due to the SPAM error, the contrast must be less than 1. In our system, the SPAM error is around $2\%$ (an average of $1\%$ dark-state detection error and $3\%$ bright-state detection error), which means the contrast of the spin-up state population curve is only $96\%$. This explains the relatively low total occupation. \subsection{Note on the correction for the Lamb-Dicke approximation} All of our discussions in the main text are based on the condition that the single trapped ion is in the Lamb-Dicke regime. In this regime, the extension of the ion's wave function is much smaller than the laser's wavelength, or this limitation can be written as $\eta\sqrt{2\bar{n}+1} \ll 1$ \cite{RevModPhys.75.281}, where $\eta$ is the Lamb-Dicke parameter and $\bar{n}$ is the average phonon number of the motional state. In our system, the Lamb-Dicke parameter is around $0.07$. However, in our experiment, the maximum average phonon number exceeds ten, which means $\eta\sqrt{2\bar{n}+1}$ is around $0.3$, making the non-linear terms of $\eta$ a non-negligible effect to the entire model Hamiltonian. In the following, we consider the corrections to the numerical results of the two order parameters due to the non-linear effect. When we consider the non-linear terms, the total Hamiltonian of the QRM simulated by a single trapped ion reads \cite{PhysRevA.97.023624}: \begin{equation} \hat{H}_{\mathrm{NQRM}}=\frac{\omega_{\mathrm{a}}}{2} \hat{\sigma}_{z}+\omega_{\mathrm{f}} \hat{a}^{\dagger} \hat{a}+\lambda\left(\hat{\sigma}_{+}+\hat{\sigma}_{-}\right)\left(\hat{f} \hat{a}+\hat{a}^{\dagger} \hat{f}\right), \end{equation} where the non-linear effect is embodied in the function \cite{PhysRevA.52.4214} \begin{equation} \hat{f}(\hat{a},\hat{a}^\dag)=e^{-\eta^{2} / 2} \sum_{l=0}^{\infty} \frac{\left(-\eta^{2}\right)^{l}}{l !(l+1) !} \hat{a}^{\dagger l} \hat{a}^{l}. \end{equation} When we only consider the first expansion term, i.e. $l=0$ and neglect the term $e^{-\eta^{2}/2}$, the Hamiltonian reduces to the linear QRM. Here, we implement a numerical simulation additionally considering an $l=1$ term. As shown in Fig.~\ref{fig:nonlinear_QRM}, with the same experimental parameters as in the main text, we simulate the effect on the spin-up state population and the average phonon number during the quench dynamics. As we can see, in the normal phase, the phonon number is small enough that both the two order parameters in the non-linear model (NLM) show good consistency with those in the linear model (LM). In the superradiant phase, with the increase of the average phonon number, the non-linear effect becomes more and more significant. In our simulation, we find that the maximum relative deviation of the average phonon number between the NLM and the LM ($|\bar{n}_{\mathrm{LM}}-\bar{n}_{\mathrm{NLM}}|/\bar{n}_{\mathrm{LM}}$) is about $17\,\%$. However, the deviation near the critical point is only about $2\,\%$, which is small enough compared with other errors discussed in the Methods. In conclusion, the non-linear terms in the simulated QRM causes a small but non-negligible deviation when the average phonon number is large ($\gtrsim 10$). However, because they are still smaller than the leading term, we expect the qualitative behavior of the quantum phase transition, in particular the universal class near the phase transition point, to be unaffected. \begin{figure*}[tbp] \centering \includegraphics[width = 0.95\linewidth]{Fig2.pdf} \caption{\textbf{The spin-up state population and the average phonon number versus the sideband Rabi frequency with/without non-linear effect.} Here we set the experimental parameters the same as the main text with $\delta_{b}=2 \pi \times 52.0\, \mathrm{kHz}$, $\delta_{r}=2 \pi \times 48.0\, \mathrm{kHz}$, thus the ratio parameter $R=25$. The total quench time $\tau_q=2\,\mathrm{ms}$ with the sideband Rabi frequency increases linearly from zero to $\Omega_{\max }=2 \pi \times 14.2\, \mathrm{kHz}$. The Lamb-Dicke parameter is $\eta=0.07$. \textbf{a} and \textbf{b} are Fig.~2 and Fig.~3a in the main text with an additional numerical result of the non-linear QRM, respectively. We can see clearly that in the normal phase, the phonon number is small enough that both the two order parameters in the non-linear model (NLM) show good consistency with those in the linear model (LM). In the superradiant phase, with the increase of the average phonon number, the non-linear effect becomes more and more significant and causes a non-negligible deviation of the two order parameters between the NLM and the LM.} \label{fig:nonlinear_QRM} \end{figure*} \subsection{Note on the scaling analysis} \textbf{Scaling analysis with spin population.} We note in Ref.~\cite{PhysRevLett.118.073001}, spin population is used to analyze the scaling effect of the QPT in the QRM. However, some of the experimental parameters and conditions in Ref.~\cite{PhysRevLett.118.073001} are rather stringent for our system. There are mainly three conditions that are currently not achievable in our system. First, in Ref.~\cite{PhysRevLett.118.073001} the bosonic mode frequency $\tilde{\omega}_{0}/2\pi$ ($\omega_\mathrm{f}/2\pi$ in our notation) is set to $200\,\unit{Hz}$ to realize large frequency ratio $R$ of 50 to 400 under realistic coupling strength. This is comparable to the trap frequency fluctuation (around $150\,\unit{Hz}$) and even smaller than the fluctuation of the estimated AC Stark shift (around $400\,\unit{Hz}$, see Methods) in our system, and therefore will lead to large error. Second, under such large frequency ratios, the required adiabatic evolution time of about $250\,\unit{ms}$ is too long compared to our qubit coherence time under Raman laser of about $40$ to $60\,\unit{ms}$. Finally, Ref.~\cite{PhysRevLett.118.073001} proposes a standing wave configuration for the laser beams in order to suppress the influence of the carrier term under large frequency ratio, but our setup uses a traveling wave configuration which is more common in current ion trap experiments. The standing wave configuration needs four laser beams instead of the two beams in the traveling wave configuration. It is not easy to change our current configuration to four beams. We believe these technical challenges can be overcome with (1) choosing a more appropriate bosonic mode frequency (e.g $1\,\unit{kHz}$) with a still achievable coupling strength ($300\,\unit{kHz}$ carrier Rabi rate); (2) suppressing the system noises by improving the RF amplitude stabilization system and choosing a more appropriate repetition rate of the Raman laser; (3) improving the coherence time of the system (including the motional coherence time). \begin{figure*}[tbp] \centering \includegraphics[width = 0.95\linewidth]{Fig3.pdf} \caption{\textbf{Scaling analysis with spin-up state population.} \textbf{a}. The $S_s(G)$-$G$ plot, where $S_s(G)\equiv2P(\uparrow)|g-1|^{-1}$ and $G\equiv R|g-1|^{3/2}$ with $g$ the coupling strength and $P(\uparrow)$ the spin-up state population. The blue, yellow and green points are numerical simulation results and the red curve is an analytical line with a slope $-2/3$, which is a critical exponent \cite{PhysRevLett.118.073001}. The numerical results agree well with the analytical line except the numerical result with $R=100$. This is because when the ratio $R$ is too large, the carrier term in the trapped-ion simulation will cause the simulated Hamiltonian to deviate from the real QRM model \cite{PhysRevLett.118.073001}. The black points with error bar are calculated from the experimental results with $R=25$. The error bar is estimated as the error bar of the spin-up state population $P(\uparrow)$ multiplied by the corresponding $|g-1|^{-1}$. \textbf{b}. The four experimental data presented in \textbf{a} near the critical point $g_\mathrm{c}=1$, with their raw values of $(g,P(\uparrow))$ being $(0.994,0.0453\pm0.0123)$, $(0.984,0.0369\pm0.0085)$, $(0.975,0.0339\pm0.0064)$, $(1.065,0.0462\pm0.0071)$ respectively. Although in the log-plot, these points seem to nicely follow a trend with the red line and their error bars are not that large compared to the difference of these points, the difference between the raw data points is on the same order as the raw data error bars. We believe the trend indicated by the four black points is just dominated by the dependence of $S_s(G)$ and $G$ on $|g-1|$.} \label{Fig:spin scaling} \end{figure*} Given the current condition of our system, we choose a moderate ratio $R=25$ to implement the spin population experiment and show the overall behavior in Fig.~2 in the main text. Here we further supplement some experimental data around the critical point together with a numerical simulation according to Ref.~\cite{PhysRevLett.118.073001}. We summarize the results in Fig.~\ref{Fig:spin scaling}a. The figure is a $S_s(G)$-$G$ plot where $S_s(G)\equiv 2P(\uparrow)|g-1|^{-1}$ and $G\equiv R|g-1|^{3/2}$ with $g$ the coupling strength and $P(\uparrow)$ the spin-up state population. The blue, yellow and green points are numerical simulation results and the red curve is an analytical line with a slope $-2/3$ (note that according to Ref.~\cite{PhysRevLett.118.073001}, the asymptotic behavior of $S_s(G)$ is $\lim_{G \to 0}S_s(G) \propto G^{-2/3}$, i.e. there is a universal critical exponent -2/3). The numerical results agree well with the analytical line except the numerical result with $R=100$. This is because when the ratio $R$ is too large, the carrier term in the trapped-ion simulation will cause the simulated Hamiltonian to deviate from the real QRM model and this is why Ref.~\cite{PhysRevLett.118.073001} propose a standing-wave laser configuration to suppress the influence of the carrier term. The black points with error bar are calculated from the experimental results with $R=25$. The error bar is estimated as the error bar of the spin-up state population $P(\uparrow)$ (which is the raw data taken from the experiment) multiplied by the corresponding $|g-1|^{-1}$ which is supposed to be accurate. The four experimental points (from left to right) are all very close to the critical point $g_\mathrm{c}=1$, where their raw data values of $(g,P(\uparrow))$ are $(0.994,0.0453\pm0.0123)$, $(0.984,0.0369\pm0.0085)$, $(0.975,0.0339\pm0.0064)$, $(1.065,0.0462\pm0.0071)$ respectively. Although in the log-plot, these points seem to nicely follow a trend with the red line and their error bars are not that large compared to the difference of these points, the difference between the raw data points is on the same order as the raw data error bars (see Fig.~\ref{Fig:spin scaling}b). We believe the difference between the raw data points can be easily washed out due to experimental noises (e.g. the fluctuations of trap frequency and AC Stark shift) because they are too close to the same point. Hence, we believe the trend indicated by the four black points is just dominated by the dependence of $S_s(G)$ and $G$ on $|g-1|$. In conclusion, the precision of the current experiment prevents us from observing the universal scaling law with spin population. \begin{figure}[tbp] \centering \includegraphics[width=0.95\linewidth]{Fig4.pdf} \caption{\textbf{Finite-ratio scaling of the average phonon number near the critical point.} The red points are the numerical results with the system size indicated by the ratio $R=\omega_\mathrm{a}/\omega_\mathrm{f}$ ranging from 5 to 1000 and the fitting result shows that the slope of the fitting linear line is 0.48. The blue points with error bar are the experiment results. Under the current achievable ratio $R$, the difference between these points is on the same order of magnitude as the error bar, indicating they are vulnerable to the experimental noises.} \label{fig:phonon scaling} \end{figure} \textbf{Scaling analysis with average phonon number.} We present a numerical simulation of the finite-ratio scaling of the average phonon number near the critical point $g_\mathrm{c}=1$ and show the result in Fig.~\ref{fig:phonon scaling}. The red points are the numerical results with the system size (indicated by the ratio $R\equiv\omega_\mathrm{a}/\omega_\mathrm{f}$) ranging from 5 to 1000 and the fitting result shows that the slope of the fitting line is 0.48. The blue points with error bar are the experimental results. Under the current achievable ratio $R$, the difference between these points is on the same order of magnitude as the error bar, indicating they are vulnerable to the experimental noises. Thus these points cannot be used to extract the critical exponent. Also, we note that the fitted slope of 0.48 from the numerical simulation data actually deviates from the true critical exponent 1/3 in the regime $R\to \infty$ in analytic calculation (see Ref.~\cite{PhysRevLett.115.180404}). In order to see this precise exponent, the ratio $R$ in the numerical simulation needs to exceed $10^5$. Due to such large ratio, the adiabatic ground state preparation may need a duration orders of magnitude larger than the coherence time of the system. Hence it is not achievable for our system currently to observe the precise scaling effect and to extract the critical exponent with average phonon number. We can only observe the overall behavior of the phonon number variation curves with three different ratios (5, 15 and 25), and as expected the curve becomes sharper with larger ratio (see Fig.~4a in the main text). \subsection{Note on the Ramsey interferometric measurement for motional coherence} We use the commonly used Ramsey method \cite{PhysRev.78.695} to measure the motional coherence time with or without the line-trigger on. We apply two $pi/2$ blue-sideband pulses with a time interval $\tau$ in between and then measure the spin population. By varying the time interval $\tau$, we obtain the Ramsey fringes shown in Fig.~\ref{fig:motional coherence}. We fit the result by an attenuated sinusoid curve $A e^{-t/\tau_d} \cos (\omega t + \phi)$ where $A$, $\tau_d$, $\omega$ and $\phi$ are the fitting parameters. The coherence time $\tau_d$ is extracted from the fitted curve. In Fig.~\ref{fig:motional coherence}a, the estimated coherence time is around $0.7\,\unit{ms}$ and in b, the estimated coherence time is around $5.5\,\unit{ms}$. As we can see, the line-trigger can significantly improve the motional coherence time. \begin{figure*}[tbp] \centering \includegraphics[width = 0.95\linewidth]{Fig5.pdf} \caption{\textbf{The motional coherence time measured by the Ramsey method.} \textbf{a}. Without the line-trigger on, the Ramsey fringes decay fast and the estimated coherence time is around 0.7 ms. \textbf{b}. With the line-trigger on, the Ramsey fringes decay much slower and the estimated coherence time is around 5.5 ms} \label{fig:motional coherence} \end{figure*}
\section{Introduction} Player modeling focuses on modeling and predicting player characteristics of interest, such as preferences, skill level, or behavior~\cite{Yannakakis2013}. One of the reasons player modeling is interesting is because it plays a key role in the creation of adaptive games. In this paper, we present two main contributions to player modeling: (1) a novel player modeling approach based on {\em multi-armed bandits} (MABs), and (2) an approach for evaluating and fine-tuning these algorithms before having access to real player data in a user study. A common approach to player modeling is the use of machine learning (ML)~\cite{Drachen2009,valls2015exploring}; however, ML algorithms typically require large amounts of training data. Our proposed approach to player modeling based on MABs~\cite{auer2002finite} solves both (1) this problem of training data acquisition as well as (2) the problem of how to use the player model to adapt the game. We address the challenge of adapting a game to achieve a desired effect on the player by periodically choosing one among many potential ways to adapt the game. After observing the player's behavior in response to the bandit's choice, a reward value is generated based on the efficacy of that choice, which the bandit observes. We assume a lack of any prior training data before the user starts interacting with the system (though pre-existing data can be exploited). MAB strategies naturally solve this problem by balancing {\em exploration} (i.e., trying new ways to adapt the game to improve its understanding of the player) and {\em exploitation} (i.e., adapting the game in ways that have proved to work well in the past). Moreover, a second problem needs to be solved to effectively deploy this strategy, which constitutes our second contribution. Consider the common problem of choosing the appropriate AI approach before performing an adaptive game user study. How can we gain insights into which AI approaches would be best suited for our user study before engaging in the resource-intensive activity of actually carrying out the study? Additionally, how do we design the parameters of the user study (e.g., participants, duration) without knowing how the AI will perform? To solve this problem, we leverage publicly available data to create simulated players that exhibit statistical behavior patterns close to actual humans. Through the use case of modeling social comparison orientation (SCO) to maximize motivation toward physical activity, we show the promise of our approach as well as the effectiveness of our simulated players to evaluate MAB algorithms. In the remainder of this paper, we first present some background on player modeling, adaptive games, and MABs. We then present our MAB player modeling framework, followed by our methodology for creating simulated players. Finally, we present empirical results from simulations (with the simulated players) and a real user study. \section{Background and Related Work} This section briefly introduces some basic concepts of player modeling, adaptive games, multi-armed bandits, and simulated player-based evaluations. \subsection{Player Modeling and Adaptive Games} Adaptive games leverage knowledge of the player to automatically adapt to better serve specific users or specific design goals~\cite{weyhrauch1997guiding,bates1992virtual,riedl2008dynamic,thue2018toward,zhu2019experience}. These methods often rely on player modeling to detect or predict a set of characteristics of the player that can inform the AI's decisions~\cite{Yannakakis2013}. Previous work has shown applications in improving learning outcomes~\cite{Valls2015} and health outcomes~\cite{zhu2018towards}, adjusting game difficulty~\cite{Alexander2013, Gray2018}, managing user interfaces~\cite{Gajos2017}, or even adapting game narratives~\cite{Sharma2010, Mateas2003, weyhrauch1997guiding}. Player models are often designed to leverage either {\it a priori} theory and heuristics (``top-down'') or assumption-free statistical methods (``bottom-up'') to perform their task of differentiating or defining players, where this dichotomy has also been suggested to define a spectrum \cite{Yannakakis2013}. Our work is informed by both of these approaches; though our application domain is derived from psychology theory, we also wish to leverage the statistical power of context-agnostic modeling in the form of an MAB strategy. Specifically, we based our work on the psychology theory of social comparison (see Section \ref{section:modelingSCO}). Though heuristic-based models exist for classifying users based on their social comparison tendencies \cite{Gibbons1999}, our work employs a bottom-up approach using MAB strategies. \subsection{Multi-Armed Bandits} A multi-armed bandit (MAB) problem~\cite{auer2002finite} is a class of sequential decision problem where an agent needs to iteratively choose one among $k$ actions (called {\em arms}), after which it receives a stochastic reward. This mirrors the problem faced by a player in a casino deciding on which of the different gambling machines each of their tokens should be spent. The goal of an MAB strategy is to balance exploration and exploitation, assimilating new knowledge from rewards to ``converge'' on the arm with the maximum expected return as quickly as possible. Popular MAB strategies include the $\epsilon$-greedy strategy, where the arm that has historically returned the highest reward is always selected except in a portion of iterations (designated by $\epsilon$) where a random arm is chosen. Another is UCB1~\cite{auer2002finite}, which considers the upper confidence bound of expected rewards. MAB strategies are interesting for adaptive games if we consider the different adaptation options as the arms in an MAB. Investigations into this have already begun in the context of adaptive interventions such as those that promote behavior change~\cite{forman2019can} with promising results. However, to the best of our knowledge, MABs have not been used in the context of adaptive games or player modeling. Applying MABs to player modeling raises an important challenge, however. There is a very large collection of MAB strategies proposed in the literature, each with their own practical and theoretical properties. These strategies are usually evaluated by their behavior ``in the limit'' (i.e., with large numbers of interactions with the environment). However, in a player modeling situation, we cannot expect the system to interact with players for this long. This means that MAB strategies that work with very few interactions with users are needed, and thus we had to design an MAB strategy that satisfies these constraints before carrying out the study. Therefore, our work pushes the state of the art in two separate ways. First, we present a novel player modeling framework based on MAB strategies. Second, we present an approach for evaluating strategies via simulated players to design an MAB strategy that is effective with very few player interactions. \subsection{AI Tuning via Simulation} Carterette et al. \cite{Carterette2011} present a conceptualization of system evaluations as a continuum between {\em systems-based} approaches involving automated tests that evaluate predetermined scenarios and {\em user studies} involving real user interactions with the system. The former are viewed to have the advantages of stability, repeatability, and low costs at the risk of oversimplifying assumptions that could invalidate results. The latter are capable of answering more questions with potentially higher accuracy, but in exchange they carry a burden of higher expense and variability. This is referred to as the {\em bias-variance tradeoff} \cite{Carterette2011}. For adaptive games and player modeling, it is difficult to escape the requirement of genuine user studies; however, researchers have found value in simulations for a number of situations. These may include the rarity of real players \cite{Chen2017}, the complexity of the test space \cite{Wendel2014}, a desire to maintain specific control over how a model is trained \cite{Holmgard2014}, or the need to train an AI via techniques that require very large data sets \cite{Yannakakis2004}. \section{Player Modeling via MABs} The key idea behind our multi-armed bandit approach is that the MAB strategy serves both as (1) the method by which we model players and (2) the AI that adapts the game to guide player experience in real time. Our approach consists of 3 main components: \begin{itemize} \item The {\bf arms}: the set of possible ways in which the game can be adapted and from which the MAB strategy chooses each time it needs to adapt the game to the player. \item The {\bf reward}: the numerical quantity the MAB strategy will aim to maximize, such as the player's daily steps in an exergame designed to encourage walking. \item The {\bf MAB strategy}: the algorithm that chooses an arm, observes the reward resulting from that choice, and updates its internal model of the player to make the next decision. \end{itemize} The execution cycle (Figure \ref{fig:motivation-and-steps}) works as follows: \begin{enumerate} \item Initially, the MAB strategy has no information about the player at hand (however, pre-existing individual or population information could be used to initialize the strategy). \item The MAB strategy selects one of the possible arms, and the game is adapted as designated by the arm. \item The player continues to interact with the game within this adaptation, which results in some measurable metric or metrics that render a ``reward'' value. \item The MAB strategy observes this reward and updates its internal model of the player. \item The cycle repeats, and the MAB strategy chooses again. \end{enumerate} MAB strategies aim to balance exploration and exploitation, deciding when to {\em exploit} the arm that is currently believed to be the best for the player (according to the objective encoded in the reward function) and when to {\em explore} a different arm in order to learn more about the current player. Therefore, in addition to making the necessary decisions to adapt the game, MAB strategies naturally facilitate methods for obtaining the necessary data to update the player model. \subsection{Modeling SCO via Multi-armed Bandits}\label{section:modelingSCO} \begin{figure}[t!] \includegraphics[width=\columnwidth]{img/MABLoop2.png} \centering \caption{Execution cycle for our MAB strategy: 1) MAB strategy selects among multiple configurations of comparisons to present to the player. 2) Comparison options are presented. 3) Player interacts with the software. 4) Metrics are generated (daily steps and self-reported motivation). 5) Reward is observed and recorded by the MAB strategy.} \label{fig:motivation-and-steps} \end{figure} Social comparison is a psychological process in which individuals use comparisons to others, often subconsciously, to assess their degree of success (self-evaluation), to plan for future success (self-improvement), or to view themselves in a favorable light (self-enhancement)~\cite{Wood1989}. Even when objective standards are available, comparisons to salient others can still be preferred and potentially even more influential~\cite{klein1997objective}. This carries into gaming, where leveraging social comparison in team competitions has been shown to be effective in influencing participant motivation toward increasing physical activity (PA)~\cite{Zhang2016}. The details that govern the ways in which a person conducts these comparisons are regarded as individual traits that can be described in aggregate as the person's social comparison orientation (SCO)~\cite{Gibbons1999}, which includes their tendency to perform comparisons, their preference in seeking out targets, and the influence that such comparisons have on their future behavior~\cite{Buunk2007}. Specifically, our research is interested in modeling the degree to which an individual tends to seek out comparison targets performing better than they are (i.e., {\em upward} comparisons) or worse than they are (i.e., {\em downward} comparisons). As discussed later, our simulated players model these features. In our broader research of leveraging motivation psychology toward improving engagement and efficacy of game-related interventions, particularly social exergames~\cite{caro2018understanding}, we seek to model player SCO within adaptive games in a way that can provide dynamic and individualized experiences. This paper is a first step in this direction, where we evaluated our SCO player modeling approach in a simpler web-based intervention that gave players an opportunity to log in and compare themselves against other profiles. In our application, we instantiated the three elements of the MAB player modeling framework as follows (Figure \ref{fig:motivation-and-steps}): \begin{itemize} \item {\bf Arms:} The MAB strategy had an opportunity each day to choose which comparison opportunities were displayed. Our setup had 3 arms: arm ``A'' presented the player with zero upward comparison opportunities (i.e., all other displayed profiles walked fewer steps than the player); arm ``B'' presented the player with two upward and two downward, and arm ``C'' offered the player four upward comparisons. It is expected that a player's act of comparing themselves to these profiles, depending on their individual SCO, would result in a change in motivation. Once the configuration was chosen, profiles were presented, and the player was given an opportunity to investigate more details of only one of the profiles. \item {\bf Reward:} The player's eventual steps $s$ that day following the session as well as a self-reported motivation score $m$ on a 5-point Likert scale following the session (players reported their motivation before the session as well) were used to calculate a reward score $r_t$ using the following formula (where $\mu$ and $\sigma$ represent mean and standard deviation with respect to all previously observed data for that player): \[ r_t = \frac{\frac{s_t - \mu_s}{\sigma_s}+\frac{m_t - \mu_m}{\sigma_m}}{2}\] \item {\bf MAB strategy:} we evaluated a large collection of strategies enumerated in Section~\ref{mab-strategy-assessment}. \end{itemize} The next section describes the approach we used to evaluate the different MAB strategies and parameters by using simulated players. As detailed later in the paper, we then evaluated the best performing strategy with real players. \section{Simulated Players} The purpose of creating simulated players was to evaluate different MAB strategies while modeling players that exhibit similar statistical trends as real users (i.e., same variance in numbers of steps per day). This was crucial in our case, as it was unclear whether any MAB strategy would converge fast enough given the expected duration of the study and the large degree of noise present in real human data. Our simulated players had three main components: \begin{enumerate} \item Step Model: A probabilistic model that simulated the number of steps typical humans take in a day. \item SCO Data Model: A representation of a player's tendency toward upward and downward comparisons. \item SCO Behavioral Model: A set of functions implementing player behavior given the step model, the SCO data model, and the player's social comparison activities. \end{enumerate} \subsection{Step Model}\label{step-model} In order to obtain a realistic step model, and in consideration for the bias-variance tradeoff discussed by Carterette et al. \cite{Carterette2011}, we opted to leverage existing behavioral data. Specifically, we obtained data from a publicly available Mechanical Turk survey conducted over three months in 2016 by Furberg et al. \cite{Furberg2016}. After omitting days with zero steps, we confirmed via D'Agostino-Pearson and Shapiro-Wilk tests that the data was not from a normal distribution (both $p < 0.01$). Previous research has suggested human walking patterns align with gamma distributions \cite{Orendurff2008}, reflecting a common trend among intermittent human behaviors \cite{Guo2011}, which we used to fit the data (Figure \ref{fig:mechanical-turk-gamma}). \begin{figure}[t!] \includegraphics[width=\columnwidth]{img/MechTurkGamma2.png} \centering \caption{Daily step data from the Mechanical Turk experiment \cite{Furberg2016}. Histogram is overlayed with a probability density function curve for a Gamma distribution with k=2.8, $\theta$=3100. } \label{fig:mechanical-turk-gamma} \end{figure}\ \subsection{SCO Data Model}\label{section:sco-data-model} We considered the following SCO traits for the simulated players: \begin{enumerate} \item Direction: A propensity for a player to more often make (deliberately or subconsciously) upward or downward comparisons. This is referred to as the player's directional {\em preference} for social comparison~\cite{Wood1989}. \item Intensity: The general degree of influence that SCO activities have in a simulated player's motivation and behavior. \end{enumerate} To achieve this, two parameters $0 \leq u \leq 1$, $0 \leq d \leq 1$ were used that represent the simulated player's affinity toward upward and downward comparisons on a linear scale. This was chosen as two separate variables to reflect the design of the common psychology instrument used to measure SCO--namely, the upward and downward comparison subscales of the Iowa-Netherlands Comparison Orientation Measure (INCOM) \cite{Gibbons1999}. The propensity to prefer one comparison over another (1) is modeled as the proportion defined by the simulated player's $u$ and $d$ values. E.g., an assignment of $(0.8,0.4)$ would indicate a 2x preference toward upward comparisons. A simulated player's general sensitivity to either comparison (2) is modeled by the magnitude of the value. E.g., an assignment of $(0.0,0.5)$ would designate a simulated player not influenced at all by upward comparisons but moderately influenced by downward comparisons. \subsection{SCO Behavioral Model} The simulated players were given a programmatic version of the same exercise intended for real human users in an upcoming user study. The details of this exercise are explained in further detail in Section~\ref{section:methodology}, and involve a repeated interaction over the course of 21 days (i.e., time steps). In each time step, the simulated player is given a list of four {\em profiles} depicting the PA behavior and other details for four realistic (but fabricated) people. The PA performance of these profiles would be strategically generated to provide upward or downward comparisons for the player, according to the simulated player's own steps the previous day and the MAB strategy's assessment of their preference for social comparison. The simulated player then chooses to view one of the profiles in detail, and (presumably influenced by that experience of comparing their PA output to that of another) afterward generates a value for their ``steps'' that day. The decisions made in this process and the value of the generated steps were influenced by the simulated player's internal SCO data model via the behavioral models described below. Specifically, each simulated player was equipped with three behavior models: {\em selector}, {\em step simulator}, and {\em motivation}. The {\it selector} component considers the list of the four potential player profiles for comparison and chooses one of them. The choice (resulting in a {\em comparison target} for that day) is determined by the simulated user's underlying $(u,d)$ values, where a direction preference is stochastically selected, weighted by $u$ and $d$. E.g., if the simulated player had values $(0.4,0.2)$, they would be twice as likely to choose an upward comparison than a downward comparison. Once the direction is determined, the user selects randomly among the choices available in that direction. If no choices are available in that direction (e.g., the simulated user chose to select downward today but the MAB strategy chose Arm C and provided four upward comparisons), a random choice is made from the remainder. The {\it step simulator} component reports the simulated user's daily steps following this selection and resulting comparison event. To do so, the step model is queried to sample a number of steps $s'_t$ from the gamma distribution discussed in Section~\ref{step-model}. This is further modified by the comparison target's performance, $s^c_t$ as well as $(u,d)$. Specifically, the number of steps $s_t$ reported for an upward comparison is: \[s_t = s'_t \left(1 + u \frac{s^c_t-s'_t}{s'_t}\right)\] and \[s_t = s'_t \left(1 + d \frac{s'_t-s^c_t}{s'_t}\right)\] for a downward comparison. The {\it motivation} component enables the simulated player to self-report their motivation both before and after a comparison. Because no public data existed for user motivation reporting, our simulated players select uniformly at random from values 2, 3, and 4 in the 5-point custom Likert scale used for self-reporting motivation. Motivation reported after the comparison is determined by an aggregate affect value calculated as $u - d$ for an upward comparison and $d - u$ for a downward comparison. If this aggregate affect value is positive, then a motivation score higher than or equal to the initial value is randomly selected; if it is negative, than a motivation score lower than or equal to the initial value is randomly selected; and if it is zero, then a motivation score equal to or adjacent to (higher and lower) the initial motivation is randomly selected. \subsection{MAB Strategies}\label{mab-strategy-assessment} We conducted experiments on our simulation reflecting the user flow of the anticipated user study, using simulated players (instead of real players) and multiple MAB strategy variants. Specifically, we compared the following MAB strategies: \begin{itemize} \item Random: used as a baseline strategy for evaluation where the arms are always selected at random. \item UCB1~\cite{auer2002finite}: calculates a score for each arm based on past average reward and a confidence interval (arms selected less often have less data and therefore lower confidence in expected value). UCB1 balances exploiting arms with proven rewards and exploring arms not yet selected enough to create tight confidence intervals. \item $\epsilon$-greedy: selects the best historically performing arm except for a certain percentage of the time (designated by $\epsilon$) where the strategy will randomly explore another arm. \item $\epsilon$-first: selects randomly at the beginning of the experiment until a point specified by $\epsilon$, after which the best historically performing arm is always selected. \item $\epsilon$-decreasing with linear decay: similar to $\epsilon$-greedy, except that the $\epsilon$ parameter starts higher and gradually decreases to a lower value over a specified number of steps. \item $\epsilon$-decreasing with exponential decay: an $\epsilon$-decreasing implementation that decreases the $\epsilon$ factor according to a specified exponential decay curve rather than a linear schedule. \end{itemize} \subsubsection{Regression Strategy Variants}\label{section:regression-variants} Each of the MAB strategies listed above maintains an internal expectation of the reward for each arm, calculated as the average of all rewards previously reported when selecting that arm. Since the amount of variance we observed in the publicly available data was very large, we designed another set of strategies equipped with better score estimation techniques. Specifically, we used linear regression involving reported steps and motivation over the previous days to predict the expected score that would be obtained when selecting a given arm in the next decision. We are aware that such a modification challenges the status of these approaches as MAB strategies, because MAB strategies are stateless; rather, the introduction of reward prediciton via linear regression aligns more with a general reinforcement learning paradigm. But for simplicity, we present these strategy variants as modified MAB strategies. Running linear regressions for each day in the Mechanical Turk data set and observing $p$-values for the correlations of each feature, we performed iterative backward elimination to ultimately end with a model in which all features correlated with a significance of $p < 0.05$. Our final model for predicting a person's daily steps from historical data consisted of their steps 1, 2, 3, 4, 6, and 7 days prior, as well as whether the day of the week was Monday or Friday. Because no such data existed for motivation, we chose an initial approach of building our regression model from the three previously reported motivation values. We incorporated this regression model into the $\epsilon$-based strategies, where we replaced the {\em mean} operation with this linear regression, resulting in ``regression-based'' variants for each of them (e.g., ``regression-based $\epsilon$-decreasing with exponential decay''). \section{Results} In this section, we examine both the results of our simulator runs to prepare for the user study and the results of the user study deploying the MAB strategy that worked best in simulation. \begin{figure}[t!] \includegraphics[width=\columnwidth]{img/Experiment1.png} \centering \caption{Average reward (vertical axis) obtained using a UCB1 MAB strategy for different values of $C$ over time (horizontal axis, top), and global averages (bottom).} \label{fig:experiment1} \end{figure} \begin{figure}[t!] \includegraphics[width=\columnwidth]{img/Experiment2.png} \centering \caption{Average reward (vertical axis) for three different MAB strategies (UCB1, $\epsilon$-greedy, and $\epsilon$-decreasing) over time (horizontal axis).} \label{fig:experiment2} \end{figure} \subsection{Results of Simulations} We performed three sets of experiments, where in each a specific MAB configuration was tested with a given simulated player. Each experiment conducted $N$ experimental trials, where an experimental trial consisted of the simulated player interacting with the MAB strategy over $M$ steps (simulated days). In each step, the MAB strategy was queried for its decision, which would be given to the simulated player, and the player would simulate behavior in response (e.g., selecting one of the four presented profiles and generating resulting steps for that day). This would be reported to the MAB strategy, which would update its internal statistics. The MAB state was reset at the beginning of each trial. We report the average number of steps performed by the simulated players each of the simulated days over all the experimental trials. We used $u = 0.3$ and $d=0.6$ for all the simulated players in our experiments (estimating the ranges of $u$ and $d$ values that most resemble human behavior is part of our future work). \subsubsection{UCB1 C-Value Experiment} Some strategies needed to fine-tune their parameters to the specific task, such as the $\epsilon$ parameter in $\epsilon$-greedy strategies or the $C$ parameter in UCB1. In our simulation experiment depicted in Figure \ref{fig:experiment1}, we report on a set of runs that set out to to tune the $C$ parameter for the UCB1 strategy. Notice the uncommonly high values for $C$, as a result of the fact that the reward function also returns very high values (far from the usual $[0-1]$ interval). In this experiment, we ran $N=50$ million trials of UCB1 for $C=k*400$ for $k \in \{1,...,9\}$. The experiments targeted a horizon of $M=21$ steps in anticipation of a user study lasting 21 days. Our UCB1 implementation requires that every arm be evaluated one time before the strategy engages, which is the cause for the lower results in the first three pulls. From this data, it appears that $C=2400$ achieved the largest reward in our experimental setup. In the interest of space, we do not report the detailed results for tuning $\epsilon$-greedy strategies, but the best parameters were found to be $\epsilon = 0.1$ for $\epsilon$-greedy, and $\epsilon = 1.0$ for $\epsilon$ decreasing. \subsubsection{Strategy Comparison Experiment} In this experiment, we compared three of the most promising strategies to determine the top candidates to investigate for deployment in our user study. Figure \ref{fig:experiment2} shows the results of $N=50$ million trials for each of UCB1 ($C=2400$), $\epsilon$-decreasing ($\epsilon=1.0$), and $\epsilon$-greedy ($\epsilon=0.1$). As before, we targeted a horizon of $M=21$ steps with a requirement that all test each arm once (steps 1-3) before engaging their strategy (forced exploration). The results suggested an advantage in the UCB1 strategy over the others. However, of the two $\epsilon$-class strategies, $\epsilon$-decreasing appeared to perform the best. \subsubsection{Regression-Based Experiment} \begin{figure}[t!] \includegraphics[width=\columnwidth]{img/Experiment3-3.png} \centering \caption{Average reward (vertical axis) for three different MAB strategies over time (horizontal axis) with a nine-step forced exploration period, comparing strategies with linear regression and without.} \label{fig:experiment3} \end{figure} The last experiment compared our best performing strategies from Experiment 2 to regression-based strategies. Figure \ref{fig:experiment3} graphs the results of the experiment with $N=1$ million trials. In this experiment, we also introduced a nine-step {\em forced exploration} period in which each of the three arms were pulled three times (in random order) before the MAB strategy was engaged, an approach that has been found to be advantageous in short-horizon MAB scenarios~\cite{gray2020regression}. Our results showed that the regression variants performed significantly better than the non-regression models (experiments comparing different forced exploration periods are not reported in the interest of space). Results from simulated experiments ultimately led to our selection of MAB strategy for the user study: an $\epsilon$-decreasing strategy implemented with an exponential decay of $1/x^\epsilon$, an $\epsilon$ value of 1.0, and a nine-step forced exploration period. \subsection{Results with Real Users}\label{section:studyvalidation} Finally, we evaluated the best performing MAB strategy from the simulated experiments with real users via a 3-week study. Although the long-term goal of this project is to design a full-fledged game with this technology, we limited ourselves in this study to a web-based activity as a first step toward that goal. \subsubsection{Methodology}\label{section:methodology} The participants were recruited from psychology and digital media courses at Drexel University, where they were informed they would be participating in a study regarding attitudes toward health. They were set up with pedometers (i.e., smartphones equipped with accelerometers and Fitbit software) to track their daily steps and were then directed to engage in daily sessions with a web-based software application. It was requested from each participant that they complete one session (around 5 min.) each day for 21 days, which consisted of the following: After logging in, participants were asked to rank their motivation to exercise on a scale from ``very low'' (1) to ``very high'' (5), after which they were presented with their own step count from the previous day. They were then shown four buttons representing profiles of other people that they could investigate. These profiles were created by the research team and did not represent real people, but they were presented as real and the participants were not informed that they were fabricated. Participants were requested to select a profile among the four options to view additional details regarding that profile beyond simple step count (e.g., diet, hobbies, exercise habits, profession, etc.). The MAB strategy's choice would dictate which profiles would be given in order to offer those comparisons. After the players were done inspecting the selected profile, they were asked again to report their motivation to exercise. Participants were divided into two conditions: experimental (with MAB strategy engaged) and a control condition (that received random arm selections). \subsubsection{Results} A total of 53 people enrolled in the study, but five participants did not finish enough sessions to qualify as having completed the study (at least 14 days). Of the remaining 48 participants, 25 were in the control condition and 23 were in the experimental condition. \begin{table}[t!] \centering \caption{Difference in step counts (between previous day and current day) and reported motivation (before and after session) during the intervention period for participants with and without the MAB strategy (2-tailed T-test, $\alpha$=0.05).} \label{tbl:userstudy} \begin{tabular}{|c|c|c|} \hline Condition & Steps change & Motivation change \\ \hline Control & 42 & 0.013 \\ Experimental & 160 & 0.111 \\ \hline T-score: & 0.3007 & 1.9908 \\ p-value: & 0.764 & 0.047 \\ \hline \end{tabular} \end{table} Results are shown on Table \ref{tbl:userstudy}, where we found that participants in the control group saw an average of 42 extra steps on the days of their sessions (with respect to the day before) compared to 160 extra steps for participants in the experimental group. Though perhaps representing a trend, this finding was not found to be statistically significant ($p$=0.764) via two-sample T-test at $\alpha=0.05$ (two-tailed, dof=445). However, the change in motivation before and after inspecting the selected user profile did demonstrate a statistically significant difference ($p$=0.047) via two-sample T-test at $\alpha=0.05$ (two-tailed, dof=388), where participants in the control group saw an average motivation score increase of 0.013 compared to an increase of 0.111 in the experimental group. \section{Discussion} Though metrics such as daily steps and player motivation might be affected by many factors, the increase in steps and the statistically significant increase in self-reported motivation suggest that our bandit-driven manipulation of selecting individualized social comparison targets for users was more effective than random assignment. This in turn appears to support our approach of defining our player modeling problem as an MAB problem, to which we were able to apply a wealth of theory and solutions already developed by that field. To our knowledge, this is the first case in which an MAB-based approach has been applied toward player modeling in order to implement an adaptive game. In our case, this technique for player modeling via MAB strategies allowed us to engage in both a top-down and bottom-up approach to player modeling simultaneously~\cite{Yannakakis2013}. Theory borrowed from the psychology field of social comparison helped to define the arms for our MAB problem (i.e., enjoying the theory-based insight inherent in top-down modeling), while avoiding the need to provision our classification system with context-specific heuristics to define players (i.e., the advantages of bottom-up modeling). Rather, in our case the mechanism is the model, and the context-agnostic operation of the MAB strategy allowed the system to assess players based simply on a reinforcement loop (i.e., user response in terms of steps and self-reported motivation) instead of the researcher's perceptions or interpretations of player behavior. Further, these results support the proposed benefits of the technique of implementing an AI-based intervention first as a simulation in order to explore the potential options for the AI. In this practice, simulated users were constructed with data and behavioral models (based on psychology theory) that allowed them to exhibit behaviors on which we conducted multiple experiments. The results of these experiments, which were achieved with greater speed and lower cost than preliminary user studies, informed our decisions prior to recruiting human players for our planned user study. \section{Conclusion} This paper presented a new approach to player modeling based on multi-armed bandits (MABs). MABs naturally model both the problem of exposing the player to different situations to build an accurate player model and the problem of adapting a game to maximize features of interest to the designer. We also presented a method for creating simulated players to evaluate and fine-tune these MAB techniques before deploying with real users. Our results indicated that an $\epsilon$-decreasing strategy with a nine-step forced exploration period and a linear regression model to estimate both steps and motivation performed the best in simulation and therefore was used with real users. Our results showed the difference in step count increment with respect to the previous day and motivation change were both higher for the experimental condition using the MAB, although only the latter was found to be statistically significant. This is no easy task, as the degree of variance in both step and motivation data is very high, and the MAB was able to select arms that achieved positive results in just 21 interactions with the users. As part of our future work, we plan to improve our simulated user framework to obtain more realistic user behavior models. We also plan to investigate more sophisticated MAB approaches such as contextual bandits~\cite{chu2011contextual} or combinatorial bandits~\cite{Ontanon2017}, which would allow us to integrate state knowledge or engage complex decisions. We are also interested in comparing the estimations built by the MAB strategy with results obtained from standard psychological SCO tests to measure agreement. Finally, our next step is to incorporate our new approach into our game prototype. \section{Acknowledgements} This work is partially supported by the National Science Foundation under Grant Number IIS-1816470. The authors would like to thank the participants of our user study and all current and past members of this project. Special thanks to Jennifer Villareale and Diane Dallal for facilitating the user study and user data collection which is used in this paper. \bibliographystyle{ACM-Reference-Format}
\section{Introduction} \label{s:intro} Protoplanetary disks around young (few Myr) stars are nowadays considered the formation environments for planetary systems \citep{2012ApJ...756..133C,2014A&A...565A..15M}. In recent years, a growing number of structures, like e.g. rings, gaps and asymmetries, have been identified into these disks \citep[e.g. ][]{2015ApJ...808L...3A, 2017ApJ...837..132V,2018A&A...610A..24F,2018ApJ...859...32P, 2018ApJ...869L..49I}. While different mechanisms have been proposed to explain these structures, one of the most promising is the one implying the presence of planetary mass objects still in their formation process. However, at the moment, the detection of planets associated to these structures has been confirmed for just a handful of cases. The most striking of these detections is certainly the PDS\,70 system, in which two planetary companions have been detected through direct imaging in the gap of the disk \citep{2018A&A...617A..44K,2018A&A...617L...2M,2019NatAs...3..749H, 2019A&A...632A..25M}. \par At older ages (from tens to hundreds Myr), debris disks are expected to have lost a large part of their gaseous component, while their dust component is continuously replenished by collisions of small bodies orbiting within Kuiper belt analogues. The presence of planets can shape these disks as demonstrated by well known cases like $\beta$\,Pic \citep{2009A&A...493L..21L}, HR\,8799 \citep{2008Sci...322.1348M,2010Natur.468.1080M,2016MNRAS.460L..10B, 2018MNRAS.475.4953R} and HD\,95086 \citep{2013ApJ...779L..26R, 2015ApJ...799..146S,2016ApJ...822L..29R}. This is why asymmetries detected in the debris disk are often considered hints for the presence of planetary companions \citep[see e.g. ][]{2005Natur.435.1067K,2014Sci...343.1490D, 2015Natur.526..230B}. Similarly, the existence of wide cavities interior to cold debris belts or in between warm asteroid belt analogues and cold outer belts has been used to argue the presence of multiple planets clearing those wide regions of debris, in analogy to the Solar System architecture \citep{2008ApJ...672.1196A,2015ApJ...800....5M,2016MNRAS.462L.116S, 2018A&A...611A..43L,2018MNRAS.480.2757M,2020A&A...639A..54L}. Perhaps the most convincing and constraining evidence for planets at tens of au is the presence of gaps in broad cold debris disks. There is a growing number of \textit{gapped} debris disks, e.g HD\,107146 \citep{2015ApJ...798..124R,2018MNRAS.479.5423M}, HD\,92945 \citep{2011AJ....142...30G,2019MNRAS.484.1257M}, HD\,15115 \citep{2019ApJ...877L..32M,2019A&A...622A.192E} and HD\,206893 \citep[][ Nederlander et al., submitted]{2020MNRAS.498.1319M} seen with ALMA tracing the distribution of mm-sized grains. Scattered light images have also revealed the presence of gaps in a few systems, e.g. HD\,131835 \citep{2017A&A...601A...7F}, HD\,141569 \citep{2016A&A...590L...7P}, HD\,120326 \citep{2017A&A...597L...7B} and NZ\,Lup \citep{2019A&A...625A..21B}, but these observations trace small $\mu$m\xspace-sized dust which not always is a good tracer of the true mass distribution in the disk (e.g. Wyatt 2006).\par One of the simplest interpretations for those gaps is that they are caused by single planets orbiting in those gaps. It is well known that a planet embedded in a debris disk will carve a gap around its orbit, where particles become unstable and are scattered away by the planet. This is the so-called chaotic zone \citep{1980AJ.....85.1122W} and its size has been studied extensively both exterior to a planet's orbit \citep{2006MNRAS.373.1245Q,2015ApJ...798...83N} and interior to it \citep{2015ApJ...799...41M}. Roughly speaking, we expect that the gap size will have a radial width proportional to $\mu^{2/7}$, where $\mu$ is the mass ratio between the planet and the star. Therefore the width of a given gap can be directly linked to the mass of the putative planet carving it. \par However, gaps can also be carved by planets interior to the disk inner edges. As shown by \citet{2015MNRAS.453.3329P} the secular interaction and scattering between a planet on an eccentric orbit and a disk with a similar mass further out, can open an asymmetric and wide gap in the disk. Another possibility is that two or multiple planets closer-in could place a secular resonance within the disk span creating a gap in the disk as well \citep{2018MNRAS.479.5423M}. Moreover, as shown more recently by \citet{2020arXiv201015617S}, if we consider the non-negligible mass of debris disks and its self-gravity, the secular interaction between the disk and single eccentric planet closer-in can also place a secular resonance within the disk opening an asymmetric gap \citep[see also ][]{2017ApJ...849...98Z}. Although HD\,107146's gap is very symmetric and thus unlikely to be carved by the alternative scenarios described above \citep{2018MNRAS.479.5423M}, these could potentially explain the gaps around HD\,92945, HD\,15115 and HD\,206893. In fact HD\,206893 is known to host a brown dwarf orbiting at 11~au, and \citet{2020arXiv201015617S} showed that this could explain the gap location given the estimated disk mass for that system. Another possible scenario to explain gaps in the distribution of $\mu$m\xspace-sized grains involves planet migration and resonant trapping as proposed by \citet{2006ApJ...639.1153W}. This scenario was used by \citet{2011AJ....142...30G} to explain the structure of the HD\,92945 debris ring. However, this scenario only works for $\mu$m\xspace-sized grains seen in scattered light and the gap seen also at mm-wavelengths rules it out as possible mechanism. \par Tight upper limits on the mass of possible companions, both inside and outside the gap in the disk, could then allow to constrain these possible scenarios. This would help understanding the evolutive processes behind the formation of these structures. While present high-contrast imager like e.g. SPHERE \citep{2019A&A...631A.155B} or GPI \citep{2006SPIE.6272E..0LM} are only able to detect planets more massive than 1~M$_{\mathrm{Jup}}$\xspace, their data can still place meaningful upper limits on the masses of the companion carving the gaps. In this work we present SPHERE observations of two stars hosting debris disks with gaps, HD\,92945 and HD\,107146, and we use them to put mass limits for companions within few tens of au from the stars. \par Furthermore, to complement at shorter separations the limits obtained through direct imaging, we exploited measurements of the proper motion anomaly (PMa) obtained by \citet{2019A&A...623A..72K} and radial velocity (RV) data for these stars. \par The paper presents a description of the two targets in Section~\ref{s:target} and describes observations and data reduction in Section~\ref{s:data}. In Section~\ref{s:result} we describe the results of our analysis while in Section~\ref{s:discussion} we discuss the results and in Section~\ref{s:conclusion} we give our conclusion. \section[]{Target properties} \label{s:target} \subsection{HD92945} HD\,92945 is a K1V \citep{2006A&A...460..695T} star at a distance from the Sun of 21.54$\pm$0.02~pc \citep{2016A&A...595A...1G,2018A&A...616A...1G}. \subsubsection{Spectroscopic analysis} \label{s:spec} In order to constrain the stellar properties, we analyzed a FEROS \citep{kaufer99} spectrum from the ESO archive taken on 2018-04-21 under open time program 0101.A-9012(A) (P.I. R. Launhardt). The spectrum covers a wavelength range between $\approx$ 3600 and 9000 \AA with a nominal resolution of R=48000; the median signal-to-noise ratio (SNR) per pixel is 260. We carried out continuum normalization and rest-frame correction using the 2020 version of $iSpec$ (\citealt{blanco-cuaresma2014}; \citeyear{blanco-cuaresma2019}); equivalent width (EW) have been measured with ARESv2 \citep{sousa2015}. Atmospheric parameters and metallicity ([Fe/H]) have been obtained through EW measurements of iron lines with the $q^2$ python wrapper of MOOG (\citealt{sneden73}, 2017 version), developed and maintened by I. Ramirez \citep{ramirez2014}. We used the ODFNEW ATLAS9 set of model atmopsheres by \cite{castelli03} and the line list published in \cite{dorazi2020}. Our analysis results in the following parameters: $T_{\rm eff}$=5147$\pm$40~K, $\log{g}=4.46\pm0.13$~dex, microturbulent velocity $1.15\pm0.12$~km/s and [Fe/H]=$-0.01\pm$0.03~dex. Broad band colors (B-V, V-I, Bp-Rp, and V-K) are consistent with the spectroscopic estimate of about $\approx$5200~K from the tables in \citet{pecaut2013}. \subsubsection{Stellar age} \begin{figure*} \centering \includegraphics[width=0.5\textwidth,angle=90]{HD92945_plot} \caption{Results of periodogram analysis of HD\,92945 with TESS data. {\it Top panel: } magnitudes vs. barycentric Julian Day. Red and black downward arrows mark the position of primary (P) and secondary (S) spots, respectively, in a double dip light curve. Vertical dotted lines mark the epochs of observed secondary minima, which are receding with respect to the computed epochs of minima (black arrows). {\it Bottom panels:} Lomb-Scargle (left) and Clean (right) normalized periodograms (P$_{\rm N}$). The red dotted line shows the spectral window function superimposed on the LS periodogram and the solid vertical lines mark the power peaks at half rotation period.} \label{f:HD92945_periodogram} \end{figure*} There are various recent estimates of the age of the star, typically, between 100 and 300~Myr \citep[e.g.][]{2004ApJ...614L.125S,2009ApJ...698.1068P,2017A&A...603A...3V}. \citet{nielsen2019} quote membership to the AB Dor with an estimated age of $149^{+31}_{-49}$~Myr \citep{2017A&A...603A...3V,2015MNRAS.454..593B}. We reconsidered the available age indicators. \par We searched for the stellar rotation period by exploiting the photometric variability in the TESS data \citep{tess}. We considered the TESS pre-search data conditioning simple aperture photometry (PDCSAP) time series, removing data in the time interval 1555--1557 (BJD-2457000), where residual instrumental effects were significant. The period search was carried out computing the Lomb-Scargle periodogram \citep{Press02,Scargle82} and the Clean \citep{Roberts87} periodogram, which has the capability of effectively removing possible beat frequencies arising from the data sampling. As shown in the bottom panels of Figure~\ref{f:HD92945_periodogram}, the Lomb-Scargle (LS) periodogram revealed a major power peak at $P=3.40\pm0.24$~days (while the Clean procedure shows P = 3.39$\pm$0.24~days), with a False Alarm Probability (FAP) of the order of 10$^{-6}$. However, a visual inspection of the top panel of Figure~\ref{f:HD92945_periodogram} shows the lightcurve to be double dip, owing to spots on opposite hemispheres. Therefore, the rotation period is likely P = 6.8$\pm$0.34~days. This value is in agreement with the P = 7.176\,d derived using the period-activity relation from \citet{noyes1984}. We marked with red and black downward arrows the epochs of the primary (P) and secondary (S) minima computed according to a rotation period P = 6.8\,d. We note a significant evolution of the secondary spot, which produces progressively deeper minima from one rotation cycle to the next, as well as it shows a slight migration towards earlier epochs, as shown by the position of the vertical dotted lines with respect to black downward arrows. \rm A photometric period which is roughly two times our value was published by \citet{strassmeier2000}. We also note that our rotation period is fully compatible with the other age indicators and with the observed projected rotational velocity, at odds with a 1/2 $\times$ or 2$\times$ period. The FAP associated with our detected period, which is the probability that a peak of given height in the periodogram is caused simply by statistical variations, i.e., Gaussian noise, was computed through Monte Carlo simulations, i.e., by generating 1000 artificial light curves obtained from the real light curve, keeping the date but permuting the magnitude values \citep[see, e.g., ][]{Herbst02}. We followed the method used by \citet{Lamm04} to compute the errors associated with the period determination. \rm \par We found that the rotation period falls close but slightly above the sequence of the Pleiades \citep{rebull2016}, and between the rotation period distributions of similar color stars of M35 and M34 open clusters \citep[ages 150 and 220 Myr, respectively, ][]{meibom2009,meibom2011}. \par The chromospheric emission ($\log{R^{\prime}_{HK}}=-4.32$; \citealt{wright2004}) is within the distribution of the Pleiades, while the X-ray emission ($\log{L_{X}/L_{bol}}=-4.47$) is below the Pleiades locus. The corresponding ages using \citet{mamajek2008} calibrations are 160 and 310 Myr, respectively. \par The equivalent width of the Li 6708\AA\,doublet measured on the FEROS spectrum is 153.2$\pm$1.2~m\AA, within the observed distribution of Pleiades members but sligthly below the mean values for the cluster. \par Kinematic analysis using the BANYAN\footnote{\url{http://www.exoplanetes.umontreal.ca/banyan/banyansigma.php}} $\Sigma$ online tool \citep{gagne2018} yield null membership probability for AB Dor and other young moving groups. \par All these finding are compatible with an object with age close but sligthly older than the Pleiades. From a weighted combination of the available indicators \citep{desidera2015}, we adopt 170 Myr with age limits 120 to 250 Myr. \subsubsection{Mass, radius, and inclination} \label{s:paramHD92945} The stellar mass derived using the PARAM\footnote{\url{http://stev.oapd.inaf.it/cgi-bin/param_1.3}} interface \citep{param2006}, adopting the spectroscopic effective temperature and metallicity, and considering only the age range for the indirect methods as in \citet{desidera2015}, is 0.86$\pm$0.01~M$_{\odot}$\xspace. A stellar radius of $0.75\pm0.02$~R$_{\odot}$\xspace is also derived in the fit. Coupling it with the observed rotation period and the projected rotational velocity $v\sin{i}=4.5\pm1.0$~km/s \citep{nordstrom2004,valenti2005}, we infer an inclination of $53.7^{+31.3}_{-12.4}$~deg. \rm This is compatible with the inclination of the disk (see below), although the uncertainties also allow a significant misalignment. \subsubsection{The debris disk} The presence of a debris disk around this star was first inferred by \citet{2000PhDT........17S} based on the excess at 60~$\mu$m\xspace measured by IRAS. Mid-infrared and submillimiter data obtained using Spitzer and the Caltech Submillimiter Observatory revealed excess also at 70~$\mu$m\xspace and 350~$\mu$m\xspace consistent with a a disk optically thin with an inner radius of 15-23~au and a temperature of 40-46~K \citep{2005ApJ...634.1372C,2009ApJ...698.1068P}. The disk was resolved for the first time by \citet{2011AJ....142...30G} using {\it Hubble space telescope} (HST) images in the V and I bands. They also estimated the fractional infrared luminosity of the disk to be $7.7\times10^{-4}$. Recently, \citet{2019MNRAS.484.1257M} observed its disk using ALMA at 0.86~mm and detected, into the disk of planetesimals that extends from 50 to 140~au, a wide ($20_{-8}^{+10}$~au) gap at a separation of 73$\pm$3~au from the star. They also found for the disk an inclination of $65.4\pm0.9^{\circ}$ and a position angle of $100.0\pm0.9^{\circ}$. They concluded that if the gap was caused by a planet on a circular orbit, the planet would need to be less massive than 0.6~M$_{\mathrm{Jup}}$\xspace. Based on a possible asymmetry in the disk, they also proposed that the gap could have been carved due to secular resonance caused by two planets interior to the disk. In this context, they also defined different possible masses for these two objects. \par Because this system has a bright debris disk, it has been target of a large number of direct imaging surveys \citep[e.g. ][] {2013ApJ...773...73J,2013ApJ...777..160B,2017A&A...603A...3V}. In particular, \citet{2013ApJ...777..160B}, adopting an age of 100~Myr and exploiting NICI near-infrared observations and the AMES-COND \citep{2003IAUS..211..325A} evolutionary models, were able to put a mass limit of $\sim$10~M$_{\mathrm{Jup}}$\xspace at a separation of 0.5\hbox{$^{\prime\prime}$}\xspace ($\sim$10.8~au), of $\sim$4~M$_{\mathrm{Jup}}$\xspace at a separation of 1\hbox{$^{\prime\prime}$}\xspace ($\sim$21.5~au) and less than 2~M$_{\mathrm{Jup}}$\xspace at separation larger than 2\hbox{$^{\prime\prime}$}\xspace ($\sim$43~au). \subsection{HD\,107146} HD\,107146 is a G2V \citep{1970AJ.....75..507H} star at a distance from the Sun of 27.47$\pm$0.03~pc \citep{2016A&A...595A...1G,2018A&A...616A...1G}. \subsubsection{Spectroscopic analysis} We exploited one FEROS spectrum (with a median SNR per pixel of 183) available from the ESO archive and obtained on 2018-04-30 under open time program 0101.A-9012(A) (P.I. R. Launhardt). Following the same approach described in Section \ref{s:spec}, we obtained $T_{\rm eff}=5933\pm53$ ~K, $\log{g}= 4.56\pm0.09$~dex, microturbulent velocity $1.19\pm0.08$~km/s and [Fe/H]=+0.01$\pm$0.03~dex. \par Broad band colors (B-V, V-I, Bp-Rp, and V-K) are consistent with the spectroscopic estimate of about 5900~K obtained from \citet{pecaut2013} tables. \subsubsection{Stellar age} \begin{figure*} \centering \includegraphics[width=0.5\textwidth,angle=90]{HD107146} \caption{Results of periodogram analysis of HD\,107146 using MASCARA data. In the top left panel we plot magnitudes vs heliocentric Julian Day. In the top middle panel we plot the Lomb-Scargle periodogram with the spectral window function and power level corresponding to FAP=1\% overplotted (red dotted line), and we indicate the peak corresponding to the rotation period. In the top right panel we plot the CLEAN periodogram. In the bottom panel we plot the light curve phased with the rotation period. The solid line represents the sinusoidal fit.} \label{f:HD107146_periodogram} \end{figure*} HD\,107146 was observed as target of the MASCARA \citep[The Multi-site All-Sky CAmeRA;][]{Burggraaff2018} project. Observations were collected from February 2015 until April 2016, in two consecutive seasons for a total of 7188 magnitude measurements, with a cadence of about 1 measurement every 10 minutes. After removal of outliers at 3$\sigma$ level, we binned the data with a bin width of 1h and we were left for the subsequent analysis with 1716 average magnitudes with an average precision of $\sigma$=0.0045\,mag. Both Lomb-Scargle and Clean periodogram analyses revealed the same rotation period within the uncertainties in the complete time series as well as in the single observation seasons. In Figure~\ref{f:HD107146_periodogram}, we summarize the results for the first observation season whose monitoring turned out to be more homogeneous with no intra-season gaps. We found a rotation period of P=3.62$\pm$0.03~days with a False Alarm Probability (FAP) $<$1\% and an amplitude of the magnitude rotational modulation $\Delta$V=0.01\,mag. \par A comparison with the rotation period distribution of Pleiades members from \citet{rebull2016} shows the HD107146 period to fit very well into a 125~Myr period distribution (assuming V=7.04~mag and K=5.54~mag V-K=1.5~mag and P=3.62~days). Adopting the rotation-age relations by \citet{mamajek2008} we derive for HD\,107146 an age of 156~Myr. \par The activity indicators yield consistent results: the chromospheric emission \citep[$\log R_{HK}=-4.34$; ][]{wright2004} is within the distribution of the Pleiades, while the X-ray emission ($\log L_{X}/L_{bol}=-4.33$) is slightly below the Pleiades locus. The corresponding ages using the \citet{mamajek2008} calibrations are 189 and 226 Myr, respectively. \par We measured on the FEROS spectrum a Li equivalent width of $125.3\pm2.0$~m\AA\, basically identical to the determination by \citet{wichmann2003} (125 m\AA). This collocates HD\,107146 within the lower envelope of the Pleiades distribution. \par Moreover, the search for an association between HD\,107146 and young moving groups did not give any result. We also searched on Gaia DR2 archive to identify possible comoving objects within $1^{\circ}$ from the star without identifying any. \par On the basis of rotation period, level of chromospheric and coronal activity, and Lithium content, the age of HD107146 appears to be comparable to or slightly older than the Pleiades age. Also in this case we calculated a weighted combination of the available indicators following \citet{desidera2015}, and adopted an age of 150~Myr with limits between 120 to 200~Myr. \subsubsection{Mass, radius, and inclination} The stellar mass derived using the same method used for HD\,92945 as described in Section~\ref{s:paramHD92945} is 1.06$\pm$0.01~M$_{\odot}$\xspace. A stellar radius of $0.94\pm0.02$~R$_{\odot}$\xspace is also derived in the fit. Coupling it with the observed rotation period and the projected rotational velocity $v\sin{i}=5.0\pm0.5$~km/s \citep{nordstrom2004,valenti2005}, we infer an inclination of $22.4^{\circ}\pm5.5^{\circ}$. This inclination is well aligned with the inclination estimated for the disk (see below) within the error bars. \subsubsection{The debris disk} The debris disk was first discovered by \citet{2000PhDT........17S} using IRAS observations at 60~$\mu$m\xspace while observations at sub-millimeter wavelenghts confirmed the presence of dust \citep{2004ApJ...604..414W}. Later, the disk was resolved thanks to HST observations \citep{2004AAS...20512708A, 2011A&A...533A.132E} revealing a disk extending up to a separation of $\sim$160~au and with a brightness peak at 120~au. The infrared fractional luminosity of the disk was estimated to be $1.07\times10^{-3}$ \citep{2011A&A...533A.132E}. Spitzer observations at 24~$\mu$m\xspace and 70~$\mu$m\xspace allowed to determine the presence of a warm dust belt in the system with a temperature of $\sim$120~K and located at a separation of 5-15~au from the star \citep{2011ApJ...730L..29M,2014MNRAS.444.3164K}. Using ALMA data at 1.25~mm, \citet{2015ApJ...798..124R} found that the disk extends from 30 to 150~au from the star but with a decrease of brightness at intermediate radii that, in their interpretation, could be due to the presence of an earth mass planet orbiting at 80~au from the star. Finally, \citet{2018MNRAS.479.5423M} observed HD\,107146 with ALMA at 0.86 and 1.1~mm and found that the planetesimal belt extends from 40 to 140~au and identified a circular gap at separations from 60 to 100~au with a drop in emission by $\sim$50\%. Finally, they were able to constrain the disk inclination to $19.3\pm1.0^{\circ}$ and the position angle to $153.0\pm3.0^{\circ}$ and concluded that either multiple low mass planets or a single planet migrating through the disk were needed to make a wide gap that is only 50\% empty. \section[]{Observations and data reduction} \label{s:data} \subsection{Direct imaging data} \label{s:dataimaging} \begin{table*} \centering \begin{minipage}{150mm} \caption{Characteristics of the SPHERE observations presented in this work. In column 1 we list the observing night, in column 2 we list the target name. In column 3 and 4 we report the SPHERE observing mode and the coronagraph used, respectively. In columns 5 and 6 we list the number of datacubes, the number of frames for each datacube and the exposure time for each frame for observation with IFS and with IRDIS, respectively. In column 7 we report the total rotation of the FOV during each observation. In columns 8, 9 and 10 we report the median values of seeing, coherence time and wind speed during the observations. \label{t:obs}} \begin{tabular}{c c c c c c c c c c} \hline Date & Target & OBs. Mode & Coronagraph & Obs. IFS & Obs. IRDIS & FOV rot. & seeing & $\tau_{0}$ & wind \\ & & & & & &($^{\circ}$) & (\hbox{$^{\prime\prime}$}\xspace) & (ms) & (m/s) \\ \hline 2018-01-27 & HD\,92945 & IRDIFS & N\_ALC\_YJH\_S & 16$\times$6;48 & 16$\times$6;48 & 121.3 & 0.80 & 5.6 & 6.63 \\ 2015-04-09 & HD\,107146 & IRDIFS &N\_ALC\_YJH\_S & 16$\times$5;32 & 16$\times$10;16 & 14.9 & 1.66 & 3.8 & 0.80 \\ 2016-03-19 & HD\,107146 & IRDIFS & N\_ALC\_YJH\_S & 16$\times$5;32 & 16$\times$10;16 & 15.7 & 1.00 & 2.1 & 4.35 \\ \hline \end{tabular} \end{minipage} \end{table*} \begin{figure*} \centering \includegraphics[width=\textwidth]{hd92945_IFS+IRDIS_v2.png} \caption{Final images obtained for HD\,92945 using IFS data (left panel) and IRDIS (right panel). In both cases the data were reduced using PCA subtracting 100 and 25 principal components for IFS and IRDIS, respectively. On the IRDIS image we also plotted dashed lines indicating the position of the outer belt of the disk (red lines) and of the gap (magenta lines). All these lines are outside the FOV of IFS.} \label{f:HD92945img} \end{figure*} \begin{figure*} \centering \includegraphics[width=\textwidth]{hd107146_IFS+IRDIS_v2.png} \caption{Final images obtained for HD\,107146 using IFS data (left panel) and IRDIS (right panel) for the 2016-03-19 epoch. In both cases the data were reduced using PCA subtracting 100 and 25 principal components for IFS and IRDIS, respectively. We also plotted dashed lines to indicate the position of the outer belt of the disk (red lines) and of the gap (magenta lines) as defined in \citet{2018MNRAS.479.5423M}. These lines are outside the IFS FOV.} \label{f:HD107146img} \end{figure*} HD\,92945 was observed during the 2018-01-27 night in the context of the SHINE survey \citep{2017sf2a.conf..331C,2020arXiv200706573V} with SPHERE operating in IRDIFS observing mode, that is with IFS \citep{2008SPIE.7014E..3EC} observing in Y and J spectral bands between 0.95 and 1.35~$\mu$m\xspace while IRDIS \citep{2008SPIE.7014E..3LD} observed in the H spectral band with the H23 filter pair \citep[wavelenght H2=1.593~$\mu$m\xspace; wavelength H3=1.667~$\mu$m\xspace; ][]{2010MNRAS.407...71V}. \par HD\,107146 was observed in two different epochs in the context of the open time program 095.C-0374(A) (P.I. L.~Ricci). The two epochs were acquired on 2015-04-09 and 2016-03-19, respectively. In both cases the observations were carried on with SPHERE operating in the IRDIFS observing mode. The observations for both targets were performed in pupil stabilized mode to be able to implement angular differential imaging \citep[ADI; ][]{2006ApJ...641..556M}. The main characteristics of all the observing nights are listed in Table~\ref{t:obs}. \par For all the observations, frames with satellite spots symmetric with respect to the central star were obtained before and after the coronagraphic sequences. This allowed to determine the position of the star behind the coronagraphic focal plane mask and accurately recenter the data. Furthermore, to allow to correctly calibrate the flux of companions, images with the star not behind the coronagraph were taken. In these cases, the use of an appropriate neutral density filter was mandatory to avoid saturation of the detector. \par The data were reduced through the SPHERE data center \citep{2017sf2a.conf..347D} that perform the requested calibrations, both for IFS and IRDIS, using the data reduction and handling \citep[DRH; ][]{2008ASPC..394..581P} pipeline. On the reduced data we then applied speckle subtraction algorithms using both TLOCI \citep{2014SPIE.9148E..0UM} and principal components analysis \citep[PCA; ][]{2012ApJ...755L..28S} as implemented in the SPHERE consortium pipeline called SpeCal \citep[Spectral Calibration; ][]{2018A&A...615A..92G}. \par \subsection{Radial velocity data} \label{s:rvdata} To complement the direct imaging mass limits at lower separations from the star we retrieved archival RV data for both stars. For HD\,92945 we retrieved from the ESO archive data obtained using the HARPS spectrograph \citep{2006SPIE.6269E..0PL} operating at the 3.6~m telescope at La~Silla. These data were obtained in the context of the open time programs 074.C-0037(A)(P.I. E. Guenther), 075.C-0202(A) (P.I. E. Guenther) and 192.C-0224(B) (P.I. A.-M. Lagrange). The data were reduced using the official HARPS pipeline (DRS v. 3.5), that delivers the RV and full width at half maximum (FWHM) measured on each Cross-Correlation Function (CCF). The mask used is G2. We gathered a total of 28 RVs, ten of them being taken in 2005, the remaining ones in 2016-17. Part of the data was then taken after an instrument upgrade in June~2015 \citep{2015Msngr.162....9L} and display an offset toward larger RVs with respect to the pre-upgrade data. This offset was applied before combining data. The typical precision for these observations was of the order of 1~m/s. \par RVs data for HD\,107146 covering the epochs from 2007 to 2015 were obtained using the SOPHIE high-resolution echelle spectrograph fiber-fed from the Cassegrain focus of the 1.93 m telescope at the Haute-Provence Observatory (OHP) in France \citep{2006tafp.conf..319B}. SOPHIE is installed in a temperature-stabilized environment, and the dispersive elements are kept at constant pressure to provide high-precision radial velocities \citep{2008SPIE.7014E..0JP}. Since June 2011, a new fiber scrambler has provided a significant improvement of the spectrograph illumination stability, leading to a precision gain of a factor $\sim$6 \citep{2011SPIE.8151E..15P, 2013A&A...549A..49B}. The spectra were reduced and extracted using the SOPHIE pipeline \citep{2009A&A...505..853B}, and the resulting wavelength calibrated 2D spectra were correlated using a numerical binary mask corresponding to spectral type G2 to obtain the radial velocity measurement \citep{1996A&AS..119..373B}. In this case the typical precision was of the order of 2~m/s. \subsection{Proper motion data} \label{s:datadeltamu} The presence of a companion can be inferred studying the anomalies of the proper motion of the host star. These anomalies are obtained comparing the long-term proper motion vector derived comparing data from the Hipparcos \citep{2007A&A...474..653V} and the Gaia DR2 catalogues and the instantaneous proper motion values both at the Hipparcos and Gaia DR2 epochs. Deviations between these vectors at S/N levels higher than 3 are indication of the presence of a companion. Even in the case of no evidence of a low mass companion, these data can however be used to define constraints on the mass of a companion especially at low separations from the host star where the limits from direct imaging are less effective or totally absent due to the presence of the coronagraph. In a recent work, \citet{2019A&A...623A..72K} calculated the PMa for a sample of 6741 stars at a distance less than 50~pc from the Sun. Both HD\,92945 and HD\,107146 were part of this sample and we can then exploit these results in combination with the limits from direct imaging and from RV to constrain the presence of companions around these systems. While for the case of HD\,92945 they did not find any evidence of a companion, for HD\,107146 they found a signal to noise (S/N) of 3.42 on the PMa strongly indicative of the presence of a companion. We will discuss in Section~\ref{s:discussion} the implications of this result. \section{Results} \label{s:result} \subsection{HD\,92945} \label{s:HD92945res} \begin{figure} \centering \includegraphics[width=\columnwidth]{plotall_hd92945_contrastmag_all_nodep} \caption{Magnitude contrast versus projected separation in the region around HD\,92945 both for IFS (orange line) and IRDIS (green line).} \label{f:HD92945contrast} \end{figure} \begin{figure} \centering \includegraphics[width=\columnwidth]{plotall_hd92945_mjup_ames_cond_all_dep_v5} \caption{Mass limits obtained for HD\,92945 using the AMES-COND models both for IFS (orange lines) and for IRDIS (green lines). The dashed lines represents the mass limits obtained assuming for the system an age of 120~Myr, the solid lines are obtained assuming an age of 250~Myr. The two dashed vertical lines correspond to the expected position for the gap.} \label{f:HD92945mass} \end{figure} In Figure~\ref{f:HD92945img} we display the final images obtained for HD\,92945 using both IFS (left panel) and IRDIS (right panel). We overplotted on the IRDIS image dashed red line to indicate the position of the disk and dashed magenta lines to indicate the position of the gap as indicated by \citet{2019MNRAS.484.1257M}. The same positions were however outside the field of view (FOV) of IFS. No clear detection of possible candidate companions is in the FOV of both instruments. Also, the disk is undetected as expected due its low surface brightness typical for $\sim$100~Myr old debris disk and ADI self-cancellation effects \citep{2012A&A...545A.111M}. We then calculated the $5\sigma$ luminosity contrast as a function of the separation from the star adopting the technique presented in \citet{2015A&A...576A.121M} and corrected for the small sample statistic following the method described by \citet{2014ApJ...792...97M}. The contrast in magnitude derived with this method both for IFS and IRDIS is displayed in Figure~\ref{f:HD92945contrast}. With IFS, we obtain a contrast of the order of 15 magnitudes at separations larger than 0.5\hbox{$^{\prime\prime}$}\xspace, while IRDIS allows to obtain contrasts better than 16 magnitudes at separations larger than $\sim$1.5\hbox{$^{\prime\prime}$}\xspace. These contrast estimates assume that the disk is optically thin which is true for this system and for debris disks in general. \par Adopting this contrast and exploiting the AMES-COND evolutionary models, we defined the mass limits for possible companions around HD\,92945 adopting both the minimum (120~Myr) and the maximum (250~Myr) age proposed for this system. The separation on the disk plane was considered in this case adopting an inclination of $65.4^{\circ}$ and a position angle of $100.0^{\circ}$ \citep{2019MNRAS.484.1257M}. Using these informations we calculated for each position in the image both the mass limits and the deprojected separation from the star. The median value of the mass for positions at the same separation from the star was assumed as the mass limit at that separation. The results obtained from this procedure are displayed in Figure~\ref{f:HD92945mass} where the dashed lines represent the mass limits obtained for the 120~Myr age case while the solid lines represent the 250~Myr case. Also, in this Figure we distinguish between the IFS case, represented with the two orange lines, and the IRDIS case, represented with the two green lines. The two dashed vertical lines, finally, represent the expected position of the gap in the disk. From our results, we can see that at this position the mass limits are between 1 and 2~M$_{\mathrm{Jup}}$\xspace depending from the age of the system. These limits are still higher than the maximum mass of 0.6~M$_{\mathrm{Jup}}$\xspace evaluated for a single planet carving the gap proposed by \citet{2019MNRAS.484.1257M}. Nevertheless, these limits are useful to rule out the presence of massive companions interior or exterior to the disk. As for the solution with two inner planets proposed by \citet{2019MNRAS.484.1257M} to explain the gap (see e.g. Figure~8 in their paper), our data are able in this case to further constrain the possible configurations proposed in that paper. \par \subsection{HD\,107146} \label{s:HD107146res} \begin{table*} \centering \begin{minipage}{100mm} \caption{Astrometric positions relative to the host star of the candidate companion detected around HD\,107146. \label{t:astroHD1017146}} \begin{tabular}{c c c c c} \hline Obs. date & $\Delta\alpha$ (mas) & $\Delta$Dec (mas) & Separation (mas) & PA (deg) \\ \hline 2015-04-09 & -2948.58$\pm$4.00 & -4487.17$\pm$4.00 & 5369.25$\pm$5.66 & 213.3$\pm$0.5 \\ 2016-03-19 & -2811.68$\pm$4.00 & -4315.67$\pm$4.00 & 5150.78$\pm$5.66 & 213.1$\pm$0.5 \\ \hline \end{tabular} \end{minipage} \end{table*} \begin{figure} \centering \includegraphics[width=1.3\columnwidth]{plot_astro_hd107146} \caption{Relative astrometric positions of the candidate companion of HD\,107146 with respect to the host star in the two observing epochs. The green square represents the relative position of the candidate companion at the first observing epoch. The violet diamond represents the relative position of the candidate companion in the second observing epoch. The solid black line represents the expected course of the companion if it were a background object. The black square at the end of the line represents the expected position at the epoch of the second observation in this latter case.} \label{f:HD107146astro} \end{figure} \begin{figure} \centering \includegraphics[width=\columnwidth]{plotall_hd107146_contrastmag_all_nodep} \caption{Magnitude contrast versus projected separation in the region around HD\,107146 both for IFS (orange line) and IRDIS (green line).} \label{f:HD107146contrast} \end{figure} \begin{figure} \centering \includegraphics[width=\columnwidth]{plotall_hd107146_mjup_ames_cond_all_dep_v5} \caption{Mass limits obtained for HD\,107146 using the AMES-COND models both for IFS (orange lines) and for IRDIS (green lines). The dashed lines represents the mass limits obtained assuming for the system an age of 120~Myr, the solid lines are obtained assuming an age of 200~Myr. The two dashed vertical lines correspond to the expected position for the gap.} \label{f:HD107146mass} \end{figure} In Figure~\ref{f:HD107146img} we display the final images obtained both for IFS (left panel) and for (IRDIS) for the HD\,107146 data obtained during the night of 2016-03-19. We also overplotted on the IRDIS image red dashed lines to indicate the position of the disk and magenta dashed lines to indicate the position of the gap using the values obtained by \citet{2018MNRAS.479.5423M}. These lines are outside the IFS FOV. Like for the case of HD\,92945 we are not able to retrieve any signal from the disk. Also in this case, this is expected due to the low luminosity at estimated age of the system and to the moderately low inclination of the disk with respect to line of sight. In this case, however, a point source is clearly detected at a separation larger than 5\hbox{$^{\prime\prime}$}\xspace and position angle of $\sim$213$^{\circ}$ at south west of the star in both the observing epochs (see Table~\ref{t:astroHD1017146} for precise astrometric data). In Figure~\ref{f:HD107146astro} we display the comparison of the relative astrometric positions in the two epochs listed in Table~\ref{t:astroHD1017146}. The relative position of the candidate in the second epoch (violet diamond), is very similar to its expected position if it was a background object (black squares) while we would expect a reduced shift from the relative position of the first epoch (green square) if it were a bound object. From this analysis we then conclude that the candidate is very likely a background object. \par Following the same method described in Section~\ref{s:HD92945res} for HD\,92945 we calculated the luminosity contrast in the region around HD\,107146. The results of this procedure are shown in Figure~\ref{f:HD107146contrast} both for IFS (orange line) and IRDIS (green line). From IFS we obtain a contrast better than 14~magnitudes at separations larger than 0.5\hbox{$^{\prime\prime}$}\xspace while IRDIS allows to obtain a contrast better than 16~magnitudes at separations larger than 2\hbox{$^{\prime\prime}$}\xspace. \par In Figure~\ref{f:HD107146mass} we display the results of the procedure that, using the AMES-COND evolutionary models and assuming for the disk an inclination of $19.3^{\circ}$ and a position angle of $153^{\circ}$ \citep{2018MNRAS.479.5423M}, converts these contrast limits into mass limits adopting both a minimum age of 120~Myr (dashed lines) and a maximum age of 200~Myr (solid lines). The two dashed vertical lines represent the expected position for the gap in the disk. In the gap the mass limits that we obtain from our data are between 1 and 2.5~M$_{\mathrm{Jup}}$\xspace. At lower separations, we reach limits slightly lower than 5~M$_{\mathrm{Jup}}$\xspace in between 20-50~au. Interior to 20~au the mass limits are typically larger than 5~M$_{\mathrm{Jup}}$\xspace. \par \section{Discussion} \label{s:discussion} \subsection{Comparison with dynamical models} \label{s:dynmod} To further check how the limits we obtained can help to constrain the structures of these systems we compared them with the results of dynamical models following the method devised in \citet{2018A&A...611A..43L}. This method derives analytical tools to link the extension of gaps detected in debris disks with the masses, semi-major axes and eccentricities of putative planets responsible for the gaps. The main assumption underneath this formulation is that a planet sweeps dust particles from a region around its orbit called chaotic zone. The width of the chaotic zone is directly proportional to the mass, the semi-major axis and the eccentricity of the planet. When more than one planet is present in the gap, not only the planet-disk interaction has to be taken into account but also the planet-planet interaction must be treated. Since a stable system is needed to preserve the debris disk, we included this condition in deriving the multi-planetary architecture. Moreover, to avoid further degeneracies in masses and semi-major axes, we assumed the planets with equal mass and as close as possible to have still a marginally stable system. We will refer to this last assumption as max packing condition. \par For what regards the circular orbit case, the planet-disk interaction is ruled by the equation derived in \citet{2015ApJ...799...41M}. See Equations~3 and 4 in \citet{2018A&A...611A..43L} for more details. Moreover, for two planets on circular orbits the stability criterium was derived from \citet{1993Icar..106..247G} setting the eccentricities to zero and assuming equal masses to simplify the calculation as shown by Equation~23 in \citet{2018A&A...611A..43L}. We also considered the case of three equal mass planets. In this case the stability of the system is guaranteed by the the Hill criterium coupled with K-parametrization curves derived by \citet{2014MNRAS.442.1110M} and are also reported in Equation~ 25 in \citet{2018A&A...611A..43L}. \par We decided to not consider the case of eccentric orbit because the disk eccentricity for both the system is very low with an upper limit of 0.097 for HD\,92945 \citep{2018MNRAS.479.5423M} and of 0.03 for HD\,107146 \citep{2019MNRAS.484.1257M}. This should exclude the presence of high-eccentricity embedded planets \citep{PearceWyatt2014,2015MNRAS.453.3329P}. For all the considered cases we assumed that the gap was completely devoid from dust particles. Other studies \citep[e.g. ][]{2016MNRAS.462L.116S} consider the gap as only marginally cleared. In such cases, the masses derived for the planets will be lower with respect to the ones derived in our analysis. We can then consider our solutions as upper limits for each architecture considered. \par Thanks to the procedure described above, we estimated that, in the case of HD\,92945, a single planet on a circular orbit should have a mass of at most $0.3$~M$_{\mathrm{Jup}}$\xspace to carve the gap. This is slightly lower but however in good agreement with the upper limit of 0.6~M$_{\mathrm{Jup}}$\xspace found by \citet{2019MNRAS.484.1257M}. If the gap was carved by multiple planets, their mass could be even lower. Clearly, all these planets have masses well below the detection limit of around 1~M$_{\mathrm{Jup}}$\xspace reachable with SPHERE or with any other present planet imager. \par In the case of HD\,107146 the gap could be caused by a single planet with a mass of at most 3.3~M$_{\mathrm{Jup}}$\xspace. This would allow the detection according to the mass limit we obtained for this system. We have however to stress that, as explained above, this value has to be regarded just an upper limit. Considering two or three planets would require a mass of 0.47~M$_{\mathrm{Jup}}$\xspace and 0.03~M$_{\mathrm{Jup}}$\xspace, respectively, for all the considered planets. This is well outside the detection capability of our observations. \par \begin{figure*} \centering \includegraphics[width=\textwidth]{planet_circular_all.png} \caption{Upper limits of planetary masses from dynamical models considering one (magenta circle), two (green circles) or three (cyan circles) planets with circular orbits both in the case of HD\,92945 (left panel) and HD\,107146 (right panel). The shaded areas represent the positions of the disk with the gap positions also displayed. For comparison we also include the mass limit obtained through direct imaging.} \label{f:oneplan} \end{figure*} \subsection{Comparison with limits from RV and PMa} \label{s:complim} \subsubsection{SPHERE detection probability} \begin{figure*} \centering \includegraphics[height=5.75cm]{prob_HD92945_120myr.png} \includegraphics[height=5.75cm]{prob_HD92945_250myr.png} \includegraphics[height=5.75cm]{prob_HD107146_120myr.png} \includegraphics[height=5.75cm]{prob_HD107146_200myr.png} \caption{Detection probability maps, obtained with the DMC code, for HD\,92945 (left panels) and HD\,107146 (right panels). Given the uncertainty on the age of the targets, we show the results of the runs performed using the contrast limits converted to mass using both the minimum and maximum age estimates (upper and lower panels, respectively).} \label{fig:DImaps} \end{figure*} The Exoplanet Detection Map Calculator \citep[Exo-DMC][]{Bonavita:2020ascl} is the latest (and for the first time in Python) rendition of the MESS \citep[Multi-purpose Exoplanet Simulation System][]{bonavita2012}, a Monte Carlo tool for the statistical analysis of direct imaging survey results. In a similar fashion to its predecessors, the DMC combines the information on the target stars with the instrument detection limits to estimate the probability of detection of a given synthetic planet population, ultimately generating detection probability maps. \par For each star in the sample the DMC produces a grid of masses and physical separations of synthetic companions, then estimates the probability of detection given the provided detection limits. The default setup uses a flat distributions in log space for both the mass and semi-major axis but, in a similar fashion to its predecessors, the DMC allows for a high level of flexibility in terms of possible assumptions on the synthetic planet population to be used for the determination of the detection probability. For each point in the mass/semi-major axis grid the DMC generates a fixed number of sets of orbital parameters. By default all the orbital parameters are uniformly distributed except for the eccentricity, which is generated using a Gaussian eccentricity distribution with $\mu =0$ and $\sigma = 0.3$, following the approach by \cite{hogg2010} \citep[see][for details]{bonavita2013}. For this reason we were able to properly take into account the effects of projection when estimating the detection probability using the contrast limits in Fig.~\ref{f:HD92945contrast} and Fig.~\ref{f:HD107146contrast}. The DMC in fact calculates the projected separations corresponding to each orbital set for all the values of the semi-major axis in the grid \citep[see][for a detailed description of the method used for the projection]{bonavita2012}. This allows to estimate the probability of each synthetic companion to truly be in the instrument FoV and therefore to be detected, if the value of the mass is higher than the limit. In this specific case we chose to restrict the inclination and the longitude of the node of each orbital set to make sure that all companions in the population would lie in the same orbital plane as the disk. This is equivalent to assuming there would be no strong misalignments ($\leq 5\deg$) between the disks and possible embedded planets. A massive misaligned planet would in fact reorient the disk through secular interactions and the new mid plane would be aligned with the planet. This would occur typically in timescales shorter than the age of these systems \citep{PearceWyatt2014}.\\ Moreover, since in both cases the disk does not appear to be particularly eccentric \citep{2018MNRAS.479.5423M,2019MNRAS.484.1257M}, which would be the case if the orbit of the embedded planets were \citep{PearceWyatt2014, 2015MNRAS.453.3329P}, we assumed a sigma of 0.1 for the eccentricity distribution. \\ In Figure~\ref{fig:DImaps} we show the results for both targets. In order to take into account the uncertainty on the age values, two different DMC runs were performed for each target, using the minimum and maximum values of the mass limits, respectively. \subsubsection{Comparison with available radial velocity measurements} \label{s:rvdmc} \begin{figure*} \centering \includegraphics[height=5.75cm]{prob_HD92945_combine.png} \includegraphics[height=5.75cm]{prob_HD107146_combine.png} \caption{Combined RV + DI detection probability maps for for HD\,92945 (left panels) and HD\,107146 (right panels), estimated considering the best value of the probability for each point in the grid (see Sec.~\ref{s:rvdmc} for details). The values of the age for the magnitude to mass conversion of the DI limits in this case were set to 170~Myr for HD\,92945 and 150~Myr for HD\,107146.} \label{fig:comb_probmap} \end{figure*} While MESS was limited in its use to Direct Imaging data\footnote{With the exception of its MESS2 incarnation, which was designed to produce combined RV+DI detection probability maps \citep[see][for details]{lannier2017}}, the DMC can also be used to draw similar constraints using other kind of data sets, including radial velocity (RV) ones. Given the provided RV time series, the DMC uses the Local Power Analysis (LPA) approach described by \cite{meunier2012} to estimate, for each mass and separation in the grid, for what fraction of the generated orbital sets the signal generated by the companion would be compatible with the data. Once the computation is completed, the code outputs a 2D detection probability map analogous to the ones produced with the DI module as well as a 1D detection limit showing the minimum value of the companion mass detectable with a given confidence level. The latter, which is roughly equivalent to extracting a specific detection probability contour from the 2D map, is the standard approach used to obtain RV detection limits in the past. The advantage of retaining the 2D information is that the resulting RV probability map can then be easily combined with the output of the DI module\footnote{One should note that the current version of DMC does not allow for a truly accurate estimate of the sensitivity achieved combining the two data sets, like the one performed in \cite{lannier2017}. The method used only allows for a rough estimate of the combined probability. A new module analogous to the MESS2 will be available in the future.}. \par We therefore run the RV-DMC on the available data for our two targets, using the same mass/semi-major axis grid as well as the same assumptions for the orbital parameter generation. The two sets of maps were then combined by considering, for each point in the grid, the best value of the probability. The resulting combined map, shown in Figure~\ref{fig:comb_probmap}, then contains the probability that a companion at a given mass and semi-major axis is detected using at least one of the two methods. \subsubsection{Comparison with PMa results} \begin{figure} \centering \includegraphics[width=\columnwidth]{HD92945_PMaRVplot_v3} \caption{Upper limits in mass obtained from the PMa measurements at Hipparcos epoch (orange line) and for the Gaia DR2 epoch (blue line) for HD\,92945 compared with the limits from the RV data (violet line, assuming a 95\% confidence level, see Sec.~\ref{s:rvdmc} for details) and from the DI data for an age of 120~Myr (green line) and for an age of 250~Myr (red line).} \label{f:HD92945pma} \end{figure} \begin{figure} \centering \includegraphics[width=\columnwidth]{HD107146_PMaRVplot_v3} \caption{Mass as function of the separation from the host star of the companion needed to explain the PMa measurement at the Gaia DR2 epoch for HD\,107146 (blue line). The blue shaded area display the 99.7\% confidence interval. The orange line represents the upper limits from PM measurements at the Hipparcos epoch while the violet line displays the mass limits from RV data (assuming a 95\% confidence level, see Sec.~\ref{s:rvdmc} for details). The DI mass limits adopting an age of 120~Myr are shown with the green line while the DI limits adopting an age of 200~Myr are shown by the red line.} \label{f:HD107146pma} \end{figure} As explained in Section~\ref{s:datadeltamu} PMa data are available for both targets and they can be used to calculate the mass of a possible object that cause the anomaly as function of the separation from the host star exploiting Equation~15 in \citep{2019A&A...623A..72K}. For HD\,92945 no clear evidence of the presence of a companion emerges from these data. We can then use these data just to put upper limits on the masses of possible companions. They are however comparable with those obtained through RV and DI only at separations between 1 and 10~au while they are clearly worse at lower and larger separations. This can be easily seen in Figure~\ref{f:HD92945pma} where the upper limits from the PMa measurements obtained using data from the Hipparcos and the Gaia DR2 epochs (orange and blue lines; labeled as upper limit Hipp PMa and upper limit DR2 PMa) are compared with mass limits from RV data (violet line) and from DI data (red and green lines). \par Different is the situation for HD\,107146 where a 3.4$\sigma$ PMa obtained at the Gaia DR2 epoch strongly suggests the presence of a companion. Using Equation~15 in \citet{2019A&A...623A..72K} and a Monte-Carlo approach as in \citet{2020MNRAS.498.1319M} we can estimate the mass of the companion responsible for the PMa, as a function of the semi-major axis. This is represented by the blue line in Figure~\ref{f:HD107146pma} and is labeled as DR2 PMa while the shaded blue area surrounding this line is the 99.7\% confidence interval. The 95\% 1D mass limits obtained with the RV module of Exo-DMC (violet line) combined with the mass limits from the DI data (red and green lines) allow to exclude large part of the possible masses and separations for this putative object. In this way, if it exists, it can just be at separations between $\sim$2-7~au and with a mass of 2-5~M$_{\mathrm{Jup}}$\xspace. Future imaging instruments operating at extremely large telescopes (ELT) should be able to image such a planet that will also be clearly detected through the next Gaia data releases. It has to be noted that the presence of an asteroid belt at a separation between 5 and 15~au has been inferred thanks to Spitzer data \citep{2011ApJ...730L..29M,2014MNRAS.444.3164K}. If confirmed, the proposed companion would lay just inside the position of this belt and its presence could explain the formation of the belt with the pressure bump due to the presence of such massive planet. \section{Conclusion} \label{s:conclusion} We presented the results of the SPHERE observations of the stars HD\,92945 and HD\,107146. Both these stars are known to host a debris disk with an outer planetesimals belt containing a wide gap. Moreover, they share similar ages. Given the morphology of these gaps, it was proposed that these could have been carved by one or more planetary mass companion, residing inside the gap for both systems \citep{2015ApJ...798..124R, 2018MNRAS.479.5423M} or possibly interior to the disk for HD~92945 since its gap appears marginally asymmetric \citep{2019MNRAS.484.1257M}. The capability to put strong constraints on the mass of possible companions around these objects can help to better understand the formation mechanisms of these structures. Moreover, due to the paucity of gas in these disks \citep{2018MNRAS.479.5423M,2019MNRAS.484.1257M}, the problem of strong absorption that can be experienced for younger and gas-rich disks \citep[like e.g. the case of HD\,163296; ][]{2019MNRAS.488...37M} should be less important making more reliable the limits obtained around these objects. On the other hand, the older ages of these objects with respect to systems hosting protoplanetary disks makes harder to detect low mass planets. \par In any case, the mass limits that we obtain from our observations are much lower than obtained before with previous DI observations. Indeed, for both the systems considered here, we were able to put very tight mass limits of 1-2~M$_{\mathrm{Jup}}$\xspace according to the age considered for the system. For what concerns the inner region with respect to the planetesimal belt, we can reach for both systems mass limits lower than 4-5~M$_{\mathrm{Jup}}$\xspace for the range of possible age considered. These limits are enough to exclude some of the proposed configurations of inner planets that could explain the structure of the gap. \par While the contrast obtained with SPHERE is still not enough to confirm or to exclude large part of the range of possible companion masses that could explain the shape of the planetesimal belt around HD\,92945 and HD\,107146, the mass limits much tighter than those obtained in past survey, can help in limiting the possible configurations of these planetary systems. This data demonstrate the potentiality of the direct imaging in the understanding of the structure of planetary systems. To fully exploit this potentiality, however, we will probably need to wait for future instrumentation reaching higher contrasts and larger spatial resolution. As an example the external planets responsible of carving the gap should be recoverable using the JWST NirCAM operating in coronagraphic observing mode in the wavelength range 3-5~$\mu$m\xspace as at separations of some tens of au it should be able to image companions down to the Saturn mass \citep{2012SPIE.8442E..2NB}. \par At low separations from the star, DI observations are not able to put tight mass limits. Moreover, the presence of the coronagraph hides the inner region of the planetary system. We then used both PMa and RV data to obtain informations on the inner regions of these systems. As for HD\,92945, no clear signal is obtained from PMa and we can just put upper limits that are however comparable to those obtained through RV data (some tens of M$_{\mathrm{Jup}}$\xspace) and through DI at higher separations. Much more interesting is the situation for HD\,107146 where there is a tentative 3.4$\sigma$ PMa indicative of the presence of a companion. Coupling this result with the limits coming from RV and DI we are able to constrain both the separation ($\sim$2-6~au) and the mass (2-5~M$_{\mathrm{Jup}}$\xspace) of such object. We note here that future ELT coronagraphic instruments will possess the angular resolution requested to detect such an object while the next Gaia releases should be able to further confirm its existence. \section*{Acknowledgments} Based on observations collected at the European Organisation for Astronomical Research in the Southern Hemisphere under ESO programme 095.C-0374(A), 1100.C-0481(D), 074.C-0037(A), 075.C-0202(A) and 192.C-0224(B) Partly Based on observations collected with the SOPHIE spectrograph on the 1.93 m telescope at Observatoire de Haute-Provence (CNRS), France under program 07A.PNP.CONS, 08A.PNP.CONS, 12A.DISC.WATS, 13A.PNP.DELF, 14A.PNP.LAGR, 14B.PNP.LAGR. SPHERE is an instrument designed and built by a consortium consisting of IPAG (Grenoble, France), MPIA (Heidelberg, Germany), LAM (Marseille, France), LESIA (Paris, France), Laboratoire Lagrange (Nice, France), INAF–Osservatorio di Padova (Italy), Observatoire de Genève (Switzerland), ETH Zurich (Switzerland), NOVA (Netherlands), ONERA (France) and ASTRON (Netherlands) in collaboration with ESO. SPHERE was funded by ESO, with additional contributions from CNRS (France), MPIA (Germany), INAF (Italy), FINES (Switzerland) and NOVA (Netherlands). SPHERE also received funding from the European Commission Sixth and Seventh Framework Programmes as part of the Optical Infrared Coordination Network for Astronomy (OPTICON) under grant number RII3-Ct-2004-001566 for FP6 (2004–2008), grant number 226604 for FP7 (2009–2012) and grant number 312430 for FP7 (2013–2016). We also acknowledge financial support from the Programme National de Plan\'{e}tologie (PNP) and the Programme National de Physique Stellaire (PNPS) of CNRS-INSU in France. This work has also been supported by a grant from the French Labex OSUG@2020 (Investissements d’avenir – ANR10 LABX56). The project is supported by CNRS, by the Agence Nationale de la Recherche (ANR-14-CE33-0018). It has also been carried out within the frame of the National Centre for Competence in Research PlanetS supported by the Swiss National Science Foundation (SNSF). \par This work has made use of data from the European Space Agency (ESA) mission {\it Gaia} (\url{https://www.cosmos.esa.int/gaia}), processed by the {\it Gaia} Data Processing and Analysis Consortium (DPAC, \url{https://www.cosmos.esa.int/web/gaia/dpac/consortium}). Funding for the DPAC has been provided by national institutions, in particular the institutions participating in the {\it Gaia} Multilateral Agreement. This research has made use of the SIMBAD database, operated at CDS, Strasbourg, France. \par D.M., V.D.O., R.G., S.D. acknowledge support from the ``Progetti Premiali'' funding scheme of the Italian Ministry of Education, University, and Research and from the ASI-INAF agreement n.2018-16-HH.0. S.M. is supported by a research fellowship from Jesus College, University of Cambridge. M.B. acknowledges funding by the UK Science and Technology Facilities Council (STFC) grant no. ST/M001229/1. T.H. acknowledges support from the European Research Council under the Horizon 2020 Framework Program via the ERC Advanced Grant Origins 83 24 28. \section*{Data Availability} The data underlying this article will be shared on reasonable request to the corresponding author. \bibliographystyle{mnras}
\section*{List of Symbols} \sectionmark{List of Symbols} \renewcommand*{\arraystretch}{1.1} \begin{longtable}{@{}l @{\hspace{5mm}} l $F_n$ & The free group of rank $n$\\ ${\rm FP}(G)$ & The Formanek-Procesi HNN-extension $\< G\times G,t\mid t(g,g)t^{-1}=(1,g), g\in G\>$\\ $\rm gr(G)$ & The associated graded Lie algebra of $G$ over ${\mathbb Z}$\\ $\gamma_c(G)$ & The $c$-th term of the lower central series of $G$\\ ${\cal X}$, ${\cal Y}$, ${\cal Z}$, ... & sets of elements\\ $[n]$ & $=\{1,\ldots, n\}$\\ $L$ & a Lie algebra\\ $U(L)$ & The universal enveloping algebra of the Lie algebra $L$\\ $L({\cal X})$ & The free Lie algebra on ${\cal X}$\\ $\gamma_2(L)$ & The derived algebra of $L$\\ ${\cal Z}\wr{\cal Y}$ & $=\left\{[z,y_1,\ldots,y_k] \mid z\in {\cal Z}, y_i\in{\cal Y}, k\ge 0\right\}$\\ $V_n$ & a free ${\mathbb Z}$-module of rank $n$ \\ ${\cal V}_n=\{v_1,\ldots, v_n\}$ & a ${\mathbb Z}$-basis of the free ${\mathbb Z}$-module $V_n$. \\ $T(V_n)=T({\cal V}_n)$ & The free associative ${\mathbb Z}$-algebra on $V_n$.\\ $T^{r}({\cal V}_{n})$ & the $\mathbb{Z}$-submodule of $T({\cal V}_{n})$ freely spanned by all elements of the form $v_{i_{1}} \cdots v_{i_{r}}$\\ & with $v_{i_j}\in V_n$.\\ ${\cal B}^*$ & The free monoid over the set ${\cal B}$.\\ ${\rm ad}v$ & The ${\mathbb Z}$-linear map from a Lie algebra $L$ to itself with $u({\rm ad}v)=[u,v]$ namely, a \\ & derivation of $L$.\\ ${\rm Der}L$ & The Lie algebra of the derivations of $L$. \\ $\Delta_{{\cal X}}$ & $=\{{\cal X} \times {\cal X} \setminus \{(x,x): x \in {\cal X}\}\}$\\ $\theta_{{\cal X}}$ & a subset of $\Delta_{{\cal X}}$ such that $(x_i,x_j) \in \theta_{{\cal X}} ~{\rm if ~and~only~if}~(x_j,x_i) \in \theta_{{\cal X}}$.\\ $\theta_{{\cal X},\delta}$ & a choice of one element of every pair $(x_i,x_j),(x_j,x_i)\in\theta_{\cal X}$ based on an order of\\ & the elements of ${\cal X}$.\\ $[G]_{H,m}$ & $=[H,\underbrace{G, \ldots, G}_{m}]$, the normal subgroup of $G$ generated by the group commutators\\ & $[h, a_{1}, \ldots, a_{m}]$ for all $h \in H$ and $a_{1}, \ldots, a_{m} \in G$\\ $N_{\cal S}$ & the normal closure of ${\cal S}\subset G$ in $G$ \end{longtable} \end{comment} \section{Introduction} The Formanek-Procesi group was introduced in \cite{fp} as a counterexample to the linearity of Aut$(F_n)$, the group of automorphisms of a free group $F_n$ of rank $n$, with $n \geq 3$. For any group $G$, the Formanek-Procesi group is the HNN-extension with presentation $$FP(G)=\< t, G\times G \mid t^{-1}(g,g)t=(1,g), \ g\in G\>.$$ It was shown in \cite{fp} that $FP(F_n)$ is not linear. On the other hand, it was shown in \cite{mrv} that an HNN-extension with base a finitely generated abelian group is linear if and only if is residually finite. Hence, if $A$ is a finitely generated abelian group, then $FP(A)$ is an HNN-extension with base an abelian group and, by results of \cite{arv}, it is residually finite and hence, it is linear. A right-angled Artin group (raag) is a finitely generated group with a standard presentation of the form $H=\< a_1,\ldots, a_k\mid [a_i,a_j]=1~\text{for~ certain~ pairs}~ (i,j)~ \text{with}~ i,j\in\{1,\ldots,k\}\>$. The generating set $\{a_1,\ldots,a_k\}$ is the {\it standard generating set} for $H$. The {\it defining graph} $\Gamma$ of $H$ is the graph whose vertices correspond to infinite cyclic groups generated by $\<a_i\>$ and whose edges connect a pair of vertices $a_i, a_j$ if and only if $[a_i,a_j]=1$. For an extensive survey concerning raags, one may consult \cite{charney} and the references therein. It is obvious that if $H$ is not abelian, then $H$ contains free subgroups and so, $FP(H)$ is not linear. In this work, we investigate the associated Lie algebra of $FP(H)$ by providing an Elimination method for $\rm gr(FP(H))$. The Elimination method was introduced by Lazard in \cite{laz} for the study of nilpotent groups and $N$-series. In \cite{dk}, Duchamp and Krob study the free partially commutative Lie algebra and its universal enveloping algebra and prove a partially commutative version of Lazard's elimination, thus providing a presentation of the Lie algebra of a partially commutative set. In the present work, we prove a Lazard's Elimination version of the free Lie algebra by decomposing it into a summand of free Lie algebras and ideals that originate by the various relators that appear in the Formanek-Procesi group with base a raag. To achieve this decomposition, besides the classical Lazard's Elimination, we also use results of Labute \cite{labu1,labu} and of Duchamp and Krob \cite{dk}. As a result, we are able to get a presentation of the Lie algebra of the Formanek-Procesi group with basis a raag and to show that the Formanek-Procesi group with basis a raag is residually nilpotent. A first attempt in that direction was made in \cite{sev}. In the process, we recover results of \cite{wade} concerning the Lie algebra of a raag. To be more specific, for a positive integer $n$, with $n \geq 2$, let $[n]=\{1,\ldots, n\}$ and $\Delta_n=[n]\times[n]\setminus\{(a,a)\mid a\in [n]\}$. Let $\theta_n$ be a non-empty subset of $\Delta_n$ such that $\theta_n$ contains both $(a,b)$ and $(b,a)$ for $a,b\in[n]$. We call $\theta_n$ a partial commutation relation on $[n]$. Define $\theta_{n,\delta}=\{(a,b)\in \theta_n\mid a>b\}$. Notice that $\theta_{n,\delta}$ is the edge set of a defining graph of a raag $H$. Now, let $H_1$ and $H_2$ two copies of a raag with presentations $$H_i=\<a_{i,1},\ldots, a_{i,n}\mid [a_{i,k},a_{i,l}]=1\ \mbox{for all}\ (k,l)\in\theta_{n,\delta}\>, \ i=1,2$$ and define $FP(H)$ to be the group with generating set $t, a_{1,1},\ldots,a_{1,n},a_{2,1},\ldots, a_{2,n}$ and defining relations $$ta_{1,k}a_{2,k}t^{-1}=a_{2,k}, \ \ k\in [n],$$ $$[a_{i,r},a_{i,s}]=1,~~ i=1,2,\ \ (r,s)\in\theta_{n,\delta}~~\text{and}$$ $$[a_{1,k},a_{2,l}]=1, \ \ k,l\in [n].$$ Using the first set of the above relation, we may solve for $a_{1,k}, k\in [n]$ and replace into the other two sets of relations to get a presentation with generators $t, a_{2,k}, k\in[n]$ and relations $$[t,a_{2,k},a_{2,l}]=1, [a_{2,r},a_{2,s}]=1,[[t,a_{2,r}],[t,a_{2,s}]]=1, \mbox{for}\ k,l\in [n], (r,s)\in\theta_{n,\delta}$$ and, by renaming $y_i=a_{2,i}$, we finally have $$FP(H)=\<t,y_1,\ldots,y_n\mid [t,y_{k},y_{l}]=[y_{r},y_{s}]=[[t,y_{r}],[t,y_{s}]]=1, k,l\in[n], (r,s)\in\theta_{n,\delta}\>$$ For a positive integer $n$, with $n \geq 2$, let $\rm gr(F_{n+1})$ be the free Lie algebra (over $\mathbb Z$) with free generating set $\{t,y_1,\ldots,y_n\}$ and $J$ be the ideal of $\rm gr(F_{n+1})$ generated by the set $${\cal J}=\{[t,y_{k},y_{l}], [y_{r},y_{s}], [[t,y_{r}],[t,y_{s}]], k,l\in[n], (r,s)\in\theta_{n,\delta}\}. $$ Our main theorem is the following. \begin{theorem}\label{mth} With the previous notations, let $G=FP(H)$. Then, \begin{enumerate} \item ${\rm gr}(G) \cong {\rm gr}(F_{n+1})/J$ as Lie algebras. \item $G$ is residually nilpotent. In particular, $G$ is a Magnus group. \end{enumerate} \end{theorem} The structure of the paper is the following. In section 2, we introduce some notation and we give some known results concerning Lazard's Elimination method and a method on changing basis on a Lie algebra using the free associative $\mathbb Z$-algebra. In section 3, we give an algorithm that inductively describes the basis of an ideal $I$ of the free Lie algebra generated by a set described by a partial commutative relation. Moreover, we describe the $\mathbb Z$-module $I/\gamma_2(I)$ via the adjoint representation. In section 4, we analyze the ideal generated by the Formanek-Procesi relations with base group a raag into various pieces. Section 5 contains some group theoretic observations and their connection with the Lie algebra. Finally, in Section 6, we put things together by showing that the various pieces of the ideal generated by the Formanek-Procesi relations with base group a raag are direct summands of the free Lie algebra. That way we are able to describe the presentation of the Lie algebra of the Formanek-Procesi group and prove that the group is residually nilpotent. \section{Notation and preliminary results} Let $G$ be any group. For non-empty subsets $X$ and $Y$ of $G$, we write $[X,Y]$ for the subgroup of $G$ generated by the (group) commutators $[x,y] = x^{-1}y^{-1}xy$ with $x \in X$ and $y \in Y$. For a positive integer $c$, let $\gamma_{c}(G)$ be the $c$-th term of the lower central series of $G$. That is, $\gamma_{1}(G) = G$ and, for $c \geq 2$, $\gamma_{c}(G) = [\gamma_{c-1}(G),G]$. We write $G^{\prime} = \gamma_{2}(G)$ for the commutator subgroup of $G$. The associated graded abelian group ${\rm gr}(G) = \bigoplus_{c \geq 1}{\rm gr}_{c}(G)$, where ${\rm gr}_{c}(G) = \gamma_{c}(G)/\gamma_{c+1}(G)$, has the structure of a graded Lie algebra over $\mathbb{Z}$, the Lie bracket operation in ${\rm gr}(G)$ being induced by the commutator operation in $G$ (see, for example, \cite{bour}, \cite{laz}, \cite{mks}). A group $G$ is called residually nilpotent if to each $g \neq 1$ in $G$ there corresponds a normal subgroup $K_{g}$ such that $G/K_{g}$ is nilpotent and $g \notin K_{g}$. An equivalent assertion is that $G$ is residually nilpotent if $\bigcap_{c \geq 1} \gamma_{c}(G) = \{1\}$. A group $G$ is called a Magnus group if $G$ is residually nilpotent and each quotient group $\gamma_{c}(G)/\gamma_{c+1}(G)$ is torsion-free. For a positive integer $n$, with $n \geq 2$, let $F_{n}$ be a free group of rank $n$ with a free generating set $\{x_{1}, \ldots, x_{n}\}$. For each $c \in \mathbb{N}$, the quotient group ${\rm gr}_{c}(F_{n})$ is a free abelian group of finite rank. Furthermore, ${\rm gr}(F_{n})$ is a free Lie algebra over $\mathbb{Z}$ with a free generating set $\{x_{1}F^{\prime}_{n}, \ldots, x_{n}F^{\prime}_{n}\}$ (see \cite{mks}). Let $H$ be a subgroup of $F_{n}$. For $d \in \mathbb{N}$, let $H_{d} = H \cap \gamma_{d}(F_{n})$ and so, for $d = 1$, we get $H_{1} = H$. For $d \geq 1$, we have $ H_{d+1} = H_{d} \cap \gamma_{d+1}(F_{n})$. Since $H$ is a subgroup of $F_{n}$, we obtain a descending series of subgroups of $H$ $$ (H_{d})_{d \geq 1}: H = H_{1} \supseteq H_{2} \supseteq H_{3} \supseteq \cdots. $$ Since $[H_{\kappa}, H_{\lambda}] \subseteq H_{\kappa + \lambda}$ for all $\kappa, \lambda \in \mathbb{N}$, we get the series $(H_{d})_{d \geq 1}$ is a strongly central series of $H$. For $d \in \mathbb{N}$, we define $I_{d}(H) = H_{d}\gamma_{d+1}(F_{n})/\gamma_{d+1}(F_{n}) \leq {\rm gr}_{d}(F_{n})$. Form the (restricted) direct sum $ {\cal L}(H) = \bigoplus_{d \geq 1}I_{d}(H)$ of the abelian groups $I_{d}(H)$. Since the series $(H_{d})_{d \geq 1}$ is strongly central, we have ${\cal L}(H)$ is a Lie subalgebra of ${\rm gr}(F_{n})$. In the case $H = N$ is a normal subgroup of $F_{n}$, the Lie subalgebra ${\cal L}(N)$ is an ideal of ${\rm gr}(F_{n})$ (see \cite{laz}). By \emph{a Lie algebra} $L$, we mean a Lie algebra over the ring $\mathbb{Z}$ of integers and by $U(L)$ we denote the {\em universal enveloping algebra} of $L$ (see \cite{bour}). For a positive integer $n$, with $n \geq 2$, let $V_{n}$ be a free $\mathbb{Z}$-module with a $\mathbb{Z}$-basis the set ${\cal V}_{n} = \{v_{1}, \ldots, v_{n}\}$. We write $T(V_{n})$ for the free associative $\mathbb{Z}$-algebra (with identity element) on $V_{n}$ (that is, $T(V_{n})$ is a free associative $\mathbb{Z}$-algebra such that $V_{n}$ is a free $\mathbb{Z}$-submodule of $T(V_{n})$ and every basis of $V_{n}$ is a free generating set of $T(V_{n})$). Hence, we may write $T(V_{n}) = T({\cal V}_{n})$ and so, $T({\cal V}_{n}) = \bigoplus_{r \geq 0}T^{r}({\cal V}_{n})$, where $T^{0}({\cal V}_{n}) = \mathbb{Z}$, $T^{1}({\cal V}_{n}) = V_{n}$ and, for all $r \geq 0$, $T^{r}({\cal V}_{n})$ is the $\mathbb{Z}$-submodule of $T({\cal V}_{n})$ freely spanned by all elements of the form $v_{i_{1}} \cdots v_{i_{r}}$ with $v_{i_{1}}, \ldots, v_{i_{r}} \in {\cal V}_{n}$. For $r = 0$, the trivial product $v_{i_{1}} \cdots v_{i_{r}}$ is interpreted as the neutral element $1$ in $T({\cal V}_{n})$. Give $T({\cal V}_{n})$ the structure of a Lie algebra by defining the Lie product $[u,v] = uv - vu$ for all $u, v \in T({\cal V}_{n})$. The Lie subalgebra of $T({\cal V}_{n})$ generated by the set ${\cal V}_{n}$ is denoted by $L({\cal V}_{n})$ (or simply $L_{n}$). It is well known that $L_{n}$ is a free Lie algebra on the set ${\cal V}_{n}$ (see \cite{bour}). For a positive integer $c$, let $L^{c}_{n} = T^{c}({\cal V}_{n}) \cap L_{n}$. That is, $L^{c}_{n}$ is the $\mathbb{Z}$-submodule of $L_{n}$ generated by all Lie commutators $[v_{i_{1}}, \ldots, v_{i_{c}}]$, $i_{1}, \ldots, i_{c} \in [n]$. The $\mathbb{Z}$-submodule of $L^{c}_{n}$ is called the $c$-th homogeneous component of $L_{n}$. Thus, $L_{n} = \bigoplus_{c \geq 1}L^{c}_{n}$. It is well known that $L_{n}$ and ${\rm gr}(F_{n})$ are naturally isomorphic as Lie algebras by an isomorphism $\chi_{n}: L_{n} \rightarrow {\rm gr}(F_{n})$ satisfying the conditions $\chi_{n}(v_{i}) = x_{i} F^{\prime}_{n}$, $i \in [n]$. In the light of the isomorphism $\chi_{n}$, we identify $L_{n}$ with ${\rm gr}(F_{n})$ and write, for any $c \geq 2$, $ [v_{i_{1}}, \ldots, v_{i_{c}}] = [x_{i_{1}}, \ldots, x_{i_{c}}]\gamma_{c+1}(F_{n})$ for all $i_{1}, \ldots, i_{c} \in [n]$. Furthermore, for any $c \geq 1$, $ L^{c}_{n} = {\rm gr}_{c}(F_{n})$ and so, $I_{d}(N) \leq L^{d}_{n}$ for all $d \geq 1$. Let $L_{n}$ be a free Lie algebra of rank $n$, with $n \geq 2$, freely generated by the set $\{v_{1}, \ldots, v_{n}\}$. Then, $v_{1}, \ldots, v_{n}$ are the Lie monomials of degree $1$. If $u$ is a Lie monomial of degree $r$ and $v$ is a Lie monomial of degree $s$, with $u \neq v$, then $[u,v]$ is a Lie monomial of degree $r+s$. M. Hall proved in \cite[Theorem 3.1]{hall} that the basic Lie monomials form a $\mathbb{Z}$-basis of $L_{n}$. In the free group $F_{n}$ freely generated by the set $\{x_{1}, \ldots, x_{n}\}$, as observed in \cite{hall}, we may define basic group commutators in terms of $x_{1}, \ldots, x_{n}$. In \cite[Theorem 4.1]{hall} proved that, for each $c \in \mathbb{N}$, the quotient group ${\rm gr}_{c}(F_{n})$, being a free abelian group of finite rank $n_{c}$, has a $\mathbb{Z}$-basis $\{w_{1}\gamma_{c+1}(F_{n}), \ldots, w_{n_{c}}\gamma_{c+1}(F_{n})\}$ where each $w_{i}$ is a basic group commutator of weight $c$ (see, also, \cite[Theorem 5.12, Corollary 5.12 ~(iv)]{mks}). Throughout this paper, we use the left-normed convention for Lie commutators. For subsets ${\cal B}$ and ${\cal C}$ of any Lie algebra, we write $ {\cal C} \wr {\cal B} = \{[c, b_{1}, \ldots, b_{k}]: c \in {\cal C}, b_{1}, \ldots, b_{k} \in {\cal B}, k \geq 0\}$. The following result is a version of Lazard's ``Elimination Theorem" (see \cite[Chapter 2, Section 2.9, Proposition 10]{bour}). \begin{theorem}[Elimination]\label{th1} Let ${\cal A} = {\cal B} \cup {\cal C}$ be the disjoint union of its proper non-empty subsets $\cal B$ and $\cal C$ and consider the free Lie algebra $L({\cal A})$. Then, $\cal B$ and ${\cal C} \wr {\cal B}$ freely generate Lie algebras $L({\cal B})$ and $L({\cal C} \wr {\cal B})$, and there is a $\mathbb{Z}$-module decomposition $L({\cal A}) = L({\cal B}) \oplus L({\cal C} \wr {\cal B})$. Furthermore, $L({\cal C} \wr {\cal B})$ is the ideal of $L({\cal A})$ generated by ${\cal C}$. \end{theorem} Let $L({\cal A})$ be the free Lie algebra on $\cal A$. For all non-empty subsets ${\cal V}, {\cal U}$ of $L({\cal A})$, we write $ S({\cal V}, {\cal U}) = \{[v,u]: v \in {\cal V}, u \in {\cal U}\}$. We inductively define the subsets $({\cal A}_{m})_{m \geq 1}$ of $L({\cal A})$ by $ {\cal A}_{1} = {\cal A}$ and, for all $m \geq 2,~{\cal A}_{m} = \bigcup_{p+q=m} (S({\cal A}_{p}, {\cal A}_{q}) \setminus \{0\})$. For $m \geq 1$, an element of ${\cal A}_{m}$ is called \emph{a simple Lie commutator} of degree $m$. The following result has been proved in \cite[Lemma II.5]{dk}. \begin{lemma}\label{le1} Let ${\cal A} = {\cal B} \cup {\cal C}$ be the disjoint union of its proper subsets $\cal B$ and $\cal C$ and consider the free Lie algebra $L({\cal A})$. Let $u$ be a simple Lie commutator of $L({\cal A})$. Then, either $u \in L({\cal B})$ or $u \in L({\cal C} \wr {\cal B})$. \end{lemma} Let $V$ be a free $\mathbb{Z}$-module with a $\mathbb{Z}$-basis a finite non-empty set ${\cal A}$. Write ${\cal A} = {\cal B} \cup {\cal C}$ for the disjoint union of its non-empty proper subsets ${\cal B}$ and ${\cal C}$. Let $T(V)$ be the free associative $\mathbb{Z}$-algebra on $V$. Thus, $T(V)$ is a free associative $\mathbb{Z}$-algebra subject to any $\mathbb{Z}$-basis of $V$ and $T(V) = T({\cal A})$. Let $L({\cal A})$ be the Lie subalgebra of $T({\cal A})$ generated by the set $\cal A$, which is a free Lie algebra on $\cal A$. By Theorem \ref{th1}, $ L({\cal A}) = L({\cal B}) \oplus L({\cal C} \wr {\cal B})$. The aim of this section is to construct a $\mathbb{Z}$-basis of $L({\cal C} \wr {\cal B})$, by means of the Poincare-Birkhoff-Witt theorem (see \cite{bour}), suitable to our purposes. Let ${\cal B} = \{b_{1}, \ldots, b_{m}\}$ and ${\cal B}^{*}$ be the free monoid over the set $\cal B$. That is, $ {\cal B}^{*} = \{\varepsilon\} \cup (\bigcup_{t \geq 1}{\cal B}^{t})$, where ${\cal B}^{t} = \{b_{i_{1}} \cdots b_{i_{t}}: i_{1}, \ldots, i_{t} \in [m]\}$. Since, for $t \geq 1$, ${\cal B}^{t} \cong \underbrace{{\cal B} \times \cdots \times {\cal B}}_{t}$, we have $|{\cal B}^{t}| = |{\cal B}|^{t}$. For any $c \in {\cal C}$ and $b_{i_{1}} \cdots b_{i_{t}} \in {\cal B}^{t}$, we write $[c;b_{i_{1}} \cdots b_{i_{t}}] = [c,b_{i_{1}}, \ldots, b_{i_{t}}] \in L^{t+1}({\cal A})$. For a positive integer $r$, with $r \geq 2$, let $ {\cal U}_{r} = \{[c;b_{i_{1}} \cdots b_{i_{r-1}}]: c \in {\cal C}; b_{i_{1}} \cdots b_{i_{r-1}} \in {\cal B}^{r-1}\}$ and so, $ {\cal C} \wr {\cal B} = \bigcup_{r \geq 1}{\cal U}_{r}$ with ${\cal U}_{1} = {\cal C}$. For $r \geq 1$, let $U_{r}$ be the $\mathbb{Z}$-module spanned by the set ${\cal U}_{r}$. Since $L({\cal C} \wr {\cal B})$ is a free Lie algebra on ${\cal C} \wr {\cal B}$, we obtain the set ${\cal U}_{r}$ is a $\mathbb{Z}$-basis of $U_{r}$ for all $r$. Let $T({\cal B})$ be the free associative $\mathbb{Z}$-algebra on ${\cal B}$ being a subalgebra of $T({\cal A})$. Hence, $T({\cal B}) = \bigoplus_{r \geq 0}T^{r}({\cal B})$. The set ${\cal B}^{r}$ is a $\mathbb{Z}$-basis of $T^{r}({\cal B})$. Furthermore, $T({\cal B})$ has the structure of a Lie algebra. The Lie subalgebra of $T({\cal B})$ spanned by the set $\cal B$ is the free Lie algebra $L({\cal B})$. We denote by $V_{\cal C}$ the free $\mathbb{Z}$-module with a $\mathbb{Z}$-basis $\cal C$. By Theorem \ref{th1}, it follows that, for any $r \geq 1$, there exists a $\mathbb{Z}$-module isomorphism $ \xi_{r}: U_{r} \rightarrow V_{\cal C} \otimes_{\mathbb{Z}}T^{r-1}({\cal B})$ subject to $\xi_{r}([c, b_{j_{1}}, \ldots, b_{j_{r-1}}]) = c \otimes b_{j_{1}} \cdots b_{j_{r-1}}$ for all $c \in \cal{C}$, $b_{j_{1}}, \ldots, b_{j_{r-1}} \in {\cal B}$ and so, there exists a $\mathbb{Z}$-module isomorphism $ \xi: \bigoplus_{r \geq 1}U_{r} \rightarrow V_{\cal C} \otimes_{\mathbb{Z}} T({\cal B})$ such that $\xi(u_{1} + \cdots + u_{\kappa}) = \xi_{1}(u_{1}) + \cdots + \xi_{\kappa}(u_{\kappa})$ for all $u_{i} \in U_{i}$, $i = 1, \ldots, \kappa$. The following result is well known (and it can be easily proved). \begin{lemma}\label{le2} \begin{enumerate} \item In $T({\cal B})$, for any positive integer $n$, with $n \geq 2$, and $\kappa \in \{0, \ldots, n-1\}$, let $S_{n,\kappa}$ be the set of all permutations $\sigma \in S_{n}$ satisfying $$ \sigma(1) > \cdots > \sigma(\kappa) > \sigma(\kappa + 1) < \sigma(\kappa + 2) < \cdots < \sigma(n). $$ Then, for $a_{1}, \ldots, a_{n} \in T({\cal B})$, $$ [a_{1}, \ldots, a_{n}] = \sum_{\kappa = 0}^{n-1}\left(\sum_{\sigma \in S_{n,\kappa}}(-1)^{\kappa}a_{\sigma(1)} \cdots a_{\sigma(n)}\right). $$ \item For all $c \in {\cal C}$ and $b_{11}, \ldots, b_{1n_{1}}, \ldots, b_{\lambda 1}, \ldots, b_{\lambda m_{\lambda}} \in {\cal B}$, $$ \xi^{-1}(c \otimes [b_{11}, \ldots, b_{1 m_{1}}] \cdots [b_{\lambda 1}, \ldots, b_{\lambda m_{\lambda}}]) = [c, [b_{11}, \ldots, b_{1 m_{1}}], \ldots, [b_{\lambda 1}, \ldots, b_{\lambda m_{\lambda}}]] . $$ \end{enumerate} \end{lemma} Let $\cal M$ be any $\mathbb{Z}$-basis of $L({\cal B})$ consisting of simple Lie commutators. For any positive integer $r$, the set ${\cal M}_{r} = {\cal M} \cap L^{r}({\cal B})$ is a $\mathbb{Z}$-basis of $L^{r}({\cal B})$. So, ${\cal M} = \bigcup_{r \geq 1}{\cal M}_{r}$. For $r \geq 1$, we arbitrarily order the elements of ${\cal M}_{r}$ and extend it, by increasing the degree, to the elements of ${\cal M}$. We denote by ${\cal M}^{<}$ the set of all elements of $T({\cal B})$ of the form $$ v_{1} v_{2} \cdots v_{\kappa}, \eqno(2.1) $$ where $\kappa \geq 0$, $v_{1}, \ldots, v_{\kappa} \in {\cal M}$ and $v_{1} \leq v_{2} \leq \cdots \leq v_{\kappa}$. Note that the elements $(2.1)$ are distinct as written. A consequence of Poincare-Birkhoff-Witt Theorem (see \cite{bour}) gives that the set ${\cal M}^{<}$ is a $\mathbb{Z}$-basis of $T({\cal B})$. Thus, the set $ {\cal G} = \{c \otimes v_{1} \cdots v_{\kappa}: c \in {\cal C}, v_{1} \cdots v_{\kappa} \in {\cal M}^{<}, \kappa \geq 0\}$ is a $\mathbb{Z}$-basis of the free $\mathbb{Z}$-module $V_{\cal C} \otimes_{\mathbb{Z}}T({\cal B})$. For any $u = v_{1} v_{2} \cdots v_{\lambda}$, where any $v_{i} \in {\cal M}_{\nu_{i}}$, we write $[c;u] = [c,v_{1}, \ldots, v_{\lambda}]$, with $c \in V_{\cal C}$. Since $\xi^{-1}$ is a $\mathbb{Z}$-module isomorphism, it follows, by Lemma \ref{le2}~(2), that the set $ \xi^{-1}({\cal G}) = {\cal P} = \{[c;u]: c \in {\cal C}, u \in {\cal M}^{<}\}$ is a $\mathbb{Z}$-basis of $\bigoplus_{r \geq 1}U_{r}$. For a non-negative integer $r$, let ${\cal M}_{r}^{<}$ be the set of all elements $(2.1)$ of degree $r$. Thus, for $r = 0$, ${\cal M}_{0}^{<} = \{1\}$. It is clear enough that the set ${\cal M}_{r}^{<}$ is a $\mathbb{Z}$-basis of $T^{r}({\cal B})$. For $r \in \mathbb{N}$, let $ {\cal G}_{r} = \{c \otimes v_{1} \cdots v_{\kappa}: c \in {\cal C}, v_{1} \cdots v_{\kappa} \in {\cal M}^{<}_{r-1}\}$. Therefore, the set ${\cal G}_{r}$ is a $\mathbb{Z}$-basis of $V_{\cal C} \otimes_{\mathbb{Z}}T^{r-1}({\cal B})$ and so, the set $ \xi^{-1}({\cal G}_{r}) = {\cal P}_{r} = \{[c;u]: c \in {\cal C}, u \in {\cal M}^{<}_{r-1}\}$ is a $\mathbb{Z}$-basis of $U_{r}$. Clearly, $ {\cal P} = \bigcup_{r \geq 1}{\cal P}_{r}$. \begin{proposition}\label{pr3.1} With the above notation, $L({\cal A}) = L({\cal B}) \oplus L({\cal P})$. Furthermore, $L({\cal C} \wr {\cal B}) = L({\cal P})$. \end{proposition} {\em Proof.\ } Since the set ${\cal P}$ is a $\mathbb{Z}$-basis of $\bigoplus_{r \geq 1}U_{r}$, we obtain $L({\cal C} \wr {\cal B}) = L({\cal P})$ and so, $L({\cal A}) = L({\cal B}) \oplus L({\cal P})$.~\hfill $\Box$ \bigskip Let $v_{1}, \ldots, v_{\kappa} \in {\cal M}$ and consider the product $v_{1}v_{2} \cdots v_{\kappa}$. For any permutation $\pi$ of $\{1, 2, \ldots, \kappa\}$, the product $v_{\pi(1)} v_{\pi(2)} \cdots v_{\pi(\kappa)}$ is called a re-arrangement of $v_{1}v_{2} \cdots v_{\kappa}$. For a proof of the following result, we refer to \cite[Lemma 1]{bs}. \begin{lemma}\label{le3.3} Let $\cal M$ be an ordered basis of $L({\cal B})$. For each element $u$ of ${\cal M}^{<}$, let $u^{\prime}$ be a re-arrangement of $u$. Then, the set $\{u^{\prime}: u \in {\cal M}^{<}\}$ is a basis of $T({\cal B})$. \end{lemma} By the above discussion and Lemma \ref{le3.3}, we may replace ${\cal P}$ with the set ${\cal P}^{\prime} = \{[c;u^{\prime}]: c \in {\cal C}; u \in {\cal M}^{<}\}$. Hence, we restate Proposition \ref{pr3.1} as follows. \begin{proposition}\label{pr3.2} With the previous notations, $L({\cal A}) = L({\cal B}) \oplus L({\cal P}^{\prime})$. Furthermore, $L({\cal C} \wr {\cal B}) = L({\cal P}) = L({\cal P}^{\prime})$. \end{proposition} \section{The free partially commutative Lie algebra: An algorithm and a $\mathbb{Z}$-module via the adjoint representation}\label{sec4} Let $L$ be any Lie algebra. For each $v \in L$, the $\mathbb{Z}$-linear mapping ${\rm ad}v: L \rightarrow L$ is defined by $u({\rm ad}v) = [u,v]$ for all $u \in L$. In particular, ${\rm ad}v$ is a derivation of $L$. The set of all derivations of $L$ is denoted by ${\rm Der} L$ and is regarded as a Lie algebra in a natural way. The map ${\rm ad}: L \rightarrow {\rm Der} L$ sending $v$ to ${\rm ad} v$ for all $v \in L$ is called the adjoint representation of $L$. Let $U(L)$ be the universal enveloping $\mathbb{Z}$-algebra of $L$ and we regard $L$ is contained in $U(L)$. Any element of $U(L) \setminus \{1\}$ is a $\mathbb{Z}$-linear combination of elements of the form $u_{1} u_{2} \cdots u_{m}$ where $u_{1}, \ldots, u_{m} \in L$. Let $L$ be a free Lie algebra and $J$ be an ideal of $L$ generated by a non-empty set consisting of simple Lie commutators. We write $\gamma_{2}(J) = [J,J]$ for the $\mathbb{Z}$-submodule of $J$ spanned by all $[u,v]$, with $u, v \in J$, and $\tilde{v} = v + J$ for all $v \in L$. Note that, since $J$ is an ideal of $L$, $\gamma_{2}(J)$ is an ideal of $L$. The $\mathbb{Z}$-module $J/\gamma_{2}(J)$ becomes a (right) $L/J$-module via the adjoint representation of $L/J$. Namely, $$ \begin{array}{rll} (u+\gamma_{2}(J))\tilde{v} & = & u({\rm ad}v) + \gamma_{2}(J) \\ & = & [u,v] + \gamma_{2}(J) \end{array} $$ for all $u \in I$ and $v \in L$. Hence, the $\mathbb{Z}$-module $J/\gamma_{2}(J)$ becomes a (right) $U(L/J)$-module by defining $$ \begin{array}{rll} (u+\gamma_{2}(J)) \tilde{v}_{1} \tilde{v}_{2} \cdots \tilde{v}_{\kappa} & = & u({\rm ad}v_{1}) ({\rm ad}v_{2}) \cdots ({\rm ad}v_{\kappa}) + \gamma_{2}(J) \\ & = & [u, v_{1}, v_{2}, \ldots, v_{\kappa}] + \gamma_{2}(J) \end{array} $$ for all $u \in I$ and $v_{1}, v_{2}, \ldots, v_{\kappa} \in L$. \subsection{An algorithm} For a positive integer $m$, with $m \geq 2$, let ${\cal Y} = \{y_{1}, y_{2}, \ldots, y_{m}\}$ and $\theta_m$ be a partial commutation relation in $[m]$. Let $L({\cal Y})$ be the free Lie algebra on ${\cal Y}$ and $I$ be the ideal of $L({\cal Y})$ generated by the set ${\cal I} = \{[y_{i}, y_{j}]: (i,j) \in \theta_m\}$. For any Lie algebra $L$, we write $\gamma_{2}(L)$ for the derived algebra of $L$. One of our aims in this section is to show that $I$ is a direct summand of $L({\cal Y})$. Proving this, we have $L({\cal Y})/I$ is a free $\mathbb{Z}$-module. Since $I$ is a homogeneous ideal, we get, by a result of Witt (see, for example, \cite[Section 2.4, Theorem 5. See, also, Theorem 3]{baht}), $I$ is a free Lie algebra. Next, we present a decomposition of $I$ where each of its summand is a free Lie algebra by explicitly giving a free generating set. Moreover, if $I \neq \{0\}$, we show that the $\mathbb{Z}$-module $I/\gamma_{2}(I)$ is a free (right) $U(L({\cal Y})/I)$-module with a free generating set ${\cal I} + \gamma_{2}(I)$. If $\theta_{m} = \emptyset$, then $I = \{0\}$ and so, there is nothing to prove. Without loss of generality, we may assume that $(1,2)\in\theta_m$. Order the elements of ${\cal Y}$ as $y_1<y_2<\ldots<y_n$ and define $\theta_{m,\delta} = \{(a,b)\in\theta_{m}\mid a>b\}$. Let $T({\cal Y})$ be the universal enveloping $\mathbb{Z}$-algebra of $L({\cal Y})$ and $I$ be the ideal of $L({\cal Y})$ generated by the set ${\cal I} = \{[y_i, y_j]: (i, j) \in \theta_{m,\delta}\}$. For $i \in [m]$, let ${\cal Y}_{i} = \{y_{1}, y_{2}, \ldots, y_{i}\}$. Note that ${\cal Y}_{m} = {\cal Y}$. Furthermore, for $i \in [m] \setminus \{1\}$, we write ${\cal I}_{{\cal Y}_{i}} = \{[y_a,y_b]: y_a, y_b \in {\cal Y}_{i}; (a,b) \in \theta_{m,\delta}\}$ and $I_{{\cal Y}_{i}}$ for the ideal of $L({\cal Y}_{i})$ generated by the set ${\cal I}_{{\cal Y}_{i}}$. In particular, $I = I_{{\cal Y}}$. Since ${\cal Y}_{2} \subset {\cal Y}_{3} \subset \cdots \subset {\cal Y}_{m} = {\cal Y}$, we have $ {\cal I}_{{\cal Y}_{2}} \subseteq {\cal I}_{{\cal Y}_{3}} \subseteq \cdots \subseteq {\cal I}_{{\cal Y}_{m}} = {\cal I}$. By our choice, ${\cal I}_{{\cal Y}_{2}} =\{[y_{2},y_{1}]\}$. Hence, ${\cal I}_{{\cal Y}_{j}} \neq \emptyset$ for all $j \in [m] \setminus \{1\}$. For $i \in [m-1] \setminus \{1\}$, by Theorem \ref{th1}, $$ L({\cal Y}_{i+1}) = L({\cal Y}_{i}) \oplus L(\{y_{i+1}\} \wr {\cal Y}_{i}). \eqno(3.1) $$ As observed in \cite{dk}, by using Lemma \ref{le1}, we have, for all $i \in [m-1] \setminus \{1\}$, $$ I_{{\cal Y}_{i+1}} = (I_{{\cal Y}_{i+1}} \cap L({\cal Y}_{i})) \oplus (I_{{\cal Y}_{i+1}} \cap L(\{y_{i+1}\} \wr {\cal Y}_{i})). \eqno(3.2) $$ By a result of Duchamp and Krob \cite[Theorem II.7]{dk}, $$ I_{{\cal Y}_{i+1}} \cap L({\cal Y}_{i}) = I_{{\cal Y}_{i}} \eqno(3.3) $$ for all $i \in [m-1] \setminus \{1\}$. By $(3.2)$ and $(3.3)$, $$ I_{{\cal Y}_{i+1}} = I_{{\cal Y}_{i}} \oplus (I_{{\cal Y}_{i+1}} \cap L(\{y_{i+1}\} \wr {\cal Y}_{i})). \eqno(3.4) $$ \begin{theorem}\label{th4.3} With the previous notations, for any $i \in [m-1]$, there are explicitly described subsets ${\cal B}_{2}, \ldots, {\cal B}_{i+1}$ of $L(\{y_{2}\} \wr {\cal Y}_{1}), \ldots, L(\{y_{i+1}\} \wr {\cal Y}_{i})$, respectively, consisting of simple Lie commutators of degree at least $2$ in terms of elements of ${\cal Y}_{2}, \ldots, {\cal Y}_{i+1}$, respectively, such that $ L({\cal Y}_{i+1}) = \langle {\cal Y}_{i+1} \rangle \oplus L({\cal B}_{2}) \oplus \cdots \oplus L({\cal B}_{i+1}) \oplus I_{{\cal Y}_{i+1}}$, where $\langle {\cal Y}_{i+1} \rangle$ is the free $\mathbb{Z}$-module with a $\mathbb{Z}$-basis the set ${\cal Y}_{i+1}$. Moreover, for any $i$, with $i \in [m-1] \setminus \{1\}$, the ideal $I_{{\cal Y}_{i+1}}$ is a free Lie algebra, there are explicitly described subsets ${\cal D}_{3}, \ldots, {\cal D}_{i+1}$ of $L(\{y_{3}\} \wr {\cal Y}_{2}), \ldots, L(\{y_{i+1}\} \wr {\cal Y}_{i})$, respectively, consisting of simple Lie commutators of degree at least $2$ in terms of elements of ${\cal Y}_{3}, \ldots, {\cal Y}_{i+1}$, respectively, and $I_{{\cal Y}_{i+1}} = \gamma_{2}(L({\cal Y}_{2})) \oplus L({\cal D}_{3}) \oplus \cdots \oplus L({\cal D}_{i+1})$. \end{theorem} {\em Proof.\ } We induct on $i$ and let $i = 1$. Then, ${\cal B}_{2} = \emptyset$ and, by Theorem \ref{th1}, $L(\{y_{2}\} \wr \{y_{1}\}) = \langle y_{2} \rangle \oplus \gamma_{2}(L({\cal Y}_{2}))$, where $\langle y_{2} \rangle$ is the $\mathbb{Z}$-module spanned by $y_{2}$. Since the derived algebra $\gamma_{2}(L({\cal Y}_{2}))$ of $L({\cal Y}_{2})$ is generated as an ideal by the set ${\cal I}_{{\cal Y}_{2}}$, we have $I_{{\cal Y}_{2}} = \gamma_{2}(L({\cal Y}_{2}))$. Thus, $ L({\cal Y}_{2}) = \langle {\cal Y}_{2} \rangle \oplus I_{{\cal Y}_{2}}$. It is well known that $I_{{\cal Y}_{2}}$ is a free Lie algebra with a free generating set consisting of simple Lie commutators. Namely, $I_{{\cal Y}_{2}} = L({\cal Y}^{(1)}_{2})$, where ${\cal Y}^{(1)}_{2} = \{[y_{2}, y_{1}, ~_{\alpha}~y_{1}, ~_{\beta}~y_{2}]: \alpha + \beta \geq 0\}$. Thus, $i \geq 2$. Let $\kappa \in [m-1] \setminus \{1\}$ and assume that our claim is valid for $\kappa$. Therefore, there are explicitly described subsets ${\cal B}_{3}, \ldots, {\cal B}_{\kappa}$ of $L(\{y_{3}\} \wr {\cal Y}_{2}), \ldots, L(\{y_{\kappa}\} \wr {\cal Y}_{\kappa - 1})$, respectively, consisting of simple Lie commutators of degree at least $2$ in terms of elements of ${\cal Y}_{3}, \ldots, {\cal Y}_{\kappa}$, respectively, such that $$ L({\cal Y}_{\kappa}) = \langle {\cal Y}_{\kappa} \rangle \oplus L({\cal B}_{3}) \oplus \cdots \oplus L({\cal B}_{\kappa}) \oplus I_{{\cal Y}_{\kappa}}. \eqno(3.5) $$ The ideal $I_{{\cal Y}_{\kappa}}$ is a free Lie algebra, there are explicitly described subsets ${\cal D}_{3}, \ldots, {\cal D}_{\kappa}$ of $L(\{y_{3}\} \wr {\cal Y}_{2}), \ldots, L(\{y_{\kappa}\} \wr {\cal Y}_{\kappa - 1})$, respectively, consisting of simple Lie commutators of degree at least $2$ in terms of elements of ${\cal Y}_{3}, \ldots, {\cal Y}_{\kappa}$, respectively, and $$ I_{{\cal Y}_{\kappa}} = \gamma_{2}(L({\cal Y}_{2})) \oplus L({\cal D}_{3}) \oplus \cdots \oplus L({\cal D}_{\kappa}). \eqno(3.6) $$ For each $j \in [\kappa] \setminus \{1, 2\}$, let ${\cal M}_{{\cal D}_{j}}$ be the ordered $\mathbb{Z}$-basis of $L({\cal D}_{j})$ consisting of the basic Lie commutators which are formed by the elements of ${\cal D}_{j}$. Write $ {\cal M}_{{\cal Y}_{\kappa},I} = {\cal M}^{\prime}_{{\cal Y}_{2}} \cup {\cal M}_{{\cal D}_{3}} \cup \cdots \cup {\cal M}_{{\cal D}_{\kappa}}$, where ${\cal M}^{\prime}_{{\cal Y}_{2}}$ denotes the ordered $\mathbb{Z}$-basis of $\gamma_{2}(L({\cal Y}_{2}))$ consisting of the basic Lie commutators in the elements of the standard free generating set ${\cal Y}^{(1)}_{2}$ of $\gamma_{2}(L({\cal Y}_{2})) = L({\cal Y}^{(1)}_{2})$. We give the set ${\cal M}_{{\cal Y}_{\kappa},I}$ a total ordering such that $u_{2} < u_{3} < \cdots < u_{\kappa}$ for all $u_{2} \in {\cal M}^{\prime}_{{\cal Y}_{2}}$ and $u_{j} \in {\cal M}_{{\cal D}_{j}}$ ($j \in [\kappa] \setminus \{1, 2\}$). The set ${\cal M}_{{\cal Y}_{\kappa},I}$ is a totally ordered $\mathbb{Z}$-basis of $I_{{\cal Y}_{\kappa}}$. By $(3.1)$ (for $i = \kappa$), $ L({\cal Y}_{\kappa + 1}) = L({\cal Y}_{\kappa}) \oplus L(\{y_{\kappa + 1}\} \wr {\cal Y}_{\kappa})$. For each $j \in [\kappa] \setminus \{1, 2\}$, let ${\cal M}_{{\cal B}_{j}}$ be the ordered $\mathbb{Z}$-basis of $L({\cal B}_{j})$ consisting of the basic Lie commutators which are formed by the elements of ${\cal B}_{j}$. Write $ {\cal M}_{{\cal Y}_{\kappa}} = {\cal Y}_{\kappa} \cup {\cal M}_{{\cal B}_{3}} \cup \cdots \cup {\cal M}_{{\cal B}_{\kappa}} \cup {\cal M}_{{\cal Y}_{\kappa},I}$. We give the set ${\cal M}_{{\cal Y}_{\kappa}}$ a total ordering such that $w_{0} < w_{3} < \cdots < w_{\kappa} < w_{I}$ for all $w_{0} \in {\cal Y}_{\kappa}$, $w_{j} \in {\cal M}_{{\cal B}_{j}}$ $(j \in [\kappa] \setminus \{1, 2\})$ and $w_{I} \in {\cal M}_{{\cal Y}_{\kappa},I}$. By $(3.5)$ and $(3.6)$, the set ${\cal M}_{{\cal Y}_{\kappa}}$ is an ordered $\mathbb{Z}$-basis of $L({\cal Y}_{\kappa})$. For any positive integer $r$, the set ${\cal M}_{{\cal Y}_{\kappa},r} = {\cal M}_{{\cal Y}_{\kappa}} \cap L^{r}({\cal Y}_{\kappa})$ is a $\mathbb{Z}$-basis of $L^{r}({\cal Y}_{\kappa})$. So, ${\cal M}_{{\cal Y}_{\kappa}} = \cup_{r \geq 1}{\cal M}_{{\cal Y}_{\kappa},r}$. Note that ${\cal M}_{{\cal Y}_{\kappa},1} = {\cal Y}_{\kappa}$. Let ${\cal M}^{<}_{{\cal Y}_{\kappa}}$ be the $\mathbb{Z}$-basis of $T({{\cal Y}_{\kappa}})$ consisting of all elements of the form $u_{1} \cdots u_{\mu}$, where $\mu \geq 0$, $u_{1}, \ldots, u_{\mu} \in {\cal M}_{{\cal Y}_{\kappa}}$ and $u_{1} \leq u_{2} \leq \cdots \leq u_{\mu}$. A typical element of ${\cal M}^{<}_{{\cal Y}_{\kappa}} \setminus \{1\}$ has the form $$ u = y^{\alpha_{1}}_{1} \cdots y^{\alpha_{\kappa}}_{\kappa} v_{1} v_{2} \cdots v_{\nu}, \eqno (3.7) $$ where $\alpha_{1}, \ldots, \alpha_{\kappa} \geq 0$, each $v_{i} \in (\bigcup_{j=3}^{\kappa} {\cal M}_{{\cal B}_{j}}) \cup {\cal M}_{{\cal Y}_{\kappa},I}$ ($i \in [\nu]$) and $v_{1} \leq \cdots \leq v_{\nu}$. The set ${\cal P}_{{\cal Y}_{\kappa}} = \{[y_{\kappa + 1};u]: u \in {\cal M}^{<}_{{\cal Y}_{\kappa}}\}$ is a free generating set of $L(\{y_{\kappa + 1}\} \wr {\cal Y}_{\kappa})$. Thus, $L(\{y_{\kappa + 1}\} \wr {\cal Y}_{\kappa}) = L({\cal P}_{{\cal Y}_{\kappa}})$. For any $\kappa$-tuple of non negative integers $a_{\kappa} = (\alpha_{1}, \ldots, \alpha_{\kappa}) \in {\mathbb{N}}_{0}^{\kappa}$, where ${\mathbb{N}}_{0}$ is the set of non negative integers, and $r \in {\mathbb{N}}_{0}$, we write $$ y(a_{\kappa}; r) = y^{\alpha_{1}}_{1} \cdots y^{\alpha_{\kappa}}_{\kappa} = \underbrace{y_{1} \cdots y_{1}}_{\alpha_{1}}\underbrace{y_{2} \cdots y_{2}}_{\alpha_{2}} \cdots \underbrace{y_{\kappa} \cdots y_{\kappa}}_{\alpha_{\kappa}} $$ with $\alpha_{1} + \cdots + \alpha_{\kappa} = r$. For $r = 0$, we interpret $y(a_{\kappa};0)$ as $1$. Let ${\cal S}_{{\cal Y}_{\kappa},r} = \{y(a_{\kappa}; r): a_{\kappa} \in {\mathbb{N}}_{0}^{\kappa}\}$ with ${\cal S}_{{\cal Y}_{\kappa},0} = \{1\}$. So, $(3.7)$ becomes $$ u = y(a_{\kappa};r) v_{1} v_{2} \cdots v_{\nu}, \eqno (3.8) $$ where $y(a_{\kappa};r) \in {\cal S}_{{\cal Y}_{\kappa},r}$, $\alpha_{1}, \ldots, \alpha_{\kappa} \geq 0$, $\alpha_{1} + \cdots + \alpha_{\kappa} = r \in \mathbb{N}_{0}$, each $v_{i} \in (\bigcup_{j=3}^{\kappa} {\cal M}_{{\cal B}_{j}}) \cup {\cal M}_{{\cal Y}_{\kappa},I}$ ($i \in [\nu]$) (when it occurs in the expression) and $v_{1} \leq \cdots \leq v_{\nu}$. Fix $r \in \mathbb{N}$, with $r \geq 2$. We replace each element $y(a_{\kappa};r)$ of ${\cal S}_{{\cal Y}_{\kappa},r}$ by its re-arrangement denoted by $y(a_{\kappa};r; \pi)$, where $\pi$ is a permutation of $\{1, 2, \ldots, r\}$, as follows: Suppose that the elements $y_{j_{1}}, \ldots, y_{j_{\lambda}}$ of ${\cal Y}_{\kappa}$, with $j_{1} < \cdots < j_{\lambda}$, subject to $(\kappa + 1,j_{a}) \in \theta_{m,\delta}$ for all $a \in [\lambda]$, occur in $y(a_{\kappa};r)$. Then, by a suitable permutation $\pi$ of $\{1, 2, \ldots, r\}$, we rewrite (a re-arrangement) $y(a_{\kappa};r)$ as $$ y(a_{\kappa};r;\pi) = y_{j_1}^{a_{j_1}}\ldots y_{j_{\lambda}}^{a_{j_\lambda}}\cdot y_{j_{\lambda+1}}^{a_{j_{\lambda+1}}}\ldots y_{j_k}^{a_{j_{\kappa}}}=y(a_{\kappa_{1}};r_{1})\cdot y(a_{\kappa - \kappa_{1}};r-r_{1}), \eqno(3.9) $$ where $y(a_{\kappa_{1}};r_{1}) = y_{j_1}^{a_{j_1}}\ldots y_{j_{\lambda}}^{a_{j_\lambda}}$, $y(a_{\kappa - \kappa_{1}};r-r_{1}) = y_{j_{\lambda+1}}^{a_{j_{\lambda+1}}}\ldots y_{j_k}^{a_{j_{\kappa}}}$, $r_1=a_{j_1}+\cdots+a_{j_\lambda}$. Otherwise, we leave $y(a_{\kappa};r)$ unchanged. Hence, any element of ${\cal M}^{<}_{{\cal Y}_{\kappa}} \setminus \{1\}$ of the form $(3.8)$ is replaced, by means of $(3.9)$, by an element of the form $$ u^{\prime} = y(a_{\kappa};r; \pi) v_{1} v_{2} \cdots v_{\nu}, \eqno (3.10) $$ where each $v_{i} \in (\bigcup_{j=3}^{\kappa} {\cal M}_{{\cal B}_{j}}) \cup {\cal M}_{{\cal Y}_{\kappa},I}$ ($i \in [\nu]$), when it occurs in $(3.10)$, and $v_{1} \leq \cdots \leq v_{\nu}$. By Lemma \ref{le3.3}, the set ${\cal M}^{<}_{{\cal Y}_{\kappa}, \theta_{m}} = \{u^{\prime}: u \in {\cal M}^{<}_{{\cal Y}_{\kappa}}\}$ is a $\mathbb{Z}$-basis of $T({\cal Y}_{\kappa})$. Moreover, the set ${\cal P}^{\prime}_{{\cal Y}_{\kappa}} = \{[y_{\kappa + 1};u^{\prime}]: u^{\prime} \in {\cal M}^{<}_{{\cal Y}_{\kappa}, \theta_{m}}\}$ is a free generating set of the free Lie algebra $L(\{y_{\kappa + 1}\} \wr {\cal Y}_{\kappa})$. By Theorem \ref{th1} and by Proposition \ref{pr3.2}, $$ L({\cal Y}_{\kappa + 1}) = L({\cal Y}_{\kappa}) \oplus L({\cal P}^{\prime}_{{\cal Y}_{\kappa}}). \eqno (3.11) $$ By $(3.10)$ (the writing of the elements of ${\cal M}^{<}_{{\cal Y}_{\kappa}, \theta_{m}}$), a typical element of ${\cal P}^{\prime}_{{\cal Y}_{\kappa}} \setminus \{y_{\kappa + 1}\}$ has the form $$ [y_{\kappa + 1};u^{\prime}] = [y_{\kappa + 1}; y(a_{\kappa};r; \pi) v_{1} v_{2} \cdots v_{\nu}], $$ where each $v_{i} \in (\bigcup_{j=3}^{\kappa} {\cal M}_{{\cal B}_{j}}) \cup {\cal M}_{{\cal Y}_{\kappa},I}$ ($i \in [\nu]$), when it occurs in $(3.10)$, and $v_{1} \leq \cdots \leq v_{\nu}$. We decompose the set ${\cal P}'_{{\cal Y}_{\kappa}}$ into its subsets, $ {\cal P}'_{{\cal Y}_{\kappa}} = {\cal P}^{\prime}_{{\cal Y}_{\kappa},1,2} \cup {\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}}$, as follows. Let ${\cal P}^{\prime}_{{\cal Y}_{\kappa},1}$ be the subset of ${\cal P}^{\prime}_{{\cal Y}_{\kappa}}$ consisting of all elements of the form $[y_{\kappa + 1};u^{\prime}]$, with $u^{\prime}$ is element of the form $(3.10)$ and $y(a_{\kappa_{1}};r_1) \neq 1$, and ${\cal P}^{\prime}_{{\cal Y}_{\kappa},2}$ is the subset of ${\cal P}^{\prime}_{{\cal Y}_{\kappa}}$ consisting of all elements of the form $[y_{\kappa + 1};u^{\prime}]$, with $u^{\prime}$ of the form $(3.10)$, $y(a_{\kappa_{1}};r_1) = 1$ and at least one of $v_{1}, \ldots, v_{\nu}$ belongs to ${\cal M}_{{\cal Y}_{\kappa},I}$. Write ${\cal P}^{\prime}_{{\cal Y}_{\kappa},1,2} = {\cal P}^{\prime}_{{\cal Y}_{\kappa},1} \cup {\cal P}^{\prime}_{{\cal Y}_{\kappa},2}$ and let ${\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}} = {\cal P}^{\prime}_{{\cal Y}_{\kappa}} \setminus {\cal P}^{\prime}_{{\cal Y}_{\kappa},1,2}$. That is, ${\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}}$ is the union of $\{y_{\kappa + 1}\}$ and the set ${\cal P}^{\prime \prime}_{{\cal Y}_{\kappa},y_{\kappa + 1}}$ of all elements of the form $[y_{\kappa + 1};u^{\prime}]$, where $u^{\prime}$ is the form $(3.10)$ with $y(a_{\kappa_{1}};r_{1}) = 1$ and each $v_{i} \in \bigcup_{j=3}^{\kappa}{\cal M}_{{\cal B}_{j}}$ $(i \in [\nu]$) (if they occur in $(3.10)$) and $v_{1} \leq \ldots \leq v_{\nu}$. Thus, ${\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}} = \{y_{\kappa + 1}\} \cup {\cal P}^{\prime \prime}_{{\cal Y}_{\kappa},y_{\kappa + 1}}$. By Theorem \ref{th1}, $$ L({\cal P}^{\prime}_{{\cal Y}_{\kappa}}) = L({\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}}) \oplus L({\cal P}^{\prime}_{{\cal Y}_{\kappa},1,2} \wr {\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}}) \eqno(3.12) $$ and $L({\cal P}^{\prime}_{{\cal Y}_{\kappa},1,2} \wr {\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}})$ is the ideal of $L({\cal P}^{\prime}_{{\cal Y}_{\kappa}})$ generated by the set ${\cal P}^{\prime}_{{\cal Y}_{\kappa},1,2}$. By $(3.4)$ (for $i = \kappa$), $$ I_{{\cal Y}_{\kappa + 1}} = I_{{\cal Y}_{\kappa}} \oplus (I_{{\cal Y}_{\kappa + 1}} \cap L(\{y_{\kappa + 1}\} \wr {\cal Y}_{\kappa})). \eqno(3.13) $$ \bigskip {\bf Claim.} We claim that $I_{{\cal Y}_{\kappa + 1}} \cap L(\{y_{\kappa + 1}\} \wr {\cal Y}_{\kappa}) = L({\cal P}^{\prime}_{{\cal Y}_{\kappa},1,2} \wr {\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}})$. It is clear enough that ${\cal P}^{\prime}_{{\cal Y}_{\kappa},1}$ and ${\cal P}^{\prime}_{{\cal Y}_{\kappa},2}$ are contained in $I_{{\cal Y}_{\kappa + 1}} \cap L(\{y_{\kappa + 1}\} \wr {\cal Y}_{\kappa})$ and since $I_{{\cal Y}_{\kappa + 1}} \cap L(\{y_{\kappa + 1}\} \wr {\cal Y}_{\kappa})$ is an ideal in $L({\cal Y}_{\kappa + 1})$, we have $$ L({\cal P}^{\prime}_{{\cal Y}_{\kappa},1,2} \wr {\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}}) \subseteq I_{{\cal Y}_{\kappa + 1}} \cap L(\{y_{\kappa + 1}\} \wr {\cal Y}_{\kappa}). \eqno(3.14) $$ Define $$ {\cal T}_{{\cal Y}_{\kappa},1} = \{[y_{\kappa + 1}; zy_{p_{1}} \cdots y_{p_{s}}]: z = y_{\nu} \in {\cal Y}_{\kappa}; y_{p_{1}} \cdots y_{p_{s}} \in {\cal Y}^{*}_{\kappa}; (\kappa + 1,\nu) \in \theta_{{m},\delta}\} $$ and $$ {\cal T}_{{\cal Y}_{\kappa},2} = \{[y_{\kappa + 1}; z_{1} \cdots z_{\mu}[y_{a}, y_{b}] z^{\prime}_{1} \cdots z^{\prime}_{\nu}]: z_{1} \cdots z_{\mu}, z^{\prime}_{1} \cdots z^{\prime}_{\nu} \in {\cal Y}^{*}_{\kappa}; y_{a}, y_{b} \in {\cal Y}_{\kappa}; (a,b) \in \theta_{{m}} \}, $$ where ${\cal Y}^{*}_{\kappa}$ is the free monoid on ${\cal Y}_{\kappa}$. By a result of Duchamp and Krob \cite[Theorem II.7]{dk}, $I_{{\cal Y}_{\kappa + 1}} \cap L(\{y_{\kappa + 1}\} \wr {\cal Y}_{\kappa})$ is the ideal of $L(\{y_{\kappa + 1}\} \wr {\cal Y}_{\kappa}) = L({\cal P}^{\prime}_{{\cal Y}_{\kappa}})$ generated by the set ${\cal T}_{{\cal Y}_{\kappa},1} \cup {\cal T}_{{\cal Y}_{\kappa},2}$. A natural $\mathbb{Z}$-basis of $T({\cal Y}_{\kappa})$ is the free monoid ${\cal Y}_{\kappa}^{*}$ of ${\cal Y}_{\kappa}$. We observe that by using the identity $ab = ba + [a,b]$ for all $a, b \in T({\cal Y}_{\kappa})$, the Jacobi identity, as many times as needed and the fact that the set ${\cal M}_{{\cal Y}_{\kappa}}$ is a $\mathbb{Z}$-basis of $L({\cal Y}_{\kappa})$, we have, for any $p_{1}, \ldots, p_{s} \in [\kappa]$, with $s \geq 2$, $$ y_{p_{1}} \cdots y_{p_{r}} = y^{\alpha_{1}}_{1} \cdots y^{\alpha_{\kappa}}_{\kappa} + \sum_{\rm finite}c_{w} w, \eqno(3.15) $$ where $\alpha_{1}, \ldots, \alpha_{\kappa} \geq 0$, $\alpha_{1} + \cdots + \alpha_{\kappa} = r$, $c_{w} \in \mathbb{Z}$ and $w$ is of the form $(3.8)$. In the free Lie algebra $L({\cal Y}_{\kappa + 1})$, by using the Jacobi identity in the form $[x,y,z] = [x,z,y] + [x, [y,z]]$, we have $$ [y_{\kappa + 1}; z y_{p_{1}} \cdots y_{p_{r}}] = [y_{\kappa + 1}; zy^{\alpha_{1}}_{1} \cdots y^{\alpha_{\kappa}}_{\kappa}] + \sum_{\rm finite}c_{w}[y_{\kappa + 1}; zw]. \eqno(3.16) $$ We have the following cases: \begin{enumerate} \item Suppose that, for any $\tau \in [r]$, $(\kappa + 1, p_{\tau}) \notin \theta_{{m},\delta}$. By $(3.16)$, $[y_{\kappa + 1}; z y_{p_{1}} \cdots y_{p_{r}}]$ is a $\mathbb{Z}$-linear combination of elements of ${\cal P}^{\prime}_{{\cal Y}_{\kappa},1}$. \item Suppose that the elements $y_{j_{1}}, \ldots, y_{i_{\lambda}}$ of ${\cal Y}_{\kappa}$, with $j_{1} < \cdots < j_{\lambda}$, subject to $(\kappa + 1,j_{a}) \in \theta_{{m},\delta}$ for all $a \in [\lambda]$, occur in $y_{p_{1}} \cdots y_{p_{r}}$. Then, as before, by using the identity $ab = ba + [a,b]$ for all $a, b \in T({\cal Y}_{\kappa})$ and the Jacobi identity, as many times as needed, and the fact that the set ${\cal M}_{{\cal Y}_{\kappa}}$ is a $\mathbb{Z}$-basis of $L({\cal Y}_{\kappa})$, the element $z y_{p_{1}} \cdots y_{p_{r}}$ is written as a sum of an element of the form $(3.9)$ and $\sum_{\rm finite}a_{w^{\prime}} w^{\prime}$, where $a_{w^{\prime}} \in \mathbb{Z}$ and $w^{\prime}$ has the form $(3.10)$. Hence, by $(3.16)$, $[y_{\kappa + 1}; z y_{p_{1}} \cdots y_{p_{r}}]$ is a $\mathbb{Z}$-linear combination of elements of ${\cal P}^{\prime}_{{\cal Y}_{\kappa},1}$. \end{enumerate} Thus, in any case, any element of ${\cal T}_{{\cal Y}_{\kappa},1}$ belongs to $L({\cal P}^{\prime}_{{\cal Y}_{\kappa},1,2} \wr {\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}})$. Hence, ${\cal T}_{{\cal Y}_{\kappa},1}$ is a subset of $L({\cal P}^{\prime}_{{\cal Y}_{\kappa},1,2} \wr {\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}})$. Next, we need the following identity which is recorded as \cite[(2.7)]{bks2}. If $a, b, c_{1}, \ldots, c_{r}$ are elements of an arbitrary Lie algebra, then $$ [a,b,c_{1}, \ldots, c_{r}] = \sum_{i=0}^{r} \sum_{\sigma \in K_{i}} [[a, c_{\sigma(1)}, \ldots, c_{\sigma(i)}], [b, c_{\sigma(i+1)}, \ldots, c_{\sigma(r)}]], \eqno(3.17) $$ where for $i = 0, 1, \ldots, r$, $K_{i}$ is the set of all permutations of $\{1, \ldots, r\}$ such that $\sigma(1) < \cdots < \sigma(i)$ and $\sigma(i+1) < \cdots < \sigma(r)$. We put $a = [y_{\kappa + 1}, z_{1}, \ldots, z_{\mu}]$ and $b = [y_{a},y_{b}]$. Then, $$ \begin{array}{rll} [y_{\kappa + 1},z_{1}, \ldots, z_{\mu},[y_{a}, y_{b}], z^{\prime}_{1} \ldots, z^{\prime}_{\nu}] & = & [a, b, z^{\prime}_{1} \ldots, z^{\prime}_{\nu}] \\ & & \\ ({\rm by}~(3.17)) & = & \sum_{i=0}^{\nu} \sum_{\sigma \in K_{i}} [[a, z^{\prime}_{\sigma(1)}, \ldots, z^{\prime}_{\sigma(i)}], [b, z^{\prime}_{\sigma(i+1)}, \ldots, z^{\prime}_{\sigma(\nu)}]] \\ & & \\ & = & [a, z^{\prime}_{1}, \ldots, z^{\prime}_{\nu},b] + [a, [b, z^{\prime}_{1}, \ldots, z^{\prime}_{\nu}]] + \\ & & \\ & & \sum_{i=1}^{\nu - 1} \sum_{\sigma \in K_{i}} [[a, z^{\prime}_{\sigma(1)}, \ldots, z^{\prime}_{\sigma(i)}], [b, z^{\prime}_{\sigma(i+1)}, \ldots, z^{\prime}_{\sigma(\nu)}]]. \end{array} $$ Since $I_{{\cal Y}_{\kappa}}$ is the ideal of $L({\cal Y}_{\kappa})$ generated by the set ${\cal I}_{{\cal Y}_{\kappa}} = \{[y_{a},y_{b}]: y_{a}, y_{b} \in {\cal Y}_{\kappa}; (a, b) \in \theta_{m}\}$, we obtain each $[b, z^{\prime}_{\sigma(i+1)}, \ldots, z^{\prime}_{\sigma(\nu)}] \in I_{{\cal Y}_{\kappa}}$. Thus, each $[b, z^{\prime}_{\sigma(i+1)}, \ldots, z^{\prime}_{\sigma(\nu)}]$ is a $\mathbb{Z}$-linear combination of elements of ${\cal M}_{{\cal Y}_{\kappa},I}$. Having in mind $(3.17)$ (and the above discussion), $(3.15)$ and by using the Jacobi identity in the form $[x,y,z] = [x,z,y] + [x, [y,z]]$ as many times as needed, we have each element of ${\cal T}_{{\cal Y}_{\kappa},2}$ as a $\mathbb{Z}$-linear combination of elements of $L({\cal P}^{\prime}_{{\cal Y}_{\kappa},1,2} \wr {\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}})$. Thus, ${\cal T}_{{\cal Y}_{\kappa},2}$ is a subset of $L({\cal P}^{\prime}_{{\cal Y}_{\kappa},1,2} \wr {\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}})$. Since $I_{{\cal Y}_{\kappa + 1}} \cap L(\{y_{\kappa + 1}\} \wr {\cal Y}_{\kappa})$ is the ideal in $L({\cal P}^{\prime}_{{\cal Y}_{\kappa}})$ generated by the set ${\cal T}_{{\cal Y}_{\kappa},1} \cup {\cal T}_{{\cal Y}_{\kappa},2}$ and $L({\cal P}^{\prime}_{{\cal Y}_{\kappa},1,2} \wr {\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}})$ is an ideal of $L({\cal P}^{\prime}_{{\cal Y}_{\kappa}})$, we have $$ I_{{\cal Y}_{\kappa + 1}} \cap L(\{y_{\kappa + 1}\} \wr {\cal Y}_{\kappa}) \subseteq L({\cal P}^{\prime}_{{\cal Y}_{\kappa},1,2} \wr {\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}}). \eqno(3.18) $$ By $(3.14)$ and $(3.18)$, we have $$ I_{{\cal Y}_{\kappa + 1}} \cap L(\{y_{\kappa + 1}\} \wr {\cal Y}_{\kappa}) = L({\cal P}^{\prime}_{{\cal Y}_{\kappa},1,2} \wr {\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}}) \eqno(3.19)$$ and the claim is proved. \bigskip Therefore, by $(3.12)$ and the Claim, $$ L({\cal P}^{\prime}_{{\cal Y}_{\kappa}}) = L({\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}}) \oplus (I_{{\cal Y}_{\kappa + 1}} \cap L(\{y_{\kappa + 1}\} \wr {\cal Y}_{\kappa})). \eqno(3.20) $$ By $(3.11)$, $(3.20)$, $(3.5)$, $(3.4)$ (for $i = \kappa$) and $(3.19)$, we have $$ L({\cal Y}_{\kappa + 1}) = \langle {\cal Y}_{\kappa + 1} \rangle \oplus L({\cal B}_{3}) \oplus \cdots \oplus L({\cal B}_{\kappa}) \oplus L({\cal B}_{\kappa + 1}) \oplus I_{{\cal Y}_{\kappa + 1}}, \eqno(3.21) $$ where $I_{{\cal Y}_{\kappa + 1}} = I_{{\cal Y}_{\kappa}} \oplus L({\cal D}_{\kappa + 1})$, ${\cal B}_{\kappa + 1} = {\cal P}^{\prime \prime}_{{\cal Y}_{\kappa},y_{\kappa + 1}} \wr \{y_{\kappa + 1}\}$ and ${\cal D}_{\kappa + 1} = {\cal P}^{\prime}_{{\cal Y}_{\kappa},1,2} \wr {\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}}$. In particular, for $\kappa = m-1$, by $(3.20)$ and $(3.5)$, we obtain $ L({\cal Y}) = \langle {\cal Y} \rangle \oplus L({\cal B}_{3}) \oplus \cdots \oplus L({\cal B}_{m}) \oplus I$, where $I = \gamma_{2}(L({\cal Y}_{2})) \oplus L({\cal D}_{3}) \oplus \cdots \oplus L({\cal D}_{m})$. \hfill $\Box$ \begin{corollary}\label{co4.1} With the previous notations, $ L({\cal Y}) = \langle y_{1}, y_{2} \rangle \oplus L({\cal P}^{\prime \prime}_{{\cal Y}_{2}}) \oplus \cdots \oplus L({\cal P}^{\prime \prime}_{{\cal Y}_{m-1}}) \oplus I$, where $\langle y_{1}, y_{2} \rangle$ is the free $\mathbb{Z}$-module of rank $2$ and $ I = \gamma_{2}(L({\cal Y}_{2})) \oplus L({\cal P}^{\prime}_{{\cal Y}_{2},1,2} \wr {\cal P}^{\prime \prime}_{{\cal Y}_{2}}) \oplus \cdots \oplus L({\cal P}^{\prime}_{{\cal Y}_{m-1},1,2} \wr {\cal P}^{\prime \prime}_{{\cal Y}_{m-1}})$. \end{corollary} \subsection{The $\mathbb{Z}$-module $I/\gamma_{2}(I)$} In this section, we prove the following essential result. \begin{theorem}\label{th4.4} If $\theta_{m} \neq \emptyset$, then, for all $\kappa \in [m-1]$, the free $\mathbb{Z}$-module $I_{{\cal Y}_{\kappa+1}}/\gamma_{2}(I_{{\cal Y}_{\kappa+1}})$ is a free (right) $U(L({\cal Y}_{\kappa+1})/I_{{\cal Y}_{\kappa+1}})$-module with a free generating set ${\cal I}_{{\cal Y}_{\kappa+1}} + \gamma_{2}(I_{{\cal Y}_{\kappa+1}}) = \{[y_a,y_b] + \gamma_{2}(I_{{\cal Y}_{\kappa+1}}): y_a, y_b \in {\cal Y}_{\kappa+1}; (a,b) \in \theta_{m,\delta}\}$. In particular, for $\kappa = m-1$, the $\mathbb{Z}$-module $I/\gamma_{2}(I)$ is a free (right) $U(L({\cal Y})/I)$-module with a free generating set ${\cal I} + \gamma_{2}(I) = \{[y_a,y_b] + \gamma_{2}(I): y_a, y_b \in {\cal Y}; (a,b) \in \theta_{m,\delta}\}$. \end{theorem} {\em Proof.\ } Let $m = 2$. Since $I_{{\cal Y}_{2}} = \gamma_{2}(L({\cal Y}_{2})) = L({\cal Y}^{(1)}_{2})$, we have $I_{{\cal Y}_{2}}/\gamma_{2}(I_{{\cal Y}_{2}})$ is a free $\mathbb{Z}$-module with a free generating set $\overline{{\cal Y}^{(1)}_{2}} = \{u + \gamma_{2}(I_{{\cal Y}_{2}}): u \in {\cal Y}^{(1)}_{2}\}$. It is well known that $I_{{\cal Y}_{2}}/\gamma_{2}(I_{{\cal Y}_{2}})$ is a free (right) $U(L({\cal Y}_{2})/I_{{\cal Y}_{2}})$-module with a free generating set $\overline{{\cal I}}_{{\cal Y}_{2}} = \{[y_{2},y_{1}] + \gamma_{2}(I_{{\cal Y}_{2}})\}$. Thus, we assume that $m \geq 3$. We induct on $\kappa$. For $\kappa = 1$, the proof is shown above. So, we may assume that our claim is valid for all $\kappa\in [m-1]$. That is, $I_{{\cal Y}_{\kappa}}/\gamma_{2}(I_{{\cal Y}_{\kappa}})$ is a free (right) $U(L({\cal Y}_{\kappa})/I_{{\cal Y}_{\kappa}})$-module with a free generating set ${\cal I}_{{\cal Y}_{\kappa}} + \gamma_{2}(I_{{\cal Y}_{\kappa}}) = \{[y_a,y_b] + \gamma_{2}(I_{{\cal Y}_{\kappa}}): y_a, y_b \in {\cal Y}_{\kappa}; (a,b) \in \theta_{m,\delta}\}$. The set ${\cal M}_{{\cal Y}_{\kappa},I} = {\cal M}^{\prime}_{{\cal Y}_{2}} \cup {\cal M}_{{\cal D}_{3}} \cup \cdots \cup {\cal M}_{{\cal D}_{\kappa}}$ is a totally ordered $\mathbb{Z}$-basis of $I_{{\cal Y}_{\kappa}}$. Furthermore, the set ${\cal M}_{{\cal Y}_{\kappa}} = {\cal Y}_{\kappa} \cup {\cal M}_{{\cal B}_{3}} \cup \cdots \cup {\cal M}_{{\cal B}_{\kappa}} \cup {\cal M}_{{\cal Y}_{\kappa},I}$ is a totally ordered $\mathbb{Z}$-basis of $L({\cal Y}_{\kappa})$. By $(3.1)$ (for $i = \kappa$), $L({\cal Y}_{\kappa + 1}) = L({\cal Y}_{\kappa}) \oplus L(\{y_{\kappa + 1}\} \wr {\cal Y}_{\kappa})$. The set ${\cal M}^{<}_{{\cal Y}_{\kappa},\theta_{m}} = \{u^{\prime}: u \in {\cal M}^{<}_{{\cal Y}_{\kappa}}\}$ is a $\mathbb{Z}$-basis of $T({\cal Y}_{\kappa})$. Moreover, the set ${\cal P}^{\prime}_{{\cal Y}_{\kappa}} = \{[y_{\kappa + 1}; u^{\prime}]: u^{\prime} \in {\cal M}^{<}_{{\cal Y}_{\kappa},\theta_{m}}\}$ is a free generating set of the free Lie algebra $L(\{y_{\kappa + 1}\} \wr {\cal Y}_{\kappa})$. Thus, $L(\{y_{\kappa + 1}\} \wr {\cal Y}_{\kappa}) = L({\cal P}^{\prime}_{{\cal Y}_{\kappa}})$. A typical element of ${\cal P}^{\prime}_{{\cal Y}_{\kappa}} \setminus \{y_{\kappa + 1}\}$ has the form $[y_{\kappa + 1};u^{\prime}] = [y_{\kappa + 1}; y(a_{\kappa};r;\pi)v_{1}v_{2} \cdots v_{\nu}]$, where each $v_{i}\ (\in {\cal M}_{{\cal Y}_{\kappa}}, i \in [\nu])$, in the above expression, is a simple Lie commutator of degree at least $2$ and $v_{1} \leq v_{2} \leq \cdots \leq v_{\nu}$. The set ${\cal P}'_{{\cal Y}_{\kappa}}$ is decomposed into its subsets ${\cal P}^{\prime}_{{\cal Y}_{\kappa},1,2}$ and ${\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}}$ where ${\cal P}^{\prime}_{{\cal Y}_{\kappa},1}$ is the subset of ${\cal P}^{\prime}_{{\cal Y}_{\kappa}}$ consisting of all elements of the form $[y_{\kappa + 1};u^{\prime}]$ with $u^{\prime}$ is element of the form $(3.10)$ with $y(a_{\kappa_{1}};r_1) \neq 1$, and ${\cal P}^{\prime}_{{\cal Y}_{\kappa},2}$ is the subset of ${\cal P}^{\prime}_{{\cal Y}_{\kappa}}$ consisting of all elements of the form $[y_{\kappa + 1};u^{\prime}]$, with $u^{\prime}$ is of the form $(3.10)$, $y(a_{\kappa_{1}};r_1) = 1$ and at least one of $v_{1}, \ldots, v_{\nu}$ belongs to ${\cal M}_{{\cal Y}_{\kappa},I}$. Write ${\cal P}^{\prime}_{{\cal Y}_{\kappa},1,2} = {\cal P}^{\prime}_{{\cal Y}_{\kappa},1} \cup {\cal P}^{\prime}_{{\cal Y}_{\kappa},2}$ and let ${\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}} = {\cal P}^{\prime}_{{\cal Y}_{\kappa}} \setminus {\cal P}^{\prime}_{{\cal Y}_{\kappa},1,2}$. That is, ${\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}}$ is the union of $\{y_{\kappa + 1}\}$ and the set ${\cal P}^{\prime \prime}_{{\cal Y}_{\kappa},y_{\kappa + 1}}$ of all elements of the form $[y_{\kappa + 1};u^{\prime}]$, where $u^{\prime}$ is the form $(3.10)$ with $y(a_{\kappa_{1}};r_{1}) = 1$, $y(a_{\kappa - \kappa_{1}};r-r_{1}) \neq 1$ and each $v_{i}$ $(i \in [\nu]$) (if it occurs in $(3.10)$) belongs to $\bigcup_{j=3}^{\kappa}{\cal M}_{{\cal B}_{j}}$. Thus, ${\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}} = \{y_{\kappa + 1}\} \cup {\cal P}^{\prime \prime}_{{\cal Y}_{\kappa},y_{\kappa + 1}}$. For any non-empty subset $X$ of $L({\cal Y}_{\kappa + 1})$, we write $\widetilde{X} = \frac{X + I_{{\cal Y}_{\kappa + 1}}}{I_{{\cal Y}_{\kappa + 1}}}$. The Lie subalgebra $\widetilde{L({\cal Y}_{\kappa}})$ of $L({\cal Y}_{\kappa + 1})/I_{{\cal Y}_{\kappa + 1}}$ is naturally isomorphic as a Lie algebra to $\frac{L({\cal Y}_{\kappa})}{L({\cal Y}_{\kappa}) \cap I_{{\cal Y}_{\kappa + 1}}}$. Since $I_{{\cal Y}_{\kappa + 1}} = I_{{\cal Y}_{\kappa}} \oplus L({\cal D}_{\kappa + 1})$ and $L({\cal Y}_{\kappa + 1}) = L({\cal Y}_{\kappa}) \oplus L(\{y_{\kappa + 1}\} \wr {\cal Y}_{\kappa})$, we have, by the modular law, $L({\cal Y}_{\kappa}) \cap I_{{\cal Y}_{\kappa + 1}} = I_{{\cal Y}_{\kappa}}$ and so, $\widetilde{L({\cal Y}_{\kappa}}) \cong L({\cal Y}_{\kappa})/I_{{\cal Y}_{\kappa}}$ as Lie algebras in a natural way. Hence, $U(\widetilde{L({\cal Y}_{\kappa}})) \cong U(L({\cal Y}_{\kappa})/I_{{\cal Y}_{\kappa}})$ as $\mathbb{Z}$-algebras in a natural way. Since $L({\cal Y}_{\kappa})$ is a free Lie algebra and $I_{{\cal Y}_{\kappa}}$ is a direct summand of $L({\cal Y}_{\kappa})$, we have both $I_{{\cal Y}_{\kappa}}$ and $L({\cal Y}_{\kappa})/I_{{\cal Y}_{\kappa}}$ are free $\mathbb{Z}$-modules. Thus, $\widetilde{L({\cal Y}_{\kappa}})$ is a free $\mathbb{Z}$-module. The set $\widetilde{{\cal L}}_{{\cal Y}_{\kappa}}$ is a totally ordered $\mathbb{Z}$-basis of $\widetilde{L({\cal Y}_{\kappa}})$, where ${\cal L}_{{\cal Y}_{\kappa}} = {\cal Y}_{\kappa} \cup {\cal M}_{{\cal B}_{3}} \cup \cdots \cup {\cal M}_{{\cal B}_{\kappa}}$ with a total ordering such that $w_{0} < w_{3} < \cdots < w_{\kappa}$ for all $w_{0} \in {\cal Y}_{\kappa}$, $w_{j} \in {\cal M}_{{\cal B}_{j}}$, $j \in [\kappa] \setminus \{1, 2\}$. It is clear enough that $$ \widetilde{L({\cal Y}_{\kappa}}) = \widetilde{\langle {\cal Y}_{\kappa} \rangle} \oplus \widetilde{L({\cal B}_{3})} \oplus \cdots \oplus \widetilde{L({\cal B}_{\kappa})}. \eqno(3.22) $$ Note that $ \frac{L({\cal Y}_{\kappa + 1})/I_{{\cal Y}_{\kappa + 1}}}{\widetilde{L({\cal Y}_{\kappa}})} \cong \frac{L({\cal Y}_{\kappa + 1})}{L({\cal Y}_{\kappa}) + I_{{\cal Y}_{\kappa + 1}}}$ as $\mathbb{Z}$-modules in a natural way. Since $$ L({\cal Y}_{\kappa}) + I_{{\cal Y}_{\kappa + 1}} = \langle {\cal Y}_{\kappa} \rangle \oplus L({\cal B}_{3}) \oplus \cdots \oplus L({\cal B}_{\kappa}) \oplus I_{{\cal Y}_{\kappa + 1}}, $$ we get $ \frac{L({\cal Y}_{\kappa + 1})}{L({\cal Y}_{\kappa}) + I_{{\cal Y}_{\kappa + 1}}} \cong \langle y_{\kappa + 1} \rangle \oplus L({\cal B}_{\kappa + 1})$ as $\mathbb{Z}$-modules in a natural way. Therefore, $\frac{L({\cal Y}_{\kappa + 1})/I_{{\cal Y}_{\kappa + 1}}}{\widetilde{L({\cal Y}_{\kappa}})}$ is a free $\mathbb{Z}$-module. Observe that $$ \widetilde{L({\cal Y}_{\kappa + 1}}) = L({\cal Y}_{\kappa + 1})/I_{{\cal Y}_{\kappa + 1}} = \widetilde{\langle {\cal Y}_{\kappa + 1} \rangle} \oplus \widetilde{L({\cal B}_{3})} \oplus \cdots \oplus \widetilde{L({\cal B}_{\kappa + 1})}, \eqno(3.23) $$ where $\widetilde{\langle {\cal Y}_{\kappa + 1} \rangle} \cong \langle {\cal Y}_{\kappa + 1} \rangle$ as abelian Lie algebras and $\widetilde{L({\cal B}_{j})} \cong L({\cal B}_{j})$ as Lie algebras for any $j \in [\kappa + 1] \setminus \{1,2\}$. Since the above Lie algebras are free $\mathbb{Z}$-modules, we obtain the elements $(y^{\alpha_{1}}_{1} \cdots y^{\alpha_{\kappa + 1}}_{\kappa + 1} u_{1}u_{2} \cdots u_{\mu})+I_{{\cal Y}_{\kappa + 1}}$, where $\alpha_{1}, \ldots, \alpha_{\kappa + 1} \geq 0$, $u_{1}, \ldots, u_{\mu} \in \bigcup_{j=3}^{\kappa + 1}{\cal M}_{{\cal B}_{j}}$ and $u_{1} \leq u_{2} \leq \cdots \leq u_{\mu}$, form a $\mathbb{Z}$-basis for $U(\widetilde{L({\cal Y}_{\kappa + 1}}))$ (see, \cite[Chapter 1, \S 2.7, Corollary 3]{bour}) and so, $U(\widetilde{L({\cal Y}_{\kappa + 1}}))$ is a free $\mathbb{Z}$-module. By $(3.23)$ and $(3.22)$, we have $$ \widetilde{L({\cal Y}_{\kappa + 1}}) = \widetilde{\langle y_{\kappa + 1} \rangle} \oplus \widetilde{L({\cal B}_{\kappa + 1})} \oplus \widetilde{L({\cal Y}_{\kappa}}). \eqno(3.24) $$ The set $\widetilde{{\cal L}_{\kappa + 1}}$ is a totally ordered $\mathbb{Z}$-basis of $\widetilde{\langle y_{\kappa + 1} \rangle} \oplus \widetilde{L({\cal B}_{\kappa + 1})}$, where ${\cal L}_{\kappa + 1} = \{y_{\kappa + 1}\} \cup {\cal M}_{{\cal B}_{\kappa + 1}}$ with $y_{\kappa + 1} < w_{\kappa + 1}$ for all $w_{\kappa + 1} \in {\cal M}_{{\cal B}_{\kappa + 1}}$. We give $\widetilde{{\cal L}_{{\cal Y}_{\kappa}}} \cup \widetilde{{\cal L}_{\kappa + 1}}$ a total ordering such that every element of $\widetilde{{\cal L}_{{\cal Y}_{\kappa}}}$ is less than every element of $\widetilde{{\cal L}_{\kappa + 1}}$. The elements $ \tilde{u}_{1}\tilde{u}_{2} \cdots \tilde{u}_{\lambda}$ with $u_{1}, \ldots, u_{\lambda} \in {\cal L}_{{\cal Y}_{\kappa}}$ and $u_{1} \leq u_{2} \leq \cdots \leq u_{\lambda}$, form a $\mathbb{Z}$-basis of $U(\widetilde{L({\cal Y}_{\kappa}))}$ (see, \cite[Chapter 1, \S 2.7, Corollary 3]{bour}). The elements $ (y^{\alpha_{1}}_{1} \cdots y^{\alpha_{\kappa}}_{\kappa} u_{1} \cdots u_{\mu} y^{\alpha_{\kappa + 1}}_{\kappa + 1} v_{1} \cdots v_{\lambda}) + I_{{\cal Y}_{\kappa + 1}}$, with $\alpha_{1}, \ldots, \alpha_{\kappa + 1} \geq 0$, $u_{1}, \ldots, u_{\mu} \in \bigcup_{j = 3}^{\kappa}{\cal M}_{{\cal B}_{j}}$, $v_{1}, \ldots, v_{\lambda} \in {\cal M}_{{\cal B}_{\kappa + 1}}$ and $u_{1} \leq u_{2} \leq \cdots \leq u_{\mu} < y_{\kappa + 1} < v_{1} \leq \cdots \leq v_{\lambda}$ form a $\mathbb{Z}$-basis of $U(\widetilde{L({\cal Y}_{\kappa + 1}}))$. Hence, the canonical homomorphism of $U(\widetilde{L({\cal Y}_{\kappa})})$ into $U(\widetilde{L({\cal Y}_{\kappa + 1}}))$ maps the elements of a $\mathbb{Z}$-basis of $U(\widetilde{L({\cal Y}_{\kappa}))}$ to $\mathbb{Z}$-linearly independent elements of $U(\widetilde{L({\cal Y}_{\kappa + 1}})$ and so, we may regard $U(\widetilde{L({\cal Y}_{\kappa}))}$ as $\mathbb{Z}$-subalgebra of $U(\widetilde{L({\cal Y}_{\kappa + 1}}))$. For any non-empty subset $Y$ of $L({\cal Y}_{\kappa + 1})$, we write $\overline{Y} = \frac{Y + \gamma_{2}(I_{{\cal Y}_{\kappa + 1}})}{\gamma_{2}(I_{{\cal Y}_{\kappa + 1}})}$. Since $I_{{\cal Y}_{\kappa + 1}}$ is an ideal of $L({\cal Y}_{\kappa + 1})$, we have $I_{{\cal Y}_{\kappa + 1}}/\gamma_{2}(I_{{\cal Y}_{\kappa + 1}}) = \overline{I}_{{\cal Y}_{\kappa + 1}}$. Now, $$ \gamma_{2}(I_{{\cal Y}_{\kappa + 1}}) = \gamma_{2}(I_{{\cal Y}_{\kappa}}) \oplus ([L({\cal D}_{\kappa + 1}), I_{{\cal Y}_{\kappa}}] + \gamma_{2}(L({\cal D}_{\kappa + 1})). \eqno(3.25) $$ We point out that since $I_{{\cal Y}_{\kappa + 1}}$, $L({\cal P}^{\prime}_{{\cal Y}_{\kappa}})$ are ideals in $L({\cal Y}_{\kappa + 1})$, $(3.13)$ and the Claim, we have $[L({\cal D}_{\kappa + 1}), I_{{\cal Y}_{\kappa}}] \subseteq I_{{\cal Y}_{\kappa + 1}} \cap L({\cal P}^{\prime}_{{\cal Y}_{\kappa}}) = L({\cal D}_{\kappa + 1})$. We claim that $\overline{I}_{{\cal Y}_{\kappa + 1}} = \overline{I}_{{\cal Y}_{\kappa}} \oplus \overline{L({\cal D}_{\kappa + 1})}$. Indeed, we point out that $\overline{I}_{{\cal Y}_{\kappa + 1}} = \overline{I}_{{\cal Y}_{\kappa}} + \overline{L({\cal D}_{\kappa + 1})}$. Let $ u + \gamma_{2}(I_{{\cal Y}_{\kappa + 1}}) = v + \gamma_{2}(I_{{\cal Y}_{\kappa + 1}})$ for $u \in I_{{\cal Y}_{\kappa}} \setminus \gamma_{2}(I_{{\cal Y}_{\kappa + 1}})$ and $v \in L({\cal D}_{\kappa + 1}) \setminus \gamma_{2}(I_{{\cal Y}_{\kappa + 1}})$. Let $\varphi$ be the Lie algebra endomorphism of $L({\cal Y}_{\kappa + 1})$ with $\varphi(y_{\kappa + 1}) = 0$ and $\varphi(y_{j}) = y_{j}$ for all $j \in [\kappa]$. By $(3.25)$, we have $u-v = w_{1} + w_{2}$, where $w_{1} \in \gamma_{2}(I_{{\cal Y}_{\kappa}})$ and $w_{2} \in [L({\cal D}_{\kappa + 1}),I_{{\cal Y}_{\kappa}}] + \gamma_{2}(L({\cal D}_{\kappa + 1}))$. By applying $\varphi$ on $u-v = w_{1} + w_{2}$, we get $u=\varphi(u)=\varphi(w_{1})=w_1 \in \gamma_{2}(I_{{\cal Y}_{\kappa}})$ a contradiction. Therefore, $$ \overline{I}_{{\cal Y}_{\kappa + 1}} = \overline{I}_{{\cal Y}_{\kappa}} \oplus \overline{L({\cal D}_{\kappa + 1})}. \eqno(3.26) $$ By $(3.25)$, the modular law and since $I_{{\cal Y}_{\kappa}} \cap L({\cal D}_{\kappa + 1}) = \{0\}$, we have $\overline{I}_{{\cal Y}_{\kappa}} \cong I_{{\cal Y}_{\kappa}}/\gamma_{2}(I_{{\cal Y}_{\kappa}})$ as $\mathbb{Z}$-modules in a natural way. By our hypothesis, $I_{{\cal Y}_{\kappa}}/\gamma_{2}(I_{{\cal Y}_{\kappa}})$ is a free (right) $U(L({\cal Y}_{\kappa})/I_{{\cal Y}_{\kappa}})$-module with a free generating set ${\cal I}_{{\cal Y}_{\kappa}} + \gamma_{2}(I_{{\cal Y}_{\kappa}})$. Since $\overline{I}_{{\cal Y}_{\kappa}} \cong I_{{\cal Y}_{\kappa}}/\gamma_{2}(I_{{\cal Y}_{\kappa}})$ as $\mathbb{Z}$-modules (in a natural way) and by $(3.25)$, we may consider $\overline{I}_{{\cal Y}_{\kappa}}$ as a free (right) $U(\widetilde{L({\cal Y}_{\kappa})})$-module with a free generating set $\overline{{\cal I}}_{{\cal Y}_{\kappa}} = {\cal I}_{{\cal Y}_{\kappa}} + \gamma_{2}(I_{{\cal Y}_{\kappa+1}})$. In other words, $$ \overline{I}_{{\cal Y}_{\kappa}} = \bigoplus_{\stackrel{y_{a}, y_{b} \in {\cal Y}_{\kappa}}{(a,b)\in \theta_{m,\delta}}} \left([y_{a},y_{b}] + \gamma_{2}(I_{{\cal Y}_{\kappa + 1}}))U(\widetilde{L({\cal Y}_{\kappa})}\right). \eqno(3.27) $$ By $(3.25)$ and since $L({\cal D}_{\kappa + 1}) = \langle {\cal D}_{\kappa + 1} \rangle \oplus \gamma_{2}(L({\cal D}_{\kappa + 1}))$, we have $ \overline{L({\cal D}_{\kappa + 1})} = \overline{\langle {\cal D}_{\kappa + 1}\rangle}$ and so, $(3.26)$ is rewritten as $$ \overline{I}_{{\cal Y}_{\kappa + 1}} = \overline{I}_{{\cal Y}_{\kappa}} \oplus \overline{\langle {\cal D}_{\kappa + 1}\rangle}. \eqno(3.28) $$ We separate the following cases: \begin{enumerate} \item For all $j \in [\kappa]$, $(\kappa + 1, j) \notin \theta_{m,\delta}$. Then, ${\cal P}^{\prime}_{{\cal Y}_{\kappa},1} = \emptyset$. The set ${\cal P}^{\prime}_{{\cal Y}_{\kappa},2}$ consists of the elements of the form $[y_{\kappa + 1}; y^{\alpha_{1}}_{1} \cdots y^{\alpha_{\kappa}}_{\kappa}u_{1}u_{2} \cdots u_{\nu }v_{1} \cdots v_{\mu}]$, where $\alpha_{1}, \ldots, \alpha_{\kappa} \geq 0$, $u_{i} \in \bigcup_{j=3}^{\kappa}{\cal M}_{{\cal B}_{j}}$ (if $u_{1}, \ldots, u_{\nu}$ occur in the expression), $ i \in [\nu]$, $v_{j} \in {\cal M}_{{\cal Y}_{\kappa},I}$ (at least one of $v_{j}$ occurs in the above expression), $j \in [\mu]$ and $u_{1} \leq u_{2} \leq \cdots \leq u_{\nu} \leq v_{1} \leq \cdots \leq v_{\mu}$. The set ${\cal M}_{{\cal Y}_{\kappa},I}$ is a $\mathbb{Z}$-basis of $I_{{\cal Y}_{\kappa}}$. The set $[{\cal P}^{\prime}_{{\cal Y}_{\kappa},2} \wr {\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}}, {\cal M}_{{\cal Y}_{\kappa},I}]$ consists of all elements of the form $[u, v_{1}, \ldots, v_{s}, w]$, where $u \in {\cal P}^{\prime}_{{\cal Y}_{\kappa},2}$, $v_{1}, \ldots, v_{s} \in {\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}}, s \geq 0$ and $w \in {\cal M}_{{\cal Y}_{\kappa},I}$. By the definition of ${\cal M}_{{\cal Y}_{\kappa},I}$ and $(3.25)$, we have $$ [{\cal P}^{\prime}_{{\cal Y}_{\kappa},2} \wr {\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}}, {\cal M}_{{\cal Y}_{\kappa},I}]\subset \gamma_{2}(I_{{\cal Y}_{k+1}}). \eqno (3.29) $$ By $(3.29)$, we have $$ [y_{\kappa + 1}; y^{\alpha_{1}}_{1} \cdots y^{\alpha_{\kappa}}_{\kappa}u_{1}u_{2} \cdots u_{\nu }v_{1} \cdots v_{\mu}]+\gamma_2(I_{{\cal Y}_{k+1}}) = [y_{\kappa + 1}; y^{\alpha_{1}}_{1} \cdots y^{\alpha_{\kappa}}_{\kappa}u_{1}u_{2} \cdots u_{\nu }v] +\gamma_2(I_{{\cal Y}_{k+1}})$$ $$ = -[v,[y_{\kappa + 1}; y^{\alpha_{1}}_{1} \cdots y^{\alpha_{\kappa}}_{\kappa}u_{1}u_{2} \cdots u_{\nu}]]+\gamma_2(I_{{\cal Y}_{k+1}}) . $$ In particular, $v \in {\cal Y}^{(1)}_{2} \cup {\cal D}_{3} \cup \cdots \cup {\cal D}_{\kappa}$. The element $f_{1} = [y_{\kappa + 1}; y^{\alpha_{1}}_{1} \cdots y^{\alpha_{\kappa}}_{\kappa}u_{1}u_{2} \cdots u_{\nu}] \in {\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}}$ for all $u_{j} \in \bigcup_{j=3}^{\kappa}{\cal M}_{{\cal B}_{j}}$ and $u_{1} \leq \cdots \leq u_{\nu}$ (if $u_{1}, \ldots, u_{\nu}$ occur in the expression). By $(3.27)$, $v+\gamma_2(I_{{\cal Y}_{k+1}}) $ is uniquely written as a $\mathbb{Z}$-linear combination of elements of the form $([y_a,y_b]){\rm ad}(y^{\alpha_{1}}_{1}) \cdots {\rm ad}(y^{\alpha_{\kappa}}_{\kappa}) {\rm ad}(u_{1}) \cdots {\rm ad}(u_{\nu}) + \gamma_{2}(I_{{\cal Y}_{\kappa + 1}})$, where $y_a,y_b \in {\cal Y}_{\kappa}$, $(a,b) \in \theta_{m,\delta}$, $\alpha_{1}, \ldots, \alpha_{\kappa} \geq 0$, $u_{j} \in \bigcup_{j=3}^{\kappa}{\cal M}_{{\cal B}_{j}}$ and $u_{1} \leq \cdots \leq u_{\nu}$. Let ${\cal P}^{\prime}_{{\cal Y}_{\kappa},2,1}$ be the subset of ${\cal P}^{\prime}_{{\cal Y}_{\kappa},2}$ consisting of all elements of the form $ [y_{\kappa + 1}; y^{\alpha_{1}}_{1} \cdots y^{\alpha_{\kappa}}_{\kappa}u_{1}u_{2} \cdots u_{\nu}v]$, where $\alpha_{1}, \ldots, \alpha_{\kappa} \geq 0$, $u_{i} \in \bigcup_{j=3}^{\kappa}{\cal M}_{{\cal B}_{j}}$, $ i \in \{1, \ldots, \nu\}$ (if $u_{1}, \ldots, u_{\nu}$ occur in the expression) and $v \in {\cal Y}^{(1)}_{2} \cup {\cal D}_{3} \cup \cdots \cup {\cal D}_{\kappa}$. Since $L({\cal D}_{\kappa + 1})$ is a free Lie algebra on ${\cal D}_{\kappa + 1} = {\cal P}^{\prime}_{{\cal Y}_{\kappa},2} \wr {\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}}$, ${\cal M}_{{\cal Y}_{\kappa},I}$ is a $\mathbb{Z}$-basis of $I_{{\cal Y}_{\kappa}}$ and by $(3.29)$, we have the set $\overline{{\cal P}^{\prime}_{{\cal Y}_{\kappa},2}} = \overline{{\cal P}^{\prime}_{{\cal Y}_{\kappa},2,1}}$ is $\mathbb{Z}$-linearly independent. The set ${\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}}$ consists of $y_{\kappa + 1}$ and elements of the form $f_{1}$, where $\alpha_{1}, \ldots, \alpha_{\kappa} \geq 0$, $\alpha_{1} + \cdots + \alpha_{\kappa} \geq 1$, $u_{i} \in \bigcup_{j=3}^{\kappa}{\cal M}_{{\cal B}_{j}}$, $i \in [\mu]$ and $u_{1} \leq u_{2} \leq \cdots \leq u_{\mu}$. Since ${\cal D}_{\kappa + 1} = {\cal P}^{\prime}_{{\cal Y}_{\kappa},2} \wr {\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}}$, we have $\overline{\langle {\cal D}_{\kappa + 1}\rangle} = \overline{\langle {\cal P}^{\prime}_{{\cal Y}_{\kappa},2} \wr {\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}}\rangle} = \langle \overline{{\cal P}^{\prime}_{{\cal Y}_{\kappa},2,1}} \wr \overline{{\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}}} \rangle$. It is clear enough that the set $\overline{{\cal P}^{\prime}_{{\cal Y}_{\kappa},2,1}} \wr \overline{{\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}}}$ is a $\mathbb{Z}$-basis of $\overline{\langle {\cal D}_{\kappa + 1}\rangle}$. By $(3.28)$, we have the disjoint union ${\cal G}_{1} = \overline{\cal I}_{{\cal Y}_{\kappa}} \cup (\overline{{\cal P}^{\prime}_{{\cal Y}_{\kappa},2,1}} \wr \overline{{\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}}})$ is a $\mathbb{Z}$-basis of $\overline{I}_{{\cal Y}_{\kappa + 1}}$. Recall that the free $\mathbb{Z}$-module $\overline{I}_{{\cal Y}_{\kappa + 1}}$ becomes a (right) $U(\widetilde{L({\cal Y}_{\kappa + 1})})$-module by defining $ (u + \gamma_{2}(I_{{\cal Y}_{\kappa + 1}})) \tilde{v}_{1} \cdots \tilde{v}_{r} = u({\rm ad}v_{1}) \cdots ({\rm ad}v_{r}) + \gamma_{2}(I_{{\cal Y}_{\kappa + 1}})$ for all $u \in I_{{\cal Y}_{\kappa + 1}}$ and $v_{1}, \ldots, v_{r} \in L({\cal Y}_{\kappa + 1})$. By $(3.21)$, the multi-linearity of the Lie product and using the Jacobi identity in the form $[x,[y,z]] = [x,y,z] - [x,z,y]$, we may assume that $v_{1}, \ldots, v_{r} \in {\cal Y}_{\kappa + 1} \cup (\bigcup_{j=3}^{\kappa + 1}{\cal M}_{{\cal B}_{j}})$. Let $M_{1}$ be the $U(\widetilde{L({\cal Y}_{\kappa + 1}}))$-submodule of $\overline{I}_{{\cal Y}_{\kappa + 1}}$ generated by the set ${\cal M}_{1} = \{[y_a,y_b] + \gamma_{2}(I_{{\cal Y}_{\kappa + 1}}): y_a, y_b \in {\cal Y}_{\kappa}; (a,b) \in \theta_{m,\delta}\}$. Since $U(\widetilde{L({\cal Y}_{\kappa})})$ is regarded in a canonical way as a $\mathbb{Z}$-subalgebra of $U(\widetilde{L({\cal Y}_{\kappa + 1})})$, we have, by $(3.27)$, $\overline{I}_{{\cal Y}_{\kappa}} \subseteq M_{1}$. By the decomposition of $\overline{{\cal P}^{\prime}_{{\cal Y}_{\kappa},2}} = \overline{{\cal P}^{\prime}_{{\cal Y}_{\kappa},2,1}}$ and the fact that $\overline{{\cal P}^{\prime}_{{\cal Y}_{\kappa},2,1}} \wr \overline{{\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}}}$ is a $\mathbb{Z}$-basis of $\overline{\langle {\cal D}_{\kappa + 1} \rangle}$, we get $\overline{\langle {\cal D}_{\kappa + 1} \rangle}$ is contained in $M_{1}$. By $(3.28)$, we have $M_{1} = \overline{I}_{{\cal Y}_{\kappa + 1}}$. Since ${\cal G}_{1}$ is a $\mathbb{Z}$-basis of $\overline{I}_{{\cal Y}_{\kappa + 1}}$ , we obtain $$ \overline{I}_{{\cal Y}_{\kappa + 1}} = I_{{\cal Y}_{\kappa + 1}}/\gamma_{2}(I_{{\cal Y}_{\kappa + 1}}) = \bigoplus_{y_{a},y_{b} \in {\cal Y}_{\kappa} \atop (a,b) \in \theta_{m,\delta}}\left([x,y] + \gamma_{2}(I_{{\cal Y}_{\kappa + 1}}))U(\widetilde{L({\cal Y}_{\kappa + 1}})\right) $$ and so, $\overline{I}_{{\cal Y}_{\kappa + 1}}$ is a free (right) $U(\widetilde{L({\cal Y}_{\kappa + 1}}))$-module with a free generating set ${\cal M}_{1}$. \item For all $j \in [\kappa]$, $(\kappa + 1, j) \in \theta_{m,\delta}$. The set $\overline{{\cal P}^{\prime}_{{\cal Y}_{\kappa},1}}$ consists of the elements of the form $[y_{\kappa + 1}; y^{\alpha_{1}}_{1} \cdots y^{\alpha_{\kappa}}_{\kappa}u_{1}u_{2} \cdots u_{\nu }]+\gamma_2(I_{{\cal Y}_{k+1}}) $, where $\alpha_{1}, \ldots, \alpha_{\kappa} \geq 0$, $\alpha_{1} + \cdots + \alpha_{\kappa} \geq 1$, $u_{i} \in \bigcup_{j=3}^{\kappa}{\cal M}_{{\cal B}_{j}}$ (if $u_{1}, \ldots, u_{\nu}$ occur), $i \in [\nu]$ and $u_{1} \leq u_{2} \leq \cdots \leq u_{\nu}$. The set ${\cal P}^{\prime}_{{\cal Y}_{\kappa},2}$ consists of the elements of the form $ [y_{\kappa + 1}; u_{1}u_{2} \cdots u_{\nu }v_{1} \cdots v_{\mu}]$, where $u_{i} \in \bigcup_{j=3}^{\kappa}{\cal M}_{{\cal B}_{j}}$ (if $u_{1}, \ldots, u_{\nu}$ occur in the expression), $i \in [\nu]$, $v_{j} \in {\cal M}_{{\cal Y}_{\kappa},I}$ (at least one of $v_{j}$ occurs in the above expression), $j \in [\mu]$ and $u_{1} \leq u_{2} \leq \cdots \leq u_{\nu} \leq v_{1} \leq \cdots \leq v_{\mu}$. The set ${\cal M}_{{\cal Y}_{\kappa},I}$ is a $\mathbb{Z}$-basis of $I_{{\cal Y}_{\kappa}}$. The set $[{\cal P}^{\prime}_{{\cal Y}_{\kappa},1,2} \wr {\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}}, {\cal M}_{{\cal Y}_{\kappa},I}]$ consists of all elements of the form $[u, v_{1}, \ldots, v_{s}, w]$, where $u \in {\cal P}^{\prime}_{{\cal Y}_{\kappa},1,2}$, $v_{1}, \ldots, v_{s} \in {\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}}, s \geq 0$ and $w \in {\cal M}_{{\cal Y}_{\kappa},I}$. By the definition of ${\cal M}_{{\cal Y}_{\kappa},I}$ and $(3.25)$, we have $$ [{\cal P}^{\prime}_{{\cal Y}_{\kappa},1,2} \wr {\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}}, {\cal M}_{{\cal Y}_{\kappa},I}]\subset \gamma_{2}(I_{{\cal Y}_{k+1}}). \eqno (3.30) $$ By $(3.30)$, we get $$ \begin{array}{rll} [y_{\kappa + 1}; u_{1}u_{2} \cdots u_{\nu }v_{1} \cdots v_{\mu}]+\gamma_2(I_{{\cal Y}_{k+1}}) & = & [y_{\kappa + 1}; u_{1}u_{2} \cdots u_{\nu }v]+\gamma_2(I_{{\cal Y}_{k+1}}) \\ & & \\ & = & -[v,[y_{\kappa + 1}; u_{1}u_{2} \cdots u_{\nu}]]+\gamma_2(I_{{\cal Y}_{k+1}}) . \end{array} $$ In particular, $v \in {\cal Y}^{(1)}_{2} \cup {\cal D}_{3} \cup \cdots \cup {\cal D}_{\kappa}$. The element $[y_{\kappa + 1}; u_{1}u_{2} \cdots u_{\nu}] \in {\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}}$ for all $u_{j} \in \bigcup_{j=3}^{\kappa}{\cal M}_{{\cal B}_{j}}$ and $u_{1} \leq \cdots \leq u_{\nu}$ (if $u_{1}, \ldots, u_{\nu}$ occur in the expression). By $(3.27)$, $\overline{v}$ is uniquely written as a $\mathbb{Z}$-linear combination of elements of the form $$([y_a,y_b]){\rm ad}(y^{\alpha_{1}}_{1}) \cdots {\rm ad}(y^{\alpha_{\kappa}}_{\kappa}) {\rm ad}(u_{1}) \cdots {\rm ad}(u_{\nu}) + \gamma_{2}(I_{{\cal Y}_{\kappa + 1}}),$$ where $y_a,y_b \in {\cal Y}_{\kappa}$, $(a,b) \in \theta_{m,\delta}$, $\alpha_{1}, \ldots, \alpha_{\kappa} \geq 0$, $u_{j} \in \bigcup_{j=3}^{\kappa}{\cal M}_{{\cal B}_{j}}$ and $u_{1} \leq \cdots \leq u_{\nu}$. The set ${\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}}$ consists of $y_{\kappa + 1}$ and elements of the form $[y_{\kappa + 1}; u_{1}u_{2} \cdots u_{\nu}]$ with $u_{i} \in \bigcup_{j=3}^{\kappa}{\cal M}_{{\cal B}_{j}}$ (at least one of $u_{1}, \ldots, u_{\nu}$ occurs), $i \in [\nu]$ and $u_{1} \leq \cdots \leq u_{\nu}$. Since ${\cal D}_{\kappa + 1} = ({\cal P}^{\prime}_{{\cal Y}_{\kappa},1} \cup {\cal P}^{\prime}_{{\cal Y}_{\kappa},2}) \wr {\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}}$, we have $ \overline{\langle {\cal D}_{\kappa + 1}\rangle} = \overline{\langle ({\cal P}^{\prime}_{{\cal Y}_{\kappa},1} \cup {\cal P}^{\prime}_{{\cal Y}_{\kappa},2}) \wr {\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}}\rangle} = \langle \overline{({\cal P}^{\prime}_{{\cal Y}_{\kappa},1} \cup {\cal P}^{\prime}_{{\cal Y}_{\kappa},2})} \wr \overline{{\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}}} \rangle$. It is clear enough that the set $\overline{({\cal P}^{\prime}_{{\cal Y}_{\kappa},1} \cup {\cal P}^{\prime}_{{\cal Y}_{\kappa},2})} \wr \overline{{\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}}}$ is a $\mathbb{Z}$-basis of $\overline{\langle {\cal D}_{\kappa + 1}\rangle}$. By $(3.28)$, we have the disjoint union ${\cal G}_{2} = \overline{\cal I}_{{\cal Y}_{\kappa}} \cup (\overline{({\cal P}^{\prime}_{{\cal Y}_{\kappa},1} \cup {\cal P}^{\prime}_{{\cal Y}_{\kappa},2})} \wr \overline{{\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}}})$ is a $\mathbb{Z}$-basis of $\overline{I}_{{\cal Y}_{\kappa + 1}}$. Let $M_{2}$ be the $U(\widetilde{L({\cal Y}_{\kappa + 1}}))$-submodule of $\overline{I}_{{\cal Y}_{\kappa + 1}}$ generated by the set ${\cal M}_{2} = \{[y_a,y_b] + \gamma_{2}(I_{{\cal Y}_{\kappa + 1}}): y_a, y_b \in {\cal Y}_{\kappa + 1}; (a,b) \in \theta_{m,\delta}\}$. Since $U(\widetilde{L({\cal Y}_{\kappa})})$ is regarded in a canonical way as a $\mathbb{Z}$-subalgebra of $U(\widetilde{L({\cal Y}_{\kappa + 1})})$, we have, by $(3.27)$, $\overline{I}_{{\cal Y}_{\kappa}} \subseteq M_{2}$. By the decomposition of $\overline{({\cal P}^{\prime}_{{\cal Y}_{\kappa},1} \cup {\cal P}^{\prime}_{{\cal Y}_{\kappa},2})}$ and the fact that $\overline{({\cal P}^{\prime}_{{\cal Y}_{\kappa},1} \cup {\cal P}^{\prime}_{{\cal Y}_{\kappa},2})} \wr \overline{{\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}}}$ is a $\mathbb{Z}$-basis of $\overline{\langle {\cal D}_{\kappa + 1} \rangle}$, we get $\overline{\langle {\cal D}_{\kappa + 1} \rangle}$ is contained in $M_{2}$. By $(3.28)$, we have $M_{2} = \overline{I}_{{\cal Y}_{\kappa + 1}}$. Since ${\cal G}_{2}$ is a $\mathbb{Z}$-basis of $\overline{I}_{{\cal Y}_{\kappa + 1}}$ , we obtain $$ \overline{I}_{{\cal Y}_{\kappa + 1}} = I_{{\cal Y}_{\kappa + 1}}/\gamma_{2}(I_{{\cal Y}_{\kappa + 1}}) = \bigoplus_{y_{a},y_{b} \in {\cal Y}_{\kappa + 1} \atop (a,b) \in \theta_{m,\delta}}\left([y_{a},y_{b}] + \gamma_{2}(I_{{\cal Y}_{\kappa + 1}}))U(\widetilde{L({\cal Y}_{\kappa + 1}})\right) $$ and so, $\overline{I}_{{\cal Y}_{\kappa + 1}}$ is a free (right) $U(\widetilde{L({\cal Y}_{\kappa + 1}}))$-module with a free generating set ${\cal M}_{2}$. \item There are $j \in [\kappa]$ such that $(\kappa + 1, j) \in \theta_{m,\delta}$. The set $\overline{{\cal P}^{\prime}_{{\cal Y}_{\kappa},1}}$ consists of the elements of the form $$[y_{\kappa + 1}; y(a_{\kappa_{1}};r_{1})y(a_{\kappa - \kappa_{1}};r-r_{1})u_{1}u_{2} \cdots u_{\nu }]+\gamma_2(I_{{\cal Y}_{k+1}}) $$ where $y(a_{\kappa_{1}};r_{1}) \neq 1$, $u_{i} \in \bigcup_{j=3}^{\kappa}{\cal M}_{{\cal B}_{j}}$ (if $u_{1}, \ldots, u_{\nu}$ occur), $i \in [\nu]$ and $u_{1} \leq u_{2} \leq \cdots \leq u_{\nu}$. The set ${\cal P}^{\prime}_{{\cal Y}_{\kappa},2}$ consists of the elements of the form $ [y_{\kappa + 1}; y(a_{\kappa - \kappa_{1}};r-r_{1}) u_{1}u_{2} \cdots u_{\nu }v_{1} \cdots v_{\mu}]$, with $u_{i} \in \bigcup_{j=3}^{\kappa}{\cal M}_{{\cal B}_{j}}$ (if $u_{1}, \ldots, u_{\nu}$ occur), $i \in [\nu]$, $v_{j} \in {\cal M}_{{\cal Y}_{\kappa},I}$ (at least one of $v_{j}$ occurs in the above expression), $j \in [\mu]$ and $u_{1} \leq u_{2} \leq \cdots \leq u_{\nu} \leq v_{1} \leq \cdots \leq v_{\mu}$. The set ${\cal M}_{{\cal Y}_{\kappa},I}$ is a $\mathbb{Z}$-basis of $I_{{\cal Y}_{\kappa}}$. By the definition of ${\cal M}_{{\cal Y}_{\kappa},I}$, $(3.30)$ and $(3.25)$, we have $$\begin{array}{lcl} & & [y_{\kappa + 1}; y(a_{\kappa - \kappa_{1}};r-r_{1})u_{1}u_{2} \cdots u_{\nu }v_{1} \cdots v_{\mu}]+\gamma_2(I_{{\cal Y}_{k+1}}) \\ & = & [y_{\kappa + 1}; y(a_{\kappa - \kappa_{1}};r-r_{1})u_{1}u_{2} \cdots u_{\nu }v]+\gamma_2(I_{{\cal Y}_{k+1}})\\ &= & -[v,[y_{\kappa + 1}; y(a_{\kappa - \kappa_{1}};r-r_{1})u_{1}u_{2} \cdots u_{\nu}]] +\gamma_2(I_{{\cal Y}_{k+1}}). \end{array}$$ In particular, $v \in {\cal Y}^{(1)}_{2} \cup {\cal D}_{3} \cup \cdots \cup {\cal D}_{\kappa}$. Note that the element $$ [y_{\kappa + 1}; y(a_{\kappa - \kappa_{1}};r-r_{1})u_{1}u_{2} \cdots u_{\nu}] \in {\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}} $$ for all $u_{j} \in \bigcup_{j=3}^{\kappa}{\cal M}_{{\cal B}_{j}}$ and $u_{1} \leq \cdots \leq u_{\nu}$ (if $u_{1}, \ldots, u_{\nu}$ occur in the expression). By $(3.27)$, $v+\gamma_2(I_{{\cal Y}_{k+1}})$ is uniquely written as a $\mathbb{Z}$-linear combination of elements of the form $([y_a,y_b]){\rm ad}(y^{\alpha_{1}}_{1}) \cdots {\rm ad}(y^{\alpha_{\kappa}}_{\kappa}) {\rm ad}(u_{1}) \cdots {\rm ad}(u_{\nu}) + \gamma_{2}(I_{{\cal Y}_{\kappa + 1}})$, where $y_a,y_b \in {\cal Y}_{\kappa}$, $(a,b) \in \theta_{m,\delta}$, $\alpha_{1}, \ldots, \alpha_{\kappa} \geq 0$, $u_{j} \in \bigcup_{j=3}^{\kappa}{\cal M}_{{\cal B}_{j}}$ and $u_{1} \leq \cdots \leq u_{\nu}$. The set ${\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}}$ consists of $y_{\kappa + 1}$ and elements of the form $[y_{\kappa + 1}; y(a_{\kappa - \kappa_{1}};r-r_{1})u_{1}u_{2} \cdots u_{\nu}]$ with $y(a_{\kappa - \kappa_{1}};r-r_{1}) \neq 1$, $u_{i} \in \bigcup_{j=3}^{\kappa}{\cal M}_{{\cal B}_{j}}$ (if $u_{1}, \ldots, u_{\nu}$ occur in the expression), $i \in [\nu]$ and $u_{1} \leq \cdots \leq u_{\nu}$. Since ${\cal D}_{\kappa + 1} = ({\cal P}^{\prime}_{{\cal Y}_{\kappa},1} \cup {\cal P}^{\prime}_{{\cal Y}_{\kappa},2}) \wr {\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}}$, we have $$ \overline{\langle {\cal D}_{\kappa + 1}\rangle} = \overline{\langle ({\cal P}^{\prime}_{{\cal Y}_{\kappa},1} \cup {\cal P}^{\prime}_{{\cal Y}_{\kappa},2}) \wr {\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}}\rangle} = \langle \overline{({\cal P}^{\prime}_{{\cal Y}_{\kappa},1} \cup {\cal P}^{\prime}_{{\cal Y}_{\kappa},2})} \wr \overline{{\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}}} \rangle. $$ It is clear enough that the set $\overline{({\cal P}^{\prime}_{{\cal Y}_{\kappa},1} \cup {\cal P}^{\prime}_{{\cal Y}_{\kappa},2})} \wr \overline{{\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}}}$ is a $\mathbb{Z}$-basis of $\overline{\langle {\cal D}_{\kappa + 1}\rangle}$. By $(3.28)$, we have the disjoint union ${\cal G}_{3} = \overline{\cal I}_{{\cal Y}_{\kappa}} \cup (\overline{({\cal P}^{\prime}_{{\cal Y}_{\kappa},1} \cup {\cal P}^{\prime}_{{\cal Y}_{\kappa},2})} \wr \overline{{\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}}})$ is a $\mathbb{Z}$-basis of $\overline{I}_{{\cal Y}_{\kappa + 1}}$. Let $M_{3}$ be the $U(\widetilde{L({\cal Y}_{\kappa + 1}}))$-submodule of $\overline{I}_{{\cal Y}_{\kappa + 1}}$ generated by the set ${\cal M}_{3} = \{[y_a,y_b] + \gamma_{2}(I_{{\cal Y}_{\kappa + 1}}): y_a, y_b \in {\cal Y}_{\kappa + 1}; (a,b) \in \theta_{m,\delta}\}$. Since $U(\widetilde{L({\cal Y}_{\kappa})})$ is regarded in a canonical way as a $\mathbb{Z}$-subalgebra of $U(\widetilde{L({\cal Y}_{\kappa + 1})})$, we have, by $(3.27)$, $\overline{I}_{{\cal Y}_{\kappa}} \subseteq M_{3}$. By the decomposition of $\overline{({\cal P}^{\prime}_{{\cal Y}_{\kappa},1} \cup {\cal P}^{\prime}_{{\cal Y}_{\kappa},2})}$ and the fact that $\overline{({\cal P}^{\prime}_{{\cal Y}_{\kappa},1} \cup {\cal P}^{\prime}_{{\cal Y}_{\kappa},2})} \wr \overline{{\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}}}$ is a $\mathbb{Z}$-basis of $\overline{\langle {\cal D}_{\kappa + 1} \rangle}$, we get $\overline{\langle {\cal D}_{\kappa + 1} \rangle}$ is contained in $M_{3}$. By $(3.28)$, we have $M_{3} = \overline{I}_{{\cal Y}_{\kappa + 1}}$. Since ${\cal G}_{3}$ is a $\mathbb{Z}$-basis of $\overline{I}_{{\cal Y}_{\kappa + 1}}$, we obtain $$ \overline{I}_{{\cal Y}_{\kappa + 1}} = I_{{\cal Y}_{\kappa + 1}}/\gamma_{2}(I_{{\cal Y}_{\kappa + 1}}) = \bigoplus_{x,y \in {\cal Y}_{\kappa + 1} \atop (x,y) \in \theta_{m,\delta}}\left([x,y] + \gamma_{2}(I_{{\cal Y}_{\kappa + 1}}))U(\widetilde{L({\cal Y}_{\kappa + 1}})\right) $$ and so, $\overline{I}_{{\cal Y}_{\kappa + 1}}$ is a free (right) $U(\widetilde{L({\cal Y}_{\kappa + 1}}))$-module with a free generating set ${\cal M}_{3}$. So, in all cases, $\overline{I}_{{\cal Y}_{\kappa + 1}}$ is a free (right) $U(\widetilde{L({\cal Y}_{\kappa + 1}}))$-module with a free generating set $\overline{\cal I}_{{\cal Y}_{\kappa + 1}}$. For $\kappa = m-1$, the free $\mathbb{Z}$-module $I/\gamma_{2}(I)$ is a free (right) $U(L({\cal Y})/I)$-module with a free generating set $\overline{{\cal I}} = \{[y_a,y_b] + \gamma_{2}(I): y_a, y_b \in {\cal Y}; (a,b) \in \theta_{m,\delta}\}$. \hfill $\Box$ \end{enumerate} \section{The Lie Algebra of ${\rm FP}(H)$}\label{sec5} For a positive integer $n$, with $n \geq 2$, let ${\cal A} = \{y_{1}, y_{2}, \ldots, y_{n+1}\}$. Write ${\cal Y} = \{y_{1}, \ldots, y_{n}\}$ and ${\cal C} = \{y_{n+1}\}$. Let $\theta_n$ be a partial commutation relation on $[n]$. As before, without loss of generality, we may order the elements of ${\cal A}$ as $y_1<\ldots< y_{n} < y_{n+1}$ and assume that $(2,1)\in\theta_n$. Define $\theta_{n,\delta}=\{(k,l)\in\theta_n\mid k>l\}$ and so $\theta_{n,\delta}\neq\emptyset$. By Theorem \ref{th1}, we have $ L({\cal A}) = L({\cal Y}) \oplus L({\cal C} \wr {\cal Y})$, where ${\cal C} \wr {\cal Y} = \{[y_{n+1}, b_{1}, \ldots, b_{k}]: b_{1}, \ldots, b_{k} \in {\cal Y}, k \geq 0\}$. Let ${\cal J}$ be the subset of $L({\cal A})$, $$ {\cal J} = \{[y_{n+1}, y_{i}, y_{j}], [y_{a},y_{b}], [[y_{n+1},y_{a}],[y_{n+1},y_{b}]]\mid i, j \in [n], (a,b) \in \theta_{n,\delta}\} $$ and $J$ be the ideal of $L({\cal A})$ generated by the set ${\cal J}$. Our main purpose in this section is \begin{enumerate} \item to show that $J$ is a direct summand of $L({\cal A})$, \item to give a $\mathbb{Z}$-module decomposition of $J$ as a direct sum of explicitly described Lie subalgebras of $L({\cal A})$ by giving their free generating sets and \item to describe the quotient Lie algebra $L({\cal A})/J$. \end{enumerate} The following result is immediate. \begin{lemma}\label{le5.4} The ideal $J_{\cal{Y}} = J \cap L({\cal{Y}})$ of $L({\cal Y})$ is generated by the set $\{[y_{a},y_{b}] \mid (a, b) \in \theta_{n,\delta}\}$. \end{lemma} \begin{comment} {\em Proof.\ } Let $\pi$ be the mapping from $\cal A$ into $L({\cal{Y}})$ defined by $\pi(y_{i}) = y_{i}$, $i = 1, \ldots, n$, and $\pi(y_{n+1}) = 0$. Since $L({\cal{A}})$ is free on $\cal A$, $\pi$ extends uniquely to a Lie algebra homomorphism, say $\pi$ again, from $L({\cal{A}})$ into $L({\cal{Y}})$. Since $L({\cal{Y}})$ is generated by the set ${\cal{Y}} = \{y_{1}, \ldots, y_{n}\}$, we have $\pi$ is onto. Since $\pi$ is onto, we have $\pi(J)$ is an ideal in $L({\cal{Y}})$. Furthermore, since $J$ is generated, as an ideal in $L({\cal A})$, by the set ${\cal{J}}$ and $\pi$ is a Lie algebra epimorphism, we have $\pi(J)$ is generated, as an ideal in $L({\cal Y})$, by the set $\pi({\cal{J}}) = \{[y_{a},y_{b}]: (a,b) \in \theta_{n,\delta}\}$. Hence, $\pi(J) \subseteq J_{\cal{Y}}$. Let $u \in J_{\cal{Y}} = J \cap L({\cal{Y}})$. Thus, $u \in J$ and $u \in L({\cal{Y}})$. By applying $\pi$ on $u$, we have $\pi(u) = u \in \pi(J)$ and so, $J_{\cal{Y}} \subseteq \pi(J)$. Therefore, $\pi(J) = J_{\cal{Y}}$. \hfill $\Box$ \end{comment} \vskip .120 in By Corollary \ref{co4.1} (see, also, proof of Theorem \ref{th4.3}), $$ L({\cal Y}) = \langle y_{1}, y_{2} \rangle \oplus L({\cal P}^{\prime \prime}_{{\cal Y}_{2}}) \oplus \cdots \oplus L({\cal P}^{\prime \prime}_{{\cal Y}_{n-1}}) \oplus J_{\cal Y}, \eqno(4.1) $$ where $\langle y_{1}, y_{2} \rangle$ is the free $\mathbb{Z}$-module of rank $2$ and $$ J_{\cal Y} = \gamma_{2}(L({\cal Y}_{2})) \oplus L({\cal P}^{\prime}_{{\cal Y}_{2},1,2} \wr {\cal P}^{\prime \prime}_{{\cal Y}_{2}}) \oplus \cdots \oplus L({\cal P}^{\prime}_{{\cal Y}_{n-1},1,2} \wr {\cal P}^{\prime \prime}_{{\cal Y}_{n-1}}). \eqno(4.2) $$ For $i \in [n] \setminus \{1, 2\}$, put $ {\cal D}_{i} = {\cal P}^{\prime}_{{\cal Y}_{i-1},1,2} \wr {\cal P}^{\prime \prime}_{{\cal Y}_{i-1}}$. By $(4.2)$, for each $i \in [n] \setminus \{1, 2\}$, let ${\cal M}_{{\cal D}_{i}}$ be the totally ordered $\mathbb{Z}$-basis of $L({\cal D}_{i})$ consisting of the basic Lie commutators in terms of elements of ${\cal D}_{i}$. Write $ {\cal M}_{J_{\cal Y}} = {\cal M}^{\prime}_{{\cal Y}_{2}} \cup {\cal M}_{{\cal D}_{3}} \cup \cdots \cup {\cal M}_{{\cal D}_{n}}$, where ${\cal M}^{\prime}_{{\cal Y}_{2}}$ denotes the totally ordered $\mathbb{Z}$-basis of $\gamma_{2}(L({\cal Y}_{2}))$ consisting of the basic Lie commutators in the elements of the standard free generating set of $\gamma_{2}(L({\cal Y}_{2}))$. The set ${\cal M}_{J_{\cal Y}}$ is a totally ordered $\mathbb{Z}$-basis of $J_{{\cal Y}}$ subject to $u_{2} < u_{3} < \cdots < u_{n}$ for all $u_{2} \in {\cal M}^{\prime}_{2}$ and $u_{i} \in {\cal M}_{{\cal D}_{i}}$ ($i \in [n] \setminus \{1, 2\}$). By Theorem \ref{th1}, for $i \in [n] \setminus \{1, 2\}$, $ L({\cal P}^{\prime \prime}_{{\cal Y}_{i-1}}) = \langle y_{i} \rangle \oplus L({\cal P}^{\prime \prime}_{{\cal Y}_{i-1},y_{i}} \wr \{y_{i}\}) = \langle y_{i} \rangle \oplus L({\cal B}_{i})$, where ${\cal B}_{i} = {\cal P}^{\prime \prime}_{{\cal Y}_{i-1},y_{i}} \wr \{y_{i}\}$. Hence, $(4.1)$ becomes $$ L({\cal Y}) = \langle {\cal Y} \rangle \oplus L({\cal B}_{3}) \oplus \cdots \oplus L({\cal B}_{n}) \oplus J_{\cal Y}. \eqno(4.3) $$ For each $i \in [n] \setminus \{1, 2\}$, let ${\cal M}_{{\cal B}_{j}}$ be the totally ordered $\mathbb{Z}$-basis of $L({\cal B}_{j})$ consisting of basic Lie commutators in terms of elements of ${\cal B}_{j}$. Write $ {\cal M}_{{\cal Y}} = {\cal Y} \cup {\cal M}_{{\cal B}_{3}} \cup \cdots \cup {\cal M}_{{\cal B}_{n}} \cup {\cal M}_{J_{\cal Y}}$. By $(4.3)$ and $(4.2)$, the set ${\cal M}_{{\cal Y}}$ is a totally ordered $\mathbb{Z}$-basis of $L({\cal Y})$ subject to $w_{0} < w_{3} < \cdots < w_{n} < w_{J_{\cal Y}}$ for all $w_{0} \in {\cal Y}$, $w_{i} \in {\cal M}_{{\cal B}_{i}}$ $(i \in [n] \setminus \{1, 2\})$ and $w_{J_{\cal Y}} \in {\cal M}_{J_{\cal Y}}$. Let ${\cal M}^{<}_{{\cal Y}}$ be the $\mathbb{Z}$-basis of $T({{\cal Y}})$ consisting of the elements of the form $u_{1} \cdots u_{\mu}$, where $\mu \geq 0$, $u_{1}, \ldots, u_{\mu} \in {\cal M}_{{\cal Y}}$ and $u_{1} \leq u_{2} \leq \cdots \leq u_{\mu}$. The set ${\cal P}_{{\cal Y}} = \{[y_{n + 1};u]: u \in {\cal M}^{<}_{{\cal Y}}\}$ is a free generating set for $L({\cal C} \wr {\cal Y})$. Define $J_{{\cal P}_{\cal{Y}}} = J \cap L({\cal P}_{\cal{Y}})$ and note that $J_{{\cal P}_{\cal{Y}}}$ is ideal in $L({\cal{A}})$. By Lemma \ref{le1} and Lemma \ref{le5.4}, we have $ J = J_{\cal{Y}} \oplus J_{{\cal P}_{\cal{Y}}}$. Write $\Omega = \{y_{n+1}, [y_{n+1}, y_{i}]: i \in [n]\}$ and ${\cal E} = ({\cal C} \wr {\cal Y}) \setminus \Omega$. Thus, $ {\cal E} = \{[y_{n+1}, y_{i_{1}}, \ldots, y_{i{\kappa}}]: \kappa \geq 2; i_{1}, \ldots, i_{\kappa} \in [n]\}$. By Theorem \ref{th1}, we have $$ L({\cal C} \wr {\cal Y}) =L({\cal P}_{{\cal Y}}) = L(\Omega) \oplus L({\cal E} \wr \Omega). \eqno(4.4) $$ Note that $L({\cal E} \wr \Omega)$ is the ideal in $L({\cal P}_{{\cal Y}})$ generated by the set $\cal E$. Since ${\cal{E}} \subseteq J$ and $J$ is an ideal in $L({\cal{A}})$, we have $L({\cal E} \wr \Omega) \subseteq J$. By $(4.4)$ and the modular law, we get $$ J_{{\cal P}_{\cal{Y}}} = (J \cap L(\Omega)) \oplus L({\cal E} \wr \Omega). \eqno(4.5) $$ Moreover, by $(4.5)$, $J \cap L(\Omega) \subseteq L(\Omega)$ and the modular law, we have $$ \begin{array}{rll} J_{{\cal P}_{\cal{Y}}} \cap L(\Omega) & = & (J \cap L(\Omega)) \oplus (L({\cal E} \wr \Omega) \cap L(\Omega)) \\ ({\rm by}~(4.4)) & = & J \cap L(\Omega). \end{array} $$ So, we obtain the following decomposition of $J$, $$ J = J_{\cal Y} \oplus J_{{\cal P}_{\cal Y}}= J_{\cal Y} \oplus (J \cap L(\Omega)) \oplus L({\cal E} \wr \Omega). \eqno(4.6) $$ \subsection{The decomposition of $J_{{\cal P}_{\cal Y}}$ and $L({\cal E} \wr \Omega)$} Let $J_{1}$ be the ideal of $L({\cal A})$ generated by the set $ {\cal{J}}_{1} = \{[y_{a},y_{b}]: (a,b) \in \theta_{n,\delta}\}$. By Lemma \ref{le1}, we have $$ J_{1} = J_{1,{\cal{Y}}} \oplus J_{1,{\cal P}_{\cal{Y}}}, \eqno(4.7) $$ where $J_{1,{\cal{Y}}} = J_{1} \cap L({\cal{Y}})$ and $J_{1,{\cal P}_{\cal{Y}}} = J_{1} \cap L({\cal P}_{\cal{Y}})$. By a result of Duchamp and Krob \cite[Theorem II.7]{dk}, we have $J_{1,{\cal{Y}}}$ is the ideal of $L({\cal{Y}})$ generated by the set ${\cal{J}}_{1}$. By Lemma \ref{le5.4}, $J_{\cal{Y}} = J_{1,{\cal{Y}}}$. Let ${\cal P}^{\prime}_{\cal Y}$ be the subset of ${\cal P}_{\cal Y}$ consisting of all elements of the form $[y_{n+1};u]$ where $u \in {\cal M}^{<}_{{\cal Y}}$ with at least one of $v_{1}, \ldots, v_{\nu}$ belongs to ${\cal M}_{J_{\cal Y}}$, and ${\cal P}^{\prime \prime}_{\cal Y} = {\cal P}_{\cal Y} \setminus {\cal P}^{\prime}_{\cal Y}$. \begin{proposition}\label{pr5.3} With the previous notations, \begin{enumerate} \item $J_{1,{\cal P}_{\cal{Y}}} = L({\cal P}^{\prime}_{\cal Y} \wr {\cal P}^{\prime \prime}_{\cal Y})$ and $L({\cal P}_{\cal Y}) = L({\cal P}^{\prime \prime}_{\cal Y}) \oplus J_{1,{\cal P}_{\cal{Y}}}$. \item $J_{{\cal P}_{\cal{Y}}}$ is the ideal of $L({\cal A})$ generated by the set $\{[y_{n+1}, y_{i}, y_{j}], [[y_{n+1},y_{a}],[y_{n+1},y_{b}]]: i,j \in [n]; (a,b) \in \theta_{n,\delta}\}$. \item $L({\cal E} \wr \Omega)$ is an ideal in $L({\cal A})$. \item $J \cap L(\Omega)$ is the ideal of $L(\Omega)$ generated by the set $\{[[y_{n+1},y_{a}],[y_{n+1},y_{b}]]: (a,b) \in \theta_{n,\delta}\}$. \end{enumerate} \end{proposition} {\em Proof.\ } \begin{enumerate} \item By Theorem \ref{th1}, $$ L({\cal P}_{\cal Y}) = L({\cal P}^{\prime \prime}_{\cal Y}) \oplus L({\cal P}^{\prime}_{\cal Y} \wr {\cal P}^{\prime \prime}_{\cal Y}). \eqno(4.8) $$ By a result of Duchamp and Krob \cite[Theorem II.7]{dk}, $J_{1,{\cal P}_{\cal{Y}}}$ is the ideal of $L({\cal{C}} \wr {\cal{Y}}) = L({\cal P}_{\cal{Y}})$ generated by the set $$ {\cal{T}} = \{[y_{n+1},z_{1}, \ldots,z_{\mu},[y_{a},y_{b}],z^{\prime}_{1}, \ldots,z^{\prime}_{\nu}]: z_{1} \cdots z_{\mu}, z^{\prime}_{1} \cdots z^{\prime}_{\nu} \in {\cal{Y}}^{*}, (a,b) \in \theta_{n,\delta}\}, $$ where ${\cal{Y}}^{*}$ is the free monoid on $\cal Y$. We point out that in \cite{dk} right-normed Lie commutators are used. We put $a = [y_{n + 1}, z_{1}, \ldots, z_{\mu}]$ and $b = [y_{a},y_{b}]$. Then, $$ [y_{\kappa + 1},z_{1}, \ldots, z_{\mu},[y_{a}, y_{b}], z^{\prime}_{1} \ldots, z^{\prime}_{\nu}] = [a, b, z^{\prime}_{1} \ldots, z^{\prime}_{\nu}] \\ $$ $$ \begin{array}{rl} \stackrel{(3.17)}{=} & \sum_{i=0}^{\nu} \sum_{\sigma \in K_{i}} [[a, z^{\prime}_{\sigma(1)}, \ldots, z^{\prime}_{\sigma(i)}], [b, z^{\prime}_{\sigma(i+1)}, \ldots, z^{\prime}_{\sigma(\nu)}]] \\ & \\ = & [a, z^{\prime}_{1}, \ldots, z^{\prime}_{\nu},b] + [a, [b, z^{\prime}_{1}, \ldots, z^{\prime}_{\nu}]] + \\ & \\ & \sum_{i=1}^{\nu - 1} \sum_{\sigma \in K_{i}} [[a, z^{\prime}_{\sigma(1)}, \ldots, z^{\prime}_{\sigma(i)}], [b, z^{\prime}_{\sigma(i+1)}, \ldots, z^{\prime}_{\sigma(\nu)}]]. \end{array} $$ We proceed as in the proof of Theorem \ref{th4.3}. Since $J_{1,{\cal Y}} = J_{\cal Y}$ is the ideal of $L({\cal Y})$ generated by the set ${\cal J}_{1}$, we obtain each $[b, z^{\prime}_{\sigma(i+1)}, \ldots, z^{\prime}_{\sigma(\nu)}] \in J_{{\cal Y}}$. Thus, each $[b, z^{\prime}_{\sigma(i+1)}, \ldots, z^{\prime}_{\sigma(\nu)}]$ is a $\mathbb{Z}$-linear combination of elements of ${\cal M}_{J_{\cal Y}}$. Having in mind $(3.17)$ (and the above discussion), $(3.15)$ and using the Jacobi identity in the form $[x,y,z] = [x,z,y] + [x, [y,z]]$ as many times as needed, we may write each element of ${\cal T}$ as a $\mathbb{Z}$-linear combination of elements of $L({\cal P}^{\prime}_{\cal Y} \wr {\cal P}^{\prime \prime}_{\cal Y})$. Thus, ${\cal T}$ is a subset of $L({\cal P}^{\prime}_{\cal Y} \wr {\cal P}^{\prime \prime}_{\cal Y})$. Since $J_{1,{\cal P}_{\cal{Y}}}$ is the ideal in $L({\cal P}_{{\cal Y}})$ generated by the set ${\cal T}$ and $L({\cal P}^{\prime}_{\cal Y} \wr {\cal P}^{\prime \prime}_{\cal Y})$ is an ideal of $L({\cal P}_{{\cal Y}})$, we have $$ J_{1,{\cal P}_{\cal{Y}}} \subseteq L({\cal P}^{\prime}_{\cal Y} \wr {\cal P}^{\prime \prime}_{\cal Y}). \eqno(4.9) $$ It is clear enough that ${\cal P}^{\prime}_{\cal Y}$ is contained in $J_{1,{\cal P}_{\cal Y}}$ and since $J_{1,{\cal P}_{\cal Y}}$ is an ideal in $L({\cal A})$, we have $$ L({\cal P}^{\prime}_{\cal Y} \wr {\cal P}^{\prime \prime}_{\cal Y}) \subseteq J_{1,{\cal P}_{\cal{Y}}}. \eqno(4.10) $$ By $(4.9)$ and $(4.10)$, we obtain $J_{1,{\cal P}_{\cal{Y}}} = L({\cal P}^{\prime}_{\cal Y} \wr {\cal P}^{\prime \prime}_{\cal Y})$ and so, by $(4.8)$, we have $L({\cal P}_{\cal Y}) = L({\cal P}^{\prime \prime}_{\cal Y}) \oplus J_{1,{\cal P}_{\cal{Y}}}$. \item Let $J_{1}$ and $J_{2}$ be the ideals of $L({\cal{A}})$ generated by the sets $$ {\cal{J}}_{1} = \{[y_{a},y_{b}]: (a,b) \in \theta_{n,\delta}\} $$ and $$ {\cal{J}}_{2} = \{[y_{n+1}, y_{i}, y_{j}], [[y_{n+1},y_{a}],[y_{n+1},y_{b}]]: i,j \in [n], (a,b) \in \theta_{n,\delta}\}, $$ respectively. Clearly, $J = J_{1} + J_{2}$. Since $L({\cal P}_{\cal{Y}})$ is an ideal in $L({\cal{A}})$ and ${\cal{J}}_{2} \subseteq L({\cal P}_{\cal{Y}})$, we conclude that $J_{2} \subseteq L({\cal P}_{\cal{Y}})$ and so, $J_{2} \subseteq J_{{\cal P}_{\cal{Y}}}$. But $$ \begin{array}{rll} J_{{\cal P}_{\cal{Y}}} & = & J \cap L({\cal P}_{\cal{Y}}) \\ & = & (J_{1} + J_{2}) \cap L({\cal P}_{\cal{Y}}) \\ ({\rm modular~~law})& = & (J_{1} \cap L({\cal P}_{\cal{Y}})) + J_{2} \\ (J_{1,{\cal P}_{\cal Y}} = J_{1} \cap L({\cal P}_{\cal{Y}})) & = & J_{1,{\cal P}_{\cal Y}} + J_{2}. \end{array} $$ In order to show that $J_{{\cal P}_{\cal{Y}}} \subseteq J_{2}$, it is enough to prove that $J_{1,{\cal P}_{\cal Y}} \subseteq J_{2}$. Let ${\cal{Y}}^{*}$ be the free monoid on $\cal Y$. By a result of Duchamp and Krob \cite[Theorem II.7]{dk}, we have $J_{1,{\cal P}_{\cal{Y}}}$ is the ideal of $L({\cal{C}} \wr {\cal{Y}}) = L({\cal P}_{\cal{Y}})$ generated by the set $$ {\cal{T}} = \{[y_{n+1},z_{1}, \ldots,z_{\mu},[y_{a},y_{b}],z^{\prime}_{1}, \ldots,z^{\prime}_{\nu}]: z_{1} \cdots z_{\mu}, z^{\prime}_{1} \cdots z^{\prime}_{\nu} \in {\cal{Y}}^{*}, (a,b) \in \theta_{n,\delta}\}. $$ Since ${\cal{T}} \subseteq J_{2}$ and $J_{2}$ is an ideal in $L({\cal{A}})$, we get $J_{1,{\cal P}_{\cal{Y}}} \subseteq J_{2}$ and so, $J_{{\cal P}_{\cal{Y}}} = J_{2}$. That is, $J_{{\cal P}_{\cal{Y}}}$ is the ideal in $L({\cal{A}})$ generated by the set ${\cal J}_{2}$. \item For the next few lines, we write $S = L({\cal E} \wr \Omega)$. To show that $S$ is an ideal of $L({\cal A})$, it is enough to show that $[u,v] \in S$ for all $u \in S$ and $v \in L({\cal A})$. Since $L({\cal A}) = L({\cal Y}) \oplus L({\cal C} \wr {\cal Y})$ and $S$ is an ideal of $L({\cal C} \wr {\cal Y})$, it is enough to show that $[u,v] \in S$ for all $u \in S$ and $v \in L({\cal Y})$. Since $L({\cal Y})$ is generated by the set $\cal Y$, every element $v$ of $L({\cal Y})$ is a $\mathbb{Z}$-linear combination of Lie commutators of the form $[y_{i_{1}}, \ldots, y_{i_{\kappa}}]$, $\kappa \geq 1$, $y_{i_{1}}, \ldots, y_{i_{\kappa}} \in {\cal Y}$. By using the Jacobi identity in the form $ [x, [y,z]] = [x,y,z] - [x,z,y]$ as many times as needed, it is enough to show that $[u, y_{i_{1}}, \ldots, y_{i_{\kappa}}] \in S$ for all $u \in S$ and $y_{i_{1}}, \ldots, y_{i_{\kappa}} \in {\cal Y}$, $\kappa \geq 1$. Since $$ {\cal E} \wr \Omega = {\cal E} \cup (\bigcup_{\alpha \geq 1}[{\cal E}, \underbrace{\Omega, \ldots, \Omega}_{\alpha}]) $$ and $S$ is a free Lie algebra on ${\cal E} \wr \Omega$, it is enough to show that $[w, y_{i_{1}}, \ldots, y_{i_{\kappa}}] \in S$ for all $w \in {\cal E} \wr \Omega$ and $y_{i_{1}}, \ldots, y_{i_{\kappa}} \in {\cal Y}$, $\kappa \geq 1$. Since ${\cal E} \wr \Omega$ is a free generating set of $S$ and the linearity of Lie commutator, we may assume that $w \in [{\cal E}, \underbrace{\Omega, \ldots, \Omega}_{\alpha \geq 1}] (= [{\cal E},~_{\alpha}\Omega])$ with $\alpha \geq 1$. For $x, y \in L({\cal A})$ and a non-negative integer $m$, we write $[x, ~_{m}y] = [x, y, \ldots, y]$ with $m$ copies of $y$ (this product is interpreted as $x$ if $m=0$). Since $S$ is an ideal of $L({\cal C} \wr {\cal Y})$ and by using the Jacobi identity in the form $$ [x,y,z] = [x,z,y] + [x,[y,z]] \eqno(4.11) $$ as many times as needed, we may take $w$ to have the following form $$ w = [u, ~_{m}y_{n+1}, ~_{\mu_{1}}[y_{n+1},y_{1}], \ldots, ~_{\mu_{n}}[y_{n+1},y_{n}]], $$ where $u \in {\cal E}$, $m, \mu_{1}, \ldots, \mu_{n} \geq 0$ and $m + \mu_{1} + \cdots + \mu_{n} \geq 1$. By using $(4.11)$ as many as it is needed and since $S$ is an ideal of $L({\cal C} \wr {\cal Y})$, we get $$ [w, y_{i_{1}}, \ldots, y_{i_{\kappa}}] = [u, y_{i_{1}}, \ldots, y_{i_{\kappa}}, ~_{m}y_{n+1}, ~_{\mu_{1}}[y_{n+1},y_{1}], \ldots, ~_{\mu_{n}}[y_{n+1},y_{n}]] + v^{\prime}, $$ where $v^{\prime} \in S$. Since $[u, ~_{m}y_{n+1}, ~_{\mu_{1}}[y_{n+1},y_{1}], \ldots, ~_{\mu_{n}}[y_{n+1},y_{n}]] \in S$, we conclude that $[w, y_{i_{1}}, \ldots, y_{i_{\kappa}}] \in S$. Therefore, $L({\cal E} \wr \Omega)$ is an ideal of $L({\cal A})$. \item For non-empty subsets $X, Y$ of $L({\cal A})$ and a non-negative integer $m$, we write $[X, ~_{m}Y] = [X, Y, \ldots, Y]$ with $m$ copies of $Y$ (this product is interpreted as $X$ if $m=0$). Write $V_{1}$ and $V_{2}$ for the $\mathbb{Z}$-modules spanned by the sets $\{[y_{n+1},y_{i},y_{j}]: i, j \in [n]\}$ and $\{[[y_{n+1},y_{a}],[y_{n+1},y_{b}]]: (a,b) \in \theta_{n,\delta}\}$, respectively. By Proposition \ref{pr5.3}~(2), we have $$ J_{{\cal P}_{\cal Y}} = V_{1} \oplus ([V_{1},L^{1}({\cal A})] + V_{2}) \oplus (\bigoplus_{m \geq 2}([V_{1},~_{m}L^{1}\left({\cal A})] + [V_{2}, ~_{(m-1)}L^{1}({\cal A})]\right). \eqno(4.12) $$ So, $J_{{\cal P}_{\cal Y}} \subseteq \bigoplus_{m \geq 3}L^{m}({\cal A})$. Let $\phi$ be the natural mapping from $L({\cal C} \wr {\cal Y})$ onto $L(\Omega)$. Thus, $\phi(y_{n+1}) = y_{n+1}$, $\phi([y_{n+1},y_{i}]) = [y_{n+1},y_{i}]$, $i \in [n]$, and $\phi([y_{n+1},b_{1}, \ldots, b_{k}]) = 0$ for all $b_{1}, \ldots, b_{k} \in {\cal Y}$, with $k \geq 2$. By using the Jacobi identity and since $\phi$ is a Lie algebra epimorphism, we have, by $(4.12)$ and since $L^{1}({\cal A}) = \langle {\cal Y} \rangle \oplus \langle y_{n+1} \rangle$, $\phi(J_{{\cal P}_{\cal Y}})$ is the ideal of $L(\Omega)$ generated by the set $\{[[y_{n+1},y_{a}],[y_{n+1},y_{b}]]: (a,b) \in \theta_{n,\delta}\}$. It is clear enough that $\phi(J_{{\cal P}_{\cal Y}}) \subseteq J_{{\cal P}_{\cal Y}} \cap L(\Omega) = J \cap L(\Omega)$. Let $y \in J_{{\cal P}_{\cal Y}} \cap L(\Omega)$. Then, there exists $x \in L({\cal C} \wr {\cal Y}) = L({\cal P}_{\cal Y})$ such that $\phi(x) = y$. By $(4.4)$, we get $x = u + v$, where $u \in L(\Omega)$ and $v \in L({\cal E} \wr \Omega)$. Since $\phi({\cal E} \wr \Omega) = 0$ and $L({\cal E} \wr \Omega)$ is a free Lie algebra on ${\cal E} \wr \Omega$, we have $\phi(x) = \phi(u) + \phi(v) = u = y$ and so, $u \in J_{{\cal P}_{\cal Y}} \cap L(\Omega) = J \cap L(\Omega)$. By $(4.5)$, we conclude that $x \in J_{{\cal P}_{\cal Y}}$. Hence, $y \in \phi(J_{{\cal P}_{\cal Y}})$ and so, $$ \phi(J_{{\cal P}_{\cal Y}}) = J_{{\cal P}_{\cal Y}} \cap L(\Omega) = J \cap L(\Omega). $$ Therefore, the ideal $J \cap L(\Omega)$ of $L(\Omega)$ is generated by the set $\{[[y_{n+1},y_{a}],[y_{n+1},y_{b}]]: (a,b) \in \theta_{n,\delta}\}$. \hfill $\Box$ \end{enumerate} \subsection{The decomposition of $J \cap L(\Omega)$}\label{subsec5.2} Write $ I_{\Omega} = \phi(J_{{\cal P}_{\cal Y}}) = J \cap L(\Omega)$ and $\Omega_{0} = \{[y_{n+1},y_{i}]: i \in [n]\} \subset L^{2}({\cal A})$ and so, $\Omega = \{y_{n+1}\} \cup \Omega_{0} = {\cal C} \cup \Omega_{0}$ with ${\cal C} = \{y_{n+1}\}$. By Theorem \ref{th1}, $$ L(\Omega) = L(\Omega_{0}) \oplus L({\cal C} \wr \Omega_{0}). \eqno(4.13) $$ By $(4.13)$, Proposition \ref{pr5.3}~(4) and Lemma \ref{le1}, we have $$ I_{\Omega} = \phi(J_{{\cal P}_{\cal Y}}) = J \cap L(\Omega) = I_{\Omega_{0}} \oplus I_{{\cal C} \wr \Omega_{0}}, \eqno(4.14) $$ where $I_{\Omega_{0}} = I_{\Omega} \cap L(\Omega_{0})$ and $I_{{\cal C} \wr \Omega_{0}} = I_{\Omega} \cap L({\cal C} \wr \Omega_{0})$. Let $\psi$ be the (natural) Lie algebra isomorphism from $L({\cal A})$ onto $L(\Omega)$ satisfying the conditions $\psi(y_{n+1}) = y_{n+1}$, $\psi(y_{i}) = [y_{n+1}, y_{i}]$, $i \in [n]$. By $(4.13)$ and since $\psi$ is a Lie algebra isomorphism, we have $$ \psi(L({\cal Y})) = L(\Omega_{0}) ~~{\rm and}~~ \psi(L({\cal C} \wr {\cal Y})) = L({\cal C} \wr \Omega_{0}). \eqno(4.15) $$ Since $\psi$ is a Lie algebra isomorphism and by $(4.7)$, we have $\psi(J_{1}) = I_{\Omega}$. Furthermore, $\psi(J_{1,{\cal Y}}) = \psi(J_{\cal Y}) = I_{\Omega_{0}}$ and $\psi(J_{1,{{\cal P}_{\cal Y}}}) = I_{{\cal C} \wr \Omega_{0}}$. For $i \in [n]\}$, let $\omega_{i} = [y_{n+1},y_{i}]$ and $\Omega_{i} = \{\omega_{1}, \ldots, \omega_{i}\}$. Note that $\Omega_{n} = \Omega_{0}$. By $(4.15)$ and $(4.1)$, and since $\psi$ is a Lie algebra isomorphism, we have $$ L(\Omega_{0}) = \langle \Omega_{0} \rangle \oplus L(\psi({\cal B}_{3})) \oplus \cdots \oplus L(\psi({\cal B}_{n})) \oplus I_{\Omega_{0}}, \eqno (4.16) $$ where, for $\kappa \in [n-1] \setminus \{1\}$, $\psi({\cal B}_{\kappa + 1}) = {\cal P}^{\prime \prime}_{\Omega_{\kappa},\omega_{\kappa + 1}} \wr \{\omega_{\kappa + 1}\}$. By $(4.2)$ and since $\psi$ is a Lie algebra isomorphism, we have $$ I_{\Omega_{0}} = \gamma_{2}(L(\Omega_{2})) \oplus L(\psi({\cal D}_{3})) \oplus \cdots \oplus L(\psi({\cal D}_{n})), \eqno (4.17) $$ where, for $\kappa \in [n-1] \setminus \{1\}$, $\psi({\cal D}_{\kappa + 1}) = {\cal P}^{\prime}_{\Omega_{\kappa},1,2} \wr {\cal P}^{\prime \prime}_{\Omega_{\kappa}}$. We point out that the set $$ {\cal M}_{\Omega_{0}} = {\cal M}_{\psi({\cal Y})} = \Omega_{0} \cup {\cal M}_{\psi({\cal B}_{3})} \cup \cdots \cup {\cal M}_{\psi({\cal B}_{n})} \cup {\cal M}_{I_{\Omega_{0}}}, $$ where ${\cal M}_{I_{\Omega_{0}}} = \psi({\cal M}_{J_{\cal Y}}) = \psi({\cal M}^{\prime}_{{\cal Y}_{2}}) \cup {\cal M}_{\psi({\cal D}_{3})} \cup \cdots \cup {\cal M}_{\psi({\cal D}_{n})}$, is a $\mathbb{Z}$-basis of $L({\Omega_{0}})$. Furthermore, let ${\cal M}^{<}_{\Omega_{0}}$ be the $\mathbb{Z}$-basis of $T({\Omega_{0}})$ consisting of the elements of the form $u_{1} \cdots u_{\mu}$, where $\mu \geq 0$, $u_{1}, \ldots, u_{\mu} \in {\cal M}_{\Omega_{0}}$ and $u_{1} \leq u_{2} \leq \cdots \leq u_{\mu}$. A typical element of ${\cal M}^{<}_{\Omega_{0}} \setminus \{1\}$ has the form $ w = \omega^{\alpha_{1}}_{1} \cdots \omega^{\alpha_{n}}_{n} v_{1} v_{2} \cdots v_{\nu}$, where $\alpha_{1}, \ldots, \alpha_{n} \geq 0$, each $v_{i} \in (\bigcup_{j=3}^{n}{\cal M}_{\psi({\cal B}_{j})}) \cup {\cal M}_{I_{\Omega_{0}}}$ ($i \in [\nu]$) and $v_{1} \leq \cdots \leq v_{\nu}$. The set ${\cal P}_{\Omega_{0}} = \{[y_{n+1};w]: w \in {\cal M}^{<}_{\Omega_{0}}\}$ is a free generating set for $L(\{y_{n+1}\} \wr \Omega_{0})$. Thus, $L(\{y_{n+1}\} \wr \Omega_{0}) = L({\cal P}_{\Omega_{0}})$. Let ${\cal P}^{\prime}_{\Omega_{0}}$ be the subset of ${\cal P}_{\Omega_{0}}$ consisting of all elements of the form $[y_{n+1};w]$ where $w$ as above with at least one of $v_{1}, \ldots, v_{\nu}$ belongs to ${\cal M}_{I_{\Omega_{0}}}$, and ${\cal P}^{\prime \prime}_{\Omega_{0}} = {\cal P}_{{\Omega}_{0}} \setminus {\cal P}^{\prime}_{\Omega_{0}}$. Thus, $$ {\cal P}^{\prime \prime}_{\Omega_{0}}= \{y_{n+1}\} \cup \{[y_{n+1};\omega^{\alpha_{1}}_{1} \cdots \omega^{\alpha_{n}}_{n}v_{1} \cdots v_{\mu}]: \alpha_{1} + \cdots + \alpha_{n} \geq 1; v_{1}, \ldots, v_{n} \in \bigcup_{j=3}^{n} {\cal M}_{\psi({\cal B}_{j})}\}. $$ By $(4.15)$, $L({\cal C} \wr {\cal Y}) = L({\cal P}_{\cal Y})$, $L({\cal C} \wr {\Omega}_{0}) = L({\cal P}_{\Omega_{0}})$, $\psi(J_{1,{\cal P}_{\cal Y}}) = I_{{\cal C} \wr \Omega_{0}}$ and Proposition \ref{pr5.3}~(1), we have $ I_{{\cal C} \wr \Omega_{0}} = L({\cal P}^{\prime}_{\Omega_{0}} \wr P^{\prime \prime}_{\Omega_{0}}) ~~{\rm and}~~L({\cal P}_{\Omega_{0}}) = L({\cal P}^{\prime \prime}_{\Omega_{0}}) \oplus I_{{\cal C} \wr \Omega_{0}}$. Thus, $$ I_{\Omega} = J \cap L(\Omega) = \gamma_{2}(L(\Omega_{2})) \oplus L(\psi({\cal D}_{3})) \oplus \cdots \oplus L(\psi({\cal D}_{n})) \oplus L({\cal P}^{\prime}_{\Omega_{0}} \wr {\cal P}^{\prime \prime}_{\Omega_{0}}). \eqno(4.18) $$ \subsection{A decomposition of $J$} By $(4.6)$ and $(4.14)$, we have $ J = J_{\cal Y} \oplus I_{\Omega_{0}} \oplus I_{{\cal C} \wr \Omega_{0}} \oplus L({\cal E} \wr \Omega)$. By $(4.3)$ and $L({\cal A}) = L({\cal Y}) \oplus L({\cal C} \wr {\cal Y})$, we get $$ L({\cal A}) = \langle {\cal Y} \rangle \oplus L({\cal B}_{3}) \oplus \cdots \oplus L({\cal B}_{n}) \oplus J_{\cal Y} \oplus L({\cal C} \wr {\cal Y}). \eqno(4.19) $$ Since $L({\cal C} \wr {\cal Y}) = L({\cal P}_{\cal Y})$ and by $(4.4)$, $(4.19)$ becomes $$ L({\cal A}) = \langle {\cal Y} \rangle \oplus L({\cal B}_{3}) \oplus \cdots \oplus L({\cal B}_{n}) \oplus J_{\cal Y} \oplus L(\Omega) \oplus L({\cal E} \wr \Omega). $$ or $$ L({\cal A}) = \langle {\cal Y} \rangle \oplus L({\cal B}_{3}) \oplus \cdots \oplus L({\cal B}_{n}) \oplus J_{\cal Y}\oplus L({\cal E}\wr \Omega)\oplus L(\Omega_0) \oplus L({\cal C}\wr\Omega_0)= $$ $$ \langle {\cal Y} \rangle \oplus \left(\bigoplus_{j=3}^n L({\cal B}_{j})\right) \oplus J_{\cal Y} \oplus L({\cal E}\wr \Omega)\oplus \<\Omega_0\>\oplus \left(\bigoplus_{j=3}^n L(\psi({\cal B}_{j}))\right) \oplus I_{\Omega_0} \oplus L({\cal P}^{\prime \prime}_{\Omega_{0}}) \oplus I_{{\cal C} \wr \Omega_{0}}, $$ where $$ J=J_{{\cal Y}}\oplus I_{\Omega_{0}} \oplus I_{{\cal C} \wr \Omega_{0}} \oplus L({\cal E} \wr \Omega) $$ $$ =\gamma_{2}(L({\cal Y}_{2})) \oplus \gamma_{2}(L(\Omega_{2})) \oplus \left(\bigoplus_{j=3}^{n}L({\cal D}_{j})\right) \oplus \left(\bigoplus_{j=3}^{n}L(\psi({\cal D}_{j}))\right) \oplus L({\cal P}^{\prime}_{\Omega_{0}} \wr {\cal P}^{\prime \prime}_{\Omega_{0}}) \oplus L({\cal E} \wr \Omega). $$ Thus, we summarize in the following result. \begin{theorem}\label{th5.4} With the previous notations, $$ L({\cal A}) = \langle {\cal Y} \rangle \oplus \langle \Omega_{0} \rangle \oplus \left(\bigoplus_{j=3}^{n}L({\cal B}_{j})\right) \oplus \left(\bigoplus_{j=3}^{n}L(\psi({\cal B}_{j}))\right) \oplus L({\cal P}^{\prime \prime}_{\Omega_{0}}) \oplus J, $$ where $\langle {\cal Y} \rangle$ and $\langle \Omega_{0} \rangle$ are the free $\mathbb{Z}$-modules on the sets ${\cal Y}$ and $\Omega_{0}$, respectively. Moreover, $$ J = \gamma_{2}(L({\cal Y}_{2})) \oplus \gamma_{2}(L(\Omega_{2})) \oplus \left(\bigoplus_{j=3}^{n}L({\cal D}_{j})\right) \oplus \left(\bigoplus_{j=3}^{n}L(\psi({\cal D}_{j}))\right) \oplus L({\cal P}^{\prime}_{\Omega_{0}} \wr {\cal P}^{\prime \prime}_{\Omega_{0}}) \oplus L({\cal E} \wr \Omega). $$ \end{theorem} \subsection{The case $\theta_{n} = \emptyset$} In this section, we assume that $\theta_{n} = \emptyset$. The ideal $J$ of $L({\cal A})$ is generated by the set $\{[y_{n+1},y_{i},y_{j}]: i, j \in [n]\}$. Since $L({\cal C} \wr {\cal Y}) = L({\cal P}_{\cal Y})$, we have $ L({\cal A}) = L({\cal Y}) \oplus L({\cal P}_{\cal Y})$. By Lemma \ref{le5.4}, $J_{\cal Y} = \{0\}$ and so, $J = J_{{\cal P}_{\cal Y}} \subseteq L({\cal P}_{\cal Y})$. By $(4.6)$, $J = (J \cap L(\Omega)) \oplus L({\cal E} \wr \Omega)$. By Proposition \ref{pr5.3}~(4), $J \cap L(\Omega) = \{0\}$ and so, $J = L({\cal E} \wr \Omega)$ (Alternatively, by Theorem \ref{th5.4}, $J = L({\cal E} \wr \Omega)$). By $(4.4)$, we get $ L({\cal A}) = L({\cal Y}) \oplus L(\Omega) \oplus L({\cal E} \wr \Omega)$ and so, we obtain the following result. \begin{corollary}\label{cor5.1} If $\theta_{n} = \emptyset$, then $L({\cal A}) = L({\cal Y}) \oplus L(\Omega) \oplus J$, where $J = L({\cal E} \wr \Omega)$. \end{corollary} Since $ {\cal E} \wr \Omega = \{[y_{n+1}, y_{i_{1}}, \ldots, y_{i_{\kappa}}, b_{j_{1}}, \ldots, b_{j_{\lambda}}]: \kappa \geq 2; \lambda \geq 0; y_{i_{1}} \cdots y_{i_{\kappa}} \in {\cal Y}^{*}; b_{j_{1}} \cdots b_{j_{\lambda}} \in \Omega^{*}\}$, we have the $\mathbb{Z}$-module $J/\gamma_{2}(J)$ is free on ${\cal E} \wr \Omega$ modulo $\gamma_{2}(J)$. \begin{theorem}\label{th5.6} In case $\theta_{n} = \emptyset$, the $\mathbb{Z}$-module $J/\gamma_{2}(J)$ is a free (right) $U(L({\cal A})/J)$-module with free generating set $\{[y_{n+1}, y_{i}, y_{j}] + \gamma_{2}(J): i, j \in [n]\}$. \end{theorem} {\em Proof.\ } For the next few lines, we write $e_{ij} = [y_{n+1}, y_{i}, y_{j}]$ for all $i, j \in [n]$. We point out that $e_{ij} = [\omega_{i},y_{j}]$ with $\omega_{i} = [y_{n+1},y_{i}]$ for all $i, j \in [n]$. Moreover, we let $$ L_{J}({\cal Y}) = \frac{L({\cal Y}) + J}{J}~~{\rm and}~~L_{J}(\Omega) = \frac{L(\Omega) + J}{J}. $$ By Corollary \ref{cor5.1}, we obtain $ L({\cal A})/J = L_{J}({\cal Y}) \oplus L_{J}(\Omega)$. Thus, the free $\mathbb{Z}$-module $L({\cal A})/J$ is a direct sum, as $\mathbb{Z}$-modules, of its free Lie subalgebras $L_{J}({\cal Y})$ and $L_{J}(\Omega)$. We point out that $L_{J}({\cal Y}) \cong L({\cal Y})$ and $L_{J}(\Omega) \cong L(\Omega)$ as Lie algebras in a natural way. For $\kappa \in [r]$, let $\overline{w}_{\kappa} = w_{\kappa} + J \in U(L({\cal A})/J) \setminus \{0\}$ and $w_{1}, \ldots, w_{r} \in L({\cal A})$. Write each $w_{i} = u_{i} + v_{i} + t_{i}$ with $u_{i} \in L({\cal Y})$, $v_{i} \in L(\Omega)$ and $t_{i} \in J$. Furthermore, we assume that each $u_{i}$, $v_{i}$ is a simple Lie commutator of degree $\geq 1$ in terms of the elements of the sets $\cal Y$ and $\Omega$, respectively. Then, for all $i, j \in [n]$, $$ \begin{array}{rll} (e_{ij} + \gamma_{2}(J)) \overline{w}_{1} \cdots \overline{w}_{r} & = & e_{ij}({\rm ad}w_{1}) \cdots ({\rm ad}w_{r}) + \gamma_{2}(J) \\ & = & [e_{ij}, w_{1}, \ldots, w_{r}] + \gamma_{2}(J) \\ & = & [e_{ij}, u_{1} + v_{1} + t_{1}, \ldots, u_{r} + v_{r} + t_{r}] + \gamma_{2}(J). \end{array} $$ By the multi-linearity of the Lie commutator, $e_{ij}, t_{1}, \ldots, t_{r} \in J$ and by using the Jacobi identity in the form $[a,[b,c]] = [a,b,c] - [a,c,b]$, we can write the element $(e_{ij}+ \gamma_{2}(J)) \bar{w}_{1} \cdots \bar{w}_{r}$ as a $\mathbb{Z}$-linear combination of elements of the form $[e_{ij}, z_{1}, \ldots, z_{\mu}] + \gamma_{2}(J)$, where $z_{1}, \ldots, z_{\mu} \in {\cal Y} \cup \Omega$. For a moment, we consider the product $z_{1} \cdots z_{\mu}$ as a $\mu$-tuple $(z_{1}, \ldots, z_{\mu})$ and assume that, for some $j \in [n]$, $y_{j}$ occurs in the $k$-th position ($k \geq 2$) of $(z_{1}, \ldots, z_{\mu})$. If in the $(k-1)$-th position of $(z_{1}, \ldots, z_{\mu})$ is $\omega_{\tau}$, for some $\tau \in [n]$, then $$ [e_{ij},z_{1}, \ldots, \omega_{\tau},y_{j}, \ldots, z_{\mu}] + \gamma_{2}(J) = [e_{ij},z_{1}, \ldots, y_{j}, \omega_{\tau}, \ldots, z_{\mu}] + \gamma_{2}(J), \eqno(4.20) $$ since both $e_{ij}$ and $[\omega_{\tau},y_{j}] = e_{\tau j} \in J$. If in the $(k-1)$-position of $(z_{1}, \ldots, z_{\mu})$ is $y_{n+1}$, then $$ [e_{ij},z_{1}, \ldots, y_{n+1},y_{j}, \ldots, z_{\mu}] - ([e_{ij},z_{1}, \ldots, y_{j}, y_{n+1}, \ldots, z_{\mu}] + [e_{ij},z_{1}, \ldots, \omega_{j}, \ldots, z_{\mu}]) \in \gamma_{2}(J). \eqno(4.21) $$ Having in mind $(4.20)$ and $(4.21)$, we may write each element $[e_{ij}, z_{1}, \ldots, z_{\mu}] + \gamma_{2}(J)$, where $z_{1}, \ldots, z_{\mu} \in {\cal Y} \cup \Omega$, as a $\mathbb{Z}$-linear combination of elements of the form $$ e_{ij}({\rm ad}y_{i_{1}}) \cdots ({\rm ad}y_{i_{\kappa}})({\rm ad}b_{j_{1}}) \cdots ({\rm ad} b_{j_{\lambda}}) + \gamma_{2}(J) = e_{ij} \bar{y}_{i_{1}} \cdots \bar{y}_{i_{\kappa}} \bar{b}_{j_{1}} \cdots \bar{b}_{j_{\lambda}}, $$ where $y_{i_{1}} \cdots y_{i_{\kappa}} \in {\cal Y}^{*}$ and $ b_{j_{1}} \cdots b_{j_{\lambda}} \in \Omega^{*}$. Hence, since the set ${\cal E} \wr \Omega$ is a free generating set for $J$, we have the required result. \hfill $\Box$ \section{Some group theoretic results}\label{sec6} In this section, we give some auxiliary results that we shall use in the next section. For subgroups $X_{1}, \ldots, X_{m}$ of $G$, with $m \geq 2$, we write $[X_{1}, X_{2}, \ldots, X_{m}] = [[X_{1}, \ldots, X_{m-1}],X_{m}]$ for the subgroup of $G$ generated by all group commutators $[u,x]$ where $u \in [X_{1}, \ldots, X_{m-1}]$ and $x \in X_{m}$. The proof of the following result is elementary and is left to the reader. \begin{lemma}\label{le6.5} \begin{enumerate} \item Let $G$ be a group and $H$ be a subgroup of $G$. Then, for positive integers $m$ and $r$, \begin{enumerate} \item $[G]_{H,m} = [H,\underbrace{G, \ldots, G}_{m}]$ is a normal subgroup of $G$ and it is generated by the group commutators $[h, a_{1}, \ldots, a_{m}]$ for all $h \in H$ and $a_{1}, \ldots, a_{m} \in G$, \item $[H, \gamma_{m}(G)] \leq [G]_{H,m}$ and \item $[\gamma_{r}(G), H, \gamma_{m}(G)] \leq [\gamma_{r}(G), H, \underbrace{G, \ldots, G}_{m}] \leq [G]_{H,m+r}$. \item (Jacobi identity) For any $a \in H$ and $b, c \in G$, $[a,[b,c]] = [a,b,c] [a,c,b]^{-1} v$, where $v \in [G]_{H,3}$. \item For a positive integer $m$, with $m \geq 2$, and $\kappa \in \{0, \ldots, m-1\}$, let $S_{m,\kappa}$ be the the set of all permutations of $\{1, \ldots, m\}$ satisfying the conditions $\sigma(1) > \cdots > \sigma(\kappa) > \sigma(\kappa + 1) < \sigma(\kappa + 2) < \cdots < \sigma(m)$ and $S^{*}_{m} = \bigcup^{m-1}_{\kappa = 0} S_{m,\kappa}$. If $a \in H$, $g_{1}, \ldots, g_{m} \in G$, then $$ [a,[g_{1}, \ldots, g_{m}]]\gamma_{m+2}(G) =\left(\prod_{\kappa = 0}^{m-1}\left(\prod_{\sigma \in S_{m,\kappa}}[a,g_{\sigma(1)}, \ldots, g_{\sigma(m)}]^{(-1)^{\kappa}}\right)\right)\gamma_{m+2}(G). $$ \end{enumerate} \item Let $G$ be a finitely generated group with a generating set ${\cal G}$, $\cal S$ be a non-empty subset of $G \setminus \{1\}$ and $N_{\cal S}$ be the normal closure of $\cal S$ in $G$. If $H$ is the subgroup of $G$ generated by the set $\cal S$, then $N_{\cal S} = H [H,G]$. In particular, $N_{\cal S}$ is the subgroup of $G$ generated by the set $\{[s,z^{\varepsilon_{1}}_{1}, \ldots, z^{\varepsilon_{\kappa}}_{\kappa}]: \kappa \geq 0; s \in {\cal S}; \varepsilon_{j} = \pm 1, j \in [\kappa]; z^{\varepsilon_{1}}_{1}, \ldots, z^{\varepsilon_{\kappa}}_{\kappa} \in {\cal G}\}$. \end{enumerate} \end{lemma} By a graded $\mathbb{Z}$-module, we mean a $\mathbb{Z}$-module $V$ with a distinguished $\mathbb{Z}$-module decomposition $V = V_{1} \oplus V_{2} \oplus \cdots$, where each $V_{m}$ is a free $\mathbb{Z}$-module of finite rank. For each positive integer $d$, let $L^{d}_{\rm grad}(V)$ be the $\mathbb{Z}$-submodule of $L(V)$ spanned by all left-normed Lie commutators $[v_{1}, v_{2}, \ldots, v_{\kappa}]$, with $\kappa \geq 1$, such that, for $i \in [\kappa]$, $v_{i} \in V_{m(i)}$ for some $m(i) \geq 1$ with $m(1) + m(2) + \cdots + m(\kappa) = d$. Then, $L(V)$ is a graded $\mathbb{Z}$-module $$ L(V) = L^{1}_{\rm grad}(V) \oplus L^{2}_{\rm grad}(V) \oplus \cdots . $$ If $V$ is a free $\mathbb{Z}$-module of finite rank, then we may regard $V$ as a graded $\mathbb{Z}$-module: $V = V \oplus 0 \oplus 0 \oplus \cdots$. Then, the $\mathbb{Z}$-module $L^{d}(V)$ is the $d$-th homogeneous component of $L(V)$ as defined in Section 2. For a positive integer $m$, with $m \geq 2$, let $F_{m}$ be the free group on the $m$ letters $y_{1}, \ldots, y_{m}$. The Lie algebra ${\rm gr}(F_{m})$, associated to the lower central series $(\gamma_{c}(F_{m}))_{c \geq 1}$ of $F_{m}$, is a free Lie algebra with a free generating set $\{\zeta_{1} = y_{1}F^{\prime}_{m}, \ldots, \zeta_{m} = y_{m}F^{\prime}_{m}\}$. Write ${\cal Z}_{m} = \{\zeta_{1}, \ldots, \zeta_{m}\}$. Let $T({\cal Z}_{m})$ be the free associative $\mathbb{Z}$-algebra on ${\cal Z}_{m}$. The Lie subalgebra $L({\cal Z}_{m})$ of $T({\cal Z}_{m})$ generated by the set ${\cal Z}_{m}$ is a free Lie algebra on ${\cal Z}_{m}$. Then, $ L({\cal Z}_{m}) = \bigoplus_{s \geq 1}L^{s}({\cal Z}_{m})$. It is clear enough that we may regard $L({\cal Z}_{m}) = {\rm gr}(F_{m})$. Moreover, for all $s \in \mathbb{N}$, $L^{s}({\cal Z}_{m}) = {\rm gr}_{s}(F_{m}) = \gamma_{s}(F_{m})/\gamma_{s+1}(F_{m})$. For a positive integer $e$, with $e \geq 2$, let $r_{1}, \ldots, r_{t} \in \gamma_{e}(F_{m}) \setminus \gamma_{e+1}(F_{m})$ and let $\rho_{1} = r_{1} \gamma_{e+1}(F_{m}), \ldots, \rho_{t} = r_{t} \gamma_{e+1}(F_{m})$. Write ${\cal R} = \{r_{1}, \ldots, r_{t}\}$ and let $N = {\cal R}^{F_{m}}$ be the normal closure of ${\cal R}$ in $F_{m}$. For a positive integer $d$, let $N_{d} = N \cap \gamma_{d}(F_{m})$. Note that $N_{d} = N$ for all $d \in [e]$. Let ${\cal L}(N) = \bigoplus_{d \geq e}I_{d}(N)$, where $I_{d}(N) = N_{d} \gamma_{d+1}(F_{m})/\gamma_{d+1}(F_{m}) \leq {\rm gr}_{d}(F_{m})$. Since $N$ is a normal subgroup of $F_{m}$, the Lie algebra ${\cal L}(N)$ is an ideal of $L({\cal Z}_{m})$. Let $I$ be the ideal of $L({\cal Z}_{m})$ generated by the set ${\cal R}_{L} = \{\rho_{1}, \ldots, \rho_{t}\}$. Since $I$ is a homogeneous ideal, we have $I = \bigoplus_{d \geq e} I^{d}$, where $I^{d} = I \cap {\rm gr}_{d}(F_{m})$. It is clear enough that ${\cal R}_{L} \subseteq I_{e}(N)$. Since ${\cal L}(N)$ is an ideal in $L({\cal Z}_{m})$, we obtain $I \subseteq {\cal L}(N)$. In particular, for any $d \geq e$, $I^{d} \subseteq I_{d}(N) \leq {\rm gr}_{d}(F_{m})$. By using an inductive argument on $d$, we may show the following result. \begin{lemma}[Labute]\label{le6.7} With the previous notations, $I = {\cal L}(N)$ if and only if the induced homomorphism $\xi: I/[I,I] \rightarrow {\cal L}(N)/[{\cal L}(N), {\cal L}(N)]$ is onto. \end{lemma} \begin{comment} {\em Proof.\ } For the non trivial part. We assume that the induced homomorphism $\xi$ is onto. By Lemma \ref{le6.5}~(2), $N = H(H,F_{m})$, where $H$ is the subgroup of $F_{m}$ generated by the set $\cal R$. It is clear enough that $I^{e} = I_{e}(N)$. Suppose that, for an integer $d$, with $d \geq e$, $I^{\mu} = I_{\mu}(N)$ for all $\mu \in \{e, \ldots, d\}$. We claim that $I^{d+1} = I_{d+1}(N)$. It is enough to show that $I_{d+1}(N) \subseteq I^{d+1}$. Let $\overline{u} = u \gamma_{d+2}(F_{m}) \in I_{d+1}(N)$ with $u \in N_{d+1} = N \cap \gamma_{d+1}(F_{m})$. Since $\xi$ is onto, there exists $v \gamma_{d+2}(F_{m}) \in I^{d+1}$ with $v \in \gamma_{d+1}(F_{m})$, such that $$ uv^{-1} \gamma_{d+2}(F_{m}) \in \sum_{e \leq \beta \leq \alpha \atop \alpha + \beta = d+1}[I_{\alpha}(N), I_{\beta}(N)]. $$ By our inductive hypothesis, $I_{\alpha}(N) = I^{\alpha}$ and $I_{\beta}(N) = I^{\beta}$ for $e \leq \alpha, \beta \leq d$ and so, $$ uv^{-1} \gamma_{d+2}(F_{m}) \in \sum_{e \leq \beta \leq \alpha \atop \alpha + \beta = d+1}[I^{\alpha}, I^{\beta}]. $$ Therefore, $\overline{u} = u \gamma_{d+2}(F_{m}) \in I^{d+1}$. Hence, $I^{d} = I_{d}(N)$ for all $d \geq e$ and so, $I = {\cal L}(N)$. \hfill $\Box$ \end{comment} \vskip .120 in Lemma \ref{le6.7} has been observed in \cite[Proof of the Theorem, page 19]{labu1} (see, also, \cite[Proof of Theorem 1, page 53, for a general setting]{labu}). For the rest of this section, we assume that $m \geq 3$. Let ${\cal Z}_{m} = {\cal Z}_{m-1} \cup \{\zeta_{m}\}$, where ${\cal Z}_{m-1} = \{\zeta_{1}, \ldots, \zeta_{m-1}\}$. Let $N=N_{y_m}$ be the normal closure of $\{y_{m}\}$ in $F_{m}$. The Lie subalgebra ${\cal L}(N) = \bigoplus_{d \geq 1}I_{d}(N)$, where $I_{d}(N) = N_{d}\gamma_{d+1}(F_{m})/\gamma_{d+1}(F_{m})$, of ${\rm gr}(F_{m})$ is an ideal of ${\rm gr}(F_{m})$. Let $F_{m-1}$ be the free group on the set $\{y_{1}, \ldots, y_{m-1}\}$ and form the restricted direct sum $ {\cal L}_{1}(F_{m-1}) = \bigoplus_{c \geq 1}{\cal L}_{1,c}(F_{m-1})$ of the abelian groups ${\cal L}_{1,c}(F_{m-1}) = \gamma_{c}(F_{m-1})\gamma_{c+1}(F_{m})/\gamma_{c+1}(F_{m})$. Since $[\gamma_{\mu}(F_{m-1}), \gamma_{\nu}(F_{m-1})] \subseteq \gamma_{\mu + \nu}(F_{m-1})$ for all $\mu, \nu \in \mathbb{N}$, ${\cal L}_{1}(F_{m-1})$ is a Lie subalgebra of ${\rm gr}(F_{m})$. By Theorem \ref{th1}, $ {\rm gr}(F_{m}) = L({\cal Z}_{m-1}) \oplus L(\{\zeta_{m}\} \wr {\cal Z}_{m-1})$. The free Lie algebra $L(\{\zeta_{m}\} \wr {\cal Z}_{m-1})$ is the ideal of ${\rm gr}(F_{m})$ generated by the element $\zeta_{m}$. For positive integer $r$, we write $U_{r}$ for the $\mathbb{Z}$-module spanned by the set ${\cal U}_{r} = \{[\zeta_{m}, z_{1}, \ldots, z_{r-1}]: z_{1}, \ldots, z_{r-1} \in {\cal Z}_{m-1}\}$. We point out that ${\cal U}_{1} = \{\zeta_{m}\}$ and $|{\cal U}_{r}| = |{\cal Z}_{m-1}|^{r-1}$ for all $r \geq 2$. Thus, $\{\zeta_{m}\} \wr {\cal Z}_{m-1} = \bigcup_{r \geq 1}{\cal U}_{r}$ and $L(\{\zeta_{m}\} \wr {\cal Z}_{m-1}) = L(U)$ where $U = \bigoplus_{r \geq 1}U_{r}$. In the following result, we realize both $L({\cal Z}_{m-1})$ and $L(\{\zeta_{m}\} \wr {\cal Z}_{m-1})$ as Lie subalgebras of ${\rm gr}(F_{m})$ by means of certain subgroups of $F_{m}$. Namely, we show that ${\cal L}_{1}(F_{m-1}) = L({\cal Z}_{m-1})$ and ${\cal L}(N) = L(\{\zeta_{m}\} \wr {\cal Z}_{m-1})$. \begin{proposition}\label{pr6.4} With the previous notations, \begin{enumerate} \item The free group $F_{m}$, with $m \geq 3$, is the semidirect product of $N=\{y_m\}^{F_m}$ by $F_{m-1}$. Moreover, $N = X~[X,F_{m}]$, where $X$ is the cyclic subgroup of $F_{m}$ generated by the element $y_{m}$. \item For any positive integer $d \geq 2$, $N_{d} = N \cap \gamma_{d}(F_{m}) = [F_{m}]_{X,d-1}$. For $d \in \mathbb{N}$, $I_{1}(N)$ equals the $\mathbb{Z}$-module $\langle \zeta_{m} \rangle$ spanned by the element $\zeta_{m}$ and, for $d \geq 2$, $I_{d}(N) = L^{d}_{\rm grad}(\{\zeta_{m}\} \wr {\cal Z}_{m-1})$. \item ${\cal L}(N) = L(\{\zeta_{m}\} \wr {\cal Z}_{m-1})$. \item ${\cal L}_{1}(F_{m-1}) = L({\cal Z}_{m-1})$ and ${\rm gr}(F_{m}) = {\cal L}_{1}(F_{m-1}) \oplus {\cal L}(N)$. \end{enumerate} \end{proposition} {\em Proof.\ } \begin{enumerate} \item This is straightforward. \begin{comment} \item Let $wN \in F_{m}/N$, where $w \in F_{m}$. By working modulo $N$ and by using the relation $xy = yx[x,y]$ as many times as it is needed, we have $wN = (y_{i_{1}}N)^{\nu_{1}} \cdots (y_{i_{t}}N)^{\nu_{t}}$, with $i_{1}, \ldots, i_{t} \in [m-1]$ and $\nu_{1}, \ldots, \nu_{t} \in \mathbb{Z} \setminus \{0\}$. That is, the quotient group $F_{m}/N$ is generated by the set ${\cal Q}_{m-1} = \{y_{1}N, \ldots, y_{m-1}N\}$. Let $\psi$ be the mapping from ${\cal Y}_{m-1} = \{y_{1}, \ldots, y_{m-1}\}$ into $F_{m}/N$ satisfying the conditions $\psi(y_{i}) = y_{i}N$ for all $i \in [m-1]$. Since $F_{m-1}$ is free on ${\cal Y}_{m-1}$ and $F_{m}/N$ is generated by the set ${\cal Q}_{m-1}$, $\psi$ extends (uniquely) to an epimorphism $\hat{\psi}$ from $F_{m-1}$ onto $F_{m}/N$. We point out that $\hat{\psi}(w) = wN$ for all $w \in F_{m-1}$. Let $\phi: F_{m} \rightarrow F_{m-1}$ be the natural epimorphism from $F_{m}$ onto $F_{m-1}$ with $\phi(y_{i}) = y_{i}$ for all $i \in [m-1]$ and $\phi(y_{m}) = 1$. By the projectivity property of free groups, $F_{m}$ is the semidirect product of ${\rm Ker}\phi$ with $F_{m-1}$. Let $u \in {\rm Ker}\hat{\psi}$. Then, $uN = N$ and so, $u \in N$. Therefore, $u = (g_{1}y_{m}g^{-1}_{1})^{b_{1}} \cdots (g_{\kappa}y_{m}g^{-1}_{\kappa})^{b_{\kappa}}$, where $g_{1}, \ldots, g_{\kappa} \in F_{m}$ and $b_{1}, \ldots, b_{\kappa} \in \mathbb{Z}$. By applying $\phi$ and since $u \in F_{m-1}$, we get $u = 1$. Hence, $\hat{\psi}$ is an isomorphism. Therefore, $F_{m}$ is the semidirect product of $N$ by $F_{m-1}$. Since $F_{m}/N \cong F_{m}/{\rm Ker}\phi \cong F_{m-1}$ and $N \subseteq {\rm Ker}\phi$, we obtain $N = {\rm Ker}\phi$. By Lemma \ref{le6.5}~(2), we have $N = X~[X,F_{m}]$, where $X$ is the cyclic subgroup of $F_{m}$ generated by the element $y_{m}$. \end{comment} \item We induct on $d$ and let $d = 2$. By Proposition \ref{pr6.4}~(1), $N = X [X,F_{m}]$. Since $[X,F_{m}] \subseteq F^{\prime}_{m}$, we have $I_{1}(N) = \langle \zeta_{m} \rangle$. By the modular law, $N \cap F^{\prime}_{m} = [X,F_{m}](X \cap F^{\prime}_{m})$. Since $X$ is an infinite cyclic group, we get $X \cap F^{\prime}_{m} = \{1\}$ and so, $N_{2} = N \cap F^{\prime}_{m} = [X,F_{m}]$. It is easily verified that $I_{2}(N) = U_{2}$. Assume that our claim is valid for some $d \geq 2$. That is, $N_{d} = [F_{m}]_{X,d-1}$ and $I_{d}(N) = L^{d}_{\rm grad}(U)$. Let $N_{(1,d)}$ be the subgroup of $N_{d}$ generated by the set $\{[y_{m},y_{i_{1}}, \ldots, y_{i_{d-1}}]: i_{1}, \ldots, i_{d-1} \in [m]\}$ and let $N_{(2,d)} = [F_{m}]_{X,d}$. By Lemma \ref{le6.5}~(1)$(a)$, $N_{(2,d)}$ is a normal subgroup of $F_{m}$ and so, $N_{(1,d)}N_{(2,d)} \leq F_{m}$. We claim that $N_{d} = N_{(1,d)} N_{(2,d)}$. By Lemma \ref{le6.5}~(1)$(a)$, it is enough to show that, for all $g_{1}, \ldots, g_{d-1} \in F_{m}$, $[y_{m}, g_{1}, \ldots, g_{d-1}] \in N_{(1,d)} N_{(2,d)}$. Write $g_{j} = y^{\varepsilon_{1,j}}_{i(1,j)} \cdots y^{\varepsilon_{\lambda,j}}_{i(\lambda,j)}$ with $\varepsilon_{\mu,j} = \pm 1$, $i(\mu,j) \in [m]$ and $\mu \in [\lambda]$. By using a well known commutator identities and by working modulo $N_{(2,d)}$, we get $$ [y_{m},g_{1}, \ldots, g_{d-1}]N_{(2,d)} = \prod_{\rm finite}[y_{m},y_{j_{1}}, \ldots, y_{j_{d-1}}]^{\alpha_{(j_{1}, \ldots, j_{d-1})}}N_{(2,d)}, $$ where $\alpha_{(j_{1}, \ldots, j_{d-1})} \in \mathbb{Z}$ and $j_{1}, \ldots, j_{d-1} \in [m]$. Thus, $N_{d} = N_{(1,d)}N_{(2,d)}$. Since $N_{(2,d)} \subseteq \gamma_{d+1}(F_{m})$, we have $I_{d}(N) = N_{(1,d)}\gamma_{d+1}(F_{m})/\gamma_{d+1}(F_{m}) = L^{d}_{\rm grad}(U)$. Write $V_{d} = U_{1} \oplus \cdots \oplus U_{d}$ and $W_{d} = \bigoplus_{t \geq d+1}U_{t}$. Thus, $L(\{\zeta_{m}\} \wr {\cal Z}_{m-1}) = L(U) = L(V_{d} \oplus W_{d})$. By Theorem \ref{th1}, we have $L(\{\zeta_{m}\} \wr {\cal Z}_{m-1}) = L(V_{d}) \oplus L(W_{d} \wr V_{d})$ and so, $L^{d}_{\rm grad}(\{\zeta_{m}\} \wr {\cal Z}_{m-1}) = {\rm gr}_{d}(F_{m}) \cap (L(V_{d}) \oplus L(W_{d} \wr V_{d}))$. Since $L(V_{d}) = \oplus_{s \geq 1} L^{s}_{\rm grad}(V_{d})$, we get $$ L^{d}_{\rm grad}(\{\zeta_{m}\} \wr {\cal Z}_{m-1}) = {\rm gr}_{d}(F_{m}) \cap \left(\left(\bigoplus_{s \geq 1}L^{s}_{\rm grad}(V_{d})\right) \oplus L(W_{d} \wr V_{d})\right). $$ Since, for all $s \geq 1$, $L^{s}_{\rm grad}(V_{d}) \subseteq {\rm gr}_{s}(F_{m})$ and $$ L(W_{d} \wr V_{d}) \subseteq \gamma_{d+1}({\rm gr}(F_{m})) = \bigoplus_{t \geq d+1}{\rm gr}_{t}(F_{m}), $$ we obtain $L^{d}_{\rm grad}(\{\zeta_{m}\} \wr {\cal Z}_{m-1}) = L^{d}_{\rm grad}(U_{1} \oplus \cdots \oplus U_{d})$. Therefore, $L^{d}_{\rm grad}(\{\zeta_{m}\} \wr {\cal Z}_{m-1})$ is the $\mathbb{Z}$-submodule of ${\rm gr}_{d}(F_{m})$ spanned by all Lie commutators of the form $[v_{1}, \ldots, v_{\mu}]$ with $\mu \geq 1$, $v_{i} \in {\cal U}_{d(i)}$, $d(i) \geq 1$, $i \in [\mu]$ and $d(1) + \cdots + d(\mu) = d$. Order the elements of ${\cal V}_{d} = {\cal U}_{1} \cup {\cal U}_{2} \cup \cdots \cup {\cal U}_{d}$, which is a $\mathbb{Z}$-basis of $V_{d}$, by increasing homogeneous degrees $$ \zeta_{m} < [\zeta_{m},\zeta_{1}] < \cdots < [\zeta_{m},\zeta_{m-1}] < [\zeta_{m},\zeta_{1},\zeta_{1}] < [\zeta_{m},\zeta_{1},\zeta_{2}] < \cdots. $$ Form the set of basic Lie commutators ${\cal B}({\cal V},L)$ on the elements of the set ${\cal V}_{d}$ by regarding the elements of ${\cal V}_{d}$ having length $1$. We point out that the elements of ${\cal V}_{d}$ have degree as elements in ${\rm gr}(F_{m})$ as well. Thus, for all $i \in [d]$, the elements of ${\cal U}_{i}$ have length $1$ and degree $i$. Let ${\cal B}(d, {\cal V}, L)$ be the subset of ${\cal B}({\cal V},L)$ of degree $d$. Therefore, the set ${\cal B}(d, {\cal V}, L)$ is a $\mathbb{Z}$-basis of $L^{d}(\{\zeta_{m}\} \wr {\cal Z}_{m-1})$. Note that every element of ${\cal B}(d,{\cal V},L)$ may be considered as an element of $N_{d}$ in a natural way. For example, the basic Lie commutator $[[\zeta_{m},\zeta_{1},\zeta_{2},\zeta_{1}],~_{(d-4)}\zeta_{m}]$ of length $d-3$ and degree $d$ may be regarded as an element of $N_{d}$ as $[[y_{m},y_{1},y_{2},y_{1}], ~_{(d-4)}y_{m}]$. Write ${\cal B}(d,{\cal G},F)$ for the subset of $N_{d}$ constructed by the set ${\cal B}(d,{\cal V},L)$. By applying Lemma \ref{le6.5}~(1)$(d)$~(Jacobi identity), we get, for $y_{i_1}, \ldots, y_{i_{d-1}}$, with $i_{1}, \ldots, i_{d-1} \in [m]$, the element $[y_{m}, y_{i_1}, \ldots, y_{i_{d-1}}]N_{(2,d)}$ written as a product of elements of the form $vN_{(2,d)}$, where $v \in {\cal B}(d,{\cal G},F)$. Now, $$ \begin{array}{rll} N_{d+1} & = & N_{d} \cap \gamma_{d+1}(F_{m}) \\ & = & (N_{(1,d)}N_{(2,d)}) \cap \gamma_{d+1}(F_{m}) \\ {\rm (modular~~law}) & = & N_{(2,d)} (N_{(1,d)} \cap \gamma_{d+1}(F_{m})). \end{array} $$ Since, for any $y_{i_1}, \ldots, y_{i_{d-1}}$, with $i_{1}, \ldots, i_{d-1} \in [m]$, the element $[y_{m},y_{i_1}, \ldots, y_{i_{d-1}}]N_{(2,d)}$ is written as a product of elements of the form $vN_{(2,d)}$, where $v \in {\cal B}(d,{\cal G},F)$, we have, for all $y_{i_1}, \ldots, y_{i_{d-1}}$, with $i_{1}, \ldots, i_{d-1} \in [m]$, $$ [y_{m}, y_{i_1}, \ldots, y_{i_{d-1}}]N_{(2,d)} = \prod_{v \in {\cal B}(d,{\cal G},F)}(vN_{(2,d)})^{\alpha_{v}}, $$ where $\alpha_{v} \in \mathbb{Z}$. Since $I_{d}(N_{d}) = L^{d}_{\rm grad}(\{\zeta_{m}\} \wr {\cal Z}_{m-1}$ and ${\cal B}(d,{\cal V},L)$ is a $\mathbb{Z}$-basis of $L^{d}_{\rm grad}(\{\zeta_{m}\} \wr {\cal Z}_{m-1})$, we get $N_{(1,d)} \cap \gamma_{d+1}(F_{m}) \subseteq N_{(2,d)}$. Therefore, $N_{d+1} = N_{(2,d)}$. It is clear enough that $I_{d+1}(F_{m}) = [F_{m}]_{X,d}\gamma_{d+2}(F_{m})/\gamma_{d+2}(F_{m}) = L^{d+1}_{\rm grad}(\{\zeta_{m}\} \wr {\cal Z}_{m-1})$. \item It follows by Proposition \ref{pr6.4}~(2). \item Recall that ${\rm gr}(F_{m}) = L({\cal Z}_{m-1}) \oplus L(\{\zeta_{m}\} \wr {\cal Z}_{m-1})$. Since $\gamma_{d+1}(F_{m-1}) = \gamma_{d}(F_{m-1}) \cap \gamma_{d+1}(F_{m})$ for all $d \in \mathbb{N}$, we obtain ${\cal L}_{1}(F_{m-1}) \cong {\rm gr}(F_{m-1})$ as Lie algebras in a natural way. Since $L({\cal Z}_{m-1})$ is a free Lie algebra on ${\cal Z}_{m-1}$ and it is a Lie subalgebra of ${\cal L}_{1}(F_{m-1})$, we get ${\cal L}_{1}(F_{m-1}) = L({\cal Z}_{m-1})$. By Proposition \ref{pr6.4}~(3), $L(\{\zeta_{m}\} \wr {\cal Z}_{m-1}) = {\cal L}(N)$. Therefore, ${\rm gr}(F_{m}) = {\cal L}_{1}(F_{m-1}) \oplus {\cal L}(N)$. \hfill $\Box$ \end{enumerate} \section{A presentation of ${\rm gr}(F_{n+1}/N)$}\label{sec7} For a positive integer $n$, with $n \geq 2$, let ${\cal F} = \{x_{1}, \ldots, x_{n}, t\}$. Write ${\cal X} = \{x_{1}, \ldots, x_{n}\}$, order the elements of ${\cal X}$ as $x_1<\ldots<x_n$ and let ${\cal C}= \{t\}$. Let $\theta_n$ be a non-empty partial commutation relation on $[n]$ and $\theta_{n,\delta}=\{(a,b)\in\theta_n\mid a>b\}\neq\emptyset.$ Without loss of generality, we may assume that $(2,1)\in\theta_{n,\delta}.$ Let $F_{n+1}$ be the free group of rank $n+1$ with a free generating set ${\cal F}$ and $${\cal R} = \{[x_{a},x_{b}], [t, x_{i}, x_{j}], [[t,x_{a}],[t,x_{b}]]: i, j \in [n]; (a,b) \in \theta_{n,\delta}\}$$ and let $N = {\cal R}^{F_{n+1}}$ be the normal closure of ${\cal R}$ in $F_{n+1}$. Namely, $F_{n+1}/N\cong FP(H)$ for $H$ the raag with defining graph $\Gamma$, vertex set ${\cal X}$ and edge set $\{(x_a,x_b) \mid (a,b)\in \theta_{n,\delta}\}$. Write ${\cal A} = \{y_{1}, \ldots, y_{n}, s\}$, where $y_{i} = x_{i}F^{\prime}_{n+1}$ and $s = tF^{\prime}_{n+1}$, ${\cal Y} = \{y_{1}, \ldots, y_{n}\}$ with order $y_1<\ldots<y_n$ and ${\cal C} = \{s\}$. Let $\rho$ be the natural $1-1$ and onto map from ${\cal X}$ onto ${\cal Y}$, that is, $\rho(x_{i}) = y_{i}$ for all $i \in [n]$. As in Section \ref{sec5}, the Lie subalgebra $L({\cal A})$ of $T({\cal A})$ generated by the set $\cal A$ is a free Lie algebra on $\cal A$ and $L({\cal A}) = {\rm gr}(F_{n+1})$. We denote by $J_{N}$ the ideal of ${\rm gr}(F_{n+1})$ generated by the set $ {\cal R}_{L} = \{[y_{a},y_{b}], [s, y_{i}, y_{j}], [[s,y_{a}],[s,y_{b}]]: i, j \in [n]; (a,b) \in \theta_{n,\delta}\}$. Our main purpose in this section is to prove ${\rm gr}(F_{n+1}/N) \cong {\rm gr}(F_{n+1})/J_{N}$ as Lie algebras over $\mathbb{Z}$. By Theorem \ref{th1}, $$ {\rm gr}(F_{n+1}) = L({\cal Y}) \oplus L(\{s\} \wr {\cal Y}). \eqno (6.1) $$ We point out that $L(\{s\} \wr {\cal Y})$ is the ideal of ${\rm gr}(F_{n+1})$ generated by $s$. Let $N_{t} = \{t\}^{F_{n+1}}$ be the normal closure of $\{t\}$ in $F_{n+1}$. By Proposition \ref{pr6.4} (for $m = n + 1$), we have ${\cal L}_{1}(F_{n}) = L({\cal Y})$ and ${\cal L}(N_{t}) = L(\{s\} \wr {\cal Y})$. Define $J_{\cal Y} = J_{N} \cap L({\cal Y})$. By Lemma \ref{le5.4}, $J_{\cal Y}$ is the ideal of $L({\cal Y})$ generated by the set ${\cal R}_{2,L} = \{[y_{a},y_{b}]: (a,b) \in \theta_{n,\delta}\}$. By $(4.3)$, $J_{\cal Y}$ is a direct summand of $L({\cal Y})$. The set ${\cal P}_{\cal Y} = \{[s;u]: u \in {\cal M}^{<}_{\cal Y}\}$ is a free generating set for $L(\{s\} \wr {\cal Y})$. Define $J_{{\cal P}_{\cal Y}} = J_{N} \cap L({\cal P}_{\cal Y})$ and note that $J_{{\cal P}_{\cal Y}}$ is an ideal of ${\rm gr}(F_{n+1})$. By Lemma \ref{le1} and Lemma \ref{le5.4}, we have $J_{N} = J_{\cal Y} \oplus J_{{\cal P}_{\cal Y}}$. Write $\Omega = \{s, [s, y_{i}]: i \in [n]\}$ and ${\cal E} = (\{s\} \wr {\cal Y}) \setminus \Omega$. By Theorem \ref{th1}, $$ {\cal L}(N_{t}) = L(\{s\} \wr {\cal Y}) = L({\cal P}_{\cal Y}) = L(\Omega) \oplus L({\cal E} \wr \Omega). \eqno (6.2) $$ Since $J_{{\cal P}_{\cal Y}} = (J_{N} \cap L(\Omega)) \oplus L({\cal E} \wr \Omega)$ (see $(4.5)$), we have $ J_{N} = J_{\cal Y} \oplus (J_{N} \cap L(\Omega)) \oplus L({\cal E} \wr \Omega)$. By $(6.1)$ and $(6.2)$, we get $$ {\rm gr}(F_{n+1}) = L({\cal Y}) \oplus L(\Omega) \oplus L({\cal E} \wr \Omega). \eqno (6.3) $$ By Proposition \ref{pr5.3}, $L({\cal E} \wr \Omega)$ is an ideal in ${\rm gr}(F_{n+1})$ and $J_{N} \cap L(\Omega)$ is the ideal of $L(\Omega)$ generated by the set ${\cal R}_{4,L} = \{[[s,y_{a}],[s,y_{b}]]: (a,b) \in \theta_{n,\delta}\}$. Write $I_{\Omega} = J_{N} \cap L(\Omega)$. Thus, $$ J_{N} = J_{\cal Y} \oplus I_{\Omega} \oplus L({\cal E} \wr \Omega). \eqno (6.4) $$ By $(6.3)$ and $(6.4)$, it is clear enough that $$ {\rm gr}(F_{n+1})/J_{N} \cong (L({\cal Y})/J_{\cal Y}) \oplus (L(\Omega)/I_{\Omega}) \eqno (6.5) $$ as $\mathbb{Z}$-modules in a natural way. As shown in Section 2 (for $N = {\cal R}^{F_{n+1}}$), ${\cal L}(N) = \bigoplus _{d \geq 2}I_{d}(N)$, where $I_{d}(N) = (N_{d} \gamma_{d+1}(F_{n+1}))/\gamma_{d+1}(F_{n+1})$ and $N_{d} = N \cap \gamma_{d}(F_{n+1})$, is an ideal of ${\rm gr}(F_{n+1})$. Since ${\cal R}_{L} \subset I_{2}(N) \oplus I_{3}(N) \oplus I_{4}(N)$, we get $J_{N} \subseteq {\cal L}(N)$. We set $$ \begin{array}{rll} {\cal R}_{2} & = & \{[x_{a},x_{b}]: (a, b) \in \theta_{n,\delta}\}, \\ {\cal R}_{3} & = & \{[t,x_{i},x_{j}]: i, j \in [n]\} ~~{\rm and} \\ {\cal R}_{4} & = & \{[[t,x_{a}],[t,x_{b}]]: (a,b) \in \theta_{n,\delta}\}. \end{array} $$ Thus, ${\cal R} = {\cal R}_{2} \cup {\cal R}_{3} \cup {\cal R}_{4}$. We denote by $F_{\Omega}$ the subgroup of $F_{n+1}$ generated by the set $\{t, [t,x_{1}], \ldots, [t,x_{n}]\}$. It is clear enough that $F_{\Omega}$ is a free group of finite rank $n+1$. In particular, $F_{n+1}$ is naturally isomorphic to $F_{\Omega}$. \subsection{Recognition of $J_{\cal Y}$ in ${\rm gr}(F_{n+1})$}\label{subsec7.1} Let $N_{{\cal R}_{2}} = {\cal R}_{2}^{F_{n}}$ be the normal closure of ${\cal R}_{2}$ in the free group $F_{n}$, with a free generating set $\{x_1,\ldots,x_n\}$, and $X_{{\cal R}_{2}}$ be the subgroup of $F_{n}$ generated by the set ${\cal R}_{2}$. By Lemma \ref{le6.5}~(2) (for $G = F_{n}$, ${\cal S} = {\cal R}_{2}$ and $N_{\cal S} = N_{{\cal R}_{2}}$), $N_{{\cal R}_{2}} = X_{{\cal R}_{2}} [X_{{\cal R}_{2}},F_{n}]$. Thus, $N_{{\cal R}_{2}} \subseteq F^{\prime}_{n+1}$ and, by Proposition \ref{pr6.4}~(1), $N_{{\cal R}_{2}} \cap N_{t} = \{1\}$. In the next few lines, we write ${\cal Y}_{x} = \{y_{x,1}, \ldots, y_{x,n}\}$, where $y_{x,j} = x_{j}F^{\prime}_{n}$, $j \in [n]$. So, ${\rm gr}(F_{n})$ is a free Lie algebra on ${\cal Y}_{x}$. We denote by $J_{{\cal Y}_{x}}$ the ideal of ${\rm gr}(F_{n})$ generated the set ${\cal R}_{x,L,2} = \{[y_{x,a},y_{x,b}]: (a,b) \in \theta_{n,\delta}\}$. Since $J_{{\cal Y}_{x}}$ is a homogeneous ideal, we have $J_{{\cal Y}_{x}} = \bigoplus_{d \geq 2}J^{d}_{{\cal Y}_{x}}$, where $J^{d}_{{\cal Y}_{x}} = J_{{\cal Y}_{x}} \cap {\rm gr}_{d}(F_{n})$. Let ${\cal L}_{{\cal Y}_{x}}(N_{{\cal R}_{2}}) = \bigoplus_{d \geq 2}I_{x,d}(N_{{\cal R}_{2}})$, where $I_{x,d}(N_{{\cal R}_{2}}) = (N_{{\cal R}_{2},x,d}\gamma_{d+1}(F_{n}))/\gamma_{d+1}(F_{n})$ and, for any positive integer $d \geq 2$, $N_{{\cal R}_{2},x,d} = N_{{\cal R}_{2}} \cap \gamma_{d}(F_{n})$. Since $N_{{\cal R}_{2}}$ is normal in $F_{n}$, we have ${\cal L}_{{\cal Y}_{x}}(N_{{\cal R}_{2}})$ is an ideal in ${\rm gr}(F_{n})$. Since ${\cal R}_{x,L,2} \subset I_{x,2}(N_{{\cal R}_{2}})$ and ${\cal L}_{{\cal Y}_{x}}(N_{{\cal R}_{2}})$ is an ideal of ${\rm gr}(F_{n})$, we have $J_{{\cal Y}_{x}} \subseteq {\cal L}_{{\cal Y}_{x}}(N_{{\cal R}_{2}})$. Moreover, for any positive integer $d$, with $d \geq 2$, $J^{d}_{{\cal Y}_{x}} \subseteq I_{x,d}(N_{{\cal R}_{2}})$. By Corollary \ref{co4.1}, $J_{{\cal Y}_{x}}$ is a direct summand of ${\rm gr}(F_{n})$ and so, ${\rm gr}(F_{n})/J_{{\cal Y}_{x}}$ is a free $\mathbb{Z}$-module. By Theorem \ref{th4.4}, the $\mathbb{Z}$-module $J_{{\cal Y}_{x}}/[J_{{\cal Y}_{x}}, J_{{\cal Y}_{x}}]$ is a free (right) $U({\rm gr}(F_{n})/J_{{\cal Y}_{x}})$-module with a free generating set ${\cal R}_{x,L,2}+[J_{{\cal Y}_{x}}, J_{{\cal Y}_{x}}]$. By a result of Labute \cite[Theorem 1]{labu}, ${\rm gr}(F_{n}/N_{{\cal R}_{2}}) \cong {\rm gr}(F_{n})/J_{{\cal Y}_{x}}$ as Lie algebras. (Note that in the proof of Theorem 1 in \cite{labu}, the left action of the universal enveloping algebra $U(L/I)$ on the $\mathbb{Z}$-module $I/[I,I]$ it is used.) In the proof of Theorem 1 in \cite{labu}, since $J_{{\cal Y}_{x}}/[J_{{\cal Y}_{x}}, J_{{\cal Y}_{x}}]$ is a free (right) $U({\rm gr}(F_{n})/J_{{\cal Y}_{x}})$-module, the induced homomorphism $\xi$ (Lemma \ref{le6.7} for $N = N_{{\cal R}_{2}}$ and $I = J_{{\cal Y}_{x}}$) is onto and so, ${\cal L}_{{\cal Y}_{x}}(N_{{\cal R}_{2}}) = J_{{\cal Y}_{x}}$. Let ${\cal L}_{{\cal Y}}(N_{{\cal R}_{2}}) = \bigoplus_{d \geq 2}I_{d}(N_{{\cal R}_{2}})$, where $I_{d}(N_{{\cal R}_{2}}) = (N_{{\cal R}_{2},d}\gamma_{d+1}(F_{n+1}))/\gamma_{d+1}(F_{n+1})$ and, for any positive integer $d \geq 2$, $N_{{\cal R}_{2},d} = N_{{\cal R}_{2}} \cap \gamma_{d}(F_{n+1})$. Since $N_{{\cal R}_{2}} \cap N_{t} = \{1\}$, we have $N_{{\cal R}_{2}} \cap \gamma_{d}(F_{n+1}) = N_{{\cal R}_{2}} \cap \gamma_{d}(F_{n})$. Hence, for any positive integer $d$, with $d \geq 2$, $N_{{\cal R}_{2},x,d} = N_{{\cal R}_{2},d}$. It is clear enough that ${\cal L}_{\cal Y}(N_{{\cal R}_{2}})$ is an ideal in ${\cal L}_{1}(F_{n}) = L({\cal Y})$. The Lie algebra ${\rm gr}(F_{n})$ is isomorphic as a Lie algebra to ${\cal L}_{1}(F_{n}) = L({\cal Y})$ by a Lie algebra isomorphism $\chi$ defined as $\chi(y_{x,j}) = y_{j}$ for all $j \in [n]$. Clearly, $\chi({\cal L}_{{\cal Y}_{x}}(N_{{\cal R}_{2}})) = {\cal L}_{{\cal Y}}(N_{{\cal R}_{2}})$ and $\chi(J_{{\cal Y}_{x}}) = J_{\cal Y}$. Since ${\cal L}_{{\cal Y}_{x}}(N_{{\cal R}_{2}}) = J_{{\cal Y}_{x}}$ and $\chi$ is a Lie algebra isomorphism, we obtain ${\cal L}_{\cal Y}(N_{{\cal R}_{2}}) = J_{\cal Y}$. So, for any $d \geq 2$, $I_{d}(N_{{\cal R}_{2}}) = J^{d}_{\cal Y}$. For $d = 2$, $I_{2}(N_{{\cal R}_{2}}) = J^{2}_{\cal Y} = \langle {\cal R}_{2,L} \rangle$. Thus, we assume that $d \geq 3$. By $(4.2)$, the definition of each ${\cal P}^{\prime}_{{\cal Y}_{\kappa},1,2} \wr {\cal P}^{\prime \prime}_{{\cal Y}_{\kappa}}$, Lemma \ref{le6.5}~(1) and the Jacobi identity in the form $[x,[y,z]] = [x,y,z] - [x,z,y]$ (where it is needed), we have $ I_{d}(N_{{\cal R}_{2}}) ( = J^{d}_{\cal Y} ) \subseteq ([F_{n}]_{X_{{\cal R}_{2},d-2}}\gamma_{d+1}(F_{n+1}))/\gamma_{d+1}(F_{n+1})$. Since $[F_{n}]_{X_{{\cal R}_{2},d-2}} \subseteq N_{{\cal R}_{2},d} = N_{{\cal R}_{2}} \cap \gamma_{d}(F_{n})$, we get $ ([F_{n}]_{X_{{\cal R}_{2},d-2}}\gamma_{d+1}(F_{n+1}))/\gamma_{d+1}(F_{n+1}) \subseteq I_{d}(N_{{\cal R}_{2}})$ and so, we have $([F_{n}]_{X_{{\cal R}_{2},d-2}}\gamma_{d+1}(F_{n+1}))/\gamma_{d+1}(F_{n+1}) = I_{d}(N_{{\cal R}_{2}}) = J^{d}_{\cal Y}$. We summarize the above observations in the following result. \begin{proposition}\label{pro7.5} With the previous notations, ${\rm gr}(F_{n}/N_{{\cal R}_{2}}) \cong {\cal L}_{1}(F_{n})/{\cal L}_{\cal Y}(N_{{\cal R}_{2}})$ as Lie algebras in a natural way, with ${\cal L}_{1}(F_{n}) = L({\cal Y})$ and ${\cal L}_{\cal Y}(N_{{\cal R}_{2}}) = J_{\cal Y}$. Moreover, for any $d \geq 3$, $$ ([F_{n}]_{X_{{\cal R}_{2},d-2}}\gamma_{d+1}(F_{n+1}))/\gamma_{d+1}(F_{n+1}) = I_{d}(N_{{\cal R}_{2}}) = J^{d}_{\cal Y}. $$ \end{proposition} \begin{remark}\label{rem7.1.1}\upshape{The group $F_{n}/N_{{\cal R}_{2}}$ is the raag $H$. A description of ${\cal L}_{1}(F_{n})/{\cal L}_{\cal Y}(N_{{\cal R}_{2}})$ has been also given in \cite{dk} (see, also, \cite{dk2}). We point out that in \cite{dk2}, it has been shown that $F_{n}/N_{{\cal R}_{2}}$ is a Magnus group. } \end{remark} \subsection{Recognition of $L({\cal E} \wr \Omega)$ in ${\rm gr}(F_{n+1})$}\label{subsec7.2} In this section, we describe the ideal $L({\cal E} \wr \Omega)$ in ${\rm gr}(F_{n+1})$. \begin{proposition}\label{pro7.5a} With the previous notations, \begin{enumerate} \item $L({\cal E} \wr \Omega)$ is the ideal of ${\rm gr}(F_{n+1})$ generated by the set ${\cal R}_{3,L} = \{[s,y_{i},y_{j}]: i, j \in [n]\}$. \item Let $N_{{\cal R}_{3}} = {\cal R}_{3}^{F_{n+1}}$ be the normal closure of ${\cal R}_{3}$ in $F_{n+1}$. Then, ${\rm gr}(F_{n+1}/N_{{\cal R}_{3}}) \cong {\rm gr}(F_{n+1})/{\cal L}(N_{{\cal R}_{3}})$ as Lie algebras in a natural way, with ${\cal L}(N_{{\cal R}_{3}}) = L({\cal E} \wr \Omega)$. For any $d \geq 3$, $ L^{d}_{\rm grad}({\cal E} \wr \Omega) = I_{d}(N_{{\cal R}_{3}}) = ([F_{n+1}]_{X_{{\cal R}_{3},d-3}}\gamma_{d+1}(F_{n+1}))/\gamma_{d+1}(F_{n+1})$, where $X_{{\cal R}_{3}}$ is the subgroup of $F_{n+1}$ generated by the set ${\cal R}_{3}$. \end{enumerate} \end{proposition} {\em Proof.\ } \begin{enumerate} \item Write $I_{{\cal R}_{3,L}}$ for the ideal of ${\rm gr}(F_{n+1})$ generated by the set ${\cal R}_{3,L}$. Since ${\cal E} \wr \Omega \subset I_{{\cal R}_{3,L}}$, we have $L({\cal E} \wr \Omega) \subseteq I_{{\cal R}_{3,L}}$. On the other hand, since ${\cal R}_{3,L} \subset L({\cal E} \wr \Omega)$ and, by Proposition \ref{pr5.3}~(3), $L({\cal E} \wr \Omega)$ is an ideal of ${\rm gr}(F_{n+1})$, we have $I_{{\cal R}_{3,L}} \subseteq L({\cal E} \wr \Omega)$ and so, we get the required result. \item Recall that ${\cal L}(N_{{\cal R}_{3}}) = \bigoplus_{d \geq 3}I_{d}(N_{{\cal R}_{3}})$, where $I_{d}(N_{{\cal R}_{3}}) = (N_{{\cal R}_{3},d} \gamma_{d+1}(F_{n+1}))/\gamma_{d+1}(F_{n+1})$ and $N_{{\cal R}_{3},d} = N_{{\cal R}_{3}} \cap \gamma_{d}(F_{n+1})$. Since ${\cal R}_{3,L} \subset I_{3}(N_{{\cal R}_{3}}) = L^{3}_{\rm grad}({\cal E} \wr \Omega)$ and ${\cal L}(N_{{\cal R}_{3}})$ is an ideal of ${\rm gr}(F_{n+1})$, we have, by Proposition \ref{pro7.5a}~(1), $L({\cal E} \wr \Omega) \subseteq {\cal L}(N_{{\cal R}_{3}})$. For any positive integer $d$, with $d \geq 3$, $L^{d}_{\rm grad}({\cal E} \wr \Omega) \subseteq I_{d}(N_{{\cal R}_{3}})$. By $(6.3)$, $L({\cal E} \wr \Omega)$ is a direct summand of ${\rm gr}(F_{n+1})$ and so, ${\rm gr}(F_{n+1})/L({\cal E} \wr \Omega)$ is a free $\mathbb{Z}$-module. By Theorem \ref{th5.6}, the $\mathbb{Z}$-module $L({\cal E} \wr \Omega)/[L({\cal E} \wr \Omega), L({\cal E} \wr \Omega)]$ is a free (right) $U({\rm gr}(F_{n+1})/L({\cal E} \wr \Omega))$-module with a free generating set ${\cal R}_{3,L}+[L({\cal E} \wr \Omega), L({\cal E} \wr \Omega)]$. Using similar arguments as before, we have ${\cal L}(N_{{\cal R}_{3}}) = L({\cal E} \wr \Omega)$. Hence, for any $d \geq 3$, $L^{d}_{\rm grad}({\cal E} \wr \Omega) = I_{d}(N_{{\cal R}_{3}})$. For non-negative integers $\kappa$ and $\lambda$, with $\kappa \geq 2$, let $V_{\kappa + \lambda}$ be the free $\mathbb{Z}$-module spanned by the set $\{[s, y_{i_{1}}, \ldots, y_{i_{\kappa}}, z_{j_{1}}, \ldots, z_{j_{\lambda}}]: i_{1}, \ldots, i_{\kappa} \in [n]; z_{j_{1}}, \ldots, z_{j_{\lambda}} \in \Omega\}$. Clearly, $$ L({\cal E} \wr \Omega) = L\left(\bigoplus_{\kappa \geq 2, \lambda \geq 0 \atop \kappa + \lambda \geq 2}V_{\kappa + \lambda}\right). $$ Then, for all $d \geq 3$, $L^{d}_{\rm grad}({\cal E} \wr \Omega)$ is the $\mathbb{Z}$-module of $L({\cal E} \wr \Omega)$ consisting of all Lie commutators of the form $[v_{1}, \ldots, v_{\nu}]$ where $v_{i} \in V_{\kappa_{i} + \lambda_{i}}$, $i \in [\nu]$ and $(\kappa_{1} + \lambda_{1}) + \cdots + (\kappa_{\nu} + \lambda_{\nu}) = d - \nu$. For $d \geq 3$, write $\overline{I}_{d}(N_{{\cal R}_{3}}) = [F_{n+1}]_{X_{{\cal R}_{3},d-3}}\gamma_{d+1}(F_{n+1})/\gamma_{d+1}(F_{n+1})$. Since $[F_{n+1}]_{X_{{\cal R}_{3},d-3}} \subseteq N_{{\cal R}_{3},d} = N_{{\cal R}_{3}} \cap \gamma_{d}(F_{n+1})$ for all $d \geq 3$, we have $ \overline{I}_{d}(N_{{\cal R}_{3}}) \subseteq I_{d}(N_{{\cal R}_{3}}) = L^{d}_{\rm grad}({\cal E} \wr \Omega)$. On the other hand, since any Lie commutator $[v_{1}, \ldots, v_{\nu}]$ of the above form belongs to $\overline{I}_{d}(N_{{\cal R}_{3}})$, we get $L^{d}_{\rm grad}({\cal E} \wr \Omega) \subseteq \overline{I}_{d}(N_{{\cal R}_{3}})$ and so, we obtain the required result. \hfill $\Box$ \end{enumerate} \begin{remark}\label{rem7.2.2}\upshape{The group $F_{n+1}/N_{{\cal R}_{3}}$ is a Formanek-Procesi group $FP(F_{n})$ with $F_{n}$ a free group of rank $n \geq 2$. That is, $FP(F_{n}) = \langle t, g_{1}, \ldots, g_{n}: [t,g_{i},g_{j}] = 1, i, j \in [n]\rangle$. A presentation of ${\rm gr}(F_{n+1}/N_{{\cal R}_{3}})$ has been also given in \cite[Theorem 1~(1)]{sev}. Furthermore, it has been shown that $FP(F_{n})$ is a Magnus group \cite[Theorem 1~(3)]{sev}. } \end{remark} \subsection{Recognition of $I_{\Omega}$ in ${\rm gr}(F_{n+1})$}\label{subsec7.3} For $i \in [n]$, we write $q_{i} = [t,x_{i}]$, $\omega_{i} = q_{i}\gamma_{3}(F_{n+1})$ and $\Omega_{0} = \{\omega_{1}, \ldots, \omega_{n}\}$. Let $F_{\Omega_{0}}$ be the free group on the set $\{q_{1}, \ldots, q_{n}\}$. Note that $$ F_{\Omega_{0}} \subseteq F^{\prime}_{n+1}~~{\rm and}~~F_{\Omega_{0}}\gamma_{3}(F_{n+1})/\gamma_{3}(F_{n+1}) = [X,F_{n}]\gamma_{3}(F_{n+1})/\gamma_{3}(F_{n+1}), $$ where $X$ is the subgroup of $F_{n+1}$ generated by $t$. For a positive integer $\kappa$, let $ {\cal L}_{{\rm od},\kappa}(F_{\Omega_{0}}) = \gamma_{\kappa}(F_{\Omega_{0}})\gamma_{2\kappa+1}(F_{n+1})/\gamma_{2\kappa+1}(F_{n+1})$ and form the (restricted) direct sum ${\cal L}_{{\rm od}}(F_{\Omega_{0}})$ of the abelian groups ${\cal L}_{{\rm od},k}(F_{\Omega_{0}})$. Since $[\gamma_{\kappa}(F_{\Omega_{0}}), \gamma_{\lambda}(F_{\Omega_{0}})] \subseteq \gamma_{\kappa+\lambda}(F_{\Omega_{0}})$ for all $\kappa,\lambda \in \mathbb{N}$, we have ${\cal L}_{\rm od}(F_{\Omega_{0}})$ is a Lie subalgebra of ${\rm gr}(F_{n+1})$. In fact, ${\cal L}_{\rm od}(F_{\Omega_{0}}) = L({\Omega_{0}}) = L(I_{2}(N_{t}))$. By $(6.2)$, ${\cal L}(N_{t}) = L(\Omega) \oplus L({\cal E} \wr \Omega)$. We point out that $L(\Omega) = L(I_{2}(N_{t}) \oplus I_{1}(N_{t}))$. For a positive integer $d$, $L^{d}_{\rm grad}(\Omega)$ is the $\mathbb{Z}$-submodule of $L(\Omega)$ spanned by all Lie commutators $[v_{1}, \ldots, v_{\mu}]$, $\mu \geq 1$, $v_{j} \in I_{i(j)}(N_{t})$, $i(j) \in [2]$, $j \in [\mu]$ and $i(1) + \cdots + i(\mu) = d$. Thus, by $(6.2)$ and Proposition \ref{pro7.5a}~(2), for $d \geq 1$, $$ I_{d}(N_{t}) = L^{d}_{\rm grad}(\Omega) \oplus I_{d}(N_{{\cal R}_{3}}). \eqno(6.6) $$ So, $I_{1}(N_{t}) = L^{1}_{\rm grad}(\Omega) = \langle s \rangle$ and $I_{2}(N_{t}) = L^{2}_{\rm grad}(\Omega) = \langle [s,y_{j}]: j \in [n]\rangle$. For $d \geq 3$, by Proposition \ref{pr6.4}, it is easily verified that $ I_{d}(N_{t}) = ([F_{n+1}]_{F_{\Omega_{0}},d-2})\gamma_{d+1}(F_{n+1})/\gamma_{d+1}(F_{n+1})$. By Proposition \ref{pro7.5a}, $I_{d}(N_{{\cal R}_{3}}) = ([F_{n+1}]_{[F_{\Omega_{0}},F_{n}],d-3})\gamma_{d+1}(F_{n+1})/\gamma_{d+1}(F_{n+1})$. We denote by $L^{d}_{\rm grad,1}(\Omega)$ the $\mathbb{Z}$-submodule of $L^{d}_{\rm grad}(\Omega)$ spanned by all Lie commutators $[v_{1}, \ldots, v_{\mu}]$, with $v_{j} \in I_{2}(N_{t})$, $j \in [\mu]$ and $2 \mu = d$. Thus, $L^{d}_{\rm grad,1}(\Omega) = \{0\}$ if $d$ is odd, and $L^{2 \mu}_{\rm grad,1}(\Omega) = {\cal L}_{{\rm od},\mu}(F_{\Omega_{0}})$. We write $L^{d}_{\rm grad,2}(\Omega) $ for the $\mathbb{Z}$-submodule of $L^{d}_{\rm grad}(\Omega)$ spanned by all Lie commutators $[v_{1}, \ldots, v_{\mu}]$, with $v_{j} \in I_{i(j)}(N_{t})$, $j \in [\mu]$, $i(1), \ldots, i(\mu) \in [2]$, at least one of $i(1), \ldots, i(\mu)$ is equal to $1$ and $i(1) + \cdots + i(\mu) = d$. By Theorem \ref{th1}, $L(\Omega) = L(I_{2}(N_{t})) \oplus L(I_{1}(N_{t}) \wr I_{2}(N_{t}))$. Thus, for all $d \in \mathbb{N}$, we have $L^{d}_{\rm grad}(\Omega) = L^{d}_{\rm grad}(I_{2}(N_{t})) \oplus L^{d}_{\rm grad}(I_{1}(N_{t}) \wr I_{2}(N_{t}))$. By the definitions of $L^{d}_{\rm grad,1}(\Omega)$ and $L^{d}_{\rm grad,2}(\Omega)$, we have, for all $d \in \mathbb{N}$, $$ L^{d}_{\rm grad}(\Omega) = L^{d}_{\rm grad,1}(\Omega) \oplus L^{d}_{\rm grad,2}(\Omega) \eqno(6.7) $$ and so, by $(6.7)$, for all $d \in \mathbb{N}$, $$ L^{d}_{\rm grad}(I_{1}(N_{t}) \wr I_{2}(N_{t})) = L^{d}_{{\rm grad},2}(\Omega). \eqno(6.8) $$ For $\mu \geq 1$ and non-negative integers $j(1), \ldots, j(\mu)$, with $j(1) + \cdots + j(\mu) = d$ and $d \geq 1$, let $X_{(j(1), \ldots, j(\mu))} = [X_{j(1)}, \ldots, X_{j(\mu)}]$, where $X_{j(i)} \in \{X, F_{\Omega_{0}}\}$, $i \in [\mu]$, $j(1), \ldots, j(\mu) \in [2]$, and at least one of $X_{j(1)}, \ldots, X_{j(\mu)}$ equals $X$. Let $X_{{\rm grad},d} = \prod_{j(1) + \cdots + j(\mu) = d} X_{(j(1), \ldots, j(\mu))}$ and $M_{2,d} = X_{{\rm grad},d}\gamma_{d+1}(F_{n+1})/\gamma_{d+1}(F_{n+1})$. By the definitions of $M_{2,d} $ and $L^{d}_{{\rm grad},2}(\Omega)$, we have $M_{2,d} = L^{d}_{{\rm grad},2}(\Omega)$ for all $d \geq 1$. Form the (restricted) direct sum ${\cal L}_{M} = \bigoplus_{d \geq 1}M_{2,d}$ of the abelian groups $M_{2,d}$. By using the Jacobi identity in the form $[x,[y,z]] = [x,y,z] + [x,z,y]$, we may show that ${\cal L}_{M}$ is a Lie subalgebra of ${\rm gr}(F_{n+1})$. By $(6.8)$, we get ${\cal L}_{M} = L(I_{1}(N_{t}) \wr I_{2}(N_{t}))$. By $(6.7)$, we have $$ L(\Omega) = {\cal L}_{\rm od}(F_{\Omega_{0}}) \oplus {\cal L}_{M}. \eqno (6.9) $$ For a positive integer $\kappa$, let $F_{{\Omega},\kappa} = F_{\Omega} \cap \gamma_{\kappa}(F_{n+1})$. Form the (restricted) direct sum ${\cal L}(F_{\Omega})$ of the abelian groups $I_{\kappa}(F_{\Omega}) = F_{{\Omega},\kappa}\gamma_{\kappa+1}(F_{n+1})/\gamma_{\kappa+1}(F_{n+1})$. It is clear enough that ${\cal L}(F_{\Omega})$ is a Lie subalgebra of ${\rm gr}(F_{n+1})$. \begin{proposition}\label{pro7.6a} With the previous notations, ${\cal L}(F_{\Omega}) = L(\Omega)$. In particular, ${\cal L}(F_{\Omega})$ is a free Lie algebra on $I_{1}(F_{\Omega}) \oplus I_{2}(F_{\Omega})$. For any positive integer $d$, $I_{d}(F_{\Omega}) = L^{d}_{\rm grad}(\Omega)$. \end{proposition} {\em Proof.\ } Since $F_{{\Omega_{0}}} \subseteq F^{\prime}_{n+1}$, we have $I_{1}(F_{\Omega}) = I_{1}(N_{t})$ and $I_{2}(F_{\Omega}) = I_{2}(N_{t})$. Since ${\cal L}(F_{\Omega})$ is a Lie subalgebra of ${\rm gr}(F_{n+1})$ and $L(\Omega)$ is free on $I_{1}(N_{t}) \oplus I_{2}(N_{t})$, we have $L(\Omega) \subseteq {\cal L}(F_{\Omega})$. Clearly, ${\cal L}(F_{\Omega}) \subseteq {\cal L}(N_{t})$. By $(6.2)$ and the modular law, we get $$ {\cal L}(F_{\Omega}) = L(\Omega) \oplus (L({\cal E} \wr \Omega) \cap {\cal L}(F_{\Omega})). \eqno (6.10) $$ We claim that $L({\cal E} \wr \Omega) \cap {\cal L}(F_{\Omega}) = \{0\}$. Let $\overline{u} \in L({\cal E} \wr \Omega) \cap {\cal L}(F_{\Omega})$. By Proposition \ref{pro7.5a}~(2), ${\cal L}(N_{{\cal R}_{3}}) = L({\cal E} \wr \Omega)$. Since both ${\cal L}(N_{{\cal R}_{3}})$ and ${\cal L}(F_{\Omega})$ are graded Lie algebras, we may assume that $\overline{u} = u \gamma_{c+1}(F_{n+1}) \in I_{c}(N_{{\cal R}_{3}}) \cap I_{c}(F_{\Omega})$ with $u \in \gamma_{c}(F_{n+1})$ and some $c \in \mathbb{N}$. It is clear enough that $c \geq 3$. Then, $ \overline{u} = u_{1}\gamma_{c+1}(F_{n+1}) = u_{2}\gamma_{c+1}(F_{n+1})$, where $u_{1} \in [F_{n+1}]_{X_{{\cal R}_{3}},c-3}$ and $u_{2} \in F_{\Omega,c} = F_{\Omega} \cap \gamma_{c}(F_{n+1})$. To get a contradiction, we assume that $u \notin \gamma_{c+1}(F_{n+1})$. Hence, $u_{1}, u_{2} \in \gamma_{c}(F_{n+1}) \setminus \gamma_{c+1}(F_{n+1})$. Since $F_{\Omega}$ is a free group on the set ${\cal F}_{\Omega} = \{t, q_{1}, \ldots, q_{n}\}$, $u_{2}$ is (uniquely) written as $u_{2} = z^{\mu_{1}}_{i_{1}} \cdots z^{\mu_{\kappa}}_{i_{\kappa}}$, with $z_{i_{1}}, \ldots, z_{i_{\kappa}} \in {\cal F}_{\Omega}$, $i_{\lambda} \neq i_{\lambda + 1}$, $\lambda \in [\kappa - 1]$ and $\mu_{1}, \ldots, \mu_{\kappa} \in {\mathbb{Z}} \setminus \{0\}$. In the next few lines, we write $\overline{t} = t\gamma_{c+1}(F_{n+1}), \overline{x}_{i} = x_{i}\gamma_{c+1}(F_{n+1})$, $i \in [n]$ and $F_{n+1,c} = F_{n+1}/\gamma_{c+1}(F_{n+1})$. Thus, $F_{n+1,c}$ is a free nilpotent group of rank $n+1$ and class $c$ with a free generating set $\{\overline{t}, \overline{x}_{1}, \ldots, \overline{x}_{n}\}$. Note that, for any $j \in [n]$, $\overline{q}_{j} = q_{j}\gamma_{c+1}(F_{n+1}) = [\overline{t}, \overline{x}_{j}] \in F^{\prime}_{n+1,c}$. Using the identity $ab = ba[a,b]$ as many times as needed in the above expression of $u_{2}$ and working in $F_{n+1,c}$, the element $\overline{u}_{2} = u_{2}\gamma_{c+1}(F_{n+1})$ is written in $F_{n+1,c}$ as $$ \overline{u}_{2} = \overline{t}^{\alpha}\overline{q}^{\alpha_{1}}_{1} \cdots \overline{q}^{\alpha_{n}}_{n} w_{3}(\overline{t}, \overline{q}_{1}, \ldots, \overline{q}_{n}) \cdots w_{c}(\overline{t}, \overline{q}_{1}, \ldots, \overline{q}_{n}), \eqno(6.11) $$ where $\alpha, \alpha_{1}, \ldots, \alpha_{n} \in \mathbb{Z}$, $w_{3}(\overline{t}, \overline{q}_{1}, \ldots, \overline{q}_{n}), \ldots, w_{c}(\overline{t}, \overline{q}_{1}, \ldots, \overline{q}_{n})$ are products of group commutators in $\overline{t},$ $\overline{q}_{1}, \ldots, \overline{q}_{n}$ and have weights $3, 4, \ldots, c$ in $F_{n+1}$, respectively. Thus, for $j \in [c] \setminus \{1,2\}$, $ w_{j}(t, q_{1}, \ldots, q_{n}) \in F_{\Omega,j} = F_{\Omega} \cap \gamma_{j}(F_{n+1})$. Form the (restricted) direct sum ${\rm gr}(F_{n+1,c})$ of the abelian groups $\gamma_{r}(F_{n+1,c})/\gamma_{r+1}(F_{n+1,c})$. It is well known that ${\rm gr}(F_{n+1,c})$ is a free nilpotent Lie algebra of rank $n+1$ and class $c$ with a free generating set $\{\overline{t}F^{\prime}_{n+1,c}, \overline{x}_{1}F^{\prime}_{n+1,c}, \ldots,$ $\overline{x}_{n}F^{\prime}_{n+1,c}\}$. By $(6.11)$, $\overline{u}_{2}$ is written in ${\rm gr}(F_{n+1,c})$ as $$ \begin{array}{rll} \overline{u}_{2} & = & \overline{t}^{\alpha}F^{\prime}_{n+1,c} + \overline{q}^{\alpha_{1}}_{1} \cdots \overline{q}^{\alpha_{n}}_{n} \gamma_{3}(F_{n+1,c}) + w_{3}(\overline{t}, \overline{q}_{1}, \ldots, \overline{q}_{n})\gamma_{4}(F_{n+1,c}) + \cdots + \\ & & w_{c-1}(\overline{t}, \overline{q}_{1}, \ldots, \overline{q}_{n})\gamma_{c}(F_{n+1,c}) + w_{c}(\overline{t}, \overline{q}_{1}, \ldots, \overline{q}_{n}). \end{array} $$ Since $u_{2} \in \gamma_{c}(F_{n+1}) \setminus \gamma_{c+1}(F_{n+1})$, that is, $\overline{u}_{2} \in \gamma_{c}(F_{n+1,c})$ (a non-trivial element in $F_{n+1,c}$), we get $\overline{u}_{2} = w_{c}(\overline{t}, \overline{q}_{1}, \ldots, \overline{q}_{n})$. Therefore, $u_{2}\gamma_{c+1}(F_{n+1}) \in M_{2,c}$. By $(6.9)$, $(6.8)$ and $(6.7)$, we get $u_{2}\gamma_{c+1}(F_{n+1})$ $\in L^{c}_{{\rm grad},2}(\Omega)$. On the other hand, $u_{1}\gamma_{c+1}(F_{n+1}) \in I_{c}(N_{{\cal R}_{3}})$. By $(6.7)$ and $(6.6)$, we obtain the required contradiction. Therefore, $L({\cal E} \wr \Omega) \cap {\cal L}(F_{\Omega}) = \{0\}$ and so, by $(6.10)$, ${\cal L}(F_{\Omega}) = L(\Omega)$. Since $L(\Omega)$ is free on $\Omega$ and $\langle \Omega \rangle = I_{1}(F_{\Omega}) \oplus I_{2}(F_{\Omega})$, we have ${\cal L}(F_{\Omega})$ is a free Lie algebra on $I_{1}(F_{\Omega}) \oplus I_{2}(F_{\Omega})$. Since both ${\cal L}(F_{\Omega})$ and $L(\Omega)$ are graded Lie algebras, we have $I_{d}(F_{\Omega}) = L^{d}_{\rm grad}(\Omega)$ for all $d$. \hfill $\Box$ \bigskip Let $N_{{\cal R}_{4}} = {\cal R}_{4}^{F_{\Omega}}$ be the normal closure of ${\cal R}_{4}$ in $F_{\Omega}$ and $X_{{\cal R}_{4}}$ be the subgroup of $F_{\Omega}$ generated by the set ${\cal R}_{4}$. In fact, $X_{{\cal R}_{4}} \subseteq F^{\prime}_{\Omega_{0}}$. By Lemma \ref{le6.5}~(2), $N_{{\cal R}_{4}} = X_{{\cal R}_{4}} [X_{{\cal R}_{4}}, F_{\Omega}]$. Thus, $N_{{\cal R}_{4}} \subseteq F^{\prime}_{\Omega} \cap \gamma_{4}(F_{n+1})$. For a positive integer $c$, let $N_{{\cal R}_{4},c} = N_{{\cal R}_{4}} \cap \gamma_{c}(F_{n+1})$. For $c \in [4]$, $N_{{\cal R}_{4},c} = N_{{\cal R}_{4}}$. For $c \geq 4$, we write $I_{c}(N_{{\cal R}_{4}}) = (N_{{\cal R}_{4},c} \gamma_{c+1}(F_{n+1}))/\gamma_{c+1}(F_{n+1})$. Form the (restricted) direct sum ${\cal L}(N_{{\cal R}_{4}})$ of the abelian groups $I_{c}(N_{{\cal R}_{4}})$. Since $N_{{\cal R}_{4},c} \subseteq F_{{\Omega},c}$ for all $c$, we have ${\cal L}(N_{{\cal R}_{4}})$ is a Lie subalgebra of ${\cal L}(F_{\Omega})$. Since $N_{{\cal R}_{4}}$ is a normal subgroup of $F_{\Omega}$, we obtain ${\cal L}(N_{{\cal R}_{4}})$ is an ideal of ${\cal L}(F_{\Omega})$. Let $I_{\Omega}$ be the ideal of ${\cal L}(F_{\Omega}) = L(\Omega)$ generated by the set ${\cal R}_{4,L} = \{[\omega_{a},\omega_{b}]: (a,b) \in \theta_{n,\delta}\}$. For $\mu \geq 1$ and non-negative integers $j(1), \ldots, j(\mu)$, with $j(1) + \cdots + j(\mu) = c \geq 1$, let $Y_{{\cal R}_{4},(j(1), \ldots, j(\mu))} =$ $[X_{{\cal R}_{4}}, Y_{j(1)}, \ldots, Y_{j(\mu)}]$, with $Y_{j(i)} \in \{X, F_{\Omega_{0}}\}$, $i \in [\mu]$, $j(1), \ldots, j(\mu) \in [2]$, and at least one of $Y_{j(1)}, \ldots, Y_{j(\mu)}$ equals $X$. Moreover, let $Y_{{\cal R}_{4},{\rm grad},c} = \prod_{j(1) + \cdots + j(\mu) = c} Y_{{\cal R}_{4},(j(1), \ldots, j(\mu))}$. We point out that $F_{\Omega}/N_{{\cal R}_{4}}$ is raag. \begin{proposition}\label{pro7.7} With the previous notations, ${\rm gr}(F_{\Omega}/N_{{\cal R}_{4}}) \cong {\cal L}(F_{\Omega})/{\cal L}(N_{{\cal R}_{4}})$ as Lie algebras in a natural way with ${\cal L}(N_{{\cal R}_{4}}) = I_{\Omega}$. For all non-negative integers $c$, $I_{c+4}(N_{{\cal R}_{4}}) = I^{c+4}_{\Omega}$. If $c = 2 \nu + 1$, then $ I_{2 \nu +5}(N_{{\cal R}_{4}}) = Y_{{\cal R}_{4},{\rm grad}, 2 \nu + 1}\gamma_{2 \nu + 6}(F_{n+1})/\gamma_{2 \nu + 6}(F_{n+1})$ and, if $c = 2 \nu$, then $ I_{2 \nu +4}(N_{{\cal R}_{4}}) = ([F_{\Omega_{0}}]_{X_{{\cal R}_{4}},\nu}~ Y_{{\cal R}_{4},{\rm grad}, 2\nu})\gamma_{2 \nu + 5}(F_{n+1})/\gamma_{2 \nu + 5}(F_{n+1})$. \end{proposition} {\em Proof.\ } Since ${\cal R}_{4,L} \subset I_{4}(N_{{\cal R}_{4}})$ and ${\cal L}(N_{{\cal R}_{4}})$ is an ideal of ${\cal L}(F_{\Omega})$, we have $I_{\Omega} \subseteq {\cal L}(N_{{\cal R}_{4}})$. Thus, for any positive integer $d$, with $d \geq 4$, $I^{d}_{\Omega} \subseteq I_{d}(N_{{\cal R}_{4}})$. As in Section \ref{subsec5.2} (taking $I_{\Omega}$ for $J \cap L(\Omega)$ and having in mind Proposition \ref{pr5.3}~(4)), we may show that $I_{\Omega}$ is a direct summand of ${\cal L}(F_{\Omega}) = L(\Omega)$ (by using $(4.13)$, $(4.14)$, $(4.16)$ and $(4.18)$) and so, ${\cal L}(F_{\Omega})/I_{\Omega}$ is a free $\mathbb{Z}$-module. By Theorem \ref{th4.4} (for $I_{m} = I_{\Omega}$ and ${\cal Y}_{m} = \{s\} \cup \Omega_{0}$), the $\mathbb{Z}$-module $I_{\Omega}/[I_{\Omega}, I_{\Omega}]$ is a free (right) $U({\cal L}(F_{\Omega})/I_{\Omega})$-module with a free generating set ${\cal R}_{4,L}+[I_{\Omega}, I_{\Omega}]$. By a result of Labute \cite[Theorem 1]{labu}, ${\rm gr}(F_{\Omega}/N_{{\cal R}_{4}}) \cong {\cal L}(F_{\Omega})/I_{\Omega}$ as Lie algebras. In the proof of Theorem 1 in \cite{labu}, since $I_{\Omega}/[I_{\Omega}, I_{\Omega}]$ is a free (right) $U({\cal L}(F_{\Omega})/I_{\Omega})$-module, the induced homomorphism $\xi$ (Lemma \ref{le6.7} for $N = N_{{\cal R}_{4}}$ and $I = I_{\Omega}$) is onto and so, ${\cal L}(N_{{\cal R}_{4}}) = I_{\Omega}$. Hence, for all $d \geq 4$, $I_{d}(N_{{\cal R}_{4}}) = I^{d}_{\Omega}$. For a non-negative integer $c$, $[F_{\Omega_{0}}]_{X_{{\cal R}_{4},c}} \subseteq N_{{\cal R}_{4},2c+4} = N_{{\cal R}_{4}} \cap \gamma_{2c+4}(F_{n+1})$ and so, $$ ([F_{\Omega_{0}}]_{X_{{\cal R}_{4},c}}\gamma_{2c+5}(F_{n+1}))/\gamma_{2c+5}(F_{n+1}) \subseteq I_{2c+4}(N_{{\cal R}_{4}}) = I^{2c+4}_{\Omega}. \eqno (6.12) $$ Since $Y_{{\cal R}_{4},{\rm grad},c} \subseteq N_{{\cal R}_{4},c+4} = N_{{\cal R}_{4}} \cap \gamma_{c+4}(F_{n+1})$ for all $c \geq 1$, we have $$ (Y_{{\cal R}_{4},{\rm grad},c}\gamma_{c+5}(F_{n+1}))/\gamma_{c+5}(F_{n+1}) \subseteq I_{c+4}(N_{{\cal R}_{4}}) = I^{c+4}_{\Omega}. \eqno (6.13) $$ In section \ref{subsec5.2}, we gave a decomposition of $I_{\Omega}$ (by $(4.17)$ and $(4.18)$). In particular, for $d \geq 4$, $$ I^{d}_{\Omega} = L^{d}(\Omega^{(1)}_{2}) \oplus L^{d}_{\rm grad}({\cal P}^{\prime}_{{\Omega_{2},1,2}} \wr {\cal P}^{\prime \prime}_{{\Omega}_{2}}) \oplus \cdots \oplus L^{d}_{\rm grad}({\cal P}^{\prime}_{{\Omega_{n-1},1,2}} \wr {\cal P}^{\prime \prime}_{{\Omega}_{n-1}}) \oplus L^{d}_{\rm grad}({\cal P}^{\prime}_{{\Omega_{0}}} \wr {\cal P}^{\prime \prime}_{{\Omega}_{0}}), \eqno (6.14) $$ where $\Omega^{(1)}_{2} = \{[\omega_{2}, \omega_{1}, ~_{a}\omega_{1}, ~_{b}\omega_{2}]: a + b \geq 0\}$. That is, $\Omega^{(1)}_{2}$ is the standard free generating set for $\gamma_{2}(L(\Omega_{2}))$. It follows, by $(6.12)$ (for $c = 0$) and $(6.14)$ (for $d = 4$), that $I_{4}(N_{{\cal R}_{4}}) = I^{4}_{\Omega} = \langle {\cal R}_{4,L} \rangle$. Thus, we may assume that $d \geq 5$. Write $d = c + 4$, with $c \geq 1$. Let $c = 2 \nu + 1$. By $(6.14)$, the definitions of the sets ${\cal P}^{\prime \prime}_{{\Omega_{2}, \omega_{3}}}, \ldots,$ ${\cal P}^{\prime \prime}_{{\Omega_{n-1}, \omega_{n}}}$, ${\cal P}^{\prime}_{{\Omega_{2},1,2}} \wr {\cal P}^{\prime \prime}_{{\Omega}_{2}}, \ldots,$ ${\cal P}^{\prime}_{{\Omega_{n-1},1,2}} \wr {\cal P}^{\prime \prime}_{{\Omega}_{n-1}}$, ${\cal P}^{\prime}_{{\Omega_{0}}} \wr {\cal P}^{\prime \prime}_{{\Omega}_{0}}$, Lemma \ref{le6.5}~(1) and the Jacobi identity in the form $[x,[y,z]] = [x,y,z] - [x,z,y]$ (where it is needed), we have $ I_{2 \nu +5}(N_{{\cal R}_{4}}) \subseteq Y_{{\cal R}_{4},{\rm grad}, 2 \nu + 1}\gamma_{2 \nu + 6}(F_{n+1})/\gamma_{2 \nu + 6}(F_{n+1})$. By $(6.13)$ (for $c = 2 \nu +1$), we get $ I_{2 \nu +5}(N_{{\cal R}_{4}}) = Y_{{\cal R}_{4},{\rm grad}, 2 \nu + 1}~\gamma_{2 \nu + 6}(F_{n+1})/\gamma_{2 \nu + 6}(F_{n+1})$. Let $c = 2 \nu$. By using similar arguments as above and by $(6.12)$ and $(6.13)$, we obtain $ I_{2 \nu +4}(N_{{\cal R}_{4}}) = ([F_{\Omega_{0}}]_{X_{{\cal R}_{4}},\nu}~~ Y_{{\cal R}_{4},{\rm grad}, 2\nu})\gamma_{2 \nu + 5}(F_{n+1})/\gamma_{2 \nu + 5}(F_{n+1})$. \hfill $\Box$ \subsection{Proof of Theorem \ref{mth}}\label{subsec7.4} \subsubsection{A presentation of ${\rm gr}(FP(H))$} For $j \in [4] \setminus \{1\}$, let $H_{j}$ be the subgroup of $F_{n+1}$ generated by the set ${\cal R}_{j}$ and $H$ be the subgroup of $F_{n+1}$ generated by the set ${\cal R}$. It follows, by Lemma \ref{le6.5} (for $G = F_{n+1}$, ${\cal G} = {\cal F} = \{x_{1}, \ldots, x_{n}, t\}$, ${\cal S} = {\cal R}$ and $N_{\cal S} = N$), that $N = H[H,F_{n+1}]$. For $j \in [4] \setminus \{1\}$, let ${\cal H}_{j,n+1}$ be the set $\{[r,z^{\varepsilon_{1}}_{1}, \ldots, z^{\varepsilon_{\kappa}}_{\kappa}]: r \in {\cal R}_{j}; \kappa \geq 1; \varepsilon_{i} = \pm 1; i \in [\kappa]; z_{1}, \ldots, z_{\kappa} \in {\cal F}\}$. By Lemma \ref{le6.5}~(2), the set ${\cal R}_{j} \cup {\cal H}_{j,n+1}$ is a generating set for $H_{j}[H_{j},F_{n+1}]$. In other words, $H_{j}[H_{j},F_{n+1}]$ is the normal closure of ${\cal R}_{j}$ in $F_{n+1}$. \begin{lemma}\label{le7.7} \begin{enumerate} \item Let $N = {\cal R}^{F_{n+1}}$ be the normal closure of ${\cal R}$ in $F_{n+1}$. Then, $$ N = H [H_{2},F_{n+1}] [H_{3},F_{n+1}] [H_{4},F_{n+1}]. $$ \item For $v = [r, z^{\varepsilon_{1}}_{1}, \ldots, z^{\varepsilon_{\kappa}}_{\kappa}]$ with $r \in {\cal R}_{2}$, $\kappa \geq 1$, $\varepsilon_{i} = \pm 1$, $i \in [\kappa]$ and at least one of $z_{1}, \ldots, z_{\kappa}$ is $t$, we have $v\gamma_{\kappa + 3}(F_{n+1}) \in I_{\kappa + 2}(N_{{\cal R}_{3}})$. Otherwise, $v\gamma_{\kappa + 3}(F_{n+1}) \in I_{\kappa + 2}(N_{{\cal R}_{2}})$. \item For $v = [r, z^{\varepsilon_{1}}_{1}, \ldots, z^{\varepsilon_{\kappa}}_{\kappa}]$ with $r \in {\cal R}_{4}$, $\kappa \geq 1$, $\varepsilon_{i} = \pm 1$, $i \in [\kappa]$ and $z_{1}, \ldots, z_{\kappa} \in {\cal F}$, we have $v\gamma_{\kappa + 5}(F_{n+1}) \in I_{\kappa + 4}(N_{{\cal R}_{4}}) \oplus I_{\kappa + 4}(N_{{\cal R}_{3}})$. \end{enumerate} \end{lemma} {\em Proof.\ } \begin{enumerate} \item It is enough to show that $[H,F_{n+1}] \subseteq [H_{2},F_{n+1}] [H_{3},F_{n+1}] [H_{4},F_{n+1}]$. By using the identities $[ab,c] = [a,c][a,c,b][b,c]$, $[a,bc] = [a,c][a,b][a,b,c]$ and Lemma \ref{le6.5}~(1), we have $N = H [H_{2},F_{n+1}] [H_{3},F_{n+1}] [H_{4},F_{n+1}]$. \item Clearly, $v \gamma_{\kappa + 3}(F_{n+1}) = [r, z_{1}, \ldots, z_{\kappa}]^{\varepsilon}\gamma_{\kappa + 3}(F_{n+1})$, with $\varepsilon = \pm 1$. Without loss the generality, we may assume $v = [r, z_{1}, \ldots, z_{\kappa}]$, with $r \in {\cal R}_{2}$ and $z_{1}, \ldots, z_{\kappa} \in {\cal F}$. In the next few lines, we consider the word $z_{1} \cdots z_{\kappa}$ as the $\kappa$-tuple $(z_{1}, \ldots, z_{\kappa})$. Let $1 \leq i_{1} < \cdots < i_{\nu} \leq \kappa$ be the $\nu$ different positions of $t$ in the $\kappa$-tuple $(z_{1}, \ldots, z_{\kappa})$. By our hypothesis, $\nu \geq 1$. Put $v(0) = [r,z_{1}, \ldots, z_{i_{1}-1}]$ with $z_{1}, \ldots, z_{i_{1}-1} \in {\cal X}$. Note that, for $i_{1} = 1$, $v(0) = r$. By Lemma \ref{le6.5}~(1)$(e)$ and, working modulo $\gamma_{\kappa + 3}(F_{n+1})$, $$ \begin{array}{rll} v & = & -[[t, v(0)], z_{i_{1}+1}, \ldots, z_{\kappa}] \\ & & \\ & = & \sum^{i_{1}-1}_{\lambda = 0}(\sum_{\sigma \in S_{i_{1}-1,\lambda}}(-1)^{\lambda + 1}[t, z_{\sigma(1)}, \ldots, z_{\sigma(i_{1}-1)}, z_{i_{1}+1}, \ldots, z_{\kappa}]). \end{array} $$ We point out that $r$ occurs in the word $z_{\sigma(1)} \cdots, z_{\sigma(i_{1}-1)}$. By Lemma \ref{le6.5}~(1)$(d)$ (Jacobi identity), each of the above group commutators belongs to $[F_{n+1}]_{X_{{\cal R}_{3},\kappa - 1}}$. By Proposition \ref{pro7.6a}, we have $v \gamma_{\kappa + 3}(F_{n+1}) \in I_{\kappa + 2}(N_{{\cal R}_{3}})$. Otherwise, by Proposition \ref{pro7.5}, we have $v\gamma_{\kappa + 3}(F_{n+1}) \in I_{\kappa + 2}(N_{{\cal R}_{2}})$. \item We proceed as above. Without loss of generality, we may assume $v = [r, z_{1}, \ldots, z_{\kappa}]$, with $r \in {\cal R}_{4}$ and $z_{1}, \ldots, z_{\kappa} \in {\cal F}$. We separate two cases. First, we assume that $z_{1}, \ldots, z_{\kappa} \in {\cal X}$. Since $[[t,x_{a}],z], [[t,x_{b}],z] \in {\cal R}_{3}$ for all $r = [[t,x_{a}], [t,x_{b}]]$, with $(a,b) \in \theta_{n,\delta}$, and $z \in {\cal X}$, we have $v\gamma_{\kappa + 5}(F_{n+1}) \in I_{\kappa + 4}(N_{{\cal R}_{3}})$. Thus, we assume that at least one of $z_{1}, \ldots, z_{\kappa}$ is $t$. Let $1 \leq i_{1} < \cdots < i_{\nu} \leq \kappa$ be the $\nu$ different positions of $t$ in the $\kappa$-tuple $(z_{1}, \ldots, z_{\kappa})$. By our hypothesis, $\nu \geq 1$. If $i_{1} \geq 2$, then, $z_{1} \in {\cal X}$ and so, by using the above argument, we get $v\gamma_{\kappa + 5}(F_{n+1}) \in I_{\kappa + 4}(N_{{\cal R}_{3}})$. Therefore, $z_{1} = t$. By working modulo $I_{\kappa + 4}(N_{{\cal R}_{3}})$, using the Jacobi identity in the form $[x,y,z] = [x,z,y] + [x,[y,z]]$ as many times as needed and by Proposition \ref{pro7.7}, we obtain $v\gamma_{\kappa + 5}(F_{n+1}) \in I_{\kappa + 4}(N_{{\cal R}_{4}}) \oplus I_{\kappa + 4}(N_{{\cal R}_{3}})$. Thus, in any case, $v\gamma_{\kappa + 5}(F_{n+1}) \in I_{\kappa + 4}(N_{{\cal R}_{4}}) \oplus I_{\kappa + 4}(N_{{\cal R}_{3}})$. \end{enumerate} \begin{proposition}\label{pro7.8} With the previous notations, \begin{enumerate} \item ${\cal L}(N) = J_{N}$. \item $\rm gr(FP(H))={\rm gr}(F_{n+1}/N) \cong {\rm gr}(F_{n+1})/J_{N}$ as Lie algebras. \end{enumerate} \end{proposition} {\em Proof.\ } \begin{enumerate} \item Write ${\cal L} = {\cal L}_{\cal Y}(N_{{\cal R}_{2}}) + {\cal L}(N_{{\cal R}_{4}}) + {\cal L}(N_{{\cal R}_{3}})$. By Propositions \ref{pro7.5}, \ref{pro7.7}, \ref{pro7.5a}~(2) and by $(6.4)$, we have ${\cal L}$ is the additive direct sum of the Lie subalgebras ${\cal L}_{\cal Y}(N_{{\cal R}_{2}})$, ${\cal L}(N_{{\cal R}_{4}})$ and ${\cal L}(N_{{\cal R}_{3}})$ of ${\rm gr}(F_{n+1})$, and ${\cal L} = J_{N}$. Hence, ${\cal L}$ is the ideal of ${\rm gr}(F_{n+1})$ generated by the set ${\cal R}_{L}$. Since ${\cal R}_{L} \subset I_{2}(N) \oplus I_{3}(N) \oplus I_{4}(N)$ and ${\cal L}(N)$ is an ideal of ${\rm gr}(F_{n+1})$, we have $J_{N} \subseteq {\cal L}(N)$. Suppose that there exists $d \in \mathbb{N}$ such that $J^{d}_{N} \nsubseteqq I_{d}(N)$ and $J^{s}_{N} = I_{s}(N)$ for all $s \leq d-1$. It is clear enough that $d \geq 5$. Thus, there exists $u \in N_{d} = N \cap \gamma_{d}(F_{n+1})$ such that $u\gamma_{d+1}(F_{n+1}) \notin J^{d}_{N}$ and so, $u \notin \gamma_{d+1}(F_{n+1})$. It is easily seen that $[H_{j},F_{n+1}] \subseteq \gamma_{j+1}(F_{n+1})$ for $j \in [4] \setminus \{1\}$. By Lemma \ref{le7.7}~(1), every element $u \in N \setminus \{1\}$ is written as $u = h h_{2} h_{3} h_{4}$ with $h \in H$ and $h_{j} \in [H_{j},F_{n+1}]$, $j \in [4] \setminus \{1\}$. Using the identity $ab = ba[a,b]$ as many times as needed in the above expression of $u$ and working in $F_{n+1,d}$, the element $\overline{u} = u \gamma_{d+1}(F_{n+1})$ is written in $F_{n+1,d}$ as a product $\overline{w}_{2}\overline{w}_{3} \cdots \overline{w}_{\nu}$, where each $w_{j}$ is of weight $j$ in $F_{n+1}$ and it is a product of group commutators in elements of ${\cal R} \cup (\bigcup_{j \in [4] \setminus \{1\}}{\cal H}_{j,n+1})$. Thus, for example, $\overline{w}_{2}$ is a product of $[x_{a},x_{b}]$, $(a,b) \in \theta_{n,\delta}$. As in the proof of Proposition \ref{pro7.6a}, $\overline{u}$ is written in ${\rm gr}(F_{n+1,d})$ as $\overline{u} = \overline{w}_{2}\gamma_{3}(F_{n+1,d}) + \overline{w}_{3}\gamma_{4}(F_{n+1,d}) + \cdots + \overline{w}_{d-1}\gamma_{d}(F_{n+1,d}) + w_{d}$. Since $u \in \gamma_{d}(F_{n+1}) \setminus \gamma_{d+1}(F_{n+1})$, that is, $\overline{u} \in \gamma_{d}(F_{n+1,d})$ (a non-trivial element in $F_{n+1,d}$), we get $\overline{u} = \overline{w}_{d}$. Therefore, by working modulo $\gamma_{d+1}(F_{n+1})$, $u = \prod u_{\mu}$ is a product of group commutators of weight $d$ in $F_{n+1}$ where in each $u_{\mu}$ at least one element of ${\cal R}$ occurs. We claim that $\overline{u} = \overline{u}_{2} + \overline{u}_{4} + \overline{u}_{3}$, where $\overline{u}_{j} \in I_{d}(N_{{\cal R}_{j}})$, $j \in [4] \setminus \{1\}$. We point out that if $r \in {\cal R}_{3} \cup {\cal H}_{3,n+1}$ occurs in $u_{\mu}$ for some $\mu$, then, by Proposition \ref{pro7.5a}, $u_{\mu} \in I_{d}(N_{{\cal R}_{3}})$. For some $\mu$, let $u_{\mu} = w(a_{1}, \ldots, a_{\lambda}) \in {\rm gr}_{d}(F_{n+1})$ with $a_{1}, \ldots, a_{\lambda} \in {\cal R}_{2} \cup {\cal R}_{4} \cup {\cal H}_{2,n+1} \cup {\cal H}_{4,n+1}$. By using the Jacobi identity as many as needed and by Lemma \ref{le7.7}~(2)-(3), we get $u_{\mu} \in I_{d}(N_{{\cal R}_{4}}) \oplus I_{d}(N_{{\cal R}_{3}})$. Therefore, $\overline{u} = \overline{u}_{2} + \overline{u}_{4} + \overline{u}_{3}$, where $\overline{u}_{j} \in I_{d}(N_{{\cal R}_{j}})$, $j [4] \setminus \{1\}$. By $(6.4)$, Propositions \ref{pro7.5}, \ref{pro7.5a}~(2) and \ref{pro7.7}, we obtain $\overline{u} \in J^{d}_{N}$ which is the required contradiction. Thus, for all $d \geq 2$, $J^{d}_{N} = I_{d}(N)$ and so, ${\cal L}(N) = J_{N}$. \item Write $G = F_{n+1}/N$. Since $N \subseteq F^{\prime}_{n+1}$, we have $G/G^{\prime} \cong F_{n+1}/F^{\prime}_{n+1}$ and ${\rm gr}(G)$ is generated as a Lie algebra by the set ${\cal G}^{\prime} = \{\alpha_{i}, b: i \in [n]\}$ where $\alpha_{i} = x_{i}G^{\prime}$, $i \in [n]$, and $b = tG^{\prime}$. Since ${\rm gr}(F_{n+1})$ is free on the set ${\cal A} = \{y_{1}, \ldots, y_{n}, s\}$, where $y_{i} = x_{i}F^{\prime}_{n+1}$, $i \in [n]$ and $s = tF^{\prime}_{n+1}$, the map $\zeta$ from ${\rm gr}(F_{n+1})$ into ${\rm gr}(G)$ satisfying the conditions $\zeta(y_{i}) = \alpha_{i}$, $i \in [n]$, and $\zeta(s) = b$, extends uniquely to a Lie algebra homomorphism. Since ${\rm gr}(G)$ is generated as a Lie algebra by the set ${\cal G}^{\prime}$, we have $\zeta$ is onto. Hence, ${\rm gr}(F_{n+1})/{\rm Ker}\zeta \cong {\rm gr}(G)$ as Lie algebras. By definition, $J_{N} \subseteq {\rm Ker}\zeta$ and so, $\zeta$ induces a Lie algebra epimorphism $\overline{\zeta}$ from ${\rm gr}(F_{n+1})/J_{N}$ onto ${\rm gr}(G)$. In particular, $\overline{\zeta}$ induces $\overline{\zeta}_{d}$, say, a $\mathbb{Z}$-linear mapping from $({\rm gr}_{d}(F_{n+1}) + J_{N})/J_{N}$ onto ${\rm gr}_{d}(G) = \gamma_{d}(G)/\gamma_{d+1}(G)$. For $d \geq 2$, $$ \begin{array}{rll} {\rm gr}_{d}(G) & \cong & (\gamma_{d}(F_{n+1}) \gamma_{d+1}(F_{n+1})N)/(\gamma_{d+1}(F_{n+1})N) \\ & & \\ & \cong & \gamma_{d}(F_{n+1})/(\gamma_{d}(F_{n+1}) \cap (\gamma_{d+1}(F_{n+1})N)). \end{array} $$ Since $\gamma_{d+1}(F_{n+1}) \subseteq \gamma_{d}(F_{n+1})$, we have, by the modular law, $$ \gamma_{d}(F_{n+1})/(\gamma_{d}(F_{n+1}) \cap (\gamma_{d+1}(F_{n+1})N)) = \gamma_{d}(F_{n+1})/(\gamma_{d+1}(F_{n+1})N_{d}) \cong {\rm gr}_{d}(F_{n+1})/I_{d}(N_{d}). $$ For $d \geq 2$, and in the view of Proposition \ref{pro7.8}~(1), we have $I_{d}(N) = J^{d}_{N}$ and so, we get ${\rm rank}({\rm gr}_{d}(G)) = {\rm rank}({\rm gr}_{d}(F_{n+1})/J^{d}_{N})$. Since $J_{N} = \bigoplus_{d \geq 2}J^{d}_{N}$, we have $$ \begin{array}{rll} ({\rm gr}_{d}(F_{n+1}) + J_{N})/J_{N} & \cong & {\rm gr}_{d}(F_{n+1})/({\rm gr}_{d}(F_{n+1}) \cap J_{N}) \\ & & \\ & = & {\rm gr}_{d}(F_{n+1})/J^{d}_{N}. \end{array} $$ By Theorem \ref{th5.4}, we obtain ${\rm Ker}\overline{\zeta}_{d}$ is torsion-free. Since ${\rm rank}({\rm gr}_{d}(G)) = {\rm rank}({\rm gr}_{d}(F_{n+1})/J^{d}_{N})$, we have ${\rm Ker}\overline{\zeta}_{d} = \{1\}$ and so, $\overline{\zeta}_{d}$ is an isomorphism. Since $\overline{\zeta}$ is an epimorphism and each $\overline{\zeta}_{d}$ is isomorphism, we have $\overline{\zeta}$ is a Lie algebra isomorphism. Hence, we have the required result. \hfill $\Box$ \end{enumerate} \begin{corollary}\label{cor7.3}With the previous notations, $$\rm gr(FP(H))={\rm gr}(F_{n+1}/N) \cong {\rm gr}(F_{n}/N_{{\cal R}_{2}}) \oplus {\rm gr}(F_{\Omega}/N_{{\cal R}_{4}})$$ as $\mathbb{Z}$-modules. \end{corollary} {\em Proof.\ } By Proposition \ref{pro7.5}, Proposition \ref{pro7.7} and by $(6.5)$, we obtain the desired result.~\hfill $\Box$ \subsubsection{$F_{n+1}/N$ is residually nilpotent} Let $\chi_{n}$ be the natural epimorphism from $F_{n+1}$ onto $F_{n}$ satisfying the conditions $\chi_{n}(x_{i}) = x_{i}$, $i \in [n]$, and $\chi_{n}(t) = 1$. Note that ${\rm Ker}\chi_{n} = N_{t}$, the normal closure of $\{t\}$ in $F_{n+1}$. By Proposition \ref{pr6.4}~(1), $F_{n+1}$ is the semidirect product of $N_{t}$ by $F_{n}$. Let $\pi_{F}$ be the natural epimorphism from $F_{n}$ onto $F_{n}/N_{{\cal R}_{2}}$. By the definitions of ${\rm Ker}(\pi_{F} \chi_{n})$ and $N_{t}N_{{\cal R}_{2}}$, we have ${\rm Ker}(\pi_{F} \chi_{n}) = N_{t} N_{{\cal R}_{2}}$. Hence, $F_{n+1}/N_{t}N_{{\cal R}_{2}} \cong F_{n}/N_{{\cal R}_{2}}$. By a result of Duchamp and Krob \cite{dk2}, $F_{n}/N_{{\cal R}_{2}}$ is residually nilpotent. For $j \in [4] \setminus \{1\}$, let $N_{{\cal R}_{j},\theta}$ be the normal closure of ${\cal R}_{j}$ in $F_{n+1}$. By Lemma \ref{le7.7}~(1) and Lemma \ref{le6.5}~(1)$(a)$, we get $N = N_{{\cal R}_{2},\theta} N_{{\cal R}_{3},\theta} N_{{\cal R}_{4},\theta}$. We claim that $N \subseteq N_{t} N_{{\cal R}_{2}}$. Indeed, it is enough to show that $N_{{\cal R}_{2},\theta} \subseteq N_{t} N_{{\cal R}_{2}}$. Furthermore, it is enough to show that $w^{-1}[x_{a},x_{b}]w \in N_{t} N_{{\cal R}_{2}}$ for all $w \in F_{n+1}$ and $(a, b) \in \theta_{n,\delta}$. By writing $w^{-1}[x_{a},x_{b}]w = [x_{a},x_{b}] [[x_{a},x_{b}],w]$ and the definitions of $N_{t}$ and $N_{{\cal R}_{2}}$, we obtain the required result. In the next few lines, let $G = F_{n+1}/N$ and $H = N_{t}N_{{\cal R}_{2}}$. Since $N \subseteq F^{\prime}_{n+1}$, we have $G/G^{\prime} \cong F_{n+1}/F^{\prime}_{n+1}$. Let $h = wN \in G$ with $w \notin N$. If $w \notin F^{\prime}_{n+1}$ and since $G/G^{\prime} \cong F_{n+1}/F^{\prime}_{n+1}\cong \mathbb Z^{n+1}$ in a natural way, we get $h \notin G^{\prime}$ and $G/G^{\prime}$ is nilpotent. Thus, we assume that $w \in F^{\prime}_{n+1}$ and so, $h \in G^{\prime}$. The element $w$ is written as a product of group commutators $w(x_{1}, \ldots, x_{n},t)$. We separate two cases. \begin{enumerate} \item Let $w \notin H$. Since $N_{t}$ is normal in $F_{n+1}$, we have $H$ contains some group commutator $w(x_{1}, \ldots, x_{n},t)$, occurring in the product of $w$, having the letter $t$. Hence, $w ~{\rm modulo}~H$ is a product of group commutators $w(x_{1}, \ldots, x_{n})$. Set $w_{1} = \prod w(x_{1}, \ldots, x_{n})$ and so, $ w = w_{1}h_{t}h_{2}$ with $h_{t} \in N_{t}$ and $h_{2} \in N_{{\cal R}_{2}}$. Note that $wH = w_{1}H$ and $w_{1} \notin H$. Now, $\pi_{F} \chi_{n}(w) = \pi_{F}(w_{1}h_{2}) = w_{1} N_{{\cal R}_{2}}$. Since $F_{n}/N_{{\cal R}_{2}}$ is residually nilpotent and $w_{1} \notin N_{{\cal R}_{2}}$ (otherwise, $w \in H$ which is a contradiction), there exists a normal subgroup $\Lambda_{w}/N_{{\cal R}_{2}}$, with $\Lambda_{w}$ normal in $F_{n}$, such that $w_{1} \notin \Lambda_{w}$ and $F_{n}/\Lambda_{w}$ is nilpotent. Let $K_{w} = (\pi_{F} \chi_{n})^{-1}(\Lambda_{w}/N_{{\cal R}_{2}})$. Since $\pi_{F} \chi_{n}$ is epimorphism, we have $K_{w}$ is a normal subgroup of $F_{n+1}$ and $w \notin K_{w}$ (otherwise, $w_{1}N_{{\cal R}_{2}} \in \Lambda_{w}/N_{{\cal R}_{2}}$. Hence, there exists $w^{\prime}_{1} \in \Lambda_{w}$ such that $w_{1}N_{{\cal R}_{2}} = w^{\prime}_{1}N_{{\cal R}_{2}}$. Since $N_{{\cal R}_{2}} \subseteq \Lambda_{w}$, we get a contradiction). Since $H \subseteq K_{w}$, we get $F_{n+1}/K_{w} \cong F_{n}/\Lambda_{w}$. Since $F_{n}/\Lambda_{w}$ is nilpotent, we obtain $(F_{n+1}/H)/(K_{w}/H)$ is nilpotent. \item Let $w \in H$. Thus, $h = wN = w^{\prime}N$ for some $w^{\prime} \in N_{t}$. So, without loss of generality, we may regard $w \in N_{t}$. Since $N_{t,d} = N_{t} \cap \gamma_{d}(F_{n+1}) \subseteq \gamma_{d}(F_{n+1})$ for all $d \in \mathbb{N}$ and $F_{n+1}$ is residually nilpotent, we get $\bigcap_{d \geq 1}N_{t,d} = \{1\}$. Therefore, there exists $d \in \mathbb{N}$ such that $w \in N_{t,d} \setminus N_{t,d+1}$. Clearly, we may assume that $d \geq 2$. Let $d = 2$. By Proposition \ref{pr6.4}~(2), $w\gamma_{3}(F_{n+1})$ is a non-trivial element of $I_{2}(N_{t}) = F_{\Omega_{0}}\gamma_{3}(F_{n+1})/\gamma_{3}(F_{n+1})$. By Propositions \ref{pro7.5a}~(2) and \ref{pro7.7}, there exists $w_{1} \in F_{\Omega_{0}} \setminus F^{\prime}_{\Omega_{0}}$ and $w_{1}\gamma_{3}(F_{n+1}) \notin I_{2}(N)$ (that is, $w_{1}\gamma_{3}(F_{n+1}) \neq v_{1}\gamma_{3}(F_{n+1})$ for all $v_{1} \in N$) such that $w\gamma_{3}(F_{n+1}) = w_{1} \gamma_{3}(F_{n+1})$. Suppose that $wN \in \gamma_{3}(G)$. Since $\gamma_{3}(G) \cong \gamma_{3}(F_{n+1})/N_{3}$ in a natural way, we have $wN_{3} = hN_{3}$ for some $h \in \gamma_{3}(F_{n+1})$. Hence, $w \in \gamma_{3}(F_{n+1})$, which is a contradiction. Thus, $wN \notin \gamma_{3}(G)$ and $G/\gamma_{3}(G)$ is nilpotent. So, we assume that $d \geq 3$. Clearly, $w\gamma_{d+1}(F_{n+1})$ is a non-trivial element of $I_{d}(N_{t})$. By $(6.6)$, $I_{d}(N_{t}) = L^{d}_{\rm grad}(\Omega) \oplus I_{d}(N_{{\cal R}_{3}})$. By $(6.4)$, Proposition \ref{pro7.5a}~(2) and Proposition \ref{pro7.8}~(1), $I_{d}(N_{{\cal R}_{3}}) \subseteq I_{d}(N)$. We point out that $N_{{\cal R}_{3}} = N_{{\cal R}_{3},\theta}$. By the analysis of $I_{d}(N_{t})$ given in Section \ref{subsec7.3}, Proposition \ref{pro7.6a}, Proposition \ref{pro7.7} and Proposition \ref{pro7.5a}~(2), there exists $w_{2} \in F_{\Omega,d}$ and $w_{2} \gamma_{d+1}(F_{n+1}) \notin I_{d}(N)$ (that is, $w_{2} \gamma_{d+1}(F_{n+1}) \neq v \gamma_{d+1}(F_{n+1})$ for all $v \in N_{d}$) such that $w \gamma_{d+1}(F_{n+1}) = w_{2} \gamma_{d+1}(F_{n+1})$. As before, let $wN \in \gamma_{d+1}(G)$. Since $\gamma_{d+1}(G) \cong \gamma_{d+1}(F_{n+1})/N_{d+1}$ in a natural way, we have $wN_{d+1} = h^{\prime}N_{d+1}$ for some $h^{\prime} \in \gamma_{d+1}(F_{n+1})$, which is a contradiction. Thus, $wN \in \gamma_{d}(G) \setminus \gamma_{d+1}(G)$. Since $G/\gamma_{d+1}(G)$ is nilpotent, we get the required result. Therefore, $F_{n+1}/N$ is residually nilpotent. \hfill $\Box$ \end{enumerate}
\section{Introduction} \label{sec:intro} It was predicted that a hot and dense matter, known as a quark-gluon plasma (QGP), will be formed in relativistic heavy-ion collisions~\cite{RevModPhys.89.035001}. This new state of matter~\cite{Gyulassy:2005,BRAUNMUNZINGER201676,CHEN20181} could have a large angular momentum with the direction perpendicular to the reaction plane in non-central collisions~\cite{PhysRevLett.94.102301,Voloshin:2004ha,PhysRevLett.120.012302}. The angular momentum is conserved during the evolution of the system and may result in spin-orbit coupling among the quarks, which will generate a net polarization of hyperon or vector mesons such as $\Lambda$, $\phi$, $K^*$ and $\rho$ due to the hadronization process~\cite{LIANG200520}. On the other hand, quarks and antiquarks may or may not be produced with an initial global polarization~\cite{PhysRevC.101.031901}. As the QGP approaches the transition to hadrons, the matter becomes strongly interacting due to nonperturbative effects and constitute quarks or antiquarks may approach spin and helicity equilibration with the vorticity~\cite{PhysRevC.101.031901}. Therefore, studying the spin polarization can provide additional dynamical information about the hot and dense matter. The topic is gaining increasing interests both in theory~\cite{PhysRevC.97.034917,PhysRevC.100.064904,PhysRevC.84.054910,PhysRevC.99.044910,Xia:2020tyd,Liang:2019pst} and experiments~\cite{Acharya:2019vpe,Acharya:2019ryw,Adam:2018ivw,STAR:2017ckg, PhysRevC.77.061902,ZHOU2019559}. More details can be found in some of the recent reviews~\cite{FLORKOWSKI2019103709,Liu:2020ymh,Gao:2020}. The spin alignment of a vector meson is described by a $3 \times 3$ Hermitian spin-density matrix with unit trace~\cite{PhysRevC.97.034917}. When the off-diagonal matrix elements are neglected or set to zero, the angular distribution of the decay products with respect to the system angular momentum in the vector meson's rest frame~\cite{SCHILLING1970397} only depends on the 00-component of the matrix element ($\rho_{00}$) as \begin{equation} \label{eq:1} f(\theta^*) \equiv \frac{dN}{d(cos\theta^*)}=N_0 \times [(1-\rho_{00})+(3\rho_{00}-1)cos^2\theta^*]. \end{equation} In the above, $N_0$ is a normalization factor, and $\theta^*$ is the angle between the decayed daughter and the system's orbit angular momentum $\hat{L}$ in the vector meson's rest frame. Experimentally, $\rho_{00}$ can be determined by measuring the angular distribution of Eq.\eqref{eq:1}. One sees that a deviation of the $\rho_{00}$ value from 1/3 means a spin alignment of the vector meson. Measurements of vector meson spin alignments in heavy-ion collisions have been preformed. Results in Au+Au collisions at $\mathrm{\sqrt{s_{NN}}}$=200 GeV were initially consistent with $\rho_{00}$ = 1/3 within uncertainties~\cite{PhysRevC.77.061902} and then show a possible signal with improved event statistics~\cite{ZHOU2019559}. Data in Pb-Pb collisions at $\mathrm{\sqrt{s_{NN}}}$=2.76 TeV show that the $\rho_{00}$ of $K^*$ mesons could be significantly smaller than 1/3 at $p_T<1.0$ GeV/c while the $\rho_{00}$ of $\phi$ mesons is much closer to 1/3~\cite{Acharya:2019vpe}. It is proposed that a strangeness current may exist in heavy-ion collisions and gives rise to a non-vanishing mean $\varphi$ field, which explains in part the $\phi$ meson spin alignment but does not apply to the $K^*$ meson~\cite{Sheng:2019}. The $\rho_{00}$ value could also depend on the quark hadronization process and the possible $p_T$ dependence of vorticity. So far the observed $\rho_{00}$ values of vector mesons have not been fully understood, especially in conjunction with the magnitude of the observed $\Lambda$ global polarization~\cite{Acharya:2019ryw,Adam:2018ivw,STAR:2017ckg,Huang:2020xyr}. Another physics process that may affect the observed $\rho_{00}$ values is hadronic scatterings of the decay products of vector mesons. On the one hand, the decay daughters of $\phi$, $K^*$ and $\rho$ mesons are different and thus have different hadronic interactions. On the other hand, the lifetime of each vector meson species is different. One would expect that the vector meson with a longer lifetime will suffer less from hadronic interactions since their daughters are produced later at lower densities. Therefore we investigate quantitatively the effect of hadronic scatterings on vector meson spin alignments in Pb-Pb collision at $\mathrm{\sqrt{s_{NN}}}$ = 2.76 TeV with the string melting version of a multi-phase transport (AMPT) model~\cite{PhysRevC.72.064901} (unless specified otherwise). The decay channels used in the current study are $\phi \rightarrow K^+ + K^-$, $K^{*} \rightarrow K + \pi$ and $\rho \rightarrow \pi + \pi$ for the three vector meson species, respectively. The paper is organized as follows. The model and methodology are introduced in section~\ref{sec:methodology}. The results on the spin density matrix element $\rho_{00}$ of $\phi$, $K^*$ and $\rho$ before and after hadronic scatterings are presented in section~\ref{sec:final}. A summary is then given in Section~\ref{sec:summary}. \section{Model and methodology} \label{sec:methodology} \begin{figure}[htbp] \vspace*{-0.1in} \includegraphics[scale=0.35]{fig1_lifetime.eps} \captionof{figure}{The normalized decay time distribution of $\phi$, $K^*$ and $\rho$ mesons in the hadronic phase of Pb-Pb collisions at $\mathrm{\sqrt{s_{NN}}}$=2.76 TeV from the AMPT model. $\rho$ mesons decay quickly while $\phi$ mesons have a relative flat distribution after 10 fm/c.} \label{fig:lifetime} \end{figure} \begin{figure} \includegraphics[scale=0.55]{fig2_invmass.eps} \captionof{figure}{The normalized invariant mass distribution of $\rho$, $K^*$, $\phi$ mesons from the AMPT model. In each panel the invariant mass is reconstructed by the decay channel as shown before (filled symbols) or after (open symbols) hadron scatterings. Open symbols in panels (b), (d) and (f) represent the distributions after removing those resonances that have a decay daughter with momentum change more than $0.01$ GeV/$c$ due to hadronic scatterings.} \label{fig:InvMass} \end{figure} The AMPT model is a multi-phase transport model~\cite{PhysRevC.72.064901} for studying heavy-ion collisions. In this model, the initial conditions are taken from the spatial and momentum distributions of minijet partons and soft string excitations from the HIJING event generator~\cite{PhysRevD.44.3501}, which is followed by two-body elastic parton scatterings using the parton cascade model ZPC~\cite{ZHANG1998193}; the conversion from partons to hadrons via either the string fragmentation~\cite{SJOSTRAND199474} for the default version or a quark coalescence model for the string melting version ~\cite{Lin:2001zk,He:2017tla}, and hadronic scatterings based on an extended relativistic transport model ART~\cite{PhysRevC.52.2037}. Since the spin degree of freedom is not considered in the current AMPT model, to simulate a spin alignment signal we redistribute the decay products according to Eq.\eqref{eq:1} when resonances decay~\cite{LAN2018319} and then study the hadronic scattering effect on vector meson spin alignment with different input $\rho_{00}$ values in this work. For hadronic interactions, the extended ART model includes baryon-baryon, baryon-meson, and meson-meson elastic and inelastic scatterings~\cite{PhysRevC.72.064901}. In general, the cross sections of elastic or inelastic scatterings depend on the center of mass energy of the scattered hadrons. Therefore hadrons at different momentum have different cross sections, which may contribute to the $p_T$ dependence of the observed $\rho_{00}$ value of vector mesons. As the global vorticity is expected to peak at semi-central collisions~\cite{PhysRevLett.94.102301}, we choose the impact parameter $b$=8 fm to mimic such collisions in this study. A decay daughter that has a large transverse momentum is more likely to come from a parent hadron with a large transverse momentum. When one measures the $p_T$ dependence of vector meson spin alignment, it will be influenced by the $p_T$ dependent hadronic interactions. In addition, the decay times of $\phi$, $K^*$ and $\rho$ mesons are different as illustrated in Fig.~\ref{fig:lifetime}. The $\rho$ meson has the shortest lifetime, therefore we expect it to be affected most strongly by the hadronic scatterings. However, the $\phi$ meson is expected to be less affected due to its long lifetime. Furthermore, pions as the decay products of $\rho$ meson are expected to be scattered more frequently than kaons as the decay products of $\phi$ meson. Since the $K^*$ meson has a moderate lifetime with kaon and pion as the decay products, one would expect it to be moderately affected by hadronic scatterings. Therefore it is worthwhile to quantify how much hadron scatterings could affect the final spin alignment results of different vector mesons. In experiments one uses the $n$-th event plane ($n=1, 2$) to estimate the direction of the system's orbital angular momentum $\hat{L}$. In this paper, we calculate the direction of $\hat{L}$ with participant nucleons in each event. The decay daughters from the aforementioned channels of interest are labelled so that we know explicitly which two decay daughters have come from the same parent hadron. The phase space information of the decay daughters is also recorded when the decay happens, which enables us to distinguish whether a decay product has experienced scatterings or not by comparing the momentum information upon decay with that after the hadron cascade. When a decay daughter is destroyed due to a subsequent inelastic scattering, naturally the parent meson cannot be reconstructed from the final hadron record. In addition, experiments usually reconstruct non-stable vector mesons via the invariant mass distribution of the candidate decay daughters, where the invariant mass window is determined by the vector meson physical width in convolution with the detector momentum resolutions~\cite{Acharya:2019vpe,PhysRevC.77.061902}. As a result, a parent meson with any decay daughter having subsequent elastic scattering(s) will likely not be reconstructed with the experimental method of background subtraction within the invariant mass window. Therefore, in the selection procedure of this study we remove a resonance if it has a decay daughter with a momentum change more than $0.01$ GeV/c due to elastic scattering(s). Figure~\ref{fig:InvMass} shows the normalized invariant mass distributions of the vector mesons reconstructed via their decay products before and after the selection procedure as described above. It shows in panels (a), (c) and (e) that the hadronic scatterings change the shape of the reconstructed invariant mass distributions. The degrees of change are different for $\phi$, $K^*$ and $\rho$ mesons, where the $\rho$ meson distribution changes most significantly as expected while the $\phi$ meson distribution has little change. After the selection procedure where vector mesons with scattered decay daughters are removed, the distributions after hadronic scatterings, as shown in panels (b), (d) and (f), are similar to those before hadronic scatterings. The decay daughters that have passed the selection procedure are then used in our analysis of the vector meson spin alignment. Note that the distributions of Fig.~\ref{fig:InvMass} with different momentum difference cuts have been checked and similar results are obtained. \section{Results and discussion} \label{sec:final} It has been pointed out that a finite acceptance in experiments will lead to an increase of the observed $\rho_{00}$ as the range of pseudorapidity $\rm -\eta_{max} < \eta < \rm \eta_{max}$ is small ~\cite{LAN2018319}, where $\rm \eta_{max}$ denotes the maximum $|\eta|$ of decay daughters. To focus on the hadronic scattering effect, we first correct for the acceptance effect. When the effect of hadron scatterings is neglected, we can write the decay daughter distribution in the vector meson rest frame within a specific kinematic window as \begin{eqnarray} \label{eq:2} \rm f_{obs}(\theta^*, \rho_{00}^{in}, \eta_{max}, p_T)&=& \rm f_{true}(\theta^*, \rho_{00}^{in})\times \nonumber\\ \rm g(\theta^*, \eta_{max}, p_T), \end{eqnarray} where $\rm g(\theta^*, \eta_{max}, p_T)$ denotes the effect of the kinematic window, $\rho_{00}^{in}$ is the input $\rho_{00}$ value, $\rm f_{obs}(\theta^*, \rho_{00}^{in}, \eta_{max},p_T)$ is the observed distribution, and $\rm f_{true}(\theta^*, \rho_{00}^{in})$ is the true distribution for a given input $\rho_{00}$. Note that in the above we assume that the effect of finite acceptance (i.e., the $g$ function) is independent of the input $\rho_{00}$ value, which we have verified numerically to be true to a good accuracy. Since the $\rm f_{true}(\theta^*, \rho_{00}^{in})$ distribution is flat for $\rho_{00}^{in}=1/3$, the nontrivial distribution before hadronic scattering represents the effect from the kinematic window and can be used as the correction function:a \begin{eqnarray} \label{eq:3} \rm \frac {f_{obs}(\theta^*, \rho_{00}^{in}, \eta_{max}, p_T)} {f_{obs}(\theta^*, \rho_{00}^{in}=1/3, \eta_{max}, p_T)} &=& \rm \frac {f_{true}(\theta^*, \rho_{00}^{in})} {f_{true}(\theta^*, \rho_{00}^{in}=1/3)} \nonumber\\ =\rm A ~ f_{true}(\theta^*, \rho_{00}^{in}), \end{eqnarray} where $A$ is a constant. Therefore, for each resonance we divide the $\rm cos(\theta^*)$ distribution of interest by the $\rm cos(\theta^*)$ distribution obtained for the $\rho_{00}$=1/3 case without hadronic scatterings with the same kinematic window. The spin alignment signal is then calculated from a fit to the corrected distribution. Figure~\ref{fig:fiteg} shows an example of the acceptance correction. The filled symbols represent the extracted $\rho_{00}$ values of the $\rho$ meson without acceptance correction (and without hadronic scatterings), where the magnitude increases with the decrease of $\rm \eta_{max}$~\cite{LAN2018319}. Our results after the acceptance correction, shown as the open symbols, are consistent with the input $\rho_{00}$ value (solid line). There is no $\eta$ cut on the vector mesons. We have also checked the acceptance correction with the method in Ref.~\cite{PhysRevC.98.044907}, which is usually applied in the experimental analysis, and obtained consistent results. \begin{figure}[htbp] \vspace*{-0.01in} \includegraphics[scale=0.4]{fig3_acc_cor.eps} \captionof{figure}{Correction of the $\eta$ window dependence of $\rho_{00}$ for $\rho$ meson in Pb-Pb collisions at $\mathrm{\sqrt{s_{NN}}}$ = 2.76 TeV (without hadronic scatterings and with full $p_T$ range), where $\rm \eta_{max}$ represents the maximum $|\eta|$ of decay daughters. The filled and open symbols represent the results without and with the acceptance correction, respectively; and the solid line represents the input value $\rho_{00}=0.183$.} \label{fig:fiteg} \end{figure} \begin{figure*} \centering {\includegraphics[width=0.9\linewidth]{fig4a.eps}} \\ {\includegraphics[width=0.9\linewidth]{fig4b.eps}}\\ {\includegraphics[width=0.9\linewidth]{fig4c.eps}}\\ \captionof{figure}{The extracted $\rho_{00}$ values of $\phi$, $K^*$ and $\rho$ mesons as functions of the $\eta$ range in Pb-Pb collisions at $\mathrm{\sqrt{s_{NN}}}$=2.76 TeV and $b=8$ fm from the AMPT model with three different input values of $\rho_{00}$ without and with hadronic scatterings. The x axis center of each point has been slightly shifted to distinguish their error bars.} \label{fig:PbPb276} \end{figure*} In order to investigate the possible $p_T$ dependence of the hadronic scattering effect, the vector mesons $\phi$, $K^*$ and $\rho$ have been classified into three $p_T$ intervals: the full $p_T$ range, 0.4 $<p_T<$ 1 GeV/c, and $p_T>$ 1 GeV/c, similar to the $p_T$ binning applied in experiments~\cite{Acharya:2019vpe,ZHOU2019559}. Meanwhile, the decay daughters of each resonance species have been selected within different $\eta$ ranges ($\rm \eta_{max}=$ from 0.4 to 2) to study the hadronic scattering effect under different experimental acceptance. Figure~\ref{fig:PbPb276} presents the $\rho_{00}$ values of $\phi$, $K^*$ and $\rho$ mesons as functions of $\rm \eta_{max}$ in Pb-Pb collisions at $\mathrm{\sqrt{s_{NN}}}$=2.76 TeV with the input $\rho_{00}$ values of 0.433, 0.333 and 0.183. The global cutoff time for the hadron cascade in the AMPT model is set to 60 fm/$c$. The three sub-panels of (a), (b) or (c) show the extracted $\rho_{00}$ in the three $p_T$ ranges, respectively, where filled symbols represent the results without hadronic scatterings and open symbols represent the results after hadronic scatterings. While the $\rho_{00}$ value without hadronic scatterings (after the correction for finite acceptance) is consistent with the input value for most cases, sizable effects from hadronic scatterings can be seen for the $\rho$ meson. The $\rho_{00}$ values of $K^*$ and $\rho$ mesons after hadronic scatterings are found to decrease and the decrease is typically bigger for a smaller $\eta$ range (except for some cases when $\rm \eta_{max}<0.8$). The $\rho$ meson suffers from the most significant hadronic effect as expected, while the $\phi$ meson is basically not affected mainly due to its long lifetime. One also sees that the change of $\rho_{00}$ due to hadronic scatterings is quite similar for the three different input $\rho_{00}$ values and three $p_T$ intervals. The hadronic scattering effect on $\rho$ mesons is stronger than that on $K^*$ mesons as expected, while the effect on $\phi$ mesons is negligible in all $p_T$ intervals. The general decrease of $\rho_{00}$ may be understood due to the anisotropy of the scattering probabilities, where the decay daughters at $\theta^* \sim 0$ or $\pi$ (which go along the $\pm y$ directions for a parent hadron at rest) are more likely to be scattered than those at $\theta^* \sim 90^{\circ}$ (which go inside the $x-z$ plane for a parent hadron at rest). We also see that for $\rho$ mesons the decrease of $\rho_{00}$ for input $\rho_{00}$=0.433 is slightly stronger than that for input $\rho_{00}$=0.183, especially at small $\rm \eta_{max}$. This may be due the fact that there are more decay daughters emitted along $\theta^* \sim 0$ or $\pi$, which further increases the scattering probabilities along these directions. \begin{figure*} \centering {\includegraphics[width=0.9\linewidth]{fig5a_lostDau_etacut.eps}} \\ {\includegraphics[width=0.9\linewidth]{fig5b_lostDau_etacut2.eps}} \\ \captionof{figure}{The probability distribution of $\rho$ mesons lost due to hadronic scatterings in Pb-Pb collisions at $\mathrm{\sqrt{s_{NN}}}$=2.76 TeV with input $\rho_{00}=0.333$; $p^*$ represents the decay daughter's momentum in the $\rho$ meson rest frame.} \label{fig:lost-Dau} \end{figure*} \begin{figure*} \centering {\includegraphics[width=0.9\linewidth]{fig6_fit_Pb33.eps}} \captionsetup{justification=raggedright} \captionof{figure}{The effect of hadronic scatterings as a function of $\cos(\theta^*)$ in Pb-Pb collisions at $\rm \sqrt{s_{NN}}=$ 2.76 TeV with input $\rho_{00}=0.333$ and $\rm \eta_{max}$=0.5.} \label{fig:ratio} \end{figure*} The probability of decay daughters to be scattered, and thus the influence of hadronic scatterings on the vector meson spin alignment, is not isotropic but depends on the effective three-dimensional geometry of hadronic matter. Including the hadronic effect, we may write the observed $\rm cos(\theta^*)$ distribution approximately as \begin{eqnarray} \label{eq:4} \rm f'_{obs}(\theta^*, \rho_{00}^{in}, \eta_{max},p_T) &=& \rm f_{obs}(\theta^*, \rho_{00}^{in}, \eta_{max},p_T) \times \nonumber\\ s(\theta^*, \rho_{00}^{in}, \eta_{max}, p_T), \end{eqnarray} where $\rm f'_{obs}(\theta^*, \rho_{00}^{in}, \eta_{max},p_T)$ is defined as the distribution after hadronic scattering, $\rm f_{obs}(\theta^*, \rho_{00}^{in}, \eta_{max},p_T)$ is the one before hadronic scattering, and $\rm s(\theta^*, \rho_{00}^{in}, \eta_{max}, p_T)$ represents the fraction of vector mesons that survive the hadronic scattering. Therefore, the probability of losing a vector meson due to hadronic scattering (i.e., having a vector meson with scattered daughters) can be written as \begin{eqnarray}\label{eq:5} \rm 1-s(\theta^*, \rho_{00}^{in}, \eta_{max}, p_T) =1-\frac{\rm f'_{obs}(\theta^*, \rho_{00}^{in}, \eta_{max},p_T)} {\rm f_{obs}(\theta^*, \rho_{00}^{in}, \eta_{max},p_T)}. \end{eqnarray} Figure~\ref{fig:lost-Dau} presents the above probability distributions for $\rho$ mesons after the projection to two-dimensional relative momentum planes. Variables $p_x^*$ and $p_z^*$ represent the decay daughter's momentum in the parent's rest frame along the impact parameter and the beam direction, respectively. The momentum is normalized with $p^*=\sqrt{{p_x^*}^2+{p_y^*}^2+{p_z^*}^2}$ because the distribution of $p_y^*/p^*=\cos \theta^*$ is directly related to the spin alignment and the $\rho_{00}$ value. We see that the decay daughters of $\rho$ mesons are more likely to be scattered along the $p_y^*$ axis (also the $p_x^*$ axis) than along the $p_z^*$ axis, which leads to a bigger suppression at $\theta^* \sim 0$ or $\pi$ than at $\theta^* \sim 90^{\circ}$ and thus a decrease of the extracted $\rho_{00}$ value. By comparing the distributions for $\rm \eta_{max}=$0.5 and those for $\rm \eta_{max}=$2, one observes that the anisotropy of the scattering probability is bigger for the narrower $\eta$ range, which corresponds to a stronger decrease of the extracted $\rho_{00}$ value. The observed probability distributions can be understood in terms of the effective geometry of the matter. In the case of $\rm \eta_{max}$=0.5, the effective geometry of the hadronic matter as seen by the decay daughters in the parent's rest frame may be considered as a short cylinder with the axis along the $z$ axis. Therefore scatterings of decay daughters in the transverse plane are more likely than those along the $z$ axis, as illustrated in the Fig.~\ref{fig:lost-Dau}. In particular, as shown by the projection in the $p_y^*$-$p_z^*$ plane, scatterings along the $p_z^*$ axis are less likely, which leads to relatively more vector mesons to be observed around $\rm \theta^* \sim 90^\circ$ and a smaller observed $\rho_{00}$ value. On the other hand, from panels ($a_2$) and ($b_2$) of Fig.~\ref{fig:lost-Dau} one sees that the scattering probability is about symmetric along $p_x^*$ and $p_y^*$ axes, indicating that the transverse spatial anisotropy in the hadronic stage (or its effect on the scattering probability versus $\cos(\theta^*)$) is small. Figure~\ref{fig:ratio} shows the surviving function $\rm s(\theta^*, \rho_{00}^{in}, \eta_{max}, p_T)$ of $\rho$ mesons in the case of input $\rho_{00}$=0.333 $\rm~and~\eta_{max}$=0.5. We see that a $\rho$ meson at higher $p_T$ is more likely to survive the hadronic scatterings. A non-uniform distribution of $\rm s(\theta^*, \rho_{00}^{in}, \eta_{max}, p_T)$ indicates the hadronic effect, and the decreasing trend versus $\cos \theta^*$ corresponds to a decrease of the extracted $\rho_{00}$ value. Also note that the $\cos \theta^*$ distribution after hadronic scatterings and the finite acceptance correction may not follow the shape of Eq.\eqref{eq:1} well; this can be reflected in the sometimes large $\chi^2$ values in the fit with Eq.\eqref{eq:1}, as shown in Fig.~\ref{fig:ratio}(a) as an example. We have also calculated Au+Au collisions at $\mathrm{\sqrt{s_{NN}}}$=200 GeV and the hadronic effect there is found to be smaller than that in Pb-Pb collisions at $\mathrm{\sqrt{s_{NN}}}$=2.76 TeV. This could come from the lower hadron multiplicity and consequently the smaller scattering probability of decay daughters in the hadron cascade of the lower-energy Au+Au collisions. \begin{figure} \centering {\includegraphics[width=0.9\linewidth]{fig7_default.eps}} \captionof{figure}{ The change of the extracted $\rho_{00}$ values of $K^*$ mesons due to hadronic scatterings from the string melting version (triangles) and the default version (diamonds) of the AMPT model for Pb-Pb collisions at $\mathrm{\sqrt{s_{NN}}}$=2.76 TeV.} \label{fig:com} \end{figure} In principle, the hadronic effect on vector meson spin alignments shall be present in any hadronic transport model~\cite{Bratkovskaya:2011wp,Weil:2016zrk}, although the magnitude of the effect could be different due to the different treatments of the hadron transport. For example, the string melting version of the AMPT model starts the quark coalescence process after the kinetic freezeout of partons. Therefore, the magnitude of the parton cross section affects the average density at the start of hadron cascade ~\cite{Zhang:2008zzk} and may thus affect the magnitude of the effect of hadronic scatterings on spin alignment observables. Here we check the effect in the AMPT model with a different configuration. Figure~\ref{fig:com} presents the results from the default version of AMPT, where the parton cascade only includes minijet partons and is thus shorter and the hadronization is modeled by the Lund string fragmentation~\cite{SJOSTRAND199474}. Since the $\rho$ meson global spin alignment has not been measured yet, we choose the $K^*$ for illustration. We see that the general feature is the same, while the decrease of the extracted $\rho_{00}$ in the default AMPT model is larger, which is a result of the earlier start of the hadron cascade phase in the default AMPT model. Future experimental measurement on the $\rho$ meson spin alignment is called for. Note that this study shows that hadronic scatterings could lead to a finite deviation of the extracted $\rho_{00}$ value from the true value at the time of the vector meson decays. We have not addressed what the true value shall be or how the true value is developed. One may expect that vector mesons with a longer lifetime would experience more hadronic scatterings and their later freeze-out time could affect their polarization including the $\rho_{00}$ value. However, an explicit calculation would require the inclusion of the spin degree of freedom in the partonic and hadronic transport, which is beyond the scope of the current study. \section{Summary} \label{sec:summary} We have studied the effect of hadronic scattering on the spin alignment of $\phi$, $K^*$ and $\rho$ mesons at LHC energies with a multi-phase transport model. We find that hadronic interactions will lead to a deviation of the extracted spin density matrix element $\rho_{00}$ from its true value, where the deviation depends on the effective three-dimensional geometry of the hadronic matter. With finite acceptance, the observed $\rho_{00}$ decreases due to hadronic scattering because it is less likely for the decay daughters to be scattered along the $z$ axis, which tends to around $\theta^* \sim 90^\circ$. The hadronic effect on $\rho_{00}$ is more significant for $\rho$ mesons because of their shorter lifetime and the larger scattering cross section of the $\pi$ decay daughters, therefore measurements of the $\rho$ meson spin alignment will be interesting. The hadronic effect on $K^*$ mesons is moderate, while $\phi$ mesons are almost not affected by hadronic scatterings due to their longer lifetime and the relatively small scattering cross sections of kaons. Furthermore, the hadronic effect on $\rho_{00}$ is bigger from the default version of the AMPT model than that from the string melting version because of the earlier and denser hadron matter in the default AMPT model. Our study suggests that hadronic scatterings could affect vector meson spin alignment observables in addition to the spin-orbit coupling and vorticity. \section*{Acknowledgements} The authors thank Shi Shusu for helpful discussions. The work of D. Y. Shen and J. H. Chen was supported in part by the Guangdong Major Project of Basic and Applied Basic Research No. 2020B0301030008, the Strategic Priority Research Program of Chinese Academy of Sciences with Grant No. XDB34030000, and the National Natural Science Foundation of China under Contract Nos. 12025501, 11890710, 11890714 and 11775288.
\section{Introduction}\label{sec:intro} Weak-lensing (WL) is now firmly established as the most direct method to measure the mass of an astrophysical object ranging from a galaxy (galaxy-galaxy lensing) to the cosmological large scale structure (cosmic shear). Many on-going and future WL surveys happening on massive scales reflect the elevated level of interest and confidence in this technique \citep[e.g.,][]{hikage2019,troxel2018,ivezic2019,euclid2011,wfirst2015}. Without question, in order to maximize the scientific return from these huge data volume, our highest priority is to understand and control systematics. A number of issues on WL systematics have been identified, including shear calibration, photometric redshift degeneracy, model bias, mass-sheet degeneracy, astrophysical processes, and so on \citep[e.g.][]{GFS88,Seitz:1995dq,Squires:1995gs,high2007,jarvis2008,meyers2015, mandelbaum2015}. In this study, we focus on systematics arising in galaxy cluster mass reconstruction from WL source catalogs. Although galaxy cluster mass reconstruction is one of the earliest WL application and demonstration of its power, the main utility of the two-dimensional mass reconstruction has been rather qualitative investigation of the relative mass distribution of the target field. Very few studies employed the mass reconstruction for quantitative analysis (e.g., derivation of galaxy cluster masses). This is because the current mass reconstruction algorithms suffer from various artifacts. For example, the so-called mass-sheet degeneracy (invariant of the observable shear under a certain linear rescaling of the mass) is one of the major obstacles that prevent us from interpreting the result in absolute terms. Severe nonlinearity arising from the transformation of the reduced shear to the convergence is also a crucial contributing factor. Other critical issues include finite-field effect, ill-posed mathematical inversion, smoothing artifact, field edge systematics, and so on \citep[e.g.,][]{Bartelmann:1995yq,Seitz:1995dq} The most popular method to estimate the cluster mass so far has been to fit an analytic profile to the observed shear. This assumes that the cluster mass distribution is spherically symmetric and follows a particular halo model favored by numerical simulations such as an Navarro-Frenk-White \citep{navarro1996} profile. Although this provides a method to overcome the aforementioned drawbacks of the mass reconstruction, the obvious weakness is that individual galaxy clusters do not exactly follow the analytical description, much less are consistent with the assumption of spherical symmetry. In this paper, we introduce a novel method for mass reconstruction based on convolutional neural network (CNN). CNN is a branch of deep learning, which has been considered to be a promising tool in many fields of astronomy in recent years such as photometric redshift \citep[e.g.,][]{schaefer2018}, strong-lensing finding \citep[e.g.,][]{pasquet2019}, image deconvolution \citep[e.g.,][]{flamary2017}, star-galaxy separation \citep[e.g.,][]{kim2017}, morphological classification \citep[e.g.,][]{mittal2019}, etc. The current study is the first endeavor to apply CNN to WL mass reconstruction of galaxy clusters. Since there is a rapid growth in data size and complexity from future WL surveys, the approach introduced here will find many useful applications if our CNN algorithm can significantly reduce aforementioned systematics found in the traditional mass reconstruction. This paper is organized as follows. In \textsection\ref{sec:method}, we describe the basic theory, CNN architecture, and training data sets. The performance of our CNN mass reconstruction is presented in \textsection\ref{sec:results} and discussed in \textsection\ref{sec:discussion} before we conclude in \textsection\ref{sec:conclusion}. Throughout the paper, we assume a flat $\Lambda$CDM cosmology with $H_0=70$ km s$^{-1}$ Mpc$^{-1}$, $\Omega_\Lambda=0.7$, and $\Omega_{\rm m}=0.3$. \section{Methods} \label{sec:method} \subsection{Basic Weak-lensing Theory} The basic WL theory is briefly reviewed here to make our method description self-contained. We refer readers to other excellent review papers for further details \citep[e.g.,][]{mellier1999,bartelmann2001,hoekstra2013}. WL formalism is valid in the regime where the source galaxy is much smaller than the characteristic scale of the gravitational potential variation. In this regime, the transformation matrix $\mathbf{A}$ relating the source plane position $\mathbf{x}$ to the image plane position $\mathbf{x}^{\prime}$ via $\mathbf{x^{\prime}}=\mathbf{A} \mathbf{x}$ is described by: \begin{equation} \mathbf{A}= (1-\kappa) \begin{pmatrix} 1-g_1 & -g_2 \\ -g_2 & 1 + g_1 \end{pmatrix}, \label{eqn:A} \end{equation} where $g_{1(2)}$ is the first (second) component of the reduced shear $g=(g_1^2+g_2^2)^{1/2}$ and $\kappa$ is the convergence. The reduced shear $g$ is related to shear $\gamma$ and convergence $\kappa$ via \begin{equation} g=\gamma/(1-\kappa). \end{equation} The convergence $\kappa$ is the unitless surface mass density: \begin{equation} \kappa=\frac{\Sigma}{\Sigma_c}, \end{equation} \noindent where $\Sigma_c$ is the critical surface mass density: \begin{equation} \Sigma_c=\frac{c^2 D_{s}}{4\pi G D_l D_{ls}}. \label{eqn:sigma_c} \end{equation} In equation~(\ref{eqn:sigma_c}), $c$ is the speed of light, $G$ is the gravitational constant, $D_l$ is the angular diameter distance to the cluster (lens), $D_{ls}$ is the angular diameter distance from lens to source, and $D_s$ is the angular diameter distance to source. The transformation matrix $\mathbf{A}$ in equation~(\ref{eqn:A}) converts a circle into an ellipse. There are multiple ways to define the ellipticity of the resulting ellipse, which has been a source of confusion. If we let its semi-major and -minor axes be $a$ and $b$, respectively, one can show that the reduced shear $g$ in equation~(\ref{eqn:A}) becomes \begin{equation} g=\frac{a-b}{a+b}. \label{eqn:e_definition} \end{equation} Therefore, it is convenient to use equation~(\ref{eqn:e_definition}) to define the ellipticity in WL, which we also adopt in this paper. Since $g$ alone cannot express the orientation of the ellipse, the WL community often uses the complex notation: \begin{equation} \mathbf{g}=g_1 + \mathbf{i} g_2, \label{eqn:complex} \end{equation} which provides both magnitude $g=(g_1^2+g_2^2)^{1/2}$ and orientation $\phi=0.5 \tan^{-1}(g_2/g_1)$ of the elongation. Under the assumption that we can assign a unique ellipticity to every galaxy, the same complex notation (equation~\ref{eqn:complex}) can also be used to express its intrinsic ellipticity $\mathbf{e}=e_1 + \mathbf{i} e_2$ prior to WL distortion. Then, the transformation of the intrinsic ellipticity $\mathbf{e}$ to the lensed (distorted) ellipticity $\boldsymbol{\epsilon}$ by the reduced shear $\mathbf{g}$ is given by: \begin{equation} \boldsymbol{\epsilon} = \frac{ \mathbf{e} + \mathbf{g}} { 1 + \mathbf{g}^* \mathbf{e}} \label{eqn:e_transform} ~\mbox{for}~ |\mathbf{g}|<1 \end{equation} and \begin{equation} \boldsymbol{\epsilon} = \frac{1 + \mathbf{g} \mathbf{e}^* } { \mathbf{e}^* + \mathbf{g}^*} \label{eqn:e_transform2} ~\mbox{for}~ |\mathbf{g}|>1, \end{equation} \noindent where the symbol $^*$ denotes the complex conjugate. Inspection of equation (\ref{eqn:e_transform}) reveals that in general each galaxy's lensed ellipticity $\boldsymbol{\epsilon}$ is only slightly different from its intrinsic ellipticity $\mathbf{e}$ in the WL regime where $\mathbf{g}$ is small. When we disregard measurement systematics and assume that the ellipticity distribution of the source population is isotropic, one can show that the unbiased estimator for $\mathbf{g}$ is $\left < \boldsymbol{\epsilon} \right >$. \subsection{Conventional Mass Reconstruction and its Limitation} \label{sec:conventional_MR} The mathematical relation between $\boldsymbol{\gamma}$ shear and convergence $\kappa$ at the position $\mathbf{x}$ is: \begin{equation} \boldsymbol{\gamma} (\mathbf{x}) = \frac{1}{\pi} \int \mathbf{D}(\mathbf{x}-\mathbf{x}^{\prime}) \kappa (\mathbf{x}^{\prime}) {\rm d} \mathbf{x}^{\prime}, \label{eqn:kappa2shear} \end{equation} where the kernel $\mathbf{D}$ is: \begin{equation} \mathbf{D}=- \frac{1}{ (x_1- \mathbf{i} x_2)^2 }. \end{equation} The well-known \citet[][KS93]{kaiser1993} mass reconstruction is based on the straightforward inversion of equation~(\ref{eqn:shear2kappa}): \begin{equation} \kappa (\mathbf{x}) = \frac{1}{\pi} \int \mathbf{D}^{*}(\mathbf{x}-\mathbf{x}^{\prime}) \boldsymbol{\gamma} (\mathbf{x}^{\prime}) {\rm d} \mathbf{x}^{\prime}. \label{eqn:shear2kappa} \end{equation} KS93 evaluate this convolution in Fourier space while \citet{fischer1997} develop an inversion method in real space. Alternatively, some authors propose to reconstruct the convergence field using equation~(\ref{eqn:kappa2shear}) through the maximum likelihood method \citep[e.g.,][]{Seitz:1998mg,bradac2004,jee2007}. Inspection of equations~(\ref{eqn:kappa2shear}) and (\ref{eqn:shear2kappa}) shows that several artifacts may be introduced from the KS93 mass reconstruction. First, the evaluation of the convolution suffers from the so-called finite-inversion problem because in principle $\kappa$ requires the information of the shear $\boldsymbol{\gamma}$ over an infinite area. Second, equation~(\ref{eqn:shear2kappa}) uses $\boldsymbol{\gamma}$ for its input whereas the directly attainable information from averaging over many galaxy shapes is only $\mathbf{g}$. Third, the solution is not unique as the same equation holds under the transformation: $\kappa \rightarrow \lambda \kappa + (1 -\lambda)$, where $\lambda$ is arbitrary. This ambiguity is often termed the ``mass-sheet degeneracy'' because, although mathematically somewhat misleading, one can view the transformation as an addition of a thin sheet of mass when $\lambda \approx 1$. Fourth, in the central region of massive clusters where the WL assumption no longer holds, the above equations lose their validity. Fifth, to suppress noise amplification in the inversion, we can only obtain a smoothed convergence field, which gives a biased mass estimate even in the ideal situation where all other issues are carefully accounted for. \subsection{Mass Reconstruction with Convolutional Neural Network}\label{sec:method_cnn} \subsubsection{Generation of Training Dataset} \label{sec:method_sim} Generation of our training dataset starts from the convergence ($\kappa$) maps created from cosmological simulations via ray tracing. We utilize the publicly available data MassiveNuS \citep{liu2018}. The simulation was originally designed to investigate the impact of massive neutrinos on the large-scale structure. For the current investigation, we chose to retrieve\footnote{\url{http://columbialensing.org}} the dataset corresponding to the $\sum m_{\nu}=0.177$~eV, $\Omega_{\rm m}=0.2485$, and $A_s=2.0644\times10^{-9}$ setting. However, we emphasize that the details in the simulation parameters are not important within the scope of the current study because, as we shall demonstrate later, our CNN algorithm is designed to learn the rule that maps the reduced shear field to the convergence field according to general relativity and thus is independent of the above cosmological parameters. The original dataset consists of a total of 50,000 convergence images at five ($z=0.5$, 1.0, 1.5, 2.0, and 2.5) different source redshifts (10,000 convergence fields per source redshift) each simulating an area of $3.5^\circ \times 3.5^\circ$ with a pixel resolution of $0\farcm4$, which matches the field of view (FOV) of the Vera C. Rubin Observatory \citep{ivezic2019}. The large convergence pixel makes the maximum convergence value never exceed unity. For the same field, a higher source redshift convergence image is richer in substructure as more line-of-sight (LOS) structure is included and also the lensing efficiency becomes higher. We use the dataset created for the source redshift of 1.5. We verified that training with all five source redshift data does not improve the result. We identified clusters by running SExtractor \citep{bertin1996} on the convergence field image and cropped a $32\arcmin \times 32\arcmin$ region approximately centered on each cluster. We randomly generated positions of 25,000 sources within this subfield. The distribution matches the typical source density of $\mytilde25$ per sq. arcmin in our previous Subaru WL studies \citep[e.g.,][]{finner2017, kim2019, yoon2020}. Shears $\boldsymbol{\gamma}$ at the position $\mathbf{x}$ were computed using equation~(\ref{eqn:kappa2shear}). This shear $\boldsymbol{\gamma}$ is then converted to the reduced shear $\mathbf{g}$ through $\mathbf{g}=\boldsymbol{\gamma}/(1-\kappa)$. Here we do not consider dispersions in both lens and source redshift and assume that all lensing masses and sources are confined to $z_l=0.5$ and $z_s=1.5$, respectively. Also, as explained above, no convergence pixel exceeds unity, and thus only equation~(\ref{eqn:e_transform}) is needed for the ellipticity transformation. We set the intrinsic shape noise per component to $\sigma_e=0.24$, which is approximately the empirical value from \emph{Hubble Space Telescope} (HST) image analysis. In addition to this shape noise, there is a measurement error due to pixel noise. Assuming that the measurement error is independent of the shape noise, we produced the total ellipticity error as a sum of two Gaussian random numbers. The measurement error depends on galaxy properties (e.g., magnitude, size, profile shape, etc.) and signal-to-noise ratios (S/N). We adopted the source magnitude distribution of the \citet{kim2019} study, which starts at $\mytilde21.5^{\rm th}$ mag, peaks at $\mytilde25.5^{\rm th}$ mag, and truncates at $\mytilde27.5^{\rm th}$ mag in $V$-band. The observed relation between magnitude and ellipticity measurement error in \citet{kim2019} is employed to generate the ellipticity measurement error for our sources. We select 7,000 convergence fields and divide them into 5,000 training, 1,800 validation, and 200 test samples. \subsubsection{Architecture of CNN} \label{sec:cnn_architecture} \begin{figure*}[hbt] \plotone{architecture.png} \caption{Schematic diagram showing the architecture of our convolutional neural network. The input channel consists of three ($\epsilon_1$, $\epsilon_2$, and $\Delta \epsilon$) layers of 2D ($386\times386$) arrays. The main part of the CNN architecture is the repeated combination of convolution and transposed-convolution with $49\times49$-size filters. We use skip-connections between the output of each convolution layer and that of the previous layer that has the matching size. See Table~\ref{tab:architecture} and text for details.} \label{fig:architecture} \end{figure*} \begin{deluxetable}{cccccc} \tablecaption{Outline of our convolutional neural network. See text and Figure~\ref{fig:architecture} for description of each layer.\label{tab:architecture} } \tablehead { \colhead{Layer} & \colhead{Filter Size} & \colhead{Multiplied to} & \colhead{Output Size} } \startdata Input & - & - & (2, 386, 386) \\ Conv2D-1 & (3, 3) & - & (8, 384, 384) \\ AvgPool & (3, 3) & - & (8, 128, 128) \\ TransConv2D-1 & (49, 49) & - & (8, 176, 176) \\ Conv2D-2 & (49, 49) & - & (8, 128, 128) \\ Multiply-1 & - & AvgPool & (8, 128, 128) \\ TransConv2D-2 & (49, 49) & - & (8, 176, 176) \\ Conv2D-3 & (49, 49) & - & (8, 128, 128) \\ Multiply-2 & - & Multiply-1 & (8, 128, 128) \\ TransConv2D-3 & (49, 49) & - & (8, 176, 176) \\ Conv2D-4 & (49, 49) & - & (8, 128, 128) \\ Multiply-3 & - & Multiply-2 & (8, 128, 128) \\ TransConv2D-4 & (49, 49) & - & (8, 176, 176) \\ Conv2D-5 & (49, 49) & - & (8, 128, 128) \\ Multiply-4 & - & Multiply-1 & (8, 128, 128) \\ TransConv2D-5 & (49, 49) & - & (16, 176, 176) \\ Output & (49, 49) & - & (1, 128, 128) \\ \enddata \end{deluxetable} Figure~\ref{fig:architecture} and Table~\ref{tab:architecture} summarize the architecture of our CNN model that we use to predict the convergence map from the WL shear datasets. Our CNN model takes two-dimensional (2D) arrays of $\epsilon_1 (\mathbf{x})$, $\epsilon_2 (\mathbf{x})$, and $\Delta \epsilon(\mathbf{x})$ as a three-channel input, where $\mathbf{x}$ denotes 2D pixel coordinates, $\epsilon_i (\mathbf{x}) (i=1,2)$ and $\Delta \epsilon(\mathbf{x})$ are the $i$-th average ellipticity (reduced shear) component and its error at the position $\mathbf{x}$. Because we randomly positioned source galaxies (\textsection\ref{sec:method_sim}), these (regularly spaced) input grids were constructed by weight-averaging the (irregularly spaced) source galaxy ellipticities with a FWHM$=7\arcsec$ Gaussian kernel; we used the distance between the center of each grid and the source position for the kernel evaluation. For each cluster, the full area of the initial field is $32\arcmin\times32\arcmin$, which is represented by 2D arrays of $500\times500$. We performed data augmentation by subsampling $24\farcm7 \times 24\farcm7$ ($386\times386$) regions 1,444 times. In addition, we applied four rotations ($0^\circ$, $90^\circ$, $180^\circ$, and $270^\circ$) and two axis flips. The total number of the resulting subfields for each cluster is 1,444$\times(4+2)=$8,664. The subsampling scheme also prevents CNN from learning that the position of the cluster is always at the field center. The main part of our CNN architecture includes the repeated combinations of 2D convolution (Conv2D-\# in Table~\ref{tab:architecture}) and transposed-convolution layers (TransConv2D-\#) with the identical filter size. We tested various choices of filter sizes and found that the $49 \times 49$ filter gives the best overall performance. Readers are referred to Appendix~\ref{sec:app_performance} for performance comparisons among different CNN architectures with various choices of filter sizes, input layers, and loss functions. The Conv2D-\# and TransConv2D-\# operations are activated by the hyperbolic tangent function (tanh). Inspired by the residual neural network \citep[ResNet;][]{he2015}, we use skip-connections between the output of each Conv2D-\# layer and that of the previous layer with the matching output size by applying a multiplication operation (Multiply-\#). We apply batch normalization to the output of each Multiply-\# layer to avoid the so-called gradient vanishing problem \citep{ioffe2015}. These repeated operations of Conv2D-\# and TransConv2D-\# are designed to extract features while preserving the size of the output layer (without introducing any padding). Also, this architecture outperforms the other architectures that have only convolution layers when it comes to the prediction of the mass peak positions (Appendix~\ref{sec:app_performance}). Although we did not use any arbitrary padding, the convergence estimates near the field boundary can easily be influenced by the nonvanishing filter size. Therefore, the values within the 14 boundary pixels were not used during our training. The pixel scale of the final $\kappa$ map is $0\farcm192~\mbox{pixel}^{-1}$. We performed our CNN training with Tensorflow \citep{tensorflow2015}. During the training, we used the Adam optimizer \citep{adam2014} with a learning rate $10^{-5}$, $50$ mini-batches per each step, and $20$ steps per each epoch. In this study, we introduce the following weighted mean square error inspired by the focal loss \citep{lin2017}: \begin{equation} \mathcal{L} = \sum_{\mathbf{x}} \omega_{\rm f}(\mathbf{x}) \left[ \kappa_{\rm pred}(\mathbf{x}) - \kappa_{\rm truth}(\mathbf{x}) \right]^2 \, , \label{eq:focal_loss} \end{equation} where the weight $\omega_{\rm f}(\mathbf{x})$ at each pixel is determined by the value of truth convergence: \begin{equation} \omega_{\rm f}(\mathbf{x}) = 1 + \frac{\left| \kappa_{\rm truth}(\mathbf{x}) \right|}{\max (\kappa_{\rm truth})} \, . \end{equation} This loss function is chosen so that our CNN model is mostly constrained by the high-density regions of clusters, where our scientific interests lie (see Appendix~\ref{sec:app_performance} for performance comparisons). We ran $200$ epochs with the NVIDIA V100 GPU, which take about one hour per each training. For the convergence test of our CNN training, we executed 10 independent runs with the same CNN architecture. For each run, we adopted the model that minimized the validation loss. In our presentation of the results (\textsection\ref{sec:results}), the standard deviations from the 10 runs are used as error estimates. \section{Results}\label{sec:results} In this section, we compare our CNN results with those of KS93 for the test sample comprised of 200 cluster fields. Because of the data augmentation procedure (\textsection\ref{sec:method_cnn}), multiple (subsampled) mass maps are produced for each cluster. Thus, we created one mosaic convergence image for each cluster by taking average of the multiple mass maps. The cluster is approximately located at the center in this mosaic and we use the mosaic for comparison with the truth and KS93 results. Readers are reminded that since these multiple mass maps are generated from the same source catalog, this mosaicking procedure does not benefit by reducing the statistical noise\footnote{That is, one can apply the procedure to real observations.}. In \textsection\ref{sec:results_visual}, we use visual inspection to qualitatively compare the reconstruction results. In \textsection\ref{sec:results_prob}, we contrast the values of reconstructed convergence with those of the truth by pixel-by-pixel comparison and by evaluating their probability distributions. In \textsection\ref{sec:results_mass} and \textsection\ref{sec:results_peak}, we investigate the reconstructed cluster masses and the positional accuracy of their density peaks, respectively. Finally, we examine performances of our CNN method in the presence of bright stars in \textsection\ref{sec:results_star}. Table~\ref{tab:performance} summarizes our comparison between the KS93 and CNN results. \begin{deluxetable}{cccc}[hbt] \tablecaption{Summary of the performances of our CNN and the KS93 mass reconstructions for the 200 test datasets. See text for the definition of the $\mathcal {D}$ metric.}\label{tab:performance} \tablehead { \colhead{Method} & \colhead{$\mathcal{D}(\widetilde{\kappa}_{\rm pred},\widetilde{\kappa}_{\rm truth})$} & \colhead{$M_{\rm pred}^{\rm cl}/M_{\rm truth}^{\rm cl}$} & \colhead{$\Delta_{\rm peak}$} } \startdata KS93 & $6.26 \pm 4.57$ & $0.484^{+0.218}_{-0.149}$ & $4\farcm27^{+8\farcm63}_{-3\farcm94}$ \\ CNN & $4.36 \pm 3.77$ & ${0.867^{+0.327}_{-0.296}}$ & $0\farcm60^{+4\farcm92}_{-0\farcm38}$ \\ CNN-BS & ${3.66 \pm 3.22}$ & ${0.554^{+0.257}_{-0.211}}$ & $1\farcm53^{+4\farcm21}_{-1\farcm14}$ \\ \enddata \end{deluxetable} \subsection{Qualitative Comparison Based on Visual Inspection}\label{sec:results_visual} \begin{figure*}[hbt] \plotone{visual_best.pdf} \caption{Example of our CNN mass reconstruction. We show the truth convergence map (left) and the reconstructions with the KS93 (middle) and our CNN methods (right). The top panel displays the convergence values $\kappa(\mathbf{x})$ as are whereas the bottom panel shows the rescaled versions using the transformation $\widetilde{\kappa}(\mathbf{x}) \equiv (\kappa(\mathbf{x}) - \langle \kappa \rangle) / \Delta \kappa$, where $\langle \kappa \rangle$ and $\Delta \kappa$ are the average and standard deviation, respectively, evaluated within the field. The ``X" symbol denotes the location of the highest value within each convergence field. Here we only display the central $26\farcm6 \times 26\farcm6$ region. Visual inspection shows that our CNN reconstruction significantly outperforms the KS93 method in terms of the dynamical range restoration, noise suppression, and large-scale structure representation.} \label{fig:visual_sim} \end{figure*} Figure~\ref{fig:visual_sim} displays an example of our CNN mass reconstruction. The comparison with the truth and KS93 results illustrates that our CNN mass reconstruction is superior to KS93 in terms of 1) the recovery of the true $\kappa$ range, 2) the representation of the large-scale structure around the cluster, and 3) the suppression of the noise in the cluster outskirts. Although here only one case is illustrated, these advantages are present for the rest of the test sample. \begin{description} \item[1) Recovery of the $\kappa$ range] The truth map shows that $\kappa$ ranges from $\mytilde0.05$ to $\mytilde0.25$, where the maximum value is found at the cluster center. The KS93 reconstruction fails to recover this convergence range in the high end. The convergence value at the cluster center is only $\mytilde0.05$ while the global maximum is found at a different location (see the location of the ``X" symbol). On the other hand, the CNN mass reconstruction gives a much higher value $\kappa\sim0.15$ at the cluster center. Given the inevitable smoothing effect arising from the sparse sampling (25 sources per sq. arcmin), we believe that the improvement over the KS93 is remarkable. We discuss this issue more quantitatively in \textsection\ref{sec:results_prob}. \item [2) Reconstruction of the large scale structure] Inspection of the truth map (Figure~\ref{fig:visual_sim}) indicates that the cluster is not isolated, but located in the high density environment. While it is difficult to trace this large-scale structure surrounding the cluster in the KS93 result, the feature, albeit somewhat smoothed, clearly stands out as an overdense region in our CNN mass reconstruction. \item [3) Suppression of noise] Since the S/N value depends on the local strength of WL signal given the same number density of sources, an ideal mass reconstruction method should employ a smoothing scheme where the kernel size matches the local S/N value. However, in general, it is nontrivial to implement such an ``adaptive smoothing" scheme in practice because the S/N information is only obtained after a high-quality convergence field is reconstructed. Therefore, a common practice in the WL community is to perform mass reconstruction with a fixed-size smoothing kernel often optimized for the central region of the cluster \citep[e.g.,][]{vanwaerberke2000}. The inevitable artifact is the production of many spurious mass peaks in the cluster outskirt where the S/N value is low. The comparison between the KS93 and our CNN results shows that our CNN result nicely suppresses the noise fluctuation in the outskirt region while still detecting substructures if they are significant (see the bottom panel of Figure~\ref{fig:visual_sim}). \end{description} \subsection{Convergence Distribution}\label{sec:results_prob} \begin{figure*}[hbt] \plottwo{kappaHist.pdf}{kappaNormHist.pdf} \caption{Comparison of convergence ($\kappa$) distributions. We measure the $\kappa$ distribution from the entire test sample (left). The right panel is the same except that the distribution is obtained for $\widetilde{\kappa}$. The orange shade represents the standard deviation measured from our 10 independent runs. The CNN reconstruction provides an extended tail at the high end, mimicking the feature in the truth whereas the KS93 distribution is nearly symmetric around zero. When the convergence is rescaled with its standard deviation, the agreement improves as can be seen in the right panel.} \label{fig:kappaHist} \end{figure*} \begin{figure*}[hbt] \centering \plottwo{pixel_ks.pdf}{pixel_cnn.pdf} \caption{Joint distribution of $\kappa$ between reconstructed and truth convergence fields. Contours show the $68\%$, $95\%$, and $99.7\%$ confidence levels. Orange filled circles are the medians of $\kappa_{\rm truth}$ in the equal-width bins and their error bars represent the $68\%$ certainties in $\kappa_{\rm truth}$ and $\kappa_{\rm pred}$. The CNN reconstruction shows an improved correlation with the truth, although it is also clear that the $\kappa$ values are underestimated.} \label{fig:pixel} \end{figure*} \begin{figure*}[hbt] \plottwo{pixelNorm_ks.pdf}{pixelNorm_cnn.pdf} \caption{Similar to Figure~\ref{fig:pixel} except that the plots are drawn with the normalized convergence ($\widetilde{\kappa}$).} \label{fig:pixelNorm} \end{figure*} The literature has shown that the distribution of the convergence field can be well-approximated by a log-normal distribution characterized by an extended high-end tail \citep[e.g.,][]{jain2000,hilbert2011,clerkin2017}. Figure~\ref{fig:kappaHist} compares the convergence distributions between the KS93 and our CNN reconstructions for the entire test sample and shows that the CNN distribution follows the log-normal trend of the truth (see the left panel). On the other hand, the convergence distribution in the KS93 result is symmetric around zero without any sign of an extended tail at the high end. The comparison between the CNN result and the truth shows that the CNN distribution is somewhat narrower. This happens because the CNN mass map based on a finite number of source galaxies (25 galaxies per sq. arcmin) is inevitably smoother than the truth. In order to compensate for this smoothing effect, we propose the following normalization: \begin{equation} \widetilde{\kappa}(\mathbf{x}) \equiv (\kappa(\mathbf{x}) - \langle \kappa \rangle) / \Delta \kappa, \label{eqn:normalization} \end{equation} where $\langle \kappa \rangle$ and $\Delta \kappa$ are the average and standard deviation, respectively. The rescaling of the convergence through this normalization takes into account the reduction of $\Delta \kappa$ in mass reconstruction. However, as mentioned in \textsection\ref{sec:results_visual}, the smoothing kernel is not uniform in the CNN mass reconstruction; effectively, the cluster outskirts smoothed with larger kernels than the cores. Therefore, the proposed normalization (equation~\ref{eqn:normalization}) does not completely resolve the issue. Nevertheless, the right panel of Figure~\ref{fig:kappaHist} shows that the agreement between the CNN and truth distributions improves dramatically after the normalization. The joint distribution shown in Figure~\ref{fig:pixel} also confirms that the CNN mass reconstruction provides significantly better pixel-to-pixel correlations with the truth. Also, similarly to the previous case, the normalization significantly strengthens the correlation with the truth (Figure~\ref{fig:pixelNorm}). To quantify the similarity of the reconstruction to the truth, one can suggest the absolute deviation $|\widetilde{\kappa}_{\rm pred}(\mathbf{x}) - \widetilde{\kappa}_{\rm truth}(\mathbf{x})|$ as a potential metric. However, this metric, if used as it is, would be dominated by the statistics of the convergence pixels near zero. Therefore, we introduce the weighted version as follows: \begin{equation} \mathcal{D} = \frac{\sum_{\mathbf{x}} \widetilde{\omega}_{\rm p}(\mathbf{x}) \left| \widetilde{\kappa}_{\rm pred}(\mathbf{x}) - \widetilde{\kappa}_{\rm truth}(\mathbf{x}) \right|}{\sum_{\mathbf{x}} \widetilde{\omega}_{\rm p}(\mathbf{x})}\label{eqn:dev}, \end{equation} where the weight $\widetilde{\omega}_{\rm p}(\mathbf{x})$ is inversely proportional to the probability distribution: \begin{equation} \frac{1}{\widetilde{\omega}_{\rm p}(\mathbf{x})} = \left. \frac{{\rm d}f}{{\rm d}\widetilde{\kappa}_{\rm truth}} \right|_{\widetilde{\kappa}_{\rm truth}(\mathbf{x})} . \end{equation} In practice, the weight can diverge when noise makes the derivatives close to zero. To prevent this, we use a discrete histogram of the truth with 50 bins for the estimation of $\widetilde{\omega}_{\rm p}$. The $\mathcal{D}$ (better if closer to zero) metric from the CNN mass reconstruction is $4.36 \pm 3.77$. On the other hand, the KS93 result gives $\mathcal{D}=6.26 \pm 4.57$. This metric indicates that the $\kappa$ statistics from the CNN reconstruction better match those from the truth. \subsection{Projected Cluster Mass}\label{sec:results_mass} \begin{figure*}[hbt] \plottwo{cluster_ks.pdf}{cluster_cnn.pdf} \caption{Comparison of projected cluster masses between prediction and truth. The projected cluster mass $M^{\rm cl}$ is defined to be the sum of convergence values within a $r=1\farcm92$ ($\mytilde0.72$ Mpc) radius circular aperture centered on the truth mass peak. Filled orange circles are the median values of $M_{\rm truth}^{\rm cl}$ in the equal-width bins, and their error bars represent the $68\%$ certainties of $M_{\rm truth}^{\rm cl}$ ad $M_{\rm pred}^{\rm cl}$ within the bins. The errors on individual data points (filled black circles) in the right panel are the standard deviations of CNN results from 10 independent runs. Blue dashed lines and filled area are the median and $68\%$ confidence levels of the ratio $M_{\rm pred}^{\rm cl} / M_{\rm truth}^{\rm cl}$. The projected mass of $M^{\rm cl}=10$ approximately corresponds to $M_{200}\sim7\times10^{13} M_{\sun}$. The ratio of the CNN masses to the truth is consistent with unity ($0.867_{-0.296}^{+0.327}$) while the ratio is significantly lower ($0.484_{-0.149}^{+0.218}$) when the KS93 masses are used.} \label{fig:mass} \end{figure*} The pixel-to-pixel comparison in \textsection\ref{sec:results_prob} shows that although our CNN mass reconstruction better recovers the convergence statistics of the truth than the KS93 method, the distribution is somewhat narrower because of the smoothing implicitly applied to the reconstructed convergence field via CNN. It is our premise that this smoothing artifact is of a less concern when one's interest is to estimate the integrated convergence within a reasonably large aperture. We define the projected cluster mass $M_{\rm truth}^{\rm cl}$ to be the sum of the convergence values within the $r=1\farcm92$ (10 convergence pixel) radius aperture. At the cluster redshift of 0.5, the radius corresponds to 0.72~Mpc with the adopted cosmology. A projected cluster mass of 10 ($\sum \kappa=10$) corresponds to $\mytilde7\times10^{13}M_{\sun}$\footnote{The exact value depends on the halo profile shape. Here we assume an NFW profile with a concentration of $c=3.5$ and a scale radius of $r_s=200$~kpc at $z=0.5$.}. Figure~\ref{fig:mass} shows the comparison of $M_{\rm truth}^{\rm cl}$ between the reconstructed and the truth values. As seen in the pixel-to-pixel comparison, the CNN mass reconstruction also outperforms the KS93 result in the cluster mass estimation. In addition, it is remarkable that the agreement with the truth is significantly better than the one in the convergence pixel-to-pixel comparison. The slope $M_{\rm CNN}^{\rm cl} / M_{\rm truth}^{\rm cl} = 0.867^{+0.327}_{-0.296}$ is consistent with unity. On the other hand, we obtain $M_{\rm KS}^{\rm cl} / M_{\rm truth}^{\rm cl} = 0.484^{+0.218}_{-0.149}$ for the KS93 reconstruction, which is a $\gtrsim2\sigma$ departure from unity. For the case of CNN, the data points at $M_{\rm truth}^{\rm cl}\gtrsim40$ hint at the possibility that the estimated masses may be systematically lower. Although the sample size is small in this regime, we speculate that this may happen because the employed aperture radius ($r=1\farcm92$) is not sufficiently large for these very massive clusters. \subsection{Cluster Centroid}\label{sec:results_peak} \begin{figure*}[hbt] \plottwo{peakDistMass_ks.pdf}{peakDistMass_cnn.pdf} \caption{Cluster centroid deviation ($\Delta_{\rm peak}$) as a function of the truth cluster mass ($M_{\rm truth}^{\rm cl}$). Both CNN and KS93 perform well for massive clusters ($M_{\rm truth}^{\rm cl}\gtrsim35$). However, the KS93 method produces many catastrophic errors for $M_{\rm truth}^{\rm cl}\lesssim35$. } \label{fig:peakDistMass} \end{figure*} \begin{figure}[hbt] \plotone{peakDist.pdf} \caption{Comparison of the centroid errors between the KS93 and CNN results. The data points are color-coded with the truth mass. There present many catastrophic errors in the KS93 results. } \label{fig:peakDist} \end{figure} Robust estimation of centroids is an important issue in cluster WL studies \citep[e.g.,][]{linden2014,randall2008}. The centroid serves as a reference to characterize the properties of the cluster. Also, in merging galaxy clusters, the position of the mass clump with respect to other cluster components is critical in our reconstruction of their merging scenarios. Here we compare the performance in centroid recovery between the KS93 and our CNN methods. We measured the centroid in two steps. First, we located the pixel that has the largest convergence value. Then, we applied a 21~pixel$\times$21~pixel ($4\farcm03\times4\farcm03$) square top-hat window and evaluated the first moments. Occasionally, negative convergence values are present within the window in the KS93 mass reconstruction. To prevent the centroid from leaving the window in this case, we rescaled the mass map in such a way that the minimum value within the window becomes zero. The application of the top-hat window is to include the contribution from the large-scale structure around the peak in our estimation of the centroid. Figures~\ref{fig:peakDistMass} displays the deviations of the reconstructed mass centroids with respect to the truth. The CNN and KS93 results give similarly small ($1 \sim 3$ pixels) centroid deviations for massive clusters ($M_{\rm truth}^{\rm cl}\gtrsim35$). Remarkably, we find striking differences in the low-mass ($M_{\rm truth}^{\rm cl}\lesssim35$) regime. The CNN centroid deviations gradually increase for decreasing masses, reaching $\mytilde10$~pixels at $M_{\rm truth}^{\rm cl}\sim10$. On the other hand, the KS93 result shows many catastrophic errors ($\gtrsim50$ pixels) in this regime. This contrast is seen more clearly in Figure~\ref{fig:peakDist}, where we directly compare the deviations for the same clusters. We attribute the large difference in the centroid deviations for low mass clusters to the uncontrolled noise fluctuation in the KS93 mass reconstruction discussed in \textsection\ref{sec:results_visual}. As shown by the example in Figure~\ref{fig:visual_sim}, sometimes the highest convergence values are found not within the cluster region. Also, even in the case where the highest convergence value is not catastrophically far from the truth, the lack of the contrast against the neighboring background substructures makes the centroid measurement highly uncertain. \subsection{Influence of Masking}\label{sec:results_star} Up to now, we have tested our CNN method while assuming that no masked regions are present within the reconstruction field. In real observations, however, we need to mask out the regions affected by bright stars. Several methods have been suggested to minimize some artifacts due to the missing information \citep[e.g.,][]{starck2003,pires2009}. In this paper, without taking any explicit measure to minimize the influence (i.e., we did not perform a separate training with masked galaxy catalogs), we simply investigated the impact of large maskings on our CNN mass reconstruction performance with the same model. The expected number density of bright stars depends on the galactic latitude. And the exact size of the masking for a given magnitude star varies according to specific reduction/analysis methods. Reviewing our previous WL studies with Subaru/Suprime-Cam imaging data, we find that within the typical $20\arcmin \times 20\arcmin$ WL analysis area, $1\sim2$ bright-star maskings were needed with the masking radius ranging from $\mytilde0.5\arcmin$ to $\mytilde2\arcmin$ \citep[e.g.,][]{finner2017, kim2019, yoon2020}. To mimic such conditions, we applied bright-star masking to our source catalogs with these number density and size distributions. We ensured that every cluster has at least one masking near the mass peak because we are interested in investigating the effect at its maximum. \begin{figure*} \plotone{visual_BS.pdf} \caption{Impact of the bright-star masking on the CNN mass reconstruction. We use the same cluster presented in Figure~\ref{fig:visual_sim} as an example. The middle (right) panel shows the reconstruction without (with) bright-star masking. The color scale of the bottom panel is based on the normalized convergence ($\widetilde{\kappa}$) as in Figure~\ref{fig:visual_sim}. White dashed circles mark the locations of the bright-star masks. Although the central mask crops out the most significant region of the cluster, the result (CNN-BS) shows that the cluster is still clearly detected near the truth position. We note that the missing information leads to slight underestimation of the peak convergence values. } \label{fig:visual_BS} \end{figure*} Our visual inspection of the result shows that in most cases the CNN method can still detect the cluster mass clumps in the presence of masks. In Figure~\ref{fig:visual_BS} we display one such example. Although the central mask completely removes source galaxies within the $r=2\arcmin$ ($\mytilde0.73$ Mpc) circular mask placed near the mass peak, the reconstruction can still reveal the cluster nearly at the truth position. However, we find that because of the missing data the convergence values are slightly underestimated. In order to examine the masking impact quantitatively, we measured the joint distribution, cluster mass comparison, and centroid distribution for the entire test sample as in \textsection\ref{sec:results_prob}, \textsection\ref{sec:results_mass}, and \textsection\ref{sec:results_peak}, respectively. The joint $\kappa$ distribution displayed in the left panel of Figure~\ref{fig:property_BS} clearly indicates that the correlation with the truth in the high convergence regime is significantly weakened. Compared with the non-masking case (right panel of Figure~\ref{fig:pixel}), the slope is reduced by a factor of $1.5 \sim 2$ at $0.2\lesssim \kappa_{\rm truth} \lesssim 0.5$, which is consistent with our expectation from the visual inspection of the convergence map. Since this weakened correlation in $\kappa$ is primarily due to the underestimation of the $\kappa$ values within the mask placed near the cluster center, we can expect that the correlation in cluster mass also suffers in a similar fashion. The slope of the reconstructed mass to the truth becomes $0.554^{+0.257}_{-0.211}$ (see middle panel of Figure~\ref{fig:property_BS}), which is substantially smaller than the non-masking case $0.867^{+0.327}_{-0.296}$. Finally, in terms of the centroid deviation, we find that the fraction of the catastrophic errors increases because the convergence values within the masked region are underestimated and this makes the largest convergence peak within the reconstructed field sometimes lie outside the masked area. The right panel of Figure~\ref{fig:property_BS} displays the comparison of the centroid deviation with the KS reconstruction result {\it performed without any masking}. Even in the low deviation regime ($\Delta_{\rm peak}^{\rm KS}\lesssim10$ pixels), the CNN method sometimes produces catastrophic errors. As mentioned earlier, this happens because of the in-mask underestimation. However, interestingly, in the regime where KS produces catastrophic errors ($\Delta_{\rm peak}^{\rm KS}\gtrsim30$ pixels), the CNN performance is sometimes significantly better. This may happen for the cases where the in-mask underestimation is less severe than the KS93 artifacts including noise amplification and inadequate $\kappa$-scale recovery (see the discussion in \textsection\ref{sec:results_visual}). \begin{figure*}[hbt] \centering \includegraphics[width=0.3\textwidth]{pixel_cnn_BS.pdf} \includegraphics[width=0.3\textwidth]{cluster_cnn_BS.pdf} \includegraphics[width=0.33\textwidth]{peakDist_BS.pdf} \caption{CNN performance under the influence of bright-star masking. Left panel: joint probability measured from the convergence pixels within the masks. Middle panel: comparison of projected cluster mass estimates with the truth. Right panel: comparison of centroid deviations with the KS93 ones performed without bright-star masking. } \label{fig:property_BS} \end{figure*} \section{Discussion} \label{sec:discussion} \subsection{Why Does Our CNN algorithm Outperform the KS93 method?} The comparison of our CNN mass reconstruction with the KS93 result has shown that the CNN performance is significantly better in several aspects (\textsection\ref{sec:results}). To name a few, the bias in the projected cluster mass estimation based on the convergence map is greatly reduced. And the fraction of catastrophic errors in the centroid measurement becomes much smaller especially in the low mass regime. Moreover, the convergence map is adaptively smoothed in such a way that a larger kernel is used in regions where the lensing S/N is lower, which leads to effective noise suppression in the cluster outskirts. Here we present our discussion on the reason behind the outperformance. The main cause for the improvement can be understood if we review some of the key issues in the conventional mass reconstruction (\textsection\ref{sec:conventional_MR}). The mass-sheet degeneracy is the most fundamental problem because the shear $\gamma$ remains unchanged under the transformation of the convergence field: $\kappa \rightarrow \lambda \kappa + (1-\lambda)$. This degeneracy can be lifted only by imposing some specific $\kappa$ value somewhere in the reconstruction field. One reasonable assumption is that the mean convergence is close to zero (although it should not be exactly zero) near the field boundary for a wide field mass reconstruction. This allows us to determine the $\lambda$ value and thus break the degeneracy. Because our training data sets are drawn from cosmological simulation data, we believe that our CNN learns to utilize the information. Another critical issue is the nonlinearity in the $g\rightarrow \kappa$ mapping. The fact that while the average ellipticity $\left < e \right >$ provides a reduced shear $g=\gamma/(1-\kappa)$, the convergence is a function of a shear $\gamma$ (equation~\ref{eqn:shear2kappa}) is ignored in the original KS93 formalism under the assumption that $g\sim \gamma$ (i.e., $\kappa \ll 1$) in the very weak gravitational lensing regime. Obviously, the condition $\kappa \ll 1$ is invalid in the typical cluster environment. Several suggestions are present in the literature to implement the nonlinearity. For example, \citet{Seitz:1995dq} suggest an iterative procedure by updating $\gamma$ in equation~(\ref{eqn:shear2kappa}) with the information on $\kappa$ in the previous step. One drawback in this approach might be noise amplification through the iteration. Therefore, some authors propose maximum likelihood-based methods with some regularization constraints \citep[e.g.,][]{Seitz:1998mg,bradac2004,jee2007}. However, the fundamental limitation is that one needs $\kappa$ on an absolute scale in order to correctly address the nonlinearity $g=\gamma/(1-\kappa)$. That is, the nonlinearity problem cannot be addressed in isolation. In CNN-based deep learning algorithms, these nonlinear issues are routinely addressed, and many applications turn out to be promising \citep[see, e.g.,][and references therein]{LIMK,MJU,RZGT}. In fact, the development of the CNN algorithm is motivated to address nonlinear problems such as denoising, image restoration, deconvolution, super-resolution, medical image reconstruction, holographic image reconstruction and so on. Therefore, it is not surprising to observe that combined with the mass-sheet degeneracy lifting capability, our CNN mass reconstruction significantly outperforms the original KS93 method. \subsection{Test with Real Observations: Application to the El Gordo Cluster Data} \begin{figure*} \plotone{elGordo_cnn.pdf} \caption{Application of our CNN mass reconstruction to the \emph{El Gordo} cluster. We use the {\it HST} WL catalog of \cite{Kim2021}. The left panel shows the mass reconstruction based on the KS93 algorithm. The CNN mass map in the middle panel is the average of the results from our 10 independent runs, which are also used to estimate the standard deviation shown in the right panel. Despite the differences between the training datasets and the El Gordo data, the CNN algorithm significantly outperforms the KS93 method in terms of the dynamical range representation, noise suppression, and substructure resolution. } \label{fig:visual_elGordo} \end{figure*} We have demonstrated that our CNN method can successfully reconstruct the projected mass maps from WL galaxy shears with the overall performance significantly better than that of the classical KS93 algorithm. Now one of the important questions is how well the current CNN method would work given real observational data, where a number of additional issues such as shear calibration errors, instrumental signatures, photometric redshift systematics, etc. are present. With further development in deep learning and astronomical image generation tools, these issues may become tractable through end-to-end WL simulations in the future. Here we apply our CNN method to the {\it HST} WL data for the high-redshift merging cluster ``El Gordo" \citep{menanteau2014,jee2014}. Within the current scope, we are interested in investigating the performance of our CNN method given the difference between the training data set and the real data in the following three aspects. First, our training was performed with the specific $32\arcmin \times 32 \arcmin$ field size whereas the {\it HST} field size ($\raise.19ex\hbox{$\scriptstyle\sim$} 9\arcmin\times9\arcmin$) of the El Gordo data is smaller by a few factors. Second, the training is done by assuming that every source galaxy has an identical source redshift. Obviously, the source population in the El Gordo field comes from a wide range of redshifts and more importantly contains a significant fraction of non-background (contamination from cluster members and foreground objects) galaxies. Third, the source density in the training data set is 25 per sq. arcmin, approximately a factor of four lower than the source density ($\mytilde100$ per sq. arcmin) in the {\it HST} observation of El Gordo. Our HST catalog for El Gordo is provided by \cite{Kim2021}, who studied the cluster with a new wide-field HST imaging data set (PROP ID: 14153, PI. Hughes). Readers are referred to \cite{Kim2021} for details in the observation setup and reduction methods. In brief, the cluster was observed in four different programs (PROP IDs: 12477, 12755, 14096, and 14153). The entire field of view of the data with the addition of the last program (PROP ID: 14153) is $\mytilde119$ sq. arcmin, which covers the cluster beyond the virial radius $r_{200}\sim2$~Mpc. With the combination of all existing programs, the resulting average source density is $\mytilde95$ per sq. arcmin. Figure~\ref{fig:visual_elGordo} displays the reconstructed mass map of El Gordo cluster from our CNN model. The comparison with the KS93 version indicates that the advantages of the CNN method demonstrated in \textsection\ref{sec:results} with the simulated catalogs also manifest themselves here. First, the dynamical range of $\kappa$ is more realistic in the CNN version. El Gordo is one of the extremely massive clusters in the universe, and the projected convergence value should be $\kappa\gtrsim0.4$ in the central region based on the effective source redshift of $\mytilde1.2$ \citep{Kim2021} and the redshift of the cluster 0.87. The range of the convergence value in the CNN mass map is consistent with this expectation, although the relatively small field size does not allow us to lift the mass-sheet degeneracy completely. On the other hand, the peak convergence value in the KS93 case is too small. Second, the KS93 inversion generates a number of spurious features in the outskirts whereas the CNN mass reconstruction efficiently suppresses these fluctuations. Currently, our multiwavelength data from X-ray to radio do not support the possibility that the features seen in the KS93 map might be real. Third, the two mass peaks are better resolved in the CNN mass reconstruction. In the KS93 mass map, although one can see the presence of the two mass maps, there exists a ``bridge" connecting the two mass peaks. Again, the existence of such a connecting substructure is not supported by our data. \subsection{Null Test} \label{sec:null_test} Although we take measures to prevent our CNN from learning that a cluster is always at the field center, our subsampling scheme for the generation of the training dataset described in \ref{sec:cnn_architecture} still places the cluster always within the central $\mytilde8.4$\% of the field ($\mytilde30$\% in each dimension). Therefore, our CNN model constructed from this training dataset is expected to cause overestimation of the convergence in the central region. In order to quantify the bias, we performed a null test by generating 1000 random galaxy catalogs for the null ($\kappa=0$) field and reconstructing the corresponding convergence fields with both the CNN and KS93 methods. We measured the projected mass from each convergence map using the $r=10$ pixel circular aperture placed at the field center. Figure~\ref{fig:convergence_bias} compares the distributions of the masses from CNN and KS93. The KS93 result shows that the distribution is roughly symmetric around zero. On the other hand, our CNN-based mass clearly shows positive skewness. This null test demonstrates that our CNN leads to overestimation of the convergence in the central region. Although not shown in Figure~\ref{fig:convergence_bias}, we verify that the bias gradually decreases as we move the location of the aperture toward the edges. We stress that this level of bias is insignificant in individual cluster mass estimation. For example, the projected mass at the high-end tail of the CNN distribution $M_{\rm pred}^{\rm cl}\sim 10$ corresponds to a cluster mass of $M_{200} \sim 7\times10^{13} M_{\sun}$, which is below the detection limit in typical ground-based WL studies. Nevertheless, we believe that future studies can reduce the bias substantially by improving the subsampling method and/or including blank fields in the training dataset. \begin{figure} \plotone{convergence_bias.pdf} \caption{Cluster mass null nest. We performed this null test by generating 1000 random galaxy catalogs for the null ($\kappa=0$) field and reconstructing the corresponding convergence fields with both the CNN and KS93 methods. We measured the projected mass from the $r=10$ pixel ($\mytilde0.72$~Mpc) circular aperture placed at the field center. While the KS93 result shows that the distribution is roughly symmetric around zero, our CNN mass clearly shows positive skewness. However, even the cluster mass at the high-end tail ($M_{\rm pred}^{\rm cl}\sim 10$) corresponds to an insignificant cluster mass of $M_{200} \sim 7\times10^{13} M_{\sun}$, which is below the typical WL detection limit.} \label{fig:convergence_bias} \end{figure} \section{Conclusion} \label{sec:conclusion} In this paper, we have introduced a new WL mass reconstruction method based on CNN algorithms. Our CNN architecture consists of a series of 2D convolution and transposed-convolution layers with implementation of skip-connections between the input and the output of the convolution-transposed-convolution layers via multiplication operation. We generate training data sets using the ray-tracing data from cosmological simulations while the statistical properties of the source galaxies are designed to match those in our typical WL studies with Subaru/Suprime-Cam images. Compared with the original KS93 inversion, our CNN method produces significantly improved results. The merits include enhancement in restoration of the dynamical range, agreement with the truth in both pixel-by-pixel and cluster mass comparisons, centroid determination, and noise suppression. In particular, it is remarkable that the slope of the recovered mass to the truth becomes consistent ($0.867^{+0.327}_{-0.296}$) with unity for the test sample. The slope is much lower ($0.484^{+0.218}_{-0.149}$) when we use the KS93 results instead. Also, we find that the centroid estimation based on the CNN result is much more stable in the low-mass regime. We attribute these improvements to the efficient handling of the nonlinearity and degeneracy in our CNN algorithm, which however have been plaguing the traditional mass reconstruction methods. The performance of our CNN algorithm somewhat degrades when a bright-star masking is fortuitously placed near the cluster center. Nevertheless, we find that the CNN reconstruction can still recover the cluster mass peak in most cases and the overall performance is still better than the KS93 results. We tested our CNN model using the {\it HST} WL catalog of the El Gordo cluster. Despite the difference between our training data set and the real data in field size, source density, and redshift distribution, the CNN method clearly resolves the two mass clumps of the merging cluster in excellent agreement with the cluster member distribution while suppressing the noise fluctuation in the outskirts. Our study is the first implementation of WL mass reconstruction with CNN methods. Although further refinements in both algorithm and simulation are needed before we use the method for quantitative characterization of galaxy clusters, the result from this pilot study looks promising. One immediate application without the further improvements is shear-based galaxy cluster detection. Among the various selection methods, the shear-based galaxy cluster selection is unique in its ability to detect galaxy clusters with their projected masses. However, one of the most outstanding obstacles is the control of false positives due to noise fluctuation. As demonstrated throughout the paper, our CNN method suppresses this noise fluctuation efficiently while preserving the resolution in the high-density region, where the shear signal is high. In addition, since the projected $\kappa$ values are useful mass proxies, the CNN method can be used to provide the first classification of clusters according to their masses. Finally, the CNN-aided centroid determination and its comparison with other multiwavelength data can enhance our substructure identification and also reconstruction of merging scenarios in colliding clusters. \acknowledgments {The authors thank Inkyu Park, Cristiano Sabiu, David Parkinson, and Min-su Shin for helpful discussions. SEH, SP, and DB were (partly) supported by Basic Science Research Program through the National Research Foundation of Korea (NRF) funded by the Ministry of Education (2018\-R1\-A6\-A1\-A06\-024\-977). SEH was also partly supported by the project \begin{CJK}{UTF8}{mj}우주거대구조를 이용한 암흑우주 연구\end{CJK} (``Understanding Dark Universe Using Large Scale Structure of the Universe''), funded by the Ministry of Science. MJJ acknowledges support from the National Research Foundation of Korea under the program nos. 2017R1A2B2004644 and 2017R1A4A1015178. DB was also supported by NRF Grant 2020\-R1\-A2\-B5\-B01\-001\-473. This work was also supported by the Korean Astronomy Machine Learning (KAML) working group. This work is based on observations made with the NASA/ESA Hubble Space Telescope and operated by the Association of Universities for Research in Astronomy, Inc. under NASA contract NAS 5-2655. Computational data were transferred through a high-speed network provided by the Korea Research Environment Open NETwork (KREONET). We thank the Columbia Lensing group (\url{http://columbialensing.org}) for making their simulations available. The creation of these simulations is supported through grants NSF AST-1210877, NSF AST-140041, and NASA ATP-80NSSC18K1093. We thank New Mexico State University (USA) and Instituto de Astrofisica de Andalucia CSIC (Spain) for hosting the Skies \& Universes site for cosmological simulation products.} \software{Astropy \citep{astropy2013}, Keras \citep{keras2015}, Matplotlib \citep{matplotlib2007}, NumPy/SciPy \citep{scipy2020}, Pandas \citep{pandas2010}, SExtractor \citep{bertin1996}, \deleted{Theano \citep{theano2016},} Tensorflow \citep{tensorflow2015}} \facility{HST (ACT)}
\section{Modeling the Human Auditory System} \label{sec:approach} We now motivate and explain our design to better align the \ac{ASR} system with human perception. Our approach is based on the fact that the human auditory system only uses a subset of the information contained in an audio signal to form an understanding of its content. In contrast, \ac{ASR} systems are not limited to specific input ranges and utilize every available signal -- even those \emph{inaudible} for the human auditory system. Consequently, an attacker can easily hide changes within those ranges. Intuitively, the smaller the overlap between these two worlds, the harder it becomes for an attacker to add malicious perturbations that are inaudible to a human listener. This is akin to reducing the attack surface in traditional systems security. \vspace{0.25em} To tackle these issues, we leverage the following two design principles in our approach: \begin{itemize} \item[(i)] \emph{Removing inaudible parts:} As discussed in Section~\ref{sec:psychoacoustic-modeling}, audio signals typically carry information imperceptible to human listeners. Thus, before passing the input to the network, we utilize psychoacoustic modeling to remove these parts. \item[(ii)] \emph{Restricting frequency access:} The human voice frequency range is limited to a band of approximately $300-5000\,Hz$~\cite{monson-14-perceptual}. Thus, we implement a band-pass filter between the feature extraction and model stage (cf.\@\xspace Section~\ref{sec:background:asr}) to restrict the acoustic model to the appropriate frequencies. \end{itemize} \subsection{Implementation} \label{sec:approach:implementation} In the following, we present an overview of the implementation of our proposed augmentations. We extend the state-of-the-art \ac{ASR} toolkit \textsc{Kaldi}\xspace with our augmentations to build a prototype implementation called \textsc{Dompteur}\xspace. Note that our proposed methods are universal and can be applied to \emph{any} \ac{ASR} system. \paragraph{Psychoacoustic Filtering} \label{sec:psychoacoustic-filtering} Based on the psychoacoustic model of MPEG-1 \cite{iso-93-part3}, we use psychoacoustic hearing thresholds to remove parts of the audio that are not perceivable to humans. These thresholds define how dependencies between certain frequencies can mask, i.e., make inaudible, other parts of an audio signal. Intuitively, these parts of the signal should not contribute any information to the recognizer. They do, however, provide space for an attacker to hide adversarial noise. We compare the absolute values of the complex valued \ac{STFT} representation of the audio signal~$\mathbf{S}$ with the hearing thresholds~$\mathbf{H}$ and define a mask via \begin{equation} \mathbf{M}(n, k) = \begin{cases} 0 & \quad \text{if } \mathbf{S}(n,k) \leq \mathbf{H}(n,k) + \Phi \\ 1 & \quad \text{else} \end{cases}, \label{eq:hearing} \end{equation} with $n = 0, \dots ,N - 1 $ and $ k = 0, \dots ,K - 1$. We use the parameter~$\Phi$ to control the effect of the hearing thresholds. For $\Phi=0$, we use the original hearing threshold, for higher values we use a more aggressive filtering, and for smaller values we retain more from the original signal. We explore this in detail in Section~\ref{sec:evaluation}. We then multiply all values of the signal~$\mathbf{S}$ with the mask~$\mathbf{M}$ \begin{equation} \mathbf{T} = \mathbf{S} \odot \mathbf{M}, \label{eq:psycho} \end{equation} to obtain the filtered signal $\mathbf{T}$. \paragraph{Band-Pass Filter} High and low frequencies are not part of human speech and do not contribute significant information. Yet, they can again provide space for an attacker to hide adversarial noise. For this reason, we remove low and high frequencies of the audio signal in the frequency domain. We apply a band-pass filter after the feature extraction of the system by discarding those frequencies that are smaller or larger than certain thresholds (the so-called cut-off frequencies). Formally, the filtering can be described via \begin{equation} \mathbf{T}(n,k) = 0 \quad \forall \, f_{\text{max}} < k < f_{\text{min}}, \end{equation} where $f_{\text{max}}$ and $f_{\text{min}}$ describe the lower and the upper cut-off frequencies of the band-pass. \subsection{Attacker Model} \label{sec:approach:attacker} While some of our augmentations improve the \ac{ASR} system's overall performance, we are specifically interested in its performance against adversarial perturbations. To achieve any meaningful results, we believe the attacker needs to have \emph{complete} control over the input. Following guidelines recently established by Carlini~et~al.\@\xspace{}~\cite{carlini-19-evaluating}, we embark from theoretical attack vectors towards the definition of a realistic threat model, capturing real-world capabilities of attackers. The key underlying insight is that the amount of perturbations caused by a real-world attack cannot be limited. This is easy to see: in the worst case, the attacker can always force the target output by replacing the input with the corresponding audio command. Note that this, in turn, implies that we cannot completely prevent adversarial attacks \emph{without} also restricting benign inputs. We can also not rely on obfuscation. Previous works have successfully shown so-called parameter-stealing attacks, which build an approximation of a black-box system~\cite{ilyas-17-blackbox, papernot-16-transferability, tramer-16-stealing, papernot-17-blackbox, wang-18-stealing}. Since an attacker has full control over this approximated model, they can utilize powerful white-box attacks against it, which transfer to the black-box model.\smallskip In summary, we use the following attacker model: \begin{itemize \item \emph{Attacker Knowledge:} Following Kerckhoffs' principle~\cite{kerckhoffs-83-cryptographic}, we consider a \emph{white-box} scenario, where the attacker has complete knowledge of the system, including all model parameters, training data, etc. \item\emph{Attacker Goals:} To maximize practical impact, we assume a targeted attack, i.\,e.,\xspace the attacker attempts to perturb a given input $x$ to fool a speech recognition system into outputting a false, \emph{attacker-controlled} target transcription $y'$ based on Equation~\eqref{eq:1}. \item \emph{Attacker Capabilities:} The attacker is granted complete control over the input, and we explicitly do not restrict them in any way on how $\delta$ should be crafted. Note, however, that $\delta$ is commonly minimized during computation according to some distance metric. For example, by measuring the \emph{perceived} noise, an attacker might try to minimize the conspicuousness of their attack~\cite{schoenherr-19-psychoacoustics}. \end{itemize} We choose this attacker model with the following in mind: We aim to limit the attacker, not in the amount of applied perturbations, but rather confine the nature of perturbations themselves. In particular, we want adversarial perturbations to be clearly perceptible by humans and, thus, strongly perturb the initial input such that the added noise becomes audible for a human listener. In this case, an attack---although still viable---significantly loses its malicious impact in practice. \section{Conclusion} In this work, we proposed a broadly applicable design principle for \ac{ASR} systems that enables them to resemble the human auditory system more closely. To demonstrate the principle, we implemented a prototype of our approach in a tool called \textsc{Dompteur}\xspace. More specifically, we augment \textsc{Kaldi}\xspace using psychoacoustic filtering in conjunction with a band-pass filter. In several experiments, we demonstrate that our method renders our system more robust against adversarial examples, while retaining a high accuracy on benign audio input. We have argued that an attacker can find adversarial examples for any kind of countermeasure, particularly if we assume the attack to have full white-box access to the system. Specifically, we have calculated adversarial examples for \textsc{Dompteur}\xspace via an adaptive attack, which leverages the full knowledge of the proposed countermeasures. Although this attack is successful in computing adversarial examples, we show that the attack becomes much less effective. More importantly, we find that adversarial examples are of poor quality, as demonstrated by the \ac{SNRseg} and our listening test. In summary, we have taken the first steps towards bridging the gap between human expectations and the reality of \ac{ASR}~systems---hence taming adversarial attacks to a certain extent by robbing them of their stealth abilities. \section{Evaluation} \label{sec:evaluation} With the help of the following experiments, we empirically verify and assess our proposed approach according to the following three main aspects: \begin{itemize \item[(i)] \emph{Benign Performance.} The augmentation of the system should impair the performance on benign input as little as possible. We analyze different parameter combinations for the psychoacoustics and our band-pass filter to show that our augmented model retains its practical use. \item[(ii)] \emph{Adaptive Attacker.} To analyze the efficacy of the augmented system, we construct and assess its robustness against adversarial examples generated by a strong attacker with white-box access to the system. This attacker is aware of our augmentations and \emph{actively} factors them into the optimization. \item[(iii)] \emph{Listening Test.} Finally, we verify the success of our method by a crowd-sourced user study. We conduct a listening test, investigating the quality (i.e., the inconspicuousness) of the adversarial examples computed from the adaptive attacker against the augmented \ac{ASR} system. \end{itemize} All experiments were performed on a server running Ubuntu 18.04, with 128 GB RAM, an Intel Xeon Gold 6130 CPU, and four Nvidia GeForce RTX 2080 Ti. For our experiments, we use \textsc{Kaldi}\xspace in version 5.3 and train the system with the default settings from the \ac{WSJ} training recipe. \subsection{Metrics} To assess the quality of adversarial examples both in terms of efficacy and inconspicuousness, we use two standard measures. \paragraph{Word Error Rate (WER)} The \ac{WER} is computed based on the Levenshtein distance~\cite{navarro-01-levenshtein}, which describes the \emph{edit distance} between the reference transcription and the ASR output (i.e., the minimum number of edits required to transform the output text of the \ac{ASR} system into the correct text). We compute the Levenshtein distance $\mathcal{L}$ as the sum over all substituted words $S$, inserted words $I$, and deleted words~$D$: $$\text{WER} = 100 \cdot \frac{\mathcal{L}}{N} = 100 \cdot \frac{S + D + I}{N},$$ where $N$ is the total number of words of the reference text. The smaller the \ac{WER}, the fewer errors were made by the \ac{ASR} system. To evaluate the efficacy of adversarial examples, we measure the \ac{WER} between the adversarial target transcription and the output of the \ac{ASR} system. Thus, a \emph{successful adversarial example} has a \ac{WER} of 0\,\%, i.\,e.,\xspace fully matching the desired target description~$y'$. Note that the \ac{WER} can also reach values above 100\,\,\%, e.\,g., when many words are inserted. This can especially happen with unsuccessful adversarial examples, where mostly the original text is transcribed, which leads to many insertions. \paragraph{Segmental Signal-to-Noise Ratio (SNRseg)} The \ac{WER} can only measure the success of an adversarial example in fooling an \ac{ASR} system. For a real attack, we are also interested in the (in-)\,conspicuousness of adversarial examples, i.\,e.,\xspace the level of the added perturbations. For this purpose, we quantify the changes that an attacker applies to the audio signal. Specifically, we use the \ac{SNR} to measure the added perturbations. More precisely, we compute the \ac{SNRseg} \cite{voran-1995-perception, yang-99-enhancedmb}, a more accurate measure of distortion than the \ac{SNR}, when signals are aligned \cite{yang-99-enhancedmb}. Given the original audio signal $x(t)$ and the adversarial perturbations $\sigma(t)$ defined over the sample index $t$, the \ac{SNRseg} can be computed via $$\text{SNRseg(dB)} = \dfrac{10}{K} \sum_{k=0}^{K-1} \log _{10} \frac{\sum_{t=Tk}^{Tk+T-1} x^2(t)}{\sum_{t=Tk}^{Tk+T-1} \sigma^2 (t)},$$ with $T$ being the number of samples in a segment and $K$ the total number of segments. For our experiments, we set the segment length to 16\,ms, which corresponds to $T = 256$ samples for a 16\,kHz sampling rate. The \emph{higher} the \ac{SNRseg}, the \emph{less} noise has been added to the audio signal. Hence, an adversarial example is considered less conspicuous for higher \ac{SNRseg} values. Note that we use the \ac{SNRseg} ratio only as an approximation for the perceived noise. We perform a listening test with humans for a realistic assessment and show that the results of the listening test correlate with the reported \ac{SNRseg} (cf. Section~\ref{sec:user-study}). \input{includes/figure-benign-accuracy-bandpass-heatmap} \subsection{Benign Performance} \label{sec:benign-performance} Our goal is to preserve accuracy on benign inputs (i.\,e.,\xspace non-malicious, unaltered speech) while simultaneously impeding an attacker as much as possible. To retain that accuracy as much as possible, the parameters of the band-pass, and the psychoacoustic filter need to be carefully adjusted. Note that adversarial robustness is generally correlated with a loss in accuracy for image classification models~\cite{tsipras-19-robustness}. Accordingly, we assume that higher adversarial robustness likely incurs a trade-off on benign input performance. All models in this section are trained with the default settings for the \emph{Wall Street Journal} (WSJ) training recipe of the \textsc{Kaldi}\xspace toolkit \cite{povey-11-kaldi}. The corresponding \ac{WSJ}-based speech corpus \cite{paul-92-wsj} contains approximately 81 hours of training data and consists of uttered sentences from the Wall Street Journal. We train three models for each configuration and report the WER on the test set for the model with the best performance. For the test set, we use the \texttt{eval92} subset consisting of 333 utterances with a combined length of approximately 42 minutes. \paragraph{Band-Pass Filtering} The band-pass filter limits the signal's frequency range by removing frequencies below and above certain thresholds. Our goal is to remove parts of the audio that are not used by the human voice. We treat these values as classical hyperparameters and select the best performing combination by grid searching over different cut-off frequencies; for each combination, we train a model from scratch, using the training procedure outlined above. The results are depicted in Figure~\ref{fig:benign-accuracy-bandpass-heatmap}. If we narrow the filtered band (i.\,e.,\xspace remove more information), the WER gradually increases and, therefore, worsens the recognizer's accuracy. However, for many cases, even when removing a significant fraction of the signal, the augmented system either achieves comparable results or even surpasses the baseline (WER $5.90\,\%$). In the best case, we reach an improvement by $0.35\,\%$ percentage points to a WER of $5.55\,\%$ (200\,Hz-7000\,Hz). This serves as evidence that the unmodified input contains signals that are not needed for transcription. In Section~\ref{sec:narrower-band}, we further confirm this insight by analyzing models with narrower bands. We hypothesize that incorporating a band-pass filter might generally improve the performance of \ac{ASR} systems but note that further research on this is needed. For the remaining experiments, if not indicated otherwise, we use the 200-7000\,Hz band-pass. \paragraph{Psychoacoustic Filtering} The band-pass filter allows us to remove high- and low-frequency parts of the signal; however, the attacker can still hide within this band in inaudible ranges. Therefore, we use psychoacoustic filtering as described in Section~\ref{sec:psychoacoustic-filtering} to remove these parts in the signal. We evaluate different settings for $\Phi$ from Equation~\eqref{eq:hearing} -- by increasing $\Phi$, we artificially increase the hearing thresholds, resulting in more aggressive filtering. We plot the results in Figure~\ref{fig:benign-accuracy-phi} for both psychoacoustic filtering and a baseline WER, with and without band-pass, respectively. The WER increases with increasing $\Phi$, i.\,e.,\xspace the performance drops if more of the signal is removed, independent of the band-pass filter. \input{includes/table-benign-accuracy} \input{includes/figure-benign-accuracy-phi} When we use no band-pass filter, the WER increases from $5.90\,\%$ (baseline) to $6.50\,\%$ for $\Phi = 0$\,dB, which is equivalent to removing everything below the human hearing thresholds. When we use more aggressive filtering---which results in better adversarial robustness (cf.\@\xspace Section~\ref{sec:adaptive_attack})---the WER increases up to $8.05\,\%$ for $\Phi = 14$\,dB. Note that the benefits of the band-pass filter remain even in the presence of psychoacoustic filtering and results in improving the WER to $6.10\,\,\%$ ($\Phi = 0$\,dB) and $7.83\,\,\%$ ($\Phi = 14$\,dB). We take this as another sign that a band-pass filter might generally be applicable to \ac{ASR} systems. \paragraph{Cross-Model Benign Accuracy} Finally, we want to evaluate if \textsc{Dompteur}\xspace indeed only uses relevant information. To test this hypothesis, we compare three different models. One completely unaugmented model (i.\,e.,\xspace an unmodified version of \textsc{Kaldi}\xspace), one model trained with psychoacoustics filtering, and one model trained with both psychoacoustics filtering and a band-pass filter. We feed these models two types of inputs: (i) \emph{standard inputs}, i.\,e.,\xspace inputs directly lifted from the WSJ training set, and (ii) \emph{processed inputs}, these inputs are processed by our psychoacoustic filtering. If our intuitive understanding is correct and \textsc{Dompteur}\xspace does indeed learn a better model of the human auditory system, it should retain a low WER even when presented with non-filtered input. Thus, the model has learned to \emph{ignore} unnecessary parts of the input. The results are shown in Table~\ref{table:benign-accuracy} and match our hypothesis: \textsc{Dompteur}\xspace{}'s performance only drops slightly ($6.10\,\% \to 6.33\,\%$) when presented with unfiltered input or does even improve if the band-pass is disabled ($6.50\,\% \to 6.20\,\%$). \textsc{Kaldi}\xspace, on the other hand, heavily relies on this information when transcribing audio, increasing its WER by $2.84$ percentage point ($5.90\,\% \to 8.74\,\%$). Thus, the results further substantiate our intuition that we filter only irrelevant information with our~approach. \input{includes/figure-attack-itr} \subsection{Adaptive Attacker} \label{sec:adaptive_attack} \input{includes/table-adaptive-attack} We now want to evaluate how robust \textsc{Dompteur}\xspace is against adversarial examples. We construct a strong attacker with complete knowledge about the system and, in particular, our modifications. Ultimately, this allows us to create successfully adversarial examples. However, as inaudible ranges are removed, the attacker is now forced into human-perceptible ranges, and, consequently, the attack loses much of its malicious impact. We provide further support for this claim in Section~\ref{sec:user-study} by performing a user study to measure the perceived quality of adversarial examples computed with this~attack. \paragraph{Attack.} We base our evaluation on the attack by~Sch{\"o}nherr~et~al.\@\xspace~\cite{schoenherr-19-psychoacoustics}, which presented a strong attack that works with~\textsc{Kaldi}\xspace. Recent results show that it is crucial to design adaptive attacks as simple as possible while simultaneously resolving any obstacles for the optimization \cite{tramer-20-adaptiveattacks}. To design such an attacker against \textsc{Dompteur}\xspace, we need to adjust the attack to consider the augmentations in the optimization. Therefore, we extend the baseline attack against \textsc{Kaldi}\xspace to include both the band-pass and psychoacoustic filter into the computation. This allows the attacker to compute gradients for the entire model in a white-box fashion. More specifically, we extend the gradient descent step s.t.~(i) the band-pass filter and (ii) the psychoacoustic filter component back-propagates the gradient respectively. \begin{itemize} \item[(i)] \emph{Band-Pass Filter.} For the band-pass filter we remove those frequencies that are smaller and larger than the cut-off frequencies of the band-pass filter. This is also applied to the gradients of the back propagated gradient to ignore changes that will fall into ranges of the removed signal \begin{equation} \nabla_{\mathbf{T}(n,k)} = 0 \quad \forall f_{\text{max}} < k < f_{\text{min}}. \end{equation} % \item[(ii)] \emph{Psychoacoustic Filter.} The same principle is used for the psychoacoustic filtering, where we use the mask $\mathbf{M}$ to zero out components of the signal that the network will not process % \begin{equation} \nabla_{\mathbf{S}} = \nabla_{\mathbf{T}} \odot \mathbf{M}. \end{equation} % \end{itemize} \input{includes/figure-spectograms} \paragraph{Experimental Setup.} We evaluate the attack against different versions of \textsc{Dompteur}\xspace. Each model uses a $200-7000\,Hz$ band-pass filter, and we vary the degrees of the psychoacoustic filtering ($\Phi \in \{0, 3, 6, 9, 12, 13, 14\}$). We compare the results against two baselines to evaluate the inconspicuousness of the created adversarial examples. First, we run the attack of Sch{\"o}nherr~et~al.\@\xspace without psychoacoustic hiding against an unaltered version \textsc{Kaldi}\xspace. Second, we re-enable psychoacoustic hiding and run the original attack against \textsc{Kaldi}\xspace, to generate state-of-the-art inaudible adversarial examples. As a sanity check, we also ran the original attack (i.\,e.,\xspace with psychoacoustic hiding) against \textsc{Dompteur}\xspace. As expected, this attack did not create any adversarial examples since we filter the explicit ranges the attacker wants to utilize. As a target for all configurations, we select 50 utterances with an approximate length of 5s from the WSJ speech corpus test set \texttt{eval92}. The exact subset can be found in appendix \ref{app:targets}. We use the same target sentence \emph{send secret financial report} for all samples. These parameters are chosen such that an attacker needs to introduce \raisebox{0.5ex}{\texttildelow}$4.8$ phones per second into the target audio, which Sch{\"o}nherr~et~al.\@\xspace suggests as both effective and efficiently possible \cite{schoenherr-19-psychoacoustics}. Furthermore, we picked the utterances and target sentence to be \emph{easy} for an attacker in order to decouple the influence on our analysis. Specifically, for these targets the baseline has a very high success rate and low SNRseg (cf. Table \ref{table:adaptive-attack}). Note that the attack is capable of introducing arbitrary target sentences (up to a certain length). In Section \ref{sec:target-phone-rate}, we further analyze the influence of the phone~rate, and in particular, the influence of the target utterance and sentence on the SNRseg. We compute adversarial examples for different learning rates and a maximum of 2000 iterations. This number is sufficient for the attack to converge, as shown in Figure \ref{fig:attack-itr}, where the WER is plotted as a function of the number of iterations. \paragraph{Results.} The main results are summarized in Table~\ref{table:adaptive-attack}. We report the average SNRseg over all adversarial examples, the best ($\text{SNRseg}_\text{max}$), and the number of successful adversarial examples created. We evaluate the attack using different learning rates ($0.05$, $0.10$, $0.5$, and $1$). In our experiments, we observed that while small learning rates generally produce less noisy adversarial examples, they simultaneously get more stuck in local optima. Thus, to simulate an attacker that would run an extensive search and uses the best result we also report the intersection of successful adversarial examples over all learning rates. If success rate is the primary goal, we recommend a higher learning rate. By increasing $\Phi$, we can successfully force the attacker into audible ranges while also decreasing the attack's success rate. When using very aggressive filtering ($\Phi=14$), we can prevent the creation of adversarial examples completely, albeit with a hit on the benign WER ($5.55\,\% \to 7.83\,\%$). Note, however, that we only examined 50 samples of the test corpus, and other samples might still produce valid adversarial examples. We see that adversarial examples for the augmented systems are more distorted for all configurations compared to the baselines. When using $\Phi \geq 12$, we force a negative SNRseg for all learning rates. For these adversarial examples, the noise (i.\,e.,\xspace adversarial perturbations) energy exceeds the energy of the signal. With respect to the baselines, the noise energy increases on average by 21.42\,dB (without psychoacoustic hiding) and 24.33\,dB (with hiding enabled). This means there is, on average, ten times more energy in the adversarial perturbations than in the original audio signal. A graphical illustration can be found in Figure~\ref{fig:spectogram}, where we plot the power spectra of different adversarial examples compared to the original signal. \subsubsection{Non-speech Audio Content} \input{includes/table-audio-content} The task of an ASR system is to transcribe audio files with spoken content. An attacker, however, might pick other content, i.e., music or ambient noise, to obfuscate his hidden commands. Thus, we additionally evaluated adversarial examples based on audio files containing music and bird sounds. The results are presented in Table~\ref{table:audio-content}. We can repeat our observations from the previous experiment. When we utilize a more aggressive filter, we observe that the perturbation energy of adversarial examples increases with respect to the baselines by up to 24.08 dB (birds) and 21.32 dB (music). Equally, the attack's general success decreases to 5/50 (birds) and 3/50 (music) successful adversarial examples. Note that the SNRseg for music samples are in general higher than that of speech and bird files as these samples have a more dynamic range of signal energy. Hence, potentially added adversarial perturbations have a smaller impact on the calculation of the SNRseg. The absolute amount of added perturbations, however, is similar to that of other content. Thus, when listening to the created adversarial examples\footnote{~\href{https://rub-syssec.github.io/dompteur/}{rub-syssec.github.io/dompteur}} the samples are similarly distorted. This is further confirmed in Section~\ref{sec:user-study} with our listening test. \subsubsection{Target Phone Rate} \label{sec:target-phone-rate} \input{includes/figure-phone-rate} \input{includes/table-bandpass} The success of the attack depends on the ratio between the length of the audio file and the length of the target text, which we refer to as the \emph{target phone rate}. This rate describes how many phones an attacker can hide within one second of audio content. In our experiments, we used the default ratios recommended by Sch{\"o}nherr et~al.\@\xspace However, a better rate might exist for our setting. Therefore, to evaluate the effect of the target phone rate, we sample target texts of varying lengths from the WSJ corpus and compute adversarial examples for different target phone rates. We pick phone rates ranging from 1 to 20 and run 20 attacks for each of them for at most 1000 iterations, resulting in 400 attacks. The results in Figure~\ref{fig:phone-rates} show that, in general, with increasing phone rates, the SNRseg decreases and stagnates for target phone rate beyond 12. This is expected as the attacker tries to hide more phones and, consequently, needs to change the signal more drastically. Thus, we conclude that the default settings are adequate for our setting. \subsubsection{Band-Pass Cut-off Frequencies} \label{sec:narrower-band} So far, we only considered a relatively wide band-pass filter (200-7000\,Hz). We also want to investigate other cut-off frequencies. Thus, we disable the psychoacoustic filtering and compute adversarial examples for different models examined in Section~\ref{sec:benign-performance}. We run the attack for each band-pass model with 20 speech samples for at most 1000 iterations. The results are reported in Table~\ref{table:bandpass}. We observe that the energy amount of adversarial perturbation remains relatively constant for different filters, which is expected since the attacker has complete knowledge of the system. As we narrow the frequency band, the attacker adopts and puts more perturbation within these bands. Apart from the SNRseg, we also observe a decrease in the attack success, especially for small high cut-off frequencies, with only 11/20 (300-3000\,Hz) and 12/20 (500-3000\,Hz) successful adversarial examples. \section{Technical Background} \label{sec:background} In the following, we discuss the background necessary to understand our augmentation of the \ac{ASR} system. For this purpose, we briefly introduce the fundamental concepts of \ac{ASR}s and give an overview of adversarial examples. Since our approach fundamentally relies on psychoacoustic modeling, we also explain masking effects in human perception. \vspace{-0.5em} \paragraph{Speech Recognition} \label{sec:background:asr} \ac{ASR} constitutes the computational core of today's voice interfaces. Given an audio signal, the task of an \ac{ASR} system is to transcribe any spoken content automatically. For this purpose, traditionally, purely statistical models were used. They now have been replaced by modern systems based on deep learning methods~\cite{bourlard-94-connectionist, hannun-14-deepspeech, graves-14-speech}, often in the form of hybrid neural/statistical models~\cite{kang-18-recurrent}. In this paper, we consider the open-source toolkit \textsc{Kaldi}\xspace~\cite{povey-11-kaldi} as an example of such a modern hybrid system. Its high performance on many benchmark tasks has led to its broad use throughout the research community as well as in commercial products like e.\,g.,\xspace Amazon's Alexa~\cite{du-16-chime-4, kanda-18-chime-5, medennikov-18-chime-5}. \textsc{Kaldi}\xspace, and similar DNN/HMM hybrid systems can generally be described as three-stage systems: \begin{enumerate \item \textit{Feature Extraction.} For the feature extraction, a frame-wise \ac{DFT} is performed on the raw audio data to retrieve a frequency representation of the input signal. The input features of the \ac{DNN} are often given by the log-scaled magnitudes of the \ac{DFT}-transformed signal. % \item \textit{Acoustic Model \ac{DNN}.} The \ac{DNN} acts as the \emph{acoustic model} of the \ac{ASR} system. It calculates the probabilities for each of the distinct speech sounds (called \emph{phones}) of its trained language being present in each time frame from its \ac{DFT} input features. Alternatively, it may compute probabilities, not of phones, but of so-called \emph{clustered tri-phones} or, more generally, of data-driven units termed \emph{senones}. % \item \textit{Decoding.} The output matrix of the \ac{DNN} is used together with an \ac{HMM}-based language model to find the most likely sequence of words, i.\,e.,\xspace the most probable transcription. For this purpose, a dynamic programming algorithm, e.g., Viterbi decoding, is used to search the best path through the underlying \ac{HMM}. The language model describes the probabilities of word sequences, and the acoustic model output gives the probability of being in each \ac{HMM} state at each time. \end{enumerate} \paragraph{Psychoacoustic Modeling} \label{sec:psychoacoustic-modeling} \input{includes/figure-psycho} Recent attacks against \ac{ASR} systems exploit intrinsics of the human auditory system to make adversarial examples less conspicuous \cite{schoenherr-19-psychoacoustics, qin-19-robust, abdullah-19-practical, szurley-19-perceptual}. Specifically, these attacks utilize limitations of human perception to hide modifications of the input audio signal within inaudible ranges. We use the same effects for our approach to \emph{remove} inaudible components from the input \begin{itemize} \item \textit{Absolute Hearing Threshold.} Human listeners can only perceive sounds in a limited frequency range, which diminishes with age. Moreover, for each frequency, the sound pressure is important to determine whether the signal component is in the audible range for humans. Measuring the \emph{hearing thresholds}, i.\,e.,\xspace the necessary sound pressures for each frequency to be audible in otherwise quiet environments, one can determine the so-called \emph{absolute hearing threshold} as depicted in Figure~\ref{fig:threshold_mask}. Generally speaking, everything above the \emph{absolute hearing thresholds} is perceptible in principle by humans, which is not the case for the area under the curve. As can be seen, much more energy is required for a signal to be perceived at the lower and higher frequencies. Note that the described thresholds only hold for cases where no other sound is present. \item \textit{Frequency Masking.} The presence of another sound---a so-called \emph{masking tone}---can change the described \emph{hearing thresholds} to cover a larger area. This \emph{masking effect} of the masking tone depends on its sound pressure and frequency. Figure~\ref{fig:frequ_mask} shows an example of a $1$\,kHz masking tone, with its induced changes of the \emph{hearing thresholds} indicated by the dashed line. \item \textit{Temporal Masking.} Like frequency masking, temporal masking is also caused by other sounds, but these sounds have the same frequency as the masked tone and are close to it in the time domain, as shown in Figure~\ref{fig:time_mask}. Its root cause lies in the fact that the auditory system needs a certain amount of time, in the range of a few hundreds of milliseconds, to recover after processing a higher-energy sound event to be able to perceive a new, less energetic sound. Interestingly, this effect does not only occur at the end of a sound but also, although much less distinct, at the beginning of a sound. This seeming causal contradiction can be explained by the processing of the sound in the human auditory system. \end{itemize} \paragraph{Adversarial Examples} \label{sec:examples} Since the seminal papers by Szegedy~et~al.\@\xspace{}~\cite{szegedy-13-intriguing} and Biggio~et~al.\@\xspace{}~\cite{biggio-13-evasion}, a field of research has formed around adversarial examples. The basic idea is simple: An attacker starts with a valid input to a machine learning system. Then, they add small perturbations to that input with the ultimate goal of changing the resulting prediction (or in our case, the transcription of the \ac{ASR}). More formally, given a machine learning model $f$ and an input-prediction pair $\langle\,x,\; y\,\rangle$, where $f(x) = y$, we want to find a small perturbation $\delta$ s.t.: \begin{equation*} x' = x + \delta \quad \wedge \quad f(x') \neq f(x). \end{equation*} In this paper, we consider a stronger type of attack, a targeted one. This has two reasons: the first is that an untargeted attack in the audio domain is fairly easy to achieve. The second is that a targeted attack provides a far more appealing (and thus, far more threatening) real-life use case for adversarial examples. More formally, the attacker wants to perturb an input phrase $x$ (i.e., an audio signal) with a transcription~$y$ (e.g., ``Play the Beatles'') in such a way that the \ac{ASR} transcribes an attacker-chosen transcription $y'$ (e.g., ``Unlock the front door''). This can be achieved by computing an adversarial example $x'$ based on a small adversarial perturbation $\delta$ s.t.: \begin{equation} \label{eq:1} x' = x + \delta \quad \wedge \quad ASR(x') = y' \quad \wedge \quad y \neq y'. \end{equation} There exist a multitude of techniques for creating such adversarial examples. We use the method introduced by Sch\"onherr~et~al.\@\xspace{}~\cite{schoenherr-19-psychoacoustics} for our evaluation in Section~\ref{sec:evaluation}. The method can be divided into three parts: In a first step, attackers choose a fixed output matrix of the DNN to maximize the probability of obtaining their desired transcription $y'$. As introduced before, this matrix is used in the \ac{ASR} system's decoding step to obtain the final transcription. They then utilize gradient descent to perturb a starting input $x$ (i.\,e., an audio signal feed into the \ac{DNN}), to obtain a new input $x'$, which produces the desired matrix. This approach is generally chosen in white-box attacks~\cite{yuan-18-commandersong,schoenherr-20-imperio}. Note that we omit the feature extraction part of the \ac{ASR}; however, Sch\" onherr~et~al.\@\xspace{} have shown that this part can be integrated into the gradient step itself~\cite{schoenherr-19-psychoacoustics}. A third (optional) step is to utilize psychoacoustic hearing thresholds to restrict the added perturbations to inaudible frequency ranges. More technical details can be found in the original publication~\cite{schoenherr-19-psychoacoustics}. \section{Introduction} \label{sec:introduction} The advent of deep learning has changed our digital society. Starting from simple recommendation techniques~\cite{pazzani-07-content} or image recognition applications~\cite{krizhevsky-12-imagenet}, machine-learning systems have evolved to solve and play games on par with humans~\cite{mnih-15-human, silver-16-mastering, berner-19-dota, vinyals-19-grandmaster}, to predict protein structures~\cite{senior-20-improved}, identify faces~\cite{taigman-14-deepface}, or recognize speech at the level of human listeners~\cite{xiong-16-achieving}. These systems are now virtually ubiquitous and are being granted access to critical and sensitive parts of our daily lives. They serve as our personal assistants~\cite{ram-17-conversational}, unlock our smart homes' doors~\cite{misc-16-alexa}, or drive our autonomous cars~\cite{misc-19-teslaai}. Given these circumstances, the discovery of \textit{adversarial examples}~\cite{szegedy-13-intriguing} has had a shattering impact. These specifically crafted inputs can completely mislead machine learning-based systems. Mainly studied for image recognition~\cite{szegedy-13-intriguing}, in this work, we study how adversarial examples can affect \ac{ASR} systems. Preliminary research has already transferred adversarial attacks to the audio domain~\cite{song-17-inaudible, zhang-17-dolphinattack, yuan-18-commandersong, schoenherr-19-psychoacoustics, schoenherr-20-imperio, abdullah-20-sok}. The most advanced attacks start from a harmless input signal and change the model's prediction towards a target transcription while simultaneously \emph{hiding} their malicious intent in the inaudible audio spectrum. To address such attacks, the research community has developed various defense mechanisms~\cite{papernot-15-limitations, moosavidezfooli-15-deepfool, carlini-17-robustness, metzen-17-detecting, feinman-17-detecting, carlini-17-adversarial}. All of the proposed defenses---in the ever-lasting cat-and-mouse game between attackers and defenders---have subsequently been broken~\cite{gilmer-18-motivating}. Recently, Shamir et~al.\@\xspace{}~\cite{shamir-19-simple} even demonstrated that, given certain constraints, we can expect to always find adversarial examples for our models. Considering these circumstances, we ask the following research question: \emph{When we accept that adversarial examples exist, what else can we do?} We propose a paradigm shift: Instead of preventing \emph{all} adversarial examples, we accept the presence of \emph{some}, but we want them to be audibly changed. To achieve this shift, we take inspiration from the machine learning community, which sheds a different light on adversarial examples: Illyas et~al.\@\xspace{}~\cite{ilyas-19-adversarial} interpret the presence of adversarial examples as a disconnection between human expectations and the reality of a mathematical function trained to minimize an objective. We tend to think that machine learning models must learn meaningful features, e.\,g., a cat has paws. However, this is a human's perspective on what makes a cat a cat. Machine learning systems instead use \emph{any} available feature they can incorporate in their decision process. Consequently, Illyas~et~al.\@\xspace{} demonstrate that image classifiers utilize so-called \emph{brittle features}, which are highly predictive, yet not recognizable by humans. Recognizing this mismatch between human expectations and the inner workings of machine learning systems, we propose a novel design principle for \ac{ASR} system inspired by the human auditory system. Our approach is based on two key insights: (i) the human voice frequency is limited to the band ranges of approximately $300-5000\,Hz$~\cite{monson-14-perceptual}, while \ac{ASR} systems are typically trained on 16kHz signals, which range from $0-8000\,Hz$, and (ii) audio signal can carry information, inaudible to humans~\cite{zhang-17-dolphinattack}. Given these insights, we modify the \ac{ASR} system by restricting its access to frequencies and applying psychoacoustic modeling to remove \emph{inaudible} ranges. The effects are twofold: The \ac{ASR} system can learn a better approximation of the human perception during training (i.e., discarding unnecessary information), while simultaneously, adversaries are forced to place any adversarial perturbation into audible ranges. We implement these principles in a prototype we call \textsc{Dompteur}\xspace. In a series of experiments, we demonstrate that our prototype more closely models the human auditory system. More specifically, we successfully show that our \acs{ASR} system, in contrast to an unmodified baseline, focuses on perceptible ranges of the audio signal. Following Carlini~et~al.\@\xspace{}~~\cite{carlini-19-evaluating}, we depart from the lab settings predominantly studied in prior work: We assume a white-box attacker with real-world capabilities, i.e., we grant them full knowledge of the system and they can introduce an unbounded amount of perturbations. Even under these conditions, we are able to force the attacker to produce adversarial examples with an average of 24.33\,dB of added perturbations while remaining accurate for benign inputs. Additionally, we conduct a large scale user study with 355 participants. The study confirms that the adversarial examples constructed for \textsc{Dompteur}\xspace are easily distinguishable from benign audio samples and adversarial examples constructed for the baseline system. \smallskip\noindent In summary, we make the following key contributions: \begin{itemize \item \textbf{Constructing an Augmented \acs{ASR}.} We utilize our key insights to bring \acs{ASR} systems in better alignment with human expectations and demonstrate that traditional \acs{ASR} systems indeed utilize non-audible signals that are not recognizable by humans. \item \textbf{Evaluation Against Adaptive Attacker.} We construct a realistic scenario where the attacker can adapt to the augmented system. We show that we successfully force the attacker into the audible range, causing an average of 24.33\,dB added noise to the adversarial examples. We could not find adversarial examples when applying very aggressive filtering; however, this causes a drop in the benign performance. \item \textbf{User Study.} To study the auditory quality of adversarial examples, we perform a user study with an extensive crowd-sourced listening test. Our results demonstrate that the adversarial examples against our system are significantly more perceptible by humans. \end{itemize} \smallskip To support further research in this area, we open-source our prototype implementation, our pre-trained models, and audio samples online at \href{https://github.com/rub-syssec/dompteur}{github.com/rub-syssec/dompteur}. \section{Related Work} In this section, we summarize research related to our work, surveying recent attacks and countermeasures. \vspace{-0.5em} \paragraph{Audio Adversarial Examples} Carlini and Wagner~\cite{carlini-18-audio} introduced targeted audio adversarial examples for \ac{ASR} systems. For the attack, they assume a white-box attacker and use an optimization-based method to construct general adversarial examples for arbitrary target phrases against the \ac{ASR} system \textsc{DeepSpeech} \cite{hannun-14-deepspeech}. Similarly, Sch\" onherr~et~al.\@\xspace{}~\cite{schoenherr-19-psychoacoustics} and Yuan~et~al.\@\xspace{}~\cite{yuan-18-commandersong} have proposed an attack against the \textsc{Kaldi}\xspace \cite{povey-11-kaldi} toolkit. Both assume a white-box attacker and also use optimization-based methods to find adversarial examples. Furthermore, the attack from Sch\"{o}nherr~et~al.\@\xspace{}~\cite{schoenherr-19-psychoacoustics} can optionally compute adversarial examples that are especially unobtrusive for human listeners. Alzantot~et~al.\@\xspace~\cite{alzantot-18-did} proposed a black-box attack, which does not require knowledge about the model. For this, the authors have used a genetic algorithm to create their adversarial examples for a keyword spotting system. Khare~et~al.\@\xspace{}~\cite{khare-19-blackbox} proposed a black-box attack based on evolutionary optimization, and also Taori~et~al.\@\xspace{}~\cite{taori-19-targeted} presented a similar approach in their paper. Recently, Chen~et~al.\@\xspace~\cite{chen-20-metamorph} and Sch\"onherr~et~al.\@\xspace~\cite{schoenherr-20-imperio} published works where they can calculate over-the-air attacks, where adversarial examples are optimized such that these remain viable if played via a loudspeaker by considering room characteristics. Aghakhani~et~al.\@\xspace~\cite{aghakhani-20-venomave} presented another line of attack, namely a poisoning attack against ASR systems. In contrast to adversarial examples, these are attacks against the training set of a machine learning system, with the target to manipulate the training data s.t a model that is trained with the poisoned data set misclassifies specific inputs. Abdullah~et~al.\@\xspace~\cite{abdullah-20-sok} provides a detailed overview of existing attacks in their systemization of knowledge on attacks against speech systems. \paragraph{Countermeasures} There is a long line of research about countermeasures against adversarial examples in general and especially in the image domain (e.\,g., \cite{metzen-17-detecting, feinman-17-detecting, carlini-17-adversarial}), but most of the proposed defenses were shown to be broken once an attacker is aware of the employed mechanism. In fact, due to the difficulty to create robust adversarial example defenses, Carlini~et~al.\@\xspace{} proposed guidelines for the evaluation of adversarial robustness. They list all important properties of a successful countermeasure against adversarial examples~\cite{carlini-19-evaluating}. Compared to the image domain, defenses against audio adversarial examples remained relatively unnoticed so far. For the audio domain, only a few works have investigated possible countermeasures. Moreover, these tend to focus on specific attacks and not adaptive attackers. Ma~et~al.\@\xspace{}~\cite{ma-19-audio-visual} describe how the correlation of audio and video streams can be used to detect adversarial examples for an audiovisual speech recognition task. However, all of these simple approaches---while reasonable in principle---are specifically trained for a defined set of attacks, and hence an attacker can easily leverage that knowledge as demonstrated repeatedly in the image domain~\cite{carlini-17-adversarial}. Zeng~et~al.\@\xspace{}~\cite{zeng-18-multiversion} proposed an approach inspired by multiversion programming. Therefore, the authors combine the output of multiple \ac{ASR} systems and calculate a \emph{similarity score} between the transcriptions. If these differ too much, the input is assumed to be an adversarial example. The security of this approach relies on the property that current audio adversarial examples do not transfer between systems --- an assumption that has been already shown to be wrong in the image domain~\cite{papernot-16-transferability}. Yang~et~al.\@\xspace{}~\cite{yang-18-characterizing}, also utilize specific properties of the audio domain and uses the temporal dependency of the input signal. For this, they compare the transcription of the whole utterance with a segment-wise transcription of the utterance. In the case of a benign example, both transcriptions should be the same, which will not be the case for an adversarial example. This proved effective against static attacks, and the authors also construct and discussed various adaptive attacks but these were later shown to be insufficient \cite{tramer-20-adaptiveattacks}. Besides approaches that aim to harden models against adversarial examples, there is a line of research that focuses on detecting adversarial examples: Liu and Ditzler~\cite{liu-20-detecting} utilizing quantization error of the activations of the neural network, which appear to be different for adversarial and benign audio examples. Däubener~et~al.\@\xspace~\cite{daubener-20-detecting} trained neural networks capable of uncertainty quantification to train a classifier on different uncertainty measures to detect adversarial examples as outliers. Even if they trained their classifier on benign examples only, it will most likely not work for any kind of attack, especially those aware of the detection mechanism. In contrast, our approach does not rely on detection by augmenting the entire system to become more resilient against adversarial examples. The basic principle of this has been discussed as a defense mechanism in the image domain with JPEG compression~\cite{dziugaite-16-jpg, das-19-shield} as well as in the audio domain by Carlini and Wagner~\cite{carlini-18-audio}, Rajaratnam~et~al.\@\xspace{}~\cite{rajaratnam-18-isolated}, Andronic~et~al.\@\xspace~\cite{andronic-20-mp3}, and Olivier~et~al.\@\xspace\cite{olivier-21-highfrequency}. These approaches, however, were only used as a pre-processing step to remove semantically irrelevant parts from the input and thereby destroy adversarial perturbations added by (static) attackers. In contrast, we aim to train an ASR system that uses the same information set as the human auditory systems. Consequently, adversarial examples computed against this system are also restricted to this set, and an attack cannot be hidden in inaudible ranges. Similar to the referenced approaches, we rely on psychoacoustics and baseband filtering. However, we do not solely employ this as a pre-processing step but train a new system with our augmentation data (i.e., removing imperceptible information from the training set). This allows us to not simply destroy adversarial perturbations but rather confine the available attack surface. \section{Discussion} We have shown how we can augment an \ac{ASR} system by utilizing psychoacoustics in conjunction with a band-pass filter to effectively remove semantically irrelevant information from audio signals. This allows us to train a hardened system that is more aligned with human perception. \paragraph{Model Hardening} Our results from Section~\ref{sec:benign-performance} suggest that the hardened models primarily utilize information available within audible ranges. Specifically, we observe that models trained on the unmodified data set appear to use \emph{any} available signals and utilize information \emph{both} from audible and non-audible ranges. This is reflected in the accuracy drop when presented with psychoacoustically filtered input (where only audible ranges are available). In contrast, the augmented model performs comparably well on both types of input. Hence, the model focuses on the perceivable audible ranges and \emph{ignores} the rest. \paragraph{Robustness of the System} We demonstrated how we can create a more realistic attacker, which actively factors in the augmentations during the calculation of adversarial examples. In this case, however, the attack is forced into the audible range. This makes the attack significant more perceptible --- resulting in an average \ac{SNRseg} drop of up to 24.33\,dB for speech samples. These results also transfer to other types of audio content (i.e., music and birds tweeting) and are further confirmed by the listening test conducted in Section~\ref{sec:user-study}. In summary, the results of these experiments show that an attack is clearly perceivable. Further, we find that the adversarial examples, calculated with the adaptive attack, are easily distinguishable from benign audio files by humans. \paragraph{Implementation Choices} In general, our augmentations can be implemented in the form of low-cost pre-processing steps with no noteworthy performance overhead. Only the model needs to be retrained from scratch. However, the cost of this could---in theory---be partially alleviated by transfer learning. We leave this question as an interesting direction for future research. \paragraph{Robustness-Performance Tradeoff} The results of the adaptive attack (cf.\@\xspace Table~\ref{table:adaptive-attack}) show that a larger margin $\Phi$ leads to stronger robustness. Specifically, for $\Phi$ = 14, the attacker was unable to find \emph{any} successful adversarial example in our experiments. However, this incurs an expected robustness-performance trade-off as previous research indicates that adversarial robustness is generally correlated with a loss in accuracy~\cite{tsipras-19-robustness}. In the case of our strong white-box attacker, we recommend a margin $\Phi \ge 12$, which result in a degraded system performance by at least 1.82 percentage points in terms of the benign WER. In this case, though, we already granted the attacker many concessions: full access to the model with all parameters, ideal playback (i.e., adversarial examples are fed directly into the recognizer and are not played over-the-air), and an easy target. We chose to study our attacker in this setting as this poses the strongest class of attacks and allows us to gain meaningful insights. In contrast to white-box attacks, black-box attack don't have direct access to the gradient and for example rely on surrogate models \cite{chen-20-devil} or generative algorithms \cite{du-20-sirenattack} to construct adversarial examples. Therefore, adversarial examples from these attacks are typically more conspicuous and can even introduce semantic changes such that humans can perceive the hidden transcription if they are made aware of it \cite{chen-20-devil}. Considering our augmentations, we expect that current black-box attacks are able to construct valid adversarial examples against \textsc{Dompteur}\xspace. However, we expect these to be significantly more noisy (in comparison to the adaptive attacker) as \textsc{Dompteur}\xspace forces modifications to the signal into audible ranges regardless of the underlying attack strategy. Especially in a realistic over-the-air setting, we suspect much higher distortions since the attacker is much more constrained. In such a setting, a smaller $\Phi$ might also already suffice. We leave this as an interesting research direction for future work. \paragraph{Improvement of the Attack} The adaptive attack presented in Section \ref{sec:adaptive_attack} can successfully compute adversarial examples, except for very aggressive filtering. While Figure~\ref{fig:attack-itr} clearly shows that the attack has converged, we were still unable to find working adversarial examples. However, other target/input utterance combinations may still exist, for which the attack works and novel attack strategies should be studied. \paragraph{Forcing Semantics into Adversarial Examples} We have shown how we can force adversarial audio attacks into the audible range. This makes them clearly perceivable. Ultimately, the goal is to push adversarial examples towards the perceptual boundary between original and adversarial message. Intuitively, adversarial examples should require such extensive modification that a \emph{human listener} will perceive the target transcription, i.\,e.,\xspace that the adversarial perturbation carries \emph{semantic} meaning. We view our work as a first successful step into that direction and leave the exploration of this strategy as an interesting question for future work. \section{Targets} \label{app:targets} \begin{table}[ht!] \vspace{-0.5em} \caption{\textbf{Target utterances for the experiments with the adaptive attacker.} For the experiments we select 50 utterances as target with an approximate length of 5s from the WSJ speech corpus test set \texttt{eval92}.} \centering \resizebox{\columnwidth}{!}{ \begin{tabular}{cc|cc|cc} \toprule Utterance & Length & Utterance & Length & Utterance & Length \\ \midrule 440c0407 & 5.47s & 440c040i & 5.07s & 440c040j & 4.08s \\ 441c0409 & 4.91s & 441c040c & 5.57s & 441c040l & 5.26s \\ 441c040m & 5.50s & 441c040s & 4.58s & 441c040y & 4.08s \\ 442c0402 & 5.14s & 442c040c & 5.69s & 442c040d & 4.80s \\ 442c040h & 4.63s & 442c040k & 5.37s & 442c040w & 5.21s \\ 443c0402 & 5.05s & 443c040b & 4.69s & 443c040c & 4.73s \\ 443c040d & 5.54s & 443c040j & 4.61s & 443c040l & 4.23s \\ 443c040p & 4.10s & 443c040v & 4.82s & 443c0417 & 4.55s \\ 444c0407 & 4.76s & 444c0409 & 5.20s & 444c040i & 4.98s \\ 444c040n & 5.18s & 444c040u & 4.37s & 444c040w & 5.52s \\ 444c040z & 4.29s & 444c0410 & 4.16s & 445c0409 & 5.43s \\ 445c040j & 4.99s & 445c040l & 5.64s & 445c040w & 4.92s \\ 445c040x & 4.68s & 445c0411 & 4.34s & 446c0402 & 5.59s \\ 446c040b & 4.10s & 446c040d & 5.18s & 446c040e & 4.94s \\ 446c040f & 4.66s & 446c040o & 5.33s & 446c040p & 5.04s \\ 446c040s & 5.18s & 446c040v & 4.07s & 447c040g & 4.64s \\ 447c040p & 5.23s & 447c040z & 4.68s & & \\ \bottomrule \end{tabular} } \label{tab:targets} \end{table} \subsection{Listening Tests} \label{sec:user-study} \input{includes/table-user-study} Our goal is to make an adversarial attack noticeable by forcing modification to an audio signal into perceptible ranges. We have used the \ac{SNRseg} as a proxy of the perceived audio quality of generated adversarial examples. However, this value can only give a rough approximation, and we are in general more interested in the judgment of human listeners. Specifically, we are interested to quantify if and to what extent malicious perturbations are audible to human listeners. Therefore, we have conducted a \ac{MUSHRA} test~\cite{schinkel-13-inexperienced}, a commonly used test to assess the quality of audio stimuli. This test allows us to get a ranking of the perceived quality of adversarial examples in comparison to an unmodified reference signal. Based on this measure, we can derive whether a participant 1) could detect any difference between an adversarial example and a clean signal (i.e., whether perturbations are audible) and, 2) obtain a subjective estimate on the amount of perceived perturbations (i.e., poorly rated samples are perceived more noisy). \paragraph{Study Design} \label{sec:study-design} In a \ac{MUSHRA} test, the participants are presented with a set of differently processed audio files, the \emph{audio stimuli}. They are asked to rate the quality of these stimuli on a scale from 0 (bad) to 100 (excellent). To judge whether the participants are able to distinguish between different audio conditions, a \ac{MUSHRA} test includes two additional stimuli: (i) an unaltered version of the original signal (the so-called \emph{reference}) and (ii) a worst-case version of the signal, which is created by artificial degrading the original stimulus (the so-called \emph{anchor}). In an ideal setting, the reference should be rated best, the anchor worst. We want to rank the perceived quality of adversarial examples computed against \textsc{Dompteur}\xspace and \textsc{Kaldi}\xspace. For \textsc{Dompteur}\xspace, we select three different versions: each model uses a $200-7000\,Hz$ band-pass filter, and we vary the degree of the psychoacoustic filtering ($\Phi \in \{0, 6, 12\}$). For \textsc{Kaldi}\xspace, we calculate adversarial examples against the unaltered system with psychoacoustic hiding enabled (cf.\@\xspace~Section \ref{sec:examples}) to compare against state-of-the-art adversarial examples. As the reference, we use the original utterance, on which the adversarial examples are based. To be a valid comparison, we require the anchor to sound \emph{similar}, yet noisier than the adversarial examples. Otherwise, it could be trivially identified and would not serve as a valid comparison. Thus, we construct the anchor as follows: For a given set, we scale and sum the noise of each of the three adversarial examples and add this sum to the original stimulus, such that 1) each noise signal contributes the same amount of energy and 2) the SNRseg of the anchor is at least 6dB lower than the SNRseg of any of the adversarial examples in the set. We have prepared a \ac{MUSHRA} test with six test sets based on three different audio types: two speech sample sets, two music sample sets, and two sample sets with bird sounds. These sets were selected among the sets of successful adversarial examples against all four models. For each set, we picked the samples whose adversarial examples produced the highest SNR (i.\,e.,\xspace the ''cleanest``) for the strongest version of \textsc{Dompteur}\xspace ($\Phi = 12$). The target text remained the same for all adversarial examples, and in all cases, the attacks were successful within $2000$ iterations. \paragraph{Results} To test our assumptions in the field, we have conducted a large-scale experimental study. The G*Power 3 analysis~\cite{faul-09-statistical} identified that a sample size of 324 was needed to detect a high effect size of $\eta^2 = .50$ with sufficient power $(1-\beta >.80)$ for the main effect of univariate analyses of variance (UNIANOVA) among six experimental conditions and a significance level of $\alpha = .05$. We used Amazon MTurk to recruit 355 participants ($\mu_{\text{age}} = 41.61$ years, $\sigma_{\text{age}} = 10.96$; 56.60\% female). Participants were only allowed to use a computer and no mobile device. However, they were free to use headphones or speakers as long as they indicated what type of listening device was used. To filter individuals who did not meet the technical requirements needed, or did not understand or follow the instructions, we used a control question to exclude all participants who failed to distinguish the anchor from the reference correctly. In the main part of the experiment, participants were presented with six different audio sets (2 of each: speech/bird/music), each of which contained six audio stimuli varying in sound quality. After listening to each sound, they were asked to rank the individual stimulus by its perceived sound quality. After completing of the tasks, participants answered demographic questions, were debriefed (MTurk default), and compensated with 3.00 USD. The participant required on average approximately 20 minutes to finish the~test. In a first step, we first use an UNIANOVA to examine whether there is a significant difference between the six audio stimuli and the perceived sound quality. Our analysis reveals a significant main effect of the audio stimulus on the perceived sound quality, $\text{\textit{F}}(5, 12780) = 8335.610$, $\text{\textit{p}} < .001$, $\eta^2 = .765$. With an alpha level of $> 1\%$ for our p-value and an effect size of $\eta^2 >.5$, our result shows a high experimental significance~\cite{richardson-11-eta}. Thus, we can conclude that \textsc{Dompteur}\xspace indeed forces adversarial perturbations into the perceptible acoustic range of human listeners. To examine whether the effect remains stable across different audio samples and listening devices, we further conducted multiple regression analyses. We entered the audio stimuli as our main predictors (first step) and the type of device (second step) as covariates for each analysis. Our results remain stable across all audio types. The highest predictive power was found in the \textit{speech} sets, where 82.1\% of the variance is explained by our regression model, followed by \textit{music} (76.1\%) and \textit{bird} sets (69.2\%) (see Table \ref{table:user-study} for details). Moreover, we found a small yet significant positive coefficient for the type of device used across all audio types. This finding suggests that headphone users generally indicate higher quality rankings, potentially due to better sound perceptions. The results with listening device \emph{speaker} are presented in Figure \ref{fig:mushra}. Importantly, all results remain stable across the control variables of age, gender, and first language. In conclusion, the results strongly support our hypothesis that \textsc{Dompteur}\xspace forces the attacker into the audible range, making the attack clearly noticeable for human listeners. \input{includes/figure-user-study}
\section{Introduction} The origin of scales in QCD can be classified into two categories in terms of quantum field theory: one is spontaneous symmetry breaking of chiral symmetry, while the other explicit symmetry breaking. The latter is subject to renormalization of the quantum corrections in QCD, quantum scale anomalies, and the presence of quark masses (classical- chiral and scale breaking). Applying QCD in a thermal bath would have a potential to detect the direct consequence of the spontaneous breaking of the chiral symmetry, by observing the damping of the order parameter for the chiral phase transition (i.e. the quark condensate) at high temperatures above the critical temperature. Thus, the scale breaking associated with the spontaneous breaking can be dropped out there. However, there is still inevitable contamination left: that is the scale anomaly arising from renormalization evolution of the QCD gauge coupling, which should be present all the way in the thermal history of QCD, and it still coexists with the scale breaking from quark masses, even above the critical temperature. Hence detection of the scale anomaly seems to be quite challenging even in the thermal QCD. \begin{figure}[!htpb] \begin{center} \includegraphics[width=10cm]{columbia_v4_3_1.pdf} \end{center} \vspace{-0.5cm} \caption{ Extended Columbia plot along with an external magnetic field in the weak field regime. $m_l$ and $m_s$ denote masses of the light quarks and strange quark, respectively. The existence of the scale anomaly is dictated as the suggested endpoint on this Columbia plot, indicated by a shaded circle. A blank square stands for the tri-critical point, at which the three domains of crossover, first- and second-order phase transitions merge. The details are described in the text. The physical point is known to be the crossover \cite{Endrodi} at this size of magnetic field. \label{fig:columbia_plot} } \end{figure} To reconcile this dilemma, it would be necessary to go away, from the physical point, at the massless limit (so-called the chiral limit). There quarks enjoy the exact chiral symmetry and the scale symmetry breaking is provided purely by the quantum scale anomaly. However, the dimensional transmutation in the infrared energy regime, associated with the scale anomaly, triggers the spontaneous chiral breaking, hence contaminates with each other in the thermal evolution of the chiral order parameter. Thus the case would still be involved even in the chiral limit. Pisarski and Wilczek a long time ago \cite{Pisarski-Wilczek} payed their particular attention to the chiral limit, off the physical point, and employed an effective model in the confinement phase based on the exact chiral symmetry with or without $U(1)$ axial symmetry. They discussed the renormalization group runnings of the model couplings, and existence of the renormalization group-fixed point. It was suggested that the order of the chiral phase transition highly depends on the number of massless flavors (namely the chiral symmetry and $U(1)$ axial symmetry). This was the pioneering work and made a significant help to comprehend QCD at the physical point as the chiral theory. However, at this point, it is yet unclear how the scale anomaly directly affects the chiral phase transition. Columbia university group extended their work using lattice QCD calculations \cite{Columbia}. In lattice QCD, mass and the number of flavor dependence on the order of the QCD phase transition have been investigated including the chiral and confinement-deconfinement phase transitions. It is summarized as what is called Columbia plot, which is drawn on the quark mass plane, hence dictates the chiral and $U(1)$ axial symmetry structures. Since the early work of Columbia group used an approximated algorithm, it has nowadays been refined by utilizing modern technologies. \textcolor{black}{ In the two flavor chiral limit and 2+1 flavor chiral limit, namely with two of massless quarks and one heavy quark, restoration or persistence of $\mathrm{U(1)}$ axial anomaly above the critical temperature has been discussed \cite{JLQCD-overlap, JLQCD-DW, JLQCD-DW2, HotQCD-DW1, HotQCD-DW2, HotQCD-DW3, Sheng-Tai, HISQ-2+1}. It is shown that restoration or persistence is tightly connected to the order of phase transition and its universality class \cite{Pisarski-Wilczek, Aoki-Fukaya-Taniguchi, u1RG, Bootstrap}. On the other hand, QCD is believed to exhibit the first-order phase-transition in the three-flavor chiral limit \cite{Pisarski-Wilczek}. However, no clear lattice results for the first-order phase-transition has been obtained and only lower limits on the quark mass in the crossover has been placed~\cite{3F-HISQ, 3F-Wilson}. } Thus the chiral properties in the chiral phase transition have extensively been studied on lattice QCD and so far been well understood through projection on to the Columbia plot, initiated from the Pisarski-Wilczek's work. However, never have the scale anomaly been clearly understood or given any definite signal even on the Columbia plot: the form of the QCD scale anomaly is flavor universal, hence would survive all the way on the Columbia plot. Thus it may be conclusive that the QCD scale anomaly leaves no distinct footprint on the Columbia plot. In this paper, we propose a methodology to detect another scale anomaly in the chiral phase transition on a Columbia plot: apply a weak magnetic field background onto QCD, and see that an electromagnetically induced scale anomaly arises, which is coupled to the chiral order parameter; work in two-flavor massless QCD with an extremely heavy strange quark; first observe the chiral crossover; second, adjusting the strange quark mass to be smaller and smaller, observes the second-order chiral phase transition, and the first-order one in the massless-three flavor limit. See Fig.~\ref{fig:columbia_plot}. That is an evidence of the quantum scale anomaly (an electromagnetically induced quantum scale anomaly), which turns to transparently contribute to the chiral phase transition, so is the essential key to significantly affect the Columbia plot, as well as the chiral and $U(1)$ axial symmetries. It turns out that this electromagnetic scale anomaly gets most operative in the weak magnetic field regime. In the massless-three flavor limit, this quantum scale anomaly contribution is overwhelmed by the U(1) axial anomaly's, hence the first-order phase transition is realized, while in the massless-two flavor limit such interference does not happen, and the crossover is promoted by the induced tadpole, as will explicitly be demonstrated later. Thus, the second-order chiral phase transition, observed as the evidence of the quantum scale anomaly, is a new critical endpoint. Other critical points have been proposed in a strong magnetic field regime~\cite{Cohen:2013zja,Endrodi:2015oba}. Our finding is definitely different from those which are expected to emerge due to broadening of the quenched regime in Fig.~\ref{fig:columbia_plot} because of the amplified mass gap of quarks by the strong magnetic field. Lots of interesting results have been reported from lattice studies on the QCD thermodynamics in the strong external magnetic field \cite{Dima-top, Massimo, Dima-vortex, Endrodi-butterfly}. Of these results, there are two striking properties discovered: the reduction of transition temperature \cite{ catalysis2, endrodi-eos, Tomiya-Hisq, Massimo-heavy-pion, Enrodi-heavy-pion} and the inverse magnetic catalysis \cite{Endrodi}. In contrast to the strong magnetic field the weak magnetic field has not fully been investigated on the lattice QCD at non-zero temperature. At the current status, the smallest nonzero magnetic field on the lattice is $\sqrt{eB}_\text{min}\sim 0.1$ GeV~\cite{Endrodi}, which is only for the physical pion mass simulations at finite temperatures~\footnote{On the lattice, the minimum of magnetic field is bounded by the temperature, $|eB|_\text{min} \propto T^2$. See~\cite{Endrodi} for details.}. This is because of the fact that the minimal magnetic field is determined by the area of transverse plane to the magnetic field~\cite{Endrodi}. Thus the weak magnetic field with smaller pion masses, particularly close to the chiral limit, is challenging due to the higher numerical cost. Instead of lattices, chiral effective theories, like what we will employ, would therefore shed light on the weak magnetic regime at the chiral limit, as if it gets back to the epoch where the Columbia plot was first proposed along the pioneering work by Pisarski and Wilczek: our finding paves a way to investigate this new frontier as searching for the evidence of the quantum scale anomaly in the chiral phase transition. The proposed critical endpoint is marked as ``Suggested endpoint", in an extended Columbia plot including the magnetic field in the weak field regime, Fig.~\ref{fig:columbia_plot}. The new endpoint reveals the potential existence of the scale anomaly in QCD, which is made transparent in the presence of a magnetic field. This is our main result in the present paper. \section{Ginzburg-Landau description} Before entering the detailed demonstration, we shall present an intuitive interpretation on the chiral phase transition nature, which would help readers to easily grasp our new finding. To this end, we momentarily work on a generic Ginzburg-Landau description for the chiral phase transition, inspired by Pisarski and Wilczek~\footnote{ Our current analysis is based on an effective potential approach, not on the renormalization group method like in the Pisarski and Wilczek's work. Cross-check using the (nonperturbative) renormalization group would make our finding more evident, which will be pursued elsewhere. }. In the Ginzburg-Landau approach, the chiral phase structure can be described by a generic effective potential in terms of the order parameter $\bar \sigma_0$. It takes the polynomial form. \begin{eqnarray} V_{\rm eff}(\bar\sigma_0)&=& \alpha_1(T,eB)\bar \sigma_0+ \alpha_2(T,eB)\bar \sigma_0^2 \nonumber\\ && + \alpha_3(T,eB)\bar \sigma_0^3+ \alpha_4(T,eB)\bar \sigma_0^4+ \cdots \label{GL-model} \end{eqnarray} where the potential parameters $\alpha_{i=1,2,3,4,\cdots}$ can include intrinsic temperature- and/or magnetic-dependence. Our sigma field is defined as an interpolating mesonic degree of freedom for the lightest quark bilinear $\bar{q}q$ in QCD. When the exact chiral symmetry is imposed, the effective potential form is restricted to be an even function of $\bar \sigma_0$, such as $\bar \sigma_0^2$ and $\bar \sigma_0^4$. With terms truncated up to $O(\bar \sigma_0^4)$, the phase transition is then expected to be of the second order. In the three-flavor case, the $U(1)$ axial anomaly induces the cubic term of $\bar \sigma_0$, which originally takes a determinant form of the quark condensate, ${\rm det} \bar{q}q \sim \bar{\sigma}_0^3$, a la Kobayashi-Maskawa-'t Hooft~\cite{Kobayashi:1970ji,Kobayashi:1971qz,tHooft:1976rip,tHooft:1976snw}. Then, the phase transition order is changed to be of the first order, because the cubic term creates a potential barrier between the chiral symmetric vacuum $(\bar{\sigma}_0 =0)$ and broken one $(\bar{\sigma}_0 \neq 0)$. Note here that the determinant term in the two-flavor case can be absorbed into $\bar{\sigma}_0^2$ term, so the $U(1)$ axial anomaly does not effectively affect the potential form in Eq.(\ref{GL-model}). As to the linear (tadpole) term of $\bar{\sigma}_0$, it cannot be present even with the $U(1)$ axial anomaly. It would show up when the current quark masses are introduced, which can explicitly break the full chiral symmetry including the $U(1)$ axial part. Once the tadpole is present, the potential no longer achieves the exactly chiral symmetric vacuum, which, in other words, the theory always lies in the broken phase, even though the value of $\bar{\sigma}_0$ gets smaller, as $T$ becomes higher. This implies that the tadpole term in the potential tends to drive the phase transition to be continuous, i.e., crossover, called the chiral crossover. To make the point better understood, we may explicitly introduce the chiral field $\Phi$, which is parametrized by the scalar- and pseudoscalar-meson fields as \begin{eqnarray} \Phi= \begin{cases} \frac{1}{2}(\sigma_0 +i\tau^i\pi^i ),\;\;\; (\hbox{for }N_f=2)\\ \frac{1}{2}(\sigma_a+i\pi_a)\lambda^a,\;\;\; (\hbox{for }N_f=3), \end{cases} \end{eqnarray} where $\tau_{i=1,\cdots,3}$ are the Pauli matrices and $\lambda_{a=1,\cdots,8}$ represent the Gell-Mann matrices with $\lambda_0=\sqrt{{2/3}} \cdot {\bm 1}_{3\times 3}$. Under the chiral symmetry we define the transformation law of $\Phi$ as \begin{eqnarray} \Phi\to \begin{cases} g_L \cdot \Phi \cdot g_R^\dagger,\;\;\;(\hbox{for }N_f=2) \\ g_A\cdot g_L \cdot \Phi \cdot g_R^\dagger ,\;\;\;(\hbox{for }N_f=3), \end{cases} \label{chiralT} \end{eqnarray} where $g_{L,R}\in SU(2)_{L,R}$ in the case of $N_f=2$, and $g_{L,R}\in SU(3)_{L,R}$ with $g_A\in U(1)_A$ in the case of $N_f=3$. Thus the linear sigma model as the Ginzburg-Landau description is constructed based on the chiral invariance with its breaking source, including operators up to dimension four, as \begin{eqnarray} {\cal L}_{\rm LSM}&=& {\rm tr}\left[ \partial_\mu \Phi\partial^\mu \Phi^\dagger \right] -V(\Phi), \label{Lag:LSM} \end{eqnarray} where $V(\Phi)$ represents the potential terms, \begin{eqnarray} V(\Phi)&=& V_0(\Phi)+V_{\rm anom}(\Phi)+V_{\rm SB}(\Phi). \label{VPhi} \end{eqnarray} In Eq.(\ref{VPhi}) $V_0(\Phi)$ is the chiral invariant part: \begin{eqnarray} V_0(\Phi)=\mu^2{\rm tr }[(\Phi^\dagger\Phi)] +\lambda_1{\rm tr }[(\Phi^\dagger\Phi)^2] +\lambda_2({\rm tr }[(\Phi^\dagger\Phi)])^2, \end{eqnarray} where $\mu^2$ is the mass parameter taken either a positive or negative value. $\lambda_{1,2}$ are dimensionless quartic coupling constants, which cannot be taken independently in the case of $N_f=2$, because of the speciality of $SU(2)$ algebra. For $N_f=3$, the $U(1)$ axial anomalous part, but keeping the chiral $SU(N_f)_L\times SU(N_f)_R$ symmetry, represents $V_{\rm anom}(\Phi)$. The lowest dimensional operator for the $U(1)$ axial anomalous part is given by a la Kobayashi-Maskawa-'t Hooft~\cite{Kobayashi:1970ji,Kobayashi:1971qz,tHooft:1976rip,tHooft:1976snw}, \begin{eqnarray} V_{\rm anom}(\Phi) = -B_{\rm anom}\left({\rm det}[\Phi]+{\rm det}[\Phi^\dagger]\right), \label{Vanom} \end{eqnarray} where the parameter $B_{\rm anom}$ is taken to be real, which has mass dimension one. In the case of $N_f=2$, $V_{\rm anom}$ is redundant: ${\rm det} \Phi +{\rm h.c.}= 2 (\sigma_0^2 + (\pi_i)^2)$ hence is indistinguishable from the $\mu^2$ term, because $\Phi$ has no $U(1)_A$ charge as in Eq.(\ref{chiralT}). In the underlying QCD Lagrangian, the chiral symmetry is explicitly broken by the current quark mass matrix ${\cal M}={\rm diag}\{m_u,m_d (,m_s) \}$. In the linear-sigma model-Lagrangian, this explicit breaking effect is reflected in the $V_{\rm SB}$ part: \begin{eqnarray} V_{\rm SB}(\Phi)= -c \, {\rm tr}[{\cal M}\Phi^\dagger+{\cal M}^\dagger \Phi], \end{eqnarray} where the parameter $c$ is taken to be a real value, and has mass dimension two. To be consistent with the underlying QCD, we choose the background-field profile for the $\Phi$ field to respect the vectorial symmetry, $SU(2)_V$ or $SU(3)_V$, in such a way that \begin{eqnarray} \bar \Phi \cdot {\bf 1}= \begin{cases} \frac{1}{2}\bar \sigma_0 \cdot {\bf 1}_{2 \times 2}, \;\;\;\;\;\; (\hbox{for }N_f=2) \\ \frac{1}{2}\sqrt{\frac{2}{3}} \bar \sigma_0 \cdot {\bf 1}_{3 \times 3}, \;\;\; (\hbox{for }N_f=3). \end{cases} \end{eqnarray} Thus the linear sigma model potential can be viewed as a Ginzburg-Landau description, at the tree level (i.e. mean field level): \begin{eqnarray} V_{\rm tree}(\bar \sigma_0) = \begin{cases} -\sum_f cm_f\bar\sigma_0 +\frac{1}{2}(\mu^2-B_{\rm anom})\bar \sigma_0^2 +(\frac{\lambda_1}{8 +\frac{\lambda_2}{4})\bar \sigma_0^4 ,\;\;\; ({\rm for}\;\;\;N_f=2 )\\ -\sqrt{\frac{2}{3}}\sum_f cm_f\bar\sigma_0 +\frac{1}{2}\mu^2\bar \sigma_0^2 -\frac{B_{\rm anom}}{3\sqrt{6}}\bar \sigma_0^3 +(\frac{\lambda_1}{12 +\frac{\lambda_2}{4})\bar \sigma_0^4,\;\;\; ({\rm for}\;\;\;N_f=3 ). \end{cases} \label{tree_pot} \end{eqnarray} From this potential, the vacuum expectation value $\langle \bar \sigma_0 \rangle $ can be determined from the stationary condition, \begin{eqnarray} \frac{\partial V_{\rm eff}(\bar \sigma_0)}{\partial \bar \sigma_0} \Bigg|_{\bar{\sigma}_0 = \langle \bar \sigma_0 \rangle = \sqrt{ 2 N_f } \langle \bar{\Phi} \rangle} =0. \label{sc} \end{eqnarray} At the tree level evaluation, it is related to the pion decay constant $f_\pi$ as \begin{eqnarray} \langle \bar{\Phi} \rangle = \frac{1}{\sqrt{2 N_f}} \langle \bar{\sigma}_0 \rangle =f_\pi/2 . \end{eqnarray} We can also discuss the order of chiral phase transition from the tree-level potential in Eq.~(\ref{tree_pot}). At the chiral limit for the case of $N_f=2$ ($m_f=0$), the parameter $B_{\rm anom}$ can be absorbed in the mass parameter $\mu^2$, so that the $U(1)$ axial anomaly part does not effectively affect the the order of chiral phase transition. The tree-level potential then has only the $\bar \sigma_0^2$ and $\bar \sigma_0^4$ terms. Thus, in the massless two-flavor case, the phase transition is deduced to be of the second order. In the massless three-flavor case, the $U(1)$ axial anomaly part generates the cubic term of $\bar \sigma_0$, which creates a potential barrier between the chiral symmetric vacuum ($\bar \sigma_0=0$) and broken one ($\bar \sigma_0\neq 0$). In association with the deformation of the potential, the phase transition is changed to be of the first order. We will later observe that a tadpole term is generated by the electromagnetic scale anomaly, even for the massless flavor cases, in the thermomagnetic QCD. The phase transition becomes crossover, so there should be a critical endpoint seen in the interplay between massless two-flavor and three-flavor thermomagnetic QCD, as in Fig.~\ref{fig:columbia_plot}. \section{Scale anomaly coupled to chiral order parameter} In this section we discuss how the chiral order parameter can affect the scale anomaly. First, note that in the low-energy meson-dynamics, the scalar meson fields serve as a source for the scale symmetry breaking in QCD, accompanied with the chiral symmetry breaking. Then the scale (dilatation) current $j_D(x)$ is composed of hadrons, and would couple to the chiral singlet/isosinglet states, involving the (chiral singlet/isosinglet component of) $\sigma$ meson state, the two-pion resonant state, a tetraquark state, and glueball, and so forth. Since we work on the chiral phase transition by the Ginzburg-Landau description and are interested particularly in a coupling of electromagnetic field background to the chiral order parameter, only the chiral singlet/isosinglet component of the meson field is relevant. We also assume the lightest isoscalar mesons to be mostly composed of quarkonium state, so that the vacuum expectation value associated with the tetraquark state is negligible. One might think that a glueball field can mix with the sigma meson field, hence might contribute to the scale anomaly relevant to the chiral phase transition. However, it has recently been reported from lattice simulations for $2 + 1$ flavors that around the chiral limit which is currently our main concern, the fluctuation of Polyakov loop, which can be regarded as (an electric part) of glueball, does not have significant correlation with the chiral order parameter~\cite{Clarke:2019tzf}. This indicates negligible mixing between the glueball and sigma meson around the chiral limit (with mass less than the physical-point value). Hence such a gluonic term will not be taken into account in the present work. Thus, as far as the coupling to the chiral order parameter at the low-energy is concerned, we can approximate the overlap amplitude between the scale current and (the chiral singlet/isosinglet component of) the sigma meson state, dubbed $\phi$, as~\footnote{ In Eq.~(\ref{PCDC}), the overall sign can be minus, and then it can be absorbed in the decay constant $f_\phi$. } \begin{eqnarray} \langle 0| \partial_\mu j^\mu_D(x)| \phi(p) \rangle = \langle 0| \left(T^\mu_{\;\;\mu}\right)_{\rm meson}(x)| \phi(p) \rangle \approx f_\phi m_\phi^2 e^{-ip\cdot x} , \label{PCDC} \end{eqnarray} where we have taken $\langle \phi \rangle = f_\phi$, which plays the role of the decay constant for the scale breaking, and $\left(T^\mu_{\;\;\mu}\right)_{\rm meson}$ is the trace of the energy momentum tensor described by mesons. \subsection{Ward-Takahashi identity for scale symmetry in electromagnetic field} The scale symmetry is also explicitly broken by the electromagnetic contribution and becomes anomalous. As a consequence, the chiral-singlet/isosinglet scalar can be coupled to the electromagnetic field via the scale anomaly arising from the quantum correction of the quark loop. To obtain the coupling form between the scalar field and the electromagnetic field, we consider the correlation function related to the Ward-Takahashi identity for a photon two-point function coupled with the dilatation current $j_D^\mu$, \begin{eqnarray} \lim_{q\to 0} \int d^4y e^{iq\cdot y} \langle 0|T \partial_\rho j_D^\rho(y) A_\mu (x)A_\nu (0)|0\rangle = i\delta_D \langle 0| TA_\mu (x)A_\nu (0)|0\rangle \,, \label{LET_EM} \end{eqnarray} where $\delta_D$ denotes the infinitesimal scale transformation by the charge $Q_D = \int d^3 {\vec x} j_D^0(x)$, defined as $[i Q_D, {\cal O}(x)]= \delta_D {\cal O}(x)= (d_{\cal O} + x^\nu \partial_\nu) {\cal O}(x)$, for an operator ${\cal O}$ with the scaling dimension $d_{\cal O}$. Assuming the lightest scalar-meson pole-dominance, we can rewrite the left-hand side of Eq.~(\ref{LET_EM}), \begin{eqnarray} \lim_{q\to 0} \int d^4y e^{iq\cdot y} \langle 0|T \partial_\rho j_D^\rho(y) A_\mu (x)A_\nu (0)|0\rangl = -i f_\phi \lim_{q\to 0} \langle \phi({q})| T A_\mu (x)A_\nu (0)| 0\rangle. \label{lowT_DA_int} \end{eqnarray} Here, we have used Eq.~(\ref{PCDC}). Hence, the overlap amplitude of two photons with the chiral-singlet/isosinglet scalar state can be described by the scale transformation for the photon propagator, \begin{eqnarray} \langle \phi({q=0})| T A_\mu (x)A_\nu (0)| 0\rangle = - \frac{1}{f_\phi} \delta_D \langle 0| TA_\mu (x)A_\nu (0)|0\rangle. \label{amp_ST} \end{eqnarray} By using Eq.~(\ref{amp_ST}), later we will find the coupling form between the sigma meson field and the electromagnetic field. \subsection{Electromagnetic scale-anomaly induced-tadpole at finite temperature} In the magnetized-thermal bath, the Lorentz invariance in four dimensions is lost. Then, the photon propagator expression should be no longer Lorentz or $O(3)$ covariant, due to the quark-loops in the bath, which would yield intrinsic magnetic corrections to the photon polarization function, as well as the thermal corrections. Note, however, that our current main concern is the overlap amplitude between the $\phi$ scalar and two photon fields in Eq.(\ref{amp_ST}), which, in terms of the interaction Lagrangian, should take the form like $\sim f(eB, T) \bar{\phi} F_{\mu\nu} F^{\mu\nu} \sim f(eB, T)\bar{\phi} B^2$, where $\bar{\phi}$ is the background field of $\phi$, and $f(eB, T)$ is an associated form factor arising from the thermomagnetized quark loop corrections. Therefore, in the weak magnetic regime that involves our current concern, we can ignore the $eB$-dependence in $f(eB, T)$, because it would give subleading corrections like ${\cal O}((eB)^4)$ to the total $\phi$-photon-photon amplitude. Hence, as far as the weak magnetic field regime is concerned, the magnetic field dependence on the photon propagator involving polarization functions like $f(eB, T)$ can be ignored. We will further give comments on this higher order correction later (in Conclusion and Discussion section). In that case, the photon propagator only gets the thermal quantum correction to the quark-photon vertex with a (dynamical) quark mass $m_{\rm dyn}$. Then the polarization structure can be generally decomposed into the three independent components, \begin{eqnarray} D_{\mu\nu}(K) &=& \frac{-i}{K^2-\Pi_T}P_{\mu\nu} +\frac{-i}{K^2-\Pi_L}Q_{\mu\nu} +(\xi-1) \frac{iK_\mu K_\nu}{K^4}, \label{Dmunu} \end{eqnarray} where the four-momentum of the photon denotes $K_\mu=(\omega,k_1,k_2,k_3)$. $\xi$ is the gauge fixing parameter, and $P_{\mu\nu}$ and $Q_{\mu\nu}$ represent the transverse- and the longitudinal-polarization tensors, \begin{eqnarray} P_{\mu\nu}&=&\tilde \eta_{\mu\nu}+\frac{\tilde K_\mu \tilde K_\nu }{{\vec k}^2}, \nonumber\\ Q_{\mu\nu}&=&\frac{-1}{K^2{\vec k}^2} \left({\vec k}^2u_\mu+\omega \tilde K_\mu\right) \left({\vec k}^2u_\nu+\omega \tilde K_\nu\right), \end{eqnarray} with $\tilde \eta_{\mu\nu}$, $\tilde K_\mu$ and $u_\mu$ being \begin{eqnarray} \tilde \eta_{\mu\nu}&=& {\rm diag }[0,-1,-1,-1] ,\nonumber\\ \tilde K_\mu&=& K_\mu-\omega u_\mu=(0,k_1,k_2,k_3), \nonumber\\ u_\mu&=&=(+1,0,0,0). \end{eqnarray} The loop corrections $\Pi_{T,L}$ separately include the vacuum part $\Pi_{T,L}^{(T=0)}$ and thermal part $\Pi_{T,L}^{(T\neq 0)}$, \begin{eqnarray} \Pi_{T,L}=\Pi_{T,L}^{(T=0)}+\Pi_{T,L}^{(T\neq0)}. \label{PiTL} \end{eqnarray} At the quark one-loop calculation performed by the dimensional regularization in $4-\epsilon$ dimension, $\Pi_{T,L}$ are expressed as (for the detail of the thermal part, see \cite{Weldon:1982aq,Ahmed:1991mz}) \begin{align} \Pi^{(T=0)}_T&= \Pi^{(T=0)}_L = -\frac{N_c}{2\pi^2} \sum_fQ_f^2 K^2 \int_0^1dx\, x(1-x)\left( \frac{2}{\epsilon}-\log\left\{m^2_{\rm dyn}-x(1-x)K^2\right\}-\gamma+\log(4\pi) \right) \nonumber\\ \Pi_T^{(T\neq 0)}&= \frac{2N_c}{\pi^2}\sum_fQ_f^2 \Biggl[ \left\{ \frac{\omega^2}{{\vec k}^2} +\left(1-\frac{\omega^2}{{\vec k}^2} \right)\ln\frac{\omega+|{\vec k}|}{\omega-|{\vec k}|} \right\}\nonumber\\ & \times \left( {m_{\rm dyn}T} \tilde a(m_{\rm dyn}/T)-T^2 \tilde c(m_{\rm dyn}/T) \right) +\frac{1}{8}\left\{ 2m^2_{\rm dyn}+\omega^2+\frac{107\omega^2-131{\vec k}^2}{72}\right\}\tilde b (m_{\rm dyn}/T) \Biggl]\nonumber\\ \Pi_L^{(T\neq0)}&= \frac{4N_c}{\pi^2}\sum_f Q_f^2 \left(1-\frac{\omega^2}{{\vec k}^2}\right) \Biggl[ \left(1-\frac{\omega}{2|{\vec k}|} \ln\frac{\omega+|{\vec k}|}{\omega-|{\vec k}|} \right)\left( {m_{\rm dyn}T} \tilde a(m_{\rm dyn}/T) -T^2\tilde c(m_{\rm dyn}/T) \right)\nonumber\\ & +\frac{1}{4}\left\{ 2m^2_{\rm dyn}-\omega^2+\frac{11{\vec k}^2+37\omega^2 }{72}\right\}\tilde b (m_{\rm dyn}/T) \Biggl],\nonumber\\ \end{align} where $Q_f$ with $f=u,d$ (and $s$) is the electromagnetic charge for quark flavor $f$, $Q_u=2e/3,\;\;Q_d=-e/3,\;\;Q_s=-e/3$; $m_{\rm dyn}$ is the dynamical quark mass generated by the spontaneous chiral symmetry breaking; $\gamma$ is the Euler-Mascheroni constant. Here, we have taken the flavor universal limit; $m_{\rm dyn}^{(u)}=m_{\rm dyn}^{(d)}=m_{\rm dyn}^{(s)}=m_{\rm dyn}$, which turns out to be justified in the present framework of analysis even in the presence of the chiral-and isospin-breaking magnetic field (See the later discussion around Eq.(\ref{Yukawa:g})). $\tilde a(m_{\rm dyn}/T)$, $\tilde b(m_{\rm dyn}/T)$ and $\tilde c(m_{\rm dyn}/T)$ are given by \begin{eqnarray} \tilde a(m_{\rm dyn}/T)&=& \ln(1+e^{-m_{\rm dyn}/T}),\nonumber\\ \tilde b(m_{\rm dyn}/T)&=& \sum_{n=1}(-1)^n {\rm Ei}(-nm_{\rm dyn}/T) =\sum_{n=1}(-1)^n\left( -\int^\infty_{nm_{\rm dyn}/T} \frac{e^{-t}}{t} dt \right), \nonumber\\ \tilde c(m_{\rm dyn}/T)&=& \sum_{n=1}^{\infty}(-1)^n\frac{e^{-nm_{\rm dyn}/T}}{n^2}. \end{eqnarray} With the above explicit expression, the scale transformation for the photon propagator showing up in Eq.(\ref{amp_ST}) is evaluated as \begin{eqnarray} \delta_D D_{\mu\nu} (x &=& -\int\frac{d^4p }{(2\pi)^4}\Biggl[ \Biggl\{ F^{(T=0)}(K) + F^{(T\neq0)}_T(\omega,{\vec k}) \Biggl\} \frac{i}{(K^2-\Pi_T)^2}P_{\mu\nu} \nonumber\\ && \Biggl\{ F^{(T=0)}(K) + F^{(T\neq0)}_L(\omega,{\vec k}) \Biggl\} \frac{i}{(K^2-\Pi_L)^2}Q_{\mu\nu} \Biggl] e^{-iK\cdot x}, \label{deltaD-D} \end{eqnarray} where $F^{(T=0)}(K)$ and $F^{(T\neq0)}_{T,L}(\omega,{\vec k})$ represent the variation for the vacuum- and the thermal-correction parts, respectively. The vacuum part $F^{(T=0)}(K)$ is evaluated as \begin{eqnarray} F^{(T=0)}(K)&=&-2\frac{\beta(e)}{e} K^2 + F_{\rm NL}^{(T=0)}(K) , \label{func_vacuum_beta} \end{eqnarray} where \begin{eqnarray} F_{\rm NL}^{(T=0)}(K)=\frac{N_c}{\pi^2} \sum_f Q_f^2 m^2_{\rm dyn} \Biggl[-1 + \int_0^1 dx\frac{1}{1-x(1-x)(K^2/m^2_{\rm dyn})}\Biggl]. \end{eqnarray} $\beta(e)$ denotes the beta function of the electromagnetic gauge coupling $(e)$, defined as $\beta(e)= \partial e(\mu)/\partial \ln \mu $ with the renormalization scale $\mu$. We evaluate the beta function $\beta(e)$ at the one-loop level of QED as $ \beta(e)=\frac{e}{(4\pi)^2}\frac{4N_c}{3} \sum_f Q_f^2 $, with $N_c=3$. The first term of the right hand side in Eq.~(\ref{func_vacuum_beta}) induces the local-tadpole interaction between the $\phi$ and the electromagnetic fields, while the second term $F_{\rm NL}^{(T=0)}(K)$ corresponds to the nonlocal effective interaction. The thermal-correction part $F^{(T\neq 0)}_{T,L}(\omega,{\vec k})$ in Eq.(\ref{deltaD-D}) gives the the effective interaction between the $\phi$ and the electromagnetic field, which is expressed as the nonlocal form. Note, however, that $F^{(T\neq 0)}_{L}(\omega,{\vec k})$ comes along with the longitudinal polarization of photon, which does not couple to a magnetic field, so that it does not contribute to the the thermomagnetic tadpole. Hence this part will be discarded in the present study. From Eq.~(\ref{amp_ST}) and Eq.~(\ref{deltaD-D}), we can read off the effective interaction between the $\phi$ and the electromagnetic field at finite temperature: \begin{eqnarray} \int d^4 x {\cal L}_{\rm int}^{\rm (Tad)}&=& \int d^4 x \frac{\beta (e)}{2e} \frac{\phi}{f_\phi} F_{\mu\nu} F^{\mu\nu} \nonumber\\ && +\int d^4 x \int d^4 y f^{(T=0)}(x-y) \frac{\phi(x)}{f_\phi} {F}_{\mu\nu}(x) {F}^{\mu\nu}(y) \nonumber\\ && +\int d^4 x \int d^4 y f^{(T\neq0)}(x-y) \frac{\phi(x)}{f_\phi} \bar{F}_{\mu\nu}(x) \bar{F}^{\mu\nu}(y) , \label{EM_SA_int_v2} \end{eqnarray} where \begin{eqnarray} \bar F_{\sigma \rho}(x)&=&\tilde\partial_\sigma \tilde A_\rho(x) - \tilde \partial_\rho \tilde A_\sigma(x), \nonumber\\ \tilde \partial_\sigma &=&\partial_\sigma - u_\sigma \partial_0 =(0, \partial_1,\partial_2,\partial_3), \nonumber\\ \tilde A_\rho(x)&=&\tilde \eta_{\rho \mu } A^\mu(x) =A_\rho (x)-A_0(x) u_\rho =(0,A_1,A_2,A_3)\,, \notag\\ \, f^{(T=0)}(x-y)&=& \int \frac{d^4K}{(2\pi)^4} \frac{-1}{4 K^2} F^{(T=0)}_{NL}(K) e^{-iK\cdot (x-y)}, \nonumber\\ f^{(T\neq0)}(x-y)&=& \int \frac{d^4K}{(2\pi)^4} \frac{1}{4\vec k^2} F^{(T\neq0)}_T(\omega,\vec k) e^{-iK\cdot (x-y)}. \end{eqnarray} We readily see that at $T=0$, the first term in Eq.~(\ref{EM_SA_int_v2}) corresponds to the electromagnetic scale anomaly in the vacuum, which induces the tadpole term in the effective potential viewed as a Ginzburg-Landau description. The second term of the nonlocal interaction vanishes at the low energy limit, so that it does not contribute to the effective potential describing the chiral phase transition. On the other hand, the third term corresponding to the thermal-correction part in Eq.(\ref{EM_SA_int_v2}) does not drop out even in the low-energy limit, and includes an infrared divergence, which we regularize by introducing the cutoff $\mu_{\rm IR}$. Then, in the constant magnetic field $eB$, the thermomagnetically induced tadpole can be evaluated as \begin{align} \int d^4 x \int d^4 y f^{(T\neq0)}(x-y) \frac{\bar\phi}{f_\phi} \bar{F}_{\mu\nu}(x) \bar{F}^{\mu\nu}(y) &= \int d^4 x \int d^4 y f^{(T\neq0)}(x-y) \frac{\bar\phi}{f_\phi} 2B^2 \nonumber\\ &\approx \int d^4x \left[ \frac{1}{2e^2} \sum_fQ_f^2 F(T,m_{\rm dyn}) \frac{\bar\phi}{f_\phi} \frac{|eB|^2}{\mu_{\rm IR}^2} \right], \label{thermal-tad-part} \end{align} where \begin{align} \sum_f Q_f^2F(T,m_{\rm dyn}) &=F^{(T\neq0)}_T(\omega=0,{\vec k}=0)\nonumber\\ &= \sum_f Q_f^2 \frac{4N_c}{\pi^2} \Biggl[ \left( {m_{\rm dyn}T} \tilde a(m_{\rm dyn}/T) -T^2\tilde c(m_{\rm dyb}/T) \right) +\frac{1}{4}m^2_{\rm dyn}\tilde b (m_{\rm dyn}/T) \Biggl]. \end{align} In a weak magnetic field regime (with $\sqrt{eB} \ll {\cal O}$(GeV), much less than an ultraviolet cutoff scale for an effective model which we will work on in the later sections) the magnetic field strength $\tilde F_{12}=-B$ should numerically supply the infrared cutoff, i.e., $\mu_{\rm IR} \equiv \sqrt{eB}$. With this prescription applied, the right hand side of Eq.(\ref{thermal-tad-part}) takes the form \begin{eqnarray} \int d^4x \left[ \frac{1}{2e^2} \sum_fQ_f^2 F(T,m_{\rm dyn}) \frac{\bar\phi}{f_\phi} |eB| \right]. \end{eqnarray} In total, the tadpole term is generated in the effective potential for the background field $\bar \phi$ and takes the form \begin{eqnarray} {V}_{\rm eff}^{\rm (Tad)}(\bar \phi) = - \frac{\bar \phi}{f_\phi} \Biggl[ \frac{\beta (e)}{e} B^2 +\frac{1}{2e^2} \sum_fQ_f^2 F(T,m_{\rm dyn}) |eB| \Biggl]. \label{EM_tad_appendix} \end{eqnarray} As the magnetic field gets strong, the one-loop calculation depending the magnetic field should be taken into account. However, the dynamics of quarks are governed by the lowest Landau level states polarized along the direction parallel to the magnetic field, where the transverse part of the photon polarization does not couple to quarks. Thus, the tadpole term induced by the electromagnetic scale anomaly Eq.~(\ref{EM_tad_appendix}) vanishes in the strong magnetic field regime, which is most effective in the weak magnetic regime. In Eq.~(\ref{EM_tad_appendix}), the $\phi$ can be identified as the the sigma meson which plays a role of the order parameter for the spontaneous chiral symmetry breaking. In terms of the linear sigma field $\Phi$, we find $\phi = \sqrt{2 {\rm tr} [\Phi^\dag \Phi]} = \sqrt{ \sigma_0^2 + \pi^2 + \cdots}$, and $\bar{\phi}= \bar{\sigma}_0$ when we only focus on the $\sigma_0$-direction, which is relevant to the chiral phase transition. Then the $\phi$-tadpole term in Eq.~(\ref{EM_tad_appendix}) can be expressed as \begin{eqnarray} {V}_{\rm eff}^{\rm (Tad)}(\bar \sigma_0) = - \sqrt{\frac{2}{N_f}} \frac{\bar \sigma_0}{f_\pi} \Biggl[ \frac{\beta (e)}{e} B^2 +\frac{1}{2e^2} \sum_fQ_f^2 F(T,m_{\rm dyn}) |eB| \Biggl], \label{EM_tad_PhiBase} \end{eqnarray} where we have used $ f_\phi = \sqrt{N_f/2} f_\pi$. Hence, the scale-anomaly induced-tadpole terms in Eq.~(\ref{EM_tad_PhiBase}) give the contributions to the chiral phase transition. This thermomagnetic tadpole arises even in the chiral limit, as the magnetically induced-explicit chiral-breaking effect. Before closing this section, we give a comment on possible contribution from the gluonic scale-anomaly, which is thought to be present all the way in the thermal QCD including the vacuum. It is known that the gluonic scale-anomaly can be introduced as the log potential form in the scale-chiral Lagrangian~\cite{Brown:1991kk}, which satisfies the low energy theorem in Eq.~(\ref{PCDC}). In the linear sigma model, however, the meson terms already saturate the low energy theorem, i.e., the scale anomaly and the partially-conserved dilatation current relation: \begin{align} \partial_\mu j^\mu_D= \left(T^\mu_{\;\;\mu}\right)_{\rm meson} &= 2\mu^2{\rm tr}[\Phi^\dagger \Phi] +(N_f-4)B({\rm det \Phi}+{\rm det \Phi^\dagger}) -3c \, {\rm tr}[{\cal M}\Phi^\dagger+{\cal M}^\dagger \Phi], \nonumber\\ \to \qquad \langle 0| \left(T^\mu_{\;\;\mu}\right)_{\rm meson}(x)|{\sigma}_0(p) \rangle &= \sqrt{\frac{N_f}{2}} f_\pi m^2_\sigma e^{-ip\cdot x} . \label{PCDC_linear} \end{align} Thereby, such a conventional log interaction term will be redundant. However, one might still think how much the log potential form like $\bar \sigma_0^4 \log\bar \sigma_0 $ is responsible for the chiral phase transition. Actually, the log potential can be rewritten as a combination of $\bar \sigma_0^{4}$ term and $\bar \sigma_0^{4+\epsilon}$ term with a small $\epsilon,$ $\epsilon\ll1$. Therefore, the log potential does not give any interference for the electromagnetically induced-scale anomaly tadpole term. Thus the tadpole term cannot be washed out and is intact even if we include the redundant log potential into the effective potential. \section{A new critical endpoint: demonstration based on quark meson model in the large $N_c$ limit} To explicitly see what form the tadpole takes, we employ a quark-meson model in a constant weak magnetic field~\footnote{ It has been discussed~\cite{Ayala:2014gwa,Andersen:2014oaa} that in a strong magnetic field regime, the quark-meson model can reproduce the reduction of the (pseudo) critical temperature of the chiral crossover and the inverse magnetic catalysis for the quark condensate, discovered on the lattice~\cite{ catalysis2, endrodi-eos, Tomiya-Hisq, Massimo-heavy-pion, Enrodi-heavy-pion,Endrodi}. }. The model Lagrangian is built based upon renormalizable interactions among quarks and mesons allowed by the chiral invariance. It is constructed from the linear sigma model part in Eq.(\ref{Lag:LSM}) and the Dirac-fermion kinetic term for quarks, together with the Yukawa interaction term between quarks and mesons. The Yukawa coupling is introduced to be flavor universal, as it should be, because QCD is flavor blind: \begin{align} {\cal L}_{\rm Yukawa}= - \sum_q g_q (\bar{q}_L \Phi q_R + {\rm h.c.}) \qquad {\rm with} \qquad g_q \equiv g \,. \label{Yukawa:g} \end{align} Thus, the quark-meson model Lagrangian goes like \begin{align} {\cal L}_{\rm QM} = {\cal L}_{\rm LSM} + {\cal L}_{\rm kin}^{\rm quarks} + {\cal L}_{\rm Yukawa} \,. \end{align} As in the literature~\cite{Andersen:2011ip}, we may work in the large $N_c$ limit, and only take into account the quark loops at one-loop level. As in Eq.(\ref{GL-model}), we take the flavor symmetric order parameter, ${\bar\sigma}_u = \bar{\sigma}_d = \bar{\sigma}_s = \bar{\sigma}_0$, though potentially non-negligible flavor breaking can be induced by the magnetic field. This prescription can be justified as follows: as it will be seen, the later concrete analysis will be based on the quark-meson model at the large $N_c$ limit, where among the charged particle contributions, only the quark loops via the flavor-universal Yukawa coupling in Eq.(\ref{Yukawa:g}) contribute to the chiral order parameter at vacuum ($T=eB=0$). Thus, in the thermomagnetic system with massless three or two flavors, only the charge difference among three or two quarks makes the chiral order parameters flavorful, which comes with the magnetic field. Meanwhile, lattice QCD (with 2 + 1 flavors) at physical point has reported small isospin breaking in the up and down quark condensates at around the chiral crossover, even in a strong magnetic field ($\sqrt{eB} \ge 1$ GeV), e.g., ~\cite{Endrodi:2015oba}. This small flavor breaking can be applied also among up and strange quarks with a weaker magnetic field in the present analysis. Thus we simply assume the three-flavor symmetric vacuum even in the presence of magnetic field. In the large $N_c$ limit, the quantum correction to the effective potential only arises from the quark one-loop calculation regularized by the dimensional regularization, which consists of the vacuum part $V_{\rm 1-loop}^{\rm vac}$ and the thermal part $V_{\rm 1-loop}^{\rm T}$~\cite{Andersen:2011ip}. By combining the quark parts with the mesonic part in Eq~(\ref{tree_pot}) and the scale-anomaly induced-tadpole term in Eq.~(\ref{EM_tad_PhiBase}), the effective potential based on the quark-meson model is given as, \begin{eqnarray} V_{\rm eff}(\bar \sigma_0) =V_{\rm tree}(\bar \sigma_0)+ V_{\rm 1-loop}^{\rm vac}(\bar \sigma_0)+ V_{\rm 1-loop}^{\rm T}(\bar \sigma_0)+ {V}_{\rm eff}^{\rm (Tad)}(\bar \sigma_0), \end{eqnarray} where \begin{eqnarray} V_{\rm 1-loop}^{\rm vac}&=& \frac{N_c m_{\rm dyn}^4}{(4\pi)^2}\sum_f\left[ \log\frac{\Lambda^2}{2|Q_fB|}+1 \right] -\frac{N_c}{2\pi^2}\sum_f (Q_f B)^2 \left[ \zeta^{(1,0)}(-1,x_f)+\frac{1}{2}x_f\log x_f \right]\nonumber\\ V_{\rm 1-loop}^{T} &=& -N_c\sum_{s,f,n}\frac{|Q_fB|T}{\pi^2} \int^\infty_0 dp\log\left( 1+e^{-\sqrt{p^2+ \left(M_{\rm eff}^{(f,s)}\right)^2 }/T } \right) \nonumber\\ &=& -N_c\sum_f\frac{|Q_fB|T}{\pi^2} \int^\infty_0 dp \Biggl[ \log\Biggl\{ 1 +\exp\left ({-\sqrt{p^2+\left(m^{(f)}_{\rm dyn}\right)^2}}/T\right) \Biggl\} \nonumber\\ && +2\sum_{n=1} \log\Biggl\{ 1 +\exp\left ({-\sqrt{p^2+\left(m^{(f)}_{\rm dyn}\right)^2+2n|Q_f B|}}/T\right) \Biggl\} \Biggl], \end{eqnarray} with \begin{eqnarray} M_{\rm eff}^{(f,s) &=& \sqrt{\left(m^{(f)}_{\rm dyn}\right)^2+|Q_fB|(2 n+1-s)} \nonumber\\ x_f&=&{\left(m^{(f)}_{\rm dyn}\right)^2}/{(2|q_f B|)}. \end{eqnarray} $M_{\rm eff}^{(f,s)}$ represent the effective quark masses for the spin-up/down quark, $s=\pm1$. $\zeta(a,x)$ is the Hurwitz zeta-function, and $\Lambda$ being the renormalization scale fixed as $\Lambda=181.96{\rm MeV}$~\cite{Andersen:2011ip}. As noted above, the dynamical quark masses as well as the quark condensates are flavor universal, and are evaluated as \begin{eqnarray} m^{(u)}_{\rm dyn} = m^{(d)}_{\rm dyn} = m^{(s)}_{\rm dyn} = m_{\rm dyn}= 2g\bar \Phi, \end{eqnarray} where $g$ is the Yukawa coupling between the quarks and the mesonic sector as in Eq.(\ref{Yukawa:g}). At $T=0$ and $eB=0$, we have set $m_{\rm dyn}=300\;{\rm MeV}$ and $g=3.2258$~\cite{Andersen:2011ip}, which produces meson mass values given in Appendix~A. \begin{figure}[ht] \begin{tabular}{cc} \begin{minipage}{0.5\hsize} \begin{center} \includegraphics[width=7.0cm]{vev_F2_eBfpi2_mpi0_compSA_v4.pdf} \subfigure{(a)} \end{center} \end{minipage}% \begin{minipage}{0.5\hsize} \begin{center} \includegraphics[width=7.0cm]{potential_Nf2_T180_comp_v3.pdf} \subfigure{(b)} \end{center} \end{minipage} \end{tabular} \caption{ The chiral phase transition for massless two-flavor case, predicted from the quark-meson model in the large $N_c$ limit. The panel (a) shows the $T$-dependence of the chiral order parameter $\bar{\sigma}_0$, around the critical temperature $T_c \simeq 175$ MeV. The panel (b) displays the deformation of the effective potential $V_{\rm eff}$, normalized to the (forth power of) pion decay constant $f_\pi (\simeq 93 \,{\rm MeV})$ at vacuum. The effective potential has been normalized by subtracting $V_{\rm eff}(\bar{\sigma}_0=0)$ at $T=180$~MeV. Both panels monitor the $eB$ dependence in unit of $f_\pi^2$, for two cases with or without the scale anomaly-induced tadpole term included. } \label{nf2} \end{figure} Two plots in Fig.~\ref{nf2} exhibit a sketch of the thermomagnetic phase transition for the chiral $SU(2)_L \times SU(2)_R$ symmetry based on the quark-meson model with massless two flavors. As clearly seen, the scale-anomaly induced-tadpole term in Eq.(\ref{EM_tad_PhiBase}) makes the phase transition crossover, in somewhat a weak magnetic regime less than the (square of) chiral critical temperature $T_c \simeq 175$ MeV (for $eB=0$)~\footnote{ The value of $T_c$ estimated from the present quark-meson model does not agree with the result with the chiral extrapolation (only applied to the lightest two-flavors) on the lattice QCD with $2 + 1$ flavors, $T_c|_{\rm lat.} = 132^{+3}_{-6} $MeV \cite{Sheng-Tai}. However, this quantitative discrepancy is irrespective of our main claim in Fig.~\ref{fig:columbia_plot}. \label{foot:Tpc} }. This puts the milestone marked as ``Crossover" at the crossed point in the $eB$ axis at $m_s \to \infty$, in the extended Columbia plot in Fig.~\ref{fig:columbia_plot}. \begin{figure}[ht] \begin{tabular}{cc} \begin{minipage}{0.5\hsize} \begin{center} \includegraphics[width=7.0cm]{vev_F3_eBfpi2_mpi0_compSA_v4.pdf} \subfigure{(a)} \end{center} \end{minipage}% \begin{minipage}{0.5\hsize} \begin{center} \includegraphics[width=7.0cm]{potential_Nf3_T108_comp_v3.pdf} \subfigure{(b)} \end{center} \end{minipage} \end{tabular} \caption{ The same as Fig.~\ref{nf2}, but for massless three flavors. The chiral critical temperature at $eB=0$ is $T_c=113$~MeV. The effective potential $V_{\rm eff}$ has been normalized in the same way as in Fig.~\ref{nf2}, and subtracted by the value at $\bar{\sigma}_0=0$ evaluated at $T=108$ MeV. } \label{nf3} \end{figure} Turning to the massless three-flavor case, we make similar plots in Fig.~\ref{nf3}. In this case, the electromagnetically induced scale-anomaly tadpole competes with the $U(1)$ axial-anomaly induced cubic term. Eventually the $U(1)$ axial-anomaly contribution wins, so that the chiral phase transition for the $SU(3)_L \times SU(3)_R$ symmetry keeps still of the first order, even the presence of the induced tadpole, though the chiral order parameter cannot exactly reach zero because of the tadpole. This result is marked as ``1st order" in the extended Columbia plot, in Fig.~\ref{fig:columbia_plot}. It has been noted in the literature~\cite{Pisarski:2019upw} that at $T < 1.5 T_c$ the instanton effects are not significantly suppressed. In terms of the present quark-meson model, this implies that the corresponding coupling $B_{\rm anom}$ in Eq.~(\ref{Vanom}) for the $U(1)$-axial anomaly term, giving the $\alpha_3(T,eB) \bar{\sigma}_0^3$ term in Eq.(\ref{GL-model}), can still be effective over the possible thermal suppression at around $T=T_c$. Thus, combining the explicit results in Figs~\ref{nf2} and~\ref{nf3}, we can conclude that in the extended Columbia plot, along the $m_s$ axis, there should be a critical endpoint marked as a second order phase transition -- that is the ``Suggested endpoint", in Fig.~\ref{fig:columbia_plot} dictating the critical contribution of the electromagnetic scale anomaly to the chiral phase transition. \section{Conclusion and Discussion} In conclusion, detection of the scale anomaly in the chiral phase transition is possible: apply a weak magnetic field onto QCD with $m_s \to \infty$ and $m_u=m_d=0$, first observe the chiral crossover. Second, adjusting $m_s \searrow 0$, observe the second-order chiral phase transition, which is a new critical endpoint (See Fig.~\ref{fig:columbia_plot}). That is the evidence of the quantum scale anomaly. This is most operative in a weak magnetic field regime. Several comments are in order: \begin{itemize} \item Looking at Fig.~\ref{fig:columbia_plot}, we may have one interesting question: whether or not the second order nature persists when $m_s$ gets smaller along the $m_s$ axis. If it does, there should be a second-order phase transition line on the $m_s$ axis, extended from the suggested endpoint down to the first-order phase transition domain surrounded by the observed first-order point in Fig.~\ref{nf3}. This is illustrated as the black-bold line on the $m_s$ axis, in Fig.~\ref{fig:columbia_plot}. Here one should notice that there should also be a tri-critical point, at which the three phases (first, second, and crossover domains) overlap. It is marked by a blank square, in Fig.~\ref{fig:columbia_plot}. In that case, existence of the second-order phase transition line might be interpreted a remnant of the universality class of $O(4)$ on the $m_s$ axis, as in the Columbia plot without magnetic field~\cite{Columbia}. Another second order line extended to the regime with $m_{l}>0$ is assumed to survive as in the usual Columbia plot without magnetic field, though it is yet unclear to be governed by the universality class of $Z_2$ (See the black-bold line separating the first order and crossover domains around the massless three-flavor regime in Fig.~\ref{fig:columbia_plot}). If the crossover nature, confirmed at $m_s \to \infty$ in Fig.~\ref{nf2}, keeps until the first-order phase transition domain surrounded by the observed first-order point in Fig.~\ref{nf3}, the new critical endpoint would then become identical with the tri-critical point. Detailed analysis on identification of the tri-critical endpoint is to be pursued in another publication. \item As to the systematic expansion with respect to the magnetic field, we have applied the standard way as has been applied on lattice QCD, e.g.~\cite{DElia:2011koc,Tomiya-Hisq}. When expanded formally in amplitudes including the vacuum polarization function of photon, the magnetic field is assumed to be small compared to a cutoff scale intrinsic to the model, which is the lattice scaling in the case of lattice QCD, and for the present quark-meson model it is an ultraviolet scale of ${\cal O}(1)$ GeV, above which mesons should dominantly be melted, or gluonic degrees of freedom should become relevant. \textcolor{black}{ In Eq.(\ref{EM_tad_PhiBase}) we have presently ignored the next-to-leading order terms of ${\cal O}(eB^2)$ for the thermally induced tadpole part. However, such higher order corrections would naively be suppressed by a loop factor, compared to the leading order term of ${\cal O}(eB)$ in Eq.(\ref{EM_tad_PhiBase}). Even if it would not sufficiently be suppressed, and would potentially constructively enhance or destructively weaken the tadpole contribution, the presently addressed chiral-phase transition nature would not substantially be altered, as long as the magnetic field is weak enough, hence existence of the new critical endpoint would still be stable. } To be more rigorous, it is subject to nonperturbative analysis on the photon polarization function coupled to the sigma field. Recently, there have been attempts to compute the photon polarization in the weak field approximation at finite temperature \cite{Ghosh:2019kmf}. It would be interesting to apply their technique described in the literature to our study, which is, however, beyond the scope of the present paper, instead deserve to another work. \item Currently, the chiral-extrapolation on lattice in absence of a magnetic field has extensively been systematically studied, and improved so much in the case with $2+1$ flavors \cite{Sheng-Tai}. On the other hand, there has been remarkable progress on creating small magnetic fields at the physical point, and the current lower bound is $\sim$ 100 MeV \cite{Endrodi}. It has also been worked out to calculate derivatives with respect to magnetic fields directly on the lattice, so in principle small magnetic fields become accessible~\cite{Bali:2020bcn}. Therefore, it is highly anticipated that the new critical endpoint is accessible to search on lattice QCD in near future. \item More on thermodynamical properties in thermomagnetic QCD with the electromagnetic scale anomaly will be pursued in another publication. It is also worth cross-checking our finding by the (nonperturbative) renormalization group method. \item The presently proposed new critical endpoint is off the physical point. Extension by including a finite baryon chemical potential ($\mu_B$) might kick it up at the physical point, analogously to the prospected existence of the QCD critical endpoint at the physical point in the conventional QCD phase diagram on the $\mu_B$-$T$ plane: the QCD critical endpoint at the physical point can be extended to form a critical surface when three quark masses are varied. This critical surface may also cover (or sweep) the smaller mass regime in evolving $\mu_B$ down to $\mu_B=0$, onto the Columbia plot, which is governed by the first-order domain stemming from the massless three-flavor limit~\cite{deForcrand:2017cgb} (See also the ``1st order" domain in Fig.~\ref{fig:columbia_plot}). Thus the existence of the QCD critical endpoint can be understood by a simple extrapolation along the critical surface with finite $\mu_B$ , and can be interpreted as weakening of the first-order nature of the three-flavor chiral limit to the physical point on the Columbia plot~\cite{deForcrand:2017cgb}. This kind of critical surface might also be observed so as to link the suggested off-physical endpoint in Fig.~\ref{fig:columbia_plot}, to the physical point, when extended to finite $\mu_B$. Investigation along this possibility would also be worth pursuing. \item Beyond the chiral limit, we have also studied the pion-mass ($m_\pi$) dependence on the chiral-phase transition nature, in light of lattice simulations in the future. Readers having particular concern in this research direction can refer to the result displayed in Fig.~\ref{nf3:mpi-changed}, in Appendix B. \item Our finding would also be relevant to modeling magnetized thermal QCD-like theories beyond the standard model of particle physics. For instance, it would impact gravitational wave productions addressed by a chiral phase transition in a dark/hidden QCD theory with three flavors together with a magnetic field weaker than the target QCD scale, which originates from redshifting the primordially produced one. Having one heavier flavor among three would be incompatible and cannot realize the first-order phase transition desired to create sources of gravitational waves. \end{itemize} At any rate, searching for the new critical endpoint is of importance, and paves a way to pioneer this frontier along with the scale anomaly, in the extended Columbia plot, Fig.~\ref{fig:columbia_plot}. \section*{Acknowledgements} \vspace{15pt} We are grateful to Massimo D’Elia, Heng-Tong Ding and Gergely Endr\"odi for useful comments. This work was supported in part by the National Science Foundation of China (NSFC) under Grant No.11747308, 11975108, 12047569, and the Seeds Funding of Jilin University (S.M.). The work of A.T. was supported by the RIKEN Special Postdoctoral Researcher program and partially by JSPS KAKENHI Grant Number JP20K14479.
\subsubsection*{Acknowledgments and disclosure of funding } This project has received funding from the European Research Council (ERC) under the European Unions Horizon 2020 research and innovation program grant agreement No 815943. \section{Problem Statement} We consider a Markov Decision Process (MDP) with possibly continuous $s \in \mathcal{S}$ and possibly continuous actions $a \in \mathcal{A}$, transition kernel $P(\cdot|s,a)$, reward kernel $R(\cdot|s, a)$ and discount factor $\gamma$. We denote by $\pi$ a stationary policy, i.e., a mapping from states to distribution over actions. We have access to a fixed batch data set collected with an unknown behaviour policy $\pi_\beta$. We call $d^\beta$ the joint \textit{state, action, reward, next-state} distribution induced by the behaviour policy and $\rho^\beta$ the marginal \textit{state} distribution. We access this distribution by sampling from the fixed data set. Similarly, for any policy $\pi$, we call $d^\pi$ the joint \textit{state, action, reward, next-state} distribution induced by $\pi$ on the MDP. \looseness -1 In risk-neutral RL, the goal is to find a policy that maximizes the {\em expected} discounted sum of returns $\mathbb{E}_{d^\pi}\left[\sum_{t=1}^\infty \gamma^{t-1}R(\cdot|S_t, A_t)\right]$, where the expectation is taken with respect to the stochasticity introduced by the reward kernel, the transition kernel, and the policy. We define as $Z^\pi(s,a) =_D \sum_{t=1}^\infty \gamma^{t-1}R(\cdot|S_t, A_t) $ as the return distribution conditioned on $(S_1=s, A_1=a)$ and following $\pi$ thereafter. Here $=_D$ denotes equality in distribution. The risk-neutral RL objective is the expectation of the distribution of $Z^\pi$. In risk-averse settings, we replace the expectation with a distortion operator $\mathcal{D}$ that is a mapping from the distribution over the returns to the reals. Thus, the goal is to find a policy $\pi$ that maximizes \begin{equation} \max_{\pi} \mathcal{D}\left[ \sum_{t=1}^\infty \gamma^{t-1}R(\cdot|S_t, A_t) \right]. \label{eq:risk-averse-objective} \end{equation} With this framework, we address many different risk-averse distortions. For example, this includes probability weighting functions \citep{gonzalez1999shape,tversky1992advances}, the CVaR \citep{rockafellar2002conditional}, the mean-variance criteria \citep{namkoong2017variance} or the Wang criteria \citep{wang1996premium,rabin2013risk}. \section{Introduction} \looseness -1 In high-stakes applications, the deployment of highly-performing Reinforcement Learning (RL) agents is limited by prohibitively large costs at early exploration stages \citep{dulac2019challenges}. To address this issue, the offline (or batch) RL setting considers learning a policy from a limited batch of pre-collected data. However, high-stakes decision-making is typically also {\em risk-averse}: we assign more weight to adverse events than to positive ones \citep{pratt1978risk}. Although several algorithms for risk-sensitive RL exist \citep{Howard1972,mihatsch2002risk}, none of them addresses the offline setting. On the other hand, existing offline RL algorithms consider the {\em average} performance criterion and are risk-neutral \citep{ernst2005tree,lange2012batch}. \paragraph{Main contributions} \looseness -1 We present the first approach towards {\em learning a risk-averse RL policy for high-stakes applications using only offline data}: the \textbf{O}ffline \textbf{R}isk-\textbf{A}verse \textbf{A}ctor-\textbf{C}ritic (O-RAAC\xspace). The algorithm has three components: a distributional critic that learns the full value distribution (\Cref{sseq:Critic}), a risk-averse actor that optimizes a risk averse criteria (\Cref{sseq:Actor}) and an imitation learner implemented with a variational auto-encoder (VAE) that reduces the bootstrapping error due to the offline nature of the algorithm (\Cref{sseq:ImitationLearning}). In \Cref{fig:algorithm_diagram}, we show how these components interact with each other. Finally, in \Cref{sec:Experiments} we demonstrate the empirical performance of O-RAAC\xspace. Our implementation is freely available at Github: \url {https://github.com/nuria95/O-RAAC}. \begin{figure}[ht] \input{sections/diagram.tex} \caption{\looseness -1 Visualization of the algorithm components. Solid lines indicate the forward flow of data whereas dashed lines indicate the backward flow of gradients. Data is stored in the fixed buffer. The VAE, in blue, learns a generative model of the behavior policy. The actor, in green, perturbs the VAE and outputs a policy. The critic, learns the $Z$-value distribution of the policy. The actor optimizes a risk-averse distortion of the $Z$-value distribution, which we denote by $\mathcal{D}Z$. On the right, we show a typical probability density function of $Z$ learned by the critic in red. In dashed black we indicate the expected value of $Z$, which a risk-neutral actor intends to maximize. Instead, a risk-averse actor intends to maximize a distortion $\mathcal{D}Z$, shown in dashed green. In this particular visualization, we show the ubiquitous Conditional Value at Risk (CVaR). } \label{fig:algorithm_diagram} \end{figure} \section{Conclusion} In high-stakes applications, decision-making is usually risk-averse and no interactions with the environment are allowed. For this practical setting, we introduce O-RAAC\xspace, the first fully offline risk-averse algorithm. O-RAAC\xspace is compatible with many common risk-averse criteria such as coherent-risk measures or cumulative prospect theory. Due to the distributional-robust properties of risk-sensitive criteria, it also optimizes risk-neutral criteria under natural distribution shift that occur in the offline setting. Empirically, O-RAAC\xspace outperforms other algorithms in terms of risk-averse performance and is competitive with risk-neutral algorithms in terms of risk-neutral performance. Particularly, in cases where there is not much data diversity, such as in expert data sets, optimizing risk-averse metrics is beneficial due to inherent robustness properties. \section{Offline Risk-Averse Actor-Critic (O-RAAC\xspace)} \looseness -1 We now present our algorithm O-RAAC\xspace for offline-risk averse RL. One of the main technical challenges in going beyond expected rewards is to find an analogue of the Q-function for the particular distortion operator we want to optimize. Unfortunately, the Bellman target of most risk-analogues does not have a closed-form expression. Therefore, we instead learn the full distribution of returns as proposed by \citet{bellemare2017distributional}. In \Cref{sseq:Critic}, we describe the training procedure for the distributional critic. Next, in \Cref{sseq:Actor} we define the actor loss as the risk-distortion operator on the learned return distribution and optimize it using a gradient-based approach. Up to this point, the actor-critic template is enough to optimize a risk-averse criteria. However, as we focus on the offline setting, we need to control the bootstrapping error. To this end, we use a variational auto-encoder VAE to learn a generative model of the behavior policy in \Cref{sseq:ImitationLearning}. Finally, in \Cref{sseq:FinalAlgorithm} we bring all the pieces together and instantiate our algorithm for different risk distortions $\mathcal{D}$. \input{sections/4a-critic} \input{sections/4b-actor} \input{sections/4c-imitation-learning} \subsection{Final Algorithm} \label{sseq:FinalAlgorithm} \begin{algorithm}[ht] \caption{Offline Risk-Averse Actor Critic (O-RAAC\xspace).} \label{alg:algorithm} \begin{algorithmic} \INPUT Data set, Critic $Z_w$ and critic-target $Z_{w'}$, $\mathrm{VAE}_\phi = \{E_{\phi_1}, D_{\phi_2}\}$, Perturbation model $\xi_\theta$ and target $\xi_{\theta'}$, modulation parameter $\lambda$, Distortion operator $\mathcal{D}$ or distortion sampling distribution $\mathbb{P}_\mathcal{D}$, critic-loss parameters $N, N', \kappa$, mini-batch size $B$, learning rate $\eta$, soft update parameter $\mu$. \FOR{$t=1,\ldots$} \STATE Sample $B$ transitions $(s, a, r, s')$ from data set. \STATE Sample $N$ quantiles $\tau$ and $N'$ target quantiles $\tau'$ from $\mathcal{U}(0,1)$ and compute $\delta_{\tau, \tau'}$ in \eqref{eq:td_error}. \STATE Compute policy $\pi_{\theta} = b + \lambda \xi_\theta(s, b)$, s.t. $b \sim \mathrm{VAE}_\phi(s, a)$ as in \eqref{eq:VAE}. \STATE Compute critic loss $\mathcal L_{\mathrm{critic}} (w)$ in \eqref{eq:critic_loss}; actor loss $\mathcal L_{\mathrm{actor}} (\theta)$ in \eqref{eq:actor_loss}; VAE loss $\mathcal{L}_\mathrm{VAE} (\phi)$ in \eqref{eq:VAEloss}. \STATE Gradient step $w \gets w - \eta \nabla \mathcal L_{\mathrm{critic}}(w)$; $\theta \gets \theta - \eta \nabla \mathcal L_{\mathrm{actor}}(\theta)$; $\phi \gets \phi - \eta \nabla \mathcal L_{\mathrm{VAE}}(\phi)$. \STATE Perform soft-update on $w' \gets \mu w + (1-\mu) w' $; $\theta' \gets \mu \theta + (1-\mu) \theta' $. \ENDFOR \end{algorithmic} \end{algorithm} We now combine the critic in \Cref{sseq:Critic}, the actor in \Cref{sseq:Actor} and the VAE in \Cref{sseq:ImitationLearning} and show the pseudo-code of O-RAAC\xspace in Algorithm \ref{alg:algorithm}. We replace the expectations in the critic loss \eqref{eq:critic_loss}, actor loss \eqref{eq:actor_loss} and VAE loss \eqref{eq:VAEloss} with empirical averages of samples from the data set. As an ablation, we also propose the RAAC algorithm, in which the actor is parameterized with a neural network and there is no imitation learning component. \looseness -1 The critic's goal is to learn the reward distribution, the VAE goal is to learn a baseline action for the actor and the goal of the perturbation model is to be risk-averse. Although \citet{santara2018rail} and \citet{Lacotte2019} propose risk-averse imitation learning algorithms, these interact with the environment in an on-policy way. Furthermore, the goal of the imitation learning component in O-RAAC\xspace is not to be risk-averse, but to provide a baseline to the risk-averse perturbation. O-RAAC\xspace requires a distortion metric $\mathcal{D}$ as an input. For different $\mathcal{D}$, it generalizes existing distributional RL algorithms and extends them to the offline setting. For example, when $\mathcal{D}$ is the expectation operator, then the agent is risk neutral and O-RAAC\xspace is an offline version of D4PG \citep{BarthMaron2018}. Likewise, when $\mathcal{D}$ is the Rockafellar-truncation operator \citep{rockafellar2002conditional} we recover the algorithm by \citet{singh2020improving} for optimizing the CVaR. \subsection{Learning a Risk-Averse Actor} \label{sseq:Actor} \looseness -1 In risk-averse applications, we generally prefer deterministic policies over stochastic ones because introducing extra randomness is against a risk-averse behavior \citep{pratt1978risk} and there is no benefit of exploration often associated with stochastic policies in the offline setting. Hence, we consider parameterized deterministic policies $\pi_\theta(s): \mathcal{S} \to \mathcal{A}$. Given a learned distributional critic, we define the actor loss as \begin{equation} \mathcal{L}_{\text{actor}}(\theta) = -\mathbb E_{s \sim \rho^\beta(\cdot) } \left[ \mathcal{D}\left(Z_w^{\pi_\theta}(s, \pi_\theta(s); \tau) \right) \right], \label{eq:actor_loss} \end{equation} where $\mathcal{D}$ is the operator that models risk aversion. We consider Markovian policies because these contain the optimal policy for many common risk distortions in the discounted infinite horizon setting \citep[Theorem 4]{ruszczynski2010risk}. To minimize the actor loss \eqref{eq:actor_loss}, we use pathwise derivatives of the objective \citep{mohamed2020monte}, computed by backpropagating the actor through the learned critic at states sampled from the offline data set. Minimizing the actor loss is equivalent to maximizing the risk-averse performance. We leverage the quantile representation of the critic (c.f. \Cref{sseq:Critic}) to compute the risk distortion operator inside the actor loss \eqref{eq:actor_loss}, Given a quantile representation of a distribution, common risk distortions $\mathcal{D}$ can be efficiently approximated using a sampling-based scheme. In particular, there exists a quantile sampling distribution $\mathbb{P}_\mathcal{D}$ associated to $\mathcal{D}$ such that \begin{equation} \mathcal{D}\left(Z_w^{\pi_\theta}(s, \pi_\theta(s); \tau) \right) = \int Z_w^{\pi_\theta}(s, \pi_\theta(s); \tau) \mathbb{P}_\mathcal{D}(\tau) \operatorname{d}\!\tau \approx \frac{1}{K} \sum_{k=1}^K Z_w^{\pi_\theta}(s, \pi_\theta(s); \tau_k), \, \tau_k \sim \mathbb{P}_\mathcal{D} \label{eq:approxRisk}. \end{equation} For cumulative prospect theory \citep{tversky1992advances} and coherent risk measures \citep{artzner1999coherent}, the associated quantile sampling distributions are well-known. In the particular case of the CVaR, this is known as the Acerbi's formula \citep{Acerbi2002} \begin{equation} \text{CVaR}_\alpha( Z_w^{\pi_\theta} (s,a;\tau) ) = \frac{1}{\alpha}\int_0^\alpha Z_w^{\pi_\theta}(s,a;\tau) \operatorname{d}\!\tau. \label{eq:acerbi} \end{equation} \looseness -1 When other representations are used for the critic, computing the risk-distortion $\mathcal{D}$ becomes computationally expensive. In some particular cases, there are variational formulas to compute the risk-distortion $\mathcal{D}$ that require to solve an inner optimization problem. For example, \citet{singh2020improving} use the common Rockafellar truncated optimization procedure \citep{rockafellar2002conditional} to compute the CVaR, which is sample inefficient and has high variance \citep{curi2020adaptive}. \section{Experimental Evaluation} \label{sec:Experiments} In this section, we test the performance of O-RAAC\xspace using $\mathcal{D} = \text{CVaR}_{\alpha=0.1}$ as risk distortion. We use Acerbi's formula \eqref{eq:acerbi} to compute the risk distortion. In particular, we ask: \begin{enumerate} \item How does RAAC perform as a \textit{risk-averse} agent in the \textbf{off-policy} setting? (\Cref{exp:off-policy}) \item How does O-RAAC\xspace perform as a \textit{risk-averse} agent in the \textbf{offline} setting? (\Cref{exp:offline-medium}) \item How does O-RAAC\xspace perform as a \textit{risk-neutral} agent in the \textbf{offline} setting? (\Cref{exp:offline-expert}) \end{enumerate} For further details such as hyperparameter selection and extended results please refer to \Cref{appendix:experiments}. \subsection{Off-policy Setting: Risk-Averse performance} \label{exp:off-policy} In this experiment, we intend to demonstrate the effectiveness of our algorithm as a risk-averse learner without introducing the extra layer of complexity of the offline setting. \subsubsection{Experimental Setup} As a toy example, we chose a 1-D car with state $s = (x, v)$, for position and velocity. The agent controls the car with an acceleration $a \in [-1, 1]$. The car dynamics with a time step $\Delta t=0.1$ is \begin{align*} x_{t+1} = x_{t} + v_{t} \Delta{t} + 0.5a_{t} (\Delta t)^2, \qquad v_{t+1} &= v_t + a_t \Delta{t}. \end{align*} The control objective is to move the car to $x_\mathrm{g}=2.5$ as fast as possible, starting from rest. To model the risk of crashing or of getting a speed fine, we introduce a penalization when the car exceeds a speed limit ($v > 1$). Hence, we use a random reward function given by \begin{align*} R_t(s, a) = -10 + 370 \mathbb{I}_{x_t=x_\mathrm{g}} - 25 \mathbb{I}_{v_t > 1} \cdot \mathcal{B}_{0.2}, \end{align*} \looseness -1 where $\mathbb{I}$ is an indicator function and $\mathcal{B}_{0.2}$ is a Bernoulli Random Variable with probability $p=0.2$. The episode terminates after 400 steps or when the agent reaches the goal. \paragraph{Benchmarks} We compare RAAC with a risk-neutral algorithm (D4PG algorithm by \citet{BarthMaron2018} with IQN and 1-step returns) and WCPG by \citet{Tang2020}, a competing risk-averse algorithm. Both RAAC and WCPG optimize the 0.1-CVaR of the returns. \subsubsection{Result Discussion} \input{sections/results-car} In \Cref{table:offpolicy-car}, we show the results of the experiment. As expected, D4PG ignores the low probability penalties and learns to accelerate the car with maximum power. Thus it has the largest expected return but the lowest CVaR. WCPG also fails to maximize the CVaR as it assumes that the return distribution is Gaussian. In turn, it under-estimates the variance of the return distribution of the maximum acceleration policy. Consequently, it over-estimates the CVaR of the returns and prefers the latter policy over the maximum-CVaR policy. In contrast, RAAC learns the full value distribution $Z$ and computes the CVaR reliably. Thus, it learns to saturate the velocity below the $v=1$ threshold and finds the highest CVaR policy. See \Cref{appendix:CarResults} for more experiments in this setting. \paragraph{Qualitative Evaluation} In \Cref{fig:car_trajs} in \Cref{appendix:CarResults} we show the different trajectories as an illustration of the resulting risk-averse behavior. \subsection{Offline Setting: Risk-Averse performance} \label{exp:offline-medium} In this experiment, we intend to demonstrate the effectiveness of our algorithm as a risk-averse learner in the offline setting and in high-dimensional environments. \subsubsection{Experimental Setup} We test the algorithm on a variety of continuous control benchmark tasks on the data provided in the D4RL dataset \citep{Fu2020}. We use three MuJoCo tasks: HalfCheetah, Walker and Hopper \citep{Todorov2012}. In particular, we chose the medium (M) and expert (E) variants of these datasets. Since the tasks are deterministic, we incorporate stochasticity into the original rewards to have a meaningful assessment of risk and to showcase a practical example of when the risk-averse optimization makes sense. As a risk-averse performance metric, we chose the 0.1-CVaR of the episode returns. We use the following reward functions: \textbf{Half-Cheetah:} $R_t(s, a) = \bar{r}_t(s, a) - 70\mathbb{I}_{v > \bar{v}} \cdot \mathcal{B}_{0.1}$, where $\bar{r}_t(s, a)$ is the original environment reward, $v$ the forward velocity, and $\bar{v}$ is a threshold velocity ($\bar{v}=4$ for the (M) variant and $\bar{v}=10$ for the (E) variant). As with the car example, this high-velocity penalization models a penalty to the rare but catastrophic event of the robot breaking -- we want to be risk-averse to it. We evaluate the Half-Cheetah for 200 time steps. \looseness -1 \textbf{Walker2D/Hopper:} $R_t(s, a) = \bar{r}_t(s, a) - p\mathbb{I}_{|\theta| > \bar{\theta}} \cdot \mathcal{B}_{0.1}$, where $\bar{r}_t(s, a)$ is the original environment reward, $\theta$ is the pitch angle, $\bar{\theta}$ is a threshold angle ($\bar{\theta}=0.5$ for the Walker2d-M/E and $\bar{\theta}=0.1$ for the Hopper-M/E) and $p=30$ for the Walker2d-M/E and $p=50$ for the Hopper-M/E. When $|\theta| > 2\bar{\theta}$ the robot falls, the episode terminates, and we stop collecting such rewards. To avoid such situation, we shape the rewards with the stochastic event at $\theta > \bar{\theta}$. The maximum duration of the Walker2D and the Hopper is 500 time steps. \paragraph{Benchmarks} We optimize O-RAAC\xspace for the 0.1-CVaR. To demonstrate its effectiveness optimizing other risk distortions, we optimize O-RAAC\xspace using the 0.25-CVaR and the CPW distortion proposed by \citet{tversky1992advances,gonzalez1999shape}. As a competing risk-averse algorithm, we augment WCPG with a VAE to yield the O-WCPG algorithm. As state-of-the-art risk-neutral agents, we use BEAR \citep{Kumar2019} and O-D4PG, which is equivalent to BCQ \citep{Fujimoto2019} with a distributional critic. As ablations, we compare RAAC (i.e. O-RAAC\xspace without the VAE) and the performance of the VAE as a pure imitation learning algorithm. Finally, we estimate the returns of the behavior policy by evaluating the stochastic reward functions on the data set and estimate its variance by bootstrapping batches of transitions. \subsubsection{Result Discussion} In \Cref{table:offline}, we show the results of the experiments. In all environments, O-RAAC\xspace has a higher 0.1-CVaR than the benchmarks. In environments that terminate, it also has longer duration than competitors. When optimizing for other risk-averse criteria, O-RAAC\xspace still has good 0.1-CVaR performance. The behavior policy has poor risk-averse performance and the VAE ablation imitates such policy, hence performs poorly too. On the other side of the spectrum, RAAC performs poorly in all categories. This indicates that the offline version enhancement of RAAC is crucial for offline problems. O-WCPG performs poorly in terms of the CVaR. This might be due to the return distribution not being Gaussian. Finally, BEAR and O-D4PG usually have good risk-neutral performance, particularly in the medium version of these datasets, but poor risk-averse performance. This is expected as these algorithms are designed to optimize the risk-neutral performance. \paragraph{Qualitative Evaluation} We visualize the risk-averse performance by looking at the support of the risk-event in \Cref{fig:medium_hist}. Most of the support of the data set induced by the behavior policy lies in the risky region. O-RAAC\xspace learns to shift the distribution towards the risk-free region (green shaded area). On the other hand, O-D4PG (risk-neutral) struggles to shift the distribution as it ignores the rare penalties in the risky region. Only in the Half Cheetah-E experiment O-D4PG manages to shift the distribution towards the safe region. This is because most of the behavior policy is on the risky region and the {\em average} performance of the behavior policy under the new stochastic rewards is low. \begin{figure}[htpb] \begin{center} \includegraphics[width=\textwidth]{figures/Mujoco/joint_histogram.pdf} \end{center} \caption{Empirical distribution of the risk-event of O-RAAC\xspace, O-D4PG, and the behavior policies. O-RAAC shifts the support towards the risk-free region (green area). On the other hand, O-D4PG ignores the risk-related rewards and imitates the behavior distribution. } \label{fig:medium_hist} \end{figure} \subsection{Offline setting: Risk-Neutral performance} \label{exp:offline-expert} It is well-known that coherent risk-related criteria have a dual distributional robust criterion formulation \citep{shapiro2014lectures,iyengar2005robust,osogami2012robustness}. In particular, the following holds: \begin{equation} \max_{\pi} \mathcal{D} \left[Z^\pi(x,a) \right] = \max_{\pi} \min_{d \in \overline{\mathcal{D}}_\pi} \mathbb{E}_{d} \left[ Z^\pi(x,a) \right], \label{eq:dro} \end{equation} where $\overline{\mathcal{D}}_\pi$ is a dual set of distribution that is induced by the distortion measure $\mathcal{D}$ and the distribution $d_\pi$. When the distortion set is the expectation, the dual set collapses to a singleton $\overline{\mathcal{D}}_\pi = \left\{d^\pi \right\}$. For the CVaR, \citet{Chow2014} expresses the dual set for MDPs in Proposition 1. Given this dual result, it is straightforward to show that $\mathbb{E}_{d^\pi}[Z^\pi(x,a)] \geq \mathcal{D} [Z^\pi(x,a)] $ by definition of the minimum. In this sense, optimizing $\mathcal{D} [Z^\pi(x,a)]$ is equivalent to optimizing a {\em pessimistic} estimate of the risk-neutral performance, in a similarly way to \citet{Buckman2020} and \citet{Kumar2020}. \subsubsection{Experimental Setup} Despite the goal being to {\em{maximize a risk-neutral objective}}, we evaluate whether it is beneficial to {\em{optimize a risk-averse} criterion} in the offline setting. We test this hypothesis using the same setup as in \Cref{exp:offline-medium}. Namely, we train O-RAAC\xspace using a risk-averse metric, but we evaluate on the average value, a risk-neutral metric. \paragraph{Benchmarks} We use the same benchmarks as in \Cref{exp:offline-medium}. \subsubsection{Result Discussion} \looseness -1 We show the risk-neutral performance in the ``Mean'' columns in \Cref{table:offline}. In all data sets, O-RAAC\xspace performs better or similar to the benchmarks. A reason for this is that the episodes of risk-averse agents last longer and thus collect rewards for more time steps. However, this is not the {\em only} reason. For example, BEAR in the Walker-expert environment has longer episodes and still lower mean returns than O-RAAC\xspace. In the Hopper-expert, RAAC and VAE have similar duration to O-RAAC\xspace. Yet, O-RAAC\xspace has a higher average return than each of the ablations. This indicates that optimizing a risk-averse performance is beneficial when comparing the risk-neutral performance, specially in data sets where the data is not very diverse (e.g., in the ``expert'' data sets). \paragraph{Qualitative Evaluation} In \Cref{fig:medium_hist}, we see that in most cases there {\em is} a distribution shift between the behaviour distribution and both O-RAAC\xspace and O-D4PG. As the shift increases, we see the benefits of learning using distributionally robust objectives. As a particular example we take the Hopper-E distribution. The behavior policy is safe as it does not terminate before the 500 time steps but much of the data is on the risky region. O-RAAC\xspace learns to center the distribution in the safe region and yet hops forward efficiently. On the other hand, O-D4PG also learns to shift away of the risky region. However, it is not risk averse and it overshoots towards the other end of the risky region, where there is not sufficient data to have good critic estimates. \input{sections/results-mujoco-v2} \subsection{Related Work} \paragraph{Risk-Averse RL} The most common risk-averse measure in the literature is the Conditional Value-at-Risk (CVaR) \citep{rockafellar2002conditional}, which corresponds to the family of Coherent Risk-Measures \citep{artzner1999coherent}, and we focus mainly on these risk-measures. Nevertheless, other risk criteria such as Cumulative Prospect Theory \citep{tversky1992advances} or Exponential Utility \citep{rabin2013risk} can also be used with the algorithm we propose. In the context of RL, \citet{Petrik2012,Chow2014,Chow2015} propose dynamic programming algorithms for solving the CVaR of the return distribution with {\em known} tabular Markov Decision Processes (MDPs). For unknown models, \citet{Morimura2010b} propose a SARSA algorithm for (CVaR) optimization but it is limited to the on-policy setting and small action spaces. To scale to larger systems, \citet{Tamar2012,Tamar2015} propose on-policy Actor-Critic algorithms for Coherent Risk-Measures. However, they are extremely sample inefficient due to sample discarding to compute the risk-criteria and the high-variance of the gradient estimate. While \citet{prashanth2016cumulative} address sample efficiency by considering Cumulative Prospect Theory instead of Coherent Risk-Measures, their algorithm is limited to tabular MDPs and is also on-policy. Instead, \citet{Tang2020} propose an off-policy algorithm that approximates the return distribution with a Gaussian distribution and learns its moments using the Bellman equation for the mean and the variance of the distribution. Instead, we learn the full return distribution without making the Gaussianity assumption \citep{bellemare2017distributional}. Perhaps most closely related is the work of \citet{singh2020improving}, who consider also a distributional critic but their algorithm is limited to the CVaR and they do not address the offline RL setting. Furthermore, they use a sample-based distributional critic, which makes the computation of the CVaR inefficient. Instead, we modify Implicit Quantile Networks \citep{Dabney2018b} in order to compute different risk criteria efficiently. Although \citep{Dabney2018b} already investigated risk-related criteria, their scope is limited to discrete action spaces (e.g., the Atari domain) in an off-policy setting whereas we consider continuous actions in an offline setting. \paragraph{Offline RL} The biggest challenge in offline RL is the Bootstrapping Error: a Q-function is evaluated at state-action pairs where there is little or no data and these get propagated through the Bellman equation \citep{Kumar2019}. In turn, a policy optimized with offline data induces a state-action distribution that is shifted from the original data \citep{ross2011reduction}. To address this, \citet{Fujimoto2019} propose to express the actor as the sum between an imitation learning component and a perturbation model to control the deviation of the behavior policy. Other approaches to control the difference between the data-collection policy and the optimized policy include regularizing the policies with the behavior policy using the MMD distance \citep{Kumar2019} or f-divergences \citep{wu2020behavior,jaques2019way}, or using the behavior policy as a prior \citep{Siegel2020}. An alternative strategy in offline RL is to be {\em pessimistic} with respect to the epistemic uncertainty that arises due to data scarcity. \citet{yu2020mopo} take a model-based approach and penalize the per-step rewards with the epistemic uncertainty of their dynamical model. Using a model-free approach \citet{Kumar2020,Buckman2020} propose to learn a lower bound of the Q-function using an estimate of the uncertainty as penalty in the target of the equation. Our work uses ideas from both strategies to address the offline risk-averse problem. First, we use an imitiation learner to control the bootstrapping error. However, by considering a risk-averse criterion, we are also optimizing over a {\em pessimistic} distribution compatible with the empirical distribution in the data set. The connections between risk-aversion and distributional robustness are well studied in supervised learning \citep{shapiro2014lectures,namkoong2017variance,curi2020adaptive,levy2020large} and in reinforcement learning \citep{Chow2015,pan2019risk}. \subsection{Additional Experimental Details} \label{appendix:experimental-details} \subsubsection{Architectures} We use neural networks as function approximators for all the elements in the architecture. \paragraph{Critic architecture:} For the critic architecture, we build on the IQN network \citet{Dabney2018b} but we extend it to the continuous action setting by adding an additional action input to the critic network, resulting in the function: \begin{equation} Z(s,a;\tau) = f(m_{sa\tau}(\big[m_{sa}([\psi_s(s),\psi_a(a)]),\psi_\tau(\tau)\big]), \end{equation} where $\psi_s : \mathcal{X} \rightarrow \mathbb{R}^d$, $\psi_a : \mathcal{A} \rightarrow \mathbb{R}^d$, $m_{sa}: \mathbb{R}^{d\times d}\rightarrow \mathbb{R}^n$, $m_{sa\tau}: \mathbb{R}^{n}\rightarrow \mathbb{R}^n$, $\psi_\tau : \mathbb{R} \rightarrow \mathbb{R}^n$ and $f : \mathbb{R}^n \rightarrow \mathbb{R}$ For the embedding $\psi_\tau$ we use a linear function of $n$ cosine basis functions of the form $\cos(\pi i \tau)$ $i=1..,n$, with $n=16$ as proposed in \citet{Dabney2018b}. For $\psi_s, \psi_a$ we use a multi-layer perceptron (MLP) with a single hidden layer with $d=64$ units for the Car experiment and with $d=256$ units for all MuJoCo experiments. For the merging function $m_{sa}$, which takes as an input the concatenation of $\psi_s(s)$ and $\psi_a(a)$, we use a single hidden layer with $n=16$ units. For the merging function $m_{sa\tau}$, we force interaction between its two inputs via a multiplicative function $m_{sa\tau}(u_1,u_2) =u_1 \odot u_2 $, where $u_1=m_{sa}(\psi_s(s),\psi_a(a))$ and $u_2=\psi_\tau(\tau)$ and $\odot$ denotes the element-wise product of two vectors. For $f$ we use a MLP with a single hidden layer with 32 units We used ReLU non-linearities for all the layers. \paragraph{Actor architecture:} The architecture of the actor model is \begin{equation} \pi(a|s) = b + \lambda \xi_\theta (s,b) \end{equation} where $\xi : \mathcal{A} \rightarrow \mathbb{R}^{\|\mathcal{A}\|}$ and $b$ is the output of the imitation learning component. For the RAAC algorithm we remove $b$ and set $\lambda = 1$. For the Car experiments, we used a MLP with 2 hidden layers of size 64. For the MuJoCo experiments, based on \citet{Fujimoto2019}, we used a MLP embedding with 3 hidden layers of sizes 400, 300 and 300. We used ReLU non-linearities for all the hidden layers and we saturate the output with a Tanh non-linearity. \paragraph{VAE architecture:} The architecture of the conditional $\text{VAE}_\phi$ is also based on \citet{Fujimoto2019}. It is defined by two networks, an encoder $E_{\phi_1}(s,a)$ and decoder $D_{\phi_2}(s,z)$. Each network has two hidden layers of size 750 and it uses ReLU non-linearities. \subsubsection{Hyperparameters} All the network parameters are updated using Adam \citep{Kingma2015} with learning rates $\eta=0.001$ for the critic and the VAE, and $\eta=0.0001$ for the actor model, as in \citet{Fujimoto2019}. The target networks for the critic and the perturbation models are updated softly with $\mu=0.005$. For the critic loss \eqref{eq:critic_loss} we use $N=N'=32$ quantile samples, whereas to approximate the CVaR to compute the actor loss \eqref{eq:actor_loss} \eqref{eq:acerbi} we use $8$ samples from the uniform distribution between $[0, 0.1]$. In \Cref{fig:lambda_analysis}, we show an ablation on the effect of the hyper-parameter lambda. As we can see, a correct selection of lambda is of crucial performance as it trades-off pure imitation learning with pure reinforcement learning. As $\lambda \rightarrow 0$, the policy imitates the behavior policy has poor risk-averse performance. As $\lambda \rightarrow 1$, the policy suffers from the bootstrapping error and the performance is also low. We find values of $\lambda \in [0.05, 0.5]$ to be the best, although the specific $\lambda$ is environment dependent. This observation coincides with those in \citet[Appendix D.1]{Fujimoto2019}. For all MuJoCo experiments, the $\lambda$ parameter which modulates the action perturbation level was experimentally set to 0.25, except for the HalfCheetah-medium experiment for which it was set to 0.5. As we can see from \Cref{fig:lambda_analysis}, this is not the best value of $\lambda$, but rather a value that performs well across most environments. \begin{figure}[htpb] \begin{center} \includegraphics[width=\textwidth]{figures/Mujoco/lambda_analysis2.pdf} \end{center} \caption{Effect of the hyperparameter $\lambda$ on the CVaR of the returns for each of the MuJoCo environments. As $\lambda \rightarrow 0$, the policy imitates the behavior policy has poor risk-averse performance. As $\lambda \rightarrow 1$, the policy suffers from the bootstrapping error and the performance is also low. The best $\lambda$ is environment dependent. } \label{fig:lambda_analysis} \end{figure} \subsection{MuJoCo Environments} \label{appendix:MujocoResults} We ran 5 independent random seeds and evaluate for 20 episodes the policy every 100 gradient steps for \textit{HalfCheetah} and 500 gradient steps for \textit{Hopper} and \textit{Walker2d}. We plot the learning curves of the medium variants in \Cref{fig:learning-medium} and expert variant in \Cref{fig:learning-expert}. To report the tests in \Cref{table:offline}, we early-stop the policy that outputs the best CVaR and evaluate on 100 episodes with 5 different random seeds. \paragraph{Behavior policies} For sake of reference, we evaluate the stochastic reward function on the state-action pairs in the behavior data set. Unfortunately, the data sets do not distinguish between episodes. Hence, to estimate the returns, we use the state-action distribution in the data set and split it into chunks of 200 time steps for the Half-Cheetah and 500 time steps for the Walker2D and the Hopper. We then compute the return of every chunk by sampling a realization from its stochastic reward function. Finally, we bootstrap the resulting chunks into 10 datasets by sampling uniformly at random with replacement and estimate the mean and $\text{CVaR}_{0.1}$ of the returns in each batch. We report the average of the bootstrap splits together with the standard deviation in \Cref{table:offline}. \begin{figure}[ht] \begin{center} \includegraphics[width=\textwidth]{figures/Mujoco/medium-learning.pdf} \end{center} \caption{Experimental results across several Mujoco tasks for the Medium variant of each dataset.} \label{fig:learning-medium} \end{figure} \begin{figure}[ht] \begin{center} \includegraphics[width=\textwidth]{figures/Mujoco/expert-learning.pdf} \end{center} \caption{Experimental results across several Mujoco tasks for the Expert variant of each dataset.} \label{fig:learning-expert} \end{figure} \subsection{Distributional Critic Learning} \label{sseq:Critic} \looseness -1 To learn the distributional critic, we exploit the distributional Bellman equation of returns $Z^\pi(s,a) =_D R(s,a) + \gamma Z^\pi(S',A')$ for policy evaluation. The random variables $S', A'$ are distributed according to $s' \sim P(\cdot | s,a)$ and $A' \sim \pi(\cdot |s')$. In particular, we represent the return distribution implicitly through its quantile function as proposed by \citet{Dabney2018b}. We use this representation because many risk distortion operators can be efficiently computed using the quantile function of the underlying random variable. We parameterize the quantile function through a neural network with learnable parameters $w$. We express such implicit quantile function as $Z_w^{\pi}(s, a;\tau)$, where $\tau \in [0, 1]$ is the quantile level. Whereas the neural network architecture proposed by \citet{Dabney2018b} is for discrete actions only, we extend it to continuous actions by considering all $s$, $a$, and $\tau$ as the inputs and only the quantile value as the output. To learn the parameters $w$, we use the distributional variant of fitted value-iteration \citep{bellemare2017distributional,munos2008finite} using a quantile Huber-loss \citep{Huber1964} as a surrogate of the Wasserstein-distance as proposed by \citet{Dabney2018b}. To this end, we use a target network with parameters $w'$ and compute the temporal difference (TD) error at a sample $(s,a,r,s')$ as \begin{align} \delta_{\tau, \tau'} = r + \gamma Z^\pi_{w'}(s',a';\tau')-Z^\pi_w(s,a;\tau), \label{eq:td_error} \end{align} for $\tau, \tau'$ independently sampled from the uniform distribution, i.e., $\tau, \tau' \sim \mathcal{U}(0,1)$ and $a' \sim \pi(\cdot|s')$. The $\tau$-quantile Huber-loss is \begin{equation} \mathcal{L}_{\kappa}(\delta;\tau) = \underbrace{\Big|\tau - \mathds{1}_{\{\delta<0\}}\Big|}_{\text{Quantile loss}} \cdot \underbrace{\left\{ \begin{array}{ll} \frac{1}{2\kappa} \delta^2 & \mathrm{if\ } |\delta| \le \kappa, \\ |\delta|-\frac{1}{2}\kappa & \mathrm{otherwise.} \end{array} \right.}_{\text{Huber loss}} \end{equation} We prefer the Huber loss over the $\mathcal{L}_2$ or $\mathcal{L}_1$ loss as it is better behaved due to smooth gradient-clipping \citep{mnih2015human}. Finally, we approximate the quantile loss for all levels $\tau$ by sampling $N$ independent quantiles $\tau$ and $N'$ independent target quantiles $\tau'$. The critic loss is \begin{equation} \mathcal L_{\mathrm{critic}} (w) = \mathbb E_{\substack{(s,a,r,s') \sim d^\beta(\cdot) \\ a' \sim \pi(\cdot|s') }} \big [\frac{1}{N\cdot N'} \sum_{i=1}^{N}\sum_{j=1}^{N'}\mathcal{L}_\kappa(\delta_{\tau_i, \tau_j'}; \tau_i) \big ]. \label{eq:critic_loss} \end{equation} \begin{comment} Analogously to the scalar value function $Q^\pi$, that is its expectation, a distributional Bellman equation can be defined by: \begin{equation} Z^\pi(s,a) \stackrel{D}{=} R(s,a) + \gamma Z^\pi(s',A') \end{equation} where $\stackrel{D}{=}$ denotes equality in distribution and the random variables s' and A' are distributed according to $P(\cdot | s,a)$ and $\pi(\cdot |s')$ respectively. As proposed in \citet{Dabney2018b}, we learn an implicit representation of the return distribution $Z^\pi(s,a)$ via its quantile function, which we will write as $Z(s,a;\tau$) where $\tau,\tau' \in [0,1]$, is the quantile level of interest. Hence, for $\tau \sim U([0,1])$, the resulting state-action distribution sample is $Z(s,a,\tau) \sim Z(s,a)$.\\ We use a neural network parameterized by w to learn the mapping from the triplet $(\tau, s,a)$ to the quantile distribution $Z_w(s,a;\tau)$ and we train it via the distributional Bellman equation based on samples. Specifically, we define the loss as: \begin{equation} \mathcal L_{\text{critic}} (w) = \mathbb E_{\rho} \big [ \textrm{dist}(\mathcal{T}^\pi Z_{w'}(s,a;\tau), Z_w(s,a; \tau')) \big ] \end{equation} where $\rho$ is the state-visitation distribution associated with some behavior policy and \textit{dist} is some metric measuring distance between two distributions. The critic will try to minimize the distance by backpropagating the gradient $\frac {\delta \textit{dist}}{\delta w}$. As proposed in \citet{Dabney2018a}, we use the quantile Huber loss \citep{Huber1964} as a surrogate of Wasserstein distance. For two samples $\tau, \tau' \sim U([0,1])$, we define: \begin{align} \delta^{\tau, \tau'} = r_t + \gamma Z_{w'}(s',a';\tau')-Z_w(s,a;\tau) \end{align} and hence the quantile Huber loss: \begin{equation} \mathcal L_{\text{critic}} (w) = \mathbb E \big [\frac{1}{N}\sum_{i=1}^{N}\sum_{j=1}^{N'}\rho_{\tau_i}^\kappa(\delta^{\tau_i, \tau_j'}) \big ] \end{equation} where $\rho_\tau^\kappa(u)=\Big|\tau - \mathds{1}_{\{u<0\}}\Big|\mathcal{L}_\kappa(u) \quad \forall u \in \mathbb{R}$, and \begin{equation} \mathcal{L}_\kappa(u) = \left\{ \begin{array}{ll} \frac{1}{2}u^2 & \mathrm{if\ } |u| \le \kappa \\ \kappa(|u|-\frac{1}{2}\kappa) & \mathrm{otherwise } \end{array} \right. \end{equation} \end{comment} \subsection{Car} \label{appendix:CarResults} We ran the Car environment for RAAC, D4PG and WCPG using 5 independent random seeds. We evaluate final policies for 1000 interactions and report the averaged results with corresponding standard deviation in Table \ref{table:offpolicy-car}. In Figure \ref{fig:car_trajs}, we show the trajectories when following aforementioned policies. \paragraph{Reward function design} We use the reward function given by \begin{align*} R_t(s, a) = -10 + 370 \mathbb{I}_{x_t=x_\mathrm{g}} - 25 \mathbb{I}_{v_t > 1} \cdot \mathcal{B}_{0.2}, \end{align*} \looseness -1 where $\mathbb{I}$ is an indicator function and $\mathcal{B}_{0.2}$ is a Bernoulli Random Variable with probability $p=0.2$. That is, $r_f=370$ is a sparse reward that the agent gets at the goal and $r_{d} = -10$ is a negative reward that penalizes delays on reaching the goal. Finally, the agent receives a negative reward of $r_v=-25$ with probability 0.2 when it exceeds the $v>1$ threshold. As the returns is a sum of bernoulli R.V. we know that it will be a Binomial distribution. For this particular case, we expect that if the number of steps is large enough, the Gaussianity assumption that WCPG does is good as Binomial distributions are asymptotically Gaussian \citep{vershynin2018high}. However, the episode terminates after at most thirteen risky steps and the approximation is not good. We show in \Cref{fig:car_trajs} the trajectories for RAAC, D4PG and WCPG. \begin{figure}[ht] \begin{center} \includegraphics[width=\textwidth]{figures/car_trajectory.pdf} \end{center} \caption{Evolution of car states and input control when following learned policies for RAAC, WCPG and D4PG. We use policies from 5 independent seeds for each algorithm. RAAC learns to saturate the velocity below the speed limit.} \label{fig:car_trajs} \end{figure} \newpage \subsection{Off-policy to Offline: Controlling the Bootstraping Error.} \label{sseq:ImitationLearning} Up to this point, the actor-critic procedure we describe in \Cref{sseq:Critic,sseq:Actor} is theoretically sufficient to learn a risk-averse RL agent. However, in the offline setting the bootstrapping error appears: when evaluating the TD-error \eqref{eq:td_error}, the $Z$-value target will be evaluated at actions where there is no data \citep{Kumar2019} and propagated through the Bellman equation. To address this issue, \citep{Kumar2019,wu2020behavior,Siegel2020} propose stochastic policies and penalize deviations from the behaviour policy while optimizing the actor. As discussed in \Cref{sseq:Actor}, on one hand we prefer deterministic policies over stochastic ones for risk-averse optimization and on the other hand, we prefer stochastic policies to avoid overfitting to the fixed batch of data. To this end, we use a similar parameterization to \citet{Fujimoto2019} and decompose the actor in two components: an imitation learning component $\pi^\mathrm{IL}$ and a perturbation model $\xi_\theta$ such that the policy is expressed as: \begin{align} \pi_\theta(s) = b + \lambda \xi_\theta(\cdot | s, b), \qquad \text{s.t., } b \sim \pi^{\mathrm{IL}}(\cdot | s). \label{eq:actor} \end{align} \looseness -1 That is, $b$ is an action sampled from the imitation learning component, $\xi_\theta$ is a conditionally deterministic perturbation model that is optimized maximizing the actor loss \eqref{eq:actor_loss} and $\lambda$ is a hyper-parameter that scales the perturbation magnitude. Thus, all the randomness in our policy arises from the behaviour policy and not from the subsequent optimization. Furthermore, if we would have access to the behaviour policy $\pi_\beta$ we could directly replace the imitation learning module by $\pi_\beta$. To learn a generative model of the $\pi^\mathrm{IL}$ from state-action pairs from the behaviour distribution $d^{\beta}$ we use a conditional variational autoencoder (VAE) \citep{Kingma2014}, which is also done in \citet{Fujimoto2019}. The main advantage of the VAE compared to behavioral cloning \citep{bain1995framework} is that it does not suffer from mode-collapse which hinders the actor optimization, and compared to inverse imitation learning \citep{ziebart2008maximum,abbeel2004apprenticeship} it does not assume that the policy is optimal. We chose the VAE over Generative Adversarial Networks \citep{ho2016generative} due to easiness of training \citep{arjovsky2017towards}. The conditional variational autoencoder is a probabilistic model that samples an action $b\sim \mathrm{VAE}_\phi(s, a)$ according to the generative model \begin{equation} \mu, \Sigma = E_{\phi_1}(s, a); \qquad z \sim \mathcal{N}(\mu, \Sigma); \qquad b = D_{\phi_2}(s, z), \label{eq:VAE} \end{equation} where $E_{\phi_1}$ is the neural network encoder, $D_{\phi_2}$ is the neural network decoder, and we sample the code $z$ using the re-parameterization trick \citep{Kingma2014}. To learn the $\phi = \{\phi_1, \phi_2\}$ parameters we place a prior $\mathcal{N}(0, I)$ on the code $z$ and minimize the variational lower-bound \begin{equation} \mathcal{L}_\mathrm{VAE}(\phi) = \mathbb{E}_{s, a \sim \beta(\cdot)} \left[ \underbrace{(a - D_{\phi_2}(s,z))^2}_{\text{reconstruction loss}} + \frac{1}{2} \underbrace{\mathrm{KL}( \mathcal{N}(\mu, \Sigma), \mathcal{N}(0, I))}_{\text{regularization}} \right]. \label{eq:VAEloss} \end{equation} Upon a new state $s$, the generative model of the $\mathrm{VAE}_\phi(s)$ is $z \sim \mathcal{N}(0, I)$, $b = D_{\phi_2}(s, z)$.
\section{Introduction and Main Results} Let $f$ be a meromorphic function which is not a $M\ddot{o}bius$ transformation and let $f^{n}$, $n\in \mathbb{N}$, denote the $n$th iterate of $f$. The Fatou set $F(f)$ of $f$ is defined as set of points, $z\in \hat{\mathbb{C}}$, such that $\{f^{n}\}_{n\in\mathbb{N}}$ is well-defined and forms a normal family in some neighborhood of $z$. Therefore, $F(f)$ is an open set. Since $F(f)$ is completely invariant under $f$, i.e., $f(z)\in F(f)$ if and only if $z\in F(f)$, for a component $U$ of $F(f)$, $f(U)$ is contained in a component of $F(f)$. We write $U_n$ for the component of $F(f)$ such that $f^n(U)\subseteq U_n$. The complement $J(f)=\hat{\mathbb{C}}\setminus F(f)$ of $F(f)$ is called Julia set of $f$. Then $\bigcup_{n=0}^\infty f^{-n}(\infty)\subset J(f)$ and if $\bigcup_{n=0}^\infty f^{-n}(\infty)$ contains three distinct points in the extended complex plane $\hat{\mathbb{C}}$, then $\overline{\bigcup_{n=0}^\infty f^{-n}(\infty)}=J(f)$. Thus every $f^n$ is analytic in $F(f)$ for $n\geq 1$. In this paper, we investigate the Fatou component $U$ of $f$ with $f^n|_U\to\infty (n\to\infty)$. For convenience of statements, we call such an $U$ an escaping Fatou component of $f$. Let us first determine what kinds of Fatou components will be escaping to $\infty$ under iterates. A periodic Fatou component $W$ of $f$ with period $p\geq 1$, i.e., $f^p(W)\subseteq W=W_p$ and $p$ is the minimal positive integer such that the inclusion holds, is known as a Baker domain if $f^{np}|_W\to a (n\to\infty)$, but $f^p$ is not defined at $a$. Then $\infty$ must be the limit value of $f^{np+j}$ in $W$ for some $0\leq j\leq p-1$ and so $W_j$ is unbounded. If an escaping Fatou component $U$ of $f$ is periodic, i.e., for some positive integer $p$, $f^p(U)\subseteq U=U_p$, then $U$ is a Baker domain of $f$. The periodic Fatou components are classified into five possible types: Attracting domains, Parabolic domains, Siegel disks, Herman rings and Baker domains; see \cite{ber}, Theorem 6. A Fatou component $U$ is called a wandering domain of $f$, if for any pair of positive integers $m\not= n$, $U_m\not=U_n$ and actually $U_m\cap U_n=\emptyset$. We know that the escaping Fatou component $U$ is either a wandering domain, a Baker domain or a preimage of Baker domain. Many examples of such Baker domains and wandering domains have been revealed; see \cite{R} for a survey about Baker domains and \cite{Baker1, Baker2, BKL1, Her, EL, KS, RipponStallard2, Ber, S, Bi, BZ, FGJ, L}, here we mention some of many papers, for wandering domains; the existence of wandering domains with some special behavior of geometry, analysis or dynamics and/or for some special class of meromorphic functions continues to be an important topic and keeps to attract many interests. Let $U$ be an escaping Fatou component of a meromorphic function $f$. Generally for any two distinct points $a$ and $b$ in $U$ there exist $M>1$ and a positive integer $N$ such that for $\forall\ n\geq N$, \begin{equation}\label{equ1}|f^n(b)|^{1/M}\leq|f^n(a)|\leq |f^n(b)|^{M}\end{equation} and if $\hat{\mathbb{C}}\setminus U$ contains an unbounded component, we have a more precise inequality \begin{equation}\label{equ1.4}M^{-1}|f^n(a)|\leq |f^n(b)|\leq M|f^n(a)|,\ \forall\ n\geq N.\end{equation} (see \cite{Baker}, Lemma 5 or \cite{ber}, Lemma 7). Therefore, if $U$ is an unbounded or simply-connected wandering domain, then (\ref{equ1.4}) holds. As we know, the escaping Baker domain is unbounded and may be either simply-connected or multiply-connected. However, it was shown in \cite{Zheng4} and \cite{Rippon} that a Baker domain is always such that (\ref{equ1.4}) holds. Therefore, an escaping Fatou component $U$ not satisfying (\ref{equ1.4}) must be bounded, multiply-connected and wandering. The first entire function with multiply connected Fatou component was constructed by I. N. Baker \cite{Baker1, Baker2, Baker3} and every multiply-connected Fatou component $U$ of a transcendental entire function was shown in T\"opfer \cite{T} and Baker \cite{Baker4} to be a bounded escaping wandering domain and in \cite{Zheng2} and \cite{BRS} that for all sufficiently large $n$, $f^n(U)$ contains a round annulus centered at the origin with the large modulus tending to $\infty$ as $n\to\infty$. But it is not this case for a meromorphic function with poles. A meromorphic function may have the Herman rings, multiply connected attracting domains, parabolic domains and Baker domains; see \cite{D} for examples of meromorphic functions with only one pole that have invariant multiply connected Fatou component. A meromorphic function was constructed by Baker, Kotus and L\"u \cite{BKL1} to have a multiply connected wandering domain $U$ of preassigned connectivity such that the limit set of $\{f^n|_U\}$ is an infinite set including $\infty$. A planar region $E$ is said to have connectivity $m$ if $\hat{\mathbb{C}}\setminus E$ has $m$ components. Such a wandering domain of a transcendental entire function must be simply connected and such an example of entire function was constructed by Eremenko and Lyubich \cite{EL}. Some examples of meromorphic functions with finitely or infinitely many poles which have simply, doubly or infinitely connected wandering domains and which change connectivity of wandering domains under iterates can be found in \cite{RipponStallard2}. There exists a meromorphic function with bounded, multiply-connected, escaping and wandering domains separating the origin and $\infty$ where (\ref{equ1.4}) holds; see Example 5.2 of \cite{Zheng8}. As we know, there exist the escaping wandering domains such that (\ref{equ1}) holds but (\ref{equ1.4}) does not hold. In fact, an entire function does not satisfy (\ref{equ1.4}) in its multiply connected Fatou component and, however, (\ref{equ1}) is best possible; see Theorem 1.1 in \cite{BRS}. Furthermore, if (\ref{equ1.4}) does not hold, then the $U$ contains two points $a$ and $b$ such that \begin{equation}\label{equ2}|f^{n_k}(a)|/|f^{n_k}(b)|\to\infty (k\to\infty).\end{equation} We have shown in \cite{Zheng8} that in this case, $\bigcup_{n=0}^\infty f^n(U)$ contains a sequence of annuli $A(r_m,R_m)$ with $R_m/r_m\to\infty (m\to\infty)$ and $r_m\to\infty (m\to\infty)$; we call such a sequence of annuli an infinite modulus annulus sequence; Here and henceforth, for $R>r>0$ we denote round annulus $\{z:\ r<|z|<R\}$ by $A(r,R)$. And for all sufficiently large $n_k$, $U_{n_k}=f^{n_k}(U)$ separates the origin and $\infty$. A condition was given in \cite{Zheng8} to ensure the establishment of that for all sufficiently large $n$, $U_{n}=f^{n}(U)$ surrounds the origin and contains a large round annulus centered at the origin which form an infinite modulus annulus sequence. We can construct meromorphic functions which have wandering domain $U$ such that $f^{2n}(U)$ surrounds the origin and contains a large round annulus centered at the origin with (\ref{equ2}), but $f^{2n-1}(U)$ does not surround the origin by suitably modifying the construction of Example 5.4 in \cite{Zheng8}. Here we omit the constructing details which are routine but lengthy. This leads us to beg the following \ {\sl {\bf Question $\mathcal{A}$:}\ For an escaping Fatou component $U$ of $f$, if $\bigcup_{n=0}^\infty f^n(U)$ contains an infinite modulus annulus sequence, are there some pair of points $a$ and $b$ in $U$ such that (\ref{equ1.4}) does not hold ? } \ An equivalent statement of Question $\mathcal{A}$ is that if (\ref{equ1.4}) is satisfied in an escaping Fatou component $U$ of $f$, then whether may $\bigcup_{n=0}^\infty f^n(U)$ contain an infinite modulus annulus sequence? It turns out that it is this case. There exist wandering domains whose orbit contains an infinite modulus annulus sequence and (\ref{equ1.4}) holds. This is the first result of this paper. \begin{theorem}\label{thm1}There exists a transcendental meromorphic function $f$ which has an escaping wandering domain $U$ such that for all sufficiently large $n$, $f^n(U)\supset A(r_n,R_n)$ with $R_n/r_n\to\infty (n\to\infty)$ and $r_n\to\infty (n\to\infty)$, but for any two points $a, b\in U$, there exists an $M>1$ such that for all sufficiently large $n$, $$M^{-1}|f^n(a)|\leq |f^n(b)|\leq M|f^n(a)|.$$ \end{theorem} In another preparing paper studying the Baker domains, we construct a meromorphic function which has a Baker domain containing an infinite modulus annulus sequence and not essentially conjugating to a M\"obius transformation. However, the answer to Question $\mathcal{A}$ is positive for a transcendental entire function; Indeed, (\ref{equ1.4}) does not hold for an entire function in its multiply-connected Fatou component, as we mentioned earlier; see Theorem 1.1 in \cite{BRS}. In this paper, we establish a more general result allowed to deal with infinitely many poles. In order to clearly state our second result of this paper, we describe the notations appearing often below. Here and below $M(r,f)$ ($\hat{m}(r,f)$, respectively) denotes the maximal (minimal, respectively) modulus of $f$ on the circle $\{|z|=r\}$, i.e., $$M(r,f)=\max\{|f(z)|:\ |z|=r\},\ \hat{m}(r,f)=\min\{|f(z)|:\ |z|=r\}.$$ If $f$ has a pole in $\{|z|=r\}$, then $M(r,f)=+\infty$. $T(r,f)$ is the characteristic of Nevanlinna of $f$; $m(r,f)$ is the proximity function of $f$; $N(r,f)$ is the integrated counting function of $f$ in Nevanlinna theory (see \cite{Hayman1} and \cite{Zheng1}). Please see Section 2 for their exact definitions. For an escaping Fatou component $U$ and $c\in U$, define $$h_n(z):=\frac{\log|f^n(z)|}{\log|f^n(c)|},\ \forall\ z\in U,$$ $$\overline{h}(z):=\limsup_{n\to\infty} h_n(z),\ \underline{h}(z):=\liminf_{n\to\infty} h_n(z),\ \forall\ z\in U.$$ In view of (\ref{equ1}) we easily see that $\overline{h}(z)$ and $\underline{h}(z)$ exist on $U$. In \cite{BRS}, Bergweiler, Rippon and Stallard first introduced and proved that $h(z):=\overline{h}(z)=\underline{h}(z)$ on a multiply connected Fatou component $U$ of an entire function $f$ and applied $h$ successfully to describe the geometric structure of $U$; This work leads to $h$ becoming a significant function. \begin{theorem}\label{thm6}\ Assume that for some $C\geq 1$, $c>0$ and $r_0>0$, we have \begin{equation}\label{equ1.5}\log M(Cr,f)\geq\left(1-\frac{c}{\log r}\right)T(r,f),\ \forall\ r>r_0.\end{equation} Then there exist constants $D>1$, $d>1$ and $R_0>0$ such that for a Fatou component $U$ of $f$, if for some $m>0$ and some $r\geq R_0$, we have \begin{equation}\label{equ1.5+}A(D^{-d}r,D^dr)\subseteq f^m(U),\end{equation} then $U$ is an escaping wandering domain, $h(z):=\overline{h}(z)=\underline{h}(z)$ exists on $U$ and $h(z)$ is a non-constant positive harmonic function on $U$. Therefore for any point $z_0\in U$ and any neighborhood $V$ of $z_0$ in $U$, we have for some constant $0<\alpha<1$ and all sufficiently large $n$ $$f^n(V)\supset A(|f^n(z_0)|^{1-\alpha},|f^n(z_0)|^{1+\alpha});$$ moreover, there exist two points $a$ and $b$ in $V$ and $\tau>1$ such that $$|f^n(a)|^\tau\leq |f^n(b)|$$ and $$A_n=A(r_n,R_n)\subseteq f^n(V)$$ with $R_n\geq r_n^\tau\to\infty (n\to\infty)$ and $A_{n+1}\subseteq f(A_n)$. \end{theorem} We can give effective conditions to determine $D, d$ and $R_0$ in Theorem \ref{thm6}. We note that the condition which $D, d$ and $R_0$ satisfy is actually for the result of Lemma \ref{lem6} to hold. Therefore from the proof of Theorem 1.1 in \cite{Zheng8}, a rough calculation shows that $D, d$ and $R_0$ satisfying the following inequalities are available for Theorem \ref{thm6}: \begin{equation}\label{equ1.6}D>2Ce^{c+1},\ \frac{\pi}{d\cos\frac{\pi}{2d}}\left(1+\frac{\pi}{2\log D}\right)<\frac{1}{6},\ R_0\geq D^dr_0\end{equation} and \begin{equation}\label{equ1.7+}\frac{T(r,f)}{\log r}>d\log D,\ \forall\ r\geq R_0.\end{equation} It is easy to see that that if $\bigcup_{n=0}^\infty f^n(U)$ contains an infinite modulus annulus sequence for an escaping Fatou component $U$ of $f$, then we have (\ref{equ1.5+}) with $D, d$ and $R_0$ such that (\ref{equ1.6}) and (\ref{equ1.7+}) hold. Let us make remarks on (\ref{equ1.5}). Theorem \ref{thm1} tells us that (\ref{equ1.5}) cannot be removed in Theorem \ref{thm6}. In Example 5.3 in \cite{Zheng8}, we constructed a meromorphic function which has an escaping wandering domain $U$ in which there exist two points $a$ and $b$ such that $|f^n(b)|/|f^n(a)|\to\infty (n\to\infty)$ but $h_U(z)\equiv 1$ on $U$. If $f$ only has at most finitely many poles, then (\ref{equ1.5}) immediately holds. So Theorem \ref{thm6} extends the related results in \cite{BRS} to a meromorphic function with infinitely many poles. If \begin{equation}\label{equ2+}T(r,f)\geq N(r,f)\log r,\ \forall\ r\geq r_0,\end{equation} then we have \begin{equation*}m(r,f)=T(r,f)-N(r,f)\geq \left(1-\frac{1}{\log r}\right)T(r,f),\ \forall\ r\geq r_0. \end{equation*} Hence, (\ref{equ2+}) implies (\ref{equ1.5}) and that the Nevanlinna deficiency $\delta(\infty,f)$ of $f$ of poles is $1$. It is easy to find a meromorphic function $f$ satisfying (\ref{equ1.5}) and $\delta(\infty,f)<1$. Consider the function $f(z)=\dfrac{e^z-1}{e^{-z}+1}$. Then $$m(r,f)\sim \frac{r}{\pi},\ \ N(r,f)\sim \frac{r}{\pi}\ (r\to\infty)$$ and $\delta(\infty,f)=\frac{1}{2}$. And $$\log M(r,f)\geq \log\frac{e^r-1}{e^{-r}+1}\sim r\sim \pi T(r,f)\ (r\to\infty).$$ Then we obtain (\ref{equ1.5}) for $C=1$. Finally, we mention that Theorem \ref{thm6} is still true even if (\ref{equ1.5}) is satisfied for all possibly except a set of $r$ with finite logarithmic measure. The existence of large annuli in the orbit of an escaping Fatou component guarantees the stability of the annuli in the sense that the suitable large annuli still exist under relatively small changes to the function in question. \begin{theorem}\label{thm3}\ Let $f$ be a meromorphic function satisfying the conditions in Theorem \ref{thm6}. If $f$ has an escaping Fatou component $U$ such that $\bigcup_{n=0}^\infty f^n(U)$ contains an infinite modulus annulus sequence, then for any meromorphic function $g$ which is analytic on $\bigcup_{n=N}^\infty f^n(U)$ and such that for some $N$ and for $0<\delta<1$ \begin{equation}\label{equ1.6+}M(r,f-g)\leq M(r,f)^\delta, \text{for}\ \{|z|=r\}\subset \bigcup_{n=N}^\infty f^n(U),\end{equation} $g$ has an escaping Fatou component $V$ on which the results in Theorem 2 also hold for $g$. \end{theorem} Theorem \ref{thm3} was proved in \cite{BRS} for the case when $f$ and $g$ are entire. Theorem \ref{thm3} gives us a strong argument to be able to find a meromorphic function $f$ with $\delta(\infty,f)=0$ which has an escaping wandering domain $U$ with properties stated in Theorem 2 under $f$. This is stated as follows. \begin{theorem}\label{thm5} There exists a meromorphic function $f$ with $\delta(\infty,f)=0$ which has a wandering domain $W$ such that the results in Theorem 2 hold for $f$ and $W$. \end{theorem} Furthermore, we can find a meromorphic function that has the results in Theorem 2, but that does not satisfy (\ref{equ1.5}) in a set of $r$ with the infinite logarithmic measure. Next we investigate escaping speed of points in an escaping Fatou component under iterates. A fast escaping set of a transcendental entire function $f$, denoted by $A(f)$, was introduced by Bergweiler and Hinkkanen \cite{BH} and can be defined \cite{RipponStallard1} by $$A(f)=\{z\in\mathbb{C}:\ {\rm there\ exists}\ L\in\mathbb{N}\ {\rm such\ that}\ |f^{n+L}(z)|\geq M_n(R,f),\ {\rm for}\ n\in\mathbb{N}\},$$ where $R>\min\limits_{z\in J(f)}|z|$ and $M_n(r,f)$ is the $n$th iterate of $M(r,f)$ with respect to $r$. $A(f)$ is independent of the choice of $R$. It turns out that the fast escaping set $A(f)$ possesses many interesting dynamical behaviors and attracts a lot of attentions; see \cite{RipponStallard1} for the detail; for example, every component of $A(f)$ is unbounded, which is related to a conjecture of Eremenko (\cite{E}). This has led to a lot of recent researches, here we mention some of them: \cite{O, S1, S2, RS2, RS3}. The maximal modulus $M(r,f)$ of an entire function has proved to be powerful in the study of iterate theory, but it is inferior for a meromorphic function with infinitely many poles. Although we can define the maximal modulus of a meromorphic function, basically $f^n$ with $n>1$ may not be a meromorphic function. Hence we cannot consider the fast escaping set of a meromorphic function with the help of maximal modulus. Rippon and Stallard in \cite{RS} mentioned how to define the fast escaping set for a meromorphic function. In \cite{Zheng1} we used the Nevanlinna characteristic in the place of the maximal modulus to define it. For a meromorphic function $f$, set $\hat{T}(r,f)=\exp T(r,f)$ and $\hat{T}_n(r,f)$ is the $n$th iterate of $\hat{T}(r,f)$ with respect to $r$. Define $$M(f)=\{z\in\mathbb{C}:\ {\rm there\ exists}\ L\in\mathbb{N}\ {\rm such\ that}\ |f^{n+L}(z)|\geq \hat{T}_n(R,f),\ {\rm for}\ n\in\mathbb{N}\}.$$ Other equivalent definitions of $A(f)$ (cf.\cite{BH} and \cite{RipponStallard1}) can be defined with the Nevanlinna characteristic for an entire function $f$, but not for a meromorphic function with poles. In \cite{Zheng1}, we showed that (1) $M(f)$ is non-empty and completely invariant; (2) $J(f)=\partial M(f)$; (3) if $U$ is a Fatou component of $f$ and $U\cap M(f)\not=\emptyset$, then $\overline{U}\subset M(f)$ and $U$ is an escaping wandering domain of $f$. Let us compare $M(f)$ to $A(f)$ for an entire function and establish the following \begin{theorem}\ Let $f$ be a transcendental entire function. Then $M(f)=A(f)$. \end{theorem} Closure of a multiply connected Fatou component of an entire function must be in the fast escaping set $A(f)$, proved in \cite{RipponStallard3}. But basically, this conclusion does not hold for a meromorphic function. In following, we give a sufficient condition. \begin{theorem}\label{thm6+} Let $f$ be a transcendental meromorphic function with (\ref{equ1.5}). Then for $D>e^{3c}$ and $R_0\geq r_0$ with property that for $r\geq R_0$, \begin{equation}\label{equ1.10}\frac{T(r,f)}{\log r}>\frac{22.56(\kappa+\log D)}{\log D-3c},\end{equation} if a Fatou component $U$ of $f$ satisfies that for some $m>0$ and some $r>CR_0$, \begin{equation}\label{equ1.10+}A(r,Dr)\subset f^m(U),\end{equation} we have $\overline{U}\subset M(f)$. \end{theorem} As we know, a simply connected wandering domain of an entire function may not be in $A(f)$. Are there any simply connected wandering domain in $A(f)$, which is asked in \cite{RS1}. The existence of such simply connected wandering domains has been shown by Bergweiler \cite{Ber} and Sixsmith \cite{S}. A point $z_0$ in an escaping Baker domain has escaping rate $$\log|f^n(z_0)|=O(n)\ (n\to\infty);$$ see \cite{Baker5, ber, Zheng4, Rippon}. In another paper we find a Baker domain where $|f^n(z)|=o(n) (n\to\infty)$ and $f^n(z)$ goes forward to $\infty$ in a slow spiral. For the case of escaping wandering domains, we can construct escaping wandering domains with any escaping rate under iterates, that is to say, given a sequence $\{a_n\}$ of positive numbers tending to $\infty$, we can find a wandering domain $U$ such that for any point $z_0\in U$, we have \begin{equation}\label{equ1.11}|f^n(z_0)|\sim a_n (n\to\infty).\end{equation} \begin{theorem}\label{thm8} Let $\{a_n\}$ be arbitrary sequence of positive numbers with $1<a_n<a_{n+1}\to\infty (n\to\infty)$. For $0<\rho\leq\infty$, there exists an entire function $f$ with order at least $\rho$ which has an escaping wandering domain $U$ such that for some point $z_0$, $|f^n(z_0)|\sim a_n (n\to\infty)$. In terms of (\ref{equ1.4}), for any point $a\in U$, there exists $L>1$ such that $\frac{a_n}{L}\leq |f^n(a)|\leq La_n$. \end{theorem} If it is allowed that $f$ is meromorphic in Theorem \ref{thm8}, then we can obtain (\ref{equ1.11}) for any point $z_0\in U$. Theorem \ref{thm8} would not be new, but we could not find any references about it. It was shown in \cite{RipponStallard} that every Fatou component of $z+\sin z+2\pi$ is a bounded wandering domain where $f^n(z)\sim 2\pi n (n\to\infty)$; every Fatou component of $z+e^{-z}+2\pi i$ is an unbounded wandering domain where $f^n(z)\sim 2\pi n (n\to\infty)$. If $f$ is entire, then $a_n\leq M(2|z_0|,f^n)\leq M_n(2|z_0|,f)$, where $M_n(r,f)$ stands for the $n$th iterate of $M(r,f)$ with respect to $r$. However from Theorem \ref{thm7} we cannot estimate $a_n$ in terms of $f$ and $z_0$ when $f$ is meromorphic with infinitely many poles. \ The organization of this paper is the following. We will collect the preliminary results in Section 2 applied often to the proofs of theorems. We will prove Theorems 1-4 in Section 3 and Theorems 5-7 in Section 4. We will make further discussions or remarks after the proofs of theorems. \section{Preliminary Lemmas} Firstly we need a covering lemma which comes from the hyperbolic metric. Let $\Omega$ be a hyperbolic domain in the extended complex plane $\hat{\mathbb{C}}$, that is, $\hat{\mathbb{C}}\backslash \Omega$ contains at least three points. Then there exists on $\Omega$ the hyperbolic metric $\lambda_{\Omega}(z)|{\rm d}z|$ with Gaussian curvature $-1$ and $\lambda_{\Omega}(z)$ is the hyperbolic density of $\Omega$ at $z\in \Omega.$ Then $$\lambda_{D}(z)=\frac{1}{|z|\log |z|},\ D=\{z:|z|>1\}$$ and \begin{equation}\label{2.1+} \lambda_{A}(z)=\frac{\pi}{\left|z\right|{\rm mod}(A)\sin(\pi \log(R/\left|z\right|)/{\rm mod}(A))}, \forall\ z\in A=A(r,R), \end{equation} where $A(r,R)=\{z:\ r<|z|<R\}$ and ${\rm mod}(A)=\log R/r$ is the modulus of $A$. The hyperbolic distance $d_{\Omega}(u,v)$ of two points $u, v\in\Omega$ is defined by \begin{equation*}\label{2.1} d_{\Omega}(u,v)=\inf_{\alpha}\int_{\alpha}\lambda_{\Omega}(z)\left|dz\right|, \end{equation*} where the infimum is taken over all piecewise smooth paths $\alpha$ in $\Omega$ joining $u$ and $v$. \begin{lemma}\label{lem2.2}(\cite{Zheng8}) \ Let $f$ be analytic on a hyperbolic domain $U$ with $0\not\in f(U)$. If there exist two distinct points $z_1$ and $z_2$ in $U$ such that $|f(z_1)|> e^{\kappa\delta}|f(z_2)|$, where $\delta=d_U(z_1,z_2)$ and $\kappa=\Gamma(1/4)^4/(4\pi^2)$, then there exists a point $\hat{z}\in U$ such that $|f(z_2)|\leq |f(\hat{z})|\leq |f(z_1)|$ and \begin{equation}\label{2.1}f(U)\supset A\left(e^\kappa\left(\frac{|f(z_2)|}{|f(z_1)|}\right)^{1/\delta}|f(\hat{z})|,\ e^{-\kappa}\left(\frac{|f(z_1)|}{|f(z_2)|}\right)^{1/\delta}|f(\hat{z})|\right).\end{equation} If $|f(z_1)|\geq \exp\left(\frac{\kappa\delta}{1-\delta}\right)|f(z_2)|$ and $0<\delta<1$, then \begin{equation}\label{2.2} f(U)\supset A(|f(z_2)|,|f(z_1)|). \end{equation} In particular, for $\delta\leq\frac{1}{6}$ and $|f(z_1)|\geq e|f(z_2)|$, we have (\ref{2.2}). \end{lemma} In order to be able to cover an effective annulus, we are forced to calculate carefully the hyperbolic distance in an annulus. \begin{lemma}\label{lem3}\ Set $A=A(r,R)$ with $0<r<R$. Then for any two points $z_1, z_2\in A$ with $|z_2|\leq |z_1|$ we have $$\max\left\{\frac{\pi}{{\rm mod}(A)}\log\frac{|z_1|}{|z_2|}, \log \frac{\log\frac{R}{|z_2|}}{\log\frac{R}{|z_1|}}\right\}\leq d_A(z_1,z_2)\leq \frac{\pi^2}{{\rm mod}(A)\hat{K}_0}+\frac{\pi}{{\rm mod}(A)\hat{K}_1}\log\frac{|z_1|}{|z_2|},$$ where $\hat{K}_0=\max\limits_{j=1,2}\sin(\pi \log(R/|z_j|)/{\rm mod}(A))$ and $\hat{K}_1=\min\limits_{j=1,2}\sin(\pi \log(R/|z_j|)/{\rm mod}(A))$. In particular, for $z_1, z_2$ with $\frac{R}{|z_1|}=\left(\frac{R}{r}\right)^\sigma, \frac{R}{|z_2|}=\left(\frac{R}{r}\right)^\tau$ and $0<\sigma\leq\tau<1$, we have \begin{equation}\label{2.3}\max\left\{(\tau-\sigma)\pi,\log\frac{\tau}{\sigma}\right\}\leq d_A(z_1,z_2)\leq \frac{\pi^2}{\hat{K}_0{\rm mod}(A)}+\frac{(\tau-\sigma)\pi}{\hat{K}_1}, \end{equation} with $\hat{K}_0=\max\{\sin(\sigma\pi),\sin(\tau\pi)\}$ and $\hat{K}_1=\min\{\sin(\sigma\pi),\sin(\tau\pi)\}$. \end{lemma} \begin{proof}\ We prove the first inequality. In view of (\ref{2.1+}), for all $z\in A$ we have \begin{equation*} \lambda_{A}(z)=\frac{\pi}{|z|{\rm mod}(A)\sin(\pi \log(R/|z|)/{\rm mod}(A))}\geq \frac{1}{|z|\log\frac{R}{|z|}} \end{equation*} and $$\lambda_{A}(z)\geq\frac{\pi}{|z|{\rm mod}(A)}.$$ Therefore $$d_A(z_1,z_2)\geq \int_\gamma\frac{|{\rm d}z|}{|z|\log\frac{R}{|z|}}\geq \log \frac{\log\frac{R}{|z_2|}}{\log\frac{R}{|z_1|}}$$ and $$d_A(z_1,z_2)\geq \frac{\pi}{{\rm mod}(A)}\log\frac{|z_1|}{|z_2|},$$ where $\gamma$ is the geodesic curve in $A$ connecting $z_1$ and $z_2$. Next we prove the second inequality. For all $z$ with $|z_2|\leq |z|\leq |z_1|$ we have $$\sin(\pi \log(R/|z|)/{\rm mod}(A))\geq\min_{j=1,2}\sin(\pi \log(R/|z_j|)/{\rm mod}(A))=\hat{K}_1.$$ Without loss of generality assume that $\hat{K}_0$ attains the maximal value at $z_2$. Then \begin{eqnarray*}d_A(z_1,z_2)&\leq& \frac{\pi}{{\rm mod}(A)\hat{K}_0}\int_{\gamma_0}\frac{|{\rm d}z|}{|z|}+ \frac{\pi}{{\rm mod}(A)\hat{K}_1}\int_{\gamma_1}\frac{|{\rm d}z|}{|z|} \\ &\leq& \frac{\pi^2}{{\rm mod}(A)\hat{K}_0}+\frac{\pi}{{\rm mod}(A)\hat{K}_1}\log\frac{|z_1|}{|z_2|},\end{eqnarray*} where $\gamma_0$ is the shortest arc from $|z_2|e^{i\arg z_1}$ to $z_2$ and $\gamma_1=\{z=te^{i\arg z_1}:\ |z_1|\leq t\leq |z_2|\}$. \end{proof} Please pay attention! The bounds of $d_A(z_1,z_2)$ only depend on ${\rm mod}(A)$, but independent of the size of $R$ and $r$. \begin{lemma}(\cite{Zheng8})\label{lemxx}\ Let $h(z)$ be analytic on the annulus $B=A(r, R)$ with $0<r<R<+\infty$ such that $|h(z)|>1$ on $B$. Then \begin{eqnarray}\label{2.7} \log\hat{m}(\rho,h)&\geq& \exp\left(-\frac{\pi^2}{2}\max\left\{\frac{1}{\log\frac{R}{\rho}},\frac{1}{\log\frac{\rho}{r}}\right\}\right)\log M(\rho,h)\nonumber\\ &\geq&\min\left\{\frac{\log\frac{\rho}{r}-\pi}{\log\frac{\rho}{r}+\pi}, \frac{\log\frac{R}{\rho}-\pi}{\log\frac{R}{\rho}+\pi}\right\}\log M(\rho, h),\end{eqnarray} where $\rho\in(r,R)$ and $\hat{m}(\rho,h)=\min\{|h(z)|: |z|=\rho\}.$ \end{lemma} Secondly we need the basic notations and results in Nevanlinna theory of meromorphic functions (\cite{Hayman1} or \cite{Zheng1}). Set $\log^+x=\log\max\{1,x\}.$ Let $f$ be a meromorphic function. Define $$m(r,f):=\frac{1}{2\pi}\int_0^{2\pi}\log^+|f(re^{i\theta})|{\rm d}\theta,$$ $$N(r,f):=\int_0^r\frac{n(t,f)-n(0,f)}{t}{\rm d}t+n(0,f)\log r,$$ where $n(t,f)$ denotes the number of poles of $f$ counted according to their multiplicities in $\{z: |z|<t\}$, sometimes we write $n(t,\infty)$ for $n(t,f)$ and $n(t,0)$ for $n\left(t,\frac{1}{f}\right)$ when $f$ is clear in the context, and the Nevanlinna characteristic of $f$ by $$T(r,f):=m(r,f)+N(r,f).$$ Then the deficiency of Nevanlinna of $f$ of poles is $$\delta(\infty,f)=\liminf_{r\to\infty}\frac{m(r,f)}{T(r,f)}=1-\limsup_{r\to\infty}\frac{N(r,f)}{T(r,f)}.$$ We write the conclusions about the Nevanlinna characteristic we shall use below as a lemma, which also holds for $\log M(r,f)$ of a transcendental entire function $f$; see Theorem 2.2 of \cite{BRS}. \begin{lemma}\label{lem4}\ Let $f$ be a transcendental meromorphic function. Then (1)\ $\frac{T(r,f)}{\log r}\rightarrow\infty (r\rightarrow\infty)$; (2)\ There exists $r_0>0$ such that for $r_0\leq r<R$, \begin{equation}\label{2.8}T(R,f)\geq\frac{\log R}{\log r}T(r,f);\end{equation} (3)\ There exists $r_0>0$ such that for $r_0\leq r<R$ and any positive integer $n$, we have \begin{equation}\label{3.3}\hat{T}_n(R,f)\geq\hat{T}_n(r,f)^{\frac{\log R}{\log r}},\end{equation} where $\hat{T}(r,f)=e^{T(r,f)}$ and $\hat{T}_n(r,f)=\hat{T}(\hat{T}_{n-1}(r,f),f), \hat{T}_{0}(r,f)=r.$ \end{lemma} Since $T(r,f)$ is a logarithmic convex function, the result (2) in Lemma \ref{lem4} follows from the result (1) in Lemma \ref{lem4} and further (3) in Lemma \ref{lem4} follows (see \cite{Zheng8}). \section{Proofs of Theorems 1-4} We need Runge Theorem to complete the proofs of Theorems \ref{thm1}. \ {\sl {\bf Runge Theorem}(cf. \cite{Rudin}).\ Let $W$ be a compact set on the complex plane and let $f(z)$ be analytic on $W$. Assume that $E$ is a set which intersects every component of $\mathbb{C}\setminus W$. Then for any $\varepsilon>0$, there exists a rational function $R(z)$ such that all poles of $R(z)$ lie in $E$ and $$|f(z)-R(z)|<\varepsilon,\ \forall z\in W.$$} Now let us go to the proof of Theorem \ref{thm1}. \ Take four sequences $\{r_n\},\ \{R_n\},\ \{r'_n\}$ and $\{R'_n\}$ such that $10<r_n<r_n'<R_n'<R_n$, $2\leq r'_n/r_n\leq 3$, $2\leq R_n/R'_n\leq 3$, $9R_n<r_{n+1}$ and $R_n/r_n=R_{n+1}'/r_{n+1}'$. Thus $\frac{R_n}{r_n}=\frac{R_{n+1}'}{r_{n+1}'}\leq\frac{1}{4}\frac{R_{n+1}}{r_{n+1}}$, and $\frac{R_n}{r_n}\geq 4^{n-1}\frac{R_1}{r_1}\to\infty (n\to\infty)$. Define $$T_n(z)=\frac{r'_{n+1}}{r_n}z:\ A(r_n,R_n)\to A(r'_{n+1},R'_{n+1}).$$ Take $a_n$ and $b_n$ such that $b_n>R_n+n$, $\frac{b_n}{R_n}\to 1 (n\to\infty)$ and $a_n<r_{n}-n$, $\frac{a_n}{r_n}\to 1\break (n\to\infty)$. Set $A_n=A(r_n,R_n),\ C_n=\{z:|z|=b_n\ \text{or}\ a_n\}$ and $B_n=B(0,r_n/4)$ with $r_1>4$. Take a sequence of positive numbers $\{\varepsilon_n\}$ such that $\varepsilon_{n+1}<\frac{1}{2}\varepsilon_n$ and $\varepsilon_1<\frac{1}{2}$. In view of the Runge's Theorem, we have a rational function $f_1(z)$ such that $$|f_1(z)-T_1(z)|<\varepsilon_1, \forall\ z\in A_1;\ |f_1(z)|<\varepsilon_1, \forall\ z\in B_1$$ $$|f_1(z)|<\varepsilon_1,\ \forall\ z\in C_1$$ and inductively, we have rational function $f_{n+1}(z)$ such that $$\left|\sum_{k=1}^{n+1}f_k(z)-T_{n+1}(z)\right|<\varepsilon_{n+1}, \forall\ z\in A_{n+1};\ |f_{n+1}(z)|<\varepsilon_{n+1}, \forall\ z\in B_{n+1}$$ and $$\left|\sum_{k=1}^{n+1}f_k(z)\right|<\varepsilon_{n+1}, \forall\ z\in C_{n+1}.$$ Write $f(z)=\sum_{n=1}^\infty f_n(z)$. Since the series is uniformly convergent on any compact subset of $\mathbb{C}$, $f(z)$ is a meromorphic function on $\mathbb{C}$. For $z\in B_1$, we have $$|f(z)|\leq\sum_{n=1}^\infty|f_n(z)|<\sum_{n=1}^\infty\varepsilon_n<1,$$ that is to say, $f(B_1)\subset B(0,1)$ and so $B_1$ is contained in an invariant Fatou component of $f$. For $z\in C_n$, we have, by noting that $C_n\subset B_m$ for $m>n$, $$|f(z)|\leq \left|\sum_{k=1}^nf_k(z)\right|+\sum_{k=n+1}^\infty|f_k(z)| <\varepsilon_n+\sum_{k=n+1}^\infty|f_k(z)|<\sum_{k=n}^\infty\varepsilon_k<1$$ and so $f(C_n)\subset B(0,1)$ and $C_n$ is contained in a preperiodic Fatou component of $f$. Since for $z\in A_n=A(r_n,R_n)\subset B_{n+1}$, \begin{equation}\label{equ3}|f(z)-T_n(z)|\leq \left|\sum_{k=1}^nf_k(z)-T_n(z)\right|+\left|\sum_{k=n+1}^\infty f_k(z)\right|<\sum_{k=n}^\infty \varepsilon_k=\varepsilon'_n\ (say),\end{equation} we have \begin{equation}\label{equ3.2}f(A(r_n,R_n))\subset A\left(r'_{n+1}-\varepsilon'_n,\ R'_{n+1}+\varepsilon'_n\right)\subset A(r_{n+1},R_{n+1}).\end{equation} Therefore, $A_n$ is contained in a wandering domain $U_n$ of $f$ and $f: U_n\to U_{n+1}$ is proper. Since $f$ is univalent in $A_n$ by the Rouch\'e Theorem, $U_n$ is not doubly connected. Each of $U_n$ has no isolated boundary points. If $U_n$ is finitely connected, then in view of the Riemann-Hurwitz Theorem, $f$ is univalent in $U_n$, but the modulus of annulus $A_m$ tends to infinity as $m$ does, which contracts to the conformal invariant property of annulus modulus. Therefore, $U_n$ must be infinitely connected. For a point $a\in A_n$, it follows from (\ref{equ3}) that $$\frac{r'_{n+1}}{r_n}|a|-\varepsilon'_n\leq |f(a)|\leq\frac{r'_{n+1}}{r_n}|a|+\varepsilon'_n$$ and $$\frac{r'_{n+1}-\varepsilon'_n}{r_n}\leq \frac{|f(a)|}{|a|}\leq\frac{r'_{n+1}+\varepsilon'_n}{r_n}.$$ Inductively, from (\ref{equ3.2}) we have $$\prod_{k=1}^m\frac{r'_{n+k}-\varepsilon'_{n+k-1}}{r_{n+k-1}}\leq \frac{|f^m(a)|}{|a|}\leq \prod_{k=1}^m\frac{r'_{n+k}+\varepsilon'_{n+k-1}}{r_{n+k-1}}.$$ We note that \begin{eqnarray*}\prod_{k=1}^\infty\frac{r'_{n+k}+\varepsilon'_{n+k-1}}{r'_{n+k}-\varepsilon'_{n+k-1}} &=&\prod_{k=1}^\infty\left(1+\frac{2\varepsilon'_{n+k-1}}{r'_{n+k}-\varepsilon'_{n+k-1}}\right)\\ &<&\exp\sum_{k=1}^\infty\frac{2\varepsilon'_{n+k-1}}{r'_{n+k}-\varepsilon'_{n+k-1}}<e^2.\end{eqnarray*} Thus for two points $a$ and $b$ in $A_n$, we have \begin{equation}\label{1++}\frac{|f^m(a)|}{|f^m(b)|}\leq\frac{|a|}{|b|} \prod_{k=1}^m\frac{r'_{n+k}+\varepsilon'_{n+k-1}}{r'_{n+k}-\varepsilon'_{n+k-1}}< \frac{|a|}{|b|}e^2,\ \forall m\in \mathbb{N}.\end{equation} Now we need to treat two cases: Case (I):\ $|f^m(b)|\leq R'_m <R_m\leq |f^m(a)|$; Case (II):\ $|f^m(b)|\leq r_m<r'_m\leq |f^m(a)|$. Below we only prove that Case (I) would be impossible. The same method yields the same assertion to Case (II). Set $E_m=A(a_m,b_m).$ In view of the Principle of Hyperbolic Metric (Shwarz-Pick Lemma), we calculate \begin{eqnarray*}\ d_U(a,b)&\geq& d_{U_m}(f^m(a),f^m(b))\\ &\geq & d_{E_m}(f^m(b),f^m(a))\\ &\geq & d_{E_m}(R'_m,R_m)\\ &=&\int_{R'_m}^{R_m}\lambda_{E_m}(z)|{\rm d}z|\\ &=&\int_{R'_m}^{R_m}\frac{\pi}{t\ {\rm mod}(E_m)\sin(\pi\log\frac{b_m}{t}/{\rm mod}(E_m))}{\rm d}t\\ &\geq &\int_{R'_m}^{R_m}\frac{{\rm d}t}{t\log\frac{b_m}{t}}\\ &=&\log\frac{\log\frac{b_m}{R'_m}}{\log\frac{b_m}{R_m}}\\ &=&\log\left(1+\frac{\log\frac{R_m}{R'_m}}{\log\frac{b_m}{R_m}}\right)\\ &\geq& \log\left(1+\frac{\log 2}{\log\frac{b_m}{R_m}}\right)\to\infty (m\to\infty). \end{eqnarray*} A contradiction is derived. Then for all sufficiently large $m>0$, $f^m(a)$ and $f^m(b)$ lie in $A_m$ or $A(a_m, r'_m)$ or $A(R'_m,b_m)$ at the same time. By noting that $2\leq r'_n/a_n\leq 4$ and $2\leq b_n/R'_n\leq 4$ together with (\ref{1++}), we deduce that for any pair of points $a, b\in U$ and all sufficiently large $n$ $$\frac{|f^n(a)|}{|f^n(b)|}\leq\max\left\{4,\frac{|a|}{|b|}e^2\right\}.$$\qed \ For the proof of Theorem 2, we first establish two lemmas. \begin{lemma}\label{lem5}\ Let $f$ be a meromorphic function on $\{z:\ |z|\leq R\}$ and $f$ be analytic on $\overline{A}(r,R)$ with $0<r<R/4$. Then for $r+1<r'<R'\leq R$, on $\{|z|=r'\}$, we have \begin{equation}\label{equ3.9}\log^+|f(z)|\leq\left(\frac{R'+r'}{R'-r'}+ \left(\log\frac{R}{r}\right)^{-1}\log \frac{R'}{r'-r}\right) T(R,f). \end{equation} \end{lemma} \begin{proof}\ In view of the Poisson formula, for $z\in D=\{z:\ |z|<R'\}$ with $f(z)\not=0,\ \infty$, we have \begin{equation}\label{equ3.10}\ \log|f(z)|\leq m(D,z,f)+N(D,z,f), \end{equation} where $$m(D,z,f)=\frac{1}{2\pi}\int_{\partial D}\log^+|f(\zeta)|\frac{\partial G_D(\zeta,z)}{\partial \vec{n}}{\rm d}s,$$ $$N(D,z,f)=\sum\limits_{b_n\in D}G_D(b_n,z),$$ $G_D$ is the Green function for $D$ and all $b_n$ are poles of $f$ in $D$ appearing often according to their multiplicities. Then for $z$ with $|z|=r'$, we have $$m(D,z,f)=\frac{1}{2\pi}\int_0^{2\pi}\log^+|f(R'e^{i\theta})|\frac{R'^2-|z|^2}{|R'^2-z|^2}{\rm d}\theta $$ $$\leq\frac{R'+|z|}{R'-|z|}m(R',f)\leq\frac{R'+|z|}{R'-|z|}T(R',f)$$ and, by denoting the number of poles of $f$ in $D$ by $n(D,f)$, we have \begin{eqnarray*}N(D,z,f)&\leq&\sum\limits_{b_n\in D}\log\frac{R'}{|b_n-z|}\\ &\leq & n(D,f)\log \frac{R'}{r'-r}\\ &=&n(r,f)\log \frac{R'}{r'-r}\\ &=& \left(\log\frac{R}{r}\right)^{-1}\int_r^R\frac{n(t,f)}{t}{\rm d}t\log \frac{R'}{r'-r}\\ &\leq& \left(\log\frac{R}{r}\right)^{-1}\left(\log \frac{R'}{r'-r}\right) T(R,f).\end{eqnarray*} Therefore we immediately have (\ref{equ3.9}). \end{proof} The following is extracted from the proof of Theorem 1.1 in \cite{Zheng8}, but the condition (1.4) in that paper is replaced by the more general condition (\ref{equ1.5}) in this paper. \begin{lemma}\label{lem6}\ Let $f$ be a meromorphic function with (\ref{equ1.5}). Let $U$ be a Fatou component of $f$. Then there exist constants $D>1$, $d>1$ and $R_0>0$ such that if for some $m>0$ and $r\geq R_0$, \begin{equation}\label{equ3.6}A(D^{-d}r,D^dr)\subseteq f^m(U),\end{equation} then for all sufficiently large $n$, $f^n(U)\supset A_n$ and $A_{n+1}\subset f(A_n)$ with $A_n=A(r_n,R_n)$, $R_n\geq r_n^\sigma$, $r_{n+1}>R_n$, $r_n\to\infty\ (n\to\infty)$ and $\sigma>1$. \end{lemma} We remark that if the conclusion of Lemma \ref{lem6} holds, that is to say, for large $n$, $f^n(U)$ contains large annulus stated in Lemma \ref{lem6}, then the condition (\ref{equ1.5}) can be replaced by the following inequality \begin{equation}\label{equ3.7}\log M(Cr,f)\geq\left(1-\frac{\log\log r}{\log r}\right)T(r,f),\ \forall\ r>r_0. \end{equation} We will complete the proof of Theorem \ref{thm6} under the condition (\ref{equ3.7}) instead of (\ref{equ1.5}) after we obtain large annulus sequence stated in Lemma \ref{lem6}. Now we are in the position to prove Theorem \ref{thm6}. \ Under the conditions of Theorem 2, in view of Lemma \ref{lem6}, for all sufficiently large $n$, we have \begin{equation}\label{equ3.8}A(r_n,R_n)\subset f^n(U)\end{equation} with $R_n\geq r_n^\sigma$, $r_{n+1}>R_n$, $r_n\to\infty\ (n\to\infty)$ and $\sigma>1$. Therefore, for a sufficiently large $m$ and $n\geq m$ we have $r_{n+1}>R_n\geq R_m^{\sigma^{n-m}}$. Without loss of generality for a sufficiently large $m$, we rewrite $r_m,\ R_m$ and $\sigma>1$ such that $$f^m(U)\supset A(r^\alpha_m,R^\beta_m)\supset A(r_m,R_m)$$ with $R_m=r^\sigma_m$, $(\sigma-1)\log r_m>2m^2$, $0<\alpha<1$ and $\beta>1$ (For example in (\ref{equ3.8}) for $n=m$ we replace $r_m$ by $r_m^{1/\alpha}$ and $R_m$ by $R_m^{1/\beta}$ with $\beta=\alpha\sigma$). Take $R'_m=e^{-m^2}R_m$ and $r'_m=er_m$. Applying Lemma \ref{lemxx} to $f$ on $A(r_m,R_m)$, we have \begin{equation}\label{equ3.9+}\hat{m}(R'_m,f)\geq M(R'_m,f)^{s_m},\ s_m=\exp\left(-\frac{\pi^2}{2}\max\left\{\frac{1}{\log\frac{R_m}{R'_m}}, \frac{1}{\log\frac{R'_m}{r_m}}\right\}\right).\end{equation} Let us estimate $s_m$. Since $$\log\frac{R_m}{R'_m}=m^2\ \text{and}\ \log\frac{R'_m}{r_m}=(\sigma-1)\log r_m-m^2>m^2,$$ we have $$s_m=\exp\left(-\frac{\pi^2}{2m^2}\right).$$ Take $\tau$ with $1<\tau<\sigma$ such that $s_m\sigma>\tau$ and take two points $a$ and $b$ with $|a|=r'_m$ and $|b|=R'_m$. Set $\hat{R}_m=r'_me^{m^3}$. Finding $\sigma_m$ such that $R'_m/C={\hat{R}_m}^{\sigma_m},$ we have $$\sigma_m=\frac{\log R'_m/C}{\log \hat{R}_m}=\sigma-\frac{\sigma m^3+m^2+\sigma+\log C}{\log r_m+m^3+1}.$$ Therefore, we have $|f(a)|\leq M(r'_m,f)$ and in view of (\ref{equ3.7}) and (\ref{equ3.9+}), we have $$|f(b)|\geq M(R'_m,f)^{s_m}\geq\exp (s_m\tau_m T(R'_m/C,f))$$ \begin{equation}\label{equ3.9}= \exp(s_m\tau_mT({\hat{R}_m}^{\sigma_m},f))\geq \exp(s_m\sigma_m\tau_mT(\hat{R}_m,f)),\end{equation} where $\tau_m=1-\frac{\log\log (R'_m/C)}{\log (R'_m/C)}$. Since $r'_m>r_m>r_0^{\sigma^m}$ with $r_0>e$, we have $$\sigma_m>\sigma-\frac{(C+\sigma) m^3}{\log r_m}>\sigma-\frac{(C+\sigma)m^3}{\sigma^m\log r_0}$$ and $s_m\sigma_m\tau_m\to\sigma>1 (m\to\infty)$. In view of Lemma \ref{lem5} with $R'=r_m'(m^2+1)$, $r'=r'_m$, $r=r_m$ and $R=\hat{R}_m$, we have \begin{eqnarray*}\log M(r'_m,f)&\leq& \left(\frac{m^2+2}{m^2} +\frac{\log\frac{r'_m(m^2+1)}{r'_m-r_m}}{\log\frac{\hat{R}_m}{r_m}}\right)T(\hat{R}_m,f)\\ &= &\left(\frac{m^2+2}{m^2}+ \frac{\log\frac{e}{e-1}(m^2+1)}{m^3+1}\right)T(\hat{R}_m,f)\\ &\leq &\left(1+\frac{t}{m^2}\right)T(\hat{R}_m,f), \end{eqnarray*} where $t$ is an absolute constant. Set $t_m=\left(1+\frac{t}{m^2}\right)^{-1}$. Thus combining (\ref{equ3.9}) together with the above inequality yields \begin{equation}\label{equ3.10+}|f(b)|\geq \exp(s_m\sigma_m\tau_m T(\hat{R}_m,f)) \geq M(r'_m,f)^{t_ms_m\sigma_m\tau_m}\geq |f(a)|^{t_ms_m\sigma_m\tau_m}.\end{equation} Set $r'_{m+1}=|f(a)|$ and $R'_{m+1}=|f(b)|$. Then we have $R'_{m+1}\geq (r'_{m+1})^{t_ms_m\sigma_m\tau_m}$. Set $R_{m+1}=e^{(m+1)^2}R'_{m+1}$ and $r_{m+1}=r'_{m+1}/e.$ Now let us estimate $d_{U_m}(a,b)$ with $U_m=f^m(U)$. Set $A'_m=A(r_m^\alpha,R_m^\beta)$. Since $$\sin\left(\pi\frac{\log\frac{R_m^\beta}{r'_m}}{{\rm mod}(A'_m)}\right)=\sin\left(\pi\frac{(\beta-1/\sigma)\log R_m-1}{(\beta-\alpha/\sigma)\log R_m}\right)$$ $$\to\sin\left(\pi\frac{\sigma\beta-1}{\sigma\beta-\alpha}\right) (m\to\infty)$$ and $$\sin\left(\pi\frac{\log\frac{R_m^\beta}{R'_m}}{{\rm mod}(A'_m)}\right)=\sin\left(\pi\frac{(\beta-1)\log R_m+m^2}{(\beta-\alpha/\sigma)\log R_m}\right)$$ $$\to\sin\left(\pi\frac{\sigma(\beta-1)}{\sigma\beta-\alpha}\right) (m\to\infty),$$ in view of (\ref{2.1+}) we have $$\lambda_{A'_m}(z)\leq \frac{K\pi}{{\rm mod}(A'_m)}\frac{1}{|z|},\ r'_m\leq |z|\leq R'_m,$$ where $K$ is a constant with $1/K<\min\left\{\sin\left(\pi\frac{\sigma\beta-1}{\sigma\beta-\alpha}\right), \sin\left(\pi\frac{\sigma(\beta-1)}{\sigma\beta-\alpha}\right)\right\}$ so that \begin{eqnarray*}\int_{r'_m}^{R'_m}\lambda_{A'_m}(z)|{\rm d}z|&\leq &\frac{K\pi}{{\rm mod}(A'_m)}\int_{r'_m}^{R'_m}\frac{{\rm d}t}{t}\\ &=&\frac{K\pi}{{\rm mod}(A'_m)}\log\frac{R'_m}{r'_m}\\ &=&\frac{K\pi}{(\beta-\alpha/\sigma)\log R_m}((1-1/\sigma)\log R_m-m^2-1)\\ & \to &\frac{K\pi(\sigma-1)}{\sigma\beta-\alpha} (m\to\infty)\end{eqnarray*} and $$\int_0^\pi\lambda_{A'_m}(R'_me^{i\theta})R'_m{\rm d}\theta\leq \frac{K\pi^2}{{\rm mod}(A'_m)}\to 0 (m\to\infty).$$ Therefore, for sufficiently large $m$ and $\sigma>1$ close to $1$, we have $$\delta=d_{U_m}(a,b)\leq d_{A'_m}(a,b)<\frac{1}{6}.$$ In view of the above inequality, (\ref{equ3.10+}) and (\ref{equ3.9}), we have \begin{eqnarray*}e^{-\kappa}\left(\frac{|f(b)|}{|f(a)|}\right)^{1/\delta-1}&\geq& e^{-\kappa}\left(|f(b)|^{1-1/(t_ms_m\sigma_m\tau_m)}\right)^{5}\\ &\geq & \exp\left[5\left(1-\frac{1}{t_ms_m\sigma_m\tau_m}\right)s_m\sigma_m\tau_m T(\hat{R}_m,f)-\kappa\right]\\ &>&\exp[3(\sigma-1) T(\hat{R}_m,f)]>e^{(m+1)^2}. \end{eqnarray*} Thus, for $|f(a)|\leq |f(\hat{z})|\leq |f(b)|$ with $\hat{z}\in U_m$ we have $$e^\kappa\left(\frac{|f(a)|}{|f(b)|}\right)^{1/\delta}|f(\hat{z})|\leq e^\kappa\left(\frac{|f(a)|}{|f(b)|}\right)^{1/\delta-1}r'_{m+1}<r'_{m+1}/e=r_{m+1};$$ and $$e^{-\kappa}\left(\frac{|f(b)|}{|f(a)|}\right)^{1/\delta}|f(\hat{z})|\geq e^{-\kappa}\left(\frac{|f(b)|}{|f(a)|}\right)^{1/\delta-1}R'_{m+1} > e^{(m+1)^2}R'_{m+1}=R_{m+1}.$$ Since $d_{U_m}(a,b)<\frac{1}{6}$, in view of Lemma \ref{lem2.2} we have $$U_{m+1}=f(U_m)\supset A(r_{m+1},R_{m+1})\supset \overline{A}(r'_{m+1},R'_{m+1}).$$ Thus by noting that $d_{U_{m+1}}(f(a),f(b))\leq d_{U_m}(a,b)<\frac{1}{6}$ ($\beta$ and $\alpha$ are just used to imply the inequality), $|f(a)|=r'_{m+1}$ and $|f(b)|=R'_{m+1}$ , we can repeat the above step and obtain that \begin{equation}\label{equ}|f^n(b)|\geq |f^n(a)|^{\prod_{k=0}^{n-1}s_{k+m}t_{k+m}\sigma_{k+m}\tau_{k+m}}.\end{equation} For sufficiently large $m$, we can require, for $n\geq 1$, $$\prod_{k=0}^{n-1}s_{k+m}t_{k+m}\sigma_{k+m}\tau_{k+m}>\frac{\sigma+1}{2}>1.$$ Take a point $c\in U$. Define $$h_n(z)=\frac{\log|f^n(z)|}{\log|f^n(c)|},\ \forall\ z\in U.$$ Since $U$ is wandering and escaping, we can assume that $|f^n(z)|>1$ on $U$ and with (\ref{equ1}) we have that $h_n(z)$ is harmonic and positive on $U$. In view of (\ref{equ1}) or by Harnack's inequality, the family $\{h_n\}$ of harmonic functions is locally normal on $U$ and hence $$\overline{h}(z):=\limsup_{n\to\infty} h_n(z),\ \forall\ z\in U$$ exists and $\overline{h}$ is harmonic and positive on $U$. In view of (\ref{equ}), we have $$h_n(b)\geq \frac{\sigma+1}{2}h_n(a),\ \overline{h}(b)\geq\frac{\sigma+1}{2}\overline{h}(a)>\overline{h}(a).$$ Therefore, $\overline{h}(z)$ is not a constant on $U$. The same argument implies that $$\underline{h}(z):=\liminf_{n\to\infty} h_n(z),\ \forall\ z\in U$$ exists and $\underline{h}$ is a non-constant, harmonic and positive function on $U$. Suppose that $\overline{h}(z_0)>\underline{h}(z_0)$ for some $z_0\in U$. Without any loss of generalities suppose that $\overline{h}(z_0)>\overline{h}(c)=1$. Take a real number $\eta$ with $\max\{1,\underline{h}(z_0)\}<\eta<\overline{h}(z_0).$ Since $\overline{h}(z)$ is not a constant, we can find $z_1$ and $z_2$ such that $\overline{h}(z_1)<1=\overline{h}(c)<\overline{h}(z_0)<\overline{h}(z_2)$. In view of Lemma \ref{lem2.2}, for some sufficiently large $m$, we have $$f^m(U)\supset A\left(|f^m(c)|^\alpha,|f^m(c)|^\beta\right),$$ where $\overline{h}(z_1)<\alpha<1$ and $1<\overline{h}(z_0)<\beta<\overline{h}(z_2).$ From the argument of above paragraph we can take $a=f^m(c)$ and $b=f^m(z_0)$ such that $$|f^{n+m}(z_0)|>|f^{n+m}(c)|^\eta,\ \forall\ n\in \mathbb{N}.$$ This implies that $\underline{h}(z_0)\geq \eta$. A contradiction is derived. We have proved that $\overline{h}(z)=\underline{h}(z)$ on $U$, that is to say, $$h(z)=\lim_{n\to\infty}\frac{\log|f^n(z)|}{\log|f^n(c)|}$$ exists on $U$. Set $$H(z):=\lim_{n\to\infty}\frac{\log|f^n(z)|}{\log|f^n(z_0)}=\frac{h(z)}{h(z_0)}.$$ $H$ is a non-constant, harmonic and positive function on $U$. Thus we can find two points $z_1$ and $z_2$ in $V$ and $0<\alpha<1$ such that $H(z_1)<1-\alpha<1<1+\alpha<H(z_2)$. For a sufficiently large $m$ we have $d_{f^m(V)}(f^m(z_1),f^m(z_2))<\frac{1}{6}$ and hence, in view of Lemma \ref{lem2.2}, for $n\geq m$ $$f^n(V)\supset A(|f^n(z_1)|,|f^n(z_2)|)\supset A(|f^n(z_0)|^{1-\alpha},|f^n(z_0)|^{1+\alpha}).$$ Thus we have (\ref{equ3.6}) for sufficiently large $m$ and $f^m(V)$ instead. In view of Lemma \ref{lem6}, for all sufficiently large $n$ and some $\tau>1$, we obtain $A_n=A(r_n,R_n)\subseteq f^n(V)$ with $R_n\geq r_n^\tau\to\infty (n\to\infty)$ such that $A_{n+1}\subset f(A_n)$. We complete the proof of Theorem 2. \qed \ {\it Proof of Theorem 3.} In view of Theorem 2, there exist a sufficiently large $m$ and a sufficiently large $r_m$ such that for $n\geq m$ and $r_{n+1}>R_n\geq r_n^\sigma$ with $\sigma>1$ we have $$f^n(U)\supset A(r_n^\alpha, R_n^\beta),\ 0<\alpha<1,\ 1<\beta.$$ From (\ref{equ1.6+}) and (\ref{equ1.5}), in view of Lemma \ref{lemxx}, Lemma \ref{lem4} and Lemma \ref{lem5} in turn, we can show $$M(R_m,g)\geq \hat{m}(R_m,g)>M(r_m,g)\geq \hat{m}(r_m,g)$$ and in view of the maximal principle, we have \begin{equation}\label{equ3.12}g(A(r_m,R_m))\subseteq A(\hat{m}(r_m,g), M(R_m,g)).\end{equation} Set $u(z)=f(z)-g(z)$ and $s_m=\exp\left(-\frac{\pi^2}{2m^2}\right)$. For sufficiently large $m$, we have $s_m>\max\{1/2,\delta\}$. In view of Lemma \ref{lemxx} for $r=e^{-m^2}r_m$, $\rho=r_m$ and $R=R_m$ and by noting that $\log(1-x)>-2x$ for $0<x<\frac{1}{2}$, we have $$\hat{m}(r_m,g)\geq \hat{m}(r_m,f)-M(r_m,u)\geq M(r_m,f)^{s_m}-M(r_m,u)$$ $$=\left(1-\frac{M(r_m,u)}{M(r_m,f)^{s_m}}\right)M(r_m,f)^{s_m}\geq M(r_m,f)^{s_m\gamma_m},$$ where $\gamma_m=1-\frac{4M(r_m,f)^{\delta-s_m}}{\log M(r_m,f)}>1-\frac{1}{m^2}$ and by noting that $\log (1+x)<x$ for $x>0$, we have $$M(R_m,g)\leq M(R_m,f)+M(R_m,u)$$$$=M(R_m,f)\left(1+\frac{M(R_m,u)}{M(R_m,f)}\right)\leq M(R_m,f)^{\tau_m},$$ where $\tau_m=1+\frac{1}{M(R_m,f)^{1-\delta}\log M(R_m,f)}<1+\frac{1}{m^2}$ for sufficiently large $m$. Thus it follows from (\ref{equ3.12}) that \begin{equation}\label{equ3.12+}g(A(r_m,R_m))\subseteq A(M(r_m,f)^{s_m\gamma_m},M(R_m,f)^{\tau_m}).\end{equation} On the other hand, we have \begin{equation}\label{equ3.13}f^{m+1}(U)\supset f(A(r_m^\alpha, R_m^\beta))\supset A(M(r_m^\alpha,f),\hat{m}(R_m^\beta e^{-m^2},f)).\end{equation} In view of Lemma \ref{lemxx} and (\ref{equ1.5}), we have $$\hat{m}(R_m^\beta e^{-m^2},f)\geq M(R_m^\beta e^{-m^2},f)^{s_m}\geq \exp(\sigma_mt_m T(R_m^\beta e^{-m^2}/C,f)),$$ for $t_m=1-\frac{\log\log (R_m^\beta e^{-m^2}/C)}{\log (R_m^\beta e^{-m^2}/C)}>1-\frac{1}{m^2}$ for sufficiently large $m$, and in view of Lemma \ref{lem5}, we can show that $$\tau_m\log M(R_m,f)<s_mt_m T(R_m^\beta e^{-m^2}/C,f)$$ and in view of (\ref{equ1.5}) and Lemma \ref{lem4}, we have $$s_m\gamma_m \log M(r_m,f)>\log M(r_m^\alpha,f).$$ Thus $M(R_m^\beta e^{-m^2},f)^{s_m}>M(r_m^\alpha,f)$ and from (\ref{equ3.13}) we can deduce \begin{equation}\label{equ3.14}f^{m+1}(U)\supset A(M(r_m^\alpha,f),M(R_m^\beta e^{-m^2},f)^{s_m}).\end{equation} Now we set $\hat{r}_1=M(r_m^\alpha,f)^{s_m\gamma_m/\alpha}$ and $\hat{R}_1=M(R_m,f)^{\tau_m}$ so that we have $M(r_m,f)^{s_m\gamma_m}\geq \hat{r}_1$. Combining (\ref{equ3.12+}) and (\ref{equ3.14}) yields $$f^{m+1}(U)\supset A(\hat{r}_1^{\alpha\eta_m},\hat{R}_1^{\beta_m})\supset A(\hat{r}_1,\hat{R}_1)\supset g(A(r_m,R_m))$$ with $\eta_m=\frac{1}{s_m\gamma_m}>1$ and $\beta_m=\frac{s_m}{\tau_m}\frac{\log M(R_m^\beta e^{-m^2},f)}{\log M(R_m,f)}\to\beta\ (m\to\infty)$. For sufficiently large $m$, we can require that $0<\alpha\eta_m<\frac{\alpha+1}{2}<1$ and $1<\frac{\beta+1}{2}<\beta_m$. By the same step as above, we have $$f^{m+2}(U)\supset A(\hat{r}_2^{\alpha\eta_m\eta_{m+1}},\hat{R}_2^{\beta_{m+1}})\supset A(\hat{r}_2,\hat{R}_2)\supset g^2(A(r_m,R_m))$$ with $\hat{r}_2=M(\hat{r}_1^{\alpha\eta_m},f)^{1/(\eta_{m+1}\eta_m\alpha)}$, $\hat{R}_2=M(\hat{R}_1,f)^{\tau_{m+1}}$, $0<\alpha\eta_m\eta_{m+1}<\frac{\alpha+1}{2}<1$ and $1<\frac{\beta+1}{2}<\beta_{m+1}$. Inductively, we have $$f^{m+n}(U)\supset g^n(A(r_m,R_m)).$$ Thus $A(r_m,R_m)$ is in an escaping Fatou component $W$ of $g$. Let us notice that in $A(r_m,R_m)$ we have \begin{eqnarray*}\log M(Cr,g)&\geq&\log(M(Cr,f)-M(Cr,u))\\ &= &\log M(Cr,f)+\log\left(1-\frac{M(Cr,u)}{M(Cr,f)}\right)\\ &\geq&\left(1-\frac{2\log\log r}{\log r}\right)T(r,f)\end{eqnarray*} and for $r_m<r+1<r'<R'<R\leq R_m$ we have \begin{eqnarray*}\log M(r',g)&\leq &\log M(r',f)+\log\left(1+\frac{M(r'u)}{M(r',f)}\right)\\ &\leq &\left(\frac{R'+r'}{R'-r'}+ \left(\log\frac{R}{r}\right)^{-1}\log \frac{R'}{r'-r}\right) T(R,f)+1. \end{eqnarray*} Thus we can repeat the steps in the proof of Theorem \ref{thm6} and show the results of Theorem \ref{thm6} hold for $g$ in $W$. \qed We make a remark on (\ref{equ1.6+}). From the proof of Theorem \ref{thm3} we see that in order that Theorem \ref{thm3} holds for $g$, in fact, we only need to require (\ref{equ1.6+}) holds in a sequence of annuli $A(r_n,r_n^{\sigma_n})$ instead of $f^n(U)$ as long as $A(r_n,r_n^{\sigma_n})\subset f^n(U)$ for $\forall\ n\geq m$ with $m$ being large enough and $f(A(r_n,r_n^{\sigma_n}))\subset A(r_{n+1},r_{n+1}^{\sigma_{n+1}})$ with $1<\sigma\leq \sigma_n$. \ {\it Proof of Theorem 4.}\ With the help of Theorem \ref{thm3} we are going to find a meromorphic function $f$ with $\delta(\infty,f)=0$ which has an escaping Fatou wandering domain $U$ such that the results of Theorem \ref{thm6} hold for $f$ in $U$. In \cite{BRS}, Bergweiler, Rippon and Stallard proved the results of Theorem \ref{thm6} for entire functions in their multiply connected Fatou components. The first entire function with multiply connected Fatou component is due to I. N. Baker \cite{Baker1}. The multiply connected wandering domains which have uniformly perfect boundary or non-uniformly perfect boundary were found in \cite{BZ}. For example, in Theorem 1.3 of \cite{BZ}, an entire function of zero order is constructed such that $$f(A((1+\varepsilon_k)r_k,(1-\varepsilon_k)r_{k+1}))\subset A((1+\varepsilon_{k+1})r_{k+1},(1-\varepsilon_{k+1})r_{k+2})$$ for a sequence $\{r_k\}$ of positive numbers with $r_{k+1}>2r_k^2$ and a sequence $\{\varepsilon_k\}$ of positive numbers tending to $0$ as $k\to\infty$. And the Fatou component $U$ containing $A((1+\varepsilon_k)r_k,(1-\varepsilon_k)r_{k+1})$ may have uniformly perfect boundaries by suitably choosing $\{r_k\}$. Now we put $$g(z)=f(z)+\sum_{n=1}^\infty\frac{1}{2^nm_n}\sum_{k=1}^{m_n}\frac{\varepsilon_n}{z-z_{k,n}},$$ where $m_n=[r_{n+1}]+1$ and $[r_{n+1}]$ is the maximal integer not exceeding $r_{n+1}$, $z_{k,n}=r_ne^{i\frac{2k\pi}{m_n}}$. It is clear that $g$ is a meromorphic function. For $|z|=r$ with $(1+\varepsilon_k)r_k<r<(1-\varepsilon_k)r_{k+1}$, we have \begin{eqnarray*}|f(z)-g(z)|&\leq&\sum_{n=1}^\infty\frac{1}{2^nm_n}\sum_{j=1}^{m_n}\frac{\varepsilon_n}{|z-z_{j,n}|}\\ &\leq&\sum_{\begin{array}{c}n=1\\ n\not=k,k+1\end{array}}^\infty\frac{1}{2^n}\frac{\varepsilon_n}{|r-r_n|}\\ &\ &+\frac{1}{2^k}\frac{\varepsilon_k}{r-r_k}+ \frac{1}{2^{k+1}}\frac{\varepsilon_{k+1}}{r_{k+1}-r}\\ &<&\sum_{n=1}^\infty\frac{1}{2^n}=1, \end{eqnarray*} and this implies (\ref{equ1.6+}) for $|z|=r$ with $(1+\varepsilon_k)r_k<r<(1-\varepsilon_k)r_{k+1}$. In view of Theorem \ref{thm3} and from the remark after the proof of Theorem \ref{thm3}, there exists an escaping wandering domain $W$ of $g$ such that the results of Theorem \ref{thm6} hold for $g$ and $W$. Next we calculate the deficiency $\delta(\infty,g)$ of Nevanlinna of $g$. For $er_k<r<(1-\varepsilon_k)r_{k+1}$, we have $m(r,g)\leq m(r,f)+\log 2$ and $$N(r,g)=\int_0^r\frac{n(t,g)}{t}{\rm d}t\geq \int_{r_k}^r\frac{m_k}{t}{\rm d}t\geq r_{k+1}\geq r.$$ Then as $r\in\cup_{k=m}^\infty A(er_k,(1-\varepsilon_k)r_{k+1})\to\infty$, we have $$\frac{m(r,g)}{T(r,g)}\leq\frac{m(r,g)}{N(r,g)}\leq\frac{m(r,f)+\log 2}{r}\to 0,$$ by noting that $f$ is of zero order. This implies that $$\delta(\infty,g)=\liminf_{r\to\infty}\frac{m(r,g)}{T(r,g)}=0.$$ Then $g$ is the desired meromorphic function of Theorem \ref{thm5}. \qed But we do not know if $W$ has uniformly perfect boundary. Therefore, we beg the following \ {\sl {\bf Question $\mathcal{B}$:}\ Are there any meromorphic function with zero Nevanlinna deficiency at poles which has a multiply connected escaping wandering domain with uniformly perfect boundary?} \ Perhaps the following approach would be possible to solve Question $\mathcal{B}$. We try to control the changes of critical values as an entire function that has a multiply connected escaping wandering domain with uniformly perfect boundary is small changed to a meromorphic function with zero Nevanlinna deficiency at poles and then in view of Theorem 3 we show the meromorphic function also has a multiply connected escaping wandering domain with uniformly perfect boundary. \section{proofs of Theorems 5-7} {\it Proof of Theorem 5.}\ Put $$K=\prod_{k=1}^\infty\left(1+\frac{4}{(k+1)^2}\right)^2,\ K_n=\frac{K}{\prod_{k=1}^{n}\left(1+\frac{4}{(k+1)^2}\right)}>\sqrt{K}>1,\ \forall\ n\geq 1.$$ Since $f$ is transcendental, we have $$\frac{T(r,f)}{\log r}\to\infty (r\to\infty)$$ and so we can take a positive number $R$ such that $\forall\ r\geq R> \max\{1,r_0\}$, where $r_0$ is the one appeared in Lemma \ref{lem4}, $\hat{T}(r,f)=\exp T(r,f)\geq 9r^2$ and \begin{equation}\label{equ4.1+}\log M_n(R,f)>2^n\log R>\frac{2(n+1)^2\log (n+2)}{K_n}, \forall\ n\geq 2.\end{equation} We claim that $\forall\ n\geq 2$, we have \begin{equation}\label{equ4.1} \hat{T}_n(R^K,f)\geq (n+1)^2M_{n-1}(R,f)^{K_{n-1}}. \end{equation} We show the Claim by induction. It is well-known from Poisson-Jensen formula that for arbitrary real numbers $R$ and $r$ with $R>r>0$, we have $$T(r,f)\leq \log M(r,f)\leq\frac{R+r}{R-r}T(R,f).$$ Note that $$\frac{\hat{T}(R^K,f)-R^K}{\hat{T}(R^K,f)+R^K}>1-\frac{2R^K}{\hat{T}(R^K,f)}>1-\frac{1}{2^2}$$ and $$\left(1+\frac{4}{2^2}\right)\left(1-\frac{1}{2^2}\right)>1+\frac{1}{2^2},\ M(R,f)^{K_1/2^2}>3^2.$$ For $n=2$, we have \begin{eqnarray*}\hat{T}_2(R^K,f)&\geq &M(R^K,f)^{\frac{\hat{T}(R^K,f)-R^K}{\hat{T}(R^K,f)+R^K}}\\ &\geq &M(R^K,f)^{1-\frac{1}{2^2}}\\ &\geq& M(R,f)^{K_1(1+1/2^2)}\\ &\geq &3^2M(R,f)^{K_1}. \end{eqnarray*} We assume inductively that (\ref{equ4.1}) holds for $n$. Consider the case of $n+1$ for (\ref{equ4.1}). Note that \begin{eqnarray*} \frac{\hat{T}_n(R^K,f)-M_{n-1}(R,f)^{K_{n-1}}}{\hat{T}_n(R^K,f)+M_{n-1}(R,f)^{K_{n-1}}} &\geq &\frac{(n+1)^2-1}{(n+1)^2+1}=1-\frac{2}{(n+1)^2+1} \end{eqnarray*} and $$K_{n-1}\left(1-\frac{2}{(n+1)^2+1}\right)=K_n\left(1+\frac{4}{(n+1)^2}\right) \left(1-\frac{2}{(n+1)^2+1}\right)$$ $$>K_n+\frac{K_n}{(n+1)^2}.$$ Then in view of (\ref{equ4.1}) and (\ref{equ4.1+}) we have \begin{eqnarray*} \hat{T}_{n+1}(R^K,f)&\geq &M(M_{n-1}(R,f)^{K_{n-1}},f)^{\frac{\hat{T}_n(R^K,f)-M_{n-1}(R,f)^{K_{n-1}}}{\hat{T}_n(R^K,f)+M_{n-1}(R,f)^{K_{n-1}}}}\\ &>&M_{n}(R,f)^{K_{n-1}\left(1-\frac{2}{(n+1)^2+1}\right)}\\ &>&(n+2)^2M_{n}(R,f)^{K_{n}}. \end{eqnarray*} We have shown the Claim (\ref{equ4.1}). For any point $z\in M(f)$ in whose definition we choose $R^K$ instead of $R$, we have for some $L\in\mathbb{N}$, $$|f^{n+1+L}(z)|\geq \hat{T}_{n+1}(R^K,f),\ \forall\ n\in\mathbb{N}.$$ In view of (\ref{equ4.1}), we deduce $$|f^{n+1+L}(z)|\geq M_{n}(R,f),\ \forall\ n\in\mathbb{N},$$ and this implies $z\in A(f)$. It follows that $M(f)\subseteq A(f)$. On the other hand, it is clear that $M_n(R,f)\geq \hat{T}_n(R,f)$ and thus for $z\in A(f)$, it follows from $|f^{n+L}(z)|\geq M_n(R,f)$ for some $L\in \mathbb{N}$ that $|f^{n+L}(z)|\geq \hat{T}_n(R,f)$ so that $z\in M(f)$. We show that $A(f)\subseteq M(f)$. So far, we have shown that $M(f)=A(f)$.\qed \ Let us make remarks. Let $f$ be a transcendental entire function. It was shown in \cite{RipponStallard3} that $$A(f)=\{z\in\mathbb{C}:\ {\rm there\ exists}\ L\in\mathbb{N}\ {\rm such\ that}\ |f^{n+L}(z)|\geq M(R,f^n),\ {\rm for}\ n\in\mathbb{N}\},$$ which is the definition of $A(f)$ introduced in \cite{BH}. Since for large $R$, we have $$T(2R^3, f^n)\geq\frac{1}{3}\log M(R^3,f^n)\geq \log M(R,f^n)\geq T(R,f^n),$$ we have $$M(f)=\{z\in\mathbb{C}:\ {\rm there\ exists}\ L\in\mathbb{N}\ {\rm such\ that}\ |f^{n+L}(z)|\geq \hat{T}(R,f^n),\ {\rm for}\ n\in\mathbb{N}\}.$$ It is clear that $T(R,f^n)$ is not available for a meromorphic function $f$ with poles. Furthermore, it was shown in \cite{RipponStallard3} that the fast escaping set $A(f)$ is invariant even if $M(r,f)$ is replaced by $\mu(r)=\varepsilon M(r, f)$ for a fixed $0<\varepsilon <1$ and in \cite{S} by $\mu(r)=\varepsilon(r)M(r,f)$ with somewhat more involved condition, $0<\varepsilon(r)<1$ and $\varepsilon(r)r\to\infty (r\to\infty)$. Actually, we can use $\mu(r)=M(r,f)^{1-\frac{1}{\log_k r}}$ in the place of $M(r,f)$ in $A(f)$ to ensure the invariance of $A(f)$, where $\log_k r$ is the $k$th iterate of $\log r$ with respect to $r$. If $\frac{\log M(r,f)}{\log r\log_k r}>2$, then $$rM(r,f)^{-\frac{1}{\log_k r}}\to 0 (r\to\infty).$$ In \cite{RS3}, Rippon and Stallard investigated the following sets: $$Q_\varepsilon(f)=\{z:\ \text{there\ exists\ }L\in\mathbb{N}\ \text{such\ that\ }|f^{n+L}(z)|\geq\mu_\varepsilon^n(R),\ \forall\ n\in\mathbb{N}\}$$ for $0<\varepsilon <1$ and $\mu_\varepsilon(r)=M(r,f)^\varepsilon$. And they showed that $Q_\varepsilon(f)=A(f)$ if and only if $f$ is so-called $\varepsilon$-regular and for $f\in \mathcal{B}$ (Eremenko-Lyubich class $\mathcal{B}$ which consists of entire functions with bounded singular value set), $A(f)=\bigcup_{\varepsilon>0}Q_\varepsilon(f)$. Of course, we may also take into account the fast escaping set $M(f)$ of meromorphic functions in the way mentioned above. \ For the proof of Theorem \ref{thm6+} we need the following lemma; see Lemma 1 of \cite{RipponStallard}. \begin{lemma}\label{lem2.1}\ Let $E_n, n\geq 0,$ be a sequence of compact sets in $\mathbb{C}$ and $f:\mathbb{C}\to\hat{\mathbb{C}}$ be a continuous function such that $E_{n+1}\subset f(E_n),\ \text{for}\ n\geq 0.$ Then there exists $\zeta$ such that $f^n(\zeta)\in E_n$ for $n\geq 0$. \end{lemma} {\it Proof of Theorem \ref{thm6+}.}\ For simplicity, we will here complete our proof for $C=1$ and $c=1$. The proof of general case needs just a little cumbersome calculation. Put $S=\sqrt[3]{D}>e$. In view of (\ref{equ1.5}), we have \begin{eqnarray*}\log M(Sr,f)&\geq& \left(1-\frac{1}{\log Sr}\right)T(Sr,f)\\ &\geq& \left(1-\frac{1}{\log Sr}\right)\left(1+\frac{\log S}{\log r}\right)T(r,f)\\ &\geq& T(r,f)\end{eqnarray*} and $$\frac{1}{2\pi}\int_0^{2\pi}\log^+|f(Sre^{i\theta})|{\rm d}\theta=m(Sr,f)\leq T(Sr,f).$$ Then there exists a point $z_2$ with $|z_2|=Sr$ such that $$T(r,f)\leq\log|f(z_2)|\leq T(Sr,f).$$ It follows from (\ref{equ1.5}) that there is a pint $z_1$ with $|z_1|=S^2r$ such that $$\log|f(z_1)|\geq \left(1-\frac{1}{\log S^2r}\right)T(S^2r,f).$$ In view of (\ref{2.3}) in Lemma \ref{lem3} with $\tau=\frac{2}{3}$ and $\sigma=\frac{1}{3}$, we have $$\frac{\pi}{3}\leq d_A(z_1,z_2)\leq \frac{\sqrt{3}\pi(\pi+1)}{3}<7.52$$ for $A=A(r,Dr)$. Since, in view of (\ref{equ1.10}), we have $$\left(1-\frac{1}{\log S^2r}\right)T(S^2r,f)\geq \left(1-\frac{1}{\log S^2r}\right) \left(1+\frac{\log S}{\log Sr}\right)T(Sr,f)$$ $$=T(Sr,f)+\frac{\log(S/e)}{\log Sr}T(Sr,f)> T(Sr,f)+\kappa\delta+\delta\log D$$ with $\delta=d_A(z_1,z_2)$, we have $$|f(z_1)|> e^{\kappa\delta}D^\delta|f(z_2)|,\ {\rm i.e.},\ e^{-\kappa}\left(\frac{|f(z_1)|}{|f(z_2)|}\right)^{1/\delta}> D.$$ In view of Lemma \ref{lem2.2}, there exists a point $\hat{z}\in A(r,Dr)$ with $|f(z_2)|\leq|f(\hat{z})|\leq |f(z_1)|$ such that $$f(A(r,Dr))\supset \overline{A}(D^{-1}|f(\hat{z})|,D|f(\hat{z})|).$$ Now we take $$r_1=|f(\hat{z})|\geq|f(z_2)|\geq e^{T(r,f)}=\hat{T}(r,f)$$ and so $$f(A(r,Dr))\supset \overline{A}(r_1,Dr_1).$$ Inductively we get a sequence of positive numbers $\{r_n\}$ with $r_n\geq\hat{T}_n(r,f)$ such that $f(A(r_n,Dr_n))\supset \overline{A}(r_{n+1},Dr_{n+1})$. In view of Lemma \ref{lem2.1}, we can find a point $\zeta\in A(r,Dr)$ such that $|f^n(\zeta)|\geq\hat{T}_n(r,f)$. That is to say, $\zeta\in M(f)$ and so $\overline{U}\subset M(f).$ \qed \ For the proof of Theorem \ref{thm8}, we need the following lemma, which is Main Lemma of \cite{EL}. \begin{lemma}\label{lem8}\ Let $\{G_k\}_{k=1}^\infty$ be a sequence of compact subsets in $\mathbb{C}$ such that (i)\ $\mathbb{C}\setminus G_k$ is connected for every $k$; (ii)\ $G_k\cap G_m=\emptyset$ for $k\not=m$; (iii)\ ${\rm dist}(0, G_k)\to\infty (k\to\infty)$. \noindent Then for any sequence of points $\{z_k\}$ with $z_k\in G_k$, any sequence of positive numbers $\{\varepsilon_k\}$ and any sequence of complex functions $\{\phi_k\}$ with $\phi_k$ being analytic in $G_k$ for every $k$, there exists an entire function $f$ satisfying, for every $k$, $$|f(z)-\phi_k(z)|<\varepsilon_k,\ \forall\ z\in G_k;$$ $$f(z_k)=\phi_k(z_k),\ f'(z_k)=\phi'_k(z_k).$$ \end{lemma} The same method as in the proof of Main Lemma of \cite{EL} can deduce that for a sequence of compact sets $\{G_k\}_{k=1}^\infty$ only satisfying (ii) and (iii), there exists a meromorphic function $f(z)$ such that the results stated in Lemma \ref{lem8} hold. This will apply to construction of desired meromorphic function of Theorem \ref{thm8}. \ {\it Proof of Theorem \ref{thm8}.}\ Set $$G_n=\overline{B}\left(a_n,\frac{1}{4}\alpha_n\right),\ H_n=\overline{B}\left(-a_n,\frac{1}{4}\alpha_n\right),$$ $$C_n=\left\{z:\ a_n+\frac{3}{8}\alpha_n\leq {\rm Re}z\leq a_n+\frac{5}{8}\alpha_n, |{\rm Im}z|\leq\beta_n\right\}$$ with $\alpha_n=\min\{a_n-a_{n-1},a_{n+1}-a_n\}$, $1<a_0<a_1$ and $0<\beta_n$ such that $\beta_n/(a_n-a_{n-1})\to\infty(n\to\infty)$, and $$\phi_n(z)=\frac{\alpha_{n+1}}{\alpha_n}(z-a_n)+a_{n+1}:G_n\to G_{n+1},$$$$ \varphi_n(z)=z+a_n+e^{a_n^\rho};$$ where when $\rho=\infty$, $e^{a_n^\rho}$ is replaced by $e^{e^{(\log a_n)^2}}$. We see that $G_n, H_n$ and $C_n$ don't intersect each other. In view of Lemma \ref{lem8}, there exists a transcendental entire function $f$ such that for every $n$, $$|f(z)-\phi_n(z)|<\varepsilon_n,\ \forall\ z\in G_n;$$ $$|f(z)-\varphi_n(z)|<\varepsilon_n,\ \forall\ z\in H_n;$$ $$f(a_n)=\phi_n(a_n)=a_{n+1},\ f'(a_n)=\frac{\alpha_{n+1}}{\alpha_n};$$ $$f(-a_n)=\varphi_n(-a_n)=e^{a_n^\rho},\ f'(-a_n)=1;$$ $$|f(z)|<\frac{1}{2},\ \forall\ z\in C_n\cup B(0,1), f(0)=0,\ f'(0)=0.$$ Then we have $$M(a_n,f)\geq|f(-a_n)|=e^{a_n^\rho},\ \ \liminf\limits_{n\to\infty}\frac{\log\log M(a_n,f)}{\log a_n}\geq\rho.$$ That is to say, the order of $f$ is at least $\rho$. According to the construction of $f$ and the behavior of $f$ on $G_n$, by the suitable choice of $\{\varepsilon_n\}$, we can show that $B\left(a_1,\frac{1}{5}\alpha_1\right)$ is in a Fatou component $U$ of $f$ and $$f^n\left(B\left(a_1,\frac{1}{5}\alpha_1\right)\right)\subset U_n.$$ Since $f^n(a_1)=a_{n+1}\to\infty (n\to\infty)$, $U$ is escaping. And $C_m\cap\cup_{n=0}^\infty U_n=\emptyset$ for every $m$. We want to prove that $U$ is not a Baker domain. Suppose that $U$ is a Baker domain with period $p$, i.e., $f^p(U)\subseteq U$. By the Principle of Hyperbolic Metric, we have, for $n\geq 0$, $$d_U(a_1,a_{p+1})\geq d_{f^n(U)}(f^n(a_1),f^n(a_{p+1}))\geq d_{U_n}(a_{n+1},a_{n+p+1}).$$ On the other hand, we want to estimate $d_{U_n}(a_{n+1},a_{n+p+1})$ from below. Since Baker domains of an entire function are simply connected and unbounded, so is $U_n$. By the Koebe $\frac{1}{4}$ Theorem, it follows that $$C_{U_n}=\min\{\lambda_{U_n}(z)\delta_{U_n}(z):\ \forall\ z\in U_n\}\geq\frac{1}{4}$$ where $\delta_{U_n}(z)$ is the Euclidean distance from $z$ to $\partial {U_n}$; see \cite{BP}. Hence we have \begin{eqnarray*}d_{U_n}(a_{n+1},a_{n+p+1})&=&\inf_{\gamma_n}\int_{\gamma_n}\lambda_{U_n}(z)|{\rm d}z|\\ &\geq& \frac{1}{4} \inf_{\gamma_n}\int_{\gamma_{n}}\frac{1}{\delta_{U_n}(z)}|{\rm d}z|\\ &\geq& \frac{1}{4}\int_0^{\beta_{n+1}}\frac{1}{a_{n+1}-a_{n}}{\rm d}t\\ &=&\frac{\beta_{n+1}}{4(a_{n+1}-a_{n})}\to\infty (n\to\infty),\end{eqnarray*} where the infimum is taken over all curves $\gamma_n$ connecting $a_{n+1}$ and $a_{n+p+1}$ in $U_n$. A contradiction is derived and hence we have shown that $U$ is an escaping wandering domain of $f$. Take a component $U_0$ of $f^{-1}(U)$ and a point $z_0\in U_0\cup f^{-1}(a_1)$. Then $f^n(z_0)=a_n$. \qed We omit the specific construction of a meromorphic function which has wandering domain $U$ such that $f^n(z)\sim a_n (n\to\infty)$ in $U$.
\section{Introduction} In recent years there has been a growing interest in atom-based techniques for the detection of microwave (MW) electric fields \cite{Sedlacek_2012,Fan_2015}, that allow for calibration free SI-traceable measurements \cite{Holloway_2017}\textcolor{black}{ achieving ultra-high sensitivity\cite{Jing_2020}}. Rydberg atoms have been identified as particularly suitable for such measurements of radio-frequency (RF) electric fields due to their high polarizabilities and large microwave (MW) transition dipole moments \cite{Gallagher_1988}. \textcolor{black}{Advances in \mbox{Rydberg} based field measurements have been accompanied by applications in atom-based communication technology.} The fundamental working principles of analog and digital communication, where a baseband signal is modulated onto an electromagnetic MW carrier wave, have recently been demonstrated in a range of Rydberg-based systems. Examples include amplitude modulation (AM) \cite{Deb_2018,Meyer_2018b,Song_2018,Song_2019,Holloway_2019b}, frequency modulation (FM) \cite{Holloway_2019c,Anderson_2020} and phase detection \cite{Simons_2019,Holloway2019c}, as well as multiple bands \cite{Holloway_2019c}, multiple channels \cite{Zou_2020}, and multiple species \cite{Holloway_2019b}. Common to these methods is the broad carrier frequency range from tens of MHz to \textcolor{black}{several THz} that can be covered by the numerous Rydberg states of a single atomic species.% Rydberg receivers generally rely on the phenomenon of electromagnetically induced transparency (EIT) \cite{Petrosyan_2011} in a three-level system, where a coupling laser field renders an otherwise opaque atomic medium transparent to a probe laser field due to quantum interference. \textcolor{black}{If the three-level atomic system is coupled to a fourth level via an RF transition, the Autler-Townes (AT) effect \cite{PhysRev.100.703} alters the transmission of a light field.} For an RF electric field, which is modulated with a signal, measuring the modulation of the transmitted light allows to directly retrieve the signal. In contrast to conventional receivers which rely on band-specific electronic components, Rydberg-based receivers benefit from a direct and real-time readout of information, and physical reconfiguration is not necessary when the carrier frequency is varied. Also, the received information is encoded in a light field, i.e., a laser beam, suitable for long-distance transport via a fiber-link. \begin{figure}[t] \centering \includegraphics[trim=0.0cm 0.0cm 0cm 0cm, clip=true,width=0.97\columnwidth]{figure1.eps} \caption{\textcolor{black}{Possible scenarios for increasing the atomic volume of a Rydberg receiver (top). (a) Counter-propagating setup of probe (red) and coupling beam (blue) with larger beam diameters. (b) Counter-propagating beam setup with stretched optical path lengths of probe and coupling beam. (c) Setup with several parallel probe beams and a single coupling beam passing through the probe beams under an angle $\theta >0$. } \label{fig0}} \end{figure} One of the most important figures of merit for a communication system is the channel capacity, which gives the amount of information that can be passed through a communication channel in a period of time without error. For a channel with a bandwidth (BW) its upper limit is defined by the Shannon-Hartley theorem \cite{Shannon_1948} as \begin{equation} C = \text{BW}\times \text{log}_2(1+\text{SNR}) \quad (\text{bits/s}). \label{SHT} \end{equation} The crucial parameter for a communication system is therefore the power signal-to-noise ratio (SNR) at a given bandwidth, which has to be maximised in order to attain the maximal channel capacity. \textcolor{black}{A common method for increasing the data transmission capability is to establish multiple channels using, e.g., multiple transmitter and receiver antennas. A particularly successful technique for fulfilling demands of high data throughput rates and overall capacity are multi-input-multi-output (MIMO) systems\cite{Barry_2004}, and are widely used in telecommunication. MIMO devices employ arrays of receivers which are responsive to multiple simultaneous and independent data streams from multiple transmitter antennas, exploiting multipath propagation. A building block in the context of MIMO technology is a single-input-multi-output (SIMO) arrangement, where the receiver diversity is increased, but the transmitter kept to a single antenna. This arrangement is formally equivalent to a single receiver with an increased SNR, and therefore a higher data capacity is achieved. }For $N$ receiver antennas the data capacity increases with \textcolor{black}{\cite{Gunasekaran2011} \begin{equation} C_A(N) = \text{BW}\times \text{log}_2(1+N\times\text{SNR}) . \label{SHT2} \end{equation}} In this paper we investigate the scalability of the data capacity of atomic radio receivers in a regime where the receivers are independent of one another and are nearly identical. This, as mentioned above, realises a stepping stone towards MIMO system, where independent and spatially isolated receivers are a necessity. As opposed to conventional antennas, Rydberg receivers can work in the electrically small regime \cite{Meyer_2018}. Therefore it is possible, in principle, to improve the data capacity by increasing the atomic density within the receiver volume. In a vapour cell environment, this usually means that one needs to increase the vapour pressure within the cell by heating it which introduces significantly larger Doppler width and collisional broadening of the transition. \textcolor{black}{Alternatively, the receiver volume can be expanded. This can, for example, be done by using larger beam diameters [see Fig.~\ref{fig0}(a)], but comes with the drawback of requiring higher coupling laser powers to maintain high coupling Rabi frequencies. Another option is to extend the optical path length of probe and coupling beam, see Fig.~\ref{fig0}(b). While this can initially increase the SNR, it also causes the background optical depth, which does not contribute to the signal, to rise, resulting in a drop of SNR. This can be counteracted by increasing the probe beam power to begin with, but the SNR will always \textcolor{black}{reach a limit} beyond a certain probe beam power for a given coupling laser power. The data capacity for the aforementioned configurations will vary greatly with the geometry of the setup, as the expanded atomic volumes spatially adjoin the original volume and are not necessarily independent of each other, and therefore do not constitute independent receivers. } \textcolor{black}{Here we report on an experimental implementation of an array of independent Rydberg receivers that are nearly identical, and therefore accomplish a step towards a MIMO atomic receiver system. This is realised by introducing a small angle between the coupling and probe laser beams as schematically shown in Fig.~\ref{fig0}(c) and without the demand for a higher coupling laser power. We show that this SIMO system follows the well-described data capacity scaling with the number of independent receiver volumes, confirming their independence. Specifically, we employ up to four distributed receiver volumes within a single vapour cell and we observe a log$_2(1+N\times\text{SNR})$ scaling of the data capacity, where $N$ is the number of spatially distributed receivers.} \noindent \begin{figure}[t] \centering \includegraphics[width=0.96\columnwidth]{figure2.pdf} \caption{(a) Experimental setup used in this work and described in the text. (b) Four-level energy diagram for our atomic $^{87}$Rb system. $\Omega_p$ and $\Omega_c$ denote the probe and coupling Rabi frequencies. (c) Beam profiles of four probe beams in the focal plane with frequency differences $f_1-f_2$ = $f_2-f_3$ = \SI{3}{\MHz} and $f_4-f_3$ = \SI{4}{\MHz}. \label{setup}} \end{figure} \section{Experimental Setup} The heart of our experimental setup, see Fig.~\ref{setup}(a), is a \SI{75}{\mm}-long, \SI{25}{\mm}-diameter cylindrical vapour cell containing rubidium (Rb) atoms. The Rb atoms serve as receiver medium for an AM microwave signal emitted by a helical antenna. The AM microwave electric field is optically detected in a ladder-type Rydberg-EIT scheme, where a strong coupling field generates a transparency window on resonance in presence of a weak probe field, see Fig.~\ref{setup}(b). This allows to transduce AM information in the RF domain to optical information encoded as a change of the probe transmission. In our setup the coupling laser has a wavelength of \SI{480}{nm} and a power of \SI{22}{\mW}, and is focused to a waist of \SI{60}{\micro m} in the vapour cell. This corresponds to a Rayleigh length of $\sim\SI{25}{mm}$ and a Rabi frequency of 2$\pi\times$\SI{8}{\MHz} for the transition 5$P_{3/2} \leftrightarrow$ 52$D_{5/2}$. A probe light field at \SI{780}{\nm} passes through an acousto-optic modulator (AOM), which is driven by a multitone frequency source. Up to four diffracted beams at frequencies $f_1, f_2, f_3$ and $f_4$ can be generated simultaneously. The diffracted beams impinge on a lens which generates parallel beams with $\sim$\SI{70}{\micro m} radii in its focal plane, see Fig.~\ref{setup}(c). The probe and coupling beams are counter-propagating under an angle of $\sim$\SI{2}{\degree} to create spatially separated ($>$ \SI{3}{\mm}) \textcolor{black}{and independent} overlap areas between the coupling and probe beams. The transmission signal of the probe beams is collected by a lens and focused onto a photodetector. For the purpose of retrieving the frequency and amplitude of the modulation signal the photodetector is connected to a spectrum analyser. \newline \indent For the frequency stabilisation of the probe and coupling lasers, two auxiliary Rb vapour cells are employed. The probe laser is stabilized to a saturated absorption spectroscopy signal of the $^{87}$Rb D$_2$-line. With the AOM in front of the experimental cell, see Fig.~\ref{setup}(a), we obtain four beams with frequencies close to the transition $5S_{1/2}(F=2) \rightarrow$ $5P_{3/2} (F'=3)$. For the stabilisation of the tuneable coupling laser the EIT signal of a $\upmu$-metal-shielded Rb vapour cell is used, and the laser can be stabilized to different Rydberg levels $nD_{5/2}$ and $nD_{3/2}$ with $n = 30$ to $70$. For the results presented in this paper we use the Rydberg level 52$D_{5/2}$. \newline \indent Our experimental vapour cell is kept at a temperature of \SI{85}{\degree C} yielding a ground state atom density of $\sim10^{12}\SI{}{cm^{-3}}$ for a $^{87}$Rb sample. The two optical fields which are passing through the cell are coupled to the Rydberg level 51$F_{5/2}$ with a MW carrier field at \SI{16.532}{\GHz}. This field is generated by an analog signal generator that feeds a \SI{10}{dBm} signal into a home-built helical end-fire antenna. In axial mode the antenna radiates microwave fields along the helical axis and the radiation is circularly polarized. The antenna is located \SI{30}{cm} from the vapour cell. With increasing field strength of the MW field, the amplitude of the EIT signal decreases while its width broadens and for MW electric fields $>$\SI{10}{dBm} our transmission signal splits into two AT peaks. The MW carrier field is amplitude modulated with a sinusoidal signal with frequencies between \SI{100}{\kHz} and \SI{1}{\MHz}. This results in a variation of the transmission of the probe fields, which can be directly measured with the combination of photodetector and spectrum analyser and permits to retrieve the initial AM signal. \section{Results} \label{sec3:1} \subsection{SNR and Bandwidth of a Single Receiver} \label{sec3a} \begin{figure}[t] \centering \includegraphics[trim=0.0cm 0.0cm 0cm 0cm, clip=true,width=0.90\columnwidth]{figure3.pdf} \caption{(a) Demodulated signal of the probe transmission as a function of frequency measured with the spectrum analyser for three different probe powers. (b) Dependence of the SNR$_\text{dB}$ on the probe power for an AM frequency of \SI{200}{\kHz}. (c) Numerical data for the probe detuning versus probe transmission for two different probe Rabi frequencies (blue and black), in the EIT regime (solid lines) and AT regime (dotted lines) for a resonant RF field ($\Omega_\text{RF} = 2\pi \times \SI{5}{\MHz}$). \label{spectrumscan}} \end{figure} Figure~\ref{spectrumscan}(a) shows the demodulated probe signal for a carrier field amplitude modulated at \SI{200}{kHz}, measured with the spectrum analyser for a resolution bandwidth of \SI{3}{\kHz}. The transmitted probe field is detected by the photodetector, and the spectrum analyser yields the power spectral density for frequencies between 100 and \SI{350}{kHz}. The traces have distinct maxima at the modulation frequency, which are standing out against the noise floor observed with the spectrum analyser. We define the SNR$_\text{dB}$ as the difference of the power spectral density at the modulation frequency to the noise floor on the spectrum analyser at the respective frequency in absence of the modulation. As can be seen from Fig.~\ref{spectrumscan}(a), the signal height and \textcolor{black}{along} with it the SNR$_\text{dB}$ grow with increasing probe power in the presented scenario (black to red). \begin{figure*}[t] \centering \includegraphics[width=1.97\columnwidth]{figure4.eps} \caption{\label{sBeam}(a) SNR$_\text{dB}$ as a function of AM frequency of the carrier MW field for different power levels of a single probe beam. The plot shows average values of four probe beams with frequency offsets to the resonance of \SI{-4.5}{\MHz}, \SI{-1.5}{\MHz}, \SI{1.5}{\MHz} and \SI{5.5}{\MHz}. (b) SNR$_\text{dB}$ as a function of AM frequency for combinations of up to four probe beams of \SI{25}{\micro W} with frequency offsets to the resonance frequency of $f_1$ = \SI{-4.5}{\MHz}, $f_2$ =\SI{-1.5}{\MHz}, $f_3$ =\SI{1.5}{\MHz} and $f_4$ =\SI{5.5}{\MHz}. Measurements were taken for all combinations of $f_1, f_2, f_3, f_4$ and average values and corresponding standard deviations are presented. \textcolor{black}{The curves, obtained from a Savitzky–Golay filter, are to guide the eyes. }} \end{figure*} \noindent The development in SNR$_\text{dB}$ as a function of probe power is shown in more detail in Fig.~\ref{spectrumscan}(b). \textcolor{black}{Initially, the SNR$_\text{dB}$ grows with increasing probe power, but reaches a maximum at $\sim\SI{150}{\uW}$, after which it slowly decreases }for even higher probe powers\textcolor{black}{, if the experimental conditions, i.e. atomic density and coupling power are kept identical.} The growth of the SNR$_\text{dB}$ with probe power is related to an increase in peak contrast, as illustrated in Fig.~\ref{spectrumscan}(c), which is the difference between the probe transmissions at the EIT peak in presence and absence of the carrier RF field. In the four level scheme in Fig.~\ref{setup}(b), the applied RF field suppresses the EIT transmission on resonance as shown as dotted lines in Fig.~\ref{spectrumscan}(c) for two different probe Rabi frequencies (black and blue). For strong RF fields the EIT transmission on resonance is suppressed and can reach the baseline, which is given by the absorption of the probe beam without RF and coupling field. The development of peak contrast with probe power ($\propto \Omega_p^2$) can be qualitatively explained as follows: For larger $\Omega_p$, power broadening leads to an increase of the spectral width of the atomic absorption line, resulting in an increased transmission of the probe beam and a rising baseline transmission. At the same time, for a fixed Rabi frequency of the coupling field, $\Omega_c$, and weak $\Omega_p$ the population of the meta-stable Rydberg state increases with $\Omega_p$, since the population ratio between the ground and Rydberg state is determined by $\Omega_p^2/\Omega_c^2$. If less atoms are in the ground state the transmission of the probe field increases. Overall this results in a larger EIT peak \cite{Wu_2017}, and the observed initial rise of the SNR$_\text{dB}$ in Fig.~\ref{spectrumscan}(b). \textcolor{black}{As the number of atoms in the receiver volume is kept constant, the EIT peak transmission saturates \cite{Hao_2018} for even larger $\Omega_p$ while the two-level baseline transmission continues to grow, see Fig.~\ref{spectrumscan}(c). In our setup the noise floor on the spectrum analyser rises as a quadratic function of the probe power for $>\SI{50}{\uW}$, see Fig.~\ref{noisefloor} in the Appendix~\ref{AA}, and limits the achievable SNR$_\text{dB}$ \textcolor{black}{for higher probe powers. The dominant mode of noise in our experiment is introduced by an AOM which is far above that posed by photon shot noise (more discussed in Appendix~\ref{AA}). This explains the slow fall off of the SNR$_\text{dB}$ for probe powers $>\SI{150}{\uW}.$} } % In addition to the probe power, the achievable SNR$_\text{dB}$ depends on the modulation frequency of the carrier RF field, as shown in Figure~\ref{sBeam}(a). The fall-off of the SNR$_\text{dB}$ with increasing AM frequency sets the bandwidth of the receiver system. We define the BW limit as the cutoff point with SNR$_\text{dB}$ = \SI{10}{dB}. Figure~\ref{sBeam}(a) shows a measurement of the BW for a single probe beam and five different probe powers. For faster modulations the SNR$_\text{dB}$ decreases and reaches its BW limit at \SI{380}{\kHz} for probe powers $\geq \SI{100}{\uW}$. The slope of the SNR-curves is determined by atomic parameters such as decoherence rates set by Doppler broadening and transit times, which are the same for all SNR-curves in Fig.~\ref{sBeam}(a). Increasing the SNR$_\text{dB}$ initially improves the cut-off frequency, \textcolor{black}{but as the SNR$_\text{dB}$ reaches its maximum the BW saturates.} \subsection{Multiple Atomic Receivers} \label{sec3b} \textcolor{black}{With the objective to obtain independent detection volumes within our vapour cell, we distribute the power of our single probe beam over multiple probe beams. In combination with a single coupling beam we obtain up to four simultaneous and nearly identical receiver volumes.} We use AOM driving frequencies with $\Delta f = 3-\SI{4}{\MHz}$ between adjacent \textcolor{black}{probe} beams and observe a spatial separation of $\sim$\SI{100}{\um} in the focal plane, see Fig.~\ref{setup}(c). We establish a single-input-multi-output (SIMO) configuration, as it is used in the context of smart antenna technology for improved wireless communication performance. Figure~\ref{sBeam}(b) shows the SNR$_\text{dB}$ versus AM frequency for one, two, three and four probe beams with individual powers of \SI{25}{\uW} at their probe frequencies $f_1$ to $f_4$. The SNR$_\text{dB}$ drops towards higher AM frequency, similar to the scenario for a single receiver in Fig.~\ref{sBeam}(a), since the slope of the SNR-curves is determined by the atomic parameters of our experimental setup. Crucially, however, the saturation of the \textcolor{black}{EIT peak transmission} for a single beam can be avoided. This allows us to exceed the BW limit of the single beam setup, as shown in Fig.~\ref{inset}. While for two beams the BW limit approximately matches the scenario of a single beam with twice the power, a clear improvement in BW appears for $N \geq 3$, where $N$ is the number of beams. \textcolor{black}{Overall, the maximum values of the SNR$_\text{dB}$ and bandwidth for the single beam setup can be exceeded}. \begin{figure*}[t] \centering \includegraphics[width=1.99\columnwidth]{figure5.eps \caption{(a) \SI{10}{dB} bandwidth limit of a single probe beam as function of the probe power (blue, bottom axis) and for multiple beams (red, top axis), where the probe power is distributed equally among $N$ beams. The BW increases with logarithmically (black line), and surpasses the BW limit of the single beam (shaded area). (b) \textcolor{black}{Data capacity for four different AM frequencies and up to four probe beams. The dashed lines show the theoretical scaling of Eq.~(\ref{eq22}), where $\text{SNR}_{N=1}$ was calculated from the experimental data for $N=3$. (c) Data capacity versus amplitude modulation frequency for $N$ beams. } \label{inset}} \end{figure*}\noindent Assuming that two receiver areas are independent and have identical parameters such as $\Omega_p$, $\Omega_c$, beam frequencies, waists, and atomic densities, the signal amplitude increases by a factor of two. We note that doubling the optical power that contributes to the signal increases the SNR$_\text{dB}$ by a factor of 4 (roughly \SI{6}{dB}), as e.g. found in Fig.~\ref{sBeam}(a) (black to blue line). This is because the optical power $P_\text{op}$ hitting the photodetector translates into a voltage $V \propto P_\text{op}$, and the spectrum analyser measures the corresponding electric power $P_\text{el}$, for which $P_\text{el} \propto V^2$. In Fig.~\ref{inset}(a) we show the increase in BW for up to four beams. \textcolor{black}{As expected (see Appendix~\ref{AB}) the BW scales logarithmically (black line), and exceeds the maximum bandwidth of the single receiver (blue shaded area).} \textcolor{black}{The achievable data capacity for our system with $N$ independent receiver volumes at a given amplitude modulation frequency $f_\text{AM}$ transforms from Eq.~(\ref{SHT2}) to \textcolor{black}{ \begin{equation} \label{eq22} C_A(N) = f_\text{AM}\times \text{log}_2(1 + N\times\text{SNR}_{N=1} ). \end{equation} } Figure~\ref{inset}(b) presents the data capacity for three different modulation frequencies and up to four beams. The data capacity shows significant enhancement, following the predicted behaviour of Eq.~(\ref{eq22}) (dashed lines). Moreover the data capacity depends on the amplitude modulation frequency, as presented in Fig.~\ref{inset}(c). For low AM frequencies the data capacity has a linear dependence on the modulation frequency. For faster modulations the data capacity reaches a maximum, before decreasing due to the decreasing SNR$_\text{dB}$ caused by a finite atom-switching time. \textcolor{black}{The maximum of the data capacity moves towards higher modulation frequencies with the number of probe beams, $N$, as the SNR$_\text{dB}$ increases with $N$.} \textcolor{black}{The maximum values for bandwidth ($\sim\SI{560}{kHz}$) and data capacity ($\sim\SI{1.3}{MBits/s})$ achieved in this setup are rather low in comparison to other experiments\cite{Meyer_2018b}. This is predominantly caused by the angled geometry of the setup (see Fig.~\ref{fig0}), and is discussed in more detail in Sec.~\ref{Sec:3ca}. Importantly, \textcolor{black}{for our currentstudy} bandwidth and channel capacity scale in a predicable manner with the number of receiver volumes, as the receiver volumes are independent.} \subsection{Characterisation of the Distributed \textcolor{black}{Receivers} Setup } \label{Sec:3c} \subsubsection{\textcolor{black}{Effects of the angled configuration }} \label{Sec:3ca} \textcolor{black}{The coupling laser power for our setup is limited to \SI{22}{mW}. For the purpose of achieving independent receiver volumes without a need for several coupling laser beams, the coupling and probe laser beams are configured to counter-propagate under a small angle, so that one coupling beam is used for all receiver volumes. The angled geometry comes with the drawback of decreasing the SNR for the independent receiver volumes. This is a consequence of an additional Doppler shift\cite{Carvalho2004}, which broadens the linewidth of the EIT signal. In our setup, see Fig.~\ref{fig0}(c), an angle of $\theta \approx \SI{2}{\degree}$ results in a EIT linewidth that is approximately twice as large as for $\theta = \SI{0}{\degree}$. However, while we do see a broadening of the EIT linewidth for $\theta > \SI{0}{\degree}$, we do not see any additional change while using multiple probe beams. Therefore, we realise a setup with independent receivers as different groups of atoms are addressed within the vapour cell at the same instant of time. Another factor to consider is probe signal loss due to scattering of the probe light with atoms outside the sensing area. The length of the sensing area is with $\sim\SI{1}{mm}$ small in comparison to the full path length of the probe beams in the \SI{75}{mm} long vapour cell.\footnote{In configurations with $\theta = \SI{0}{\degree}$ the overlap area of the probe and coupling beam in the vapour cell is larger. However, as the coupling and probe beam are usually focused to a small spot size, the volume contributing the most to the EIT signal is comparatively small due to the shorter Rayleigh lengths.} This problem could be avoided in future realisations by using miniaturised vapour cells. } \textcolor{black}{The scope of this paper is to investigate the scalability of the data capacity for a Rybderg-atom based SIMO system. Therefore the independence of the the receiver volumes is of greater significance than high signal-to-noise ratios. With an average atomic velocity of $\sim \SI{150}{m/s}$, adjacent receiver spacings exceeding $\SI{3}{mm}$, and amplitude modulation frequencies of $>\SI{100}{kHz}$, interactions due to atoms transiting between sensor areas are negligible. Because of the angled geometry the SNRs of the atomic volumes are overall low, but the configuration allows to establish the scaling law for the channel capacity of a SIMO setup. } \begin{figure}[b] \includegraphics[trim=0.0cm 0.0cm 0.0cm 0.0cm, clip=true,width=0.98\columnwidth]{figure6.pdf \centering \caption{Probe transmission for different AOM driving frequencies $\Delta$ (EIT resonance at $\Delta$ = 0) at a fixed probe power of of \SI{300}{\uW}. The coupling laser frequency is scanned and the frequency axis calibrated using the known splittings between the states $52D_{5/2}$ (large peaks) and $52D_{3/2}$ (smaller peaks on the left side). \label{EIT} } \end{figure} \subsubsection{Deviations of EIT peak heights for different receiver volumes} Unlike in an idealized scenario with identical distributed receivers, in our experimental setup the receiver volumes differ slightly due to the geometry of the setup and since the probe power is distributed via an AOM. Therefore, we show average values of all four probe beam combinations in Figs.~\ref{sBeam} and \ref{inset}. Deviations between the detected SNR$_\text{dB}$ for different probe frequencies are caused by a change in the EIT condition. The main contribution comes from slightly different beam waists in the overlap area, affecting the ratio $\Omega_c/\Omega_p$. To illustrate the change of the EIT transmission for different probe frequencies, we present in Fig.~\ref{EIT} the EIT profiles for a scan of the coupling beam frequency. The AOM-offset of the probe frequency with respect to the two-level resonance frequency is denoted as $\Delta$. For all frequencies we observe two EIT peaks, since the EIT condition can be met for the 52$D_{5/2}$ and 52$D_{3/2}$ Rydberg states. Relevant in this investigation is the larger peak. For a fixed probe power of $\SI{300}{\uW}$ the height of the EIT peak changes with $\Delta$, since the position of the probe beam in the focal plane moves as $\sim \Delta \times$\SI{37}{\um/MHz}. Considering the angle between the counter-propagating probe and coupling beam, and a scan of $\Delta = \SI{40}{MHz}$ the overlap areas are separated by up to $\SI{40}{mm}$, which is approximately twice as large as the Rayleigh lengths of the probe and coupling beam. The appearance of two maxima at $\Delta = -\SI{10.5}{\MHz}$ and $\Delta = \SI{20.5}{\MHz}$ suggests that the focal plane of probe and coupling beam do not coincide. For the probe frequencies $f_1$ to $f_4$ of Fig.~\ref{sBeam}(b) the EIT peak height differs by \SI{10}{\percent} for a fixed probe power, which translates to deviations in the SNR$_\text{dB}$. This technical limitation can be mitigated, for example by adjusting the probe power of individual beams. \subsubsection{SNR$_\text{dB}$ for different probe beam frequencies } With the objective to find \textcolor{black}{optimised} probe frequencies for our system, the coupling laser was locked to the $5P_{3/2} \leftrightarrow 52D_{5/2}$ transition and the probe frequency swept over a \SI{40}{\MHz} range using the AOM. In difference to the measurements in Fig.~\ref{EIT}, we allow for changes in the probe power with AOM driving frequency, which is caused by the dependence of the AOM efficiency on the driving frequency. The SNR$_\text{dB}$ \textcolor{black}{was determined as a function of the AOM frequency (probe frequency) for an amplitude modulated MW field at \SI{100}{kHz}. The results are presented in Fig.~\ref{sweep}(a)-(c) as blue data points}. In our frequency scan, we observe two minima ($\Delta = \SI{-12}{\MHz}$ and $\Delta = \SI{5}{\MHz}$), which can be associated with points for which the EIT transmission does not change in presence of the MW field. High SNR$_\text{dB}$ occurs for the largest change in probe transmission due to the applied MW field. For a symmetric AT profile, as depicted in Fig.~\ref{sweep}(d), we expect a symmetric scenario in Fig.~\ref{sweep}(a)-(c) with three peaks with a vertical line symmetry at the resonance frequency $\Delta = 0$, and e.g. observed in \cite{Zou_2020}. A number of factors can lead to the observed asymmetry in Fig.~\ref{sweep}(a)-(c). First, with our MW electric field we intend to couple the Rydberg states 52$D_{5/2} \leftrightarrow 51F_{7/2}$ which has transition dipole moments up to $\SI{2260}{a_0e}$. However, a second Rydberg state, $51F_{5/2}$, is located only $\SI{1.2}{\MHz}$ away and can shift the AT-profile. \noindent \begin{figure}[t] \centering \includegraphics[trim=0.1cm 0.0cm 0cm 0cm, clip=true,width=0.95\columnwidth]{figure7.pdf} \caption{\textcolor{black}{SNR$_\text{dB}$ as function of the AOM frequency for a single beam (blue) and an additional beam (red) with frequency detuning (a) -\SI{3.5}{\MHz}, (b) \SI{8.5}{\MHz}, and (c) \SI{15.5}{\MHz} - represented by the vertical black lines. The SNR$_\text{dB}$ of the beam at frequencies (a)-(c) is represented as horizontal black line. A schematic representation of the EIT spectrum with and without MW field for a scan of the coupling laser frequency is shown in (d). \label{sweep}}} \end{figure} \noindent Secondly, the probe frequency is scanned using an AOM with maximised diffraction efficiency at the resonance $\Delta = 0$. Lastly, the EIT peak height decreases rapidly for frequencies $\Delta < -\SI{10}{\MHz}$, as shown in Fig.~\ref{EIT}, due to weaker overlap of coupling and probe beam. This explains the difference in height of the left and right peak in Fig.~\ref{sweep}(a)-(c). \subsubsection{\textcolor{black}{Effect of an additional probe beam }} \label{Sec:3c2} In order to characterise the performance with multiple probe beams, we scanned the frequency of the first probe beam in presence of a second probe beam at three fixed frequency detunings -\SI{3.5}{MHz}, \SI{8.5}{MHz} and \SI{15.5}{MHz}. We measured the SNR$_\text{dB}$ of the two beams by combining the two probe signals on the photodetector. The obtained values of SNR$_\text{dB}$ are presented in red in Fig.~\ref{sweep}(a)-(c). One could naively expect the SNR$_\text{dB}$ to remain at least at the value given by the fixed-frequency beam, depicted in Fig.~\ref{sweep}(a)-(c) as horizontal black lines. Instead, for two probe beams we \textcolor{black}{predominantly} observe a drop in the SNR$_\text{dB}$ if the two probe frequencies are in differently shaded frequency areas (grey and blue), and a rise for two frequencies in identically shaded areas. A descriptive explanation for this phenomenon is given in Fig.~\ref{sweep}(d). While the grey and blue areas both show a significant change of the EIT signal in presence of a MW electric field, for grey areas the probe transmission increases in height, whereas the signal drops in the blue area. By detecting both beams on the same photodetector the transmission signals from two beams can be effectively ``out of phase". If both components are equally strong, a zero occurs in the SNR$_\text{dB}$. Otherwise, the stronger signal dominates the scenario. Hence, for our experimental setup it is crucial to choose frequencies within identically colored areas. All beams can then be detected with a simple detection scheme, involving only a single photodetector. Alternatively, the probe transmission signal can be detected with individual photodetectors to allow for less sensitivity in the choice of probe frequencies. For the SNR$_\text{dB}$ measurements of up to four distributed beams, we used a separation of $3-\SI{4}{MHz}$ for adjacent probe beams centered around $\Delta = 0$. With this choice the individual beams have similar SNR$_\text{dB}$ levels, as well as spatially separated overlap areas. We note that the frequency deviations of the probe beams in or setup could be of potential benefit for a MIMO configuration. For the generation of multiple probe beams with identical frequencies electromechanically driven mirrors or liquid crystal deflectors could be implemented. \section{Discussion} The fastest switching time in an atom-based receiver is given by the contrast of optical transmission and the detection noise. Using purely classical light sources, the noise floor is ultimately limited by the photon shot noise, while the transmission contrast is determined by the lifetime of a single atom in a dark state, the number of contributing atoms in the EIT process, and the input probe beam power. The atom-switching time in our realisation is primarily limited by \textcolor{black}{the available coupling laser power. This can be expressed in terms of the EIT pumping rate $\Omega_\text{EIT} = \Omega_c^2/2\Gamma$ \cite{Meyer_2018b}, which describes the time atoms need to re-establish the EIT dark state when the MW field is turned off.} For a given realisation with a particular atom-switching time, one expects that increasing the probe power or the number of the participating atoms within the receiver volume would lead to a larger contrast in optical transmission, and therefore increase the SNR. We observe that the SNR \textcolor{black}{reaches a maximum} beyond a certain probe power and \textcolor{black}{for a given atomic volume}, but by spatially distributing the probe power to address different atoms, one can increase the SNR, which ultimately leads to an increase of the data capacity. Our results demonstrate a scaling of the data capacity with \textcolor{black}{$C_\text{SIMO} = \text{BW}\times \text{log}_2(1+N\times\text{SNR})$} for $N$ probe beams. \textcolor{black}{For a single receiver with a probe power that equals the sum of the distributed probe beams power broadening of the intermediate state occurs. Furthermore, a higher fraction of atoms are excited to the Rydberg state, which potentially results in additional Rydberg dephasing. These effects are avoided by distributing the probe power among several receivers. Fundamentally, the capacity advantage of the distributed receiver stems from a larger sensing volume, i.e a larger number of atoms contributing to the signal. }\textcolor{black}{While we exceed the BW of our single receiver and our data follows the predicted scaling of a SIMO system, the overall achieved data capacity remains low. This originates from low SNR levels of the individual receiver volumes, caused by the angled geometry of our setup, as discussed in Sec.~\ref{Sec:3ca}.} Our results particularly highlight the challenge of scaling up the data capacity of Rydberg atomic receivers by classical means, such as scaling up the receiver volume. To put this in perspective, in order to increase the data capacity by an order of magnitude, one needs to implement more than thirty distributed receivers with the receiver volume larger by the same ratio. Assuming a probe volume of a single receiver to be $\sim$ \SI{0.3}{mm^3}, this would require a distributed receiver with a volume of $\sim$ \SI{1}{cm^3}. This shows the importance of maximising single-channel data capacity by reducing the detection noise floor, \textcolor{black}{Doppler broadening} or by employing collective effects in atomic excitation/de-excitation \cite{Dicke1954,Kwong2014}. Such collective effects have so far remained elusive in warm atomic vapour, but have been demonstrated in cold atomic gases \cite{M_hl_2020}. \section{Conclusion and Outlook} We have considered a simple setup employing spatially distributed atomic receivers which allows to surpass the SNR limit of an individual atom-based receiver, resulting in an improved channel capacity. The concept of receiver arrays has proven beneficial in wireless communication systems for high-speed transmission and increased capacity. For example for a SIMO system, as presented in this work, an increase in channel capacity to \textcolor{black}{$C_\text{SIMO} = \text{BW}\times\text{log}_2(1+N\times\text{SNR})$} \cite{Ghayoula_2014} for $N$ receiving antennas has been \textcolor{black}{derived}. We experimentally confirmed the same scaling for the channel capacity of our atomic-receiver system with $N$ probe beams (receiver volumes). Moreover, we observed a significant increase in SNR$_\text{dB}$, and BW -- the latter scaling logarithmically for our Rydberg atom-based RF-to-optical receiver. We showed that such enhancement of the BW cannot be obtained by a single receiver with an \textcolor{black}{identical beam geometry and a} similar level of combined optical power due to the saturation of the \textcolor{black}{EIT peak transmission}. Our approach benefits from the little additional resource overhead needed to add multiple probe beams, if generated by the first order of an AOM and a multitone frequency source. While the results shown in this work were carried out with $N \leq 4$ probe beams, the number of beams can easily be expanded \cite{Roberts:14}. \textcolor{black}{In the future we plan to extend the system with additional transmitter RF antennas in a configuration where the receivers can distinguish between transmitters. This will allow us to realise a multi-input-multi-output (MIMO) system, promising further enhancement in channel capacity. For an additional transmitter antenna, we expect an improvement in channel capacity with \textcolor{black}{$2 \times \text{log}_{2}(1 +N\times\text{SNR})$}. This however requires that the spatial separation between the distributed atomic receivers to be in the order of the RF wavelength \cite{Barry_2004}. Furthermore, we might be able to boost the coupling beam power for our setup e.g. using power buildup in a resonant cavity. } \begin{acknowledgments} We acknowledge funding from the Marsden Fund of New Zealand (Contract No. UOO1729) and MBIE (Contract No. UOOX1915). \end{acknowledgments} \section*{DATA AVAILABILITY} The data that support the findings of this study are available from the corresponding author upon reasonable request.
\section{Event-Chain Monte-Carlo Algorithm} Since its first application to a hard disk system \cite{metropolis1953}, Monte-Carlo (MC) simulations have been applied to virtually all types of models in statistical physics, both on-lattice and off-lattice. MC samples microstates $\{a, b, \ldots\}$ of a thermodynamic ensemble statistically according to their Boltzmann weight $\pi_a = \exp \left(- E_a / k_BT \right)$ (in the following, we use thermal units, $k_BT \equiv 1$). One advantage of MC schemes over, for example molecular dynamics simulations, is that it only requires knowledge of microstate energies $E_a$ rather than interaction forces. In its simplest form, the Metropolis-Hastings algorithm \cite{metropolis1953,Hastings1970}, a MC simulation is easily implemented for any system by offering moves from a microstate $a$ to a microstate $b$ of the system and accepting or rejecting these moves according to the Metropolis rule for the Boltzmann distribution, i.e., based on the energy difference between states $\Delta E_{a\rightarrow b} = E_ b-E_a$. The standard Metropolis rule is defined by the acceptance probability \begin{align} p^{\text{Metr}}(a\rightarrow b) &=\min\left(1,\frac{\pi_b}{\pi_a}\right) =\min(1,\exp(-\Delta E_{a\rightarrow b})) = \exp(-[\Delta E_{a\rightarrow b}]^+) \label{eq:metropolis} \\ \text{with } [x]^+ &\equiv \max(0,x) \nonumber \end{align} for a move $a\rightarrow b$. Together with the trial probability $p^\text{trial}(a\rightarrow b)$ that a move $a\rightarrow b$ is proposed we obtain the transition rate as the product $p(a\rightarrow b)=p^\text{trial}(a\rightarrow b) p^\text{Metr}(a\rightarrow b)$. The transition rates $p(a\rightarrow b)$ give rise to probability currents $ J_{a\rightarrow b} = \pi_a p(a\rightarrow b)$ from state $a$ to $b$. Transition rates $p(a\rightarrow b)$ are given per MC time; likewise probability currents $J_{a\rightarrow b}$ have units probability per MC time, which must not be identified with an actual physical time. The Metropolis rule is designed to fulfill \emph{detailed balance} of probability currents between any states $a$ and $b$, i.e., \begin{align} J_{a\rightarrow b} = \pi_a p(a\rightarrow b) &= \pi_b p(b\rightarrow a) = J_{b\rightarrow a}. \label{eq:db} \end{align} The Metropolis rule (\ref{eq:metropolis}) satisfies detailed balance for the Boltzmann distribution $\pi_a = \exp \left(- E_a \right)$ if moves are also offered with a symmetric trial probability $p^\text{trial}(a\rightarrow b) =p^\text{trial}(b \rightarrow a)$ (which is typically fulfilled trivially for standard local MC moves). A characteristic of the Metropolis rule (\ref{eq:metropolis}) is also that moves that are energetically downhill, $\Delta E_{a\rightarrow b}<0$, are \emph{always} accepted ($p^\text{Metr}(a\rightarrow b)=1$). We point out that detailed balance (for symmetric trial probabilities) and this maximal acceptance rate for energetically downhill moves determine the Metropolis rule for the Boltzmann distribution uniquely. The Metropolis acceptance rate for moves that are energetically uphill is exponentially small, however, resulting in frequent rejections. Typical local MC moves, such as single spin flips in spin systems or single particle moves in off-lattice systems of interacting particles, are often motivated by the actual dynamics of the system. Sampling with local moves can become slow, however, in certain physically relevant situations, most notably, close to a critical point, where large correlated regions exist, or in dense systems, where acceptable moves become rare. Cluster algorithms deviate from the local Metropolis MC rule and construct MC moves of large non-local clusters, ideally, in a way that the MC move of the cluster is performed rejection-free. For lattice spin systems, the Swendsen-Wang \cite{Swendsen1987} and Wolff \cite{Wolff1989} algorithms are the most important cluster algorithms with enormous performance gains close to criticality, where they reduce the dynamical exponent governing the critical slowing down in comparison to local MC simulations. These cluster algorithms still fulfill detailed balance but based on a non-trivial trial probability that derives from the cluster construction rules. The event-chain (EC) MC algorithm introduced by Krauth {\it et al.} \cite{bernard2009} has been developed to decrease the autocorrelation time in hard disk or sphere systems. It performs rejection-free displacements of several spheres in a single MC move (see Fig.\ \ref{fig:hard_spheres}) and can, therefore, also be classified as a cluster algorithm. The basic idea is to perform a displacement $\ell$ in a \emph{billiard}-type fashion, transferring the displacement to the next disk upon a collision, which is called an \emph{event} and gives the algorithm its name (see Fig.\ \ref{fig:hard_spheres}). As opposed to cluster algorithms such as the Swendsen-Wang or Wolff algorithms, ECMC algorithms do no longer fulfill detailed balance but only global balance. In the following, we will give an introduction into the ECMC algorithm starting with the example of simple hard sphere systems. We then discuss how the algorithm realizes the general concept of lifting moves, which is employed in order to achieve global balance. Finally, we review the adaptation and generalization of the ECMC algorithm from athermal systems with hard interactions to systems with \emph{soft} potentials specified by an interaction energy. Many soft matter systems can be constructed from hard spheres as basic building blocks, eventually with additional interactions, for example spring-like connections to form a polymer chain. We discuss in some detail several applications of the EC algorithm in dense soft matter systems, namely polymer systems, liquid crystal systems as well as mixed systems such as liquid crystal colloids. \subsection{EC Algorithm For Hard Spheres} \begin{figure} \centering \includegraphics[width=0.8\linewidth]{./pics/hard_spheres4_comp.pdf} \caption{The upper scheme illustrates the \emph{billiard}-type construction of an EC with a total displacement length $\ell$ and with three participating spheres. The lower picture shows the example of a typical EC in a dense hard-sphere system: the coherent movement of long line-like clusters in each ECMC move accelerates the sampling by nearly two orders of magnitude. } \label{fig:hard_spheres} \end{figure} We consider the conceptually simple system of hard (impenetrable) disks (of diameter $\sigma$) in two dimensions in order to introduce the ECMC algorithm. Hard disks are the epitome of a system that is easily described and quickly implemented in a (naive) simulation \cite{metropolis1953}, but exhibits a non-trivial phase transition that has been debated for a long time \cite{Strandburg1988}. The two-dimensional melting phase transition is believed to be a two-step Kosterlitz-Thouless melting via an intermediate hexatic phase \cite{kosterlitz1973,Halperin1978,Young1979}, which is, however, difficult to confirm unambiguously in simulations \cite{Mak2006,krauth2011}. In a hard disk system, an EC move is constructed by first selecting a random starting particle, an EC displacement direction, and a total displacement length $\ell$. Both direction and total displacement length $\ell$ are adjustable parameters of the algorithm (see Fig.\ \ref{fig:hard_spheres}); the sampling of EC directions of directions (uniform or non-uniform) will determine whether detailed or global balance is fulfilled, while the displacement length $\ell$ can be adjusted for performance. We start the EC by moving the chosen particle in the EC direction, which is only possible until it touches another particle after a certain displacement $r$, which will be typically much smaller than the intended displacement $\ell$ in a dense system. Then, instead of declining such a move as in local MC schemes, the displacement $r$ of the first particle is subtracted from the initial total displacement length and the remaining displacement $\ell-r$ is carried over to the hit particle, which we attempt to displace next by the remaining distance $\ell-r$. If also the displacement direction is carried over to the hit particle the EC is called \emph{straight}; this is the case we will focus on in the following and which is illustrated in Fig.\ \ref{fig:hard_spheres}. This procedure of lifting the EC to the next particle upon collision continues until no displacement length is left. Then an EC has been constructed that moved as a line-like cluster without the possibility of rejection, and we start over by choosing a new starting particle and a new random starting direction to construct the next EC with the same total displacement length $\ell$. The total displacement length $\ell$ is an adjustable algorithm parameter, which determines the average number of disks $n_{\text{EC}}$ that are moved in an EC move (see Fig.\ \ref{fig:hard_spheres}). This number is given by $n_{\text{EC}} \sim \ell/\lambda_0$, where $\lambda_0$ denotes the mean free path; in general, the efficiency of the EC algorithm depends crucially on $n_{\text{EC}}$. For smaller $\ell$, the efficiency decreases and approaches traditional local MC (corresponding to the case $\ell<\lambda_0$). For very large $\ell$, ECs comprise large parts of the system and give rise to motion similar to a collective translation of disks, which is also inefficient. We note that the EC algorithm will be very well suited to simulate dense systems but does not allow to simulate maximally dense, i.e., jammed systems since an EC can not displace any particle if all particles touch each other. In jammed hard disk systems, the mean free path $\lambda_0$ approaches zero such that the number of participating disks $n_{\text{EC}}$ diverges, and the EC does no longer terminate or essentially comprises the entire system resulting in collective translation. This will happen for $n_{\text{EC}} \sim \ell/\lambda_0 > N$. In a dense hard disk system of area $L^2$ and close to the close-packing volume fraction $\eta_{hcp}= \pi/2\sqrt{3}$, we have $\lambda_0 \approx \sigma (\eta_{hcp} - \eta)/2\eta_{hcp}$ resulting in a more concrete condition $\ell \lesssim (\eta_{hcp}-\eta) L^2/\sigma$ for the EC algorithm to remain effective close to close-packing. We will show in the next section that the EC algorithm ensures \emph{global balance}, regardless of how the EC displacement direction is chosen. If the EC displacement directions are chosen randomly the straight EC algorithm also satisfies \emph{detailed balance} over many EC events. The most performant version of the straight EC algorithm, however, the so-called xy-version or irreversible straight EC algorithm, breaks detailed balance and uses only displacements along coordinate axes and only in positive direction. Breaking detailed balance but preserving global balance leads to performance gains. Ergodicity must also be ensured, which is done via periodic boundary conditions for the irreversible EC algorithm; moreover, several computations can be simplified for the xy EC algorithm. In Ref.\ \citenum{engel2013}, the irreversible EC simulations are roughly $70$ times faster than a simulation employing local MC moves. We can obtain similar performance gains in dense soft matter systems. \subsection{Balance Conditions And Lifting For Hard Spheres} The standard Metropolis algorithm (\ref{eq:metropolis}) employs detailed balance to ensure stationarity of the probability distribution of states by pairwise balancing of probability fluxes between microstates in the condition (\ref{eq:db}). Since circular probability fluxes also fulfill the stationarity requirement for the probability distribution, detailed balance is not a necessary condition and, often, performance can be gained by finding an algorithm that fulfills the weaker condition of \emph{global balance}, \begin{align} \sum_{ b } J_{ b\rightarrow a} &= \sum_b \pi_b p(b\rightarrow a) = \pi_a \sum_c p({a\rightarrow c}) = \sum_c J_{a\rightarrow c} = {\pi_a} \label{eq:GB} \end{align} (where the sums are over all microstates), which is simply the continuity equation for a stationary probability $\pi_a$, i.e., the Boltzmann distribution in our case. While the last equality in (\ref{eq:GB}) is a trivial consequence of normalization, the second equality is the actual global balance condition. All quantities in eq.\ (\ref{eq:GB}) are transition probabilities \emph{per MC step}; we call the algorithmic time measured in MC steps $\tau$ in the following. The algorithmic time $\tau$ measured in MC steps must not be identified with an actual \emph{physical time} $t$ as for any MC simulation. Global balance algorithms should become particularly performant if \emph{maximal global balance} is achieved, which means that probability backflow is forbidden leading to the additional constraint \begin{align} J_{a\rightarrow b} \neq 0 \Rightarrow J_{ b\rightarrow a} = 0. \label{eq:mgb} \end{align} In particular, this implies a rejection-free algorithm, i.e., $J_{a\rightarrow a} = 0$. Then we can also take a \emph{hydrodynamic} point of view and see probability density as liquid mass density, unidirectional transition probabilities as liquid velocities, and the probability currents as liquid current densities. Then, maximal global balance corresponds to stationarity of the mass distribution in the presence of fluid flow, i.e., a divergence-free liquid current density. In Fig.\ \ref{fig:lifting}, we show how maximal global balance is achieved in EC algorithms for a hard sphere system. In order to investigate balance conditions, it is often convenient to decompose the EC into infinitesimal moves $dw$, which add up to the total EC displacement $\ell$ in the end \cite{michel2014,michel2015,harland2017}. To ensure maximal global balance \emph{lifting} transitions are introduced, which change an additional lifting variable that enlarges the state space of the system \cite{Diaconis2000}. For hard sphere systems, the additional lifting variable is simply the number $i$ of the active/moving particle. This will be the case throughout this article. The microstates are then characterized not only by the positions of all particles but also by specifying the active particle. \begin{figure} \centering \includegraphics[width=0.8\linewidth]{./pics/lifting_comp.pdf} \caption{ Scheme of the lifting formalism for hard spheres. The physical states are labeled with letters (a,b,c) and the lifting variable is indicated by color, i.e., the current active particle is indicated by a colored arrow. The EC displacement direction is to the right. Proposed infinitesimal displacements are indicated by opaque spheres. In case of a physical rejection at MC step $\tau_1$ the pivot particle is changed and rejection is avoided. Periodic boundaries ensure ergodicity. One way to read this scheme, is that the lower row is the displacement-reversed version (except trivial translations) of the upper row (obtained be reversing all displacements $dw\to -dw$), resulting in a central symmetry, especially {($c$,\textcolor{rred}{red})} $=$ {($a$,\textcolor{ggreen}{green})}. } \label{fig:lifting} \end{figure} For infinitesimal EC moves, only two spheres can collide at once, and it is sufficient to consider a simplified setting of only two hard spheres (\textcolor{ggreen}{green} and \textcolor{rred}{red}) as shown in the cartoon in Fig.\ \ref{fig:lifting}, where proposed infinitesimal displacements are indicated by opaque spheres. The physical states are labeled with letters (a,b,c), and the lifting variable is indicated by color (\textcolor{rred}{red} or \textcolor{ggreen}{green} particle is active). \emph{Physical} transitions change the physical states by changing particle positions; this happens by moving the active sphere in the EC displacement direction (i.e., to the right from {($a$,\textcolor{ggreen}{green})} at $\tau_0$ to {($b$,\textcolor{ggreen}{green})} at $\tau_1$ in Fig.\ \ref{fig:lifting}). If a physical transition leads to an overlap, instead of rejecting the move as in local MC, we perform a \emph{lifting} transition and change the lifting variable with a lifting probability that exactly equals the rejection probability of the local MC rule in the EC algorithm. In Fig.\ \ref{fig:lifting}), this means that the active particle is changed to the \textcolor{rred}{red} sphere if a collision is proposed at $\tau_1$. Then the \textcolor{rred}{red} active particle continues to move (to the right from {($b$,\textcolor{rred}{red})} to {($c$,\textcolor{rred}{red})}. In this way, rejections are avoided, and the entire rejection probability flow is \emph{redirected} to a lifting move probability flow, which ensures maximal global balance if all physical configurations are equally probable, i.e., if the Boltzmann distribution for hard spheres holds: \begin{itemize} \item The total physical inflow $J^{\text{phys}}_{\rm a,\textcolor{ggreen}{green} \rightarrow b,\textcolor{ggreen}{green}}$ to {($b$,\textcolor{ggreen}{green})} equals the rejected physical flow $J^{\text{phys}}_{\rm b,\textcolor{ggreen}{green}\rightarrow coll}$ (that would lead to collisions on the upper right picture) because it involves moving the same sphere by the same distance $dw$ and because physical states $a$ and $b$ are equally probable. \item By construction of the EC algorithm, all collisions give rise to lifting such that the lifting flow $J^{\text{lift}}_{\rm b,\textcolor{ggreen}{green} \rightarrow b,\textcolor{rred}{red}}$ equals the rejected physical flow $J^{\text{phys}}_{\rm b,\textcolor{ggreen}{green}\rightarrow coll}$. This leads to $J^{\text{phys}}_{\rm a,\textcolor{ggreen}{green}\rightarrow b,\textcolor{ggreen}{green}} = J^{\text{lift}}_{\rm b,\textcolor{ggreen}{green}\rightarrow b, \textcolor{rred}{red}}$, so far. \item Apart from a translation, the states $a$ and $c$ and the \emph{forbidden} overlapping configurations (upper right and lower left pictures in Fig.\ \ref{fig:lifting}) are identical (please note the periodic boundary conditions). \item Therefore, the missing physical inflow $J^{\text{phys}}_{\rm coll \rightarrow b,\textcolor{rred}{red}}$ (from the forbidden overlapping configuration on the lower left picture) into state {($b$,\textcolor{rred}{red})} equals the rejected physical flow $J^{\text{phys}}_{\rm b,\textcolor{ggreen}{green}\rightarrow coll}$ and, thus, the lifting flow $J^{\text{lift}}_{\rm b,\textcolor{ggreen}{green} \rightarrow b,\textcolor{rred}{red}}$. \item Again, the missing physical inflow $J^{\text{phys}}_{\rm coll \rightarrow b,\textcolor{rred}{red}}$ into state {($b$,\textcolor{rred}{red})} equals the physical outflow $J^{\text{phys}}_{\rm b,\textcolor{rred}{red}\rightarrow c,\textcolor{rred}{red}}$ from {($b$,\textcolor{rred}{red})} because it involves moving the same sphere by the same distance $dw$ and because physical states $b$ and $c$ are equally probable. \end{itemize} All in all, we obtain \begin{align*} J^{\text{phys}}_{\rm a,\textcolor{ggreen}{green} \rightarrow b,\textcolor{ggreen}{green}} &= J^{\text{lift}}_{\rm b,\textcolor{ggreen}{green} \rightarrow b,\textcolor{rred}{red}} = J^{\text{phys}}_{\rm b,\textcolor{rred}{red} \rightarrow c,\textcolor{rred}{red}}, \end{align*} which are exactly the maximal global balance conditions for states {($b$,\textcolor{ggreen}{green})} and {($b$,\textcolor{rred}{red})} proving maximal global balance for any EC move on a state space that is extended by the lifting variable denoting the active particle. Global balance holds, regardless of how the EC displacement direction or displacement length is chosen. If the reverse EC displacement directions are offered with the same probability (for example by drawing EC directions completely uniformly in all directions) the resulting EC algorithm also satisfies detailed balance over the course of many EC moves. For pair interactions between hard spheres the lifting variable is the particle number. We can also introduce hard walls to the system, which represent additional steric one-particle interactions. For such one-particle interactions, the lifting variable will not be the particle number (as there are no interaction partners, the active particle must stay the same) but the EC direction itself. It can be shown that classical reflection of the EC direction upon collision with the hard wall will ensure maximal global balance. Analogously to the forbidden overlapping configurations Fig.\ \ref{fig:lifting}, both the rejected outflow in a collision with a wall and the missing inflow from forbidden configurations are exactly equal to the lifting flow from reflected EC directions. \subsection{Soft Interaction Energies} In many applications other than pure hard core systems, we have to deal with systems containing hard core repulsion alongside with other \emph{soft} interaction energies $\mathcal{E} = \mathcal{E}(\vec{r}_1,...,\vec{r}_N)$ that can depend on all particle positions $\vec{r}_n$ in a canonical ensemble. These are not handled by the hard sphere EC scheme described so far. One naive strategy to handle an additional interaction is the following: to ensure ergodicity, an EC is limited to a total displacement $\ell$, i.e., the sum of all particle displacements, after which a random new particle is chosen as active and a new isotropic direction is set. Interpreting a whole EC as a single MC move, an additional interaction will cause an energy change $\Delta \mathcal{E}$ when a hard sphere EC (which ignores the additional soft interaction) is executed. To properly sample the Boltzmann distribution in the presence of the additional interaction, the EC as a whole is then accepted or rejected by a standard Metropolis filter \eqref{eq:metropolis}. This strategy of handling additional interaction energies by re-introduction of Metropolis sampling and, thus, rejections will surely decrease the efficiency of the simulation. All advantages of the EC algorithm are effectively lost. There is, however, a way to include arbitrary $\mathcal{N}$-particle interaction energies into the EC framework. Within the lifting formalism it is possible to extend the algorithm from hard spheres to arbitrary pair potentials and continuous spin models by employing factorized Metropolis filters \cite{peters2012,michel2014,nishikawa2015}; this concept can be further generalized to $\mathcal{N}$-particle interactions with $\mathcal{N}>2$ according to Ref.\ \citenum{harland2017}. In principle, these expansions of the EC algorithm presented in the following can be reduced to our simple example of a two-sphere collision from Fig.\ \ref{fig:lifting} by generalizing the notion of a \emph{collision} \cite{peters2012}. Effectively, we assign a \emph{virtual} hard sphere radius to each interaction, which determines which configurations are energetically forbidden and trigger a generalized collision. This can be done by introducing the so-called \emph{rejection distance}, which is further explained in Fig.\ \ref{fig:2-EC}. In a pure hard sphere simulation, a sphere is continuously displaced until it hits another sphere which triggers a lifting event (or the total displacement reaches $\ell$). We can resolve all events into unique binary collisions or rejections, which then leads to a simple lifting probability flux during each event (see Fig.\ \ref{fig:lifting}). When a particle is displaced in the presence of continuous interaction energies, it is not clear which interaction causes the rejection, since the rejection in the standard Metropolis filter is based on the sum of all changes in all interaction energies (pair or many-particle interactions). In fact, the rejection is caused by all interactions \emph{at once}. By using an infinitesimal factorized Metropolis filter one can handle each interaction independently. Each particle $i$ has a set $S_i$ of interactions with other particles; each interaction energy $\mathcal{E} \in S_i$ depends on the position $\vec{r}_i$ of particle $i$ and on the positions of other particles in the set $M_{\mathcal{E}}$ of interaction partners participating in $\mathcal{E}$. Pairwise interactions, such as elastic springs $\mathcal{E}=E_{\rm spring}(ij)$ in a bead-spring polymer or a van-der-Waals interaction between particles, are interactions with one other particle $j$ ($M_{E_{\rm spring}(ij)}=\{j\}$; all particles $j\neq i$ can be interaction partners); three-particle interactions such as a bending energy in a polymer are interactions $\mathcal{E}=E_{\rm bend}(jik)$ with two other particles $j,k$ that form two neighboring bonds with $i$ and thus define a bond angle ($M_{E_{\rm bend}(ijk)}=\{j,k\}$; all pairs $jk$ with $j\neq i, k \neq i$ can be interaction partners). In the following, we consider again infinitesimal displacements $dw$ of particle $i$ in the EC direction. Such an infinitesimal move changes the configuration from $b$ to $a$ and leads to the total energy change $dE_{i,b\rightarrow a}$, which is the sum of all changes in interactions in $S_i$, $dE_{i,b\rightarrow a} = \sum_{\mathcal{E} \in S_i} d\mathcal{E}_{i,b\rightarrow a}$. We construct a global balance algorithm starting from a Metropolis filter for the acceptance of physical moves based on the energy $dE_{i,b\rightarrow a}$. For soft interactions we switch, however, from the standard Metropolis filter \eqref{eq:metropolis} to a factorized one \cite{peters2012,michel2014,nishikawa2015}, where the Boltzmann weights for the sum $dE_{i,b\rightarrow a} = \sum_{\mathcal{E} \in S_i} d\mathcal{E}_{i,b\rightarrow a}$ are factorized and the Metropolis acceptance rule is applied to each factor separately. This is equivalent to switching the sum and maximum operation on the energy changes regarding each interaction, \begin{align} p^\text{fact}(i,b\rightarrow a) & =\exp \left({-\sum_{\mathcal{E} \in S_i} [d\mathcal{E}_{i,b\rightarrow a}]^+}\right) \approx 1-\sum_{\mathcal{E} \in S_i} [d\mathcal{E}_{i,b\rightarrow a}]^+. \label{eq:FactMet} \end{align} It will be important that the factorized Metropolis filter still has the detailed balance property (\ref{eq:db}). The probability of rejecting the next infinitesimal step $1- p^\text{fact}$ is proportional to the sum of each infinitesimal energy change of each interaction. If one interaction causes a rejection, the whole move is rejected. Since we employ infinitesimal steps, only one interaction can reject at once. In analogy to the hard sphere case, these rejection events can be seen as a generalized collision events. In other words, the factorized Metropolis filter uniquely assigns a rejection to one specific interaction at the expense of an increased rejection rate, because energy increase from one interaction cannot be compensated by an energy decrease of another interaction. The factorized Metropolis filter can now be used to construct a maximal global balance algorithm on an enlarged state space by redirecting all physical rejection events into lifting events. This is done analogously to the hard sphere case outlined above. If a rejection should take place according to the factorized Metropolis filter, we perform a compensating lifting move instead. We lift to one of the particles that participate in the interaction that caused the rejection. For a pair interaction this already determines the particle to lift to uniquely, for many-body interactions an additional rule is needed to select the particle to lift to properly \cite{harland2017}. Therefore, we first discuss the simpler case of pair interactions and show how we can realize maximal global balance. \subsubsection{Pair Interactions} \begin{figure} \centering \includegraphics[width=0.85\linewidth]{./pics/lifting_spring_extended2_comp.pdf} \caption{ Scheme of the lifting formalism for a continuous pair interaction (notation see Fig.\ \ref{fig:lifting}). Using eq.\ \eqref{eq:FactMet} in the global balance condition (\ref{eq:GB}) for incoming and outgoing currents for state $b$ and dividing by $\pi_b$ yields $ p^{\text{lift}}(\textcolor{rred}{\text{red}}\to\textcolor{ggreen}{\text{green}}) -[d\mathcal E_{b\to c}]^+ = p^{\text{lift}}(\textcolor{ggreen}{\text{green}} \to \textcolor{rred}{\text{red}}) -[d\mathcal E_{b\to a}]$, where $d\mathcal E_{b\to c} = -d\mathcal E_{b\to a} \equiv d\mathcal E$ because of translational invariance. $[d\mathcal E]^+=0$ leads to $p^{\text{lift}}(\textcolor{rred}{\text{red}}\to\textcolor{ggreen}{\text{green}}) =0$, yielding $p^{\text{lift}}(\textcolor{ggreen}{\text{green}} \to \textcolor{rred}{\text{red}}) =[-d\mathcal E]^+$ and vice versa, which assures maximal global balance. Detailed balance for physical transitions (green) ensures time reversibility, so that a reversed EC would redo the original one, while an EC itself satisfies maximal global balance. For clarity we completed the lower row to show translational symmetry. } \label{fig:spring_EC} \end{figure} For states in the enlarged state space, we use the notation $a_i$ for a physical state $a$ with an active particle $i$. In the following we try to move the active particle $i$ by an infinitesimal step $dw$ along the EC direction $\vec{d}$ resulting in a physical move from $a_i$ into $b_i$. For pairwise interactions $\mathcal{E}(ij)$ (i.e., $S_i = \{\mathcal{E}(ij)| j\neq i\}$) the transition rate is given by the factorized Metropolis filter \begin{align} p^{\text{phys}}(a_i\rightarrow b_i) &= p^{\text{fact}}(i,a\rightarrow b) =\exp \left({-\sum_{\mathcal{E} \in S_i} [d\mathcal{E}_{a_i\rightarrow b_i}(ij)]^+}\right) \approx 1-\sum_{\mathcal{E} \in S_i} [d\mathcal{E}_{a_i\rightarrow b_i}(ij)]^+ \, . \label{eq:FactMetpair} \end{align} This transition rate is decreased by rejections if a move has $d\mathcal{E}_{a_i\rightarrow b_i}(ij)>0$, i.e., is energetically uphill. If $p^{\text{phys}}(a_i\rightarrow b_i)>0$ because configuration $b_i$ can be reached by a move $dw$ of particle $i$ from $a_i$, it follows that $p^{\text{phys}}(b_i\rightarrow a_i)=0$ because the EC direction is fixed, and we cannot reach $a_i$ from $b_i$ by moving $i$ into the same direction $dw$ (we would need to move into the opposite direction $-dw$). Therefore, physical transitions are unidirectional. Because only one pair interaction $\mathcal{E}(ij)$ can reject at once in the factorized Metropolis filter, it is sufficient to consider the two interacting particles $i$ and $j$ in deriving the lifting probabilities $p^\text{lift}_{\mathcal{E}(ij)}(b_i\rightarrow b_j|a_i\rightarrow b_i)$ from global balance, see Fig.\ \ref{fig:spring_EC}. We want to apply the global balance condition (\ref{eq:GB}) to incoming physical and lifting flows to state $b_i$. Using detailed balance of the factorized Metropolis filter we obtain for the physical inflow from $a_i$ to $b_i$ \begin{align} J^{\text{phys}}_{ a_i\rightarrow b_i} &= \pi_{a_i} p^{\text{fact}}(i,a\rightarrow b) = \pi_{b_i} p^{\text{fact}}(i,b\rightarrow a) = {\pi_{b_i}} \left(1- [-d\mathcal{E}_{a_i\rightarrow b_i}(ij)]^+\right), \label{eq:Jphysbi} \end{align} Lifting moves from $b_j$ to $b_i$ are triggered by a move $dw$ of particle $j$ into configuration $b_j$ from a different configuration $c_j$, which is obtained from $b_j$ by displacing particle $j$ by $-dw$ ($c_j$ is analogous to the forbidden configuration on the lower left in Fig.\ \ref{fig:lifting}). \begin{align} J^\text{lift}_{b_j\rightarrow b_i} &= \pi_{b_j} p^\text{lift}_{\mathcal{E}(ij)}(b_j\rightarrow b_i|c_j\rightarrow b_j) = \pi_{b_i} p^\text{lift}_{\mathcal{E}(ij)}(b_j\rightarrow b_i|c_j\rightarrow b_j) \label{eq:Jliftbi} \end{align} with $\pi_{b_i} = \pi_{b_j} = \pi_b/N$ by symmetry in a $N$-particle system. Using the global balance condition (\ref{eq:GB}) for flows to state $b_i$, \begin{align} J^{\text{phys}}_{ a_i\rightarrow b_i} + J^\text{lift}_{b_j\rightarrow b_i} &= {\pi_{b_i}}, \label{eq:GB2} \end{align} and dividing by $\pi_{b_i}$ we obtain the lifting probability as \begin{align} p^\text{lift}_{\mathcal{E}(ij)}(b_j\rightarrow b_i|c_j\rightarrow b_j) &= [-d\mathcal{E}_{a_i\rightarrow b_i}(ij)]^+ = [d\mathcal{E}_{c_j\rightarrow b_j}(ij)]^+. \label{eq:liftpairback} \end{align} The last equality holds for a translationally invariant pair interaction, where $d\mathcal{E}_{c_j\rightarrow b_j}(ij)= -d\mathcal{E}_{a_i\rightarrow b_i}(ij)$. In the other lifting direction, this implies \begin{align} p^\text{lift}_{\mathcal{E}(ij)}(b_i\rightarrow b_j|a_i\rightarrow b_i) &= [d\mathcal{E}_{a_i\rightarrow b_i}(ij)]^+, \label{eq:liftpair} \end{align} which leads to a rejection-free algorithm because the rejection probability of the physical moves (\ref{eq:FactMetpair}) is exactly redirected into a lifting probability. We also conclude that $p^\text{lift}_{\mathcal{E}(ij)}(b_j\rightarrow b_i) >0$ requires $p^\text{lift}_{\mathcal{E}(ij)}(b_i\rightarrow b_j) =0$, i.e., also lifting transitions are unidirectional proving maximal global balance. \begin{figure}[t] \centering \includegraphics[width=0.85\linewidth]{./pics/faster_than_the_clock_comp.pdf} \caption{ Event-driven approach to determine the rejection distance for a pair interaction between $i$ and $j$. Condition \eqref{eq:faster_than} has to be solved for the rejection distance $w_{ij}$ at which an event/lifting occurs. The black curve is the interaction energy along the EC direction. Only on red segments with increasing energy a rejection can occur. Among all pair interactions, the rejection will be assigned to the interaction with the smallest rejection distance. } \label{fig:2-EC} \end{figure} Global balance is established for each move $a_i\rightarrow b_i$ independently This generalizes the picture from Fig.\ \ref{fig:lifting} to soft interactions. In fact, for hard spheres $[d\mathcal{E}_{a_i\rightarrow b_i}(ij)]^+=0$ before a collision and $[d\mathcal{E}_{a_i\rightarrow b_i}(ij)]^+=\infty$ at collision such that lifting to the colliding particle $j$ happens with probability one upon collision, exactly as in Fig.\ \ref{fig:lifting}. For an efficient implementation, an event-based approach is chosen \cite{peters2012,michel2014}, in which we determine the distance to the next rejection. This rejection distance corresponds to the distance to the next collision for hard spheres. The probability $p(w_{ij})$ to reject and lift from particle $i$ to particle $j$ because of the interaction $\mathcal{E}(ij)$ and after moving a distance in the interval $[w_{ij},w_{ij}+dw]$ is given by the probability to not encounter a rejection/lifting up to $w_{ij}$ and then lift with probability $p^\text{lift}_{\mathcal{E}(ij)}(w_{ij})dw = [d\mathcal{E}_{a_i\rightarrow b_i}(ij,w_{ij})]^+$, see eq.\ (\ref{eq:liftpair}). As a result, we obtain a Poisson-type distribution for the rejection distance $w_{ij}$ of particle $i$ caused by interactions with particle $j$, \begin{align} p(w_{ij}) &= \exp\left(-\int_0^{w_{ij}}dw \left[ \partial_w \mathcal{E}(ij,w)\right]^+ \right) \left[\partial_w \mathcal{E}(ij,w_{ij})\right]^+, \label{eq:pw} \end{align} which depends on all \emph{uphill} energy differences caused by particle $j$ if particle $i$ is moved, see Fig.\ \ref{fig:2-EC}. Interpreting $-\partial_w \mathcal{E}(ij,w)$ as force onto particle $i$ exerted by particle $j$, the rejection length distribution depends on the line integral over all \emph{opposing} forces. Transforming the probability distribution (\ref{eq:pw}), we find that the distribution of the \emph{usable} (i.e., uphill) energy $\Delta U_{ij} = \int_0^{w_{ij}} dw \left[ \partial_w \mathcal{E}(ij,w)\right]^+ $ is a simple exponential. It follows that the lifting distance $w_{ij}$ caused by particle $j$ can be determined with the proper distribution by drawing a probability $u_{ij}= p(\Delta U_{ij})$ from a uniform distribution in $[0,1]$, which translates into an exponentially distributed $\Delta U_{ij}=-\ln u_{ij}$, and by solving the equation \begin{align} - \ln u_{ij} = \Delta U_{ij} = \int_0^{w_{ij}} dw \left[ \partial_w \mathcal{E}(ij,w)\right]^+ \label{eq:faster_than} \end{align} for $w_{ij}$. This is illustrated in Fig.\ \ref{fig:2-EC}. Because all interaction energies $\mathcal{E}(ij)$ with different partners $j$ are independent, rejection probabilities from the factorized Metropolis filter are additive by construction, and we have a Poissonian rejection length distribution, we can determine a rejection distance for all possible interaction energies, and the shortest distance triggers the next lifting event. This is analogous to the first-reaction method in a Gillespie algorithm \cite{Gillespie2007}. In this sense, the rejection distance is a virtual collision radius, which can be assigned to each interaction, and the shortest collision radius triggers a generalized collision. This procedure based on (\ref{eq:faster_than}) gives a simple and fast event-driven ECMC algorithm for arbitrary pair potentials. \subsubsection{$\mathcal{N}$-Particle Interactions} In many applications, also three-particle interactions occur. This happens, in particular, for extended objects, such as rods or polymers, which can be described by bead-spring models. One prominent example are semiflexible polymer chains with a bending energy. Because the local bending angle involves three neighboring beads in a discrete model, the bending energy is a three-particle intra-polymer interaction in terms of bead positions. In Ref.\ \citenum{harland2017}, the EC algorithm has been generalized to three- and many-particle interactions, thus broadening the range of applicability of rejection-free EC algorithms considerably. For $\mathcal{N}$-particle interactions $\mathcal{E}$, there are $\mathcal{N}-1$ interacting particles to which the EC can lift to avoid rejections. In order to redirect the rejection probability $[d\mathcal{E}_{a_i\rightarrow b_i}]^+$ from physical moves into lifting moves and, thus, a rejection-free algorithm, lifting to the set $M_{\mathcal{E}}$ of $\mathcal{N}-1$ interaction partners should be done with the analogous probability \begin{align} p^\text{lift}_{\mathcal{E}}(b_i\rightarrow b_{M_{\mathcal{E}}}|a_i \rightarrow b_i) = [d\mathcal{E}_{a_i\rightarrow b_i}]^+, \label{eq:liftN} \end{align} as for pairs, see eq.\ (\ref{eq:liftpair}). We need, in addition, a set of conditional lifting probabilities $\lambda_{ij}$ to assure maximal global balance. The $\lambda_{ij}$ specify the probabilities to lift to one of the $\mathcal{N}-1$ interaction partners $j\in M_{\mathcal{E}}$ ($\sum_{j\in M_{\mathcal{E}}} \lambda_{ij}=1$); the total probability to lift to $j$ becomes \begin{align} p^\text{lift}_{\mathcal{E}}(b_i\rightarrow b_j|a_i\rightarrow b_i) &= [d\mathcal{E}_{a_i\rightarrow b_i}]^+\lambda_{ij}. \label{eq:pliftNlambda} \end{align} \begin{figure}[t] \centering \includegraphics[width=0.95\linewidth]{./pics/lifting_3part_extended_comp.pdf} \caption{ Conditional lifting in a system with three-particle interaction. The conditional lifting probabilities can be derived from the balance condition. Analogously to Fig.\ \ref{fig:lifting} (i.e., using eq.\ \eqref{eq:FactMet} and dividing by $\pi_b$) and decomposing the lifting probabilities according to eq.\ \eqref{eq:pliftNlambda} and choosing $ \lambda_{\textcolor{rred}{\text{red}} \to \textcolor{ggreen}{\text{green}}} \equiv \lambda_{\textcolor{ggreen}{\text{green}}} $, we get $ [-d\mathcal{E}_{\textcolor{ggreen}{\text{green}}}]^+ = [d\mathcal{E}_{\textcolor{rred}{\text{red}}}]^+ \lambda_{\textcolor{ggreen}{\text{green}}} + [d\mathcal{E}_{\textcolor{bblue}{\text{blue}}}]^+ \lambda_{\textcolor{ggreen}{\text{green}}} $ from the inflowing probability fluxes, leading to $ \lambda_{\textcolor{ggreen}{\text{green}}} = [-d\mathcal{E}_{\textcolor{ggreen}{\text{green}}}]^+ / ([d\mathcal{E}_{\textcolor{rred}{\text{red}}}]^+ + [d\mathcal{E}_{\textcolor{bblue}{\text{blue}}}]^+)$. Note that this can be extended to match eq.\ \eqref{eq:lambdaij}. } \label{fig:3_part} \end{figure} We first consider the important case of a three-particle interaction (between particles $i$, $j$, $k$), see also Fig.\ \ref{fig:3_part}. Analogously to eq.\ (\ref{eq:liftpairback}), the global balance condition (\ref{eq:GB}) applied to flows to state $b_i$ requires a backward lifting probability \begin{align} p^\text{lift}_{\mathcal{E}(ijk)}(b_j\rightarrow b_i|c_j\rightarrow b_j)+ p^\text{lift}_{\mathcal{E}(ijk)}(b_k\rightarrow b_i|c_k\rightarrow b_k) & = [-d\mathcal{E}_{a_i\rightarrow b_i}(ijk)]^+. \label{eq:liftpairback3} \end{align} Inserting (\ref{eq:pliftNlambda}) this results in the condition \begin{align} [d\mathcal{E}_{c_j\rightarrow b_j}(ijk)]^+\lambda_{ji} + [d\mathcal{E}_{c_k\rightarrow b_k}(ijk)]^+\lambda_{ki} = [-d\mathcal{E}_{a_i\rightarrow b_i}(ijk)]^+. \label{eq:GB3} \end{align} As for pairs, lifting from particle $i$ to $j$ will only take place ($\lambda_{ij}>0$) if $d\mathcal{E}_{a_i\rightarrow b_i}>0$ giving rise to a rejection of $a_i\rightarrow b_i$, and if the corresponding $d\mathcal{E}_{c_j\rightarrow b_j}<0$ because of eq.\ (\ref{eq:GB3}). Translational invariance of the interaction implies $d\mathcal{E}_{a_i\rightarrow b_i} + d\mathcal{E}_{c_k\rightarrow b_k} +d\mathcal{E}_{c_j\rightarrow b_j}=0$. Writing out eq.\ (\ref{eq:GB3}) analogously also for lifting to $j$ and $k$, we can determine all conditional lifting probabilities uniquely \cite{harland2017}, \begin{align} \lambda_{ij} &= \Theta(d\mathcal{E}_{a_i\rightarrow b_i}) \frac{\left[-d\mathcal{E}_{c_j\rightarrow b_j}\right]^+} {[d\mathcal{E}_{a_i\rightarrow b_i}]^++[d\mathcal{E}_{c_k\rightarrow b_k}]^+} , \label{eq:lambdaij3} \end{align} where $\Theta(x)$ is the Heaviside step function. For arbitrary $\mathcal{N}$, the global balance condition (\ref{eq:GB3}) generalizes to \begin{equation} \sum_{j\in M_{\mathcal{E}}} [d\mathcal{E}_{c_j\rightarrow b_j}]^+\lambda_{ji} = [-d\mathcal{E}_{a_i\rightarrow b_i}]^+ \, , \label{eq:GBN} \end{equation} For $\mathcal{N}>3$, the choice of conditional lifting probabilities is not unique \cite{harland2017}. They can be fixed by the additional requirement $\lambda_{ji} \equiv \lambda_i$, that they are independent of the particle $j$ we are lifting from as in (\ref{eq:lambdaij3}). This leads to the simple general result \begin{align} \lambda_{ij} &= \Theta(d\mathcal{E}_{a_i\rightarrow b_i}) \frac{\left[-d\mathcal{E}_{c_j\rightarrow b_j}\right]^+} {[d\mathcal{E}_{a_i\rightarrow b_i}]^++ \sum_{k\in M_{\mathcal{E}}\backslash \{i,j\}} [d\mathcal{E}_{c_k\rightarrow b_k}]^+ }. \label{eq:lambdaij} \end{align} Regardless of the number of interacting particles $\mathcal{N}$ in an interaction in $S_i$, the first step of calculating the rejection distance does not differ and is given by (\ref{eq:faster_than}). For $\mathcal{N}=2$, the lifting destination when a rejection occurs is unambiguous, hence $\lambda_{ij} =1$. For $\mathcal{N} \geq 3$, the probability to lift from the active particle $i$ to one of the other interacting particles $j\in M_{\mathcal{E}}$ is also proportional to $\lambda_{ij} \propto \left[-d\mathcal{E}_j\right]^+$ (see eq.\ (\ref{eq:lambdaij})), which can be interpreted as the \emph{force} which is exerted on the particle $j$ by the interaction. Note that the conditional lifting probability vanishes when the particle, one would lift to, will increase the energy when moving along the current EC direction. We want to highlight that due to symmetry the sum of all forces must vanish $ \sum_{j}dE_j = 0$ and $i$ can only trigger an event when $dE_i > 0$ holds, which implies that for at least one other particle $dE_j < 0$ must hold. In short, one most probably lifts to the particle, which decreases the interaction energy the fastest. \subsubsection{One-Particle Interactions} Finally, soft external one-particle potentials $\mathcal{E}(i)$ frequently occur in soft matter systems, for example, as confining potentials, gravity, or external electric fields for charged particles. Such one-particle potentials are handled analogously to hard walls. Because there are no interaction partners the lifting variable is the EC direction $\vec{d}$. The lifting probability \begin{align} p^\text{lift}_{\mathcal{E}}(\vec{d}\rightarrow \vec{d}'|a_i \rightarrow b_i) = [d\mathcal{E}_{a_i\rightarrow b_i}]^+, \label{eq:lift1} \end{align} for lifting the EC direction to a reflected direction $\vec{d}'$ during an attempted move $a_i\rightarrow b_i$. The reflection can be performed with respect to the equipotential surface of $\mathcal{E}(i)$, i.e., by lifting to $\vec{d}' = (\bm{1}-2\bm{P})\vec{d}$, where $\bm{P}$ is the projection operator onto the $\vec{\nabla}_i\mathcal{E}(i)$-direction. This has been shown to satisfy global balance \cite{peters2012}. \subsection{ECMC Algorithm} In summary, an ECMC simulation, which we use for soft matter systems, can be structured as follows. Starting from a random particle $i$ in a random EC direction $\vec{d}$ and with a certain EC total displacement $\ell$, the rejection distance $w_{ij}$ for each interaction $\mathcal{E}\in S_i$ is calculated from eq.\ \eqref{eq:faster_than} and as shown in Fig.\ \ref{fig:2-EC}. The shortest distance determines which interaction caused the rejection. If the interaction consists of more than two particles, the conditional lifting probabilities $\lambda_{ij}$ are calculated from eq.\ (\ref{eq:lambdaij}) and as illustrated in Fig.\ \ref{fig:3_part}. Then we lift to the corresponding interacting particle $j$ after the corresponding rejection distance $w_{ij}$. For one-particle interactions causing the rejection we lift the EC direction by reflection. \begin{enumerate} \item \textbf{choose} a random EC direction $\vec d$, a total displacement $\ell$ and an active particle $i$ , \item \textbf{calculate} the minimal rejection distance $r_ {M_{\mathcal{E}}} = \min_{\mathcal{E'}\in S_i} w_{i M_{\mathcal{E'}}}$ for each $\mathcal{E}$ according to eq.\ \eqref{eq:faster_than}, \item if rejection is triggered by a three- or more particle interaction:\\ \textbf{select} $j \in M_{\mathcal{E}}$ by applying conditional lifting probabilities from eqs.\ (\ref{eq:lambdaij3}) or (\ref{eq:lambdaij}) (see Fig.\ \ref{fig:3_part}), \item \textbf{move} particle $i$: $\vec{r}_i = \vec{r}_i + r \vec d$, \item \textbf{lift} to rejecting particle $i \to j$ (or to new reflected EC direction $\vec{d}'$ if rejection is triggered by a one-particle interaction), \item \textbf{let} $\ell = \ell - r$, \item \textbf{if} $\ell=0$ goto 1 \textbf{else} goto 2 \end{enumerate} \subsection{Additional ECMC Simulation Features} We want to highlight some useful properties of an ECMC simulation. First, using the factorized Metropolis filter each interaction is independent, making it easy to implement the algorithm in a highly modular manner. Furthermore, the rejection distance distribution and lifting statistics is intimately linked to the pressure in the system. Without loss of generality, let the EC direction be in $x$-direction, then the pressure can be expressed by \cite{michel2014} \begin{align} \frac{P}{\rho k_B T} = \left \langle \frac{x_{\text{final}}-x_{\text{initial}}}{\ell} \right\rangle \, , \label{eq:pressure} \end{align} where $\langle \ldots \rangle$ denotes an ensemble average over multiple ECs with length $\ell$. Rewriting $x_{\text{final}}-x_{\text{initial}} = \ell + \sum_{\text{events}}(x_j-x_i)$, where $x_{i,j}$ are the $x$-coordinates of particles $i$ and $j$, one sees that the excess length per EC length determines interaction specific contributions to the pressure of an ideal gas, i.e., attractive interactions with a negative excess length decrease the pressure, and repulsive interactions increase the pressure. This procedure does not need any additional computations. For hard spheres, the pressure is measured far more efficient than with the usual detour via the contact theorem. Every configuration visited is weighted properly even if a hard sphere collision just happened. This can be exploited by special MC moves. This is not unconditionally true in a molecular dynamics simulation where, for instance, the statistics is skewed if measurements are taken on particle collisions. Inclusion of special many-particle MC moves can be beneficial for particular systems. For polymer melt simulations, we introduce a bead-swapping move \cite{kampmann2015}, which switches positions of two hard spheres upon collision obeying a standard metropolis filter for the spring energies involved, as explained later. Many simulation techniques based on single particle moves can benefit from massive parallelization if the simulation system can be efficiently divided into independent pieces. For ECMC algorithms, massive parallelization will not be optimal because of the cluster nature of EC moves \cite{kampmann2015b}. In Ref.\ \citenum{kampmann2015b}, a parallelization scheme for the EC algorithm was introduced, and extensive tests for correctness and efficiency were performed for the hard sphere system in two dimensions. For optimal parameters the algorithm achieves a speed up by a factor of roughly the number of cores used compared to a sequential EC simulation. For parallelization we use a spatial partitioning approach into simulation cells. We analyzed the performance gains for the parallel EC algorithm and find the criterion $\ell \sim {L\lambda_0}/{\sqrt{n}\sigma} $ for an optimal degree of parallelization, where $n$ is the number of parallel threads, $L$ the system size, and $\eta$ the occupied area fraction. If the number $n$ of parallel threads is chosen too large (massive parallelization), this choice for $\ell$ will drop below the optimal window $\ell < 10 \lambda_0$. Because massive parallelization is not optimal, the parallel EC algorithm will be best suited for commonly available multicore CPUs with shared memory. This ECMC parallelization scheme can also be applied to other soft matter systems such as polymer melts \cite{kampmann2015}. \section{Applications} We now briefly present some soft matter systems where we successfully employed ECMC algorithms, namely a dense polymer melt, a network-forming system of polymers with a short range attraction, hard needle models of liquid crystal and liquid crystal colloids from a mixture of needles and hard spheres. In all of these systems the ECMC algorithm speeds up simulations considerably at high particle densities as compared to standard local MC simulations. The simulations for these soft matter applications have been performed within the highly modular {\tt polyeventchain} framework, which is particularly suited for soft matter applications and will be presented in detail elsewhere. {\tt Jellyfish} provides a similar EC framework with a focus on all atom simulations \cite{Faulkner2018,Hoellmer2020}. \subsection{Initialization And Simulation Of Polymer Melts} \begin{figure} \centering \includegraphics[width=0.95\linewidth]{./pics/melt1_comp.pdf} \caption{The background shows a polymer melt of flexible chains, which are presented as volumetric splines. \textbf{(A)} Scheme for the rejection distance for hard sphere chains. If two bonded spheres do not collide, the active sphere can move freely until the minimal distance between both is reached. A \emph{usable} energy $\Delta E$ is drawn (see Fig.\ \ref{fig:2-EC}) which determines where the rejection takes place. \textbf{(B)} Scheme of a swap move. In case of a hard sphere collision, the energy difference of each involved springs is calculated when the beads would switch positions. The swap move is accepted with a standard Metropolis filter, otherwise the EC is continued normally. The active particle is marked by a red circle. } \label{fig:melt_ref} \end{figure} The simulation of polymer melts by Molecular Dynamics (MD) or MC simulations is a challenging problem, in particular, for long chains at high densities, where polymers in the melt exhibit slow reptation and entanglement dynamics. For chain molecules of length $N$ the disentanglement time increases $\propto N^3\,$ \cite{doiedwards}, which makes equilibration of long chain molecules in a melt a numerically challenging problem if only {\em local} displacement moves of polymer segments are employed as in a typical off-lattice MC simulation with fixed bond lengths \cite{Curro1974,Baumgartner1981,Khalatur1984,Haslam1999} or fluctuating bond lengths \cite{Rosche2000}, or in MD simulations \cite{Kremer1990,putz2000,auhl2003}, or for highly confined and therefore extremely packed melts\cite{ramos2018}. In MD simulations, reptation dynamics has been successfully identified in the entangled regime \cite{Kremer1990,putz2000,auhl2003,Hsu2016}. In MC simulation, reptation dynamics has been first identified in lattice models \cite{Kremer1983} or fluctuating bond lattice models \cite{Paul1991} with Rouse-like local bond moves. In MC simulations, {\em non-local} or {\em collective} MC moves can be introduced, for example, chain-topology changing double-bridging moves \cite{karayiannis2002}, which speed up equilibration; dynamic properties, however, are no longer realistic if such collective MC moves are employed. Likewise, reptation can also be introduced as explicit additional local MC reptation move \cite{Wall1975,Haslam1999} (slithering snake moves) to obtain faster equilibration of a polymer melt but reptation dynamics is no longer dynamically realistic then. In order to apply the above scheme of ECMC simulations to polymer melts, flexible polymers are modeled by a bead-spring model consisting of hard spheres, which are connected by harmonic springs \cite{kampmann2015}. These are the only additional soft pair interactions in the ECMC scheme for a flexible polymer melt. We choose the bond rest length to equal the hard-sphere diameter $\sigma$ and a sufficiently large bond stiffness such that bond-crossing becomes inhibited by the impenetrable hard spheres and polymers remain entangled. ECMC simulations can speed up MC simulations of polymers such that simulation speeds become comparable to MD simulation speeds and such that reptation dynamics can be clearly observed \cite{kampmann2015}. In each EC move, all beads that would collide successively during a short time interval in a MD simulation are displaced at once. This gives rise to a ECMC dynamics which is effectively very similar to the realistic MD dynamics and statements about polymer dynamics are still possible. In Ref.\ \citenum{kampmann2015} we compared the ECMC algorithm to MD simulations implemented in LAMMPS regarding the equilibration of polymer melts. We utilized the time, that the positional fluctuation of the most inner bead of each polymer needs to reach the diffusive regime, as gauge to introduce an ad-hoc interpretation of \emph{time} in the MC simulation (see Table I and Fig.\ 5 in Ref.\ \citenum{kampmann2015}). This showed that LAMMPS equilibrates more efficiently for moderate chain lengths. For long polymers ($N=500$) and when using an additional swap-move, ECMC simulations become equally performant, suggesting clear advantages for melts with even longer polymers. The additional swap-move chanes the topology of entanglements locally. In contrast to the double-bridging move, which changes bonds, the swap move changes topology by changing bead positions. For this purpose we modify the EC move so that the EC does not directly transfer to the next bead upon hard sphere contact but, instead, a {\em swap} of the two touching spheres is proposed, see Fig.\ \ref{fig:melt_ref}. Such an additional swap move is EC specific and allows for a local change of entanglements. An analogous swap move in a standard MC algorithm needs to select pairs of beads such that the swap move has a reasonable acceptance rate (the particles have to be reasonably close). Moreover, the selection rule has to satisfy detailed balance (for example, simply proposing the nearest neighbor for swapping will lead to a violation of detailed balance). Therefore, there is no straightforward analogue of the EC swap move in a standard MC simulation with local moves. Here, we want to focus on another important aspect of EC moves in polymer melt simulations. EC moves can also be employed to generate initial configurations that are already representative of equilibrium configurations. This keeps the equilibration or warm-up phase of any subsequent simulation scheme (MC or MD) short. An early strategy to generate initial conditions is to slowly compress a very dilute equilibrated melt, which can take a long time for very dense target systems and becomes more difficult when chain lengths increase \cite{Kremer1990}. Another method that has been proposed first distributes the chains without interaction (phantom chains) and tries to resolve overlaps in a way which distorts the chain statistics as least as possible \cite{Kremer1990}. Over the years more sophisticated ways of resolving overlaps have been proposed, for instance a slowly increase of the strongly repulsive excluded volume potential \cite{auhl2003}. This procedure is called \emph{push-off} and the rate at which the potential is increased and the potential range is extended determines to a large extent how much the original statistics of the chains are disturbed. The method can also be applied to more realistic polymer models \cite{sliozberg2016}. Recent work by Moreira {\it et al.} \cite{Moreira2015} shows how the procedure of Auhl {\it et al.} can be applied more efficiently and how the equilibration time can be shortened roughly by a factor of $6$. An alternative strategy that performs even better for very long chains (again by a factor of $\sim 5$) has been introduced by Zhang {\it et al.} \cite{Zhang2014}. They employ a hierarchical approach, which uses sequential backmapping from a coarse-grained representation in order to re-introduce molecular details. \begin{figure} \centering \includegraphics[width=0.85\linewidth]{./pics/melt_comp.pdf} \caption{ \textbf{(A)} Wall time per particle to generate \emph{rattled} configurations of variable polymer number $M$ with a fixed length of $N=200$. The wall time scales linearly in the numbers of particles, i.e., curves for different system sizes $L\times L$ are identical and diverge when the packing fraction $\eta= MN (\pi/6) (\sigma^3 /L^3)$ approaches the random closed packed limit $\eta_{rcp} \approx 0.64$ (indicated as vertical line). Preparation of even larger systems ($M\times N=10^6$) for moderate $\eta$ ($\approx 0.4$) take only $\approx 10^3 \text{s}$. Preparation of pure hard sphere systems ($N=1$) are roughly twice as fast. For the following we use $M=1000$ chains \`a $N=100$ beads at $\eta\approx 0.45$ ($\rho=0.85/\sigma^3$, i.e., $L\approx 49 \sigma$). All data is generated on a single core of a i7-8650U. \textbf{(B)} The pair correlation $g(r)$ is sensitive to the local structure of the hard spheres and resembles the equilibrium measurement quite well. The warm-up takes only a couple of minutes. \textbf{(C)} The internal bead-to-bead distance $\langle R^2\rangle / (n \langle b^2 \rangle)$ captures how well the polymers are equilibrated and has to be as close to the equilibrium result as possible because this observable equilibrates very slowly. For equilibration a chain needs to move its own size, which is slow due to reptational dynamics. Because of strong fluctuations the warm-up times have not been measured precisely, but are of the order of a couple of hours. \textbf{(D)} The tangent correlation shows the correct non-ideal behaviour of chains in the melt\cite{Wittmer2007,Wittmer2007a}. The configuration after \emph{rattling} resembles the equilibrium quite well. The warm-up takes only a couple of minutes.} \label{fig:melt_initial} \end{figure} We present an EC-based scheme that is similar to the push-off scheme and takes advantage of the fact that the EC algorithm is well suited to resolve overlaps. To do this, ECs are started in random directions on any sphere that overlaps with at least one other sphere until all overlaps of this sphere are resolved. This procedure ignores spheres that overlap with the active sphere, so that the algorithm itself does not need to be changed. This procedure corresponds to locally \emph{rattling} the polymer system, and can create enough space around the overlapping bead to insert it. For relatively dense melts, Flory \cite{Flory1951,flory} puts forward the hypothesis that the volume exclusion effect (chain swelling, $\langle R^2 \rangle \sim N^{2\nu}$ with $\nu \geq {1}/{2}$) is exactly compensated by the pressure generated by surrounding chains, so that a chain shows ideal behaviour again. More recent results \cite{Wittmer2007,Wittmer2007a} show that this hypothesis is only a good approximation. In particular, the tangent-tangent correlation of long ($N > 500$) polymers in a melt falls algebraically, which deviates significantly from exponential decorrelation happening in the single polymer, i.e., free case. This motivates the following scheme to generate pre-equilibrated polymer melts. Since excluded volume interactions between parts of a given chain are more or less screened as Flory suggests, we place phantom/ideal chains into the system in configurations that resemble non-reversal configurations by excluding a certain angular region for backward steps in generating the initial phantom chain configurations as described in Ref.\ \citenum{auhl2003}. This captures the structure of the chains on all length scales quite well, but comes with the downside that the asymptotic behavior of the end-to-end distance (the asymptotic Flory ratio $\langle R^2\rangle / (n \langle b^2 \rangle)$) must be known beforehand to tune the excluded angular region accordingly. Luckily, the internal structure of the chains depends not strongly on the chain length and the asymptotic behavior can be determined in a \emph{faster} system of shorter chains (here, we carried out one long run. Theoretical and numerical values for this ratio can be found in Ref.\ \citenum{foteinopoulou2008} and references therein). The resulting phantom chain system is then equilibrated for a short time, so that the phantom chains will relax towards ideal chain configurations, i.e., the phantom chains contract starting from the initial non-reversal configurations. Then the hard sphere diameter is increased from $\sigma=0$ (phantom chains) to the target $\sigma$ at once\footnote{In our previous work \cite{kampmann2015b} we suggested a steady increase of the hard sphere diameter (similar to the \emph{slow push-off}) rather than introducing the full diameter at once, but actually implemented the procedure outlined here because of an implementation error. Therefore, the procedure in Ref.\ \citenum{kampmann2015b} was described wrongly, but still produced overlap-free, high quality initial conditions.}, which gives rise to overlaps. Then we use the EC rattling moves to resolve overlaps in the system. Switching on the hard sphere diameter will swell the chains and, therefore, have the opposite effect to the pre-equilibration. Both steps cancel each other well, resulting in high quality initial conditions. The quality can be assessed by comparison of equilibrium values of observables, such as $\langle R^2\rangle$, pair distribution $g(r)$, or bead distributions, with ensemble values given by the initial condition generation as shown in Fig.\ \ref{fig:melt_initial}. For this procedure it is vital that the spring constant is quite large. Starting ECs on one particle until overlaps are resolved obviously breaks balance. Presumably, setting the spring constant to a relatively high value (in Fig.\ \ref{fig:melt_initial} $k= 1000 k_BT / \sigma^2$, where the rest length is identical to the hard sphere diameter $b_0 = \sigma$) leads to less distortions along the chain. In general, it is hard to quantitatively compare time scales and thus performance of the EC-based initialization scheme with other schemes from the literature. Hardware development over the years (Moore's law, number of cores, etc.), underlying polymer models (volume exclusion: hard spheres vs.\ Lennard-Jones, bonding: harmonic springs vs.\ FENE vs.\ tangent hard spheres vs.\ united atom force fields), criteria of deciding when \emph{equilibrium} is reached, or simply untested parameter dependencies (regarding system size, chain length, spring constants) can have non-trivial influence, even on an otherwise robust benchmark. Despite these problems to compare quantitatively, the proposed EC-based method seems comparable to other state-of-the-art methods. This has to be checked further in future work. \subsection{Self-Assembly Of Filament Bundle Networks} The cytoskeleton is a mechanically important structure which consists of three classes of interacting filamentous proteins (microtubules, filamentous F-actin, intermediate filaments) in animal cells. The different constituents reflect the multi-functionality of the cytoskeleton and the different requirements with respect to force and time scales. F-actin structures in the cell cortex are most important for cell mechanics and cell motility \cite{huber2013,blanchoin2014}. From the polymer physics point of view, F-actin is a semiflexible polymer since typical contours lengths are of the same order as its persistence length. Therefore, bending rigidity and thermal fluctuations are relevant to understand F-actin structures. Within the cell, F-actin forms locally very dense sub-cellular structures like bundles \cite{Bartles2000}, networks and even networks of bundles to fulfill their biological functionality \cite{huber2013}. \emph{In vivo}, bundles and also networks are held together by crosslinking proteins \cite{Lieleg2010}. Also minimal cytoskeletal \emph{in vitro} systems \cite{Lieleg2010}, some of which are confined to droplets \cite{huber2012,huber2015b} or in microfluidic chambers \cite{deshpande2012,deshpande2015,strelnikova2016}, show formation of bundles and also networks of bundles under the influence of attractive interactions. \emph{In vitro}, such attractive interactions can not only be induced by crosslinkers but also by counterions and depletion interactions. The simulation of the cytoskeleton of a cell is a long-standing problem as its physical properties are often governed by the interplay of many long polymers, which are deformable by thermal fluctuations against their bending rigidity and subject to crosslinker-mediated attractive interactions \cite{Kierfeld2005}. Theoretical work on crosslinker-mediated bundling of semiflexible polymers \cite{Kierfeld2003, Kierfeld2005, Kierfeld2005a, kampmann2013} and the related problem of counterion-mediated binding of semiflexible polyelectrolytes \cite{Borukhov2001} show a discontinuous bundling transition above a threshold concentration of crosslinkers or counterions. The nature of the crosslinkers can influence the mechanical properties of polymer bundles \cite{Shabbir2019}. Simulations of few filaments clearly confirm bundling in a single transition \cite{Kierfeld2005}. The emerging bundles of semiflexible polymers (Fig.\ \ref{fig:network}) are typically rather densely packed which causes difficulties in equilibrating bundled structures in traditional MC simulations employing local moves. In Ref.\ \citenum{Kierfeld2005}, MC simulations showed evidence for kinetically arrested states with segregated sub-bundles; in Ref.\ \citenum{Stevens1999}, kinetically arrested bundle networks have been observed for rather small semiflexible polyelectrolyte systems. Further numerical progress requires a faster equilibration of dense bundle structures. Simulations of larger systems consisting of cytoskeletal filaments and crosslinkers \cite{Chelakkot2009, Cyron2013, foffano2016} show different competing phases from isotropic networks to bundles and other aggregates, for example, with bond-orientational order. In Ref.\ \citenum{foffano2016}, it was also pointed out that the dynamics of bundling and polymerization in combination with entanglement of polymers strongly influence the resulting structure. This raises the question to what extent bundled structures can reach a genuine equilibrium under realistic conditions. Further numerical progress requires a faster equilibration of dense bundle structures, for which the ECMC algorithm is ideally suited \cite{kampmann2015b}. In comparison to polymer melts, two additional interactions have to be included in this system: (i) Polymers are semiflexible such that we have to include a bending rigidity of each bead-spring polymer, which is an example of a three-particle interaction between three neighboring hard sphere beads along a polymer. (ii) There is a short-range attraction, which mimics a crosslinker- or counterion-mediated attraction between polymers. Therefore, all beads also interact pairwise with a short-ranged attractive square well potential of strength $g$ and range $d$. We choose a potential strength $g$ well above the critical value for bundling \cite{Kierfeld2005,kampmann2013}, and the range of the attractive square well potential is $d = 0.4\sigma$, i.e., comparable to the filament radius (bead radius). Both additional interaction energies are incorporated in the ECMC polymer simulation. Again, it is important to note that we expect a qualitatively realistic MC dynamics from ECs, which resembles collisions in MD simulations. The performance can be further increases by parallelization as discussed above \cite{kampmann2015b}. We have applied this ECMC algorithm to a system consisting of many\footnote{We tried as many as $M=5000$ polymers \`a $N=200$ beads \cite{kampmann2015}. Since the system should be large enough when the typical cell scale is much smaller than the system size, we use smaller systems to improve the statistics and to get to coarsening.} interacting semiflexible polymers, such as actin filaments, in a flat simulation box in three dimensions. Periodic boundary conditions are used only for the extended direction of the simulation box whereas the spatially short direction is non-periodic. Under the influence of the short-range attraction, we clearly observe formation of densely packed bundles. We also observe that, starting from an isotropic melt-like situation, it is not a single bundle that forms but the system evolves into a structure consisting of a \emph{network} of bundles. The simulation does not reach a truly equilibrated stationary state, but the network of bundles keeps evolving by coarsening processes as shown in Fig.\ \ref{fig:network}A. This clearly demonstrates that the assembly dynamics plays an important role in structure formation in these systems, as similarly suggested in Ref.\ \citenum{foffano2016}. As mentioned above, the ECMC dynamics is effectively very similar to the realistic MD dynamics. Therefore, the observed coarsening dynamics is not an artefact of the MC simulation but a generic property of this multi-filament system. On the time scales of our simulations (up to $10^7$ MC sweeps) the bundle system keeps evolving by coarsening and no genuine equilibrium state is reached. \begin{figure} \centering \includegraphics[width=\textwidth]{./pics/network.pdf} \caption{ \textbf{(A)} A series of snapshots (after $0$, $10^4$, $10^5$, $10^6$ sweeps; in a sweep, each sphere is moved once on average); demonstrating coarsening. The snapshots are taken from a simulation of $M=1000$ polymers \`a $N=100$ beads in a $400\,\sigma\times 400\,\sigma\times 10\,\sigma$ simulation box. The simulation is performed with the following parameters: bending constant $\kappa =30\, k_BT \sigma$, spring constant $k=100\, k_BT/\sigma^2$ and rest length $b_0=\sigma$, potential strength $g=0.7\, k_BT$ and range $d=0.4\,\sigma$. A random color is assigned to each polymer for clarity. \textbf{(B)} Example of a simple graph representation (white balls and bonds) as overlay over a network snapshot generated by an automated procedure to identify vertices (white balls) and edges (white bonds) of the bundle network. The color of cells codes for the number of enclosing edges. All data in Figs.\ C and D is measured from such graphs. For clarity, we use a comparatively small system. \textbf{(C)} Distribution $P(n)$ of the number of edges $n$ per cell for different simulation times. The curves are obtained by fitting log-normal distributions to the data. \textbf{(D)} Aboav-Weaire law $M(n)$ for different simulation times, which measures the mean edge counts of neighboring cells. Cells with a high number of edges tend to have neighboring cells with fewer edges and vice versa. Error bars represent one standard deviation. The Aboav-Weaire law, the fits of $P(n)$ in C as well as direct computation of the variance $\mu_2$ of the number of edges per cell yield similar values $\mu_2\sim 5.2$ for the simulation parameters given in A. } \label{fig:network} \end{figure} Our preliminary results suggest that the bundle networks form structures similar to foams \cite{ohlenbusch1998}, which also continue to coarsen over time, see Fig.\ \ref{fig:network}. The dynamics of the coarsening process exhibits further analogies. It can be observed that cells in the bundle network, which enclose a comparatively large area, tend to increase their area at the expense of cells with smaller enclosed area. This behaviour is known from foams as a consequence of the von Neumann law for the area growth rate of cells \cite{glazier1992} and of the correlation between relative bubble volume and the number of sides \cite{glazier1987}. However, the von Neumann law assumes an exchange of the enclosed medium by diffusion through the liquid interfaces and cannot be applied directly to the bundle networks considered here. Other empirical laws found in the context of foams like Aboav-Weaire law \cite{weaire1984} for the mean number $M(n)$ of sides of cells surrounding an $n$-sided cell can also be applied very well to the emerging bundle networks (see Fig.\ \ref{fig:network}D). The Aboav-Weaire law is of particular interest since it provides an alternative approach to determine the variance $\mu_2$ of the mean number of edges per cell (denoted as $P(n)$ in Fig.\ \ref{fig:network}C). Comparison of the value of $\mu_2$ computed directly from the data to the values obtained from fit parameters of $P(n)$ and the Aboav-Weaire law yields a reasonable agreement. While the structure formation in dry foams is driven by the minimization of interfacial energies and diffusion \cite{weaire2001}, it appears that the bundle networks coarsen by a \emph{zipping} mechanism \cite{Kierfeld2006a,kuhne2009} which leads – similar to the decrease in interfacial energy in foams – to a decrease of the polymer binding energy (i.e., to more adhesive contacts between polymers). At a fixed amount of polymers this gives rise to a minimization of bundle length, which plays an analogous role to the minimization of surface area in a classical three-dimensional foam. The foam-like bundle networks resemble the structures observed in different \emph{in vitro} experiments \cite{huber2012, deshpande2012}, where also polygonal cell structures of the self-assembled networks have been observed. \subsection{Liquid Crystals And Colloidal Suspensions} \begin{figure} \centering \includegraphics[width=0.95\linewidth]{./pics/snaps3_comp.pdf} \caption{ \textbf{(A)} List of all geometrical cases where rejections/lifting between needles and disks occur (first two depict needle-needle, the third needle-disk, and the last two ones sphere-needle collisions). If a needle is not hit at one of its endpoints (first and last picture) conditional lifting probabilities $\lambda_{ij}$ for a three-particle interaction are applied. \textbf{(B)} Efficiency gains with increasing EC length $\ell$ for a two-dimensional needle system in a volume of $L \times L$ at density $\rho_\text{n} = 10/l_0^2$. Starting at one random configuration an ensemble of simulations with different EC lengths are conducted. We show the difference between the nematic order parameter over time and the equilibrium value yielding an exponential. The decay rate of the order parameter is used as efficiency measure, where a simulation with $\ell=5 l_0$ is $2.8$ times more efficient than a simulation with $\ell = 0.1$, where the latter took even $1.7$ times the wall time, yielding a speed-up of $\approx 5$ between $\ell=0.1$ and $\ell=5=L/2$. \textbf{(C,D)} Evolution of a mixture of hard needles of length $\l_0=1$ and hard disks with a diameter $\sigma=l_0$ indicating an effective interaction between disks, which favors parallel chaining. \textbf{(C)} A system of size $20\l_0 \times 20\l_0$ containing needles at density $\rho_\text{n} = 20/l_0^2$ and $160$ disks of diameter $\sigma=l_0$, \textbf{(D)} a larger system of $40\l_0 \times 40\l_0$ containing needles at density $\rho_\text{n} = 10/l_0^2$ and $640$ disks of diameter $\sigma=l_0$.} \label{fig:needle} \end{figure} Composite soft matter systems such as colloidal mixtures containing different colloidal particles, often of different size, represent challenging systems for simulations because their physics are typically governed by effective interactions which arise if microscopic degrees of freedom of one species are integrated out. Effective interactions are essential to characterize stability and potential self-assembly into crystalline phases but hard to access in a microscopic particle-based simulation. The process of integrating out microscopic degrees of freedom corresponds to the numerical evaluation of a potential of mean force between the colloidal species of interest. In order to measure the potential of mean force for one colloidal species accurately, \emph{all} degrees of freedom must be properly equilibrated. As an example of such a colloidal mixture we consider a two-dimensional system of needles and colloidal disks. This serves as a simple model system for liquid crystal (LC) colloids, which are colloidal particles suspended in a liquid crystal. Such LC colloids exhibit anisotropic effective interactions between colloidal particles if the LC is in an ordered, e.g., nematic phase \cite{Stark2001,Lev2002}. A nematic LC phase forms a rich variety of defect-structures around a spherical inclusion such as \emph{Saturn-ring} disclination rings or a satellite hedgehog for normal anchoring and boojums for planar anchoring \cite{Terentjev1995,Kuksenok1996,Ruhwandl1997a}. In a dense nematic LC, the effective interactions can be governed both by depletion interactions \cite{lekkerkerker2011} or by long-range elastic interactions mediated by director field distortions in the nematic hard needles. Because hard needles tend to align tangentially at a hard wall, we expect a quadrupolar elastic interaction, which is characteristic for planar anchoring at the colloidal disk \cite{Ramaswamy1996,ruhwandl1997, mozaffari2011,tasinkevych2012,pueschel2016} but also generic in two dimensions \cite{tasinkevych2002}. This interplay has been studied in Ref.\ \citenum{muller2020} employing an ECMC simulation. The colloidal mixture of hard disks suspended in a nematic host of hard needles is particularly challenging as the hard needle system must be fairly dense to establish a nematic phase. While particle-based simulations exist for dilute rods in the isotropic phase\cite{schmidt2001,kim2004}, the regime of a nematic host is fairly unexplored up to now and simulations resorted to coarse-graining approaches.\cite{pueschel2016} So far, only single inclusions\cite{Rahimi2017} or confining geometries\cite{Garlea2019} have been investigated by particle-based simulations. In order to measure the potential of mean force for larger colloidal disks accurately, all degrees of freedom of the needles but also the relatively slow degrees of freedom of the colloidal disks must be properly equilibrated. This is efficiently achieved by the ECMC algorithm. The idea for the ECMC simulation of a needle system is to represent needles by their two endpoints, where only one endpoint is moving at a time \cite{harland2017}; the endpoints are connected by an infinitely thin, hard line. For efficient sampling, the distance of the two endpoints, i.e. the length $l$ of the hard needle can fluctuate around its characteristic length $l_0$ in order to allow for independent motion of both endpoints in the MC simulation; the needle length $l$ is restricted by a tethering potential $V_\text{n}(l)$ with $V_\text{n}(l) = 0$ for $l/l_0 \in [0.9, 1.1]$ and infinite $V_\text{n}(l)$ else, such that $l_0$ is the effective needle length. This constitutes an additional pair potential in the ECMC framework. In two dimensions, the needle-needle interaction simplifies effectively to a collision of an endpoint with another needle. The remaining MC move distance is lifted to one of the endpoints of this needle. Therefore, we have a fluid of endpoints with an effective three-particle interaction (two endpoints of a passive needle and the active endpoint). For needles the probability $\lambda_{ij}$ to which endpoint is lifted (see eq.\ (\ref{eq:lambdaij}) is simply proportional to the the distance to the other endpoint, i.e., it is lifted with higher probability to the closer endpoint. In a composite colloidal problem the ECMC algorithm also faces the problem of lifting between different species. This can be performed exactly according to the same rules as lifting between a single species. In the presence of additional disks, MC displacement of needle endpoints is also lifted to disks if a needle collides with the disk and vice versa as illustrated in Fig.\ \ref{fig:needle}A. The example of a needle system also shows that collision detection is often the computational bottleneck of ECMC simulations. Here, we use a sophisticated neighbor list system to achieve high simulation speeds also in the nematic phase. Each particle is confined to a \emph{container}, which triggers an event when the particle leaves it. Then the neighbor list is updated, which ensures that the neighbor lists are always valid. Particles are added to the neighbor lists of the other particle and vice versa when their containers overlap. This way, for different particles different container shapes can be chosen. For the needles, a very narrow rectangle can be used, which limits the computational effort for calculating the distances to the next collision and makes the simulation significantly more efficient in the nematic phase. In particular, the anisotropy of the needles can be assigned particularly well without sacrificing any flexibility for the bookkeeping of the spheres. Furthermore, we optimize the updating of lists by putting them onto a collision grid. In Fig.\ \ref{fig:needle}B, we show a detailed benchmarking for a two-dimensional pure needle system. With increasing EC length $\ell$, the sampling efficiency is increased, where an EC length comparable to the mean free path can be seen as the limit of a local MC simulation. In Fig.\ \ref{fig:needle}B, we relax an isotropic initial configuration towards nematic equilibrium in a quite dense needle system at density $\rho_\text{n} = 10/l_0^2$. The resulting relaxation of the nematic order parameter is exponentially, where we use the decay constant of the exponential as efficiency measure. For EC lengths approaching the system size, no further improvements occur as naively expected. In three dimensions, hard needles introduce no excluded volume and therefore lack any phase transitions (we have checked with ECMC simulations not shown here that, independent of the density, the nematic order parameter vanishes for hard needles in equilibrium). In three dimensions hard spherocylinders are a natural extension of needles that introduces a non-vanishing excluded volume. As an additional proof of concept of our ECMC implementation with three-particle lifting, we investigate the series of liquid crystal phase transitions by monitoring the pressure as a function of increasing volume fraction, see Fig.\ \ref{fig:sphero}. We see a sequence of transitions from isotropic to nematic ordering, followed by a transition to smectic order, and ultimately, crystallization in complete agreement with literature results \cite{mcgrother1996}. For the colloidal mixture of hard disks suspended in a nematic host of hard needles, the ECMC simulation reveals a surprising and robust tendency for \emph{parallel} chaining of disks along the director axis which seems to contradict the chaining in a ${45^\circ}$ angle with respect to the director axis as predicted by quadrupolar elastic interactions in two dimensions.\cite{tasinkevych2012} This is a result of a dominant short-range depletion interaction, which strongly favors parallel chaining \cite{muller2020}. The effective disk-disk interaction can be obtained as a potential of mean force by simulations of systems containing only two colloidal disks and is in good agreement with analytical calculations, where we add the depletion interaction mediated by needles on short scales and the elastic quadrupolar interaction mediated by a nematic needle LC which has weak planar anchoring at the colloidal disks and exhibits elastic anisotropy. Here, we demonstrate the validity of this results on a larger scale for systems containing many colloidal disks. Figures \ref{fig:needle}C and D show the equilibration process of 160 and 640 disks with diameter $\sigma = 1$ in needle densities of $\rho_\text{n} = 20/l_0^2$ and $10/l_0^2$, respectively, where $l_0$ is the equilibrium length of a needle. We clearly see that parallel chaining always corresponds to the equilibrium state of the composite system. \begin{figure} \centering \includegraphics[width=1\linewidth]{./pics/pressure_diag_sphero_comp.pdf} \caption{ Phase diagram of hard spherocylinders (with diameter $D$ and length $L=5 D$) in three dimensions. We see four phases ($\mathbf I$ - isotropic, $\mathbf N$ - nematic, $\mathbf S$ - smectic, $\mathbf C$ - crystalline), in agreement with previous results by McGrother {\it et al.} \cite{mcgrother1996} We added six snapshots at different volume fractions $\eta$ to illustrate the different phases and phase transitions (also indicated by the blue regions). } \label{fig:sphero} \end{figure} \section{Discussion} We presented several applications that demonstrate how ECMC is an effective and fast simulation technique that is particularly suited for dense soft matter systems. Polymer melts, bundles of semiflexible polymers, and the composite system of a liquid crystal colloid are computationally challenging problems, where the ECMC techniques give an improved performance. We started with an introduction to the algorithm, where we showed how arbitrary interactions between hard spheres can be easily included into the ECMC framework such that a multitude of soft matter systems can be modeled. On this algorithmic side, long-range interactions have not been covered explicitly here but can also be included in an effective manner \cite{Kapfer2016}. Future developments will also address variations of the basic EC moves presented here in order to sample even more efficiently. On a generic collision, one interaction rejects the move and lifting occurs which means the current EC direction has a component parallel to the energy gradient of this specific interaction. One can resample the perpendicular parts of the EC direction in order to avoid reshuffling the EC direction from time to time, i.e., a finite EC length. This procedure has been recently developed and is called forward EC \cite{michel2020}. In specialized settings, the scheme seems very promising with regard to efficient sampling and should also be tested in the context of soft matter systems in the future. On the application side in the soft matter field, we presented new results for the initialization and pre-equilibration of polymer melts, where a novel \emph{rattling} algorithm based on ECs can be employed to efficiently remove overlaps in initial configurations. For large systems of semiflexible polymers with a short-range attraction, we demonstrated that ECMC simulations are capable to follow the formation of large networks of bundles and their subsequent foam-like coarsening behavior, see Fig.\ \ref{fig:network}. For a two-dimensional hard disk and needle model for LC colloids, the structure formation by parallel chaining of disks could be followed for large systems over large time scales as shown in Fig.\ \ref{fig:needle}. Here we find that increasing the EC length, i.e., increasing the \emph{cluster size} in our EC algorithm gives rise to considerable performance gains. In summary, we addressed compact quasi-zero-dimensional hard sphere particles, one-dimensional hard rods or hard needles, and one-dimensional polymers as constituents in soft matter ECMC simulations. A natural extension for future work is the development of ECMC algorithms for two-dimensional triangulated surfaces with local elastic properties, which are impenetrable for other simulation objects, e.g., hard spheres or polymers. This will allow us to study fluctuating triangulated elastic membranes and, in a compound polymer-membrane system, polymer networks confined to elastic capsules. It was shown that the boundary conditions significantly contribute to the network structure \cite{deshpande2012}. The elastic properties of a triangulated surface can be described by a set of elastic energies such as the TRBS model \cite{delingette2008}, where elastic constants like Young's modulus and Poisson ratio are adjustable and also bending stiffness can be included \cite{tamstorf2013}. The actual implementation will be a very challenging problem. The interaction of a triangle with a point or a hard sphere is an effective 4-particle interaction. The rejection distance is efficiently calculable by the M{\"o}ller–Trumbore intersection algorithm. To implement non-intersecting surfaces, interactions between two triangles have to be introduced, which can lead to a 6-particle interaction. Therefore, membrane simulations would also represent a further test of the general framework for $\mathcal{N}$-particle interactions in the EC algorithm \cite{harland2017}. The conditional lifting probabilities will look similar to the case of hard needles. Based on the extensive experiences with EC based simulations presented here, we think this simulation technique is suitable to tackle large (biological) systems. In order to verify and evaluate the EC algorithm for triangulated surfaces, we can investigate the crumpling transition \cite{kantor1987}. In Ref.\ \citenum{weichsel2016}, the necessary biophysical conditions for the formation of tubular membrane protrusions have been investigated and, it has been suggested that actin filaments polymerizing against a soft membrane are sufficient to form protrusions, which seems a suitable next system to explore the possibilties of EC algorithms for dense soft matter systems.
\section{Introduction} Coupling between electronic and lattice degrees of freedom underpins many intriguing and useful phenomena in condensed matter systems, such as charge density waves (CDWs) and the pair-binding mechanism in conventional superconductivity \cite{Wilson1975,Johannes2008,Bardeen1957,Eliashberg1960}. The layered transition metal dichalcogenide 1\textit{T}-TaS$_{2}$ is a material whose rich electronic phase diagram and ground state electronic properties are shaped principally by complex electron-phonon (\textit{e-ph}) interactions. At low temperature, \textit{e-ph} interactions drive a commensurate CDW described by a $\sqrt{13}\times\sqrt{13}$ \textit{R}13.9$^\circ$ superlattice. Figure 1(a) shows a typical scanning tunneling microscopy (STM) image acquired in this phase, at a temperature of 1.5~K. This CDW can equivalently be described as a lattice of polaronic Star-of-David (SD) clusters each encompassing 13 Ta ions \cite{Wilson1975} and formed from the symmetrical contraction of twelve of the Ta ions towards a central one, as depicted in Fig. 1(b). The most widely adopted understanding of the ground state in 1\textit{T}-TaS$_{2}$ is that the CDW reduces the electronic bandwidth below the threshold for a Mott transition into an insulating state \cite{Fazekas1979,Fazekas1980}. Nevertheless much is yet to be clarified about the driving mechanisms behind both the CDW itself and the Mott state, and about the detailed interplay between \textit{e-ph} interactions and electronic correlations. Time-resolved photo-excitation measurements have provided fresh insights by investigating the system's dynamics, from excitation of the CDW amplitude mode \cite{Perfetti2008} and doublons (characteristic excitations of the upper Hubbard band (UHB) of a Mott insulator) in the weak-perturbation regime \cite{Mann2016,Ligges2018}, to timing the melting of both the Mott state and the CDW towards metallic and other phases under high-intensity light \cite{Petersen2011, Hellmann2012, Zhang2019, Avigo2019}. Here we report on a spectroscopic signature of the dynamic coupling between electronic and lattice degrees of freedom in 1\textit{T}-TaS$_{2}$, with the electronic perturbation provided not by photo-excitation, but instead by local tunneling injection of single electrons using scanning tunneling microscopy (STM). Specifically, injection of electrons into unusual and previously unobserved narrow states found at the UHB onset likely excite amplitude mode phonons associated with the CDW lattice distortion. The narrow states themselves may evidence either long-lived coherent quasiparticles existing at the UHB edge, or possible polaronic bound states formed upon injection. These microscopic observations complement the ensemble-averaged ultra-fast optical and time-resolved photo-emission spectroscopy measurements and also provide a reference point for theories modeling exotic excitations of Mott-Hubbard and related systems. \begin{figure*} \centering \includegraphics[scale=1]{FIG1_v6.eps} \caption{\label{fig:1} Spectroscopically distinct surface terminations of the three-dimensional charge order in 1\textit{T}-TaS$_{2}$. (a) A typical constant-current topograph ($V$ = 250~mV, $I$ = 250~pA), acquired at a Type 1 surface. (b) A depiction of the periodic lattice distortion forming SD clusters with 13 Ta atoms each (sulfur ions are neglected). A surface-projected supercell of the CDW distortion is shown with a black \& white dashed line, corresponding to the cell shown in the inset of (a). (c) The alternating inter-layer stacking of the SD clusters, showing the two inequivalent cleavage planes 1 \& 2. (d) High-resolution $\frac{\textrm{d}I}{\textrm{d}V}(V)$ curves acquired at two types of surface. Recent STM investigations allow the identification of each spectrum with the Type 1 \& 2 surfaces formed by cleavage through the planes 1 \& 2 in Fig. 1(c) \cite{Butler2020}. The newly observed peaks at each surface are indicated with arrows. For ease of comparison the curves are normalized by dividing by the current value at +500~mV for each.} \end{figure*} \section{Results} High-energy-resolution tunneling conductance ($\frac{\textrm{d}I}{\textrm{d}V}$) spectra were acquired at two distinct surface terminations of the three-dimensional CDW pattern. The observation of two surfaces is relevant as follows: The status of 1\textit{T}-TaS$_{2}$ as a Mott insulator was recently challenged \cite{Ritschel2018,Lee2019} with the suggestion that staggered inter-layer stacking \cite{Tanda1984,Naito1984,Naito1986} could result in a simple band insulator through Peierls-like inter-layer dimerization. There is now mounting evidence from state-of-the-art X-ray diffraction \cite{Stahl2019}, high- and low-energy electron diffraction \cite{LeGuyader2017,vonWitte2019} and STM experiments \cite{Butler2020} that such an alternating stacking pattern is indeed realized in the low-temperature phase, and the band insulating picture has attracted some support \cite{Wang2020}. Nevertheless, we recognize that Peierls-like dimerization and an electron-correlation driven insulating state are not mutually exclusive \cite{Fuhrmann2006}, and behaviors consistent with a correlation-driven insulator continue to be reported \cite{Ligges2018,Bu2019,Butler2020}. As depicted in Fig. 1(c), the stacking pattern features two inequivalent cleavage planes, labeled as planes 1 \& 2, forming dimerized or un-dimerized surfaces which yield distinct tunneling spectra of Type 1 or 2 [blue and red curves in Fig. 1(d)] respectively. As we suggested recently, if the inter-layer stacking pattern is truncated at a surface (namely, of Type 2) leaving an un-dimerized layer, the persistence of a gap in absence of dimerization suggests electronic correlations as the determining mechanism \cite{Butler2020}. Hence, in this work we adopt the viewpoint that the major spectroscopic features described below can be interpreted in the Mott-Hubbard picture. Particularly noteworthy in these spectra are the exceptionally narrow peaks appearing at the onset of unoccupied states at each surface, marked with black arrows in Fig. 1(d). These features have a width of only 3$\sim$5~meV, or a few percent of the total bandwidth of the UHB. This observation is enabled by the high energy resolution afforded by a lock-in technique using a bias modulation $V_{\textrm{mod}}$ = 1 mV or less, with a suitable sampling interval, and would be missed in measurements using the more typical modulation and sampling interval of $\sim$10 mV or more. We note that such features appear to be absent in the occupied states, and the reasons for this will be discussed below. \begin{figure} \centering \includegraphics[scale=1]{FIG2_v4.eps} \caption{\label{fig:2} Spectroscopic imaging at the UHB onset at Type 1 and 2 surfaces. (a) and (b) Constant-current topographs of each surface (setpoints $V$ = 0.25~V, $I$ = 1~nA, and $V$ = 0.11~V, $I$ = 0.44~nA, respectively). (c) and (d) Spectroscopic linecuts taken along the white dashed lines shown in (a) and (b). Note that each energy range is chosen for suitability to each UHB onset energy. From here onward, this work focuses on the features observed at the Type 2 surface.} \end{figure} Spatially-resolved tunneling spectroscopy measurements shown in Fig. 2 give a more complete overview of the behavior seen at the UHB edge at each surface. Figures 2(a) and (b) show topographs acquired simultaneously with spectroscopy measurements, and in these the Type 1 \& 2 surfaces appear nearly indistinguishable. Figures 2(c) and (d) show spectroscopic linecuts along each of the arrows shown in (a) and (b). Here the narrow peaks appear as arc-like features, with at least one arc (and five arcs) spanning each cluster for the Type 1 (Type 2) surface. This arc-like shape is consistent with a distortion by tip-induced effects of an intrinsically flat, tile-like structure. Despite this, the energy spacing between arcs appears rigid and position-independent. In the Supplementary Information, we further discuss the tip-induced effects, the underlying spatial distribution of the features as it relates to Mott localization, and also the differences between the Type 1 \& 2 spectra. Below we examine the series of peaks at the Type 2 surface in particular, following the hypothesis that they result from replication of the zeroth peak by \textit{e-ph} interactions. An example of a typical spectrum acquired on a cluster at the Type 2 surface is analyzed, as shown in Fig. 3. Similar analyses of spectra acquired in different sample locations are shown in the Supplementary Information. Given some sharp spectroscopic feature, the relative intensities of its \textit{e-ph} replicas are governed according to the Franck-Condon principle, which is commonly used to describe absorption line-shapes corresponding to an electronic excitation -- for example a photo-excited vertical transition -- coupled to a single optical phonon or vibron mode \cite{Ishizaka2008}. The Franck-Condon principle has also been used to interpret STM observations of the vibronic properties of organic molecules resting on an insulating substrate \cite{Wu2004,Qiu2004,Nazin2005}. There, injection of an electron into the lowest unoccupied molecular orbital (LUMO) formed a long-lived transient charged state, exciting molecular vibron modes which produced a series of replicas of the LUMO. Drawing an analogy with this, and regarding the SD cluster here as a `pseudo-molecule', the sharp state near the onset of the UHB can be thought of as corresponding to the LUMO. Instead of vibron modes, a charged state of the SD cluster may couple to lattice phonons. Generally, \textit{e-ph} replicas are discernible only when the width of the spectroscopic feature is small compared to the phonon energy. Where in previous cases, such as doped diamond \cite{Ishizaka2008} or the aforementioned molecular adsorbate, phonon or vibron energies were sufficient that replicas were seen for a broad band or molecular orbital, here only the narrow feature at the UHB edge is discernibly replicated. We return to the possible origin of the narrow state itself below. The Franck-Condon scheme gives the relative intensities of replica peaks resulting from the emission of $n$ phonons. The intensity of the $n^{\textrm{th}}$ peak is \begin{equation} I_n = A e^{-D}\frac{1}{n!}D^n, \end{equation} where $A$ is a scaling coefficient common to the whole series, and $D$ is the Huang-Rhys parameter characterizing the strength of the electron-ion coupling \cite{MITOpenCourseWare}. The expected line-shape for a conductance spectrum $g(V) \equiv \frac{\textrm{d}I}{\textrm{d}V}(V)$ can be expressed as a Franck-Condon progression of peaks, each convolved with a suitable broadening function, on a background function which in this case represents the UHB continuum. This can be written as \begin{equation} \begin{split} g(V) & \propto \sum_{n=0}^{\infty} \bigg[ e^{-D}\frac{1}{n!}D^n \int \frac{ \Gamma_n / 2}{(q_e V)^2 +(\Gamma_n / 2)^2} \\ & \cdot \delta(q_e V - E_0 - nE_{\textrm{ph}})\ dV \bigg] \ + \textrm{UHB cont.,} \end{split} \end{equation} where $n \in \{0, 1, 2... \}$, $\Gamma_n$ are peak-specific broadening parameters, $q_e$ is the electron charge, $E_0$ is the energy of the underlying narrow electronic state, and $E_{\textrm{ph}}$ is the phonon energy. The resulting ideal lineshapes given by Eqn. 2, ignoring the UHB continuum, are depicted for a few values of $D$ in Fig. 3(a). In practice, in order to perform fitting to the conductance spectra and extract the key quantities $E_{\textrm{ph}}$, $D$ and $\Gamma_n$, a modified expression was used. First, $n$ was only allowed to run up to a value of four (for a total of five peaks), and in order to achieve convergence the intensities, energies, and widths of each of the individual peaks were treated as free parameters (marked with asterisks). Finally, convolution with the semicircular resolution function $\lambda(V)$ associated with the lock-in technique was taken into account: \begin{equation} g(V) \approx \sum_{n=0}^{4}\left [ \frac{ I_n^{*} \Gamma_n^{*} / 2}{(q_e V - E_n^{*})^2 +(\Gamma_n^{*} / 2)^2} * \lambda(V) \right ] \ + \textrm{UHB cont.,} \end{equation} where \begin{equation} \lambda(V) = \begin{cases} \frac{1}{\pi V_{\textrm{mod}}} \sqrt{1-(\frac{V}{V_{\textrm{mod}}})^2} & \text{if } |V| \leq V_{\textrm{mod}}\\ 0 & \text{otherwise.} \end{cases} \end{equation} The result of fitting is shown in Fig. 3(b). A phenomenologically-driven choice was made for a line-shape to represent the UHB continuum, namely the upper half of a skew-normal function. Error bars shown in each plot correspond to the square roots of the diagonal elements of the estimated covariance matrix obtained alongside the optimized values. \begin{figure} \centering \includegraphics[scale=1]{FIG3_v6.eps} \caption{\label{fig:3} Analysis of \textit{e-ph} replica peaks at the Type 2 surface. (a) Idealized lineshapes described by Eqn. 2 for various values of $D$. The dashed lines show envelope functions for the relative peak intensities according to the Franck-Condon principle (Eqn. 1). Plots are vertically offset for clarity. (b) Fitting, using Eqn. 3, to the conductance spectrum of unoccupied states at the Type 2 surface, acquired at the point shown in the inset. (c) Fitted energies for the peaks in (b), with a linear fit giving an average spacing of 8.8~meV. (d) Fitted peak intensities (total area under each Lorenztian curve), with further fitting using Eqn. 1 yielding the Huang-Rhys parameter $D$ = 1.75. (\textbf{e}) Fitted Lorentzian broadening parameters for each peak.} \end{figure} The resulting energies $E_n^{*}$ are plotted in Fig. 3(c), along with a linear fit that finally yields the average spacing $E_{\textrm{ph}}$ = 8.8~meV. Fitting to curves acquired in multiple locations on the sample shows that values of $E_{\textrm{ph}} \approx$ 9~meV are typical. The fitted peak intensities $I_n^{*}$ are plotted in Fig. 3(d), with the subsequently fitted curve for the Franck-Condon weights (from Eqn. 1) giving $D$ = 1.75. From the discussion which follows, we can infer only that this value is below the threshold for formation of a self-trapped polaron \cite{Stoneham2007}. The broadening of each peak, plotted in Fig. 3(e), shows the expected tendency that $\Gamma_n^{*}$ increases with higher energy, suggesting increased damping further into the UHB continuum. Here the most significant value is the broadening of the lowest-lying peak, $\Gamma_0^{*}$ = 2.17~meV, to which we will return below. Figure 4 shows conductance spectra, and the result of fitting using Eqn. 3, obtained on a different Type 2 surface in a similar way to those shown in Fig. 3, for various tip-sample separations $z = z_{\mathrm{setpoint}} + z_{\mathrm{offset}}$. Varying $z$ has the effect of changing the electric field between the tip and sample (which is likely the source of the small energy shift with varying $z$), as well as changing the current by about one order of magnitude per 100 pm. The current is inversely proportional to the average time interval between tunneling events (see the discussion below). We see that $E_{\textrm{ph}}$, $D$ and $\Gamma_{0}^{*}$ do not show any systematic variation with $z$. This insensitivity is expected, as the phonon energy, electron-phonon coupling strength and peak width should be intrinsic properties of the sample. \begin{figure} \centering \includegraphics[scale=1]{FIG4_v2.eps} \caption{\label{fig:4} Insensitivity of Franck-Condon series to tip-sample separation. (a) Conductance curves collected at varying tip STM tip height. After stabilizing the tip at the height $z_{\mathrm{setpoint}}$ (at $V$ = 0.11~V, $I$ = 0.44~nA), the tip height was altered by an amount $z_{\mathrm{offset}}$ before measuring the conductance spectrum. Here the curves are normalized for ease of comparison, using the value of $\mathrm{d}I/\mathrm{d}V$ at an energy 40 meV above that of the lowest-lying peak. (b) Results of the fitting with the function in Eqn. 3. The parameters $E_{\textrm{ph}}$, $D$ and $\Gamma_{0}^{*}$ are insensitive to the tip height.} \end{figure} \section{Discussion} In order to identify the apparent phonon mode observed above, its energy can be compared against previously reported Raman, time-resolved photo-electron, and ultrafast optical spectroscopy measurements on the low temperature phase. The energy $E_{\textrm{ph}} \approx$ 9~meV corresponds to a Raman shift of about 71~cm$^{-1}$, and a strong Raman-active mode of this frequency has been observed, alongside other nearby modes \cite{Hangyo1983, Albertini2016}, though the phonon species were not identified. Time-resolved pump-probe spectroscopy experiments have observed photo-induced excitations coupling to the amplitude mode of the 1\textit{T}-TaS$_{2}$ CDW, at a frequency $f_{\textrm{AM}} \approx$ 2.4~THz (9.9~meV) \cite{Perfetti2008,Kusar2011,Stojchevska2014,Mann2016}. Some reports have also described a mode at a frequency of $f \approx$ 2.1~THz (8.6~meV) \cite{Toda2004, Dean2011}, consistent with one speculated as either an $E_{g}$ or $A_{1g}$ mode \cite{Albertini2016}. Like the amplitude mode, it appears only upon cooling into the commensurate CDW phase \cite{Albertini2016, Hu2018}. From symmetry, it is reasonable that injection of an electron into the orbital localized at the SD center selectively excites the amplitude mode: The ionic arrangement in the host SD cluster responds to this excess negative charge by further symmetrically contracting towards the cluster center, setting the amplitude mode in motion. This scenario is depicted in Fig. 5(a). Though the observed phonon energy is also close to that of the previously reported $E_{g}$ or $A_{1g}$ mode, it is not clear how a phonon of such symmetry can be excited by injection of an electron into the centrally localized orbital of the cluster. \begin{figure} \centering \includegraphics[scale=1]{FIG5_v3.eps} \caption{\label{fig:5} Excitation of CDW amplitude mode by a transient doublon-like excitation. (a) A depiction of the excited amplitude mode in the SD cluster. (The Ta ionic displacements are greatly exaggerated.) (b) A qualitative plot of the SD cluster occupancy as a function of time, and the resulting local fluctuation of the order parameter.} \end{figure} Assuming that the orbital is fairly well localized to each cluster, the injected electron should be expected to dwell there for a finite time, before hopping away to neighboring clusters. This lifetime can be roughly estimated by considering the width of the zeroth peak in the series, $\Gamma_0^{*}$, and using the uncertainty relation: $\Gamma_{0}^{*} \tau_0 \geq \hbar / 2$. This yields a lifetime of $\tau _0 \approx$ 152~fs for the spectrum shown in Fig. 3(b). (For comparison, the time-scale of electron hopping and screening in generic non-interacting systems is of the order 1~fs.) This long lifetime may attest to strong correlations in the half-filled background, since in the Fermi-Hubbard model the lifetime of a charged excitation residing in the UHB (a doublon) scales exponentially with the Mottness ratio (the ratio of the energy cost of double-occupancy $U$ to the bandwidth $W$) \cite{Sensarma2010}. The time-scale for one period of the amplitude mode oscillation is $(1 / f_{\textrm{AM}}) \approx$ 417~fs. Figure 5(b) qualitatively shows the double-occupancy of the SD cluster as a transient perturbation which induces a response of the lattice. Taking the periodic lattice distortion (or equivalently the ionic charge modulation) as the order parameter, and writing it as $\psi(\textbf{\textit{Q}}) = \Delta(\textbf{\textit{Q}}) e^{i \phi}$, after a Fourier transform to real-space the amplitude can be sampled at the SD cluster center, $\textbf{\textit{r}}_{0}$, and labeled as $\Delta(\textbf{\textit{r}}_{0})$. This is the equilibrium about which the amplitude mode will oscillate ($\phi$ is fixed). Introducing time-dependence with $\psi(\textbf{\textit{r}},t)$, the modulated amplitude at $\textbf{\textit{r}}_{0}$ is $\tilde{\Delta}(\textbf{\textit{r}}_{0},t)$. The local modulation $\tilde{\Delta}(\textbf{\textit{r}}_{0},t) / \Delta (\textbf{\textit{r}}_{0})$ is qualitatively plotted as a function of time in Fig. 5(b) (green dashed curve) along with the cluster occupancy. Previously the amplitude mode has been observed to persist for a timescale on the order $\sim$10~ps \cite{Stojchevska2014}. Note that all the timescales depicted in Fig. 5(b), including the attenuation over time of the amplitude mode, are short compared to the average interval between tunneling of electrons from the tip to the sample. This time interval is $\sim$16~ns at the current of $\sim$10~pA that was typically recorded just above the zeroth peak for the setpoint parameters used for the measurements described in Figs. 2 \& 3. As the system recovers to equilibrium in a time much shorter than this interval, the phenomena described can be considered as the response of the system upon injection of a single electron. From Fig. 5 it is reasonable to intuit that the lifetime $\tau_{0}$ $\approx$ 152~fs is of a suitable scale to trigger an oscillation of period $\approx$417~fs, since it covers most of the oscillation's first upward swing. Corollary to this, if $\tau_{0}$ tended toward zero, so the coupling to the oscillation would diminish, i.e. $D$ would tend to zero. In the opposite limit, $\tau_{0} \rightarrow \infty$ (self-trapped polaron), the amplitude mode excitation would still be expected, oscillating around a new equilibrium lattice distortion. We now return to the origin of the peaks observed at both the Type 1 \& 2 surfaces. The extraordinary narrowness of the features, as well as the \textit{a priori} condition of strong electronic correlations, likely precludes any conventional band-theory explanation, such as a flat band or other source of a van Hove singularity. A possible route to an explanation is provided by dynamical mean field theory (DMFT) \cite{Georges1996}. Sharp structures at the Hubbard band edges have been found in treatments of both the dimer \cite{Najera2017,Najera2018} and single-site Hubbard models \cite{Nishimoto2004, Granath2014}. These seem to explain such aspects as the lifetime for double-occupancy at the quasiparticle peak (analogous to $\tau_{\textrm{0}}$) \cite{Ganahl2015}, and the asymmetry between features observed in the UHB and LHB \cite{Granath2014, Najera2018}. However, the dimer model is not applicable to the Type 2 (un-dimerized) surface, and though the single-site model is, the existence of quasiparticles in that model has yet to be firmly established. The salience of \textit{e-ph} coupling in the real material (absent in DMFT treatments mentioned above) suggests an alternative, intuitive interpretation for the narrow peaks as polaronic bound states. Excess electrons injected into a Mott insulator (doublons) can in principle interact with other excitations to form bound states (see for example \cite{Terashige2019}). In this case, the charge of the additional electron may be partially screened by the ionic displacement associated with lattice distortions (phonons), reducing the on-site repulsion $U$ and allowing the bound state to split off from the UHB. This interpretation is supported by the fact that the lowest-lying peak at the Type 2 surface appears to reside outside the UHB, rather than within it. As a final observation, in contrast to the clear and abrupt onset of the UHB, the soft and poorly defined onset of occupied states at each type of surface [seen in Fig. 1(d)], which likely results from the hole-doped character of the sample, may explain the apparent absence of narrow structures at the LHB edge, which would correspond to creation of holons by tunneling of electrons from the sample to the tip, and their respective coupling with the amplitude mode. Markers of such interactions, if they exist, may be smeared out or small enough that they are concealed by noise. In summary, we have observed dynamics induced by electron tunneling into the UHB of Mott insulating 1\textit{T}-TaS$_{2}$ surfaces. This reveals unusual, narrow spectral features possibly corresponding to long-lived quasiparticles or bound states, which couple to the amplitude mode of the CDW, the precursor to the Mott state. These observations provide a nano-scale microscopic view of non-equilibrium behavior, complementary to those observations previously provided using ultra-fast optical and time-resolved photo-emission spectroscopy techniques. Furthermore, they lay down a challenge for theories supporting quantitative model calculations to understand the origin of the unusual UHB edge features, which we anticipate will yield as-yet unknown physics of Mott-Hubbard systems more generally. \section{Materials and Methods} Crystals of 1\textit{T}-TaS$_{2}$ were synthesized and prepared by cleaving at $\approx$77~K in UHV ($P \sim 10^{-10}$ Torr) as described previously \cite{Tani1981, Butler2020}, before insertion into a modified Unisoku 1300 low-temperature STM system held at 1.5~K \cite{Hanaguri2006}. STM measurements were performed using electro-chemically etched tungsten tips, which were characterized and fine-tuned using field ion microscopy and mild indentation at a clean Cu(111) surface. $\frac{\textrm{d}I}{\textrm{d}V}$ conductance was measured using the lock-in technique with frequency $f_{\textrm{mod}}$ = 617.3~Hz and bias modulation of amplitude $V_{\textrm{mod}}$ = 1~mV. \section*{Acknowledgements} We are grateful to Y. Kohsaka, T. Machida, P. A. Lee, D. Mihailovic, Y. Nomura, N. Nagaosa, M. Civelli, V. Dobrosavljevi\'{c} and M. J. Rozenberg for helpful discussions. C.J.B. acknowledges support from RIKEN's Programs for Junior Scientists. This work was supported in part by JSPS KAKENHI grant numbers JP18K13511, JP19H00653, JP19H01855 and JP19H05602. \subsection*{Author contributions} C.J.B, T.H. and Y.I. conceived the project, and M.Y. and Y.I. synthesized the 1\textit{T}-TaS$_{2}$ crystals. C.J.B. performed the STM measurements, interpreted the data and prepared the manuscript with input from all authors. \section*{Data availability} The data that support the findings presented here are available from the corresponding authors upon reasonable request. \section{Setpoint-related and tip-induced effects.} \subsection{Interpretation of the topographs in Fig. 2.} To aid the following discussion of tip-induced effects, and the interpretation of spectroscopic imaging data shown in Fig. 2 of the main work and Figs. S1 \& S3 here, it is worth noting what the accompanying topography maps represent. It is well-known that in the constant-current mode, scanning tunneling microscopy (STM) topographs generally do not simply represent the height of atoms at the sample surface, but rather surfaces of constant integrated local density of states of the sample $\rho_{\mathrm{samp.}}$, according to the commonly adopted approximation \begin{equation*} I \approx -\frac{4 \pi q_{e}}{\hbar} |M|^{2} \rho_{\mathrm{tip}} \int_{E_{\mathrm{F,samp.}}}^{q_{e}V} \rho_{\mathrm{samp.}}(\epsilon) d \epsilon, \end{equation*} in which $E_{\mathrm{F,samp.}} \equiv 0$ eV, and the energy dependence of the tunneling matrix elements $M$ and the tip density of states $\rho_{\mathrm{tip}}$ are assumed to be negligible. Here $q_{e}$ is the electronic charge and $V$ is the sample bias voltage. In the specific case presented in Fig. 2(a) [and (b)] of the main text, the interval between $E_{\mathrm{F,samp.}}$ and $q_{e}V$ = 250~meV [and $q_{e}V$ = 110~meV] only includes the Mott-localized orbitals of the upper Hubbard band (UHB). The conduction band lies beyond this range. Hence, as a crude approximation, the topograph maps the surface of equal probability to tunnel into the Mott-localized Ta $5d_{z^{2}}$ orbital at the cluster center nearest to any given (\textit{x},\textit{y}) location of the tip. This can be thought of as the three-dimensional boundary of the `catchment volume' belonging to each cluster, somewhat analogous to a Voronoi partition. An important outcome of this is that for bias voltages up to a setpoint which only includes the UHB, electrons tunnel into the centrally Mott-localized orbital with equal probability (equal conductance) regardless of whether the tip is positioned above the cluster's center or towards its periphery. The spectroscopic imaging data presented in this work should be interpreted with this in mind. \subsection{Characterization of tip-induced energy shifts.} Below we give a more complete view of the spectroscopic imaging data shown in Fig. 2 of the main text. \begin{figure}[!ht] \centering \includegraphics[scale=1]{FIGS1_v2.eps} \caption{\label{fig:1} Overview of tip-induced influence on spectroscopic imaging data. (a) and (b) Constant-current topographic images of each surface (setpoints \textit{V} = 0.25~V, \textit{I} = 1~nA, and \textit{V} = 0.11~V, \textit{I} = 0.44~nA, respectively). (c) and (d) Selected conductance maps, at 165~mV and 60~mV respectively. (e) and (f) Spectroscopic linecuts taken along the white dashed lines shown in (a) and (b).} \end{figure} Figures S1(a) and (b) reproduce the topographs shown in Fig. 2 of the main manuscript. Conductance maps in each respective field of view, at selected values of bias voltage, are shown in Figs. S1(c) and (d). It is important to recognize that these images do not represent the spatial distributions of the underlying peak features discussed in the main text, because they are significantly influenced by so-called tip-induced band bending (TIBB) effects. The complex ring-like features are amenable to interpretation in combination with the conductance linecuts [(e) and (f)] across the diagonal of each field of view [along each of the arrows shown in (a) and (b)]. The peaks appear in these linecuts as arc-like features, with one arc (and five arcs) spanning each cluster for the Type 1 (Type 2) surface. Given this arc-like appearance, it can be recognized that the ring-like features appearing in the conductance map in panel (c) and especially in (d), actually represent planar ($x,y$) cuts through dome-like structures in the ($x,y,E$) space. This dome-like shape is likely a distortion of an intrinsically flat, tile-like structure, due to TIBB effects. Below we attempt to characterize and compensate for the TIBB effects in order to retrieve a more accurate image of the spatial distribution of the lowest-lying conductance peak feature. The strategy is to acquire spectra at various tip heights, observe the shifts of the lowest-lying peak, and characterize the trend. Finally we extend this characterization to the entire field-of-view to compensate for the TIBB in the spectroscopic imaging data. Starting with the assumption that the sample surface is located in a flat plane we express the tip height above this plane as $z_{\mathrm{tip}}(\textbf{\textit{r}}) = z_{\mathrm{setpoint}}(\textbf{\textit{r}}) + z_{\mathrm{offset}}$, where the constant-current topograph gives $z_{\mathrm{setpoint}}(\textbf{\textit{r}})$. We then vary $z_{\mathrm{offset}}$, as well as exploiting the large variation within $z_{\mathrm{setpoint}}(\textbf{\textit{r}})$, in order to sample a wide range of tip heights. This is shown schematically in Fig. S2(a). For the Type 1 surface, the minimum height is $z_{\mathrm{setpoint}}(\triangledown)$, and the maximum is $z_{\mathrm{setpoint}}(\circ)$ + 120 pm, so that the measurements span a range of nearly 300~pm. (Although the absolute tip-sample separation cannot be known, it is usually estimated to be 600$\sim$800~pm in ordinary constant current feedback mode.) \begin{figure} \centering \includegraphics[scale=1]{FIGS2_v5.eps} \caption{\label{fig:2} Characterization of tip induced energy shift $\mathrm{d}E/\mathrm{d}z_{\mathrm{tip}}$ for each surface. (a) A schematic of the procedure for collecting $z_{\mathrm{offset}}$-dependent d\textit{I}/d\textit{V}(V) spectra. The locations of the CDW maximum and minimum apparent heights, and the location of the point halfway between are marked in the topographic image, with a circle, triangle and wedge, respectively. (The topograph shown is for the Type 2 surface. \textit{V} = 110~mV, \textit{I} = 0.44~nA.) (b) and (c) $\mathrm{d}I/\mathrm{d}V$ curves acquired at $z_{\mathrm{setpoint}}(\circ) + z_{\mathrm{offset}}$ for SD clusters at the Type 1 and 2 surfaces. Curves are vertically offset by 0.4 nS and 0.2 nS, respectively. (d) and (e) The fitted peak positions $E_0^{*}(z_{\mathrm{tip}})$ for the Type 1 and 2 surfaces, respectively. In (d), $\mathrm{d}E_{0}^{*}/\mathrm{d}z_{\mathrm{tip}}$ is obtained from the average of the gradients from separate linear fits to the points obtained at the three different locations.} \end{figure} We then track the tip-induced energy shift by extracting the energy $E_0^{*}$ of the lowest-lying peak in spectra for each tip height. Figures S2(b) \& (c) show examples of spectra acquired at $z_{\mathrm{setpoint}}(\circ) + z_{\mathrm{offset}}$ for each type of surface. The energy of the peak in each spectrum is obtained using fitting of a Lorenztian function with a suitable background. As the peak energy is found to be an approximately linear function of $z_{\mathrm{tip}}(\textbf{\textit{r}})$, the gradients d$E_{0}^{*}$/d$z_{\mathrm{tip}}$ are then obtained using linear fits. The results of this procedure yield d$E_{0}^{*}$/d$z_{\mathrm{tip}}$ = 0.032~meV/pm for the Type 1 surface [Fig. S2(d)], and d$E_{0}^{*}$/d$z_{\mathrm{tip}}$ = 0.061~meV/pm for the Type 2 surface [Fig. S2(e)]. It is unknown why the TIBB effect has a different strength depending on which surface is being measured. Approximating the actual sample surface as perfectly flat, we obtain the compensating energy shift \begin{equation*} E_{\mathrm{shift}}(\textbf{\textit{r}}) = -\frac{dE_{0}^{*}}{dz_{\mathrm{tip}}} \cdot z_{\mathrm{setpoint}}(\textbf{\textit{r}}). \end{equation*} After this energy shift is applied to every pixel, the peaks in the spatially averaged $\mathrm{d}I/\mathrm{d}V$ significantly sharpen. The d\textit{I}/d\textit{V} is then averaged over a 10 meV window around the energy of the lowest-lying peak after the energy shifts. The resulting image represents the spatial distribution of the lowest-lying peak regardless of the energy at which it appears in the raw data. \subsection{Compensation for tip-induced energy shifts in spectroscopic imaging data.} After enacting the procedure described above, the conductance maps at each respective surface, shown in Figs. S3(a) and (b) below, is seen to be nearly uniform within each cluster for the reason described in section A. However, it can change abruptly from one cluster to the next. This attests to the strong localization of the orbitals forming the UHB. There is a noticeably greater anisotropy in the pattern for the Type 2 surface than for the Type 1 surface. This may be related to the lower symmetry in the stacking coordination of the uppermost layer of clusters for the Type 2 surface \cite{Butler2020}. \begin{figure} \centering \includegraphics[scale=1]{FIGS3_v1.eps} \caption{\label{fig:3} Spatial distribution of conductance peaks after compensation for tip-induced effects. (a) and (b) The adjusted $\mathrm{d}I/\mathrm{d}V$ data derived from the same spectroscopic imaging data sets shown for the Type 1 \& 2 surfaces, respectively, in Fig. 2 of the main work and Fig. S1 above.} \end{figure} \section{Comparison of peaks in conductance spectra acquired at Type 1 \& 2 surfaces.} In the main text, a clear Franck-Condon progression of peaks due to coupling of a transient charged state to the CDW amplitude mode has been established for the Type 2 surface (unpaired SD clusters). As seen in Fig. 1(d) of the main work, a sharp peak in conductance also appears at the onset of the UHB for the Type 1 surface. The same fitting algorithm described in the main text was applied to data for the Type 1 surface, and the result is shown in Fig. S4(a), alongside that for the Type 2 surface for comparison [Fig. S4(b)]. Here however, the algorithm does not find an equally spaced series of \textit{e-ph} replica peaks. What is the difference between the two types of surface? Is the difference qualitative, or only an outcome of tuning some of the parameters governing the lineshape? In Eqn. 2 given in the main text, two parameters can control the formation or suppression of multiple \textit{e-ph} peaks: 1) If the \textit{e-ph} coupling $D$ is small, only the lowest-lying peak manifests. 2) If the peak broadening $\Gamma_{n}$ becomes large for $n > 0$, existing \textit{e-ph} replica peaks may be smeared out such that they are not recognizable. It is unclear from the fitting result shown in Fig. S4(a) whether this latter explanation can be supported. \begin{figure}[!ht] \centering \includegraphics[scale=1]{FIGS4_v1.eps} \caption{\label{fig:4} Comparison of spectra acquired at the Type 1 \& 2 surfaces. (a) Results of fitting to an example curve acquired at a Type 1 surface, using the same algorithm as described in the main text. (b) For comparison, the same fitting to the spectrum acquired at the Type 2 surface presented in the main text. (c) and (d) Qualitative depictions showing electron tunneling into the UHB for the type 1 and 2 surfaces. Assuming that the underlying dimerized bulk electronic structure has an energy gap of $\sim$150~meV, similar to the dimerized Type 1 surface, the lower UHB onset for the Type 2 surface leads to the UHB being decoupled from the bulk, in turn leading to long dwell times on the surface SD clusters.} \end{figure} A hint of the mechanism behind the different behaviors is found in the broadening of the lowest-lying peak, $\Gamma_0^{*}$ for each case. For the Type 1 spectrum $\Gamma_0^{*}$ = 4.64~meV, which corresponds to a lifetime of the transient charged state of $\tau _0$ = 71~fs, significantly shorter than the lifetime at the Type 2 surface (152~fs). It is possible that the reduced lifetime of the transient charged state in turn reduces the effective \textit{e-ph} coupling strength, such that no clear Franck-Condon progression develops. This corresponds to an effective reduction of $D$ for the Type 1 surface, suppressing the series of replicas. The reduced lifetime of $\sim$71~fs for the Type 1 surface is closer to the value estimated for the doublon-hole recombination time in a recent report by Ligges \textit{et al.} on time-resolved photoemission spectroscopy measurements \cite{Ligges2018}. (We infer that these measurements were acquired on the Type 1 surface based on the observed energy of the UHB at $E - E_{\mathrm{F}} \approx$ 175 meV, and also on the \textit{a priori} likelihood for any given cleaved surface to be of Type 1 \cite{Butler2020}.) The lifetime estimated in the current work may be longer than the lifetime for the excited state of $\sim$20~fs reported by Ligges \textit{et al.} due to a selection bias inherent to our measurement strategy: We make an effort to avoid, as much as possible, impurities and other defects at the surface, and select for SD clusters in the cleanest areas, whereas photoemission spectroscopy measurements necessarily average over a large surface area including many point defects. This may explain the relatively shorter observed doublon-hole recombination time in the photoemission measurements. The difference in lifetime of the transient charged states at the Type 1 and Type 2 surfaces can be understood by considering the stacking environment and the electronic structure of the both uppermost and underlying TaS$_2$ layers in each case. As proposed recently, the large spectral gap found at the dimerized Type 1 surface likely also corresponds to the bulk spectral gap \cite{Butler2020}, because it is a bulk-like termination of the dimerized three-dimensional CDW pattern. This is depicted in Figs. S4(c) and (d). The lower onset of the UHB at the Type 2 surface, is peculiar to that surface as it likely results from a breaking of the bulk pattern of molecular orbital dimerization. The underlying bulk has a larger gap than the Type 2 surface, and an onset of the UHB at around 140 meV. The UHB at the Type 2 surface, starting at around 60~meV is then electronically decoupled from the underlying layer. An electron dwelling in the bound state of an SD cluster at the Type 2 surface is unable to hop to the underlying layer because that layer has no states at that energy. In contrast, an electron dwelling in a cluster at the Type 1 surface can hop to the UHB at the same energy in the underlying layer. Therefore the transient charged states of the Type 2 surface have enhanced lifetimes, stronger \textit{e-ph} coupling $D$, and a more fully developed series of \textit{e-ph} replicas. \section{Reproducibility of observation of conductance peaks.} From the spectroscopic imaging data presented in Fig. S1 above, it is clear that the spectroscopic characteristics of each individual cluster at a given surface are broadly similar. The features reported in this work were robustly reproducible and seen to be ubiquitous over the surface of several cleaved 1\textit{T}-TaS$_{2}$ samples, although it was found that at or near point defects, either the peaks ceased to exist or their appearance became irregular (even including strong enhancement of the peak intensity for some spectra acquired at the Type 1 surface). The data shown in Figs. 1 \& 2 of the main work represent the typical behaviors observed at least a few nanometers away from defects or CDW domain walls. A single example of a typical spectrum acquired on a cluster at the Type 2 surface is analyzed in the main text. In Figs. S5 (a)--(d), analyses are presented for conductance spectroscopy measurements acquired at four different locations on the same sample with the Type 2 surface termination. Aside from small variations, the behavior is seen to be similar. The parameters $E_{\mathrm{ph}}$, $D$ and $\Gamma_{0}^{*}$, extracted using the same fitting algorithm as described in the main text, are presented in Table I. \begin{figure}[!ht] \centering \includegraphics[scale=1]{FIGS5_v2.eps} \caption{\label{fig:5} (a)--(d) Additional analyses of \textit{e-ph} replicas at different sample locations. The valued for $E_{\mathrm{ph}}$, $D$, and $\Gamma_{0}^{*}$ are given in Table I.} \end{figure} From the additional data presented in Table 1, it can be seen that there is a weak negative correlation between the fitted values of $D$ and $\Gamma_0^{*}$, i.e. there is a positive correlation between $D$ and $\tau_0$. This is consistent with the idea that a longer dwell time for the injected electron on the cluster results in stronger electron-phonon coupling. \begin{table}[!h] \begin{center} \caption{Fitted values for spectra in Fig. S5.} \label{tab:table1} \begin{tabular}{c c c c} \hline \hline Data set & \quad $E_{\mathrm{ph}}$ (meV) & \quad $D$ & \quad $\Gamma_{0}^{*}$ (meV) \\ \hline g181016 & \; 9.00 & \; 1.80 & \; 1.67 \\ s181019 & \; 8.89 & \; 1.73 & \; 2.38 \\ g181030 & \; 8.80 & \; 1.75 & \; 2.17 \\ g181112 & \; 9.03 & \; 1.84 & \; 1.52 \\ \hline \end{tabular} \end{center} \end{table} \newpage \section{Spectroscopic imaging near defects.} For the interpretation of the following observations, our premise is that the narrow peaks arise from interactions between an injected electron (doublon) which dwells in a cluster for a finite time ($\sim$100 fs), and, at least for the Type 2 surface, excites amplitude mode phonons. If for any reason the dwell time of the electron becomes too short, or if a defect of the ionic lattice results in the amplitude mode not being locally supported (most obviously, at a domain wall in the CDW), the peaks should be significantly broadened, or disappear entirely. This expectation is satisfied by the observations below. \begin{figure} \centering \includegraphics[scale=1]{FIGS6_v2.eps} \caption{\label{fig:6} Spectroscopic imaging around a defect at the Type 2 surface. (a) A constant-current topograph (setpoint $V$ = 0.11~V, $I$ = 0.44~nA). (b) A selected conductance map, at 65~mV, showing the darkening of a single SD cluster induced by a point defect [marked with a green cross in both (a) and (b)]. (c) Single-point $\mathrm{d}I/\mathrm{d}V(V)$ spectra on (black curve) and away from the defect (green curve). (d) A spectroscopic linecut sampled along the dashed lines in (a) and (b). The black and green vertical lines correspond to the point spectra shown in (c). Arrows mark the five peaks under discussion.} \end{figure} Figure S6 shows a point defect which impacts one particular SD cluster. This has the effect of drastically smearing out the peaks in that cluster [as seen in panels (c) and (d)], as well as creating some residual density of states below the onset energy of the UHB. We see that the suppression or smearing of the peaks is confined to a single cluster, meaning the conditions giving rise to the peaks are determined locally. \begin{figure} \centering \includegraphics[scale=1]{FIGS7_v1.eps} \caption{\label{fig:7} Spectroscopic imaging near a CDW domain wall at the Type 2 surface. (a) A constant-current topograph ($V$ = 0.25~V, $I$ = 1~nA) showing a domain wall extending from the top to the bottom of the field of view. (b) A spectroscopic linecut sampled on a path marked by the black dashed line in (a). Black and white arrows mark the peaks under discussion.} \end{figure} Figure S7 shows the effect of a CDW domain wall. The series of peaks, shown in the spectroscopic linecut of panel (b), persists until about 2~nm away from the domain wall. Although they suffer from energy shifts associated with the Coulomb potential landscape, we see that these shifts are rigid and the peak spacing is approximately maintained (i.e., $E_{\mathrm{ph}}$ remains the same). The peaks disappear at the domain wall, where the Mott gap partially collapses, as is well-known \cite{Cho2017}, and the amplitude mode phonon is not expected to be supported by the local lattice structure. \begin{figure} \centering \includegraphics[scale=1]{FIGS8_v2.eps} \caption{\label{fig:8} Spectroscopic imaging on approach to a cluster of defects at the Type 1 surface. (a) A topograph ($V$ = 0.25~V, $I$ = 1~nA) showing several defects surrounding a pristine region. The white dashed line encloses a small region where the defects influence the electronic structure, and the green cross marks a defect at which the Mott gap is seen to collapse in the spectroscopic linecut shown in (b), sampled along the path marked by the black dashed line in (a). The location of the same defect is indicated with a green dashed line. (c) A zoom-in view on the same linecut shown in (b), showing the spectroscopic peak at the UHB edge on approach toward the defect-rich area.} \end{figure} A similar observation at the Type 1 surface is shown in Figure S8. Here we see that the sharp peak exists everywhere until a few nanometers away from a prominent local defect, at which the Mott gap collapses. As the topograph shows that SD reconstruction is well-formed everywhere, even at the defects, the breakdown of the peak near the defect is likely purely electronic in nature. For example, the lifetime of the excitation could be drastically shortened by impurity-mediated hopping. \section{Further discussion of the observed phonon energy.} Tentatively attributing our observed phonon energy to the 2.4~THz amplitude mode excitation, we note that the observed peak spacing $E_{\mathrm{ph}} \approx$ 9~meV is 9$\sim$10\% smaller than the previously reported energy of the amplitude mode. We suggest a number of possible reasons for this discrepancy. The first is that a renormalized phonon energy for highly excited states, as compared with the lowest excited or ground state, is possible. The second possibility relates to observations by Stojchevska \textit{et al.} \cite{Stojchevska2014} that the amplitude mode frequency appears to be reduced by a few percent upon laser pulse-induced switching into a ``hidden'' metastable state of the CDW. However it is unclear whether the hidden state has any relation to the Type 2 surface CDW stacking configuration observed here. The third is that the highly localized phonon excitation observed here (localized around a point in the plane of the surface, and also to the uppermost layer), may differ in energy from the case of a photo-excitation induced amplitude mode occurring coherently over a wide area, and throughout the multiple layers probed by photo-excitation measurements. Finally, while we observe this phononic or vibronic excitation in a SD cluster at the Type 2 surface, it is likely that previously reported measurements either were conducted only on the dimerized surface we identify as Type 1 \cite{Butler2020}, or lack the surface specificity to resolve Type 2 behavior even if conducted at a Type 2 surface. It is possible that the energy of the amplitude mode may subtly depend on the stacking configuration of the host SD clusters, and this may explain the small energy discrepancy.
\section{Introduction} Second-order optical nonlinearity gives rise to three wave mixing processes including the linear electrooptic (Pockels) effect, second-harmonic generation (SHG), sum- or difference-frequency mixing as well as parametric generation and amplification \cite{Armstrong1962, Bloembergen1996}. These effects, observed first in inorganic crystal materials, have been demonstrated later also in a broad class of organic, organo-polymeric and organic-inorganic composite materials. In the last decades they have been in the focus of intensive experimental and theoretical studies, since they give rise to a large variety of novel nonlinear optical concepts and corresponding applications \cite{Zelikov}. SHG consists in generating of optical waves of a doubled frequency 2$\omega$ induced by high intensity incident light of frequency $\omega$. By symmetry principles such a nonlinear optical effect, similarly as other three wave mixing processes, is allowed only in non-centrosymmetric media, e.g. polar and piezoelectric crystals. SHG can also be observed in doped polymer films that have previously been subjected to electrical poling, i.e. the exposure of a polymer film being heated to moderate temperatures to an high external electric field \cite{Sahraoui_2009}. This so-called ''corona poling'' induces a preferred orientation of the chromophores in thin surface layers of the polymer films inducing or enhancing thereby a second-order nonlinear polarization and thus nonlinear optical effects. Here, we first explore SHG induced by corona poling in a chromophore-doped polymer film and then we demonstrate that confinement of the identical chromophore in a nanoporous medium can also result in a composite exhibiting SHG - without corona poling. To that end we deposit the chromophore in parallel, tubular nanochannels 13~nm across in silica (\textit{p}SiO$_2$) membranes, see Fig.~1. The channels are of sub-wavelength size and thus allow us by modification of the channel filling to tune the mesoscale light-matter interaction and thus the resulting effective meta-optics \cite{Kadic2019, Sentker2018, Sentker2019, Kolmychek2020} of the nanoporous composite. The chromophoric dimer Ethane-1,2-diyl (2E,2'E)-bis(2-cyano-3-(5-(4-(diphenylamino)phenyl)thiophen-2-yl)acrylate) (hereafter termed D1, see structure in Fig.~1(a)) has been synthesized by linking two identical $\pi$-conjugated push-pull segments through a non-conjugated ethylene chain. The molecular structure of D1 has been confirmed by NMR spectroscopy and high-resolution mass spectrometry. HRMS (EI) calculated for C$_{54}$H$_{38}$N$_4$O$_4$S$_2$ 870.2334, found 870.2338 ($\Delta$= 0.4 ppm). UV-vis (CH$_2$Cl$_2$): $\lambda_{max}$ = 478 nm ($\varepsilon$ = 66500 L$\cdot$mol $^{-1}$$\cdot$cm$^{-1}$). A strong electron-donating triphenylamine group (D) of the D1-dimer is linked to an electron-withdrawing cyanoacrylic ester group (A) by a thiophene ring as $\pi$-spacer. The D-$\pi$-A push-pull segments are characterized by an intramolecular charge transfer band observed in the visible spectral region. The red colored chromophore D1 was used as dopant (10 wt\%) for a poly(methyl methacrylate) (PMMA) host film deposited on a glass substrate, see Fig.~1(b). 5 mg of D1 and 50 mg of PMMA was dissolved in 1 ml of chloroform (CHCl$_3$). The solution was then deposited on an ultrasonically cleaned glass substrate of 1~mm thickness. Spin-coating deposition were performed by a spin coater (Spin200i, POLOS) at 2000~rpm. The thickness of the polymer doped film, characterized with a profilometer (Dektak 6M, Veeco) was 1020$\pm$20 nm. {The free standing \textit{p}SiO$_2$-membranes of 300 $\mu$m thickness were synthesized by thermal oxidation of electrochemically formed \textit{p}Si-membranes at $T=$800 $^o$C for 12~h under normal atmosphere \cite{Sentker2018}. The resulting membranes are characterized by an array of slightly conical nanochannels and an average pore diameter $2R=$13~nm, as determined by recording a volumetric N$_2$-sorption isotherms at $T =$ 77~K. The conicity of the pores results from the unidirectional \textit{p}Si etching process \mbox{\cite{Thelen2020}}. \begin{figure}[htbp] \centering \fbox{\includegraphics[width=0.86\linewidth]{Fig1}} \caption{Molecular structure of the D1 chromophore (a) used as dopant for submicron polymer film (PMMA:D1) spincoated on the glass substrate (b) and as guest material for the host nanoporous silica membrane forming nanocomposite, {\it{p}}SiO$_2$:D1 (c). Section (d) sketches the nonlinear optical setup (SHG experiment): laser Nd:YAG ($\lambda$=1064 nm, 100 $\mu$J, 30 ps,), halfwave plate $\lambda/2$, Glan polarizer GP, lense L, measured sample Smp, interference filter (532 nm) F, photodide PD, photomultiplier PM.} \label{fig:fig1} \end{figure} \begin{figure}[htbp] \centering \fbox{\includegraphics[width=0.85\linewidth]{Fig2}} \caption{SHG response vs incident angle, $\alpha$, for $S$ and $P$ light polarizations measured in an poled and unpoled D1-doped submicron PMMA film, see labels. The insets sketch the corona poling procedure which leads to preferential ordering of chromophore dipole moments parallel to the electric poling field resulting in appearing of macroscopic polarization $\vec{P}$.} \label{fig:fig2} \end{figure} The guest chromophore dimer D1 has been deposited into the pSiO$_2$ by slow evaporation of its nearly saturated chloroform solution imbibed by the pore network, adding in each successive filling step equal portions of D1 chromophore ($\Delta f =$ 0.5\% of pore volume, $f$ is the fraction filling) as controlled and/or verified by optical absorption. In Fig.~1(d) the nonlinear optical setup used to record angular dependencies of the SHG response is sketched. The rotating $\lambda/2$-plate serves to set a polarization direction ($S$- or $P$-component) of the incident picosecond Nd:YAG-laser light ($\lambda$=1064 nm, 100 $\mu$J, 30 ps). The SHG-signal, selected by the interference filter F ($\lambda=532$ nm), is detected by a photomultiplier PM with a boxcar averager (integration time 0.1 s) employing baseline subtraction. The measured SHG signal is normalized to the SHG response of a crystal quartz measured in $ooo$-geometry, i.e. $\chi_{111}($SiO$_2$) component. In Fig.~2 the SHG response for the chromophore doped polymer film is depicted. As expected, the unpoled PMMA:D1 film exibits no SHG effect as explainable by orientational disorder of the chromophores in the polymer host layer. The samples subjected to corona poling (external electric field of 6 kV/cm, time = 60 min, $T$=373 K) result in an SHG response appearing in both $S$- and $P$-polarization. The nonlinear optical conversion is anisotropic with a maximum SHG response at an incident angle $\alpha \approx$60$^o$, apparently dominating in $P$-polarization. \begin{figure}[htbp] \centering \fbox{\includegraphics[width=0.99\linewidth]{Fig3}} \caption{SHG response vs incident angle, $\alpha$, for $S$ (a) and $P$ (b) light polarizations measured in $p$SiO$_2$:D1 nanocomposite for different filling fractions $f$ of guest D1 chromophore, see labeled. Inset: Orientational ordering of elongated D1 molecules in conical nanochannels of mesoporous $p$SiO$_2$ membranes enforced by tubular confinement leads to a macroscopic polarization $\vec{P}$ parallel to channel axes.} \label{fig:fig3} \end{figure} \begin{figure}[htbp] \centering \fbox{\includegraphics[width=0.85\linewidth]{Fig4}} \caption{SHG response vs filling fraction, $f$, for $S$ and $P$ light polarizations measured in $p$SiO$_2$:D1 nanocomposite at the incident angle $\alpha$=60 deg.} \label{fig:fig4} \end{figure} The $p$SiO$_2$-membrane with chromophore coated pore walls, by contrast, exhibits the SHG response without poling, see in Fig.~3 the SHG response versus incident angle, $\alpha$, for $S$- (a) and $P$- (b) light polarizations measured from the $p$SiO$_2$:D1 nanocomposite at different filling fractions of guest D1 molecules deposited in nanochannels. Similarly to the chromophore doped polymer film the SHG response of the $p$SiO$_2$:D1 nanocomposite exhibits a strong spatial anisotropy both with respect to the incident angle and the light polarization. The characteristics of these angular dependencies change somewhat upon increasing fractional filling $f$. However, in all cases both the measured $P$- and $S$-components of the SHG signal almost vanish at normal incidence ($\alpha$=0) and a maximum SHG response is detectable for incident angles, 50$<\alpha<$70$^o$. More surprising and unusual are the dependencies of the measured SHG signals on the fraction filling $f$. In Fig.~4 we present the SHG responses versus $f$ for $S$- and $P$-polarization components of the $p$SiO$_2$:D1 nanocomposite at an incident angle $\alpha$=60 deg as derived from the data presented in Fig.~3. At small $f$ both SHG signals rise reaching their maxima at $f\approx$2.5 wt\% and then gradually decrease with increasing $f$. The measured optical absorption spectra of the $p$SiO$_2$:D1 hybrid, presented in Fig.~5, shed light on a potential reason for such a behavior. The characteristic feature of these spectra is a quite broad optical absorption band, centered at about 450~nm, strongly rising with concentration of deposited chromophore molecules in the mesoporous silica matrix, i.e. the fraction filling $f$ of the nanochannels. The narrow SHG emission at 532 nm appears in the region of the long-wavelength wing of this band, as marked by a vertical line in Fig.~5, and is considerably absorbed. In terms of the Lambert-Beer law the SHG intensity decays exponentially with the concentration of deposited molecules in nanochannels. Accordingly, at large filling fractions only a thin surface layer of chromophore doped silica matrix is expected to contribute effectively to the outcoming SHG light. Thus, one expects a saturation of the SHG intensity at larger $f$ and a subsequent decrease in agreement with the observations, see Fig.~5. \begin{figure}[htbp] \centering \fbox{\includegraphics[width=0.77\linewidth]{Fig5}} \caption{Optical absorbance vs filling fraction, $f$, measured in $p$SiO$_2$:D1 nanocomposite at several filling fractions, see labeled. Vertical lines trace wavelengths of fundamental (1064 nm) and SHG radiations.} \label{fig:fig5} \end{figure} The observation of an SHG effect in $p$SiO$_2$:D1 nanocomposite constitutes an interesting finding with regard to potential applications as nonlinear optical materials. It is however also a very interesting observation from a fundamental point of view and deserves a more detailed discussion. In the chromophore doped polymer film the second-order nonlinear polarization is induced by corona poling, i.e. orientation and/or conformational distortion of chromophores molecules under a long term action of high electric field applied to the composite polymer film at temperatures close to the polymer glass transition point $T_g$. In the $p$SiO$_2$:D1 nanocomposite, however, the second-order optical nonlinearity likely follows from the geometrical confinement along with the conicity of the channels. From liquid-crystal based nanocomposites it is known that confinement in nanochannels effectively acts like a geometrical field \cite{Kityk1,Kutnjak1}. Particularly, it results for rod-like nematic molecules confined in cylindrical nanochannels to preferred molecular orientations along the channel axis in the pore wall proximity, i.e. the spatial constraints act similar as external electric or magnetic fields \cite{Kityk1,Kutnjak1}. Such a phenomenology may also explain the peculiar optical behavior of the elongated D1 molecules. Presumably, during the deposition they get preferentially oriented along the nanochannels, as sketched in the insert of Fig.~3(a). Note that it has been established for liquid crystalline systems that the strength of the confinement-induced molecular ordering field or capillary nematization \cite{Roij2000} is $\sigma \propto R^{-1}$. Thus, the effective moments enforcing axial alignment of the guest molecules are expected to be large here, since the average channel diameter ($2R=13$ nm) is only a few times the length of the chromophore molecules ($L_{D1}\sim$ 3.6 nm). \begin{figure}[htbp] \centering \fbox{\includegraphics[width=0.65\linewidth]{Fig6}} \caption{Examples of equilibrium (metastable) conformations of dimer molecule D1 obtained by DFT optimization in the ground state. (a) represents strait centrosymmetric conformation with zero permanent dipole moment ($\vec{P}=$0). (b) and (c) are the two examples of bend shaped conformations characterized by large permanent dipole moment ($\vec{P} \ne$ 0).} \label{fig:fig6} \end{figure} A crucial issue in these considerations is the polar property of the guest molecules. For D1 it strongly depends on the conformation. In Fig.~6 we show examples of equilibrium conformations of the dimer molecule obtained by Density Functional Theory (DFT) optimization (CAM-B3LYP functional, 6-31+G(d,p) basis set) in the ground state using the Gaussian-16 quantum-chemical package \cite{Gaussian16}. Amazingly, the molecules characterized by the most stable centrosymmetric conformation (see Fig.~6(a)) have zero dipole moment ($\vec{P}=$0) and do not contribute to a second-order nonlinear polarization. Rotations of molecular segments about single bonds result, however, in a number of metastable non-centrosymmetric conformations. Some of them are characterized by quite large permanent dipole moments, as examplified in Figs.~6(b) and 6(c). Due to small energy barriers these metastable conformational states may be thermally activated or induced by interfacial interactions with the pore walls. Thus we suggest that this molecular polarity along with the confinement-induced alignment in conical channels results in a macroscopic polarization along the channel axis and thus causes the SHG effect, see Fig. \ref{fig:fig2}. A quantitative description of the SHG effect would necessitate a thorough determination of confined, non-centrosymmetric D1 confirmations, which goes beyond of our dominantly experimental study. In conclusion we demonstrate that it is possible to embed the chromophore dimer D1 into polymer PMMA films and mesoporous silica (pSiO$_2$) matrices with mean pore diameter of 13 nm. The synthesized PMMA:D1 and pSiO$_2$:D1 composites exhibit second-order nonlinear optical properties. The SHG response, absent in the unpoled chromophore doped polymer film, appears after long-term poling in high electric fields performed at temperatures close to the polymer glass transition point $T_g$. More importantly, the nanoporous pSiO$_2$ membranes with chromophore coated pore walls exhibit an SHG response without poling. We explain this by an orientational ordering of elongated guest chromophore molecules in the tubuluar, slightly conical nanochannels, i.e. as orientational alignment of chromophore molecules enforced by the geometrical confinement fields. From a more general perspective our study exemplifies how by filling of nanoporous media confinement-controlled ordering on the single-pore scale can be employed to tune the sub-wavelength light-matter interaction and thus the effective meta-optics of the hybrid materials. From a materials science perspective the resulting hybrids have an integrated optical functionality in combination with a mechanical rigidity provided by the nanoporous silica scaffold structure. Thus our study is a fine example, how self-organized nanoporosity in solids in combination with confinement-induced orientational order of organic chromophores results in materials with a non-linear meta-optics. \justify \begin{Large} \sffamily{\textbf{Funding.}} \end{Large} {The presented results are part of a project that has received funding from the} European Union’s Horizon 2020 research and innovation programme under the Marie Sk{\l}odowska-Curie grant agreement No 778156. Support from resources for science in years 2018-2022 granted for the realization of international co-financed project Nr W13/H2020/2018 (Dec. MNiSW 3871/H2020/2018/2). DFT calculations have been carried out using resources provided by Wroclaw Centre for Networking and Supercomputing (http://wcss.pl), grant No. 160. P.H. acknowledges support by the Deutsche Forschungsgemeinschaft within the SFB 986 ({\#}192346071). \justify \begin{Large} \sffamily{\textbf{Disclosures.}} \end{Large} The authors declare no conflicts of interest. \bigskip
\section{Introduction} Continuous-variable optical quantum information processing has attracted much attention for its extent scalability achieved by large-scale cluster states \cite{doi:10.1126/science.aay2645,doi:10.1126/science.aay4354} which enable universal Gaussian operations \cite{PhysRevApplied.16.034005,larsen2021deterministic}. As a next step for the realization of practical quantum information processing, quantum error correction \cite{gottesman2010introduction} is an essential key. Gaussian error is the most common type of error in optical systems. It includes photon losses and Gaussian quantum channel \cite{harrington2001achievable} which is defined as phase-space displacements following an isotropic Gaussian distribution. It has been proven, however, that Gaussian errors imposed on Gaussian states cannot be corrected using only Gaussian operations \cite{eisert2002distilling,niset2009no}. Therefore, non-Gaussian states play an crucial role in the optical quantum information processing. Gottesman-Kitaev-Preskill (GKP) error correction \cite{gottesman2001encoding} is one of the promising ways to correct Gaussian errors using a single-mode states. It uses highly complex non-Gaussian states called GKP states to correct errors. The information regarding displacements on both $x$ and $p$ quadratures imposed on GKP states is extracted by homodyne measurements and ancillary GKP states in the error syndrome measurement \cite{gottesman2001encoding}. Although $x$ and $p$ are non-commutative conjugate observables whose simultaneous measurement is prohibited by the uncertainty principle, the non-Gaussianity of GKP states and the prior information that the displacement is small enable accurate estimation of both parameters. However, GKP states are difficult to experimentally generate due to their high non-Gaussianity. Although their generation has been reported in other physical systems \cite{fluhmann2019encoding,campagne2020quantum}, optical generation of GKP states have not been achieved yet. Several other protocols for correcting Gaussian errors using non-Gaussian states (called bosonic codes) are known \cite{Terhal_2020}, but it has not been unraveled how experimentally feasible and simpler non-Gaussian states such as Fock states can be exploited for quantum error correction. In this paper, we investigate a multi-parameter quantum estimation \cite{personick1971application,yuen1973multiple,holevo2011probabilistic,paris2009quantum,helstrom1976quantum,braunstein1994statistical} problem of displacements using non-Gaussian states. We assume an isotropic Gaussian prior distribution of the parameters and post-select measurement outcomes. First we derive a lower bound for the estimation error when only Gaussian states and Gaussian operations are used. Then we show that this bound can be beaten for some range of the prior variance even with only simple non-Gaussian states such as single-photon states. This result reveals the role of non-Gaussianity in the estimation of displacements and opens up the possibility of correcting Gaussian errors using experimentally feasible non-Gaussian states. We also derive a lower bound of the estimation error depending on the maximum photon number of the input state based on Ghosh's bound \cite{ghosh1993cramer}. We evaluate the estimation error using the mean square error averaged with respect to the posterior distribution with the measurement outcome fixed. This is because it corresponds to the natural situation where one knows the prior distribution of the parameters and can post-select ``good'' measurement outcomes that reduces the estimation error. Although this criteria is different from frequentist estimation error (which fixes the true value of the parameter and takes average with respect to the measurement outcomes) or the Bayesian estimation error (which takes average with respect to both the true value and the measurement outcomes), it is a commonly used method in Bayesian statistics \cite{e20090628}. Reference \cite{duivenvoorden2017single} also studies the simultaneous displacement estimation problem using non-Gaussian states, although they adopt frequentist estimation error. For Gaussian states, estimation of displacement is a classical problem and has many previous studies \cite{assad2020accessible,bradshaw2018ultimate,genoni2013optimal}. For single-parameter estimation using non-Gaussian states, there have been some recent researches \cite{oh2020optical,mccormick2019quantum}. In Sec.~\ref{section:estimation_problem}, we formulate the Gaussian displacement estimation problem. In Sec.~\ref{section:gaussian_bound}, we derive lower bounds for the estimation error when only Gaussian (classical) states and Gaussian operations are used. In Sec.~\ref{section:non_gaussian}, we show that the bounds derived in Sec.~\ref{section:gaussian_bound} can be beaten using non-Gaussian states. In Sec.~\ref{section:lower_bound}, a statistical lower bound on the estimation error which depends on the maximum photon number and the post-selection probability is obtained, based on Ghosh's bound. Sec.~\ref{sec:conclusion} summarizes our paper and introduces some future works. \section{Gaussian displacement estimation problem}\label{section:estimation_problem} \begin{figure}[ht] \centering \includegraphics{displace_estimation.pdf} \caption{A schematic representation of Gaussian displacement estimation problem. One estimates the amount of displacement $\xi,\eta$ using the measurement outcome $y$, which correspnds to a POVM element $\hat{E}_y$. One can use prior information that $\xi,\eta$ follow an isotropic Gaussian distribution Eq.~(\ref{eq:gaussian_prior_dist}).} \label{fig:displacement_estimation} \end{figure} Figure \ref{fig:displacement_estimation} depicts the Gaussian displacement estimation problem. We consider a single-mode bosonic state $\hat{\rho}$ represented by quadrature operators $\hat{x},\hat{p}$ satisfying $\qty[\hat{x},\hat{p}]=i$. The phase space displacement operator $\hat{D}(\xi,\eta)$ is defined as \begin{equation} \hat{D}(\xi,\eta)=\exp(i\eta\hat{x}-i\xi\hat{p}), \end{equation} and represents a displacement $(x,p)\to(x+\xi,p+\eta)$. First $\hat{D}(\xi,\eta)$ acts on $\hat{\rho}$, then a measurement is performed, and the measurement outcome $y$ is obtained. This measurement corresponds to some POVM (positive operator valued measure) $\{\hat{E}_y\}$ satisfying $\int \hat{E}_y dy=\hat{I}$, where $\hat{I}$ is an identity operator. We assume that $\xi,\eta$ are random variables following an isotropic Gaussian distribution with known variance and mean $0$: \begin{equation} p(\xi,\eta)= \frac{1}{\pi v}\exp(-\frac{\xi^2+\eta^2}{v}).\label{eq:gaussian_prior_dist} \end{equation} Note that the mean square distance with respect to this distribution is $\expval{\xi^2}+\expval{\eta^2}=v$. Displacement following an isotropic Gaussian distribution corresponds to a common type of noise in bosonic systems called Gaussian quantum channel \cite{harrington2001achievable}, or additive Gaussian noise. The problem is to estimate $(\xi,\eta)$ from the value of $y$. We assume that one performs a Bayesian estimation using the \textit{a priori}{} information Eq.~(\ref{eq:gaussian_prior_dist}). The conditional probability density of obtaining $y$, when the values of $(\xi,\eta)$ are fixed, is given by \begin{equation} p(y|\xi,\eta)=\Tr{\hat{D}(\xi,\eta)\hat{\rho}\hat{D}^\dagger(\xi,\eta)\hat{E}_y},\label{eq:cond_prob} \end{equation} where $\Tr{\cdot}$ denotes the trace operation. Defining the Wigner function $W_{\hat{A}}$ of an operator $\hat{A}$ by \begin{equation} W_{\hat{A}}(x,p):=\frac{1}{2\pi}\int \exp(ipx')\Braket{x-\tfrac{x'}{2}|\hat{A}|x+\tfrac{x'}{2}} dx', \end{equation} Equation (\ref{eq:cond_prob}) can be expressed in terms of Wigner functions of $\hat{\rho}$ and $\hat{E}_y$ \cite{leonhardt2010essential}: \begin{equation} p(y|\xi,\eta)=2\pi\int W_{\hat{\rho}}(x-\xi,p-\eta)W_{\hat{E}_y}(x,p) dxdp.\label{eq:cond_prob_wigner} \end{equation} Once the value of $y$ is known, one gets the corresponding posterior distribution of $\xi,\eta$: \begin{equation} p(\xi,\eta|y)=\frac{p(y|\xi,\eta)p(\xi,\eta)}{p(y)},\label{eq:post_prob} \end{equation} where $p(y)=\int\int p(y|\xi,\eta)p(\xi,\eta) d\xi d\eta$ is the marginal probability distribution of $y$. Suppose one estimates the values of $\xi,\eta$ as $\tilde{\xi}(y),\tilde{\eta}(y)$, corresponding to the value of $y$. To evaluate the accuracy of the estimation, the mean square error with respect to the joint probability distribution is one of the standard choices in Bayesian quantum estimation: \begin{equation} v'_{\mathrm{Bayes}}:=\int p(\xi,\eta,y) \qty{(\xi-\tilde{\xi}(y))^2+(\eta-\tilde{\eta}(y))^2} d\xi d\eta dy,\label{eq:vp_bayes_definition} \end{equation} where $p(\xi,\eta,y)=p(y|\xi,\eta)p(\xi,\eta)$ is the joint probability distribution of $(\xi,\eta,y)$. However, here we consider the post-selection of a specific measurement outcome $y$, and take average only with respect to the true value $\xi,\eta$, obtaining \begin{equation} v':=\int p(\xi,\eta|y) \qty{(\xi-\tilde{\xi}(y))^2+(\eta-\tilde{\eta}(y))^2} d\xi d\eta.\label{eq:vp_definition} \end{equation} The meaning of this quantity can be considered as the expected amount of error after obtaining the outcome $y$. Note that more generally there are other options for the estimation error measure (\textit{e}.\textit{g}.{} mean square error with a general weight matrix \cite{gill1995applications,tsang2020physics}), and here we choose this $v'$ for simplicity. We consider the case $\tilde{\xi}(y),\tilde{\eta}(y)$ are chosen as the averages with respect to the posterior distribution: \begin{align} \tilde{\xi}(y)&=\int p(\xi,\eta|y) \xi d\xi d\eta,\\ \tilde{\eta}(y)&=\int p(\xi,\eta|y) \eta d\xi d\eta, \end{align} which is the optimal choice to minimize $v'$. For any probability density function $g$ satisfying $\int g(\xi,\eta)d\xi d\eta=1$ and $ g(\xi,\eta)>0$, we define $\Sigma[g(\xi,\eta)]$ as the covariance matrix of $(\xi,\eta)$ with respect to $g(\xi,\eta)$. Then, $v'$ can also be expressed as \begin{equation} v'=\Tr{\Sigma[p(\xi,\eta|y)]}.\label{eq:vp_trace} \end{equation} Note that $v'$ depends on the measurement outcome $y$. Usually, in Bayesian quantum estimation, one evaluates the error of estimation by averaging over the measurement outcomes \cite{paris2009quantum}. However, in this paper, we allow post-selection of $y$ to get smaller $v'$. In Sec.~\ref{section:gaussian_bound}, we see that one can still obtain lower bounds on $v'$ with this assumption. We also assume that there exists no initial entanglement between the input state and the measurement system. The case where entanglements exist is studied in \textit{e}.\textit{g}.{} Ref.~\cite{genoni2013optimal}, and it is shown that the amount of displacement can be estimated in arbitrary high precision if one uses two-mode squeezed vacuum with high squeezing level. \section{Classical and Gaussian bounds}\label{section:gaussian_bound} In this section, we derive lower bounds on the estimation error $v'$ (Eq.~(\ref{eq:vp_definition})), when only Gaussian states and Gaussian operations are allowed. We only have to consider the case where $\hat{\rho}$ is a pure Gaussian state and $\hat{E}_y\propto\ketbra{\psi}{\psi}$ for some pure Gaussian state $\ket{\psi}$. Indeed, suppose we have $\hat{\rho}=t\hat{\rho}_1+(1-t)\hat{\rho}_2, 0<t<1$. Then $v'(\hat{\rho})\geq \min\qty{v'(\hat{\rho}_1),v'(\hat{\rho}_2)}$ because the variance is concave with respect to the probability distribution. In the same way, one can also show that mixing $\hat{E}_y$ does not reduce $v'$ either. Wigner functions of pure Gaussian states can be written as \begin{equation} W(x,p)=\frac{1}{\pi}\exp(-\frac{1}{2}(\boldsymbol{q}-\boldsymbol{\mu})^T\boldsymbol{\Sigma}(\boldsymbol{q}-\boldsymbol{\mu})), \end{equation} where $\boldsymbol{q}:=(x,p)^T$, and $\boldsymbol{\mu}$ and $\boldsymbol{\Sigma}$ are parameters representing the mean and the covariance matrix of the Gaussian function, and $\boldsymbol{\Sigma}$ satisfies $\det\boldsymbol{\Sigma}=\frac14$. Note that this constraint means that the Heisenberg's uncertainity is saturated by pure Gaussian states \cite{jackiw1968minimum}. Thus, Wigner functions of $\hat{\rho}$ and $\hat{E}_y$ are both Gaussian functions, and satisfy \begin{equation} \det\Sigma[W_{\hat{\rho}}(\xi,\eta)]=\det\Sigma[W_{\hat{E}_y}(\xi,\eta)]=\frac{1}{4}\label{eq:uncertanity}. \end{equation} Here we extend our definition of $\Sigma$ in the last section to unnormalized distribution functions by defining $\Sigma[g(\xi,\eta)]:=\Sigma[\bar{g}(\xi,\eta)]$ for any unnormalized distribution function $g(\xi,\eta)$ satisfying $\int g(\xi,\eta)d\xi d\eta<\infty$ and $ g(\xi,\eta)>0$, where $\bar{g}(\xi,\eta)=Ng(\xi,\eta)$ is the normalization of $g$ which satisfies $\int \bar{g}(\xi,\eta)d\xi d\eta=1$. Note that although generally Wigner functions can have negative parts, Gaussian Wigner functions are positive and thus can be regarded as probability distributions. Using Eq.~(\ref{eq:cond_prob_wigner}) and a property of convolution, $p(y|\xi,\eta)$ is also Gaussian with respect to $(\xi,\eta)$, and its covariance matrix is \begin{equation} \Sigma[p(y|\xi,\eta)]=\Sigma[W_{\hat{\rho}}(\xi,\eta)]+\Sigma[W_{\hat{E}_y}(\xi,\eta)].\label{eq:variance_additivity} \end{equation} Furthermore, from Eq.~(\ref{eq:post_prob}), $p(\xi,\eta|y)$ is also Gaussian, and \begin{equation} \Sigma[p(\xi,\eta|y)]^{-1}=\Sigma[p(y|\xi,\eta)]^{-1}+\Sigma[p(\xi,\eta)]^{-1}\label{eq:variance_harmonic_mean} \end{equation} holds. \subsection{Classical bound} First we consider the case when only classical states, \textit{i}.\textit{e}.{} coherent states, are available as $\hat{\rho}$. In this case, we have $\Sigma[W_{\hat{\rho}}(\xi,\eta)]=\frac{1}{2}I$, where $I$ is the identity matrix. From Eq.~(\ref{eq:uncertanity}), two eigenvalues of $\Sigma[W_{\hat{E}_y}(\xi,\eta)]$ can be written as $a/2,1/(2a)$ for $a>0$. Then, from Eqs.~(\ref{eq:vp_trace}), (\ref{eq:variance_additivity}) and (\ref{eq:variance_harmonic_mean}), one obtains \begin{equation} v'=\frac{1}{2/v+2/(1+a)}+\frac{1}{2/v+2a/(1+a)}. \end{equation} This is minimized when $a=1$, regardless of the value of $v$. Therefore, in this case, optimal $\hat{E}_y$ is a projection to a classical state, and the classical lower bound of $v'$ is given by \begin{equation} v'_{\mathrm{C}}=\frac{2v}{v+2}.\label{eq:classical_bound} \end{equation} \subsection{Gaussian bound} Next we consider the case where arbitrary Gaussian states and operations can be used. For positive definite $2\times2$ matrices $A,B$, \begin{equation} \det(A+B)\geq\det A+\det B +2\sqrt{\det A\det B}\label{eq:det_ineq} \end{equation} holds (See Appendix \ref{section:det_ineq} for the derivation). Using this fact and Eqs.~(\ref{eq:uncertanity}) and (\ref{eq:variance_additivity}), one can show that \begin{equation} \det\Sigma[p(y|\xi,\eta)]\geq 1.\label{eq:gaussian_condition} \end{equation} Conversely, any Gaussian $p(y|\xi,\eta)$ satisfying Eq.~(\ref{eq:gaussian_condition}) is possible by taking $\Sigma[W_{\hat{\rho}}(\xi,\eta)]=\Sigma[W_{\hat{E}_y}(\xi,\eta)]=\Sigma[p(y|\xi,\eta)]/2$. Because $p(y|\xi,\eta)$ minimizing $v'$ must saturate Eq.~(\ref{eq:gaussian_condition}), its two eigenvalues can be written as $a,1/a$ for some $a>0$, and \begin{equation} v'=\frac{1}{2/v+a}+\frac{1}{2/v+1/a} \end{equation} holds. The value of $a$ which minimizes $v'$ depends on the value of $v$. When $v>2$, $a=1$ minimizes $v'$. This means that choosing vacuum (or coherent) states for both of $\hat{\rho}$ and $\hat{E}_y$ is optimal, hence the minimum of $v'$ coincides with the classical bound, $\frac{2v}{v+2}$. On the other hand, when $v<2$, by taking $a\to0$ or $a\to\infty$, \textit{i}.\textit{e}.{} taking both $\hat{\rho}$ and $\hat{E}_y$ to be infinitely squeezed states, $v'$ approaches to the lower bound $v/2$. It is precisely half of the original variance $v$, because variance along the squeezed direction is made $0$, and the variance along the antisqueezed direction remains $v/2$. To summarize, the Gaussian lower bound of $v'$ is given by \begin{equation} v'_{\mathrm{G}}=\begin{dcases}\frac{v}{2}&(v<2)\\\frac{2v}{v+2}&(v>2)\end{dcases}.\label{eq:gaussian_bound} \end{equation} Note that the lower bounds of the Bayesian estimation error $v'_{\mathrm{Bayes}}$ (Eq.~(\ref{eq:vp_bayes_definition})) in these settings are also given by $v'_{\mathrm{C}}$ and $v'_{\mathrm{G}}$ in Eqs.~(\ref{eq:classical_bound}) and (\ref{eq:gaussian_bound}), because these bounds are independent of the measurement outcome $y$ (The classical bound $v'_{\mathrm{C}}$ matches with the result in Ref.~\cite{genoni2013optimal}, which is derived as the Bayesian RLD (right logarithmic derivative) quantum Cram\'{e}r-Rao bound. They also show the tightness of the bound.). This means that post-selection does not improve the estimation accuracy in these settings, which we will show is not true for non-Gaussian cases. \section{Estimation using non-Gaussian states}\label{section:non_gaussian} In this section, we show that the bounds introduced in Sec.~\ref{section:gaussian_bound} can be beaten using non-Gaussian states, and a heterodyne measurement, which is widely used for simultaneous measurements of both quadratures \cite{walker1986multiport,takeda2013generation,wodkiewicz1984operational,miyata2016implementation}. As examples of non-Gaussian states, we consider GKP state \cite{gottesman2001encoding}, which is expected to give high estimation accuracy as in Ref.~\cite{duivenvoorden2017single}, and Fock states, which are experimentally feasible for small photon numbers. \subsection{Heterodyne measurement} \begin{figure}[ht] \centering \includegraphics{dual_homodyne.pdf} \caption{The case when one uses heterodyne measurement as the measurement in Fig.~\ref{fig:displacement_estimation}. The state to be measured is first combined with an ancillary state by a half beam splitter, then $\sqrt{2}\hat{x}$ and $\sqrt{2}\hat{p}$ are measured on each mode. The corresponding POVM is expressed by Eq.~(\ref{eq:dualhomodyne_povm}).} \label{fig:dual_homodyne} \end{figure} As the measurement $\{\hat{E}_y\}$ for the system in Fig.~\ref{fig:displacement_estimation}, we consider a setup called heterodyne measurement shown in Fig.~\ref{fig:dual_homodyne}, which consists of a half beam splitter, an ancillary state $\hat{\rho}'$, and two homodyne measurements. The input state after the displacement is combined with $\hat{\rho}'$ by the half beam splitter, then $\sqrt{2}\hat{x}$ and $\sqrt{2}\hat{p}$ are measured on each mode. The case when $\hat{\rho}'$ is a vacuum state can be seen as a sampling from Husimi Q function and has wide applications, \textit{e}.\textit{g}.{} state verifications \cite{walker1986multiport,takeda2013generation}. Here we consider a more general case where any single-mode state can be used as $\hat{\rho}'$ \cite{wodkiewicz1984operational,miyata2016implementation}. Denoting two measurement outcomes as $y=(y_x,y_p)$, the corresponding POVM element is \cite{leonhardt2010essential} \begin{equation} \hat{E}_{y_x,y_p}=\frac{1}{2\pi}\hat{D}(y_x,y_p)\hat{\rho}'^*\hat{D}^\dagger(y_x,y_p),\label{eq:dualhomodyne_povm} \end{equation} where $\hat{\rho}'^*$ is the operator whose matrix elements are the complex conjugate of those of $\hat{\rho}'$. Because taking the complex conjugate corresponds to the time reversal operation, the Wigner function of $\hat{\rho}'^*$ is given by $W_{\hat{\rho}'^*}(x,p)=W_{\hat{\rho}'}(x,-p)$.Therefore, substituting Eq.~(\ref{eq:dualhomodyne_povm}) into Eq.~(\ref{eq:cond_prob}), one can see that the conditional probability density $p(y_x,y_p|\xi,\eta)$ only depends on $(\xi-y_x,\eta-y_p)$: \begin{equation} \begin{split} &p(y_x,y_p|\xi,\eta)\\ =&\frac{1}{2\pi}\Tr{\hat{D}(\xi-y_x,\eta-y_p)\hat{\rho}\hat{D}^\dagger(\xi-y_x,\eta-y_p)\hat{\rho}'^*}\\ =&f(\xi-y_x,\eta-y_p), \end{split} \end{equation} where the ``filter function'' $f$ is determined by $\hat{\rho}$ and $\hat{\rho}'$, as \begin{equation} f(x,p):=\int W_{\hat{\rho}}(x'-x,p'-p)W_{\hat{\rho}'}(x',-p') dx'dp'\label{eq:filter_function} \end{equation} using Eq.~(\ref{eq:cond_prob_wigner}). From Eq.~(\ref{eq:post_prob}), the posterior distribution of $\xi,\eta$ is obtained by multiplying the prior distribution by the filter function displaced by the measurement outcome $y_x,y_p$: \begin{equation} p(\xi,\eta|y_x,y_p)\propto p(\xi,\eta)f(\xi-y_x,\eta-y_p).\label{eq:bayesian_inference} \end{equation} Note that this form of measurement is not only experimentally feasible, but also quite general in the presence of post-selection, because having any POVM element $\hat{E}$ is equivalent to taking $\hat{\rho}'^*\propto \hat{E}$ and post-selecting $y_x=y_p=0$ in this heterodyne setting. \subsection{Estimation using GKP state} GKP state, or grid state \cite{duivenvoorden2017single}, is a non-Gaussian state used for GKP error correction \cite{gottesman2001encoding}, and is defined as \begin{equation} \ket{\mathrm{GKP}}\propto\sum_{s=-\infty}^\infty \ket{x=\sqrt{2\pi}s}. \end{equation} Note that this state is not normalizable, therefore an unphysical state. The Wigner function of GKP state is a sum of Dirac delta functions: \begin{equation} W_{\mathrm{GKP}}(x,p)\propto\sum_{s=-\infty}^\infty\sum_{t=-\infty}^\infty(-1)^{st}\delta(x-\sqrt{\pi/2}s)\delta(p-\sqrt{\pi/2}t) \end{equation} If one takes $\hat{\rho}=\hat{\rho}'=\ketbra{\mathrm{GKP}}{\mathrm{GKP}}$, the filter function Eq.~(\ref{eq:filter_function}) becomes \begin{equation} f_{\mathrm{GKP}}(x,p)=\sum_{s=-\infty}^\infty\sum_{t=-\infty}^\infty\delta(x-\sqrt{2\pi}s)\delta(p-\sqrt{2\pi}t) \end{equation} Reference \cite{duivenvoorden2017single} points out that this (unphysical) GKP state can achieve 0 estimation error in the non-Bayesian setting with the local unbiasedness condition. It is expected to achieve good estimation accuracy also in our setting, where we consider Bayesian estimation with post-selection. This is because the prior information that $(\xi,\eta)$ is near origin and the locally sharp structure of the filter function circumvent the uncertainty principle. The line labeled `GKP' in Fig.~\ref{fig:v_vs_vp} shows the relation between $v$ and $v'$, when one takes $\hat{\rho}=\hat{\rho}'=\ketbra{\mathrm{GKP}}{\mathrm{GKP}}$ and $(y_x,y_p)=(0,0)$ is post-selected. One can see that $v'$ is largely reduced compared to the Gaussian and classical bounds for small $v$. Note that even with the ideal GKP state, the Bayesian estimation error $v'$ remains finite due to the finite tail of the Gaussian prior distribution, unlike in frequentist's locally unbiased estimation schemes such as Ref.~\cite{duivenvoorden2017single}. On the other hand, $v'$ becomes larger than the classical bound in the region $v\geq 2$. This may be due to the fact that the filter function $f_{\mathrm{GKP}}(x,p)$ has a large variance. Note also the similarity of this setting with the error syndrome measurement for the GKP code \cite{gottesman2001encoding}, where the SUM gate is used instead of the beam splitter. \begin{figure}[htp] \centering \includegraphics[width=0.9\linewidth]{v_vs_vp_2p5.pdf} \caption{The relation between $v$ and $v'$. `$n=1$', `$n=2$', `$n=3$': when $\hat{\rho}=\hat{\rho}'=\ketbra{n}{n}$, and $(y_x,y_p)=(0,0)$ is post-selected. `GKP': when $\hat{\rho}=\hat{\rho}'=\ketbra{\mathrm{GKP}}{\mathrm{GKP}}$, and $(y_x,y_p)=(0,0)$ is post-selected. `$v'_{\mathrm{Bayes}} (n=1)$': when $\hat{\rho}=\hat{\rho}'=\ketbra{1}{1}$, and without post-selection. $v'_{\mathrm{C}}$ and $v'_{\mathrm{G}}$ are the classical and Gaussian bounds derived in Sec.~\ref{section:gaussian_bound}, respectively.} \label{fig:v_vs_vp} \end{figure} \subsection{Estimation using Fock states} While the GKP state is obviously useful for the estimation of displacement, experimental generation of (an approximation with physical state of) it has not been realized in optics. We now discuss whether the Gaussian bound can be beaten using experimentally feasible non-Gaussian states. Fock states $\ket{n}$ are the most simple examples of non-Gaussian states, and also experimentally feasible when $n$ is small \cite{ourjoumtsev2006quantum,yukawa2013generating}, although it is still harder than Gaussian states. If one takes $\hat{\rho}=\hat{\rho}'=\ketbra{n}{n}$, the filter function Eq.~(\ref{eq:filter_function}) becomes \begin{equation} f_n(x,p)= \frac{1}{2\pi}\qty[L_n\qty(\frac{x^2+p^2}{2})]^2\exp(-\frac{x^2+p^2}{2}),\label{eq:fock_filter} \end{equation} where $L_n(\cdot)$ is the Laguerre polynomial. $f(x,0)$ for $n=0,1,2,3$ is shown in Fig.~\ref{fig:fock_filters}. The distance from the origin to the first zero of $f_n$ scales as $n^{-1/2}$ \cite{GATTESCHI20027}. Thus, roughly speaking, for sufficiently small $v$ and when $(y_x,y_p)=(0,0)$ is post-selected, $f_n$ acts like a Gaussian function of variance $\sim n^{-1}$, therefore Fock states are candidates for good input states. Note that when $\hat{\rho}=\hat{\rho}'^*$, $f_n(x,p)$ always has a maximum value $1/(2\pi)$ at the origin. Figure \ref{fig:v_vs_vp} shows the relation between $v$ and $v'$ for $n=1,2,3$. For comparison, the Bayesian estimation error $v'_{\mathrm{Bayes}}$ without post-selection (Eq.~(\ref{eq:vp_bayes_definition})) for $n=1$ is also shown. One can see that the estimation accuracy is improved by post-selection, and even when $n=1$, the Gaussian bound is beaten in some range of $v$. We also calculate the effect of photon losses on both input states for the case $\hat{\rho}=\hat{\rho}'=\ketbra{1}{1}$, as is important for an actual experimental realization (Fig.~\ref{fig:loss_effect}). We assume the same amount of losses for $\hat{\rho}$ and $\hat{\rho}'$. Losses up to 8.9\% and 50\% are allowed for beating the Gaussian bound and the classical bound, respectively. Note that practically post-selecting a single value of $(y_x,y_p)$ is impossible in continuous-variable measurements such as the heterodyne measurement, and one has to select events in some range of $(y_x,y_p)$ to have sufficiently high post-selection probability. In Appendix \ref{section:finite_prob}, we include an analysis of the case selecting finite range of outcomes with finite probability in the single-photon case. It shows that the classical and Gaussian bounds are still beaten in some range of $v$, with finite post-selection probability. It is interesting to observe that for all GKP state and Fock states cases, $v'$ becomes $1$ at $v=2$. In fact, one can explicitly show that when $v=2$, $v'\geq 1$ holds for arbitrary $\hat{\rho}$ and $\hat{E}_y$, and the equality holds when $\hat{\rho}\propto\hat{E}_y\propto\ketbra{\psi}{\psi}$ for some $\ket{\psi}$. See Appendix \ref{section:vp_limit_v2} for the derivation. \begin{figure}[htp] \centering \includegraphics[width=0.9\linewidth]{fock_filters.pdf} \caption{The filter function $f_n(x,0)$ when $\hat{\rho}=\hat{\rho}'=\ketbra{n}{n}$ for $ n=0,1,2,3$ (Eq.~(\ref{eq:fock_filter})).} \label{fig:fock_filters} \end{figure} \begin{figure}[htp] \centering \includegraphics[width=0.9\linewidth]{loss_effect.pdf} \caption{The relation between $v$ and $v'$, when $\hat{\rho}=\hat{\rho}'=(1-l)\ketbra{1}{1}+l\ketbra{0}{0}$, where $l$ corresponds to the photon loss rate.} \label{fig:loss_effect} \end{figure} \section{Analysis on lower bounds for non-Gaussian states}\label{section:lower_bound} We return to the general setting in Sec.~\ref{section:estimation_problem}. One natural matter of interest is to find better input states, and find the limit of estimation using non-Gaussian states. Generally, preparation of non-Gaussian states with large photon number is difficult, and experimentally feasible states lie in a subspace with some maximum photon number \cite{yukawa2013generating}. In this section, we discuss lower bounds on $v'$, when $\hat{\rho}$ is a superposition of Fock states up to the maximum photon number $n$. In quantum estimation theory, the Cram\'{e}r-Rao bound \cite{braunstein1994statistical,paris2009quantum,martinez2017quantum,cramer1999mathematical,helstrom1976quantum} is often used to obtain a lower bound on the estimation error. Because we have prior information and post-select a single measurement outcome in our case, we use an inequality called Ghosh's bound instead \cite{ghosh1993cramer}. See Appendix~\ref{section:gen_van_trees} for the detailed derivation of Ghosh's bound and its evaluation. According to the inequality, a lower bound for $v'$, when the measurement outcome is $y$, is given by \begin{align} v'\geq\frac{4}{F_0(y)+F(y)},\label{eq:gen_van_trees} \end{align} where $F_0(y)$ and $F(y)$ are defined as: \begin{align} F_0(y)&:=\sum_i\int p(\boldsymbol{\theta}|y)\qty(-\frac{\partial^2}{\partial \theta_i^2} \log p(\boldsymbol{\theta})) d\boldsymbol{\theta},\label{eq:fisher0}\\ F(y)&:=\sum_i\int p(\boldsymbol{\theta}|y)\qty(-\frac{\partial^2}{\partial \theta_i^2} \log p(y|\boldsymbol{\theta})) d\boldsymbol{\theta}.\label{eq:fisher} \end{align} Here we write $\boldsymbol{\theta}:=(\theta_1,\theta_2):=(\xi,\eta)$, $(\hat{q}_1,\hat{q}_2):=(\hat{x},\hat{p})$, and $d\boldsymbol{\theta}:=d\theta_1 d\theta_2$. The quantities $F(y)$ and $F_0(y)$ can be considered as variants of Fisher information. There is an upper bound on $F(y)$: \begin{equation} F(y) \leq \sum_i\int d\boldsymbol{\theta} \frac{p(\boldsymbol{\theta})}{p(y)}\Tr{\qty(2\qhat_i\hat{\rho} \qhat_i+\qhat_i^2 \hat{\rho}+\hat{\rho} \qhat_i^2)\Ehat_{y|\boldsymbol{\theta}}},\label{eq:fisher_expression} \end{equation} where \begin{equation} \Ehat_{y|\boldsymbol{\theta}}:=\hat{D}^\dagger(\boldsymbol{\theta})\hat{E}_y\hat{D}(\boldsymbol{\theta}) \end{equation} (see Appendix~\ref{section:gen_van_trees} for the derivation). For the Gaussian prior distribution Eq.~(\ref{eq:gaussian_prior_dist}), $F_0(y)$ is simply a constant: \begin{equation} F_0(y)=\frac{4}{v}. \end{equation} Therefore, inequality Eq.~(\ref{eq:gen_van_trees}) can be transformed as \begin{equation} \frac{1}{v'}\leq\frac{1}{v}+\frac{F(y)}{4}.\label{eq:vp_bound} \end{equation} An upper bound for $F(y)$, in the case when the maximum photon number of $\hat{\rho}$ is $n$, can be obtained using the Schwarz inequality. For pure $\hat{\rho}=\ketbra{\psi}{\psi}$, we have \begin{equation} \begin{split} \sum_i \Tr{\qhat_i\hat{\rho} \qhat_i \Ehat_{y|\boldsymbol{\theta}}}&\leq \sqrt{\sum_i\Tr{\qhat_i^2\hat{\rho} \qhat_i^2\hat{\rho}}}\sqrt{2\Tr\hat{E}_y^2}\\ &=\sqrt{\sum_i(\Braket{\psi|\qhat_i^2|\psi})^2}\sqrt{2\Tr\hat{E}_y^2}\\ &\leq \sum_i \Braket{\psi|\qhat_i^2|\psi}\sqrt{2\Tr\hat{E}_y^2}\\ &=\Braket{\psi|(2\hat{n}+1)|\psi}\sqrt{2\Tr\hat{E}_y^2}\\ &\leq \sqrt{2}(2n+1)\sqrt{\Tr\hat{E}_y^2}, \end{split}\label{eq:upper_bound_1} \end{equation} Here we used the Schwarz inequality with respect to the inner product $\left<A,B\right>:=\sum_i \Tr{\hat{A}_i \hat{B}_i^\dagger}$ in the first inequality, taking $\hat{A}_i=\hat{q}_i\hat{\rho}\hat{q}_i, \hat{B}_i=\Ehat_{y|\boldsymbol{\theta}}$. The second inequality follows from the fact that $x^2+y^2\leq(x+y)^2$ for $x,y>0$. In the same way, considering an inner product $\left<A,B\right>:=\Tr{\hat{A} \hat{B}^\dagger}$ and taking $\hat{A}=\sum_i \hat{q}_i^2\hat{\rho}$ and $\hat{B}=\Ehat_{y|\boldsymbol{\theta}}$, we get \begin{equation} \begin{split} \sum_i \Tr{\qhat_i^2\hat{\rho} \Ehat_{y|\boldsymbol{\theta}}}&\leq \sqrt{\Tr{(\sum_i\qhat_i^2)^2\hat{\rho}^2}}\sqrt{\Tr\hat{E}_y^2}\\ &\leq \sqrt{\bra{\psi}(\sum_i\qhat_i^2)^2\ket{\psi}}\sqrt{\Tr\hat{E}_y^2}\\ &=\sqrt{\bra{\psi}(2\hat{n}+1)^2\ket{\psi}}\sqrt{\Tr\hat{E}_y^2}\\ &\leq (2n+1)\sqrt{\Tr\hat{E}_y^2}. \end{split}\label{eq:upper_bound_2} \end{equation} Therefore, from Eq.~(\ref{eq:fisher_expression}), we obtain \begin{equation} F(y)\leq 2(\sqrt{2}+1)(2n+1)\frac{\sqrt{\Tr\hat{E}_y^2}}{p(y)}.\label{eq:fisher_info_bound} \end{equation} Since the left-hand sides of Eqs.~(\ref{eq:upper_bound_1}) and (\ref{eq:upper_bound_2}) are linear in $\hat{\rho}$, the bound Eq.~(\ref{eq:fisher_info_bound}) also holds for arbitrary mixed $\hat{\rho}$. From Eqs.~(\ref{eq:fisher_info_bound}) and (\ref{eq:vp_bound}), one obtains a lower bound of $v'$: \begin{equation} \frac{1}{v'}\leq\frac{1}{v}+ (\sqrt{2}+1)(n+1/2)\frac{\sqrt{\Tr\hat{E}_y^2}}{p(y)}.\label{eq:vp_bound_final} \end{equation} The $\mathcal{O}(n)$ upper bound of $F(y)$ is similar to the result in Ref.~\cite{duivenvoorden2017single}, which studies the case with no prior information and derives an $\mathcal{O}(n)$ upper bound for the Fisher information. They stated that whether the $n$ scaling of the Fisher information is achievable or not is an open problem, and argued that Fock states $\ket{n}$ do not achieve it due to the fringe of the likelihood function (the filter function $f_n(x,p)$ in our setting) \cite{duivenvoorden2017single}. Similarly in our problem, if we take $\hat{\rho}=\hat{E}_y=\ketbra{n}{n}$ and increase $n$ for fixed $v$, $1/v'-1/v$ only behaves $\sim n$ up to some maximum $n$ (which depends on $v$) and then decreases, while $p(y)$ also gradually decreases (Figs.~\ref{fig:n_vs_fisher} and \ref{fig:n_vs_py}). This result is consistent with the observation that the filter function Eq.~(\ref{eq:fock_filter}) behaves like a Gaussian with variance $\sim n^{-1}$ only when $v$ is smaller than this variance. \begin{figure}[htp] \centering \includegraphics[width=0.9\linewidth]{fisher.pdf} \caption{The relation between $n$ and $1/v'-1/v$ for fixed values of $v$, when $\hat{\rho}=\hat{E}_y=\ketbra{n}{n}$.} \label{fig:n_vs_fisher} \end{figure} \begin{figure}[htp] \centering \includegraphics[width=0.9\linewidth]{py.pdf} \caption{The relation between $n$ and $p(y)$ for fixed values of $v$, when $\hat{\rho}=\hat{E}_y=\ketbra{n}{n}$.} \label{fig:n_vs_py} \end{figure} The bound Eq.~(\ref{eq:vp_bound_final}) also depends on the normalized post-selection probability density $\frac{p(y)}{\sqrt{\Tr\hat{E}_y^2}}$. This implies that one can possibly obtain large $F(y)$ at the expense of small post-selection probability density. In fact, even when $n=1$, one can construct an example where $1/v'-1/v$ is inversely proportional to $\frac{p(y)}{\sqrt{\Tr\hat{E}_y^2}}$ when $\frac{p(y)}{\sqrt{\Tr\hat{E}_y^2}}\to 0$. See Appendix \ref{section:smallp} for a detail. \section{Conclusion}\label{sec:conclusion} We have considered the problem of estimating the amount of random displacement that follows an isotropic Gaussian distribution. We have shown that there is a lower bound on the estimation error $v'$ when only Gaussian states and Gaussian operations are used. This bound can be beaten for some range of the prior variance $v$, using only linear optics and simple non-Gaussian states such as single-photon states. When the maximum photon number of the input state is $n$, $1/v'-1/v$ has an $\mathcal{O}(n)$ upper bound which is also inversely proportional to the post-selection probability. Because of the similarity of the estimation of displacement to the error syndrome measurement in GKP code \cite{gottesman2001encoding}, extending the method proposed in this paper may lead to an error correcting code using experimentally feasible non-Gaussian states such as single photon states, which is important from a practical point of view. The Gaussian bound derived in this paper seems to correspond to the impossibility of correcting Gaussian errors using Gaussian states \cite{niset2009no}. Finding more direct connection between the estimation of displacement and the quantum error correction is a promising future work. Another possible future work is to find the best input state and POVM for a given constraint, \textit{e}.\textit{g}.{} maximum photon number. The bound Eq.~(\ref{eq:vp_bound_final}) is not necessarily tight, but for quantum estimation of displacement, many kinds of lower bounds for the estimation error are known \cite{tsang2020physics,nagaoka2005new,rubio2020bayesian}, and some of them have been shown to be efficiently solvable \cite{conlon2020efficient,sidhu2019tight}. It is possible that they can be extended to our setting. \begin{acknowledgments} This work was partly supported by JST [Moonshot R\&D][Grant No.~JPMJMS2064], JSPS KAKENHI (Grant No.~18H05207, No.~21J11615), UTokyo Foundation, and donations from Nichia Corporation. \end{acknowledgments}
\section{Introduction} The original motivation of the present article was to study the asymptotic behavior as $L\to\infty$ of the high part of the spectrum of the Anderson Hamiltonian $$ \mathcal{H}_L := -\partial_t^2 + dB\;,\quad t\in(0,L)\;,$$ endowed with Dirichlet b.c., where $B$ is standard Brownian motion. It is known~\cite{Fukushima} that $\mathcal{H}_L$ is a self-adjoint operator with discrete spectrum, bounded below and of multiplicity one. In the sequel we denote by $(\lambda_k)_{k\ge 1}$ the increasing sequence of eigenvalues of $\mathcal{H}_L$ and by $(\varphi_k)_{k\ge 1}$ the associated sequence of eigenvectors normalized in $L^2(0,L)$.\\ By high part, we mean eigenvalues of order $L$ or more. More precisely, we aimed at understanding the local statistics of $\mathcal{H}_L$ near some energy level $E=E(L)$ that goes to $\infty$ with at least linear speed in $L$. This question falls in the topic of Anderson localization for Schr\"odinger operators: it is expected that, the higher $E$ lies within the spectrum the less localized the eigenvectors are. In the companion papers~\cite{DL1,DL3}, we showed that around energies $E \ll L$, the local statistics of the eigenvalues converge to a Poisson point process and the eigenvectors are localized.\\ In the present article, we will show that the rest of the spectrum is delocalized. However two distinct regimes will arise:\begin{enumerate} \item Critical: $E \sim L/\tau$ for some $\tau \in (0,\infty)$, \item Top: $E \gg L$. \end{enumerate} The most interesting case will be the Critical regime, so we now focus on it. At the end of the introduction, we will present our results in the other regime. \bigskip There is a formal analogy between our Critical regime, and the behavior of critical models of $N\times N$ tridiagonal matrices of the form ``discrete Laplacian + diagonal noise'' as studied by Kritchevski, Valk\'o and Vir\'ag in~\cite{KVV}. It was shown therein that the spectrum of these models, after appropriate recentring around some energy level that depends on a parameter $\tau \in (0,\infty)$, converges in law as $N\to\infty$ to a random point process that they called $\mbox{Sch}_\tau$. The denomination ``critical'' for the underlying matrix models comes from the following fact: the family of point processes $\mbox{Sch}_\tau$ that arises in the limit interpolates between the Poisson point process ($\tau =\infty$, see \cite{AllezDumazSine} for a proof for a related model) and the picket fence $2\pi {\symb Z}$ ($\tau=0$).\\ The point process $\mbox{Sch}_\tau$, introduced in \cite{KVV}, admits a nice characterization in terms of a coupled system of SDEs. Let $\mathcal{B}$ and $\mathcal{W}$ be independent real and complex\footnote{By complex Brownian motion, we mean that the real and imaginary parts are independent standard Brownian motions.} Brownian motions, and consider \begin{align} d\Theta_\lambda(t) = \frac{\lambda}{2} dt + \frac{\sqrt{\tau}}{2} d\mathcal{B}(t) + \frac{\sqrt{\tau}}{2\sqrt 2} \Re(e^{2i \Theta_\lambda(t)} d\mathcal{W}(t))\;, t\in [0,1]\;, \lambda \in {\symb R}\;, \label{defThetagl} \end{align} where $\Theta_\lambda(0):=0$ (note that this family $(\Theta_\lambda)_\lambda$ depends on $\tau$). The point process $\mbox{Sch}_\tau$ can be defined as \begin{align} \mbox{Sch}_{\tau} := \{ \lambda \in {\symb R}: \Theta_{\lambda}(1) \in \pi {\symb Z}\}\;.\label{Characdiffusion:Schtau} \end{align} \medskip Our first result shows not only convergence of the local statistics of $\mathcal{H}_L$ near $E\sim L/\tau$ towards $\mbox{Sch}_\tau$, but also the joint convergence of the eigenvalues and eigenvectors (rescaled into probability measures) to an explicit $2d$-point process whose first component is $\mbox{Sch}_\tau$. To state the result, let us introduce \begin{align} d \rho_{\lambda}(t) = \frac{\tau}{8} dt + \frac{\sqrt{\tau}}{2\sqrt 2} \Im(e^{2i \Theta_\lambda(t)} d\mathcal{W}(t))\;,\quad t\in [0,1]\;,\quad \lambda \in {\symb R}\;, \label{defrhogl} \end{align} with $\rho_\lambda(0) = 0$. Let us also set $\ell_E := \{L\sqrt E\}_\pi$ where $\{x\}_\pi$ is the unique value in $[0,\pi)$ such that $x= \{x\}_\pi$ modulo $\pi$. \begin{theorem}\label{Th:Joint1} Fix $\tau > 0$ and assume that $E=E(L) \sim L/\tau$. As $L\to\infty$, the random point process \begin{align*} \Big\{\Big((L/\sqrt{E})(\lambda - E) + 2\ell_E, \; L \,\varphi^2_\lambda(L t) dt\Big), \;\lambda \mbox{ is an eigenvalue of }\mathcal{H}_L \Big\} \end{align*} converges in law to \begin{align*} \Big\{\Big(\lambda, \frac{e^{2\rho_{\lambda}(t)} dt}{\int_{[0,1]} e^{2\rho_{\lambda}(t)} dt} \Big), \;\lambda \in \mbox{Sch}_\tau \Big\}\;. \end{align*} \end{theorem} \noindent In this statement, point processes are seen as elements of the set of locally finite measures on ${\symb R}\times \mathcal{P}([0,1])$ endowed with the vague topology, that is, the topology that makes continuous $\mu \mapsto \langle \mu,f\rangle$ for all bounded and continuous maps $f:{\symb R}\times\mathcal{P}([0,1])\to{\symb R}$ that are compactly supported in their first coordinate. \bigskip At this point, two natural questions arise:\begin{enumerate} \item Does there exist a self-adjoint operator whose spectrum is given by $\mbox{Sch}_\tau$ and whose eigenvectors are (related to) the processes $e^{2\rho_{\lambda}}$ ? \item Does the above convergence hold at the level of operators ? \end{enumerate} \bigskip We positively answer to both questions. Let us mention here that Valk\'o and Vir\'ag have constructed in~\cite{VVoperator} a general framework of random operators, corresponding to the limit of several famous random matrices models and notably the bulk, soft and hard edges of $\beta$-ensembles. In particular, they have introduced an operator whose spectrum corresponds to the translation invariant version of $\mbox{Sch}_\tau$. Those operators are defined through the theory of \emph{canonical systems} of De Branges \cite{DeBranges}. In the present paper, we also rely on the theory of canonical systems to construct an operator whose spectrum is given by $\mbox{Sch}_\tau$. However, our operator takes a different form from those appearing in~\cite{VVoperator}. This is due to our additional constraint on the eigenvectors (they must be related to $e^{2\rho_\lambda}$) that is absent in~\cite{VVoperator}: recall that we impose ourselves this additional constraint in order for our operator to arise as a scaling limit of $\mathcal{H}_L$. We refer to Remark \ref{Rk:VV} for more comments on the difference with~\cite{VVoperator}. We also believe that our approach sheds some light on the class of operators that should appear as scaling limits of tridiagonal matrices or continuum random Schr\"odinger operators. \subsection*{The Critical Schr\"odinger operator $\mathtt{CS}_\tau$} Let us start by introducing the limiting operator and its first properties. We (formally) define the following operator on $L^2([0,1],{\symb R}^2)$, that we call $\mathtt{CS}_\tau$ for Critical Schr\"odinger: \begin{equation} \mathtt{CS}_\tau := 2 \begin{pmatrix} 0 & -\partial_t\\ \partial_t & 0 \end{pmatrix}+ \sqrt{\tau} \begin{pmatrix} d\mathcal{B} + \frac1{\sqrt 2} d\mathcal{W}_1 & \frac1{\sqrt 2} d\mathcal{W}_2\\ \frac1{\sqrt 2} d\mathcal{W}_2 & d\mathcal{B} - \frac1{\sqrt 2} d\mathcal{W}_1\end{pmatrix}\;, \label{DefopSch} \end{equation} where $\mathcal{B},\mathcal{W}_1,\mathcal{W}_2$ are independent Brownian motions. The precise definition will be given in Section \ref{sec:limitingoperator}, let us only mention that we endow this operator with Dirichlet b.c., that is, any function $f\in L^2([0,1],{\symb R}^2)$ lying in the domain is such that $f(0)$ and $f(1)$ are parallel to $(0,1)^\intercal$, where we denote by $M^\intercal$ the transpose of any matrix $M$. Let us emphasize that the operator $\mathtt{CS}_\tau$ acts on a space of ${\symb R}^2$-valued functions while our initial operator $\mathcal{H}_L$ acts on ${\symb R}$-valued functions: the reason for the ``enlargement'' of the underlying space will appear below. Note also that $\mathtt{CS}_\tau$ is of the form \begin{align*} 2 \mat{0}{-\partial_t}{\partial_t}{0} + \mbox{ ``noise matrix''}\,, \end{align*} a form that was conjectured by Edelman-Sutton~\cite{EdelmanSutton} for the limit of certain tridiagonal ensembles. \begin{theorem}\label{Th:Sch} The operator $\mathtt{CS}_\tau$ is self-adjoint with discrete spectrum. Its collection of eigenvalues and normalized eigenvectors coincides in law with $$\Big\{ (\lambda, \Psi_{\lambda}) : \Theta_{\lambda}(1) \in \pi {\symb Z} \Big\}\;,$$ where $\Psi_\lambda := \frac{e^{\rho_{\lambda}}}{\| e^{\rho_\lambda} \|_{L^2([0,1])}} \begin{pmatrix} \sin \Theta_\lambda \\ \cos \Theta_\lambda \end{pmatrix}$, where $\Theta_\lambda$ and $\rho_\lambda$ follow the diffusions \eqref{defThetagl} and \eqref{defrhogl}. \end{theorem} \medskip Before we address our second question, let us compute the intensity measure of the point process of eigenvalues / eigenvectors, that is, the measure on ${\symb R}\times\mathcal{C}([0,1],{\symb R}^2)$ defined by $$ \mu_\tau(A) := \mathbb{E}\Big[\sum_{\lambda: \Theta_{\lambda}(1) \in \pi {\symb Z}} \un_A\big(\lambda,\Psi_{\lambda}(\cdot)\big)\Big]\;.$$ Let $g_{m,\sigma^2}$ be the density of the real gaussian law $\mathcal{N}(m,\sigma^2)$. \begin{theorem}\label{Th:Intensity} For any non-negative measurable map $G$ on ${\symb R}\times \mathcal{C}([0,1],{\symb R}^2)$ we have \begin{align*} \int G(\lambda, \Psi) d\mu_\tau(\lambda, \Psi)= \int \sum_{n \in {\symb Z}} \mathbb{E}\Big[G\big(\lambda, X^{(n)}\big)\Big] g_{\lambda, \frac32 \tau}(2n\pi) d\lambda\;, \end{align*} where $$ X^{(n)}(t) = \frac{e^{\frac{\sqrt \tau}{2\sqrt{2}}\mathcal{B}_1(t-U) - \frac{\tau}8 |t-U| }}{\big\| e^{\frac{\sqrt \tau}{2\sqrt{2}}\mathcal{B}_1(\cdot-U) - \frac{\tau}8 |\cdot - U| } \big\|_{L^2([0,1])}}\begin{pmatrix} \sin \beta^{(n\pi)} (t) \\\cos \beta^{(n\pi)} (t) \end{pmatrix}\;,\quad t\in [0,1]\;,$$ and\begin{itemize} \item $\mathcal{B}_1$ is a two-sided, real Brownian motion, \item $\beta^{(n\pi)}$ is a scaled Brownian bridge between $(0,0)$ and $(1,n\pi)$: $$ \beta^{(n\pi)}(t)= \frac{1}{2} \sqrt{\frac{3\tau}{2}}(\mathcal{B}_2(t) - t\mathcal{B}_2(1)) + n \pi t \;,\quad t\in [0,1]\;,$$ associated to an independent Brownian motion $\mathcal{B}_2$, \item $U$ is a uniform random variable on $[0,1]$ independent of $\mathcal{B}_1$ and $\mathcal{B}_2$. \end{itemize} \end{theorem} As an immediate corollary of this result we recover the density of the intensity measure of $\mbox{Sch}_\tau$, already obtained in Theorem 10 of \cite{KVV} with a different method: \begin{align*} \mathbb{E}\Big[\sum_{\lambda \in \mbox{Sch}_{\tau}} G(\lambda)\Big] &= \int_\lambda G(\lambda) \sum_{n \in {\symb Z}} g_{\lambda, \frac32 \tau}(2n\pi) d\lambda\,. \end{align*} Note that the above density is not translation invariant: it is only $2\pi$-periodic. As $\tau\downarrow 0$, the intensity measure converges to $\sum_{n\in{\symb Z}} \delta_{2n\pi}$, the intensity measure of the so-called picket fence. On the other hand, as $\tau \uparrow \infty$, it ``converges'' to an infinite uniform measure on ${\symb R}$. This is another hint that $\mbox{Sch}_\tau$ is critical, in the sense that it interpolates between the localized and delocalized phases of Schr\"odinger operators. \subsection*{Convergence of the eigenvectors} We now address our second question on the convergence at the operator level. Given the statement of Theorem \ref{Th:Joint1}, one naturally starts from the recentered operator $(L/\sqrt E)(\mathcal{H}_L - E) + 2\ell_E$.\\ For convergence purposes, one would like to deal with functions on $(0,1)$ instead of $(0,L)$. Therefore we conjugate this operator with the rescaling map $g \mapsto g(L\; \cdot )$ from $(0,L)$ to $(0,1)$ and this yields\footnote{The corresponding conjugation is not unitary, unless one defines ${\mathcal{H}}^{(E)}$ on the Hilbert space $L^2((0,1),L dt)$.} the operator ${\mathcal{H}}^{(E)}$ defined through \begin{align} {\mathcal{H}}^{(E)} f := -\frac1{L\sqrt E} f'' + \sqrt{\frac{L}{E}} dB^{(L)} f + (2\ell_E - L\sqrt E) f\;,\quad t\in [0,1]\;,\label{defopHE} \end{align} where $B^{(L)}(t) = L^{-1/2} B(t L)$ is again a standard Brownian motion. The eigenvalues and (normalized) eigenvectors $(\lambda, {\varphi}_\lambda^{(E)})$ of ${\mathcal{H}}^{(E)}$ are in one-to-one correspondence with those of $\mathcal{H}_L$ via \begin{equation}\label{Eq:varphimu} {\varphi}^{(E)}_\lambda = \sqrt L \,\varphi_\mu(L\; \cdot)\;,\quad \lambda = \frac{L}{\sqrt E}( \mu - E) + 2\ell_E\;. \end{equation} Note that the domain of ${\mathcal{H}}^{(E)}$ is a subset of $L^2((0,1),dt)$ which is nothing but the image of the domain of $\mathcal{H}_L$ through the rescaling map. \bigskip Looking back at the statement of Theorem \ref{Th:Joint1}, we observe that the point process that appears in the limit is nothing but the following projection of the eigenvalues / eigenvectors of $\mathtt{CS}_\tau$ $$\bigg\{ \Big(\lambda, {|\Psi_{\lambda}|^2}\Big) : \Theta_{\lambda}(1) \in \pi {\symb Z} \bigg\}\;.$$ A first naive guess would then be that the operator ${\mathcal{H}}^{(E)}$ converges to $\mathtt{CS}_\tau$, and this would formally imply that the eigenvectors ${\varphi}^{(E)}_\lambda$ converge to the eigenvectors of $\mathtt{CS}_\tau$. It turns out that in this regime of energy, the eigenvectors ${\varphi}^{(E)}_\lambda$ oscillate too much to converge as functions: indeed, from standard arguments of the theory of Sturm-Liouville operators, one can deduce that their numbers of zeros on $(0,1)$ is of order $L\sqrt E$.\\ One actually needs to remove these oscillations for the eigenvectors to converge. This can be done by considering the associated probability measures as we did in Theorem \ref{Th:Joint1}. However, in order to get convergence at the operator level, we need to remove these oscillations at the level of the \emph{functions}. To do so, we successively apply two transformations: \medskip \emph{Step 1: From ${\symb R}$ to ${\symb R}^2$.} We consider the pair formed by the eigenvector and its derivative: $$ \begin{pmatrix} \varphi_\lambda^{(E)} \\ \frac1{L\sqrt E} (\varphi_\lambda^{(E)})'\end{pmatrix}\;.$$ \emph{Step 2: Unrotate.} Set\footnote{While $L\sqrt E$ is nothing but the order of magnitude of the oscillations of ${\varphi}_\mu^{(E)}$, the correction $\ell_E$, which is of order $1$, is more subtle: it is chosen in such a way that the rotation preserves the Dirichlet b.c.} $E' := L\sqrt E -\ell_E$ and introduce the (evolving) rotation matrix \begin{align} C_{E'} = C_{E'}(t) := \begin{pmatrix} \cos E' t & - \sin E' t \\ \sin E' t & \cos E' t\end{pmatrix}\;.\label{def:CE'} \end{align} \indent Then, we define \begin{equation}\label{Eq:PsiE} \Psi_\lambda^{(E)} := C_{E'} \begin{pmatrix} \varphi_\lambda^{(E)} \\ \frac1{L\sqrt E} (\varphi_\lambda^{(E)})'\end{pmatrix}\;.\end{equation} \begin{theorem}[Joint convergence of the eigenvalues and eigenvectors]\label{Th:Joint2} Fix $\tau > 0$ and consider $E=E(L) \sim L/\tau$. As $L\to\infty$, the point process on ${\symb R}\times \mathcal{C}([0,1],{\symb R}^2)$: \begin{align*} \Big\{\Big(\lambda,\frac{\Psi^{(E)}_\lambda}{\|\Psi^{(E)}_\lambda\|_{L^2([0,1],{\symb R}^2)}}\Big), \;\lambda \mbox{ eigenvalue of }\mathcal{H}^{(E)} \Big\} \end{align*} converges in law to the point process of eigenvalues/eigenvectors of $\mathtt{CS}_{\tau}$, i.e. \begin{align*} \{(\lambda, \Psi_{\lambda}), \;\lambda \mbox{ eigenvalue of }\mathtt{CS}_\tau\}\;. \end{align*} \end{theorem} \noindent In this statement, the point processes are seen as elements of the set of measures on ${\symb R}\times \mathcal{C}([0,1],{\symb R}^2)$ that are finite on $K\times \mathcal{C}([0,1],{\symb R}^2)$ for any compact set $K\subset {\symb R}$, endowed with the smallest topology that makes continuous $\mu \mapsto \langle \mu,f\rangle$ for all bounded and continuous maps $f:{\symb R}\times\mathcal{C}([0,1],{\symb R}^2)\to{\symb R}$ that are compactly supported in their first coordinate.\\ This result, combined with our description of the intensity measure of $\mathtt{CS}_\tau$ given in Theorem \ref{Th:Intensity}, proves part (4) of~\cite[Conjecture 1.3]{RV} on the universal shape of a \emph{typical eigenvector} associated to a ``high eigenvalue'' of $\mathcal{H}_L$. It is interesting to note that such a behavior can already be observed for the eigenvectors in the localized regime of $\mathcal{H}_L$ but for high enough energies (energies of order $1 \ll E \ll L$), see \cite{DL3} for more details. It is conjectured in~\cite{RV} that this shape should appear for various critical operators thus its denomination ``universal''. It was also proved to arise in another random Schr\"odinger model recently, see \cite{Nakano2019}. \subsection*{Convergence at the operator level} Theorem \ref{Th:Joint2} establishes a relationship between the eigenvalues/eigenvectors of $\mathtt{CS}_\tau$ and those of $\mathcal{H}_L$. However it does not exactly answer our second question, and more importantly, it does not explain how the form \eqref{DefopSch} taken by $\mathtt{CS}_\tau$ arises from $\mathcal{H}_L$. This is the purpose of our next result.\\ Given Theorem \ref{Th:Joint2}, our second question can be rephrased as follows: is there an operator associated to the point process $(\lambda,\Psi_\lambda^{(E)})$ and does this operator converge to $\mathtt{CS}_\tau$ ?\\ We will see later on that a.s.~the space generated by the family of functions $\{\Psi^{(E)}_\lambda\}_\lambda$ is \emph{not} dense in $L^2([0,1],{\symb R}^2)$, and therefore there is \emph{no} self-adjoint operator on $L^2([0,1],{\symb R}^2)$ whose eigenvalues/eigenvectors are given by $\{\lambda,\Psi^{(E)}_\lambda\}_\lambda$. Consequently, ``the'' operator that we are looking for must live on a smaller space: this is not surprising since our original operator lives on $L^2([0,1],{\symb R})$.\\ We will construct an operator denoted $\cS^{(E)}_L$, which is unitarily equivalent to $\mathcal{H}^{(E)}$ and lives on a \emph{quotient} space of $L^2([0,1],{\symb R}^2)$. The corresponding unitary map is the lift at the operator level of Steps 1 and 2 above. We will see along the construction of this map how the form \eqref{DefopSch} taken by $\mathtt{CS}_\tau$ arises from $\mathcal{H}^{(E)}$, see in particular Equation \eqref{Eq:yE} below. We postpone to the end of the introduction the detailed presentation of this construction since it requires some notation. We now state our convergence result at the operator level: since there are some issues with the underlying spaces on which our operator acts, the precise statement will be given in Subsection \ref{Subsec:PreciseResolv}. \begin{theorem}[Strong-resolvent convergence]\label{Th:CVoperator} Fix $\tau > 0$ and consider $E=E(L) \sim L/\tau$. As $L\to\infty$, the operator $\cS^{(E)}_L$ converges in law, in the strong resolvent sense, towards the operator $\mathtt{CS}_\tau$. However it does not converge in law to $\mathtt{CS}_\tau$ in the norm resolvent sense. \end{theorem} This answers our second question. Note that the strong resolvent convergence does not imply the convergence of the eigenvalues/eigenvectors, see e.g.~\cite{WeidmannResolvent}: in particular, Theorem \ref{Th:CVoperator} does not imply Theorem \ref{Th:Joint2}. \subsection*{Top of the spectrum} Finally, let us examine the spectrum of $\mathcal{H}_L$ for energies $E$ that go to $\infty$ much faster than $L$. Note that now $L/E \to 0$ so that, formally, we are in the same situation as before but with $\tau =0$. We keep the same definitions for $\mathcal{H}^{(E)}$, $\Psi^{(E)}_\lambda$ and $\cS^{(E)}_L$ in that case (see the next paragraph for the precise definition of the latter). Our next result shows that all the previous results still hold but the limits are now deterministic: at first order, the influence of the white noise becomes negligible. \begin{theorem}\label{Th:Top} Consider $E=E(L) \gg L$. As $L\to\infty$, the operator $\cS^{(E)}_L$ converges in probability, in the strong resolvent sense, towards the picket fence operator on $L^2_I$ $$ \mathtt{F} := 2 \begin{pmatrix} 0 & -\partial_t\\ \partial_t & 0 \end{pmatrix}\;,$$ endowed with Dirichlet b.c. However the convergence does not hold in the norm resolvent sense.\\ Furthermore the point process: \begin{align*} \Big\{\Big(\lambda, \frac{\Psi^{(E)}_\lambda}{\|\Psi^{(E)}_\lambda\|_{L^2([0,1],{\symb R}^2)}}\Big), \;\lambda \mbox{ eigenvalue of }\mathcal{H}^{(E)} \Big\} \end{align*} converges in probability to the eigenvalues/eigenvectors of $\mathtt{F}$, which happen to be given by \begin{align*} \Big\{\Big(\lambda, \begin{pmatrix} \cos(\frac{\lambda}{2} \cdot ) \\[0.3cm] \sin (\frac{\lambda}{2} \cdot ) \end{pmatrix} \Big), \;\lambda \in 2\pi {\symb Z} \Big\}\;. \end{align*} \end{theorem} \subsection*{A non-trivial unitary map} We now present the unitary transformation that transforms the operator $\mathcal{H}_L$ into $\cS^{(E)}_L$. For the sake of clarity, it is first spelled out at the level of the SDEs solved by the eigenvectors, and then at the operator level. Let us write the family of SDEs associated to the operator $\mathcal{H}^{(E)}$: \begin{align}\label{Eq:uE} -\frac1{L\sqrt E} (u_\lambda^{(E)})'' + \sqrt{\frac{L}{E}}u_\lambda^{(E)} dB^{(L)} + (2\ell_E - L\sqrt E) u_\lambda^{(E)} = \lambda u_\lambda^{(E)} \;, \quad t\in [0,1]\;, \end{align} with initial conditions $u_\lambda^{(E)}(0) = 0$ and\footnote{Any non-zero value for $(u_\lambda^{(E)})'(0)$ would do, we choose $L\sqrt E$ for later convenience.} $(u_\lambda^{(E)})'(0) = L\sqrt E$. By the Sturm-Liouville theory, the parameter $\lambda$ is an eigenvalue of $\mathcal{H}^{(E)}$ if and only if $(u_\lambda^{(E)}(1),(u_\lambda^{(E)})'(1))$ is parallel to $(0,1)$; and in that case, the associated normalized eigenvector $\varphi_\lambda^{(E)}$ is a multiple of $u_\lambda^{(E)}$.\\ Our transformation of the operator $\mathcal{H}^{(E)}$ can be factorized into two steps:\\ \emph{Step 1: From ${\symb R}$ to ${\symb R}^2$.} Consider the matrix $$T = \begin{pmatrix} 1 & 0\\0&0\end{pmatrix}\;.$$ The above collection of SDEs \eqref{Eq:uE} can be rewritten \begin{equation}\label{SDEs:u} \begin{pmatrix} \sqrt{\frac{L}{E}} \,dB^{(L)} + 2\ell_E - L\sqrt E & - \partial_t \\ \partial_t & -L\sqrt E\end{pmatrix} \begin{pmatrix} u_\lambda^{(E)} \\ \frac1{L\sqrt E} (u_\lambda^{(E)})' \end{pmatrix} = \lambda\; T \begin{pmatrix} u_\lambda^{(E)} \\ \frac1{L\sqrt E} (u_\lambda^{(E)})' \end{pmatrix}\;. \end{equation} The l.h.s.~takes a form similar to \eqref{DefopSch}: the main difference consists in the unbounded terms $L\sqrt E$ that still need to be ``killed'', this will be the purpose of Step 2. Before we present it, let us now present the transformation corresponding to Step 1 at the operator level. \smallskip Although we lifted our system from ${\symb R}$ to ${\symb R}^2$, it is \emph{not} canonically associated to a densely defined operator on $L^2((0,1),{\symb R}^2)$ and one needs to work on a ``smaller'' space. More precisely, let $L^2_T((0,1),{\symb R}^2)$ be the Hilbert space of all measurable functions $f:(0,1)\to{\symb R}^2$ such that $\int_0^1 f^\intercal T f < \infty$. In other words, any element of $L^2_T$ can be seen as an equivalent class of $L^2((0,1),{\symb R}^2)$ for the relation $f \sim g \Longleftrightarrow f_1 = g_1$ a.e. where $f = (f_1,f_2)^\intercal$ and $g = (g_1,g_2)^\intercal$. We then define the unitary map $\iota : L^2((0,1),{\symb R}) \to L^2_T((0,1),{\symb R}^2)$ that associates to any $f \in L^2((0,1),{\symb R})$ its canonical equivalent class in $L^2_T((0,1),{\symb R}^2)$, and set $$ \bs{\mathcal{H}}^{(E)} := \iota {\mathcal{H}}^{(E)} \iota^{-1}\;.$$ This transformation is explained in more details in Section \ref{sec:CVoperator}, where we will also prove that the eigenvalue problem of $\bs{\mathcal{H}}^{(E)}$ is associated to the system \eqref{SDEs:u}. \medskip \emph{Step 2: Unrotate.} We define $$ y_\lambda^{(E)} := C_{E'} \begin{pmatrix} u_\lambda^{(E)} \\ \frac1{L\sqrt E} (u_\lambda^{(E)})' \end{pmatrix} \;,$$ where the rotating matrix $C_{E'}$ was defined in \eqref{def:CE'}. A simple computation shows that these processes solve \begin{equation}\label{Eq:yE}\begin{split} &\bigg(\begin{pmatrix} 0 & -\partial_t\\ \partial_t & 0\end{pmatrix} + \frac12 {\sqrt{\frac{L}{E}}} \begin{pmatrix} dB^{(L)} + \frac1{\sqrt 2} dW_1^{(L)} & \frac1{\sqrt 2} dW_2^{(L)}\\ \frac1{\sqrt 2} dW_2^{(L)} & dB^{(L)} - \frac1{\sqrt 2} dW_1^{(L)}\end{pmatrix} + \ell_E (2R_{E'}-I)\bigg) y_\lambda^{(E)}\\ &= \lambda R_{E'}y_\lambda^{(E)} \;,\end{split}\end{equation} with initial condition $y_\lambda^{(E)}(0) = (0,1)^\intercal$. Here $I$ is the identity matrix, $R_{E'} := C_{E'} T C_{E'}^\intercal$, and we have introduced the Brownian motions \begin{align} W_1^{(L)}(t) := \sqrt{2} \int_0^t \cos (2E's) dB^{(L)}(s)\;,\quad W_2^{(L)}(t) := \sqrt{2} \int_0^t \sin( 2E's) dB^{(L)}(s)\;.\label{def:W1W2}\end{align} \smallskip Let us comment on Equation \eqref{Eq:yE}. First, the conjugation by the rotation matrix $C_{E'}$ removed the unbounded terms $L\sqrt{E}$ from \eqref{SDEs:u} so that all the terms appearing in this equation are bounded w.r.t.~$L$. Moreover, we now see a clear resemblance between \eqref{DefopSch} and the l.h.s.~of \eqref{Eq:yE}. Interestingly, although we started from a single Brownian motion, the unbounded oscillations produce two additional, independent Brownian motions in the scaling limit: a phenomenon already observed (at a larger scale) by Valk\'o and Vir\'ag in~\cite{VVlongboxes} in the context of discrete Schr\"odinger operators on long boxes, that heuristically corresponds to dimension $1+$, and that they called \emph{noise explosion} (notice that in both cases, it leads to the delocalization of the spectrum). Second, by the Riemann-Lebesgue Lemma, the matrix $R_{E'}$ converges to $(1/2)I$ and thus the term whose prefactor is $\ell_E$ vanishes in the limit. Finally the prefactor $2$ that appears in \eqref{DefopSch} is actually related to the r.h.s.~of \eqref{Eq:yE} where the term $R_{E'}$ converges towards $(1/2)I$. \bigskip Given the formalism already introduced, the desired unitary transformation takes a simple form. Viewing $C_{E'}$ as a unitary map from $L^2_T((0,1),{\symb R}^2)$ into $L^2_{R_{E'}}((0,1),{\symb R}^2)$, we define $$ \cS^{(E)}_L := C_{E'} \bs{\mathcal{H}}^{(E)} C_{E'}^{-1} = C_{E'} \iota \mathcal{H}^{(E)} \iota^{-1} C_{E'}^{-1}\;.$$ Consequently, the operator $\cS^{(E)}_L$ is the conjugate of ${\mathcal{H}}^{(E)}$ with the unitary map $C_{E'} \iota$: it is a self-adjoint operator and its collection $(\lambda, \psi^{(E)}_\lambda)$ of eigenvalues and normalized eigenfunctions is given by $(\lambda, C_{E'} \iota \,\varphi_\lambda^{(E)})$. The drawback of the present operator formalism is that any element of the domain of $\cS^{(E)}_L$, and therefore any eigenvector, is an element of $L^2_{R_{E'}}$, that is, an equivalent class of $L^2_I$ while the eigenvectors of $\mathtt{CS}_\tau$ are standard elements of $L^2_I$. However, it stems from our construction that there is a canonical choice of representative in $L^2_I$ for the elements of the domain. Namely if one sets $P: f\mapsto (f_1,\frac1{L\sqrt E} f_1')^\intercal$ which is densely defined on $L^2_T((0,1),{\symb R}^2)$, together with its conjugate $P_{E'} = C_{E'} P C_{E'}^{-1}$, then we will show in Lemma \ref{Lemma:Unitary} that \begin{equation}\label{Eq:EigenUnitary} P_{E'} \psi^{(E)}_\lambda = \Psi^{(E)}_\lambda\;.\end{equation} \bigskip The structure of the rest of the article is as follows. In Section \ref{sec:limitingoperator}, we properly define the Critical Schr\"odinger operator $\mathtt{CS}_\tau$ using the theory of canonical systems. Then we characterize its spectrum and compute its intensity measure, thus proving Theorems \ref{Th:Sch} and \ref{Th:Intensity}. In Section \ref{sec:CVoperator}, we provide more details on the construction of the operator $\cS^{(E)}_L$ and prove some claims made in the introduction. Then, we show the convergence at the operator level stated in Theorem \ref{Th:CVoperator}. In Section \ref{Sec:SDEs}, we exploit the systems of SDEs associated to the eigenvalues / eigenvectors of the operators at stake, and prove Theorems \ref{Th:Joint1} and \ref{Th:Joint2}. We also prove a technical result stated in Section \ref{sec:CVoperator}. Finally, in Section \ref{sec:top}, we adapt the previous arguments in order to cover the top of the spectrum as in Theorem \ref{Th:Top}. \section{The Critical Schr\"odinger operator}\label{sec:limitingoperator} The main objective of this section is to give a rigorous meaning to the operator $\mathtt{CS}_\tau$ on $L^2_I([0,1],{\symb R}^2)$ formally defined by \begin{equation*} \mathtt{CS}_\tau := 2 \begin{pmatrix} 0 & -\partial_t\\ \partial_t & 0 \end{pmatrix}+ \sqrt{\tau} \begin{pmatrix} d\mathcal{B} + \frac1{\sqrt 2} d\mathcal{W}_1 & \frac1{\sqrt 2} d\mathcal{W}_2\\ \frac1{\sqrt 2} d\mathcal{W}_2 & d\mathcal{B} - \frac1{\sqrt 2} d\mathcal{W}_1\end{pmatrix}\;, \end{equation*} and endowed with Dirichlet b.c., that is, any $f$ in the domain is such that $f(0)$ and $f(1)$ are parallel to $\begin{pmatrix} 0\\ 1\end{pmatrix}$. Here $\mathcal{B}$, $\mathcal{W}_1$ and $\mathcal{W}_2$ are independent Brownian motions.\\ To carry out the construction, we exhibit a transformation that maps the above formal operator onto a random differential operator whose construction falls into the scope of the theory of canonical systems introduced by De Branges in \cite{DeBranges} (see e.g.~\cite{Remling2002, Remlingbook, Romanov} for reviews on the subject, and \cite{VVoperator} in the context of limiting random matrix models). Then, we rigorously define $\mathtt{CS}_\tau$ as the image through the inverse transformation of this differential operator. Finally, we show that the eigenvalues / eigenvectors of $\mathtt{CS}_\tau$ satisfy a system of SDEs naturally associated to the formal expression above.\\ This section is organized as follows. The first subsection \ref{subsec:canonicalsyst} recalls the basic material on the theory of canonical systems and its connection with Dirac equations. Subsection \ref{Subsec:Sch} then applies this material to $\mbox{Sch}_\tau$ and presents the proofs of Theorem \ref{Th:Sch} and \ref{Th:Intensity}. \subsection{Canonical systems}\label{subsec:canonicalsyst} From now on, we write $$ J := \begin{pmatrix} 0 & -1\\ 1&0\end{pmatrix}\;.$$ Note the identity $J^{-1} = - J$. Let us recall that we write $M^\intercal$ for the transpose of any matrix $M$. \subsubsection{Canonical systems.} A canonical system is a system of first order differential equations of the form: \begin{align} &J \partial_t v(t) = z R(t) v(t), \quad t \in [0,1], \quad z \in {\symb C} \label{CanoSyst}\,, \end{align} where $R$ is an integrable function from $[0,1]$ into the space of $2 \times 2$ positive symmetric matrices. \begin{remark} To simplify the presentation, we have made several restrictive assumptions here. In the general theory, one works on an interval $[0,L)$ that can be unbounded and the matrix $R$ is only assumed to be locally integrable on $[0,L)$ and non-negative. Interestingly, Schr\"odinger operators, and in particular the operator $\mathcal{H}_L$, can be transformed into a canonical system, but with a non-invertible $R$, see \cite{Remlingbook, Romanov}. \end{remark} For any boundary conditions $b_0, b_1 \in {\symb R}^2$, let us introduce the domain of the Hilbert space $L^2_R := L^2_R((0,1),{\symb R}^2)$: \begin{align} \mathcal{D}_{b_0,b_1}(\mathcal{T}) := \Big\{f \in L^2_R\,: \;f \mbox{ A.C. on }(0,1), R^{-1}J f' \in L^2_R,\;f(0) \parallel b_0,\; f(1) \parallel b_1\Big\}\;. \label{domaincanonicalsyst} \end{align} where $\parallel$ means ``is parallel to''. It is proved in \cite{Remlingbook, Romanov} that $\mathcal{D}_{b_0,b_1}(\mathcal{T})$ is dense in $L^2_R$ and that \begin{align} \mathcal{T} := R^{-1}(t) J \partial_t \label{def:operatorcanosyst} \end{align} is a well-defined, self-adjoint operator on $\mathcal{D}_{b_0,b_1}(\mathcal{T})$. Note that $(\lambda,\phi)$ is an eigenvalue/eigenvector of $\mathcal{T}$ if and only if the solution $v$ of \eqref{CanoSyst} with $z=\lambda$ satisfies the two b.c.~and $\phi$ is a multiple of $v$.\\ The resolvents of $\mathcal{T}$ admit explicit kernels~\cite[Th 7.8]{Weidmann}. Fix a $z\in {\symb C}$ that does not lie in the spectrum of $\mathcal{T}$. Let $v_z$ be the solution of \eqref{CanoSyst} that satisfies $v_z(0) = b_0$. Let also $\hat{v}_z$ be the solution of \eqref{CanoSyst} that satisfies $\hat{v}_z(1) \parallel b_1$ and $v_z(0)^\intercal J \hat{v}_z(0) = 1$. Note that the last quantity is nothing but the Wronskian of $v_z$ and $\hat{v}_z$. Then for any $f\in L^2_R$ we have \begin{equation}\label{Eq:ResolventCano} (\mathcal{T}-z)^{-1} f(t) := \int_0^1 \big(v_z(t) \hat{v}_z(s)^\intercal \;1_{t \le s} + \hat{v}_z(t) v_z(s)^\intercal\; 1_{s < t}\big) R(s) f(s)\;.\end{equation} Our hypothesis imply that the functions $v_z$ and $\hat{v}_z$ are continuous on $[0,1]$, and therefore bounded. This readily implies that the operator $(\mathcal{T}-z)^{-1}$ is Hilbert-Schmidt so that $\mathcal{T}$ has discrete spectrum. \subsubsection{Differential operators as canonical systems} We would like to associate a self-adjoint operator to the following stochastic differential equations: \begin{align} J du_z(t) + dV(t) u_z(t) = z u_z(t) dt\;,\quad t \in [0,1]\;,\quad z \in {\symb C}\;.\label{eqdiffhgl} \end{align} Here $V$ is a $2\times2$ ``noise'' matrix: its entries are It\^o processes (they will be combinations of independent Brownian motions in the case of $\mathtt{CS}_\tau$). Note that we have not set the initial condition yet. \begin{remark} Here we understand $dV(t) u_z(t)$ in the It\^o sense. It turns out that one can construct on a given probability space the solutions of the above SDE simultaneously for all $z \in {\symb C}$ and all possible initial conditions. The solutions are continuous w.r.t.~all parameters. \end{remark} We will see in this paragraph that we can transform this system into a canonical system \eqref{CanoSyst}. When $dV$ is function-valued, this is already known (see e.g. Example 1 in \cite{Romanov}). Here $dV$ has the regularity of white noise and we thus need to adapt the arguments. The basic idea remains however the same.\\ One introduces the evolving matrix $M := (u^{(N)} u^{(D)})$ where $u^{(N)}$, resp.~$u^{(D)}$, is the solution of \eqref{eqdiffhgl} with $z=0$ and starting from $u^{(N)} = (1,0)^\intercal$, resp.~$u^{(D)} = (0,1)^\intercal$. Of course the superscripts $N$ and $D$ refer to Neumann and Dirichlet. Note that \begin{equation}\label{Eq:M} dM = J dV M\;,\quad M(0) = I\;,\end{equation} and \begin{align*} d \det M = \big((JdV)_{11} + (JdV)_{22} + d<(JV)_{11}, (JV)_{22}> - d<(JV)_{12},(JV)_{21}> \big)\det M\,, \end{align*} with $\det M(0) = 1$. Therefore $M$ remains invertible at any time $t \in [0,1]$.\\ Coming back to the generic solution $u_z$ of the system \eqref{eqdiffhgl}, one considers the transformed process $v_z = M^{-1} u_z$. By computing $d(M v_z)$, one deduces that \begin{align}\label{Eq:hz} dv_z = - z M^{-1} J M v_z dt - M^{-1} d\langle M,v_z \rangle \,, \end{align} where for all $2\times 2$ matrix $A$ and vector $x \in {\symb R}^2$ whose entries are It\^o processes, we define their bracket through: \begin{align*} \langle A,x \rangle := \begin{pmatrix} \langle A_{11}, x_1 \rangle + \langle A_{12},x_2 \rangle \\ \langle A_{21}, x_1 \rangle + \langle A_{22},x_2 \rangle \end{pmatrix}\;. \end{align*} Equation \eqref{Eq:hz} shows that $v_z$ is differentiable and therefore $d\langle M,v_z \rangle$ vanishes. As a consequence \begin{align} J dv_z &= - z J M^{-1} J M v_z dt \notag \\ &= \frac{z}{\det M} M^\intercal \, M v_z dt\,. \label{cansystdirac} \end{align} where we used the identity $M^{-1} = -(\det M)^{-1} J M^\intercal \,J$ at the second line. \begin{remark} Note that $v_z$ is differentiable, while $u_z$ is Brownian-like. Our transformation removed the irregularity from the latter. \end{remark} Denote by $R := M^\intercal\, M/\det M$. Almost surely the matrix $R$ is a positive definite symmetric matrix at all times, and is integrable as its entries are continuous. From the results on canonical systems recalled before, we can associate a self-adjoint operator to the system \eqref{cansystdirac} by setting $\mathcal{T}_{R} := R^{-1} J \partial_t$ on $L^2_{R}$, and by prescribing some boundary conditions $b_0$ and $b_1$. It acts on a domain $\mathcal{D}_{b_0,b_1}(\mathcal{T}_R)$ explicited in \eqref{domaincanonicalsyst}.\\ We finally associate to the system of equations \eqref{eqdiffhgl} the following self-adjoint operator \begin{align*} \mathcal{S} := M \mathcal{T}_R M^{-1} = {\det M} \,(M^{-1})^\intercal \, J \partial_t \,M^{-1}\;, \end{align*} that acts on (recall that $M(0) = I$) \begin{align*} \mathcal{D}_{b_0, M(1) b_1}(\mathcal{S}) := \big\{f \in L^2_{(\det M)^{-1} I}:\; M^{-1} f \in \mathcal{D}_{b_0,b_1}(\mathcal{T}_R) \big\} \;. \end{align*} Since $\mathcal{S}$ is a unitary\footnote{Note that $M$ is not a unitary matrix, but the transformation $f \in L^2_R \mapsto M f \in L^2_{(\det M)^{-1}I}$ is indeed unitary.} transformation of $\mathcal{T}_R$, we deduce that it also has discrete spectrum. Furthermore, by conjugation we deduce the explicit expression of the kernel of its resolvents: for any $f\in L^2_{(\det M)^{-1} I}$ and any $z\in {\symb C}\backslash{\symb R}$ \begin{equation}\label{Eq:ResolventDirac} (\mathcal{S}-z)^{-1} f(t) := \int_0^1 \big(u_z(t) \hat{u}_z(s)^\intercal\, 1_{t \le s}(s) + \hat{u}_z(t) u_z(s)^\intercal \,1_{s < t}\big)\frac{1}{\det M(s)} f(s)\;, \end{equation} where $u_z$ and $\hat{u}_z$ are the solutions of \eqref{eqdiffhgl} that satisfy $u_z(0) =b_0$, $\hat{u}_z(1) \parallel b_1$ and $u_z(0)^\intercal J \hat{u}_z(0)=1$.\\ In view of Equation \eqref{eqdiffhgl}, the operator $\mathcal{S}$ can be written formally $$ \mathcal{S} = \begin{pmatrix} 0 & -\partial_t\\ \partial_t & 0 \end{pmatrix} + dV\;,$$ with b.c.~$b_0$ at $0$ and $M(1)b_1$ at $1$. In general, the elements of $\mathcal{D}(\mathcal{S})$ have Brownian like regularity but are not adapted (to the filtration of $V$): therefore one cannot apply It\^o's integration and the above expression for $\mathcal{S}$ is only formal. On the other hand, the elements of $\mathcal{D}(\mathcal{T}_R)$ are absolutely continuous and the action of $\mathcal{T}_R$ given in \eqref{def:operatorcanosyst} makes perfect sense. Let us mention that it would be possible to give a precise description of the action of $\mathcal{S}$ on its domain using the theory of rough paths.\\ However, a rigorous connection with the formal equation of $\mathcal{S}$ can be made at the level of the eigenvalues and eigenvectors: \begin{lemma}\label{Lemma:EigenSDEs} Almost surely for every $\lambda\in {\symb R}$, the pair $(\lambda,\varphi_\lambda)$ is an eigenvalue / eigenvector of $\mathcal{S}$ if and only if the solution $u_\lambda$ of \eqref{eqdiffhgl} that starts from $u_\lambda(0) = b_0$ is such that $u_\lambda(1)$ is parallel to $M(1)b_1$ and $\varphi_\lambda$ is a multiple of $u_\lambda$. \end{lemma} \begin{proof} First note that almost surely for every $\lambda$, ($u_\lambda$ is solution of \eqref{eqdiffhgl} starting from $b_0$ at time $0$ and is parallel to $M(1)b_1$ at time $1$) is equivalent to ($v_\lambda$ is solution of \eqref{cansystdirac} starting from $b_0$ at time $0$ and is parallel to $b_1$ at time $1$).\\ Second, almost surely for every $\lambda\in {\symb R}$, the pair $(\lambda,\varphi_\lambda)$ is an eigenvalue / eigenvector of $\mathcal{S}$ if and only if $(\lambda, M^{-1}\varphi_\lambda)$ is an eigenvalue / eigenvector of $\mathcal{T}_R$. Then the equation $\mathcal{T}_R (M^{-1}\varphi_\lambda) = \lambda M^{-1}\varphi_\lambda$, together with the conditions that $M^{-1}\varphi_\lambda$ is parallel to $b_0$ at $0$ and $b_1$ at $1$, is equivalent to saying that $M^{-1}\varphi_\lambda$ is a multiple of $v_\lambda$ where $v_\lambda$ is the solution of \eqref{cansystdirac} that starts from $b_0$ at time $0$ and is parallel to $b_1$ at time $1$. We thus conclude. \end{proof} \subsection{Construction and properties of $\mathtt{CS}_\tau$}\label{Subsec:Sch} Consider \begin{align*} &dV := \frac{\sqrt\tau}{2} \mat{d\mathcal{B} + \frac{1}{\sqrt{2}} d\mathcal{W}_1}{\frac{1}{\sqrt{2}} d\mathcal{W}_2}{\frac{1}{\sqrt{2}} d\mathcal{W}_2}{d\mathcal{B} - \frac{1}{\sqrt{2}} d\mathcal{W}_1} \,, \end{align*} where $\mathcal{B}$, $\mathcal{W}_1$ and $\mathcal{W}_2$ are independent Brownian motions. Choose $b_0$ and $b_1$ in a such a way that $b_0 = M(1)b_1 = (0,1)^\intercal$, where $M$ is defined in \eqref{Eq:M} (with $dV$ as above). A computation shows that $d\det M = 0$ so that $\det M \equiv 1$ and we thus set $R := M^\intercal \,M$. We apply the general construction of the previous subsection and set $$ \mathtt{CS}_\tau := 2 M \mathcal{T}_R M^{-1}\;.$$ \begin{remark}\label{Rk:VV} Let us comment here further on the link between the operator $\mathtt{CS}_\tau$ and the ones appearing in the paper~\cite{VVoperator} of Valk\'o and Vir\'ag. All these operators are associated to canonical system of the form \eqref{def:operatorcanosyst}. In their approach, Valk\'o and Vir\'ag decompose the matrix $R$ in the following way: \begin{align*} R = \frac{X^\intercal X}{\det X},\qquad X = \mat{1}{-x}{0}{y}\,. \end{align*} It enables them to encode those operators with an upper half-plane path given by $x +i y$. It turns out that the limiting eigenvalue point processes of various classical ensembles correspond to random paths $x+iy$ with a simple description (for example a hyperbolic Brownian motion with variance $4/\beta$ run in logarithmic time for the bulk limit of $\beta$-ensembles), which gives a nice geometric interpretation of those operators. Moreover, these canonical systems are unitarily equivalent to operators acting on $L^2_I$ via the conjugation by $X$. Here, we take another type of decomposition of the matrix $R$, via \begin{align*} R = \frac{M^\intercal M}{\det M},\quad dM = JdV M,\quad M(0) = I\,, \end{align*} with a \emph{full noise} matrix $M$. It turns out that this representation is appropriate to get convergence of the eigenvectors as well. \end{remark} The additional prefactor $2$ motivates the definition of $y_z$ (corresponding to $u_{z/2}$) that solves \begin{align}\label{Eq:ymuSch} dy_z(t) = -\frac{z}{2} Jy_z dt + J dV(t) y_z(t)\;,\quad t \in [0,1]\;,\quad z \in {\symb C}\;, \end{align} with $y_z(0) = (0,1)^\intercal$. We thus have the following corollary of Lemma \ref{Lemma:EigenSDEs}. \begin{corollary}\label{Cor:Eigenvalues} Almost surely for every $\lambda\in {\symb R}$, the pair $(\lambda,\Psi_\lambda)$ is an eigenvalue / eigenvector of $\mathtt{CS}_\tau$ if and only if $y_\lambda(1)$ is parallel to $(0,1)^\intercal$ and $\Psi_\lambda$ is a multiple of $y_\lambda$. \end{corollary} For any $z\in {\symb C}\backslash {\symb R}$, the resolvent writes: \begin{equation}\label{Eq:ResolventDirac2} (\mathtt{CS}_\tau-z)^{-1} f(t) := \frac1{2} \int_0^1 \big(y_z(t) \hat{y}_z(s)^\intercal\, 1_{t \le s}(s) + \hat{y}_z(t) y_z(s)^\intercal \,1_{s < t}\big) f(s)\;, \end{equation} where $f \in L^2_I$, $y_z$ and $\hat{y}_z$ are solutions of \eqref{Eq:ymuSch} such that $y_z(0) = (0,1)^\intercal$, $\hat{y}_z(1) \parallel (0,1)^\intercal$ and $y_z(0)^\intercal J \hat{y}_z(0) = 1$. Note that $\hat{y}_z$ can be constructed by setting \begin{equation}\label{Eq:hatyz} \hat{y}_z := v_z - \alpha y_z\;,\quad \alpha := \frac{\begin{pmatrix} 1 & 0\end{pmatrix} v_z(1)}{\begin{pmatrix} 1 & 0\end{pmatrix} y_z(1)}\;,\end{equation} where $v_z$ is the solution of \eqref{Eq:ymuSch} that starts from $(1,0)^\intercal$ at time $0$.\\ Let us now introduce the polar coordinates, also called Pr\"ufer coordinates, associated to $y_\lambda$ for any $\lambda\in{\symb R}$ through the relation $$ (y_\lambda)_2 + i (y_\lambda)_1 =: \Gamma_{\lambda} e^{i \Theta_{\lambda}}\;.$$ A simple computation shows that \begin{equation}\label{Eq:Theta}\begin{split} &d \Theta_{\lambda}(t) = \frac{\lambda}{2} dt + \frac{\sqrt \tau}{2} d\mathcal{B}(t) + \frac{\sqrt \tau}{2\sqrt 2} \Re(e^{2i \Theta_{\lambda}(t)} d\mathcal{W}(t))\,,\\ &d \ln \Gamma_{\lambda}(t) = \frac{\tau}{8} dt + \frac{\sqrt\tau}{2\sqrt 2} \Im(e^{2i \Theta_{\lambda}(t)} d\mathcal{W}(t))\,, \end{split} \end{equation} where $\mathcal{W} = (\mathcal{W}_1 + i \mathcal{W}_2)$ is a complex Brownian motion. \begin{proof}[Proof of Theorem \ref{Th:Sch}] It is a consequence of the material above, noticing that $\Theta_{\lambda}(1) \in \pi{\symb Z}$ if and only if $y_\lambda(1)$ is parallel to $(0, 1)^\intercal$. \end{proof} \begin{remark} As we will see later on, almost surely for any $t\in [0,1]$ the phase $\lambda \mapsto \Theta_{\lambda}(t)$ is increasing. However $t \mapsto \lfloor \Theta_{\lambda}(t)/\pi \rfloor$ is \emph{not} non-decreasing, while the phase associated to $1$-d Schr\"odinger operators satisfies this property, often called Sturm-Liouville property. \end{remark} \begin{remark} We could have endowed the operator with other b.c. For instance, let $\mathtt{CS}_{\tau,\ell}$ be defined similarly as $\mathtt{CS}_\tau$ except that we impose $M(1)b_1 = (\sin \ell,\cos \ell)^\intercal$ for some $\ell \in [0,\pi)$. The eigenvalues of $\mathtt{CS}_{\tau,\ell}$ are those $\lambda$ for which $\Theta_{\lambda}(1)$ equals $\ell$ modulo $\pi$. We have the following scaling property of the family $\mathtt{CS}_{\tau,\ell}$: \begin{align*} C_{-\ell} (\mathtt{CS}_{\tau} + 2 \ell ) C^{-1}_{-\ell} \overset{(d)}{=} \mathtt{CS}_{\tau,\ell}\,, \end{align*} where $C_{-\ell} := \mat{\cos(-\ell t)}{-\sin(-\ell t)}{\sin(-\ell t)}{\cos(-\ell t)}$. Consequently the set of eigenvalues of $\mathtt{CS}_{\tau,\ell}$ coincides in law with the point process $\mbox{Sch}_\tau + 2\ell$. It is then easy to deduce that the point process $\mbox{Sch}_\tau$ is invariant in law under translation by integer multiples of $2\pi$. \end{remark} We turn to the computation of the intensity measure of the point process of eigenvalues / eigenvectors of $\mathtt{CS}_\tau$. We start with some preliminary results. First, we show that the number of points in $\mbox{Sch}_\tau$ that fall in any given compact set has finite expectation. \begin{lemma}\label{Lemma:Expect} For any $\mu < \lambda$, we have $\mathbb{E}[\#\{ \mbox{Sch}_\tau \cap [\mu,\lambda]\}] < \infty$. \end{lemma} \begin{proof} Thanks to the characterization of the $\mbox{Sch}_\tau$ point process \eqref{Characdiffusion:Schtau} and the monotonicity property of $\lambda \mapsto \Theta_{\lambda}(1)$, we have: $$ \#\{ \mbox{Sch}_\tau \cap [\mu,\lambda]\} \le \frac{\Theta_{\lambda}(1) - \Theta_{\mu}(1)}{\pi} + 1\;,$$ hence it suffices to bound the expectation of $\Theta_{\lambda}(1) - \Theta_{\mu}(1)$. For any $t\in [0,1]$, we have $$ \Theta_{\lambda}(t) - \Theta_{\mu}(t) = \frac{\lambda-\mu}{2}t + \frac{\sqrt \tau}{2\sqrt 2} \int_0^t \Re\big( (e^{2i \Theta_{\lambda}(s)}-e^{2i \Theta_{\mu}(s)}) dW(s)\big)\;.$$ An elementary estimate on the bracket of the martingale, together with simple computations show that there exists a constant $C>0$ such that for all $t\in [0,1]$ $$ \mathbb{E}[|\Theta_{\lambda}(t) - \Theta_{\mu}(t)|^2] \le C(1 + \int_0^t \mathbb{E}[|\Theta_{\lambda}(s) - \Theta_{\mu}(s)|^2] ds)\;.$$ Gr\"onwall's Lemma then yields $\mathbb{E}[|\Theta_{\lambda}(1) - \Theta_{\mu}(1)|^2] < \infty$ which suffices to conclude. \end{proof} Second we compute a change of measure, which is essentially the same as in~\cite[Proof of Lemma 3.6]{RV}. \begin{lemma}\label{Lemma:Girsanov} Fix $u\in [0,1]$ and let $\mathcal{B}_1$ be a real Brownian motion on $[0,1]$ starting from $0$. Set $f^u(t) := (u - |u-t|)/2$ and $Y(t) := t \frac{\tau}{8} + \frac{\sqrt\tau}{2\sqrt 2} \mathcal{B}_1(t)$ for $t\in [0,1]$. Then for any bounded measurable map $G$ on $\mathcal{C}([0,1],{\symb R})$ we have $$\mathbb{E}\Big[G(Y) e^{(u-1) \frac{\tau}{4} + \frac{\sqrt\tau}{\sqrt 2} (\mathcal{B}_1(u)-\mathcal{B}_1(1))}\Big] = \mathbb{E}\Big[G\big(\frac{\tau}{4} f^u + \frac{\sqrt \tau}{2\sqrt 2} \mathcal{B}_1\big) \Big]\;.$$ \end{lemma} \begin{proof} Set $d\mathbb{Q} := e^{(u-1) \frac{\tau}{4} + \frac{\sqrt\tau}{\sqrt 2} (\mathcal{B}_1(u)-\mathcal{B}_1(1))} d{\symb P}$ and observe that $\mathbb{Q}$ is a probability measure: we want to show that the law of $Y$ under $\mathbb{Q}$ coincides with the law of $\frac{\tau}{4} f^u + \frac{\sqrt \tau}{2\sqrt 2} \mathcal{B}_1$ under ${\symb P}$. The law of $Y$ is characterized by the laws of $(Y(t), \; t \in [0,u])$ and $(\tilde Y(t) := Y(t) - Y(u),\; t \in [u,1])$ and observe that under $\mathbb{Q}$, the process $(Y(t))_{0\le t \le u}$ is independent of $(\tilde{Y}(t))_{u\le t \le 1}$. Consequently, it suffices to compute separately the laws of these two processes. Since the exponential change of measure is independent of $(\mathcal{B}(t))_{0\le t \le u}$, it is immediate that $(Y(t))_{0\le t \le u}$ has the same law under $\mathbb{Q}$ and ${\symb P}$. And this is coherent with the fact that $$ \frac{\tau}{4} f^u(t) + \frac{\sqrt \tau}{2\sqrt 2} \mathcal{B}_1(t) = Y(t)\;,\quad t\in [0,u]\;.$$ On the other hand, Girsanov's Theorem~\cite[Th VIII.1.7]{RevuzYor} shows that under $\mathbb{Q}$, the process $(\mathcal{B}_1(t) - \mathcal{B}_1(u) + \frac{\sqrt\tau}{\sqrt 2}(t-u))_{u\le t \le 1}$ is a Brownian motion starting from $0$ at time $u$. Consequently, under $\mathbb{Q}$ the process $(\tilde{Y}(t))_{u\le t \le 1}$ has the same law as the process $$\frac{\tau}{4} (f^u(t)-f^u(u)) + \frac{\sqrt \tau}{2\sqrt 2} (\mathcal{B}_1(t) - \mathcal{B}_1(u))\;,\quad u\le t \le 1\;,$$ under ${\symb P}$. This completes the proof. \end{proof} We now proceed with the computation of the intensity measure. \begin{proof}[Proof of Theorem \ref{Th:Intensity}] Assume that \begin{equation}\label{Eq:Intensity2} \mathbb{E}\Big[\sum_{\lambda: \Theta_{\lambda}(1) \in \pi{\symb Z}} G(\lambda, \ln \Gamma_{\lambda},\Theta_{\lambda})\Big] = \int \sum_{n \in {\symb Z}} \mathbb{E}\Big[G(\lambda, \frac{\sqrt \tau}{2\sqrt{2}}\mathcal{B}_1 + \frac{\tau f^{U}}{4},\beta^{(n\pi)})\Big] g_{\lambda, \frac32 \tau}(2n\pi) d\lambda\;. \end{equation} The identity $$ \Psi_{\lambda} = \frac{\Gamma_{\lambda}}{\|\Gamma_{\lambda}\|_{L^2([0,1],{\symb R})}} \begin{pmatrix} \sin \Theta_{\lambda} \\ \cos \Theta_{\lambda} \end{pmatrix}\;,$$ shows that $\Psi_{\lambda}$ is the image through a continuous map of $(\ln \Gamma_{\lambda},\Theta_{\lambda})$. From \eqref{Eq:Intensity2} we thus deduce that \begin{equation*} \mathbb{E}\Big[\sum_{\lambda: \Theta_{\lambda}(1) \in \pi{\symb Z}} G(\lambda, \Psi_{\lambda})\Big] = \int \sum_{n \in {\symb Z}} \mathbb{E}\Big[G(\lambda, \frac{e^{Z}}{\big\| e^{Z} \big\|_{L^2([0,1])}} \begin{pmatrix} \sin \beta^{(n\pi)} \\\cos \beta^{(n\pi)} \end{pmatrix})\Big] g_{\lambda, \frac32 \tau}(2n\pi) d\lambda\;, \end{equation*} where $Z := \frac{\sqrt \tau}{2\sqrt{2}}\mathcal{B}_1 + \frac{\tau f^{U}}{4}$. Theorem \ref{Th:Intensity} then follows from the equality in law $$ \frac{e^{Z(t)}}{\big\| e^{Z} \big\|_{L^2([0,1])}} \stackrel{(d)}{=} \frac{e^{\frac{\sqrt \tau}{2\sqrt{2}}\mathcal{B}_1(t-U) - \frac{\tau}8 |t-U| }}{\big\| e^{\frac{\sqrt \tau}{2\sqrt{2}}\mathcal{B}_1(\cdot-U) - \frac{\tau}8 |\cdot - U| } \big\|_{L^2([0,1])}}\;.$$ \bigskip We are left with the proof of \eqref{Eq:Intensity2}. Recall that the process $(\Theta_{\lambda}(t),\Gamma_{\lambda}(t); t\in [0,1],\lambda\in {\symb R})$ is continuous in both variables and satisfies the SDEs \eqref{Eq:Theta}. Note that $ \Theta_{\lambda}$ is differentiable (in fact real-analytic) with respect to $\lambda$ (see e.g. \cite[Chap. V, Theorem 40]{Protter2005} or Theorem 24 of \cite{KVV}) and its derivative $\lambda \mapsto \Theta_{\lambda}(t)$ satisfies the following SDE \begin{align*} d(\partial_\lambda \Theta_{\lambda}) = \frac{1}{2}\, dt - \frac{\sqrt \tau}{\sqrt 2} (\partial_\lambda \Theta_{\lambda})\; \Im(e^{2 i\Theta_{\lambda}} d\mathcal{W}_t)\;. \end{align*} An application of It\^o's formula yields \begin{equation}\label{Eq:partialTheta} \partial_\lambda \Theta_{\lambda}(t) = \frac{1}{2} \int_0^t \exp\big(2 \ln \Gamma_{\lambda}(u) - 2 \ln \Gamma_{\lambda}(t)\big) du\;. \end{equation} We thus deduce that almost surely for all $t\in [0,1]$ and all $\lambda\in{\symb R}$, we have $\partial_\lambda \Theta_{\lambda}(t) > 0$. This implies that almost surely $\lambda\mapsto \Theta_{\lambda}(1)$ is a $\mathcal{C}^1$-diffeomorphism. In the sequel, we denote by $\theta\mapsto \lambda(\theta)$ its inverse.\\ By standard approximation arguments, it suffices to take $G$ non-negative, bounded and continuous, and such that $G(\lambda,\cdot) = 0$ whenever $\lambda \notin [-a,a]$ for some $a>0$. Note that $$ \sum_{\lambda: \Theta_{\lambda}(1) \in \pi{\symb Z}} G(\lambda, \ln \Gamma_{\lambda},\Theta_{\lambda}) = \sum_{\theta\in \pi{\symb Z}} G(\lambda(\theta), \ln \Gamma_{\lambda(\theta)},\Theta_{\lambda(\theta)})\;.$$ By continuity, the right hand side is the almost sure limit as $\epsilon\downarrow 0$ of \begin{align*} X_\varepsilon &:= \frac{1}{2\varepsilon}\int_{\theta \in [-\varepsilon,\varepsilon] + \pi {\symb Z}} G(\lambda(\theta), \ln \Gamma_{\lambda(\theta)}, \Theta_{\lambda(\theta)})d\theta \\ &= \frac{1}{2\varepsilon}\int_{\lambda \in {\symb R}} 1_{\{\Theta_\lambda \in [-\varepsilon,\varepsilon] + \pi {\symb Z}\}} G(\lambda, \ln \Gamma_{\lambda}, \Theta_{\lambda}) \partial_\lambda \Theta_{\lambda}(1) d\lambda\;. \end{align*} Recall that $G$ is compactly supported in its first variable. Provided that $\epsilon < \pi$, we see that almost surely $|X_\varepsilon| \le \|G\|_\infty (\#\{\lambda \in [-a,a]: \Theta_{\lambda}(1) \in \pi{\symb Z}\} + 2)$. The latter r.v.~has finite expectation by Lemma \ref{Lemma:Expect}. The Dominated Convergence and Fubini Theorems thus yield \begin{equation}\label{Eq:GTheta}\begin{split} &\mathbb{E}[\sum_{\lambda: \Theta_{\lambda}(1) \in \pi {\symb Z}} G(\lambda,\ln \Gamma_{\lambda}, \Theta_{\lambda})]\\ &= \lim_{\varepsilon \to 0}\frac{1}{2\varepsilon}\int_{\lambda \in {\symb R}} \mathbb{E}[1_{\{\Theta_{\lambda}(1) \in [-\varepsilon,\varepsilon] + \pi {\symb Z}\}} G(\lambda, \ln \Gamma_{\lambda}, \Theta_{\lambda}) \partial \Theta_{\lambda}(1)] d\lambda \end{split}\end{equation} Fix $\lambda \in {\symb R}$ and recall the definition of the SDEs \eqref{Eq:Theta} and \eqref{Eq:partialTheta}. Observe that $\int_0^t \Re(e^{2i \Theta_{\lambda}} d\mathcal{W})$ and $\int_0^t \Im(e^{2i \Theta_{\lambda}} d\mathcal{W})$ are independent Brownian motions. Since $\mathcal{W}$ is independent of $\mathcal{B}$, we deduce that the process $\Theta_{\lambda}$ is independent of $(\ln \Gamma_{\lambda}, \partial_\lambda \Theta_{\lambda})$.\\ We now provide some identities in law on the process $\Theta_{\lambda}$. First, the r.v.~$\Theta_{\lambda}(1)$ has a Gaussian law, centered at $\lambda/2$ with variance $3\tau /8$. Moreover the process $\Theta_{\lambda}$ conditioned to $\{\Theta_{\lambda}(1) =x\}$ has the same law as $\beta^{(x)}$ where, for some Brownian motion $\mathcal{B}_2$, $$ d\beta^{(x)}(t) = x dt + \sqrt{\frac{3\tau}{8}} (d\mathcal{B}_2(t) - \mathcal{B}_2(1) dt)\;.$$ The process $\beta^{(x)}$ is a scaled Brownian bridge from $(0,0)$ to $(1,x)$ (note that the law of $\beta^{(x)}$ no longer depends on $\lambda$).\\ Desintegrating the expectation appearing on the r.h.s.~of \eqref{Eq:GTheta} according to the law of $\Theta_{\lambda}(1)$ we get \begin{align*} &\mathbb{E}[1_{\{\Theta_{\lambda}(1) \in [-\varepsilon,\varepsilon] + \pi {\symb Z}\}} G(\lambda, \ln \Gamma_{\lambda}, \Theta_{\lambda}) \partial \Theta_{\lambda}(1)]\\ &= \int_{x\in{\symb R}} 1_{\{x\in [-\varepsilon,\varepsilon] + \pi{\symb Z}\}} \mathbb{E}\Big[G(\lambda, \ln \Gamma_{\lambda}, \beta^{(x)}) \partial \Theta_{\lambda}(1)\Big] g_{\lambda/2, \frac38 \tau}(x)dx\;. \end{align*} Note that $g_{\lambda/2, \frac38 \tau}(x) = 2g_{\lambda, \frac32 \tau}(2x)$. Applying again the Dominated Convergence Theorem, we obtain \begin{align*} &\mathbb{E}[\sum_{\lambda: \Theta_{\lambda}(1) \in \pi {\symb Z}} G(\lambda,\ln \Gamma_{\lambda}, \Theta_{\lambda})]\\ &= \int_{\lambda \in {\symb R}} \lim_{\varepsilon \to 0}\frac{1}{2\varepsilon} \int_{x\in{\symb R}} 1_{\{x\in [-\varepsilon,\varepsilon] + \pi{\symb Z}\}} 2\,\mathbb{E}\Big[G(\lambda, \ln \Gamma_{\lambda}, \beta^{(x)}) \partial \Theta_{\lambda}(1)\Big] g_{\lambda, \frac32 \tau}(2x)dx d\lambda\\ &=\int_{\lambda \in {\symb R}} \sum_{n\in{\symb Z}} 2\,\mathbb{E}\Big[G(\lambda, \ln \Gamma_{\lambda}, \beta^{(n\pi)})\partial \Theta_{\lambda}(1)\Big] g_{\lambda, \frac32 \tau}(2n\pi) d\lambda\;. \end{align*} It remains to compute the expectation that appears on the r.h.s. Recall that $\beta^{(n\pi)}$ is independent of the pair $(\ln \Gamma_{\lambda}, \partial_\lambda \Theta_{\lambda})$. We already saw that $\mathcal{B}_1(t) := \int_0^t \Im(e^{2i \Theta_{\lambda}} d\mathcal{W})$ is a standard Brownian motion. Consequently $$ \ln \Gamma_{\lambda}(t) = t \frac{\tau}{8} + \frac{\sqrt \tau}{2\sqrt 2} \mathcal{B}_1(t) =: Y(t)\;.$$ Using the explicit expression \eqref{Eq:partialTheta} of $\partial_\lambda \Theta_{\lambda}$ in terms of $\ln \Gamma_{\lambda}$, we obtain \begin{align*} &2\, \mathbb{E}\Big[G(\lambda, \ln \Gamma_{\lambda}, \beta^{(n\pi)})\partial \Theta_{\lambda}(1)\Big]= \int_0^1 \mathbb{E}\Big[G(\lambda, Y , \beta^{(n\pi)}) e^{(u-1) \frac{\tau}{4} + \frac{\sqrt\tau}{\sqrt 2} (\mathcal{B}_1(u)-\mathcal{B}_1(1))}\Big] du\;. \end{align*} Lemma \ref{Lemma:Girsanov} allows to conclude. \end{proof} \section{Convergence of the operators}\label{sec:CVoperator} We start this section with a detailed presentation of the unitary map that allows to construct $\cS^{(E)}_L$ from $\mathcal{H}^{(E)}$ and with the proofs of claims on the eigenvectors made in the introduction. Then, we deal with the operator convergence of $\cS^{(E)}_L$ towards $\mathtt{CS}_\tau$ and thus prove Theorem \ref{Th:CVoperator}. In the first two subsections, no assumption is made on the value of $E$, while in the subsequent subsections we always assume that $E \sim L/\tau$ for some fixed $\tau > 0$. \subsection{The unitary transformation} The operator $\mathcal{H}_L$ is a generalized Sturm-Liouville operator. Its domain is made of (random) $H^1([0,L])$-functions that satisfy Dirichlet b.c.: namely, \begin{align*} \mathcal{D}(\mathcal{H}_L) := \Big\{f \in L^2([0,L]):& \;f(0) = f(L) = 0,\; f \mbox{ A.C.}, \; f'- Bf \mbox{ A.C.},\\ &\mbox{and } -(f'-Bf)' - Bf' \in L^2([0,L])\Big\}\,. \end{align*} Recall from the introduction that we consider the recentered operator $(L/\sqrt E)(\mathcal{H}_L - E) + 2\ell_E$, and that we conjugate it with the rescaling map $g\mapsto g(L \,\cdot )$ that goes from $L^2([0,L],{\symb R})$ into $L^2([0,1],{\symb R})$. This yields the operator \begin{equation}\label{Eq:HE} {\mathcal{H}}^{(E)} f := -\frac1{L\sqrt E} f'' + \sqrt{\frac{L}{E}} dB^{(L)} f + (2\ell_E - L\sqrt E) f\;,\quad x\in [0,1]\;, \end{equation} whose domain is the image through the rescaling map of the domain of $\mathcal{H}_L$. In particular any element $f$ of this domain belongs to $H^1([0,1])$ and satisfies Dirichlet b.c.: $(f(0),f'(0))$ and $(f(1),f'(1))$ are parallel to $(0,1)$.\\ We now recall the two steps presented in the introduction on the construction of $\cS^{(E)}_L$.\\ \emph{Step 1: From ${\symb R}$ to ${\symb R}^2$.} Recall from the introduction the matrix $T$ and the map $\iota: L^2((0,1),{\symb R}) \to L^2_T((0,1),{\symb R}^2)$ that sends any $f\in L^2((0,1),{\symb R})$ on its (canonical) equivalent class in $L^2_T((0,1),{\symb R}^2)$. Since $\iota$ is unitary, the operator $$ \bs{\mathcal{H}}^{(E)} := \iota {\mathcal{H}}^{(E)} \iota^{-1}\;.$$ is a self-adjoint operator on $L^2_T((0,1),{\symb R}^2)$ with domain $\mathcal{D}(\bs{\mathcal{H}}^{(E)}) := \iota (\mathcal{D}({\mathcal{H}}^{(E)}))$. It is equivalent to ${\mathcal{H}}^{(E)}$: the eigenvalues and normalized eigenvectors of $\bs{\mathcal{H}}^{(E)}$ are given by $(\lambda, \iota {\varphi}^{(E)}_\lambda)$ where $(\lambda, {\varphi}^{(E)}_\lambda)$ are the eigenvalues and normalized eigenvectors of $\mathcal{H}^{(E)}$.\\ Any element $f$ of $L^2_T$ is an equivalent class of $L^2_I$: its second coordinate $f_2$ is ``arbitrary''. However, in our context there is a convenient representative given by $Pf := (f_1,\frac1{L\sqrt E} f_1')$. Note that $Pf \in L^2_I$ provided $f_1 \in H^1((0,1),{\symb R})$; this holds in particular for any $f\in \mathcal{D}(\bs{\mathcal{H}}^{(E)})$. Then, any $f\in \mathcal{D}(\bs{\mathcal{H}}^{(E)})$ satisfies Dirichlet b.c.~in the following sense: $Pf(0)$ and $Pf(1)$ are parallel to $(0,1)^\intercal$. Our next lemma establishes the relationship between $\bs{\mathcal{H}}^{(E)}$ and the collection of SDEs \eqref{SDEs:u}. \begin{lemma}\label{Lemma:RR2} Almost surely the eigenvalues of $\bs{\mathcal{H}}^{(E)}$ are those $\lambda$ for which the solution $(u_\lambda^{(E)}, (u_\lambda^{(E)})')$ of \eqref{SDEs:u} is parallel to $(0,1)^\intercal$ at time $1$. In that case the associated eigenvector $\bs{\varphi}^{(E)}_\lambda$ is a multiple of the equivalence class associated to $u_\lambda^{(E)}$ and we have $P \bs{\varphi}^{(E)}_\lambda = (\varphi^{(E)}_\lambda, \frac1{L\sqrt E} (\varphi^{(E)}_\lambda)')^\intercal$. \end{lemma} \begin{proof} $\lambda$ is an eigenvalue of $\bs{\mathcal{H}}_L^{(E)}$ if and only if $\lambda$ is an eigenvalue of $\mathcal{H}^{(E)}$ if and only if the solution $u^{(E)}_\lambda$ of \eqref{Eq:uE} vanishes at time $1$. The latter is equivalent with: the solution $(u_\lambda^{(E)}, (u_\lambda^{(E)})')$ of \eqref{SDEs:u} is parallel to $(0,1)^\intercal$ at time $1$. The theory of Sturm-Liouville operators shows that the eigenvector $\varphi^{(E)}_\lambda$ of $\mathcal{H}^{(E)}$ is then a multiple of $u^{(E)}_\lambda$. Since $\bs{\varphi}^{(E)}_\lambda = \iota \varphi^{(E)}_\lambda$ we deduce that it is a multiple of the equivalence class of $(u_\lambda^{(E)}, (u_\lambda^{(E)})')$. This implies that $P \bs{\varphi}^{(E)}_\lambda = (\varphi^{(E)}_\lambda, \frac1{L\sqrt E} (\varphi^{(E)}_\lambda)')^\intercal$. \end{proof} \emph{Step 2: Unrotate.} Recall $C_{E'}$ defined in \eqref{def:CE'} and note that $C_{E'}^{-1} = C_{E'}^\intercal$. We set $R_{E'} := C_{E'} T C_{E'}^\intercal$. The evolving rotation matrix $C_{E'}$ can be viewed as a unitary map from $L^2_T$ into $L^2_{R_{E'}}$. Indeed, for any $f\in L^2_T$ and for any representative $g\in L^2_I$ of $f$ we define $C_{E'} f$ as the equivalent class of $C_{E'} g$. It is simple to check that this definition is independent of the choice of the representative.\\ We then introduce the operator $$ \cS^{(E)}_L := C_{E'} {\bs{\mathcal{H}}}^{(E)} C_{E'}^{-1}\;,$$ acting on the domain $\mathcal{D}(\cS^{(E)}_L) := C_{E'} \mathcal{D}({\bs{\mathcal{H}}}^{(E)}) \subset L^2_{R_{E'}}([0,1],{\symb R}^2)$. Recall that $E'$ is taken equal to $L\sqrt{E} - \ell_E$: the order $1$ correction $\ell_E = \{L\sqrt E\}_\pi$ has been chosen in such a way that any element $f \in \mathcal{D}(\cS^{(E)}_L)$ satisfies Dirichlet b.c., that is, $P_{E'} f(0)$ and $P_{E'} f(1)$ are parallel to $(0,1)^\intercal$ where $P_{E'} := C_{E'} P C_{E'}^{-1}$.\\ Note that the eigenvalues and normalized eigenvectors of $\cS^{(E)}_L$ are given by $(\lambda, C_{E'}\iota {\varphi}^{(E)}_\lambda)$. Our next result connects $\cS^{(E)}_L$ with the collection of processes $(y^{(E)}_z,z\in {\symb C})$ (this is the same equation as in \eqref{Eq:yE}, except it is written here for a complex $z$) \begin{equation}\label{Eq:yEz}\begin{split} &\bigg(\begin{pmatrix} 0 & -\partial_t\\ \partial_t & 0\end{pmatrix} + \frac12 {\sqrt{\frac{L}{E}}} \begin{pmatrix} dB^{(L)} + \frac1{\sqrt 2} dW_1^{(L)} & \frac1{\sqrt 2} dW_2^{(L)}\\ \frac1{\sqrt 2} dW_2^{(L)} & dB^{(L)} - \frac1{\sqrt 2} dW_1^{(L)}\end{pmatrix} + \ell_E (2R_{E'}-I)\bigg) y_z^{(E)}\\ &= z R_{E'}y_z^{(E)} \;,\end{split}\end{equation} with initial condition $y_z^{(E)}(0) = (0,1)^\intercal$. \begin{lemma}\label{Lemma:Unitary} The eigenvalues of $\cS^{(E)}_L$ are those $\lambda \in{\symb R}$ for which the solution $y_\lambda^{(E)}$ of \eqref{Eq:yEz} is parallel to $(0,1)^\intercal$ at time $1$. The corresponding normalized eigenvector $\psi^{(E)}_\lambda$ is then a multiple of the equivalence class in $L^2_{R_{E'}}$ of $y_\lambda^{(E)}$, and we have (recall \eqref{Eq:PsiE}) \begin{equation*}P_{E'} \psi^{(E)}_\lambda = C_{E'} \begin{pmatrix} {\varphi}^{(E)}_\lambda \\ \frac1{L\sqrt E} ({\varphi}^{(E)}_\lambda)' \end{pmatrix} = \Psi_\lambda^{(E)}\;.\end{equation*} \end{lemma} \begin{proof} By definition of $\cS^{(E)}_L$, $\lambda$ is an eigenvalue of $\cS^{(E)}_L$ if and only if $\lambda$ is an eigenvalue of $\bs{\mathcal{H}}^{(E)}$. By the previous lemma, this is equivalent with: $(u_\lambda^{(E)},(u_\lambda^{(E)})')$ of \eqref{SDEs:u} is parallel to $(0,1)$ at time $1$. But since $y_\lambda^{(E)} = C_{E'} ( u_\lambda^{(E)}, \frac1{L\sqrt E} (u_\lambda^{(E)})')^\intercal$, we deduce that it is in turn equivalent to: $y_\lambda^{(E)}$ of \eqref{Eq:yE} is parallel to $(0,1)^\intercal$ at time $1$. In that case, since $\psi^{(E)}_\lambda = C_{E'} \bs{\varphi}^{(E)}_\lambda$ and given the previous lemma, we deduce that $\psi^{(E)}_\lambda$ is a multiple of the equivalence class of $y_\lambda^{(E)}$. The last identity then easily follows. \end{proof} \begin{remark} One can show that for any $f$ in the domain of $\cS^{(E)}_L$, the function $g:= \cS^{(E)}_L f$ satisfies the equation: \begin{equation}\label{Eq:SchE}\begin{split} &\bigg(2\begin{pmatrix} 0 & -\partial_t\\ \partial_t & 0\end{pmatrix} + {\sqrt{\frac{L}{E}}} \begin{pmatrix} dB^{(L)} + \frac1{\sqrt 2} dW_1^{(L)} & \frac1{\sqrt 2} dW_2^{(L)}\\ \frac1{\sqrt 2} dW_2^{(L)} & dB^{(L)} - \frac1{\sqrt 2} dW_1^{(L)}\end{pmatrix} + 2\ell_E (2R_{E'}-I)\bigg) P_{E'}f\\ &= 2R_{E'} g\;. \end{split} \end{equation} Note the similarity with \eqref{DefopSch}. \end{remark} \begin{remark} In the introduction, we mentioned that the space generated by the family $\{\Psi_\lambda^{(E)}\}_\lambda$ is not dense in $L^2_I$. Indeed, if we set $f:= C_{E'} (0,1)^\intercal$, we observe that $$ \langle f , \Psi_\lambda^{(E)}\rangle_{L^2_I} = \langle (0,1)^\intercal , ( \varphi_\lambda^{(E)} , \frac1{L\sqrt E} (\varphi_\lambda^{(E)})' )^\intercal \rangle_{L^2_I} = \int \frac1{L\sqrt E} (\varphi_\lambda^{(E)})' = 0\;.$$ \end{remark} \subsection{The resolvents and the precise statement of Theorem \ref{Th:CVoperator}}\label{Subsec:PreciseResolv} Our goal is now to prove convergence of the resolvents of $\cS^{(E)}_L$ to those of $\mathtt{CS}_\tau$. While the resolvents of the latter are operators on $L^2_I$, the resolvents of $\cS^{(E)}_L$ are defined on the quotient space $L^2_{R_{E'}}$: our first task is to extend these resolvents into well-defined, bounded operators on $L^2_I$. \medskip Of course, such an extension is \emph{far} from being unique. We will see that the extension that we opt for is related to the functions $\{\Psi^{(E)}_\lambda\}_\lambda$: in light of the statement of Theorem \ref{Th:Joint2}, this justifies a posteriori our choice. \medskip Fix $z \in {\symb C} \backslash {\symb R}$. For any $g \in L^2_{I}$, let $\dot{g}$ be its equivalent class in $L^2_{R_{E'}}$ and set $$ \overline{(\cS^{(E)}_L - z)^{-1}} g := P_{E'} (\cS^{(E)}_L - z)^{-1} \dot{g}\;.$$ \begin{figure}[h!] \includegraphics[width = 6cm]{Extension.pdf} \caption{Extension of $(\cS^{(E)}_L-z)^{-1}$.}\label{Fig:Extension} \end{figure} \begin{remark} The overline in the notation $\overline{(\cS^{(E)}_L - z)^{-1}}$ should not be confused with the complex conjugate. We use it to indicate that $\overline{(\cS^{(E)}_L - z)^{-1}}$ is an ``extension'' of the initial operator $(\cS^{(E)}_L - z)^{-1}$ to the space $L^2_I$. \end{remark} This definition is illustrated on Figure \ref{Fig:Extension}. We have composed $(\cS^{(E)}_L - z)^{-1}$ to the right with the (canonical) projection from $L^2_{I}$ to $L^2_{R_{E'}}$: this is clearly the only reasonable operation to apply here. On the other hand, we have composed it to the left with the densely defined injection $P_{E'}$ from $L^2_{R_{E'}}$ into $L^2_{I}$ and this may seem arbitrary. However note that for any eigenvalue $\lambda$ of $\cS^{(E)}_L$ we find $$ \overline{(\cS^{(E)}_L - z)^{-1}} \Psi^{(E)}_\lambda = (\lambda-z)^{-1} \Psi^{(E)}_\lambda\;,$$ thus justifying a posteriori the composition with $P_{E'}$. Our next proposition provides explicitly the kernel of $\overline{(\cS^{(E)}_L - z)^{-1}}$. Let $v^{(E)}_z$ be the solution of \eqref{Eq:yEz} starting from $v_z^{(E)}(0) = (1,0)^\intercal$. Note that $y^{(E)}_z$ and $v^{(E)}_z$ are respectively the Dirichlet and Neumann solutions of \eqref{Eq:yEz}, and that these functions live in $L^2([0,1], {\symb C}^2)$. We then set \begin{equation}\label{Eq:hatyzE} \hat{y}^{(E)}_z = v^{(E)}_z - \alpha^{(E)}\, y^{(E)}_z \;,\quad \alpha^{(E)} := \frac{\begin{pmatrix} 1 & 0\end{pmatrix} v^{(E)}_z(1)}{\begin{pmatrix} 1 & 0\end{pmatrix} y^{(E)}_z(1)}\;.\end{equation} Note that $\hat{y}^{(E)}_z$ is a solution of \eqref{Eq:yEz} which is parallel to $(0,1)^\intercal$ at time $1$ (but not at time $0$), and whose Wronskian with $y^{(E)}_z$ equals $1$. \begin{proposition} For any $g\in L^2_I$, we have \begin{equation}\label{Eq:ResolvE}\begin{split} \overline{(\cS^{(E)}_L - z)^{-1}} g(t) = \int \Big( \hat{y}_z^{(E)}(t) y^{(E)}_z(s)^\intercal \un_{s\le t} + {y}^{(E)}_z(t) \hat{y}_z^{(E)}(s)^\intercal \un_{s > t} \Big) R_{E'}(s) \;g(s) ds\;. \end{split}\end{equation} As a consequence, there is a constant $C>0$ independent of $E$ s.t.~the operator norm satisfies $$ \| \overline{(\cS^{(E)}_L - z)^{-1}} \| \le C \| y^{(E)}_z \|_\infty \| \hat{y}_z^{(E)}\|_\infty\;.$$ \end{proposition} \begin{proof} Let $u^{(E)}_z$ be the solution of \eqref{Eq:uE} starting from $(u^{(E)}_z(0),(u^{(E)}_z)'(0))=(0,L\sqrt E)$. Let $\hat{u}^{(E)}_z$ be the solution of \eqref{Eq:uE} that is parallel to $(0,1)^\intercal$ at time $1$ and whose Wronskian with $u^{(E)}_z$ satisfies $$(u^{(E)}_z)'(0) \hat{u}^{(E)}_z(0) - u^{(E)}_z(0) (\hat{u}^{(E)}_z)'(0) = L\sqrt E\;.$$ By the theory of Sturm-Liouville operators, we have an explicit integral form for the resolvent of the rescaled operator ${\mathcal{H}}^{(E)}$ (defined in \eqref{defopHE}) given by $$ ({\mathcal{H}}^{(E)}-z)^{-1} f(t) = \int_0^1 \big(\hat{u}^{(E)}_z(t) u^{(E)}_z(s) \un_{s \le t} + u^{(E)}_z(t) \hat{u}^{(E)}_z(s) \un_{t < s}(s)\big) f(s) ds\;,$$ for $f \in L^2([0,1],{\symb R})$. Note the identities $$ y^{(E)}_z = C_{E'} \begin{pmatrix} u^{(E)}_z \\ \frac1{L\sqrt E} (u^{(E)}_z)' \end{pmatrix}\;,\quad \hat{y}^{(E)}_z = C_{E'}\begin{pmatrix} \hat{u}^{(E)}_z\\ \frac1{L\sqrt E} (\hat{u}^{(E)}_z)'\end{pmatrix}\;.$$ Since $C_{E'}^\intercal J C_{E'} = J$, it is easy to check that $$ \frac{1}{L\sqrt{E}}((u^{(E)}_z)'(0) \hat{u}^{(E)}_z(0) - u^{(E)}_z(0) (\hat{u}^{(E)}_z)'(0)) = y_z^{(E)}(0)^\intercal J \hat{y}^{(E)}_z(0) = 1\;.$$ Furthermore from the identities $P_{E'} = C_{E'} P C_{E'}^{-1}$ and $\cS^{(E)}_L = C_{E'} \iota {\mathcal{H}}^{(E)} \iota^{-1}C_{E'}^{-1}$, we obtain $$ P_{E'} (\cS^{(E)}_L - z)^{-1} = C_{E'} P \iota ({\mathcal{H}}^{(E)} -z)^{-1} \iota^{-1}C_{E'}^{-1}\;.$$ Now observe that we have $$ u^{(E)}_z \iota^{-1}C_{E'}^{-1} \dot{g} = \begin{pmatrix} u^{(E)}_z & \frac1{L\sqrt E} (u^{(E)}_z)' \end{pmatrix} T C_{E'}^{-1} g = ({y}^{(E)}_z)^\intercal R_{E'} g\;,$$ and similarly $$ \hat{u}^{(E)}_z \iota^{-1}C_{E'}^{-1} \dot{g} = \begin{pmatrix} \hat{u}^{(E)}_z & \frac1{L\sqrt E} (\hat{u}^{(E)}_z)' \end{pmatrix} T C_{E'}^{-1} g = (\hat{y}^{(E)}_z)^\intercal R_{E'} g\;.$$ Furthermore $$ C_{E'} P \iota \hat{u}^{(E)}_z = \hat{y}^{(E)}_z\;,\quad C_{E'} P \iota {u}^{(E)}_z = {y}^{(E)}_z\;.$$ Putting everything together, we deduce the asserted expression for $P_{E'} (\cS^{(E)}_L - z)^{-1} \dot{g}$. Finally, since the entries of the matrix $R_{E'}$ are all bounded by $1$, the bound on the operator norm follows. \end{proof} Let $A_n, A$ be random bounded operators on $L^2_I$. Recall that $A_n \to A$ in law for the strong operator topology if the finite-dimensional marginals of the process $(A_n f, f\in L^2_I)$ converge in law to those of $(A f, f\in L^2_I)$. Furthermore $A_n\to A$ in law for the norm operator topology if the process $(A_n f, f\in L^2_I)$ converges in law for the topology of uniform convergence on bounded sets to $(A f, f\in L^2_I)$. The precise statement of Theorem \ref{Th:CVoperator} is then: \begin{theorem*}[Strong-resolvent convergence: precise statement] Fix $\tau > 0$ and consider $E=E(L) \sim L/\tau$. As $L\to\infty$ and for any given $z\in{\symb C}\backslash{\symb R}$, the operator $\overline{(\cS^{(E)}_L-z)^{-1}}$ converges in law towards $(\mathtt{CS}_\tau-z)^{-1}$ for the strong operator topology. However it does not converge in law to $(\mathtt{CS}_\tau-z)^{-1}$ for the norm operator topology. \end{theorem*} \subsection{Strong resolvent convergence}\label{subsec:StrongResolventCV} Recall from \eqref{Eq:ResolvE} and \eqref{Eq:ResolventDirac2} the expressions of the resolvents at stake. These resolvents depend respectively on the pair of processes $(y^{(E)}_z,\hat{y}^{(E)}_z)$, and $(y_z,\hat{y}_z)$. The main technical step consists in showing convergence in law of the former towards the latter.\\ Recall from \eqref{Eq:hatyzE} and \eqref{Eq:hatyz} that $\hat{y}^{(E)}_z = v^{(E)}_z - \alpha^{(E)}\, y^{(E)}_z$ and $\hat{y}_z = v_z - \alpha\, y_z$. Note that almost surely $\alpha^{(E)}$ is neither $0$ nor $\infty$. Indeed, suppose for instance that with positive probability $\alpha^{(E)}=\infty$, then it means that $y_z^{(E)}$ satisfies Dirichlet b.c.~at $0$ and $1$ so that $z$ is a non-real eigenvalue of the self-adjoint operator $\cS^{(E)}_L$, thus yielding a contradiction. The reasoning is the same for $\alpha^{(E)} = 0$ (with a contradiction with Neumann b.c.). Similarly almost surely $\alpha$ is neither $0$ nor $\infty$.\\ Our main technical step is the following result, whose proof is postponed to the next section. \begin{proposition}\label{Prop:CVyv} For any $z \in {\symb C}\backslash {\symb R}$, the process $(y^{(E)}_{z},v^{(E)}_{z})$ converges in law to $(y_{z},v_{z})$ for the topology of uniform convergence. \end{proposition} With this proposition at hand, we can proceed with the proof of the first part of the theorem. \begin{proof}[Proof of Theorem \ref{Th:CVoperator} - Strong resolvent convergence] To prove strong resolvent convergence, it suffices to show that for any fixed $g_1,\ldots,g_n \in L^2_I$, the vector $(\overline{(\cS^{(E)}_L - z)^{-1}} g_i)_{1\le i \le n}$ converges in law to $((\mathtt{CS}_\tau - z)^{-1} g_i)_{1\le i \le n}$. Note that the resolvents at stake are measurable functions of the processes $(y^{(E)}_{z},v^{(E)}_{z})$ and $(y_{z},v_{z})$. We thus combine Proposition \ref{Prop:CVyv} and Skorohod's Representation Theorem, and work under a coupling for which $(y^{(E)}_{z},v^{(E)}_{z})$ converges almost surely to $(y_{z},v_{z})$. It now suffices to prove that for any function $g \in L^2_I$, $\overline{(\cS^{(E)}_L - z)^{-1}} g$ converges in probability to $(\mathtt{CS}_\tau - z)^{-1} g$.\\ Recall that the norm of the operator $\overline{(\cS^{(E)}_L - z)^{-1}}$ is bounded by a constant times $\|y^{(E)}_{z}\|_\infty \|\hat{y}^{(E)}_{z}\|_\infty$, and similarly for the norm of $(\mathtt{CS}_\tau-z)^{-1}$. From the almost sure uniform convergence of $(y^{(E)}_{z},v^{(E)}_{z})$ towards $(y_{z},v_{z})$, we deduce that almost surely the norms of $(\overline{(\cS^{(E)}_L - z)^{-1}})_{L>1}$ and $(\mathtt{CS}_\tau-z)^{-1}$ are uniformly bounded. Since smooth functions are dense in $L^2_I$, we can restrict ourselves to considering smooth functions $g:[0,1]\to {\symb R}^2$ in the sequel.\\ From Proposition \ref{Prop:CVyv}, we deduce that the coefficient $\alpha^{(E)}$ converges almost surely to $\alpha$, and that the pair $(y^{(E)}_z,\hat{y}^{(E)}_z)$ converges almost surely to the pair $(y_z,\hat{y}_z)$.\\ Let us rewrite the resolvents in the following way $$ \overline{(\cS^{(E)}_L - z)^{-1}} g(t) = \hat{y}^{(E)}_z(t) u^{(E)}(t) + y^{(E)}_z(t) \hat{u}^{(E)}(t)\;,\quad t\in [0,1]\;,$$ with $$ u^{(E)}(t) := \int_0^t y_z^{(E)}(s)^\intercal R_{E'}(s) g(s) ds\;,\quad \hat{u}^{(E)}(t) := \int_t^1 \hat{y}_z^{(E)}(s)^\intercal R_{E'}(s) g(s) ds\;.$$ Similarly $$ (\mathtt{CS}_\tau - z)^{-1} g(t) = \hat{y}_z(t) u(t) + y_z(t) \hat{u}(t)\;,\quad t\in [0,1]\;,$$ with $$ u(t) := \frac12 \int_0^t y_z(s)^\intercal g(s) ds\;,\quad \hat{u}(t) := \frac12 \int_t^1 \hat{y}_z(s)^\intercal g(s) ds\;.$$ Then we have \begin{align*} \| \overline{(\cS^{(E)}_L - z)^{-1}} g - (\mathtt{CS}_\tau - z)^{-1} g\|_{L^2_I} &\le \| \hat{y}^{(E)}_z u^{(E)} - \hat{y}_z u \|_{L^2_I}+ \|y^{(E)}_z \hat{u}^{(E)} - y_z \hat{u} \|_{L^2_I}\;. \end{align*} The arguments to bound the two terms on the r.h.s.~are the same, so we provide the details only for the first. We write \begin{align*} \| \hat{y}^{(E)}_z u^{(E)} - \hat{y}_z u \|_{L^2_I} \le \| (\hat{y}^{(E)}_z - \hat{y}_z) u^{(E)} \|_{L^2_I} + \| \hat{y}_z (u^{(E)} - u)\|_{L^2_I} \end{align*} The a.s.~convergence of $\hat{y}^{(E)}_z$ to $\hat{y}_z$ ensures that the first term on the r.h.s.~goes to $0$ almost surely. Regarding the second term, we have $$ \| \hat{y}_z (u^{(E)} - u)\|_{L^2_I} \le \sup_{t\in [0,1]} |\hat{y}_z| \sup_{t\in [0,1]} |u^{(E)}(t) - u(t)|\;.$$ and it remains to show that $\sup_{t\in [0,1]} |u^{(E)}(t) - u(t)|$ goes to $0$ in probability. Observe that $$ u^{(E)}(t) - u(t) = \int_0^t y_z^{(E)}(s)^\intercal (R_{E'}(s) - (1/2)I) g(s) ds + \frac12 \int_0^t (y_z(s) - y_z^{(E)})^\intercal g(s) ds\;.$$ From the almost sure convergence of ${y}^{(E)}_z$ to ${y}_z$, we deduce that the second term goes to $0$ almost surely. Note that $$ R_{E'}(s) - (1/2)I = \frac12 \begin{pmatrix} \cos 2E's & \sin 2E's\\ \sin 2E's & -\cos 2E's\end{pmatrix}\;,$$ so that the first term is a linear combination of expressions of the form $$ \int_0^t f(s) (y^{(E)}_z)_i(s) g_j(s) ds\;,$$ where $f(s)$ is either $\cos 2E's$ or $\sin 2E's$ and $i,j \in \{1,2\}$. Since $E'\to\infty$ as $L\to\infty$, the Riemann-Lebesgue Lemma should imply that this term goes to $0$ almost surely as $L\to\infty$: however, we are not exactly within the scope of this lemma since the (random) function $y^{(E)}_z$ \emph{depends} on $L$. We thus rely on Lemma \ref{Lemma:RL}, which is stated below, and this suffices to conclude. \end{proof} \subsection{Absence of norm resolvent convergence} Set $$ g_E(t) := (\sin^2 E't , -\sin E't \cos E't)^\intercal\;,\quad t\in [0,1]\;.$$ It is easy to check that $$ \| g_E \|_{L^2_I} \to \frac12\;,\quad L\to\infty\;,$$ and therefore $(g_E)_{L\ge 1}$ remains in a bounded set of $L^2_I$.\\ Note that $R_{E'} g_E = 0$ so that $\overline{(\cS^{(E)}_L - z)^{-1}} g_E = 0$. To conclude, it suffices to show that as $L\to\infty$, with positive probability $(\mathtt{CS}_\tau - z)^{-1} g_E$ does not converge to $0$ in $L^2_I$.\\ Recall that $$ (\mathtt{CS}_\tau - z)^{-1} g_E(t) = \hat{y}_z(t) u_E(t) + y_z(t) \hat{u}_E(t)\;,\quad t\in [0,1]\;,$$ with $$ u_E(t) := \frac12 \int_0^t y_z(s)^\intercal g_E(s) ds\;,\quad \hat{u}_E(t) := \frac12 \int_t^1 \hat{y}_z(s)^\intercal g_E(s) ds\;.$$ By the Riemann-Lebesgue Lemma, almost surely $u_E, \hat{u}_E$ converge pointwise to $u,\hat{u}$ where $$ u(t) = \frac14 \int_0^t (y_z)_1(s)ds\;,\quad \hat{u}(t) = \frac14 \int_t^1 (\hat{y}_z)_1(s)ds\;.$$ Note that $|u_E|_\infty$ and $|\hat{u}_E|_\infty$ are almost surely bounded by $(|y_z|_\infty + |\hat{y}_z|_\infty)$. Therefore by the Dominated Convergence Theorem, almost surely $(\mathtt{CS}_\tau - z)^{-1} g_E$ converges in $L^2_I$ to $$t\mapsto \hat{y}_z(t) u(t) + y_z(t) \hat{u}(t)\;.$$ Since $y_z(t)$ and $\hat{y}_z(t)$ are linearly independent for all $t\in [0,1]$, we deduce that the $L^2_I$-norm of the latter vanishes if and only if $u(t) = \hat{u}(t) = 0$ for almost every $t\in [0,1]$. The latter property would imply that $(y_z)_1$ and $(\hat{y}_z)_1$ are identically $0$, which is not true almost surely. Consequently, almost surely $(\mathtt{CS}_\tau - z)^{-1} g_E$ converges in $L^2_I$ to a non-degenerate limit, thus concluding the proof of Theorem \ref{Th:CVoperator}. \section{Convergence of the SDEs}\label{Sec:SDEs} In this section, we prove Theorems \ref{Th:Joint1} and \ref{Th:Joint2}. The arguments are relatively elementary: we show convergence of the system of SDEs associated with the operator $\cS^{(E)}_L$ towards its counterpart for $\mathtt{CS}_\tau$. At the end of the section, we present the proof of Proposition \ref{Prop:CVyv}, since the arguments are small modifications of the previous ones. Until the end of the section we always assume that $E \sim L/\tau$ for some $\tau > 0$.\\ We consider the solutions $y_\lambda^{(E)}$ of \eqref{Eq:yEz} starting from $(0,1)^\intercal$ at time $0$. For $\lambda \in {\symb R}$, it is convenient to consider the associated polar coordinates, also called Pr\"ufer coordinates, implicitly defined by: $$ (y^{(E)}_\lambda)_1 = r^{(E)}_\lambda(t) \sin \theta^{(E)}_\lambda(t) \;,\quad (y^{(E)}_\lambda)_2 = r^{(E)}_\lambda(t) \cos \theta^{(E)}_\lambda(t)\;.$$ Set $W^{(L)} := W_1^{(L)} + i W_2^{(L)} (:= \sqrt{2} \int_0^{\cdot} e^{i 2E' s} dB^{(L)}(s))$. Tedious applications of It\^o's formula (see also Remark \ref{Rk:Ito}) show that the equations for $r^{(E)}_\lambda$ and $\theta^{(E)}_\lambda$ are \begin{equation}\label{Eq:SDEthetar}\begin{split} d\theta^{(E)}_\lambda(t) &= \frac{\lambda}{2} dt - \frac{\sqrt{L/E}}{2} dB^{(L)}(t) + \frac{\sqrt{L/E}}{2\sqrt 2} \Re(e^{2i \theta^{(E)}_\lambda} dW^{(L)}(t)) + \mathcal{E}(\theta^{(E)}_\lambda)(t)dt\;,\\ d\ln r^{(E)}_\lambda(t) &= \frac{L/E}8 dt + \frac{\sqrt{L/E}}{2\sqrt 2} \Im(e^{2i \theta^{(E)}_\lambda} dW^{(L)}(t)) + \mathcal{E}(\ln r^{(E)}_\lambda)(t)dt\;, \end{split}\end{equation} where the terms $\mathcal{E}(\cdot)$, which will be proven to be negligible in the limit $L\to\infty$, are given by \begin{align*} \mathcal{E}(\theta^{(E)}_\lambda)(t) &:= \frac{2\ell_E-\lambda}{2} \cos(2 \theta^{(E)}_\lambda(t) + 2E't) + \frac{L/E}4 \sin(2 \theta^{(E)}_\lambda(t)+2E't)\\ &\qquad- \frac{L/E}8 \sin(4 \theta^{(E)}_\lambda(t)+4E't) \;,\\ \mathcal{E}(\ln r^{(E)}_\lambda)(t) &:= \frac{2\ell_E - \lambda}{2} \sin (2\theta^{(E)}_\lambda(t)+2E't) - \frac{L/E}4 \cos(2 \theta^{(E)}_\lambda(t)+2E't)\\ &\qquad+ \frac{L/E}8 \cos(4 \theta^{(E)}_\lambda(t)+4E't)\;. \end{align*} In the above equations, the initial conditions are taken to be $\ln r^{(E)}_\lambda(0) = 0$ and $\theta^{(E)}_\lambda(0) = 0$. \begin{remark}\label{Rk:Ito} Recall $u_\lambda^{(E)}$ from \eqref{Eq:uE} and note that $u_\lambda^{(E)} = r^{(E)}_\lambda \sin (\theta^{(E)}_\lambda + E't)$ and $\frac1{L\sqrt E} (u_\lambda^{(E)})' = r^{(E)}_\lambda \cos (\theta^{(E)}_\lambda + E't)$. Since the evolution equation of $u_\lambda^{(E)}$ is simpler than that of $y_\lambda^{(E)}$, one may prefer to apply It\^o's formula at this level, namely $$ \ln r^{(E)}_\lambda = \frac12 \ln ((u_\lambda^{(E)})^2 + (\frac1{L\sqrt E} (u_\lambda^{(E)})')^2)\;,\quad \theta^{(E)}_\lambda + E't = \mathrm{arccotan\,} \frac{(u_\lambda^{(E)})'}{L\sqrt E \,u_\lambda^{(E)}}\;.$$ \end{remark} Let $\Theta_{\lambda}, \Gamma_{\lambda}$ be the solutions of \eqref{Eq:Theta} starting from $\Theta_{\lambda}(0) = 0$ and $\ln\Gamma_{\lambda}(0) = 0$. Observe the similarity between the SDEs solved by $(\Theta_{\lambda}, \Gamma_{\lambda})$ and $(\theta^{(E)}_\lambda,r^{(E)}_\lambda)$. \begin{proposition}\label{Prop:CVSDEs} Fix $\tau > 0$ and consider $E=E(L) \sim L/\tau$. The collection, indexed by $L>1$, of continuous processes $(\theta^{(E)}_\lambda(t),r^{(E)}_\lambda(t) ; t\in [0,1], \lambda \in {\symb R})$ converges in law to $(\Theta_{\lambda}(t),\Gamma_{\lambda}(t) ; t\in [0,1], \lambda \in{\symb R})$, for the topology of uniform convergence on compact sets of $[0,1]\times {\symb R}$. \end{proposition} With this proposition at hand, we can proceed with the proof of the theorems. \begin{proof}[Proofs of Theorems \ref{Th:Joint1} and \ref{Th:Joint2}] In the proof of Theorem \ref{Th:Intensity} we saw that almost surely ${\symb R} \ni \lambda \mapsto \Theta_\lambda(1)$ is a continuous, increasing bijection from ${\symb R}$ to ${\symb R}$. The very same arguments ensure that this property also holds for ${\symb R} \ni \lambda \mapsto \theta^{(E)}_\lambda(1)$.\\ The convergence in law stated in Proposition \ref{Prop:CVSDEs} thus implies that the ordered sequence of hitting ``times'' of $\pi{\symb Z}$ by $\lambda \mapsto \theta^{(E)}_{\lambda}(1)$ converges to the corresponding sequence associated to $\lambda \mapsto \Theta_{\lambda}(1)$.\\ Note that $y_\lambda^{(E)}$, resp.~$y_\lambda$, is a continuous function of $(\theta^{(E)}_\lambda,r^{(E)}_\lambda)$, resp.~$(\Theta_{\lambda},\Gamma_{\lambda})$. We deduce that the point process $$ \Big\{ \Big(\lambda, \frac{y_{\lambda}^{(E)}}{\|y_{\lambda}^{(E)}\|_{L^2}}\Big): \theta^{(E)}_{\lambda}(1) \in \pi{\symb Z}\Big\}\;,$$ converges in law to the point process $$ \Big\{ \Big(\lambda, \frac{y_{\lambda}}{\|y_{\lambda}\|_{L^2}}\Big): \Theta_{\lambda}(1) \in \pi{\symb Z}\Big\}\;.$$ This is exactly the convergence stated in Theorem \ref{Th:Joint2}. Since the point processes involved in the convergence stated in Theorem \ref{Th:Joint1} are continuous projections of the above point processes, Theorem \ref{Th:Joint1} follows. \end{proof} \begin{remark} As already mentioned, the convergence of the eigenvalues of Theorems \ref{Th:Joint1} and \ref{Th:Joint2} is the continuous analog of the result of \cite{KVV}. We believe that in Corollary 4 in \cite{KVV}, there should be no constant $\pi$ i.e. that the correct statement for the convergence of the eigenvalues of the discrete model (using their notations) is: \begin{align*} \Lambda_n - \arg(z^{2n+2}) \to \mbox{Sch}_\tau\,. \end{align*} \end{remark} The next three subsections are devoted to the proof of Proposition \ref{Prop:CVSDEs}, while the last subsection provides the arguments for the proof of Proposition \ref{Prop:CVyv}. \subsection{Tightness}\label{Subsec:Tightness} Suppose we can show that for any $p\ge 2$, there exists a constant $C>0$ such that for all $L>1$, for all $\mu<\lambda$ and all $0 \le s \le t \le 1$ \begin{equation}\label{Eq:MomentsTime} \mathbb{E}[ |\theta^{(E)}_\mu(t) - \theta^{(E)}_\mu(s)|^{2p}] \le C |t-s|^p\;,\quad \mathbb{E}[ |\ln r^{(E)}_\mu(t) - \ln r^{(E)}_\mu(s)|^{2p}] \le C |t-s|^p\;,\end{equation} and \begin{equation}\label{Eq:MomentsFreq} \mathbb{E}[ |\theta^{(E)}_\lambda(t) - \theta^{(E)}_\mu(t)|^{p}] \le C |\lambda-\mu|^p\;,\quad \mathbb{E}[ |\ln r^{(E)}_\lambda(t) - \ln r^{(E)}_\mu(t)|^{p}] \le C |\lambda-\mu|^p\;.\end{equation} Then, by Kolmogorov-Centsov's Theorem~\cite[Th 2.23 \& Th 14.9]{Kallenberg}, we deduce that there exists a constant $\beta > 0$ such that for any $p\ge 1$ and any compact set $K\subset {\symb R}$ $$ \sup_{L>1}\mathbb{E}\bigg[ \sup_{0\le s \le t \le 1} \sup_{\lambda,\mu \in K} \Big(\frac{|\theta^{(E)}_\mu(t) - \theta^{(E)}_\lambda(s)|}{(|t-s| + |\lambda-\mu|)^\beta}\Big)^p\bigg] < \infty\;,$$ and similarly for $\ln r^{(E)}_\lambda$. Since in addition $\theta^{(E)}_\lambda(0) = \ln r^{(E)}_\lambda(0) = 0$, we deduce that the collection of processes is tight.\\ It remains to prove the above bounds. The increments in $t$ are easy to control: since the drift and diffusion coefficients of the SDE are bounded by some constant (uniformly over all parameters), we get the desired bound using the triangle inequality (to control separately the terms coming from the drift and the martingale) and the Burkholder-Davis-Gundy inequality (to control the martingale term). Note that the bound of the drift term is of order $|t-s|^{2p}$ while the bound of the martingale term is only of order $|t-s|^p$.\\ On the other hand, the increments in $\lambda$ require some work: fix $p \geq 2$ and let us start with $\theta^{(E)}_\lambda$. Since the coefficients of the SDE are Lipschitz in $\theta_\lambda^{(E)}$, we deduce that there exists $C=C(p)>0$ such that for all $\mu \le \lambda$ and for all $t\in [0,1]$ we have $$ \mathbb{E}[ |\theta^{(E)}_\lambda(t) - \theta^{(E)}_\mu(t)|^{p}] \le C\Big( |\lambda-\mu|^{p} + \int_0^t \mathbb{E}[|\theta^{(E)}_\lambda(s) - \theta^{(E)}_\mu(s)|^{p}] ds + \mathbb{E}[|M_t|^{p}]\Big)\;,$$ where $$ M_t := \frac{\sqrt{L/E}}{2} \int_0^t \Big(\cos(2 \theta^{(E)}_\lambda(s)+2E's)-\cos(2 \theta^{(E)}_\mu(s)+2E's)\Big) dB^{(L)}(s)\;.$$ Combining the Burkholder-Davis-Gundy inequality and the Jensen inequality, there exists a constant $C'>0$ such that for all $t\in [0,1]$, $$ \mathbb{E}[|M_t|^{p}] \le C' \int_0^t \mathbb{E}\Big[ |\theta^{(E)}_\lambda(s) - \theta^{(E)}_\mu(s)|^{p} \Big] ds\;.$$ The desired bound on $\mathbb{E}[ |\theta^{(E)}_\lambda(t) - \theta^{(E)}_\mu(t)|^{p}]$ then follows from Gr\"onwall's lemma.\\ We turn to $\ln r^{(E)}_\lambda$. The strategy is the same, the only difference is that the coefficients of the SDE do not depend on $\ln r^{(E)}_\mu$ but on $\theta^{(E)}_\mu$. Since we already established bounds on the increments of the latter, one can easily conclude. \subsection{Control of the error terms}\label{Subsec:Error} Before we identify the limit of any converging subsequence, let us control the error terms appearing in the SDEs \eqref{Eq:SDEthetar}. \begin{lemma}\label{lem:Errors} For any $\lambda\in{\symb R}$, the following convergences hold in probability as $L\to\infty$ \begin{equation*}\begin{split} \sup_{0\le t \le 1} \Big| \int_0^t \mathcal{E}(\theta^{(E)}_\lambda)(s) ds\Big| \to 0\;,\qquad\sup_{0\le t \le 1} \Big| \int_0^t \mathcal{E}(\ln r^{(E)}_\lambda)(s) ds\Big| \to 0\;. \end{split} \end{equation*} \end{lemma} \begin{proof} Given the terms that appear in $\mathcal{E}$, it suffices to show that for any functions $f,g$ of the form $\cos(a \cdot), \sin(a \cdot)$, with $a\in \{1,2,4\}$, we have the following convergence in probability as $L\to\infty$ $$ \sup_{0\le t \le 1} \Big| \int_0^t f(\theta^{(E)}_\lambda(s)) g(E's) ds \Big| \to 0\;.$$ This is not a direct consequence of the Riemann-Lebesgue Lemma since $\theta^{(E)}_\lambda$ \emph{depends} on $L$. Without loss of generality, we can take $f=\sin(\cdot)$ and $g=\cos(\cdot)$. By It\^o's formula we find \begin{align*} \int_0^t \sin(\theta^{(E)}_\lambda(s)) \cos(E's) ds &= \frac1{E'}\sin(\theta^{(E)}_\lambda(t)) \sin(E't)\\ &- \frac1{E'} \int_0^t \sin(E's) \Big(\cos(\theta^{(E)}_\lambda(s)) d\theta^{(E)}_\lambda(s) - \frac12 \sin(\theta^{(E)}_\lambda(s)) d\langle \theta^{(E)}_\lambda\rangle_s\Big) \end{align*} Recall that $E'\to\infty$ as $L\to\infty$. Obviously, the first term on the r.h.s.~goes to $0$ uniformly over $t\in [0,1]$. Regarding the second term, it can be split into martingale and non-martingale terms. The non-martingale terms go to $0$ in probability uniformly over $t\in [0,1]$ since all the terms appearing inside the integral are uniformly bounded by some deterministic constant. The martingale term is given by $$ N_t := -\frac1{E'} \int_0^t \sin(E's) \cos(\theta^{(E)}_\lambda(s)) \frac{\sqrt{L/E}}{2\sqrt 2} \Re(e^{2i \theta^{(E)}_\lambda} dW^{(L)}(s))\;.$$ The Burkholder-Davis-Gundy inequality ensures that there exists a constant $C>0$ such that $$ \mathbb{E}[\sup_{0\le t \le 1} N_t^2] \le C \mathbb{E}[\langle N\rangle_1]\;.$$ Since the r.h.s.~is of order $(1/E')^2$, we deduce that $\sup_{0\le t \le 1} |N_t|$ goes to $0$ in probability, as required. \end{proof} \subsection{Identification of the limit}\label{Subsec:IdLim} Fix $\lambda_1, \ldots, \lambda_n \in {\symb R}$. We will identify the law of any converging subsequence of $(\theta_{\lambda_i}^{(E)},\ln r_{\lambda_i}^{(E)})_{1\le i \le n}$ through the following standard martingale problem, whose proof can be found in~\cite[Prop 5.4.6]{Karatzas} \begin{proposition} Let $(\theta_{\lambda_i},\ln r_{\lambda_i})_{1\le i \le n}$ be a continuous process on $[0,1]$ and let $\mathcal{F}$ be the associated filtration. Assume that \begin{equation*}\begin{split} M_{\lambda_i}(t) = \theta_{\lambda_i}(t) - \frac{\lambda_i}{2} t\;,\quad N_{\mu_i}(t) = \ln r_{\mu_i}(t) - \frac{\tau}{8}t\;. \end{split}\end{equation*} together with \begin{equation}\label{Eq:Brackets2}\begin{split} &M_{\lambda_i}(t)M_{\lambda_j}(t) - \frac{\tau}{4} t - \frac{\tau}{8} \int_0^t \cos(2\theta_{\lambda_i} - 2\theta_{\lambda_j}) ds\;,\\ &N_{\lambda_i}(t)N_{\lambda_j}(t) - \frac{\tau}{8} \int_0^t \cos(2\theta_{\lambda_i} - 2\theta_{\lambda_j}) ds\;,\\ &M_{\lambda_i}(t)N_{\lambda_j}(t) - \frac{\tau}{8} \int_0^t \sin(2\theta_{\lambda_j} - 2\theta_{\lambda_i}) ds\;, \end{split}\end{equation} are $\mathcal{F}$-martingales. Then $(\theta_{\lambda_i},\ln r_{\lambda_i})_{1\le i \le n}$ coincides in law with the unique solution of the SDEs \eqref{Eq:Theta} associated to the parameters $\lambda_1,\ldots,\lambda_n$. \end{proposition} Recall the SDEs \eqref{Eq:SDEthetar} and define the martingales \begin{equation}\label{Eq:Mgale}\begin{split} M_{\lambda_i}^{(E)}(t) &= \theta^{(E)}_{\lambda_i}(t) - \frac{\lambda_i}{2} t - \int_0^t \mathcal{E}(\theta^{(E)}_{\lambda_i})(s) ds\;,\\ N_{\lambda_i}^{(E)}(t) &= \ln r^{(E)}_{\lambda_i}(t) - \frac{L/E}{8} t - \int_0^t \mathcal{E}(\ln r^{(E)}_{\lambda_i})(s) ds\;. \end{split}\end{equation} From the moment bounds established for tightness, we easily deduce that all moments of these martingales are bounded uniformly over $L> 1$.\\ Let $(\theta_{\lambda_i},\ln r_{\lambda_i})_{1\le i \le n}$ be the limit of a converging subsequence of $(\theta_{\lambda_i}^{(E)},\ln r_{\lambda_i}^{(E)})_{1\le i \le n}$: for simplicity we keep the same notation for the subsequence. We naturally define \begin{equation}\label{Eq:Mgale2}\begin{split} M_{\lambda_i}(t) &= \theta_{\lambda_i}(t) - \frac{\lambda_i}{2} t\;,\\ N_{\lambda_i}(t) &= \ln r_{\lambda_i}(t) - \frac{\tau}{8}t\;. \end{split}\end{equation} Thanks to Lemma \ref{lem:Errors}, we can pass to the limit on \eqref{Eq:Mgale} and we obtain \eqref{Eq:Mgale2}. Given the aforementioned moment bounds, we also deduce that $M_{\lambda_i}, N_{\lambda_i}$ are martingales (in the natural filtration associated to the processes at stake). We now identify their brackets.\\ Again from \eqref{Eq:SDEthetar} we see that the processes \begin{equation}\label{Eq:Brackets}\begin{split} &M_{\lambda_i}^{(E)}(t)M_{\lambda_j}^{(E)}(t) - \frac{L/E}{4} \int_0^t (-1+ \cos(2\theta^{(E)}_{\lambda_i}(s)+2E's)) (-1+ \cos(2\theta^{(E)}_{\lambda_j}(s)+2E' s)) ds\;,\\ &N_{\lambda_i}^{(E)}(t)N_{\lambda_j}^{(E)}(t) - \frac{L/E}{4} \int_0^t \sin(2\theta^{(E)}_{\lambda_i}(s)+2E' s) \sin(2\theta^{(E)}_{\lambda_j}(s)+2E' s) ds\;,\\ &M_{\lambda_i}^{(E)}(t)N_{\lambda_j}^{(E)}(t) - \frac{L/E}{4} \int_0^t (-1+ \cos(2\theta^{(E)}_{\lambda_i}(s)+2E' s)) \sin(2\theta^{(E)}_{\lambda_j}(s)+2E' s) ds\;, \end{split}\end{equation} are martingales. We aim at passing to the limit on \eqref{Eq:Brackets}. We can compute the limits of the three integrals therein: by expanding the $\cos$ and $\sin$ functions, the oscillating terms in $E'$ will vanish thanks to the Riemann-Lebesgue-type argument of the previous subsection, and the remaining terms match with the ones in the integrals that appear in \eqref{Eq:Brackets2}. Combining this with the aforementioned moment bounds, we deduce that the processes of \eqref{Eq:Brackets2} are also martingales. We can then apply the martingale problem recalled above and this completes the proof of Proposition \ref{Prop:CVSDEs}. \subsection{Proof of Proposition \ref{Prop:CVyv}} The proof is very close to the proof of Proposition \ref{Prop:CVSDEs}. The main difference is that we consider solutions of \eqref{Eq:yEz} with a non-real parameter $z$ so that the polar representation used previously does not hold anymore: hence we work directly at the level of the SDEs \eqref{Eq:yEz} to prove the convergences. Note that we prove the convergence for a fixed $z$, although the arguments could be adapted to get the local uniform convergence of the family.\\ The SDE \eqref{Eq:yEz} solved by $y^{(E)}_z$ can be written in the following way: \begin{align*} dy^{(E)}_z(t) &= \Big(\frac{z}{2} J^{-1} dt - \frac{\sqrt{L/E}}{2}J^{-1}\begin{pmatrix} d{B}^{(L)}(t) + \frac1{\sqrt{2}}dW_1^{(L)}(t) & \frac1{\sqrt{2}}dW_2^{(L)}(t) \\ \frac1{\sqrt{2}}dW_2^{(L)}(t) & dB^{(L)}(t) - \frac1{\sqrt{2}}dW_1^{(L)}(t) \end{pmatrix}\Big) y^{(E)}_z(t)\\ &\qquad+ \mathcal{E}(t) y^{(E)}_z(t) dt\;, \end{align*} where $$ \mathcal{E}(t) := \frac{z-2\ell_E}2 J^{-1}(2R_{E'}-I)\;,\quad J^{-1}(2R_{E'} - I) = \begin{pmatrix} \sin 2E't & -\cos 2E't \\ -\cos 2E't & -\sin 2E't \end{pmatrix}\;.$$ The putative limit satisfies $$dy_z(t) = \Big(\frac{z}{2} J^{-1} dt - \frac{\sqrt{\tau}}{2}J^{-1}\begin{pmatrix} d\mathcal{B}(t) + \frac1{\sqrt{2}} d\mathcal{W}_1(t) & \frac1{\sqrt{2}}d\mathcal{W}_2(t) \\ \frac1{\sqrt{2}}d\mathcal{W}_2(t) & d\mathcal{B}(t) - \frac1{\sqrt{2}} d\mathcal{W}_1(t) \end{pmatrix}\Big) y_z(t)\;.$$ The processes $y^{(E)}_z$ and $v^{(E)}_z$, resp.~$y_z$ and $v_z$, satisfy the same equations, the only difference lies in the initial conditions: $$ y^{(E)}_z(0) = y_z(0) = \begin{pmatrix} 0\\ 1 \end{pmatrix}\;,\quad v^{(E)}_z(0) = v_z(0) = \begin{pmatrix} 1\\ 0 \end{pmatrix}\;.$$ Consequently, the proof of the tightness relies on exactly the same arguments for $y^{(E)}_z$ and $v^{(E)}_z$, and we restrict ourselves to presenting the details for the former. We start with some a priori bounds. \begin{lemma}\label{Lemma:Moments} For any $p \geq 1$, there exists $C>0$ such that $$\sup_{L>1} \sup_{t\in [0,1]}\mathbb{E}[|y^{(E)}_z(t)|^p] < \infty\;,\quad \sup_{t\in [0,1]}\mathbb{E}[|y_z(t)|^p] < \infty\;.$$ \end{lemma} \begin{proof} Fix $p \geq 2$. From the integral form of the SDE above, applying successively the Burkholder-Davis-Gundy inequality and the Jensen inequality we get the existence of some deterministic constants $C,C'>0$ (depending on $z$ and $p$) such that uniformly over all $L$ and $t$: \begin{align*} \mathbb{E}[|y^{(E)}_z(t)|^{p}] &\le 1 + C \Big(\int_0^t \mathbb{E}[|y^{(E)}_z(s)|^{p}] ds + \mathbb{E}\big[\big(\int_0^t |y^{(E)}_z(s)|^2 ds\big)^{p/2}\big]\Big)\\ &\le 1 + C' \int_0^t \mathbb{E}[|y^{(E)}_z(s)|^{p}] ds \;. \end{align*} Gr\"onwall's Lemma then yields the desired bound. The proof is the same for $y_z$. \end{proof} We now control the oscillations thanks to the following lemma, which is also used in Subsection \ref{subsec:StrongResolventCV} for the proof of the strong resolvent convergence. \begin{lemma}\label{Lemma:RL} Let $h:[0,1]\to{\symb R}$ be a smooth function and let $f$ be either $\sin(2E'\cdot)$ or $\cos(2E'\cdot)$. Then for any $i\in\{1,2\}$ we have as $L\to\infty$ $$ \mathbb{E}\Big[\sup_{0\le t \le 1} \Big| \int_0^t f(s) (y^{(E)}_z)_i(s) h(s) ds \Big|\Big] \to 0\;.$$ \end{lemma} \begin{proof} The arguments are essentially the same as those of the proof of Lemma \ref{lem:Errors}. Take $f=\cos(2E'\cdot)$ and $i=1$ without loss of generality. By It\^o's formula, we have \begin{align*} \int_0^t \cos(2E' s) (y^{(E)}_z)_1(s) h(s) ds &= \frac1{2E'} (y^{(E)}_z)_1(t) h(t) \sin(2E' t)\\ &-\frac1{2E'} \int_0^t \sin(2E's) \Big(h'(s)(y^{(E)}_z)_1(s) + h(s) d(y^{(E)}_z)_1(s) \Big) ds\;. \end{align*} Since $E'\to\infty$ and given the bounds of Lemma \ref{Lemma:Moments} it is easy to check that the expectation of all terms goes to $0$, except for the martingale term produced by $d(y^{(E)}_z)_1(s)$ which requires some additional work. This martingale term is given by $$ N_t := \frac{\sqrt{L/E}}{4E'} \int_0^t \sin(2E's) h(s) \Big( \frac1{\sqrt 2} (y^{(E)}_z(s))_1 dW_2^{(L)}(s) + (y^{(E)}_z(s))_2 (dB^{(L)}(s) - \frac1{\sqrt 2} dW_1^{(L)}(s)) \Big) ds\;.$$ By the Burkholder-Davis-Gundy inequality there exists $C>0$ such that $$ \mathbb{E}\big[ \sup_{0\le t \le 1} N_t^2\big] \le \frac{C}{(E')^2} \mathbb{E}\Big[\int_0^t h(s)^2 |y^{(E)}_z(s)|^2 ds\Big]\;,$$ which, in view of Lemma \ref{Lemma:Moments}, goes to $0$ as $L\to\infty$. \end{proof} As a consequence of Lemma \ref{Lemma:RL}, we deduce that $\sup_{0\le t \le 1} \Big|\int_0^t \mathcal{E}(s) y_z^{(E)}(s) ds\Big|$ goes to $0$ in probability as $L\to\infty$.\\ Let us now prove tightness of $(y^{(E)}_z)_{L>1}$ (once again, the arguments are exactly the same for $(v^{(E)}_z)_{L>1}$). Fix $p\ge 1$. By the triangle and the Burkholder-Davis-Gundy inequalities at the first line, the H\"older inequality at the second line and Lemma \ref{Lemma:Moments} at the third line, there exist some constants $C,C'>0$ such that for all $L>1$ and all $0 \le s \le t \le 1$ \begin{align*} \mathbb{E}[|y^{(E)}_z(t) - y^{(E)}_z(s)|^{2p}] &\le C \Big( \mathbb{E}\Big[\Big(\int_s^t |y^{(E)}_z(r)| dr\Big)^{2p}\Big] + \mathbb{E}\Big[\Big(\int_s^t |y^{(E)}_z(r)|^2 dr\Big)^p\Big] \Big)\\ &\le C \int_s^t \mathbb{E}\Big[|y^{(E)}_z(r)|^{2p}\Big] dr \times \Big((t-s)^{2p-1} + (t-s)^{p-1}\Big) \\ &\le C' |t-s|^{p}\;. \end{align*} By Kolmogorov-Centsov's Theorem~\cite[Th 2.23 \& Th 14.9]{Kallenberg}, we deduce that there exists a constant $\beta > 0$ such that for any $p\ge 1$ $$ \sup_{L>1}\mathbb{E}\bigg[ \sup_{0\le s \le t \le 1} \Big(\frac{|y^{(E)}_z(t) - y^{(E)}_z(s)|}{|t-s|^\beta}\Big)^p\bigg] < \infty\;,$$ and tightness follows.\\ The identification of the limit of any converging subsequence of $(y^{(E)}_{z},v^{(E)}_{z})_{L>1}$ can be carried out with a martingale problem as in Subsection \ref{Subsec:IdLim} and with the help of Lemma \ref{Lemma:RL}: the arguments being virtually the same, we do not provide the details. \section{Top of the spectrum}\label{sec:top} In this section, we assume that $E = E(L)\gg L$ and we explain how the previous arguments can be adapted to establish Theorem \ref{Th:Top}. First of all, since the limiting objects appearing in that statement are all deterministic the asserted convergences in probability are granted provided that convergence in law holds, and this is what we are going to prove.\\ Let $\mathcal{D}(\mathtt{F})$ be the closure in $H^1((0,1),{\symb R}^2)$ of all smooth functions $f:[0,1]\to{\symb R}^2$ such that $f_1(0) =f_1(1) = 0$. One can check that the operator $\mathtt{F}$ on $\mathcal{D}(\mathtt{F})$ is self-adjoint. Following the same steps as in Section \ref{sec:limitingoperator} we see that the SDEs associated to the operator $\mathtt{F}$ are trivial: \begin{align*} &dy_z(t) = -\frac{z}{2} J y_z(t) dt\;,\quad t \in [0,1]\;,\quad z \in {\symb C}\;,\quad y_z(0) = \begin{pmatrix} 0 \\ 1\end{pmatrix}\;, \end{align*} and for $\lambda\in{\symb R}$ \begin{align*} &d \Theta_{\lambda}(t) = \frac{\lambda}{2} dt \;, \quad\Theta_{\lambda}(0) = 0\;,\\ &d \ln \Gamma_{\lambda}(t) = 0 dt\;,\quad \Gamma_{\lambda}(0) = 1\;. \end{align*} Their solutions are given by $y_\lambda(t) = (\sin (\lambda t/2),\cos(\lambda t/2))$, $\Theta_\lambda(t) = \lambda t/2$ and $\Gamma_\lambda(t) = 1$.\\ The proofs of the convergences are \emph{exactly} the same as those presented in Sections \ref{sec:CVoperator} and \ref{Sec:SDEs}: the only difference is that many terms, that had non-trivial contributions in the limit in the regime $E\sim L/\tau$, now vanish in the limit since $L/E \to 0$. \subsection*{Acknowledgements} The work of CL is supported by the project SINGULAR ANR-16-CE40-0020-01. The authors thank Gaultier Lambert for his useful comments on the first version of this paper. \bibliographystyle{Martin}
\subsection{Related works} There have been substantial discussions on the memorization effects of deep neural networks, and how memorization relates to generalization \cite{zhang2016understanding,neyshabur2017exploring,arpit2017closer,feldman2020does,feldman2020neural}. Most relevant to us, recent works have reported negative consequences of memorizing noisy labels, and have proposed corresponding fixes \cite{natarajan2013learning,liu2016classification,liu2019peer,song2019prestopping,yao2020searching,cheng2017learning,pmlr-v97-chen19g,han2020sigua,song2019prestopping}. Different solutions seem to be effective when guarding different type of noise, but there lacks a unified framework to understand why one approach would work and when they would fail. Recently, there is increasing attention on learning with instance-dependent noise, which proves to be a much more challenging case \cite{cheng2017learning,cheng2020learning,xia2020parts,zhu2020second}. Our work echoes this effort and emphasizes the instance-level understanding. This focus particularly suits a study with long-tail distributions of instances that appear with different frequencies, which is often shown to be the case with image datasets \cite{zhu2014capturing}. \textbf{Common solutions} toward learning with noisy labels build around loss or label corrections \cite{natarajan2013learning,Patrini_2017_CVPR,xia2019anchor}. More recently, light and easy-to-implement solutions are proposed too \cite{lukasik2020does,liu2019peer}. We delve into three of them in Section \ref{sec:fix}. As an area with growing interests, there exist many other solutions - we will not have space to list all, but we want to mention the following two streams of efforts. \emph{Sample cleaning}: Sample cleaning leverages the idea of detecting instance $x$ whose label is corrupted ($\tilde{y} \neq y$) \cite{jiang2017mentornet,han2018co,yu2019does,yao2020searching,wei2020combating,cheng2020learning}. Then the training is mainly done with the selected clean instances, with the aid of processed information from the detected corrupted examples. \emph{Robust loss function}: The literature has also observed the proposal of robust loss functions that perform well with dealing outlier noisy examples \cite{zhang2018generalized,menon2019can,charoenphakdee2019symmetric,wang2019symmetric}. \subsection{Overview of the main results: Disparate impacts and treatments of label noise} Our first set of results, perhaps non-surprisingly, show the disparate impact of noisy labels at the instance level. The impact to the drop of generalization power is linearly dependent on the frequency of the instance and its labels' associated noise rate: \begin{theorem}[\textbf{Disparate Impacts, Informal}] For an instance $x$ that appears $l$ times ($l$-appearance instance) in the training data (with $n$ samples), a model $h$ memorizing its $l$ noisy labels leads to the following order of individual excessive generalization error: \vspace{-0.05in} \[ \Omega\left( \frac{l^2}{n^2} \cdot \text{(label noise rate at $x$)}\right) \] \vspace{0.05in} \label{thm:noisy} \end{theorem} \vspace{-0.2in} Our discussions then move to how the existing treatments fare at the instance level. We will introduce a memorization paradox in Section \ref{subsec:paradox} to highlight a common pitfall when analyzing the performance of existing algorithmic treatments at the population level, when a deep model is considered and is able to memorize training examples. Probably more alarmingly, we then provide a set of instance-level analysis to show the disparate treatments of several existing learning with noisy label solutions: \begin{theorem}[\textbf{Disparate Treatments, Informal}] For an instance $x$ that appears $l$ times in the training data ($l$-appearance instance), \textbf{when $l$ is large (high-frequency instance)}, with high probability, performing loss correction \cite{natarajan2013learning,Patrini_2017_CVPR} and using peer loss correction \cite{liu2019peer} on $x$ improves generalization performance compared to memorizing the noisy labels. \textbf{When $l$ is small (long-tail instance)}, with non-negligible probability, both loss correction and peer loss incur higher prediction errors than memorizing the noisy labels. \end{theorem} \subsection{Noisy labels} We consider a setting where the training labels are noisy. Suppose for each training instance $(x,y)$, instead of observing the true label $y$, we observe a noisy copy of it, denoting by $\tilde{y}$. Each $\tilde{y}$ is generated according to the following model: \begin{align} T_{k,k'}(x) := \mathbb{P}[\tilde{y} = k' |y=k, x], k',k \in Y. \end{align} We will denote by $T(x) \in \mathbb{R}^{m \times m}$ the noise transition matrix with the $(k,k')$-entry defined by $ T_{k,k'}(x)$. Each of the above noisy label generation is independent across different $x$. We have access to the above noisy dataset $S':=\{(x_1,\tilde{y}_1),...,(x_n,\tilde{y}_n)\}$. An $x$ that appears $l$ times in the dataset will have $l$ independently generated noisy labels. One can think of these as $l$ similar data instances, with each of them equipped with a single noisy label collected independently. For instance, Figure \ref{fig:cifar} shows a collection of 10 similar ``Cats" from the CIFAR-10 dataset \cite{krizhevsky2009learning}. On top of each image, we show a ``noisy" label collected from Amazon Mechanical Turk. Approximately, one can view each row as a $x$ with 5 appearances, with each of the instances associated with a potentially corrupted label. $T(x)$ varies across the dataset $S$, and possibly that $T(x)$ would even be higher for low-frequency/rare instances, due to the inherent difficulties in recognizing and labeling them. Note the noisy label distribution $\mathbb{P}[\tilde{y}|x]$ has a larger entropy due to the additional randomness introduced by $T(x)$ and is therefore harder to fit. As we shall see later, this fact poses additional challenges, especially for the long-tail instances that have an insufficient number of observations. \begin{figure}[!t] \centering \includegraphics[width=0.45\textwidth]{figures/cifar_cat_2_5-crop_t1.pdf} \caption{Sample examples of ``Cats" in CIFAR-10 with noisy labels on top. Examples are taken from \cite{zhu2021clusterability}. \label{fig:cifar} \end{figure} \subsection{Loss correction} We start with loss correction and notice that the loss correction step is equivalent to the following ``label correction" \footnote{Please note that our `` label correction" definition differs from the existing ones in the literature.} procedure. Denote by $\mathbb{P}(\mathbf{\tilde{y}}):=[\mathbb{P}[\tilde{y}=k|x]]_{k \in Y}$ the vector form of the distribution of noisy label $\tilde{y}$, and $\mathbf{y}$ as the vector form of one-hot encoding of the true label $y$. As assumed earlier, the generation of noisy label $\tilde{y}$ follows: $ \mathbb{P}(\mathbf{\tilde{y}}) := T^{\top}(x) \cdot \mathbf{y}. $ When $T(x)$ is invertible (commonly assumed), we will have $ \mathbf{y} = (T^{-1}(x))^{\top}\cdot \mathbb{P}(\mathbf{\tilde{y}}) $, that is when $\mathbb{P}(\mathbf{\tilde{y}})$ is the true and exact posterior distribution of $\tilde{y}$, $ (T^{-1}(x))^{\top}\cdot \mathbb{P}(\mathbf{\tilde{y}})$ recovers $\mathbf{y}$. Based on the above observation, easily we can show that (using linearity of expectation) loss correction effectively pushed $h$ to memorize $(T^{-1}(x))^{\top}\cdot \mathbb{P}(\mathbf{\tilde{y}})=\mathbf{y}$, i.e. the clean label: \vspace{-5pt} \begin{tcolorbox}[colback=grey!5!white,colframe=grey!5!white] \vspace{-15pt} \begin{align} &\mathbb{E}_{\tilde{y}|y}[\mathbf{\tilde{y}}^{\top} \cdot \Bell_{\text{LC}}(h(x))] \nonumber \\ =&\mathbb{E}_{\tilde{y}|y}[\mathbf{\tilde{y}}^{\top} \cdot T^{-1}(x) \cdot \Bell(h(x))] \nonumber\\ =& \mathbb{E}_{\mathbf{y}' \sim (T^{-1}(x))^{\top}\cdot \mathbb{P}(\mathbf{\tilde{y}})}\left[(\mathbf{y}')^{\top} \cdot \Bell(h(x))\right] \nonumber \\ =& \mathbf{y}^{\top}\cdot \Bell(h(x)) \label{eqn:lc} \end{align} \vspace{-25pt} \end{tcolorbox} \vspace{-2pt} That is loss correction encourages $h$ to memorize the true label $\mathbf{y}$, therefore reducing $\mathbb{P}[h(x)\neq y]$ to 0 to improve generalization. The above is a clean case with accessing $\mathbb{P}(\mathbf{\tilde{y}})$, the exact noisy label distribution, which differs from the empirical noisy label distribution $\tilde{\mathbb{P}}[\tilde{y}=k|x]$ that a deep neural network can access and memorize. This is mainly due to the limited number, $l$, of noisy labels for an $x \in X_{S=l}$. Denote by $\tilde{\mathbb{P}}(\mathbf{\tilde{y}})$ the vector form of $\tilde{\mathbb{P}}[\tilde{y}=k|x]$. Let $\mathbf{y}_{\text{LC}} $ be the ``corrected label" following from the distribution defined by $(T^{-1}(x))^{\top}\cdot \tilde{\mathbb{P}}(\mathbf{\tilde{y}})$: \[ \text{Corrected Label: }~~\mathbf{y}_{\text{LC}} = (T^{-1}(x))^{\top}\cdot \tilde{\mathbb{P}}(\mathbf{\tilde{y}}). \] Denote by $x(1),...,x(l)$ the $l$ appearance of $x$, and $\tilde{y}(1),...,\tilde{y}(l)$ the corresponding noisy labels. Similar to Eqn. (\ref{eqn:lc}) we can show that: \vspace{-5pt} \begin{tcolorbox}[colback=grey!5!white,colframe=grey!5!white] \vspace{-20pt} \begin{align} &\frac{1}{l}\sum_{i=1}^l\mathbf{\tilde{y}}^{\top}(i) \cdot \Bell_{\text{LC}}(h(x)) \nonumber \\ =&\mathbb{E}_{\tilde{\mathbb{P}}(\mathbf{\tilde{y}})}[\mathbf{\tilde{y}}^{\top} \cdot T^{-1}(x) \cdot \Bell(h(x))] \nonumber\\ \mathbf{y}_{\text{LC}}^{\top} \cdot \Bell(h(x)) \label{eqn:lc2} \end{align} \vspace{-25pt} \end{tcolorbox} \vspace{-2pt} That is, the empirical loss for $x$ with loss correction is equivalent with training using $\mathbf{y}_{\text{LC}}$! Next we will focus on the binary case: $T(x)$ is fully characterized and determined by $e_+(x),e_-(x)$ (Eqn. \ref{eqn:T}). We will follow the assumption made in the literature that $e_+(x) + e_-(x) < 1$ (noisy labels are at least positively correlating with the true label). Easy to prove that the two entries of $\mathbf{y}_{\text{LC}}$ add up to 1\footnote{For binary labels $\{-1,+1\}$, the first entry of the vectors corresponds to $-1$ ($\mathbf{y}_{\text{LC}}[1]$), the second for $+1$ ($\mathbf{y}_{\text{LC}}[2]$).}: \begin{lemma} $\mathbf{y}_{\text{\emph{LC}}}[1] + \mathbf{y}_{\text{\emph{LC}}}[2] =1$.\label{lemma:smy} \end{lemma} \vspace{-0.05in} However, it is possible that $(T^{-1}(x))^{\top}\cdot \tilde{\mathbb{P}}(\mathbf{\tilde{y}})$ is not a valid probability measure, in which case we will simply cap $\mathbf{y}_{\text{LC}}$ at either $[1;0]$ or $[0;1]$. Denote by $y_{\text{LC}}$ the random variable drawn according to $\mathbf{y}_{\text{LC}}$. We again call $h$ memorizing $\mathbf{y}_{\text{LC}}$ if $\mathbb{P}[h(x) = k] = \mathbb{P}[y_{\text{LC}}=k|x], \forall k \in Y$. Let's simplify our argument by assuming the following equivalence: \begin{assumption} The trained model $h$ using loss correction (minimizing Eqn. (\ref{eqn:lc2})) is able to memorize $\mathbf{y}_{\text{\emph{LC}}}$. \label{ass:lc:memorize} \end{assumption} \vspace{-0.05in} The first message we are ready to send is: \textbf{ For an $x$ with large $l$, with high probability, loss correction returns smaller generalization error than memorizing noisy labels.} Denote by $sgn(y)$ the sign function of $y$. For $x \in X_{S=l}$, consider a non-trivial case that $\tilde{\mathbb{P}}[\tilde{y} \neq y|x] > 0$\footnote{For trivial cases, our claims would simply be that loss correction performs equally well since the memorizing the noisy label is already equivalent with memorizing the true label.}: \begin{theorem} For an $x \in X_{S=l}$ with true label $y$, w.p. at least $1-e^{-2l (1/2-e_{sgn(y)}(x))^2}$, $h$ memorizing $\mathbf{y}_{\text{\emph{LC}}}$ returns a lower error $\mathbb{P}[h(x) \neq y]$ than memorizing the noisy label s.t. $\mathbb{P}[h(x) = k]~ =~ \tilde{\mathbb{P}}[\tilde{y}=k|x]$. \label{thm:losscorrection} \end{theorem} \vspace{-0.05in} The above theorem implies when $l \geq \frac{\log 1/\delta}{2\left(\frac{1}{2}-e_+(x)\right)^2}$, memorizing $\mathbf{y}_{\text{LC}}$ improves the excessive generalization error with probability at least $1-\delta$. As a corollary of Theorem \ref{thm:losscorrection}: \begin{corollary} For an $x \in X_{S=l}$ with true label $y$, w.p. at least $1-e^{-2l \left(\frac{1}{2}-e_{sgn(y)}(x)\right)^2}$, performing loss correction for $x \in X_{S=l}$ improves the excessive generalization error $\mathsf{err}^{+}_l(\mathcal{P},\mathcal{A}, x|S)$ by \vspace{-0.05in} \[ \Omega\left( \frac{l^2}{n^2} \cdot \textsf{weight}\left(\pi,\left[\frac{2}{3}\frac{l-1}{n-1}, \frac{4}{3}\frac{l}{n}\right] \right)\right) \] \label{cor:losscorrection} \end{corollary} \vspace{-0.2in} The above corollary is easily true due to definition of $\mathsf{err}^{+}_l(\mathcal{P},\mathcal{A}, x|S)$, Theorem \ref{thm:noisy} \& \ref{thm:losscorrection}, as well as Assumption \ref{ass:lc:memorize}. Our next message is: \textbf{For an $x$ with small $l$, loss correction fails with a substantial probability.} Denote by $D_{\text{KL}}(\frac{1}{2}\| e)$ the Kullback-Leibler distance between two Bernoulli 0/1 random variables of parameter $1/2$ and $e$. Consider a non-trivial case that $\tilde{\mathbb{P}}[\tilde{y} \neq y|x] < 1$, we prove: \begin{theorem} For an $x \in X_{S=l}$ with true label $y$, w.p. at least $\frac{1}{\sqrt{2l}} \cdot e^{-l \cdot D_{\text{\emph{KL}}}\left(\frac{1}{2}\|e_{sgn(y)}(x)\right)}$, $h$ memorizing $\mathbf{y}_{\text{\emph{LC}}}$ returns a higher error $\mathbb{P}[h(x) \neq y]$ than memorizing noisy label $\mathbf{\tilde{y}}$. \label{thm:losscorrection:lower} \end{theorem} When $l$ is small, the reported probability in Theorem \ref{thm:losscorrection:lower} is a non-trivial one. Particularly, when $l \leq \frac{\log \frac{1}{\sqrt{2}\delta}}{D_{\text{KL}}(\frac{1}{2}\| e_{sgn(y)}(x))}$, with probability at least $\delta$, memorizing $\mathbf{y}_{\text{LC}}$ (or performing loss correction) leads to worse generalization power. \subsection{Label smoothing}\label{sec:ls} Denote by $y_{\text{LS}}$ the ``soft label" for the distribution vector $\mathbf{y}_{\text{LS}}$, and again we call $h$ memorizing $\mathbf{y}_{\text{LS}}$ if $\mathbb{P}[h(x)=k]=\tilde{\mathbb{P}}[y_{\text{LS}}=k|x], \forall k \in Y$ - $\tilde{\mathbb{P}}[y_{\text{LS}}=k|x]$ denotes the empirical distribution for $y_{\text{LS}}$ (empirical average of the soft label $y_{\text{LS}}$): \begin{align} \tilde{\mathbb{P}}[y_{\text{LS}}= k|x] = (1-a) \cdot \tilde{\mathbb{P}}[\tilde{y}=k|x] + \frac{a}{m}~. \end{align} Consider the binary classification case. Denote the following event: $ \mathcal{E}_+:=\{\tilde{\mathbb{P}}[\tilde{y}=+1|x] > \tilde{\mathbb{P}}[\tilde{y}=-1|x]\} $ and $\bar{\mathcal{E}}_+$ denotes the opposite event $\tilde{\mathbb{P}}[\tilde{y}=+1|x] < \tilde{\mathbb{P}}[\tilde{y}=-1|x]$. For a non-trivial case $\tilde{\mathbb{P}}[\tilde{y} \neq y|x] \in (0,1)$: \begin{theorem} For an $x \in X_{S=l}$ with true label $y=+1$, when $\mathcal{E}_+$ happens, $h$ memorizing the smooth label $\mathbf{y}_{\text{\emph LS}}$ leads to a higher error $\mathbb{P}[h(x) \neq y]$ than memorizing corrected label $\mathbf{y}_{\text{\emph LC}}$. When $\bar{\mathcal{E}}_+$ happens, $h$ memorizing $\mathbf{y}_{\text{\emph LS}}$ has a lower error $\mathbb{P}[h(x) \neq y]$ than memorizing $\mathbf{y}_{\text{\emph LC}}$. \label{thm:labelsmoothing} \end{theorem} \vspace{-0.05in} Similar result can be proved for the case with $y=-1$ but we will not repeat the details. Repeating the proofs for Theorem \ref{thm:losscorrection:lower}, we can similarly show that when $l$ is small, there is a substantial probability that $\bar{\mathcal{E}}_+$ will happen $\left(\geq \frac{1}{\sqrt{2l}} \cdot e^{-l \cdot D_{\text{KL}}\left(\frac{1}{2}\| e_{sgn(y)}(x)\right)}\right)$, therefore label smoothing returns a better generalization power than loss correction. Intuitively, consider the extreme case with $l=1$, and label smoothing has a certain correction power even when this single noisy label is wrong. On the other hand, loss correction (and $\mathbf{y}_{\text{LC}}$) would memorize this single noisy label for $x$. We view label smoothing as a safe way to perform label correction when $l$ is small, and when the noise rate is excessively high such that $\mathbb{P}[\bar{\mathcal{E}}_+] > \mathbb{P}[\mathcal{E}_+]$. \subsection{Peer loss}\label{sec:pl} The first message we send for peer loss is that: \textbf{For an $x$ with larger $l$, peer loss extremizes $h$'s prediction to the correct label with high probability.} We first show that peer loss explicitly regularizes $h$ from memorizing noisy labels. We use the cross-entropy loss for $\ell$ in $\ell_{\text{PL}}$ (Eqn. (\ref{eqn:peerloss})). \begin{lemma}Denote by $\mathbb{Q}(x,\tilde{y})$ the joint distribution of $h(x)$ and $\tilde{y}$, $\mathbb{P}(x),\mathbb{P}(\tilde{y})$ the marginals of $x,\tilde{y}$, taking expectation of $\ell_{\text{PL}}$ over the training data distribution $ \mathbb{P}(x,\tilde{y})$, one finds: \vspace{-0.05in} \begin{align} \mathbb{E}_{\mathcal P}\big[\ell_{\text{\emph{PL}}}(h(x), &\tilde{y})\big] = D_{\text{\emph{KL}}}(\mathbb{Q}(x,\tilde{y})\|\mathbb{P}(x,\tilde{y}))\nonumber \\ &- D_{\text{\emph{KL}}}(\mathbb{Q}(x,\tilde{y})\|\mathbb{P}(x)\times\mathbb{P}(\tilde{y})). \end{align} \label{lemma:peerloss} \end{lemma} \vspace{-0.25in} In above we use the standard notation $D_{\text{KL}}$ for KL-divergence between two distributions. While minimizing $D_{\text{KL}}(\mathbb{Q}(x,\tilde{y})\|\mathbb{P}(x,\tilde{y})) $ encourages $h$ to reproduce $\mathbb{P}(x,\tilde{y})$ (the noisy distribution), the second term $D_{\text{KL}}(\mathbb{Q}(x,\tilde{y})\|\mathbb{P}(x)\times\mathbb{P}(\tilde{y}))$ discourages $h$ from doing so by incentivizing $h$ to predict a distribution that is independent from $\tilde{y}$! This regularization power helps lead the training to generate more confident predictions, per a recent result: \begin{theorem}\label{pro:dynamic}[\cite{cheng2020learning}] When minimizing $\mathbb{E}\left[\ell_{\text{\emph{PL}}}(h(x), \tilde{y})\right]$, solutions satisfying $\mathbb{P}[h(x)=k]>0, \forall k \in Y$ are not optimal. % \end{theorem} \vspace{-0.1in} In the case of binary classification, the above theorem implies that we must have either $\mathbb{P}[h(x)=+1] \rightarrow 1$ or $\mathbb{P}[h(x)=-1] \rightarrow 1$. We provide an illustration of this effect in Figure \ref{fig:peerloss}. In sharp contrast to Figure \ref{fig:2d:ce}, the decision boundaries returned by training using peer loss remain tight, despite high presence of label noise. \vspace{-0.1in} \begin{figure}[!ht] \centering \includegraphics[width=0.23\textwidth]{figures/bcewithlogits_peer_random-0_2.png}\hspace{-0.2in} \includegraphics[width=0.23\textwidth]{figures/bcewithlogits_peer_random-0_4.png} \vspace{-0.2in} \caption{2D example with peer loss: $20\%, 40\%$ random noise. \label{fig:peerloss} \end{figure} \vspace{-0.05in} Now the question left is: is pushing to confident prediction in the right direction of correcting label noise? If yes, peer loss seems to be achieving the same effect as the loss correction approach, without knowing or using $T(x)$. Consider the binary classification case. To simplify our analysis, let's consider only a class-dependent noise setting that $e_+(x) \equiv e_+, e_-(x) \equiv e_-$. This simplification is needed due to the fact that the definition of peer loss requires drawing a global and random ``peer sample". Technically we can revise peer loss to use ``peer samples" that are similar enough so that they will likely to have the same $e_+(x),e_-(x)$. Denote the priors of the entire distribution by $p_+:=\mathbb{P}_{y' \in \mathcal F|S}[y'=+1]>0, p_-:=\mathbb{P}_{y' \in \mathcal F|S}[y'=-1]>0$. When $n$ is sufficiently large, we prove: \begin{theorem} For an $x \in X_{S=l}$ with true label $y$, w.p. at least $1-e^{ \frac{-2l}{p^2_{sgn(-y)}\cdot \left(1-e_+-e_-\right)^2}}$, predicting $\mathbb{P}[h(x)=y]=1$ leads to smaller training loss in $\ell_{\text{\emph{PL}}}$ (with $\ell$=CE loss). \label{thm:peerloss} \end{theorem} \vspace{-0.05in} Using above theorem and Theorem \ref{thm:noisy}, consider a non-trivial case $\tilde{\mathbb{P}}[\tilde{y} \neq y|x] > 0$ we have: \begin{corollary} For an $x \in X_{S=l}$ with true label $y$, w.p. at least $1-e^{ \frac{-2l}{p^2_{sgn(-y)} \cdot \left(1-e_+-e_-\right)^2}}$, training using $\ell_{\text{\emph{PL}}}$ improves the individual excessive generalization error $\mathsf{err}^{+}_l(\mathcal{P},\mathcal{A}, x|S)$ by: \vspace{-0.1in} \[ \Omega\left( \frac{l^2}{n^2} \textsf{weight}\left(\pi,\left[\frac{2}{3}\frac{l-1}{n-1}, \frac{4}{3}\frac{l}{n}\right] \right)\cdot \sum_{k \neq y} \tilde{\mathbb{P}}[\tilde{y}=k|x]\right) \] \label{cor:peerloss} \end{corollary} \vspace{-0.15in} Both peer loss and loss correction implicitly use the posterior distribution of noisy labels to hopefully extremize $h(x)$ to the correct direction. The difference is peer loss extremizes even more ($\mathbb{P}[h(x)=k] \rightarrow 1$ for some $k$) when it is confident. Therefore, when there is sufficient information (i.e., $l$ being large), peer loss tends to perform better than loss correction which needs explicit knowledge of the true transition matrix and performs a precise and exact bias correction step. This is also noted empirically in \cite{liu2019peer}, and our results provide the theoretical justifications. Similar to Theorem \ref{thm:losscorrection:lower}, when $l$ is small, the power of peer loss does seem to drop: \textbf{For an $x$ with small $l$, peer loss extremizes $h$'s prediction to the wrong label with a substantial probability.} Formally, \begin{theorem} For an $x \in X_{S=l}$ with true label $y$, w.p. at least $ \frac{1}{\sqrt{2l}}e^{-l \cdot D_{\text{\emph{KL}}}\left(\frac{1}{2}\| e_{sgn(y)}\right)}$, predicting $\mathbb{P}[h(x)=-y] = 1$ leads to smaller training loss in $\ell_{\text{\emph{PL}}}$. \label{thm:peerloss:lower} \end{theorem} \vspace{-0.05in} For a non-trivial case that $\tilde{\mathbb{P}}[\tilde{y} \neq y|x] < 1$, this implies higher prediction error than memorizing the noisy labels. \section{Takeaways and Conclusion} We studied the impact of a model memorizing noisy labels. This paper proved the disparate impact of noisy labels at the instance level, and then the fact that existing treatments can often lead to disparate outcomes, with low-frequency instances being more likely to be mistreated. This observation is particularly concerning when a societal application is considered, and the low-frequency examples are drawn from a historically disadvantaged population (thus low presence in data). Specifically: \textbf{Frequent instance} While high-frequent instances (large $l$) have a higher impact on the generalization bound, and miss-classifying one such example would be more costly, our analysis shows that due to the existence of a good number of noisy labels, existing approaches can often counter the negative effects with high probability. \textbf{Long-tail instance} For a rare instance $x$ with small $l$, while missing it would incur a much smaller penalty in generalization, still, its impact is non-negligible. Moreover, due to the severely limited label information, we find the noise correction approaches would have a substantial probability of failing to correct such cases. The above observations require us to rethink the distribution of label noise across instances and might potentially require different treatments for instances in different regimes. \textbf{Acknowledgments} This work is partially supported by the National Science Foundation (NSF) under grant IIS-2007951 and the NSF FAI program in collaboration with Amazon under grant IIS-2040800. The author thanks Zhaowei Zhu, Xingyu Li and Jiaheng Wei for helps with Figure \ref{fig:cifar}~-~\ref{fig:peerloss}, as well as Lemma \ref{lemma:peerloss}. The author thanks anonymous ICML reviewers for their comments that improved the presentation of the paper. The final draft also benefited substantially from discussions with Gang Niu. \section*{\Large Appendix} \end{center} The Appendix is organized as follows. \squishlist \item Section A presents omitted proofs for theoretical conclusions in the main paper. \item Section B includes additional details for Figures \ref{fig:2d:ce} and \ref{fig:cifar-memorization}. \item Section C provides additional discussions. \end{list} \section{Proofs} \section*{Proof for Theorem \ref{thm:main:tau}} \begin{proof} Recall the definition of $\tau_l$: \begin{align} \tau_l := \frac{\mathbb{E}_{\alpha \sim \bar{\pi}^N}[\alpha^{l+1}\cdot (1-\alpha)^{n-l}]}{\mathbb{E}_{\alpha \sim \bar{\pi}^N}[\alpha^{l}\cdot (1-\alpha)^{n-l}]} \end{align} To bound $\tau_l$, we start with the denominator $\mathbb{E}_{\alpha \sim \bar{\pi}^N}[\alpha^{l}\cdot (1-\alpha)^{n-l}].$ First $\forall \alpha \in [0,1]$, we have \[ \alpha^{l-1}\cdot (1-\alpha)^{n-l} \leq \left(\frac{l-1}{n-1}\right)^{l-1} \left(1-\frac{l-1}{n-1}\right)^{n-l}~. \] The above can be easily verified by the checking the first order condition of $ \log \left( \alpha^{l-1}\cdot (1-\alpha)^{n-l}\right). $ Therefore \begin{align} &\mathbb{E}_{\alpha \sim \bar{\pi}^N}[\alpha^{l}\cdot (1-\alpha)^{n-l}]\nonumber \\ \leq &\left(\frac{l-1}{n-1}\right)^{l-1} \left(1-\frac{l-1}{n-1}\right)^{n-l} \cdot \mathbb{E}_{\alpha \sim \bar{\pi}^N}[\alpha]\nonumber \\ = &\left(\frac{l-1}{n-1}\right)^{l-1} \left(1-\frac{l-1}{n-1}\right)^{n-l} \cdot \frac{1}{N}~.\label{eqn:deno} \end{align} where the last equality is due to $\bar{\pi}^N[\alpha] = \frac{1}{N}$. Now let's look at the numerator $\mathbb{E}_{\alpha \sim \bar{\pi}^N}[\alpha^{l+1}\cdot (1-\alpha)^{n-l}]$. For $\alpha \in [\frac{l-1}{n-1}, \frac{l}{n}]$, we have \begin{align*} & \alpha^{l+1}\cdot (1-\alpha)^{n-l} \geq \alpha \cdot \left( \frac{l-1}{n-1} \right)^{l} \cdot \left(1-\frac{l}{n}\right)^{n-l} \end{align*} Therefore combining the bounds for both denominator and the numerator we have \begin{align} \tau_l \geq & \frac{ \left( \frac{l-1}{n-1} \right)^{l} \cdot \left(1-\frac{l}{n}\right)^{n-l} }{\left(\frac{l-1}{n-1}\right)^{l-1} \left(1-\frac{l-1}{n-1}\right)^{n-l}} \cdot \mathbb{E}\left [N \alpha\cdot \mathds{1}\left(\alpha \in \left[\frac{l-1}{n-1},\frac{l}{n}\right]\right)\right]\nonumber \\ =& \underbrace{\frac{l-1}{n-1}}_{\text{Term 1}} \cdot \underbrace{\left(\frac{1-\frac{l}{n}}{1-\frac{l-1}{n-1}}\right)^{n-l}}_{\text{Term 2}} \cdot \underbrace{\textsf{weight}\left(\bar{\pi}^N,\left[\frac{l-1}{n-1},\frac{l}{n}\right]\right)}_{\text{Term 3}},\label{eqn:tau:main} \end{align} where the $\textsf{weight}$ is introduced by its definition. For the second term above, \begin{align} &\left(\frac{1-\frac{l}{n}}{1-\frac{l-1}{n-1}}\right)^{n-l}\nonumber \\ =&\left(1- \frac{\frac{l}{n}-\frac{l-1}{n-1}}{1-\frac{l-1}{n-1}}\right)^{n-l}\nonumber \\ =&\left(1- \frac{l(n-1)-(l-1)n}{n(n-1)-(l-1)n}\right)^{n-l}\nonumber \\ =&\left(1- \frac{n-l}{n(n-l)}\right)^{n-l}\nonumber \\ \geq & 1- \frac{n-l}{n(n-l)} \cdot (n-l) =\frac{l}{n}.\label{eqn:tau:term2} \end{align} For the third term, we will call Lemma 2.4 of \citet{feldman2020does}: \begin{lemma}[Lemma 2.4 of \cite{feldman2020does}] For any $0<\beta_1 < \beta_2 < 1$, and for any $\gamma>0$, \begin{align} \textsf{weight}\left(\bar{\pi}^N,\bigl[\beta_1,\beta_2\bigr]\right) \geq \frac{1-\delta}{1-\frac{1}{N}+\beta_2+\gamma} \cdot \textsf{weight}\left(\bar{\pi}^N,\left[\frac{\beta_1}{1-\frac{1}{N}+\beta_1-\gamma},\frac{\beta_2}{1-\frac{1}{N}+\beta_2+\gamma} \right]\right), \end{align} where in above $\delta:= 2 \cdot e^{\frac{-\gamma^2}{2(N-1) Var(\pi)+2\gamma \pi_{\max}/3}}$, and \begin{align*} Var(\pi):= \sum_{j \in [N]} (\pi_j -\frac{1}{N}) \leq \frac{\pi_{\max}}{N}. \end{align*} \label{lemma:bound:weight} \end{lemma} Using above, we next further derive that \vspace{-2pt} \begin{tcolorbox}[colback=grey!5!white,colframe=grey!5!white] \vspace{-10pt} \begin{align*} &\textsf{weight}\bigl(\bar{\pi}^N,\bigl[\frac{l-1}{n-1},\frac{l}{n}\bigr]\bigr) \geq 0.4\cdot \textsf{weight}\left(\pi,\left[\frac{2}{3}\frac{l-1}{n-1}, \frac{4}{3}\frac{l}{n}\right]\right) \end{align*} \vspace{-18pt} \end{tcolorbox} \vspace{-2pt} To see this, using above Lemma \ref{lemma:bound:weight}, for any $\gamma > 0$, \begin{align*} &\textsf{weight}\left(\bar{\pi}^N,\left[\frac{l-1}{n-1},\frac{l}{n}\right]\right) \geq \frac{1-\delta}{1-\frac{1}{N}+\frac{l}{n} + \gamma} \cdot\textsf{weight}\left(\pi,\left[\frac{\frac{l-1}{n-1}}{1-\frac{1}{N}+\frac{l-1}{n-1}-\gamma},\frac{\frac{l}{n}}{1-\frac{1}{N}+\frac{l}{n}+\gamma}\right]\right) \end{align*} Let $\gamma = \frac{1}{2}$, for sufficiently large $n (\gg l),N$, \[ 1-\frac{1}{N}+\frac{l-1}{n-1}-\gamma \leq \frac{2}{3} \] Similarly \[ 1-\frac{1}{N}+\frac{l}{n}+\gamma \geq \frac{4}{3} \] Easy to show that $\delta \leq 2 e^{-1/10\pi_{max}}$, and when $\pi_{max} \leq \frac{1}{20}$, we have $\delta \leq 2 e^{-2} \leq 0.3$. Therefore \begin{align} \frac{1-\delta}{1-\frac{1}{N}+\frac{l}{n} + \gamma} \geq \frac{0.7}{7/4} = 0.4. \end{align} To summarize \begin{align*} &\textsf{weight}\bigl(\bar{\pi}^N,\bigl[\frac{l-1}{n-1},\frac{l}{n}\bigr]\bigr) \geq 0.4\cdot \textsf{weight}\left(\pi,\left[\frac{2}{3}\frac{l-1}{n-1}, \frac{4}{3}\frac{l}{n}\right]\right) \end{align*} Combining Term 2 and 3 we complete the proof. \end{proof} \section*{Proof for Proposition \ref{prop:tau}} \begin{proof} The major difference from proving Theorem \ref{thm:main:tau} is due to the reasoning of the numerator: $\mathbb{E}_{\alpha \sim \bar{\pi}^N}[\alpha^{l+1}\cdot (1-\alpha)^{n-l}]$. Now for $\alpha \in [\frac{l-1}{1.1(n-1)}, \frac{l-1}{n-1}]$, we have \begin{align*} & \alpha^{l+1}\cdot (1-\alpha)^{n-l} \geq \alpha \cdot \left( \frac{l-1}{1.1(n-1)} \right)^{l} \cdot \left(1-\frac{l-1}{n-1}\right)^{n-l} \end{align*} Therefore, using Eqn. (\ref{eqn:deno}), and the definition of $\tau_l$ we have \begin{align} \tau_l \geq & \frac{ \left( \frac{l-1}{1.1(n-1)} \right)^{l} \cdot \left(1-\frac{l-1}{n-1}\right)^{n-l} }{\left(\frac{l-1}{n-1}\right)^{l-1} \left(1-\frac{l-1}{n-1}\right)^{n-l}} \cdot \mathbb{E}\left[N \alpha\cdot \mathds{1}\left(\alpha \in \left[\frac{l-1}{1.1 (n-1)},\frac{l-1}{n-1}\right]\right)\right]\nonumber \\ =& \frac{l-1}{n-1} \cdot \frac{1}{1.1 ^l} \cdot \textsf{weight}\left(\bar{\pi}^N,\left[\frac{l-1}{1.1 (n-1)},\frac{l-1}{n-1}\right]\right).\label{eqn:tau:2} \end{align} Again, using Lemma 2.4 of \citet{feldman2020does}, for the $\textsf{weight}$ term, we further derive that for any $\gamma > 0$, \vspace{-2pt} \begin{tcolorbox}[colback=grey!5!white,colframe=grey!5!white] \vspace{-10pt} \begin{small} \begin{align*} &\textsf{weight}\left(\bar{\pi}^N,\left[\frac{l-1}{1.1(n-1)},\frac{l-1}{n-1}\right]\right)\geq \frac{1-\delta}{1-\frac{1}{N}+\frac{l-1}{n-1} + \gamma} \cdot\textsf{weight}\left(\pi,\left[\frac{\frac{l-1}{1.1(n-1)}}{1-\frac{1}{N}+\frac{l-1}{1.1(n-1)}-\gamma},\frac{\frac{l-1}{n-1}}{1-\frac{1}{N}+\frac{l-1}{n-1}+\gamma}\right]\right) \end{align*} \end{small} \vspace{-18pt} \end{tcolorbox} \vspace{-2pt} Let $\gamma = \frac{1}{2}$, for sufficiently large $n (\gg l),N$, \[ 1-\frac{1}{N}+\frac{l-1}{1.1 (n-1)}-\gamma \leq \frac{2}{3} \] Similarly \[ 1-\frac{1}{N}+\frac{l-1}{1.1(n-1)}+\gamma \geq \frac{4}{3} \] Similarly we show that $\delta \leq 2 e^{-1/10\pi_{max}}$, and when $\pi_{max} \leq \frac{1}{20}$ we have $\delta \leq 2 e^{-2} \leq 0.3$. Therefore \begin{align} \frac{1-\delta}{1-\frac{1}{N}+\frac{l-1}{n-1} + \gamma} \geq \frac{0.7}{7/4} = 0.4. \end{align} To summarize \begin{align*} &\textsf{weight}\left(\bar{\pi}^N,\left[\frac{l-1}{1.1(n-1)},\frac{l-1}{n-1}\right]\right) \geq \textsf{weight}\left(\pi,\left[0.7 \cdot \frac{l-1}{n-1}, \frac{4}{3}\frac{l-1}{n-1}\right]\right) \end{align*} Putting this above bound back to Eqn. (\ref{eqn:tau:2}) we complete the proof. \end{proof} \section*{Proof for Theorem \ref{thm:noisy}} \begin{proof} This is simply because when $h$ memorizes the noisy labels for $x$ such that $\mathbb{P}_{h \sim \mathcal{A}(S')}[h(x) = k] = \tilde{\mathbb{P}}[\tilde{y}=k|x]$, we will have: \begin{align*} &\mathsf{err}^{+}_l(\mathcal{P},\mathcal{A}, x|S)\\ =&\tau_l \cdot \mathbb{P}_{h \sim \mathcal{A}(S')}[h(x) \neq y] \\ =&\tau_l \cdot \sum_{k \neq y}\tilde{\mathbb{P}}[\tilde{y}=k|x]. \end{align*} Plugging the lower bound we prepared for $\tau_l$ earlier (Theorem \ref{thm:main:tau}) we proved the claim. \end{proof} \section*{Proof for Lemma \ref{lemma:smy}} \begin{proof} Using the definition of $\mathbf{y}_{\text{LC}}$, and using the knowledge of Eqn. (\ref{eqn:T:inverse}) we know that \begin{align*} &\mathbf{y}_{\text{LC}}[1] = \frac{1}{1-e_+(x)-e_-(x)}\left((1-e_+(x)) \tilde{\mathbb{P}}[\tilde{y}=-1|x] - e_+(x) \tilde{\mathbb{P}}[\tilde{y}=+1|x] \right)\\ &\mathbf{y}_{\text{LC}}[2] = \frac{1}{1-e_+(x)-e_-(x)}\left((1-e_-(x)) \tilde{\mathbb{P}}[\tilde{y}=+1|x] - e_-(x) \tilde{\mathbb{P}}[\tilde{y}=-1|x] \right)\\ \end{align*} Therefore \begin{align*} \mathbf{y}_{\text{LC}}[1]+\mathbf{y}_{\text{LC}}[2] = \frac{1}{1-e_+(x)-e_-(x)}\left((1-e_+(x)-e_-(x))\cdot \tilde{\mathbb{P}}[\tilde{y}=-1|x]+(1-e_+(x)-e_-(x))\cdot \tilde{\mathbb{P}}[\tilde{y}=+1|x] \right) = 1. \end{align*} \end{proof} \section*{Proof for Theorem \ref{thm:losscorrection}} \begin{proof} Due to symmetricity, we consider $y=+1$. Using the definition of $\mathbf{y}_{\text{LC}}$, and using the knowledge of Eqn. (\ref{eqn:T:inverse}) we know that \begin{align*} \mathbb{P}[y_{\text{LC}} = +1|x] = \frac{(1-e_-(x)) \cdot \tilde{\mathbb{P}}[\tilde{y}=+1|x]-e_+(x)\cdot \tilde{\mathbb{P}}[\tilde{y}=-1|x]}{1-e_+(x)-e_-(x)} \end{align*} Recall we denote by $y_{\text{LC}}$ the random variable drawn according to $\mathbf{y}_{\text{LC}}$. Next we show: \begin{align} \tilde{\mathbb{P}}[\tilde{y}=+1|x] > \tilde{\mathbb{P}}[\tilde{y}=-1|x] \Leftrightarrow \mathbb{P}[y_{\text{LC}} = +1|x] > \tilde{\mathbb{P}}[\tilde{y}=+1|x]. \label{eqn:equiv} \end{align} This is equivalent to the following comparison (when $e_+(x)+e_-(x) < 1$): \begin{align*} &\text{RHS of Eqn. (\ref{eqn:equiv})}\\ \Leftrightarrow ~ &\frac{(1-e_-(x)) \cdot \tilde{\mathbb{P}}[\tilde{y}=+1|x]-e_+(x) \cdot \tilde{\mathbb{P}}[\tilde{y}=-1|x]}{1-e_+(x)-e_-(x)} > \tilde{\mathbb{P}}[\tilde{y}=+1|x]\\ \Leftrightarrow~ & (1-e_-(x))\cdot \tilde{\mathbb{P}}[\tilde{y}=+1|x]-e_+(x) \cdot \tilde{\mathbb{P}}[\tilde{y}=-1|x] > (1-e_+(x)-e_-(x)) \cdot \tilde{\mathbb{P}}[\tilde{y}=+1|x]\\ \Leftrightarrow ~& e_+(x) \cdot \tilde{\mathbb{P}}[\tilde{y}=+1|x] >e_+\cdot\tilde{\mathbb{P}}[\tilde{y}=-1|x]\\ \Leftrightarrow ~& \tilde{\mathbb{P}}[\tilde{y}=+1|x] > \tilde{\mathbb{P}}[\tilde{y}=-1|x]\\ \Leftrightarrow ~&\text{LHS of Eqn. (\ref{eqn:equiv})} \end{align*} Note that because we consider a non-trivial case $\tilde{\mathbb{P}}[\tilde{y} \neq y|x] > 0 $, we have $\tilde{\mathbb{P}}[\tilde{y}=+1|x] < 1$. Therefore the above derivation holds even if we capped $ \mathbb{P}[y_{\text{LC}} = +1|x]=\frac{(1-e_-(x)) \cdot \tilde{\mathbb{P}}[\tilde{y}=+1|x]-e_+(x) \cdot \tilde{\mathbb{P}}[\tilde{y}=-1|x]}{1-e_+(x)-e_-(x)}$ at 1 to make it a valid probability measure. Now we derive when $\tilde{\mathbb{P}}[\tilde{y}=+1|x] > \tilde{\mathbb{P}}[\tilde{y}=-1|x]$. Recall $\tilde{y}(1),...,\tilde{y}(l)$ denote the $l$ noisy labels for $x \in X_{S=l}$, and let $Z_1,...,Z_l$ denote the $l$ Bernoulli random variable that $Z_k = \mathds{1}(\tilde{y}(k) = +1), k \in [l]$. Then \begin{align*} & \tilde{\mathbb{P}}[\tilde{y}=+1|x] > \tilde{\mathbb{P}}[\tilde{y}=-1|x]\\ \Leftrightarrow ~& \tilde{\mathbb{P}}[\tilde{y}=+1|x] > 1/2\\ \Leftrightarrow ~& \frac{\sum_{k \in [l]}Z_k}{l} > 1/2. \end{align*} Now we derive $\mathbb{P}\left[\frac{\sum_{k \in [l]}Z_k}{l} > 1/2\right] $. Note $\mathbb{E}\left[\frac{\sum_{k \in [l]}Z_k}{l}\right] = 1-e_+(x)$. By applying Hoeffding inequality we prove that \[ \mathbb{P}\left[\frac{\sum_{k \in [l]}Z_k}{l} \leq 1/2\right] \leq e^{-2l \left(1/2-e_+(x)\right)^2}. \] Therefore \[ \mathbb{P}\left[\frac{\sum_{k \in [l]}Z_k}{l} > 1/2\right]\geq 1-e^{-2l \left(1/2-e_+(x)\right)^2}. \] The case with $y=-1$ is entirely symmetric so we omit the details. \end{proof} \section*{Proof for Corollary \ref{cor:losscorrection}} \begin{proof} Because $ \mathsf{err}^{+}_l(\mathcal{P},\mathcal{A}, x|S):= \tau_l \cdot \mathbb{P}_{h \sim \mathcal{A}(S')}[h(x) \neq y $, as well as w.p. at least $1-e^{-2l (1/2-e_{sgn(y)}(x))^2}$, memorizing $\mathbf{y}_{\text{LC}}$ returns lower error $\mathbb{P}[h(x) \neq y]$ than memorizing the noisy labels s.t. $\mathbb{P}[h(x) = k] = \tilde{\mathbb{P}}[\tilde{y}=k|x]$, the corollary is then true via the lower bound for $\tau_l$. \end{proof} \section*{Proof for Theorem \ref{thm:losscorrection:lower}} \begin{proof} Again due to symmetricity, we consider $y=+1$. Similar as argued in the proof of Theorem \ref{thm:losscorrection}, from Eqn. (\ref{eqn:equiv}) we know that when $\tilde{\mathbb{P}}[\tilde{y}=+1|x] < \tilde{\mathbb{P}}[\tilde{y}=-1|x]$, we have $ \mathbb{P}[ y_{\text{LC}}= +1|x] < \tilde{\mathbb{P}}[\tilde{y}=+1|x]$, that is memorizing $\mathbf{y}_{\text{LC}}$ is worse than memorizing $\mathbf{\tilde{y}}$. Again because we consider a non-trivial case $\tilde{\mathbb{P}}[\tilde{y} \neq y|x] < 1$, we have $\tilde{\mathbb{P}}[\tilde{y}=+1|x] > 0$. Therefore the above derivation holds even if we capped $ \mathbb{P}[y_{\text{LC}} = +1|x]=\frac{(1-e_-(x)) \cdot \tilde{\mathbb{P}}[\tilde{y}=+1|x]-e_+(x) \cdot \tilde{\mathbb{P}}[\tilde{y}=-1|x]}{1-e_+(x)-e_-(x)}$ at 0 to make it a valid probability measure. Similarly define $Z_k$ for $k \in [l]$ as in Proof for Theorem \ref{thm:losscorrection}: the $l$ Bernoulli random variable that $Z_k = \mathds{1}(\tilde{y}(k) = +1), k \in [l]$. Then \[ \mathbb{P}[y_{\text{LC}}= +1|x] < \tilde{\mathbb{P}}[\tilde{y}=+1|x] \Leftrightarrow \tilde{\mathbb{P}}[\tilde{y}=+1|x] < \tilde{\mathbb{P}}[\tilde{y}=-1|x] \Leftrightarrow \frac{\sum_{k \in [l]}Z_k}{l} < 1/2 \] We bound $\mathbb{P}\left[\frac{\sum_{k \in [l]}Z_k}{l} < 1/2\right]$: \begin{align*} &\mathbb{P}\left[\frac{\sum_{k \in [l]}Z_k}{l} < 1/2\right]\\ =&\mathbb{P}\left[\sum_{k \in [l]}1-Z_k \geq l/2\right]\\ =&\mathbb{P}[\text{Bin}(l,e_+(x)) \geq l/2], \end{align*} where we use $\text{Bin}$ to denote a Binomial random variable, and the fact that $\mathbb{E}\left[\frac{\sum_{k \in [l]}(1-Z_k)}{l}\right] = e_+(x)$. Using tail bound for Bin (e.g., Lemma 4.7.2 of \cite{ash1990}) yields: \begin{align*} \mathbb{P}[\text{Bin}(l,e_+(x)) \geq l/2] \geq& \frac{1}{\sqrt{8 \cdot \frac{1}{2}l (1-\frac{1}{2})}} \cdot e^{-l \cdot D_{\text{KL}}\left(\frac{1}{2}\| e_+(x)\right)}\\ =& \frac{1}{\sqrt{2l}} \cdot e^{-l \cdot D_{\text{KL}}\left(\frac{1}{2}\| e_+(x)\right)}, \end{align*} completing the proof. The case with $y=-1$ is entirely symmetric so we omit the details. \end{proof} \section*{Proof for Theorem \ref{thm:labelsmoothing}} \begin{proof} Note that label smoothing smooths the noisy labels in the following way: \begin{align} \tilde{\mathbb{P}}[y_{\text{LS}}= +1|x] = (1-a) \cdot \tilde{\mathbb{P}}[\tilde{y}=+1|x] + \frac{a}{2}.~ \end{align} The proof is then simple: when $\mathcal{E}_+$ is true, from the proof of Theorem \ref{thm:losscorrection}, Eqn. (\ref{eqn:equiv}), we know that $\mathbf{y}_{\text{LC}}$ further extremizes/increases the prediction of $+1$ that $\mathbb{P}[y_{\text{LC}}= +1|x]>\tilde{\mathbb{P}}[\tilde{y}=+1|x]$, while label smoothing $y_{\text{LS}}$ reduces from $\tilde{\mathbb{P}}[\tilde{y}=+1|x] $ by a factor of $a \cdot \tilde{\mathbb{P}}[\tilde{y}=+1|x] - \frac{a}{2}>0 $. Therefore, memorizing smoothed label increases the error $\mathbb{P}[h(x) \neq y]$. The above observation is reversed when the opposite event $\bar{\mathcal{E}}_+$ is instead true: in this case, $\mathbf{y}_{\text{LC}}$ further extremizes/increases the prediction of $-1$ that $\mathbb{P}[y_{\text{LC}}= +1|x]<\tilde{\mathbb{P}}[\tilde{y}=+1|x]$, while label smoothing $y_{\text{LS}}$ increases from $\tilde{\mathbb{P}}[\tilde{y}=+1|x] $ by a factor of $\frac{a}{2} - a \cdot \tilde{\mathbb{P}}[\tilde{y}=+1|x] >0 $. \end{proof} \section*{Proof for Lemma \ref{lemma:peerloss}} \begin{proof} Denote by $\ell_{\text{CE}}$ the CE loss, and $\mathcal D_{x},\mathcal D_{\tilde{y}}$ the marginal distribution of $x,\tilde{y}$ explicitly. \begin{equation}\label{Epeer0} \begin{split} &\mathbb{E}_{x \times \tilde{y}}\left[\ell_{\text{PL}}(h(x), \tilde{y})\right] \\ =&\mathbb{E}_{x \times \tilde{y}}\left[\ell_{\text{CE}}(h(x), \tilde{y})\right]-\mathbb{E}_{\mathcal D_{\tilde{y}}}\left[\mathbb{E}_{\mathcal D_{x}}\left[\ell_{\text{CE}}\left(h\left(x\right), \tilde{y}\right)\right]\right]\\ =& \underbrace{-\sum_{x \in X}\sum_{\tilde{y}\in Y} \mathbb{P}(x,\tilde{y})\log{\mathbb{Q}(\tilde{y}|x)}}_{\text{CE term}} +\underbrace{\sum_{x \in X} \sum_{\tilde{y}\in Y} \mathbb{P}(x)\mathbb{P}(\tilde{y})\log{\mathbb{Q}(\tilde{y}|x)}}_{\text{Peer term}}, \end{split} \end{equation} The conditional probability $\mathbb{Q}(\tilde{y}|x)$ is defined as the prediction of the underlying neural network model, while $\mathbb{P}(x)\mathbb{P}(y)$ captures the probabilities of the marginal-product of the training distribution. We call the first sum-integration as {\it CE term} and the second as {\it peer term}. For the CE term, we further have \begin{align*} &-\sum_{x \in X}\sum_{\tilde{y}\in Y} \mathbb{P}(x,\tilde{y})\log{\mathbb{Q}(\tilde{y}|x)} \\ =& -\sum_{x \in X}\sum_{\tilde{y}\in Y} \left[ \mathbb{P}(x,\tilde{y})\log{\mathbb{Q}(\tilde{y}|x)\mathbb{P}(x)} -\mathbb{P}(x,\tilde{y})\log\mathbb{P}(x,\tilde{y}) \right]\\ =& -\sum_{x \in X}\sum_{\tilde{y}\in Y} \mathbb{P}(x,\tilde{y})\log\frac{\mathbb{Q}(x,\tilde{y})}{\mathbb{P}(x,\tilde{y})}\\ =& D_{\text{KL}}(\mathbb{Q}(x,\tilde{y})\|\mathbb{P}(x,\tilde{y})) \end{align*} In the above, we used $\mathbb{Q}(x,\tilde{y}) = \mathbb{Q}(\tilde{y}|x)\mathbb{P}(x)$ as in classification task the model prediction does not affect the feature distribution. Similarly, for the peer term \begin{align*} &\sum_{x \in X} \sum_{\tilde{y}\in Y} \mathbb{P}(x)\mathbb{P}(\tilde{y})\log{\mathbb{Q}(\tilde{y}|x)}\\ =& \sum_{x \in X} \sum_{\tilde{y}\in Y} \biggl[ \mathbb{P}(x)\mathbb{P}(\tilde{y})\log{\mathbb{Q}(\tilde{y}|x)\mathbb{P}(x)} - \mathbb{P}(x)\mathbb{P}(\tilde{y})\log\mathbb{P}(x)\mathbb{P}(\tilde{y})\biggr]\\ =& \sum_{x \in X} \sum_{\tilde{y}\in Y} \mathbb{P}(x)\mathbb{P}(\tilde{y})\log\frac{\mathbb{Q}(x,\tilde{y})}{\mathbb{P}(x)\mathbb{P}(\tilde{y})}\\ =& -D_{\text{KL}}(\mathbb{Q}(x,\tilde{y})\|\mathbb{P}(x)\times\mathbb{P}(\tilde{y})). \end{align*} Combing the above derivations for the CE and peer term we complete the proof. \end{proof} \section*{Proof for Theorem \ref{thm:peerloss}} \begin{proof} Again due to symmetricity, we consider $y=+1$. It was shown in \cite{cheng2020learning} that, when taking expectation over the data distribution, the original definition of peer loss \begin{align} \ell_{\text{PL}}(h(x),\tilde{y}) := \ell(h(x),\tilde{y}) - \ell(h(x_{p_1}),\tilde{y}_{p_2}) \end{align} is equivalent to \begin{align} \ell(h(x), \tilde{y}) - \tilde{\mathbb E}[\ell(h(x),\tilde{y}_{q})], \end{align} where $q$ is a randomly sampled index from $[n]$, and the expectation is over the randomness in $\tilde{y}_{q}$. The high-level intuition is that each $x$ appears in the peer terms exactly once in expectation, so we can fix $x_{p_1}$ be the same $x$. Then we will only vary $p_2$ (index $q$ in our notation). The operation of taking expectation is to reduce uncertainty in the peer term. The average empirical peer loss on $x$ is then given by \begin{align*} &\frac{1}{l}\sum_{i=1}^l \ell_{\text{PL}}(h(x),\tilde{y}(i))\\ = &\frac{1}{l}\sum_{i=1}^l \ell(h(x), \tilde{y}) - \tilde{\mathbb E}[\ell(h(x),\tilde{y}_{q})]\\ =&\tilde{\mathbb E}\left[\ell(h(x), \tilde{y})\right] -\ell(h(x),-1) \cdot \tilde{\mathbb{P}}[\tilde{y}_{q}=-1]\\ &~~~~- \ell(h(x),+1) \cdot \tilde{\mathbb{P}}[\tilde{y}_{q}=+1] \end{align*} where $\tilde{\mathbb E}$ denotes the empirical expectation w.r.t. the empirical distribution of $\tilde{y}|x$, and $\tilde{\mathbb{P}}[\tilde{y}_{q}]$s are the empirical distribution of $\tilde{y}_q$. As shown already, peer loss pushes $h$ to predict one class confidently, therefore there are two cases: $h(x)=+1$ or $h(x)=-1$. When $h(x)=+1$ we have \begin{align*} &\tilde{\mathbb E}\left[\ell(h(x)=+1, \tilde{y})\right] -\ell(h(x),-1) \cdot \tilde{\mathbb{P}}[\tilde{y}_{q}=-1]\\ &~~~~- \ell(h(x),+1) \cdot \tilde{\mathbb{P}}[\tilde{y}_{q}=+1]\\ =&\tilde{\mathbb{P}}[\tilde{y}=+1|x] \cdot \ell(h(x)=+1,+1) +\tilde{\mathbb{P}}[\tilde{y}=-1|x] \cdot \ell(h(x)=+1,-1)\\ &~~~~-\ell(h(x)=+1,-1) \cdot \tilde{\mathbb{P}}[\tilde{y}_{q}=-1]- \ell(h(x)=+1,+1) \cdot \tilde{\mathbb{P}}[\tilde{y}_{q}=+1]\\ &=\left(\tilde{\mathbb{P}}[\tilde{y}=+1|x] - \tilde{\mathbb{P}}[\tilde{y}_{q}=+1]\right) \cdot \left(\ell(h(x)=+1,+1) -\ell(h(x)=+1,-1)\right) \end{align*} While if $h(x)=-1$, we have \begin{align*} &\tilde{\mathbb E}\left[\ell(h(x)=-1, \tilde{y})\right] -\ell(h(x),-1) \cdot \tilde{\mathbb{P}}[\tilde{y}_{q}=-1]\\ &~~~~- \ell(h(x),+1) \cdot \tilde{\mathbb{P}}[\tilde{y}_{q}=+1]\\ =&\tilde{\mathbb{P}}[\tilde{y}=+1|x] \cdot \ell(h(x)=-1,+1) +\tilde{\mathbb{P}}[\tilde{y}=-1|x] \cdot \ell(h(x)=-1,-1)\\ &~~~~-\ell(h(x)=-1,-1) \cdot \tilde{\mathbb{P}}[\tilde{y}_{q}=-1]- \ell(h(x)=-1,+1) \cdot \tilde{\mathbb{P}}[\tilde{y}_{q}=+1]\\ &=\left(\tilde{\mathbb{P}}[\tilde{y}=-1|x] - \tilde{\mathbb{P}}[\tilde{y}_{q}=-1]\right)\left(\ell(h(x)=-1,-1) -\ell(h(x)=-1,+1)\right)\\ &=-\left(\tilde{\mathbb{P}}[\tilde{y}=+1|x] - \tilde{\mathbb{P}}[\tilde{y}_{q}=+1]\right)\left(\ell(h(x)=-1,-1) -\ell(h(x)=-1,+1)\right) \end{align*} For CE, we have $\ell(h(x)=+1,+1) = \ell(h(x)=-1,-1)=0$, and in \citet{cheng2020learning,liu2019peer}, $\ell(h(x)=-1,+1) = \ell(h(x)=+1,-1)$ is set to be a large positive quantity. Let's denote it as $C$. Then $h(x)=+1$ returns a lower loss ($\left(\tilde{\mathbb{P}}[\tilde{y}=+1|x] - \tilde{\mathbb{P}}[\tilde{y}_{q}=+1] \right) \cdot (-C)$, a negative quantity as compared to $-\left(\tilde{\mathbb{P}}[\tilde{y}=+1|x] - \tilde{\mathbb{P}}[\tilde{y}_{q}=+1]\right ) \cdot (-C)$ a positive one) if $\tilde{\mathbb{P}}[\tilde{y}=+1|x] - \mathbb{P}[\tilde{y}_{q}=+1] > 0$. Next we derive the probability of having $\tilde{\mathbb{P}}[\tilde{y}=+1|x] > \tilde{\mathbb{P}}[\tilde{y}_{q}=+1]$. When $n$ is sufficiently large, $\tilde{\mathbb{P}}[\tilde{y}_{q}=+1] \approx p_+ \cdot (1-e_+)+p_- \cdot e_{-} < \mathbb{P}[\tilde{y}=+1|x] = 1-e_+$. Define $Z_l$ as in Proof for Theorem \ref{thm:losscorrection}: the $l$ Bernoulli random variable that $Z_k = \mathds{1}(\tilde{y}(k) = +1), k \in [l]$. Then using Hoeffding bound we prove that \begin{align*} &\mathbb{P}\left[\tilde{\mathbb{P}}[\tilde{y}=+1|x] > p_+ \cdot (1-e_+)+p_- \cdot e_{-}\right]\\ =&1-\mathbb{P}\left[\frac{\sum_{k \in [l]}Z_k}{l} \leq p_+ \cdot (1-e_+)+p_- \cdot e_-\right]\\ \geq & 1-e^{ \frac{-2l}{\left(p_+ \cdot (1-e_+)+p_- \cdot e_- - (1-e_+)\right)^2}}\\ \geq&1-e^{ \frac{-2l}{p^2_{-} \cdot \left(1-e_+-e_-\right)^2}}, \end{align*} completing the proof. Again the case with $y=-1$ is symmetric. \end{proof} \section*{Proof for Corollary \ref{cor:peerloss}} \begin{proof} Because we have shown that w.p. at least $1-e^{ \frac{-2l}{p^2_{sgn(-y)}\cdot \left(1-e_+-e_-\right)^2}}$, training with $\ell_{\text{PL}}$ on $x \in X_{S=l}$ returns $h(x)=y$, results a 0 individual excessive generalization error $\mathsf{err}^{+}_l(\mathcal{P},\mathcal{A}, x|S) = 0$. On the other hand, Theorem \ref{thm:noisy} informs us that $\mathsf{err}^{+}_l(\mathcal{P},\mathcal{A}, x|S)$ is in the following order when memorizing the noisy labels: \begin{align} \Omega\left( \frac{l^2}{n^2} \textsf{weight}\left(\pi,\left[\frac{2}{3}\frac{l-1}{n-1}, \frac{4}{3}\frac{l}{n}\right] \right)\cdot \sum_{k \neq y} \tilde{\mathbb{P}}[\tilde{y}=k|x]\right) \label{eqn:cor2} \end{align} Taking the difference (Eqn.(\ref{eqn:cor2}) $- 0$) we proved the claim. \end{proof} \section*{Proof for Theorem \ref{thm:peerloss:lower}} \begin{proof} Consider $y=+1$. As argued in the proof of Theorem \ref{thm:peerloss}, when $\tilde{\mathbb{P}}[\tilde{y}=+1|x] < \mathbb{P}[\tilde{y}_{q}=+1]$, we have $h(x)=-1$ returns a smaller loss. So the output $h(x)$ predicts $-1$, the wrong label. Now we show when $\tilde{\mathbb{P}}[\tilde{y}=+1|x] < \tilde{\mathbb{P}}[\tilde{y}_{q}=+1]$. Define $Z_l$ as in Proof for Theorem \ref{thm:losscorrection}: the $l$ Bernoulli random variable that $Z_k = \mathds{1}(\tilde{y}(k) = +1), k \in [l]$. Then \begin{align*} &\mathbb{P}\left[\tilde{\mathbb{P}}[\tilde{y}=+1|x] < \tilde{\mathbb{P}}[\tilde{y}_{q}=+1]\right]\\ =&\mathbb{P}\left[\tilde{\mathbb{P}}[\tilde{y}=+1|x] < p_+ (1-e_+)+p_- \cdot e_{-}\right]\\ =&\mathbb{P}\left[\sum_{k \in [l]}1-Z_k \geq l( p_+ \cdot e_+ +p_- \cdot (1-e_-))\right]\\ =& \mathbb{P}\left[\text{Bin}(l,e_+) \geq l\left( p_+ \cdot e_+ +p_- \cdot (1-e_-)\right)\right]. \end{align*} Again using the tail bound for Bin, we prove that \begin{align*} & \mathbb{P}\left[\text{Bin}(l,e_+) \geq l( p_+ \cdot e_+ +p_- \cdot (1-e_-))\right] \\ \geq & \frac{e^{-l \cdot D_{\text{KL}}(\frac{1}{2}\| e_+)}}{\sqrt{8l \left( p_+ \cdot e_+ +p_- \cdot (1-e_-)\right)\cdot \left(p_+ \cdot (1-e_+) +p_- \cdot e_-\right)}}. \end{align*} Note that $\left( p_+ \cdot e_+ +p_- \cdot (1-e_-)\right) + \left(p_+ \cdot (1-e_+) +p_- \cdot e_-\right) = 1$, and each term $\left( p_+ \cdot e_+ +p_- \cdot (1-e_-)\right)$ and $\left(p_+ \cdot (1-e_+) +p_- \cdot e_- \right)$ is positive. Therefore \[ \left( p_+ \cdot e_+ +p_- \cdot (1-e_-)\right) \cdot \left(p_+ \cdot (1-e_+) +p_- \cdot e_-\right) \leq \frac{1}{4}. \] Therefore we conclude that \begin{align*} &\frac{e^{-l \cdot D_{\text{KL}}(\frac{1}{2}\| e_+)}}{\sqrt{8l \left( p_+ \cdot e_+ +p_- \cdot (1-e_-)\right)\cdot \left(p_+ \cdot (1-e_+) +p_- \cdot e_-\right)}} \geq \frac{1}{\sqrt{2l}}e^{-l \cdot D_{\text{KL}}(\frac{1}{2}\| e_+)}, \end{align*} completing the proof. \end{proof} \section{Figures} \section*{More examples for Figure \ref{fig:2d:ce}} In Figure \ref{fig:2d:ce:full}, we provide one additional figure for training with 40\% random label noise for comparison. \begin{figure}[!ht] \centering \includegraphics[width=0.3\textwidth]{figures/bcewithlogits_clean.png \includegraphics[width=0.3\textwidth]{figures/bcewithlogits_random-0_2.png \includegraphics[width=0.3\textwidth]{figures/bcewithlogits_random-0_4.png} \vspace{-0.2in} \caption{A 2D example illustrating the memorization of noisy labels. Left panel: Training with clean labels. Middle panel: Training with random $20\%$ noisy labels. Right panel: Training with random $40\%$ noisy labels.} \label{fig:2d:ce:full} \end{figure} \section*{Details for generating Figure \ref{fig:cifar-memorization}} The training uses ResNet-34 as the backbone with the following setups: mini-batch size (64), optimizer (SGD), initial learning rate (0.1), momentum (0.9), weight decay (0.0005), number of epochs (100) and learning rate decay (0.1 at 50 epochs). Standard data augmentation is applied to each dataset. The generation of instance-dependent label noise follows the steps in \citep{xia2020parts,cheng2020learning}: \begin{itemize} \item Define a noise rate (the global flipping rate) as $\varepsilon$. \item For each instance $x$, sample a $q$ from the truncated normal distribution $\mathbf{N}(\varepsilon, 0.1^{2}, [0, 1])$. \item Sample parameters $W$ from the standard normal distribution. Compute $x \times W$. \item Then the final noise rate is a function of both $q$ and $x \cdot W$. \end{itemize} \section{Discussion} \paragraph{Sample cleaning} Sample cleaning promotes the procedure of identifying possible wrong labels and removing them from training. If the identification is done correctly, the above procedure is effectively pushing $\tilde{\mathbb{P}}(\tilde{y})$ to the direction of the correct label, achieving a better generalization performance. From the other perspective, removing noisy labels helps the $h$ to de-memorize the noisy ones. The ability to identify the wrong labels has been more or less analyzed in the literature, but certainly would enjoy a more thorough and in-depth investigation. We view this as an important theoretical question for the community. Similar to the previous observations, we would like to caution the existence of rare examples with small $l$ - the previously introduced approaches have been shown to have a non-negligible chance of failing in such cases. We imagine this is probably true for sample cleaning, when the majority of a small number of noisy labels are in fact misleading. \paragraph{Understanding the difficulty of labeling } A better understanding of the possibility of handling noisy labels calls for immediate effort for understanding the probability of observing a wrong label for different instances. The salient challenge in doing so is again due to the missing of ground truth supervision information. One promising direction to explore is to leverage inference models \cite{liu2012variational} to infer the hidden difficulty factors in the generation of noisy labels. \paragraph{Hybrid \& decoupled training} Our results also point out a promising direction to treat samples from different regimes differently. While the existing approaches seem to be comfortable with the highly frequent instances (large $l$), the rare instances might deserve different handling. One thing we observed is rare samples suffer from a small $l$ and insufficient label information. While dropping rare samples is clearly hurting the generalization power, a better alternative would be to collecting multiple labels for these instances to boost the classifier's confidence in evaluating these instances. \paragraph{Dataset effort} Last but not least, a concrete understanding of the effects of instance-dependent label noise would require a high-quality dataset that contains real human-level noise patterns. While there have been some recent efforts \cite{xiao2015learning,jiang2020beyond}, most of the evaluations and studies stay with the synthetic ones. \subsection{Loss correction} Arguably one of the most popular approaches for correcting the effects of label noise is through loss correction using the knowledge of $T(x)$ \cite{natarajan2013learning,liu2016classification,Patrini_2017_CVPR}. Let's denote by $\ell: \mathbb{R}^{m} \times Y \rightarrow \mathbb{R}_{+}$ the underlying loss function we adopted for training a deep neural network. Denote by $\ell(h(x),y)$ the loss incurred by $h$ on instance $(x,y)$, and $\Bell(h(x))=[\ell(h(x),y')]_{y' \in Y}$ the column vector form of the loss. We will assume each $T(x)$ is invertible that $T^{-1}(x)$ well exists. Loss correction is done via defining a surrogate loss function $\tilde{\ell}$ as follows: \begin{align} \Bell_{\text{LC}}(h(x))= T^{-1}(x) \cdot \Bell(h(x)).\label{eqn:losscorrection} \end{align} The reason for performing the above correction is due to the following established unbiasedness property: Denote by $\mathbf{\tilde{y}}$ the one-hot encoding column vector form of the noisy label $\tilde{y}$: $\mathbf{\tilde{y}}:=[0;...;\underbrace{1}_{\tilde{y}'s~\text{position}};...;0]$, we have: \begin{lemma}[Unbiasedness of $ \ell_{\text{LC}}$, \cite{natarajan2013learning}] $\mathbb{E}_{\tilde{y}|y}[\mathbf{\tilde{y}}^{\top} \cdot \Bell_{\text{\emph LC}}(h(x))] = \ell(h(x),y)$. \label{lemma:unbias} \end{lemma} The above lemma states that when conditioning on the distribution of $\tilde{y}|y$, $\Bell_{\text{LC}}(h(x)) $ is unbiased in expectation w.r.t. the true loss $\ell(h(x),y)$. In Section \ref{subsec:paradox}, we explain how this unbiasedness is established for the binary classification setting. Based on Lemma \ref{lemma:unbias}, one can perform empirical risk minimization over $\sum_{i=1}^n \mathbf{\tilde{y}}^{\top}_i \cdot\Bell_{\text{LC}}(h(x_i))$, hoping the empirical sum will approximately converge to its expectation which will then equalize to the true empirical loss $\sum_{i=1}^n \ell(h(x_i),y_i)$. Of course, a commonly made assumption/requirement when applying this approach is that $T(x) \equiv T, \forall x$, and $T$ can be estimated accurately enough. There exist empirical and extensive discussions on how to do so \cite{Patrini_2017_CVPR,xia2019anchor,yao2020dual,zhang2021learning,li2021provably}. \subsection{Label smoothing} Label smoothing has demonstrated its benefits in improving learning representation \cite{muller2019does}. A recent paper \cite{lukasik2020does} has also proved the potential of label smoothing in defending training against label noise. Denote by $\bm{1}$ the all-one vector, and a smoothed and soft label is defined as $ \mathbf{y}_{\text{LS}} := (1-a) \cdot \mathbf{\tilde{y}} + \frac{a}{m} \cdot \bm{1}, $ where $a \in [0,1]$ is a smoothing parameter. That is, $\mathbf{y}_{\text{LS}}$ is defined as a linear combination of the noisy label $\tilde{y}$ and an uninformative and uniform label vector $\bm{1}$. Then each instance $x$ will be evaluated using $\mathbf{y}_{\text{LS}}$: $ \mathbf{y}_{\text{LS}}^{\top} \cdot \Bell(h(x)) . $ Though label smoothing has shown promising advantages over loss correction, there are few theoretical understandings of why so, except for its high-level idea of being ``conservative" when handling noisy labels. \subsection{Peer loss} Peer loss \cite{liu2019peer} is a different line of solution that promotes the use of multiple instances simultaneously while evaluating a particular noisy instance $(x,\tilde{y})$. A salient feature of peer loss is that the implementation of it does not require the knowledge of $T(x)$. The definition for peer loss has the following key steps: \squishlist \item For each $(x,\tilde{y})$ we aim to evaluate, randomly drawn two other sample indices $p_1, p_2 \in [n]$. \item Pair $x_{p_1}$ with $\tilde{y}_{p_2}$, define peer loss: \vspace{-0.05in} \begin{align} \ell_{\text{PL}}(h(x),\tilde{y}) := \ell(h(x),\tilde{y}) - \ell(h(x_{p_1}),\tilde{y}_{p_2}).\label{eqn:peerloss} \end{align} \end{list} \vspace{-0.05in} When $T(x) \equiv T$, it was proved in \cite{liu2019peer} that for binary classification with equal label prior, when $\ell$ is the 0-1 loss, minimizing peer loss returns the same minimizer of $\mathbb{E}[\ell(h(x),y)]$ on the clean distribution. \subsection{Memorization paradox}\label{subsec:paradox} Some of the above approaches have established strong theoretical guarantees of recovering the optimal classifier in expectation when using only noisy training labels \cite{natarajan2013learning,liu2019peer,ma2020normalized}. Why would we need a different understanding? First of all, most theoretical results assumed away the outstanding challenges of having an unknown number and distribution of noise rate matrix $T(x)$ (either needed for estimation purpose or for handling them implicitly) and focused on a single transition matrix $T$. Secondly, the existing error analysis often focuses on the distribution level, while we would like to zoom in to each instance that occurs with a different frequency. In addition, we now highlight a paradox introduced by a commonly made assumption that the noisy labels and the model's prediction $t$ are conditionally independent given true label $y$: $ \mathbb{P}[t,\tilde{y}|y] = \mathbb{P}[t|y]\cdot \mathbb{P}[\tilde{y}|y] $, or that $t$ is simply deterministic that it does not encode the information of $\tilde{y}$. This assumption is often needed when evaluating the expected generalization error under noisy distributions. The independence can be justified by modeling $\tilde{y}$ as being conditionally independent of feature $x$, which the prediction $t$ is primarily based on. Let's take loss correction for an example. For a clear demonstration, let's focus on the binary case $y \in \{-1,+1\}$. Consider a particular $x$, define $ e_-(x) := \mathbb{P}[\tilde{y}=+1|y=-1,x],~e_+(x) := \mathbb{P}[\tilde{y}=-1|y=+1,x] $ and $T(x)$: \begin{align} T(x):=\begin{bmatrix} 1-e_-(x) & e_-(x) \\% := \mathbb{P}[\tilde{y}=+1|y=-1]\\ e_+(x) & 1-e_+(x) \end{bmatrix} \label{eqn:T} \end{align} Easy to verify its inverse is: \begin{align} T^{-1}(x) = \frac{1}{1-e_+(x)-e_-(x)} \begin{bmatrix} 1-e_+(x) & -e_-(x)\\ -e_+(x) & 1-e_-(x) \end{bmatrix} \label{eqn:T:inverse} \end{align} For the rest of this section, without confusion, let's shorthand $e_+(x),e_-(x)$ as $e_+,e_-$. Then loss correction (Eqn. (\ref{eqn:losscorrection})) takes the following form: \begin{small} \begin{align*} \ell_{\text{LC}}(h(x),-1)=\frac{(1-e_+)\cdot \ell(h(x),-1)-e_- \cdot \ell(h(x),+1)}{1-e_+-e_-}\\ \ell_{\text{LC}}(h(x),+1)=\frac{(1-e_-)\cdot \ell(h(x),+1)-e_+ \cdot \ell(h(x),-1)}{1-e_+-e_-} \end{align*} \end{small} Consider the case with true label $y=+1$. The following argument establishes the unbiasedness of $\ell_{\text{LC}}$ (reproduced from \citet{natarajan2013learning}, with replacing and instantiating a prediction $t$ with $h(x)$): \vspace{-2pt} \begin{tcolorbox}[colback=grey!5!white,colframe=grey!5!white] \vspace{-10pt} \begin{small} \begin{align*} \hspace{-0.2in} &\mathbb{E}_{\tilde{y}|y=+1}[\ell_{\text{LC}}(h(x),\tilde{y})]\\ &= (1-e_+) \cdot \ell_{\text{LC}}(h(x),+1) + e_+ \cdot \ell_{\text{LC}}(h(x),-1) \\ &=(1-e_+) \frac{(1-e_+)\cdot \ell(h(x),-1)-e_- \cdot \ell(h(x),+1)}{1-e_+-e_-}\\ &+ e_+ \frac{(1-e_-)\cdot \ell(h(x),+1)-e_+\cdot \ell(h(x),-1)}{1-e_+-e_-}\\ &=\ell(h(x),+1) = \ell(h(x),y=+1)~, \end{align*} \end{small} \vspace{-18pt} \end{tcolorbox} \vspace{-2pt} That is the conditional expectation of $\ell_{\text{LC}}(h(x),\tilde{y})$ recovers the true loss $\ell(h(x),y)$. Nonetheless, the first equality assumed the conditional independence between $h$ and $\tilde{y}$, given $y$. When $h$ is output from a deep neural network and memorizes all noisy labels $\tilde{y}$, the above independence condition can be challenged. As a consequence, it is unclear whether the classifiers that fully memorize the noisy labels would result in a lower empirical loss during training. We call the above observation the \emph{memorization paradox}. We conjecture that this paradox leads to inconsistencies in previously observed empirical evidence, especially when training a deep neural network solution that memorizes labels well. In the next section, we will offer new explanations for how the proposed solutions actually fared when the trained neural network is able to memorize the examples. \section{Introduction} \input{Introduction} \section{Formulation}\label{sec:formulation} \input{Preliminary} \section{Impacts of Memorizing Noisy Labels}\label{sec:noise} \input{noise} \section{Learning with Noisy Labels}\label{sec:fix} \input{fix} \section{How Do Solutions Fare at Instance Level?}\label{sec:analysis} \input{analysis} \nocite{langley00} \bibliographystyle{icml2021} \subsection{Generalization error} Denote by $\bar{\pi}^N$ the resulting marginal distribution over $x$: $\bar{\pi}^N(\alpha):=\mathbb{P}[D(x)=\alpha]$. $\bar{\pi}^N$ controls the true frequency of generating instances. Define the following quantity: \begin{align} \tau_l := \frac{\mathbb{E}_{\alpha \sim \bar{\pi}^N}[\alpha^{l+1}\cdot (1-\alpha)^{n-l}]}{\mathbb{E}_{\alpha \sim \bar{\pi}^N}[\alpha^{l}\cdot (1-\alpha)^{n-l}]}. \end{align} Intuitively, $\tau_l$ quantifies the ``importance weight" of the $l$-appearance instances. Theorem~2.3 of \citet{feldman2020does} provides the following generalization error of an algorithm $\mathcal{A}$: \begin{theorem} [Theorem 2.3, \cite{feldman2020does}] For every learning algorithm $\mathcal{A}$ and every dataset $S \in (X \times Y)^n$: \begin{align} &\mathsf{err}(\pi,\mathcal F, \mathcal{A}|S) \geq opt(\pi,\mathcal F|S)\nonumber \\ &+\sum_{l \in [n]} \tau_l \cdot \sum_{x \in X_{S=l} }\mathbb{P}_{h \sim \mathcal{A}}[h(x) \neq y], \end{align} where in above, $opt(\pi,\mathcal F|S) := \min_{\mathcal{A}} \mathsf{err}(\pi,\mathcal F,\mathcal{A}|S)$ is the minimum achievable generalization error \end{theorem} We will build our results and discussions using this generalization bound. Our discussion will focus on how label noise can disrupt the training of a model through the changes of the following \textbf{Excessive Generalization Error:} \begin{align} \mathsf{err}^{+}(\mathcal{P},\mathcal{A}|S):=&\sum_{l \in [n]} \tau_l \sum_{x \in X_{S=l} }\mathbb{P}_{h \sim \mathcal{A}(S')}[h(x) \neq y], \label{eqn:excesserror} \end{align} Note though the input of the algorithm $\mathcal{A}$ is the noisy dataset $S'$, we are interested in the distribution conditional on the clean dataset $S$ - this is the true distribution that we aim for $h$ to generalize to. On the other hand, the distribution induced by $S'$ will necessarily encode bias to the clean distribution that we are interested in, when some labels are indeed different from the true ones. Even though we do not have access to $S$, the above ``true generalization error'' is well-defined for our analysis, and nicely encodes three quantities that are of primary interests to our study: \squishlist \item $\tau_l$: the ``importance weight" of the $l$-appearance instances. \item $l$: the frequency of instances that categorizes how popular a particular instance $x$ is in the dataset. \item $\sum_{x \in X_{Z=l} }\mathbb{P}_{h \sim \mathcal{A}(S')}[h(x) \neq y]$: the accumulative generalization error $h$ makes for $l$-appearance instances. \end{list} We will also denote by \begin{align} \mathsf{err}^{+}_l(\mathcal{P},\mathcal{A}, x|S):=& \tau_l \cdot \mathbb{P}_{h \sim \mathcal{A}(S')}[h(x) \neq y] \label{eqn:excesserror:ind} \end{align} the \textbf{Individual Excessive Generalization Error} caused by a $x \in X_{S=l}$. Easy to see that $\mathsf{err}^{+}(\mathcal{P},\mathcal{A}|S) = \sum_x \mathsf{err}^{+}_l(\mathcal{P},\mathcal{A}, x|S)$. \subsection{Importance of memorizing an $l$-appearance instance} Clearly Eqn.~(\ref{eqn:excesserror}) informs us that different instance contributes differently to the generalization error. It was proved in \citet{feldman2020does} even a single-appearance instance $x \in X_{S=1}$ (i.e., $l=1$) will contribute to the increase of generalization error at the order of $\Omega(\frac{1}{n})$: when $\pi_{\max }:= \max_{j \in [N]} \pi_j \leq 1/200$, we have \[ \tau_1 \geq \frac{1}{7n}\cdot \textsf{weight}\left(\pi,\left[\frac{1}{2n},\frac{1}{n}\right]\right), \] where $\textsf{weight}\bigl(\pi,\bigl[\beta_1,\beta_2\bigr]\bigr)$ is the expected fraction of distribution $D$ contributed by frequencies in the range $[\beta_1,\beta_2]$: \begin{align*} \textsf{weight}\bigl(\pi,\bigl[\beta_1,\beta_2\bigr]\bigr):= \mathbb{E}\left[\sum_{x \in X}D(x) \cdot \mathds{1}\left(D(x) \in [\beta_1,\beta_2]\right)\right] \end{align*} The expectation is w.r.t. $D(x) \sim \pi$ (and followed by the normalization procedure). We next first generalize the above lower bound to $\tau_l$ for an arbitrary $l$: \begin{theorem} For sufficiently large $n,N$, when $\pi_{max} \leq \frac{1}{20}:$ \begin{align} \tau_l \geq 0.4 \cdot \frac{l (l-1)}{n(n-1)} \cdot \textsf{weight}\left(\pi,\left[\frac{2}{3}\frac{l-1}{n-1}, \frac{4}{3}\frac{l}{n}\right]\right) \end{align} \label{thm:main:tau} \end{theorem} We observe that $\frac{l (l-1)}{n(n-1)} = O(\frac{l^2}{n^2})$. For instance: \squishlist \item An $l = O(n^{2/3})$-appearance instance will lead to an $\Omega(\frac{1}{n^{2/3}})$ order of impact. \item An $l = O(n^{3/4})$-appearance instance will lead to an $\Omega(\frac{1}{\sqrt{n}})$ order of impact. \item An $l = c n$-appearance (linear) instance will lead to an $\Omega(1)$ bound, a constant order of impact. \end{list} Secondly, for the $\textsf{weight}\bigl(\pi,\bigl[\frac{2}{3}\frac{l-1}{n-1}, \frac{4}{3}\frac{l}{n}\bigr]\bigr)$ term, we have the frequency interval at the order of length $ \frac{l}{n} - \frac{l-1}{n-1} = \frac{n-l}{n(n-1)} = O(\frac{1}{n}). $ That is the weight term captures the frequency of an $O(\frac{1}{n})$ interval of the sample distribution. One might notice that there seems to be a disagreement with the reported result in \citet{feldman2020does} when $l$ is small (particularly when $l=1$): when ignoring the $\textsf{weight}$ term $\tau_l$, an $O(\frac{1}{n})$ lower bound was reported, while ours leads to an $ O(\frac{1}{n^2})$ one. This is primarily due to different bounding techniques we incurred. Our above bound suits the study of $l$ that is on a higher order than $O(\frac{1}{n})$. For small $l$, we provide the following bound: \begin{theorem} For sufficiently large $n,N$ and $\pi_{max} \leq \frac{1}{20}:$ \begin{align*} \tau_l \geq 0.4 \frac{l-1}{n-1} \cdot \frac{1}{1.1^l} \cdot \textsf{weight}\left(\pi,\left[0.7 \frac{l-1}{n-1}, \frac{4}{3}\frac{l-1}{n-1}\right]\right) \end{align*} \label{prop:tau} \end{theorem} \vspace{-0.2in} When $l$ is small, based on the above bound, we do see $\tau_l = \Omega(\frac{1}{n})$, while the $\textsf{weight}$ constant again captures an $O(\frac{1}{n})$ interval of instances. Note that this bound becomes less informative as $l$ grows, due to the increasing $1.1^l$ term. Also when $l=1$, our bound becomes vacuous since $l-1=0$. \subsection{Memorizing noisy labels} In order to study the negative effects of memorizing noisy labels, we first define the memorization of noisy labels. For an $x \in X_{S=l}$ and its associated $l$ noisy labels, denote by $\tilde{\mathbb{P}}[\tilde{y}=k|x], k \in Y$ the empirical distribution of the $l$ noisy labels: for instance when $l=3$ and two noisy labels are 1, we have $\tilde{\mathbb{P}}[\tilde{y}=1|x]=\frac{2}{3}$. \begin{definition}[Memorization of noisy labels] We call a model $h$ memorizing noisy labels for instance $x$ if $\mathbb{P}_{h \sim \mathcal{A}(S')}[h(x) = k] = \tilde{\mathbb{P}}[\tilde{y}=k|x]$. \label{def:memnoisy} \end{definition} Note that the probability measure is over the randomness of the algorithm $\mathcal{A}$, as well as the potential randomness in $h$ - practically one can sample a classification outcome based on the posterior prediction of $h(x)$. Effectively the assumption states that when a model, e.g. a deep neural network, memorizes all $l$ noisy labels for instance $x$, its output will follow the same empirical distribution. It has been shown in the literature \cite{cheng2017learning,cheng2020learning} that a fully memorizing neural network will be able to encode $\tilde{\mathbb{P}}[\tilde{y}=k|x]$ for each $x$. This is also what we observe empirically. In Figure \ref{fig:2d:ce}, we simulate a 2D example: there are two classes of instances. The outer annulus represents one class and the inner ball is the other. Given the plotted training data, we train a 2-layer neural network using the cross-entropy (CE) loss. On the left panel, we observe concentrated predictions from the trained model when labels are clean. However, the decision boundary (colored bands with different prediction probabilities) becomes less certain and more probabilistic with the addition of noisy labels, signaling that the neural network is memorizing a mixed distribution of noisy labels. \vspace{-0.2in} \begin{figure}[!ht] \centering \includegraphics[width=0.23\textwidth]{figures/bcewithlogits_clean.png}\hspace{-0.2in} \includegraphics[width=0.23\textwidth]{figures/bcewithlogits_random-0_2.png \vspace{-0.2in} \caption{A 2D example illustrating the memorization of noisy labels. Left panel: Training with clean labels. Right panel: Training with random $20\%$ noisy labels. Example with $40\%$ noisy labels can be found in the Appendix.} \label{fig:2d:ce} \end{figure} \vspace{-0.1in} \begin{figure}[!ht] \centering \includegraphics[width=0.48\textwidth]{figures/demo_ce_5_40_70_t1.pdf} \vspace{-0.2in} \caption{Memorization effects on CIFAR-10 with noisy labels.} \label{fig:cifar-memorization} \end{figure} We further illustrate this in Figure \ref{fig:cifar-memorization} where we train a neural network on the CIFAR-10 dataset with synthesized noisy labels. The top row simulated simple cases with instance-independent noise $T(x) \equiv T$, while the bottom one synthesized an instance-dependent case\footnote{We defer the empirical details to the Appendix.}. In each row, from Left to Right, we show the progressive changes in the distribution of losses\footnote{To better visualize the separation of the instances, we follow \citet{cheng2020learning} to plot the distribution of a normalized loss by subtracting the CE loss with a normalization term $\sum_{k} \mathbb{P}[h(x)=k]/m$, resulting possibly negative losses on $x$-axis. } across different training epochs. Preferably, we would like the training to return two distributions of losses that are less overlapped so the model can better distinguish the clean (colored in {\color{blue}blue}) and corrupted instances (colored in {\color{orange}orange}). However, we do observe that in both cases, the neural network fails to separate the clean instances from the corrupted ones and memorizes a mixture of both. This definition of memorization is certainly a simplification but it succinctly characterizes the situation when there are $l$ similar but non-identical instances, the deep neural network would memorize the noisy label for each of them, which then results in memorizing each realized noisy label class a $\tilde{\mathbb{P}}[\tilde{y}=k|x]$ fraction of times. This definition would also require the instances ($x$'s) to be rather independent, or each $x$'s own label information is the most dominant one, which is likely to be true when $N$ is large enough to separate $X$. Most of our observations would remain true as long as the memorization leads $h$ to predict in the same direction of $\tilde{\mathbb{P}}[\tilde{y}=k|x]$. In particular, when $h$ does not fully remember the empirical label distribution, we conjecture that our main results hold if the memorization preserves orders: for any two classes $k,k'$, if $\tilde{\mathbb P}[\tilde{y}=k|x]>\tilde{\mathbb P}[\tilde{y}=k'|x]$, we require $h$ to satisfy $\mathbb P_{h \sim \mathcal A(S')}[h(x)=k]>\mathbb P_{h \sim \mathcal A(S')}[h(x)=k']$. This simplification in Definition \ref{def:memnoisy} greatly enables a clear presentation of our later analysis. \subsection{Impacts of memorizing noisy labels} Based on Theorem \ref{thm:main:tau}, we summarize our first observation that over-memorizing noisy labels for higher frequency instances leads to a bigger drop in the generalization power: \begin{theorem} For $x \in X_{S=l}$ with true label $y$, $h$ memorizing its $l$ noisy labels leads to the following order of individual excessive generalization error $\mathsf{err}^{+}_l(\mathcal{P},\mathcal{A}, x|S)$: \vspace{-0.1in} \[ \Omega\left( \frac{l^2}{n^2} \cdot \textsf{weight}\left(\pi,\left[\frac{2}{3}\frac{l-1}{n-1}, \frac{4}{3}\frac{l}{n}\right] \right)\cdot \sum_{k \neq y} \tilde{\mathbb{P}}[\tilde{y}=k|x]\right) \] \label{thm:noisy} \end{theorem} \vspace{-0.2in} We would like to note that with large $l$, $\sum_{k \neq y}\tilde{\mathbb{P}}[\tilde{y}=k|x] \rightarrow \sum_{k \neq y}T_{y,k}(x)$ - not surprisingly, the higher probability an instance is observing a corrupted label, the higher generalization error it will incur. The bound informs us that over-memorizing high-frequency instances lead to a larger negative impact on the generalization. However, we shall see later the higher-frequency instances are in fact the easier ones to fix! On the other hand, memorizing the noisy labels for the lower frequency/appearance instances leads to a smaller drop in generalization performance. Nonetheless, they do incur non-negligible changes. For instance, misremembering a single instance with $l=1$ leads to an $O(\frac{1}{n})$ increase in generalization error. Later we show a small $l$ poses additional challenges in correcting the mistakes. \section{Introduction} \input{Introduction} \section{Formulation}\label{sec:formulation} \input{Preliminary} \section{Impacts of Memorizing Noisy Labels}\label{sec:noise} \input{noise} \section{Learning with Noisy Labels}\label{sec:fix} \input{fix} \section{How Do Solutions Fare at Instance Level?}\label{sec:analysis} \input{analysis} \nocite{langley00} \bibliographystyle{icml2021} \subsection{Noisy labels} We consider a setting where the training labels are noisy. Suppose for each training instance $(x,y)$, instead of observing the true label $y$, we observe a noisy copy of it, denoting by $\tilde{y}$. Each $\tilde{y}$ is generated according to the following model: \begin{align} T_{k,k'}(x) := \mathbb{P}[\tilde{y} = k' |y=k, x], k',k \in Y. \end{align} We will denote by $T(x) \in \mathbb{R}^{m \times m}$ the noise transition matrix with the $(k,k')$-entry defined by $ T_{k,k'}(x)$. Each of the above noisy label generation is independent across different $x$. We have access to the above noisy dataset $S':=\{(x_1,\tilde{y}_1),...,(x_n,\tilde{y}_n)\}$. An $x$ that appears $l$ times in the dataset will have $l$ independently generated noisy labels. One can think of these as $l$ similar data instances, with each of them equipped with a single noisy label collected independently. For instance, Figure \ref{fig:cifar} shows a collection of 10 similar ``Cats" from the CIFAR-10 dataset \cite{krizhevsky2009learning}. On top of each image, we show a ``noisy" label collected from Amazon Mechanical Turk. Approximately, one can view each row as a $x$ with 5 appearances, with each of the instances associated with a potentially corrupted label. $T(x)$ varies across the dataset $S$, and possibly that $T(x)$ would even be higher for low-frequency/rare instances, due to the inherent difficulties in recognizing and labeling them. Note the noisy label distribution $\mathbb{P}[\tilde{y}|x]$ has a larger entropy due to the additional randomness introduced by $T(x)$ and is therefore harder to fit. As we shall see later, this fact poses additional challenges, especially for the long-tail instances that have an insufficient number of observations. \begin{figure}[!t] \centering \includegraphics[width=0.45\textwidth]{figures/cifar_cat_2_5-crop_t1.pdf} \caption{Sample examples of ``Cats" in CIFAR-10 with noisy labels on top. Examples are taken from \cite{zhu2021clusterability}. \label{fig:cifar} \end{figure} \subsection{Related works} There have been substantial discussions on the memorization effects of deep neural networks, and how memorization relates to generalization \cite{zhang2016understanding,neyshabur2017exploring,arpit2017closer,feldman2020does,feldman2020neural}. Most relevant to us, recent works have reported negative consequences of memorizing noisy labels, and have proposed corresponding fixes \cite{natarajan2013learning,liu2016classification,liu2019peer,song2019prestopping,yao2020searching,cheng2017learning,pmlr-v97-chen19g,han2020sigua,song2019prestopping}. Different solutions seem to be effective when guarding different type of noise, but there lacks a unified framework to understand why one approach would work and when they would fail. Recently, there is increasing attention on learning with instance-dependent noise, which proves to be a much more challenging case \cite{cheng2017learning,cheng2020learning,xia2020parts,zhu2020second}. Our work echoes this effort and emphasizes the instance-level understanding. This focus particularly suits a study with long-tail distributions of instances that appear with different frequencies, which is often shown to be the case with image datasets \cite{zhu2014capturing}. \textbf{Common solutions} toward learning with noisy labels build around loss or label corrections \cite{natarajan2013learning,Patrini_2017_CVPR,xia2019anchor}. More recently, light and easy-to-implement solutions are proposed too \cite{lukasik2020does,liu2019peer}. We delve into three of them in Section \ref{sec:fix}. As an area with growing interests, there exist many other solutions - we will not have space to list all, but we want to mention the following two streams of efforts. \emph{Sample cleaning}: Sample cleaning leverages the idea of detecting instance $x$ whose label is corrupted ($\tilde{y} \neq y$) \cite{jiang2017mentornet,han2018co,yu2019does,yao2020searching,wei2020combating,cheng2020learning}. Then the training is mainly done with the selected clean instances, with the aid of processed information from the detected corrupted examples. \emph{Robust loss function}: The literature has also observed the proposal of robust loss functions that perform well with dealing outlier noisy examples \cite{zhang2018generalized,menon2019can,charoenphakdee2019symmetric,wang2019symmetric}. \subsection{Overview of the main results: Disparate impacts and treatments of label noise} Our first set of results, perhaps non-surprisingly, show the disparate impact of noisy labels at the instance level. The impact to the drop of generalization power is linearly dependent on the frequency of the instance and its labels' associated noise rate: \begin{theorem}[\textbf{Disparate Impacts, Informal}] For an instance $x$ that appears $l$ times ($l$-appearance instance) in the training data (with $n$ samples), a model $h$ memorizing its $l$ noisy labels leads to the following order of individual excessive generalization error: \vspace{-0.05in} \[ \Omega\left( \frac{l^2}{n^2} \cdot \text{(label noise rate at $x$)}\right) \] \vspace{0.05in} \label{thm:noisy} \end{theorem} \vspace{-0.2in} Our discussions then move to how the existing treatments fare at the instance level. We will introduce a memorization paradox in Section \ref{subsec:paradox} to highlight a common pitfall when analyzing the performance of existing algorithmic treatments at the population level, when a deep model is considered and is able to memorize training examples. Probably more alarmingly, we then provide a set of instance-level analysis to show the disparate treatments of several existing learning with noisy label solutions: \begin{theorem}[\textbf{Disparate Treatments, Informal}] For an instance $x$ that appears $l$ times in the training data ($l$-appearance instance), \textbf{when $l$ is large (high-frequency instance)}, with high probability, performing loss correction \cite{natarajan2013learning,Patrini_2017_CVPR} and using peer loss correction \cite{liu2019peer} on $x$ improves generalization performance compared to memorizing the noisy labels. \textbf{When $l$ is small (long-tail instance)}, with non-negligible probability, both loss correction and peer loss incur higher prediction errors than memorizing the noisy labels. \end{theorem} \subsection{Loss correction} We start with loss correction and notice that the loss correction step is equivalent to the following ``label correction" \footnote{Please note that our `` label correction" definition differs from the existing ones in the literature.} procedure. Denote by $\mathbb{P}(\mathbf{\tilde{y}}):=[\mathbb{P}[\tilde{y}=k|x]]_{k \in Y}$ the vector form of the distribution of noisy label $\tilde{y}$, and $\mathbf{y}$ as the vector form of one-hot encoding of the true label $y$. As assumed earlier, the generation of noisy label $\tilde{y}$ follows: $ \mathbb{P}(\mathbf{\tilde{y}}) := T^{\top}(x) \cdot \mathbf{y}. $ When $T(x)$ is invertible (commonly assumed), we will have $ \mathbf{y} = (T^{-1}(x))^{\top}\cdot \mathbb{P}(\mathbf{\tilde{y}}) $, that is when $\mathbb{P}(\mathbf{\tilde{y}})$ is the true and exact posterior distribution of $\tilde{y}$, $ (T^{-1}(x))^{\top}\cdot \mathbb{P}(\mathbf{\tilde{y}})$ recovers $\mathbf{y}$. Based on the above observation, easily we can show that (using linearity of expectation) loss correction effectively pushed $h$ to memorize $(T^{-1}(x))^{\top}\cdot \mathbb{P}(\mathbf{\tilde{y}})=\mathbf{y}$, i.e. the clean label: \vspace{-5pt} \begin{tcolorbox}[colback=grey!5!white,colframe=grey!5!white] \vspace{-15pt} \begin{align} &\mathbb{E}_{\tilde{y}|y}[\mathbf{\tilde{y}}^{\top} \cdot \Bell_{\text{LC}}(h(x))] \nonumber \\ =&\mathbb{E}_{\tilde{y}|y}[\mathbf{\tilde{y}}^{\top} \cdot T^{-1}(x) \cdot \Bell(h(x))] \nonumber\\ =& \mathbb{E}_{\mathbf{y}' \sim (T^{-1}(x))^{\top}\cdot \mathbb{P}(\mathbf{\tilde{y}})}\left[(\mathbf{y}')^{\top} \cdot \Bell(h(x))\right] \nonumber \\ =& \mathbf{y}^{\top}\cdot \Bell(h(x)) \label{eqn:lc} \end{align} \vspace{-25pt} \end{tcolorbox} \vspace{-2pt} That is loss correction encourages $h$ to memorize the true label $\mathbf{y}$, therefore reducing $\mathbb{P}[h(x)\neq y]$ to 0 to improve generalization. The above is a clean case with accessing $\mathbb{P}(\mathbf{\tilde{y}})$, the exact noisy label distribution, which differs from the empirical noisy label distribution $\tilde{\mathbb{P}}[\tilde{y}=k|x]$ that a deep neural network can access and memorize. This is mainly due to the limited number, $l$, of noisy labels for an $x \in X_{S=l}$. Denote by $\tilde{\mathbb{P}}(\mathbf{\tilde{y}})$ the vector form of $\tilde{\mathbb{P}}[\tilde{y}=k|x]$. Let $\mathbf{y}_{\text{LC}} $ be the ``corrected label" following from the distribution defined by $(T^{-1}(x))^{\top}\cdot \tilde{\mathbb{P}}(\mathbf{\tilde{y}})$: \[ \text{Corrected Label: }~~\mathbf{y}_{\text{LC}} = (T^{-1}(x))^{\top}\cdot \tilde{\mathbb{P}}(\mathbf{\tilde{y}}). \] Denote by $x(1),...,x(l)$ the $l$ appearance of $x$, and $\tilde{y}(1),...,\tilde{y}(l)$ the corresponding noisy labels. Similar to Eqn. (\ref{eqn:lc}) we can show that: \vspace{-5pt} \begin{tcolorbox}[colback=grey!5!white,colframe=grey!5!white] \vspace{-20pt} \begin{align} &\frac{1}{l}\sum_{i=1}^l\mathbf{\tilde{y}}^{\top}(i) \cdot \Bell_{\text{LC}}(h(x)) \nonumber \\ =&\mathbb{E}_{\tilde{\mathbb{P}}(\mathbf{\tilde{y}})}[\mathbf{\tilde{y}}^{\top} \cdot T^{-1}(x) \cdot \Bell(h(x))] \nonumber\\ \mathbf{y}_{\text{LC}}^{\top} \cdot \Bell(h(x)) \label{eqn:lc2} \end{align} \vspace{-25pt} \end{tcolorbox} \vspace{-2pt} That is, the empirical loss for $x$ with loss correction is equivalent with training using $\mathbf{y}_{\text{LC}}$! Next we will focus on the binary case: $T(x)$ is fully characterized and determined by $e_+(x),e_-(x)$ (Eqn. \ref{eqn:T}). We will follow the assumption made in the literature that $e_+(x) + e_-(x) < 1$ (noisy labels are at least positively correlating with the true label). Easy to prove that the two entries of $\mathbf{y}_{\text{LC}}$ add up to 1\footnote{For binary labels $\{-1,+1\}$, the first entry of the vectors corresponds to $-1$ ($\mathbf{y}_{\text{LC}}[1]$), the second for $+1$ ($\mathbf{y}_{\text{LC}}[2]$).}: \begin{lemma} $\mathbf{y}_{\text{\emph{LC}}}[1] + \mathbf{y}_{\text{\emph{LC}}}[2] =1$.\label{lemma:smy} \end{lemma} \vspace{-0.05in} However, it is possible that $(T^{-1}(x))^{\top}\cdot \tilde{\mathbb{P}}(\mathbf{\tilde{y}})$ is not a valid probability measure, in which case we will simply cap $\mathbf{y}_{\text{LC}}$ at either $[1;0]$ or $[0;1]$. Denote by $y_{\text{LC}}$ the random variable drawn according to $\mathbf{y}_{\text{LC}}$. We again call $h$ memorizing $\mathbf{y}_{\text{LC}}$ if $\mathbb{P}[h(x) = k] = \mathbb{P}[y_{\text{LC}}=k|x], \forall k \in Y$. Let's simplify our argument by assuming the following equivalence: \begin{assumption} The trained model $h$ using loss correction (minimizing Eqn. (\ref{eqn:lc2})) is able to memorize $\mathbf{y}_{\text{\emph{LC}}}$. \label{ass:lc:memorize} \end{assumption} \vspace{-0.05in} The first message we are ready to send is: \textbf{ For an $x$ with large $l$, with high probability, loss correction returns smaller generalization error than memorizing noisy labels.} Denote by $sgn(y)$ the sign function of $y$. For $x \in X_{S=l}$, consider a non-trivial case that $\tilde{\mathbb{P}}[\tilde{y} \neq y|x] > 0$\footnote{For trivial cases, our claims would simply be that loss correction performs equally well since the memorizing the noisy label is already equivalent with memorizing the true label.}: \begin{theorem} For an $x \in X_{S=l}$ with true label $y$, w.p. at least $1-e^{-2l (1/2-e_{sgn(y)}(x))^2}$, $h$ memorizing $\mathbf{y}_{\text{\emph{LC}}}$ returns a lower error $\mathbb{P}[h(x) \neq y]$ than memorizing the noisy label s.t. $\mathbb{P}[h(x) = k]~ =~ \tilde{\mathbb{P}}[\tilde{y}=k|x]$. \label{thm:losscorrection} \end{theorem} \vspace{-0.05in} The above theorem implies when $l \geq \frac{\log 1/\delta}{2\left(\frac{1}{2}-e_+(x)\right)^2}$, memorizing $\mathbf{y}_{\text{LC}}$ improves the excessive generalization error with probability at least $1-\delta$. As a corollary of Theorem \ref{thm:losscorrection}: \begin{corollary} For an $x \in X_{S=l}$ with true label $y$, w.p. at least $1-e^{-2l \left(\frac{1}{2}-e_{sgn(y)}(x)\right)^2}$, performing loss correction for $x \in X_{S=l}$ improves the excessive generalization error $\mathsf{err}^{+}_l(\mathcal{P},\mathcal{A}, x|S)$ by \vspace{-0.05in} \[ \Omega\left( \frac{l^2}{n^2} \cdot \textsf{weight}\left(\pi,\left[\frac{2}{3}\frac{l-1}{n-1}, \frac{4}{3}\frac{l}{n}\right] \right)\right) \] \label{cor:losscorrection} \end{corollary} \vspace{-0.2in} The above corollary is easily true due to definition of $\mathsf{err}^{+}_l(\mathcal{P},\mathcal{A}, x|S)$, Theorem \ref{thm:noisy} \& \ref{thm:losscorrection}, as well as Assumption \ref{ass:lc:memorize}. Our next message is: \textbf{For an $x$ with small $l$, loss correction fails with a substantial probability.} Denote by $D_{\text{KL}}(\frac{1}{2}\| e)$ the Kullback-Leibler distance between two Bernoulli 0/1 random variables of parameter $1/2$ and $e$. Consider a non-trivial case that $\tilde{\mathbb{P}}[\tilde{y} \neq y|x] < 1$, we prove: \begin{theorem} For an $x \in X_{S=l}$ with true label $y$, w.p. at least $\frac{1}{\sqrt{2l}} \cdot e^{-l \cdot D_{\text{\emph{KL}}}\left(\frac{1}{2}\|e_{sgn(y)}(x)\right)}$, $h$ memorizing $\mathbf{y}_{\text{\emph{LC}}}$ returns a higher error $\mathbb{P}[h(x) \neq y]$ than memorizing noisy label $\mathbf{\tilde{y}}$. \label{thm:losscorrection:lower} \end{theorem} When $l$ is small, the reported probability in Theorem \ref{thm:losscorrection:lower} is a non-trivial one. Particularly, when $l \leq \frac{\log \frac{1}{\sqrt{2}\delta}}{D_{\text{KL}}(\frac{1}{2}\| e_{sgn(y)}(x))}$, with probability at least $\delta$, memorizing $\mathbf{y}_{\text{LC}}$ (or performing loss correction) leads to worse generalization power. \subsection{Label smoothing}\label{sec:ls} Denote by $y_{\text{LS}}$ the ``soft label" for the distribution vector $\mathbf{y}_{\text{LS}}$, and again we call $h$ memorizing $\mathbf{y}_{\text{LS}}$ if $\mathbb{P}[h(x)=k]=\tilde{\mathbb{P}}[y_{\text{LS}}=k|x], \forall k \in Y$ - $\tilde{\mathbb{P}}[y_{\text{LS}}=k|x]$ denotes the empirical distribution for $y_{\text{LS}}$ (empirical average of the soft label $y_{\text{LS}}$): \begin{align} \tilde{\mathbb{P}}[y_{\text{LS}}= k|x] = (1-a) \cdot \tilde{\mathbb{P}}[\tilde{y}=k|x] + \frac{a}{m}~. \end{align} Consider the binary classification case. Denote the following event: $ \mathcal{E}_+:=\{\tilde{\mathbb{P}}[\tilde{y}=+1|x] > \tilde{\mathbb{P}}[\tilde{y}=-1|x]\} $ and $\bar{\mathcal{E}}_+$ denotes the opposite event $\tilde{\mathbb{P}}[\tilde{y}=+1|x] < \tilde{\mathbb{P}}[\tilde{y}=-1|x]$. For a non-trivial case $\tilde{\mathbb{P}}[\tilde{y} \neq y|x] \in (0,1)$: \begin{theorem} For an $x \in X_{S=l}$ with true label $y=+1$, when $\mathcal{E}_+$ happens, $h$ memorizing the smooth label $\mathbf{y}_{\text{\emph LS}}$ leads to a higher error $\mathbb{P}[h(x) \neq y]$ than memorizing corrected label $\mathbf{y}_{\text{\emph LC}}$. When $\bar{\mathcal{E}}_+$ happens, $h$ memorizing $\mathbf{y}_{\text{\emph LS}}$ has a lower error $\mathbb{P}[h(x) \neq y]$ than memorizing $\mathbf{y}_{\text{\emph LC}}$. \label{thm:labelsmoothing} \end{theorem} \vspace{-0.05in} Similar result can be proved for the case with $y=-1$ but we will not repeat the details. Repeating the proofs for Theorem \ref{thm:losscorrection:lower}, we can similarly show that when $l$ is small, there is a substantial probability that $\bar{\mathcal{E}}_+$ will happen $\left(\geq \frac{1}{\sqrt{2l}} \cdot e^{-l \cdot D_{\text{KL}}\left(\frac{1}{2}\| e_{sgn(y)}(x)\right)}\right)$, therefore label smoothing returns a better generalization power than loss correction. Intuitively, consider the extreme case with $l=1$, and label smoothing has a certain correction power even when this single noisy label is wrong. On the other hand, loss correction (and $\mathbf{y}_{\text{LC}}$) would memorize this single noisy label for $x$. We view label smoothing as a safe way to perform label correction when $l$ is small, and when the noise rate is excessively high such that $\mathbb{P}[\bar{\mathcal{E}}_+] > \mathbb{P}[\mathcal{E}_+]$. \subsection{Peer loss}\label{sec:pl} The first message we send for peer loss is that: \textbf{For an $x$ with larger $l$, peer loss extremizes $h$'s prediction to the correct label with high probability.} We first show that peer loss explicitly regularizes $h$ from memorizing noisy labels. We use the cross-entropy loss for $\ell$ in $\ell_{\text{PL}}$ (Eqn. (\ref{eqn:peerloss})). \begin{lemma}Denote by $\mathbb{Q}(x,\tilde{y})$ the joint distribution of $h(x)$ and $\tilde{y}$, $\mathbb{P}(x),\mathbb{P}(\tilde{y})$ the marginals of $x,\tilde{y}$, taking expectation of $\ell_{\text{PL}}$ over the training data distribution $ \mathbb{P}(x,\tilde{y})$, one finds: \vspace{-0.05in} \begin{align} \mathbb{E}_{\mathcal P}\big[\ell_{\text{\emph{PL}}}(h(x), &\tilde{y})\big] = D_{\text{\emph{KL}}}(\mathbb{Q}(x,\tilde{y})\|\mathbb{P}(x,\tilde{y}))\nonumber \\ &- D_{\text{\emph{KL}}}(\mathbb{Q}(x,\tilde{y})\|\mathbb{P}(x)\times\mathbb{P}(\tilde{y})). \end{align} \label{lemma:peerloss} \end{lemma} \vspace{-0.25in} In above we use the standard notation $D_{\text{KL}}$ for KL-divergence between two distributions. While minimizing $D_{\text{KL}}(\mathbb{Q}(x,\tilde{y})\|\mathbb{P}(x,\tilde{y})) $ encourages $h$ to reproduce $\mathbb{P}(x,\tilde{y})$ (the noisy distribution), the second term $D_{\text{KL}}(\mathbb{Q}(x,\tilde{y})\|\mathbb{P}(x)\times\mathbb{P}(\tilde{y}))$ discourages $h$ from doing so by incentivizing $h$ to predict a distribution that is independent from $\tilde{y}$! This regularization power helps lead the training to generate more confident predictions, per a recent result: \begin{theorem}\label{pro:dynamic}[\cite{cheng2020learning}] When minimizing $\mathbb{E}\left[\ell_{\text{\emph{PL}}}(h(x), \tilde{y})\right]$, solutions satisfying $\mathbb{P}[h(x)=k]>0, \forall k \in Y$ are not optimal. % \end{theorem} \vspace{-0.1in} In the case of binary classification, the above theorem implies that we must have either $\mathbb{P}[h(x)=+1] \rightarrow 1$ or $\mathbb{P}[h(x)=-1] \rightarrow 1$. We provide an illustration of this effect in Figure \ref{fig:peerloss}. In sharp contrast to Figure \ref{fig:2d:ce}, the decision boundaries returned by training using peer loss remain tight, despite high presence of label noise. \vspace{-0.1in} \begin{figure}[!ht] \centering \includegraphics[width=0.23\textwidth]{figures/bcewithlogits_peer_random-0_2.png}\hspace{-0.2in} \includegraphics[width=0.23\textwidth]{figures/bcewithlogits_peer_random-0_4.png} \vspace{-0.2in} \caption{2D example with peer loss: $20\%, 40\%$ random noise. \label{fig:peerloss} \end{figure} \vspace{-0.05in} Now the question left is: is pushing to confident prediction in the right direction of correcting label noise? If yes, peer loss seems to be achieving the same effect as the loss correction approach, without knowing or using $T(x)$. Consider the binary classification case. To simplify our analysis, let's consider only a class-dependent noise setting that $e_+(x) \equiv e_+, e_-(x) \equiv e_-$. This simplification is needed due to the fact that the definition of peer loss requires drawing a global and random ``peer sample". Technically we can revise peer loss to use ``peer samples" that are similar enough so that they will likely to have the same $e_+(x),e_-(x)$. Denote the priors of the entire distribution by $p_+:=\mathbb{P}_{y' \in \mathcal F|S}[y'=+1]>0, p_-:=\mathbb{P}_{y' \in \mathcal F|S}[y'=-1]>0$. When $n$ is sufficiently large, we prove: \begin{theorem} For an $x \in X_{S=l}$ with true label $y$, w.p. at least $1-e^{ \frac{-2l}{p^2_{sgn(-y)}\cdot \left(1-e_+-e_-\right)^2}}$, predicting $\mathbb{P}[h(x)=y]=1$ leads to smaller training loss in $\ell_{\text{\emph{PL}}}$ (with $\ell$=CE loss). \label{thm:peerloss} \end{theorem} \vspace{-0.05in} Using above theorem and Theorem \ref{thm:noisy}, consider a non-trivial case $\tilde{\mathbb{P}}[\tilde{y} \neq y|x] > 0$ we have: \begin{corollary} For an $x \in X_{S=l}$ with true label $y$, w.p. at least $1-e^{ \frac{-2l}{p^2_{sgn(-y)} \cdot \left(1-e_+-e_-\right)^2}}$, training using $\ell_{\text{\emph{PL}}}$ improves the individual excessive generalization error $\mathsf{err}^{+}_l(\mathcal{P},\mathcal{A}, x|S)$ by: \vspace{-0.1in} \[ \Omega\left( \frac{l^2}{n^2} \textsf{weight}\left(\pi,\left[\frac{2}{3}\frac{l-1}{n-1}, \frac{4}{3}\frac{l}{n}\right] \right)\cdot \sum_{k \neq y} \tilde{\mathbb{P}}[\tilde{y}=k|x]\right) \] \label{cor:peerloss} \end{corollary} \vspace{-0.15in} Both peer loss and loss correction implicitly use the posterior distribution of noisy labels to hopefully extremize $h(x)$ to the correct direction. The difference is peer loss extremizes even more ($\mathbb{P}[h(x)=k] \rightarrow 1$ for some $k$) when it is confident. Therefore, when there is sufficient information (i.e., $l$ being large), peer loss tends to perform better than loss correction which needs explicit knowledge of the true transition matrix and performs a precise and exact bias correction step. This is also noted empirically in \cite{liu2019peer}, and our results provide the theoretical justifications. Similar to Theorem \ref{thm:losscorrection:lower}, when $l$ is small, the power of peer loss does seem to drop: \textbf{For an $x$ with small $l$, peer loss extremizes $h$'s prediction to the wrong label with a substantial probability.} Formally, \begin{theorem} For an $x \in X_{S=l}$ with true label $y$, w.p. at least $ \frac{1}{\sqrt{2l}}e^{-l \cdot D_{\text{\emph{KL}}}\left(\frac{1}{2}\| e_{sgn(y)}\right)}$, predicting $\mathbb{P}[h(x)=-y] = 1$ leads to smaller training loss in $\ell_{\text{\emph{PL}}}$. \label{thm:peerloss:lower} \end{theorem} \vspace{-0.05in} For a non-trivial case that $\tilde{\mathbb{P}}[\tilde{y} \neq y|x] < 1$, this implies higher prediction error than memorizing the noisy labels. \section{Takeaways and Conclusion} We studied the impact of a model memorizing noisy labels. This paper proved the disparate impact of noisy labels at the instance level, and then the fact that existing treatments can often lead to disparate outcomes, with low-frequency instances being more likely to be mistreated. This observation is particularly concerning when a societal application is considered, and the low-frequency examples are drawn from a historically disadvantaged population (thus low presence in data). Specifically: \textbf{Frequent instance} While high-frequent instances (large $l$) have a higher impact on the generalization bound, and miss-classifying one such example would be more costly, our analysis shows that due to the existence of a good number of noisy labels, existing approaches can often counter the negative effects with high probability. \textbf{Long-tail instance} For a rare instance $x$ with small $l$, while missing it would incur a much smaller penalty in generalization, still, its impact is non-negligible. Moreover, due to the severely limited label information, we find the noise correction approaches would have a substantial probability of failing to correct such cases. The above observations require us to rethink the distribution of label noise across instances and might potentially require different treatments for instances in different regimes. \textbf{Acknowledgments} This work is partially supported by the National Science Foundation (NSF) under grant IIS-2007951 and the NSF FAI program in collaboration with Amazon under grant IIS-2040800. The author thanks Zhaowei Zhu, Xingyu Li and Jiaheng Wei for helps with Figure \ref{fig:cifar}~-~\ref{fig:peerloss}, as well as Lemma \ref{lemma:peerloss}. The author thanks anonymous ICML reviewers for their comments that improved the presentation of the paper. The final draft also benefited substantially from discussions with Gang Niu. \section*{\Large Appendix} \end{center} The Appendix is organized as follows. \squishlist \item Section A presents omitted proofs for theoretical conclusions in the main paper. \item Section B includes additional details for Figures \ref{fig:2d:ce} and \ref{fig:cifar-memorization}. \item Section C provides additional discussions. \end{list} \section{Proofs} \section*{Proof for Theorem \ref{thm:main:tau}} \begin{proof} Recall the definition of $\tau_l$: \begin{align} \tau_l := \frac{\mathbb{E}_{\alpha \sim \bar{\pi}^N}[\alpha^{l+1}\cdot (1-\alpha)^{n-l}]}{\mathbb{E}_{\alpha \sim \bar{\pi}^N}[\alpha^{l}\cdot (1-\alpha)^{n-l}]} \end{align} To bound $\tau_l$, we start with the denominator $\mathbb{E}_{\alpha \sim \bar{\pi}^N}[\alpha^{l}\cdot (1-\alpha)^{n-l}].$ First $\forall \alpha \in [0,1]$, we have \[ \alpha^{l-1}\cdot (1-\alpha)^{n-l} \leq \left(\frac{l-1}{n-1}\right)^{l-1} \left(1-\frac{l-1}{n-1}\right)^{n-l}~. \] The above can be easily verified by the checking the first order condition of $ \log \left( \alpha^{l-1}\cdot (1-\alpha)^{n-l}\right). $ Therefore \begin{align} &\mathbb{E}_{\alpha \sim \bar{\pi}^N}[\alpha^{l}\cdot (1-\alpha)^{n-l}]\nonumber \\ \leq &\left(\frac{l-1}{n-1}\right)^{l-1} \left(1-\frac{l-1}{n-1}\right)^{n-l} \cdot \mathbb{E}_{\alpha \sim \bar{\pi}^N}[\alpha]\nonumber \\ = &\left(\frac{l-1}{n-1}\right)^{l-1} \left(1-\frac{l-1}{n-1}\right)^{n-l} \cdot \frac{1}{N}~.\label{eqn:deno} \end{align} where the last equality is due to $\bar{\pi}^N[\alpha] = \frac{1}{N}$. Now let's look at the numerator $\mathbb{E}_{\alpha \sim \bar{\pi}^N}[\alpha^{l+1}\cdot (1-\alpha)^{n-l}]$. For $\alpha \in [\frac{l-1}{n-1}, \frac{l}{n}]$, we have \begin{align*} & \alpha^{l+1}\cdot (1-\alpha)^{n-l} \geq \alpha \cdot \left( \frac{l-1}{n-1} \right)^{l} \cdot \left(1-\frac{l}{n}\right)^{n-l} \end{align*} Therefore combining the bounds for both denominator and the numerator we have \begin{align} \tau_l \geq & \frac{ \left( \frac{l-1}{n-1} \right)^{l} \cdot \left(1-\frac{l}{n}\right)^{n-l} }{\left(\frac{l-1}{n-1}\right)^{l-1} \left(1-\frac{l-1}{n-1}\right)^{n-l}} \cdot \mathbb{E}\left [N \alpha\cdot \mathds{1}\left(\alpha \in \left[\frac{l-1}{n-1},\frac{l}{n}\right]\right)\right]\nonumber \\ =& \underbrace{\frac{l-1}{n-1}}_{\text{Term 1}} \cdot \underbrace{\left(\frac{1-\frac{l}{n}}{1-\frac{l-1}{n-1}}\right)^{n-l}}_{\text{Term 2}} \cdot \underbrace{\textsf{weight}\left(\bar{\pi}^N,\left[\frac{l-1}{n-1},\frac{l}{n}\right]\right)}_{\text{Term 3}},\label{eqn:tau:main} \end{align} where the $\textsf{weight}$ is introduced by its definition. For the second term above, \begin{align} &\left(\frac{1-\frac{l}{n}}{1-\frac{l-1}{n-1}}\right)^{n-l}\nonumber \\ =&\left(1- \frac{\frac{l}{n}-\frac{l-1}{n-1}}{1-\frac{l-1}{n-1}}\right)^{n-l}\nonumber \\ =&\left(1- \frac{l(n-1)-(l-1)n}{n(n-1)-(l-1)n}\right)^{n-l}\nonumber \\ =&\left(1- \frac{n-l}{n(n-l)}\right)^{n-l}\nonumber \\ \geq & 1- \frac{n-l}{n(n-l)} \cdot (n-l) =\frac{l}{n}.\label{eqn:tau:term2} \end{align} For the third term, we will call Lemma 2.4 of \citet{feldman2020does}: \begin{lemma}[Lemma 2.4 of \cite{feldman2020does}] For any $0<\beta_1 < \beta_2 < 1$, and for any $\gamma>0$, \begin{align} \textsf{weight}\left(\bar{\pi}^N,\bigl[\beta_1,\beta_2\bigr]\right) \geq \frac{1-\delta}{1-\frac{1}{N}+\beta_2+\gamma} \cdot \textsf{weight}\left(\bar{\pi}^N,\left[\frac{\beta_1}{1-\frac{1}{N}+\beta_1-\gamma},\frac{\beta_2}{1-\frac{1}{N}+\beta_2+\gamma} \right]\right), \end{align} where in above $\delta:= 2 \cdot e^{\frac{-\gamma^2}{2(N-1) Var(\pi)+2\gamma \pi_{\max}/3}}$, and \begin{align*} Var(\pi):= \sum_{j \in [N]} (\pi_j -\frac{1}{N}) \leq \frac{\pi_{\max}}{N}. \end{align*} \label{lemma:bound:weight} \end{lemma} Using above, we next further derive that \vspace{-2pt} \begin{tcolorbox}[colback=grey!5!white,colframe=grey!5!white] \vspace{-10pt} \begin{align*} &\textsf{weight}\bigl(\bar{\pi}^N,\bigl[\frac{l-1}{n-1},\frac{l}{n}\bigr]\bigr) \geq 0.4\cdot \textsf{weight}\left(\pi,\left[\frac{2}{3}\frac{l-1}{n-1}, \frac{4}{3}\frac{l}{n}\right]\right) \end{align*} \vspace{-18pt} \end{tcolorbox} \vspace{-2pt} To see this, using above Lemma \ref{lemma:bound:weight}, for any $\gamma > 0$, \begin{align*} &\textsf{weight}\left(\bar{\pi}^N,\left[\frac{l-1}{n-1},\frac{l}{n}\right]\right) \geq \frac{1-\delta}{1-\frac{1}{N}+\frac{l}{n} + \gamma} \cdot\textsf{weight}\left(\pi,\left[\frac{\frac{l-1}{n-1}}{1-\frac{1}{N}+\frac{l-1}{n-1}-\gamma},\frac{\frac{l}{n}}{1-\frac{1}{N}+\frac{l}{n}+\gamma}\right]\right) \end{align*} Let $\gamma = \frac{1}{2}$, for sufficiently large $n (\gg l),N$, \[ 1-\frac{1}{N}+\frac{l-1}{n-1}-\gamma \leq \frac{2}{3} \] Similarly \[ 1-\frac{1}{N}+\frac{l}{n}+\gamma \geq \frac{4}{3} \] Easy to show that $\delta \leq 2 e^{-1/10\pi_{max}}$, and when $\pi_{max} \leq \frac{1}{20}$, we have $\delta \leq 2 e^{-2} \leq 0.3$. Therefore \begin{align} \frac{1-\delta}{1-\frac{1}{N}+\frac{l}{n} + \gamma} \geq \frac{0.7}{7/4} = 0.4. \end{align} To summarize \begin{align*} &\textsf{weight}\bigl(\bar{\pi}^N,\bigl[\frac{l-1}{n-1},\frac{l}{n}\bigr]\bigr) \geq 0.4\cdot \textsf{weight}\left(\pi,\left[\frac{2}{3}\frac{l-1}{n-1}, \frac{4}{3}\frac{l}{n}\right]\right) \end{align*} Combining Term 2 and 3 we complete the proof. \end{proof} \section*{Proof for Proposition \ref{prop:tau}} \begin{proof} The major difference from proving Theorem \ref{thm:main:tau} is due to the reasoning of the numerator: $\mathbb{E}_{\alpha \sim \bar{\pi}^N}[\alpha^{l+1}\cdot (1-\alpha)^{n-l}]$. Now for $\alpha \in [\frac{l-1}{1.1(n-1)}, \frac{l-1}{n-1}]$, we have \begin{align*} & \alpha^{l+1}\cdot (1-\alpha)^{n-l} \geq \alpha \cdot \left( \frac{l-1}{1.1(n-1)} \right)^{l} \cdot \left(1-\frac{l-1}{n-1}\right)^{n-l} \end{align*} Therefore, using Eqn. (\ref{eqn:deno}), and the definition of $\tau_l$ we have \begin{align} \tau_l \geq & \frac{ \left( \frac{l-1}{1.1(n-1)} \right)^{l} \cdot \left(1-\frac{l-1}{n-1}\right)^{n-l} }{\left(\frac{l-1}{n-1}\right)^{l-1} \left(1-\frac{l-1}{n-1}\right)^{n-l}} \cdot \mathbb{E}\left[N \alpha\cdot \mathds{1}\left(\alpha \in \left[\frac{l-1}{1.1 (n-1)},\frac{l-1}{n-1}\right]\right)\right]\nonumber \\ =& \frac{l-1}{n-1} \cdot \frac{1}{1.1 ^l} \cdot \textsf{weight}\left(\bar{\pi}^N,\left[\frac{l-1}{1.1 (n-1)},\frac{l-1}{n-1}\right]\right).\label{eqn:tau:2} \end{align} Again, using Lemma 2.4 of \citet{feldman2020does}, for the $\textsf{weight}$ term, we further derive that for any $\gamma > 0$, \vspace{-2pt} \begin{tcolorbox}[colback=grey!5!white,colframe=grey!5!white] \vspace{-10pt} \begin{small} \begin{align*} &\textsf{weight}\left(\bar{\pi}^N,\left[\frac{l-1}{1.1(n-1)},\frac{l-1}{n-1}\right]\right)\geq \frac{1-\delta}{1-\frac{1}{N}+\frac{l-1}{n-1} + \gamma} \cdot\textsf{weight}\left(\pi,\left[\frac{\frac{l-1}{1.1(n-1)}}{1-\frac{1}{N}+\frac{l-1}{1.1(n-1)}-\gamma},\frac{\frac{l-1}{n-1}}{1-\frac{1}{N}+\frac{l-1}{n-1}+\gamma}\right]\right) \end{align*} \end{small} \vspace{-18pt} \end{tcolorbox} \vspace{-2pt} Let $\gamma = \frac{1}{2}$, for sufficiently large $n (\gg l),N$, \[ 1-\frac{1}{N}+\frac{l-1}{1.1 (n-1)}-\gamma \leq \frac{2}{3} \] Similarly \[ 1-\frac{1}{N}+\frac{l-1}{1.1(n-1)}+\gamma \geq \frac{4}{3} \] Similarly we show that $\delta \leq 2 e^{-1/10\pi_{max}}$, and when $\pi_{max} \leq \frac{1}{20}$ we have $\delta \leq 2 e^{-2} \leq 0.3$. Therefore \begin{align} \frac{1-\delta}{1-\frac{1}{N}+\frac{l-1}{n-1} + \gamma} \geq \frac{0.7}{7/4} = 0.4. \end{align} To summarize \begin{align*} &\textsf{weight}\left(\bar{\pi}^N,\left[\frac{l-1}{1.1(n-1)},\frac{l-1}{n-1}\right]\right) \geq \textsf{weight}\left(\pi,\left[0.7 \cdot \frac{l-1}{n-1}, \frac{4}{3}\frac{l-1}{n-1}\right]\right) \end{align*} Putting this above bound back to Eqn. (\ref{eqn:tau:2}) we complete the proof. \end{proof} \section*{Proof for Theorem \ref{thm:noisy}} \begin{proof} This is simply because when $h$ memorizes the noisy labels for $x$ such that $\mathbb{P}_{h \sim \mathcal{A}(S')}[h(x) = k] = \tilde{\mathbb{P}}[\tilde{y}=k|x]$, we will have: \begin{align*} &\mathsf{err}^{+}_l(\mathcal{P},\mathcal{A}, x|S)\\ =&\tau_l \cdot \mathbb{P}_{h \sim \mathcal{A}(S')}[h(x) \neq y] \\ =&\tau_l \cdot \sum_{k \neq y}\tilde{\mathbb{P}}[\tilde{y}=k|x]. \end{align*} Plugging the lower bound we prepared for $\tau_l$ earlier (Theorem \ref{thm:main:tau}) we proved the claim. \end{proof} \section*{Proof for Lemma \ref{lemma:smy}} \begin{proof} Using the definition of $\mathbf{y}_{\text{LC}}$, and using the knowledge of Eqn. (\ref{eqn:T:inverse}) we know that \begin{align*} &\mathbf{y}_{\text{LC}}[1] = \frac{1}{1-e_+(x)-e_-(x)}\left((1-e_+(x)) \tilde{\mathbb{P}}[\tilde{y}=-1|x] - e_+(x) \tilde{\mathbb{P}}[\tilde{y}=+1|x] \right)\\ &\mathbf{y}_{\text{LC}}[2] = \frac{1}{1-e_+(x)-e_-(x)}\left((1-e_-(x)) \tilde{\mathbb{P}}[\tilde{y}=+1|x] - e_-(x) \tilde{\mathbb{P}}[\tilde{y}=-1|x] \right)\\ \end{align*} Therefore \begin{align*} \mathbf{y}_{\text{LC}}[1]+\mathbf{y}_{\text{LC}}[2] = \frac{1}{1-e_+(x)-e_-(x)}\left((1-e_+(x)-e_-(x))\cdot \tilde{\mathbb{P}}[\tilde{y}=-1|x]+(1-e_+(x)-e_-(x))\cdot \tilde{\mathbb{P}}[\tilde{y}=+1|x] \right) = 1. \end{align*} \end{proof} \section*{Proof for Theorem \ref{thm:losscorrection}} \begin{proof} Due to symmetricity, we consider $y=+1$. Using the definition of $\mathbf{y}_{\text{LC}}$, and using the knowledge of Eqn. (\ref{eqn:T:inverse}) we know that \begin{align*} \mathbb{P}[y_{\text{LC}} = +1|x] = \frac{(1-e_-(x)) \cdot \tilde{\mathbb{P}}[\tilde{y}=+1|x]-e_+(x)\cdot \tilde{\mathbb{P}}[\tilde{y}=-1|x]}{1-e_+(x)-e_-(x)} \end{align*} Recall we denote by $y_{\text{LC}}$ the random variable drawn according to $\mathbf{y}_{\text{LC}}$. Next we show: \begin{align} \tilde{\mathbb{P}}[\tilde{y}=+1|x] > \tilde{\mathbb{P}}[\tilde{y}=-1|x] \Leftrightarrow \mathbb{P}[y_{\text{LC}} = +1|x] > \tilde{\mathbb{P}}[\tilde{y}=+1|x]. \label{eqn:equiv} \end{align} This is equivalent to the following comparison (when $e_+(x)+e_-(x) < 1$): \begin{align*} &\text{RHS of Eqn. (\ref{eqn:equiv})}\\ \Leftrightarrow ~ &\frac{(1-e_-(x)) \cdot \tilde{\mathbb{P}}[\tilde{y}=+1|x]-e_+(x) \cdot \tilde{\mathbb{P}}[\tilde{y}=-1|x]}{1-e_+(x)-e_-(x)} > \tilde{\mathbb{P}}[\tilde{y}=+1|x]\\ \Leftrightarrow~ & (1-e_-(x))\cdot \tilde{\mathbb{P}}[\tilde{y}=+1|x]-e_+(x) \cdot \tilde{\mathbb{P}}[\tilde{y}=-1|x] > (1-e_+(x)-e_-(x)) \cdot \tilde{\mathbb{P}}[\tilde{y}=+1|x]\\ \Leftrightarrow ~& e_+(x) \cdot \tilde{\mathbb{P}}[\tilde{y}=+1|x] >e_+\cdot\tilde{\mathbb{P}}[\tilde{y}=-1|x]\\ \Leftrightarrow ~& \tilde{\mathbb{P}}[\tilde{y}=+1|x] > \tilde{\mathbb{P}}[\tilde{y}=-1|x]\\ \Leftrightarrow ~&\text{LHS of Eqn. (\ref{eqn:equiv})} \end{align*} Note that because we consider a non-trivial case $\tilde{\mathbb{P}}[\tilde{y} \neq y|x] > 0 $, we have $\tilde{\mathbb{P}}[\tilde{y}=+1|x] < 1$. Therefore the above derivation holds even if we capped $ \mathbb{P}[y_{\text{LC}} = +1|x]=\frac{(1-e_-(x)) \cdot \tilde{\mathbb{P}}[\tilde{y}=+1|x]-e_+(x) \cdot \tilde{\mathbb{P}}[\tilde{y}=-1|x]}{1-e_+(x)-e_-(x)}$ at 1 to make it a valid probability measure. Now we derive when $\tilde{\mathbb{P}}[\tilde{y}=+1|x] > \tilde{\mathbb{P}}[\tilde{y}=-1|x]$. Recall $\tilde{y}(1),...,\tilde{y}(l)$ denote the $l$ noisy labels for $x \in X_{S=l}$, and let $Z_1,...,Z_l$ denote the $l$ Bernoulli random variable that $Z_k = \mathds{1}(\tilde{y}(k) = +1), k \in [l]$. Then \begin{align*} & \tilde{\mathbb{P}}[\tilde{y}=+1|x] > \tilde{\mathbb{P}}[\tilde{y}=-1|x]\\ \Leftrightarrow ~& \tilde{\mathbb{P}}[\tilde{y}=+1|x] > 1/2\\ \Leftrightarrow ~& \frac{\sum_{k \in [l]}Z_k}{l} > 1/2. \end{align*} Now we derive $\mathbb{P}\left[\frac{\sum_{k \in [l]}Z_k}{l} > 1/2\right] $. Note $\mathbb{E}\left[\frac{\sum_{k \in [l]}Z_k}{l}\right] = 1-e_+(x)$. By applying Hoeffding inequality we prove that \[ \mathbb{P}\left[\frac{\sum_{k \in [l]}Z_k}{l} \leq 1/2\right] \leq e^{-2l \left(1/2-e_+(x)\right)^2}. \] Therefore \[ \mathbb{P}\left[\frac{\sum_{k \in [l]}Z_k}{l} > 1/2\right]\geq 1-e^{-2l \left(1/2-e_+(x)\right)^2}. \] The case with $y=-1$ is entirely symmetric so we omit the details. \end{proof} \section*{Proof for Corollary \ref{cor:losscorrection}} \begin{proof} Because $ \mathsf{err}^{+}_l(\mathcal{P},\mathcal{A}, x|S):= \tau_l \cdot \mathbb{P}_{h \sim \mathcal{A}(S')}[h(x) \neq y $, as well as w.p. at least $1-e^{-2l (1/2-e_{sgn(y)}(x))^2}$, memorizing $\mathbf{y}_{\text{LC}}$ returns lower error $\mathbb{P}[h(x) \neq y]$ than memorizing the noisy labels s.t. $\mathbb{P}[h(x) = k] = \tilde{\mathbb{P}}[\tilde{y}=k|x]$, the corollary is then true via the lower bound for $\tau_l$. \end{proof} \section*{Proof for Theorem \ref{thm:losscorrection:lower}} \begin{proof} Again due to symmetricity, we consider $y=+1$. Similar as argued in the proof of Theorem \ref{thm:losscorrection}, from Eqn. (\ref{eqn:equiv}) we know that when $\tilde{\mathbb{P}}[\tilde{y}=+1|x] < \tilde{\mathbb{P}}[\tilde{y}=-1|x]$, we have $ \mathbb{P}[ y_{\text{LC}}= +1|x] < \tilde{\mathbb{P}}[\tilde{y}=+1|x]$, that is memorizing $\mathbf{y}_{\text{LC}}$ is worse than memorizing $\mathbf{\tilde{y}}$. Again because we consider a non-trivial case $\tilde{\mathbb{P}}[\tilde{y} \neq y|x] < 1$, we have $\tilde{\mathbb{P}}[\tilde{y}=+1|x] > 0$. Therefore the above derivation holds even if we capped $ \mathbb{P}[y_{\text{LC}} = +1|x]=\frac{(1-e_-(x)) \cdot \tilde{\mathbb{P}}[\tilde{y}=+1|x]-e_+(x) \cdot \tilde{\mathbb{P}}[\tilde{y}=-1|x]}{1-e_+(x)-e_-(x)}$ at 0 to make it a valid probability measure. Similarly define $Z_k$ for $k \in [l]$ as in Proof for Theorem \ref{thm:losscorrection}: the $l$ Bernoulli random variable that $Z_k = \mathds{1}(\tilde{y}(k) = +1), k \in [l]$. Then \[ \mathbb{P}[y_{\text{LC}}= +1|x] < \tilde{\mathbb{P}}[\tilde{y}=+1|x] \Leftrightarrow \tilde{\mathbb{P}}[\tilde{y}=+1|x] < \tilde{\mathbb{P}}[\tilde{y}=-1|x] \Leftrightarrow \frac{\sum_{k \in [l]}Z_k}{l} < 1/2 \] We bound $\mathbb{P}\left[\frac{\sum_{k \in [l]}Z_k}{l} < 1/2\right]$: \begin{align*} &\mathbb{P}\left[\frac{\sum_{k \in [l]}Z_k}{l} < 1/2\right]\\ =&\mathbb{P}\left[\sum_{k \in [l]}1-Z_k \geq l/2\right]\\ =&\mathbb{P}[\text{Bin}(l,e_+(x)) \geq l/2], \end{align*} where we use $\text{Bin}$ to denote a Binomial random variable, and the fact that $\mathbb{E}\left[\frac{\sum_{k \in [l]}(1-Z_k)}{l}\right] = e_+(x)$. Using tail bound for Bin (e.g., Lemma 4.7.2 of \cite{ash1990}) yields: \begin{align*} \mathbb{P}[\text{Bin}(l,e_+(x)) \geq l/2] \geq& \frac{1}{\sqrt{8 \cdot \frac{1}{2}l (1-\frac{1}{2})}} \cdot e^{-l \cdot D_{\text{KL}}\left(\frac{1}{2}\| e_+(x)\right)}\\ =& \frac{1}{\sqrt{2l}} \cdot e^{-l \cdot D_{\text{KL}}\left(\frac{1}{2}\| e_+(x)\right)}, \end{align*} completing the proof. The case with $y=-1$ is entirely symmetric so we omit the details. \end{proof} \section*{Proof for Theorem \ref{thm:labelsmoothing}} \begin{proof} Note that label smoothing smooths the noisy labels in the following way: \begin{align} \tilde{\mathbb{P}}[y_{\text{LS}}= +1|x] = (1-a) \cdot \tilde{\mathbb{P}}[\tilde{y}=+1|x] + \frac{a}{2}.~ \end{align} The proof is then simple: when $\mathcal{E}_+$ is true, from the proof of Theorem \ref{thm:losscorrection}, Eqn. (\ref{eqn:equiv}), we know that $\mathbf{y}_{\text{LC}}$ further extremizes/increases the prediction of $+1$ that $\mathbb{P}[y_{\text{LC}}= +1|x]>\tilde{\mathbb{P}}[\tilde{y}=+1|x]$, while label smoothing $y_{\text{LS}}$ reduces from $\tilde{\mathbb{P}}[\tilde{y}=+1|x] $ by a factor of $a \cdot \tilde{\mathbb{P}}[\tilde{y}=+1|x] - \frac{a}{2}>0 $. Therefore, memorizing smoothed label increases the error $\mathbb{P}[h(x) \neq y]$. The above observation is reversed when the opposite event $\bar{\mathcal{E}}_+$ is instead true: in this case, $\mathbf{y}_{\text{LC}}$ further extremizes/increases the prediction of $-1$ that $\mathbb{P}[y_{\text{LC}}= +1|x]<\tilde{\mathbb{P}}[\tilde{y}=+1|x]$, while label smoothing $y_{\text{LS}}$ increases from $\tilde{\mathbb{P}}[\tilde{y}=+1|x] $ by a factor of $\frac{a}{2} - a \cdot \tilde{\mathbb{P}}[\tilde{y}=+1|x] >0 $. \end{proof} \section*{Proof for Lemma \ref{lemma:peerloss}} \begin{proof} Denote by $\ell_{\text{CE}}$ the CE loss, and $\mathcal D_{x},\mathcal D_{\tilde{y}}$ the marginal distribution of $x,\tilde{y}$ explicitly. \begin{equation}\label{Epeer0} \begin{split} &\mathbb{E}_{x \times \tilde{y}}\left[\ell_{\text{PL}}(h(x), \tilde{y})\right] \\ =&\mathbb{E}_{x \times \tilde{y}}\left[\ell_{\text{CE}}(h(x), \tilde{y})\right]-\mathbb{E}_{\mathcal D_{\tilde{y}}}\left[\mathbb{E}_{\mathcal D_{x}}\left[\ell_{\text{CE}}\left(h\left(x\right), \tilde{y}\right)\right]\right]\\ =& \underbrace{-\sum_{x \in X}\sum_{\tilde{y}\in Y} \mathbb{P}(x,\tilde{y})\log{\mathbb{Q}(\tilde{y}|x)}}_{\text{CE term}} +\underbrace{\sum_{x \in X} \sum_{\tilde{y}\in Y} \mathbb{P}(x)\mathbb{P}(\tilde{y})\log{\mathbb{Q}(\tilde{y}|x)}}_{\text{Peer term}}, \end{split} \end{equation} The conditional probability $\mathbb{Q}(\tilde{y}|x)$ is defined as the prediction of the underlying neural network model, while $\mathbb{P}(x)\mathbb{P}(y)$ captures the probabilities of the marginal-product of the training distribution. We call the first sum-integration as {\it CE term} and the second as {\it peer term}. For the CE term, we further have \begin{align*} &-\sum_{x \in X}\sum_{\tilde{y}\in Y} \mathbb{P}(x,\tilde{y})\log{\mathbb{Q}(\tilde{y}|x)} \\ =& -\sum_{x \in X}\sum_{\tilde{y}\in Y} \left[ \mathbb{P}(x,\tilde{y})\log{\mathbb{Q}(\tilde{y}|x)\mathbb{P}(x)} -\mathbb{P}(x,\tilde{y})\log\mathbb{P}(x,\tilde{y}) \right]\\ =& -\sum_{x \in X}\sum_{\tilde{y}\in Y} \mathbb{P}(x,\tilde{y})\log\frac{\mathbb{Q}(x,\tilde{y})}{\mathbb{P}(x,\tilde{y})}\\ =& D_{\text{KL}}(\mathbb{Q}(x,\tilde{y})\|\mathbb{P}(x,\tilde{y})) \end{align*} In the above, we used $\mathbb{Q}(x,\tilde{y}) = \mathbb{Q}(\tilde{y}|x)\mathbb{P}(x)$ as in classification task the model prediction does not affect the feature distribution. Similarly, for the peer term \begin{align*} &\sum_{x \in X} \sum_{\tilde{y}\in Y} \mathbb{P}(x)\mathbb{P}(\tilde{y})\log{\mathbb{Q}(\tilde{y}|x)}\\ =& \sum_{x \in X} \sum_{\tilde{y}\in Y} \biggl[ \mathbb{P}(x)\mathbb{P}(\tilde{y})\log{\mathbb{Q}(\tilde{y}|x)\mathbb{P}(x)} - \mathbb{P}(x)\mathbb{P}(\tilde{y})\log\mathbb{P}(x)\mathbb{P}(\tilde{y})\biggr]\\ =& \sum_{x \in X} \sum_{\tilde{y}\in Y} \mathbb{P}(x)\mathbb{P}(\tilde{y})\log\frac{\mathbb{Q}(x,\tilde{y})}{\mathbb{P}(x)\mathbb{P}(\tilde{y})}\\ =& -D_{\text{KL}}(\mathbb{Q}(x,\tilde{y})\|\mathbb{P}(x)\times\mathbb{P}(\tilde{y})). \end{align*} Combing the above derivations for the CE and peer term we complete the proof. \end{proof} \section*{Proof for Theorem \ref{thm:peerloss}} \begin{proof} Again due to symmetricity, we consider $y=+1$. It was shown in \cite{cheng2020learning} that, when taking expectation over the data distribution, the original definition of peer loss \begin{align} \ell_{\text{PL}}(h(x),\tilde{y}) := \ell(h(x),\tilde{y}) - \ell(h(x_{p_1}),\tilde{y}_{p_2}) \end{align} is equivalent to \begin{align} \ell(h(x), \tilde{y}) - \tilde{\mathbb E}[\ell(h(x),\tilde{y}_{q})], \end{align} where $q$ is a randomly sampled index from $[n]$, and the expectation is over the randomness in $\tilde{y}_{q}$. The high-level intuition is that each $x$ appears in the peer terms exactly once in expectation, so we can fix $x_{p_1}$ be the same $x$. Then we will only vary $p_2$ (index $q$ in our notation). The operation of taking expectation is to reduce uncertainty in the peer term. The average empirical peer loss on $x$ is then given by \begin{align*} &\frac{1}{l}\sum_{i=1}^l \ell_{\text{PL}}(h(x),\tilde{y}(i))\\ = &\frac{1}{l}\sum_{i=1}^l \ell(h(x), \tilde{y}) - \tilde{\mathbb E}[\ell(h(x),\tilde{y}_{q})]\\ =&\tilde{\mathbb E}\left[\ell(h(x), \tilde{y})\right] -\ell(h(x),-1) \cdot \tilde{\mathbb{P}}[\tilde{y}_{q}=-1]\\ &~~~~- \ell(h(x),+1) \cdot \tilde{\mathbb{P}}[\tilde{y}_{q}=+1] \end{align*} where $\tilde{\mathbb E}$ denotes the empirical expectation w.r.t. the empirical distribution of $\tilde{y}|x$, and $\tilde{\mathbb{P}}[\tilde{y}_{q}]$s are the empirical distribution of $\tilde{y}_q$. As shown already, peer loss pushes $h$ to predict one class confidently, therefore there are two cases: $h(x)=+1$ or $h(x)=-1$. When $h(x)=+1$ we have \begin{align*} &\tilde{\mathbb E}\left[\ell(h(x)=+1, \tilde{y})\right] -\ell(h(x),-1) \cdot \tilde{\mathbb{P}}[\tilde{y}_{q}=-1]\\ &~~~~- \ell(h(x),+1) \cdot \tilde{\mathbb{P}}[\tilde{y}_{q}=+1]\\ =&\tilde{\mathbb{P}}[\tilde{y}=+1|x] \cdot \ell(h(x)=+1,+1) +\tilde{\mathbb{P}}[\tilde{y}=-1|x] \cdot \ell(h(x)=+1,-1)\\ &~~~~-\ell(h(x)=+1,-1) \cdot \tilde{\mathbb{P}}[\tilde{y}_{q}=-1]- \ell(h(x)=+1,+1) \cdot \tilde{\mathbb{P}}[\tilde{y}_{q}=+1]\\ &=\left(\tilde{\mathbb{P}}[\tilde{y}=+1|x] - \tilde{\mathbb{P}}[\tilde{y}_{q}=+1]\right) \cdot \left(\ell(h(x)=+1,+1) -\ell(h(x)=+1,-1)\right) \end{align*} While if $h(x)=-1$, we have \begin{align*} &\tilde{\mathbb E}\left[\ell(h(x)=-1, \tilde{y})\right] -\ell(h(x),-1) \cdot \tilde{\mathbb{P}}[\tilde{y}_{q}=-1]\\ &~~~~- \ell(h(x),+1) \cdot \tilde{\mathbb{P}}[\tilde{y}_{q}=+1]\\ =&\tilde{\mathbb{P}}[\tilde{y}=+1|x] \cdot \ell(h(x)=-1,+1) +\tilde{\mathbb{P}}[\tilde{y}=-1|x] \cdot \ell(h(x)=-1,-1)\\ &~~~~-\ell(h(x)=-1,-1) \cdot \tilde{\mathbb{P}}[\tilde{y}_{q}=-1]- \ell(h(x)=-1,+1) \cdot \tilde{\mathbb{P}}[\tilde{y}_{q}=+1]\\ &=\left(\tilde{\mathbb{P}}[\tilde{y}=-1|x] - \tilde{\mathbb{P}}[\tilde{y}_{q}=-1]\right)\left(\ell(h(x)=-1,-1) -\ell(h(x)=-1,+1)\right)\\ &=-\left(\tilde{\mathbb{P}}[\tilde{y}=+1|x] - \tilde{\mathbb{P}}[\tilde{y}_{q}=+1]\right)\left(\ell(h(x)=-1,-1) -\ell(h(x)=-1,+1)\right) \end{align*} For CE, we have $\ell(h(x)=+1,+1) = \ell(h(x)=-1,-1)=0$, and in \citet{cheng2020learning,liu2019peer}, $\ell(h(x)=-1,+1) = \ell(h(x)=+1,-1)$ is set to be a large positive quantity. Let's denote it as $C$. Then $h(x)=+1$ returns a lower loss ($\left(\tilde{\mathbb{P}}[\tilde{y}=+1|x] - \tilde{\mathbb{P}}[\tilde{y}_{q}=+1] \right) \cdot (-C)$, a negative quantity as compared to $-\left(\tilde{\mathbb{P}}[\tilde{y}=+1|x] - \tilde{\mathbb{P}}[\tilde{y}_{q}=+1]\right ) \cdot (-C)$ a positive one) if $\tilde{\mathbb{P}}[\tilde{y}=+1|x] - \mathbb{P}[\tilde{y}_{q}=+1] > 0$. Next we derive the probability of having $\tilde{\mathbb{P}}[\tilde{y}=+1|x] > \tilde{\mathbb{P}}[\tilde{y}_{q}=+1]$. When $n$ is sufficiently large, $\tilde{\mathbb{P}}[\tilde{y}_{q}=+1] \approx p_+ \cdot (1-e_+)+p_- \cdot e_{-} < \mathbb{P}[\tilde{y}=+1|x] = 1-e_+$. Define $Z_l$ as in Proof for Theorem \ref{thm:losscorrection}: the $l$ Bernoulli random variable that $Z_k = \mathds{1}(\tilde{y}(k) = +1), k \in [l]$. Then using Hoeffding bound we prove that \begin{align*} &\mathbb{P}\left[\tilde{\mathbb{P}}[\tilde{y}=+1|x] > p_+ \cdot (1-e_+)+p_- \cdot e_{-}\right]\\ =&1-\mathbb{P}\left[\frac{\sum_{k \in [l]}Z_k}{l} \leq p_+ \cdot (1-e_+)+p_- \cdot e_-\right]\\ \geq & 1-e^{ \frac{-2l}{\left(p_+ \cdot (1-e_+)+p_- \cdot e_- - (1-e_+)\right)^2}}\\ \geq&1-e^{ \frac{-2l}{p^2_{-} \cdot \left(1-e_+-e_-\right)^2}}, \end{align*} completing the proof. Again the case with $y=-1$ is symmetric. \end{proof} \section*{Proof for Corollary \ref{cor:peerloss}} \begin{proof} Because we have shown that w.p. at least $1-e^{ \frac{-2l}{p^2_{sgn(-y)}\cdot \left(1-e_+-e_-\right)^2}}$, training with $\ell_{\text{PL}}$ on $x \in X_{S=l}$ returns $h(x)=y$, results a 0 individual excessive generalization error $\mathsf{err}^{+}_l(\mathcal{P},\mathcal{A}, x|S) = 0$. On the other hand, Theorem \ref{thm:noisy} informs us that $\mathsf{err}^{+}_l(\mathcal{P},\mathcal{A}, x|S)$ is in the following order when memorizing the noisy labels: \begin{align} \Omega\left( \frac{l^2}{n^2} \textsf{weight}\left(\pi,\left[\frac{2}{3}\frac{l-1}{n-1}, \frac{4}{3}\frac{l}{n}\right] \right)\cdot \sum_{k \neq y} \tilde{\mathbb{P}}[\tilde{y}=k|x]\right) \label{eqn:cor2} \end{align} Taking the difference (Eqn.(\ref{eqn:cor2}) $- 0$) we proved the claim. \end{proof} \section*{Proof for Theorem \ref{thm:peerloss:lower}} \begin{proof} Consider $y=+1$. As argued in the proof of Theorem \ref{thm:peerloss}, when $\tilde{\mathbb{P}}[\tilde{y}=+1|x] < \mathbb{P}[\tilde{y}_{q}=+1]$, we have $h(x)=-1$ returns a smaller loss. So the output $h(x)$ predicts $-1$, the wrong label. Now we show when $\tilde{\mathbb{P}}[\tilde{y}=+1|x] < \tilde{\mathbb{P}}[\tilde{y}_{q}=+1]$. Define $Z_l$ as in Proof for Theorem \ref{thm:losscorrection}: the $l$ Bernoulli random variable that $Z_k = \mathds{1}(\tilde{y}(k) = +1), k \in [l]$. Then \begin{align*} &\mathbb{P}\left[\tilde{\mathbb{P}}[\tilde{y}=+1|x] < \tilde{\mathbb{P}}[\tilde{y}_{q}=+1]\right]\\ =&\mathbb{P}\left[\tilde{\mathbb{P}}[\tilde{y}=+1|x] < p_+ (1-e_+)+p_- \cdot e_{-}\right]\\ =&\mathbb{P}\left[\sum_{k \in [l]}1-Z_k \geq l( p_+ \cdot e_+ +p_- \cdot (1-e_-))\right]\\ =& \mathbb{P}\left[\text{Bin}(l,e_+) \geq l\left( p_+ \cdot e_+ +p_- \cdot (1-e_-)\right)\right]. \end{align*} Again using the tail bound for Bin, we prove that \begin{align*} & \mathbb{P}\left[\text{Bin}(l,e_+) \geq l( p_+ \cdot e_+ +p_- \cdot (1-e_-))\right] \\ \geq & \frac{e^{-l \cdot D_{\text{KL}}(\frac{1}{2}\| e_+)}}{\sqrt{8l \left( p_+ \cdot e_+ +p_- \cdot (1-e_-)\right)\cdot \left(p_+ \cdot (1-e_+) +p_- \cdot e_-\right)}}. \end{align*} Note that $\left( p_+ \cdot e_+ +p_- \cdot (1-e_-)\right) + \left(p_+ \cdot (1-e_+) +p_- \cdot e_-\right) = 1$, and each term $\left( p_+ \cdot e_+ +p_- \cdot (1-e_-)\right)$ and $\left(p_+ \cdot (1-e_+) +p_- \cdot e_- \right)$ is positive. Therefore \[ \left( p_+ \cdot e_+ +p_- \cdot (1-e_-)\right) \cdot \left(p_+ \cdot (1-e_+) +p_- \cdot e_-\right) \leq \frac{1}{4}. \] Therefore we conclude that \begin{align*} &\frac{e^{-l \cdot D_{\text{KL}}(\frac{1}{2}\| e_+)}}{\sqrt{8l \left( p_+ \cdot e_+ +p_- \cdot (1-e_-)\right)\cdot \left(p_+ \cdot (1-e_+) +p_- \cdot e_-\right)}} \geq \frac{1}{\sqrt{2l}}e^{-l \cdot D_{\text{KL}}(\frac{1}{2}\| e_+)}, \end{align*} completing the proof. \end{proof} \section{Figures} \section*{More examples for Figure \ref{fig:2d:ce}} In Figure \ref{fig:2d:ce:full}, we provide one additional figure for training with 40\% random label noise for comparison. \begin{figure}[!ht] \centering \includegraphics[width=0.3\textwidth]{figures/bcewithlogits_clean.png \includegraphics[width=0.3\textwidth]{figures/bcewithlogits_random-0_2.png \includegraphics[width=0.3\textwidth]{figures/bcewithlogits_random-0_4.png} \vspace{-0.2in} \caption{A 2D example illustrating the memorization of noisy labels. Left panel: Training with clean labels. Middle panel: Training with random $20\%$ noisy labels. Right panel: Training with random $40\%$ noisy labels.} \label{fig:2d:ce:full} \end{figure} \section*{Details for generating Figure \ref{fig:cifar-memorization}} The training uses ResNet-34 as the backbone with the following setups: mini-batch size (64), optimizer (SGD), initial learning rate (0.1), momentum (0.9), weight decay (0.0005), number of epochs (100) and learning rate decay (0.1 at 50 epochs). Standard data augmentation is applied to each dataset. The generation of instance-dependent label noise follows the steps in \citep{xia2020parts,cheng2020learning}: \begin{itemize} \item Define a noise rate (the global flipping rate) as $\varepsilon$. \item For each instance $x$, sample a $q$ from the truncated normal distribution $\mathbf{N}(\varepsilon, 0.1^{2}, [0, 1])$. \item Sample parameters $W$ from the standard normal distribution. Compute $x \times W$. \item Then the final noise rate is a function of both $q$ and $x \cdot W$. \end{itemize} \section{Discussion} \paragraph{Sample cleaning} Sample cleaning promotes the procedure of identifying possible wrong labels and removing them from training. If the identification is done correctly, the above procedure is effectively pushing $\tilde{\mathbb{P}}(\tilde{y})$ to the direction of the correct label, achieving a better generalization performance. From the other perspective, removing noisy labels helps the $h$ to de-memorize the noisy ones. The ability to identify the wrong labels has been more or less analyzed in the literature, but certainly would enjoy a more thorough and in-depth investigation. We view this as an important theoretical question for the community. Similar to the previous observations, we would like to caution the existence of rare examples with small $l$ - the previously introduced approaches have been shown to have a non-negligible chance of failing in such cases. We imagine this is probably true for sample cleaning, when the majority of a small number of noisy labels are in fact misleading. \paragraph{Understanding the difficulty of labeling } A better understanding of the possibility of handling noisy labels calls for immediate effort for understanding the probability of observing a wrong label for different instances. The salient challenge in doing so is again due to the missing of ground truth supervision information. One promising direction to explore is to leverage inference models \cite{liu2012variational} to infer the hidden difficulty factors in the generation of noisy labels. \paragraph{Hybrid \& decoupled training} Our results also point out a promising direction to treat samples from different regimes differently. While the existing approaches seem to be comfortable with the highly frequent instances (large $l$), the rare instances might deserve different handling. One thing we observed is rare samples suffer from a small $l$ and insufficient label information. While dropping rare samples is clearly hurting the generalization power, a better alternative would be to collecting multiple labels for these instances to boost the classifier's confidence in evaluating these instances. \paragraph{Dataset effort} Last but not least, a concrete understanding of the effects of instance-dependent label noise would require a high-quality dataset that contains real human-level noise patterns. While there have been some recent efforts \cite{xiao2015learning,jiang2020beyond}, most of the evaluations and studies stay with the synthetic ones. \subsection{Generalization error} Denote by $\bar{\pi}^N$ the resulting marginal distribution over $x$: $\bar{\pi}^N(\alpha):=\mathbb{P}[D(x)=\alpha]$. $\bar{\pi}^N$ controls the true frequency of generating instances. Define the following quantity: \begin{align} \tau_l := \frac{\mathbb{E}_{\alpha \sim \bar{\pi}^N}[\alpha^{l+1}\cdot (1-\alpha)^{n-l}]}{\mathbb{E}_{\alpha \sim \bar{\pi}^N}[\alpha^{l}\cdot (1-\alpha)^{n-l}]}. \end{align} Intuitively, $\tau_l$ quantifies the ``importance weight" of the $l$-appearance instances. Theorem~2.3 of \citet{feldman2020does} provides the following generalization error of an algorithm $\mathcal{A}$: \begin{theorem} [Theorem 2.3, \cite{feldman2020does}] For every learning algorithm $\mathcal{A}$ and every dataset $S \in (X \times Y)^n$: \begin{align} &\mathsf{err}(\pi,\mathcal F, \mathcal{A}|S) \geq opt(\pi,\mathcal F|S)\nonumber \\ &+\sum_{l \in [n]} \tau_l \cdot \sum_{x \in X_{S=l} }\mathbb{P}_{h \sim \mathcal{A}}[h(x) \neq y], \end{align} where in above, $opt(\pi,\mathcal F|S) := \min_{\mathcal{A}} \mathsf{err}(\pi,\mathcal F,\mathcal{A}|S)$ is the minimum achievable generalization error \end{theorem} We will build our results and discussions using this generalization bound. Our discussion will focus on how label noise can disrupt the training of a model through the changes of the following \textbf{Excessive Generalization Error:} \begin{align} \mathsf{err}^{+}(\mathcal{P},\mathcal{A}|S):=&\sum_{l \in [n]} \tau_l \sum_{x \in X_{S=l} }\mathbb{P}_{h \sim \mathcal{A}(S')}[h(x) \neq y], \label{eqn:excesserror} \end{align} Note though the input of the algorithm $\mathcal{A}$ is the noisy dataset $S'$, we are interested in the distribution conditional on the clean dataset $S$ - this is the true distribution that we aim for $h$ to generalize to. On the other hand, the distribution induced by $S'$ will necessarily encode bias to the clean distribution that we are interested in, when some labels are indeed different from the true ones. Even though we do not have access to $S$, the above ``true generalization error'' is well-defined for our analysis, and nicely encodes three quantities that are of primary interests to our study: \squishlist \item $\tau_l$: the ``importance weight" of the $l$-appearance instances. \item $l$: the frequency of instances that categorizes how popular a particular instance $x$ is in the dataset. \item $\sum_{x \in X_{Z=l} }\mathbb{P}_{h \sim \mathcal{A}(S')}[h(x) \neq y]$: the accumulative generalization error $h$ makes for $l$-appearance instances. \end{list} We will also denote by \begin{align} \mathsf{err}^{+}_l(\mathcal{P},\mathcal{A}, x|S):=& \tau_l \cdot \mathbb{P}_{h \sim \mathcal{A}(S')}[h(x) \neq y] \label{eqn:excesserror:ind} \end{align} the \textbf{Individual Excessive Generalization Error} caused by a $x \in X_{S=l}$. Easy to see that $\mathsf{err}^{+}(\mathcal{P},\mathcal{A}|S) = \sum_x \mathsf{err}^{+}_l(\mathcal{P},\mathcal{A}, x|S)$. \subsection{Importance of memorizing an $l$-appearance instance} Clearly Eqn.~(\ref{eqn:excesserror}) informs us that different instance contributes differently to the generalization error. It was proved in \citet{feldman2020does} even a single-appearance instance $x \in X_{S=1}$ (i.e., $l=1$) will contribute to the increase of generalization error at the order of $\Omega(\frac{1}{n})$: when $\pi_{\max }:= \max_{j \in [N]} \pi_j \leq 1/200$, we have \[ \tau_1 \geq \frac{1}{7n}\cdot \textsf{weight}\left(\pi,\left[\frac{1}{2n},\frac{1}{n}\right]\right), \] where $\textsf{weight}\bigl(\pi,\bigl[\beta_1,\beta_2\bigr]\bigr)$ is the expected fraction of distribution $D$ contributed by frequencies in the range $[\beta_1,\beta_2]$: \begin{align*} \textsf{weight}\bigl(\pi,\bigl[\beta_1,\beta_2\bigr]\bigr):= \mathbb{E}\left[\sum_{x \in X}D(x) \cdot \mathds{1}\left(D(x) \in [\beta_1,\beta_2]\right)\right] \end{align*} The expectation is w.r.t. $D(x) \sim \pi$ (and followed by the normalization procedure). We next first generalize the above lower bound to $\tau_l$ for an arbitrary $l$: \begin{theorem} For sufficiently large $n,N$, when $\pi_{max} \leq \frac{1}{20}:$ \begin{align} \tau_l \geq 0.4 \cdot \frac{l (l-1)}{n(n-1)} \cdot \textsf{weight}\left(\pi,\left[\frac{2}{3}\frac{l-1}{n-1}, \frac{4}{3}\frac{l}{n}\right]\right) \end{align} \label{thm:main:tau} \end{theorem} We observe that $\frac{l (l-1)}{n(n-1)} = O(\frac{l^2}{n^2})$. For instance: \squishlist \item An $l = O(n^{2/3})$-appearance instance will lead to an $\Omega(\frac{1}{n^{2/3}})$ order of impact. \item An $l = O(n^{3/4})$-appearance instance will lead to an $\Omega(\frac{1}{\sqrt{n}})$ order of impact. \item An $l = c n$-appearance (linear) instance will lead to an $\Omega(1)$ bound, a constant order of impact. \end{list} Secondly, for the $\textsf{weight}\bigl(\pi,\bigl[\frac{2}{3}\frac{l-1}{n-1}, \frac{4}{3}\frac{l}{n}\bigr]\bigr)$ term, we have the frequency interval at the order of length $ \frac{l}{n} - \frac{l-1}{n-1} = \frac{n-l}{n(n-1)} = O(\frac{1}{n}). $ That is the weight term captures the frequency of an $O(\frac{1}{n})$ interval of the sample distribution. One might notice that there seems to be a disagreement with the reported result in \citet{feldman2020does} when $l$ is small (particularly when $l=1$): when ignoring the $\textsf{weight}$ term $\tau_l$, an $O(\frac{1}{n})$ lower bound was reported, while ours leads to an $ O(\frac{1}{n^2})$ one. This is primarily due to different bounding techniques we incurred. Our above bound suits the study of $l$ that is on a higher order than $O(\frac{1}{n})$. For small $l$, we provide the following bound: \begin{theorem} For sufficiently large $n,N$ and $\pi_{max} \leq \frac{1}{20}:$ \begin{align*} \tau_l \geq 0.4 \frac{l-1}{n-1} \cdot \frac{1}{1.1^l} \cdot \textsf{weight}\left(\pi,\left[0.7 \frac{l-1}{n-1}, \frac{4}{3}\frac{l-1}{n-1}\right]\right) \end{align*} \label{prop:tau} \end{theorem} \vspace{-0.2in} When $l$ is small, based on the above bound, we do see $\tau_l = \Omega(\frac{1}{n})$, while the $\textsf{weight}$ constant again captures an $O(\frac{1}{n})$ interval of instances. Note that this bound becomes less informative as $l$ grows, due to the increasing $1.1^l$ term. Also when $l=1$, our bound becomes vacuous since $l-1=0$. \subsection{Memorizing noisy labels} In order to study the negative effects of memorizing noisy labels, we first define the memorization of noisy labels. For an $x \in X_{S=l}$ and its associated $l$ noisy labels, denote by $\tilde{\mathbb{P}}[\tilde{y}=k|x], k \in Y$ the empirical distribution of the $l$ noisy labels: for instance when $l=3$ and two noisy labels are 1, we have $\tilde{\mathbb{P}}[\tilde{y}=1|x]=\frac{2}{3}$. \begin{definition}[Memorization of noisy labels] We call a model $h$ memorizing noisy labels for instance $x$ if $\mathbb{P}_{h \sim \mathcal{A}(S')}[h(x) = k] = \tilde{\mathbb{P}}[\tilde{y}=k|x]$. \label{def:memnoisy} \end{definition} Note that the probability measure is over the randomness of the algorithm $\mathcal{A}$, as well as the potential randomness in $h$ - practically one can sample a classification outcome based on the posterior prediction of $h(x)$. Effectively the assumption states that when a model, e.g. a deep neural network, memorizes all $l$ noisy labels for instance $x$, its output will follow the same empirical distribution. It has been shown in the literature \cite{cheng2017learning,cheng2020learning} that a fully memorizing neural network will be able to encode $\tilde{\mathbb{P}}[\tilde{y}=k|x]$ for each $x$. This is also what we observe empirically. In Figure \ref{fig:2d:ce}, we simulate a 2D example: there are two classes of instances. The outer annulus represents one class and the inner ball is the other. Given the plotted training data, we train a 2-layer neural network using the cross-entropy (CE) loss. On the left panel, we observe concentrated predictions from the trained model when labels are clean. However, the decision boundary (colored bands with different prediction probabilities) becomes less certain and more probabilistic with the addition of noisy labels, signaling that the neural network is memorizing a mixed distribution of noisy labels. \vspace{-0.2in} \begin{figure}[!ht] \centering \includegraphics[width=0.23\textwidth]{figures/bcewithlogits_clean.png}\hspace{-0.2in} \includegraphics[width=0.23\textwidth]{figures/bcewithlogits_random-0_2.png \vspace{-0.2in} \caption{A 2D example illustrating the memorization of noisy labels. Left panel: Training with clean labels. Right panel: Training with random $20\%$ noisy labels. Example with $40\%$ noisy labels can be found in the Appendix.} \label{fig:2d:ce} \end{figure} \vspace{-0.1in} \begin{figure}[!ht] \centering \includegraphics[width=0.48\textwidth]{figures/demo_ce_5_40_70_t1.pdf} \vspace{-0.2in} \caption{Memorization effects on CIFAR-10 with noisy labels.} \label{fig:cifar-memorization} \end{figure} We further illustrate this in Figure \ref{fig:cifar-memorization} where we train a neural network on the CIFAR-10 dataset with synthesized noisy labels. The top row simulated simple cases with instance-independent noise $T(x) \equiv T$, while the bottom one synthesized an instance-dependent case\footnote{We defer the empirical details to the Appendix.}. In each row, from Left to Right, we show the progressive changes in the distribution of losses\footnote{To better visualize the separation of the instances, we follow \citet{cheng2020learning} to plot the distribution of a normalized loss by subtracting the CE loss with a normalization term $\sum_{k} \mathbb{P}[h(x)=k]/m$, resulting possibly negative losses on $x$-axis. } across different training epochs. Preferably, we would like the training to return two distributions of losses that are less overlapped so the model can better distinguish the clean (colored in {\color{blue}blue}) and corrupted instances (colored in {\color{orange}orange}). However, we do observe that in both cases, the neural network fails to separate the clean instances from the corrupted ones and memorizes a mixture of both. This definition of memorization is certainly a simplification but it succinctly characterizes the situation when there are $l$ similar but non-identical instances, the deep neural network would memorize the noisy label for each of them, which then results in memorizing each realized noisy label class a $\tilde{\mathbb{P}}[\tilde{y}=k|x]$ fraction of times. This definition would also require the instances ($x$'s) to be rather independent, or each $x$'s own label information is the most dominant one, which is likely to be true when $N$ is large enough to separate $X$. Most of our observations would remain true as long as the memorization leads $h$ to predict in the same direction of $\tilde{\mathbb{P}}[\tilde{y}=k|x]$. In particular, when $h$ does not fully remember the empirical label distribution, we conjecture that our main results hold if the memorization preserves orders: for any two classes $k,k'$, if $\tilde{\mathbb P}[\tilde{y}=k|x]>\tilde{\mathbb P}[\tilde{y}=k'|x]$, we require $h$ to satisfy $\mathbb P_{h \sim \mathcal A(S')}[h(x)=k]>\mathbb P_{h \sim \mathcal A(S')}[h(x)=k']$. This simplification in Definition \ref{def:memnoisy} greatly enables a clear presentation of our later analysis. \subsection{Impacts of memorizing noisy labels} Based on Theorem \ref{thm:main:tau}, we summarize our first observation that over-memorizing noisy labels for higher frequency instances leads to a bigger drop in the generalization power: \begin{theorem} For $x \in X_{S=l}$ with true label $y$, $h$ memorizing its $l$ noisy labels leads to the following order of individual excessive generalization error $\mathsf{err}^{+}_l(\mathcal{P},\mathcal{A}, x|S)$: \vspace{-0.1in} \[ \Omega\left( \frac{l^2}{n^2} \cdot \textsf{weight}\left(\pi,\left[\frac{2}{3}\frac{l-1}{n-1}, \frac{4}{3}\frac{l}{n}\right] \right)\cdot \sum_{k \neq y} \tilde{\mathbb{P}}[\tilde{y}=k|x]\right) \] \label{thm:noisy} \end{theorem} \vspace{-0.2in} We would like to note that with large $l$, $\sum_{k \neq y}\tilde{\mathbb{P}}[\tilde{y}=k|x] \rightarrow \sum_{k \neq y}T_{y,k}(x)$ - not surprisingly, the higher probability an instance is observing a corrupted label, the higher generalization error it will incur. The bound informs us that over-memorizing high-frequency instances lead to a larger negative impact on the generalization. However, we shall see later the higher-frequency instances are in fact the easier ones to fix! On the other hand, memorizing the noisy labels for the lower frequency/appearance instances leads to a smaller drop in generalization performance. Nonetheless, they do incur non-negligible changes. For instance, misremembering a single instance with $l=1$ leads to an $O(\frac{1}{n})$ increase in generalization error. Later we show a small $l$ poses additional challenges in correcting the mistakes. \subsection{Loss correction} Arguably one of the most popular approaches for correcting the effects of label noise is through loss correction using the knowledge of $T(x)$ \cite{natarajan2013learning,liu2016classification,Patrini_2017_CVPR}. Let's denote by $\ell: \mathbb{R}^{m} \times Y \rightarrow \mathbb{R}_{+}$ the underlying loss function we adopted for training a deep neural network. Denote by $\ell(h(x),y)$ the loss incurred by $h$ on instance $(x,y)$, and $\Bell(h(x))=[\ell(h(x),y')]_{y' \in Y}$ the column vector form of the loss. We will assume each $T(x)$ is invertible that $T^{-1}(x)$ well exists. Loss correction is done via defining a surrogate loss function $\tilde{\ell}$ as follows: \begin{align} \Bell_{\text{LC}}(h(x))= T^{-1}(x) \cdot \Bell(h(x)).\label{eqn:losscorrection} \end{align} The reason for performing the above correction is due to the following established unbiasedness property: Denote by $\mathbf{\tilde{y}}$ the one-hot encoding column vector form of the noisy label $\tilde{y}$: $\mathbf{\tilde{y}}:=[0;...;\underbrace{1}_{\tilde{y}'s~\text{position}};...;0]$, we have: \begin{lemma}[Unbiasedness of $ \ell_{\text{LC}}$, \cite{natarajan2013learning}] $\mathbb{E}_{\tilde{y}|y}[\mathbf{\tilde{y}}^{\top} \cdot \Bell_{\text{\emph LC}}(h(x))] = \ell(h(x),y)$. \label{lemma:unbias} \end{lemma} The above lemma states that when conditioning on the distribution of $\tilde{y}|y$, $\Bell_{\text{LC}}(h(x)) $ is unbiased in expectation w.r.t. the true loss $\ell(h(x),y)$. In Section \ref{subsec:paradox}, we explain how this unbiasedness is established for the binary classification setting. Based on Lemma \ref{lemma:unbias}, one can perform empirical risk minimization over $\sum_{i=1}^n \mathbf{\tilde{y}}^{\top}_i \cdot\Bell_{\text{LC}}(h(x_i))$, hoping the empirical sum will approximately converge to its expectation which will then equalize to the true empirical loss $\sum_{i=1}^n \ell(h(x_i),y_i)$. Of course, a commonly made assumption/requirement when applying this approach is that $T(x) \equiv T, \forall x$, and $T$ can be estimated accurately enough. There exist empirical and extensive discussions on how to do so \cite{Patrini_2017_CVPR,xia2019anchor,yao2020dual,zhang2021learning,li2021provably}. \subsection{Label smoothing} Label smoothing has demonstrated its benefits in improving learning representation \cite{muller2019does}. A recent paper \cite{lukasik2020does} has also proved the potential of label smoothing in defending training against label noise. Denote by $\bm{1}$ the all-one vector, and a smoothed and soft label is defined as $ \mathbf{y}_{\text{LS}} := (1-a) \cdot \mathbf{\tilde{y}} + \frac{a}{m} \cdot \bm{1}, $ where $a \in [0,1]$ is a smoothing parameter. That is, $\mathbf{y}_{\text{LS}}$ is defined as a linear combination of the noisy label $\tilde{y}$ and an uninformative and uniform label vector $\bm{1}$. Then each instance $x$ will be evaluated using $\mathbf{y}_{\text{LS}}$: $ \mathbf{y}_{\text{LS}}^{\top} \cdot \Bell(h(x)) . $ Though label smoothing has shown promising advantages over loss correction, there are few theoretical understandings of why so, except for its high-level idea of being ``conservative" when handling noisy labels. \subsection{Peer loss} Peer loss \cite{liu2019peer} is a different line of solution that promotes the use of multiple instances simultaneously while evaluating a particular noisy instance $(x,\tilde{y})$. A salient feature of peer loss is that the implementation of it does not require the knowledge of $T(x)$. The definition for peer loss has the following key steps: \squishlist \item For each $(x,\tilde{y})$ we aim to evaluate, randomly drawn two other sample indices $p_1, p_2 \in [n]$. \item Pair $x_{p_1}$ with $\tilde{y}_{p_2}$, define peer loss: \vspace{-0.05in} \begin{align} \ell_{\text{PL}}(h(x),\tilde{y}) := \ell(h(x),\tilde{y}) - \ell(h(x_{p_1}),\tilde{y}_{p_2}).\label{eqn:peerloss} \end{align} \end{list} \vspace{-0.05in} When $T(x) \equiv T$, it was proved in \cite{liu2019peer} that for binary classification with equal label prior, when $\ell$ is the 0-1 loss, minimizing peer loss returns the same minimizer of $\mathbb{E}[\ell(h(x),y)]$ on the clean distribution. \subsection{Memorization paradox}\label{subsec:paradox} Some of the above approaches have established strong theoretical guarantees of recovering the optimal classifier in expectation when using only noisy training labels \cite{natarajan2013learning,liu2019peer,ma2020normalized}. Why would we need a different understanding? First of all, most theoretical results assumed away the outstanding challenges of having an unknown number and distribution of noise rate matrix $T(x)$ (either needed for estimation purpose or for handling them implicitly) and focused on a single transition matrix $T$. Secondly, the existing error analysis often focuses on the distribution level, while we would like to zoom in to each instance that occurs with a different frequency. In addition, we now highlight a paradox introduced by a commonly made assumption that the noisy labels and the model's prediction $t$ are conditionally independent given true label $y$: $ \mathbb{P}[t,\tilde{y}|y] = \mathbb{P}[t|y]\cdot \mathbb{P}[\tilde{y}|y] $, or that $t$ is simply deterministic that it does not encode the information of $\tilde{y}$. This assumption is often needed when evaluating the expected generalization error under noisy distributions. The independence can be justified by modeling $\tilde{y}$ as being conditionally independent of feature $x$, which the prediction $t$ is primarily based on. Let's take loss correction for an example. For a clear demonstration, let's focus on the binary case $y \in \{-1,+1\}$. Consider a particular $x$, define $ e_-(x) := \mathbb{P}[\tilde{y}=+1|y=-1,x],~e_+(x) := \mathbb{P}[\tilde{y}=-1|y=+1,x] $ and $T(x)$: \begin{align} T(x):=\begin{bmatrix} 1-e_-(x) & e_-(x) \\% := \mathbb{P}[\tilde{y}=+1|y=-1]\\ e_+(x) & 1-e_+(x) \end{bmatrix} \label{eqn:T} \end{align} Easy to verify its inverse is: \begin{align} T^{-1}(x) = \frac{1}{1-e_+(x)-e_-(x)} \begin{bmatrix} 1-e_+(x) & -e_-(x)\\ -e_+(x) & 1-e_-(x) \end{bmatrix} \label{eqn:T:inverse} \end{align} For the rest of this section, without confusion, let's shorthand $e_+(x),e_-(x)$ as $e_+,e_-$. Then loss correction (Eqn. (\ref{eqn:losscorrection})) takes the following form: \begin{small} \begin{align*} \ell_{\text{LC}}(h(x),-1)=\frac{(1-e_+)\cdot \ell(h(x),-1)-e_- \cdot \ell(h(x),+1)}{1-e_+-e_-}\\ \ell_{\text{LC}}(h(x),+1)=\frac{(1-e_-)\cdot \ell(h(x),+1)-e_+ \cdot \ell(h(x),-1)}{1-e_+-e_-} \end{align*} \end{small} Consider the case with true label $y=+1$. The following argument establishes the unbiasedness of $\ell_{\text{LC}}$ (reproduced from \citet{natarajan2013learning}, with replacing and instantiating a prediction $t$ with $h(x)$): \vspace{-2pt} \begin{tcolorbox}[colback=grey!5!white,colframe=grey!5!white] \vspace{-10pt} \begin{small} \begin{align*} \hspace{-0.2in} &\mathbb{E}_{\tilde{y}|y=+1}[\ell_{\text{LC}}(h(x),\tilde{y})]\\ &= (1-e_+) \cdot \ell_{\text{LC}}(h(x),+1) + e_+ \cdot \ell_{\text{LC}}(h(x),-1) \\ &=(1-e_+) \frac{(1-e_+)\cdot \ell(h(x),-1)-e_- \cdot \ell(h(x),+1)}{1-e_+-e_-}\\ &+ e_+ \frac{(1-e_-)\cdot \ell(h(x),+1)-e_+\cdot \ell(h(x),-1)}{1-e_+-e_-}\\ &=\ell(h(x),+1) = \ell(h(x),y=+1)~, \end{align*} \end{small} \vspace{-18pt} \end{tcolorbox} \vspace{-2pt} That is the conditional expectation of $\ell_{\text{LC}}(h(x),\tilde{y})$ recovers the true loss $\ell(h(x),y)$. Nonetheless, the first equality assumed the conditional independence between $h$ and $\tilde{y}$, given $y$. When $h$ is output from a deep neural network and memorizes all noisy labels $\tilde{y}$, the above independence condition can be challenged. As a consequence, it is unclear whether the classifiers that fully memorize the noisy labels would result in a lower empirical loss during training. We call the above observation the \emph{memorization paradox}. We conjecture that this paradox leads to inconsistencies in previously observed empirical evidence, especially when training a deep neural network solution that memorizes labels well. In the next section, we will offer new explanations for how the proposed solutions actually fared when the trained neural network is able to memorize the examples.
\section{Introduction} The past decade has witnessed the rapid development of deep learning in many tasks, such as computer vision, autonomous driving, etc. However, the issue of huge computation cost and memory footprint requirements in deep learning has received considerable attention. Some works such as neural architecture search~\citep{zoph2016nas} try to design and search a tiny network, while others, like quantization~\citep{hubara2017qnn}, and network pruning~\citep{han2015deepcompress} are designed to compress and accelerate off-the-shelf well-trained redundant networks. Many popular quantization and network pruning methods follow a simple pipeline: training the original model and then finetune the quantized/pruned model. However, this pipeline requires a full training dataset and many computation resources to perform end-to-end backpropagation, which will greatly delay the production cycle of compressed models. Besides, not all training data are always ready-to-use considering the privacy problem. Therefore, there is more demand in industry for quantizing the neural networks without retraining, which is called Post-training Quantization. Although PTQ is fast and light, it suffers from severe accuracy degeneration when the quantization precision is low. For example, DFQ~\citep{nagel2019dfq} can quantize ResNet-18 to 8-bit without accuracy loss (69.7\% top-1 accuracy) but in 4-bit quantization, it can only achieve 39\% top-1 accuracy. The primary reason is the approximation in the parameter space is not equivalent to the approximation in model space thus we cannot assure the optimal minimization on the final task loss. Recent works like~\citep{nagel2020adaround} recognized the problem and analyzed the loss degradation by Taylor series expansion. Analysis of the second-order error term indicates we can reconstruct each layer output to approximate the task loss degeneration. However, their work cannot further quantize the weights into INT2 because the cross-layer dependency in the Hessian matrix cannot be ignored when the perturbation on weight is not small enough. In this work, we analyze the second-order error based on the Gauss-Newton matrix. We show that the second-order error can be transformed into network final outputs but suffer from bad generalization. To achieve the best tradeoff, we adopt an intermediate choice, block reconstruction. In addition, our contributions are threefold: \begin{enumerate}[nosep, leftmargin=*] \item Based on the second-order analysis, we define a set of reconstruction units and show that block reconstruction is the best choice with the support from theoretical and empirical evidence. We also use Fisher Information Matrix to assign each pre-activation with an importance measure during reconstruction. \item We incorporate genetic algorithm and the well-defined intra-block sensitivity measure to generate latency and size guaranteed mixed precision quantized neural networks, which fulfills a general improvement on both specialized hardware (FPGA) and general hardware (ARM CPU). \item We conduct extensive experiments to verify our proposed methods. We find that our method is applicable to a large variety of tasks and models. Moreover, we show that post-training quantization can quantize weights to INT2 without significant accuracy loss for the first time. \end{enumerate} \section{Preliminaries} \label{sec_pre} \newcommand{\round}[1]{\ensuremath{\lfloor {#1} \rceil}} \newcommand{\ensuremath{\mathsf{T}}}{\ensuremath{\mathsf{T}}} \newcommand{\HessianAct}[1]{\ensuremath{\mathbf{H}^{(\mathbf{z}^{({#1})})}}} \newcommand{\HessianWgt}[1]{\ensuremath{\mathbf{H}^{(\mathbf{w}^{({#1})})}}} \textbf{Notations } Vectors are denoted by small bold letters and matrices (or tensors) are denoted by capital bold letters. For instance, $\textbf{W} \text{ and } \textbf{w}$ represent the weight tensor and its flattened version. Bar accent denotes the expectation over data points, e.g. $\bar{\mathbf{a}}$. Bracketed superscript $\textbf{w}^{(\ell)}$ indicates the layer index. For a convolutional or a fully-connected layer, we mark its input and output vectors by $\textbf{x} \text{ and } \textbf{z}$. Thus given a feedforward neural network with $n$ layers, we can denote the forward process by \begin{equation} \mathbf{x}^{(\ell+1)} = h(\mathbf{z}^{(\ell)})=h(\mathbf{W}^{(\ell)}\mathbf{x}^{(\ell)}+\mathbf{b}^{(\ell)}), \ \ \ 1\le\ell\le n, \end{equation} where $h(\cdot)$ indicates the activation function (ReLU in this paper). For simplicity, we omit the analysis of bias $\mathbf{b}^{(\ell)}$ as it can be merged into activation. $||\cdot||_F$ denotes the Frobenius norm. \textbf{Quantization Background } Uniform symmetric quantization maps the floating-point numbers to several fixed-points. These points (or grids) have the same interval and are symmetrically distributed. We denote the set that contains these grids as $\mathcal{Q}_{b}^{\text{u,sym}}=s \times \{-2^{b-1},\dots, 0,\dots, 2^{b-1}-1 \}$. Here, $s$ is the step size between two grids and $b$ is the bit-width. Quantization function, denoted by $q(\cdot): \mathcal{R}\rightarrow \mathcal{Q}_{b}^{\text{u,sym}}$, is generally designed to minimize the quantization error: \begin{equation} \min ||\hat{\mathbf{w}}-\mathbf{w}||_F^2. \text{ s.t. }\hat{\mathbf{w}}\in\mathcal{Q}_{b}^{\text{u,sym}} \end{equation} Solving this minimization problem, one can easily get the $q(\cdot)$ by leveraging the rounding-to-nearest operation $\round{\cdot}$. Rounding-to-nearest is a prevalent method to perform quantization, e.g. PACT~\citep{choi2018pact}. However, recently some empirical or theoretical evidence supports that simply minimizing the quantization error in parameter space does not bring optimal task performances. Specifically, \cite{Esser2020LEARNED} propose to learn the step size $s$ by gradient descent in quantization-aware training (QAT). LAPQ~\citep{nahshan2019lapq} finds the optimal step size when the loss function is minimized without re-training the weights. Their motivations are all towards minimizing a final objective, which is the task loss, i.e., \begin{equation} \label{eq_min_loss} \min \mathbb{E}[L(\hat{\mathbf{w}})], \text{ s.t. }\hat{\mathbf{w}} \in \mathcal{Q}_{b}^{\text{u,sym}}. \end{equation} While this optimization objective is simple and can be well-optimized in QAT scenarios, it is not easy to learn the quantized weight without end-to-end finetuning as well as sufficient training data and computing resources. In post-training quantization settings, we only have full precision weights that $\mathbf{w}^\star=\argmin_{\mathbf{w}}\mathbb{E}[L(\mathbf{w})]$ where $\mathbf{w}\in\mathcal{R}$ and a small subset of training data to do calibration. \textbf{Taylor Expansion } It turns out that the quantization imposed on weights could be viewed as a special case of weight perturbation. To quantitatively analyze the loss degradation caused by quantization, \cite{nagel2020adaround} use Taylor series expansions and approximates the loss degradation by \begin{equation} \mathbb{E}[L(\mathbf{w}+\Delta\mathbf{w})] - \mathbb{E}[L(\mathbf{w})] \approx \Delta\mathbf{w}^\ensuremath{\mathsf{T}} \bar{\mathbf{g}}^{(\mathbf{w})} + \frac{1}{2}\Delta\mathbf{w}^\ensuremath{\mathsf{T}}\bar{\mathbf{H}}^{(\mathbf{w})}\Delta\mathbf{w}, \end{equation} where $\bar{\mathbf{g}}^{(\mathbf{w})}=\mathbb{E}[\nabla_{\mathbf{w}}L]$ and $\bar{\mathbf{H}}^{(\mathbf{w})}=\mathbb{E}[\nabla^2_{\mathbf{w}}L]$ are the gradients and the Hessian matrix and $\Delta\mathbf{w}$ is the weight perturbation. Given the pre-trained model is converged to a minimum, the gradients can be safely thought to be close to $\mathbf{0}$. However, optimizing with the large-scale full Hessian is memory-infeasible on many devices as the full Hessian requires terabytes of memory space. To tackle this problem, they make two assumptions: \begin{enumerate}[nosep, leftmargin=*] \setlength{\parskip}{0pt} \item Layers are mutual-independent, thus the Hessian is in the form of layer-diagonal\footnote{To prevent ambiguity, we hereby use layer-diagonal Hessian to replace the common name ``block-diagonal Hessian" because the block in this paper means a building block in the CNNs.} and Kronecker-factored, i.e., $\bar{\mathbf{H}}^{(\mathbf{w}^{(\ell)})}=\mathbb{E}[\mathbf{x}^{(\ell)}\mathbf{x}^{(\ell),\ensuremath{\mathsf{T}}}\otimes\ \HessianAct{\ell}]$, where $\otimes$ is the Kronecker product.\label{assumption1 \item The second-order derivatives of pre-activations are constant diagonal matrix $(\mathbf{H}^{(\mathbf{z}^{(\ell)})}=c\times \mathbf{I})$ which is independent of input data points.\label{assumption2} \end{enumerate} At last, the objective is transformed into a practical proxy signal, \textit{the change in feature-maps ($\mathbf{z}=\mathbf{W}\mathbf{x}$)}, and the quantized model can be obtained by a layer-by-layer feature map reconstruction algorithm (with few calibration images). Recent works, like Bit-Split~\citep{wang2020bitsplit} and AdaQuant~\citep{hubara2020adaquant}, also take this layer-wise objective to improve the post-training quantization. However, they failed to quantize weights to INT2. We think the inherent reason is that when $\Delta\mathbf{w}$ grows higher, the former assumptions do not hold and an accurate signal is required. \newcommand{\FracPartial}[2]{\frac{\partial #1}{\partial #2}} \newcommand{\FracTPartial}[2]{\tfrac{\partial #1}{\partial #2}} \newcommand{\ZLayerIndex}[2][]{\mathbf{z}^{(#2)}_{#1}} \newcommand{\XLayerIndex}[2][]{\mathbf{x}^{(#2)}_{#1}} \section{Proposed Method} \label{sec_method} \subsection{Cross-layer Dependency} Denote the neural network output $\mathbf{z}^{(n)}=f(\theta)$, the loss function can be represented by $L(f(\theta))$ where $\theta = \mathrm{vec}[\mathbf{w}^{(1),\ensuremath{\mathsf{T}}},\dots, \mathbf{w}^{(n),\ensuremath{\mathsf{T}}}]^{\ensuremath{\mathsf{T}}}$ is the stacked vector of weights in all $n$ layers. The Hessian matrix can be computed by \begin{equation} \FracPartial{^2L}{\theta_i\partial\theta_j} = \FracPartial{}{\theta_j}\left(\sum_{k=1}^m\FracPartial{L}{\mathbf{z}^{(n)}_k}\FracPartial{\mathbf{z}^{(n)}_k}{\theta_i} \right)= \sum_{k=1}^m\FracPartial{L}{\mathbf{z}^{(n)}_k}\FracPartial{^2\mathbf{z}^{(n)}_k}{\theta_i\partial\theta_j} + \sum_{k,l=1}^m \FracPartial{\mathbf{z}^{(n)}_k}{\theta_i} \FracPartial{^2L}{\mathbf{z}^{(n)}_k\partial\mathbf{z}^{(n)}_l} \FracPartial{\mathbf{z}^{(n)}_l}{\theta_j}, \label{eq_gauss_newton} \end{equation} where $\mathbf{z}^{(n)}\in\mathcal{R}^m$. Since the pretrained full precision model is converged to a local minimum, we can assume the Hessian is positive-semidefinite (PSD). Specifically, the converged model has $\nabla_{\mathbf{z}^{(n)}}L$ close to $\mathbf{0}$ so the first term in \autoref{eq_gauss_newton} is neglected and Hessian becomes the Gauss-Newton (GN) matrix $\mathbf{G}^{(\theta)}$. GN matrix can be written in matrix form~\citep{botev2017} as \begin{equation} \mathbf{H}^{(\theta)}\approx \mathbf{G}^{(\theta)} = \mathbf{J}_{\mathbf{z}^{(n)}}({\theta})^{\ensuremath{\mathsf{T}}}\mathbf{H}^{(\mathbf{z}^{(n)})}\mathbf{J}_{\mathbf{z}^{(n)}}({\theta}), \label{eq_matrix_form} \end{equation} where $\mathbf{J}_{\mathbf{z}^{(n)}}({\theta})$ is the Jacobian matrix of the network output with respect to the network parameters. However, in practice, we cannot explicitly compute and store the Jacobian for each input data point in such a raw form. To reduce the computation and memory budget, we will transform the second-order error into the network output, as shown in the following theorem. \begin{theorem} \label{theorem: transform} Consider an $n$-layer feedforward neural network with ReLU activation function. Assuming all weights are quantized, the second-order error optimization can be transformed by: \begin{equation} \argmin_{{\hat{\theta}}} \Delta\theta^{\ensuremath{\mathsf{T}}} \bar{\mathbf{H}}^{(\theta)} \Delta\theta \approx \argmin_{\hat{\theta}} \mathbb{E}\left[ \Delta\mathbf{z}^{(n),\ensuremath{\mathsf{T}}}\mathbf{H}^{(\mathbf{z}^{(n)})}\Delta\mathbf{z}^{(n)}\right]. \end{equation} \end{theorem} \begin{remark} The same transformation is also applicable for activation quantization. The quadratic loss is defined as $\mathbb{E}[\Delta\gamma^{\ensuremath{\mathsf{T}}} \mathbf{H}^{(\gamma)} \Delta\gamma]$ where $\Delta\gamma= \mathrm{vec}[\Delta\mathbf{x}^{(1),\ensuremath{\mathsf{T}}},\dots, \Delta\mathbf{x}^{(n),\ensuremath{\mathsf{T}}}]^{\ensuremath{\mathsf{T}}}$. \end{remark} We prove the theorem using the quadratic form, details can be found in \aref{append_proof}. Here we provide a sketch of the proof by matrix form. The product of perturbation and Jacobian can be thought as the first-order Taylor approximation of the change in network output $\Delta\mathbf{z}^{(n)}$: \begin{equation} \Delta\mathbf{z}^{(n)} = \hat{\mathbf{z}}^{(n)} - \mathbf{z}^{(n)} \approx \mathbf{J}_{\mathbf{z}^{(n)}}({\theta})\Delta\theta. \label{eq_first_approx} \end{equation} Therefore, combining \autoref{eq_first_approx} and \autoref{eq_matrix_form} we can transform the large-scale second-order error into the change in network outputs characterized by the output Hessian $\mathbf{H}^{(\mathbf{z}^{(n)})}$. The theorem indicates a simple observation, suppose a well-trained teacher model and an initialized student model, we can minimize their discrepancy by reconstructing the network's final output $\mathbf{z}^{(n)}$, which coincides with and generalizes the distillation~\citep{hinton2015distilling, polino2018distillation}. LAPQ~\citep{nahshan2019lapq} also considers the dependency but their optimization does not rely on second-order information. However, we should emphasize that distillation requires the same computation and data resources as in normal training procedure, which is impractical for PTQ with limited data. \begin{figure}[t] \centering \begin{subfigure}[b]{0.56\textwidth} \centering \includegraphics[width=\textwidth]{figs/fig1.pdf} \caption{A typical structure of CNN (taken from \cite{radosavovic2020regnet}). Network is composed of a stem layer (first convolution on input images), a body and a head layer (average pooling with a fully connected layer). A body contains several stages, and a stage contains several blocks. A representative block is the bottleneck block with residual path. } \label{fig1a} \end{subfigure} \hfill \begin{subfigure}[b]{0.42\textwidth} \centering \includegraphics[width=\textwidth]{figs/fig2.pdf} \caption{An example illustration of Hessian (or Fisher) matrix. Blue sub-block means the layer-diagonal and each layer are mutual-independent; orange sub-block consider the dependency inside a building block and green parts measure all dependencies.} \label{fig1b} \end{subfigure} \caption{We define 4 kinds of reconstruction granularity, namely net-wise, stage-wise, block-wise and layer-wise optimization, each of them corresponds an essential component of CNN.} \vspace{-4mm} \end{figure} \subsection{Block Reconstruction} Although the network output reconstruction has an accurate estimation of the second-order error, we find in practice it is worse than the layer-by-layer reconstruction in PTQ. The primary reason for this is optimizing the whole networks over 1024 calibration data samples leads to over-fitting easily. As \cite{jakubovitz2019generalizationerror} explained, the networks can have perfect expressivity when the number of parameters exceeds the number of data samples during training, but lower training error does not ensure lower test error. We find layer-wise reconstruction acts like a regularizer which reduces the generalization error by matching each layer's output distribution. In other words, both layer-wise and network-wise output reconstruction has their own drawbacks. And there should be a better bias-variance trade-off choice to conduct reconstruction at an intermediate granularity. The layer-wise optimization corresponds to layer-diagonal Hessian (\autoref{fig1b} blue parts) and the network-wise optimization corresponds to full Hessian (\autoref{fig1b} green parts). Similarly, we can define an intermediate block-diagonal Hessian. Formally, if layer $k$ to layer $\ell$ (where $1\le k<\ell\le n$) form a block, the weight vector is defined as $\tilde{\theta}=\mathrm{vec}[\mathbf{w}^{(k),\ensuremath{\mathsf{T}}},\dots, \mathbf{w}^{(\ell),\ensuremath{\mathsf{T}}}]^{\ensuremath{\mathsf{T}}}$ and the Hessian can be also transformed by $\Delta\tilde{\theta}^{\ensuremath{\mathsf{T}}}\bar{\mathbf{H}}^{(\tilde{\theta})}\Delta\tilde{\theta}=\mathbb{E}[\Delta\mathbf{z}^{(\ell),\ensuremath{\mathsf{T}}}\mathbf{H}^{(\mathbf{z}^{(\ell)})}\Delta\mathbf{z}^{(\ell)}]$. Such block-diagonal Hessian ignores the inter-block dependency and considers the intra-block dependency but it produces less generalization error. Then we can block-by-block reconstruct the intermediate output. To this end, we define 2 extra kinds of intermediate \textit{reconstruction granularity}: Stage-wise reconstruction and Block-wise reconstruction. These 4 reconstruction granularities are described below: \begin{enumerate}[nosep, leftmargin=*] \setlength{\parskip}{0pt} \item \textbf{Layer-wise Reconstruction: } Assume the Hessian matrix is layer-diagonal and optimize the layer output one-by-one. It does not consider cross-layer dependency and resemble existing methods~\citep{nagel2020adaround,hubara2020adaquant,wang2020bitsplit}. \item \textbf{Block-wise Reconstruction: } A block is the core component in modern CNN, such as the Residual Bottleneck Block as shown in \autoref{fig1a}. This method assumes the Hessian matrix is block-diagonal and block-by-block perform reconstruction, which ignores inter-block dependencies. \item \textbf{Stage-wise Reconstruction: } A stage is where the featuremaps will be downsampled and generate more channels, which is believed to produce higher-level features. Typical CNN in ImageNet dataset contains 4 or 5 different stages. This method simultaneously optimizes all layers within a stage and thus considers more dependencies than the block-wise method. \item \textbf{Network-wise Reconstruction: } Optimize the whole quantized network by reconstructing the output of the final layers. This method resembles distillation but does not result in good performances with few images because of high generalization error. \end{enumerate} The relationship between network, stage, block, and layer is illustrated in \autoref{fig1a}. \textit{We test these 4 kinds of reconstruction granularity and find that block-wise optimization outperforms others}. We think this is because the main off-diagonal loss in the Hessian is concentrated in each block, as \autoref{fig1b} orange part illustrated, while the inter-block loss is small and can be ignored in the optimization. The shortcut connections, which is proposed in \citep{he2016resnet}, may also increase the dependencies within a block. Also, the stage-wise or net-wise optimization suffer from the bad generalization on the validation set and degenerate the final performances. We report the quantitative comparison in \autoref{sec_ablation}. We name our algorithm \textsc{Brecq}, because we choose block as our base reconstruction unit. It is necessary to point out that our analysis does not give the optimal configuration of the reconstruction granularity. The choice of block-wise optimization comes from our experiments and we find this choice has two merits. (1) No hyper-parameters included and (2) applicable for all models and all tasks we tested. \begin{algorithm}[t] \caption{\textsc{Brecq} optimization} \label{alg:1} \KwIn{Pretrained FP model; Calibration dataset, iteration $T$} \For{all $i=1,2,\dots, N$-th block in the FP model} { Collect input data to the block $\mathbf{x}^{(i)}$, the FP output $\mathbf{z}^{(i)}$ and its gradient $\mathbf{g}^{(\mathbf{z}^{(i)})}$ \; \For{all $j=1,2,\dots,T$-iteration} { Get quantized output $\hat{\mathbf{z}}^{(i)}$\ and compute $\Delta\mathbf{z}^{(i)}=\mathbf{z}^{(i)}-\hat{\mathbf{z}}^{(i)}$\; Descend \autoref{eq_obj} and update the rounding of all the weights in this block (\autoref{eq_adaround})\; \If{\textit{Activation Quantization} \text{is triggered}} { Update the activation quantization step size (\autoref{eq_lsq}). } }After optimization, compute the sensitivity for each layer and between layers (2-bit only)\; } \textbf{return} Quantized model, Sensitivities for mixed precision\; \end{algorithm} \subsection{Approximating Pre-activation Hessian} \label{sec_fim} With block-diagonal approximated Hessian matrix, we can measure the cross-layer dependency inside each block and transform any block's second-order error to the output of this block $\mathbb{E}[\Delta\mathbf{z}^{(\ell),\ensuremath{\mathsf{T}}}\mathbf{H}^{(\mathbf{z}^{(\ell)})}\Delta\mathbf{z}^{(\ell)}]$. This objective requires the further computation of the knowledge in the rest of the network, i.e., pre-activation Hessian $\mathbf{H}^{(\mathbf{z}^{(\ell)})}$. One way is to follow~\cite{nagel2020adaround} and assume $\mathbf{H}^{(\mathbf{z}^{(\ell)})}=c\times\mathbf{I}$. Therefore the quadratic loss becomes $||\Delta\mathbf{z}^{(\ell)}||^2$. This method might be easy to implement but lose too much information. We use the diagonal Fisher Information Matrix (FIM) to replace the pre-activation Hessian. Formally, given a probabilistic model $p(x|\theta)$, the FIM is defined as: \begin{equation} \bar{\mathbf{F}}^{(\theta)} = \mathbb{E}\left[\nabla_{\theta}\log p_{\theta}(y|x) \nabla_{\theta}\log p_{\theta}(y|x)^{\ensuremath{\mathsf{T}}} \right] = -\mathbb{E}\left[ \nabla^2_{\theta}\log p_{\theta}(y|x) \right] =-\bar{\mathbf{H}}_{\log p(x|\theta)}^{(\theta)}. \end{equation} The FIM is equal to the negative expected Hessian of the log-likelihood function, therefore, a simple corollary is that the Hessian of task loss will become FIM if the model distribution matches the true data distribution~\citep{lecun2012efficientbackprop}. Although matching true data distribution seems impossible, this is the best we can do since the pretrained model is converged. The diagonal of the pre-activation FIM is equal to the squared gradients of each elements, which is successfully used in Adam~\citep{kingma2014adam} for the second momentum. The optimization objective becomes \begin{equation} \min_{\hat{\mathbf{w}}} \mathbb{E}\left[\Delta\mathbf{z}^{(\ell),\ensuremath{\mathsf{T}}}\mathbf{H}^{(\mathbf{z}^{(\ell)})}\Delta\mathbf{z}^{(\ell)}\right] = \min_{\hat{\mathbf{w}}} \mathbb{E}\left[ \Delta\mathbf{z}^{(\ell),\ensuremath{\mathsf{T}}} \mathrm{diag}\left((\FracPartial{L}{\mathbf{z}^{(\ell)}_1})^2, \dots, (\FracPartial{L}{\mathbf{z}^{(\ell)}_a})^2\right) \Delta\mathbf{z}^{(\ell)}\right]. \label{eq_obj} \end{equation} Compared with the MSE minimization, the above minimization incorporates the squared gradient information. If the output has higher absolute gradients, it will receive more attention when being reconstructed. A similar method for pruning the pre-activation has been proposed in \cite{theis2018fisherprune}. Note that \textsc{Brecq} is compatible with any optimization method, like STE~\citep{hubara2017qnn}. Here we adopt adaptive rounding~\citep{nagel2020adaround} for weights and learned step size~\citep{Esser2020LEARNED} for activation step size because we observe they generally perform better in PTQ, see details in \aref{sec_learning}. We formulate the overall calibration algorithm for a unified precision model in \autoref{alg:1}. We should emphasize that we only need a small subset (1024 in our experiments) of the whole training dataset to calibrate the quantized model. And we can obtain a quantized ResNet-18 within 20 minutes on a single GTX 1080TI GPU. \subsection{Mixed Precision} To further push the limit of post-training quantization, we employ mixed precision techniques, which can be formulated by \begin{equation} \label{Eq12} \min_{\mathbf{c}} L(\hat{\mathbf{w}}, \mathbf{c}) , \ \ \text{s.t. } H(\mathbf{c})\le \delta, \ \ \mathbf{c}\in\{2,4,8\}^n. \end{equation} Here, $\mathbf{c}$ is the bit-width vector with the shape of number of layers. $H(\cdot)$ is a hardware performance measurement function, which is used to ensure the mixed precision model has the same or lower hardware performance (e.g., memory and speed) than a predefined threshold $\delta$. We choose 2, 4, 8-bit for mixed precision because they are most common in practical deployment. Regarding the training loss $L$, we find that nearly all existing literature~\citep{cai2020zeroq, hubara2020adaquant, dong2019hawq} uses layer-wise measurement. They all assume the sensitivity within a layer is independent and can be summed together. Therefore, the mixed precision problem becomes an integer programming problem. However, we argue that the loss measurement should contain two parts: diagonal loss and off-diagonal loss, the first is the same with previous works and measure the sensitivity of each layer independently, while the off-diagonal loss is used to measure the cross-layer sensitivity. Theoretically, we should examine all permutations, which results in $3^n$ possibilities and prohibits the search algorithm. Our first attempt is to reduce the off-diagonal loss into the block-level as we mentioned that the Hessian can be approximated to a block-diagonal matrix. Granted, we still find the search space is large, for example, if a block has four layers, then we have to consider the $3^4=81$ permutations for a single block. Based on our preliminary experiments, we find that 4-bit and 8-bit quantization nearly do not drop the final accuracy. Hence we only take 2-bit permutations into consideration and drastically reduce the search space. We use genetic algorithm~\citep{guo2020single} to search the optimal bitwidth configuration with hardware performance threshold, the algorithm is located in \autoref{alg:2}. Due to space limits, we put related works in \aref{sec_related_work}. Readers can refer to related works for a brief discussion on quantization and second-order analysis. \vspace{-2mm} \section{Experiments} In this section, we report experimental results for the ImageNet classification task and MS COCO object detection task. The detailed implementation of the experiments can be found in the \aref{append_implement}. The rest of this section will contain ablation study on reconstruction granularity, classification and detection results, mixed precision results and comparison with quantization-aware training. In \aref{sec_append_exp}, we conduct more experiments, including the impact of the first and the last layer, the impact of calibration dataset size and data source. \vspace{-2mm} \subsection{Ablation Study} \label{sec_ablation} We test four kinds of reconstruction granularity: Net-wise, Stage-wise, Block-wise, and Layer-wise \begin{wraptable}{r}{6.5cm} \caption{Ablation study.}\label{wrap-tab:1} \vspace{-4mm} \begin{adjustbox}{max width=\linewidth} \begin{tabular}{lcccc}\\\toprule Model & Layer & Block & Stage & Net \\\midrule ResNet-18 & 65.19 & \textbf{66.39} & 66.01 & 54.15 \\ \midrule MobileNetV2 & 52.13 & \textbf{59.67} & 54.23 & 40.76 \\ \bottomrule \end{tabular} \end{adjustbox} \end{wraptable} reconstruction. We conduct ImageNet experiments using MobileNetV2 and ResNet-18 with 2-bit weight quantization for all layers except for the first and the last layer. It can be seen from \autoref{wrap-tab:1} that Block-wise optimization outperforms other methods. This result implies that the generalization error in net-wise and stage-wise optimization outweighs their off-diagonal loss. In ResNet-18, we find the difference is not significant, this can be potentially attributed to that ResNet-18 only has 19 layers in the body and the block size, as well as the stage size, is small, therefore leading to indistinct results. \subsection{ImageNet} We conduct experiments on a variety of modern deep learning architectures, including ResNet~\citep{he2016resnet} with normal convolution, MobileNetV2~\citep{sandler2018mobilenetv2} with depthwise separable convolution and RegNet~\citep{radosavovic2020regnet} with group convolution. Last but not least important, we also investigate the neural architecture searched (NAS) models, MNasNet~\citep{tan2019mnasnet}. In \autoref{tab_imagenet_weight}, we only quantize weights into low-bit integers and keep activations full precision. We compare with strong baselines including Bias Correction, optimal MSE, AdaRound, AdaQuant, and Bit-split. Note that the first and the last layer are kept with 8-bit. While most of the existing methods have good performances in 4-bit quantization, they cannot successfully quantize the model into 2-bit. Our method consistently achieves the lowest accuracy degradation for ResNets (within 5\%) and other compact models. We further quantize activations into 4-bit to make the quantized model run on integer-arithmetic hardware platforms. We find that 4-bit activation quantization can have a huge impact on RegNet and MobileNet. Nonetheless, our methods produce higher performance than other state-of-the-arts. To be noted, \textsc{Brecq} is the first to promote the 2W4A accuracy of PTQ to a usable level while all other existing methods crashed. \begin{table}[t] \footnotesize \caption{Accuracy comparison on \textit{weight-only quantized} post-training models. Activations here are un-quantized and kept full precision. We also conduct variance study for our experiments. Bold values indicates best results. * indicates our implementation based on open-source codes.}\label{tab_imagenet_weight} \centering \begin{adjustbox}{max width=\textwidth} \begin{tabular}{lrrrrrrr} \toprule \textbf{Methods} & \textbf{Bits (W/A)} & \textbf{ResNet-18} & \textbf{ResNet-50} & \textbf{MobileNetV2} & \textbf{RegNet-600MF} & \textbf{RegNet-3.2GF} & \textbf{MnasNet-2.0}\\ \midrule Full Prec. & 32/32 & 71.08 & 77.00 & 72.49 & 73.71 & 78.36 & 76.68\\ \midrule Bias Correction* & 4/32 & 50.43 & 64.64 & 62.82 & 67.09 & 71.73 & 72.31\\ OMSE~\citep{choukroun2019omse} & 4/32 & 67.12 & 74.67 & - & - & - & -\\ AdaRound~\citep{nagel2020adaround} & 4/32 & 68.71 & 75.23 & 69.78 & 71.97* & 77.12* & 74.87*\\ AdaQuant~\citep{hubara2020adaquant} & 4/32 & 68.82 & 75.22 & 44.78 & - & - & -\\ Bit-Split~\citep{wang2020bitsplit} & 4/32 & 69.11 & 75.58 & - & - & - & -\\ \textsc{Brecq}~(Ours) & 4/32 & \textbf{70.70\mypm{0.07}} & \textbf{76.29\mypm{0.04}} & \textbf{71.66\mypm{0.04}} & \textbf{73.02\mypm{0.09}} & \textbf{78.04\mypm{0.04}} & \textbf{76.00\mypm{0.02}} \\ \midrule Bias Correction* & 3/32 & 12.85 & 7.97 & 10.89 & 28.82 & 17.95 & 40.72\\ AdaRound~\citep{nagel2020adaround}* & 3/32 & 68.07 & 73.42 & 64.33 & 67.71 & 72.31 & 69.33\\ AdaQuant~\citep{hubara2020adaquant}* & 3/32 & 58.12 & 67.61 & 12.56 & - & - & - \\ Bit-Split~\citep{wang2020bitsplit} & 3/32 & 66.75 & 73.24 & - & - & - \\ \textsc{Brecq}~(Ours) & 3/32 & \textbf{69.81\mypm{0.05}} & \textbf{75.61\mypm{0.09}} & \textbf{69.50\mypm{0.12}} & \textbf{71.48\mypm{0.07}} & \textbf{77.22\mypm{0.04}} & \textbf{74.58\mypm{0.08}}\\ \midrule Bias Correction* & 2/32 & 0.13 & 0.12 & 0.14 & 0.18 & 0.11 & 0.11\\ AdaRound~\citep{nagel2020adaround}* & 2/32 & 55.96 & 47.95 & 32.54 & 25.66 & 24.70 & 30.60\\ AdaQuant~\citep{hubara2020adaquant}* & 2/32 & 0.30 & 0.49 & 0.11 & - & - & -\\ \textsc{Brecq}~(Ours) & 2/32 & \textbf{66.30\mypm{0.12}} & \textbf{72.40\mypm{0.12}} & \textbf{59.67\mypm{0.13}} & \textbf{65.83\mypm{0.13}} & \textbf{73.88\mypm{0.14}} & \textbf{67.13\mypm{0.13}}\\ \bottomrule \end{tabular} \end{adjustbox} \label{tab:results} \vspace{-2mm} \end{table} \begin{table}[t] \footnotesize \caption{Accuracy comparison on \textit{fully quantized} post-training models. Activations here are quantized to 4-bit. Notations follows the upper table.} \centering \begin{adjustbox}{max width=\textwidth} \begin{tabular}{lrrrrrrr} \toprule \textbf{Methods} & \textbf{Bits (W/A)} & \textbf{ResNet-18} & \textbf{ResNet-50} & \textbf{MobileNetV2} & \textbf{RegNet-600MF} & \textbf{RegNet-3.2GF} & \textbf{MNasNet-2.0} \\ \midrule Full Prec. & 32/32 & 71.08 & 77.00 & 72.49 & 73.71 & 78.36 & 76.68\\ \midrule ACIQ-Mix~\citep{banner2019aciq}& 4/4 & 67.0 & 73.8 & - & - & - & - \\ ZeroQ~\citep{cai2020zeroq}* & 4/4 & 21.71 & 2.94 & 26.24 & 28.54 & 12.24 & 3.89 \\ LAPQ~\citep{nahshan2019lapq} & 4/4 & 60.3 & 70.0 & 49.7 & 57.71* & 55.89* & 65.32*\\ AdaQuant~\citep{hubara2020adaquant} & 4/4 & 67.5 & 73.7 & 34.95* & - & - & - \\ Bit-Split~\citep{wang2020bitsplit} & 4/4 & 67.56 & 73.71 & - & - & - \\ \textsc{Brecq}~(Ours) & 4/4 & \textbf{69.60\mypm{0.04}} & \textbf{75.05\mypm{0.09}} & \textbf{66.57\mypm{0.67}} & \textbf{68.33\mypm{0.28}} & \textbf{74.21\mypm{0.19}} &\textbf{73.56\mypm{0.24}} \\ \midrule ZeroQ~\citep{cai2020zeroq}* & 2/4 & 0.08 & 0.08 & 0.10 & 0.10 & 0.05 & 0.12 \\ LAPQ~\citep{nahshan2019lapq}* & 2/4 & 0.18 & 0.14 & 0.13 & 0.17 & 0.12 & 0.18 \\ AdaQuant~\citep{hubara2020adaquant}* & 2/4 & 0.21 & 0.12 & 0.10 & - & - \\ \textsc{Brecq}~(Ours) & 2/4 & \textbf{64.80\mypm{0.08}} & \textbf{70.29\mypm{0.23}} & \textbf{53.34\mypm{0.15}} & \textbf{59.31\mypm{0.49}} & \textbf{67.15\mypm{0.11}} & \textbf{63.01\mypm{0.35}} \\ \bottomrule \end{tabular} \end{adjustbox} \label{tab:results} \vspace{-2mm} \end{table} \subsection{Comparison with Quantization-aware Training} \begin{table}[h] \footnotesize \caption{Performance as well as training cost comparison with quantization-aware training (QAT).} \label{tab_qat} \centering \begin{adjustbox}{max width=\textwidth} \begin{tabular}{llcrrrrr} \toprule \textbf{Models} & \textbf{Methods} & \textbf{Precision} & \textbf{Accuracy} & \textbf{Model Size} & \textbf{Training Data} & \textbf{GPU hours} \\ \midrule \multirow{6}{6em}{ResNet-18\\FP: 71.08} & \textsc{ZeroQ~\citep{cai2020zeroq})} & 4/4 & 21.20 & 5.81 MB & \textbf{0} & \textbf{0.008} \\ & \textsc{Brecq (Ours)} & 4/4 & \textbf{69.60} & 5.81 MB & \textbf{1024} & \textbf{0.4} \\ & \textsc{Brecq (w/ Distilled Data)} & 4/4 & \textbf{69.32} & 5.81 MB & \textbf{0} & \textbf{0.4} \\ & \textsc{PACT~\citep{choi2018pact}} & 4/4 & 69.2 & 5.81 MB & 1.2 M & 100\\ & \textsc{DSQ~\citep{gong2019dsq}} & 4/4 & 69.56 & 5.81 MB & 1.2 M & 100 \\ & \textsc{LSQ~\citep{Esser2020LEARNED}} & 4/4 & \textbf{71.1} & 5.81 MB & 1.2 M & 100 \\ \midrule \multirow{5}{6em}{MobileNetV2\\FP: 72.49} & \textsc{Brecq (Ours)} & 4/4 & \textbf{66.57} & 2.26 MB & \textbf{1024} & \textbf{0.8} \\ & \textsc{PACT~\citep{choi2018pact}} & 4/4 & 61.40 & 2.26 MB & 1.2 M & 192 \\ & \textsc{DSQ~\citep{gong2019dsq}} & 4/4 & 64.80 & 2.26 MB & 1.2 M & 192\\ & \textsc{Brecq (Ours)} & Mixed/8 & \textbf{70.74} & 1.38 MB & \textbf{1024} & \textbf{3.2} \\ & \textsc{HAQ~\citep{wang2019haq}} & Mixed/8 & \textbf{70.90} & 1.38 MB & 1.2 M & 384 \\ \bottomrule \end{tabular} \end{adjustbox} \label{tab:results} \vspace{-2mm} \end{table} In this section, we compare our algorithm (post-training quantization) with some quantization-aware training methods, including PACT~\citep{choi2018pact}, DSQ~\citep{gong2019dsq}, LSQ~\citep{Esser2020LEARNED}, and a mixed precision technique HAQ~\citep{wang2019haq}. \autoref{tab_qat} shows that although \textsc{Brecq} is a PTQ method with limited available data, it can achieve comparable accuracy results with existing quantization-aware training models. In addition, our method can surpass them in 4-bit MobileNetV2 while using less than one training GPU hours. Our method also has comparable accuracy with HAQ, which is a training-based mixed precision method. Note that our GPU hours include 3 unified precision training (2-, 4-, 8-bit respectively) and further mixed-precision training only needs to check the lookup table. Instead, HAQ would end-to-end search for each hardware performance threshold from scratch. \subsection{MS COCO} To validate the effectiveness of \textsc{Brecq} on other tasks, we conduct object detection on the two-stage Faster-RCNN~\citep{ren2015frcnn} and the one-stage RetinaNet~\citep{lin2017retinanet}. ResNet-18, 50 as well as MobileNetV2 are adopted as backbones for the detection model. Results in \autoref{tab_coco} demonstrate our method nearly does not drop the performance in 4-bit weight quantization and 8-bit activation. In particular, \textsc{Brecq} only decreases \textbf{0.21\%} mAP performance on 4-bit ResNet-18 backboned Faster RCNN. On 4-bit ResNet-50 backboned RetinaNet, our method is outperforms the mixed precision based ZeroQ model by \textbf{3\%} mAP. Even when the weight bit decreases to 2, the model still achieves near-to-original mAP. \begin{table}[t] \footnotesize \caption{Objection detection task (MS COCO) comparison on \textit{fully quantized} post-training models. Activations here are quantized to 8-bit. We report the bounding box mean Average Precision (mAP) metric.} \label{tab_coco} \centering \begin{adjustbox}{max width=\textwidth} \begin{tabular}{llccccccccc} \toprule \multirow{2}{6em}{\textbf{Models}} & \multirow{2}{6em}{\textbf{Backbone}} & \textbf{Full Prec.} & \multicolumn{2}{c}{\textbf{Bias Correction*}} & \multicolumn{2}{c}{\textbf{AdaRound*}} & \textbf{ZeroQ} & \multicolumn{3}{c}{\textbf{\textsc{Brecq}~(Ours)}} \\ \cmidrule(l{2pt}r{2pt}){3-3} \cmidrule(l{2pt}r{2pt}){4-5} \cmidrule(l{2pt}r{2pt}){6-7} \cmidrule(l{2pt}r{2pt}){8-8} \cmidrule(l{2pt}r{2pt}){9-11} & & 32/32 & 8/8 & 4/8 & 4/8 & 2/8 & $4_{\text{MP}}$/8 & 8/8 & 4/8 & 2/8 \\ \midrule \multirow{3}{6em}{Faster RCNN\\\citep{ren2015frcnn}} & ResNet-18 & 34.55 & 34.30 & 0.84 & 33.96 & 23.01 & - & \textbf{34.53} & \textbf{34.34} & \textbf{31.82} \\ & ResNet-50 & 38.55 & 38.25 & 0.25 & 37.58 & 19.63 &- & \textbf{38.54} & \textbf{38.29} & \textbf{34.23} \\ & MobileNetV2& 33.44 & 33.24 & 18.39 & 32.77 & 16.35 &- & \textbf{33.40} & \textbf{33.18} & \textbf{27.54} \\ \midrule \multirow{3}{6em}{RetinaNet\\\citep{lin2017retinanet}}& ResNet-18 & 33.20 & 33.00 & 0.04 & 32.59 & 19.93 &- & \textbf{33.14} & \textbf{33.01} & \textbf{31.42} \\ & ResNet-50 & 36.82 & 36.68 & 0.07 & 36.00 & 19.97 &33.7 & \textbf{36.73} & \textbf{36.65} & \textbf{34.75} \\ & MobileNetV2& 32.63 & \textbf{32.60} & 18.47 & 31.89 & 14.10&- & 32.57 & \textbf{32.31} & \textbf{27.59} \\ \bottomrule \end{tabular} \end{adjustbox} \label{tab:results} \vspace{-2mm} \end{table} \begin{figure}[t] \centering \includegraphics[width=\textwidth]{figs/modelsize.pdf} \caption{Mixed Precision results.} \label{fig2} \vspace{-5mm} \end{figure} \vspace{-2mm} \subsection{Mixed Precision} \vspace{-2mm} In this section, we test \textit{(1) model-size guaranteed mixed precision} and \textit{(2) FPGA latency guaranteed mixed precision}\footnote{We also test mobile CPU latency guaranteed mixed precision, located in \aref{append_mobile_lat}.} to unleash the potential of mixed precision and further push the limit of PTQ. We choose ResNet-18, MobileNetV2, and RegNetX-600MF to validate the efficacy of our algorithm. Note that in this section, we keep activation in 8-bit because we only compare the discrepancy between the unified and mixed precision in weights. We omit 3-bit weight quantization in unified precision because it is usually unfriendly to the hardware. Latency settings can be found in \aref{append_lat}. From \autoref{fig2} we find that (1) mixed precision consistently outperforms unified precision, especially when using extremely low-bit, e.g., up to 10\% accuracy increase with the same latency as the 2-bit model. (2) mixed precision can produce many bit configurations that can adapt to plenty of hardware requirements while unified precision can only have 2 fixed models. \section{Related Works} \label{sec_related_work} \textbf{Quantization } Model quantization can be classified into two categories: Quantization-aware Training (QAT) and Post-training Quantization (PTQ). Rounding floating-point numbers to fixed-points numbers will produce 0 gradients almost everywhere. Therefore, most QAT methods employ the Straight-Through Estimator (STE) for gradients approximation. \cite{gong2019dsq} uses a differentiable tanh function to gradually approach the step function. \cite{choi2018pact, Esser2020LEARNED} introduces parameterized clipping thresholds to learn it by STE. Apart from uniform quantization, some works like \cite{li2019apot} argue that non-uniform quantization has better performance than uniform quantization while keeping its efficiency. Despite the promising results given by QAT methods, they usually need more than 100 GPU hours to get it. In that case, PTQ plays an important role which is what we focus on in this paper. Generally, most deep learning models can be safely quantized to 8-bit without re-training. Data-Free Quantization~\cite{nagel2019dfq} even do layer-wise 8-bit PTQ without any data. However, in 4-bit quantization, most parameter space-based methods cannot obtain good performances. Recently, \cite{nagel2020adaround} propose to do layer-wise calibration and made huge progress in 4-bit quantization. Our work continues its analysis on Taylor expansion and considers the off-diagonal loss. Another perspective of quantification is the precision allocation scheme. Hardware-aware Quantization (HAQ \cite{wang2019haq}) leverages reinforcement learning to search the optimal bitwidth configuration. Hessian-aware Weight Quantization (HAWQ) ~\citep{dong2019hawq} utilizes the second-order information to decide the bitwidth. Mixed precision also appears in PTQ, such as the Pareto frontier method in ZeroQ~\citep{cai2020zeroq} and the Integer Programming method in AdaQuant~\citep{hubara2020adaquant}. \textbf{Second-order Analysis and Optimization } The history of second-order information in perturbation analysis can be traced to the 1990s like Optimal Brain Surgeon~\citep{hassibi1993optimalbrain, dong2017obslayer}. The Hessian matrix is essential for pruning and quantization. As aforementioned, HAWQ uses the largest eigenvalue of Hessian to determine the sensitivity. Hessian matrix is also important for second-order optimization like Newton's method as it consists of the curvature information. However, calculating the real full Hessian is prohibitive on today's deep learning architectures. Therefore, approximations are made to simplify the calculation and make the storage more flexible, e.g., Gauss-Newton optimization with Kronecker-factored recursive approximation~\cite{botev2017}. Hessian-Free optimization~\citep{martens2010HFO} avoids the explicit computation of the Hessian matrix by solving the linear system $g=Hv$. Second-order optimization with FIM is called Natural Gradient Descent~\citep{amari1998ngd}. K-FAC~\citep{martens2015} utilizes the layer-diagonal FIM and the approximation of the expected Kronecker product to compute the curvature information. \section{Conclusion} In this paper, we propose \textsc{Brecq}, a post-training quantization framework by analyzing the second-order error. We show that the reconstruction of quantization at the block granularity arrives at a good balance of cross-layer dependency and first order approximation, especially in 2-bit weight quantization where no prior works succeed to quantize. \textsc{Brecq} is compatible with mixed precision and can reduce the search cost. To our best knowledge, \textsc{Brecq} reaches the highest performance in post-training quantization and is the first to be on a par with quantization-aware training using 4-bit. \nocite{bai2020few} \newpage \section*{Acknowledgment} We thank Markus Nagel and anonymous reviewers for their kind help of this work. This project is primarily supported by NSFC 61876032.
\section{Introduction} \label{sec:intro} Multiple-input multiple-output (MIMO) radar systems have attracted a lot of attentions due to its flexibility in transmitting different waveforms through multiple transmit antennas \cite{li_mimo_2009}. For different application scenarios, the waveforms in a MIMO radar system can be properly designed to achieve a desired target measured by a specific performance criterion, which may not be possible in the classical phased-array radar systems \cite{li_mimo_2007}. Hence, the intriguing property of waveform diversity has provided the MIMO radars many appealing features like higher resolution property and better parameter identifiability property \cite{zhao_joint_2020}. The problem of joint design of transmit waveforms and receive filters is desirable in many application scenarios of the MIMO radar systems. In this paper, we study the joint design problem to maximize the signal-to-interference-plus-noise ratio (SINR) performance metric at the system receiver side subject to some practical transmit waveform constraints \cite{wu_transmit_2018}. The problem is intrinsically non-convex due to the highly non-convex fractional objective and the non-convex waveform constraints. Since no analytical solution to the SINR maximization problem can be attained, many iterative algorithms have been applied to solve it. One of the classical methods is the sequential optimization algorithm which is based on the semidefinite relaxation (SDR) with randomization for rank-1 solution reconstruction \cite{cui_mimo_2014}. Solving an SDR in each iteration has been argued to have high computational complexity\textcolor{black}{{} \cite{Luo2010SemidefiniteRO},} which is not applaudable and amenable to large-scale problems and real-time applications. In order to reduce the complexity, a widely used method is to resort to the majorization-minimization (MM) method \cite{hunter_tutorial_2004}. The MM method converts the original non-convex problem to a series of relatively simpler problems to be solved in each iteration by choosing a proper upper-bound function. The MM-based algorithm has been shown to be efficient for the SINR maximization problem \cite{wu_transmit_2018}. Besides, due to its flexibility in choosing the upper-bound function, the MM-based algorithm is able to handle various practical waveform constraints which are not feasible by SDR method. Recently, the manifold optimization has shown its advantages in dealing these non-convex optimization problems for applications in many fields \cite{hu_brief_2020}. In manifold optimization, amounts of constrained optimization problems in the Euclidean space can be regarded as unconstrained optimization problems on the manifolds \cite{absil_optimization_2008}. Therefore, unconstrained optimization methods (such as the gradient descent and conjugate gradient) can be implemented on the manifold. Similar to other engineering fields, manifold optimization methods have been exploited for problem solving in MIMO radar systems. In \cite{alhujaili_transmit_2019}, a manifold optimization method called Riemannian gradient descent (RGD) has been applied for transmit beampattern synthesis under the unimodular constraint which is modeled as the complex circle manifold (CMM). However, besides unimodular constraint there are several other waveform constraints which have practical applicability with the consideration of hardware configuration. Besides that, there are few literatures studying the joint design of transmit waveforms and receive filters for SINR maximization problem. In this paper, the SINR maximization problem will be studied based on manifold optimization under multiple waveform constraints, where a unified projection operator and a unified retraction operator are defined to help to handle the waveform constraints. Numerical results depict that our algorithm outperforms the state-of-the-art methods in terms of computation efficiency and is able to achieve comparable SINR's. \section{Joint Tx-Rx Design for SINR Maximization} \label{sec:format} A MIMO radar system with $N_{t}$ transmit antennas and $N_{r}$ receive antennas is considered. Each transmit antenna can emit individual waveform and the $n$-th sample emitted from the $N_{t}$ transmitters is $\mathbf{s}(n)=[s_{1}(n),\ldots,s_{N_{t}}(n)]^{T}\in\mathbb{C}^{N_{t}}$ with $n=1,\ldots,N$, where $N$ denotes the total number of transmitted samples. The range-angle position of the target to be tracked is configured as $(r_{0},\theta_{0})$ and usually we set $r_{0}=0$. Additionally, $K$ signal-dependent interferers located at $(r_{k},\theta_{k})$ are also taken into account with the range position $r_{k}\in\{0,\ldots,N\}$ and the spatial angle $\theta_{k}\in\{0,\ldots,L\}\times\frac{2\pi}{L+1}$ for $\theta_{k}\neq\theta_{0}$ with $k=1,\dots,K$ and $L$ denoting the number of discrete azimuth sectors. Therefore, the signals at the receive antennas can be represented by \begin{equation} \setlength{\abovedisplayskip}{2pt}\setlength{\belowdisplayskip}{2pt}\mathbf{x}(n)=\alpha\mathbf{a}_{r}(\theta_{0})\mathbf{a}_{t}(\theta_{0})^{T}\mathbf{s}(n)+\mathbf{d}(n)+\mathbf{v}(n),\label{eq:1} \end{equation} for $n=1,\ldots,N$. In \eqref{eq:1}, $\alpha$ is the complex amplitude of the target with $\mathbb{E}\left[|\alpha|^{2}\right]=\sigma_{0}^{2}$, and $\mathbf{a}_{r}(\theta)\in\mathbb{C}^{N_{r}}$ and $\mathbf{a}_{t}(\theta)\in\mathbb{C}^{N_{t}}$ are the propagation vector and the steering vector, respectively with $\mathbf{a}_{t}(\theta)=\frac{1}{\sqrt{N_{t}}}\left[e^{-j\pi0\sin\theta},\ldots,e^{-j\pi(N_{t}-1)\sin\theta}\right]^{T}$ and $\mathbf{a}_{r}(\theta)=\frac{1}{\sqrt{N_{r}}}\left[e^{-j\pi0\sin\theta},\ldots,e^{-j\pi(N_{r}-1)\sin\theta}\right]^{T}$ if the transmit and receive antennas are both assumed to be uniform linear arrays with half-wavelength separation. The term $\mathbf{d}(n)$ denotes $K$ signal-dependent uncorrelated point-like interferers as $\mathbf{d}(n)=\sum_{k=1}^{K}\alpha_{k}\mathbf{a}_{r}(\theta_{k})\mathbf{a}_{t}(\theta_{k})^{T}\mathbf{s}(n-r_{k})$, where $\alpha_{k}$ denotes a complex amplitude with $\mathbb{E}\left[|\alpha_{k}|^{2}\right]=\sigma_{k}^{2}$. The term $\mathbf{v}(n)\in\mathbb{C}^{N_{t}}$ is a noise term with covariance $\sigma_{v}^{2}\mathbf{I}_{N_{t}}$. Let $\mathbf{x}=[\mathbf{x}(1)^{T},\ldots,\mathbf{x}(N)^{T}]^{T}$, $\mathbf{s}=[\mathbf{s}(1)^{T},\ldots,\mathbf{s}(N)^{T}]^{T}$, and $\mathbf{v}=[\mathbf{v}(1)^{T},\ldots,\mathbf{v}(N)^{T}]^{T}$. We get the following compact form as \begin{equation} \setlength{\abovedisplayskip}{2pt}\setlength{\belowdisplayskip}{2pt}\begin{array}{c} \mathbf{x}=\alpha\mathbf{A}(r_{0},\theta_{0})\mathbf{s}+\sum_{k=1}^{K}\alpha_{k}\mathbf{A}(r_{k},\theta_{k})\mathbf{s}+\mathbf{v},\end{array} \end{equation} where $\mathbf{A}(r_{k},\theta_{k})=\left[\mathbf{I}_{N}\otimes(\mathbf{a}_{r}(\theta_{k})\mathbf{a}_{t}(\theta_{k})^{T})\right]\mathbf{J}_{r_{k}}$ for $k=0,\cdots,K$ is a Hermitian matrix related to position $r_{k}$ and angle $\theta_{k}$ with a shift matrix $\mathbf{J}_{r_{k}}\in\mathbb{R}^{N_{t}N\times N_{t}N}$ given by \[ \setlength{\abovedisplayskip}{2pt}\setlength{\belowdisplayskip}{2pt}{\scriptstyle \left[\mathbf{J}_{r_{k}}\right]_{m,n}}=\begin{cases} 1, & m-n=N_{t}r_{k}\\ 0, & m-n\neq N_{t}r_{k} \end{cases}{\scriptstyle =\left[\mathbf{J}_{-r_{k}}^{T}\right]_{m,n}}. \] For notational simplicity, we denote $\mathbf{A}(r_{k},\theta_{k})=\mathbf{A}_{k}$ hereafter. Let $\mathbf{w}\in\mathbb{C}^{N_{r}N}$ be the response receive filters, the SINR \cite{aubry_knowledge-aided_2013} at the output side can be calculated as \begin{equation} \setlength{\abovedisplayskip}{2pt}\setlength{\belowdisplayskip}{2pt}\text{SINR}=\frac{\sigma_{0}^{2}\left|\mathbf{w}^{H}\mathbf{A}_{0}\mathbf{s}\right|^{2}}{\mathbf{w}^{H}(\sum_{k=1}^{K}\sigma_{k}^{2}\mathbf{A}_{k}\mathbf{s}\mathbf{s}^{H}\mathbf{A}_{k}^{H})\mathbf{w}+\sigma_{v}^{2}\mathbf{w}^{H}\mathbf{w}}. \end{equation} Finally, the joint design of transmit waveforms and receive filters for SINR maximization (TxRx-SINR) problem is given as \begin{equation} \setlength{\abovedisplayskip}{2pt}\setlength{\belowdisplayskip}{2pt}\hspace{-30bp}\begin{aligned} & \underset{\mathbf{s,\;w}}{\text{maximize}} & & \hspace{-7bp}\frac{\left|\mathbf{w}^{H}\mathbf{A}_{0}\mathbf{s}\right|^{2}}{\mathbf{w}^{H}\hspace{-2bp}\sum_{k=1}^{K}\vartheta_{k}\mathbf{A}_{k}\mathbf{s}\mathbf{s}^{H}\mathbf{A}_{k}^{H}\hspace{-1bp}\mathbf{w}\hspace{-3bp}+\hspace{-3bp}\mathbf{w}^{H}\hspace{-1bp}\mathbf{w}}\\ & \text{subject to} & & \hspace{-7bp}\mathbf{s}\in\mathcal{M}, \end{aligned} \hspace{-6bp}\tag{TxRx-SINR}\hspace{-20bp}\label{eq:prob} \end{equation} where $\vartheta_{k}=\sigma_{k}^{2}/\sigma_{v}^{2}>0$, and $\mathcal{M}$ denotes the different considered waveform constraints to be detailed later. \section{ALGORITHMIC FRAMEWORK} \label{sec:pagestyle} \subsection{Optimization over a manifold\label{subsec:RGD}} Consider a constrained optimization problem as follows: \[ \setlength{\abovedisplayskip}{2pt}\setlength{\belowdisplayskip}{2pt}\begin{aligned} & \underset{\mathop{x}}{\text{minimize}} & & f(x) & \text{subject to} & & \mathop{x\in\mathcal{R}},\end{aligned} \] where $\mathcal{R}$ \textit{is }a constraint set\textit{ }\textit{\emph{treated as a}}\textit{ }Riemannian\textit{ }\textit{\emph{manifold embedded}}\textit{ }in an Euclidean space $\mathcal{E}\supseteq\mathcal{R}$ equipping the Riemannian metric \cite{absil_optimization_2008}. By doing this, optimizing $f(x)$ can be viewed as an unconstrained optimization problem in the manifold $\mathcal{M}$ rather than a constrained one with explicit constraint $\mathcal{R}$. Hence, numerous unconstrained optimization algorithms like the gradient descent \textcolor{black}{\cite{lemarechal2012cauchy} }can be utilized to handle these manifold optimization problems. In this paper, the classical unconstrained optimization method gradient descent will be implemented for optimization over the Riemannian manifold, which hence is named as Riemannian gradient descent (RGD) \cite{boumal2020introduction}. Given an initialization $x^{(0)}$, a sequence $\left\{ x^{(i)}\right\} $ is generated by RGD through iteratively taking two steps until convergence. The first step is ``descent with projection'' where the gradient of any smooth extension of the objective function, i.e., $\bar{f}(x)$ with $x\in\mathcal{E}$ is computed as $\nabla\bar{f}(x^{(i)})$, i.e., the standard gradient in the Euclidean space, then the Riemannian (manifold) gradient is obtained by projecting $\nabla\bar{f}(x^{(i)})$ onto the tangent space $T_{x^{(i)}}\mathcal{\mathcal{M}}$ by an orthogonal \textit{\emph{projection at $x^{(i)}$ denoted by}} $\mathsf{Proj}_{x^{(i)}}(\cdot)$, and finally $\bar{x}^{(i)}$ is obtained by a descent step on $T_{x^{(i)}}\mathcal{\mathcal{M}}$ with the direction $\nabla\bar{f}(x^{(i)})$ and a prespecified stepsize $\alpha^{(i)}$. Due to the updated $\bar{x}_{k}$ is on $T_{x^{(i)}}\mathcal{\mathcal{M}}$ rather than the manifold $\mathcal{M}$, a \textit{\emph{``retraction'' at $\bar{x}^{(i)}$ denoted by the }}operator $\mathsf{Retr}(\cdot)$ is applied in the second step to map it back to $\mathcal{M}$. To summarize, the update step of RGD at the $i$-th iteration is \[ \setlength{\abovedisplayskip}{2pt}\setlength{\belowdisplayskip}{2pt}\begin{cases} \bar{x}^{\left(i+1\right)}=x^{(i)}-\alpha^{(i)}\mathsf{Proj}_{x^{(i)}}(\nabla\bar{f}(x^{(i)})) & \text{[descent with projection step]}\\ x^{(i+1)}=\mathsf{Retr}(\bar{x}^{(i+1)}) & \text{[retraction step]}, \end{cases} \] where stepsize $\alpha^{(i)}$ can be chosen to be constant or according to a specific stepsize rule like the Armijo back-tracking line search\textcolor{black}{{} \cite{armijo1966}} for convergence guarantee, and the projection operator $\mathsf{Proj}_{x^{(i)}}(\cdot)$ and the retraction operator $\mathsf{Retr}(\cdot)$ vary from manifolds. \subsection{The projection and retraction in TxRx-SINR\label{subsec:The-proj-and-retr}} In this section, we consider the projection operators and the retraction operators w.r.t. different constraints ${\cal M}$'s encountered in the TxRx-SINR problem \eqref{eq:prob}. Three manifold constraints are considered which are highly non-convex in the Euclidean space, namely the constant modulus (CM) constraint $\mathcal{{\cal M}}_{c}=\{\mathbf{s}\,|\,\left\vert s_{n}\right\vert =\frac{1}{\sqrt{NN_{t}}}\}$\textcolor{black}{{} \cite{he2012waveform}} (including the unimodular constraint, i.e., the CCM with ${\normalcolor \left|s_{n}\right|=1}$), the $\epsilon$-uncertainty constant modulus ($\epsilon$-CM) constraint ${\cal M}_{e}=\{\mathbf{s}\,|\,c_{m}-\epsilon_{1}<\left|s_{n}\right|<c_{m}+\epsilon_{2}\text{ with }0\leq\epsilon_{1}\leq c_{m}\text{ and }0\leq\epsilon_{2}\}$ \cite{zhao_unified_2017}, and the constant modulus and similarity (CM\&S) constraint ${\cal M}_{s}=\{\mathbf{s}\,|\,\left\vert s_{n}\right\vert =\frac{1}{\sqrt{NN_{t}}},\left\Vert \mathbf{s}-\mathbf{s}_{\text{ref}}\right\Vert _{\infty}\leq\epsilon,\text{ with }0\leq\epsilon\leq\frac{2}{\sqrt{NN_{t}}}\}$ \cite{2009Design}. \textbf{Projection step.} The projection operator $\mathsf{Proj}_{\mathbf{s}^{(i)}}(\text{\ensuremath{\cdot}})$ at an iterate $\mathbf{s}^{(i)}\in\mathcal{{\cal M}}$ with $\mathcal{{\cal M}}$ taking ${\cal {\cal M}}_{c}$'s or ${\cal {\cal M}}_{s}$'s is the same and has a closed-form solution. This result is classical in manifold optimization and can be easily proved by first showing the complex scalar case and then extending it to to the vector case \cite{boumal2020introduction}. For any $\mathbf{u}\in\mathbb{C}^{NN_{t}}$, the projection operator for these two constraints is given by \begin{equation} \setlength{\abovedisplayskip}{2pt}\setlength{\belowdisplayskip}{2pt}\mathsf{Proj}_{\mathbf{s}^{\left(i\right)}}^{{\cal {\cal M}}_{c}/{\cal {\cal M}}_{s}}(\mathbf{u})=\mathbf{u}-\mathsf{Re}\left\{ \mathbf{u}^{*}\odot\mathbf{s}^{\left(i\right)}\right\} \odot\mathbf{s}^{\left(i\right)},\label{eq:projection on CCM} \end{equation} where $\odot$ denotes the Hadamard product. The $\epsilon$-CM constraint describes an annulus manifold, the projection operator of which is given by \begin{equation} \setlength{\abovedisplayskip}{2pt}\setlength{\belowdisplayskip}{2pt}\mathsf{Proj}_{\mathbf{s}^{\left(i\right)}}^{\mathcal{{\cal M}}_{e}}(\mathbf{u})=\mathbf{u},\label{eq:projection on epsilon} \end{equation} \textbf{Retraction step.} The retraction operators $\mathsf{Retr}(\cdot)$'s w.r.t. different ${\cal M}$'s can be solved in closed-forms. For a given $\mathbf{u}\in\mathbb{C}^{NN_{t}}$, a unified retraction function can be employed to handle all the manifold constraints, which is given by \begin{equation} \setlength{\abovedisplayskip}{2pt}\setlength{\belowdisplayskip}{2pt}\mathsf{Retr}(\mathbf{u})=\arg\min_{\mathbf{s}\in\mathcal{{\cal M}}}\left\Vert \mathbf{s}-\mathbf{u}\right\Vert _{2},\label{eq:uni-ret} \end{equation} where specifically the solution w.r.t. $\mathcal{M}_{c}$ is given by $\mathsf{Retr}(\mathbf{u})=\mathbf{u}\odot\bigl(\sqrt{NN_{t}}\text{\ensuremath{\left|\mathbf{u}\right|}}\bigr)^{-1}$ with $\left|\cdot\right|$ and $(\cdot)^{-1}$ applied element-wisely, w.r.t. $\mathcal{{\cal M}}_{s}$ is given in \cite{cui_space-time_2017}, and w.r.t. ${\cal M}_{e}$ is given in \cite{zhao_unified_2017}. \section{Solving the TxRx-SINR problem via RGD} Now we are ready to derive the RGD algorithm for problem (\ref{eq:prob}). Noting that problem (\ref{eq:prob}) is invariant to a scaling in $\mathbf{w}$, for a fixed $\mathbf{s}$ it can be transformed to be a convex problem as \begin{equation} \setlength{\abovedisplayskip}{2pt}\setlength{\belowdisplayskip}{2pt}\begin{aligned} & \underset{\mathbf{w}}{\text{minimize}} & & \hspace{-5bp}\begin{array}{c} \mathbf{w}^{H}\left[\sum_{k=1}^{K}\vartheta_{k}\mathbf{A}_{k}\mathbf{s}\mathbf{s}^{H}\mathbf{A}_{k}^{H}+\mathbf{I}\right]\mathbf{w}\end{array}\\ & \text{subject to} & & \mathbf{w}^{H}\mathbf{A}_{0}\mathbf{s}=1, \end{aligned} \tag{Rx Prob.}\label{eq:Rx Prob} \end{equation} to which a closed-form solution for $\mathbf{w}$ is obtained by \textcolor{black}{\cite{boyd2004convex}} \begin{equation} \setlength{\abovedisplayskip}{2pt}\setlength{\belowdisplayskip}{2pt}\hspace{-8bp}\mathbf{w}^{\star}\hspace{-3bp}=\hspace{-3bp}\frac{\left[\sum_{k=1}^{K}\vartheta_{k}\mathbf{A}_{k}\mathbf{s}\mathbf{s}^{H}\mathbf{A}_{k}^{H}+\mathbf{I}\right]^{-1}\hspace{-3bp}\mathbf{A}_{0}\mathbf{s}}{\mathbf{s}^{H}\mathbf{A}_{0}^{H}\hspace{-3bp}\left[\sum_{k=1}^{K}\vartheta_{k}\mathbf{A}_{k}\mathbf{s}\mathbf{s}^{H}\mathbf{A}_{k}^{H}+\mathbf{I}\right]^{-1}\hspace{-3bp}\mathbf{A}_{0}\mathbf{s}}.\hspace{-5bp}\tag{Optim. Rx}\label{eq:15} \end{equation} Substituting \eqref{eq:15} into the original problem \ref{eq:prob}, we get the subproblem for the transmit waveforms as \begin{equation} \setlength{\abovedisplayskip}{2pt}\setlength{\belowdisplayskip}{2pt}\hspace{-19bp}\begin{aligned} & \underset{\mathbf{s}}{\text{minimize}} & & \hspace{-8bp}-\hspace{-2bp}\mathbf{s}^{H}\hspace{-3bp}\mathbf{A}_{0}^{H}\hspace{-3bp}\left[\sum_{k=1}^{K}\vartheta_{k}\mathbf{A}_{k}\mathbf{s}\mathbf{s}^{H}\mathbf{A}_{k}^{H}\hspace{-2bp}+\hspace{-2bp}\mathbf{I}\right]^{-1}\hspace{-8bp}\mathbf{A}_{0}\mathbf{s}\\ & \text{subject to} & & \hspace{-5bp}\mathbf{s}\in\mathcal{M}, \end{aligned} \hspace{-15bp}\tag{Tx Prob.}\label{eq:Tx prob} \end{equation} where the waveform constraints $\mathcal{M}$ can take different forms as discussed in Sec. \ref{subsec:The-proj-and-retr}. To solve the original problem \ref{eq:prob}, it suffices to solve the problem \eqref{eq:Tx prob} for $\mathbf{s}$ and then obtain $\mathbf{w}$ by \eqref{eq:15}. In this paper, we propose to solve \eqref{eq:Tx prob} via the RGD method in Sec. \ref{subsec:RGD}. For convergence concern, the objective of problem (\ref{eq:Tx prob}) will be augmented with a constant term $\gamma\mathbf{s}^{H}\mathbf{s}$ w.l.o.g. ($\gamma$ is a prescribed constant, the choice of which guarantees the monotonicity of ``projection'' step in RGD and is discussed in an online supplementary material\textcolor{blue}{{} }\cite{monotonicity} due to space limitation) to control the monotonicity of the retraction operator $\mathsf{Retr}(\cdot)$. Then we define the ``augmented'' objective function for problem \eqref{eq:Tx prob} as \[ \setlength{\abovedisplayskip}{2pt}\setlength{\belowdisplayskip}{2pt}g(\mathbf{s})=-\mathbf{s}^{H}(\mathbf{A}_{0}^{H}\hspace{-3bp}\left[\sum_{k=1}^{K}\vartheta_{k}\mathbf{A}_{k}\mathbf{s}\mathbf{s}^{H}\mathbf{A}_{k}^{H}+\mathbf{I}\right]^{-1}\hspace{-8bp}\mathbf{A}_{0})\mathbf{s}+\gamma\mathbf{s}^{H}\mathbf{s}. \] The gradient of a smooth extension of the objective function denoted by $\bar{g}(\mathbf{s})$ (extending $g(\mathbf{s})$ to the Euclidean domain) is given by \begin{equation} \hspace{-10bp}\begin{aligned}\nabla\bar{g}(\mathbf{s})= & -2\left(\mathbf{A}_{0}^{H}\left(\sum_{k=1}^{K}\vartheta_{k}\mathbf{A}_{k}\mathbf{s}\mathbf{s}^{H}\mathbf{A}_{k}^{H}+\mathbf{I}\right)^{-1}\mathbf{A}_{0}\mathbf{s}\right)+2\gamma\mathbf{s}-\left(\mathbf{s}^{H}\frac{\partial}{\partial\mathbf{s}}\left(\mathbf{A}_{0}^{H}\left(\sum_{k=1}^{K}\vartheta_{k}\mathbf{A}_{k}\mathbf{s}\mathbf{s}^{H}\mathbf{A}_{k}^{H}+\mathbf{I}\right)^{-1}\mathbf{A}_{0}\right)\right)\mathbf{s}.\\ = & -2\left(\mathbf{A}_{0}^{H}\left(\sum_{k=1}^{K}\vartheta_{k}\mathbf{A}_{k}\mathbf{s}\mathbf{s}^{H}\mathbf{A}_{k}^{H}+\mathbf{I}\right)^{-1}\mathbf{A}_{0}\mathbf{s}\right)+2\gamma\mathbf{s}-\left(\mathbf{1}_{NN_{t}}\otimes\mathbf{s}^{H}\mathbf{A}_{0}^{H}\left(\sum_{k=1}^{K}\vartheta_{k}\mathbf{A}_{k}\mathbf{s}\mathbf{s}^{H}\mathbf{A}_{k}^{H}+\mathbf{I}\right)^{-1}\right)\\ & \qquad\qquad\qquad\qquad\times\sum_{k=1}^{K}\left(\vartheta_{k}\mathbf{I}_{NNt}\otimes\mathbf{A}_{k}\left[\frac{\partial\mathbf{s}\mathbf{s}^{H}}{\partial s_{1}}\:\ldots\:\frac{\partial\mathbf{s}\mathbf{s}^{H}}{\partial s_{NN_{t}}}\right]^{T}\mathbf{A}_{k}^{H}\right)\left(\sum_{k=1}^{K}\vartheta_{k}\mathbf{A}_{k}\mathbf{s}\mathbf{s}^{H}\mathbf{A}_{k}^{H}+\mathbf{I}\right)^{-1}\mathbf{A}_{0}\mathbf{s}, \end{aligned} \label{eq:longlong} \end{equation} where $\otimes$ denotes the Kronecker product and $\frac{\partial\mathbf{s}\mathbf{s}^{H}}{\partial s_{n}}$ ($n=1,\ldots,NN_{t}$) is a matrix calculated by $\frac{\partial\mathbf{s}\mathbf{s}^{H}}{\partial s_{n}}=\left[\mathbf{s},\;\mathbf{0}\;,\ldots,\;\mathbf{0}\right]\mathbf{J}_{r_{k}/N_{t}}+\mathbf{J}_{r_{k}/N_{t}}^{T}\left[\mathbf{s},\;\mathbf{0}\;,\ldots,\;\mathbf{0}\right]^{H}$ with the shift matrix $\mathbf{J}_{r_{k}/N_{t}}\in\mathbb{R}^{N_{t}N\times N_{t}N}$ defined in Sec. \ref{sec:format}. Finally, the proposed RGD algorithm for TxRx-SINR is summarized in Algorithm\textcolor{black}{{} \ref{alg:Solving-TxRx-SINR-problem}}\footnote{A well-chosen stepsize $\alpha^{(i)}$ is to ensure the decrease of the objective function $g\left(\cdot\right)$ in the ``descent with projection'' step of RGD.}. {\footnotesize{}} \begin{algorithm}[t] {\footnotesize{}\caption{Solving TxRx-SINR problem via RGD\label{alg:Solving-TxRx-SINR-problem}} }{\footnotesize\par} {\small{}$\mathbf{Initialize}$: $i=0$, $\mathbf{s}^{(0)}$, $\alpha$, $\beta$, $\tau$, $\sigma$}{\small\par} {\small{}$\mathbf{While}$ not converge $\mathbf{do}$}{\small\par} {\small{}$\,\,$1.$\hspace{1em}$}compute$\nabla\bar{g}(\mathbf{s}^{(i)})$ according to \eqref{eq:longlong} {\small{}$\,\,$2.$\hspace{1em}$}compute$\mathsf{Proj}_{\mathbf{s}_{k}}(\nabla g(\mathbf{s}^{(i)}))$ according to \eqref{eq:projection on CCM} or \eqref{eq:projection on epsilon} {\small{}$\,\,$3-1. }{[}$\textbf{constant stepsize}${]} $\alpha^{(i)}=\alpha$ {\small{}$\,\,$3-2. }{[}$\textbf{Armijo back-tracking line search }$\cite{armijo1966}{]} $\alpha^{(i)}=\tau\beta^{m}$ $\qquad$with $m$ the smallest non-negative integer such that\vspace{-7bp} \[ g(\mathbf{s}^{(i)})-g(\mathbf{s}^{(i)}-\tau\beta^{m}\nabla g(\mathbf{s}^{(i)}))\geq\sigma\tau\beta^{m}\|\mathsf{Proj}_{s^{(i)}}(\nabla g(\mathbf{s}^{(i)}))\|_{2}^{2} \] \vspace{-17bp} {\small{}$\,\,$4. $\hspace{1em}$}$\bar{\mathbf{s}}^{(i+1)}=\mathbf{s}^{(i)}-\alpha^{(i)}\mathsf{Proj}_{s^{(i)}}(\nabla g(\mathbf{s}^{(i)}))$ {\small{}$\,\,$5. $\hspace{1em}$}$\mathbf{s}^{(i+1)}=\mathsf{Retr}(\mathbf{s}^{(i)})$ according to \eqref{eq:uni-ret} {\small{}$\,\,$6. $\hspace{1em}$}$i=i+1$ {\small{}$\mathbf{end}$ $\mathbf{while}$}{\small\par} compute $\mathbf{w}$ according to \eqref{eq:15} \end{algorithm} {\footnotesize\par} \section{Numerical Experiments} \label{sec:typestyle} \begin{figure} \begin{centering} \subfloat[\label{fig:CMC_runtime}CM constraint]{\begin{centering} \textsf{\includegraphics[width=0.4\columnwidth,height=0.34\columnwidth]{origin_runtime_log}} \par\end{centering} }\hspace{5bp}\subfloat[\label{fig:CMC_runtime-1}CM constraint]{\begin{centering} \textsf{\includegraphics[width=0.4\columnwidth,height=0.34\columnwidth]{origin_iteration_log}} \par\end{centering} } \par\end{centering} \begin{centering} \subfloat[\label{fig:Similar-runtime}CM\&S constraint]{\begin{centering} \includegraphics[width=0.4\columnwidth,height=0.34\columnwidth]{SimiCon_runtime_log} \par\end{centering} }\hspace{5bp}\subfloat[\label{fig:Similar-runtime-1}CM\&S constraint]{\begin{centering} \includegraphics[width=0.4\columnwidth,height=0.34\columnwidth]{SimiCon_iteration_log} \par\end{centering} } \par\end{centering} \begin{centering} \subfloat[\label{fig:e_runtime}$\epsilon$-CM constraint]{\begin{centering} \includegraphics[width=0.4\columnwidth,height=0.34\columnwidth]{e_Uncertain_runtime_log} \par\end{centering} }\hspace{5bp}\subfloat[\label{fig:e_runtime-2}$\epsilon$-CM constraint]{\begin{centering} \includegraphics[width=0.4\columnwidth,height=0.34\columnwidth]{e_Uncertain_iteration_log} \par\end{centering} } \par\end{centering} \caption{Convergence rate comparisons.} \end{figure} In this section, we compare the performance of our proposed RGD algorithm with the state-of-the-art methods in the literatures. The simulation is conducted on the MATLAB2019b platform under a PC machine with an Intel i7--10700 CPU and 16GB RAM. For the MIMO radar system settings, the range-angle position of the target to be tracked is configured as $(0,15^{\circ})$, the power of which is $|\alpha_{0}|^{2}=30$dB. Three fixed interferers are located at the range-angle positions $(0,-50^{\circ})$, $(1,-10^{\circ})$, and $(2,40^{\circ})$, respectively. The power of each interferer is $|\alpha_{j}|^{2}=20$dB for $j=1,2,3$. The variance of the noise is $\sigma_{v}^{2}=0$dB. The orthogonal linear frequency modulation (LFM) waveforms are set as the initial and also the reference waveforms in the CM\&S constraint. The space-time LFM waveform matrix is \begin{equation} \setlength{\abovedisplayskip}{1pt}\setlength{\belowdisplayskip}{1pt}\mathbf{S}^{\left(0\right)}(k,n)=\frac{e^{j2\pi k(n-1)/N}e^{j\pi(n-1)^{2}/N}}{\sqrt{NN_{t}}}, \end{equation} where $k=1,\cdots,N_{t}$ and $n=1,\cdots N$, based on which we obtain the initialization iteration $\mathbf{s}^{(0)}=\mathrm{vec}\left(\mathbf{S}^{(0)}\right)$. We first compare the performance of the TxRx-SINR problem with CM constraint between the two proposed algorithms, i.e., the RGD algorithm and the RGD with Armijo rule denoted as RGD-Armijo (for parameters in the Armijo back-tracking rule, we have set $\sigma=1$, $\beta=0.85$, and $\tau=0.4$) with the benchmark methods, namely SDR, MM, and MM with SQUAREM acceleration denoted as MM-SQUAREM under three different waveform constraints. The collocated MIMO radar parameters are chosen as $N_{t}=10,N_{r}=10,$ and $N=8$. In Fig \ref{fig:CMC_runtime} and \ref{fig:CMC_runtime-1}, it can be shown that all methods converge to the same SINR. As expected, SDR is the most time-consuming one within the fewest iterations. RGD-Armijo converges faster than RGD and both of them perform better than MM. MM-SQUAREM is much faster than MM due to the acceleration scheme, but is still slower than RGD-Armijo. Similar convergence results are observed for the TxRx-SINR problem with other constraints, namely the CM\&S constraint (similarity parameter $\epsilon=1/\sqrt{N_{t}N}$), and the $\epsilon$-CM constraint, which are shown in Fig \ref{fig:Similar-runtime}, Fig \ref{fig:Similar-runtime-1}, Fig \ref{fig:e_runtime-2} and Fig \ref{fig:e_runtime}, respectively. To further test the scalability of the proposed algorithms, cases with different ($N$, $N_{r}$, $N_{t}$) are evaluated with comparisons to the benchmark methods under the CM constraint. The runtimes are reported in Table \ref{tab:runtime}. To evaluate the performance of the MIMO ambiguity function shaping via the designed waveforms from our proposed RGD algorithm. We plot the ambiguity function (the expression of ambiguity function is chosen as in \cite{rabaste_signal_2013}) in Fig. \ref{fig:e_runtime-1}, which can capture the inherent resolution properties of the MIMO radar systems \cite{san_antonio_mimo_2007}. In Fig. \ref{fig:e_runtime-1}, it can be observed that the ambiguity function resembles a thumbtack, the maximum value of which is located at $(0,15^{\circ})$ marked by a circle. For the interferers, their locations are marked by rectangles. Values of interferers in the ambiguity function are relatively small. Fig. \ref{fig:e_runtime-1} also provides the angle slice at the range $r=0$ and the range slice at the angle $\theta=15^{\circ}$. It can be observed that there are cliffs at angle $\theta=40^{\circ},-10^{\circ}$, and $-50^{\circ}$ with range $r=2$. \begin{table}[t] \caption{Runtime comparisons under CM constraint. \label{tab:runtime}} \begin{center} \scalebox{1.1}{ \setlength{\tabcolsep}{2.5mm}{ \begin{tabular}{cccccc} \hline \multirow{2}{*}{Algorithm}&\multicolumn{4}{c}{($N_r$, $N_t$, $N$)}&\\ \cline{2-6} & {(4,4,4)}& {(10,10,4)}&{(10,10,8)}& {(15,15,8)}& {(10,10,30)}\\ \hline {RGD-Armijo}& {0.0197sec.}& {0.3729sec. }& {0.7536sec. }& {4.3909sec. }& {74.3386sec. }\\ {MM-SQUAREM}& {0.7969sec. }& {1.2813sec. }& {2.2971sec. }& {29.7969sec. }& {518.7628sec. }\\ {RGD}& {0.7031sec. }& {3.7134sec. }& {10.3421sec. }& {173.4153sec. }& {1026.127sec. }\\ {MM}& {1.875sec. }& {4.0156sec. }& {20.3203sec. }& {207.6719sec. }& {1231.6143sec. }\\ {SDR}&{35.1021sec. }& {31.4375sec. }& {431.7156sec. }& {620.8147sec. }& {2029.9058sec. }\\ \hline \end{tabular}}} \end{center} \end{table} \vspace{10bp} \begin{figure}[t] \begin{centering} \includegraphics[width=0.7\columnwidth]{ambiguity_function} \par\end{centering} \caption{\label{fig:e_runtime-1}Range-angle ambiguity function for CM constraint.} \end{figure} \section{Conclusions} \label{sec:majhead} In this paper, we have considered the SINR maximization problem in MIMO radar subject to multiple practical waveform constraints by jointly designing the transmit waveforms and receive filters. A manifold optimization algorithm called RGD is proposed for problem resolution. Numerical results validate the superiority of the proposed algorithms. It should be mentioned that we note there is an independent work on manifold optimization for the SINR maximization problem available recently \cite{li_riemannian_2020}, which considers a different system setting (the airborne MIMO-STAP radar setting) and only focuses on the CM constraint. Besides that, the RGD algorithm proposed in our paper is leveraging the variable reduction technique in the alternating minimization which is different from the technique used in that paper. \pagebreak{} \label{sec:refs} \bibliographystyle{plain}
\section{Introduction} Evolution by natural selection relies on the presence of variations which are generated and transmitted through mechanisms that are themselves subject to natural selection. This raises the question of the optimality of these mechanisms in relation to the constraints to which populations are subject. {\color{black} This long-standing problem of population genetics~\cite{kimura1960optimum,levins1967theory,haccou1995optimal,sasaki1995evolutionarily,feldman1996population} can also be approached from the perspective of information theory~\cite{shannon1948mathematical} by viewing the mechanisms for generating and transmitting biological variations as information processing schemes~\cite{Rivoire:2011fy}. The simplest case, where the only source of information is an environmental cue that is sensed and processed to adapt an internal state, corresponds to a model proposed by Kelly in the 1950s to demonstrate how Shannon's theory could be generalized to quantify the value of information~\cite{kelly2011new}. His approach has been applied and extended to quantify the value of biological information for populations of reproducing individuals evolving in varying environments~\cite{bergstrom2004shannon,kussell2005phenotypic,Rivoire:2011fy,rivoire2016informations}. When accounting for inherited information, for differences between individuals or for general forms of genotype-to-phenotype maps, the value of biological information cannot be reduced to the entropies originally introduced by Shannon. Instead, differences in long-term growth rates obtained by comparing populations that adopt different information processing schemes provide an appropriate generalization~\cite{Rivoire:2011fy}. This point of view clarifies the diverse modes of adaptation and inheritance that biological organisms exhibit~\cite{lachmann1996inheritance,Rivoire:2014kt,uller2015incomplete,mcnamara2016detection,mayer2016diversity} and leads to multiple analogies with problems and concepts from non-equilibrium statistical physics~\cite{hirono2015jarzynski,kobayashi2015fluctuation,vinkler2016analogy,rivoire2016informations,genthon2020fluctuation}. } {\color{black} With very few exceptions~\cite{salahshour2019phase,miyahara2019many}, this evolutionary perspective on information processing has been limited to models of vertical inheritance, excluding any form of interaction between members of a same generation. In particular, sex, or genetic exchange, which is a major mode of information transmission in the living world~\cite{bell1982masterpiece} has been left aside. The goal of this article is to show how measures of biological information developed for asexual populations can be extended to sexual populations. We present a general formalism and apply it to solve analytically a central model of quantitative genetics, the infinitesimal model~\cite{lynch1998genetics}. We obtain two results. First, we quantify the value of sexual reproduction over asexual reproduction and thus revisit the long-standing question of the conditions under which sexual reproduction may evolve and be maintained. Second, we quantify the value of sexual dimorphism and thus analyze quantitatively a proposal made by Geodakyan according to which the presence of two sexes permits an optimal adaptation to varying environments~\cite{Geodakyan:1965,Geodakyan:2015}.} {\color{black} The first question that we analyze,} the conditions under which sexual reproduction can emerge and be maintained, has been extensively studied, although no definite solution is consensually accepted~\cite{smith1978evolution,bell1982masterpiece,otto2009evolutionary,hartfield2012current}. In particular, the origin of the most significant constraints is highly debated~\cite{kondrashov1993classification}. One class of models takes environmental constraints to be determining. It includes notably the red-queen hypothesis~\cite{hamilton1990sexual}, which invokes rapidly varying selective pressures, and the tangled-bank hypothesis~\cite{ghiselin1976economy}, which invokes spatially heterogeneous resources. Another class of models takes genetic constraints to be determining. It includes notably Muller's ratchet~\cite{muller1964relation} and Kondrachov's hatchet models~\cite{kondrashov1988deleterious}. Our formalism integrates both kinds of constraints and provides a new perspective on previously known results~\cite{Charlesworth:1993fg}. In particular, by focusing on the nature of the constraints rather than on their mechanism or origin, it reconciles some of the alternative scenarios. The second question {\color{black} that we analyze pertains to the two-fold cost of males in dioecious populations, when assuming that males and females are present at the same ratio. Na\"ively, if males were as fecund as females, the population could double its number of offsprings per generation, which, in terms of growth rate, corresponds to an additional factor $\ln 2$. This suggests that monoecious (hermaphroditic) populations should have a systematic evolutionary advantage over dioecious populations. To explain that many species have nevertheless two distinct sexes, additional constraints are usually integrated, including sexual selection, intersexual food competition or reproductive role division~\cite{hedrick1989evolution}. Alternatively, Geodakyan proposed that two distinct sexes permits an optimal processing of inherited information~\cite{Geodakyan:1965,Geodakyan:2015}. His proposal rests on the assumption that females are developmentally more plastic than males: when the environment changes, their fertility is unaffected, irrespectively of their genotype, while males survive only if they have the most adapted genotypes. This strong selection on males is proposed to favor the integration of the environmental change into the genotypes of the next generation while the weak selection on females mitigates the selection load. Whether the value of this information processing scheme can exceed $\ln 2$ and thus compensate for the two-fold cost of males has, to our knowledge, never been investigated. Our formalism allows us to examine not only the adaptive value of this scenario but also its potential to evolve.} \section{Model} \subsection{Modes of reproduction} \begin{figure}[t] \begin{center} \includegraphics[width=\linewidth]{Fig1.pdf} \caption{Life cycle of individuals in a representation borrowed from information theory, where each ``box'' represents a communication channel, i.e., a conditional probability to generate the output given the input(s)~\cite{Rivoire:2011fy}. First is a maturation step, where an individual with genotype $\gamma$ acquires a phenotype $\phi$ through development and is selected by the environment $x_t$ based on this phenotype to either survive ($\sigma=\checkmark$) or die ($\sigma=\times$). Second, surviving individuals can reproduce. In asexual reproduction, an individual with genotype $\gamma_\text{\Neutral}$ produces $\xi$ offsprings with genotype $\gamma'$. In sexual reproduction, a pair of individuals with genotypes $\gamma_\sf,\gamma_\text{\Male}$ mate to generate $\xi$ offsprings with genotype $\gamma'$. \label{fig:scheme}} \end{center} \end{figure} We first reformulate a model of asexual reproduction~\cite{Rivoire:2011fy,Rivoire:2014kt} before generalizing it to account for sexual reproduction in monoecious (single sex) and dioecious (two sexes) populations. \subsubsection{Asexual reproduction} We assume that at each discrete generation $t$, a newly born individual with genotype $\gamma$ follows a life cycle consisting of two steps (Fig.~\ref{fig:scheme}). First, it maturates and develops a phenotype $\phi$ that leads it to either survive or die; the probability to develop $\phi$ given $\gamma$ is described by $D_\text{\Neutral}(\phi|\gamma)$ and the probability to survive given $\phi$ and the state $x_t$ of the environment by $S(\checkmark|\phi,x_t)$. Second, it reproduces into $\xi\geq 0$ offsprings, each with a genotype $\gamma'$ correlated to the genotype $\gamma$ of its parent; the probability to produce $\xi$ offsprings is described by $R_\text{\Neutral}(\xi)$ and the probability of $\gamma'$ given $\gamma$ by $H_\text{\Neutral}(\gamma'|\gamma)$. Individuals die after reproduction and the next generation consists of the newly born offsprings. Assuming the population size to be large enough for stochastic effects (genetic drift) to be negligible, the number $N_{t}(\gamma)$ of individuals born at generation $t$ with genotypes $\gamma$ and the number $M_{t}(\gamma)$ of those reaching maturation satisfy the recursion \begin{eqnarray} M_t(\gamma)&=&\int d\phi\ S(\checkmark|\phi)D_\text{\Neutral}(\phi|\gamma,x_t)N_{t}(\gamma)\label{eq:asex1}\\ N_{t+1}(\gamma')&=&k_\text{\Neutral}\int d\gamma\ H_\text{\Neutral}(\gamma'|\gamma) M_t(\gamma) \end{eqnarray} where $k_\text{\Neutral}=\int d\xi R_\text{\Neutral}(\xi)\xi$ is the mean number of offspring per reproductive event. \subsubsection{Monoecious sexual reproduction} We first generalize to monoecious (hermaphroditic) sexual reproduction where each individual mate with a randomly chosen individual in the population to produce an average of $k_\text{\Hermaphrodite}$ offsprings: \begin{equation} M_{t}(\gamma)=\int d\phi\ S(\checkmark|\phi,x_t)D_{\text{\Hermaphrodite}}(\phi|\gamma)N_{t}(\gamma)\label{eq:mono1} \end{equation} \begin{equation} N_{t+1}(\gamma')=k_\text{\Hermaphrodite}\int d\gamma_\sf d\gamma_\text{\Male} \ H_{\text{\FemaleMale}}(\gamma'|\gamma_\sf,\gamma_\text{\Male})\frac{M_{t}(\gamma_\text{\Male})}{M_{t}}M_{t}(\gamma_\sf)\label{eq:mono2}. \end{equation} Here $M_t=\int d\gamma M_t(\gamma)$ so that $M_t(\gamma_\text{\Male})/M_t$ represents the probability for an individual with genotype $\gamma_\sf$ to mate with an individual with genotype $\gamma_\text{\Male}$. An offsprings inherits a genotype $\gamma'$ with probability $H_{\text{\FemaleMale}}(\gamma'|\gamma_\sf,\gamma_\text{\Male})$, which depends a priori on the genotypes of the two parents, $\gamma_\sf$ and $\gamma_\text{\Male}$. Written in terms of the densities $n_t(\gamma)=N_{t}(\gamma)/\int d\gamma N_t(\gamma)$, this recursion is central to several previous models of population genetics~\cite{slatkin1970selection,roughgarden1972evolution,calvez2019asymptotic} and, more recently, to physical models of self-propelled particles with alignment interactions~\cite{degond2014local}. When comparing to the asexual case, we will consider $k_\text{\Hermaphrodite}=k_\text{\Neutral}$, which assumes that each sexually reproducing individual produces as many offsprings as an asexually reproducing individual. A difference between $k_\text{\Hermaphrodite}$ and $k_\text{\Neutral}$ may, however, be justified by the presence of intrinsic costs to sexual reproduction, due for instance to the necessity to produce more gametes or to the difficulty of finding a mate. To illustrate how our conclusions generalize to $k_\text{\Hermaphrodite}<k_\text{\Neutral}$, we will also report results for $k_\text{\Hermaphrodite}=k_\text{\Neutral}/2$, which can be interpreted as a cost dominated by the number of gametes that each individual must produce, which is doubled in the sexual case. \subsubsection{Dioecious sexual reproduction} To extend the formalism to dioecious sexual reproduction where two sexes are present, we assume that fecundity is limited by the number of females which choose their mate at random within the population of mature males. Assuming further that the sex of offsprings is chosen at random (sex-ratio $1/2$), this leads to the recursion \begin{equation} M_{\ss,t}(\gamma)=\frac{1}{2}\int d\phi\ S(\checkmark|\phi,x_t)D_{\ss}(\phi|\gamma)N_{t}(\gamma) \quad (\ss=\sf,\text{\Male})\label{eq:dio1} \end{equation} \begin{equation} N_{t+1}(\gamma')=k_\text{\FemaleMale}\int d\gamma_\sf d\gamma_\text{\Male}\ H_{\text{\FemaleMale}}(\gamma'|\gamma_\sf,\gamma_\text{\Male})\frac{M_{\text{\Male},t}(\gamma_\text{\Male})}{M_{\text{\Male},t}}M_{\sf,t}(\gamma_\sf)\label{eq:dio3} \end{equation} where $N_t(\gamma)$ is as before the number of newly born individuals with genotype $\gamma$ at generation $t$, and $M_{\sf,t}(\gamma)$ and $M_{\text{\Male},t}(\gamma)$ are, respectively, the number of mature females and males with genotype $\gamma$, with $M_{\text{\Male},t}=\int d\gamma_\text{\Male} M_{\text{\Male},t}(\gamma_\text{\Male})$ reporting the total number of maturate males. The ratio $M_{\text{\Male},t}(\gamma_\text{\Male})/M_{\text{\Male},t}$ thus corresponds to the probability for a male with genotype $\gamma_\text{\Male}$ to be chosen by a female at generation $t$. We assume here that females and males are subject to the same selective pressure $S(\checkmark|\phi,x_t)$ but allow them to have different developmental modes $D_{\sf}(\phi|\gamma)$ and $D_{\text{\Male}}(\phi|\gamma)$. Finally, the probability $H_{\text{\FemaleMale}}(\gamma'|\gamma_\sf,\gamma_\text{\Male})$ for an offspring to inherit a genotype $\gamma'$ depends a priori on the two genotypes of the parents, $\gamma_\sf$ and $\gamma_\text{\Male}$. We will take by default $k_\text{\FemaleMale}=k_\text{\Hermaphrodite}=k_\text{\Neutral}$. For monomorphic sexes ($D_\sf=D_\text{\Male}$), Eqs.~\eqref{eq:dio1}-\eqref{eq:dio3} are equivalent to Eqs.~\eqref{eq:mono1}-\eqref{eq:mono2} with $k_\text{\Hermaphrodite}=k_\text{\Neutral}/2$. For dimorphic sexes ($D_\sf\neq D_\text{\Male}$), on the other hand, the recursion defined by Eqs.~\eqref{eq:dio1}-\eqref{eq:dio3} has, to our knowledge, not been previously studied. {\color{black} In the following, we analyze this recursion in the context of quantitative traits where the different kernels are Gaussian but note that the formalism is general and can also be applied to discrete traits and other kernels.} \subsection{Questions} The different modes of reproduction define different population dynamics: does it lead one mode of reproduction to be favored by natural selection? More specifically, as the answer may depend on the genetic and environmental constraints to which the populations are subject, we ask the following two questions: Q1: Under what conditions is sexual reproduction advantageous over asexual reproduction? Q2: Under what conditions is sexual dimorphism advantageous in dioecious populations?\\ The first question has been extensively studied, although no consensual solution has emerged~\cite{Otto:2002cn}. The second question, on the other hand, has to our knowledge not been examined mathematically. A particular challenge is known as the two-fold cost of males: in dioecious populations, males constitute half of the population but do not contribute directly to fecundity, in contrast to asexual or monoecious sexual populations where every individual can potentially contribute. This corresponds formally to the presence of a factor $1/2$ in Eq.~\eqref{eq:dio1} compared to Eq.~\eqref{eq:asex1} or Eq.~\eqref{eq:mono1}. This problem is usually presented in the context of Q1, when comparing dioecious sexual reproduction with asexual reproduction~\cite{maynard1971origin} (assuming no intrinsic cost of sex, i.e., $k_\text{\FemaleMale}=k_\text{\Neutral}$). It is, however, even more acute in the context of Q2, when comparing dioecious sexual reproduction with monoecious sexual reproduction, as only a factor $1/2$ differentiates the dynamics of monomorphic dioecious populations from that of monoecious populations (assuming here $k_\text{\FemaleMale}=k_\text{\Hermaphrodite}$). Addressing these questions requires defining the ``conditions'' and the nature of the possible ``advantages'' to which Q1 and Q2 refer. To this end, we adopt a simple parametrization of the different components of the model and present specific criteria for comparing populations differing by their reproductive or developmental modes. \subsection{Basic model}\label{sec:basic} {\color{black} We consider the central model of quantitative genetics, the infinitesimal model~\cite{lynch1998genetics}, where $\gamma$ is a quantitative trait influenced by a large number of genes. Through the central limit theorem, this justifies to treat mutational and developmental noise as additive white Gaussian noise. The infinitesimal model played historically a major role in resolving the controversy between Mendelians and biometricians and continues today to be a corner-stone of evolutionary biology as well as a widely applied tool in plant and animal breeding~\cite{roff2007centennial}. As it is amenable to analytical calculations in the context of varying environments~\cite{Charlesworth:1993fg,Rivoire:2014kt,rivoire2016informations}, it provides particularly insightful results. We arrive at this model by making the following assumptions:} $(i)$ we describe development from a genotype (breeding value) $\gamma\in\mathbb{R}$ to a phenotype $\phi\in\mathbb{R}$ by the addition of normally distributed noise, $\phi=\gamma+\nu$ with $\nu\sim\mathcal{N}(\sigma_{D}^2)$, where $\nu\sim\mathcal{N}(\sigma_{D}^2)$ indicates that $\nu$ is drawn from a normal distribution with zero mean and variance $\sigma_{D}^2$. The variance $\sigma_D^2$, which is sometimes referred to as the microenvironmental variance in quantitative genetics, is here called the developmental variance to distinguish it from the (macro)environmental variance $\sigma_E^2$ introduced below. When it depends on the mode of reproduction and on the sex, we also denote it by $\sigma_{D,\ss}^2$ with $\ss=\text{\Neutral},\text{\Hermaphrodite},\sf,\text{\Male}$ for, respectively, asexual, hermaphroditic, female and male individuals; $(ii)$ we consider a stabilizing selection of the form $S(\checkmark|\phi,x_t)=e^{-(\phi-x_t)^2/(2\sigma_S^2)}$ where $x_t$ defines the optimal phenotype at generation $t$ and $\sigma_S^2$ the stringency of selection; $(iii)$ for asexual reproduction, we assume that the genotype $\gamma'$ of an offspring is related to the genotype $\gamma$ of its parent by $\gamma'=\gamma+\nu$ with $\nu\sim\mathcal{N}(\sigma_M^2)$ where $\sigma_M^2$ is a mutational variance representing the effects of mutations; $(iv)$ for sexual reproduction, we assume that the genotype $\gamma'$ of an offspring is related to the genotypes $\gamma_\sf$ and $\gamma_\text{\Male}$ of its parents by $\gamma'=(\gamma_\sf+\gamma_\text{\Male})/2+\nu$ with $\nu\sim\mathcal{N}(\sigma_M^2+\sigma_R^2)$ where $\sigma_R^2$ is a segregational variance that accounts for the variation introduced by recombination, in addition to the variation introduced by mutations. Assuming a model for the process by which mutations and recombination operate on alleles, the genetic parameters $\sigma_M^2$ and $\sigma_R^2$ can be expressed in terms of more elementary parameters (number of loci, mutation rate, \dots)~\cite{burger2000mathematical}. Here, we do not make any assumption on the underlying mechanisms and treat $\sigma_M^2$ and $\sigma_R^2$ as fixed and independent parameters. As we will show that genetic variances are asymptotically constant, this is formally equivalent to assuming that populations have fixed genetic variances{\color{black}, a key assumption of the infinitesimal model of quantitative genetics. This is clearly a strong assumption which requires particular conditions to be justified mathematically~\cite{barton2017infinitesimal} and whose applicability generally needs to be assessed through numerical simulations~\cite{Burger:1999wy,Waxman:1999vj}. We adopt it here but differ from the common practice in quantitative genetics by} parametrizing the model by $\sigma_M^2$ and $\sigma_R^2$ instead of the associated genetic variances $\sigma_\text{\Neutral}^2={\rm Var}(\gamma_\text{\Neutral})$ and $\sigma_\text{\Hermaphrodite}^2={\rm Var}(\gamma_\text{\Hermaphrodite})$. {\color{black} As we show, this leads to} a more general and transparent interpretation of the results. If $G_{\sigma^2}(x)=e^{-x^2/(2\sigma^2)}/\sqrt{2\pi\sigma^2}$ denotes a generic Gaussian function, we thus make the following assumptions: \begin{eqnarray} (i)&D_\ss(\phi|\gamma)= G_{\sigma^2_{D,\ss}}(\phi-\gamma) \\%G_{\sigma^2_{D,\ss}}(\phi-(1-\k_\ss)\gamma-\k_\ss x_t) \\ (ii)&S(\checkmark|\phi,x_t)= (2\pi\sigma_S^2)^{1/2}G_{\sigma^2_S}(\phi-x_t) \\ (iii)&H_\text{\Neutral}(\gamma'|\gamma)= G_{\sigma^2_M}(\gamma'-\gamma) \label{eq:Hsn}\\ (iv)&H_\text{\FemaleMale}(\gamma'|\gamma_\sf,\gamma_\text{\Male})=G_{\sigma^2_M+\sigma_R^2}\left(\gamma'-\frac{1}{2}(\gamma_\sf+\gamma_\text{\Male})\right) \label{eq:Hfm} \end{eqnarray} where $\ss$ stands for either $\text{\Neutral}$, $\text{\Hermaphrodite}$, $\sf$ or $\text{\Male}$. Additionally, the initial distribution of genotypes $N_0(\gamma)$ is also assumed to be Gaussian, which is sufficient to ensure that it remains Gaussian at any subsequent time $t>0$. $(v)$ Finally, we assume that the environment follows an autoregressive process \begin{equation} x_t=ax_{t-1}+b_t,\quad b_t\sim\mathcal{N}((1-a^2)\sigma_E^2), \end{equation} or, equivalently, \begin{equation} P(x_t|x_{t-1})=G_{(1-a^2)\sigma_E^2}(x_t-ax_{t-1}). \end{equation} As $\mathbb{E}[x_tx_{t+\tau}]=\sigma_E^2 a^\tau$, the parameter $a\in [0,1[$ encodes the time scale of the environmental fluctuations {\color{black} ($\tau_E=-1/\ln a$)} which is to be compared with the generation time {\color{black} $(\tau=1)$}, corresponding to $a=e^{-1}\simeq 0.36$. The parameter $\sigma_E^2\in [0,\infty[$, on the other hand, encodes the variance of the fluctuations, which is to be compared with the stringency of selection $\sigma_S^2$; an environmental change that kills 50\% of a previously perfectly adapted population thus corresponds to $\sigma^2_E/\sigma^2_S=2\ln 2\simeq 1.4$. The environmental variance $\sigma_E^2$ corresponds to the scale of environmental fluctuations over multiple generations while $(1-a^2)\sigma_E^2$ is the scale of these fluctuations over a single generation. We will examine several extensions of this basic model to account for the evolution of heredity and development, for the presence of spatial heterogeneities or of a mutational bias, and for the possibility of plasticity. We will also examine the case of directional selection where $x_t=ct+b_t$ with $c\neq 0$ and $b_t\sim\mathcal{N}(\sigma_E^2)$. Other environmental processes, such as random walks or periodic processes, can also be examined in a similar way~\cite{Charlesworth:1993fg}. \subsection{Levels of analysis} In the simplest instance of the previous model, the conditions to which the populations are subject comprise genetic constraints, parametrized by $\sigma_M^2,\sigma_R^2$, and environmental constraints, parametrized by $a,\sigma_E^2$ {\color{black} and $\sigma_S^2$}. When now considering the evolutionary advantage that different modes of development or reproduction may confer, it is useful to distinguish two levels of analysis: L1: What is optimal for populations in the long-term? L2: What may effectively evolve under natural selection?\\ What is optimal at a population level may indeed not possibly or effectively result from natural selection. A definition of optimality at the population-level (L1) is provided by the long-term growth rate, which is formally defined in the limit of an infinite number of generations by $\L=\lim_{t\to\infty}(1/t)\ln N_t$ where $N_t$ is the total population size at generation $t$~\cite{Rivoire:2011fy}. This growth rate corresponds to the geometric mean of the instantaneous fitness, $\L=\mathbb{E}[\ln N_t/N_{t-1}]$, which is well-known to be the relevant quantity for large populations in varying environments~\cite{lewontin1969population}. {\color{black} Crucially, it is the quantity that quantifies the value of information in the context of evolutionary dynamics~\cite{Rivoire:2011fy}.} In the long term ($t\to\infty$), populations following our models will either become extinct or grow exponentially at a rate $\L_\ss$, with $\ss=\text{\Neutral},\text{\Hermaphrodite}$ or $\text{\FemaleMale}$ depending on the mode of reproduction. The population with largest $\L_\ss$ is then considered optimal. We shall verify that this criterion describes the outcome of competitions between finite-size populations over a finite number of generations when they are subject to a common total carrying capacity. In such cases, the population that become fixed is most likely the population with largest growth rate $\L_\ss$. Formally, the two questions Q1 and Q2 at level L1 therefore amounts to comparing the growth rates of different populations subject to the same constraints but differing by their mode of reproduction (Q1) or their mode of development (Q2): Q1/L1: What is the sign of $\L_\text{\Hermaphrodite}-\L_\text{\Neutral}$ as a function of $\sigma_M^2,\sigma_R^2$ and $a,\sigma_E^2{\color{black} ,\sigma_S^2}$? Q2/L1: What values of the developmental variances $\sigma^2_{D,\sf}$, $\sigma^2_{D,\text{\Male}}$ optimize $\L_\text{\FemaleMale}$ as a function of these same parameters?\\ In particular, the two-fold cost of males is overcome if $\L_\text{\Hermaphrodite}-\L_\text{\Neutral}>\ln 2$ in the context of Q1 (as $\L_\text{\FemaleMale}=\L_\text{\Hermaphrodite}-\ln 2$ if sexes are monomorphic) and if $\L_\text{\FemaleMale}-\L_\text{\Hermaphrodite}>0$ in the context of Q2 (which necessarily requires dimorphism). {\color{black} More generally, $\L_\text{\Hermaphrodite}-\L_\text{\Neutral}$ quantifies the value of sexual reproduction over asexual reproduction and $\L_\text{\FemaleMale}-\L_\text{\Hermaphrodite}$ the value of dioecy over monoecy when comparing alternative ways to transmit information between generations.} Addressing the two questions at level L2 requires us to augment the model with genotypic variables that are also subject to mutations but control either the mode of reproduction (Q1) or the mode of development (Q2), also known as modifier genes~\cite{karlin1974towards}. Formally, Q1/L2: What is the long-term dynamics of a gene $\psi$ that controls the probability for an individual to reproduce sexually, as a function of $\sigma_M^2,\sigma_R^2$ and $a,\sigma_E^2{\color{black} ,\sigma_S^2}$? Q1/L2: What are the long-term dynamics of sex-specific genes $\d^\sf$ and $\d^\text{\Male}$ that control the developmental variances $\sigma_{D,\sf}^2$ and $\sigma_{D,\text{\Male}}^2$ as a function of these same parameters? \section{Results} We obtain analytical formulae for the long-term growth rates $\L_\text{\Neutral},\L_\text{\Hermaphrodite},\L_\text{\FemaleMale}$ as a function of the different parameters (Appendix~\ref{sec:formulae}). These formula recapitulate and extend previous results~\cite{Charlesworth:1993fg,Rivoire:2014kt}. {\color{black} The formulae depend on the variances $\sigma_D^2,\sigma_E^2,\sigma_M^2,\sigma_R^2$ only via the ratios $\sigma_D^2/\sigma_S^2,\sigma_E^2/\sigma_S^2,\sigma_M^2/\sigma_S^2,\sigma_R^2/\sigma_S^2$, which implies that }we can set the stringency of selection to one ($\sigma_S^2=1$) without loss of generality. They also show that differences in growth rates are independent on the mean number of offsprings when considering $k_\text{\Neutral}=k_\text{\Hermaphrodite}=k_\text{\FemaleMale}$, and we take this number to be $k_\text{\Neutral}=k_\text{\Hermaphrodite}=k_\text{\FemaleMale}=2$ in the numerical simulations. \subsection{Genetic constraints and optimization} In contrast to the environmental parameters, the genetic parameters $\sigma_M^2$, $\sigma_R^2$ are potentially subject to evolution. Optimizing the growth rates over these two parameters, we find that sexual reproduction neither provides an advantage nor a disadvantage over asexual reproduction (Appendix~\ref{sec:optima}). From this standpoint, sex can be adaptive only in the presence of genetic constraints. In the following, we therefore treat $\sigma_M^2$ and $\sigma_R^2$ as given genetic constraints, in addition to the environmental constraints. We will find, however, that the optimal value of the mutational variance for asexual populations, which we denote $\hat \sigma_M^2$, plays a particular role when comparing sexual and asexual reproduction. \subsection{Sexual versus asexual reproduction: optimality} {\color{black} As $\L_\text{\Hermaphrodite}-\L_\text{\Neutral}$ quantifies the value of sexual monoecious reproduction over asexual reproduction, the sign of $\L_\text{\Hermaphrodite}-\L_\text{\Neutral}$ indicates the environmental and mutational conditions under which sexual monoecious reproduction confers a long-term evolutionary advantage over asexual reproduction.} Here we assume $\sigma_D^2=0$ and discuss in Sec.~\ref{sec:space} how a finite developmental variance ($\sigma_{D,\text{\Neutral}}^2=\sigma_{D,\text{\Hermaphrodite}}^2>0$) changes quantitatively but not qualitatively the results. We are then left with 4 parameters, $\sigma_M^2$, $\sigma_R^2$, for the genetic constraints, and $a$, $\sigma_E^2$ for the environmental constraints. Displaying $\L_\text{\Hermaphrodite}-\L_\text{\Neutral}$ as a function of $\sigma_M^2,\sigma_R^2$ for two representative values of $a,\sigma_E^2$: (1)~$a=0.25$, $\sigma_E^2=1$ and (2)~$a=0.75$, $\sigma_E^2=1$ (Fig.~\ref{fig:AH_opt}A) reveals particular genetic and environmental conditions that must be satisfied for sexual reproduction to be advantageous over asexual reproduction ($\L_\text{\Hermaphrodite}>\L_\text{\Neutral}$ in red in Fig.~\ref{fig:AH_opt}A). \begin{figure}[t] \begin{center} \includegraphics[width=.92\linewidth]{Fig2.pdf} \caption{Genetic conditions under which monoecious sexual reproduction is advantageous over asexual reproduction for {\color{black} two environments differing by the time scale $\tau_E=-1/\ln a$ of their fluctuations}. {\bf A.} Difference $\L_\text{\Hermaphrodite}-\L_\text{\Neutral}$ between the growth rates of sexual and asexual populations. Values of $(\sigma_M^2,\sigma_R^2)$ in red represent conditions under which sex is advantageous {\color{black} (see Appendix~\ref{app:mutload} for the contribution of the mutational load).} {\bf B.}~Fraction $N_\text{\Hermaphrodite}/(N_\text{\Hermaphrodite}+N_\text{\Neutral})$ of sexually reproducing individuals after $T=250$ generations when starting from an initial population with an equal proportion of sexually and asexually reproducing individuals ($N_\text{\Hermaphrodite}=N_\text{\Neutral}$ at $t=0$). The simulations are performed under conditions where the total population size is maintained to $N=N_\text{\Hermaphrodite}+N_\text{\Neutral}=250$ and where each mature individual has $k=2$ offsprings, and the results correspond to averages over 100 independent simulations (Appendix~\ref{sec:simu}). {\bf C.} Mean value of the modifier gene $\psi$ that controls the probability to reproduce sexually in a model where this probability is subject to evolution, following Eq.~\eqref{eq:sexasexmod}. The results are averages over 100 replicate simulations starting from $N=250$ individuals with $\gamma=0$ and $\psi=0$, and ending after $t=250$ generations with a total population size maintained to $N=250$. For the smallest values of $\sigma_M^2$ and $\sigma_R^2$, no difference is observed (in white) and evolving towards one mode of reproduction or the other requires a larger number of generations (Appendix~\ref{app:evo_TM}). Although A,B,C represent different quantities obtained under different assumptions, a remarkable overlap is apparent between the conditions under which sexual reproduction is optimal in the long-run (A), over-competes asexually reproducing populations after a finite number of generations (B) and evolves (C). \label{fig:AH_opt}} \end{center} \end{figure} These conditions apply beyond the assumptions of infinite population size and infinite number of generations that underlie the calculations of the growth rates: they also decide the outcome of a competition between asexually and sexually reproducing populations after a finite number of generations when the total population size is subject to an upper bound. Starting from an equal mixture of asexual and sexual individuals, numerical simulations (Appendix~\ref{sec:simu}) indeed show that the mode of reproduction that becomes fixed is the one with largest growth rate (Fig.~\ref{fig:AH_opt}B). How to make sense of the phase diagrams of Fig.~\ref{fig:AH_opt}A? As a function of $\sigma_M^2,\sigma_R^2$, we have in the most general case 4 regimes, separated by two threshold functions $\sigma_R^2(\sigma_M^2)$ at which $\L_\text{\Hermaphrodite}=\L_\text{\Neutral}$ (Fig.~\ref{fig:sM2}B). Remarkably, one of these threshold functions, which we denote $\sigma_G^2$, is independent of the environmental conditions and given by (Appendix \ref{sec:sG2}) \begin{equation}\label{eq:s2G} \sigma_G^2=\frac{\sigma_M^2}{4}\left[\sqrt{1+4\frac{\sigma_S^2+\sigma_D^2}{\sigma_M^2}}-1\right]. \end{equation} This value has a simple interpretation: it is the value of the segregation variance $\sigma_R^2$ for which the variance of trait $\gamma$ in the population (the genetic variance) is the same for asexually and sexually reproducing populations (Appendix \ref{sec:sG2}). It also corresponds to the value of the segregation variance $\sigma_R^2$ under a Gaussian allelic approximation where $\gamma$ arises from a large number of alleles, $\gamma=\sum_{i=1}^L \gamma_i$, with each $\gamma_i$ assumed to be normally distributed in the population~\cite{burger2000mathematical} (Appendix \ref{sec:GAA}); in this model, the equivalence between genetic variances of asexually and sexually reproducing populations is in fact valid at any generation, beyond any steady-state assumption (Appendix \ref{sec:GAA}). \begin{figure}[t] \begin{center} \includegraphics[width=\linewidth]{Fig3.pdf} \caption{{\bf A.} Optimal mutational variance $\hat\sigma_M^2$ for asexually reproducing populations as a function of $(a,\sigma_E^2)$. The conditions (1) and (2) of Fig.~\ref{fig:AH_opt} are indicated by crosses. {\color{black} When $\sigma_E^2<2(1-a)/(1 + a)$, we have $\hat\sigma_M^2=0$ (white region). This condition corresponds to environmental fluctuations of sufficiently small amplitude $\sigma_E^2$ but also, less intuitively, of sufficiently small temporal correlations $\tau_E=-1/\ln a$. Informally, trying to keep up with a rapidly varying environment through random variations incurs a large mutational load that can make preferable the maintenance of a fixed trait $\gamma=0$ around which the optimal trait fluctuates.} {\bf B.}~Thresholds $\sigma_G^2$ (in blue) and $\sigma_C^2$ (in red) separating the different regimes, here represented for the environmental conditions (2) of Fig.~\ref{fig:AH_opt}. The threshold $\sigma_G^2$ is, however, independent of the environmental conditions. The two curves meet at the value $\hat\sigma_M^2$ of $\sigma_M^2$ represented in A (black dotted line). When $\hat\sigma_M^2=0$, the threshold $\sigma_C^2$ in red is effectively absent, as illustrated by the environmental conditions (1) of Fig.~\ref{fig:AH_opt} {\color{black} (see also Appendix~\ref{app:s2S} for the dependence on the stringency of selection $\sigma^2_S$).} \label{fig:sM2}} \end{center} \end{figure} An equivalence of genetic variances is a sufficient but non necessary condition for the growth rates $\L_\text{\Neutral}$ and $\L_\text{\Hermaphrodite}$ to be the same. The second threshold function $\sigma_C^2$ corresponds to another solution, which exists only under some conditions, including condition (2) of Fig.~\ref{fig:AH_opt} but not condition (1). It crosses $\sigma_G^2$ at a particular value $\hat\sigma_M^2$ of $\sigma_M^2$ that has a simple interpretation: it is the value of $\sigma_M^2$ that optimizes the growth rate of asexual populations under the same environmental conditions. When $\sigma_R^2<\sigma_G^2$, $\sigma_C^2$ sharply decreases at a value of $\sigma_M^2$ only slightly above $\hat\sigma_M^2$. This may be interpreted as follows: sexual reproduction effectively decreases the mutational variance $\sigma_M^2$, which is beneficial when $\sigma_M^2>\hat\sigma_M^2$ but detrimental when $\sigma_M^2<\hat\sigma_M^2$. In the limit $\sigma_R^2\to 0$, this reduction of variance may be interpreted as a form of blending inheritance. The value of $\hat\sigma_M^2$ depends on environmental parameters (Fig.~\ref{fig:sM2}A). Remarkably, for sufficiently moderately varying environments, defined by $\sigma_E^2<2(1-a)/(1 + a)$, we have $\hat\sigma_M^2=0$ and sexual reproduction is therefore advantageous whenever $\sigma_R^2<\sigma_G^2$, irrespective of the value of $\sigma_M^2$. This is illustrated by condition (1) of Fig.~\ref{fig:AH_opt}, which is thus representative of a large class of environmental conditions. {\color{black} Our results are directly comparable to those of Charlesworth~\cite{Charlesworth:1993fg} who analyzed an equivalent model using a different parametrization and under the assumption that the genetic variance of sexual populations is larger, which corresponds to restricting to $\sigma_R^2>\sigma_G^2$.} We assumed so far $k_\text{\Hermaphrodite}=k_\text{\Neutral}$. Taking instead $k_\text{\Hermaphrodite}=k_\text{\Neutral}/2$, which corresponds to an intrinsic two-fold cost of sex, the conditions for sexual reproduction to be advantageous over asexual reproduction are more stringent. We find that sex can be favored only in one of the four regimes described defined in Fig.~\ref{fig:sM2}B: when $\sigma_G^2<\sigma_R^2<\sigma_C^2$, provided $\sigma_E^2$ is sufficiently large (Appendix~\ref{app:2fold}). As populations are prone to extinction in largely varying environments, an additional condition is that each female produces in average a sufficiently large number $k_\text{\Hermaphrodite}$ of offsprings (Appendix~\ref{app:2fmore}). \subsection{Sexual versus asexual reproduction: evolution} Optimality of a trait at the population level is generally not sufficient to ensure that it may effectively evolve. To study this question, we generalize our basic model to include a genetic factor $\psi$ that controls how individuals reproduce. Specifically, we assume that an individual with genotype $\psi$ reproduces sexually with a probability $P(\psi)$ by mating with a randomly chosen individual, and asexually otherwise. We further assume the modifier gene $\psi$ to be transmitted through the females and subject to the same mutational variance $\sigma_M^2$ as $\gamma$. This corresponds to leaving Eq.~\eqref{eq:mono1} unchanged but replacing Eq.~\eqref{eq:mono2} by \begin{widetext} \begin{equation}\label{eq:sexasexmod} N_{t+1}(\gamma',\psi')=k\int d\gamma_\sf d\psi_\sf \ \Bigg[ P(\psi_\sf)\int d\gamma_\text{\Male} d\psi_\text{\Male} H_{\text{\FemaleMale}}(\gamma'|\gamma_\sf,\gamma_\text{\Male})\frac{M_{t}(\gamma_\text{\Male},\psi_\text{\Male})}{M_{t}}+(1-P(\psi_\sf))H_{\text{\Neutral}}(\gamma'|\gamma_\sf)\Bigg]H_{\text{\Neutral}}(\psi'|\psi_\sf)M_{t}(\gamma_\sf,\psi_\sf). \end{equation} \end{widetext} We take $P(\psi)=1/(1+e^{-\psi})$ so as to map $\psi\in\mathbb{R}$ into $P(\psi)\in [0,1]$ through a simple monotonic function that permits the evolution towards $P(\psi)\simeq 0$ or $P(\psi)\simeq 1$ when $\psi$ takes large absolute values. The results indicate that sexual reproduction typically evolves whenever sexual reproduction is advantageous (Fig.~\ref{fig:AH_opt}C). The conclusions derived from a comparison between long-term growth rates can therefore be obtained as the result of an evolutionary process. \subsection{Dioecy and sexual dimorphism: optimality} Dioecy opens the possibility of an asymmetry between the sexes. In our model, the two sexes share a common distribution of genotypes $\gamma$ but may display different phenotypes as a result of different developmental variances $\sigma_{D,\sf}^2$ and $\sigma_{D,\text{\Male}}^2$. To investigate whether a phenotypic dimorphism may confer an evolutionary advantage, we optimize the long-term growth rate $\L_{\text{\FemaleMale}}$ over the two sex-specific developmental variances $\sigma_{D,\sf}^2$ and $\sigma_{D,\text{\Male}}^2$ in a context where all other parameters are fixed. We find that environmental conditions indeed exists under which a dimorphism is advantageous (Fig.~\ref{fig:dimo}A). These conditions take a particularly simple form in the limit of small genetic variations, $\sigma_M^2+\sigma_R^2\ll \sigma_S^2$, where a non-zero female developmental variance $\hat\sigma_{D,\sf}^2=\sigma_E^2- \sigma_S^2$ is advantageous when the variance of the environmental fluctuations is large ($\sigma_E^2> \sigma_S^2$) while a non-zero male developmental variance $\sigma_{D,\text{\Male}}^2=\infty$ is advantageous when the timescale of the environmental fluctuations is short ($a< 1/3$). \begin{figure}[b] \begin{center} \includegraphics[width=\linewidth]{Fig4.pdf} \caption{{\bf A.} Optimal female and male developmental variances as a function of environmental conditions $(a,\sigma_E^2)$ for dioecious populations with $\sigma_M^2+\sigma_R^2=10^{-2}$ . In the limit $\sigma_M^2+\sigma_R^2\to 0$, $\hat\sigma_{D,\sf}^2$ is non-zero when $\sigma_E^2>\sigma_S^2$ (with here $\sigma_S^2=1$) and $\hat\sigma_{D,\text{\Male}}^2$ when $a<1/3$, in which case it is in fact infinite. {\bf B.} Evolutionary results of numerical simulations over $T=250$ generations with populations of size $N=250$ where the developmental variances are subject to evolution, following Eq.~\eqref{eq:evosex}. The gray points for large values of $\sigma_E^2$ correspond to cases where more than 10\% of the 100 populations that were independently simulated became extinct. The results for $\langle\sigma_{D,\text{\Male}}^2\rangle$ reflect here the initial conditions, which correspond to $\sigma_{D,\ss}^2=1$ (Appendix~\ref{app:evomore}). They are also contingent to the mode of transmission of the modifier genes (Appendix~\ref{app:dimore}).\label{fig:dimo}} \end{center} \end{figure} The selective pressure on the two developmental variances is, however, on different scales as $\L_\text{\FemaleMale}(\sigma_{D,\sf}^2,\sigma_{D,\text{\Male}}^2)\simeq \L_0(\sigma_{D,\sf}^2)+\L_1(\sigma_{D,\sf}^2,\sigma_{D,\text{\Male}}^2)(\sigma_M^2+\sigma_R^2)/\sigma_S^2$ when $\sigma_M^2+\sigma_R^2\ll\sigma_S^2$ (Appendix~\ref{sec:sh0}). Consequently, the selective pressure on male developmental variances is much weaker than the selective pressure on female developmental variances. Besides, an infinite developmental variance ($\hat\sigma_{D,\text{\Male}}^2=\infty$) is conceivable only in populations of infinite size. With finite populations, an upper bound on $\sigma_{D,\text{\Male}}^2$ arises from the need to maintain a sufficient number $N_{\text{\Male},\rm min}$ of surviving males at each generation, which takes the form $\sigma_{D,\text{\Male}}^2\ll N_{\text{\Male},\rm min}^2$ when $\sigma_M^2+\sigma_R^2\ll\sigma_S^2$ (Appendix \ref{sec:finitepop}). {\color{black} All together, an asymmetry between the two sexes is not only present in the optimal values of their developmental variances but also in the strength of the selective pressure to which these developmental variances are subject.} Because the contribution of $\sigma_{D,\text{\Male}}^2$ {\color{black} to the growth rate $\L_\text{\FemaleMale}(\sigma_{D,\sf}^2,\sigma_{D,\text{\Male}}^2)$} is of order $\sigma_M^2+\sigma_R^2$, the growth rate of dioecious populations with optimal developmental variances $\hat\sigma_{D,\sf}^2$ and $\hat\sigma_{D,\text{\Male}}^2$, does not exceed significantly the growth rate of monoecious populations with optimal developmental variance $\hat\sigma_{D,\text{\Hermaphrodite}}^2$ (Appendix~\ref{app:r}). {\color{black} For the basic model introduced in Sec~\ref{sec:basic}, we therefore reach the conclusion that sexual dimorphism is not sufficient to overcome the two-fold cost of males that dioecious populations incur compared to monoecious populations. As we show below, this two-fold cost can be overcome when the model includes a mutational bias or directional selection (Sec.~\ref{sec:bias}).} Finally, we may question the assumption that the segregation variance takes a fixed value $\sigma_R^2$ independent of the developmental variances. Under the Gaussian allelic model, for instance, $\sigma_R^2=\sigma_G^2$, and Eq.~\eqref{eq:s2G} can be generalized to show that $\sigma_G^2$ depends on $\sigma_{D,\sf}^2$ and $\sigma_{D,\text{\Male}}^2$ (Appendix~\ref{sec:GAA}). Repeating the analysis under this assumption leads, however, to similar results, indicating that the adaptive advantage of sexual dimorphism is robust to the exact form that the segregation variance $\sigma_R^2$ takes (Appendix~\ref{app:r}). \subsection{Dioecy and sexual dimorphism: evolution} To analyze whether sexual dimorphism may evolve despite the reserves that we made, we augment the model to include two modifier genes $\d^\sf$ and $\d^\text{\Male}$ that control developmental variances of each sex specifically. This corresponds to recursions of the form \begin{widetext} \begin{eqnarray}\label{eq:evosex} M_{\ss,t}(\gamma,\d^\sf,\d^\text{\Male})&=&\frac{1}{2}\int d\phi S(\checkmark|\phi,x_t)D(\phi|\gamma,\d^\ss)N_{t}(\gamma,\d^\sf,\d^\text{\Male})\qquad (\ss=\sf,\text{\Male})\\ N_{t+1}(\gamma',{\d'}^\sf,{\d'}^\text{\Male})&=&k \int \prod_{\ss=\sf,\text{\Male}} d\gamma_\ss d\d^\sf_\ss d\d^\text{\Male}_\ss \ H({\d'}^\ss|\d_\sf^\ss,\d_\text{\Male}^\ss) H_{\text{\FemaleMale}}(\gamma'|\gamma_\sf,\gamma_\text{\Male})\frac{M_{\text{\Male},t}(\gamma_\text{\Male},\d^\sf_\text{\Male},\d^\text{\Male}_\text{\Male})}{M_{\text{\Male},t}}M_{\sf,t}(\gamma_\sf,\d^\sf_\sf,\d^\text{\Male}_\sf)\nonumber \end{eqnarray} \end{widetext} where $D(\phi|\gamma,\d^\ss)=G_{e^{\d^\ss}}(\phi-\gamma)$, i.e., $\sigma_{D,\sf}^2=e^{\d^\sf}$ and $\sigma_{D,\text{\Male}}^2=e^{\d^\text{\Male}}$, a choice made to map $\d^\ss\in\mathbb{R}$ into $\sigma^2_{D,\ss}\in\mathbb{R}^+$ through a simple monotonic function, with the possibility to easily obtain $\sigma_{D,\ss}^2\simeq 0$ when $\d^\ss$ takes negative values. Assuming that the modifiers are transmitted through the females, as we did in Eq.~\eqref{eq:sexasexmod}, corresponds to $H({\d'}^\ss|\d_\sf^\ss,\d_\text{\Male}^\ss)=H_\text{\Neutral}({\d'}^\ss|\d_\sf^\ss)$, in which case we indeed observe the evolution of sexual dimorphism (Fig.~\ref{fig:dimo}B). While the developmental variances of females reach values conform to the optima derived from the optimization of $\L_\text{\FemaleMale}$, this is not the case for the developmental variances of males, which are strongly dependent on initial conditions, consistent with a very weak selective pressure (Appendix~\ref{app:evomore}). Besides, the results depend on the mode by which the modifier genes are transmitted. Assuming that they are subject to recombination, $H({\d'}^\ss|\d_\sf^\ss,\d_\text{\Male}^\ss)=H_\text{\FemaleMale}({\d'}^\ss|\d_\sf^\ss,\d_\text{\Male}^\ss)$, or that they are separately inherited for each sex, $H({\d'}^\ss|\d_\sf^\ss,\d_\text{\Male}^\ss)=H_\text{\Neutral}({\d'}^\ss|\d_\ss^\ss)$, leads to monomorphic populations (Appendix~\ref{app:dimore}). We may interpret these results as a consequence of sexual selection counteracting selection at the population level. Transmitting modifiers through the females is indeed special in this respect, as males at one generation do not inherit any direct information from males of the previous generation. \subsection{Developmental noise and spatial heterogeneities}\label{sec:space} \begin{figure}[t] \begin{center} \includegraphics[width=\linewidth]{Fig5.pdf} \caption{{\bf A.} Extension of Fig.~\ref{fig:sM2}B to different values of developmental variances $\sigma_D^2$. The blue curve corresponds to $\sigma_G^2$, the value of the segregation variance $\sigma_R^2$ above which sexual populations have larger genetic variance than asexual populations. The red curve corresponds to $\sigma_C^2$, such that sex is advantageous when $\sigma_G^2<\sigma_R^2<\sigma_C^2$ or $\sigma_C^2<\sigma_R^2<\sigma_G^2$. Full lines are for $\sigma_D^2/\sigma_S^2=0$ as in Fig.~\ref{fig:sM2}B, dashed lines for $\sigma_D^2/\sigma_S^2=1$ and dotted lines for $\sigma_D^2/\sigma_S^2=10$. When $\sigma_D^2/\sigma_S^2=10$, we have $\sigma_C^2\to-\infty$ and the corresponding line is therefore absent, as in case (1) of Fig.~\ref{fig:AH_opt}. {\bf B.} Similar to A but for a directionally varying environment with $c=0.1$, $a=0$, $\sigma_E^2=0$. The curves for $\sigma_G^2$, which do not depend on the environment, are identical to A. The curves for $\sigma_C^2$, on the other hand, are shifted to larger values with increasing developmental variances $\sigma_D^2$. Additionally, there are now conditions for which a two-fold cost for sex is overcome ($\L_\text{\Hermaphrodite}>\L_\text{\Neutral}+\ln 2$), corresponding to values of $\sigma_M^2$ on the left side of the green curves.\label{fig:sigmaD}} \end{center} \end{figure} For simplicity, we compared so far sexual and asexual reproduction in the absence of developmental noise. Assuming instead a finite and common developmental variance $\sigma_{D,\text{\Neutral}}^2=\sigma_{D,\text{\Hermaphrodite}}^2$ shifts the boundaries between the different regimes (Fig.~\ref{fig:sigmaD}A): the value of $\sigma_G^2$ increases, as indicated by Eq.~\eqref{eq:s2G}, while the value of $\sigma_C^2$ decreases. A larger developmental variance may result from spatial environmental heterogeneities. For instance, we may consider that differences in local environments contribute to the developmental variance, $\sigma^2_{D,\rm tot}=\sigma^2_D+ \sigma^2_{D, \rm loc}$, or that different local environments are associated with different optimal phenotypes $y_t$ defining the selective pressure $S(\checkmark|\phi,y_t)$. If these locally optimal phenotypes $y_t$ are distributed normally around a mean optimal value $x_t$ with variance $\sigma^2_{E,\rm loc}$, the two points of view are equivalent and formally amount to redefining the developmental variance $\sigma_D^2$ by $\sigma_D^2+ \sigma^2_{D, \rm loc}+\sigma^2_{E,\rm loc}$ (Appendix~\ref{sec:spatial}). Whether spatial heterogeneities favor sex has thus no simple general answer but depends on the values of the genetic parameters $\sigma_M^2,\sigma_R^2$. \subsection{Mutational biases and directional selection}\label{sec:bias} We assumed mutations to be on average neutral but the model can be extended to analyze cases where their average effect is $c_M\neq 0$. This corresponds to generalizing $(iii)$ to $\gamma'=\gamma+\nu+c_M$ and $(iv)$ to $\gamma'=(\gamma_\sf+\gamma_\text{\Male})/2+\nu+c_M$. Formally, this is equivalent to introducing a systematic drift $c_E$ in the environment, i.e., to generalize $(v)$ to $x_{t+1}=ax_t+b_t+c_Et$. The growth rates of the models that include $c_M$ and $c_E$ depend indeed on these parameters only via the combination $c=c_E-c_M$. The genetic or environmental origin of this particular constraint is therefore irrelevant. Models with $c\neq 0$ are in many respects similar to models with $c=0$ but a large value of $a$ (Fig.~\ref{fig:sigmaD} and Appendices~\ref{app:2fold}, \ref{app:2fmore}, \ref{app:r}, \ref{app:2bis}). This is not surprising, as the parameters $a>1/3$ and $c>0$ similarly induce cross-generation environmental correlations. Two differences are nevertheless worth mentioning: the two-fold cost of sex is overcome in a larger range of conditions (Appendix~\ref{app:2fold}) and larger developmental variances increase $\sigma_C^2$ (Fig.~\ref{fig:sigmaD}B). These results recapitulate the conclusions {\color{black} of Charlesworth~\cite{Charlesworth:1993fg} who compared autocorrelated ($a>0, c=0$) and directed ($a=0,c>0$) environments in the regime $\sigma_R^2>\sigma_G^2$ and found that the two-fold cost of sex can be overcome only with directed environments.} Additionally, we find here that the two-fold cost of dioecy relative to monoecy can in principle be overcome under a sufficient mutational bias or/and directed selection (Appendices~\ref{app:2fold2} and \ref{app:S9}). {\color{black} This corresponds, however, to situations where the mean number $k$ of offsprings per reproductive event must be sufficiently large for the population to escape extinction ($\Lambda>0$, Appendices~\ref{app:2fmore} and \ref{app:S9}). This motivates an extension of the model to include phenotypic plasticity, which defines a generic mechanism by which the probability of extinction can be reduced.} \subsection{Phenotypic plasticity} One impediment to the evolution of dioecy through sexual dimorphism is the cost incurred by males, whose surviving fraction may be very small (Appendix~\ref{app:S9}). Phenotypic plasticity can alleviate this effect without comprising the benefit of sexual dimorphism at the population level. We assumed indeed that development from $\gamma$ to $\phi$ was independent of the environment but the model can be extended to include forms of phenotypic plasticity where $\phi$ also depends on $x_t$. For instance, we may consider that $\phi=(1-\k)\gamma+\k x_t+\nu$ with a reaction norm $\k\in [0,1]$ and, as before, a developmental noise $\nu\sim\mathcal{N}(\sigma_{D}^2)$. The absence of plasticity that we assumed so far corresponds to the particular case $\k=0$ (see Appendix~\ref{sec:plasticity} for a generalization to non-convex combinations of $\gamma$ and $x_t$). Growth rates are trivially optimized by taking $\k=1$ and $\sigma_{D}^2=0$, which effectively eliminates any effect of natural selection since $\phi=x_t$. Constraints are expected to prevent this optimum to be reached. One may for instance assume that $\phi=(1-\k)\gamma+\k y_t+\nu$ where the local environment $y_t$ experienced by an individual during development is only partially correlated to the selective pressure, e.g. $y_t=x_t+\nu$ with $\nu\sim\mathcal{N}(\sigma_L^2)$, or subject to a delay, e.g., $y_t=x_{t-\tau}$ with $\tau>0$. Growth rates can be obtained analytically in these cases but a simpler constraint is to assume that non-zero reaction norms $\k>0$ have a direct selective cost, which corresponds to multiplying $S(\checkmark|\phi,x_t)$ by a factor $C(\k)<1$ that is a decreasing function of $\k$~\cite{Chevin:2010cw}. This case can formally be mapped onto the basic model with an effective developmental variance that depends on $\k$ (Appendix~\ref{sec:plast_mapping}). Optimizing and evolving plasticity is therefore similar to optimizing and evolving developmental variances. For instance, in the dioecious case where the sexes may have different reaction norms $\k_\sf$ and $\k_\text{\Male}$, we find that in autoregressive environments $\k_\text{\Male}$ has no incidence on the growth rate while $\k_\sf$ effectively reduces $\sigma_E^2$ by a factor $(1-\k_\sf)^2$ (Appendix~\ref{sec:plasticity}). The optimal plasticity is then dimorphic, with $\hat\k_\text{\Male}$ taking arbitrary values and $\hat\k_\sf$ setting a balance between large values of $\k$ that minimize the effect of natural selection and small values of $\k$ that maximize $C(\k_\sf)$. Finally, we note that while plastic and non-plastic populations can be equivalent at the genotypic level, they are generally very different at the phenotypic level, and display in particular different phenotypic variances (Appendix~\ref{sec:phenononeq}). {\color{black} In particular, plasticity} allows for higher survival during maturation, with no loss at all in the extreme limit of perfect plasticity. \section{Discussion} We studied a model of sexually reproducing population that generalizes previous models of information processing in asexual populations subject to varying environments~\cite{lachmann1996inheritance,bergstrom2004shannon,kussell2005phenotypic,Rivoire:2011fy,Rivoire:2014kt}. {\color{black} The long-term growth rates that we calculate quantify the value of sexual reproduction and sexual dimorphism as schemes for transmitting information between generations. In particular, they} identify genetic and environmental conditions under which sexual reproduction and sexual dimorphism are optimal and may evolve. {\color{black} The Gaussian model that we solve analytically corresponds to the infinitesimal model of quantitative genetics, which applies to complex traits under the influence of many genes. This model plays a fundamental role in population genetics~\cite{lynch1998genetics}, similarly to the Gaussian channel in information theory~\cite{cover1999elements}. Our general framework, however, is not restricted to this model and can also be applied to models with discrete traits.} {\color{black} In the Gaussian context, our comparison of sexual and asexual reproductions mirrors an analysis by Charlesworth~\cite{Charlesworth:1993fg}, who similarly studied} the environmental conditions under which sexual reproduction can be adaptive. Our results are consistent, showing that a steadily changing environment is most favorable. We differ, however, in our parametrization of the model and in our interpretation of some of the results. Charlesworth compared populations with given variance of the trait in the population (given genetic variances) assuming that sexual reproduction leads to higher genetic variance. We parametrize the mechanisms generating mutations and recombination by two more elementary parameters, a mutational variance $\sigma_M^2$ and a segregation variance $\sigma_R^2$, from which we derive both the genetic variance and the long-term growth rate (fitness) of the population. We find that sexual reproduction leads to higher genetic variance only for sufficiently large $\sigma_R^2$, namely $\sigma_R^2>\sigma_G^2$ where $\sigma_G^2$ is given by Eq.~\eqref{eq:s2G}, independently of environmental variations. As a function of the two genetic parameters $\sigma_M^2,\sigma_R^2$, we therefore obtain in the most general case four phases (Fig.~\ref{fig:AH_opt}), defined on one hand by whether sexual reproduction increases the genetic variance, which is independent of environmental conditions, and, on the other hand, by whether this increase is beneficial, which depends on the environmental conditions. The advantage of sexual reproduction may thus be attributed to its ability to purge deleterious mutations either because it reduces variations, which can be beneficial when the mutational variance is too high, or because it increases them, which can be beneficial in presence of a mutational bias. The difference is significant: the first case is akin to the reduction of diversity attributed to blending inheritance while the second corresponds to recombination breaking down negative linkage disequilbrium~\cite{kondrashov1988deleterious,Otto:1998uq}. Similarly, varying environments may favor sexual reproduction either for providing more beneficial variations or for reducing detrimental variations. This second case is, maybe counter-intuitively, relevant when environments vary rapidly, as for instance in presence of co-evolving pathogens~\footnote{With auto-regressive environments the requirement is $\sigma_E^2<2(1-a)/(1+a)$, which includes drastic fluctuations that wipe out 90\% of a previously perfectly adapted population when $a=0$ and $\sigma_E^2=2$}. An additional value of using the mutational variance $\sigma_M^2$ and the segregation variance $\sigma_R^2$ as parameters is the connection that it allows with the problem of optimal mutation rate in asexual populations, where the key parameter is $\sigma_M^2$. The optimal mutational variance $\hat\sigma_M^2$ in this problem, which depends on the fluctuations of the environment, defines indeed the point at which the four phases meet (Fig.~\ref{fig:sM2}). Defining parameters for the genetic mechanisms also leads us to notice that a mutational bias has formally the same implications as a directional bias. This is important as the presence of a systematic bias towards deleterious mutation may represent a more generic constraint than a steadily moving environment. The relevance of this constraint for the evolution of sex has, however, been only recently stressed~\cite{Vanhoenacker:2018cj}. Our approach also suggests that the opposition that is often made between constraints of environmental or genetical origin may be misguided, as constraints of same origin may be of very different nature (e.g., mutational variance versus mutational bias) while constraints of different origin may be of same nature (e.g., directional selection and mutational bias). A genetic constraint at the level of the mutational variance appears, however, essential for sexual reproduction to possibly confer any adaptive advantage. Our model also formalizes and rigorously examines the possibility that sexual dimorphism may be adaptive in changing environments. This possibility was proposed by Geodakyan~\cite{Geodakyan:1965,Geodakyan:2015} but, to our knowledge, not previously examined mathematically. Under this hypothesis, females are more plastic or more subject to developmental noise than males, which permits an efficient integration of environmental information while preserving fecundity: the integration of information is performed by the males, whose phenotypes faithfully represent their genotypes while females are protected from direct elimination through selection by expressing phenotypes more loosely related to their genotypes. The environmental information obtained by males then flows to females in the next generation. This separation of roles in information processing has been asserted to be enough to overcome the two-fold cost of dioecy with respect to monoecy, thus providing an adaptive explanation for the ubiquitous presence of two sexes. {\color{black} By quantifying the value of this information scheme,} our model shows that sexual dimorphism can indeed confer an adaptive advantage but that its evolution is subject to several limitations. Within our model, Geodakyan's scenario is therefore theoretically possible but only under specific conditions that make it unlikely to provide a generic explanation for the evolution of sexual dimorphism. Whether our conclusions hold in more realistic generalization of our model remains, however, to be examined. While integrating different environmental and genetic constraints and accounting for some forms of spatial heterogeneities and phenotypic plasticity, our model indeed rests on strongly simplifying assumptions and cannot pretend to summarize the full range of factors that have been considered to play a role in the evolution of sex~\cite{Otto:1998uq,Otto:2002cn}. A strong assumption is that recombination can be described by a Gaussian model with fixed segregation variance $\sigma_R^2$. This assumption, which is known as the infinitesimal model, can be justified when the traits arise from the additive contribution of a large number of alleles, each contributing by an infinitesimal effect~\cite{barton2017infinitesimal}. Numerical simulations of models with a finite number of alleles show that sexual reproduction can lead to an increasing genetic variance~\cite{kondrashov1996high,Burger:1999wy,Waxman:1999vj}. While in contradiction with the infinitesimal model, these studies nevertheless concur in finding that directional selection, and therefore mutational biases, are favorable to sexual reproduction, as the underlying mechanism precisely rests on a larger genetic variance. {\color{black} By extending to sexual reproduction the quantification of biological information, our work invites an extension of the explanations of biological diversity~\cite{lachmann1996inheritance,Rivoire:2014kt,uller2015incomplete,mcnamara2016detection,mayer2016diversity} and the formal analogies~\cite{bergstrom2004shannon,kussell2005phenotypic,Rivoire:2011fy,Rivoire:2014kt,kussell2006polymer,skanata2016evolutionary,hirono2015jarzynski,kobayashi2015fluctuation,vinkler2016analogy,genthon2020fluctuation} previously developed for asexual populations. For instance, it would be interesting to generalize the formulation and interpretation of the models in terms of lineages to sexual populations whose genealogies are not tree-like~\cite{georgii2003supercritical,leibler2010individual,garcia2019linking}. Our work also motivates generalizations to account for other forms of horizontal transmission of information between individuals.} \vspace{2cm} \acknowledgements We are grateful to Denis Roze for comments and suggestions of references. Funding for this work was partly provided by the Alexander von Humboldt Foundation in the framework of the Sofja Kovalevskaja Award endowed by the German Federal Ministry of Education and Research.
\section{\large Introduction}\label{intro} \sloppy Copulas provide an effective tool for modeling dependence in various multivariate phenomena in the fields of reliability engineering, life sciences, environmental science, economics and finance, etc \citep[Ch-7]{Fontaine_et_al_2020, Cooray_2019, Joe_2006}. Specifically, in recent decades, bivariate copulas were used to generate bivariate distributions with suitable dependence properties \citep{Pos2, Pos3, Finkelstein_2003, Pos1}. The detailed discussion of historical developments, obtained results and perspectives along with the up to date theory can be found in \citet{Nelson_2006}. It should be noted that most copulas available in the literature possess some limitations in modeling negatively dependent data, which is a certain disadvantage, as negative dependence between vital variables is often encountered in real life. \citet{Leh} introduced several concepts of negative dependence for bivariate distributions. Later, \citet{Proschan} and \citet{Yan} extended the correponding definitions and developed stronger notions of bivariate negative dependence. See \citet{Dist} for detailed discussion on popular dependence notions and their applications in the context of continuous bivariate distributions. \cite{Scarsini_Shaked_1996} provided a detailed overview of the corresponding ordering properties for the multivariate distributions. These results provide useful tools for describing the dependence properties of copulas with respect to a dependence parameter. However, only a few bivariate copulas that allow for a simple and meaningful analysis of this kind have been developed and studied in the literature so far. The Farlie-Gumbel-Morgenstern (FGM) family of distributions exhibits negative dependence, but the Spearman's rho for this family lies within the interval $[-1/3,1/3]$ \citep{Schu}. \citet{Four} and \citet{Three} have conisdered the four-parameter and the three-parameter extensiosn of the FGM family proposed by \citet{Smir}, with Spearman's rho lying within the interval $[-0.48, 0.50]$, and $[-0.5, 0.43]$, respectively. To address this issue \citet{New} proposed another extension, but its application is limited because of a singular component that is concentrated on the corresponding diagonal. Some other extensions of the FGM coupla are discussed in \citet{FGM2} and \citet{FGM1}. \citet{Hurlimann_2015} have proposed a comprehensive extension of the FGM copula with the Spearman's rho and Kendall's tau attaining any value in $(-1,1)$. However, the dependence properties and ordering properties of these copulas are not well studied in the literature. Recently, \cite{Cooray_2019} proposed a new extension of FGM family which exhibits negative dependence among the variables in a very strong sense. However, it's Spearman's rho and Kendll's tau are restricted to $[-0.70,0]$, and $[-0.52,0]$, respectively. Thus, it is quite a challenging problem to construct a flexible bivariate copula with the correlation coefficient that takes any value in the interval $(-1,0)$. Moreover, it is not sufficient just to suggest this type of copula, but it is essential to describe its properties (including relevant stochastic comparisons) especially in the case of strong notions of dependence. We believe that the current study meets to some extend this challenge, as we propose an absolutely continuous negatively dependent copula which satisfies most of the popular notions of negative dependence available in the literature with correlation coefficients in the interval $(-1,0)$. The paper is organized as follows. In Section \ref{Copu}, we describe the baseline (for the proposed copula) distribution and discuss some basic properties including conditional distributions and correlation coefficients. Various notions of negative dependence in the context of the proposed copula and ordering properties are considered in Section \ref{NProp}, and Section \ref{OrderP}, respectively. Section \ref{Exam}, provides some examples of negatively dependent standard bivariate distributions. In Section \ref{Case}, as an illustration, we provide a real case study. Finally, some short concluding remarks are given in Section \ref{Con}. \section{The Bivariate Copula}\label{Copu} \citet{Bhuyan} proposed a negatively dependent bivariate life distribution that possesses nice, closed-form expressions for the joint distributions and exhibits various strong notions of negative dependence reported in the literature. Most importantly, its correlation coefficient may take any value in the interval $(-1,0)$. One of the marginal distributions is Exponential and the other belongs to skew log Laplace family. We utilize the negative dependence structure inherent in this model and formulate a copula with the strong negative dependence. The joint distribution function and the marginal distributions are given by \begin{equation}\label{Joint} H(x,y) = \begin{dcases} y^{\lambda} - e^{-\lambda x}+\dfrac{\lambda}{(\lambda+\mu)y^{\mu}}\left[ e^{(\lambda+\mu)x}-y^{\lambda+\mu}\right], & 0<y \leq 1, x>-\log y \\ 1-e^{-\lambda x}-\dfrac{\lambda}{(\lambda+\mu)y^{\mu}}\left[ 1-e^{-(\lambda+\mu)x}\right], & x>0, y>1, \end{dcases} \end{equation} and $F(x)= 1- e^{-\lambda x}$ for $x>0$, and $G(y) =\dfrac{\mu}{(\lambda+\mu)}y^{\lambda}\mathds{1}(0<y \leq1)+ \left[1-\dfrac{\lambda}{(\lambda+\mu)y^{\mu}}\right]\mathds{1}( y>1)$, respectively, where $\lambda,\mu >0$. Note that $F(\cdot)$ and $G(\cdot)$ are continuous. We first, find the quasi-inverse functions of $F(\cdot)$ and $G(\cdot)$ and 'insert' those into the arguments of the joint distribution function $H(\cdot,\cdot)$ given by (\ref{Joint}). Then by Corollary 2.3.7 of \citet[p-22]{Nelson_2006}, we obtain the following copula \begin{equation}\label{Cop} C_{\lambda, \mu}(u,v) = \begin{dcases} v-(1-u)+\dfrac{\lambda\mu^{\frac{\mu}{\lambda}}}{(\lambda+\mu)^{1+\frac{\mu}{\lambda}}}(1-u)^{{1+\frac{\mu}{\lambda}}}v^{-\frac{\mu}{\lambda}}, & 0<v \leq\dfrac{\mu}{\mu+\lambda}, 1-\dfrac{(\lambda +\mu)v}{\mu}<u<1, \\ u-(1-v)\left[1-(1-u)^{{1+\frac{\mu}{\lambda}}}\right], & 0<u<1, \dfrac{\mu}{\mu+\lambda}<v<1. \end{dcases} \end{equation} Now using the reparameterization $\mu=\theta \lambda $, in (\ref{Cop}), we rewrite $C_{\lambda, \mu}$ as \begin{equation}\label{Copula} C_\theta(u,v) = \begin{dcases} v-(1-u)+\dfrac{\theta^\theta}{(1+\theta)^{1+\theta}}(1-u)^{1+\theta}v^{-\theta}, & 0<v \leq\dfrac{\theta}{1+\theta}, 1-\dfrac{(1+\theta)v}{\theta}<u<1 \\ u-(1-v)\left[1-(1-u)^{1+\theta}\right], & 0<u<1, \dfrac{\theta}{1+\theta}<v<1, \end{dcases} \end{equation} for $\theta >0$. It is easy to verify that $C_\theta(u,v)$, given by (\ref{Copula}), satisfies the following conditions: (i) $C_\theta(u,0)=0=C_\theta(0,v)$, (ii) $C_\theta(u,1)=u$, $C_\theta(1,v)=v$, for any $u$, $v$ in $I=[0,1]$, and (iii) $C_\theta(u_2,v_2)-C_\theta(u_2, v_1)-C_\theta(u_1, v_2)+C_\theta(u_1,v_1)\geq 0$, for any $u_1, u_2, v_1, v_2$ in $I$ with $u_1\leq u_2$ and $v_1\leq v_2$. In Figure \ref{Copula_plot}, we provide graphical presentation of the proposed copula for different values of the dependence parameter $\theta$. \begin{figure}[htp] \centering \subfigure [Copula plot for $\theta=0.1$] { \includegraphics[scale=0.50]{Cop_0.1.pdf} \label{fig:subfig1} } \subfigure[Copula plot for $\theta=1$]{ \includegraphics[scale=0.5]{Cop_1.pdf} \label{fig:subfig2} } \subfigure[Copula plot for $\theta=5$]{ \includegraphics[scale=0.50]{Cop_5.pdf} } \subfigure[Copula plot for $\theta=10$]{ \includegraphics[scale=0.50]{Cop_10.pdf} \label{fig:subfig3} } \caption{ Graphical plots of $C_{\theta}$ for different choices of $\theta$ on an unit square.} \label{Copula_plot} \end{figure} The survival copula and the density function of the proposed copula $C_\theta(u,v)$ are given by \begin{equation} \bar{C}_\theta(u,v) = \begin{dcases} \dfrac{\theta^\theta}{(1+\theta)^{1+\theta}}u^{1+\theta}(1-v)^{-\theta}, & 0<v \leq\dfrac{\theta}{1+\theta}, 1-\dfrac{(1+\theta)v}{\theta}<u<1 \nonumber\\ vu^{(1+\theta)}, & 0<u<1, \dfrac{\theta}{1+\theta}<v<1, \end{dcases} \end{equation} and \begin{equation}\label{eqn_den} c_\theta(u,v) = \begin{dcases} \dfrac{\theta^{1+\theta}}{(1+\theta)^\theta}(1-u)^\theta v^{-(1+\theta)}, & 0<v \leq\dfrac{\theta}{1+\theta}, 1-\dfrac{(1+\theta)v}{\theta}<u<1 \\ (1+\theta)(1-u)^\theta, & 0<u<1, \dfrac{\theta}{1+\theta}<v<1, \end{dcases} \end{equation} respectively. \subsection{Conditional Copulas} The conditional copula of $U$ given $V=v$, is as follows. For $0<v \leq\frac{\theta}{(1+\theta)}$, \begin{equation}\label{U_V_1} C_\theta(u|v)= 1- \dfrac{\theta^{(1+\theta)}}{(1+\theta)^{(1+\theta)}}(1-u)^{(1+\theta)} v^{-(1+\theta)}, \,\,\,\,1-\dfrac{(1+\theta)v}{\theta}<u<1, \end{equation} whereas for $\frac{\theta}{(1+\theta)}<v<1$, \begin{equation}\label{U_V_2} C_\theta(u|v)= 1-(1-u)^{(1+\theta)}, \,\,\,\,\,0<u<1. \end{equation} The conditional mean and variance of $U|V=v$ are given by \begin{equation} E[U|V=v]= \begin{dcases} 1-\dfrac{(1+\theta)^2v}{\theta(\theta+2)}, & 0<v \leq\dfrac{\theta}{1+\theta} \nonumber\\ \dfrac{1}{\theta+2}, & \dfrac{\theta}{1+\theta}<v<1, \end{dcases} \end{equation} and \begin{equation} Var[U|V=v]= \begin{dcases} \dfrac{(1+\theta)^3v^2}{\theta^2(\theta +2)^2(\theta +3)},& 0<v \leq\dfrac{\theta}{1+\theta} \nonumber\\ \dfrac{\theta+1}{(\theta+2)^2(\theta+3)},& \dfrac{\theta}{1+\theta}<v<1, \end{dcases} \end{equation} respectively. \begin{remark} {\rm The regression of $U$ on $V=v$ is linearly decreasing in $v$ for $0<v\leq \frac{\theta}{\theta+1}$, and independent of $v$ for $\frac{\theta}{\theta+1}<v<1$. Also, it is interesting to note that the conditional variance of $U|V=v$ is an increasing function of $v$ and bounded from above by $\frac{\theta+1}{(\theta+2)^2(\theta+3)}.$} \end{remark} The conditional copula of $V$ given $U=u$, is given by \begin{equation}\label{V_U} C_\theta(v|u)= \begin{dcases} 1- \dfrac{\theta^\theta}{(1+\theta)^\theta}(1-u)^\theta v^{-\theta}, & \dfrac{(1-u)\theta}{(1+\theta)}<v \leq\dfrac{\theta}{1+\theta} \\ 1-(1+\theta)(1-v)(1-u)^\theta, & \dfrac{\theta}{1+\theta}<v<1 \end{dcases} \end{equation} The conditional mean and variance of $V|U=u$, are given by \begin{equation}E[V|U=u]=\dfrac{(1-u)^\theta}{2(1-\theta)}-\dfrac{2\theta^2(1-u)}{1-\theta^2}\nonumber, \end{equation} for $\theta \neq 1$, and \begin{equation}Var[V|U=u]=\dfrac{1}{(\theta^2-1)^2}\left[-\dfrac{(1+\theta)(1-u)^\theta\left[ 2 - \theta + \theta^2 (2 - 6 u) + 3 \theta^3 u\right]}{3(\theta-2)}+\dfrac{\theta^3(1-u)^2}{\theta-2}-\dfrac{(1+\theta)^2(1-u)^{2\theta}}{4}\right]\nonumber, \end{equation} for $\theta \neq 1,2$, respectively. \begin{remark} {\rm The regression of $V$ on $U=u$ is strictly decreasing in $u$.} \end{remark} One can use the conditional copula of $U$ given $V=v$, provided in (\ref{U_V_1}) and (\ref{U_V_2}), to simulate from the proposed copula $C_{\theta}$, given by (\ref{Copula}), using the following steps. \begin{itemize} \item[Step I.] Simulate $v_i$ and $u_i^{\ast}$ independently from standard uniform distribution. \item[Step II.] If $v_i\le \frac{\theta}{\theta+1}$, then solving $C_{\theta}(u|v_i)=u_i^{\ast}$ from (\ref{U_V_1}), we get $u_i=1-(\frac{\theta+1}{\theta})v_i(1-u_i^{\ast})^{\frac{1}{1+\theta}}$;\\ else, solving $C_{\theta}(u|v_i)=u_i^{\ast}$ from (\ref{U_V_2}), we get $u_i=1-(1-u_i^{\ast})^{\frac{1}{1+\theta}}$. \item[Step III.] Repeat Step I and Step II $n$ times to obtain independently and identically distributed realizations $(u_i,v_i)$, for $i=1,2,\ldots,n$ from $C_{\theta}$. \end{itemize} A similar algorithm can be elaborated to simulate from $C_{\theta}$ based on the conditional copula of $V$ given $U$, provided in (\ref{V_U}). Scatter plots based on $500$ simulated observations using the aforementioned algorithm for four different values of $\theta$ are given in Figure \ref{Scatter}. As expected, the data points are getting closer to the diagonal $v=-u$ for higher values of $\theta$. \begin{figure}[htp] \centering \subfigure [Scatter plot for $\theta=0.1$] { \includegraphics[scale=0.40]{Scatter_0.1.pdf} \label{fig:subfig01} } \subfigure[Scatter plot for $\theta=1$]{ \includegraphics[scale=0.4]{Scatter_1.pdf} \label{fig:subfig02} } \subfigure[Scatter plot for $\theta=5$]{ \includegraphics[scale=0.40]{Scatter_5.pdf} } \subfigure[Scatter plot for $\theta=10$]{ \includegraphics[scale=0.40]{Scatter_10.pdf} \label{fig:subfig03} } \caption{ Scatter plots based on $500$ simulated observations from $C_{\theta}$ for different choices of $\theta$.} \label{Scatter} \end{figure} \subsection{Basic Properties}\label{Prop} \begin{proposition}\label{pro21} The copula $C_{\theta}$, defined in (\ref{Copula}), is decreasing with respect to its dependence parameter $\theta$, i.e., if $\theta_1\leq \theta_2$ then $C_{\theta_2}(u,v)\leq C_{\theta_1}(u,v)$, for all $(u,v) \in I^2 = [0,1]\times[0,1]$. \end{proposition} \begin{proof} {\bf Case I.} For $0<v \leq\frac{\theta}{1+\theta}$, and $1-\frac{(1+\theta)v}{\theta}<u<1$, we have \begin{eqnarray*} \dfrac{\partial C_\theta}{\partial \theta} &=& \dfrac{\theta^\theta}{(1+\theta)^{(1+\theta)}}(1-u)^{(1+\theta)}v^{-\theta}\left[ \log\left(\dfrac{\theta}{1+\theta}\right) +\log(1-u)-\log(v) \right]\\ &\leq& \dfrac{\theta^\theta}{(1+\theta)^{(1+\theta)}}(1-u)^{(1+\theta)}v^{-\theta}\left[ \log\left(\dfrac{\theta}{1+\theta}\right) +\log\left[\dfrac{(1+\theta)v}{\theta}\right]-\log(v) \right], \text{since $(1-u)\leq \dfrac{(1+\theta)v}{\theta}$}\\ &=&0 \end{eqnarray*} {\bf Case II.} For $0<u<1$, and $\frac{\theta}{1+\theta}<v<1$, we have $$\dfrac{\partial C_\theta}{\partial \theta}= (1-u)^{(1+\theta)}(1-v)\log(1-u)\leq 0.$$ Now combining Case I and II, we have $\dfrac{\partial C_\theta}{\partial \theta}\leq 0$ for all $(u,v)\in I^2$, which implies $C_{\theta}$ is decreasing in $\theta$. \end{proof} \begin{proposition} The copula $C_{\theta}$, defined in (\ref{Copula}), is sub-harmonic, i.e., $\nabla^2 C_\theta(u,v) \geq 0$. \end{proposition} \begin{proof} {\bf Case I.} For $0<v \leq\frac{\theta}{1+\theta}$, and $1-\frac{(1+\theta)v}{\theta}<u<1$, we have \begin{eqnarray*} \nabla^2 C_\theta(u,v)& =& \dfrac{\partial^2 C_\theta(u,v)}{\partial u^2} + \dfrac{\partial^2 C_\theta(u,v)}{\partial v^2}\\ &= & \dfrac{\theta^{(1+\theta)}}{(1+\theta)^\theta}\left[(1 - u)^{(\theta-1)} v^{-\theta} + (1-u)^{(1+\theta)}v^{-(2+\theta)}\right]\geq 0 \end{eqnarray*} {\bf Case II.} For $0<u<1$, and $\frac{\theta}{1+\theta}<v<1$, we have \begin{eqnarray*} \nabla^2 C_\theta(u,v)& =& \dfrac{\partial^2 C_\theta(u,v)}{\partial u^2} + \dfrac{\partial^2 C_\theta(u,v)}{\partial v^2}\\ &= & \theta (1 + \theta) (1 - u)^{(\theta-1)} (1 - v)\geq 0 \end{eqnarray*} Now from Case I and II we can write $\nabla^2 C_\theta(u,v) \geq 0$ for all $(u,v)\in I^2$, and hence the result follows. \end{proof} \begin{proposition} The copula $C_{\theta}$, defined in (\ref{Copula}), is absolutely continuous. \end{proposition} \begin{proof} To establish the absolute continuity of the proposed copula $C_{\theta}$, it is required to show $$\int_0^u\int_0^v\dfrac{\partial^2}{\partial s\partial t}C_\theta(s,t)dtds =C_\theta(u,v),$$ for every $(u,v)\in I^2$.\\ \\ {\bf Case I.} For $0<v \leq\frac{\theta}{1+\theta}$, and $1-\frac{(1+\theta)v}{\theta}<u<1$, we have \begin{eqnarray*} \int_0^u\int_0^v\dfrac{\partial^2}{\partial s\partial t}C_\theta(s,t)dtds &=& \int_{1-\frac{(1+\theta)v}{\theta}}^u\int_{\frac{\theta(1-s)}{(1+\theta)}}^v\dfrac{\theta^{1+\theta}}{(1+\theta)^\theta}(1-s)^\theta t^{-(1+\theta)}dtds\\ &=& \int_{1-\frac{(1+\theta)v}{\theta}}^u\left[1-\left(\frac{\theta}{1+\theta}\right)^\theta(1-s)^\theta v^{-\theta}\right] ds\\ &=&\int_{1-u}^{\frac{(1+\theta)v}{\theta}}\left[1-\left(\frac{\theta}{1+\theta}\right)^\theta z^\theta v^{-\theta}\right] dz \,\,\,({\rm where}\,\, z = 1-s)\\ &=& v-(1-u)+\dfrac{\theta^\theta}{(1+\theta)^{1+\theta}}(1-u)^{1+\theta}v^{-\theta}=C_\theta(u,v). \end{eqnarray*} {\bf Case II.} For $0<u<1$, and $\frac{\theta}{1+\theta}<v<1$, we have \begin{eqnarray*} \int_0^u\int_0^v\dfrac{\partial^2}{\partial s\partial t}C_\theta(s,t)dtds &=& \int_0^u\int_{\frac{\theta(1-s)}{(1+\theta)}}^{\frac{\theta}{(1+\theta)}}\dfrac{\theta^{1+\theta}}{(1+\theta)^\theta}(1-s)^\theta t^{-(1+\theta)}dtds+\int_0^u\int_{\frac{\theta}{(1+\theta)}}^v(1+\theta)(1-s)^\theta dtds\\ &=& \int_0^u\left[1-(1-s)^\theta\right] ds + \int_0^u \left[ v-\theta(1 - v)\right](1 - s)^\theta\\ &=& u-\dfrac{1}{1+\theta}+\dfrac{(1-u)^{\theta+1}}{\theta + 1}+ \left[ v-\theta(1 - v)\right]\dfrac{\left[1-(1-u)^{(\theta+1)}\right]}{1+\theta}\\ &=& u-(1-v)\left[1-(1-u)^{(\theta+1)}\right]=C_\theta(u,v). \end{eqnarray*} Therefore, the results follows by combining Case I and II. \end{proof} \subsection{Measures of Dependence }\label{Dependence} Measures of dependence are commonly used to summarize the complicated dependence structure of bivariate distributions. See \cite{Joe_1997} and \cite{Nelson_2006} for a detailed review on measures of dependence and associated properties. In this section, we derive the expressions for the Kendall’s tau and the Spearman’s rho based on the proposed copula $C_\theta$. Essentially, these coefficients measure the correlation between the ranks rather than actual values of $X$ and $Y$. Therefore, these coefficients are unaffected by any monotonically increasing transformation of $X$ and $Y$. \begin{definition} Let $X$ and $Y$ be the continuous random variables with the dependence structure described by the copula $C$. Then the population version of the Spearman’s rho for $X$ and $Y$ is given by $$\rho :=\int_0^1\int_0^1uvdC(u,v)-3= \int_0^1\int_0^1C(u,v)dudv-3$$ \end{definition} \begin{proposition} Let $(X, Y)$ be a random pair with copula $C_\theta$. The Spearman’s rho is given by $$\rho =\dfrac{2(3+3\theta+\theta^2)}{2+3\theta+\theta^2}-3,$$ which is a decreasing function in $\theta$ and takes any values between 0 and -1. \end{proposition} \begin{definition} Let $X$ and $Y$ be the continuous random variables with copula $C$. Then, the population version of the Kendall’s tau for $X$ and $Y$ is given by $$\tau := 4\int_0^1\int_0^1C(u,v)dC(u,v)-1$$ \end{definition} \begin{proposition} Let $(X, Y)$ be a random pair with copula $C_\theta$. Then the Kendall’s tau is given by $$\tau =\dfrac{-\theta}{(1+\theta)},$$ which is a decreasing function in $\theta$ and takes any values between 0 and -1. \end{proposition} In Figure \ref{Corr_plot}, we have plotted the Spearman’s rho and the Kendall’s tau against the dependence parameter $\theta$. It is easy to see that the Spearman’s rho is less than the Kendall’s tau for all $\theta>0$. \begin{figure} \centering \includegraphics[scale=0.5]{Correlation.pdf} \caption{Plot of Spearman's rho and Kendall's tau against the dependence parameter $\theta$.} \label{Corr_plot} \end{figure} \section{Connections with notions of Negative Dependence}\label{NProp} As discussed in Subsection \ref{Dependence}, the Spearman's rho and the Kendall's tau measure the correlation between two random variables. However, it is possible, in principle, that these random variables may have the strong correlation, but possess the weak association with respect to different notions of dependence, or vice versa. Therefore, having in mind this observation, in this section, we discuss several relevant notions of negative dependence, namely \textit{Quadrant Dependence}, \textit{Regression Dependence} and \textit{Likelihood Ratio Dependence}, etc., and explore relevant connections for the proposed copula. First, we provide the definitions of the aforementioned dependence notions, as discussed in \cite{Nelson_2006} and \cite{Dist}. \begin{definition}\label{Orders} Let $X$ and $Y$ be continuous random variables with copula $C$. Then \begin{enumerate} \item $X$ and $Y$ are Negatively Quadrant Dependent (NQD) if $P(X \leq x, Y \leq y) \leq {P(X \leq x)P(Y \leq y)}$, for all $(x, y) \in R^2$, where $R^2$ is the domain of joint distribution of $X$ and $Y$, or equivalently a copula $C$ is said to be NQD if for all $(u,v)\in I^2$, $C(u,v)\leq uv.$ \item $Y$ is left tail increasing in $X$ (LTI($Y|X$)), if $P[Y \leq y |X \leq x]$ is a nondecreasing function of $x$ for all $y$. \item $X$ is left tail increasing in $Y$ (LTI($X|Y$)), if $P[X \leq x |Y \leq y]$ is a nondecreasing function of $y$ for all $x$. \item $Y$ is right tail decreasing in $X$ (RTD($Y|X$)), if $P[Y > y |X > x]$ is a nonincreasing function of $x$ for all $y$. \item $X$ is left tail increasing in $Y$ (RTD($X|Y$)), if $P[X >x |Y > y]$ is a nonincreasing function of $y$ for all $x$. \item $Y$ is stochastically decreasing in $X$ denoted as SD($Y|X$),(also known as negatively regression dependent ($Y|X$)) if $P[Y > y |X = x]$ is a nonincreasing function of $x$ for all $y$. \item $X$ is stochastically decreasing in $Y$ denoted as SD($X|Y$), (also known as negatively regression dependent ($X|Y$)) if $P[X > x| Y = y]$ is a nonincreasing function of $y$ for all $x$. \item \label{eqn_NLR} Let $X$ and $Y$ be continuous random variables with joint density function $h(x,y)$. Then $X$ and $Y$ are negatively likelihood ratio dependent, denote by NLR(X,Y), if $h(x_1,y_1)h(x_2,y_2)\leq h(x_1,y_2)h(x_2,y_1)$ for all $x_1, x_2, y_1, y_2\in I$ such that $x_1\leq x_2$ and $y_1\leq y_2$. \end{enumerate} \end{definition} \begin{theorem} Let $X$ and $Y$ be two random variables with copula $C_\theta$. Then $(i)$ $X$ and $Y$ are LTI($Y|X$), $(ii)$ $X$ and $Y$ are LTI($X|Y$), $(iii)$ $X$ and $Y$ are RTD($Y|X$), and $(iv)$ $X$ and $Y$ are RTD($X|Y$). \end{theorem} \begin{proof} (i) To establish LTI($Y|X$), it is sufficient to show that for any $v$ in $I$, $\frac{C(u,v)}{u}$ is nondecreasing in $u$ \citep[Theorem 5.2.5, p-192]{Nelson_2006}. For $0<u<1$, and $\frac{\theta}{1+\theta}<v<1$, we have $$\dfrac{\partial}{\partial u}\left[\dfrac{C(u,v)}{u}\right]=\dfrac{(1-v)[1-(1-u)^\theta(1+\theta u)]}{u^2}.$$ Now we need to prove that $[1-(1-u)^\theta(1+\theta u)]>0$. Define $h(u):=(1-u)^\theta(1+\theta u)$. Observe that $h(0)=1$, $h(1)=0$, and $h(u)$ is a decreasing function in $u$, since $h^{'}(u)=-\theta^2(1+\theta)u(1-u)^{(\theta-1)}<0$ for all $u\in(0,1)$. Therefore, $\frac{\partial}{\partial u}\left[\frac{C(u,v)}{u}\right]>0$.\\ Similarly, for $0<v \leq\frac{\theta}{1+\theta}$, and $1-\frac{(1+\theta)v}{\theta}<u<1$, it can be shown that $$\dfrac{\partial}{\partial u}\left[\dfrac{C(u,v)}{u}\right]=- \dfrac{\frac{\theta^\theta}{(1+\theta)^{(1+\theta)}}(1+\theta u)(1-u)^\theta +v^{(1+\theta)}-v^\theta}{ u^2v^\theta}>0.$$ Hence, the result follows.\\ (ii) In view of Theorem 5.2.5 in \cite[p-192]{Nelson_2006}, the necessary and sufficient condition for LTI($X|Y$) is that, $\frac{C(u,v)}{v}$ is nondecreasing in $v$, for any $u$ in $I$. For $0<v \leq\frac{\theta}{1+\theta}$, and $1-\frac{(1+\theta)v}{\theta}<u<1$, we have $$\dfrac{\partial}{\partial v}\left[\dfrac{C(u,v)}{v}\right]= \dfrac{(u-1)\left[\frac{\theta^\theta}{(1+\theta)^{\theta}}(1-u)^\theta- v^{\theta}\right]}{v^{\theta+2}}\geq 0,$$ since $(u-1)<0$ and $\left[\frac{\theta^\theta}{(1+\theta)^{\theta}}(1-u)^\theta- v^{\theta}\right]<0$. \\ Similarly, for $0<u<1$, and $\frac{\theta}{1+\theta}<v<1$, we have $$\dfrac{\partial}{\partial v}\left[\dfrac{C(u,v)}{v}\right]=\dfrac{(u-1)[(1-u)^\theta-1]}{v^2}\ge 0.$$ Hence, the result follows.\\ (iii) To establish RTD($Y|X$), it is sufficient to show that $\frac{v-C(u,v)}{(1-u)}$ is a nondecreasing function in $u$ for any $v\in I$ \citep[Theorem 5.2.5, p-192]{Nelson_2006}.\\ For $0<v \leq\frac{\theta}{1+\theta}$ and ${1-\frac{(1+\theta)v}{\theta}<u<1}$, we have $$\dfrac{\partial}{\partial u}\left[\dfrac{v-C(u,v)}{(1-u)}\right]= \left(\dfrac{\theta}{1+\theta}\right)^{1+\theta}(1-u)^{\theta-1}v^{-\theta}>0.$$\\ Similarly, for $0<u<1$, and $\dfrac{\theta}{1+\theta}<v<1$, we have $$\dfrac{\partial}{\partial u}\left[\dfrac{v-C(u,v)}{(1-u)}\right]= (1-v)(1-u)^{\theta -1}>0.$$ Hence, the conclusion follows.\\ (iv) By Theorem 5.2.5 in \cite[p-192]{Nelson_2006}, RTD($Y|X$) holds, if $\frac{u-C(u,v)}{(1-v)}$ is a nondecreasing function in $v$ for any $u\in I$. For $0<v \leq\frac{\theta}{1+\theta}$ and $1-\frac{(1+\theta)v}{\theta}<u<1$, we have $$\dfrac{\partial}{\partial v}\left[\dfrac{u-C(u,v)}{(1-v)}\right]=\dfrac{\frac{\theta^\theta}{(1+\theta)^{(1+\theta)}}(1-u)^{1+\theta}v^{-(1+\theta)}[\theta(1-v)-v]}{(1-v)^2},$$ which is non-negative, since $v <\frac{\theta}{1+\theta}$.\\ Similarly, for any fixed $u\in I$, and $\frac{\theta}{1+\theta}<v<1$, $\frac{u-C(u,v)}{(1-v)}=1-(1-u)^{1+\theta}$ is a constant function in $v$. Hence the results follows. \end{proof} \begin{theorem} Let $X$ and $Y$ be two random variables with copula $C_\theta$. Then $(i)$ $X$ and $Y$ are SD($Y|X$), and $(ii)$ $X$ and $Y$ are SD($X|Y$). \end{theorem} \begin{proof} To establish SD($Y|X$) property of the proposed copula $C_{\theta}$, we utilise the geometric interpretation of the stochastic monotonicity given in Corollary 5.2.11 of \cite[p-197]{Nelson_2006}. Therefore, it is sufficient to show that $C_\theta(u,v)$ is a convex function of $u$. Similarly, SD($X|Y$) can be established by showing $C_\theta(u,v)$ is a convex function of $v$.\\ (i) For $0<v \leq\frac{\theta}{1+\theta}$, and $1-\frac{(1+\theta)v}{\theta}<u<1$, we have $$\dfrac{\partial^2}{\partial u^2}C_\theta(u,v) = \dfrac{\theta^{(1+\theta)}}{(1+\theta)^\theta}(1-u)^{\theta-1}v^{-\theta}>0.$$ For $0<u<1,$ and $\frac{\theta}{1+\theta}<v<1$, we have $$\dfrac{\partial^2}{\partial u^2}C_\theta(u,v) =\theta (1+\theta)(1-v)(1-u)^{(\theta -1)}> 0.$$ Hence $C_\theta(u,v)$ is a convex function of $u$.\\ (ii) For $0<v \leq\frac{\theta}{1+\theta}$, and $1-\frac{(1+\theta)v}{\theta}<u<1$, we have $$\dfrac{\partial^2}{\partial v^2}C_\theta(u,v) ={ \dfrac{\theta^{(1+\theta)}}{(1+\theta)^\theta}(1-u)^{1+\theta}v^{-(2+\theta)}}>0.$$ Note that, for any fixed $u\in I$, and $\frac{\theta}{1+\theta}<v<1$, $\frac{\partial}{\partial v}C_\theta(u,v)$ is a constant function of $v$. Hence, the result follows. \end{proof} \begin{theorem}\label{NLR_thm} Let $X$ and $Y$ be two random variables with copula $C_\theta$. Then $X$ and $Y$ are NLR. \end{theorem} \begin{proof} To established the NLR between $X$ and $Y$ with copula $C_\theta$, we need to show $c_\theta(u_1,v_1)c_\theta(u_2,v_2)\leq c_\theta(u_1,v_2)c_\theta(u_2,v_1)$ holds for all $u_1\leq u_2$, and $v_1\leq v_2$, where $c_\theta(u,v)$ is the copula density given in (\ref{eqn_den}). Note that for the proposed copula $C_{\theta}$, the aforementioned condition holds with equality for all $u_1\leq u_2$ and $v_1\leq v_2$ in $I$. \end{proof} \begin{remark} {\rm Two random variables $X$ and $Y$ with the copula $C_{\theta}$ are NQD. This directly follows from Theorem \ref{def_NLR}. See the interrelationships between different concepts of negative dependence summarised in \citep[p-130]{Dist} for details.} \end{remark} \section{Ordering Properties}\label{OrderP} In Section \ref{NProp}, several negative dependence properties of the proposed copula $C_\theta$ has been investigated for the fixed $\theta>0$. In this section, we discuss the ordering properties of this copula $C_\theta$, which provides a precise (and also intuitively expected) notion for one bivariate distribution to be more positively or negatively associated than another. For this purpose, we first recall the definitions of the dependence orderings for bivariate distributions. These definitions describe the strength of dependence of a copula with respect to its dependence parameter $\theta$. \cite{Leh} was first to introduce the NQD and NRD notions. The corresponding orderings \cite{Yanagimoto_Okamoto_1969} were then defined as \begin{definition} Let $F$ and $G$ be two bivariate distributions with the same marginals. Then $F$ is said to be smaller than $G$ in the NQD sense denoted as $F\prec_{NQD}G$ if $$F(x,y)\geq G(x,y)\,\,\,\,\,\,\forall x\,\, {\rm and}\,\, y.$$ \end{definition} \begin{definition}\label{def42} Let $F$ and $G$ be two bivariate distributions with the same marginals, and let $(U, V)$ and $(X, Y)$ be two random vectors having the distributions $F$ and $G$, respectively. Then $F$ is said to be smaller than $G$ in the NRD sense, denoted by $F\prec_{NRD} G $ or $(U, V)\prec_{NRD} (X, Y)$ if, for any $x_1\leq x_2$, \begin{equation*} F^{-1}_{V|U}(u|x)\geq F^{-1}_{V|U}(v|x^{'})\implies G^{-1}_{V|U}(u|x)\geq G^{-1}_{V|U}(v|x^{'}) \end{equation*} for any $u, v \in I$, where $F_{V|U}$ denote the conditional distribution of $V$ given $U = u$ and $F^{-1}_{V|U}$ denote its right-continuous inverse. Equivalently, $F\prec_{NRD} G $ if and only if $G^{-1}_{Y|X}\left[F_{V|U}(y|x)|x\right]$ is decreasing in $x$ for all $y$ \citep{Fang_Joe_1992}. \end{definition} Later, \cite{Kimeldorf_Sampson_1987} have introduced and studied in detail the notion of the Negatively Likelihood Ratio (NLR) dependence ordering that is described in the following definition. Let the random variables $X$ and $Y$ have the joint distribution $G(x,y)$. For any two intervals $I_1$ and $I_2$ of the real line, let us denote $I_1\leq I_2$ if $x_1\in I_1$ and $x_2\in I_2$ imply that $x_1\leq x_2$. For any two intervals $I$ and $J$ of the real line let $G(I, J)$ represent the probability assigned by $G$ to the rectangle $I\times J$. \begin{definition}\label{def_NLR} Let $F$ and $G$ be two bivariate distributions with the same marginals, and let $(U, V)$ and $(X, Y)$ be two random vectors having the distributions $F$ and $G$, respectively. Then $F$ is said to be smaller than $G$ in the NLR dependence sense, denoted by $F \prec_{NLR} G$ or $(U, V) \prec_{NLR} (X, Y)$ if $ F(I_1, J_1)F(I_2, J_2) G(I_1, J_2)G(I_2, J_1)\geq F(I_1, J_2)F(I_2, J_1) G(I_1, J_1)G(I_2, J_1)$ whenever $I_1\leq I_2$ and $J_1\leq J_2$. When the densities $F$ and $G$ exist and denoted by $f$ and $g$, respectively, then the aforementioned condition equivalently is written as $f(x_1, y_1)f(x_2, y_2) g(x_1, y_2)g(x_2, y_1)\geq f(x_1, y_2)f(x_2, y_1) g(x_1, y_1)g(x_2, y_1) $ whenever $x_1\leq x_2$ and $y_1\leq y_2$. \end{definition} \begin{theorem} If $\theta_1\leq \theta_2$, then $C_{\theta_1}(u,v)\prec_{NQD}C_{\theta_2}(u,v).$ \end{theorem} \begin{proof} The results directly follow from Proposition \ref{pro21}. \end{proof} \begin{theorem} If $\theta_1\leq \theta_2$, then $C_{\theta_1}(u,v)\prec_{NRD}C_{\theta_2}(u,v).$ \end{theorem} \begin{proof} Let $\theta_1\leq \theta_2$. The conditional copula of $V$ given $U=u$ is given by \begin{equation*} C_{\theta_1}(v|u)=\begin{dcases} 1- \dfrac{\theta_1^{\theta_1}}{(1+\theta_1)^{\theta_1}}(1-u)^{\theta_1} v^{-\theta_1}, & \dfrac{(1-u)\theta_1}{(1+\theta_1)}<v <\dfrac{\theta_1}{1+\theta_1} \\ 1-(1+\theta_1)(1-v)(1-u)^{\theta_1}, & \dfrac{\theta_1}{1+\theta_1}<v<1. \end{dcases} \end{equation*} Then $C_{\theta_2}^{-1}(C_{\theta_1}(v|u)|u)$ is given by \begin{equation*} C_{\theta_2}^{-1}(C_{\theta_1}(v|u)|u) =\begin{dcases} \dfrac{\theta_2(1+\theta_1)^{(\theta1/\theta_2)}}{(1+\theta_2)\theta_1^{(\theta1/\theta_2)}}(1-u)^{1-{(\theta1/\theta_2)}}v^{(\theta1/\theta_2)}, & 0<v\leq1-(1-u)^{\theta_2} \\ 1-\dfrac{1+\theta_1}{1+\theta_2}(1-v)(1-u)^{(\theta1-\theta_2)}, & 1-(1-u)^{\theta_2}<v< 1. \end{dcases} \end{equation*} Note that $ C_{\theta_2}^{-1}(C_{\theta_1}(v|u)|u)$ is a decreasing function in $u$ as $\theta_1\leq \theta_2$. Now, using Definition \ref{def42}, the result follows. \end{proof} \begin{theorem} If $\theta_1\leq \theta_2$, then $C_{\theta_1}(u,v)\prec_{NLR}C_{\theta_2}(u,v).$ \end{theorem} \begin{proof} Let $\theta_1\leq \theta_2$. Now, it is easy to verify that the condition provided in Definition \ref{def_NLR} holds for any choice of $u_1, u_2, v_1, v_2$, where $u_1\leq u_2$, $v_1\leq v_2$. \end{proof} \section{Examples}\label{Exam} Traditionally, bivariate life distributions available in the literature are positively correlated \citep{Dist}. However, in many real life scenarios, paired observations of non-negative variables are negatively correlated \citep{Bhuyan}. For example, the rainfall intensity and the duration are jointly modeled incorporating their negative dependence for the study of the corresponding flood frequency distribution \citet{Rain}. \citet{Gum} and \citet{Fre} have proposed the bivariate Exponential distributions with lower bound of the correlation coefficient as $-0.4$. In this section, several specific families of bivariate distributions are generated using the proposed copula (\ref{Copula}). For the baseline distributions, we consider the Weibull and Gamma distributions. It should be noted that the resulting bivariate Weibull and bivariate Gamma distributions can be described by implementing all notions of negative dependence discussed in Section \ref{NProp} and \ref{OrderP}. \begin{example} {\bf Bivariate Weibull distribution:} {\rm A family of bivariate Weibull distributions based on the proposed copula $C_{\theta}$, with marginals $F(x) =\left[ 1 - e^{-(\lambda_1 x)^{\delta_1}}\right]\mathds{1}(x>0)$, and $G(y) = \left[1 - e^{-(\lambda_2 y)^{\delta_2}}\right]\mathds{1}(y>0)$, is given by \begin{equation*}\label{BW} h(x,y) = \begin{dcases} \dfrac{\delta_1\delta_2\lambda_1^{\delta_1}\lambda_2^{\delta_2}\theta^{\theta+1}}{(1+\theta)^{\theta}}x^{\delta_1 -1}y^{\delta_2 - 1} \left(\dfrac{e^{-(\lambda_1 x)^{\delta_1}}}{1-e^{-(\lambda_2 y)^{\delta_2}}}\right)^{1+\theta}, & 0<y \leq\phi_1, x>\phi_2(y) \\ \delta_1\delta_2\lambda_1^{\delta_1}\lambda_2^{\delta_2}(1+\theta)x^{\delta_1 -1}y^{\delta_2 - 1}e^{-(\lambda_2 y)^{\delta_2}}\left(e^{-(\lambda_1 x)^{\delta_1}}\right)^{1+\theta}, & x>0, y>\phi_1 \end{dcases} \end{equation*} where $\phi_1 =\dfrac{1}{\lambda_2}\left[\log(1+\theta)\right]^{\frac{1}{\delta_2}}$, $\phi_2(y)= \dfrac{1}{\lambda_1}\left[\log\left(\dfrac{\theta}{(1+\theta)(1 - e^{-(\lambda_2 y)^{\delta_2}})}\right)\right]^{\frac{1}{\delta_1}}$, $\lambda_{i}>0$, $\delta_{i}>0$ for $i=1,2$. }\end{example} \begin{example} {\bf Bivariate Gamma distribution:}\label{bvgamma} {\rm A family of bivariate Gamma distributions based on the proposed copula $C_{\theta}$, with marginals $F(x)=\left[\int_0^x\frac{1}{\Gamma(\alpha_1)}\beta_1^{\alpha_1}x^{\alpha_1 -1}e^{-\beta_1 x} \right]\mathds{1}(x>0)$, and $G(y) =\left[\int_0^y\frac{1}{\Gamma(\alpha_2)}\beta_2^{\alpha_2}y^{\alpha_2 -1}e^{-\beta_2 y} \right]\mathds{1}(y>0)$, is given by \begin{equation*} h(x,y) = \begin{dcases} \dfrac{\beta_1^{\alpha_1}\beta_2^{\alpha_2}\theta^{1+\theta}x^{\alpha_1 -1}y^{\alpha_2 -1}e^{-(\beta_1 x+\beta_2 y)}}{\Gamma(\alpha_1)\Gamma(\alpha_2)(1+\theta)^\theta}\left[1-\dfrac{\gamma_1(\alpha_1, \beta_1 x)}{\Gamma(\alpha_1)}\right]^\theta \left[\dfrac{\gamma_2(\alpha_2, \beta_2 y)}{\Gamma(\alpha_2)}\right]^{-(1+\theta)}, 0<y \leq\xi_2 , \xi_1(y)<x< \eta \\ \dfrac{\beta_1^{\alpha_1}\beta_2^{\alpha_2}(1+\theta)}{\Gamma(\alpha_1)\Gamma(\alpha_2)}x^{\alpha_1 -1}y^{\alpha_2 -1}e^{-(\beta_1 x+\beta_2 y)}\left[1-\dfrac{\gamma_1(\alpha_1, \beta_1 x)}{\Gamma(\alpha_1)}\right]^\theta, 0<x<\eta, \zeta_1<y<\zeta_2, \end{dcases} \end{equation*} where $\zeta_1=\gamma_2^{-1}\left(\dfrac{\theta}{1+\theta}\right)$, $\zeta_2 = \gamma_2^{-1}(\Gamma(\alpha_2))$, $\xi_2= \gamma_2^{-1}\left(\dfrac{\Gamma(\alpha_2)\theta}{1+\theta}\right)$, $\eta = \gamma_1^{-1}(\Gamma(\alpha_1))$, $\xi_1(y)= \gamma_1^{-1}\left[\Gamma(\alpha_1) \left(1-\dfrac{(1+\theta)\gamma_2(\alpha_2,\beta_2 y)}{\theta \Gamma(\alpha_2)}\right)\right]$, $\gamma_i(\alpha_i, \beta_i) = \int_0^{\beta_i} t^{\alpha_i - 1} e^{-t}dt$, $\alpha_{i}>0$, $\beta_{i}>0$ for $i= 1,2$. } \end{example} \begin{remark} The bivariate Weibull (in Example 5.1) and the bivariate Gamma (in Example 5.2) reduce to bivariate Exponential distribution for $\delta_1=\delta_2 = 1$, and $\alpha_1=\alpha_2 = 1$, respectively. \end{remark} \section{Application}\label{Case} For an illustrative data analysis based on the proposed copula, we consider a dataset on the daily air quality measurements for New York Metropolitan Area from May 1, 1973, to September 30, 1973. Information on average wind speed (in miles per hour) and mean ozone level (in parts per billion), were obtained from the New York State Department of Conservation and the National Weather Service. See \citet[Ch 2-5]{Air} for the detailed description of the data. Ozone in the upper atmosphere protects the earth from the sun's harmful rays. On the contrary, exposure to ozone also can be hazardous to both humans and some plants in the lower atmosphere. Variations in weather conditions play an important role in determining the ozone levels \citep{Metero1, Metero2}. In general, the concentration of the ozone level is affected by a wind speed. High winds tend to disperse pollutants, which in turn, dilute the concentration of the ozone level. However, stagnant conditions or light winds allow pollution levels to build up and, thereby, the ozone level also becomes larger. Environmental scientists and meteorologists are interested in the study of the effect of a wind speed on the distribution patterns of ozone \citep{Wind} levels. Based on the observed data, we find that Spearman's rho and Kendall's tau between the wind speed and the ozone levels are -0.59 and -0.43, respectively, which indicates strong negative dependence. To analyse this phenomenon, we apply a method that close in spirit to the method of inference a function for margins (IFM). \citet[Ch-5]{Joe_2006} have provided a detailed description and theoretical properties of the IFM method. This estimation method is based on two separate maximum likelihood estimations of the univariate marginal distributions, followed by an optimization of the bivariate likelihood as a function of the dependence parameter. However, we do not maximize the bivariate likelihood. Instead, we determine the dependence parameter by equating the empirical rank correlation with the theoretical Spearman's rho. This allows the copula to adequately approximate the dependence structure of the bivariate data \citep[p-255]{Joe_2006}. First, we consider three different models Lognormal, Weibull, and Gamma, for estimation of the parameters associated with the marginal distributions of the wind speed and the mean ozone level. Based on the Akaike information criterion, the Gamma distribution fits both marginals better as compared with other choices. The maximum likelihood estimates of the shape and the scale parameters are obtained as 7.171 and 1.375, respectively, for the wind speed, and the same for the mean ozone levels are 1.7 and 24.775, respectively. The estimate of the dependence parameter is given by $\hat{\theta}=0.765$. Therefore, the joint distribution of wind speed and the mean ozone level is represented by the bivariate Gamma distribution provided in Example \ref{bvgamma}, and presented graphically in Figure \ref{CDF_Data}. We then use the Kolmogorov-Smirnov test to check if the Gamma distribution is adequate for the marginals. Since parameters are estimated from the data, we need to adjust the Kolmogorov-Smirnov (KS) test. We follow the approach considered by \cite{Bala_2016} and compute the p-value of the KS test using the parametric bootstrap based on 10000 samples. The p-values corresponding to the wind speed and the mean ozone level are 0.809 and 0.637, respectively. This clearly indicates reasonably good fit to the observed data. The estimated conditional distributions of the mean ozone level keeping the wind speed fixed at the empirical first decile (5.7 mph), median (9.7 mph), and ninth decile (14.9 mph) are presented in Figure \ref{CND_CDF}. It is easy to see that the distribution of the mean ozone level decreases stochastically (in the sense of the usual stochastic order) as the wind speed increases. \begin{figure}[htp] \centering \includegraphics[scale=0.50]{CDF_Data.pdf} \caption{Estimated joint distribution function of wind speed and mean ozone.} \label{CDF_Data} \end{figure} \begin{figure}[htp] \centering \includegraphics[scale=0.50]{CND_CDF.pdf} \caption{Effect of wind speed on the distribution of mean ozone.} \label{CND_CDF} \end{figure} \section{Concluding Remarks}\label{Con} We construct the new flexible bivariate copula for modeling negative dependence between two random variables. Its correlation coefficient takes any value in the interval $(-1,0)$, which was not the case for most other copulas reported in the literature. It is important to note, that the Spearman's rho and the Kendall's tau have a simple one-parameter form with negative values in the full range. The properties of the proposed copula is an agreement with most of the popular notions of negative dependence available in the literature, namely quadrant dependence, regression dependence and likelihood ratio dependence, etc. We believe that the main contribution of our paper (apart from proposing the new flexible copula that can be used in numerous applications) is the explicit study of its properties. Specifically, we show that the Spearman's rho and the Kendall's tau are the decreasing functions with its dependence parameter and establish relevant ordering properties and connections with the main notions of negative dependence. For the illustrative data analysis based on the proposed copula, we consider a dataset on daily air quality measurements for New York Metropolitan Area. Based on the observed data, we show that the Spearman's rho and the Kendall's tau between wind speed and ozone levels are -0.59 and -0.43, respectively, which indicate strong negative dependence.It is shown that the Gamma distributions fits better for both marginals and that the distribution of the mean ozone level decreases stochastically (in the sense of the usual stochastic order) as the wind speed increases. It is interesting to consider in the future research the semiparametric generalisation of the proposed coupla and to investigate its associated properties. Another possible direction of further studies could be a multivariate extension of the proposed copula using the approaches considered by \cite{Liebscher_2008}, \cite{Fischer_Kock_2008} and \cite{Mazo_et_al_2015}. \section*{\small Acknowledgement} The first author sincerely acknowledges the financial support from the University of the Free State, South Africa. The second author was supported in part by the Lloyd’s Register Foundation programme on data-centric engineering at the Alan Turing Institute, UK. \bibliographystyle{apalike} \section{\large Introduction}\label{intro} \sloppy Copulas provide an effective tool for modeling dependence in various multivariate phenomena in the fields of reliability engineering, life sciences, environmental science, economics and finance, etc \citep[Ch-7]{Fontaine_et_al_2020, Cooray_2019, Joe_2006}. Specifically, in recent decades, bivariate copulas were used to generate bivariate distributions with suitable dependence properties \citep{Pos2, Pos3, Finkelstein_2003, Pos1}. The detailed discussion of historical developments, obtained results and perspectives along with the up to date theory can be found in \citet{Nelson_2006}. It should be noted that most copulas available in the literature possess some limitations in modeling negatively dependent data, which is a certain disadvantage, as negative dependence between vital variables is often encountered in real life. \citet{Leh} introduced several concepts of negative dependence for bivariate distributions. Later, \citet{Proschan} and \citet{Yan} extended the correponding definitions and developed stronger notions of bivariate negative dependence. See \citet{Dist} for detailed discussion on popular dependence notions and their applications in the context of continuous bivariate distributions. \cite{Scarsini_Shaked_1996} provided a detailed overview of the corresponding ordering properties for the multivariate distributions. These results provide useful tools for describing the dependence properties of copulas with respect to a dependence parameter. However, only a few bivariate copulas that allow for a simple and meaningful analysis of this kind have been developed and studied in the literature so far. The Farlie-Gumbel-Morgenstern (FGM) family of distributions exhibits negative dependence, but the Spearman's rho for this family lies within the interval $[-1/3,1/3]$ \citep{Schu}. \citet{Four} and \citet{Three} have conisdered the four-parameter and the three-parameter extensiosn of the FGM family proposed by \citet{Smir}, with Spearman's rho lying within the interval $[-0.48, 0.50]$, and $[-0.5, 0.43]$, respectively. To address this issue \citet{New} proposed another extension, but its application is limited because of a singular component that is concentrated on the corresponding diagonal. Some other extensions of the FGM coupla are discussed in \citet{FGM2} and \citet{FGM1}. \citet{Hurlimann_2015} have proposed a comprehensive extension of the FGM copula with the Spearman's rho and Kendall's tau attaining any value in $(-1,1)$. However, the dependence properties and ordering properties of these copulas are not well studied in the literature. Recently, \cite{Cooray_2019} proposed a new extension of FGM family which exhibits negative dependence among the variables in a very strong sense. However, it's Spearman's rho and Kendll's tau are restricted to $[-0.70,0]$, and $[-0.52,0]$, respectively. Thus, it is quite a challenging problem to construct a flexible bivariate copula with the correlation coefficient that takes any value in the interval $(-1,0)$. Moreover, it is not sufficient just to suggest this type of copula, but it is essential to describe its properties (including relevant stochastic comparisons) especially in the case of strong notions of dependence. We believe that the current study meets to some extend this challenge, as we propose an absolutely continuous negatively dependent copula which satisfies most of the popular notions of negative dependence available in the literature with correlation coefficients in the interval $(-1,0)$. The paper is organized as follows. In Section \ref{Copu}, we describe the baseline (for the proposed copula) distribution and discuss some basic properties including conditional distributions and correlation coefficients. Various notions of negative dependence in the context of the proposed copula and ordering properties are considered in Section \ref{NProp}, and Section \ref{OrderP}, respectively. Section \ref{Exam}, provides some examples of negatively dependent standard bivariate distributions. In Section \ref{Case}, as an illustration, we provide a real case study. Finally, some short concluding remarks are given in Section \ref{Con}. \section{The Bivariate Copula}\label{Copu} \citet{Bhuyan} proposed a negatively dependent bivariate life distribution that possesses nice, closed-form expressions for the joint distributions and exhibits various strong notions of negative dependence reported in the literature. Most importantly, its correlation coefficient may take any value in the interval $(-1,0)$. One of the marginal distributions is Exponential and the other belongs to skew log Laplace family. We utilize the negative dependence structure inherent in this model and formulate a copula with the strong negative dependence. The joint distribution function and the marginal distributions are given by \begin{equation}\label{Joint} H(x,y) = \begin{dcases} y^{\lambda} - e^{-\lambda x}+\dfrac{\lambda}{(\lambda+\mu)y^{\mu}}\left[ e^{(\lambda+\mu)x}-y^{\lambda+\mu}\right], & 0<y \leq 1, x>-\log y \\ 1-e^{-\lambda x}-\dfrac{\lambda}{(\lambda+\mu)y^{\mu}}\left[ 1-e^{-(\lambda+\mu)x}\right], & x>0, y>1, \end{dcases} \end{equation} and $F(x)= 1- e^{-\lambda x}$ for $x>0$, and $G(y) =\dfrac{\mu}{(\lambda+\mu)}y^{\lambda}\mathds{1}(0<y \leq1)+ \left[1-\dfrac{\lambda}{(\lambda+\mu)y^{\mu}}\right]\mathds{1}( y>1)$, respectively, where $\lambda,\mu >0$. Note that $F(\cdot)$ and $G(\cdot)$ are continuous. We first, find the quasi-inverse functions of $F(\cdot)$ and $G(\cdot)$ and 'insert' those into the arguments of the joint distribution function $H(\cdot,\cdot)$ given by (\ref{Joint}). Then by Corollary 2.3.7 of \citet[p-22]{Nelson_2006}, we obtain the following copula \begin{equation}\label{Cop} C_{\lambda, \mu}(u,v) = \begin{dcases} v-(1-u)+\dfrac{\lambda\mu^{\frac{\mu}{\lambda}}}{(\lambda+\mu)^{1+\frac{\mu}{\lambda}}}(1-u)^{{1+\frac{\mu}{\lambda}}}v^{-\frac{\mu}{\lambda}}, & 0<v \leq\dfrac{\mu}{\mu+\lambda}, 1-\dfrac{(\lambda +\mu)v}{\mu}<u<1, \\ u-(1-v)\left[1-(1-u)^{{1+\frac{\mu}{\lambda}}}\right], & 0<u<1, \dfrac{\mu}{\mu+\lambda}<v<1. \end{dcases} \end{equation} Now using the reparameterization $\mu=\theta \lambda $, in (\ref{Cop}), we rewrite $C_{\lambda, \mu}$ as \begin{equation}\label{Copula} C_\theta(u,v) = \begin{dcases} v-(1-u)+\dfrac{\theta^\theta}{(1+\theta)^{1+\theta}}(1-u)^{1+\theta}v^{-\theta}, & 0<v \leq\dfrac{\theta}{1+\theta}, 1-\dfrac{(1+\theta)v}{\theta}<u<1 \\ u-(1-v)\left[1-(1-u)^{1+\theta}\right], & 0<u<1, \dfrac{\theta}{1+\theta}<v<1, \end{dcases} \end{equation} for $\theta >0$. It is easy to verify that $C_\theta(u,v)$, given by (\ref{Copula}), satisfies the following conditions: (i) $C_\theta(u,0)=0=C_\theta(0,v)$, (ii) $C_\theta(u,1)=u$, $C_\theta(1,v)=v$, for any $u$, $v$ in $I=[0,1]$, and (iii) $C_\theta(u_2,v_2)-C_\theta(u_2, v_1)-C_\theta(u_1, v_2)+C_\theta(u_1,v_1)\geq 0$, for any $u_1, u_2, v_1, v_2$ in $I$ with $u_1\leq u_2$ and $v_1\leq v_2$. In Figure \ref{Copula_plot}, we provide graphical presentation of the proposed copula for different values of the dependence parameter $\theta$. \begin{figure}[htp] \centering \subfigure [Copula plot for $\theta=0.1$] { \includegraphics[scale=0.50]{Cop_0.1.pdf} \label{fig:subfig1} } \subfigure[Copula plot for $\theta=1$]{ \includegraphics[scale=0.5]{Cop_1.pdf} \label{fig:subfig2} } \subfigure[Copula plot for $\theta=5$]{ \includegraphics[scale=0.50]{Cop_5.pdf} } \subfigure[Copula plot for $\theta=10$]{ \includegraphics[scale=0.50]{Cop_10.pdf} \label{fig:subfig3} } \caption{ Graphical plots of $C_{\theta}$ for different choices of $\theta$ on an unit square.} \label{Copula_plot} \end{figure} The survival copula and the density function of the proposed copula $C_\theta(u,v)$ are given by \begin{equation} \bar{C}_\theta(u,v) = \begin{dcases} \dfrac{\theta^\theta}{(1+\theta)^{1+\theta}}u^{1+\theta}(1-v)^{-\theta}, & 0<v \leq\dfrac{\theta}{1+\theta}, 1-\dfrac{(1+\theta)v}{\theta}<u<1 \nonumber\\ vu^{(1+\theta)}, & 0<u<1, \dfrac{\theta}{1+\theta}<v<1, \end{dcases} \end{equation} and \begin{equation}\label{eqn_den} c_\theta(u,v) = \begin{dcases} \dfrac{\theta^{1+\theta}}{(1+\theta)^\theta}(1-u)^\theta v^{-(1+\theta)}, & 0<v \leq\dfrac{\theta}{1+\theta}, 1-\dfrac{(1+\theta)v}{\theta}<u<1 \\ (1+\theta)(1-u)^\theta, & 0<u<1, \dfrac{\theta}{1+\theta}<v<1, \end{dcases} \end{equation} respectively. \subsection{Conditional Copulas} The conditional copula of $U$ given $V=v$, is as follows. For $0<v \leq\frac{\theta}{(1+\theta)}$, \begin{equation}\label{U_V_1} C_\theta(u|v)= 1- \dfrac{\theta^{(1+\theta)}}{(1+\theta)^{(1+\theta)}}(1-u)^{(1+\theta)} v^{-(1+\theta)}, \,\,\,\,1-\dfrac{(1+\theta)v}{\theta}<u<1, \end{equation} whereas for $\frac{\theta}{(1+\theta)}<v<1$, \begin{equation}\label{U_V_2} C_\theta(u|v)= 1-(1-u)^{(1+\theta)}, \,\,\,\,\,0<u<1. \end{equation} The conditional mean and variance of $U|V=v$ are given by \begin{equation} E[U|V=v]= \begin{dcases} 1-\dfrac{(1+\theta)^2v}{\theta(\theta+2)}, & 0<v \leq\dfrac{\theta}{1+\theta} \nonumber\\ \dfrac{1}{\theta+2}, & \dfrac{\theta}{1+\theta}<v<1, \end{dcases} \end{equation} and \begin{equation} Var[U|V=v]= \begin{dcases} \dfrac{(1+\theta)^3v^2}{\theta^2(\theta +2)^2(\theta +3)},& 0<v \leq\dfrac{\theta}{1+\theta} \nonumber\\ \dfrac{\theta+1}{(\theta+2)^2(\theta+3)},& \dfrac{\theta}{1+\theta}<v<1, \end{dcases} \end{equation} respectively. \begin{remark} {\rm The regression of $U$ on $V=v$ is linearly decreasing in $v$ for $0<v\leq \frac{\theta}{\theta+1}$, and independent of $v$ for $\frac{\theta}{\theta+1}<v<1$. Also, it is interesting to note that the conditional variance of $U|V=v$ is an increasing function of $v$ and bounded from above by $\frac{\theta+1}{(\theta+2)^2(\theta+3)}.$} \end{remark} The conditional copula of $V$ given $U=u$, is given by \begin{equation}\label{V_U} C_\theta(v|u)= \begin{dcases} 1- \dfrac{\theta^\theta}{(1+\theta)^\theta}(1-u)^\theta v^{-\theta}, & \dfrac{(1-u)\theta}{(1+\theta)}<v \leq\dfrac{\theta}{1+\theta} \\ 1-(1+\theta)(1-v)(1-u)^\theta, & \dfrac{\theta}{1+\theta}<v<1 \end{dcases} \end{equation} The conditional mean and variance of $V|U=u$, are given by \begin{equation}E[V|U=u]=\dfrac{(1-u)^\theta}{2(1-\theta)}-\dfrac{2\theta^2(1-u)}{1-\theta^2}\nonumber, \end{equation} for $\theta \neq 1$, and \begin{equation}Var[V|U=u]=\dfrac{1}{(\theta^2-1)^2}\left[-\dfrac{(1+\theta)(1-u)^\theta\left[ 2 - \theta + \theta^2 (2 - 6 u) + 3 \theta^3 u\right]}{3(\theta-2)}+\dfrac{\theta^3(1-u)^2}{\theta-2}-\dfrac{(1+\theta)^2(1-u)^{2\theta}}{4}\right]\nonumber, \end{equation} for $\theta \neq 1,2$, respectively. \begin{remark} {\rm The regression of $V$ on $U=u$ is strictly decreasing in $u$.} \end{remark} One can use the conditional copula of $U$ given $V=v$, provided in (\ref{U_V_1}) and (\ref{U_V_2}), to simulate from the proposed copula $C_{\theta}$, given by (\ref{Copula}), using the following steps. \begin{itemize} \item[Step I.] Simulate $v_i$ and $u_i^{\ast}$ independently from standard uniform distribution. \item[Step II.] If $v_i\le \frac{\theta}{\theta+1}$, then solving $C_{\theta}(u|v_i)=u_i^{\ast}$ from (\ref{U_V_1}), we get $u_i=1-(\frac{\theta+1}{\theta})v_i(1-u_i^{\ast})^{\frac{1}{1+\theta}}$;\\ else, solving $C_{\theta}(u|v_i)=u_i^{\ast}$ from (\ref{U_V_2}), we get $u_i=1-(1-u_i^{\ast})^{\frac{1}{1+\theta}}$. \item[Step III.] Repeat Step I and Step II $n$ times to obtain independently and identically distributed realizations $(u_i,v_i)$, for $i=1,2,\ldots,n$ from $C_{\theta}$. \end{itemize} A similar algorithm can be elaborated to simulate from $C_{\theta}$ based on the conditional copula of $V$ given $U$, provided in (\ref{V_U}). Scatter plots based on $500$ simulated observations using the aforementioned algorithm for four different values of $\theta$ are given in Figure \ref{Scatter}. As expected, the data points are getting closer to the diagonal $v=-u$ for higher values of $\theta$. \begin{figure}[htp] \centering \subfigure [Scatter plot for $\theta=0.1$] { \includegraphics[scale=0.40]{Scatter_0.1.pdf} \label{fig:subfig01} } \subfigure[Scatter plot for $\theta=1$]{ \includegraphics[scale=0.4]{Scatter_1.pdf} \label{fig:subfig02} } \subfigure[Scatter plot for $\theta=5$]{ \includegraphics[scale=0.40]{Scatter_5.pdf} } \subfigure[Scatter plot for $\theta=10$]{ \includegraphics[scale=0.40]{Scatter_10.pdf} \label{fig:subfig03} } \caption{ Scatter plots based on $500$ simulated observations from $C_{\theta}$ for different choices of $\theta$.} \label{Scatter} \end{figure} \subsection{Basic Properties}\label{Prop} \begin{proposition}\label{pro21} The copula $C_{\theta}$, defined in (\ref{Copula}), is decreasing with respect to its dependence parameter $\theta$, i.e., if $\theta_1\leq \theta_2$ then $C_{\theta_2}(u,v)\leq C_{\theta_1}(u,v)$, for all $(u,v) \in I^2 = [0,1]\times[0,1]$. \end{proposition} \begin{proof} {\bf Case I.} For $0<v \leq\frac{\theta}{1+\theta}$, and $1-\frac{(1+\theta)v}{\theta}<u<1$, we have \begin{eqnarray*} \dfrac{\partial C_\theta}{\partial \theta} &=& \dfrac{\theta^\theta}{(1+\theta)^{(1+\theta)}}(1-u)^{(1+\theta)}v^{-\theta}\left[ \log\left(\dfrac{\theta}{1+\theta}\right) +\log(1-u)-\log(v) \right]\\ &\leq& \dfrac{\theta^\theta}{(1+\theta)^{(1+\theta)}}(1-u)^{(1+\theta)}v^{-\theta}\left[ \log\left(\dfrac{\theta}{1+\theta}\right) +\log\left[\dfrac{(1+\theta)v}{\theta}\right]-\log(v) \right], \text{since $(1-u)\leq \dfrac{(1+\theta)v}{\theta}$}\\ &=&0 \end{eqnarray*} {\bf Case II.} For $0<u<1$, and $\frac{\theta}{1+\theta}<v<1$, we have $$\dfrac{\partial C_\theta}{\partial \theta}= (1-u)^{(1+\theta)}(1-v)\log(1-u)\leq 0.$$ Now combining Case I and II, we have $\dfrac{\partial C_\theta}{\partial \theta}\leq 0$ for all $(u,v)\in I^2$, which implies $C_{\theta}$ is decreasing in $\theta$. \end{proof} \begin{proposition} The copula $C_{\theta}$, defined in (\ref{Copula}), is sub-harmonic, i.e., $\nabla^2 C_\theta(u,v) \geq 0$. \end{proposition} \begin{proof} {\bf Case I.} For $0<v \leq\frac{\theta}{1+\theta}$, and $1-\frac{(1+\theta)v}{\theta}<u<1$, we have \begin{eqnarray*} \nabla^2 C_\theta(u,v)& =& \dfrac{\partial^2 C_\theta(u,v)}{\partial u^2} + \dfrac{\partial^2 C_\theta(u,v)}{\partial v^2}\\ &= & \dfrac{\theta^{(1+\theta)}}{(1+\theta)^\theta}\left[(1 - u)^{(\theta-1)} v^{-\theta} + (1-u)^{(1+\theta)}v^{-(2+\theta)}\right]\geq 0 \end{eqnarray*} {\bf Case II.} For $0<u<1$, and $\frac{\theta}{1+\theta}<v<1$, we have \begin{eqnarray*} \nabla^2 C_\theta(u,v)& =& \dfrac{\partial^2 C_\theta(u,v)}{\partial u^2} + \dfrac{\partial^2 C_\theta(u,v)}{\partial v^2}\\ &= & \theta (1 + \theta) (1 - u)^{(\theta-1)} (1 - v)\geq 0 \end{eqnarray*} Now from Case I and II we can write $\nabla^2 C_\theta(u,v) \geq 0$ for all $(u,v)\in I^2$, and hence the result follows. \end{proof} \begin{proposition} The copula $C_{\theta}$, defined in (\ref{Copula}), is absolutely continuous. \end{proposition} \begin{proof} To establish the absolute continuity of the proposed copula $C_{\theta}$, it is required to show $$\int_0^u\int_0^v\dfrac{\partial^2}{\partial s\partial t}C_\theta(s,t)dtds =C_\theta(u,v),$$ for every $(u,v)\in I^2$.\\ \\ {\bf Case I.} For $0<v \leq\frac{\theta}{1+\theta}$, and $1-\frac{(1+\theta)v}{\theta}<u<1$, we have \begin{eqnarray*} \int_0^u\int_0^v\dfrac{\partial^2}{\partial s\partial t}C_\theta(s,t)dtds &=& \int_{1-\frac{(1+\theta)v}{\theta}}^u\int_{\frac{\theta(1-s)}{(1+\theta)}}^v\dfrac{\theta^{1+\theta}}{(1+\theta)^\theta}(1-s)^\theta t^{-(1+\theta)}dtds\\ &=& \int_{1-\frac{(1+\theta)v}{\theta}}^u\left[1-\left(\frac{\theta}{1+\theta}\right)^\theta(1-s)^\theta v^{-\theta}\right] ds\\ &=&\int_{1-u}^{\frac{(1+\theta)v}{\theta}}\left[1-\left(\frac{\theta}{1+\theta}\right)^\theta z^\theta v^{-\theta}\right] dz \,\,\,({\rm where}\,\, z = 1-s)\\ &=& v-(1-u)+\dfrac{\theta^\theta}{(1+\theta)^{1+\theta}}(1-u)^{1+\theta}v^{-\theta}=C_\theta(u,v). \end{eqnarray*} {\bf Case II.} For $0<u<1$, and $\frac{\theta}{1+\theta}<v<1$, we have \begin{eqnarray*} \int_0^u\int_0^v\dfrac{\partial^2}{\partial s\partial t}C_\theta(s,t)dtds &=& \int_0^u\int_{\frac{\theta(1-s)}{(1+\theta)}}^{\frac{\theta}{(1+\theta)}}\dfrac{\theta^{1+\theta}}{(1+\theta)^\theta}(1-s)^\theta t^{-(1+\theta)}dtds+\int_0^u\int_{\frac{\theta}{(1+\theta)}}^v(1+\theta)(1-s)^\theta dtds\\ &=& \int_0^u\left[1-(1-s)^\theta\right] ds + \int_0^u \left[ v-\theta(1 - v)\right](1 - s)^\theta\\ &=& u-\dfrac{1}{1+\theta}+\dfrac{(1-u)^{\theta+1}}{\theta + 1}+ \left[ v-\theta(1 - v)\right]\dfrac{\left[1-(1-u)^{(\theta+1)}\right]}{1+\theta}\\ &=& u-(1-v)\left[1-(1-u)^{(\theta+1)}\right]=C_\theta(u,v). \end{eqnarray*} Therefore, the results follows by combining Case I and II. \end{proof} \subsection{Measures of Dependence }\label{Dependence} Measures of dependence are commonly used to summarize the complicated dependence structure of bivariate distributions. See \cite{Joe_1997} and \cite{Nelson_2006} for a detailed review on measures of dependence and associated properties. In this section, we derive the expressions for the Kendall’s tau and the Spearman’s rho based on the proposed copula $C_\theta$. Essentially, these coefficients measure the correlation between the ranks rather than actual values of $X$ and $Y$. Therefore, these coefficients are unaffected by any monotonically increasing transformation of $X$ and $Y$. \begin{definition} Let $X$ and $Y$ be the continuous random variables with the dependence structure described by the copula $C$. Then the population version of the Spearman’s rho for $X$ and $Y$ is given by $$\rho :=\int_0^1\int_0^1uvdC(u,v)-3= \int_0^1\int_0^1C(u,v)dudv-3$$ \end{definition} \begin{proposition} Let $(X, Y)$ be a random pair with copula $C_\theta$. The Spearman’s rho is given by $$\rho =\dfrac{2(3+3\theta+\theta^2)}{2+3\theta+\theta^2}-3,$$ which is a decreasing function in $\theta$ and takes any values between 0 and -1. \end{proposition} \begin{definition} Let $X$ and $Y$ be the continuous random variables with copula $C$. Then, the population version of the Kendall’s tau for $X$ and $Y$ is given by $$\tau := 4\int_0^1\int_0^1C(u,v)dC(u,v)-1$$ \end{definition} \begin{proposition} Let $(X, Y)$ be a random pair with copula $C_\theta$. Then the Kendall’s tau is given by $$\tau =\dfrac{-\theta}{(1+\theta)},$$ which is a decreasing function in $\theta$ and takes any values between 0 and -1. \end{proposition} In Figure \ref{Corr_plot}, we have plotted the Spearman’s rho and the Kendall’s tau against the dependence parameter $\theta$. It is easy to see that the Spearman’s rho is less than the Kendall’s tau for all $\theta>0$. \begin{figure} \centering \includegraphics[scale=0.5]{Correlation.pdf} \caption{Plot of Spearman's rho and Kendall's tau against the dependence parameter $\theta$.} \label{Corr_plot} \end{figure} \section{Connections with notions of Negative Dependence}\label{NProp} As discussed in Subsection \ref{Dependence}, the Spearman's rho and the Kendall's tau measure the correlation between two random variables. However, it is possible, in principle, that these random variables may have the strong correlation, but possess the weak association with respect to different notions of dependence, or vice versa. Therefore, having in mind this observation, in this section, we discuss several relevant notions of negative dependence, namely \textit{Quadrant Dependence}, \textit{Regression Dependence} and \textit{Likelihood Ratio Dependence}, etc., and explore relevant connections for the proposed copula. First, we provide the definitions of the aforementioned dependence notions, as discussed in \cite{Nelson_2006} and \cite{Dist}. \begin{definition}\label{Orders} Let $X$ and $Y$ be continuous random variables with copula $C$. Then \begin{enumerate} \item $X$ and $Y$ are Negatively Quadrant Dependent (NQD) if $P(X \leq x, Y \leq y) \leq {P(X \leq x)P(Y \leq y)}$, for all $(x, y) \in R^2$, where $R^2$ is the domain of joint distribution of $X$ and $Y$, or equivalently a copula $C$ is said to be NQD if for all $(u,v)\in I^2$, $C(u,v)\leq uv.$ \item $Y$ is left tail increasing in $X$ (LTI($Y|X$)), if $P[Y \leq y |X \leq x]$ is a nondecreasing function of $x$ for all $y$. \item $X$ is left tail increasing in $Y$ (LTI($X|Y$)), if $P[X \leq x |Y \leq y]$ is a nondecreasing function of $y$ for all $x$. \item $Y$ is right tail decreasing in $X$ (RTD($Y|X$)), if $P[Y > y |X > x]$ is a nonincreasing function of $x$ for all $y$. \item $X$ is left tail increasing in $Y$ (RTD($X|Y$)), if $P[X >x |Y > y]$ is a nonincreasing function of $y$ for all $x$. \item $Y$ is stochastically decreasing in $X$ denoted as SD($Y|X$),(also known as negatively regression dependent ($Y|X$)) if $P[Y > y |X = x]$ is a nonincreasing function of $x$ for all $y$. \item $X$ is stochastically decreasing in $Y$ denoted as SD($X|Y$), (also known as negatively regression dependent ($X|Y$)) if $P[X > x| Y = y]$ is a nonincreasing function of $y$ for all $x$. \item \label{eqn_NLR} Let $X$ and $Y$ be continuous random variables with joint density function $h(x,y)$. Then $X$ and $Y$ are negatively likelihood ratio dependent, denote by NLR(X,Y), if $h(x_1,y_1)h(x_2,y_2)\leq h(x_1,y_2)h(x_2,y_1)$ for all $x_1, x_2, y_1, y_2\in I$ such that $x_1\leq x_2$ and $y_1\leq y_2$. \end{enumerate} \end{definition} \begin{theorem} Let $X$ and $Y$ be two random variables with copula $C_\theta$. Then $(i)$ $X$ and $Y$ are LTI($Y|X$), $(ii)$ $X$ and $Y$ are LTI($X|Y$), $(iii)$ $X$ and $Y$ are RTD($Y|X$), and $(iv)$ $X$ and $Y$ are RTD($X|Y$). \end{theorem} \begin{proof} (i) To establish LTI($Y|X$), it is sufficient to show that for any $v$ in $I$, $\frac{C(u,v)}{u}$ is nondecreasing in $u$ \citep[Theorem 5.2.5, p-192]{Nelson_2006}. For $0<u<1$, and $\frac{\theta}{1+\theta}<v<1$, we have $$\dfrac{\partial}{\partial u}\left[\dfrac{C(u,v)}{u}\right]=\dfrac{(1-v)[1-(1-u)^\theta(1+\theta u)]}{u^2}.$$ Now we need to prove that $[1-(1-u)^\theta(1+\theta u)]>0$. Define $h(u):=(1-u)^\theta(1+\theta u)$. Observe that $h(0)=1$, $h(1)=0$, and $h(u)$ is a decreasing function in $u$, since $h^{'}(u)=-\theta^2(1+\theta)u(1-u)^{(\theta-1)}<0$ for all $u\in(0,1)$. Therefore, $\frac{\partial}{\partial u}\left[\frac{C(u,v)}{u}\right]>0$.\\ Similarly, for $0<v \leq\frac{\theta}{1+\theta}$, and $1-\frac{(1+\theta)v}{\theta}<u<1$, it can be shown that $$\dfrac{\partial}{\partial u}\left[\dfrac{C(u,v)}{u}\right]=- \dfrac{\frac{\theta^\theta}{(1+\theta)^{(1+\theta)}}(1+\theta u)(1-u)^\theta +v^{(1+\theta)}-v^\theta}{ u^2v^\theta}>0.$$ Hence, the result follows.\\ (ii) In view of Theorem 5.2.5 in \cite[p-192]{Nelson_2006}, the necessary and sufficient condition for LTI($X|Y$) is that, $\frac{C(u,v)}{v}$ is nondecreasing in $v$, for any $u$ in $I$. For $0<v \leq\frac{\theta}{1+\theta}$, and $1-\frac{(1+\theta)v}{\theta}<u<1$, we have $$\dfrac{\partial}{\partial v}\left[\dfrac{C(u,v)}{v}\right]= \dfrac{(u-1)\left[\frac{\theta^\theta}{(1+\theta)^{\theta}}(1-u)^\theta- v^{\theta}\right]}{v^{\theta+2}}\geq 0,$$ since $(u-1)<0$ and $\left[\frac{\theta^\theta}{(1+\theta)^{\theta}}(1-u)^\theta- v^{\theta}\right]<0$. \\ Similarly, for $0<u<1$, and $\frac{\theta}{1+\theta}<v<1$, we have $$\dfrac{\partial}{\partial v}\left[\dfrac{C(u,v)}{v}\right]=\dfrac{(u-1)[(1-u)^\theta-1]}{v^2}\ge 0.$$ Hence, the result follows.\\ (iii) To establish RTD($Y|X$), it is sufficient to show that $\frac{v-C(u,v)}{(1-u)}$ is a nondecreasing function in $u$ for any $v\in I$ \citep[Theorem 5.2.5, p-192]{Nelson_2006}.\\ For $0<v \leq\frac{\theta}{1+\theta}$ and ${1-\frac{(1+\theta)v}{\theta}<u<1}$, we have $$\dfrac{\partial}{\partial u}\left[\dfrac{v-C(u,v)}{(1-u)}\right]= \left(\dfrac{\theta}{1+\theta}\right)^{1+\theta}(1-u)^{\theta-1}v^{-\theta}>0.$$\\ Similarly, for $0<u<1$, and $\dfrac{\theta}{1+\theta}<v<1$, we have $$\dfrac{\partial}{\partial u}\left[\dfrac{v-C(u,v)}{(1-u)}\right]= (1-v)(1-u)^{\theta -1}>0.$$ Hence, the conclusion follows.\\ (iv) By Theorem 5.2.5 in \cite[p-192]{Nelson_2006}, RTD($Y|X$) holds, if $\frac{u-C(u,v)}{(1-v)}$ is a nondecreasing function in $v$ for any $u\in I$. For $0<v \leq\frac{\theta}{1+\theta}$ and $1-\frac{(1+\theta)v}{\theta}<u<1$, we have $$\dfrac{\partial}{\partial v}\left[\dfrac{u-C(u,v)}{(1-v)}\right]=\dfrac{\frac{\theta^\theta}{(1+\theta)^{(1+\theta)}}(1-u)^{1+\theta}v^{-(1+\theta)}[\theta(1-v)-v]}{(1-v)^2},$$ which is non-negative, since $v <\frac{\theta}{1+\theta}$.\\ Similarly, for any fixed $u\in I$, and $\frac{\theta}{1+\theta}<v<1$, $\frac{u-C(u,v)}{(1-v)}=1-(1-u)^{1+\theta}$ is a constant function in $v$. Hence the results follows. \end{proof} \begin{theorem} Let $X$ and $Y$ be two random variables with copula $C_\theta$. Then $(i)$ $X$ and $Y$ are SD($Y|X$), and $(ii)$ $X$ and $Y$ are SD($X|Y$). \end{theorem} \begin{proof} To establish SD($Y|X$) property of the proposed copula $C_{\theta}$, we utilise the geometric interpretation of the stochastic monotonicity given in Corollary 5.2.11 of \cite[p-197]{Nelson_2006}. Therefore, it is sufficient to show that $C_\theta(u,v)$ is a convex function of $u$. Similarly, SD($X|Y$) can be established by showing $C_\theta(u,v)$ is a convex function of $v$.\\ (i) For $0<v \leq\frac{\theta}{1+\theta}$, and $1-\frac{(1+\theta)v}{\theta}<u<1$, we have $$\dfrac{\partial^2}{\partial u^2}C_\theta(u,v) = \dfrac{\theta^{(1+\theta)}}{(1+\theta)^\theta}(1-u)^{\theta-1}v^{-\theta}>0.$$ For $0<u<1,$ and $\frac{\theta}{1+\theta}<v<1$, we have $$\dfrac{\partial^2}{\partial u^2}C_\theta(u,v) =\theta (1+\theta)(1-v)(1-u)^{(\theta -1)}> 0.$$ Hence $C_\theta(u,v)$ is a convex function of $u$.\\ (ii) For $0<v \leq\frac{\theta}{1+\theta}$, and $1-\frac{(1+\theta)v}{\theta}<u<1$, we have $$\dfrac{\partial^2}{\partial v^2}C_\theta(u,v) ={ \dfrac{\theta^{(1+\theta)}}{(1+\theta)^\theta}(1-u)^{1+\theta}v^{-(2+\theta)}}>0.$$ Note that, for any fixed $u\in I$, and $\frac{\theta}{1+\theta}<v<1$, $\frac{\partial}{\partial v}C_\theta(u,v)$ is a constant function of $v$. Hence, the result follows. \end{proof} \begin{theorem}\label{NLR_thm} Let $X$ and $Y$ be two random variables with copula $C_\theta$. Then $X$ and $Y$ are NLR. \end{theorem} \begin{proof} To established the NLR between $X$ and $Y$ with copula $C_\theta$, we need to show $c_\theta(u_1,v_1)c_\theta(u_2,v_2)\leq c_\theta(u_1,v_2)c_\theta(u_2,v_1)$ holds for all $u_1\leq u_2$, and $v_1\leq v_2$, where $c_\theta(u,v)$ is the copula density given in (\ref{eqn_den}). Note that for the proposed copula $C_{\theta}$, the aforementioned condition holds with equality for all $u_1\leq u_2$ and $v_1\leq v_2$ in $I$. \end{proof} \begin{remark} {\rm Two random variables $X$ and $Y$ with the copula $C_{\theta}$ are NQD. This directly follows from Theorem \ref{def_NLR}. See the interrelationships between different concepts of negative dependence summarised in \citep[p-130]{Dist} for details.} \end{remark} \section{Ordering Properties}\label{OrderP} In Section \ref{NProp}, several negative dependence properties of the proposed copula $C_\theta$ has been investigated for the fixed $\theta>0$. In this section, we discuss the ordering properties of this copula $C_\theta$, which provides a precise (and also intuitively expected) notion for one bivariate distribution to be more positively or negatively associated than another. For this purpose, we first recall the definitions of the dependence orderings for bivariate distributions. These definitions describe the strength of dependence of a copula with respect to its dependence parameter $\theta$. \cite{Leh} was first to introduce the NQD and NRD notions. The corresponding orderings \cite{Yanagimoto_Okamoto_1969} were then defined as \begin{definition} Let $F$ and $G$ be two bivariate distributions with the same marginals. Then $F$ is said to be smaller than $G$ in the NQD sense denoted as $F\prec_{NQD}G$ if $$F(x,y)\geq G(x,y)\,\,\,\,\,\,\forall x\,\, {\rm and}\,\, y.$$ \end{definition} \begin{definition}\label{def42} Let $F$ and $G$ be two bivariate distributions with the same marginals, and let $(U, V)$ and $(X, Y)$ be two random vectors having the distributions $F$ and $G$, respectively. Then $F$ is said to be smaller than $G$ in the NRD sense, denoted by $F\prec_{NRD} G $ or $(U, V)\prec_{NRD} (X, Y)$ if, for any $x_1\leq x_2$, \begin{equation*} F^{-1}_{V|U}(u|x)\geq F^{-1}_{V|U}(v|x^{'})\implies G^{-1}_{V|U}(u|x)\geq G^{-1}_{V|U}(v|x^{'}) \end{equation*} for any $u, v \in I$, where $F_{V|U}$ denote the conditional distribution of $V$ given $U = u$ and $F^{-1}_{V|U}$ denote its right-continuous inverse. Equivalently, $F\prec_{NRD} G $ if and only if $G^{-1}_{Y|X}\left[F_{V|U}(y|x)|x\right]$ is decreasing in $x$ for all $y$ \citep{Fang_Joe_1992}. \end{definition} Later, \cite{Kimeldorf_Sampson_1987} have introduced and studied in detail the notion of the Negatively Likelihood Ratio (NLR) dependence ordering that is described in the following definition. Let the random variables $X$ and $Y$ have the joint distribution $G(x,y)$. For any two intervals $I_1$ and $I_2$ of the real line, let us denote $I_1\leq I_2$ if $x_1\in I_1$ and $x_2\in I_2$ imply that $x_1\leq x_2$. For any two intervals $I$ and $J$ of the real line let $G(I, J)$ represent the probability assigned by $G$ to the rectangle $I\times J$. \begin{definition}\label{def_NLR} Let $F$ and $G$ be two bivariate distributions with the same marginals, and let $(U, V)$ and $(X, Y)$ be two random vectors having the distributions $F$ and $G$, respectively. Then $F$ is said to be smaller than $G$ in the NLR dependence sense, denoted by $F \prec_{NLR} G$ or $(U, V) \prec_{NLR} (X, Y)$ if $ F(I_1, J_1)F(I_2, J_2) G(I_1, J_2)G(I_2, J_1)\geq F(I_1, J_2)F(I_2, J_1) G(I_1, J_1)G(I_2, J_1)$ whenever $I_1\leq I_2$ and $J_1\leq J_2$. When the densities $F$ and $G$ exist and denoted by $f$ and $g$, respectively, then the aforementioned condition equivalently is written as $f(x_1, y_1)f(x_2, y_2) g(x_1, y_2)g(x_2, y_1)\geq f(x_1, y_2)f(x_2, y_1) g(x_1, y_1)g(x_2, y_1) $ whenever $x_1\leq x_2$ and $y_1\leq y_2$. \end{definition} \begin{theorem} If $\theta_1\leq \theta_2$, then $C_{\theta_1}(u,v)\prec_{NQD}C_{\theta_2}(u,v).$ \end{theorem} \begin{proof} The results directly follow from Proposition \ref{pro21}. \end{proof} \begin{theorem} If $\theta_1\leq \theta_2$, then $C_{\theta_1}(u,v)\prec_{NRD}C_{\theta_2}(u,v).$ \end{theorem} \begin{proof} Let $\theta_1\leq \theta_2$. The conditional copula of $V$ given $U=u$ is given by \begin{equation*} C_{\theta_1}(v|u)=\begin{dcases} 1- \dfrac{\theta_1^{\theta_1}}{(1+\theta_1)^{\theta_1}}(1-u)^{\theta_1} v^{-\theta_1}, & \dfrac{(1-u)\theta_1}{(1+\theta_1)}<v <\dfrac{\theta_1}{1+\theta_1} \\ 1-(1+\theta_1)(1-v)(1-u)^{\theta_1}, & \dfrac{\theta_1}{1+\theta_1}<v<1. \end{dcases} \end{equation*} Then $C_{\theta_2}^{-1}(C_{\theta_1}(v|u)|u)$ is given by \begin{equation*} C_{\theta_2}^{-1}(C_{\theta_1}(v|u)|u) =\begin{dcases} \dfrac{\theta_2(1+\theta_1)^{(\theta1/\theta_2)}}{(1+\theta_2)\theta_1^{(\theta1/\theta_2)}}(1-u)^{1-{(\theta1/\theta_2)}}v^{(\theta1/\theta_2)}, & 0<v\leq1-(1-u)^{\theta_2} \\ 1-\dfrac{1+\theta_1}{1+\theta_2}(1-v)(1-u)^{(\theta1-\theta_2)}, & 1-(1-u)^{\theta_2}<v< 1. \end{dcases} \end{equation*} Note that $ C_{\theta_2}^{-1}(C_{\theta_1}(v|u)|u)$ is a decreasing function in $u$ as $\theta_1\leq \theta_2$. Now, using Definition \ref{def42}, the result follows. \end{proof} \begin{theorem} If $\theta_1\leq \theta_2$, then $C_{\theta_1}(u,v)\prec_{NLR}C_{\theta_2}(u,v).$ \end{theorem} \begin{proof} Let $\theta_1\leq \theta_2$. Now, it is easy to verify that the condition provided in Definition \ref{def_NLR} holds for any choice of $u_1, u_2, v_1, v_2$, where $u_1\leq u_2$, $v_1\leq v_2$. \end{proof} \section{Examples}\label{Exam} Traditionally, bivariate life distributions available in the literature are positively correlated \citep{Dist}. However, in many real life scenarios, paired observations of non-negative variables are negatively correlated \citep{Bhuyan}. For example, the rainfall intensity and the duration are jointly modeled incorporating their negative dependence for the study of the corresponding flood frequency distribution \citet{Rain}. \citet{Gum} and \citet{Fre} have proposed the bivariate Exponential distributions with lower bound of the correlation coefficient as $-0.4$. In this section, several specific families of bivariate distributions are generated using the proposed copula (\ref{Copula}). For the baseline distributions, we consider the Weibull and Gamma distributions. It should be noted that the resulting bivariate Weibull and bivariate Gamma distributions can be described by implementing all notions of negative dependence discussed in Section \ref{NProp} and \ref{OrderP}. \begin{example} {\bf Bivariate Weibull distribution:} {\rm A family of bivariate Weibull distributions based on the proposed copula $C_{\theta}$, with marginals $F(x) =\left[ 1 - e^{-(\lambda_1 x)^{\delta_1}}\right]\mathds{1}(x>0)$, and $G(y) = \left[1 - e^{-(\lambda_2 y)^{\delta_2}}\right]\mathds{1}(y>0)$, is given by \begin{equation*}\label{BW} h(x,y) = \begin{dcases} \dfrac{\delta_1\delta_2\lambda_1^{\delta_1}\lambda_2^{\delta_2}\theta^{\theta+1}}{(1+\theta)^{\theta}}x^{\delta_1 -1}y^{\delta_2 - 1} \left(\dfrac{e^{-(\lambda_1 x)^{\delta_1}}}{1-e^{-(\lambda_2 y)^{\delta_2}}}\right)^{1+\theta}, & 0<y \leq\phi_1, x>\phi_2(y) \\ \delta_1\delta_2\lambda_1^{\delta_1}\lambda_2^{\delta_2}(1+\theta)x^{\delta_1 -1}y^{\delta_2 - 1}e^{-(\lambda_2 y)^{\delta_2}}\left(e^{-(\lambda_1 x)^{\delta_1}}\right)^{1+\theta}, & x>0, y>\phi_1 \end{dcases} \end{equation*} where $\phi_1 =\dfrac{1}{\lambda_2}\left[\log(1+\theta)\right]^{\frac{1}{\delta_2}}$, $\phi_2(y)= \dfrac{1}{\lambda_1}\left[\log\left(\dfrac{\theta}{(1+\theta)(1 - e^{-(\lambda_2 y)^{\delta_2}})}\right)\right]^{\frac{1}{\delta_1}}$, $\lambda_{i}>0$, $\delta_{i}>0$ for $i=1,2$. }\end{example} \begin{example} {\bf Bivariate Gamma distribution:}\label{bvgamma} {\rm A family of bivariate Gamma distributions based on the proposed copula $C_{\theta}$, with marginals $F(x)=\left[\int_0^x\frac{1}{\Gamma(\alpha_1)}\beta_1^{\alpha_1}x^{\alpha_1 -1}e^{-\beta_1 x} \right]\mathds{1}(x>0)$, and $G(y) =\left[\int_0^y\frac{1}{\Gamma(\alpha_2)}\beta_2^{\alpha_2}y^{\alpha_2 -1}e^{-\beta_2 y} \right]\mathds{1}(y>0)$, is given by \begin{equation*} h(x,y) = \begin{dcases} \dfrac{\beta_1^{\alpha_1}\beta_2^{\alpha_2}\theta^{1+\theta}x^{\alpha_1 -1}y^{\alpha_2 -1}e^{-(\beta_1 x+\beta_2 y)}}{\Gamma(\alpha_1)\Gamma(\alpha_2)(1+\theta)^\theta}\left[1-\dfrac{\gamma_1(\alpha_1, \beta_1 x)}{\Gamma(\alpha_1)}\right]^\theta \left[\dfrac{\gamma_2(\alpha_2, \beta_2 y)}{\Gamma(\alpha_2)}\right]^{-(1+\theta)}, 0<y \leq\xi_2 , \xi_1(y)<x< \eta \\ \dfrac{\beta_1^{\alpha_1}\beta_2^{\alpha_2}(1+\theta)}{\Gamma(\alpha_1)\Gamma(\alpha_2)}x^{\alpha_1 -1}y^{\alpha_2 -1}e^{-(\beta_1 x+\beta_2 y)}\left[1-\dfrac{\gamma_1(\alpha_1, \beta_1 x)}{\Gamma(\alpha_1)}\right]^\theta, 0<x<\eta, \zeta_1<y<\zeta_2, \end{dcases} \end{equation*} where $\zeta_1=\gamma_2^{-1}\left(\dfrac{\theta}{1+\theta}\right)$, $\zeta_2 = \gamma_2^{-1}(\Gamma(\alpha_2))$, $\xi_2= \gamma_2^{-1}\left(\dfrac{\Gamma(\alpha_2)\theta}{1+\theta}\right)$, $\eta = \gamma_1^{-1}(\Gamma(\alpha_1))$, $\xi_1(y)= \gamma_1^{-1}\left[\Gamma(\alpha_1) \left(1-\dfrac{(1+\theta)\gamma_2(\alpha_2,\beta_2 y)}{\theta \Gamma(\alpha_2)}\right)\right]$, $\gamma_i(\alpha_i, \beta_i) = \int_0^{\beta_i} t^{\alpha_i - 1} e^{-t}dt$, $\alpha_{i}>0$, $\beta_{i}>0$ for $i= 1,2$. } \end{example} \begin{remark} The bivariate Weibull (in Example 5.1) and the bivariate Gamma (in Example 5.2) reduce to bivariate Exponential distribution for $\delta_1=\delta_2 = 1$, and $\alpha_1=\alpha_2 = 1$, respectively. \end{remark} \section{Application}\label{Case} For an illustrative data analysis based on the proposed copula, we consider a dataset on the daily air quality measurements for New York Metropolitan Area from May 1, 1973, to September 30, 1973. Information on average wind speed (in miles per hour) and mean ozone level (in parts per billion), were obtained from the New York State Department of Conservation and the National Weather Service. See \citet[Ch 2-5]{Air} for the detailed description of the data. Ozone in the upper atmosphere protects the earth from the sun's harmful rays. On the contrary, exposure to ozone also can be hazardous to both humans and some plants in the lower atmosphere. Variations in weather conditions play an important role in determining the ozone levels \citep{Metero1, Metero2}. In general, the concentration of the ozone level is affected by a wind speed. High winds tend to disperse pollutants, which in turn, dilute the concentration of the ozone level. However, stagnant conditions or light winds allow pollution levels to build up and, thereby, the ozone level also becomes larger. Environmental scientists and meteorologists are interested in the study of the effect of a wind speed on the distribution patterns of ozone \citep{Wind} levels. Based on the observed data, we find that Spearman's rho and Kendall's tau between the wind speed and the ozone levels are -0.59 and -0.43, respectively, which indicates strong negative dependence. To analyse this phenomenon, we apply a method that close in spirit to the method of inference a function for margins (IFM). \citet[Ch-5]{Joe_2006} have provided a detailed description and theoretical properties of the IFM method. This estimation method is based on two separate maximum likelihood estimations of the univariate marginal distributions, followed by an optimization of the bivariate likelihood as a function of the dependence parameter. However, we do not maximize the bivariate likelihood. Instead, we determine the dependence parameter by equating the empirical rank correlation with the theoretical Spearman's rho. This allows the copula to adequately approximate the dependence structure of the bivariate data \citep[p-255]{Joe_2006}. First, we consider three different models Lognormal, Weibull, and Gamma, for estimation of the parameters associated with the marginal distributions of the wind speed and the mean ozone level. Based on the Akaike information criterion, the Gamma distribution fits both marginals better as compared with other choices. The maximum likelihood estimates of the shape and the scale parameters are obtained as 7.171 and 1.375, respectively, for the wind speed, and the same for the mean ozone levels are 1.7 and 24.775, respectively. The estimate of the dependence parameter is given by $\hat{\theta}=0.765$. Therefore, the joint distribution of wind speed and the mean ozone level is represented by the bivariate Gamma distribution provided in Example \ref{bvgamma}, and presented graphically in Figure \ref{CDF_Data}. We then use the Kolmogorov-Smirnov test to check if the Gamma distribution is adequate for the marginals. Since parameters are estimated from the data, we need to adjust the Kolmogorov-Smirnov (KS) test. We follow the approach considered by \cite{Bala_2016} and compute the p-value of the KS test using the parametric bootstrap based on 10000 samples. The p-values corresponding to the wind speed and the mean ozone level are 0.809 and 0.637, respectively. This clearly indicates reasonably good fit to the observed data. The estimated conditional distributions of the mean ozone level keeping the wind speed fixed at the empirical first decile (5.7 mph), median (9.7 mph), and ninth decile (14.9 mph) are presented in Figure \ref{CND_CDF}. It is easy to see that the distribution of the mean ozone level decreases stochastically (in the sense of the usual stochastic order) as the wind speed increases. \begin{figure}[htp] \centering \includegraphics[scale=0.50]{CDF_Data.pdf} \caption{Estimated joint distribution function of wind speed and mean ozone.} \label{CDF_Data} \end{figure} \begin{figure}[htp] \centering \includegraphics[scale=0.50]{CND_CDF.pdf} \caption{Effect of wind speed on the distribution of mean ozone.} \label{CND_CDF} \end{figure} \section{Concluding Remarks}\label{Con} We construct the new flexible bivariate copula for modeling negative dependence between two random variables. Its correlation coefficient takes any value in the interval $(-1,0)$, which was not the case for most other copulas reported in the literature. It is important to note, that the Spearman's rho and the Kendall's tau have a simple one-parameter form with negative values in the full range. The properties of the proposed copula is an agreement with most of the popular notions of negative dependence available in the literature, namely quadrant dependence, regression dependence and likelihood ratio dependence, etc. We believe that the main contribution of our paper (apart from proposing the new flexible copula that can be used in numerous applications) is the explicit study of its properties. Specifically, we show that the Spearman's rho and the Kendall's tau are the decreasing functions with its dependence parameter and establish relevant ordering properties and connections with the main notions of negative dependence. For the illustrative data analysis based on the proposed copula, we consider a dataset on daily air quality measurements for New York Metropolitan Area. Based on the observed data, we show that the Spearman's rho and the Kendall's tau between wind speed and ozone levels are -0.59 and -0.43, respectively, which indicate strong negative dependence.It is shown that the Gamma distributions fits better for both marginals and that the distribution of the mean ozone level decreases stochastically (in the sense of the usual stochastic order) as the wind speed increases. It is interesting to consider in the future research the semiparametric generalisation of the proposed coupla and to investigate its associated properties. Another possible direction of further studies could be a multivariate extension of the proposed copula using the approaches considered by \cite{Liebscher_2008}, \cite{Fischer_Kock_2008} and \cite{Mazo_et_al_2015}. \section*{\small Acknowledgement} The first author sincerely acknowledges the financial support from the University of the Free State, South Africa. The second author was supported in part by the Lloyd’s Register Foundation programme on data-centric engineering at the Alan Turing Institute, UK. \bibliographystyle{apalike}
\section{Introduction} Deciding which feature to build is a difficult problem for software development organizations. The effect of an idea and its return-on-investment might not be clear before its launch. Moreover, the evaluation of an idea might be expensive. Thus, decisions are based on experience or the opinion of the highest paid person~\cite{kohavi2007practical}. Similarly difficult is the assessment of technical changes on products. It can be difficult to predict the effect of a change on software quality, as evidenced by the extensive research on e.g. defect prediction~\cite{fenton1999critique,wahono2015systematic} or software reliability estimation~\cite{ronchieri2018metrics}. Moreover, there are cases in which it is not feasible to test for all necessary scenarios, e.g. in all relevant software and hardware combinations. Continuous experimentation (CE) addresses these problems. It provides a method to derive information about the effect of a change by comparing different variants of the product to the unmodified product (i.e. A/B testing). This is done by exposing different users to different product variants and collecting data about their behavior on the individual variants. Thereafter, the gathered information allows making data-driven decisions and thereby reducing the amount of guesswork in the decision making. In 2007, Kohavi et al. \citer{kohavi2007practical} published an experience report on experimentation at Microsoft and provided guidelines on how to conduct so-called \emph{controlled experiments}. It is the seminal paper about continuous experimentation and thus represents the start of the academic discussion on the topic. Three years later, a talk from the Etsy engineer Dan McKinley~\cite{mckinley2012design} gained momentum in the discussion. In the talk, the term \emph{continuous experimentation} was used to describe their experimentation practices. Other large organizations, like Facebook \citer{feitelson2013development} and Netflix \citer{uribe2015netflix}, which adopted data-driven decision making~\citer{kohavi2013online}, shared their experiences~\citer{borodovsky2011ab} and lessons learned~\citer{kohavi2009online} about experimentation over the years with the research community. In addition, researchers from industry as well as academia developed methods, models and optimizations of techniques that advanced the knowledge on experimentation. After more than ten years of research, numerous work has been published in the field of continuous experimentation, including work on problems like the definition of an experimentation process~\citer{fagerholm2017right}, how to build infrastructure for large-scale experimentation~\citer{gupta2018anatomy}, how to select or develop metrics \citer{machmouchi2016principles}, or the considerations necessary for various specific application domains~\citer{eklund2012architecture}. The purpose of this systematic literature review is threefold. First, to synthesize the models suggested by the research community to find characteristics of an essential framework for experimentation. This framework can be used by practitioners to identify elements in their experimentation framework. Second, to synthesize the various technical solutions that have been applied. In this inquiry, we also include to what degree the solutions are validated. Finally, to summarize and categorize the challenges and benefits with continuous experimentation. Based on this the following four research questions are addressed in this work: \begin{itemize} \item[]\textbf{RQ1:} What are the core constituents of a CE framework? \item[]\textbf{RQ2:} What technical solutions are applied in what phase within CE? \item[]\textbf{RQ3:} What are the challenges with CE? \item[]\textbf{RQ4:} What are the benefits with CE? \end{itemize} The research method of this study is based on two independently conducted mapping studies~\citer{auer2018current, ros2018continuous2}. We extended and validated the studies by cross-examining the included studies. Thereafter, we applied two qualitative narrative syntheses and a thematic synthesis on the resulting set of papers. In the following Section \ref{sec:background} an overview of continuous experimentation and related software practices is given. Next, Section \ref{sec:research_method} describes the research method applied and Section \ref{sec:results} presents the results of the research. In Section \ref{sec:discussion} the findings are discussed. Finally, Section \ref{sec:conclusions} summarizes the research. \section{Background} \label{sec:background} In this section we present an overview of continuous experimentation and related continuous software engineering practices. Further, we summarize our two previously published mapping studies. For the novice reader, we recommend Fagerholm et al.'s descriptive model of continuous experimentation~\citer{fagerholm2017right}, or Kohavi et al.'s tutorial on controlled experiments~\citer{kohavi2008controlled}, which is a more hands on introduction for continuous experimentation. \subsection{Continuous software engineering} \label{sec:background_continuous_software_engineering} In their seminal paper on controlled experiments on the web from 2007, Kohavi et al.~\citer{kohavi2007practical} explain how the ability to continuously release new software to users is crucial for efficient and continuous experimentation, which is now known as continuous delivery and continuous deployment. Together with continuous integration, these are the three software engineering practices that allow software companies to release software to users rapidly and reliably~\cite{shahin2017continuous} and are fundamental requirements for continuous experimentation. \emph{Continuous integration} entails automatically merging and integrating software from multiple developers. This includes testing and building an artifact, often multiple times per day. \emph{Continuous delivery} is the process by which software is ensured to be always in state to be ready to be deployed to production. Successful implementation of continuous integration and delivery should join the incentives of development and operations teams, such that developers can release often and operations get access to powerful tools. This has introduced the DevOps~\cite{ebert2016devops} role in software engineering with responsibility for numerous activities: testing, delivery, maintenance, etc. Finally, with \emph{continuous deployment}, the software changes that successfully make it through continuous integration and continuous delivery can be deployed automatically or with minimal human intervention. Continuous deployment facilitates collection of user feedback through faster release cycles~\cite{fabijan2015customer,yaman2016customer}. With faster release cycles comes the ability to release smaller changes, the smaller the changes are the easier it becomes to trace feedback to specific changes. Fitzgerald and Stol~\citer{fitzgerald2017continuous} describe many more continuous practices that encompass not only development and operations, but also business strategy; among them continuous innovation and continuous experimentation. Experiments are means to tie development, quality assurance, and business together, because experiments provide a causal link between software development, software testing, and actual business value. Holmstr{\"o}m Olsson et al.~\cite{olsson2012climbing} describe how ``R\&D as an experiment system'' is the final step in a process that moves through the continuous practices. \subsection{Continuous experimentation} \label{sec:background_process} The process of conducting experiments in a cycle is called \emph{continuous experimentation}. The reasoning is that the results of an experiment often begets further inquires. Whether the original hypothesis was right or wrong, the experimenter learns something either way. This learning can lead to a new hypothesis which is subject to a new experiment. This idea of iterative improvement is known since long from the engineering cycle or from iterative process improvements, as explained in the models Plan-Do-Check-Act~\cite{deming1986out} or quality process improvement paradigm (QIP)~\cite{basili1985quantitative}. The term ``continuous experimentation'' as used by software engineering researchers refers to a holistic approach~\citer{fitzgerald2017continuous} which spans a whole organization. It considers the whole software life-cycle, from business strategy and planning over development to operations. Some authors have included many methods of gathering feedback in continuous experimentation~\citer{fagerholm2017right,lindgren2016raising}, including qualitative methods and data mining. These methods are not the focus of this work, though they are also valuable forms of feedback~\cite{bosch2015user,yaman2016customer}. For example, qualitative focus groups in person with selected users can be used early in development on sketches or early prototypes. The human-computer interaction research field has studied this extensively---recently under the name of \emph{user experience research}---and it has also been the subject of software engineering literature reviews in combination with agile development~\cite{jurca2014integrating,salah2014systematic}. In contrast to the qualitative methods, a controlled experiment requires a completed feature before it can be conducted. It is focused on quantitative data, thus cannot easily answer questions on the rationale behind the results, as qualitative methods can. As such, these methods compliment each other, but they are different in terms of methodology, infrastructure, and process. We discuss the qualitative methods through the lens of controlled experimentation in Section~\ref{sec:results_qualitative}. A \emph{randomized controlled experiment} (or A/B test, bucket test, or split test) is a test of an idea or a \emph{hypothesis} in which variables are systematically changed to isolate the effects. Because the outcome of an experiment is non-deterministic, the experiment is repeated with multiple \emph{subjects}. Each subject is randomly assigned to some of the variable settings. The goal of the experiment is to investigate whether changes in the variables have a causal effect on some output value, usually in order to optimize it. In statistical terminology, the variable that is manipulated is called the independent variable and the output value is called the dependent variable. The effect that changing the independent variables has on the dependent variable can be expressed with a statistical \emph{hypothesis test}. A significance test involves calculating a p-value\footnote{T-test is often used to compare whether the mean of two groups are equal, based on the t-score $t=\frac{\bar{x}_1-\bar{x}_2}{s/\sqrt{n}}$, where $\bar{x}$ is mean, $s$ is the standard deviation, and $n$ is the number of data points. The p-value is derived from the t-score through the t-distribution.} and the hypothesis is validated if the p-value is below a given \emph{confidence level}, often $95\%$. In addition, properly conducting a controlled experiment requires a power calculation\footnote{A simple approximate power calculation~\cite{kohavi2007practical} for fixed $95\%$ confidence level and $90\%$ statistical power is $n = (4rs/\Delta)^2$, where $n$ is the number of users, $r$ is the number of groups, $s$ is the standard deviation, and $\Delta$ is the effect to detect.} to decide experiment duration. In software engineering, a controlled experiment is often used to validate a new product feature, in that case the independent variable is whether a previous baseline feature or the new feature should be used. These are sometimes called control and test group, or the A and B group, in which case the \emph{experiment design} is called an A/B test. In an A/B test, only one variable is changed; other experiment designs are possible~\citer{fisher1937design,kohavi2008controlled} but rarely used~\cite{ros2018continuous2}. To optimize software configuration settings is another use of controlled experiments in software engineering~\citer{letham2019constrained}. The dependent variable of the experiment is some measurable metric, designed with input from some business or customer needs. If there are multiple metrics involved with the experiment, then an overall evaluation criteria (OEC)~\cite{roy2001design} can be used, which is the most important metric for deciding on the outcome of the experiment. The subjects of the experiments are usually users, that is, each user provides one or more data points. In some cases the subjects are hardware or software parameters, for example, when testing optimal compiler settings. The process of continuous experimentation (see Fig.~\ref{fig:ce_process}) has similarities to the tradition from science in software engineering research~\cite{wohlin2012experimentation} and elsewhere~\cite{fisher1937design}. However, we base the following process on the RIGHT model by Fagerholm et al.~\citer{fagerholm2017right}. There are five main phases of the process. 1) In the \emph{ideation} phase hypotheses are elicited and prioritized. 2) \emph{Implementation} of a minimum viable product or feature (MVP) that fulfill the hypothesis follows. 3) Then, a suitable \emph{experiment design} with an OEC is selected. 4) \emph{Execution} involves release engineers deploying the product into production and operations engineers monitoring the experiment in case something goes wrong. Finally, 5) an \emph{analysis} is conducted with either statistical methods by data scientists or by qualitative methods by user researchers. If the results are satisfactory the feature is included in the product and a new hypothesis is selected so the product can be further refined. Otherwise, a decision must be made if to persevere and continue the process or if a pivot should be made to some other feature or hypothesis. Lastly, the results should be generalized into knowledge so the experience gained can be used to inform future hypotheses and development on other features. \begin{figure} \centering \small \input{figure-ce-process.tex} \caption{Continuous experimentation process overview in five phases. A hypothesis is prioritized and implemented as a minimum viable product, then an experiment is designed and conducted that evaluates the software change, finally a decision is made to continue or pivot to another feature. This simplified process is based on the RIGHT model. The roles involved in each phase are shown to the left.} \label{fig:ce_process} \end{figure} Many of the papers included in this study are on improved analysis methods. One such direction that need additional explanation is \emph{segmentation}. It is used in marketing to create differentiated products for different segments of the market. In the context of experiments it is used to calculate metrics for various slices of the data in, e.g. gender, age groups, or country. Experimentation tools usually perform automated segmentation~\citer{gupta2018anatomy} and can, for example, send out alerts if a change affects a particular user group adversely. \subsection{Previous Work} \label{sec:previous_work} Prior to this literature review, two independent mapping studies~\citer{ros2018continuous,auer2018current} were conducted by the authors. Although both studies were in the context of continuous experimentation, their objectives differed. In their mapping study \citer{ros2018continuous}, Ros and Runeson provided a short thematic synthesis of the topics in the published research and examined the context of the research in terms of reported organisations and types of experiments that were conducted. They found that there is a diverse spread of organisations of company size, sector, etc. Although, continuous experimentation for software that does not require installation (e.g. websites) was more frequently reported. Concerning the experimentation treatment types, the authors found more reports about visual changes than algorithmic changes. In addition, the least common type of treatment encountered in literature was new features. Finally, it was observed that the standard A/B test was by far the most commonly used experiment design. The mapping study \cite{auer2018current} by Auer and Felderer investigated the characteristics of the state of research on continuous experimentation. They observed that the intensity of research activities increased from year to year and that there is a high amount of collaboration between industry and academia. In addition, the authors observed that industrial and academic experts contributed equally to the field of continuous experimentation. Concerning the most influential publications (in terms of citations), the authors found that the most common research type among them is experience report. Another observation of the authors was that in total ten different terms were used for the concept of continuous experimentation. To summarize, the two previous studies discussed continuous experimentation in terms of its applicability in industry sectors, the treatment types and experimentation designs reported, as well as the characteristics of the research in the field. In contrast to these two mapping studies, this study has a far more comprehensive synthesis. Furthermore, the two previous studies improved the rigor and completeness of the search and synthesis procedures. \section{Research Method} \label{sec:research_method} Based on these two independently published systematic mapping studies~\cite{auer2018current,ros2018continuous2} we conducted a joint systematic literature review. Thus, the presented sets of papers from these two studies were used as starting sets. Forward snowballing was applied, by following the assumption from Wohlin~\cite{Wohlin2016} that publications acknowledge previous research. Relevant research publications were identified in the resulting sets. Next, the two sets were merged and the resulting set was studied to answer the respective research questions. Therefore, qualitative narrative syntheses~\cite{huang2018synthesizing} and a thematic synthesis~\cite{cruzes2011recommended} were conducted to answer the research question based on the found literature. In the following, the research objective and the forward snowballing procedures are presented. Thereafter, the syntheses used to answer the research questions are described. Finally, the threats to validity are discussed. \iffalse \begin{figure}[h] \centering \includegraphics[width=\textwidth, trim=0cm 11cm 6cm 0.5cm,clip]{figure-research-process.pdf} \caption{Applied research method. The set of papers A and B were individually processed until the data integration. Therefore, half of the authors worked on Set A and half of them on Set B. } \label{fig:research-process} \end{figure} \fi \subsection{Research objective} The aim of this research is to give an overview of the current state of knowledge about specific aspects of continuous experimentation. The research questions as stated in the introduction are on: 1) core constituents of a CE framework, 2) technical solutions within CE, 3) challenges with CE, and 4) benefits with CE. Based on the prior mapping studies we observed that there were many papers on models for processes and infrastructure, technical solutions, and challenges for CE and identified these as suitable targets for a systematic review. \subsection{Forward snowballing} The two existing sets of papers emerging from the previous literature reviews \citer{auer2018current,ros2018continuous2}, were used as starting sets for forward snowballing. They were selected as starting sets, because both studies were in the field of continuous experimentation and they had similar research directions. Moreover, both studies were conducted within a short time of each other and had similar inclusion criteria. Hence, the authors are confident that the union of both selected paper sets is a good representation of the field of continuous experimentation in this context until 2017. The forward snowballing was executed independently for each starting set. After having elaborated a protocol to follow, half of the authors worked on Set A (based on \citer{auer2018current}, with 82 papers) and half of them on the other Set B (based on \citer{ros2018continuous2}, with 62 papers). In total, the starting sets contained 100 distinctive papers of which 44 papers were shared among both starting sets. The citations were looked up on Google Scholar\footnote{\url{https://scholar.google.com/}}. Since the two previous mapping studies covered publications until 2017, the forward snowballing was conducted by considering papers within the time span 2017--2019. The snowballing was executed until no new publications were found. In the process of snowballing, we used a joint set of inclusion and exclusion criteria. A paper was included if \emph{any} of the inclusion criteria applies, unless \emph{any} of the exclusion criteria applies. The decision was based primarily on the abstract of papers. If this was insufficient to make a decision, the full paper was examined. In doubt, the selection of a paper was discussed with at least one other author. The criteria were defined as such: \paragraph{Inclusion criteria} \begin{itemize} \item Any aspect of continuous experimentation (process, infrastructure, technical considerations, etc.) \item Any aspect of controlled experiments (designs, statistics, guidelines, etc.) \item Techniques that complement controlled experiments \end{itemize} \paragraph{Exclusion criteria} \begin{itemize} \item Not written in English \item Not accessible in full-text \item Not peer reviewed or not a full paper \item Not a research paper: track, tutorial, workshop, talk, keynote, poster, book \item Duplicated study (the latest version is included) \item Primary focus on business-side of experimentation, advertisement, user interface, recommender system \end{itemize} The quality and validity of the included research publications were ensured through the inclusion and exclusion criteria. For instance, publications that did not go through a scientific peer-reviewing process were not considered according to the exclusion criteria. Moreover, to ensure that only mature work was included both vision papers with no evidence based contribution and short papers with preliminary results were excluded. To summarize, the forward snowballing based on the starting Set A~\citer{auer2018current} resulted in 100 papers (Set A') and the starting Set B~\citer{ros2018continuous2} resulted in 88 papers (Set B'). After merging the two paper sets, a total of 128 distinctive papers represent the result of the applied forward snowballing. \subsection{Synthesis} To answer each research question, the collection of found papers was studied in more detail with respect to the individual research question. Therefore, two qualitative narrative syntheses~\citer{huang2018synthesizing} and one thematic synthesis~\cite{cruzes2011recommended} were conducted. For the first two research questions a narrative synthesis was conducted for each question. This type of synthesis aggregates qualitative recurring themes within papers and provides a foundation for evidence-based interpretations of the themes in a narrative manner. Thus, the collected set of papers was studied under the heading of the two respective research questions (RQ1, RQ2) to identify relevant themes in it. Next, the found themes were summarized and identified patterns within them were reported. In addition, all papers were classified in terms of their \emph{research type} according to Wieringa et al.~\cite{wieringa2005requirements} to identify what solutions were applied (RQ2). As a result, the findings represent an aggregated view on the components of a continuous experimentation framework (RQ1) and the technical solutions that are applied during experimentation (RQ2). The found components of a continuous experimentation framework are described in Section \ref{subsec:results_rq1}. An overview of the identified solutions can be found in Section~\ref{sec:results-rq2}. For the third research question, a thematic synthesis following the steps and checklist proposed by Cruzes and Dyb\r{a} \citer{cruzes2011recommended} was conducted (see Fig.~\ref{fig:thematic-process}). In addition, the examples given in Cruzes et al.~\citer{Cruzes14empirical} were consulted. As an initial step, all 128 selected papers were read and in total 154 segments of text were identified. Next, each text segment was labeled with a code. A total of 84 codes were used to characterize the text segments. These codes were loosely based on terms that were identified in previous literature studies \citer{auer2018current,ros2018continuous2} and evolved during the labeling of the text segments. Thereafter, the codes that had overlapping themes were reduced into 17 themes. In the last step, these 17 themes were arranged according to 6 higher-order themes. The result of this analysis can be found in Section~\ref{sec:results:challenges}. \begin{figure} \centering \includegraphics[width=0.8\textwidth, trim=0cm 10.5cm 10cm 0cm,clip ]{fig-thematic-analysis.pdf} \caption{Applied thematic synthesis process (adapted from Cruzes et al. \cite{cruzes2011recommended,Cruzes14empirical})} \label{fig:thematic-process} \end{figure} Fig.~\ref{fig:thematic-process-example} illustrates the thematic analysis process with the theme ``low impact''. Based on the reading of five papers, four text segments were extracted. These segments were labeled with the codes benefits, budget and experiment prioritization. In the next step, the common theme among the codes was identified and the codes were reduced to the theme ``low impact''. During the creation of the model of higher-order themes, this theme was assigned to the higher-order theme ``business challenges''. All text segments and codes can be found in the results of the study that are available online (see Section~\ref{subsec:threats-to-validity}). \begin{figure} \centering \includegraphics[width=0.8\textwidth, trim=0cm 7cm 0cm 0cm,clip ]{fig-thematic-analysis-example.pdf} \caption{Schematic example of the thematic synthesis.} \label{fig:thematic-process-example} \end{figure} \subsection{Threats to validity}\label{subsec:threats-to-validity} In every step of this research possible threats to its validity were considered and minimized when possible. In the following, the potential threats are discussed to provide guidance in the interpretation of this work. This section is structured by the four criteria construct validity, internal validity, external validity and reliability by Easterbrook et al. \cite{Easterbrook_2008}. \paragraph{Construct validity} This threat is about the validity of identification and selection of publications. A challenging threat to overcome is the completeness of the literature search without a biased view of the subject. To mitigate this threat, all papers from the start sets were used without any further exclusion. The larger start set (in comparison to applying the exclusion criteria from the start) was expected to lead to a broader coverage of the literature during the forward snowballing. Furthermore, the process of forward snowballing was adapted in the way that the candidate selection was tolerant about which papers to include, which increases the coverage of the literature search. However, publications may have been falsely excluded because of misjudgment. Nevertheless, we conducted two parallel forward snowballing searches by different authors based on slightly different starting sets, which should mitigate this threat. \paragraph{Internal validity} Threats that are caused by faulty conclusions could happen because of authors bias at the selection, synthesis of publications and interpretation of the findings. To mitigate this threat, a second author was consulted in case of any doubt. Nevertheless, activities like paper inclusion/exclusion and thematic synthesis inevitably suffer from subjective decisions. \paragraph{External validity} Threats to external validity covers to which extent the generalization of the results is justified. As the aim of this study is to give an overview of continuous experimentation and to explore the future work items in continuous experimentation, the results should not be generalized beyond continuous experimentation. Therefore, this threat is neglectable. \paragraph{Reliability} This threat focuses on the reproducibility of the study and the results. To mitigate this threat every step and decision of the study were recorded carefully and the most important decisions are reported. The results of the study are available online~\cite{auer_ros_kaltenbrunner_runeson_felderer_2021}. This enables other researchers to validate the decision made on the data. Furthermore, it allows to repeat the study. \section{Results} \label{sec:results} In this section the results of the literature review are presented according to the research questions. \subsection{What are the core constituents of a CE framework (RQ1)?}\label{subsec:results_rq1} To conduct continuous experimentation, an organization has to have some constituents of a framework for experimentation. There is some process involved (implicit or explicit) and some infrastructure is required, which includes a toolchain as well as organizational processes. In the following, both aspects of an experiment, the process and its supporting infrastructure are discussed in detail. \subsubsection{Experiment process} The experiment process can be described in a model that gives a holistic view of the phases and environment around experimentation. Most studies on experiment processes present qualitative models based on interview data. Two models describe the overall process of experimentation. First, the reference model RIGHT (Rapid Iterative value creation Gained through High-frequency Testing) by Fagerholm et al.~\citer{fagerholm2017right} contains both an infrastructure architecture and a process model for continuous experimentation. The process model builds on the Build, Measure, Learn~\cite{ries2011lean} cycle of Lean Startup. The process in Figure~\ref{fig:ce_process} is a simplified view of RIGHT. Second, the HYPEX (Hypothesis Experiment Data-Driven Development) model is another earlier process model by Holmstr{\"o}m Olsson and Bosch~\citer{olsson2014from}. In comparison to the RIGHT model, it is less complete in scope, however it does go into further details in hypothesis prioritization using a gap analysis. Kevic et al.~\citer{kevic2017characterizing} present concrete numbers on the experiment process used at Microsoft Bing through a source code analysis. They have three main findings: 1) code associated with an experiment is larger in terms of files in a changeset, number of lines, and number of contributors; 2) experiments are conducted in a sequence of experiments lasting on average 42 days, where each experiment is on average conducted for one week; and 3) only a third of such sequences are eventually shipped to users. In addition to the general models described above, several models deal with a specific part of the experiment cycle. The CTP (Customer Touchpoint) model by Sauvola et al.~\citer{sauvola2018continuous} focuses on user collaboration and describes the various ways that user feedback can be involved in the experimentation stages. Amatrian~\citer{amatriain2013beyond} and Gomez-Uribe and Hunt~\citer{uribe2015netflix} describe their process for experimentation on their recommendation system at Netflix, in particular how they use offline simulation studies with online controlled experiments. In the ExG Model (Experimentation Growth), by Fabijan et al.~\citer{fabijan2017evolution,fabijan2018online2}, organizations can quantitatively gauge their experimentation on technical, organizational, and business aspects. In another model by Fabijan et al.~\citer{fabijan2018effectivePAPER} they describe the process of analyzing the results of experiments and present a tool that can make the process more effective, by e.g. segmenting the participants automatically and highlighting the presence of outliers. Finally, Mattos et al.~\citer{mattos2018activity} present a model that discuss details on activities and metrics on experiments. \subsubsection{Infrastructure} Depending on what type of experimentation is conducted, different infrastructure is required. For controlled experimentation, in particular, technical infrastructure in the form of an \emph{experimentation platform} is critical to increase the scale of experimentation. At the bare minimum it needs to divide users into experiment groups and report statistics. Gupta et al.~\citer{gupta2018anatomy} at Microsoft have detailed the additional functionality of their experimentation platform. Also Schermann et al.~\citer{schermann2018doing} have described attributes of system and software architecture suitable for experimentation, namely, that micro-service-based architectures seem to be favored. Some experimentation platforms are specialized to specific needs: automation~\citer{mattos2017your}, or describing deployment through formal models~\citer{schermann2016bifrost}, or how experimentation can be supported by non-software engineers~\citer{koukouvis2016ab,firmenich2018usability}. There are also non-technical infrastructure requirements, regardless of the type of experimentation in use. The required roles are~\citer{fitzgerald2017continuous}: data scientists, release engineers, user researchers, and the standard software engineering roles. Also, an organizational culture~\citer{kohavi2009online,xu2015from} that is open towards experimentation is needed. For example, Kohavi et al.~\citer{kohavi2009online} explain that managers can hinder experimentation if they overrule results with their opinions. They call the phenomenon the highest paid persons opinion (HiPPO). While experimentation is typically associated with large companies, like Microsoft or Facebook, there are three interview studies that discuss experimentation at startups specifically~\citer{bjorklund2013lean,gutbrod2017how,fagerholm2017right}. As argued by Gutbrod et al.~\citer{gutbrod2017how}, startup companies often guess or estimate roughly about the problems and customers they are addressing. Thus, there is a need for startup companies to be more involved with experimentation, although they have less infrastructure in place. Finally, we would like to call attention to some of the few case studies and experience reports on experimentation on ``ordinary'' software companies, which are neither multi-national corporations nor startups~\citer{ros2018continuous,rissanen2015continuous,yaman2018continuous}; in e-commerce, customer relations, and gaming industry respectively. None of these papers are focused on infrastructure, but do mention that infrastructure needs to be implemented. Risannen et al.~\citer{rissanen2015continuous} mentions additional challenges when infrastructure must be implemented on top of a mature software product. In summary, this indicates that infrastructure requirements are modest unless scaling up to multi-national corporation levels with millions of users. \subsection{What technical solutions are applied in what phase within CE (RQ2)}\label{sec:results-rq2} The study of the selected publications revealed many different types of solutions that were summarized by common themes. Figure \ref{fig:rq2-overview} gives an overview of the identified solutions organized in the phases of experimentation in Figure~\ref{fig:ce_process}. \begin{figure} \centering \small \input{solutions.tex} \caption{Solutions applied within continuous experimentation arranged by main phase of experimentation from Section~\ref{sec:background_process}.} \label{fig:rq2-overview} \end{figure} \subsubsection{Data mining} Data from previous experiments can be used to make predictions or mine insights to either improve the reliability of the experiment or for ideation. There were three specific solutions for data mining in continuous experimentation: 1)~calculating variance of metrics through bigger data sets than just one experiment at Netflix~\citer{xie2016improving}, Microsoft~\citer{deng2015objective,deng2013improving}, Google~\citer{hohnhold2015focusing}, and Oath~\citer{appiktala2017demystifying}; 2)~mining for invalid tests through automatic diagnosis rules at LinkedIn~\citer{chen2019how} and Sevenval Technologies~\citer{nolting2016context}; and finally 3)~to extract insights from segments of the users, by detecting if a treatment is more suitable for those specific circumstances~\citer{duivesteijn2017have}, this technique is applied at Snap~\citer{xie2018false} and Microsoft~\citer{fabijan2018effectivePAPER}. \subsubsection{Metric specification} Defining measurements for software is difficult. At Microsoft they have hundreds of metrics in place for each experiment, they recommend organizing metrics in a hierarchy~\citer{machmouchi2016principles} and evaluating how well metrics work~\citer{deng2016data,dmitriev2016measuring}. At Yandex, they pair OEC metrics with a statistical significance test to create an overall acceptance criteria (OAC) instead~\citer{drutsa2015practical}. Several pieces of work are on defining and improving usability metrics, especially from Yandex~\citer{budylin2018consistent,drutsa2017using,kharitonov2017learning}. Also at Microsoft they have a rule-based classifier where each user action is either a frustration or benefit signal~\citer{machmouchi2017beyond}. Some general guidelines for defining metrics follow. At Microsoft~\citer{deng2016data,dmitriev2016measuring,machmouchi2016principles}, they have hundreds of metrics for each experiment (in addition to a few OEC). Machmouchi and Buscher~\citer{machmouchi2016principles} from Microsoft describe how their metrics are interpreted in a hierarchy in their tool (similar to Fabijan et al.~\citer{fabijan2018effectivePAPER} also at Microsoft). At the top of the hierarchy are statistically robust metrics (meaning they tend not to give false positives) and at the bottom are feature specific metrics that are allowed to be more sensitive. They have also developed methods to evaluate how well metrics work. Dmitriev et al.~\citer{dmitriev2016measuring} give an experience report on how metrics are evaluated at Microsoft system in practice. Deng et al.~\citer{deng2016data} define metrics for evaluating metrics: directionality and sensitivity. They measure respectively whether a change in the metric aligns with good user experience and how often it detects a change in user experience. Usability metrics are hard to define since they are not directly measurable without specialized equipment, such as eye-tracking hardware or focus groups. The measurements that are available, such as clicks or time spent on the site, do not directly inform on whether a change is an improvement or degradation in user experience. In addition, good user experience does not necessarily correlate positively with business value, e.g. clickbait titles for news articles are bad user experience but generate short term revenue. Researchers from Yandex~\citer{budylin2018consistent,drutsa2015sign,drutsa2015future,drutsa2017using,kharitonov2017learning,poyarkov2016boosted} are active in this area, with the following methods focused on usability metrics: detecting whether a change in a metric is a positive or negative user experience~\citer{drutsa2015sign}; learning sensitive combinations of metrics~\citer{kharitonov2017learning}; quantifying and detecting trends in user learning~\citer{drutsa2017using}; predicting future behavior to improve sensitivity~\citer{drutsa2015future}; applying machine learning for variance reduction~\citer{poyarkov2016boosted}; and finally correcting misspecified usability metrics~\citer{budylin2018consistent}. Machmouchi et al.~\citer{machmouchi2017beyond}, at Microsoft, designed a rule-based classifier where each user action is either a frustration or benefit signal; the tool then aggregates all such user actions taken during a session into a single robust utility metric. \subsubsection{Variants of controlled experiments design} Most documented experiments conducted in industry are univariate A/B/n-tests~\citer{ros2018continuous2}, where one or more treatments are tested against a control. Extensions to classical designs include a two-staged approach to A/B/n tests~\citer{deng2014statistical} and a design to estimate causal effects between variables in a multivariate test (MVT)~\citer{peysakhovich2018learning}. MVTs are cautioned against~\citer{kohavi2014seven} because of their added complexity. In contrast, other researchers take an optimization approach using lots (see Section~\ref{subsec:automated_controlled}) of variables with multi-armed bandits~\citer{claeys2017regression,hill2017efficient,mattos2018optimization,ros2018continuous} or search-based methods ~\citer{miikkulainen2017conversion,ros2017automated,tamburrelli2014towards}. Also mixed methods research is used to combine quantitative and qualitative data. Controlled experiments require deployment, feedback from users at earlier stages of development can thus be cheaper. There are works on combining results of such qualitative methods~\citer{bosch2016speed} and collecting it in parallel with A/B tests~\citer{speicher2014ensuring}. \subsubsection{Quasi-experiments} A quasi-experiment (or natural experiment) is an experiment that is done sequentially instead of in parallel; this definition is the same as in empirical research in general~\cite{wohlin2012experimentation}. The reason for doing it is that it has a lower technical complexity. In fact, any software deployment can have its impact measured by observing the effect before and after deployment. The drawback of this is that analyzing the results can be difficult due to the high risk of having external changes affect the result. That is, if anything extraordinary happens roughly at the same time as the release it might not be possible to properly isolate the results. Since the world of software is in constant change the use of quasi-experiments is challenging. The research directions on quasi-experiments involve how to eliminate external sources of noise to get more reliable results. This is studied at Amazon~\citer{hill2015measuring} and Linkedin~\citer{xu2016evaluating}, particularly for environments were control is continuous deployment is hard (such as mobile app development). \subsubsection{Automated controlled experimentation with optimization algorithms} \label{subsec:automated_controlled} With an optimization approach, the allocation of users to the treatment groups is dynamically varied to optimize an OEC, such that treatments that perform well continuously receive more and more traffic over time. With sufficient automation, these techniques can be applied to lots of treatment variables simultaneously. This is not a replacement for classical designs; in an interview study by Ros and Bjarnason~\citer{ros2018continuous}, they explain that such techniques are often validated themselves using A/B tests. In addition, based on the studies included here, only certain parameters are eligible, such as the design and layout of components in a GUI, or parameters to machine learning algorithms or recommender systems. Some of these optimizations are black-box methods, where multiple variables are changed simultaneously and with little opportunity to make statistical inferences from the experiments. Tamburelli and Margara~\citer{tamburrelli2014towards} proposed search-based methods (i.e. genetic algorithms) for optimization of software, and Iitsuka and Matsuo~\citer{iitsuka2015website} demonstrated a local search method with a proof of concept on web sites. Miikkulainen~\citer{miikkulainen2017conversion}, at Sentient Technologies, have a commercial genetic algorithm profiled for optimizing e-commerce web sites. Bandit optimization algorithms are also used in industry at Amazon~\citer{hill2017efficient} and AB Tasty~\citer{claeys2017regression}, it is a more rigorous formalism that requires the specification of a statistical model on how the OEC behaves. Ros et al.~\citer{ros2017automated} suggested a unified approach of genetic algorithms and bandit optimization. Similar algorithms exist to handle continuous variables, as is needed for hardware parameters~\citer{gerostathopoulos2018tool,mattos2018optimization} and for optimizing machine learning and compiler parameters~\citer{letham2019constrained}. Two studies apply optimization~\citer{kharitonov2015optimised,schermann2018search} to scheduling multiple standard A/B tests to users, where only a single treatment is administered to each user. The idea is to optimize an OEC without sacrificing statistical inference. \subsubsection{Variability management} Experimentation incurs increased variability\textemdash by design\textemdash in a software system. This topic deals with solutions in the form of tools and techniques to manage said variability. In terms of an experiment platform, this can be part of the \emph{experiment execution service} and/or the \emph{experimentation portal}~\citer{gupta2018anatomy}. There have been attempts at imposing systematic constraints and structure in the configuration of how the variables under experimentation interact with formal methods. C{\'a}mara and Kobsa~\citer{cmara2009facilitating} suggest using a feature model of the software parameters in all experiments. This work has not advanced beyond a proof-of-concept stage. Neither in our study, nor in the survey by Schermann et al.~\citer{schermann2018doing}, is there any evidence of formal methods in a dynamic and constantly changing experimentation environment. The focus of the tools in actual use are rather on flexibility and robustness~\citer{bakshy2014designing,tang2010overlapping}. Rahman et al.~\citer{rahman2016feature} studied how feature toggles are used in industry. Feature toggles are ways of enabling and disabling features after deployment, as such they can be used to implement A/B testing. They were found to be efficient and easy to manage but adds technical debt. A middle ground between formal methods and total flexibility has evolved in the tools employed in practice. Google has proprietary tools in place to manage overlapping experiments in large scale~\citer{tang2010overlapping}. In their tools, each experiment can claim resources used during experimentation and a scheduler ensures that experiments can run in parallel without interference. Facebook has published an open-source framework (PlanOut) specialized for configuring and managing experiments~\citer{bakshy2014designing}, it features a namespace management system for experiments running iteratively and in parallel. SAP has a domain-specific language~\citer{westermann2013experiment} for configuring experiments that aims at increasing automation. Finally, Microsoft has the ExP platform, but none of the selected papers focus solely on the variability management aspect of it. \subsubsection{Improved statistical methods} The challenges with experimentation motivate improved statistical techniques specialized for A/B testing. There are many techniques for fixing specific biases, sources of noise, etc: a specialized test for count data at SweetIM~\citer{borodovsky2011ab}; fixing errors with dependent data at Facebook~\citer{bakshy2013uncertainty}; improvements from the capabilities of A/A testing on diagnosis (which tests control vs control expecting no effect) at Yahoo~\citer{zhao2016online} and Oath~\citer{chen2017faster}; better calculation of overall effect for features with low coverage at Microsoft~\citer{deng2015diluted}; fixing errors from personalization interference at Yahoo~\citer{das2013when}; fixing tests under telemetry loss at Microsoft~\citer{gupchup2018trustworthy}; correcting for selection bias at Airbnb~\citer{lee2018winners}; and algorithms for improved gradual ramp-up at Google~\citer{medina2018online} and LinkedIn~\citer{xu2018sqr}. \subsubsection{Continuous monitoring} Aborting controlled experiments pre-maturely in case of outstanding or poor results is a hotly debated topic on the internet and in academia, under the name of continuous monitoring, early stopping, or continuous testing. The reason for wanting to stop early is to reduce opportunity costs and to increase development speed. It is studied by Microsoft~\citer{deng2016continuous}, Yandex~\citer{kharitonov2015sequential}, Optimizely~\citer{johari2017peeking}, Walmart~\citer{abhishek2017nonparametric}, and Etsy~\citer{ju2019sequential}. This concept is similar to the continuous monitoring used by researchers in the DevOps community and continuous software engineering~\citer{fitzgerald2017continuous} where it refers to the practice of monitoring a software system and sending alerts in case of faults. The issue with continuous monitoring of experiments is the increased chance of getting wrong results if carried out incorrectly. Traditionally, the sample size of an experiment is defined beforehand through a power calculation. If the experiment is continuously monitored with no adjustment, then the results will be skewed with inflated false negative and positive error rates. \subsubsection{Qualitative feedback} \label{sec:results_qualitative} While the search strategy in this work was focused on controlled experiments, research on qualitative feedback was also included from experience reports on using many different types of feedback collecting methods, for example at Intuit~\citer{bosch2012building,bosch2016speed} and Facebook~\citer{feitelson2013development}. The qualitative methods are used as complements to quantitative methods, either as a way to better explain results or as a way to obtain feedback earlier in the process, before a full implementation is built. That is, qualitative feedback can be collected on early user experience sketches or mock-ups. Another use of qualitative methods is to elicit hypotheses that can be used as a starting point for an experiment. Examples of methods include focus groups, interviews, and user observations. In addition, at Unister~\citer{speicher2014ensuring} the authors explain how they collect qualitative user feedback in parallel with A/B tests, such that the feedback is split by experiment group. According to the authors, this seems to be a way to get the best of both quantitative and qualitative worlds. It does require implementing a user interface for collecting the feedback in a non-intrusive way in the product. Also, the qualitative feedback will not be of as high quality as when it is done in person with e.g. user observation or focus groups. \subsection{What are the challenges with continuous experimentation (RQ3)?} \label{sec:results:challenges} Continuous experimentation encompasses a lot of the software engineering process, it requires both infrastructure support and a rigorous experimentation process that connects the software product with business value. As such, many things can go wrong and the challenges presented here is an attempt at describing such instances. Most of the research on challenges is evaluation research, with interviews or experience reports. Many of the challenges are severe, in that they present a hurdle that must be overcome to conduct continuous experimentation. A failure in any of the respective category of challenges will make an experiment: unfeasible due to technical reasons, not considered by unresponsive management, untrustworthy due to faulty use of statistics, or without a business case. The analysis of the papers revealed six categories of challenges (see Table \ref{tab:challenges}) that are discussed in the following in more detail. \begin{table}[tpbh] \centering \renewcommand{\arraystretch}{1.2} \caption{Summary of challenges with continuous experimentation per category with description and key references that focus on them.} \label{tab:challenges} \footnotesize \vspace{-15pt} \begin{tabularx}{\textwidth}{@{}>{\raggedright}p{7.5em}Xr@{}} \toprule \textbf{Challenge} & \textbf{Description} & \textbf{References} \\ \midrule \multicolumn{2}{l}{\emph{1. Cultural, organizational, and managerial challenges}} \vspace{-2pt}\\ \midrule Knowledge building & There are many roles and skills required, so staff need continuous training. & \citer{kohavi2013online,rissanen2015continuous,yaman2017introducing} \\ Micromanagement & Experimentation requires management to focus on the process (c.f. HiPPO in Section \ref{sec:challenge_soft}). & \citer{kohavi2009online} \\ Lack of adaption & Engineers need to be onboarded on the process as well as managers. & \citer{lindgren2016raising} \\ Lack of communication & Departments and teams should share their results to aid each other. & \citer{rissanen2015continuous,yaman2017introducing} \\ \midrule \multicolumn{2}{l}{\emph{2. Business challenges}} \vspace{-2pt}\\ \midrule Low impact & Experimentation might focus efforts on incremental development with insufficient impact. & \citer{fitzgerald2017continuous,olsson2017experimentation} \\ Relevant metrics & The business model of a company might not facilitate easy measurement. & \citer{dmitriev2017dirty,fabijan2018online2,lindgren2016raising} \\ Data leakage & Companies expose internal details about their product development with experimentation. & \citer{conti2018spot} \\ \midrule \multicolumn{2}{l}{\emph{3. Technical challenges}} \vspace{-2pt}\\ \midrule Continuous delivery & The CI/CD pipeline should be efficient to obtain feedback fast. & \citer{fabijan2018online2,lindgren2016raising,schermann2018doing} \\ Continuous deployment & Obstacles exists to putting deliveries in production, e.g. on-premise installations in B2B. & \citer{rissanen2015continuous}\\ Experimental control & Dividing users into experimental groups have many subtle failure possibilities. & \citer{crook2009seven,dmitriev2016pitfalls,kohavi2008controlled} \\ \midrule \multicolumn{2}{l}{\emph{4. Statistical challenges}} \vspace{-2pt}\\ \midrule Exogenous effects & Changes in environment can impact experiment results, e.g. trend effects in fashion. & \citer{dmitriev2016pitfalls,kohavi2012trustworthy}\\ Endogenous effects & Experimentation itself causes effects, such as carry-over or novelty effects. & \citer{dmitriev2016pitfalls,lu2014separation} \\ \midrule \multicolumn{2}{l}{\emph{5. Ethical challenges}} \vspace{-2pt}\\ \midrule Data privacy & GDPR gives users extensive rights to their data which companies must comply with. & \citer{yaman2017notifying} \\ Dark patterns & A narrow focus on numbers only can lead to misleading user interfaces. & \citer{jiang2019whos} \\ \midrule \multicolumn{2}{l}{\emph{6. Domain specific challenges}} \vspace{-2pt}\\ \midrule Mobile & The app marketplaces impose constraints on deployment and variability. & \citer{lettner2013enabling,xu2016evaluating,yaman2018continuous} \\ Cyber-physical systems & Making continuous deployments can be infeasible for cyber-physical systems. & \citer{bosch2016data,giaimo2017considerations,mattos2018challenges} \\ Social media & Users of social media influence each other which impacts the validity of experiments. & \citer{azevedo2018estimatino,backstrom2011network,choi2017estimation} \\ E-commerce & Experimentation needs to be able to differentiate effects from products and software changes. & \citer{goswami2015controlled,wang2018designing} \\ \bottomrule \end{tabularx} \end{table} \subsubsection{Cultural, organizational, and managerial challenges} \label{sec:challenge_soft} The challenges to organizations and management are broad in scope, including: difficulty in changing the organizational culture to embrace experimentation~\citer{lindgren2016raising}; building experimentation skills among employees across the whole organization~\citer{kohavi2013online,yaman2017introducing}; and finally communicating results and coordinating experiments in business to business, where there are stakeholders involved across multiple organizations~\citer{rissanen2015continuous,yaman2017introducing}. A fundamental challenge that has to be faced by organizations adopting continuous experimentation, is the shift from the highest-paid person's opinion (HiPPO)~\citer{kohavi2007practical,kohavi2009online} to data-driven decision making. If managers are used to making decisions about the product then they might not take account of experimental results that might run counter to their intuition. Thus, decision-makers must be open to have their opinions changed by data, else the whole endeavor with experimentation is useless. \subsubsection{Business challenges} The premise behind continuous experimentation is to increase the business value of software development efforts. The most frequent challenge in realizing this is defining relevant metrics that measure business value~\citer{dmitriev2016pitfalls,dmitriev2017dirty,fabijan2018online2,lindgren2016raising,yaman2017introducing}. In some instances the metric is only indirectly connected to business, for example in a business-to-business (B2B) company with a revenue model that is not affected by the software product, then improving product quality and user experience will not have a direct business impact. Also, the impact of experiments might not be sufficient in terms of actual effect~\citer{kohavi2014seven,olsson2017experimentation}. Fitzgerald and Stol~\citer{fitzgerald2017continuous} argue that continuous experimentation and innovation can lead to incremental improvements only, at the expense of more innovative changes that could have had a bigger impact. Another business challenge of continuous experimentation was highlighted by Conti et al.~\citer{conti2018spot}; they crawled web sites repeatedly and tried to automatically detect a difference in server responses. Thereby they showed how easily such data leakage can facilitate industrial espionage on what competitors are developing. \subsubsection{Technical challenges} Efficient continuous deployment facilitates efficient experimentation. Faster deployment speed shortens the delay between a hypothesis and the result of an experiment. The ability to have an efficient continuous delivery cycle is cited as a challenge both for large~\citer{kohavi2008controlled} and small companies~\citer{fabijan2018online2,lindgren2016raising,schermann2018doing}. In addition, continuous deployment is further complicated in companies involved in business to business (B2B)~\citer{rissanen2015continuous}, where deployment has multiple stakeholders involved over multiple organizations. In a laboratory experiment setting, it is possible to control variables such as ensuring homogeneous computer equipment for all groups and ensuring that all groups have equal distribution in terms of gender, age, education, etc. For online experiments, such controls are much harder due to subtle technical reasons. Examples therefore are: users assigned incorrectly to groups due to various bugs~\citer{kohavi2008controlled}; users changing groups because they delete their browsing history or multiple persons share the same computer~\citer{coey2016people,deng2017trustworthy,dmitriev2016pitfalls,kohavi2008controlled}; and robots from search engines cause abnormal traffic affecting the results~\citer{crook2009seven,kohavi2011unexpected}. \subsubsection{Statistical challenges} Classical experimental design as advocated by the early work on continuous experimentation and A/B-testing~\citer{kohavi2007practical} does not account for time series. Not only can it be hard to detect the presence of effects related to trends, but they can also have an effect on the results. Some of these trend effects occur due to outside influence, so-called \emph{exogenous effects}, for example, due to seasonality caused by fashion or other events which can affect traffic~\citer{dmitriev2016pitfalls,kohavi2012trustworthy}. With domain knowledge, these effects can be accounted for. For example in e-commerce, experiment results obtained during Christmas shopping week might not transfer to the following weeks. Other statistical challenges are caused by the experimentation itself, called \emph{endogenous effects}, such as the carryover effect~\citer{kohavi2012trustworthy,lu2014separation} where the result of an experiment can affect the result of a following experiment. There are also endogenous effects caused intentionally, through what is known as ramp up, where the traffic to the test group is initially low (such as 5\%/95\%) and incrementally increased to the full 50\%/50\% split. This is done to minimize the opportunity cost of a faulty experiment design. It can be difficult to analyze the results of such experiments~\citer{crook2009seven,kohavi2011unexpected}. Furthermore, learning and novelty effects where the users change their impression of the feature after using it for a while are challenging~\citer{dmitriev2016pitfalls,lu2014separation}. Endogenous effects will be hard to foresee until experimentation is implemented in a company. As such, handling statistical challenges is an ongoing process that will require more and more attention as experimentation is scaled up. \subsubsection{Ethical challenges} Whenever user data is involved there is a potential for ethical dilemmas. When Yaman et al.~\citer{yaman2017notifying} surveyed software engineering practitioners, the only question they agreed on was that users should be notified if personal information is collected. Since GDPR went into effect in 2018 this is now a requirement. Jian et al.~\citer{jiang2019whos} investigate how A/B testing tools are used in illegal discrimination for certain demographics, e.g., by adjusting prices or filtering job ads. These are examples of what is known as \emph{dark patterns} in the user experience (UX) research community~\cite{gray2018dark}. The study was limited to sites using front end Optimizely (a commercial experimentation platform) metadata. \subsubsection{Domain specific challenges} Some software sectors have domain-specific challenges or techniques required for experimentation, of which in the analysis of the papers four prominent domains were found: 1) mobile apps, 2) cyber-physical systems, 3) social media, and 4) e-commerce. Whether or not all of these concerns are domain-specific or not is debatable. However, these studies were all clear on what domain their challenges occurred in. There is a bottleneck in continuous deployment to the proprietary application servers of Android Play or Apple's App Store, which imposes a bottleneck on experimentation for mobile apps. Lettner et al.~\citer{lettner2013enabling} and Adinata and Liem~\citer{adinata2014ab} have developed libraries that load new user interfaces at run time, which would otherwise (at the time of writing in year 2013 and 2014 respectively) require a new deployment on Android Play. Xu et al.~\citer{xu2016evaluating} at LinkedIn instead advocate the use of quasi-experimental designs. Finally, Yaman et al.~\citer{yaman2018continuous} have done an interview study on continuous experimentation, where they emphasize user feedback in the earlier stages of development (that do not require deployment). Embedded systems, cyber-physical systems, and smart systems face similar challenges to mobile apps, namely continuous deployment. None of the studied publications of this study claims wide\-spread adoption of experimentation at an organizational level. This suggests that research of experimentation for embedded software is in an early stage. Mattos et al.~\citer{mattos2018challenges} and Bosch and Holmstr{\"o}m Olsson~\citer{bosch2016data} outline challenges and research opportunities in this domain, among them are: continuous deployment, metric definition, and privacy concerns. Bosch and Eklund~\citer{bosch2012eternal,eklund2012architecture} describe required architecture for experimentation in this domain with a proof-of-concept on vehicle entertainment systems. Giaimo et al.~\citer{giaimo2017considerations,giaimo2016continuous} cite safety concerns and resource constraints for the lack of continuous experimentation. The cyber-physical systems domain also includes experimentation where the source of noise is not human users, but rather hardware. The research on self-adaptive systems overlap with continuous experimentation: Gerostathopoulos et al.~\citer{gerostathopoulos2016architectural} have described an architecture for how self-adaptive systems can perform experimentation, with optimization algorithms~\citer{gerostathopoulos2018adapting} that can handle non-linear interactions between hardware parameters~\citer{gerostathopoulos2018cost}. In addition, two pieces of work~\citer{buchert2015survey,jayasinghe2013automated} on distributed systems focus on experimentation, with a survey and a tool on how distributed computing can support experimentation for e.g. cloud providers. Backstrom et al.~\citer{backstrom2011network} from Facebook describe that users of social media influence each other across experiment groups (thus violating the independence assumption of statistical tests); they call it the network effect. It is also present at Yahoo~\citer{katzir2012framework} and LinkedIn~\citer{gui2015network,saveski2017detecting,xu2015from}. The research on the network effect includes: ways of detecting it~\citer{saveski2017detecting}, estimating its effect on cliques in the graph~\citer{azevedo2018estimatino,choi2017estimation}, and reducing the interference caused from it~\citer{eckles2016design}. The final domain considerations come from e-commerce. At Walmart, Goswami et al.~\citer{goswami2015controlled} describe the challenges caused by seasonality effects during holidays and how they strive to minimize the opportunity cost caused by experimentation. At Ebay, according to Wang et al.~\citer{wang2018designing}, the challenges are caused by the large number of auctions that they need to group with machine learning techniques for the purpose of experimental control. \subsection{What are the benefits with continuous experimentation (RQ4)?} Many authors mention the benefits of CE only in passing as motivation~\citer{bosch2012building,kohavi2009online}, few papers explicitly mention them (e.g. \citer{fabijan2017benefits}). Bosch~\citer{bosch2012building} mentions the reduced cost of collecting passive customer feedback with continuous experimentation in comparison with active techniques like surveys. Also, Bosch claims that customers have come to expect software services to continuously improve themselves and that experimentation can provide the means to do that in a process that can be visible to users. Kohavi et al.~\citer{kohavi2009online} claim that edge cases that are only relevant for a small subset of users can take a disproportionate amount of the development time. Experimentation is argued for as a way to focus development, by first ensuring that a feature solves a real need with a small experiment and then optimizing the respective feature for the edge cases with iterative improvement experiments. In this way, unnecessary development on edge cases can be avoided if a feature is discarded early on. Fabijan et al.~\citer{fabijan2017benefits} focus solely on benefits, differentiated between three levels as follows. 1) In the \emph{portfolio level}, the impact of changes on the customer as well as business value can be measured which is of great benefit to company-wide product portfolio development. 2) In the \emph{product level}, the product receives incrementally improvement quality and reduced complexity by removing unnecessary features. Finally, 3) in the \emph{team level of benefits}, the findings of experiments support the related teams to prioritize their development activities given the lessons learned from the conducted experiments. Another benefit for teams with continuous experimentation is that team goals can be expressed in terms of metric changes and their progress is measurable. \section{Discussion} \label{sec:discussion} This study builds on two prior independent mapping studies to provide an overview of the conducted research. This review has been conducted to answer four research questions that can guide practitioners. In the following, the results of the study are discussed for each research question, in the form of recommendations to practitioners and implications for researchers. \subsection{Required frameworks (RQ1)} The first research question (RQ1) about the core constituents of a framework for continuous experimentation revealed two integral parts of experimentation, the \emph{experimentation process} and the technical as well as organizational \emph{infrastructure}. \subsubsection{Process for continuous experimentation} In the literature, several experimentation process models were found on the phases of conducting online controlled experimentation. They describe the overall process~\citer{fagerholm2017right}, represent the established experiment process of organizations~\citer{kevic2017characterizing}, or cover specific parts of the experiment cycle~\citer{fabijan2018effectivePAPER}. Given that all models describe a process with the same overall objective of experimentation, it can become difficult to decide between them. Two reference models are published \citer{fagerholm2017right,olsson2014from}, which may be used as a basis for future standardization of the field. Future research is needed to give guidance in the selection between models and variants. Many of the experience reports~\citer{kohavi2014seven,kohavi2011unexpected} warn about making experiments with too broad scope, instead they recommend that all experiments should be done on a minimum viable product or feature~\citer{fagerholm2017right}. However, the warnings all come from real lessons learned caused by having done such expensive experiments. We believe that the current process models do not put sufficient emphasis on conducting small experiments. For example, they could make a distinction between prototype experiments and controlled experiments on a completed project. That way if the prototype reveals flaws in the design it avoids a full implementation. As such, our recommendation to practitioners in regards to process is to follow one of the reference experimentation processes~\citer{fagerholm2017right,olsson2014from} and in addition add the following two steps to minimize the cost of experiments. First, to spend more time before experimentation to ensure that experiments are really on a minimum viable feature by being diligent about what requirements are strictly needed at the time. Second, that experiments should be pre-validated with prototypes, data analysis, etc. \subsubsection{Infrastructure for continuous experimentation} The research on the infrastructure required to enable continuous experimentation was primarily focused on large scale applications within mature organizations (e.g. Microsoft \citer{gupta2018anatomy}). One reason for this focus may be the large number of publications (e.g. experience reports) from researchers associated with large organizations. The large number of industrial authors indicates a high interest of practitioners in the topic. However, it should not restrict the community's focus on large scale applications only. The application of continuous experimentation within smaller organizations has many open research questions. These organizations provide additional challenges on experimentation because of their probably less already existing infrastructure and smaller user base. For example, the development of sophisticated experimentation platforms may not be feasible in the extent to which it is for large organizations. Thus, lightweight approaches to experimentation that do not require large up-front investments could make experimentation more accessible to smaller organizations. Technical infrastructure has not been reported as being a significant hurdle for any of the organizations in which continuous experimentation was introduced in this study. The technical challenges seem to appear later on when the continuous experimentation process has matured and the scale of experimentation needs to ramp up. Rather, the organizational infrastructure seems to be what might cause an inability to conduct experimentation. The challenges presented in Section~\ref{sec:results:challenges} support this claim too, so the more severe infrastructural requirements appear to be organizational~\citer{fitzgerald2017continuous} and culture oriented~\citer{kohavi2009online,xu2015from}, at least to get started with experimentation. The reason for this is that experimentation often involves decision making that traditionally fall outside the software development organization. For example, deciding on what metric software should be optimized for might even need to involve the company board of directors. Following that, the recommendation to practitioners is to not treat continuous experimentation as a project that can be solved with only software development. The whole organization needs to be involved, e.g., to find metrics and ensuring that the user data to measure this can be acquired. Otherwise, if the software development organization conducts experimentation in isolation, the soft aspects of infrastructure might be lacking or the software might be optimized with the wrong goal in mind. \subsection{Solutions applied (RQ2)} Concerning the solutions that are applied within continuous experimentation (RQ2), the literature analysis revealed solutions about qualitative feedback, variants of controlled experiments design, quasi-experiments, automated controlled experimentation with optimization algorithms, statistical methods, continuous monitoring, data mining, variability management, and metric specification. For each of these solutions in literature, themes were proposed. One observation made was that the validation of most proposed solutions could be further improved by providing the used data sets, a context description or the necessary steps that allow to reproduce the presented results. Also, many interesting solutions would benefit from further applications that demonstrate their applicability in practice. Another observation was that many solutions are driven by practical problems of the author's associated organization (e.g. evaluation of mobile apps \citer{hill2015measuring}). This has the advantage that the problems are of relevance for practice and the provided solutions are assumed to be applicable in similar contexts. Publications of this kind are guidelines for practitioners and valuable research contributions. There are a lot of solutions for practitioners to choose from, most of them solve a very specific problem that has been observed at a company. In Figure~\ref{fig:rq2-overview}, the solutions are arranged by phase of the experimentation process. What follows is additional help to practitioners to know what solution to apply for a given problem encountered, which is in the design science tradition known as technological rules~\cite{engstrom2020software}: \begin{itemize} \item to achieve \emph{additional insights} in concluded experiments apply \emph{1) data mining} that automatically segments results for users' context; \item to achieve \emph{more relevant results} in difficult to measure software systems apply \emph{2) metric specification techniques}. \item to achieve \emph{richer experiment feedback} in continuous experimentation apply \emph{3) variants of controlled experiments design} or \emph{9) qualitative feedback}. \item to achieve \emph{quantitative results} in environments where parallel deployment is challenging apply \emph{4) quasi-experiments}; \item to achieve \emph{optimized user interfaces} in software systems that can be evaluated on a single metric apply \emph{5) automated controlled experimentation with optimization algorithms}; \item to achieve \emph{higher throughput of experiments} in experimentation platforms apply \emph{6) variability management techniques} to specify overlapping experiments; \item to achieve \emph{trustworthy results} in online controlled experiments apply \emph{7) improved statistical methods} or \emph{1) data mining} to calibrate the statistical tests; \item to achieve \emph{faster results} in online controlled experiments apply \emph{8) continuous monitoring} to help decide when experiments can be stopped early. \end{itemize} \subsection{Challenges (RQ3)} Many authors of the studied literature mentioned challenges with continuous experimentation in their papers. The thematic analysis of the challenges identified six fundamental challenge themes. Here they are presented along with the recommendations to mitigate the risks. The \emph{cultural, organizational and managerial} challenges seem to indicate that the multi-disciplinary characteristic of continuous experimentation introduces new requirements to the team. It requires amongst others the collaboration of cross-functional stakeholders (i.e. business, design, and engineering). This can represent a fundamental cultural change within an organization. Hence, the adaption of continuous experimentation involves technical as well as cultural changes. Challenges like the lack of adaption support this interpretation. Mitigating these challenges involves taking a whole organizational approach to continuous experimentation so that both engineers and managers are in agreement about conducting experimentation. Another theme among challenges is \emph{business}. The challenges assigned to this theme highlight that continuous experimentation has challenges in its economic application with respect to the financial return on investment. The focus of experimentation needs to be managed appropriately in order to prevent investing in incremental development with insufficient impact. Also, that changes cannot be measured with a relevant metric is another business challenge. One possible approach for further research on these challenges could be the transfer from solutions in other disciplines to continuous experimentation. An example therefore is the overall evaluation criteria \cite{van2002design} that was adapted to continuous experimentation by Kohavi et al.~\citer{kohavi2007practical}. As with the previous challenge theme, this theme of challenges does not have an easy fix. It might be the case that experimentation is simply not applicable for all software companies but further research is needed to determine this. Concerning the \emph{technical} challenges, the literature review showed that there are challenges related to continuous deployment/delivery and experiment control. The delivery of changes to production is challenging especially for environments that are used to none or infrequent updates, like embedded devices. For such edge cases, new deployment strategies have to be found that are suitable for continuous experimentation. Although solutions from continuous deployment seem to be fitting, they need to be extended with mechanisms to control the experiment at run-time (e.g. to stop an experiment). This can be challenging in environments for which frequent updates are difficult. There is proof-of-concept research~\citer{eklund2012architecture} to handle these challenges so they do not seem to be impossible blockers to get started on experimentation. The \emph{statistical} challenges mentioned in the studied literature indicate that there is a need for solutions to cope with the various ways that the statistical assumptions done in a controlled experiment are broken by changes in the real world. There are both changes in the environment (exogenous) and changes caused by experimentation (endogenous). Changes in the environment (e.g. the effect of an advertisement campaign run by the marketing department) can alter the initial situation of an experiment and thus may lead to wrong conclusions about the results. Therefore, the knowledge about an experiment's environment and possible influences needs to be systematically advanced and the experiments themselves should be designed to be more robust. Mitigating these challenges involves identifying and applying the correct solution for the specific problem. There is further research opportunity to document and synthesize such problem-solution pairs. \emph{Ethical} aspects are not investigated by many studies. The experience reports and lessons learned publications do not, for example, mention user consent or user's awareness of participation. Furthermore, ethical considerations about which experiments should be conducted or not were seldom discussed in the papers. There were still two challenges identified in this study, involving data privacy and dark patterns. However, examples like the Facebook emotional manipulation study, which changed the user's news feed to determine whether it affects the subsequent posts of a user, show the need for ethical considerations in experimentation \cite{flick2016informed}. Although this was an experiment in the context of an academic study in psychology, the case nevertheless shows that there are open challenges on the topic of ethics and continuous experimentation. There is not enough research conducted for a concrete recommendation other than raising awareness of the existence of ethical dilemmas involving experimentation. Continuous experimentation is applied in various domains that require \emph{domain specific} solutions. The challenges on continuous experimentation range from infrastructure challenges, over measurement challenges, to social challenges. Examples are the challenge to deploy changes in cyber-physical systems (infrastructural challenge), to differentiate the effects of one change from another (measurement challenge), and the influence of users on each other across treatment groups (social challenge). Each challenge is probably only relevant for certain domains, however the developed solutions may be adaptable to other domains. Thus, the research on domain-specific challenges could take optimized solutions for specific domains to solutions for other domains. \subsection{Benefits (RQ4)} In many publications about continuous experimentation the benefits of experimentation are mentioned as motivation only; i.e. it increases the quality of the product based on the chosen metrics. The two publications on explicit benefits~\citer{bosch2012building,fabijan2017benefits} mention improvements not only on the product in business-related metrics and usability but also on the product portfolio offering and generic benefits for the whole organization (better collaboration, prioritization, etc.). More studies are needed to determine, e.g., if there are more benefits, whether the benefits apply for all companies involved with experimentation, or whether the benefits could be obtained through other means. Another benefit is the potential usage of continuous experimentation for software quality assurance. Continuous experimentation could support or even change the way quality assurance is done for software. Software change, for example, could only be deployed if key metrics are not degraded in the related change experiment. Thus, quality degradation could become quantifiable and measurable. Although some papers, like \citer{fabijan2017benefits}, mention the usage of continuous experimentation for software quality assurance. \section{Conclusions} \label{sec:conclusions} This paper presents a systematic literature review of the current state of controlled experiments in continuous experimentation. Forward snowballing was applied on the selected paper sets of two previous mapping studies in the field. The 128 papers that were finally selected, were qualitatively analyzed using thematic analysis. The study found two constituents of a continuous experimentation framework (RQ1): an experimentation process and a supportive infrastructure. Based on experience reports that discuss failed experiments in the context of large-scale software development, the recommendation to practitioners is to apply one of the published processes, but also expand it by placing more emphasis on the ideation phase by making prototypes. As for the infrastructure, several studies discuss requirements for controlled experiments to ramp up the scale and speed of experimentation. Our recommendation for infrastructure is to consider the organizational aspects to ensure that, e.g., the necessary channels for communicating results are in place. Ten themes of solutions (RQ2) were found that were applied in the various phases of controlled experimentation: data mining, metric specification, variants of controlled experiment design, quasi-experiments, automated controlled experimentation, variability management, continuous monitoring, improved statistical methods, and qualitative feedback. We have provided recommendations on what problem each solution theme solves for what context in the discussion. Finally, the analysis of challenges (RQ3) and benefits (RQ4) of continuous experimentation revealed that only two papers focused explicitly on the benefits of experimentation. In contrast, multiple papers focused on challenges. The analysis identified six themes of challenges: cultural/organizational, business, technical, statistical, ethical, and domain-specific challenges. While the papers on challenges do outnumber the papers on benefits, there is no cause for concern, as the benefits to product quality are also mentioned in many papers as motivation to conduct the research. The challenges to experimentation also come with recommendations in the discussion on how to mitigate them. As a final remark, we encourage practitioners to investigate the large body of highly industry-relevant research that exists for controlled experimentation in continuous experimentation and for researchers to follow the many remaining gaps in literature revealed within. \section*{Acknowledgements} This work was partially supported by the Wallenberg Artificial Intelligence, Autonomous Systems and Software Program (WASP) funded by Knut and Alice Wallenberg Foundation and the Austrian Science Fund (FWF): I 4701-N. \section*{\refname} \bibliographystyle{elsarticle-num}
\section{Introduction}\label{sec:intro} The quantum chromodynamics (QCD) axion~\cite{pecceiquinn1977,weinberg1978,wilczek1978} solves the charge-parity ($\mathcal{C}\mathcal{P}$) problem of the strong nuclear force~\cite{Vafa:1984xg,Afach:2015sja,Hook:2018dlk}, and is a plausible candidate~\cite{1983PhLB..120..133A,1983PhLB..120..137D,1983PhLB..120..127P} to compose the dark matter~(DM) in the cosmos~\cite{2016A&A...594A..13P}. The axion mass is bounded from above~\cite{2008LNP...741...51R,Chang:2018rso,1906.11844} and below~\cite{2015PhRvD..91h4011A,Stott:2018opm} by astrophysical constraints~(for reviews, see Refs.~\cite{my_review,2017JCAP...10..010G,1801.08127,DiLuzio:2020wdo}, and Appendix~\ref{sec:axion_dm}), placing it in the range \begin{equation} \SI{1}{peV} \lesssim \safemaths{m_a} \lesssim \SI{20}{\meV} \, . \label{eqn:allowed_axion_mass} \end{equation} The local DM density is known from stellar motions in the Milky~Way~\cite{PhysRevD.98.030001}. Assuming axions comprise all the (local) DM, the axion number density is given by $n_a = \rho_\text{loc}/\safemaths{m_a}$. Due to the very small axion mass, the number density is very large and axions can be modelled as a coherent classical field, $\phi$. The field value is: \begin{equation} \phi = \Phi \cos(\safemaths{m_a} t) \, , \label{eqn:dark_axion_field} \end{equation} where $\Phi$ is Rayleigh-distributed~\cite{Foster:2017hbq,1905.13650} with mean $\sqrt{2\rho_\text{loc}}/\safemaths{m_a}$ and linewidth $\Delta \omega/\omega\sim 10^{-6}$ given by the Maxwell-Boltzmann distribution of axion velocities around the local galactic circular speed, $v_\text{loc}\approx \SI{200}{\km/\s}$ (see e.g.\ refs.~\cite{OHare:2017yze,Foster:2017hbq}). Axions couple to electromagnetism via the interaction $\mathcal{L}=\safemaths{g_{a\gamma}}\phi \vc{E}\cdot\vc{B}$. Thus, in the presence of an applied magnetic field, $\vc{B}_0$, the DM axion field in Eq.~\eqref{eqn:dark_axion_field} acts as a source for the electric field, $\vc{E}$. This is the inverse Primakoff process for axions, and leads to axion-photon conversion in a magnetic field. The rate of axion-photon conversion depends on the unknown value of the coupling $\safemaths{g_{a\gamma}}$ and happens at an unknown frequency $\omega = \safemaths{m_a}\pm\Delta\omega$. For the QCD axion (as opposed to a generic ``axion like particle''~\cite{my_review}) the mass and coupling are linearly related, $\safemaths{g_{a\gamma}}\propto\safemaths{m_a}$, although different models for the Peccei-Quinn~\cite{pecceiquinn1977} charges of fundamental fermions predict different values for the constant of proportionality. The two historical reference models of Kim-Shifman-Vainshtein-Zhakarov (KSVZ)~\cite{1979PhRvL..43..103K,1980NuPhB.166..493S} and Dine-Fischler-Srednicki-Zhitnitsky (DFSZ)~\cite{Zhitnitsky:1980tq,1981PhLB..104..199D} span a narrow range, while more recent generalisations with non-minimal particle content allow for more variation~\cite{DiLuzio:2016sbl,1705.05370,DiLuzio:2020wdo}. The axion-photon coupling $\safemaths{g_{a\gamma}}$ is constrained by a large number of null-results from experimental searches and astrophysical considerations~\cite{PhysRevD.98.030001}. For experimentally allowed values of $(\safemaths{m_a},\safemaths{g_{a\gamma}})$, and accessible magnetic field strengths, the photon production rate in vacuum is unobservably small. The power can be increased in two basic ways. If the conversion happens along the surface of a magnetized mirror, then the produced photons can be focused onto a detector~\cite{2013JCAP...04..016H}. This approach is broadband, and does not depend on the axion mass. Reaching sensitivity to the QCD~axion requires very large mirrors, very sensitive detectors, and control over environmental noise. Alternatively, the signal can be resonantly or coherently enhanced (e.g.\ Refs.~\cite{Braine:2019fqb,1983PhRvL..51.1415S,Braine:2019fqb,TheMADMAXWorkingGroup:2016hpc,2014PhRvX...4b1030B,Melcon:2020xvj,Semertzidis:2019gkj,Backes:2020ajv,Ouellet:2018beu,Michimura:2019qxr,Crescini:2020cvl}). These approaches are narrow band, and require tuning to the unknown DM axion frequency. Depending on the model of early Universe cosmology, and the evolution of the axion field at high temperatures $T\gg \SI{1}{\MeV}$, the entire allowed mass range Eq.~\eqref{eqn:allowed_axion_mass} can plausibly explain the observed DM abundance. The mass range near \SI{1}{\meV} (corresponding to frequencies in the low \si{\THz}) is favoured in some models of axion cosmology (see Appendix~\ref{sec:axion_dm}), but is challenging experimentally due to the lack of large volume, tuneable THz resonators, and efficient, low-noise, large bandwidth \si{\THz} detectors. In Ref.~\cite{2019PhRvL.123l1601M} (Paper~I) we proposed an experimental scheme to detect axion DM using axion-quasiparticle (AQ) materials based on topological magnetic insulators (TMIs)~\cite{2010NatPh...6..284L}, a proposal we called ``TOORAD'' for ``TOpolOgical Resonant Axion Detection''. Since Li et al.~\cite{2010NatPh...6..284L} first proposed to realise axion quasiparticles in the antiferromagnetic topological insulator (AF-TI) \ce{Fe}-doped Bismuth Selenide, (Bi$_{1-x}$Fe$_x$)$_2$Se$_3$\xspace, the quest to realise related materials in the lab has picked up incredible pace. A currently favoured candidate \MnBiTe{2}{2}{5}~\cite{Zhang_2020}, is, however, yet to be fabricated successfully. AQ materials allow the possibility to explore aspects of axion physics in the laboratory~\cite{PhysRevLett.58.1799}. The AQ resonance hyrbidises with the electric field forming an axion-polariton~\cite{2010NatPh...6..284L}. The polariton frequency is of order the AF anisotropy field, with typical values $\mathcal{O}(\SI{1}{meV})$, and is tuneable with applied static field $B$~\cite{2019PhRvL.123l1601M}. This proposal opens the possibility for large volume THz resonance, easily tuneable with an applied magnetic field, thus overcoming the first hurdle to detection of meV axions. The proposal makes use of the current interest in manufacture of low noise, high efficiency single photon detectors (SPDs) in THz~\cite{2019_Lee}. The development of such detectors has benefits for sub mm astronomy and cosmology, as well as application to other DM direct detection experiments~\cite{2013JCAP...04..016H}. The present paper expands on the ideas outlined in Paper~I with more in depth modelling and calculations. A guide to the results is given below. \subsection*{Axion Quasiparticle Materials} We begin with a detailed treatment of the materials science, and outline a scheme to prove the existence of AQs in TMIs, and measure their parameters. \begin{itemize} \item We introduce the basic model for the equations coupling the electric field and the AQ. There are two parameters that determine the model: the AQ mass, $\makeAQ{m}$, and the decay constant, $\makeAQ{f}$, as summarised in Section~\ref{sec:general_remarks}. \item Next in Section~\ref{sec:af_ti}, we clarify the microscopic model for AQs in TMIs. We begin with the symmetry criteria, followed by a microscopic model based on the Dirac Hamiltonian. The AQ is the longitudinal fluctuataion of the antiferromagnetic order parameter in the Hubbard model. The Appendix summarises the related phenomenon of antiferromagnetic resonance and transverse magnons in the effective field theory of the Heisenberg model. \item Both $\makeAQ{m}$ and $\makeAQ{f}$ can be estimated from known material properties. We consider (Bi$_{1-x}$Fe$_x$)$_2$Se$_3$\xspace, the candidate material from Paper~I and Ref.~\cite{2010NatPh...6..284L}, and also the more recent candidate material \MnBiTe{2}{2}{5}~\cite{Zhang_2020}. The results of this study are given in Tables~\ref{tab:material_params} and \ref{tab:derived_params}. \item We next consider sources of loss. The largest sources of loss are identified to be conductive losses to the electric field, and crystal and magnetic domain induced line broadening for the AQ. The loss model is summarised in Table~\ref{tab:losses}. \item Using the model thus developed, we present a computation of the transmission spectrum of an AQ material. The spectrum shows two peaks due to the mixing of the electric field and the AQ, the locations of which can be used to measure the parameters $\makeAQ{m}$ and $\makeAQ{f}$. The width of the resonances provides a measurement of the loss parameters on resonance, which cannot otherwise be identified from existing measurements. Such a measurement can be performed using THz time domain spectroscopy~\cite{2017PhRvL.119v7201L}. The procedure is shown schematically in Fig.~\ref{fig:ATR} \end{itemize} \subsection*{Axion Dark Matter Detection} \begin{itemize} \item Axion DM acts as a source to the AQ model developed in the previous sections. Axion-photon conversion in a magnetic field sources photons, which hybridize with the AQ forming polaritons, and thus acquire an effective mass. It is shown that this model can be treated in the same way as a dielectric haloscope~\cite{Millar:2016cjp}. The resonance in the polariton spectrum leads to an effective refractive index $n<1$, and an enhancement of the axion-induced electric field, see Fig.~\ref{fig:DA_AQ_P_interpretation}. \item We compute the power boost amplitude, $\beta(\omega)$, for a range of plausible values for the model parameters, losses, and material thickness. See, for example, Fig.~\ref{fig:DA_AQ_P_mixing_Signal_Losses_main}. \item The power enhancement is driven by the material thickness, $d$, which should \emph{exceed} the wavelength of emitted photons. When losses are included, we identify a maximum thickness above which the power enhancement decreases due to the finite skin-depth. See Fig.~\ref{fig:betaloss}. \item We perform forecasts for the limits on axion DM parameter space, $(\safemaths{m_a},\safemaths{g_{a\gamma}})$, that can be obtained for a range of plausible material and THz detector parameters. We identify pessimistic and optimistic possibilities for the discovery reach, summarised in Fig.~\ref{fig:summary_plot}. \end{itemize} We use units $\hbar=c=k_B=1$ throughout most of the text, in combination with SI where appropriate. \section{Axion Quasiparticle Materials} \label{sec:AQ-Materials} \subsection{General Remarks}\label{sec:general_remarks} Axion quasiparticles (AQs) are defined, for our purposes, as a degree of freedom, denoted by \safemaths{\delta\Theta}, coupled to the electromagnetic Chern-Simons term: \begin{equation} S_{\text{topo}} = \frac{\alpha}{\pi}\int \mathrm{d}^4x \; (\safemaths{\delta\Theta} + \safemaths{\Theta^0}) \, \vc{E} \cdot \vc{B} \, , \label{eqn:chern_simons} \end{equation} where \safemaths{\Theta^0} is the constant electromagnetic Chern-Simons term, equal to zero in ordinary insulators and $\pi$ in topological insulators~(TIs). In these materials, surface currents are accounted for by inclusion of a non-zero value for \safemaths{\Theta^0} (the topological magneto-electric effect due to the Hall conductivity~\cite{PhysRevLett.102.146805,TongNotes}). In the presence of a dynamical AQ field, $\safemaths{\delta\Theta}$, the static vacuum value $\safemaths{\Theta^0}$ is allowed to take on a continuum of values between $0$ and $\pi$. The total axion field is denoted by $\Theta=\safemaths{\delta\Theta} + \safemaths{\Theta^0}$. We review these concepts further below, for a detailed presentation see Ref.~\cite{Sekine2020}. The dynamics of the AQs are described by~\cite{2010NatPh...6..284L,Sekine:2014xva} \begin{equation} S_\Theta = \frac{\makeAQ{f}^2}{2} \int d^4x\left[\left(\partial_t\safemaths{\delta\Theta}\right)^2-\left(v_i\partial_i\safemaths{\delta\Theta}\right)^2-\makeAQ{m}^2\safemaths{\delta\Theta}^2\right], \label{eqn:ActionKleinGordon} \end{equation} where $\makeAQ{f}$, $v_i$ and $\makeAQ{m}$ are the stiffness, velocity and mass of the AQ. The velocities $v_i$ are of the order of the spin wave speed in typical antiferromagnets, $v_s\sim 10^{-4}c$, see for example Ref.~\cite{Pickart}. In the coupled equations of motion for the electric field and the AQ (see Section~\ref{sec:transmission}), $\makeAQ{f}$ enters in the combination\footnote{Note that we use the Lorentz-Heaviside convention, where $\SI{1}{\tesla} \approx \SI{195}{\eV^2}$.} \begin{equation} b = \frac{\alpha}{\pi\sqrt{2}}\frac{\safemaths{B_\text{e}}}{\sqrt{\epsilon} \makeAQ{f}} = \SI{1.6}{\meV} \, \left(\frac{25}{\epsilon_1} \right)^{1/2} \left(\frac{\safemaths{B_\text{e}}}{\SI{2}{\tesla}}\right) \left(\frac{\SI{70}{\eV}}{\makeAQ{f}}\right)\, . \label{eqn:b_meV} \end{equation} In addition to the action for the AQ we consider electromagnetic fields governed by Maxwell's equations in media, which depend on the complex valued dielectric function, $\tilde{\epsilon} = \epsilon_1+i\epsilon_2= \epsilon_1+i\sigma/\omega$ (where $\sigma$ is the conductivity), and magnetic susceptibility, $\chi_m$. Where there is no room for confusion we use $\epsilon_1=\epsilon$ in some of the following. The phenomenological model also requires the specification of a loss matrix, $\mat{\Gamma}$. \subsection{Realisation in Dirac Quasiparticle Antiferromagnets}\label{sec:af_ti} The idea to realise axion electrodynamics in solids was originally developed by Wilczek~\cite{PhysRevLett.58.1799} who, however, could not identify a magnetic solid that breaks parity and time-reversal while preserving its combination: as we will see, necessary conditions for AQs. Recent developments in nonmagnetic and magnetic electronic topological phases of matter, and study of the topological magnetoelectric effect associated with the Chern-Simons term in magnetoelectrics~\cite{Hasan2010,Qi2011} have led to the identification of several routes to realise axion electrodynamics in energy bands of magnetic topological insulators and Dirac quasiparticle antiferromagnets. The electronic, magnetic, topological energy bands can couple to spin fluctuations, and thus generate a dynamical axion phase on the electromagnetic Chern-Simons term. In this section we discuss the Dirac quasiparticle model of AQs in electronic energy bands. We compare the symmetry criteria for static and dynamical axion topological antiferromagnets, and discuss the most prominent material candidates. \subsubsection{Symmetry criteria for static and dynamical magnetic axion insulators} The topological $\Theta$ term is called also an \textit{axion angle} as it can take any value between 0 and $2\pi$. The operations of charge conjugation $\mathcal{C}$, parity $\mathcal{P}$ (known as inversion symmetry in condensed matter, a terminology we adopt throughout this section to distinguish it from other types of parity operation in solids), and time-reversal $\mathcal{T}$ are the discrete symmetries constraining the values of $\Theta$, and which define the properties of fundamental forces in nature via the $\mathcal{CPT}$ theorem. $\mathcal{CP}$ breaking means that the physical laws are not invariant under combination of interchanging particle with its antiparticle with inverting the spatial coordinates. If $\Theta \neq 0,\pi$, then $\mathcal{CP}$ is violated. The combined $\mathcal{CPT}$ symmetry is believed to be preserved (i.e. the so called $\mathcal{CPT}$ theorem) and thus the violation of $\mathcal{CP}$ implies the violation of $\mathcal{T}$ symmetry, i.e. the reversal of the time coordinate, and thus particle motion. Realisation of $\mathcal{CP}$-broken theory and axion electrodynamics with non-quantized axion angle can be achieved in materials with broken $\mathcal{T}$ symmetry~\cite{PhysRevLett.58.1799,Wan2012,Varnava2018}. In materials, magnetic ordering can break the $\mathcal{T}$ symmetry. In this section we will discuss the symmetries of magnetic axion insulators which exhibit nonzero pseudoscalar axion quasiparticle $\Theta$ (we use capital letter to label the solid state quasiparticle axion to distinguish it from the DM axion). The nonzero axion response can be find in subgroup of conventional and topological magnetoelectric materials. The conventional magneto-electric polarizability tensor is defined as\cite{PhysRevLett.102.146805,Nenno2020}: \begin{equation} \alpha_{i j}=\left(\partial P_{i} / \partial B_{j}\right)_{\mathbf{E}}=\left(\partial M_{j} / \partial E_{i}\right)_{\mathbf{B}}. \end{equation} Here $P_{i}, B_{j}, M_{j} $, and $E_{i}$ are electric polarisation, magnetic field, magnetization, and electric field. The magnetoelectric polarizability tensor can be decomposed as~\cite{PhysRevLett.102.146805}: \begin{equation} \alpha_{i j}=\tilde{\alpha}_{i j}+\frac{\Theta e^{2}}{2 \pi h} \delta_{i j}, \end{equation} where the first term is the non-diagonal part of the tensor arising from spin, orbital and ionic contribution~\cite{Fiebig2009}. The second term is the diagonal pseudoscalar part of the coupling related to the axion angle $\Theta$. We will now review symmetry criteria for nonzero axion quasiparticle $\Theta$. In solid state potentials, discrete symmetries impose severe constraint on the existence and form of the topological axion angle~\cite{Varnava2020}, and provide robust insight into the topological characterisation of the energy bands~\cite{Turner2012,Fang2012b,PhysRevX.7.041069,Watanabe2018c,Elcoro2020,PhysRevB.103.245127}. The topological classification assigns two insulators into the same category as long as it is possible to connect the two corresponding Hamiltonians by a continuous deformation without closing an energy gap and while preserving all symmetries~\cite{Hasan2010,Qi2011}. Three symmetry based strategies attracted great interest in recent decades. First, solid state quantum field theory considers parity, chiral, and particle-hole symmetries, which are relevant for rather strongly correlated states of matter such as superconductors and lead to abstract multidimensional classification~\cite{Ryu2010}. Second, more numerically feasible symmetry analysis of Wannnier band structure. The Wannier band~structure refers to mixes of real and momentum space band structure, with hybrid Wannier charge centres, which encodes the topological character of given states~\cite{Gresch2016,Varnava2018,Varnava2020}. The formulation is particularly useful for first-principle calculations of the axion angle. Third, we can use space group or magnetic space group symmetries to derive symmetry indicators of single particle energy bands~\cite{Smejkal2016,Tang2016,Watanabe2018c,Varnava2020,Elcoro2020}. The $\boldsymbol{E}.\boldsymbol{B}$ term is odd under time-reversal symmetry, inversion symmetry and any improper rotations, e.g. mirror symmetries~\cite{Fang2012b,Varnava2020}. If the crystal has such a symmetry: \begin{equation} \Theta=-\Theta. \end{equation} The symmetry constraint would force any periodic function to vanish. However, $\Theta$ is periodic angle defined only modulo $2\pi$ and thus these symmetries enforce only \begin{equation} \Theta=0\text{, or }\pi. \end{equation} When none of these symmetries is present $\Theta$ can be still non-quantized. \begin{figure}[t!] \hspace*{0cm} \includegraphics[width=1\textwidth]{figures/material0.pdf}\\ \caption{Flowchart of generating dynamical axion quasiparticles with four building bock systems.} \label{fig:af-ti:f0} \end{figure} Based on the \textit{magnetic} symmetry classification, we can distinguish four classes of pseudoscalar magneto-electric axion response materials shown in Fig.~\ref{fig:af-ti:f0}. First two classes are conventional magnetoelectrics~\cite{DZYALOSHINSKII1959} and dynamical axion insulators~\cite{2010NatPh...6..284L} with nonzero pseudoscalar part of the magnetoelectric polarisability tensor (and combined $\mathcal{PT}$ symmetry~\cite{Tang2016,Smejkal2016} such as Mn$_{\text{2}}$Bi$_{\text{2}}$Te$_{\text{5}}$~\cite{Zhang_2020}). Second two classes are the topological insulators and axion insulators with quantized magnetoelectric response such as doped Bi$_{\text{2}}$Se$_{\text{3}}$ or MnBi$_{\text{2}}$Te$_{\text{4}}$~\cite{2010NatPh...6..284L,Hasan2010,Qi2011,Nenno2020,Sekine2020}. The nonquantized value of $\Theta$ can be find in subset of 58 magnetic point groups allowing for general magnetoelectric response. We summarise in Tab.~\ref{Tab1}~ only the 40 mangetic point groups which allow for the nonzero diagonal magnetoelectric response elements \cite{Siratori1992,Rivera2009}. We also list whether the material has allowed ferromagnetism (FM, 12 magnetic point groups) or is enforced by the point group symmetry to be antiferromagnetic (AF, 28 point groups)~\cite{Bradley} together with several material examples. We see that the magnetoelectric response can be anisotropic what was confirmed experimentally~\cite{Folen1961}. Note that the third row of the Tab.~\ref{Tab1} gives zero trace. This analysis excludes from pseudoscalar magnetoelectric coupling materials which do exhibit only traceless magnetoelectric coupling. When the system breaks $\mathcal{P}$ and $\mathcal{T}$ but preserves its combination, it can host also bulk Dirac quasiparticles~\cite{Smejkal2016}. We mark the $\mathcal{PT}$ symmetric magnetoelectric pseudoscalar point groups by brackets in Tab.~\ref{Tab1}. \begin{table}[] \begin{tabular}{cccc} Components & FM MPG & AF MPG & Material \\ \hline \hline $\left(\begin{array}{lll}\alpha_{xx} & \alpha_{yy}& \alpha_{zz} \end{array}\right)$ & $1$ $2$ $m^{\prime}$ $m^{\prime}m^{\prime}2$ & ($\overline{1}^{\prime}$) ($\boldsymbol{2}/\boldsymbol{m}^{\prime}$) $222$ ($m^{\prime}m^{\prime}m^{\prime}$) & (Fe,Bi)$_{\text{2}}$Se$_{\text{3}}$ \\ \hline & $3$ $4$ $6$ & ($\overline{3}^{\prime}$) $\overline{4}^{\prime}$ $4/m^{\prime}$ $\overline{6}^{\prime}$ $6/m^{\prime}$ & \\ $\left(\begin{array}{lll}\alpha_{xx} & \alpha_{xx} & \alpha_{zz}\end{array}\right)$ & $3m^{\prime}$ $4m^{\prime}m^{\prime}$ & $32$ ($\overline{\boldsymbol{3}}^{\prime}\boldsymbol{m}^{\prime}$) $422$ $\overline{4}^{\prime}2m^{\prime}$ ($4/m^{\prime}m^{\prime}m^{\prime}$) & Cr${_\text{2}}$O$_{\text{3}}$\cite{Siratori1992} \\ & $6m^{\prime}m^{\prime}$ & $622$ $\overline{6}^{\prime}m^{\prime}2$ ($6/m^{\prime}m^{\prime}m^{\prime}$) & \\ \hline $\left(\begin{array}{lll}\alpha_{xx} & -\alpha_{xx} & 0 \end{array}\right)$ & $\overline{4}$, $\overline{4}2^{\prime}m^{\prime}$ & $4^{\prime}$ ($4^{\prime}/m^{\prime}$), $4^{\prime}22^{\prime}$ $4^{\prime}mm^{\prime}$ $\overline{4}m2$ ($4^{\prime}/m^{\prime}mm^{\prime}$) & \\ \hline $\left(\begin{array}{lll}\alpha_{xx} & \alpha_{xx} & \alpha_{xx} \end{array}\right)$ & & $23$, ($m^{\prime}\overline{3}^{\prime}$), $432$, $\overline{4}^{\prime}3m^{\prime}$ ($m^{\prime}\overline{3}^{\prime}m^{\prime}$) & \\ \hline \hline \end{tabular} \caption{Table of antiferromagnetic and ferromagnetic nonquantized axion magnetoelectric symmetry groups and candidate material. In the first column we show only the diagonal part of magnetoelectric polarizability tensor $\alpha_{ij}$. The symbols $\overline{1}$ and $1^{\prime}$ mark spatial inversion and time-reversal symmetry, respectively. FM and AF MPG refers to ferromagnetic and antiferromagnetic magnetic point group~\cite{Bradley}.} \label{Tab1} \end{table} \begin{figure}[t!] \hspace*{0cm} \includegraphics[width=1\textwidth]{figures/material1.pdf}\\ \caption{(a) Crystal structure of topological insulator Bi$_2$Se$_3$ consist from quintuple layers forming rhombohedral unit cell. Antiferromagnetism of the magnetically doped (Fe,Bi)$_2$Se$_3$ breaks spatial inversion $\mathcal{P}$ and time-reversal $\mathcal{T}$ symmetry, but preserve combined $\mathcal{PT}$ symmetry. (b) Crystal structure of intrinsic antiferromagnetic axion insulator MnBi$_2$Te$_4$. The quantized value of axion angle is protected by the inversion symmetry $\mathcal{P}$ (we maek two inversion symmetry points in the lattice). The system exhibits also partial unit cell translation $\boldsymbol{t}$ combined with time-reversal symmetry $\mathcal{T}$.} \label{fig:af-ti:f1} \end{figure} In topological insulators, such as Bi$_2$Se$_3$ (the nonmagnetic phase of crystal shown in Fig.~\ref{fig:af-ti:f1}(a)) and Bi$_2$Te$_3$, the presence of $\mathcal{T}$ symmetry in combination with nontriivial band inversion ensures the axion angle $\Theta$ to be $\pi$~\cite{Wu2016a}, requires zero surface Hall conductivity, and the topological magneto-electric effect~\cite{Armitage2019}. The topological magneto-electric effect in topological insulators refers to a quantized magneto-electric response, and has been observed also by magneto-optical measurements~\cite{Wu2016a}. In fact, the quantization of $\Theta$ in non-magnetic topological insulators can be taken as defining property of topological insulators~\cite{Armitage2019}. Recently, also antiferromagnetic topological insulator~\cite{Mong2010} was found in \MnBiTe{}{2}{4}~\cite{Otrokov2019}. Antiferromagnetic topological insulator state is protected by time-reversal symmetry coupled with partial unit cell translation $\boldsymbol{t}$ as we show in Fig.~\ref{fig:af-ti:f1}(b). The \textit{static} axion insulators are magnetic topological insulators, such as \MnBiTe{}{2}{4}~\cite{Li2019a,Liu2020b}, which break $\mathcal{T}$ symmetry via the presence of a magnetic ion (in this case, Mn). However, they exhibit axion response with $\Theta={\rm \pi}$, protected by the presence of axion odd symmetries such as inversions, see inversion centre in Fig.~\ref{fig:af-ti:f1}(b), or crystalline symmetries. The axion-odd symmetries are the symmetries which reverse the sign of $\Theta$ and support the so called $\mathbb{Z}_2$ classification~\cite{Kane2005b,Turner2012,Fang2012b}. Among the additional axion-odd symmetries are improper rotations, and antiunitary proper rotations (for instance rotation combined with time-reversal). In the Table~\ref{tab:symmetry_class_axion}, we list axion angle quantizing symmetry operations, $g$. We decompose the symmetry operation $g=g_{\parallel}\circ g_{\perp}$ into the parts $g_{\parallel}$ and $g_{\perp}$ which are parallel and perpendicular (in the surface plane) to the given surface normal $\hat{z}$\cite{Varnava2020}. We remark that we list the point group operation, but in general we need to pay attention to the nonsymmoprhic partial translations of the group, for details see~\cite{Varnava2020}. \begin{table} \centering \begin{tabular}{ccc} \hline\hline $g$ & $g_{\|}$ & $g_{\perp}$ \\ \hline \text { Operations reversing } $\hat{\mathbf{z}}$ & & \\ $\mathcal{M}_{z}$ & \multirow{4}{*}{ $\mathcal{M}_{z}$} & $\mathcal{E}$ \\ $\mathcal{P}$ & & $\mathcal{C}_{2}$ \\ $\mathcal{S}_{3,4,6}$ & & $\mathcal{C}_{3,4,6}$ \\ $\bar{\mathcal{C}}_{2}\mathcal{T}$ & & $\mathcal{M}_{d}\mathcal{T}$ \\ \text { Operations preserving } $\hat{\mathbf{z}}$ & & \\ $\mathcal{E}\mathcal{T}$ & \multirow{4}{*}{ $\mathcal{E}$} & $\mathcal{E}\mathcal{T}$ \\ $\mathcal{C}_{2,3,4,6}\mathcal{T}$ & & $\mathcal{C}_{2,3,4}\mathcal{T}$ \\ $\mathcal{M}_{d}$ & & $\mathcal{M}_{d}$ \\ \hline\hline \end{tabular} \caption{Axion angle quantizing symmetries. $\mathcal{E}$, $\mathcal{P}$, $\mathcal{M}_{z}$, $\mathcal{M}_{d}$, $\mathcal{C}_{2,3,4,6}$, $\mathcal{S}_{3,4,6}$, and $\mathcal{T}$ mark unitary symmmetry operations of identity, inversion, mirror parallel and perpendicular to surface normal $\hat{\boldsymbol{z}}$, rotational axis, improper rotations, and time-reversal, respectively. Overbar marks inversion. Adapted after~\cite{Varnava2020}.} \label{tab:symmetry_class_axion} \end{table} Finally, the \textit{dynamical} axion insulator allows for nonquantized dynamical axion angle. The dynamics of the axion angle was suggested to be induced by chiral magnetic effect, antiferromangetic resonance~\cite{Zhang_2020}, longitudinal spin fluctuations~\cite{2010NatPh...6..284L} in an antiferromagnet or spin fluctuations in paramagnetic state~\cite{Wang2016Z}. In Fig.~\ref{fig:af-ti:f1}(a), we show an example of lattice with dynamical axion insulator state - Fe-doped (Bi$_{1-x}$Fe$_x$)$_2$Se$_3$\xspace with $\mathcal{PT}$ symmetric crystal. Here, the antiferromagnetism breaks the inversion and time-reversal symmetries of the Bi$_2$Se$_3$ crystal. The symmetry breaking is desribed by mass term $M_{5}$ which corresponds to the band-gap in surface state. The combined $\mathcal{PT}$ symmetry is in the (Bi$_{1-x}$Fe$_x$)$_2$Se$_3$\xspace crystal preseved and enforces Kramers degenerate bands. This can be seen by acting $\mathcal{PT}$ symmetry on the Bloch state to show that these two states have the same energy and are orthoghonal~\cite{Herring1966,Ramazashvili2008,Fang2013,Tang2016,Smejkal2016}. The presence of $\mathcal{PT}$ allows for antiferromagnetic Dirac quasipaticles~\cite{Tang2016,Smejkal2016} with plethora of unconventional and practically useful response such as large anisotropic magnetoresistance~\cite{Smejkal2016,Smejkal2017b}. We discuss the material physics requirements for dynamical axion insulator in the section followed by section on minimal effective model of a dynamical axion insulator. \subsubsection{Material candidates} In this section we list requirements for a dynamical axion insulator which is also suitable for dark axion detection~\cite{Marsh:2018zyw}. In addition to constraints comming from requiring dynamical axion quasiparticles, we need to ensure strong coupling of the $\Theta$ magneto-electric response to the fluctuations of the magnetic order parameter. The concept was originally developed for the longitudinal fluctuations in the N\'{e}el order parameter in magnetically doped topological insulators ((Bi$_{1-x}$Fe$_x$)$_2$Se$_3$\xspace in Ref.~\cite{2010NatPh...6..284L}) and recently extended into the instrinsic antiferromagnet \MnBiTe{2}{2}{5}~\cite{Zhang_2020}. This dynamical axion field is quite weak due to the low magnetoelectric coupling and trivial electronic structure in conventional materials such as Cr$_{\text{2}}$O$_{\text{3}}$\cite{Malashevich2012} and BiFeO$_{\text{3}}$~\cite{Coh2011} with $\Theta$ = $10^{-3}$ and $10^{-4}$, respectively, see Tab.~\ref{Axion_materials}. The dynamical axion effect (i.e. a large $\Theta$ response to external perturbations) can be enhanced in the proximity of the topological phase transitions\cite{Zhang_2020}. We now summarise the material criteria for a dynamical axion quasiparticles for detecting dark matter axion: \begin{itemize} \item Nonzero dynamical axion angle. The material symmetry allows for dynamical axion insulator state and axion spin density wave~\cite{2010NatPh...6..284L,Wang2016Z,Zhang_2020} with mass in the range of meV. This is one of the main advantage of using axion quasiparticles in antiferromagnets for detecting light and weakly interacting DM axions~\cite{2019PhRvL.123l1601M}. \item Large bulk band-gap~\cite{Wan2012}. The material is in bulk semicondcuting or insulating with a large bulk band-gap, without disturbing bulk metallic states. In turn its low energy physics is governed solely by the axion coupling. \item Topological mass term $M_{5}$ should be of order of dynamical axion fluctuation mass $m_{a}$ to ensure resonance with DM axion~\cite{2010NatPh...6..284L,2019PhRvL.123l1601M}. \item Large fluctiation in axion angle. This can be achieved close to the magnetic and topological phase transition as $\delta \Theta(\boldsymbol{r},t)=\delta M_{5}/g$, and $1/g\sim 1/\mathcal{M}(0)$~\cite{Zhang_2020}. The topological phase transition should be approached from the topological side. Practically, one can tune this mass term by alloying. The alloying can effectively tune the strength of the spin orbit interaction. However, the proximity close to the magnetic transition can compromise narrow linewidth, see next point. \item Trade-off among narrow linewidth and sensitivity. Narrow linewidth of the axion respones where the thermal fluction and scattering are supressed. This imposis tmeperature constraints (i.e. $T\ll T_N$, $T\ll m_5$). In contrast, enhanced response close the mangetic phase transition could enhance sensitivity. \item Robust magnetic ordering with elevated critical (N\'eel) temperature. \item As we will see in chapter about power output we need large spin-flop fields ($> 1$\,T) again favouring antiferromagnetic ordering. \item Linear coupling of magnetic fluctuations to generate measurable axion polariton which is used for the detection of the dark matter axion. Li et al.~\cite{2010NatPh...6..284L} has used linear coupling of the longitudinal spin wave mode. From this perspective, the relatively streightforward generations of dynamical axion by chiral magnetic effect or (anti)ferromagnetic resonance are not suitable. For the conventional transeversal spin waves would produce rahter quadratic coupling. This point is an open problem, however, the antiferromangetic spin density wave states~\cite{PhysRevB.84.195138} with longitudinal component are also possible candidates at the moment. \item Magnetic and relativistic chemistry of low energy state manifold~\cite{Wan2012}: 3d states ensuring magnetism and time-reversal symmetry breaking and heavy elements with strong atomic spin-orbit interaction. Low energy states of common topological insulators are often heavy p-states which have low correlations and do not support magnetism. \end{itemize} The last point can be justified by considering limitation of existing axion insulators proposals. 3d and 4d elements do have large electronic correlations but rather small spin-orbit interaction and thus it is difficult to tune the system into/close to the topological state. 4f and 5f elements pose heavy masses and narrow bands with excpetion of rate Kondo topological insulators~\cite{Dzero2010}. 5d pyrochlore~\cite{Wan2011} and spinel~\cite{Wan2012} elements are computationally predicted to host axion states within relatively small window of correlations strength complicating manufacturing the material. To summarize, the most promissing material systems are intrinsic antriferomagnetic axion insulators~\cite{Li2019a}, magnetically doped topological insulators~\cite{2010NatPh...6..284L}, certain conventional magnetoelectrics~\cite{Wang2011Z} and heterostructures of topological insulators~\cite{PhysRevB.102.121107}. The $\mathcal{PT}$ symmetric antiferromagnetism seems to be favourable over ferromagnetism as it naturaly provides for Dirac quasiparticles with tunable axion quasiparticles masses, longitudinal spin waves, larger spin-flop fields, elevated N\'eel temperatures, possibility to combine chemistry required for magnetism and spin-orbit coupling in single material platform. We list some of the promissing building block materials and systems for dynamical axion quasiparticles in the Tab.~\ref{Axion_materials}. Besides listing materials which are directly dynamical axion insulators we added also materials which can be used as starting configurations to build the dynamical axion insulator, for instance, by alloying of the static axion insulators. \begin{table} \caption{Table of magneto-electric insulating material classes and candidates. FM (AF) marks (anti)ferromagnetism, $T_C$ the critical temperature, and $\Delta$ the bulk band gap.} \label{Axion_materials} \renewcommand{\arraystretch}{1.15} \begin{tabular}{ccccc} \toprule \textbf{Phase} & \textbf{Material class} & \textbf{$\boldsymbol{T_C}$~(K)} & \textbf{$\boldsymbol\Delta$~[meV]} & $\boldsymbol{\Theta$} \\ \midrule \multirow{2}{*}{Magnetoelectric} & BiFeO$_{\text{3}}$ & 643 & 950 & \num{0.9e-4} \cite{Coh2011} \\ & Cr${_\text{2}}$O$_{\text{3}}$ & 343 & 1300 & \num{1.3e-3} \cite{Malashevich2012} \\ \midrule Magnet/TIs & CrI$_{\text{3}}$/Bi$_{\text{2}}$Se$_{\text{3}}$/MnBi$_{\text{2}}$Se$_{\text{4}}$ & \textgreater{}10 & 5.6 & $\pi$ \cite{PhysRevB.102.121107} \\ \multirow{2}{*}{Intrinsic $\mathcal{P}$ AFs} & MnBi$_{\text{2}}$Te$_{\text{4}}$ & \textless{}25 & \textless 220 & $\pi$ \\ & EuIn(Sn)$_{\text{2}}$As(P)$_{\text{2}}$ & 16 & \textless{}100 & $\pi$ \\ \hline Doped TIs & Cr(Fe)-Bi$_{\text{2}}$Se$_{\text{3}}$ & $\sim$10~\cite{PhysRevB.92.104405} & $\sim$30 & nonquantized \\ Intrinsic $\mathcal{PT}$ AFs & Mn(Eu)$_{\text{2}}$Bi$_{\text{2}}$Te$_{\text{5}}$ & 6 & $\sim$50 & $0.83\,\pi$~\cite{PhysRevB.102.121107}\\ \bottomrule \end{tabular} \end{table} We emphasize that the bulk energy bands encode the information about the dynamical axion insulator response, and its surface states~\cite{2010NatPh...6..284L}. We can see this on expression for the intrinsic magnetoelectric susceptibility, axion coupling, can be calculated in the Bloch representation as~\cite{2010NatPh...6..284L}: \begin{equation} \Theta=-\frac{1}{4 \pi} \int_{\mathrm{BZ}} d^{3} k \epsilon^{\alpha \beta \gamma} \operatorname{Tr}\left[\mathcal{A}_{\alpha} \partial_{\beta} \mathcal{A}_{\gamma}-i \frac{2}{3} \mathcal{A}_{\alpha} \mathcal{A}_{\beta} \mathcal{A}_{\gamma}\right]. \end{equation} Here we explictily see the axion angle relation to the non-abelian Berry connection $\mathcal{A}_{\alpha, n m}(\mathbf{k})=\left\langle u_{n \mathbf{k}}\left|i \partial_{k_{\alpha}}\right| u_{m}\right\rangle$ constructed from the Bloch functions $\left|u_{n \mathbf{k}}\right\rangle$. The trace is over occupied valence bands. The first-principle calculations of the axion angle is reserch topic on its own~\cite{Varnava2018,Varnava2020}. For the sake of brevity we will adopt here simpler approach. We can use first-prinicple calculations and symmetry analysis to identify and parametrize low energy effective Hamiltonian for which the calculation of axion angle and its dynamical response is numerically less demanding. We will now describe dynamical axion quasiparticle model which is applicable to Fe-doped Bi$_{\text{2}}$Se$_{\text{3}}$~\cite{2010NatPh...6..284L} and intrinsic antiferromagnet Mn$_{\text{2}}$Bi$_{\text{2}}$Te$_{\text{5}}$~\cite{Zhang_2020} and also heterostructures~\cite{PhysRevB.102.121107}. \subsubsection{Dirac model of axion quasiparticles} We can derive the minimal model of dynamical axion insulator starting from the Dirac quasiparticle model for the bulk states of topological insulator Bi$_{\text{2}}$Se$_{\text{3}}$~\cite{Zhang2009a}. The low energy physics can be captured by four-band Hamiltonian in the basis of bonding and antibonding Bi $p_{z}$ states $\left|P 2_{z}^{-}, \uparrow(\downarrow)\right\rangle \text { and }\left|P 1_{z}^{+}, \uparrow(\downarrow)\right\rangle$~\cite{Zhang2009a,2010NatPh...6..284L,Zhang_2020}: \begin{equation} \mathcal{H}_{\mathrm{Dirac}}=\epsilon_{0}(\vc{k})+\sum_{a=1}^{5} d_{a}(\vc{k}) \Gamma_{a}. \end{equation} Here $\Gamma_{a}$ refer to the Dirac matrices representation: \begin{equation} \Gamma_{(1,2,3,4,5)}=\left(\sigma_{x} \otimes s_{x} \, , \sigma_{x}, \otimes s_{y}, \sigma_{y} \otimes I_{2 \times 2}, \sigma_{z} \otimes I_{2 \times 2} \, , \sigma_{x} \otimes s_{z}\right) \label{alpha5-Dirac0} \end{equation} in the basis $(|P 1_{z}^{+}, \uparrow\rangle,|P 1_{z}^{+}, \downarrow\rangle, |P 2_{z}^{-}, \uparrow\rangle,|P 2_{z}^{-}, \downarrow\rangle)$. $\sigma$ and $s$ are orbital and spin Pauli matrices. The $4\times 4$ matrices $\Gamma_a$ satisfy the Clifford algebra $\{\Gamma_a,\Gamma_b\}=2\delta_{ab}$ with $\Gamma_5=\Gamma_1\Gamma_2\Gamma_3\Gamma_4$. This model can be tuned to the trivial ($\Theta=0$) or topological insulator state ($\Theta=\pi$). To induce nonzero $\delta\Theta$ and dynamical axion state we need to add $\mathcal{P}$ and $\mathcal{T}$ symmetry breaking terms due to the antiferromagnetism. The crystal momentum dependent coefficients take the form: \begin{eqnarray} d_{1,2,3}(\boldsymbol{k}) &=& A_{1,2,3}(\boldsymbol{k})+m_{x,y,z}, \\ \epsilon_{0}(\boldsymbol{k})&=&C+2 D_{1}+4 D_{2}-2 D_{1} \cos k_{z}-2 D_{2}\left(\cos k_{x}+\cos k_{y}\right) \\ d_{4}(\boldsymbol{k})=\mathcal{M}(\mathbf{k})&=&M_{0}-2 B_{1}-4 B_{2}+2 B_{1} \cos k_{z}+2 B_{2}\left(\cos k_{x}+\cos k_{y}\right) \\ d_{5}(\boldsymbol{k})=M_{5}. \label{perham} \end{eqnarray} Here the fourth term $\mathcal{M}(\boldsymbol{k})$ controls the topological phase transition from the trivial to topological insulator, is invariant under $\mathcal{T}$, and we denote $\mathcal{M}(\boldsymbol{k}=0)=M_{0}$. The topological insulating phase is achieved when $M,B_{1},B_{2}>0$~\cite{Zhang2009a}. The symmetry breaking terms are the masses $m_{x,y,z}$ and $M_{5}$ (a $\mathcal{C}\mathcal{P}$-odd chiral mass term). We see that the spatial inversion $\mathcal{P}=\sigma_{z}\otimes I_{2x2} $ and time-reversal operators $\mathcal{T}=iI_{2x2}\otimes s_{y}\mathcal{K}$ do not commute with the Hamiltonian, while their combination does. Here $\mathcal{K}$ is complex conjugation. Only the last mass term $M_{5}$ induces linear perturbations to $\Theta$ as we will show further, and without loss of generality one can set $m_{x,y,z}=0$. In turn, the $M_{5}$ term opens a surface band gap in the surface states Dirac Hamiltonian as we show in Fig.~\ref{fig:af-ti:f2}. The $A, B, C$, $D$, and masses $M, M_{5}$ constants are material dependent and can be determined by fitting the electronic structure calculated from the first-principles~\cite{Zhang2009a,2010NatPh...6..284L,PhysRevB.102.121107,Liu2010}. We also remark, that for calculating the complete response of the material we need to know the full periodic Hamiltonian Eq.~\eqref{perham}. When its sufficient to study small wavector excitations we can use continuum variant, $\boldsymbol{k},\boldsymbol{p}$-expansion, around momentum points $X_f$, where $\bm{q}=\bm{k}-X_f$: \begin{align} \mathcal{H}_f(\bm{q})=q_x\alpha_1+q_y\alpha_2+q_z\alpha_3+M_0\alpha_4+M_{5f}\alpha_5. \label{alpha5-Dirac} \end{align} Here we use the standard Dirac equation basis: \begin{equation} \beta=\alpha_{4}=\left(\begin{array}{cc} I & 0 \\ 0 & -I \end{array}\right), \alpha^{i=1,2,3}=\left(\begin{array}{cc} 0 & \sigma_{i} \\ -\sigma_{i} & 0 \end{array}\right) \Rightarrow \alpha_{5}=\left(\begin{array}{cc} 0 & I \\ I & 0 \end{array}\right). \end{equation} Furthermore, the subscript $f$ denotes the valley degree of freedom in the low-energy electronic band of the system, and can be understood as the Dirac quasiparticle \textit{flavour}. In the AFI phase of the Bi$_2$Se$_3$ family doped with magnetic impurities such as Fe~\cite{2010NatPh...6..284L}, there is a single Dirac fermion and $M_{5,1}=M_{5,2}=0$, $M_{5,3}=-(2/3)Un_z$. (In the AFI phase of the Fu-Kane-Mele-Hubbard (FKMH) model~\cite{Sekine:2014xva}, there are three Dirac fermions and $M_{5,a}=Un_a$ $(a=x,y,z)$.) Here, $\bm{n}=(\langle \vc{S}_A-\vc{S}_B)/2=n_x\bm{e}_x+n_y\bm{e}_y+n_z\bm{e}_z$ denotes the mean-field AF order parameter (i.e., the N\'{e}el field, with $\vc{S}_{A,B}$ the spin of ions on $A$ and $B$-type lattice sites) and $U$ is the on-site electron-electron interaction strength (i.e. the Hubbard term, see below). The kinetic term $\sum_{\mu=1}^3q_\mu\alpha_\mu$ is spin-dependent as a consequence of spin-orbit coupling. \begin{figure}[t!] \hspace*{0cm} \includegraphics[width=1\textwidth]{figures/material2.pdf}\\ \caption{(a) Minimal model energy bands of edge states (red) of dynamical axion insulator with parity and time-reversal breaking antiferromangetic term $M_{5}=0.5M_0$, where $M_0$ is bulk (blue) Dirac band-gap. The wavector corresponds to given valley index $f$ in the text.} \label{fig:af-ti:f2} \end{figure} We derive the effective action consisting of the N\'{e}el field $\bm{n}=\bm{n}_0+\delta\bm{n}$ and an external electromagnetic potential $A_\mu$, where $\bm{n}_0$ denotes the ground state of the N\'{e}el field and $\delta\bm{n}$ denotes the fluctuation due to excitations. For this purpose, it is convenient to adopt a perturbative method. We start with the total action of an AF insulator described by Eq. (\ref{alpha5-Dirac}) with an external electromagnetic potential $A_\mu$: \begin{align} S_{\rm eff}[\psi,\bar{\psi},\bm{n},A_\mu]=\int dtd^3 r\sum_f\bar{\psi}_f(\bm{r},t)\left[i\gamma^\mu D_\mu-M_0+i\gamma^5M_{5f}\right]\psi_f(\bm{r},t),\label{Eq-S1} \end{align} where $t$ is real time, $\psi_f(\bm{r},t)$ is a four-component spinor, $\bar{\psi}_f=\psi_f^\dagger\gamma^0$, $D_\mu=\partial_\mu+ieA_\mu$, and we have used the fact that $\alpha_4=\gamma^0$, $\alpha_5=-i\gamma^0\gamma^5$ and $\alpha_j=\gamma^0\gamma^j$ ($j=1,2,3$). Here, the gamma matrices satisfy the identities $\{\gamma^\mu,\gamma^5\}=0$ and $\{\gamma^\mu,\gamma^\nu\}=2g^{\mu\nu}$ with $g^{\mu\nu}=\mathrm{diag}(1,-1,-1,-1)$. By integrating out the fermionic field $\psi_f$, we obtain the effective action $W_{\rm eff}$ for $\bm{n}$ and $A_\mu$ as \begin{align} Z[\bm{n},A_\mu]&=\int\mathcal{D}[\psi,\bar{\psi}]e^{iS_{\rm eff}}=\exp\left\{\sum_f\mathrm{Tr}\ln\left[G_{0f}^{-1}(1+G_{0f}V_f)\right]\right\}\nonumber\\ &=\exp\left[\sum_f\mathrm{Tr}\left(\ln G_{0f}^{-1}\right)-\sum_f\sum_{n=1}^\infty\frac{1}{n}\mathrm{Tr}\left(-G_{0f}V_f\right)^n\right]\nonumber\\ &\equiv e^{iW_{\rm eff}[\bm{n},A_\mu]}. \end{align} In order to obtain the action of the low-energy spin-wave excitation, i.e., the AF magnon, we set the Green's function of the unperturbed part as $G_{0f}=(i\gamma^\mu\partial_\mu-M_0+i\gamma^5M_{5f})^{-1}$, and the perturbation term as $V_f=-e\gamma^\mu A_\mu+i\gamma^5\delta M_{5f}$. Note that we have used $i\gamma^\mu D_\mu-M_0+i\gamma^5(M_{5f}+\delta M_{5f})=G_{0f}^{-1}+V_f$. In the random phase approximation, the leading-order terms read \begin{align} iW_{\rm eff}[\bm{n},A_\mu]=-\frac{1}{2}\sum_f\mathrm{Tr}\left(G_{0f}i\gamma^5\delta M_{5f}\right)^2+\sum_f\mathrm{Tr}\left[\left(G_{0f}e\gamma^\mu A_\mu\right)^2\left(G_{0f}i\gamma^5\delta M_{5f}\right)\right],\label{Eq-S4} \end{align} where the first and second terms on the right-hand side correspond to a bubble-type diagram and a triangle-type digram, respectively. To compute the traces of the gamma matrices we use the following identities: \begin{align} \mathrm{tr}(\gamma^\mu)=\mathrm{tr}(\gamma^5)=0,\ \ \ \mathrm{tr}(\gamma^\mu\gamma^\nu)=4g^{\mu\nu},\ \ \ \mathrm{tr}(\gamma^\mu\gamma^\nu\gamma^5)=0,\ \ \ \mathrm{tr}(\gamma^\mu\gamma^\nu\gamma^\rho\gamma^\sigma\gamma^5)=-4i\epsilon^{\mu\nu\rho\sigma}. \end{align} The first term in Eq. (\ref{Eq-S4}) is given explicitly by \begin{align} \mathrm{Tr}\left(G_{0f}i\gamma^5\delta M_{5f}\right)^2 &=\int\frac{d^4q}{(2\pi)^4}\int\frac{d^4k}{(2\pi)^4}\mathrm{tr}\left[G_{0f}(k)i\gamma^5\delta M_{5f}(q)G_{0f}(k+q)i\gamma^5\delta M_{5f}(-q)\right]\nonumber\\ &=4\int\frac{d^4q}{(2\pi)^4}\int\frac{d^4k}{(2\pi)^4}\frac{[k_\mu(k+q)^\mu-M_0^2+M_{5f}^2]\delta M_{5f}(q)\delta M_{5f}(-q)}{(k^2-M_0^2-M_{5f}^2)[(k+q)^2-M_0^2-M_{5f}^2]}\nonumber\\ &\equiv \int\frac{d^4q}{(2\pi)^4}\Pi_f(q)\delta M_{5f}(q)\delta M_{5f}(-q),\label{Eq-S5} \end{align} where $k^2=g^{\mu\nu}k_\mu k_\nu=k_\mu k^\mu=k_0^2-\bm{k}^2$. We have used $G_{0f}(k)=(\gamma^\mu k_\mu+M_0+i\gamma^5M_{5f})/(k^2-M_0^2-M_{5f}^2)$, $\{\gamma^\mu,\gamma^5\}=0$, and $\{\gamma^\mu,\gamma^\nu\}=2g^{\mu\nu}$. After performing a contour integration, we arrive at the action of the form \begin{align} \sum_f\mathrm{Tr}\left(G_{0f}i\gamma^5\delta M_{5f}\right)^2=i\sum_f J_f\int dtd^3r \left[(\partial_\mu \delta M_{5f})(\partial^\mu \delta M_{5f})-m_f^2(\delta M_{5f})^2\right], \label{action-Neel-field} \end{align} where $J_f$ and $m_f$ are the stiffness and mass of the spin-wave excitation mode, which are given respectively by~\cite{2010NatPh...6..284L} \begin{align} J_f=\left.\frac{\partial^2\Pi_f(q)}{\partial q_0^2}\right|_{q\to 0}=\int_{\mathrm{BZ}}\frac{d^3k}{(2\pi)^3}\frac{\sum_{i=1}^4 d_i^2}{16|d|^5}, \label{eqn:Jf_microscopic} \end{align} \begin{align} J_fm_f^2=\left.\Pi_f(q)\right|_{q\to 0}=M_{5f}^2\int_{\mathrm{BZ}}\frac{d^3k}{(2\pi)^3}\frac{1}{4|d|^3}, \label{eqn:Jf_mf_microscopic} \end{align} where $|d|=\sqrt{\sum_{a=1}^5 d_a^2}$, $q\to 0$ indicates the limit of both $q_0\to 0$ and $\bm{q}\to\bm{0}$, and here $f$ denotes the flavour. Equation~(\ref{action-Neel-field}) is nothing but the action of the N\'{e}el field described by the non-linear sigma model~\cite{Haldane1983}. In the present low-energy effective model [Eq. (\ref{Eq-S1})], the information on the anisotropy of the N\'{e}el field is not included. On the other hand, many (actual) AF insulators have the easy-axis anisotropy. Hence the term $\sum_f m_f^2\delta n_f^2$ will be replaced by a term like $m^2(\delta\bm{n}\cdot\bm{e}_A)^2$ with $\bm{e}_A$ denoting the easy axis. The second term in Eq. (\ref{Eq-S4}) is the triangle anomaly, which gives the Chern-Simons term. The final result is~\cite{Nagaosa1996,Hosur2010} \begin{align} \sum_f\mathrm{Tr}\left[\left(G_{0f}e\gamma^\mu A_\mu\right)^2\left(G_{0f}i\gamma^5\delta M_{5f}\right)\right]&=i\frac{\alpha}{2\pi}\int dtd^3r\safemaths{\delta\Theta}(\bm{r},t)\epsilon^{\mu\nu\rho\lambda}\partial_\mu A_\nu \partial_\rho A_\lambda\nonumber\\ &=i\frac{\alpha}{\pi}\int dtd^3 r \safemaths{\delta\Theta}(\bm{r},t) \bm{E}\cdot\bm{B}, \label{action-theta-term} \end{align} where~\cite{Sekine:2014xva} \begin{equation} \safemaths{\delta\Theta}(\bm{r},t)=\sum_f\tan^{-1}\left[\frac{M_f+\delta M_{5f}(\bm{r},t)}{M_0}\right]-\sum_f\tan^{-1}\left[\frac{M_f}{M_0}\right]\approx-\sum_f \frac{\delta M_{5f}(\bm{r},t)}{M_0}\, . \label{eqn:AQ_from_n} \end{equation} From Eq.~(\ref{action-theta-term}) we find that the fluctuation of the $\gamma^5$ mass $M_{5f}$ behaves just as a dynamical axion field. From Eqs.~(\ref{action-Neel-field}) and (\ref{action-theta-term}), we finally arrive at the action of the AQ~\cite{2010NatPh...6..284L,PhysRevLett.116.096401}: \begin{align} S_{\rm AQ}=M_0^2J\int dtd^3r \left[(\partial_\mu \safemaths{\delta\Theta})(\partial^\mu \safemaths{\delta\Theta})-\makeAQ{m}^2\safemaths{\delta\Theta}^2\right]+\frac{\alpha}{\pi}\int dtd^3 r \safemaths{\delta\Theta}(\bm{r},t) \bm{E}\cdot\bm{B}\, , \label{eqn:AQ_effective_action} \end{align} where have used that for systems described by the Dirac Hamiltonian (Eq.~\eqref{alpha5-Dirac}) the quantity labelled $g$ in the action given in Ref.~\cite{2010NatPh...6..284L} can be set equal to the bulk band gap $M_0$. We identify the decay constant as $M_0^2 J = {\makeAQ{f}}^2/2$, and note that the spin wave speed appears in the spatial derivatives by choice of units. \subsection{AQ as Longitudinal Magnon} For concreteness, let us consider the AF insulator phase of (Bi$_{1-x}$Fe$_x$)$_2$Se$_3$\xspace\, and \MnBiTe{2}{2}{5} such that there is a single degree of freedom with $M_{5,1}=M_{5,2}=0$, and $M_{5,3}=-(2/3)Un_\parallel$, where $n_\parallel$ is parallel to the easy-axis anisotropy. In terms of the AF order parameters the AQ is given by expanding eq.~\eqref{eqn:AQ_from_n}, leading to \begin{equation} \safemaths{\delta\Theta} \approx \frac{2U}{3M_0}\delta n_\parallel\, . \end{equation} Thus, we see that the AQ $\safemaths{\delta\Theta}$ is the longitudinal fluctuation in the AF order. The EFT of \emph{transverse} magnons is presented in Appendix~\ref{appendix:eft_afmr}, and is based on the Heisenberg model. The Heisenberg model is the strong coupling limit of the Hubbard model used to describe the AQ, but nonetheless it provides some insight into the physics, which we discuss briefly. The EFT describes the AF order parameter, $\vc{n}$. Let us denote the components of $\vc{n}$ as $n_\parallel$ along the easy-axis and $n_{\bot,1,2}$ orthogonal to it. In the EFT we have that: \begin{equation} \delta n_{\parallel} \approx -\frac{\delta n_{\bot,1}^2}{2}-\frac{\delta n_{\bot,2}^2}{2}\, . \end{equation} Thus the AQ is related \emph{non-linearly} to the transverse magnons of the Heisenberg EFT. In the Dirac model for the AQ, the interaction between $\safemaths{\delta\Theta}$ and electromagnetism is given entirely by the chiral anomaly, i.e. the interaction $\safemaths{\delta\Theta}\vc{E}\cdot\vc{B}$. On the other hand the Heisenberg EFT contains the spin interaction $\mathcal{L}_{\rm em} = \mu_B \vc{s}\cdot\vc{H}$, with $\vc{s}=\dot{\vc{n}}\times\vc{n}$ at leading order. As we have just established, however, the Heisenberg model fields are not linearly related to the AQ in the Hubbard model with $t/U\ll 1$. We therefore neglect the interaction $\mathcal{L}_{\rm em}$ in our subsequent calculations based on the effective action Eq.~\eqref{eqn:AQ_effective_action}. If only the axion, $\safemaths{\delta\Theta}\propto \delta n_\parallel$, is present, then indeed $\dot{\vc{n}}\times\vc{n}=0$. However, if the AFMR fields $\delta n_\bot$ are also excited, then $\mathcal{L}_{\rm em}$ mixes the fields and leads to the Kittel shift in the frequencies of these fields $\omega = \mu_B H_0+\sqrt{m_s^2+v^2k^2}$ (see Appendix~\ref{appendix:eft_afmr}). The Kittel shift would also mix the AFMR fields with the axion. It is not clear to us how to model these two effects, the AQ and AFMR with an applied field, at the same time because the two descriptions are valid in opposite regimes of the Hubbard model parameters. The splitting $\mu_B H_0\ll m_s$ for fields $H_0\sim 1 \text{ T}$, and so our subsequent results would not be changed drastically by such an effect. Nevertheless, the splitting may be possible to observe experimentally if it is present. This remains an open question. We have not been able to derive an EFT for the AQ longitudinal magnon along the same lines as the EFT of AFMR given in the Appendix. One possibility for such a theory generalises the AF-ordering to a general spin density wave ordering vector $\vc{Q}$. In this case, one arrives at a quadratic Lagrangian for the transverse and longitudinal magnons\footnote{Other approaches to the longitudinal mode include Refs.~\cite{2014JPhCS.529a2020X, PhysRevB.100.024428}.} with coupling to external sources~\cite{PhysRevB.84.195138}. However, in addition to these desired ingredients there are also spinor degrees of freedom, the ``holons'' describing the spin-charge separation. Another possibility, which we suggest, is to generalise the N\'{e}el order parameter to an $SU(2)$ doublet with the AQ a Goldstone boson associated to a Chiral $U(1)$ subgroup under which the Dirac quasiparticles are charged. \subsection{Parameter Estimation}\label{sec:params} Three unknown quantities determine the AQ model: the mass~$\makeAQ{m}$, decay constant~$\makeAQ{f}$, and speed $v_s$~(from the spatial derivatives, giving the wave speed). We generally work in the limit $v_s\ll c$ and ignore the magnon dispersion relative to the $E$-field. This leaves two parameters, $\makeAQ{m}$ and $\makeAQ{f}$. We show in detail in section~\ref{sec:boundary_conditions} how both $\makeAQ{m}$ and $\makeAQ{f}$ can be determined experimentally from the polariton resonances and gap via transmission spectroscopy (related to the total reflectance measurement proposed by Ref.~\cite{2010NatPh...6..284L}). In this section, however, we wish to estimate these parameters from known material properties. We consider two candidate materials, firstly the magnetically doped TI (Bi$_{1-x}$Fe$_x$)$_2$Se$_3$\xspace\, of Ref.~\cite{2010NatPh...6..284L}. Reference~\cite{PhysRevB.88.235131} considered a number of different TIs doped with different magnetic ions, and found that only (Bi$_{1-x}$Fe$_x$)$_2$Se$_3$\xspace is both antiferromagnetic and insulating. (Bi$_{1-x}$Fe$_x$)$_2$Se$_3$\xspace has been successfully fabricated. However, the magentism is fragile due to the doping (required around 3.5\%), and the region of the phase diagram exhibiting the AQ is small. Therefore, we also consider the new class of intrinsically magnetic TIs, \MnBiTe{x}{y}{z}, of which only \MnBiTe{2}{2}{5} is thought to contain an AQ, but has yet to be fabricated. Material properties for both cases are listed in Table~\ref{tab:material_params}, while the derived parameters are given in Table~\ref{tab:derived_params}. Our estimates for the derived parameters are discussed in the following. \begin{table} \caption{Material parameters for AQ materials. \MnBiTe{2}{2}{5} has not been experimentally realised, and parameters in the references are calculated \emph{ab initio}, rather than measured. Values in parentheses were assumed in Ref.~\cite{2010NatPh...6..284L}. We assume the dielectric constants for both materials are equal to the undoped Bi$_2$Se$_3$ extrapolated to low energy~\cite{doi:10.1063/1.3466552,CaoWang}.\label{tab:material_params}} \renewcommand{\arraystretch}{1.15} \centering \begin{threeparttable} \begin{tabular}{l l l l l l} \toprule Symbol & Name & \multicolumn{2}{l}{(Bi$_{1-x}$Fe$_x$)$_2$Se$_3$\xspace} & \multicolumn{2}{l}{\MnBiTe{2}{2}{5}} \\ \midrule $\mu_B H_E$ & Exchange & \SI{1}{\meV} & \cite{2012PhRvL.109z6405Z} & \SI{0.8}{\meV} & \cite{PhysRevB.102.121107} \\ $\mu_B H_A$ & Anisotropy & \SI{16}{\meV} & \cite{PhysRevB.88.235131} & \SI{0.1}{\meV} & \cite{PhysRevB.102.121107} \\ \\ $V_\text{u.c.}$ & Unit cell volume & 440 \AA$^3$ & & 270 \AA$^3$ & \\ $U$ & Hubbard term & \SI{3}{\eV} & \cite{PhysRevB.88.235131} & \SI{3}{\eV} & \cite{PhysRevB.102.121107} \\ $M_0$ & Bulk band gap & \SI{0.03}{\eV}~(\SI{0.2}{\eV}) & \cite{PhysRevB.88.235131} & 0.05 eV& \cite{PhysRevB.102.121107} \\ $t$ & Nearest neighbour hopping\tnote{a} & \SI{0.04}{\eV} & & \SI{0.04}{\eV} & \\ $S$ & Magnetic moment & 4.99 & \cite{PhysRevB.88.235131} & 4.59 & \cite{PhysRevB.102.121107}\\ $T_N$ & N\'{e}el temperature & \SI{10}{\K} & \cite{PhysRevB.92.104405} & \SI{6}{\K}\tnote{b}\\ $\epsilon_1$ & Dielectric constant & 25~(100) & & 25 & \\ \bottomrule \end{tabular} \begin{tablenotes}\footnotesize \item[a] The hopping parameters $t$ are derived from $H_E$ assuming half-filling. \item[b] Estimated from the Liechtenstein magnetic force theorem, $T_N=3\mu_B H_E/2 k_B$~\cite{1987JMMM...67...65L}. \end{tablenotes} \end{threeparttable} \end{table} \begin{table} \caption{Derived AQ parameters. ``Material 1'' is our best approximation to (Bi$_{1-x}$Fe$_x$)$_2$Se$_3$\xspace. We report the results of Ref.~\cite{2010NatPh...6..284L}, who assumed a cubic lattice to evaluate the band integrals, but rescaled by our values of $M_0$. We use a combination of normalisation to the cubic lattice result, and the material properties in Table~\ref{tab:material_params} to estimate the parameters for ``Material 2'', our best approximation to \MnBiTe{2}{2}{5}.\label{tab:derived_params}} \center \begin{tabular}{ l l l l l} \toprule Symbol & Name & Equations & ``Material 1'' & ``Material 2'' \\ \midrule $\makeAQ{m}$ & AQ mass & \eqref{eqn:fQ_Hubbard}, \eqref{eqn:mAQ_est} & 2 meV & \SI{1.8}{\meV}\\ $\makeAQ{f}$ & AQ decay constant & \eqref{eqn:mAQ_microscopic},~\eqref{eqn:fAQ_est} & \SI{30}{\eV} & \SI{70}{\eV} \\ \bottomrule \end{tabular} \end{table} The microscopic model for the AQ is derived from the Hubbard model in the weak coupling limit. In the Hubbard model, one allows hopping of spins between lattice sites. The Hubbard Hamiltonian is: \begin{equation} H = -t \sum_{\langle i j \rangle, \sigma} a^{\dagger}_{i \sigma} a_{j \sigma} + U \sum_{i} n_{i \uparrow} n_{i \downarrow}, \end{equation} where $a^{\dagger}_{i \sigma}$ and $a_{i \sigma}$ are the creation and annihilation operators for a spin $\sigma$ at lattice site $i$ and the first sum is over nearest neighbour sites. $n_{i \uparrow}$ and $n_{i \downarrow}$ are the spin up and spin down density operators for the $i$th lattice site. The first term describes the kinetic energy of the system, whose scale is given by the hopping parameter $t$. The second term describes the interaction between spins on the same site, with scale given by the Hubbard term $U$. In the limit of half filling and $U \gg t$, the Hubbard model is equivalent to a Heisenberg model with $J_H \sim t^2/U$ \cite{Fazekas}. The exchange field is related to the Heisenberg Hamiltonian via Eq.~\eqref{eqn:heisenberg} as \begin{equation} H_E = \frac{2 S J_H}{g \mu_B} \, , \label{eqn:exchangeField} \end{equation} where $S$ is the ion spin and $g$ is the spectroscopic splitting factor \cite{doi:10.1063/1.5109132}~(see Appendix~\ref{appendix:AFMR} for more details). This relation was used in Table~\ref{tab:material_params} to set the hopping parameter $t$ given $U$ , $S$ and $\mu_B H_E$ and taking $g=2$. The electron band energies~$d_i$, Eqs.~\eqref{eqn:Jf_microscopic}, \eqref{eqn:Jf_mf_microscopic}, appearing in the microscopic model are normalized with respect to $t$. The Brillouin zone (BZ) momentum, $k$, on the other hand, is normalised with respect to the unit cell. This suggests normalizing the integrals Eqs.~(\ref{eqn:Jf_microscopic},\ref{eqn:Jf_mf_microscopic}) as (we consider only the case with a single Dirac fermion from now on and drop the subscript $f$): \begin{equation} J=\int_{\rm BZ} \frac{{\rm d}^3k}{(2\pi)^3}\frac{\sum_i d_i^2}{16|d|^3} = \frac{\mathcal{I}_1}{V_\text{u.c.} t^3}\, , \label{eqn:BZ_integral_1} \end{equation} (note that this $J$ is not Heisenberg $J_H$, in fact $J_H\propto 1/J$) and \begin{equation} \makeAQ{m}^2J=M_{5}^2\int_{\rm BZ} \frac{{\rm d}^3k}{(2\pi)^3}\frac{1}{4|d|^3} = M_{5}^2\frac{\mathcal{I}_2}{V_\text{u.c.} t^3}\, , \label{eqn:BZ_integral_2} \end{equation} where $V_\text{u.c.}$ is the volume of the unit cell. It then follows that the AQ mass is: \begin{equation} \makeAQ{m}= M_{5}\sqrt{\frac{\mathcal{I}_2}{\mathcal{I}_1}}=\frac{2SU}{3}\sqrt{\frac{\mathcal{I}_2}{\mathcal{I}_1}}\, . \label{eqn:mAQ_microscopic} \end{equation} Notice that for an exact Dirac dispersion for $d$, the integrals over the BZ vanish if the Dirac mass, $M_0$, vanishes, as we expect from the Gell--Mann-Oakes-Renner relation~\cite{PhysRev.175.2195}. However, these integrals should be evaluated for $d$'s computed in the full theory, i.e. \emph{ab initio} density functional theory for the Hubbard model. In the full theory, the normalized integrals $\mathcal{I}$ depend on the ratio $t/U$. In terms of the Hubbard model parameters we have $M_{5}=(2/3)U n_z$, where $n_z=S$ is the normalised AF order. The decay constant is: \begin{equation} {\makeAQ{f}}^2 = 2 M_0^2 \frac{\mathcal{I}_1}{V_\text{u.c.} t^3}\, , \label{eqn:fQ_Hubbard} \end{equation} Using a cubic lattice model, Ref.~\cite{2010NatPh...6..284L} computed the BZ integrals for (Bi$_{1-x}$Fe$_x$)$_2$Se$_3$\xspace. The integrals depend on the ratio $t/U$, so we can also use this result for \MnBiTe{2}{2}{5} if we extract the values of the normalised integrals. Reference~\cite{2010NatPh...6..284L} report $b=\SI{0.2}{\meV}$ at 2 T and $\makeAQ{m}=\SI{2}{\meV}$. Ref.~\cite{2010NatPh...6..284L} assumed values for the dielectric constant (taken at the gap instead of near the spin wave resonance) and bulk band gap (taken from the model without doping~\cite{Zhang2009a}) of (Bi$_{1-x}$Fe$_x$)$_2$Se$_3$\xspace, which we wish to update (in Table~\ref{tab:material_params}, the values assumed by Ref.~\cite{2010NatPh...6..284L} are given in parentheses). Fortunately, both of these quantities can be factored out of the relevant expressions to arrive simply with the normalised integrals. We find: \begin{equation} \mathcal{I}_1= 4\times 10^{-7} \, , \quad \mathcal{I}_2 = 4\mathcal{I}_1\times 10^{-8}\, . \end{equation} Leading to the derived model parameters: \begin{align} \makeAQ{f} &= \SI{30}{\eV}\left(\frac{M_0}{\SI{0.03}{\eV}}\right)^{0.5}\left(\frac{V_\text{u.c.}}{440\text{\AA}^3}\right)^{-0.5}\left(\frac{t}{\SI{0.04}{\eV}}\right)^{-1.5}\left(\frac{\mathcal{I}_1}{4\times 10^{-7}}\right)^{0.5} \label{eqn:fAQ_est}\\ \makeAQ{m} &= \SI{2}{\meV}\left(\frac{S}{4.99}\right)\left(\frac{U}{\SI{3}{\eV}}\right)\left(\frac{\mathcal{I}_2/\mathcal{I}_1}{4\times10^{-8}}\right)^{0.5}\, .\label{eqn:mAQ_est} \end{align} The derived parameters are presented in Table~\ref{tab:derived_params}, where we adopt the less committal names ``Material 1'' and ``Material 2'' for (Bi$_{1-x}$Fe$_x$)$_2$Se$_3$\xspace\, and \MnBiTe{2}{2}{5} respectively, to acknowledge the limitations of our estimates. Note that in Table~\ref{tab:material_params} we quote the anisotropy field $\mu H_A$, but that this plays no role in our estimation of the AQ parameters. The anisotropy field in fact determines the \emph{transverse} magnon masses (see Appendix~\ref{appendix:eft_afmr}), and not the mass of the longituninal AQ. In Paper~I we mistakenly assumed to use the transverse magnon mass for the AQ (along with a doping fudge factor). The transverse and longitudinal modes turn out to have similar masses. While we do not know of a fundamental reason for this coincidence, they are both clearly governed by the same $\mathcal{O}(\text{meV})$ magnetic energy scales. Finally, we mention the important \emph{spin flop transition} (for a detailed description and bibliography, see ref.~\cite{PhysRevB.66.214410}). Large magnetic fields cause spins to align and induce net magnetization. The magnetization increases linearly for fields larger than the spin-flop field, $H_{\rm SF}$, eventually destroying the AF order. The spin flop field for \MnBiTe{}{2}{4} is 3.5 T~\cite{Otrokov2019}. In easy axis systems, the AF order is destroyed completely when the magnetization saturates. This occurs at the \emph{spin flip transition} for fields larger than the exchange field, $H_E$. Large applied fields that destroy AF order will also destroy the AQ. For the exchange fields given in table~\ref{tab:material_params} we expect these transitions to happen in the many Tesla regime. In the following we consider fields up to 10 T for illustration. \subsection{Damping and Losses}\label{sec:damping} As discussed below, the magnon and photon losses are crucial in determining how effective an AQ material is for detection of DM. In order to detect the AQ and measure its properties, it is essential that any experiment is carried out at temperatures below the N\'{e}el temperature. Fortunately both candidate materials have $T_N>4$\,K, and so initial measurements can be made at more accessible liquid Helium temperatures. As we discuss below, there are at least two sources of loss (conductance, and magnon scattering) that become less important at low temperatures. When using AQ materials to search for DM, it could therefore be advantageous to operate at $T\ll \omega_a$ dilution refrigerator temperatures. \begin{table} \caption{Summary of the loss model. Elements of $\mat{\Gamma}$ are specified before diagonalising the kinetic term (see Eq.~\ref{eq:eom_with_losses}). The only $E$-field loss is the conductance. The total AQ loss is given by the sum of the remaining terms. Loss channels deemed negligible include AQ decay to photons, AQ-photon scattering, and off-diagonal losses.\label{tab:losses}} \renewcommand{\arraystretch}{1.15} \centering \begin{threeparttable} {\small \begin{tabular}{ l l l l l} \toprule Type of losses & Symbol & Parameterisation & Reference values & Comments \\ \midrule Conductance & $\Gamma_\rho$ & $\epsilon_2 \,\omega$ & $10^{-4}\,\omega$ & \makecell[l]{Extrapolated from\\ optical wavelengths} \\ Gilbert damping & $\Gamma_{\rm lin}$ & $\alpha_\text{G} \, (1+\chi_m^{-1}) \, \omega$ & $10^{-9}\,\omega$ & $\chi_m$ given in Ref.~\cite{PhysRevX.9.041038}\tnote{\textdagger}\\ Magnon scattering & $\Gamma_{4m}$ & n/a & & \makecell[l]{Boltzmann-suppressed\\ for $T<m$} \\ \makecell[l]{Impurities\\ \hspace{0.5em}\& domains} & $\Gamma_{\rm cryst.}$ & $(\delta L/L) \, \omega$ & $[10^{-4},10^{-3}]\,\omega$ & \makecell[l]{Typical impurity scale\\ $L\sim \SI{1}{\um}$~\cite{PhysRevX.9.041038}} \\ \bottomrule \end{tabular} } \begin{tablenotes}\footnotesize \item[\textdagger] We thank Chang Liu for providing this result. \end{tablenotes} \end{threeparttable} \end{table} \subsubsection{Resistivity and the Dielectric Function} \begin{figure} \centering \includegraphics[width=0.7\textwidth]{figures/fitting_cao.pdf} \caption{Bi$_2$Se$_3$ dielectric function, $\epsilon_2$, as a function of wavelength $\lambda$ in the optical regime ($\omega\approx 1$ eV). Measurements are from Ref.~\cite{doi:10.1063/1.3466552,CaoWang} for the more favourable trigonal case. The results are well fit by a powerlaw, $\epsilon_2\propto \lambda^p$ with $p=-1.52$.} \label{fig:epsilon_fit} \end{figure} Material conductance (inverse resistivity) appears in the $E$-field equations of motion as a damping term $\Gamma_\rho=1/\rho = \SI{0.6}{\meV}\,[\rho/\si{\ohm \cm})]^{-1}$, from which we see that a resonance near $\SI{1}{\meV}$ requires $\rho\gg \SI{1}{\ohm\cm})$ for $Q=\omega/\Gamma\gg 1$. For a resonance involving the electric field, one requires large resistance, i.e. low conductance. Ref.~\cite{2011PhRvB..84g5316R} measure $\rho$ in the optical ($\omega\sim \SI{1}{\eV}$) at $T\approx \SI{1}{\K}$ of $\rho = \SI{2e-3}{\ohm\cm}$ for undoped Bi$_2$Se$_3$, lowering to $\rho = \SI{5e-4}{\ohm\cm}$ with doping. However, it is shown that annealing the TI at high $T$ can increase $\rho$ to be as large as \SI{1}{\ohm\cm}. For \MnBiTe{}{2}{4} the situation is similar, with two different measurements giving a longitudinal $\rho\approx \SI{e-3}{\ohm\cm}$ at $T\sim \mathcal{O}(\text{few\,\si{\K}})$~\cite{PhysRevMaterials.3.064202}. In the case of \MnBiTe{}{2}{4}, resistivity can be raised by doping with antimony~(\ce{Sb})~\cite{2020arXiv200409123M}. Even so, topological insulators are actually very poor insulators at typical electronic frequencies. The measurements of bulk $\rho$ for both Bi$_2$Se$_3$ and \MnBiTe{}{2}{4} are taken at high energy near the band gap around \SI{1}{\eV}, and far from the spin wave resonance frequency at low energies. References~\cite{doi:10.1063/1.3466552,CaoWang} studied the dielectric function of Bi$_2$Se$_3$ as a function of probe wavelength for the trigonal and orthorhombic phases. The complex dielectric function is $\tilde{\epsilon}(\omega) = \epsilon_1-i\epsilon_2$. For energies below the gap, $E\lesssim \SI{1}{\eV}$, $\epsilon_1$ has value around 25 at the longest wavelenths measured and is only slowly decreasing, while $\epsilon_2$ tends to zero rapidly at large wavelengths in the trigonal case (which is thus more favourable for our purposes). The value of $\epsilon_1$ is considerably smaller than the $\epsilon_1=100$ estimate used in Paper~I and assumed in Ref.~\cite{2010NatPh...6..284L}. As we show below, smaller values of $\epsilon_1$ are highly desirable for DM detection. The resistivity is given by $\rho(\omega)=1/[\omega\epsilon_2(\omega)]$. A narrow linewidth on resonance requires to $\epsilon_2(\omega_+)\ll 1$. Measurements in Ref.~\cite{CaoWang} extend to a maximum wavelength 2800 nm where $\epsilon_2\sim 1$. A simple power law extrapolation to THz wavelengths gives $\epsilon_2(\SI{1}{\meV})=9.5\times 10^{-5}$ (see fig.~\ref{fig:epsilon_fit}). Thus, the resistivity on the polariton resonance at wavelengths of order \SI{1}{\mm} is significantly higher than the bulk measurements in the optical. The value of $\epsilon_2$ is different for different crystal structures of Bi$_2$Se$_3$, and we consider only the most favourable case with the highest resistivity. We take the value $\epsilon_2=10^{-4}$ as a reference scale, however, we do not include any further frequency dependence, which would certainly be different for different materials, such as \MnBiTe{2}{2}{5}. The resistivity on resonance can be determined from the linewidth as measured by THz transmission spectroscopy, as we demonstrate in Section~\ref{sec:transmission}. \subsubsection{Magnon Losses} As we have discussed, the AQ is not described by the same EFT as ordinary AF-magnons. However, due to the relation between the AQ and the magnon fluctuation, we use the well-studied magnon case as a means to assess the possible magnitude of the axion linewidth, and the qualitative possibilities. Furthermore, as we will see, the dominant contribution is estimated to be due to material impurities, which do not depend on the microscopic model for the AQ. We split the magnon losses into different contributions: \begin{equation} \safemaths{\Gamma_m} = \sum_i\Gamma_i , \end{equation} where the index $i$ sums over terms defined in the following subsections. Ref.~\cite{LvovBook} gives a comprehensive account of non-linear wave dynamics relevant to the magnon linewidth. Early works on magnon scattering and linewidth include Ref.~\cite{PhysRevB.3.961}. The recent pioneering work of Refs.~\cite{Bayrakci1926,PhysRevLett.111.017204} showed how neutron diffraction with energy resolution down to 1~$\mu$eV can be used to confirm the theoretical predictions for the AF-magnon linewidth, and the dependence on temperature and momentum across the whole Brillouin zone, including many of the contributions discussed in the following. We focus on a few channels for losses, by means of example, closely following Ref.~\cite{PhysRevLett.111.017204}. Scattering channels that we have not considered include AF-magnon-ferromagnetic magnon scattering, and magnon-phonon scattering: these are discussed in e.g. Ref.~\cite{LvovBook}. In the present work, we are only concerned with the $q\approx 0$ mode at $T\ll T_N$, where many contributions can be neglected. In this regime, as we show in Section~\ref{sec:transmission}, the total AQ contribution to the linewidth can be measured using THz transmission spectroscopy. \subsubsection*{``Linear'' Losses and Gilbert Damping, $\Gamma_{\rm lin}$} Losses are historically incorporated for spin waves by the introduction of the phenomenological Gilbert damping term into the Landau-Lifshitz equation, making the Landau-Lifshitz-Gilbert (LLG) equation. Gilbert damping is a linear loss, since it simply represents decay of spin waves due to torque. There is not a universally accepted first principles model of Gilbert damping. One possible model is presented in Ref.~\cite{PhysRevLett.102.137601}, where Gilbert damping is shown to arise due to spin orbit coupling in the Dirac equation (other models include Refs.~\cite{PhysRevB.75.214420,PhysRevB.79.064404}). In this case, the damping term is written as: \begin{equation} \Gamma_{\rm lin} = \alpha_{\rm G}(1+\chi_m^{-1})\omega \, . \quad \alpha_{\rm G} = \frac{e \mu \Sigma_s}{8 m_e^2}\, , \label{eqn:gilbert_def} \end{equation} where $m_e$ is the electron mass and $\chi_m$ is the dimensionless magnetic susceptibility (volume susceptibility in SI units), and $\Sigma_s=S/V_\text{u.c.}$. The dimensionless prefactor $\alpha_{\rm G}$ is of order $10^{-12}$ for (Bi$_{1-x}$Fe$_x$)$_2$Se$_3$\xspace\, and \MnBiTe{2}{2}{5}. The value of $\chi_m$ was measured for \MnBiTe{}{2}{4} in Ref.~\cite{PhysRevX.9.041038} and found to be of order $\chi_m\approx 10^{-3}$ for $T<T_N$ (see Table~\ref{tab:losses}). Thus the relative width, $\Gamma/\omega$, is of order $10^{-9}$, which is negligible compared to the other sources of loss in the following. Furthermore, $\chi_m$ is small enough to be neglected in the magnetic permeability (with $c=1$), $\mu_m=1+\chi_m$, which we fix to unity. \subsubsection*{Magnon-Magnon Scattering, $\Gamma_{4m}$} \begin{figure} \centering \includegraphics[width=0.44\textwidth]{figures/magnon_feynman.pdf} \includegraphics[width=0.54\textwidth]{figures/feynman_off_diagonal.pdf} \caption{\emph{Left}: Four magnon scattering. In EFT, the amplitude can be calculated as shown in Ref.~\cite{Hofmann:1998pp}. As shown in Ref.~\cite{PhysRevLett.111.017204}, it is the leading contribution to the magnon linewidth for $T\sim T_N$. For temperatures far below the spin wave mass, this term is Boltzmann suppressed. \emph{Right}: Feynman diagram for the $s$-channel of the process Eq.~\eqref{eqn:axion_photon_scattering} mediated by the axion term in the Lagrangian. The parametric dependence of the vertex factors is shown in red. This process is suppressed by two powers of $\alpha$ compared to the four magnon amplitude, Eq.~\eqref{eqn:magnon_amplitude}.} \label{fig:feynman} \end{figure} Reference~\cite{PhysRevLett.111.017204} showed that two-to-two magnon scattering is the dominant contribution to the linewidth above $\sim 10$ K in the antiferromagnets Rb$_2$MnF$_4$ and MnF$_2$ as measured by neutron scattering. The linewidth at 10 K due to this process is $\Gamma_m\approx \SI{10}{\mu eV}$, falling rapidly at lower temperatures. We will show how this behaviour arises below. Indeed, as noted in \cite{Bayrakci1926}, for $q \rightarrow 0$ and $T \rightarrow 0$, all scattering contributions to the magnon linewidth vanish. Ref \cite{Bayrakci1926} also find that this is true for scattering between the magnon and longitudinal spin fluctuations such as the axion. We find it useful to derive in some detail the scattering contribution to the linewidth, and demonstrate why it vanishes at low temperature, since this is the most well understood part of our loss model. The magnon modes obey a Boltzmann equation. Mode coupling via non-linearities induces an effective lifetime for any initial configuration. Mode coupling arises from the four-magnon amplitude: \begin{equation} \delta\theta (k_1)+\delta\theta(k_2)\longleftrightarrow \delta\theta (k_3)+\delta\theta(k_4)\, , \label{eqn:four_magnon_1} \end{equation} which has matrix element $\mathcal{M}(k_1,k_2,k_3,k_4)$, and is shown in Fig.~\ref{fig:feynman}. The state with momentum $k_1$ is the mode in the condensate of interest, $k_2$ is a thermal magnon. Magnons $k_3$ and $k_4$ are modes scattered out of the condensate, and thus losses. This matrix element appears in the collisional Boltzmann equation for the magnon distribution function $f_1\equiv f(k_1)$ as (see e.g. Ref.~\cite{2003moco.book.....D}): \begin{eqnarray} \frac{{\rm d}f_1}{{\rm d}t} &=& \int \prod_{i=2}^4{\rm d}\Phi_i (2\pi)^4\delta^{(3)}(k_1+k_2-k_3-k_4)\delta (\omega_1+\omega_2-\omega_3-\omega_4)\nonumber \\ &\,&|\mathcal{M}|^2[f_3f_4(1+f_1)(1+f_2)-f_1f_2(1+f_3)(1+f_4)]\, , \\ &=& -\int \frac{{\rm d}^3k_2}{(2\pi)^3}f_1f_2|v_1-v_2| \sigma\, , \label{eqn:boltzmann} \end{eqnarray} where ${\rm d}\Phi_i = \frac{d^3 k_i}{(2 \pi)^3}$ is the \emph {non-relativistic} phase space element for state with momentum $k_i$, the Dirac delta's enforce energy-momentum conservation, $k_i$ represents the 3-momentum of the ith particle, and the $f_i$ factors assume the particles are bosons. Ref.~\cite{PhysRevLett.111.017204} caution that when such integrals are evaluated numerically, one should be careful to include the Umklapp processes, related to conservation of crystal momentum.v We formulate the integral non-relativistically as the material picks out a preferred frame for the magnons. In the second line, the first term in the square brackets represents production of states $k_1,k_2$ (the inverse process in Eq.~\ref{eqn:four_magnon_1}), while the second term represents losses. In the last line we have assumed $f_3=f_4=0$ for unoccupied final states, and used the definition of the differential cross section (this structure is familiar from particle physics scattering theory~\cite{1995iqft.book.....P}). Ref.~\cite{LvovBook} derives an equivalent equation beginning from the LLG equation, which also shows this non-linear loss term explicitly in terms of the four-magnon amplitude. Eq.~\eqref{eqn:boltzmann} is the collisional Boltzmann equation, $\partial_t f_1 = C[f_1]$, where $C[f_1]$ is the scattering integral. Factoring out $f_1$ for the condensate, the scattering integral takes the form $C[f_1]\sim 1/\tau$ and we identify the relaxation time $\tau$ for the distribution function to change significantly from its initial state. This gives the result that: \begin{equation} \Gamma_{4m} =1/\tau\sim \langle\sigma v\rangle\, , \end{equation} where the angle brackets denote the thermal average, i.e. phase space integral with the thermal distribution $f_2$. Magnons can be described by EFT, as discussed in Appendix~\ref{appendix:eft_afmr}. The four magnon amplitude is given by the equivalent of the QCD pion amplitude evaluated around non-zero quark masses~\cite{Hofmann:1998pp}. \begin{multline} \mathcal{M} = \frac{1}{4 \sqrt{\omega_1 \omega_2 \omega_3 \omega_4}} \frac{v_m^4}{F_2^2} \lbrace \delta^{ab} \delta^{cd} \left( \frac{2}{v_m^2} \omega_1 \omega_2 -2 k_1 \cdot k_2 + m_m^2 \right) \\ + \delta^{ac} \delta^{bd} \left( - \frac{2}{v_m^2} \omega_1 \omega_3 +2 k_1 \cdot k_3 + m_m^2 \right) + \delta^{ad} \delta^{bc} \left( - \frac{2}{v_m^2} \omega_1 \omega_4 +2 k_1 \cdot k_4 + m_m^2 \right) \rbrace, \label{eqn:magnon_amplitude} \end{multline} where $a, b, c, d = 1, 2$ denote the magnon polarizations, $v_m$ is the magnon velocity and $m_m$ is the magnon mass. This is the amplitude appropriate to a non-relativistic normalization, with 1 particle per unit volume rather than the usual $2 \omega$ particles per unit volume in relativistic quantum mechanics. In this case, the cross section is related to the T-matrix above as~\cite{Hofmann:1998pp}: \begin{equation} d \sigma = \frac{|\mathcal{M}|^2}{v} (2 \pi)^4 \delta^4(k_1 + k_2 - k_3 - k_4) \frac{d^3 k_3}{(2 \pi)^3} \frac{d^3 k_4}{(2 \pi)^3}, \end{equation} where $v = |v_1 - v_2|$ is the relative velocity of the incoming particles. We integrate over $k_3$ and $k_4$ to obtain the total cross section for given incoming momenta $k_1$ and $k_2$: \begin{equation} \sigma(k_1,k_2) = \int \frac{d^3 k_3}{(2 \pi)^3} \frac{d^3 k_4}{(2 \pi)^3} d \sigma = \int \frac{d k_4}{(2 \pi)^3} d \Omega k_4^2\frac{| \mathcal{M}|^2}{v} (2 \pi) \delta(\omega_1 + \omega_2 - \omega_3 - \omega_4)) \bigg \rvert_{(k_1+k_2 - k_3 - k_4 = 0)}, \end{equation} where $\omega_4 = \sqrt{k_4^2 v_m^2 + m_m^2}$ and $\omega_4 = \sqrt{(k_1 + k_2 - k_4)^2 v_m^2 + m_m^2}$. At this point in the calculation, we might be tempted to move to the centre of mass frame. However, this would change the magnon velocity $v_m$, with the new magnon velocity depending on $\Omega$, leading to a magnon dispersion relation that depends on $\Omega$. Therefore, it is in our best interests to remain in the rest frame of the material. We thus obtain the differential cross section: \begin{equation} \frac{d \sigma}{d \Omega} = \frac{1}{(2 \pi)^2} \frac{1}{v} \frac{|\mathcal{M}|^2 k_4^2}{\frac{k_3}{\omega_3} + \frac{k_4}{\omega_4}}, \end{equation} where $k_3,\omega_3, k_4, \omega_4$ are defined by conservation of energy and momentum for a given $\Omega$. \\ Now let us consider the scaling of $\Gamma_{4m}$ with temperature $T$. We note first that the factor of $v$ in $\Gamma_{4m}$ is cancelled by the factor of $\frac{1}{v}$ in $\frac{d \sigma}{d \Omega}$. We will focus first on the scaling of the line widths measured in \cite{PhysRevLett.111.017204} at temperatures from $3$\,K to $0.8 T_N$ for magnons with momentum $k_1 = 0$ to $k_1 = q_ZB$ at the edge of the zone boundary. The contributions of $T$ to $\Gamma_{4m}$ are as follows: \begin{itemize} \item Thermal magnons have an energy set by $T$. We assume that $T \gtrsim m_m$, such that thermal magnons can be excited. We therefore take $\omega_2 \sim k_2 \sim T$. \item The scaling of the outgoing momenta with $T$ depends on the relative sizes of $T$ and $\omega_1$. The energy at the zone boundary in \cite{PhysRevLett.111.017204} is \SI{6.6}{\meV} for Rb\textsubscript{2}MnF\textsubscript{4} and \SI{6.3}{\meV} for MnF\textsubscript{2}, while the temperature ranges from $3\,\text{K} = \SI{0.26}{\meV}$ to $0.8\, T_N$, corresponding to \SI{2.6}{\meV} and \SI{4.6}{\meV} respectively. Therefore both cases where $T > \omega_1$ and cases where $\omega_1 > T$ are measured. When $T \gg \omega_1$, the temperature provides most of the energy in the scattering process and we have $k_3,\omega_3,k_4,\omega_4 \sim T$. When $T \ll \omega_1$, the energy of the damped magnon provides most of the energy in the scattering process and we have $k_3,\omega_3,k_4,\omega_4 \sim \omega_1$. \item The \emph{number} of thermal magnons also scales with $T$. Assuming that there is no significant mass gap at $k_2=0$ for the magnons considered in \cite{PhysRevLett.111.017204}, we have $\int d^3 k_2 f_2 \sim T^3$, as for a black body. \item We have also $\int d^3 k_3 d^3 k_4 \sim T^2$ when $T \gg \omega_1$ from the factor of $k_4^2$ in the phase space integral. \item As $T \gtrsim m_m$, the $\omega_1$ and $k_1$ terms in $\mathcal{M}$ dominate. Using the scalings above, this gives $\mathcal{M} \sim T^{-1/2}$. \end{itemize} Putting these elements together, we find $\Gamma_{4m} \sim T^3 T^2 T^{-1} = T^4$ for $\omega_1 \ll T$ and $\Gamma_{4m} \sim T^3 T^{-1} = T^2$ for $\omega_1 \gg T$. We can compare this prediction with the measured result in Figure 4 in \cite{PhysRevLett.111.017204}. For low magnon wavenumber $q$ (corresponding to low $\omega_1$, we have $\Gamma_{4m} \sim T^4$ as expected. As $q$ is increased, the scaling with $T$ decreases towards $\Gamma_{4m} \sim T^2$ as predicted. However, the measured $\Gamma_{4m} \sim T$ when $q=0$ case is not explained by this analysis. We would also expect that for temperatures much lower than the magnon mass, very few thermal magnons would be excited, and $\Gamma_{4m}$ would be exponentially suppressed. For a magnon mass $m_m \sim 1$ meV, this corresponds to $T < 10$ K. Starting from the Boltzman equation, we have argued that magnon-magnon scattering decays with $T$, reproducing the experimentally observed trends in \cite{PhysRevLett.111.017204}, and is then exponentially suppressed at temperatures below the magnon mass. The scattering contribution to the antiferromagnetic magnon linewidth is calculated analytically for several low $T$ regimes in \cite{PhysRevB.3.961}. This yields a power law fall off with $T$ in each case. We therefore conclude that, at low $T$, and particularly for temperatures below the magnon mass, the magnon scattering contribution to the linewidth is negligible. \subsubsection*{Axion-Photon Scattering, $\Gamma_{\gamma m}$} Scattering of magnons from thermal photons contributes to the magnon line-width $\Gamma_m$. This process is induced by the four particle amplitude\: \begin{equation} \delta\theta (k_1)+\gamma(k_2)\longleftrightarrow \delta\theta (k_3)+\gamma(k_4)\, , \label{eqn:axion_photon_scattering} \end{equation} i.e. magnon/AQ-photon scattering mediated by the Chern-Simons interaction, Eq.~\eqref{eqn:chern_simons}. Inspecting the Feynman diagram, Fig.~\ref{fig:feynman} (right panel), this amplitude is suppressed by two powers of the fine structure constant $\alpha$ with respect to the four magnon amplitude, and so we do not expect magnon-photon scattering to be significant compared with magnon-magnon scattering. The inverse process, scattering thermal magnons from the electric field, is similarly suppressed, and thus likely to be subdominant to conductive losses to $\vc{E}$. \subsubsection*{Axion Lifetime, $\Gamma_{m\gamma\gamma}$} The Chern-Simons interaction leads to direct decay of an AQ into two photons. The contribution to the width is: \begin{equation} \Gamma_{m\gamma\gamma} = \frac{\alpha^2}{256\pi^3}\frac{m_s^3}{\makeAQ{f}^2} = \SI{6.7e-22}{\eV}\left(\frac{m_s}{\text{meV}}\right)^3\left(\frac{\SI{100}{eV}}{\makeAQ{f}}\right)^2\, , \end{equation} corresponding to a lifetime on the order of months. This process can be safely neglected compared to all other scales in the problem. \subsubsection*{Off-Diagonal Losses} The off-diagonal terms in the loss correspond to loss terms of the form $\frac{d \phi_k}{d t} \sim \langle A_k \rangle$ and $\frac{d A_k}{d t} \sim \langle \phi_k \rangle$. As we generically expect $\frac{d \phi_k}{d t} \sim \langle \phi_k \rangle$ and $\frac{d A_k}{d t} \sim \langle A_k \rangle$, these will all be of the form: \begin{equation} \frac{d \phi_k}{d t} \sim \langle A_k \rangle \langle \phi_k \rangle, \end{equation} \begin{equation} \frac{d A_k}{d t} \sim \langle A_k \rangle \langle \phi_k \rangle. \end{equation} These off-diagonal loss terms are therefore not present at linear order in the perturbations $A_k$ and $\phi_k$. \subsubsection*{Impurities and Domains, $\Gamma_{\rm cryst.}$} At low temperatures, the dominant contribution to the magnon linewidth in Ref.~\cite{PhysRevLett.111.017204} is attributed to scattering of magnons off magnetic domains and crystal impurities, which is $T$-independent . In the simplest picture, scattering from magnetic domains leads to a lifetime: \begin{equation} \tau \sim \frac{L_{\rm mag.}}{2v(q)}\, , \label{eqn:naive_domain_scattering} \end{equation} where $v(q)$ is the velocity of the mode with momentum $q$, and $L_{\rm mag.}$ is the size of the domain. The Ref.~\cite{PhysRevX.9.041038} crystals of \MnBiTe{}{2}{4}\, have estimated magnetic domain size $L_{\rm mag.}\sim 1 \, \mu{\rm m}$. We require the axion-polariton to propagate at least through the thickness, $d$, of the sample, and thus magnetic domains appear to strongly affect the skin depth and resonance width of axion-quasiparticle dominated polaritons in the limit $d\gg L_{\rm mag.}$. However, in the $q\to0$ limit the magnon wavelength exceeds the size of a domain and Eq.~\eqref{eqn:naive_domain_scattering} ceases to apply. Furthermore we consider the limit $v_s=0$ and ignore the magnon propagation compared to the electric field. It is currently unknown how scattering from domains will affect such long wavelength mixed modes. On one hand, it may be that the domain walls appear as small scale fluctuations that decouple from large wavelength modes. Conversely, given that the domain walls disrupt the short range interactions that support the small $q$ magnons it is possible that they have non-trivial effects despite the scale separation. A second $T$-independent contribution to the linewidth, which is expected to remain in the $q\to0$ limit, is due to scattering from impurities. This was accounted for in Ref.~\cite{PhysRevLett.111.017204} with the simple phenomenological model for the impurity density: \begin{equation} \Gamma_{\rm cryst.} = \left(\frac{\delta L}{L}\right)\omega(k)\, \label{eqn:impurity_lineiwdth} \end{equation} where $\delta L$ is the lattice constant, and $L$ is the spacing between impurities, thus $\delta L/L$ is the average number of lattice sites between impurities. The model Eq.~\eqref{eqn:impurity_lineiwdth} accounts in the same manner for magnetic and crystal impurities. In Ref.~\cite{PhysRevX.9.041038} the crystal impurities occur on the same scale as the magnetic domains, $L_{\rm cryst.}\sim 1 \, \mu{\rm m}$, while $\delta L\sim (V_{\rm u.c.})^{1/3}\sim 6$~\AA\, leading to: \begin{equation} \Gamma_{\rm cryst.} = 7\times 10^{-4}\omega\left(\frac{\delta L}{6\text{ \AA}}\right)\left(\frac{1 \,\mu{\rm m}}{L_{\rm cryst.}}\right)\, . \end{equation} We estimate that crystal impurity scattering is the dominant contribution to the AQ linewidth in the regime of interest. Given the lack of conclusive calculations or measurements in the literature (or even, as far as we can tell, a detailed model), we regard this as a question best resolved by experimental studies. Indeed, an understanding of the dynamics of small $q$ magnons and axion-polaritons is an interesting off-shoot of the studies proposed in Section~\ref{sec:AQ_calculations}. However, given the importance of this linewidth contribution to our proposed dark matter search, we must adopt a reference value. We adopt the range given in Table~\ref{tab:losses}, $\Gamma_{\rm cryst.}\in [10^{-4},10^{-3}]\,$meV, corresponding to impurity separations of order $1\,\mu$m. \section{Discovering the Axion Quasiparticle}\label{sec:AQ_calculations} \begin{figure} \hspace{-0.5in} \center \includegraphics[width=1.0\textwidth]{figures/transmission_panels.pdf} \caption{Proposed transmission experiment to detect the axion-polariton. \emph{Left:} THz source power spectrum. \emph{Centre:} Transmission experiment concept. A source field, which propagates along the negative $z$-direction is incident on a TMI. An external $B$-field $B_e$ is applied parallel to the TMI surface. If AQs exist in the material, the dispersion relation has a gap where no propagating modes exist, thus altering the spectrum of the transmitted radiation. \emph{Right:} Theoretical transmission spectrum. The green line corresponds to the case where a dynamical AQ is present. The gap is indicated by the vertical green dotted lines. The width on resonance, $\Gamma_{\rm res}$, serves to measure the polariton losses.} \label{fig:ATR} \end{figure} One of the methods proposed by Ref.~\cite{2010NatPh...6..284L} to detect the presence of AQs in TMIs was total-reflectance measurement, and idea we explore further here. In the following we show to compute the transmission function of TMIs using axion electrodynamics. The transmission function is shown to display a gap, leading to total reflectance. Furthermore, by using a wideband THz source, such a measurement can also determine the axion-polariton resonant frequencies, and loss parameters. The concept of this \emph{THz transmission spectroscopy} measurement is shown in Fig.~\ref{fig:ATR}. Similar measurements have been performed on antiferromagents (e.g. Ref.~\cite{2017PhRvL.119v7201L}), which demonstrate AFMR and determine the magnon linewidth (losses on resonance) for an electromagnetic source.\,\footnote{Crucially, for our purposes, such a measurement uses precisely the same physics (oscillating $E$-field source) as occurs for dark axion detection. This is in contrast to neutron scattering of antiferromagnets (e.g. Ref.~\cite{PhysRevLett.111.017204}), which determines the linewidth for a different excitation mechanism.} Such a measurement has not to date been performed on any AQ candidate material. \subsection{Axion Electrodynamics and Boundary Conditions}\label{sec:boundary_conditions} In this section, we review the axion-Maxwell equations for TMIs. We then derive a one-dimensional model as well as the correct interface conditions for all fields involved. Based on the one-dimensional model, we compute the reflection and transmission coefficients for incoming THz~radiation. \subsubsection{General formulation}\label{sec:Quasiparticle_Photon_mixing_General} The macroscopic axion-Maxwell equations for a three-dimensional TMI are~\cite{2010NatPh...6..284L} \begin{eqnarray} \nabla\cdot \vc{D}&=&\rho_f-\frac{\alpha}{\pi}\nabla(\safemaths{\delta\Theta}+\safemaths{\Theta^0})\cdot\vc{B} \, ,\label{GaussE}\\ \nabla\times\vc{H}-\partial_t\vc{D}&=&\vc{J}_f+\frac{\alpha}{\pi} \, (\vc{B}\partial_t(\safemaths{\delta\Theta}+\safemaths{\Theta^0})-\vc{E}\times\nabla( \safemaths{\delta\Theta}+\safemaths{\Theta^0})) \, ,\label{Ampere}\\ \nabla\cdot\vc{B}&=&0 \, , \label{GaussB}\\ \nabla\times\vc{E}+\partial_t\vc{B}&=&0 \, ,\label{Faraday}\\ \partial_t^2\safemaths{\delta\Theta}-v_i^2\partial_i^2\safemaths{\delta\Theta}+\makeAQ{m}^2\safemaths{\delta\Theta}&=&\Lambda\vc{E}\cdot\vc{B}\label{KleinGordon} \, , \end{eqnarray} where $\safemaths{\delta\Theta}$ is the pseudoscalar axion quasiparticle~(AQ) field, $\safemaths{\Theta^0}\in[0,\pi]$ a constant, $\makeAQ{f}^2$ the AQ decay constant, $v_i$~(with $i=x,y,z$) is the spin wave velocity, $\makeAQ{m}$ the spin wave mass, $\vc{E}$ is the electric field, $\vc{B}$ the magnetic flux density, $\vc{D}$ the displacement field, $\vc{H}$ the magnetic field strength, $\rho_f$ the free charge density, and $\vc{J}_f$ the free current density, which fulfill the continuity equation ${\nabla \cdot \vc{J}_f+\dot{\rho}_f = 0}$ as in usual electrodynamics. In what follows we often use the linear constitutive relations \begin{eqnarray} \vc{D}=\epsilon\vc{E} \text{ and } \vc{H}=\mu^{-1}\vc{B}, \label{eq:constitutive_equations} \end{eqnarray} where $\epsilon$ and $\mu$ are the scalar permittivity and permeability, respectively. Note that it is important to include the $\safemaths{\Theta^0}$ term in the equations above: while $\safemaths{\Theta^0}$ is some constant in the TMI, it is always zero in vacuum. Applying the nabla operator can therefore give a delta function at the boundaries of the TMI, i.e.\ a boundary charge term. Equations~\eqref{GaussE} and~\eqref{Ampere} can be written such that the terms including the dynamical AQ field $\safemaths{\delta\Theta}$ can be interpreted as additional contributions to polarization and magnetization, i.e.\ \begin{eqnarray} \nabla\cdot \vc{D}_\Theta&=&\rho_f \, ,\label{GaussE_pol}\\ \nabla\times\vc{H}_\Theta-\partial_t\vc{D}_\Theta&=&\vc{J}_f\, ,\label{Ampere_pol}\\ \nabla\cdot\vc{B}&=&0\,,\label{GaussB_pol}\\ \nabla\times\vc{E}+\partial_t\vc{B}&=&0\label{Faraday_pol}\, , \end{eqnarray} where we define \begin{eqnarray} \vc{D}_\Theta=\vc{D}+\frac{\alpha}{\pi} \, (\safemaths{\Theta^0}+\safemaths{\delta\Theta}) \, \vc{B}\, , \\ \vc{H}_\Theta = \vc{H} - \frac{\alpha}{\pi} \, (\safemaths{\Theta^0}+\safemaths{\delta\Theta}) \, \vc{E} \, . \end{eqnarray} To derive interface conditions for the electromagnetic fields, we consider two domains labeled~$1$ and~$2$. Both domains have different $\epsilon$, $\mu$, and $\safemaths{\Theta^0}$. Transforming Eqs.~\eqref{GaussE_pol}--\eqref{Faraday_pol} into their integral representation, and applying Gauss's~(Stokes') theorem to an infinitesimal volume~(surface) element, leads to the following interface conditions for the electromagnetic fields: \begin{eqnarray} \vc{n}\times (\vc{E}_2-\vc{E}_1)&=&0\,,\label{eq:InterfaceE}\\ \vc{n}\cdot (\vc{D}_{\Theta,2}-\vc{D}_{\Theta,1})&=&\sigma_S\,,\label{eq:InterfaceD}\\ \vc{n}\cdot (\vc{B}_{2}-\vc{B}_{1})&=&0\,,\label{eq:InterfaceB}\\ \vc{n}\times (\vc{H}_{\Theta,2}-\vc{H}_{\Theta,1})&=&\vc{J}_S\,,\label{eq:InterfaceH} \end{eqnarray} where $\sigma_S$ and $\vc{J}_S$ are free surface charge and current densities~(both assumed to be zero in what follows) and $\vc{n}$ is a unit vector pointing from domain~1 to domain~2. It is important to stress that Eqs.~\eqref{eq:InterfaceE}--\eqref{eq:InterfaceH} are interface conditions, not boundary conditions. As described above, interface conditions follow from the differential equation in their integral form. In contrast, boundary conditions can be applied at the boundary domains for which a partial differential equation is solved, and do not follow from the integral representation of the differential equation. This is also the reason why the interface conditions are specified only for the electromagnetic fields, and not for the dynamical axion field $\safemaths{\delta\Theta}$. In this section we only consider the case of a TMI surrounded by a non-topological material/vacuum with $\safemaths{\Theta^0}=0$. We then only need to impose interface conditions for the electromagnetic fields; while they exist in both the TMI and the adjacent region, the dynamical AQ only exists in the TMI. The AQ is therefore only subject to boundary conditions. We revisit and deepen this discussion in Section~\ref{sec:transmission}, in the context of calculating reflection and transmission coefficients for a layer of TMI surrounded by vacuum. \subsubsection{One dimensional model}\label{sec:Quasiparticle_Photon_mixing_OneDimensionalModel} To develop a one-dimensional model, we assume that all fields only depend on the $z$-coordinate and time. Furthermore, all fields are taken to be transverse fields, i.e.\ $B_z=H_z=D_z=E_z=0$. Then, in a domain with constant $\safemaths{\Theta^0}$, Eqs.~\eqref{GaussE}--\eqref{KleinGordon} reduce to: \begin{eqnarray} \partial_z\begin{pmatrix}-H_y\\H_x\end{pmatrix}-\partial_t\begin{pmatrix} D_x\\ D_y\end{pmatrix}-\vc{J}_f&=&\frac{\alpha}{\pi}\Bigg[\begin{pmatrix}B_x\\B_y\end{pmatrix}\partial_t\safemaths{\delta\Theta}+\begin{pmatrix}-E_y\\E_x\end{pmatrix}\partial_z\safemaths{\delta\Theta}\Bigg]\, ,\label{Ampere_1Df}\\ \partial_z\begin{pmatrix}-E_y\\E_x\end{pmatrix}+\partial_t\begin{pmatrix}B_x\\B_y\end{pmatrix}&=&0\, ,\label{Faraday_1Df}\\ \partial_t^2\safemaths{\delta\Theta}-v_z^2\partial_z^2\safemaths{\delta\Theta}+\makeAQ{m}^2\safemaths{\delta\Theta}&=&\Lambda(E_xB_x+E_yB_y)\label{KleinGordon_1Df}\, , \end{eqnarray} where we assumed that no free static charges exist, i.e.\ $\rho_f=0$.\footnote{This does not mean that $\vc{J}_f$ vanishes. Since $\rho_f$ and $\vc{J}_f$ are connected via a continuity equation, $\vc{J}_f$ only has to fulfil $\nabla\cdot\vc{J}_f=0$ if $\rho_f=0$.} The interface conditions~\eqref{eq:InterfaceD} and~\eqref{eq:InterfaceB} are trivially fulfilled in the one-dimensional model since the $z$-components of all electromagnetic fields vanish, and $\vc{n}=\hat{\vc{e}}_z$. \subsubsection{Linearization}\label{sec:Quasiparticle_Photon_mixing_Linearization} The sources in Eqs.~\eqref{Ampere_1Df} and~\eqref{KleinGordon_1Df} are non-linear and, therefore, finding analytic solutions is in general not possible. However, we are interested in the special case of solving the equations in presence of a strong, static external $B$-field $\vc{B}_e=B_e\hat{\vc{e}}_y$. We may therefore separate the total $B$-field into a static and a dynamical part, i.e.\ $\vc{B}\rightarrow \vc{B}_e+ \vc{B}(\vc{x},t)$. Similarly, the free current $\vc{J}_f$ can be split into a part which sources $\vc{B}_e$, and an additional reaction current, i.e.\ $\vc{J}_f\rightarrow \vc{J}_{f0} + \vc{J}_f$. Physically, the reaction current describes losses of the electromagnetic fields in the materials. Note that $\vc{B}_e$ fulfils $\nabla\times\vc{H}_e=\vc{J}_{f0}$, and $\vc{J}_{f0}$ satisfies the continuity equation $\nabla\cdot\vc{J}_{f0}=0$. With these assumptions the resulting equations are: \begin{eqnarray} \partial_z\begin{pmatrix}-H_y\\H_x\end{pmatrix}-\partial_t\begin{pmatrix} D_x \, \\ D_y\end{pmatrix}-\sigma\begin{pmatrix}E_x\\E_y\end{pmatrix}&=&\frac{\alpha}{\pi}\Bigg[\begin{pmatrix}B_x\\B_{e}\end{pmatrix}\partial_t\safemaths{\delta\Theta}+\begin{pmatrix}-E_y\\E_x\end{pmatrix}\partial_z\safemaths{\delta\Theta}\Bigg],\label{Ampere_1Dl1}\\ \partial_z\begin{pmatrix}-E_y\\E_x\end{pmatrix}+\partial_t\begin{pmatrix}B_x\\B_y\end{pmatrix}&=&0 \, ,\label{Faraday_1Dl1}\\ \partial_t^2\safemaths{\delta\Theta}-v_z^2\partial_z^2\safemaths{\delta\Theta}+m^2\safemaths{\delta\Theta}&=&\Lambda(E_xB_x+E_yB_{e})\label{KleinGordon_1Dl1} \, , \end{eqnarray} where we substitute the reaction current $\vc{J}_f$ with the loss term $\sigma\vc{E}$~(Ohm's law). When deriving Eqs.~\eqref{Ampere_1Dl1} and \eqref{KleinGordon_1Dl1}, we used that the external field $B_e$ is much larger than the $y$-component of the reaction $B$-field, $B_y$. Note that it is straightforward to include an external source field in $\vc{E}$ and $\vc{B}$. Let us now justify why the non-linear terms on the right-hand side in Eqs.~\eqref{Ampere_1Dl1} and~\eqref{KleinGordon_1Dl1} can be linearized. Consider the two distinct cases where a strong external laser field is parallel or orthogonal to the static external $B$-field: first, assume that the external laser field is parallel to $\vc{B}_e = B_e\hat{\vc{e}}_y$. Note that \begin{eqnarray} B_e\frac{\partial_t\safemaths{\delta\Theta}}{\partial_z \safemaths{\delta\Theta}}\approx \SI{3e4}{\frac{\V}{\m}} \, \left(\frac{B_e}{\SI{1}{\tesla}}\right) \, , \label{eq:waek_laser_condition} \end{eqnarray} where we approximated $\frac{\partial_t\safemaths{\delta\Theta}}{\partial_z \safemaths{\delta\Theta}}$ with a typical spin wave velocity, which is on the order of $v_s=10^{-4}$~\cite{Pickart}. Typical THz sources have a power around $P = \SI{e-5}{\watt}$, which leads to $E_y = \SI{27}{\frac{\V}{\m}}$ for a beam surface area of $\SI{10}{\mm^2}$. Equation~\eqref{eq:waek_laser_condition} is therefore fulfilled for sufficiently large external $B$-fields. With these considerations we see directly that $B_e\partial_t\safemaths{\delta\Theta}\gg \partial_z\safemaths{\delta\Theta} E_x$ since $E_x$ is even smaller than $E_y$. It follows that the non-linear term in the second component on the right-hand side in Eq.~\eqref{Ampere_1Dl1} can be neglected. Next, we consider the two source~terms in the first equation in the reft-hand side of Eq.~\eqref{Ampere_1Dl1}. The term $E_y\partial_z\safemaths{\delta\Theta}$ dominates over the term $B_x\partial_t\safemaths{\delta\Theta}$ since $E_y$ contains the external laser source. However, the large source~term $B_e\partial_t\safemaths{\delta\Theta}$ in the term in Eq.~\eqref{Ampere_1Dl1} is larger than the dominating source in the first term: $B_e\partial_t\safemaths{\delta\Theta} \gg E_y\partial_z\safemaths{\delta\Theta}$, cf.\ Eq.~\eqref{eq:waek_laser_condition}. From Eq.~\eqref{Faraday_1Dl1} it is clear that $\partial_tB_y=-\partial_zE_x$ and therefore due to $H_y\sim B_y$ the source of the first component in~\eqref{Ampere_1Dl1} sources the $E_y$-component. Therefore we can ignore the non-linear sources in the first equation in~\eqref{Ampere_1Dl1} and focus only on the $E_y$-component, e.g.\ the large linear source in the second equation in~\eqref{Ampere_1Dl1}. The non-linear term $E_xB_x$ in Eq.~\eqref{KleinGordon_1Dl1} can also be neglected since it is much smaller than the term $E_yB_{e}$, which includes two external fields. Second, in the case that the external laser field is orthogonal to $\vc{B}_e=B_e\hat{\vc{e}}_y$, the dominating source of the Klein-Gordon equation, cf.\ Eq.~\eqref{KleinGordon_1Dl1} is the linear term $E_yB_e$. Note that the fields $B_x$ and $E_y$ can only be induced by polarization rotation and are both on the order of $\frac{\alpha}{\pi}$. However, since $\SI{3e8}{\frac{\V}{\m}} \, \left(\frac{B_e}{\SI{1}{\tesla}}\right) \gg E_x$, we can linearize the source term of the Klein-Gordon, cf.\ Eq.~\eqref{KleinGordon_1Dl1}, i.e. $E_x B_x \ll E_y B_e$. The second component of Eq.~\eqref{Ampere_1Dl1} can be linearized because any available THz~lasers has an amplitude that is below the limit in Eq.~\eqref{eq:waek_laser_condition}. The first component of Eq.~\eqref{Ampere_1Dl1} can also be linearized, i.e.\ the source terms are neglected since both source terms include electromagnetic fields that are only generated via polarization rotation. In summary, whether an external laser $E$-field is parallel or orthogonal to $\vc{B}_e$, the equations can be linearized, and they reduce to: \begin{align} \partial_z^2 E_x -n^2\partial_t^2 E_x-\mu\sigma\partial_t E_x &= 0 \, ,\label{eq:eqofmotionEx}\\ \partial_z^2E_y-n^2\partial_t^2 E_y-\mu\sigma\partial_t E_y &= \frac{\alpha}{\pi} \mu B_e\partial_t^2\safemaths{\delta\Theta} \, ,\label{eq:eqofmotionEy}\\ \partial_t^2\safemaths{\delta\Theta}-v_z^2\partial_z^2\safemaths{\delta\Theta}+\makeAQ{m}^2\safemaths{\delta\Theta} &= \Lambda E_yB_{e} \, ,\label{eq:eqofmotiondelTheta} \end{align} where we explicitly use the linear constitutive relations, cf.\ Eq.~\eqref{eq:constitutive_equations}. Furthermore the refractive index is given by \begin{eqnarray} n^2=\epsilon\,\mu\label{eq:refractiveIndex} \, . \end{eqnarray} The material properties $\mu$, $\epsilon$, $\makeAQ{m}$, $\sigma$, $\safemaths{\Theta^0}$, $v_z$, and $\Lambda$ are constants in the equations of motion. Regions with different material properties are linked by using interface conditions for the fields. The corresponding interface conditions are given in Eqs.~\eqref{eq:InterfaceE} and~\eqref{eq:InterfaceH} with $\vc{n}=\hat{\vc{e}}_z$. Equation~\eqref{eq:InterfaceE} remains unchanged after linearization, while the definition of $\vc{H}_\Theta$ in Eq.~\eqref{eq:InterfaceH} changes due to the linearization to $\vc{H}_\Theta=\vc{H}+\frac{\alpha}{\pi} \safemaths{\Theta^0} \vc{E}$. \subsubsection{Losses}\label{sec:Quasiparticle_Photon_mixing_Losses} Losses can appear in the linearized equations of motion~\eqref{eq:eqofmotionEx}--\eqref{eq:eqofmotiondelTheta} in case of a finite conductivity~$\sigma$. However, magnon losses, and losses that mix between magnons and photons, are not included. We now generalize Eqs.~\eqref{eq:eqofmotionEx}--\eqref{eq:eqofmotiondelTheta} to include all possible types of losses. The equations then read: \begin{equation} \mat{K}\partial_t^2 \vc{X} - \mat{\Gamma}\partial_t\vc{X} + \mat{M}\vc{X} = 0 \, , \label{eq:eom_with_losses} \end{equation} where we define \begin{eqnarray} \vc{X}=\begin{pmatrix} E_x\\E_y\\\safemaths{\delta\Theta} \end{pmatrix} \, ,~~\mat{K}&=&\begin{pmatrix} 1&0&0\\ 0&1&\frac{\alpha}{\pi}\frac{ B_e}{\epsilon}\\ 0&0&1 \end{pmatrix} \, ,~~\bm{\Gamma}=\begin{pmatrix} \Gamma_\rho&0&0\\ 0&\Gamma_\rho&\Gamma_{\times,1}\\ 0&\Gamma_{\times,2}&\Gamma_m \end{pmatrix},\nonumber\\\mat{M}&=&\begin{pmatrix} \frac{k^2}{n^2}&0&0\\ 0&\frac{k^2}{n^2}&0\\ 0&-\Lambda B_e&v_z^2k^2+\makeAQ{m}^2 \end{pmatrix} \, , \label{eq:AQ_P_mixing_M_G_X_def} \end{eqnarray} and where $\Gamma_\rho=\sigma/\epsilon$ is the photon loss, $\Gamma_m$ is the equivalent loss for magnons, and $\Gamma_{\times,1/2}$ are mixed losses that can arise when photons and magnons interact. We retain these for the most general treatment, and set them to zero later. Note that not all $\Gamma$s have the same mass dimension since $[\Gamma_\rho]=[\Gamma_m] =1$, while $[\Gamma_{\times,1}]=3$ and $[\Gamma_{\times,2}]=-1$. The approach also gives the possibility to define different refractive indices $n$ and photon losses $\Gamma_\rho$ for the $E_x$ and $E_y$ components. However, these effects can only become important when polarization rotation effects are discussed in detail. In the following, polarization rotation effect are computed, however they are not discussed at a level of detail, such that including different refractive indices for different polarizations would not change the results significantly. The interface conditions~\eqref{eq:InterfaceE}--\eqref{eq:InterfaceH} remain the same in the presence of losses, because it is assumed that all losses are bulk losses. \FloatBarrier \subsection{Transmission and Reflection Coefficients}\label{sec:transmission} The presence of an AQ leads to a gap in the dispersion relation, which does not include any propagating modes. Based on this, Li et al.~\cite{2010NatPh...6..284L} proposed a transmission measurement~(cf.\ Fig.~\ref{fig:ATR}) to determine the band gap in a TMI polariton spectrum, opened by the presence of the AQ (cf.\ Fig.~\ref{fig:Disp_relat_vz_zero}). We now compute the transmission and reflection coefficients, and we demonstrate how to experimentally determine the parameters of interest -- in particular the relevant terms of the loss matrix~$\mat{\Gamma}$. \subsubsection{Solution of linearized equations}\label{sec:AQ_P_mixing_solutions} Our strategy for solving the linearized equations is as follows: we solve the equations for each spatial domain of constant material properties. We then apply the appropriate interface conditions to match the solutions in the different domains. \paragraph{Lossless case ($\boldsymbol{\Gamma = 0}$).} The dispersion relation for the $E_x$-component, see Eq.~\eqref{eq:eqofmotionEx}, is the usual photon dispersion relation: \begin{eqnarray} k^2 = n^2\omega^2 \equiv \safemaths{k_p}^2 \, . \label{eq:PhotonDispersion_withoutLosses} \end{eqnarray} The $E_y$-component mixes with the AQ and, in the $v_z = 0$ case, we find a typical polariton dispersion~\cite{Mills_1974,2010NatPh...6..284L}: \begin{equation} \omega^2_{\pm}=\frac{1}{2}\Big[\omega_\text{\tiny LO}^2+\frac{k^2}{n^2}\Big]\pm \frac{1}{2}\Big[\big(\omega_\text{\tiny LO}^2 - \frac{k^2}{n^2}\big)^2+4b^2\frac{k^2}{n^2}\Big]^{1/2} \, , \label{eq:dispersion_om_vz0} \end{equation} where we have defined \begin{eqnarray} b^2 \equiv\frac{\alpha}{\pi} \frac{\Lambda B_e^2}{\epsilon},\label{eq:AQ_photon_mixing_bDef}\\ \omega_\text{\tiny LO}^2 \equiv b^2 + \makeAQ{m}^2 \, . \end{eqnarray} The case $v_z\neq 0$ is discussed later since $v_z$ is on the order of the spin wave velocity $10^{-4}$ and therefore the expected effect is small. \begin{figure} \centering \includegraphics[width=0.49\textwidth]{figures/Maxwell_axion_and_Boundaries/dispersion_rel_omega_SI_vz=0.pdf} \includegraphics[width=0.49\textwidth]{figures/Maxwell_axion_and_Boundaries/dispersion_rel_k_SI_vz=0.pdf} \caption{Polariton dispersion relation, arising from the mixing of AQs and photons for a spin wave velocity $v_z=0$. \defaultSetupTMI. The external $B$-field is $B_e = \SI{2}{\tesla}$\xspace. The left panel shows the $\omega_{\pm}$ mode, which has a bandgap between $\makeAQ{m}$ and $\omega_\text{\tiny LO}$ (horizontal lines). The right panel illustrates the inverse of the dispersion relation for~$k$. Inside the bandgap (vertical lines), $k$ is only imaginary, and hence no propagating modes exist.} \label{fig:Disp_relat_vz_zero} \end{figure} We show $\omega_{\pm}$ as a function of the wave number~$k$ in the left panel of Fig.~\ref{fig:Disp_relat_vz_zero}. The horizontal black lines indicate the gap between $\makeAQ{m}$ and $\omega_\text{\tiny LO}$, where total reflection is expected. The resulting frequencies for $\makeAQ{m}$ and $\omega_\text{\tiny LO}$ are in the THz regime what makes clear why THz sources are needed to probe the gap in the dispersion relation. $\omega_+$ converges for large $k$ to a photon dispersion (dashed blue line). $\omega_-$ has for small $k$ an almost photon-like dispersion $\omega_-=\frac{k}{n}\frac{m}{\sqrt{b^2+m^2}}$ (dashed red line). Inverting Eq.~\eqref{eq:dispersion_om_vz0} gives: \begin{equation} k^2 = n^2\omega^2\Big[1-\frac{b^2}{\omega^2-\makeAQ{m}^2}\Big] \equiv \makeAQ{k}^2\equiv n_\Theta^2\omega^2\, . \label{eq:dispersion_k_vz0} \end{equation} We show $k$ as a function of $\omega$ in the right panel of Fig.~\ref{fig:Disp_relat_vz_zero}. In the limit of $b\rightarrow 0$, Eq.~\eqref{eq:dispersion_k_vz0} becomes the usual photon dispersion relation. For $\omega^2$ we have two solutions, while the solution for $k^2$ can be described by a single function. Inside the bandgap, $k^2$ is negative, thus $k$ is purely imaginary, and no propagating mode is present. In the following section it is explicitly shown that this leads to total reflection and zero transmission. The most general ansatz for the field evolution in a TMI medium are \begin{eqnarray} E_x(z)&=&\hat{E}^{+}_x e^{i \safemaths{k_p} z}+\hat{E}^{-}_x e^{-i \safemaths{k_p} z} \, , \label{eq:vz0_ExGeneralSol}\\ E_y(z)&=&\hat{E}^{+}_y e^{i\makeAQ{k} z}+\hat{E}^{-}_y e^{-i\makeAQ{k} z} \, ,\label{eq:vz0_EyGeneralSol}\\ \safemaths{\delta\Theta}(z)&=&\delta\hat{\Theta}^{+} e^{i\makeAQ{k} z}+\delta\hat{\Theta}^{-} e^{-i\makeAQ{k} z} \, ,\label{eq:vz0_DelThetaGeneralSol} \end{eqnarray} where we omitted the time dependence $e^{-i\omega t}$ in each line. After plugging the solutions into the equations of motion, cf.\ Eq.~\eqref{eq:eom_with_losses} the following relations are obtained: \begin{equation} \delta\hat{\Theta}^{\pm} = \Theta_E\hat{E}^{\pm}_y\, , \quad \Theta_E=\frac{\Lambda B_e}{\makeAQ{m}^2 - \omega^2} \, , \label{eq:vz0_relation_Theta}\\ \end{equation} or, equivalently, \begin{equation} \hat{E}^{\pm}_y = E_\Theta\delta\hat{\Theta}^{\pm}\, , \quad E_\Theta=-\frac{\alpha}{\pi}\frac{\mu\omega^2 B_e}{\safemaths{k_p}^2-\makeAQ{k}^2} \, .\label{eq:vz0_relation_Ey} \end{equation} In the following, the relations in Eq.~\eqref{eq:vz0_relation_Theta} are used to reduce the number of unknowns in the ansatz~\eqref{eq:vz0_DelThetaGeneralSol}: \begin{eqnarray} \safemaths{\delta\Theta}(z)&=&\Theta_E \hat{E}^{+}_y e^{i\makeAQ{k} z}+\Theta_E \hat{E}^{-}_y e^{-i\makeAQ{k} z}.\label{eq:vz0_DelThetaGeneralSol_reduced} \end{eqnarray} The remaining constants $\hat{E}_y^\pm$ can be determined by using the interface conditions~(explicitly shown in Section~\ref{sec:AnalogueAxionPhoton_MatrixFormalism}). The AQ field $\safemaths{\delta\Theta}$ is completely determined, cf.\ Eq.~\eqref{eq:vz0_DelThetaGeneralSol_reduced}, and no boundary conditions for $\safemaths{\delta\Theta}$ have to be applied when, for example, a layer of TMI surrounded by vacuum is considered. It will become clear in the following that this is a consequence of the $v_z = 0$ limit. Note that the relations in Eq.~\eqref{eq:vz0_relation_Ey} could have also been used to reduce the constants in Eq.~\eqref{eq:vz0_EyGeneralSol}. However, a short calculation reveals that this would result in the same outcome, regardless whether the relations in Eq.~\eqref{eq:vz0_relation_Theta} or~\eqref{eq:vz0_relation_Ey} was used to reduce the constants. A finite spin wave velocity, $v_z\neq 0$, leads a slightly modified dispersion relation: \begin{equation} \omega^2_{\pm}=\frac{1}{2}\Big[\omega_\text{\tiny LO}^2+k^2(v_z^2+\frac{1}{n^2})\Big]\pm \frac{1}{2}\Big[\big(\omega_\text{\tiny LO}^2+k^2(v_z^2-\frac{1}{n^2})\big)^2+4b^2\frac{k^2}{n^2}\Big]^{1/2}. \label{eq:vz_nonzero_omega} \end{equation} Equation~\eqref{eq:vz_nonzero_omega} is not a typical polariton dispersion relation, since the sign of~$v_z$ under the square root is positive, not negative. The dispersion relation for $\omega_\pm$ from Eq.~\ref{eq:vz_nonzero_omega} is shown in the left panel of Fig.~\ref{fig:Disp_relat_vz_Nonzero}, where we used an unrealistically large vale of $v_z = 0.01$ for illustrative purposes. Typical values for $v_z$ are on the order of~\num{e-4}. A~non-zero value of $v_z$ leads to a gap-crossing of the $\omega_-$ mode. However, due to the smallness of the spin wave velocity compared to the speed of light, the gap crossing happens at large values of the wave number~$k$. \begin{figure} \centering \includegraphics[width=0.49\textwidth]{figures/Maxwell_axion_and_Boundaries/dispersion_rel_omega_SI_vzNonZero.pdf} \includegraphics[width=0.49\textwidth]{figures/Maxwell_axion_and_Boundaries/dispersion_rel_k_SI_vzNonZero.pdf} \caption{Dispersion relation for a non-zero spin wave velocity of~$v_z = 0.01$. This exaggerated value was chosen because for realistic value of $10^{-4}$ the effect of band crossing of the $+$~mode is not visible. \defaultSetupTMI. The external $B$-field is $B_e = \SI{2}{\tesla}$\xspace.} \label{fig:Disp_relat_vz_Nonzero} \end{figure} Inverting Eq.~\eqref{eq:vz_nonzero_omega} yields two modes for $k^2$, \begin{eqnarray} k^2_{\pm} = \frac{1}{2v_z^2} \left[ \omega^2 - \makeAQ{m}^2 + n^2\omega^2v_z^2 \pm \Big(\big(\makeAQ{m}^2+\omega^2(n^2 v_z^2-1)\big)^2+4\omega^2n^2b^2v_z^2\Big)^{1/2}\right] \, , \label{eq:vz_nonzero_k} \end{eqnarray} whereas we only obtained one mode for $k^2$ in the $v_z=0$ case, cf.\ Eq.~\eqref{eq:dispersion_k_vz0}. The functional dependence of Eq.~\eqref{eq:vz_nonzero_k} is shown in the right panel of Fig.~\ref{fig:Disp_relat_vz_Nonzero}. The imaginary part of the $k_-$ mode, which for $v_z = 0$ was only present inside the gap, now keeps rising outside of the gap for frequencies $\omega < \makeAQ{m}$. The $k_+$ mode crosses the gap such that for $\omega > \omega_\text{\tiny LO}$ two propagating modes exist. However the wavelength of the $k_+$~mode is always much shorter than the wavelength of the $k_-$~mode. The most general ansatz in the case of non-vanishing spin wave velocity is: \begin{eqnarray} E_x(z)&=&\hat{E}^{+}_x e^{i \safemaths{k_p} z}+\hat{E}^{-}_x e^{-i \safemaths{k_p} z},\label{eq:AQ_P_mixing_vzNonZero_AnsatzEx}\\ E_y(z)&=&\hat{E}^{++}_y e^{ik_+z}+\hat{E}^{+-}_y e^{-ik_+z}+\hat{E}^{-+}_y e^{ik_-z}+\hat{E}^{--}_y e^{-ik_-z},\\ \safemaths{\delta\Theta}(z)&=&\delta\hat{\Theta}^{++} e^{ik_+z}+\delta\hat{\Theta}^{+-} e^{-ik_+z}+\delta\hat{\Theta}^{-+} e^{ik_-z}+\delta\hat{\Theta}^{--} e^{-ik_-z} \, .\label{eq:AQ_P_mixing_vzNonZero_AnsatzDelTheta} \end{eqnarray} Relations for the unknown constants in the ansatz~\eqref{eq:AQ_P_mixing_vzNonZero_AnsatzEx}--\eqref{eq:AQ_P_mixing_vzNonZero_AnsatzDelTheta} can be derived in complete analogy to the $v_z=0$ case. However, we would now need to specify boundary conditions for the dynamical axion in order to determine all constants. We do not perform the explicit calculation here since we expect the difference to the $v_z=0$ case to be minimal, thanks to the smallness of the spin wave velocity. To see this, consider the following argument: Let an incoming electromagnetic wave in vacuum be described by $A_0e^{i \safemaths{k_p} z}$. In the TMI material with $v_z\neq 0$, two modes are present. Around $\omega \sim \omega_\text{\tiny LO}$, the first mode $k_s$ has a wavelength that is much shorter than $\safemaths{k_p}$, while the second mode $k_l$ has a much longer wavelength than $\safemaths{k_p}$, i.e.\ $|k_s|\gg|\safemaths{k_p}|\gg |k_l|$. This is exactly the situation that we face~(cf.\ Fig.~\ref{fig:Disp_relat_vz_Nonzero}), where $k_s=k_+$ and $k_l=k_-$.\footnote{Note that due to the fact that we plot $k_+$ only up to $\SI{100}{\meV}$, the much larger values of $k_+$ around $\omega_\text{\tiny LO}$ are not visible in the right panel of Fig.~\ref{fig:Disp_relat_vz_Nonzero}.} Neglecting reflections, the fraction of the amplitudes of the two modes in medium~1 are $\left|\frac{A_1^l}{A_1^s}\right|=\left|\frac{k_a-\safemaths{k_p}}{\safemaths{k_p}-k_l}\right|\approx\left|\frac{k_s}{\safemaths{k_p}}\right|\gg 1$, where the index 1 refers to medium 1. Therefore the amplitude of long wavelength mode $A_1^l$ is much larger than the amplitude of the short wavelength mode $A_1^s$. Based on these arguments, the contribution of the $k_+$~mode can therefore be neglected -- even though it is in principle present. In what follows, we will consequently assume that $v_z=0$. \paragraph{Case with losses ($\boldsymbol{\Gamma \neq 0}$).} If material losses are included, the dispersion relations \eqref{eq:PhotonDispersion_withoutLosses} and \eqref{eq:dispersion_k_vz0} are modified. The dispersion relation of the $E_x$-component is \begin{eqnarray} k^2 = n^2 \, \omega^2 \left(1+i\frac{\Gamma_\rho}{\omega}\right) =: \safemaths{k_p}^2 \label{eq:PhotonDispersion_withLosses} \end{eqnarray} and the dispersion relation for the mixed system of $E_y$ and $\safemaths{\delta\Theta}$ is \begin{eqnarray} \makeAQ{k}^2\equiv k^2&=&n^2\omega^2 \left(1+\frac{b^2}{-i \Gamma_m \omega+\makeAQ{m}^2-\omega^2}+i \frac{\Gamma_\rho}{\omega}\right)\nonumber\\&+&n^2 \omega \left(\frac{i B_e \left(\frac{\alpha}{\pi}\frac{\Gamma_{\times,2} \omega^2}{\epsilon}+\Lambda \Gamma_{\times,1}\right)-\omega\Gamma_{\times,1} \Gamma_{\times,2}}{-i \Gamma_m \omega+\makeAQ{m}^2-\omega^2}\right). \label{eq:dispersion_relation_vz0_losses} \end{eqnarray} The first part of the dispersion relation in Eq.~\eqref{eq:dispersion_relation_vz0_losses} only includes the diagonal losses $\Gamma_m$ and $\Gamma_\rho$, while the second part also includes mixed losses. We argued in Section~\ref{sec:damping} that mixed losses are smaller than the diagonal losses $\Gamma_\rho$ and $\Gamma_m$. We therefore neglect mixed losses in what follows. Rewriting the dispersion relation~\eqref{eq:dispersion_relation_vz0_losses} without mixed losses gives: \begin{equation}\boxed{ \makeAQ{k}^2\equiv k^2=n^2\omega^2 \left(1+\frac{(m^2-\omega^2)\omega b^2}{ \Gamma_m^2 \omega^2+(\makeAQ{m}^2-\omega^2)^2} + i \, \frac{\Gamma_m\omega b^2}{ \Gamma_m^2 \omega^2+(\makeAQ{m}^2-\omega^2)^2} + i \, \frac{\Gamma_\rho}{\omega}\right) \, . \label{eq:dispersion_relation_vz0_losses_withoutMixed} } \end{equation} \begin{figure} \centering \includegraphics[width=0.32\textwidth]{{figures/Maxwell_axion_and_Boundaries/dispersion_rel_k_SI_vz=0_losses_Gr=0.4_Gm=0}.pdf} \includegraphics[width=0.32\textwidth]{{figures/Maxwell_axion_and_Boundaries/dispersion_rel_k_SI_vz=0_losses_Gr=0_Gm=0.05}.pdf} \includegraphics[width=0.32\textwidth]{{figures/Maxwell_axion_and_Boundaries/dispersion_rel_k_SI_vz=0_losses_Gr=0_Gm=0.2}.pdf} \caption{Dispersion relation of the axion-polariton for magnon and photon losses, $\Gamma_m$ and $\Gamma_\rho$. Mixed losses are neglected. \textit{Left:} $\Gamma_\rho = \SI{0.4}{\meV}$ and $\Gamma_m = 0$. Photon losses introduce an almost constant imaginary part to the dispersion relation if the chosen frequency interval is not too large. \textit{Middle:} $\Gamma_\rho = 0$ and $\Gamma_m=\SI{0.05}{\meV}$, \textit{right:} $\Gamma_\rho = 0$ and $\Gamma_m=\SI{0.2}{\meV}$. The larger the magnon loss, the larger the FWHM of the imaginary part in the dispersion relation. \defaultSetupTMI. The external $B$-field is $B_e = \SI{2}{\tesla}$\xspace.} \label{fig:Disp_relat_vz_zero_losses} \end{figure} Equation~\eqref{eq:dispersion_relation_vz0_losses_withoutMixed} shows that the $\Gamma_\rho$~contribution is unaffected by any other material properties, and it stays approximately constant when $\omega$ does not vary too much. We show an example for $\Gamma_m=0$ in the left panel of Fig.~\ref{fig:Disp_relat_vz_zero_losses}. While the peak of the resonance is not affected much by the losses, $\Gamma_\rho$ introduces an almost constant imaginary for all frequencies. In contrast, magnon losses $\Gamma_m$ are dominant around $\makeAQ{m}$. This can be seen from the third term in Eq.~\eqref{eq:dispersion_relation_vz0_losses_withoutMixed} which represents a Lorentzian curve that peaks around $\omega=\makeAQ{m}$ and has a full width at half maximum~(FWHM) of $\Gamma_m$. In the middle and right panels of Fig.~\ref{fig:Disp_relat_vz_zero_losses} we show examples for $\Gamma_\rho = 0$. The larger~$\Gamma_m$, the larger the FWHM of the imaginary part in the dispersion relation. In other words, frequencies away from the gap are damped more strongly when $\safemaths{\Gamma_m}$ is large. Furthermore, the resonance becomes less pronounced for large $\safemaths{\Gamma_m}$. As a consequence, it will be difficult to confirm the existence of the gap in the spectrum, and the presence of a dynamical AQ, when large losses are present. We investigate this more quantitatively in Section~\ref{sec:AQ_P_mixing_Ref_Trans}, where we calculate the reflection and transmission coefficients for a single TMI layer. In the presence of losses the most general solution, cf.\ Eq.~\eqref{eq:vz0_ExGeneralSol}--\eqref{eq:vz0_DelThetaGeneralSol}, is still valid. However, the relations in the Eqs.~\eqref{eq:vz0_relation_Theta} and~\eqref{eq:vz0_relation_Ey} are modified: \begin{equation} \delta\hat{\Theta}^{\pm} = \Theta_E\hat{E}^{\pm} \, , \quad \Theta_E=\frac{\Lambda B_e+i\omega\Gamma_{\times,2}}{-\omega^2+\makeAQ{m}^2-i\omega\Gamma_m} \, ,\label{eq:vz0_losses_relation_Theta} \end{equation} or, equivalently, \begin{equation} \hat{E}_y^{\pm} = E_\Theta\delta\hat{\Theta}^{\pm} \, , \quad E_\Theta=\frac{\alpha}{\pi}\frac{\omega^2\mu B_e + i n^2\omega\Gamma_{\times,1}}{\makeAQ{k}^2-\safemaths{k_p}^2} \, .\label{eq:vz0_losses_relation_Ey} \end{equation} It can be checked that Eqs.~\eqref{eq:vz0_losses_relation_Theta} and~\eqref{eq:vz0_losses_relation_Ey} reduce to Eqs.~\eqref{eq:vz0_relation_Theta} and~\eqref{eq:vz0_relation_Ey} in the limit of $\mat{\Gamma} \rightarrow 0$. In complete analogy to the case without losses, Eq.~\eqref{eq:vz0_losses_relation_Theta} determines the dynamical AQ field, cf.\ Eq.~\eqref{eq:vz0_DelThetaGeneralSol_reduced}. \subsubsection{Matrix formalism for many interfaces}\label{sec:AnalogueAxionPhoton_MatrixFormalism} \begin{figure} \centering \includegraphics[width=0.6\textwidth]{{figures/Reflection_Transmission/matrix_formalism}.pdf} \caption{Multilayer system of different materials. Each medium is characterized by $\epsilon_r$, $\mu_r$, $\mat{\Gamma}_r$, and $\safemaths{\Theta^0}_r$. The external $B$-field has the same strength and polarization in each medium.} \label{fig:matrix_formalism} \end{figure} In the previous section, we discussed the solutions of the one-dimensional axion-Maxwell equations in a homogeneous~TMI. Here, we consider $N+1$~media, separated by $N$ interfaces, as shown in Fig.~\ref{fig:matrix_formalism}. Let the first interface be located at $z_0 = z_1$, and the last interface at $z_N$. We label each medium with an index~$r$, i.e.\ $r = 0,\ldots, N$. For example, the permittivity and permeability of medium~$r$ are thus denoted by $\mu_r$ and $\epsilon_r$, respectively. Recall that, in all media, we set $v_z = 0$ and define the constant external $B$-field to be $\vc{B}_e = B_e\,\hat{\vc{e}}_y$. We now develop a matrix formalism to link the solutions in different materials to each other. This makes it possible to compute the scattering of incoming electromagnetic radiation from a multilayer system. The simplest application is the computation of the reflection and transmission coefficients for THz~radiation that hits a layer of TMI; we discuss this case at the end of this section. The most general ansatz in medium~$r$ is given by: \begin{align} E_x^r &= \hat{E}_{x,r}^+e^{i\safemaths{k_p}^r (z-z_r)}+\hat{E}_{x,r}^-e^{-i\safemaths{k_p}^r (z-z_r)} \, , \nonumber\\ E_y^r &=\hat{E}_{y,r}^+e^{ik^r_\Theta (z-z_r)}+\hat{E}_{y,r}^-e^{-ik^i_\Theta (z-z_r)} \, , \nonumber\\ \safemaths{\delta\Theta}^r &= \Theta_E^r\hat{E}_{y,r}^+e^{ik^r_\Theta (z-z_r)}+\Theta_E^r\hat{E}_{y,r}^-e^{-ik^r_\Theta (z-z_r)} \, , \label{eq:AQ_P_mixing_MatrixFormalism_Ansatz} \end{align} where, compared to Eqs.~\eqref{eq:vz0_ExGeneralSol}--\eqref{eq:vz0_DelThetaGeneralSol}, we introduce different phase shifts~$z_r$ for each medium. The expressions for $\safemaths{k_p}$, $\makeAQ{k}$, and $E_\Theta$ were derived already in Eq.~\eqref{eq:PhotonDispersion_withoutLosses}, \eqref{eq:dispersion_k_vz0}, and~\eqref{eq:vz0_relation_Theta} for the case $\mat{\Gamma}=0$ and in Eq.~\eqref{eq:PhotonDispersion_withLosses}, \eqref{eq:dispersion_relation_vz0_losses}, and~\eqref{eq:vz0_losses_relation_Theta}, for the case $\mat{\Gamma}\neq 0$. Applying the interface conditions~\eqref{eq:InterfaceE} and~\eqref{eq:InterfaceH} for the electromagnetic fields at $z_r$ yields the following system of equations: \begin{eqnarray} \vc{t}_r=\mat{M}_r^{-1} \, \mat{M}_{r-1} \, \mat{P}_{r-1} \vc{t}_{r-1} \, , \end{eqnarray} with \begin{eqnarray} \vc{t}_{r} = \begin{pmatrix} \hat{E}_{x,r}^+\\ \hat{E}_{x,r}^-\\ \hat{E}_{y,r}^+\\ \hat{E}_{y,r}^- \end{pmatrix} \, , \quad \mat{M}_{r}=\begin{pmatrix} 1&1&0&0\\ 0&0&1&1\\ \frac{\safemaths{k_p}^{r}}{\omega\mu_{r}}&-\frac{\safemaths{k_p}^{r}}{\omega\mu_{r}}&-\frac{\alpha}{\pi}\safemaths{\Theta^0}_{r}&-\frac{\alpha}{\pi}\safemaths{\Theta^0}_{r}\\ -\frac{\alpha}{\pi}\safemaths{\Theta^0}_{r}&-\frac{\alpha}{\pi}\safemaths{\Theta^0}_{r}&-\frac{k^{r}_\Theta}{\omega\mu_{r}}&\frac{k^{r}_\Theta}{\omega\mu_{r}} \end{pmatrix} \, , \label{eq:MatrixFormalism_DefMatrix} \end{eqnarray} and \begin{equation} \mat{P}_{r} = \text{diag}\left(e^{i\Delta^p_{r}}, \, e^{-i\Delta^p_{r}}, \, e^{i\Delta_{r}^\Theta}, \, e^{-i\Delta_{r}^\Theta}\right) \, . \end{equation} The phases are defined as: $\Delta_{r}^\Theta\equiv k^{r}_\Theta(z_{r+1}-z_{r})$ and $\Delta_{r}^p\equiv k^{r}_p(z_{r+1}-z_{r})$. Let us define the matrix $\mat{S}$ to relate the incoming field amplitude from medium~$0$ to the outgoing field amplitude in medium~$N$: \begin{equation} \vc{t}_N=\mat{S}\,\vc{t}_0 \, . \end{equation} For instance, for a single interface, $\mat{S}$ is given by \begin{equation} \mat{S}=\mat{M}_1^{-1}\,\mat{M}_0\,\mat{P}_0 \label{eq:AQ_P_mixing_matrix_S_single_interface} \end{equation} and, for two interfaces, $\mat{S}$ is given by \begin{equation} \mat{S}=\mat{M}_2^{-1} \, \mat{M}_1 \, \mat{P}_1\mat{M}_1^{-1}\,\mat{M}_0\,\mat{P}_0 \, . \label{eq:AQ_P_mixing_matrix_S_two_interface} \end{equation} Finally, for $N$ interfaces, we find $\mat{S}$ to be given by \begin{equation} \mat{S}=\mat{M}_N^{-1}\,\mat{M}_{N-1}\,\mat{P}_{N-1}\,\mat{M}_{N-1}^{-1}\,\mat{M}_{N-1}\mat{P}_{N-2}\,\mat{M}_{N-2}\cdots\mat{M}_2^{-1}\,\mat{M}_1\,\mat{P}_1\mat{M}_1^{-1}\,\mat{M}_0\,\mat{P}_0 \, . \label{eq:AQ_P_mixing_matrix_S_N_interface} \end{equation} For electromagnetic radiation coming into the system from medium~$0$, $\hat{E}_{x0}^+$ and $\hat{E}_{y,0}^+$ are known and $\hat{E}_{x,N}^- = \hat{E}_{y,N}^- = 0$. The other unknown field values can be determined from the elements of $\mat{S}$, i.e.\ $S_{ij}$, via \begin{eqnarray} \begin{pmatrix} \hat{E}^+_{x,N}\\ \hat{E}^-_{x,0}\\ \hat{E}^+_{y,N}\\ \hat{E}^-_{y,0} \end{pmatrix} = \begin{pmatrix} -1&S_{12}&0&S_{14}\\ 0&S_{22}&0&S_{24}\\ 0&S_{32}&-1&S_{34}\\ 0&S_{42}&0&S_{44} \end{pmatrix}^{-1}\cdot\begin{pmatrix} -S_{11}\hat{E}^+_{x0}-S_{13} \hat{E}^+_{y0}\\ -S_{21}\hat{E}^+_{x0}-S_{23} \hat{E}^+_{y0}\\ -S_{31}\hat{E}^+_{x0}-S_{33} \hat{E}^+_{y0}\\ -S_{41}\hat{E}^+_{x0}-S_{43} \hat{E}^+_{y0}\\ \end{pmatrix} \, . \label{eq:Matrix_Formalism_solutions} \end{eqnarray} \subsubsection{Layer of topological magnetic insulator}\label{sec:AQ_P_mixing_Ref_Trans} Let us now apply the matrix formalism to a system with~$N=2$. However, note that the matrix approach developed here is able to describe more complicated systems, consisting of many layers. One particular example could be a layered system of different topological insulators with different material properties. The matrix formalism with $N>2$ could be useful in DM searches to increase the boost factor using additional layers of TMI or dielectric. We now calculate the reflection and transmission coefficients for one TMI layer. In the language of the matrix formalism the system has $N=2$ boundaries, and hence three media. Media~$0$ and~$2$ are vacuum while medium~$1$ is a TMI, hosting a dynamical AQ. The THz~laser radiation is coming from medium $0$ and hits the layer of TMI. In what follows, we omit the subscripts~$r$ that label the materials because the only non-vacuum medium is the TMI, i.e.\ medium~$1$. We assume that the laser polarization is oriented in the $y$-direction, parallel to the external $B$-field. In this case, we obtain -- to lowest order in $\frac{\alpha}{\pi}\safemaths{\Theta^0}$ -- the following reflection and transmission coefficients: \begin{eqnarray} T_y&=&\frac{2i \tilde{k} }{\left(\tilde{k}^2+1\right)\sin\Delta+2i \tilde{k} \cos\Delta }+\mathcal{O}\left(\left(\frac{\alpha}{\pi}\safemaths{\Theta^0}\right)^2\right),\label{eq:AQ_Photon_mixing_Ty}\\ R_y&=&-\frac{\left(\tilde{k}^2-1\right) \sin\Delta }{\left(\tilde{k}^2+1\right)\sin\Delta +2 i \tilde{k}\cos\Delta}+\mathcal{O}\left(\left(\frac{\alpha}{\pi}\safemaths{\Theta^0}\right)^2\right),\label{eq:AQ_Photon_mixing_Ry} \end{eqnarray} where $\tilde{k}=\frac{\makeAQ{k}}{\omega \mu}, \Delta\equiv d\makeAQ{k}$ and $d=z_2-z_1$ is the thickness of the layer. Note that, although $\tilde{k}$ depends on the expansion parameter we did not expand $\tilde{k}$ because otherwise the expansion for the transmission and reflection coefficients would not be valid around the resonance. The calculated transmission and reflection coefficients are valid for both the case with and without losses since we assume all losses to be bulk losses. $T_y$ and $R_y$ agree with the normal transmission and reflection coefficients of a dielectric disk~\cite{Millar:2016cjp} if the coupling $b$ of the AQ to the photon is set to zero, i.e.\ $\makeAQ{k}\rightarrow n \omega$, corresponding to $\makeAQ{f}\rightarrow\infty$. \begin{figure} \centering \includegraphics[width=0.49\textwidth]{{figures/Reflection_Transmission/detailed/Two_interfaces_R_y_n=5.0_v=0B=2.0}.pdf} \includegraphics[width=0.49\textwidth]{{figures/Reflection_Transmission/detailed/Two_interfaces_R_y_w_n=5.0_v=0B=2.0}.pdf}\\ \includegraphics[width=0.49\textwidth]{{figures/Reflection_Transmission/detailed/Two_interfaces_T_y_n=5.0_v=0B=2.0}.pdf} \includegraphics[width=0.49\textwidth]{{figures/Reflection_Transmission/detailed/Two_interfaces_T_y_w_n=5.0_v=0B=2.0}.pdf}\\ \includegraphics[width=0.49\textwidth]{{figures/Reflection_Transmission/detailed/Two_interfaces_T_x_n=5.0_v=0B=2.0}.pdf} \includegraphics[width=0.49\textwidth]{{figures/Reflection_Transmission/detailed/Two_interfaces_T_x_w_n=5.0_v=0B=2.0}.pdf} \caption{Reflection and transmission coefficients for a laser that hits a material with~(\textit{left}) and without~(\textit{right}) a dynamical AQ. The laser polarization is in the $y$-direction, parallel to the external $B$-field. The materials have $\safemaths{\Theta^0}=0.8\,\pi$, $n=5$, and $\mu=1$. Typical material values for a Mn$_2$Bi$_2$Te$_5$ TMI with an external $B$-field $B_e$ of $\SI{2}{\tesla}$ are chosen, cf.\ Table~\ref{tab:derived_params} and Eq.~\eqref{eqn:b_meV}. $\makeAQ{m}$ and $\omega_\text{\tiny LO}$ are marked with the black vertical lines. The $R_y$ ($T_y$) coefficient is always close to one (zero) inside the gap if a dynamical AQ is present. The $T_x$ coefficient is only non-zero is a AQ is present. However the effect of an AQ in the $E_x$-component is much smaller than in the $E_y$-component since the $E_x$-component can only be induced via polarization rotation with non-zero $\safemaths{\Theta^0}$.} \label{fig:TwoInterfaces_BParallelE_refTrans} \end{figure} We show the full functions for the reflection and transmission coefficients without losses ($\mat{\Gamma}=0$) in Fig.~\ref{fig:TwoInterfaces_BParallelE_refTrans}. The coefficients are shown for different values of the laser frequency~$\omega$ and sample thickness~$d$. The left column assumes the presence of a dynamical AQ, while the figures in the right column show the case when no dynamical AQ is present. Note that in both cases $\safemaths{\Theta^0} =0.8\, \pi$ is assumed although the shown results for $T_y$ and $R_y$ do not depend on $\safemaths{\Theta^0}$ to lowest order, cf.\ equations~\eqref{eq:AQ_Photon_mixing_Ty} and~\eqref{eq:AQ_Photon_mixing_Ry}. First, we discuss the figures in the top and middle row, which show the reflection and transmission coefficients for the $E_y$-components. If a dynamical AQ is present, the dispersion relation $\makeAQ{k}$ becomes imaginary between $\makeAQ{m}$ and~$\omega_\text{\tiny LO}$. The gap between these two frequencies is marked with the two vertical lines. For large thicknesses $d$, all frequencies in the gap are reflected, and none are transmitted. This is a direct consequence of the purely imaginary $\makeAQ{k}$ in the gap. For small values of the thickness, the gap size is reduced. This happens around $\omega_\text{\tiny LO}$, i.e.\ the upper part of the gap, since the imaginary part gets reduced (the skin depth becomes larger) the more $\omega_\text{\tiny LO}$ is approached from smaller frequencies, cf.\ right panel of Fig.~\ref{fig:Disp_relat_vz_zero}. When going away from the gap, the figures in the left and right columns agree more and more. This is as expected since the dispersion relation $\makeAQ{k}$ differs only significantly from a normal photon dispersion around the gap. In the case of no dynamical AQ (left panel) we notice a clear non-zero reflection and transmission inside the gap. Comparing the figures on the left-\ and right-hand side, it is clear that the AQ causes an $\mathcal{O}(1)$~modification of the $T_y$ and $R_y$ coefficients compared to the spectrum when no dynamical AQ is present. Next, we discuss the bottom row of Fig.~\ref{fig:TwoInterfaces_BParallelE_refTrans}, which shows the transmission coefficient for the $E_x$-component. If no dynamical AQ field is present~(right panel) but we have a topological material with $\safemaths{\Theta^0} = 0.8\,\pi$, the transmission $T_x$ vanishes. This may be surprising at fist glance because there is mixing at the interface of ordinary TIs and, hence, also a polarization rotation. However, the transmission in the $x$-component vanishes since the polarization rotations at the two interfaces cancel each other. If in addition to the static $\safemaths{\Theta^0}=0.8\,\pi$ a dynamical AQ is present (left panel), we get a small non-zero transmission~$T_x$. The signal is much smaller than in the case of the $T_y$ coefficient. This is because the incoming laser is polarized in the $E_y$ component and a non-zero $E_x$-component can only be induced due to a nonzero $\safemaths{\Theta^0}$, i.e.\ mixing at the interfaces, which is proportional to the small parameter $\frac{\alpha}{\pi}\safemaths{\Theta^0}$. In conclusion, we should first look for the AQ by studying the $E_y$-component because the AQ~modification of this component is much larger than for the $E_x$-component. However, once the AQ is found, one can also use the $E_x$-component to determine, for example, $\safemaths{\Theta^0}$ of the material by reflection and transmission measurements. Is is also possible to study the influence of non-linear effects with the $x$-components. In Eq.~\eqref{Ampere_1Dl1} it was shown that the laser sources the $x$-component in a non-linear fashion. This effect is neglected here because the equations are linearized. \begin{figure} {\centering \includegraphics[width=0.49\textwidth]{{figures/Reflection_Transmission/detailed/Two_interfaces_T_y_n=5.0_v=0B=2.0_Gm0_Gr0.1}.pdf} \includegraphics[width=0.49\textwidth]{{figures/Reflection_Transmission/detailed/Two_interfaces_T_y_n=5.0_w_v=0_Gr0.1}.pdf}}\\ \includegraphics[width=0.49\textwidth]{{figures/Reflection_Transmission/detailed/Two_interfaces_T_y_n=5.0_v=0B=2.0_Gm0.1_Gr0}.pdf} \caption{Transmission coefficients for the $E_y$-component (parallel to the external $B$-field) for exaggerated photon and magnon losses, $\Gamma_\rho$ and $\Gamma_m$. We show the results for when a dynamical AQ field~(\textit{left}) and if no dynamical AQ is present; (\textit{right}). In both cases we have $\safemaths{\Theta^0}=0.8\,\pi$. \defaultSetupTMI. The external $B$-field is $B_e = \SI{2}{\tesla}$\xspace. $\makeAQ{m}$ and $\omega_\text{\tiny LO}$ are marked with the black vertical lines. } \label{fig:TwoInterfaces_BParallelE_Ty_Gr} \end{figure} Figure~\ref{fig:TwoInterfaces_BParallelE_Ty_Gr} shows the transmission coefficient $T_y$ for different losses. The figures are produced for our benchmark material Mn$_2$Bi$_2$Te$_5$ with $n=5,\mu=1$ and $\safemaths{\Theta^0}=0.8\,\pi$. In the top row we illustrate the influence of photon losses $\Gamma_\rho$ for a TMI with a dynamical AQ~(left panel) and for a normal TI~(right panel). The transmission at large layer thicknesses becomes smaller independently of the resonance. This is due to the fact that $\Gamma_\rho$ appears in the dispersion relation~\eqref{eq:dispersion_relation_vz0_losses_withoutMixed} as an additional term which is approximately constant in the small shown frequency interval. The skin depth is of the order of~$\Gamma_\rho^{-1}$. It is therefore advantageous to have thin material samples for distinguishing between the case of a DA~(left panel) and no DA~(right panel). However, should not be too thin. For very small thicknesses the frequencies inside the gap lead to a transmission coefficient $T_y$ that is not very small anymore. Note that the effect of losses for large $d$ becomes more pronounced for larger refractive indices $n$. In the bottom row of Fig.~\ref{fig:TwoInterfaces_BParallelE_Ty_Gr} photon losses are zero and the effect of magnon losses $\Gamma_m$ is illustrated. We do not show the case without an AQ because without AQ there are no magnon losses and one should compare to the already existing Fig.~\ref{fig:TwoInterfaces_BParallelE_refTrans} (middle row, right). The larger the magnon losses, the more pronounced is the widening of the gap. This can be understood by looking at the dispersion relation in Eq.~\eqref{eq:dispersion_relation_vz0_losses_withoutMixed}. Magnon losses $\Gamma_m$ introduce a Lorentzian shaped imaginary part to the dispersion relation. The width of the Lorentzian is proportional to $\Gamma_m$. Due to the Lorentzian shape of the damping imaginary part in the dispersion relation also frequencies that are not directly in the gap -- but close to the gap -- can become highly damped. This effect becomes more pronounced the thicker the sample is. From the previous discussion it becomes clear that finding the AQ will depend very sensitively on the losses and thickness of the material. The losses that we show in Fig.~\ref{fig:TwoInterfaces_BParallelE_Ty_Gr} are exaggerated and in reality we expect them to be much smaller. Therefore from Fig.~\ref{fig:TwoInterfaces_BParallelE_Ty_Gr} we find that with a layer thickness on the order of $\SI{0.03}{\milli\metre}$ and $\SI{0.3}{\milli\metre}$ AQ can be most effectively be detected. Once the AQ is detected the characterization of the parameters of the TMI is of huge importance. In Section~\ref{sec:AQ_DA_calculations} and~\ref{sec:DM-detection} it is shown how a TMI can be used as dark matter axion detector. To estimate the induced photon signal from a DA, AQ and photon mixing the parameters of the TMI have to be known precisely. In the following we demonstrate that fitting measurements to the presented results can determine the parameters of the TMI. \begin{figure} \centering \includegraphics[width=\textwidth]{{figures/Reflection_Transmission/TwoInterfaces_VaryLosses_mB}.pdf} \\ \includegraphics[width=0.8\textwidth]{{figures/Reflection_Transmission/TwoInterfaces_VaryLosses_mB_legend}.pdf} \caption{Transmission coefficient $T_y$ for a layer of TMI with thickness $d=\SI{0.03}{mm}$ for different $B$-fields (colours) are shown. Panels vary the losses $\Gamma_\rho$~(from left to right) and $\Gamma_m$~(from top to bottom). The vertical black line indicates the value of $\makeAQ{m} = \SI{2}{\milli\electronvolt}$, while the other vertical lines indicate the value of $\omega_\text{\tiny LO}$ for different values of the external $B$-field. The larger the external $B$-field, the larger the gap between $\makeAQ{m}$ and $\omega_\text{\tiny LO}$. We use typical material values for a Mn$_2$Bi$_2$Te$_5$ TMI, cf.\ table~\ref{tab:derived_params} and eq.~\eqref{eqn:b_meV}, and $n = 5$ and $\mu = 1$\xspace. The dashed black line shows the result when no dynamical AQ $\safemaths{\delta\Theta}$ is present, while the solid coloured lines are for the case with a dynamical~AQ. } \label{fig:TwoInterfaces_DifferentLosses_and_mB} \end{figure} In Fig.~\ref{fig:TwoInterfaces_DifferentLosses_and_mB}, photon losses $\Gamma_\rho$ are varied between $\Gamma_\rho = \num{3e-4}\,{\rm meV}$ and $0.3\,{\rm meV}$, and magnon losses between $\Gamma_m = \num{3e-4}\,{\rm meV}$ and $0.3\,{\rm meV}$. The layer thickness is fixed to $d=\SI{0.03}{\milli\metre}$. In each figure, we show three different external $B$-field values. The values of $\makeAQ{m}$ and $\omega_\text{\tiny LO}$ are marked with a vertical black and coloured lines, respectively. The weaker the external $B$-field, the smaller the gap. Figure~\ref{fig:TwoInterfaces_DifferentLosses_and_mB} makes again clear that the larger the losses the harder it is to distinguish the case where a dynamical AQ is present (solid coloured curves) from the case that not dynamical AQ (dashed black line) is present. For relatively small losses, the distinction between the curves is very clear. We therefore conclude that comparing these results to future measurements will make it possible to explicitly determine the material parameters, i.e. losses, refractive index, $\safemaths{\Theta^0}$, and the parameters that enter the AQ mass $\makeAQ{m}$ and the gap size parameter $b$. We now investigate further the resonance around $\omega_\text{\tiny LO}$, cf.\ Fig.~\ref{fig:TwoInterfaces_DifferentLosses_and_mB}. When the losses in Fig.~\ref{fig:TwoInterfaces_DifferentLosses_and_mB} are small the resonance frequency $f_{\text{res}}=\frac{\omega_{\rm res}}{2\pi}$ corresponds to $\omega_\text{\tiny LO}$. However, with higher losses, the resonance frequency $\omega_{\text{res}}$ moves to higher frequencies, i.e.\ $f_{\text{res}}>\frac{\omega_\text{\tiny LO}}{2\pi}$. With increasing losses, the resonance smears out until it vanishes completely. Figure~\eqref{fig:TwoInterfaces_DifferentLosses_and_mB} allows us to directly read off the amount of losses that would still be acceptable AQ detection~(for a sample of thickness $d = \SI{0.03}{mm}$). The resonance peaks to the right of $\omega_\text{\tiny LO}$ in Fig.~\ref{fig:TwoInterfaces_DifferentLosses_and_mB} are not symmetric. We therefore define the width of the resonance peak, $\Gamma_{\text{res}}$, as two times the frequency interval that ranges from the frequency at the transmission maximum down to the smaller frequency at half the transmission maximum. The ratio $\frac{f_{\text{res}}}{\Gamma_{\text{res}}}$ is called the $Q$-factor. It describes the quality of the resonance in the sense that large $Q$-factors give rise to a well-defined resonance, whereas low $Q$-factors show that the resonance is highly damped. In Fig.~\ref{fig:TwoInerfaces_RefTransmission_Q_factor}, the $Q$-factor is shown with respect to the applied external $B$-field for different losses. We consider the case of dominant conductive losses (red) and dominant magnon losses (blue). The largest $Q$-factor is observed at small external $B$-field, and the low magnon losses lead to the largest $Q$. This is consistent with the intuition that at low $B$-field the polariton is largely magnon-like. For larger external $B$-fields the difference between the two cases becomes small, as both sources of loss contribute almost equally. \FloatBarrier \begin{figure} \centering \includegraphics[width=0.5\textwidth]{figures/Reflection_Transmission/B_vs_Q.pdf} \\ \caption{TMI Quality factor, $Q = f_{\text{res}}/\Gamma_\text{res}$, for different losses, with respect to the external $B$-fields. $f_\text{res}$ is the frequency of the maximal transmission peaks around $\omega_\text{\tiny LO}$, cf.\ Fig.~\ref{fig:TwoInterfaces_DifferentLosses_and_mB}. The TMI layer has a thickness of $d=\SI{0.03}{mm}$.} \label{fig:TwoInerfaces_RefTransmission_Q_factor} \end{figure} \section{Axion Dark Matter and Axion Quasiparticles}\label{sec:AQ_DA_calculations} \subsection{Dark axion, axion quasiparticle and photon mixing} Paper~I proposed using dynamical AQs in TMIs to detect DAs. This is possible since DAs can mix resonantly with axion polaritons. Compared to Paper~I, we work out a more detailed calculation for the emitted photon signal by taking into account the correct interface conditions and material losses. This, in turn, allows us to present a more rigorous calculation of the sensitivity reach for DA searches using TMIs. As a starting point, we use the three-dimensional equations of motion, Eqs.~\eqref{GaussE}--\eqref{KleinGordon}. We linearize these and derive a one-dimensional model in analogy to Section~\ref{sec:Quasiparticle_Photon_mixing_Linearization}. In what follows, the one-dimensional model is used to derive the photon signal generated by DAs passing through a magnetized TMI that hosts dynamical AQs. \subsubsection{General formulation} To describe the threefold mixing between AQs, DAs, and photons, we need to add the Klein-Gordon equation for DAs, which is sourced by the electromagnetic fields, to Eqs.~\eqref{GaussE}--\eqref{KleinGordon}. Additional source terms, arising due to the presence of DAs, have therefore to be added to Eqs.~\eqref{GaussE} and~\eqref{Ampere}. Doing so results in the following equations of motion: \begin{align} \nabla\cdot \vc{D} &= \rho_f - \frac{\alpha}{\pi}\nabla(\delta\Theta+\safemaths{\Theta^0})\cdot\vc{B} - \safemaths{g_{a\gamma}} \nabla a\cdot\vc{B} \, ,\label{GaussE_aq_da}\\ \nabla\times\vc{H} - \partial_t\vc{D} &= \bm{J}_f + \frac{\alpha}{\pi} \left[\vc{B}\partial_t(\delta\Theta+\safemaths{\Theta^0})-\vc{E}\times\nabla( \delta\Theta+\safemaths{\Theta^0})\right] \nonumber\\ &\mathrel{\phantom{=\bm{J}_f}} + \safemaths{g_{a\gamma}} \, (\vc{B}\partial_t a-\vc{E}\times\nabla a) \, , \label{Ampere_aq_da}\\ \nabla\cdot\vc{B} &= 0 \, , \label{GaussB_aq_da}\\ \nabla\times\vc{E}+\partial_t\vc{B} &= 0 \, , \label{Faraday_aq_da} \\ \partial_t^2\delta\Theta-v_i^2\partial_i^2\delta\Theta+m_\Theta^2\delta\Theta &= \Lambda \, \vc{E}\cdot\vc{B} \, , \label{KleinGordon__aq_da}\\ (\partial_t^2-\nabla^2+m_a^2) \, a &= \safemaths{g_{a\gamma}} \, \vc{E}\cdot \vc{B} \, . \label{KleinGordon__aq_da2} \end{align} where $a$ is the pseudoscalar DA field, $g_{a\gamma}$ is the DA-photon coupling, and $\safemaths{m_a}$ is the DA mass, in addition to the other variables already defined in Eqs.~\eqref{GaussE}--\eqref{KleinGordon}. In Section~\ref{sec:Quasiparticle_Photon_mixing_General} we already noted that one cannot obtain interface conditions from the Klein-Gordon equation for an interface between media with and without AQs. However, DAs are expected to permeate any medium due to the necessarily feeble interactions of dark matter, and their presence in the Galaxy. Therefore, for two media that both contain DAs, Eq.~\eqref{KleinGordon__aq_da2} can be used to derive an interface condition for the DA~field. Consider an infinitesimal volume element between two media, say, between medium~$1$ and medium~$2$. We integrate over this infinitesimal volume element and apply the divergence theorem. It follows that the normal derivative of the DA~field between two interfaces has to be continuous, \begin{equation} \vc{n}\cdot (\nabla a_1 - \nabla a_2) = 0 \, . \label{eq_DA_AP_P_mixing_Da} \end{equation} Furthermore, we require that the DA field be continuous over the interface: \begin{equation} a_1 - a_2 = 0 \, . \label{eq_DA_AP_P_mixing_a} \end{equation} We stress that the continuity of the axion field in Eq.~\eqref{eq_DA_AP_P_mixing_a} does not follow from the axion-Maxwell equations, but is a reasonable approximation. In other words, as DAs only interacts with matter through very small couplings, and we are interested in the conversion of axions to photons again by a very small coupling, any modification due to the axion interacting with the interface is at higher order, and thus negligible. \subsubsection{Linearized one-dimensional model}\label{sec:DA:P_AQ_mixing_eom} Let us again assume the presence of a strong and static external $B$-field, $\vc{B}_e$. Without loss of generality, let $\vc{B}_e$ be polarized in the $y$-direction, i.e.\ $\vc{B}_e = B_e \, \hat{\vc{e}}_y$. Then, similar steps as in Sections~\ref{sec:Quasiparticle_Photon_mixing_OneDimensionalModel} and~\ref{sec:Quasiparticle_Photon_mixing_Linearization} lead to the following linearized equations of motion: \begin{eqnarray} \left(\partial_z^2-n^2\partial_t^2-\sigma\mu\partial_t\right)E_y&=&\mu B_e\partial_t^2\left(\frac{\alpha}{\pi}\delta\Theta+g_{a\gamma}a\right) \, ,\label{eq:eqOfMotion_ThreefoldMixing_E} \\ \left(v_z^2\partial_z^2-\partial_t^2-\makeAQ{m}^2\right)\delta\Theta&=&-\Lambda B_e E_y,\label{eq:eqOfMotion_ThreefoldMixing_T} \\ \left(\partial_z^2-\partial_t^2-\safemaths{m_a}^2\right)a&=&-g_{a\gamma}B_eE_y \, .\label{eq:eqOfMotion_ThreefoldMixing_a} \end{eqnarray} The photon signal in the $E_x$-component, induced by DAs, is always an order $\frac{\alpha}{\pi}\safemaths{\Theta^0}$ smaller than the $E_y$-component. This is due to the fact that only the $E_y$-component mixes with DAs and AQs. The $E_x$-component can only be generated due to the mixing at the interface, which is proportional to $\frac{\alpha}{\pi}\safemaths{\Theta^0}$. The main photon signal is therefore polarized parallel to the external $B$-field in experimental DA searches, i.e.\ in the $E_y$-component. Due to the suppression of the $E_x$-component, it will be even more challenging to detect a signal in the $E_x$-component. This justifies neglecting the $E_x$-component in what follows. In addition to the linearization assumptions made in Section~\ref{sec:Quasiparticle_Photon_mixing_Linearization}, we further assume that the non-linear terms, which include the DA, can also be linearized. This assumption is justified because of the small coupling and non-relativistic nature of Galactic DAs, for which $\partial_ta/\partial_za \approx 10^{-3}$. The interface conditions for the electromagnetic fields after linearization are obtained with the linearized fields $\vc{D}_{\Theta} = \vc{D} + \frac{\alpha}{\pi} \, (\safemaths{\Theta^0}+\delta\Theta) \, \vc{B}_e$ and $\vc{H}_{\Theta}=\vc{H}-\frac{\alpha}{\pi}\safemaths{\Theta^0}\vc{E}$. In the one-dimensional model, the conditions $\bm{n}\cdot (\vc{D}_{\Theta 2}-\vc{D}_{\Theta 1})=0$ and $\bm{n}\cdot (\vc{B}_2-\vc{B}_1)=0$ are always fulfilled, since transverse waves are assumed to vanish, i.e.\ $B_z = 0$ and $E_z = 0$. The only non-trivial interface conditions are: \begin{eqnarray} \bm{n}\times(\vc{H}_{\Theta,2}-\vc{H}_{\Theta,1})&=&0 \, ,\label{eq:DA_AQ_P_mixing_LinearizedInterface_H_1}\\ \bm{n}\times(\vc{E}_2-\vc{E}_1)&=&0 \, ,\label{eq:DA_AQ_P_mixing_LinearizedInterface_E} \end{eqnarray} where $\vc{n} = \hat{\vc{e}}_z$ and it is assumed again that no free surface charges and currents are present. Including bulk losses in the one-dimensional model does not change the interface conditions. The magnon losses $\Gamma_m$, photon losses $\Gamma_\rho$, and mixed losses $\Gamma_{\times,1}$ and $\Gamma_{\times,2}$ are included in complete analogy to Section~\ref{sec:Quasiparticle_Photon_mixing_Losses}. The resulting equations of motion are: \begin{eqnarray} \mat{K} \, \partial_t^2 \vc{X} - \mat{\Gamma} \, \partial_t \vc{X} + \mat{M} \, \vc{X} = 0 \, , \label{eq:dm_exp:eom} \end{eqnarray} where we define \begin{eqnarray} \vc{X}=\begin{pmatrix} E_y\\\delta\Theta\\a \end{pmatrix}\, , \quad \mat{K}&=&\begin{pmatrix} 1&\frac{\alpha}{\pi}\frac{ B_e}{\epsilon}&\frac{\safemaths{g_{a\gamma}} B_e}{\epsilon}\\ 0&1&0\\ 0&0&1 \end{pmatrix} \, , \quad \mat{\Gamma}=\begin{pmatrix} \Gamma_\rho&\Gamma_{\times,1}&0\\ \Gamma_{\times,2}&\Gamma_m&0\\ 0&0&0 \end{pmatrix} \, , \nonumber\\ \mat{M}&=&\begin{pmatrix} \frac{k^2}{n^2}&0&0\\ -\Lambda B_e&v_z^2k^2+\makeAQ{m}^2&0\\ -g_{a\gamma}B_e&0&k^2+\safemaths{m_a}^2 \end{pmatrix} \, . \end{eqnarray} No losses for the DA are included since a valid DM candidate must, by necessity, have an astronomically long lifetime (indeed, the QCD axion in the mass range of interest satisfies this constraint by many orders of magnitude). \subsection{Dark matter signal calculation} In this section, we solve the linearized equations of motion~\eqref{eq:dm_exp:eom}. We first consider the lossless case and then generalize the solutions to include losses. Material properties are always considered piecewise homogeneous, We introduce a matrix formalism to calculate emitted photon and axion power from an experimental setup with multiple TMI layers. We apply the matrix formalism to our benchmark setup, a single-TMI layer surrounded by vacuum. Using a multi-layer might be able to boost the signal, similar to multi-layer proposals for the MADMAX haloscope~\cite{Millar:2016cjp}, although the higher frequencies considered here would lead to significant mechanical challenges if any tuning was required. Note that we set $v_z = 0$ in our calculations, cf.\ Section~\ref{sec:AQ_calculations} for an explanation. \subsubsection{Solution of the one-dimensional model}\label{sec:AQ_DA_P_mixing_SolOneDimModel} \paragraph{Lossless case ($\boldsymbol{\Gamma=0}$).} We first focus on the case without losses. The dispersion relation implied by Eq.~\eqref{eq:dm_exp:eom} is: \begin{eqnarray} \left(k^2-\frac{k_a^2+\makeAQ{k}^2}{2}\right)^2&=&b_a^2k_p^2+\left(\frac{k_a^2-\makeAQ{k}^2}{2}\right)^2 \, , \label{eq:Mixing_AQ_DA_P_dispersion_withoutLoss} \end{eqnarray} where $b_a^2 = \frac{\safemaths{g_{a\gamma}}^2 B_e^2}{\epsilon}$ was defined in analogy to $b^2 = \frac{\alpha}{\pi}\frac{\Lambda B_e^2}{\epsilon}$. The dispersion relations, up to leading order in the DA-photon coupling, therefore are \begin{align} k_+ &= \makeAQ{k} + \mathcal{O}(\safemaths{g_{a\gamma}}^2) \, ,\\ k_- &= k_a + \mathcal{O}(\safemaths{g_{a\gamma}}^2) \, . \end{align} The most general ansatz for the fields is: \begin{align} E &= \hat{E}^{++}e^{i\makeAQ{k} z}+\hat{E}^{+-}e^{-ik_+ z}+\hat{E}^{-+}e^{ik_- z}+\hat{E}^{--}e^{-ik_- z} \, , \nonumber\\ \delta\Theta &= \delta\hat{\Theta}^{++}e^{ik_+ z}+\delta\hat{\Theta}^{+-}e^{-ik_+ z}+\delta\hat{\Theta}^{-+}e^{ik_- z}+\delta\hat{\Theta}^{--}e^{-ik_- z} \, ,\nonumber\\ a &= s\hat{a}^{++}e^{ik_+ z}+\hat{a}^{+-}e^{-ik_+ z}+\hat{a}^{-+}e^{ik_- z}+\hat{a}^{--}e^{-ik_- z} \, . \label{eq:Ansatz_v_G0} \end{align} In the following, we focus on the DA zero-velocity limit, i.e.\ $k_a = 0$. This is an appropriate approximation for dark matter and the most general ansatz in Eq.~\eqref{eq:Ansatz_v_G0} reduces to: \begin{align} E &= \hat{E}^{++}e^{i\makeAQ{k} z}+\hat{E}^{+-}e^{-ik_+ z}+\hat{E}^{-},\nonumber\\ \delta\Theta &= \delta\hat{\Theta}^{++}e^{ik_+ z}+\delta\hat{\Theta}^{+-}e^{-ik_+ z}+\delta\hat{\Theta}^{-} \, ,\nonumber\\ a &= \hat{a}^{++}e^{ik_+ z}+\hat{a}^{+-}e^{-ik_+ z}+\hat{a}^{-} \, ,\label{eq:Ansatz_v0_G0} \end{align} where we omit the $y$~index of the $E$-field since we ignore the $E_x$-component. The case of finite axion velocity was explored in Ref.~\cite{SchtteEngel:450146}. Plugging Eq.~\eqref{eq:Ansatz_v0_G0} into the equations of motion, Eqs.~\eqref{eq:eqOfMotion_ThreefoldMixing_E}--\eqref{eq:eqOfMotion_ThreefoldMixing_a}, we obtain relations between the constants in the general ansatz. After plugging these relations back into the ansatz~\eqref{eq:Ansatz_v0_G0}, we obtain: \begin{eqnarray} \begin{pmatrix} E\\\delta\Theta\\a \end{pmatrix}&=& \hat{E}^{++}\begin{pmatrix} 1\\\Theta^+_E\\a^+_E \end{pmatrix}e^{ik_+z}+ \hat{E}^{+-}\begin{pmatrix} 1\\\Theta^+_E\\a^+_E \end{pmatrix}e^{-ik_+z}+ \hat{a}^{-}\begin{pmatrix} E_a^-\\\Theta^-_a\\1 \end{pmatrix} \, , \label{eq:Ansatz_v0_G0_rel} \end{eqnarray} where the following variables were defined: \begin{eqnarray} \Theta_E&=&\frac{\Lambda B_e}{\makeAQ{m}^2-\omega^2} \, , \quad a_E=\frac{g_{a\gamma} B_e}{k^2} \, ,\label{eq:DA_AQ_P_mixing_ET_Ea_Def}\\ E_a&=&\frac{\omega^2\mu g_{a\gamma}B_e}{k^2-\makeAQ{k}^2}\, , \quad \Theta_a=\Theta_E E_a \, .\label{eq:DA_AQ_P_mixing_aT_aE_Def} \end{eqnarray} From Eq.~\eqref{eq:Ansatz_v0_G0_rel} it becomes clear that the dynamical AQ is completely determined by fixing the variables $\hat{E}^{++}$, $\hat{E}^{+-}$, and $\hat{a}^{-}$. In the next section we show that these variables can be fully determined by using the interface conditions for the electromagnetic and DA fields. Therefore no boundary conditions for the AQ need to be applied.\footnote{If we were to consider a finite spin~wave velocity, we would obtain three modes $k_{1,2,3}^2$. In this case, the most general ansatz would have six unknowns per field, and we would have to specify boundary conditions for the AQ.} \paragraph{The case with losses ($\mat{\Gamma}\bm{\neq 0}$).} When losses are included, the full dispersion relation $k_{\pm}^2$ takes on a more complicated form. However, in the limit $\safemaths{g_{a\gamma}} \rightarrow 0$ we find that $k_-^2 \rightarrow k_a^2$ and $k_+^2 \rightarrow \makeAQ{k}^2$, where $\makeAQ{k}^2$ is given by Eq.~\eqref{eq:dispersion_relation_vz0_losses}. In what follows, $a_E$ and $E_a$ are needed also in the case of losses. $a_E$ in Eq.~\eqref{eq:DA_AQ_P_mixing_ET_Ea_Def} does not get modified in the case of losses, and $E_a$ has the same form as in Eq.~\eqref{eq:DA_AQ_P_mixing_aT_aE_Def}. However, we now require the full form of $\makeAQ{k}$ from Eq.~\eqref{eq:dispersion_relation_vz0_losses}. \subsubsection{Matrix formalism}\label{sec:AQ_DA_P_mixing__matrixFormalism} In the previous section, we described the solution of the linearized equations in a homogeneous medium. Here, we discuss solutions for the fields in a multilayer system that consists of $N+1$ media, cf.\ Fig.~\ref{fig:matrix_formalism}. We use the same labels for the media as in Section~\ref{sec:AnalogueAxionPhoton_MatrixFormalism}. There are $N$ interfaces, which we label by $r=0,\dots, N$. The first interface is at $z_0=z_1$ and the last interface is at $z_N$. The material properties in Eq.~\eqref{eq:Ansatz_v0_G0_rel} of each medium are labeled with the corresponding index~$r$ as a subscript. The constant $\safemaths{\Theta^0}$ does not influence the emitted photon signal at lowest order and is therefore neglected in the following. We further introduce a phase similar to the case of AQ-photon mixing is introduced in the ansatz, cf.\ Eq.~\eqref{eq:AQ_P_mixing_MatrixFormalism_Ansatz}. The external $B$-field $B_e$ is the same in all media and is polarized in the $y$-direction. Recall that we consider the DA zero-velocity limit with a zero spin wave velocity. Applying the interface conditions for the electromagnetic fields, cf.\ Eq.~\eqref{eq:DA_AQ_P_mixing_LinearizedInterface_H_1},~\eqref{eq:DA_AQ_P_mixing_LinearizedInterface_E}, and~\eqref{eq:DA_AQ_P_mixing_LinearizedInterface_E} and for the DA, cf.\ Eq.~\eqref{eq_DA_AP_P_mixing_Da}, at $z_r$ between medium $r-1$ and $r$ we obtain the following system of equations: \begin{eqnarray} \vc{t}_r=\mat{M}_r^{-1} \, \mat{M}_{r-1} \, \mat{P}_{r-1} \, \vc{t}_{r-1} \, , \end{eqnarray} with \begin{eqnarray} \mat{M}_{r}=\begin{pmatrix} 1&1&E_{a,r}^-\\ \frac{k^{r}_+}{\mu_r}&-\frac{k^{r}_+}{\mu_r}&0\\ a_{E,r}^+&a_{E,r}^+&1 \end{pmatrix}\, , \quad \vc{t}_{r}=\begin{pmatrix} \hat{E}_{r}^{++}\\\hat{E}_{r}^{+-}\\\hat{a}_{r}^{-} \end{pmatrix} \end{eqnarray} and, defining $\Delta_{r}^+ \equiv k^{r}_+(z_{r+1}-z_{r})$ \, , \begin{equation} \mat{P}_{r} = \mathrm{diag}(\safemaths{\mathrm{e}}^{i\Delta_{r}^+}, \, \safemaths{\mathrm{e}}^{-i\Delta_{r}^+}, \, 1) \, . \end{equation} In complete analogy to Section~\ref{sec:AnalogueAxionPhoton_MatrixFormalism} the $S$-matrix, which relates the states in media $0$ and $N$ to each other, is defined via \begin{eqnarray} \vc{t}_N=\mat{S}\,\vc{t}_0 \, . \end{eqnarray} The expressions for one, two, \ldots, $N$ interfaces are the same as in Eqs.~\eqref{eq:AQ_P_mixing_matrix_S_single_interface}--\eqref{eq:AQ_P_mixing_matrix_S_N_interface}. The unknown fields can be calculated from the $S$-matrix as follows: \begin{eqnarray} \begin{pmatrix} \hat{E}^{++}_{N}\\ \hat{E}^{+-}_{0}\\ \hat{a}^{-}_N \end{pmatrix} = -\hat{a}^{-}_0\begin{pmatrix} -1&S_{12}&0\\ 0&S_{22}&0\\ 0&S_{32}&-1 \end{pmatrix}^{-1}\cdot\begin{pmatrix} S_{13}\\ S_{23}\\ S_{33} \end{pmatrix} \, , \end{eqnarray} where the amplitude of the DAs is known and, has to lowest order the same magnitude in each medium $|\hat{a}^-_0| = |\hat{a}^-_r|$ for all $r = 1,\ldots, N$. The emitted $E$-field in medium~$N$ that propagates in the positive $z$-direction is called $\hat{E}^{++}_{N}$. The emitted $E$-field that propagates in the negative $z$-direction is called $\hat{E}^{+-}_{0}$. \subsubsection{Layer of topological insulator}\label{sec:one_layer_tmi} Let us now consider the case of a single TMI layer~(hosting a dynamical AQ) surrounded by vacuum. Dark axions are present in the form of an background field that oscillates in time with a frequency that is determined by the DA mass, $m_a$. The DAs mix with the AQs and photons. In terms of the matrix formalism, there are two interfaces~($N=2$), with media~$0$ and~$2$ are vacuum, and medium~$1$ is a TMI of thickness $d$. The TMI has constant refractive index $n^2=\epsilon$,\footnote{A nontrivial permeability, $\mu \neq 1$, can be incorporated straight-forwardly into the matrix formalism, described in the previous sections. However, we set $\mu = 1$ for simplicity and because this is a good approximation for the TMI materials discussed in Section~\ref{sec:params}.} and losses $\mat{\Gamma}$. The external $B$-field is present in all media. The DAs have the same magnitude in each medium, which is determined by the axion dark matter density $\rho_a$: $|\hat{a}^-_0|^2 = |\hat{a}^-_r|^2=2\rho_a/m_a^2$. The three-way mixing between DAs, AQs, and photons produces a photon at the boundary, which propagates away from the TMI layer. Note that, since we neglect the spin wave velocity, the system behaves essentially as a two-level system of massive photons and DAs. The emitted $E$-fields in media~$0$ and~$2$ are denoted by $\hat{E}_{0}^{+-}$ and $\hat{E}_{2}^{++}$, respectively. Recall that $\hat{E}_{0}^{+-}$ is the $E$-field amplitude that is emitted in negative $z$-direction in medium~$0$ and $\hat{E}_{2}^{++}$ is the emitted photon signal emitted in the positive $z$-direction in medium~$2$. We assume that the DA particles are effectively at rest. In this limit there is no preferred direction and the magnitudes of $\hat{E}_{2}^{++}$ and $\hat{E}_{0}^{+-}$ are the same. \paragraph{Lossless case ($\boldsymbol{\Gamma = 0}$).} The full formula for $\hat{E}_{2}^{++}$ from the matrix formalism is impractical. We therefore quote the result first order in the DA-photon coupling, which, assuming that $\safemaths{g_{a\gamma}}$~is sufficiently small, should be a good approximation: \begin{equation} \hat{E}^{++}_2 = \hat{a}^{-}_0 \, \frac{ \sin(\Delta/2) \left(\makeAQ{n}^2-1\right)}{\makeAQ{n} \left(\makeAQ{n} \sin(\Delta/2)+i \cos(\Delta/2)\right)} \, \safemaths{g_{a\gamma}} \, B_e + \mathcal{O}\left((\safemaths{g_{a\gamma}} \, B_e)^2\right) \, , \end{equation} where we define the phase depth $\Delta = d \makeAQ{k}=d\omega \makeAQ{n}$ (where $\makeAQ{k}$ is the lossless solution to the dispersion relation, eq.~\eqref{eq:dispersion_k_vz0}) and the effective refractive index is \begin{equation}\boxed{ \makeAQ{n}^2 = n^2\left(1-\frac{b^2}{\omega^2-\makeAQ{m}^2}\right) \, . } \end{equation} Furthermore, we used in the language of the matrix formalism, such that $a_{E,0}^+ = \frac{\safemaths{g_{a\gamma}} \, B_e}{\omega^2} = a_{E,2}^+$, $E_{a,0}^-=-\safemaths{g_{a\gamma}} \, B_e=E_{a,2}$, and $a_{E,1}^+ = \frac{\safemaths{g_{a\gamma}} \, B_e}{\makeAQ{n}^2\omega^2}$, $E_{a,1}^- = -\frac{\safemaths{g_{a\gamma}}\,B_e}{\makeAQ{n}^2}$. From now on, terms of the order $\mathcal{O}\left((\safemaths{g_{a\gamma}}\,B_e)^2\right)$ are omitted to simplify the expressions. We also normalize the field amplitude $\hat{E}_2^{++}$ to the DA-induced field in vacuum, $E_0 = \safemaths{g_{a\gamma}} \, B_e \, a^{-}_0$, \begin{equation} \frac{\hat{E}^{++}_2}{E_0}=-\frac{ \sin(\Delta/2) \left(1-\makeAQ{n}^2\right)}{\makeAQ{n} \left(\makeAQ{n} \sin(\Delta/2)+i \cos(\Delta/2)\right)} \, . \label{eq:DA_AQ_P_mixing_LayerBoost} \end{equation} Note that Eq.~\eqref{eq:DA_AQ_P_mixing_LayerBoost} has the same form as in the case of fields emitted from as a dielectric disk~\cite{Millar:2016cjp}, with the effective refractive index $\makeAQ{n}$, which is equivalent to introducing a photon mass. From analysing Eq.~\eqref{eq:DA_AQ_P_mixing_LayerBoost}, it becomes clear that a resonance occurs if the condition \begin{eqnarray} \Delta = \Delta_j=\makeAQ{n}(\omega_j) \, \omega_j d= (2j+1) \, \pi \, , \quad j\in\mathbb{N}_0 \, , \label{eq:resonance_condition} \end{eqnarray} is fulfilled. Here, $\omega_j$ are the resonance frequencies, which are located at \begin{eqnarray} \omega_j^2=\frac{\omega_\text{\tiny LO}^2}{2}+\sqrt{\frac{\omega_\text{\tiny LO}^4}{4}+\Delta_j^2\frac{b^2}{n^2d^2}}=\omega_\text{\tiny LO}^2+\delta\omega_j^2+\mathcal{O}\left(\frac{4\Delta_j^2b^2}{n^2d^2\omega_\text{\tiny LO}^4}\right) \, , \label{eq_AQ_DA_P_mixing_res_frequencies} \end{eqnarray} where we have defined \begin{eqnarray} \delta\omega_j^2\equiv\frac{\Delta_j^2b^2}{n^2d^2\omega_\text{\tiny LO}^2} \, . \end{eqnarray} From Eq.~\eqref{eq_AQ_DA_P_mixing_res_frequencies}, it is evident that -- in the lossless limit -- the resonance frequencies are always larger than $\omega_\text{\tiny LO}$, i.e.\ $\omega_\text{\tiny LO} < \omega_0 < \omega_1 < \ldots$. As the thickness of the TMI increases, $d\rightarrow\infty$, the resonant frequencies converge to the limiting value, i.e.\ $\omega_j \rightarrow \omega_\text{\tiny LO}$. Furthermore, Eq.~\eqref{eq_AQ_DA_P_mixing_res_frequencies} implies that the resonance frequency $\omega_j$ can be \emph{tuned} via the external $B$-field, since $b\propto B$. In Section~\ref{sec:ScanningRange} we investigate the frequency and, equivalently, DA mass range that can be scanned with our benchmark materials and realistic external $B$-fields. To understand why the frequencies defined via Eq.~\eqref{eq:resonance_condition} are indeed resonance frequencies, consider the following: Equation~\eqref{eq:resonance_condition} implies that $\cos\Delta_j = 0$ and, hence, the emitted field in Eq.~\eqref{eq:DA_AQ_P_mixing_LayerBoost} is $\hat{E}_2^{++}\sim 1/\makeAQ{n}^2 -1 \sim 1/\makeAQ{n}^2$ for small~$\makeAQ{n}$. In fact, the smaller~$\makeAQ{n}$ the more pronounced the resonance and, from Fig.~\ref{fig:Disp_relat_vz_zero}, we can see that this is the case when $\omega_j \sim \omega_\text{\tiny LO}$. Consequently, resonances that are further away from~$\omega_\text{\tiny LO}$~(i.e.\ $j>0$) have less pronounced peak values, such that the maximal value of $\hat{E}_2^{++}$ is always obtained for~$j=0$. Furthermore, Eq.~\eqref{eq_AQ_DA_P_mixing_res_frequencies} reveals that resonances are more pronounced for larger sample thickness~$d$ of a given TMI. We now investigate the resonances in more detail and provide analytical expressions for their widths and maximum values. Around the resonances we have $|\makeAQ{n}|\ll 1$, and Eq.~\eqref{eq:DA_AQ_P_mixing_LayerBoost} can be approximated as: \begin{eqnarray} \frac{\hat{E}^{++}_2}{E_0} = -\frac{1}{\makeAQ{n}^2 + i \, \makeAQ{n}\cot\left(\frac{\Delta}{2}\right)} \, . \label{eq:DA_AQ_P_mixing_LayerBoost_res} \end{eqnarray} Expanding $\makeAQ{n}^2$ around $\omega_j^2$ yields, to lowest order, \begin{eqnarray} \makeAQ{n}^2 = n^2\frac{\delta\omega_j^2}{b^2} \, , \end{eqnarray} where we require that $b^2 > \delta\omega_j^2$. The expansion of $\cot(\Delta/2)$ leads, to lowest order, to \begin{eqnarray} \cot\left(\frac{\Delta}{2}\right)=-\frac{1}{2}\frac{\omega_j d n^2}{2\makeAQ{n}(\omega_j)b^2}\left(\omega^2-\omega_j^2\right) \, . \end{eqnarray} The emitted fields in Eq.~\eqref{eq:DA_AQ_P_mixing_LayerBoost_res} can then be approximated about the resonances as follows: \begin{eqnarray} \frac{\hat{E}^{++}_2}{E_0}=-\frac{iA_j}{i\gamma_j\omega_j+(\omega^2-\omega_j^2)} \, , \label{eq:DA_AQ_P_mixing_LayerBoost_res_simp} \end{eqnarray} with \begin{eqnarray} \gamma_j&=&\frac{4}{d}\frac{\omega_j^2-\omega_\text{\tiny LO}^2}{\omega_j^2}\approx\frac{4\Delta_j^2b^2}{n^2d^3\omega_\text{\tiny LO}^4} \, ,\label{eq:TwoInterfaces_FWHM} \\ A_j&=&\frac{4b^2}{n^2\omega_jd}\approx \frac{4b^2}{n^2\omega_\text{\tiny LO} d} \, , \end{eqnarray} where we used that in a resonant case $\omega_j$ is close to $\omega_\text{\tiny LO}$. The power output on resonance is: \begin{eqnarray} P = \frac{|E_0|^2}{2}\beta^2 A \, , \label{eqn:boost_power} \end{eqnarray} where $A$ is the surface area of the TMI layer and where we used that the Poynting vector in $z$-direction has magnitude $\frac{1}{2}|\hat{E}^{++}_2|^2$. The power boost factor~$\beta^2$ is defined as \begin{eqnarray} \beta^2=\left|\frac{\hat{E}_2^{++}}{E_0}\right|^2 \, . \label{eq:beta_definition} \end{eqnarray} Following Ref.~\cite{Millar:2016cjp}, we refer to the unsquared~$\beta$ as the boost factor. The full width at half the maximum value~(FWHM) of $\beta^2$ about the resonance $\omega_j$ is given by $\gamma_j$. The highest value at the resonance, the peak amplitude, $\omega_j$ is given by \begin{eqnarray} \beta^2(\omega_j)=\frac{A_j^2}{\gamma_j^2\omega_j^2}\approx\left(\frac{d\omega_\text{\tiny LO}}{\Delta_j}\right)^4\approx\frac{1}{\makeAQ{n}(\omega_j)^4}. \label{eq:TwoInterfaces_Maximum_at_resonance} \end{eqnarray} \begin{figure} \centering \includegraphics[width=0.49\textwidth]{{figures/DA_AP_P_mixing/E2pp_vdependence_d02mm}.pdf} \includegraphics[width=0.49\textwidth]{{figures/DA_AP_P_mixing/E2pp_vdependence_d2mm}.pdf}\\ \includegraphics[width=0.49\textwidth]{{figures/DA_AP_P_mixing/E2pp_vdependence_d5mm}.pdf} \includegraphics[width=0.49\textwidth]{{figures/DA_AP_P_mixing/E2pp_vdependence_d10mm}.pdf}\\ \caption{\textbf{Effect of material thickness, $d$, on the boost factor.} In the lossless limit for one layer $\beta$ is given by Eq.~\eqref{eq:DA_AQ_P_mixing_LayerBoost}. We assume zero DA velocity ($v_\text{\tiny DM}=0$, valid when the resonance is wide compared to the DA linewidth). Typical material values for \MnBiTe{2}{2}{5} TMI with an external $B$-field $B_e$ of $\SI{2}{\tesla}$ are chosen, cf.\ Table~\ref{tab:derived_params} and Eq.~\eqref{eqn:b_meV}. Vertical lines mark the frequencies $\omega_\text{\tiny LO}$ and the resonance frequencies $\omega_j$. The resonance boost increases, and bandwidth decreases, as the thickness $d$ increases. } \label{fig:DA_AQ_P_mixing_Signal_validation} \end{figure} With Eq.~\eqref{eq:TwoInterfaces_Maximum_at_resonance} it now becomes explicitly clear that the higher modes have a lower maximum resonance value, since $\Delta_{j}<\Delta_{j+1}$. Also large layer thicknesses $d$ increases the maximal emitted $E$-field on resonance. Therefore to achieve a certain amount of signal boost from one layer of TMI a relatively large layer thickness $d>1/\omega$ is needed. Equation~\eqref{eq:TwoInterfaces_FWHM} tells us the necessary information about the width of the resonance. First note, that going to larger modes $j$ or larger $b$ will increase the FWHM $\gamma_j$. Relatively thick TMI layers, i.e.\ large $d$, yield a very narrow resonance. Therefore a good balance for $d$ has to be found because $d$ should be relatively large to reach a high resonance value. The refractive index $n$ does not affect the maximum value of the resonance, cf.\ Eq.~\eqref{eq:TwoInterfaces_Maximum_at_resonance}. However large $n$ makes the FWHM $\gamma_j$ very small. We therefore conclude that it is advantageous to have low $n$ materials fro broadband response. In Fig.~\ref{fig:DA_AQ_P_mixing_Signal_validation} the boost amplitude $\beta$ is shown for our benchmark material \MnBiTe{2}{2}{5} for four different layer thicknesses. For the thinnest case, $d=\SI{0.2}{\milli\metre}$, no clear enhancement of the boost factor is reached, since for this relatively small thickness we obtain a resonance frequency $\omega_0$ (dashed vertical line) that is too far away from $\omega_\text{\tiny LO}$ (solid vertical line) such that $\makeAQ{n}(\omega_0)$ is not much smaller than unity. For $d=\SI{2}{\milli\metre}$ we have a resonance at $\omega_0$. A larger width, but a lower maximum value, is realized at the second resonance peak $\omega_1$. According to Eq.~\eqref{eq:TwoInterfaces_FWHM}, the width of the resonance around $\omega_1$ should be broader by a factor of about $(\Delta_1/\Delta_0)^2 = 9$ than the resonance width around $\omega_0$. For thicker samples still, $d = \SI{5}{\milli\metre}$, $d=\SI{10}{\milli\metre}$ the resonant boost at $\omega_0$ increases further. In particular from Eq.~\eqref{eq:TwoInterfaces_Maximum_at_resonance} we find that the peak heights scale as $(d_1/d_2)^2$. Furthermore, the width of the peak around $\omega_0$ shrinks as $d$ increases. From Eq.~\eqref{eq:TwoInterfaces_FWHM} we can directly read off that the width shrinks by a factor $(d_2/d_1)^3$. For $d=\SI{10}{\milli\metre}$ the linewidth of $\beta$ is on the order of the DA linewidth, $10^{-6}m_a$. Without taking into account material losses the linewidth of the power boost factor is larger that the axion linewidth if \begin{equation} \gamma_j>10^{-6}\omega_j\approx 10^{-6}\omega_\text{\tiny LO}. \label{eq:Grammaj_eq_AqxionLinewidth} \end{equation} Equation~\eqref{eq:Grammaj_eq_AqxionLinewidth} tells us the requirements for the material parameters such that the power boost factor bandwidth is larger than the axion linewidth. Before we discuss the influence of material losses we want to give a clearer physical picture of the observed resonances. In Fig.~\ref{fig:DA_AQ_P_interpretation} we consider three domains. The middle domain is a TMI layer with thickness $d$ and with an effective refractive index $n_\Theta=\frac{1}{2}$. The two outer domains are vacuum with $n=1$. The axion induced field, which is shown in blue, is one in vaccum and enhanced inside the TMI, cf.\ Eq.~\eqref{eq:DA_AQ_P_mixing_ET_Ea_Def}. The enhancement of the axion induced field in the TMI layer is proportional to $\frac{1}{n_\Theta^2}$. Consider now the interface between the TMI and the left vacuum. To fulfil the continuity requirement of the total electric field, propagating modes (red) are emitted to both sides. One can check that this is indeed the case by adding the red and blue amplitudes at the interface. The emitted amplitude in vacuum is one, while the propagating fields inside the TMI are enhanced, since they are proportional to $\frac{1}{n_\Theta^2}$. The outlined scenario happens at both interfaces of the TMI. Let us first consider the emitted radiation that propagates inside the TMI from left to right. The radiation hits the right interface. The transmission and reflection coefficients determine the fraction of the radiation, which is transmitted to the outside or reflected. For plane waves we have $T=\frac{2 \makeAQ{n}}{1+\makeAQ{n}}$ and $R=\frac{n_\Theta-1}{1+n_\Theta}$. The important point is that the transmitted radiation is added in phase ($T>0$) to the radiation which is emitted from the right interface to the outside. The part of radiation which is reflected at the right interface receives a phase shift since $R<0$. Therefore the reflected radiation is coherently added to the radiation which is emitted from the right surface to the left in the TMI. A similar scenario happens at the left interface. Now since $n_\Theta\ll 1$ the transmission coefficient is small and the reflection coefficient is large. Therefore the radiation bounces many times between both interfaces. After each bounce a small fraction of the radiation is transmitted to the outside. This is exactly how a cavity works and due to the fact that the transmitted fields to the outsides are all added coherently the total emitted field is enhanced by the boost factor $\beta=1/\makeAQ{n}^2$. The total emitted field is shown in green in Fig.~\ref{fig:DA_AQ_P_mixing_Signal_validation}. With this physical picture in mind we can also understand why larger thicknesses $d$ lead to larger $\beta$'s on resonance. To fulfill the resonance condition $\makeAQ{n}(\omega_j)\omega_j d=\pi$ we need a smaller $\makeAQ{n}(\omega_j)$ the larger we make $d$. However making $\makeAQ{n}(\omega_j)$ smaller leads to a larger axion induced field and therefore also to a larger total emitted field. \begin{figure} \centering \includegraphics[width=0.49\textwidth]{{figures/DA_AP_P_mixing/physicalUnderstanding_6}.pdf} \caption{Physical understanding of the resonant enhancement of the emitted electromagnetic fields from the mixing between DAs, AQs and photons. The TMI layer (gray) of thickness $d$ has an effective refractive index $\makeAQ{n}=\frac{1}{2}<1$ and is surrounded by vacuum. The axion induced field (blue) is enhances inside the TMI and since the total electric field has to be continuous over the two interfaces propagating modes (red) are emitted off both interfaces. The $E$-fields are given in units of the axion-induced field in vacuum, $E_0$. Due to the smallness of $\makeAQ{n}$ around the resonance the transmission coefficient for the fields which propagate inside the TMI is small, while the reflection coefficient is large. Therefore effectively the TMI works as a cavity. After bouncing many times between the two interfaces the effective emitted field is proportinal to $\beta\gg 1$. In the specific example of $\makeAQ{n}$ the emitted field is four times larger than the axion induced field in vacuum ($\beta=4$). A more detailed description can be found in the text.} \label{fig:DA_AQ_P_interpretation} \end{figure} \paragraph{Case with losses ($\boldsymbol{\Gamma \neq 0}$).} In the case of losses we can use that $g_{a\gamma}$ is a relatively small coupling and therefore $k_+\rightarrow \makeAQ{k}$, where $\makeAQ{k}$ now includes losses, cf.\ Eq.~\eqref{eq:dispersion_relation_vz0_losses}. $k_-\rightarrow k_a=0$ in the axion zero velocity limit. Furthermore we have shown in Section~\ref{sec:AQ_DA_P_mixing_SolOneDimModel} that the relations for $a_E$ and $E_a$ still hold when we include the losses into the effective refractive index. In conclusion we can use Eq.~\eqref{eq:DA_AQ_P_mixing_LayerBoost} also if losses are present. The only thing that we have to do is to use the effective refractive index which includes losses: \begin{eqnarray}\boxed{ \makeAQ{n}^2=n^2\left(1+\frac{b^2}{m^2_\Theta-\omega^2-i\omega\Gamma_m}+i\frac{\Gamma_\rho}{\omega}\right). } \label{eq:AQ_DA_P_mixing_effective_n_losses} \end{eqnarray} We subsequently neglect mixed losses. \begin{figure} \centering \includegraphics[width=0.49\textwidth]{{figures/DA_AP_P_mixing/LineLegendM}.pdf}~~~~~~ \includegraphics[width=0.49\textwidth]{{figures/DA_AP_P_mixing/LineLegendR}.pdf}\\ \includegraphics[width=0.49\textwidth]{{figures/DA_AP_P_mixing/E2ppMTot_d1mm}.pdf} \includegraphics[width=0.49\textwidth]{{figures/DA_AP_P_mixing/E2ppRTot_d1mm}.pdf}\\ \caption{\textbf{Effect of losses on the boost factor.} TMI layer of thickness $d=\SI{1}{\milli\metre}$. Other parameters are as Fig.~\ref{fig:DA_AQ_P_mixing_Signal_validation}. \emph{Left}: Varying magnon losses $\Gamma_m$, with $\Gamma_\rho=0$. \emph{Right}: Varying photon losses $\Gamma_\rho$ with $\Gamma_m=0$.} \label{fig:DA_AQ_P_mixing_Signal_Losses_main} \end{figure} We begin by expanding the boost factor around the resonance frequencies $\omega_j$, which remain unmodified by the losses, cf.\ Eq.~\eqref{eq:resonance_condition}. Then an expansion can be done in complete analogy to the lossless case. For $|1-\makeAQ{n}^2(\omega_j)|\approx 1$ the emitted field takes the same form as in the lossless case, cf.\ Eq.~\eqref{eq:DA_AQ_P_mixing_LayerBoost_res}, where $\makeAQ{n}$ is given now by Eq.~\eqref{eq:AQ_DA_P_mixing_effective_n_losses}. We now expand the two terms, $\makeAQ{n}^2$ and $\cot\left(\frac{\Delta}{2}\right)$, that appear in the denominator in Eq.~\eqref{eq:DA_AQ_P_mixing_LayerBoost_res}. We find \begin{eqnarray} \makeAQ{n}^2(\omega_j)=n^2\left(\frac{\delta\omega_j^2}{b^2}+i\tilde{\Gamma}_j^2\right) \label{eq:AQ_DA_P_mixing_losses_nAQ_expainsion} \end{eqnarray} with $\tilde{\Gamma}_j^2\equiv\frac{\Gamma_\rho}{\omega_j}+\frac{\omega_j\Gamma_m}{b^2}$. In deriving Eq.~\eqref{eq:AQ_DA_P_mixing_losses_nAQ_expainsion} we have assumed that $b^2>\delta\omega_j^2$ and $b^2>\omega_j\Gamma_m$. If such a condition is not fulfilled, the material is likely too lossy to be useful in DA detection. Next we consider the nearly lossless limit, i.e. $\frac{\delta\omega_j^2}{b^2}>\tilde{\Gamma}_j^2$. In this case the relevant expressions for us are $\makeAQ{n}(\omega_j)=n\frac{\delta\omega_j}{b}\left(1+i\frac{1}{2}\frac{\tilde{\Gamma}_j^2}{\delta\omega_j^2}b^2\right)$ and $\makeAQ{n}^2(\omega_j)=n^2\frac{\delta\omega_j^2}{b^2}$, where we have written down only the important leading order terms. Next we expand the $\cot\left(\frac{\Delta}{2}\right)$ term: \begin{eqnarray} \cot\left(\frac{\Delta}{2}\right)=\cot\left(\frac{\Delta }{2}\right)_{\omega^2=\omega_j^2}+\left[\frac{\partial}{\partial \omega^2}\cot\left(\frac{\Delta}{2}\right)\right]_{\omega^2=\omega_j^2}\left(\omega^2-\omega_j^2\right)+\cdots \label{eq:DA_AQ_P_mixing_losses_cotExpainsion} \end{eqnarray} where we approximate $\omega\approx\omega_j$ for the linear dependencies and the dots represent higher order terms, which we do not have to consider for a reasonable expansion. The expansion in Eq.~\eqref{eq:DA_AQ_P_mixing_losses_cotExpainsion} can be simplified in the small thickness limit, ${\rm Im}\left[\Delta(\omega_j)\right]<1$ Equation~\eqref{eq:DA_AQ_P_mixing_losses_cotExpainsion} then simplifies to: \begin{eqnarray} \cot\left(\frac{\Delta}{2}\right)=-i\frac{{\rm Im}\left[\Delta(\omega_j)\right]}{2}-\frac{1}{4}\frac{\Delta_j}{\delta\omega_j^2}\left(\omega^2-\omega_j^2\right) \end{eqnarray} Putting everything together we obtain -- as in the lossless case, cf.\ Eq.~\eqref{eq:DA_AQ_P_mixing_LayerBoost_res_simp} -- a Lorentzian shaped functional dependence around the resonance frequencies. The width of the curve receives an additional term in the presence of losses: \begin{equation} \gamma_j=\frac{4b^2\Delta_j^2}{n^2\omega_\text{\tiny LO}^4d^3}+\left(\Gamma_m+\frac{b^2}{\omega_\text{\tiny LO}^2}\Gamma_\rho\right)\,. \label{eq:gammaloss} \end{equation} and the amplitude $A_j$ remains unchanged with respect to the lossless case. In Fig.~\ref{fig:DA_AQ_P_mixing_Signal_Losses_main} we show the boost factor $\beta$ around the first resonance $\omega_0$ for a layer thicknesses of $d=\SI{1}{\milli\metre}$ for different values of the loss parameters $\Gamma_\rho$ and $\Gamma_m$. We observe that each loss parameter has a similar quantitative effect on redicing the boost factor peak, with magnon losses being only slightly more important. This is due to the fact that $\Gamma_m$ directly enters the resonance, cf.\ Eq.~\eqref{eq:AQ_DA_P_mixing_effective_n_losses}, while photon losses $\Gamma_\rho$ only enter via an additional term that is added to the other terms of the dispersion relation. Next let us discuss the effect of losses on the higher resonance frequencies. In Fig.~\ref{fig:DA_AQ_P_mixing_Signal_Losses_higher_res} we show the first two resonance peaks at $\omega_0$ and $\omega_1$ for $d=\SI{5}{\milli\metre}$. In the lossless case we have $\beta(\omega_0)\approx 500$, cf.\ Fig.~\ref{fig:DA_AQ_P_mixing_Signal_validation}. The reduction of the $\omega_0$ resonance is therefore more severe than the resonance at $\omega_1$. This is simply the case because the system is more resonant at $\omega_0$ and losses lead to a larger reduction. We conclude that losses may lead to a scanning strategy in the end that uses a higher resonance mode $j>0$. However, the final scanning strategy can only be given when the losses are determined experimentally. \begin{figure} \centering \includegraphics[width=0.49\textwidth]{{figures/DA_AP_P_mixing/LineLegendM}.pdf}~~~~~~ \includegraphics[width=0.49\textwidth]{{figures/DA_AP_P_mixing/LineLegendR}.pdf}\\ \includegraphics[width=0.49\textwidth]{{figures/DA_AP_P_mixing/E2ppMTot_d5mm}.pdf} \includegraphics[width=0.49\textwidth]{{figures/DA_AP_P_mixing/E2ppRTot_d5mm}.pdf} \caption{\textbf{Effect of losses on the higher resonance peaks.} TMI layer of thickness $d=\SI{5}{\milli\metre}$. Other parameters are as Fig.~\ref{fig:DA_AQ_P_mixing_Signal_Losses_main}. The value of $\beta$ at $\omega_0$ without losses is around $\beta\approx 500$, cf.\ Fig.~\ref{fig:DA_AQ_P_mixing_Signal_validation} (bottom left). Therefore the relative reduction due to losses at the resonant frequencies is larger at $\omega_0$ than at $\omega_1$.} \label{fig:DA_AQ_P_mixing_Signal_Losses_higher_res} \end{figure} We can see from Eq.~\eqref{eq:gammaloss} that the point where losses dominate is a function of the refractive index, thickness of the material and intrinsic losses. While, in the lossless case, increasing the thickness of the layer increases the resonance, we can see that this is limited by the losses, which give a width independent of $d$. Looking at the height of the resonance in the loss dominated limit is quite revealing \begin{equation} \beta(\omega_j)=\frac{A_j}{\gamma_j\omega_j}=\frac{4b^2}{n^2\omega_\text{\tiny LO}^2 d}\frac{1}{\frac{4b^2\Delta_j^2}{n^2\omega_\text{\tiny LO}^4d^3}+\frac{b^2}{\omega_\text{\tiny LO}}\left(\frac{\omega_\text{\tiny LO}\Gamma_m}{b^2}+\frac{\Gamma_\rho}{\omega_\text{\tiny LO} }\right)}\overset{\text{loss dom.}}{\approx} \frac{4}{dn^2\left(\frac{\omega_\text{\tiny LO}^2}{b^2}\Gamma_m+\Gamma_\rho\right)}\,. \label{eq:DA_AQ_P_betaomegaj_losses} \end{equation} Unlike the lossless case, increasing $d$ now hinders the resonance height, if not its width. Similarly, while $n$ does not effect $\gamma_j$, again the height is significantly reduced on resonance, further discouraging high $n$ materials. Once the loss term of a material is known, the optimal thickness can be found by requiring that losses do not dominate. To get an idea of the scale of the maximum losses that still allow for useful DA detection, we plot the maximum of $\beta$ at the first resonance $\omega_0$ as a function of $d$ in Fig.~\ref{fig:betaloss}. The different colours indicate different losses. We also vary the refractive index around our best guess value, $n=5$: the upper band for each colour corresponds to $n=3$, while the lower to $n=7$. Lower values of $n$ lead to greater boost factor maxima. \begin{figure} \centering \includegraphics[width=0.7\textwidth]{figures/DA_AP_P_mixing/optimald.pdf} \caption{Maximal boost factor $\beta$ on resonance at $\omega_0$ with respect to the TMI layer of thickness $d$ for different levels of loss. Material parameters correspond to \MnBiTe{2}{2}{5} with $B=\SI{2}{T}$. The bands show variation of the refractive index from $n=3$ (upper curve of the bands) to $n=7$ (lower curve of each band). } \label{fig:betaloss} \end{figure} From Fig.~\ref{fig:betaloss} we can read off that for given material parameters there is an optimal thickness, which maximizes $\beta$ on resonance. Analytically one can show \begin{eqnarray}\boxed{ d_{\rm opt}=\frac{2}{\omega_\text{\tiny LO}}\left(\frac{ \Delta_j}{n}\right)^{\frac{2}{3}}\left(\frac{1}{\frac{ \Gamma_\rho}{\omega_\text{\tiny LO}} +\frac{\Gamma_m \omega_\text{\tiny LO}}{b^2}}\right)^{\frac{1}{3}}. } \label{eq:DA_AQ_P_optimalThickness} \end{eqnarray} Note that the otimal thickness $d_{\rm opt}$ gives a thickness that is consistent with the small $d$ limit that we have used in the expansion only if $2\left(n^2\tilde{\Gamma}_j^2\Delta_j\right)^{\frac{1}{3}}<1$. This inequality is fulfilled for the cases that we are interested in. In the zero loss limit the optimal thickness $d_{\rm opt}$ diverges . However it is important to stress that in this limit $\gamma_j\to 0$ and our optimal thickness has to be understood as the thickness that maximizes $\beta$ on resonance. Which thickness will be the optimal one with respect to a scanning strategy and sensitivity reach will be discussed in the next section. If the losses are finite they enter with the third root. Also note that scanning different frequencies changes $\omega_\text{\tiny LO}$ and therefore in principle for each scanning frequency a different optimal layer thickness is needed. It is not possible to change the layer thickness for each scanning frequency, and therefore the true optimal thickness will depend on the details of the frequencies to be scanned and the scan strategy. Note that in Fig.~\ref{fig:betaloss} we are approximating the boost factor as a resonance. However, as $\beta\to1$ the boost factor is no longer well described by a Lorentzian. For the purposes of an experiment, all advantage over say a dish antenna is then lost. To estimate the highest allowable losses, we can note that the strongest resonance occurs when $\delta_j=Pi$ and $d=d_{\rm opt}$. By requiring that $\beta\gg 1$ we then find the requirement \begin{equation} \frac{\Gamma_\rho}{\omega_{\rm LO}}+\frac{\Gamma_m\omega_{\rm LO}}{ b^2}\ll \frac{1}{2n^2}\,. \end{equation} Thus the highest allowable losses are actually set by the refractive index of the material, at least in order to ensure a resonance occurs. \section{Dark Matter Discovery Potential}\label{sec:DM-detection} In this section, we review the suitability of TMIs hosting AQs for DA detection. We systematically investigate the discovery reach of the proposed single-TMI-layer benchmark experiment, and the necessary requirements for THz detectors. Astrophysical limits on the axion mass and coupling, and motivation for axion DM in the milliectronvolt range, is reviewed in Appendix~\ref{sec:axion_dm}. \subsection{Scanning range}\label{sec:ScanningRange} Before considering THz detection technology and the reach of the proposed experiment in terms of the DA coupling, $\safemaths{g_{a\gamma}}$, we first determine the range of DA masses that can in principle be accessed using TMIs. Recall from Section~\ref{sec:one_layer_tmi} that the resonance frequencies of the experiment, $\omega_j$, can be tuned by changing the external magnetic field, $\safemaths{B_\text{e}}$. To estimate the resulting range, we look at the first resonance $\omega_0$ since $|\beta (\omega_0)| > |\beta (\omega_j)|$ for all $j > 0$. Doing so, we find that \begin{equation} \omega_0(\safemaths{B_\text{e}}) \approx \omega_\text{\tiny LO}(\safemaths{B_\text{e}})=\sqrt{\makeAQ{m}^2 + b^2(\safemaths{B_\text{e}})} \, , \label{eq:Scanning_range} \end{equation} where $\makeAQ{m}$ is the AQ~mass and $b$ is given by Eq.~\eqref{eqn:b_meV}. In the limit of $\safemaths{B_\text{e}} \rightarrow 0$ we simply have $\omega_0 \rightarrow \makeAQ{m}$, while for very strong $B$-fields of $\safemaths{B_\text{e}} = \SI{10}{\tesla}$ and our benchmark parameters in Table~\ref{tab:toorad_params} (our best approximation to \MnBiTe{2}{2}{5}), we find that \begin{equation} \SI{1.8}{\meV} = \makeAQ{m} < \omega_0 < \SI{8.2}{\meV} \, . \label{eq:numerical_scanning_range} \end{equation} As of now, the DA mass is unknown, so it is desirable to cover a wide range of axion masses with a given TMI crystal. Since typical magnetic fields in the lab are restricted to the order of a few tesla, we cannot arbitrarily increase $\safemaths{B_\text{e}}$ and hence need to maximise the relative response of the AQ to $\safemaths{B_\text{e}}$, viz. \begin{equation} \frac{1}{\makeAQ{m}}\frac{\mathrm{d} b}{\mathrm{d} \safemaths{B_\text{e}}} = \frac{\alpha}{\pi\sqrt{2}} \frac{1}{\sqrt{\epsilon}\makeAQ{f}\makeAQ{m}} \approx \frac{0.46}{\si{\tesla}} \, \left(\frac{25}{\epsilon} \right)^{1/2} \left(\frac{\SI{70}{\eV}}{\makeAQ{f}}\right) \left(\frac{\SI{1.8}{\meV}}{\makeAQ{m}}\right) \, . \label{eq:tunability} \end{equation} This means that smaller $\makeAQ{f}$, $\makeAQ{m}$, or $\epsilon$ are beneficial for a TMI in order to cover a larger range of frequencies for a given maximum possible value of the applied $B$-field. A large relative AQ response in Eq.~\eqref{eq:tunability} is only beneficial if the applied $B$-field value can be controlled to sufficiently high accuracy over the course of the measurement. This is because fluctuations in $\safemaths{B_\text{e}}$ will translate into fluctuations in $\omega_0$, which might result in the resonance around $\omega_0$ fluctuating in and out of the bandwidth of the detector. The magnet design for TOORAD will thus require relatively precise control of the $B$-field, and could be a limitation in cost, field strength, or total volume. \subsection{Detectors for THz Radiation}\label{sec:detectors} Searching for dark DAs is challenging because the resultant photon signal is very weak and can be hidden in wide range of frequencies, since the DA mass in unknown. To improve our chance of success, we need to understand the intrinsic and extrinsic background noise of our photon detection system, coupling efficiency of photon detectors to our proposed experimental setup, and scalability in collecting more photons from the material that hosts the AQ. In earlier sections, we have discussed the generation of electromagnetic radiation in the THz~(millimeter wave) regime using AQs for DA detection. We will focus here to the available technology to detect these photons with energies from 0.01 to a few THz. Detectors that have high sensitivity for the search of DAs in our frequency range of interest include amplifiers, heterodyne mixers, bolometers, and single-photon detectors~(SPDs). We shall consider experiments performing at temperatures much lower than the frequency, i.e.\ $T \ll \omega$ to avoid the thermal photons from the blackbody radiation and to focus on the fundamental limit of photon detection~\cite{Caves:1982hd, Mather:1984wt, Tucker:1985bd, Clerk:2010dh}. \begin{table} \caption{Comparison of detector technologies for searching dark matter using quasiparticle axions. See the main text for explanations of the symbols.\label{tab:DetectorComp} } \centering \begin{tabular}{llll} \toprule Detector type & \multicolumn{2}{l}{Fundamental noise limit} & Metric \\ \midrule \makecell[l]{Amplifiers \&\\ \hspace{0.5em} heterodyne mixers} & quantum noise & $\hbar\omega$~\cite{Caves:1982hd, Tucker:1985bd, Clerk:2010dh} & $T_{Q}$ \\ Bolometers & thermal fluctuations & $\sqrt{4G_ \text{th} k_\text{B} T_0}$~\cite{Mather:1984wt, 2019_Lee} & $\mathrm{NEP}$ \\ Calorimetric SPDs & \makecell[l]{energy resolution\\ for finite bandwidth} & $\sqrt{C_\text{th}k_\text{B}T_0^2}$~\cite{MCCAMMON:2005br, Walsh:2017kk} & dark count rate \\ \bottomrule \end{tabular} \end{table} Since amplifiers and heterodyne mixers, e.g.\ superconductor\hyp{}insulator\hyp{}superconductor~(SIS) and hot-electron bolometric mixers, are sensitive to the voltage or the electric field of the signal, we can put them into one category, while bolometers and SPDs go into another. We present a comparison of all detector types discussed in what follows in Table~\ref{tab:DetectorComp}. State-of-the-art amplifiers and mixers can detect a very weak signal from as little as a few photons by parametric amplification or non-linear mixing processes. As the signal-to-noise ratio is given by the ratio of the number of photons in the signal to that in the amplifier noise, the amplifier noise can be quantified naturally in units of photon quanta, i.e.\ $\hbar\omega$, or amplifier noise temperature, i.e.\ $T_{Q} = \hbar\omega/k_\text{B}$. For the linear, phase-preserving amplification, the minimum amplifier noise is one quanta~\cite{Caves:1982hd,Tucker:1985bd, Clerk:2010dh}. Half of this comes from the quantum fluctuation from the parametric pumping port used in modulation for the amplification gain, whereas another half from the quantum noise in the signal port. At lower microwave frequencies, quantum noise-limited amplifiers have been achieved based on parametric effects~\cite{Yurke:1989ev, Brubaker:2017ee, Aumentado:2020gf} and, at higher frequencies, in SIS detectors~\cite{Tucker:1985bd, McGrath:1998jj}, hot electron bolometric mixers~\cite{Zhang:2010gn, LaraAvila:2019gs}, and plasmonic mixers~\cite{Wang:2019gz}. However, the insertion loss and insufficient first amplification gain may degrade the overall performance, resulting in a higher system noise temperature $T_{\rm sys} \geq T_{Q}$. For a total measurement time, $t_{\rm meas}$, and measurement bandwidth, BW, the average noise is given by the Dicke radiometer formula, \begin{equation} \text{Noise} = \frac{T_{\rm sys}}{\sqrt{ {\rm BW}t_{\rm meas}}} \end{equation} Instead of amplifying the voltage, bolometers are high-sensitivity, square-law detectors that measure the power of microwave and far-infrared radiation. They operate by first absorbing the incident radiation and subsequently inferring the radiation power from the temperature rise due to the increase of its internal energy. The bolometer sensitivity is quantified by noise equivalent power~(NEP), measured in units of \si{\W/\sqrt{\Hz}}, i.e. the power fluctuations of the bolometer in absence of any incident power during a 1-second averaging window. Previous experiments project NEP values as low as \SI{e-21}{\W/\sqrt{\Hz}}~\cite{Wei:2008jw}. The sensitivity of this technique is not limited by quantum fluctuations, but rather by the fundamental thermal fluctuations~\cite{Mather:1984wt, 2019_Lee}. This fundamental-fluctuation-limited NEP is given by $\sqrt{4G_\text{th}k_\text{B}T_0}$ with $G_\text{th}$ being the thermal conductance of the bolometric material to the thermal bath, and $T_0$ is the bolometer (bath) temperature. Therefore, bolometers for DA detection will require to operate at the lowest achievable temperatures with the least thermal conductance to its surrounding. In addition to power detection by bolometer, single-photon detectors (SPD) is another viable option to capture the photons generated from DAs. Efficient DA searches will require the SPD to have simultaneously a high quantum efficiency to register every precious photon, and a low dark count rate to minimize the false positive signal. Naturally, these two requirements are competing against each other because a higher quantum efficiency also means the detector can be triggered by noises to produce a count in the absence of photons. Fortunately at cryogenic temperatures, we can employ superconductors to detect photons efficiently and accurately. When the photon energy is larger than the superconducting gap energy, $\Delta_{\text{S}}$, the incident photons can break Cooper pairs and produce a sizable number, $\eta_{\text{d}}\hbar\omega/\Delta_{\text{S}}$, of quasiparticles, with $\eta_{\text{d}} < 1$ being the energy downconversion efficiency \cite{Day:2003tl}. These quasiparticles can then transduce into a readout signal of resistance, temperature, kinetic inductance, or excess current in SPDs such as superconducting nanowire SPD \cite{Goltsman:2001eaa, Hochberg:2019dj}, transition edge sensor \cite{Irwin:2005book}, microbolometer \cite{Wei:2008jw,doi:10.1063/1.4739839}, Josephson junction SPD \cite{Walsh:2020ty}, kinetic inductance detector \cite{Day:2003tl}, and superconducting tunneling junction detector \cite{Peacock:1996io}. SPDs based on this mechanism have been highly successful especially in the near infrared domain when the relatively high photon energy can produce a considerable amount of quasiparticles. Single-photon detection in THz regime is a lot more challenging. Microbolometers based on the superconducting nanowire have demonstrated experimentally energy-resolved, single-photon detection down to \SI{38}{\THz}~\cite{doi:10.1063/1.4739839} and projection give energy resolutions as low as \SI{0.12}{\THz}~\cite{Wei:2008jw}. Recently, quantum capacitance detector \cite{Echternach:2018iw} has demonstrated the detection of \SI{1.5}{\THz} by sensitively sensing the change of quantum capacitance from the quasiparticle through a resonator. Since the photon detection mechanism depending on Cooper pair breaking will inevitably become more and more challenging at lower millimeter wave frequencies, we can also exploit the giant thermal response in graphene~\cite{Vora:2012cs, Fong:2012ut, McKitterick:2013ue, Walsh:2017kk} to absorb the incident photon first before measuring the temperature rise. The concept of calorimetric SPDs has been developed for x-ray detection and superconducting SPDs~\cite{Moseley:1984wh, MCCAMMON:2005br}. In contrast to bolometers, single photon detection not strictly limited by thermal fluctuations if a large enough detection bandwidth and high sensitivity temperature transducer is available. Intuitively, this is because when the photon impinges into the detector, SPDs produce a sharp rising signal that can be observed with a wide-bandwidth detector. Quantitatively, this is due to the improvement of signal-to-noise ratio through a matched filter that is tailored to the shape of the expected signal from a single photon. Nevertheless, the energy resolution, $\Delta\epsilon = \sqrt{C_\text{th}k_\text{B}T_0^2}$ with $C_\text{th}$ being the thermal heat capacity of the calorimeter, is still a good benchmark for calorimeter SPDs. When the NEP is white-noise limited, we can use~\cite{Moseley:1984wh} \begin{equation} \Delta\epsilon = {\rm NEP}\sqrt{\frac{C_\text{th}}{G_\text{th}}} \end{equation} to compare the sensitivity with bolometers. For DA searches in wide frequency bandwidth, graphene-based single photon detection also has an advantage in wide bandwidth photon coupling by impedance matching the input to the photon absorber with an antenna. Spiral, log-periodic, and bow-tie antennas have been implemented for graphene detectors~\cite{Vicarelli:2012de, Bandurin:2018cx}. As graphene-based bolometers have been demonstrated recently in the microwave regime~\cite{2019_Lee, Kokkoniemi:2020dk} with energy resolution projections to a few \SI{10}{\GHz}, it can potentially complement SPDs by operating at millimeter wave frequencies. In addition to superconductor-based and calorimeter SPD, superconducting qubits and quantum dots can also detect single photons \cite{Dixit:2020tv, Komiyama:2000eo}. These nano fabricated devices have discrete energy states and can serve effectively as artificial atoms. When incident photons promote the qubit or quantum dot to an excited state, they can be detected by measuring the state of the artificial atoms. Detection of single photons has been demonstrated using superconducting qubits at microwave frequencies \cite{Johnson:2010tn, Kono:2018ij} and using quantum dots as low as \SI{1.5}{\THz} \cite{Komiyama:2000eo} with photon coupling through superconducting resonators and dipole antenna, respectively. Table~\ref{tab:DetectorComp} compares the fundamental limit of detectors that will be useful for dark matter detectors; since the quantum noise rises linearly with frequency, SPDs will have an advantage over amplifiers for the search of higher axion mass~\cite{Lamoreaux:2013dv}. A dark count rate $\lambda_\text{d} \sim \SI{1}{\milli\Hz}$ has been demostrated experimentally~\cite{Komiyama:2000eo, Komiyama:2011wma} for a quantum dot detector. Note, however, that the realised experimental efficiency for that detector was only $\eta = 0.01$~\cite{Komiyama:2000eo,Komiyama:2011wma}. Overall, it is desirable to obtain a detector with the optimal combination of low dark count rate and high efficiency, as this will ultimately determine the sensitivity of TOORAD. Detectors that feature a better efficiency typically have a worse dark count rate than the detector from Ref.~\cite{Komiyama:2000eo} considered above. We will therefore define a pessimistic~(optimistic) scenario by setting $\lambda_\text{d} \sim \SI{1}{\milli\Hz}$ with a detection efficiency of $\eta = 0.01$~($\eta = 1$). Last but not least, we shall consider how to put the photon detector together with the material that hosts the AQs. The efficiency of the dark matter search relies on this system integration. The goal is to maximize the photon coupling as the axion quasiparticle material scales up. Therefore we will need to design an antenna that can collect the photons emitted from the AQs to the detector with the least inert loss. This will be an important factor to select a potential detector technology to develop. Ultimately, to detect a small signal from DA, the detector metric should be the total experimental averaging time for an experiment to reach a statistical significance and will depend on both efficiency and sensitivity. To improve our chance of detecting dark matter, we need more research on detector technologies, which are also be useful in other applications including radio~astronomy, spectroscopy, and medical imaging~\cite{Echternach:2018iw, Mittleman:2017dq, Lewis:2019dl}. \subsection{Experimental Sensitivity and Forecasts}\label{sec:sensitivity_reach} As discussed above, the signal from the DA-polariton-photon conversion may be detected using an SPD, which is superior compared to heterodyne power detection in \si{\THz}. In this section we quantify the sensitivity and discovery reach for a photon-counting experiment. The detection of individual photon events is governed by Poisson statistics i.e.\ the likelihood of detecting $\mathds{N}$~photons given model parameters~$\vc{x}$~(the set of DA and material properties) is given by \begin{equation} p(\mathds{N}|\vc{x}) = \frac{\left(\eta \, n_\text{s} + n_\text{d} \right)^\mathds{N}}{\mathds{N}!} \; \mathrm{e}^{-\eta \, n_\text{s} - n_\text{d}} \, , \label{eq:poisson_stats} \end{equation} where $n_\text{s} = \lambda_\text{s} \tau$ and $n_\text{d} = \lambda_\text{d} \tau$ are the number of expected signal and dark count events, respectively, as calculated from their respective rates, $\lambda_\text{s}$ and $\lambda_\text{d}$, and total observation time~$\tau$. The parameter $\eta$ describes the total detector efficiency i.e.\ takes into account the intrinsic efficiency of the detector as well as any other imperfections in the experimental setup. Note that Eq.~\eqref{eq:poisson_stats} assumes that there are no external backgrounds present. While we do not use a likelihood approach based on Eq.~\eqref{eq:poisson_stats} directly for our estimates, it should be noted that the form above is a better approach than the asymptotic, approximate equations used in what follows. For the case of a single-bin Poisson distribution without any nuisance parameters -- i.e.\ assuming that the material and detector properties are perfectly known -- we performed a Monte Carlo simulation to check the validity of the asymptotic formulae that we employ. We found them to be conservative and, hence, suitable for the purpose of estimating TOORAD's sensitivity. For an actual analysis of experimental data, however, a likelihood-based approach should be used. \subsubsection{Sensitivity} In order to compute the sensitivity, we assume that no significant signal over background is found. The significance is $S=2(\sqrt{n_s+n_d}-\sqrt{n_d})$, where $n_s$ is the number of signal events and $n_d$ the number of dark count events~\cite{doi:10.1142/S0217732398003442,Bityukov:2000tt,PhysRevD.82.115018}. Then the exclusion limit at 95\%~C.L. for photon counting based on Poisson statistics (Eq.~\eqref{eq:poisson_stats}) is obtained from $S<2$, i.e.\ $\lambda_\text{s} < \frac{1}{\tau} + 2\sqrt{\frac{\lambda_\text{d}}{\tau}}$, where $\lambda_\text{d}$ is the dark count rate, $\lambda_\text{s}$ the signal rate and $\tau$ the measurement time. For a discovery one would require $S>5$. In Section~\ref{sec:detectors} we argued that $\lambda_\text{d} = \SI{1}{\mHz}$ is reasonable. In the following we estimate the sensitivity in two scenarios. The case $\frac{1}{\tau}<2\sqrt{\frac{\lambda_\text{d}}{\tau}}$ can be achieved for sufficiently long measurement times and is called the background dominated scenario, i.e.\ $\tau>\frac{1}{4 \lambda_\text{d}}=\SI{250}{\second}$. If the measurement time is short $\tau<\frac{1}{4 \lambda_\text{d}}=\SI{250}{\second}$ then it is not background dominated. First, we investigate the case that the measurement is not background dominated. The number of signal photons per measurement time is $\lambda_\text{s}= \eta\frac{|E_0|^2}{2 \omega} A \, \beta^2 \,$ where $A$ is the surface area of the TMI, $\eta$ the photon counting efficiency and $\omega=\omega_j\approx \omega_\text{\tiny LO}$ is the resonance frequency where the power boost factor peaks. The power boost factor is the emitted electromagnetic field normalized to the axion induced field $E_0$, which is determined by the local axion dark matter density $\rho_a$, the axion photon coupling $\safemaths{g_{a\gamma}}$ and the strength of the external $B$-field: $E_0= \safemaths{g_{a\gamma}} \safemaths{B_\text{e}} a_0^{-} \simeq \safemaths{g_{a\gamma}} \, \frac{\sqrt{2\rho_a}}{\safemaths{m_a}} \, \safemaths{B_\text{e}} \, $. Putting everything together we obtain the sensitivity estimate: \begin{eqnarray} \safemaths{g_{a\gamma}} &>& \num{4.4}\times \SI{e-11}{\GeV^{-1}} \left(\frac{0.01}{\eta}\right)^{\frac{1}{2}} \left(\frac{\SI{2}{\tesla}}{\safemaths{B_\text{e}}}\right) \, \left(\frac{100}{\beta}\right) \, \left(\frac{(\SI{0.2}{\m})^2}{A}\right)^{\frac{1}{2}} \, \left(\frac{\SI{4}{\minute}}{\tau}\right)^{\frac{1}{2}}\times \nonumber\\ &\times&\left(\frac{\SI{0.3}{\frac{\GeV}{\centi\metre^3}}}{\rho_a}\right)^{\frac{1}{2}} \, \left(\frac{\safemaths{m_a}}{\SI{2.83}{\meV}}\right)^{\frac{3}{2}}\, , \quad \text{(negligible backgrounds, $\tau<\lambda_d^{-1}$)} \label{eq:sensitivity_NotbackgroundDominated} \end{eqnarray} where an axion mass $m_a=\SI{2.83}{\meV}$ corresponds to the scanned axion mass with a $\SI{2}{\tesla}$ external $B$-field under the assumption of the benchmark material ($n=5,f_\Theta=64\,{\rm eV}$ and $\makeAQ{m}=\SI{2}{\meV}$). The reference area in Eq.~\eqref{eq:sensitivity_NotbackgroundDominated}, $A=(\SI{0.2}{\m})$. $\SI{0.2}{\m}$, is around half of the square de Broglie wavelength for an axion with velocity $v=10^{-3}c$ and mass $\SI{2.83}{\milli\electronvolt}$. Single crystals of \MnBiTe{}{2}{4} grown in Ref.~\cite{PhysRevX.9.041038} are on the order of cm$^2$. Reaching large surface area will thus require tiling and machining many crystals together. Tiling is known to introduce significant complications for dielectric haloscopes like MADMAX~\cite{Knirck_2019,Beurthey:2020yuq}. Further, as the axion gives an opening angle of $v\sim 10^{-3}$ the collecting area of the THz detector must be large. We anticipate that this problem can be overcome with the correct antenna. When there are finite losses, we can use the peak value from Eq.~\eqref{eq:DA_AQ_P_betaomegaj_losses} to eliminate $\beta$ and obtain: \begin{eqnarray} \safemaths{g_{a\gamma}} &>& \num{4.95}\times \SI{e-11}{\GeV^{-1}} \,\left(\frac{0.01}{\eta}\right)^{\frac{1}{2}} \left(\frac{\SI{2}{\tesla}}{\safemaths{B_\text{e}}}\right) \, \left(\frac{(\SI{0.2}{\m})^2}{A}\right)^{\frac{1}{2}} \, \left(\frac{\SI{4}{\minute}}{\tau}\right)^{\frac{1}{2}}\,\left(\frac{\SI{0.3}{\frac{\GeV}{\centi\metre^3}}}{\rho_a}\right)^{\frac{1}{2}} \,\times \nonumber\\ &\times& \left(\frac{\SI{2.83}{\meV}}{\safemaths{m_a}}\right)^{\frac{1}{2}}\,\left(\frac{\Delta_j}{\pi}\right)^2\left(\frac{\SI{2}{\milli\metre}}{d}\right)^2\,\times\, \Sigma. \label{eq:sensitivity_NotbackgroundDominated_explicit} \end{eqnarray} where we have defined in the dimensionless quantity: \begin{eqnarray} \Sigma\equiv1+2\left(\frac{d}{d_\text{opt}}\right)^3. \label{eq:Sigma} \end{eqnarray} We did not plug in any specific value for $\Sigma$ in the sensitivity estimate because when the thickness is chosen to be close or equal to the optimal thickness $\Sigma$ is of the order one. The losses, AQ decay constant, $\makeAQ{f}$, and refractive index, n, all appear implicitly via the determination of $d_{\rm opt}$, the optimal material thickness. Compare the sensitivity Eq.~\eqref{eq:sensitivity_NotbackgroundDominated_explicit} to that obtained with heterodyne detection. In this case we use the Dicke radiometer equation with noise temperature $T$. The signal over noise ratio is given by SNR $=\frac{P_s}{T_{\rm sys}}\sqrt{\frac{\tau}{\Delta \nu_a}}$, where $\Delta\nu_a=10^{-6}\, m_a$ is the DA linewidth, and $P_s$. If the physical system temperature is low enough, cf.\ Section~\ref{sec:detectors}, $T_{\rm sys}$ is limited by the standard quantum limit (SQL) $T_{\rm sys}=\omega=m_a$. The resulting sensitivity is: \begin{eqnarray} g_{a\gamma}&>&\num{1.1}\times \SI{e-9}{\GeV^{-1}}\left(\frac{\rm SNR}{2}\right)^{\frac{1}{2}}\,\left(\frac{m_a}{\SI{2.83}{\milli\electronvolt}}\right)^{\frac{7}{4}} \, \left(\frac{\SI{2}{\tesla}}{\safemaths{B_\text{e}}}\right)\, \left(\frac{\SI{0.3}{\frac{\GeV}{\centi\metre^3}}}{\rho_a}\right)^{\frac{1}{2}}\times\nonumber\\ &\times&\left(\frac{100}{\beta}\right) \, \left(\frac{(\SI{0.2}{\m})^2}{A}\right)^{\frac{1}{2}} \, \left(\frac{\SI{4}{\minute}}{\tau}\right)^{\frac{1}{4}} \quad\text{(heterodyne SQL).} \end{eqnarray} The sensitivity is worse than the SPD, cf.\ Eq.~\eqref{eq:sensitivity_NotbackgroundDominated}, by approximately an order of magnitude. This is as expected since for high frequencies the SQL pushes $T$ to large values. The SQL can, however, be overcome by ``squeezing''~\cite{Backes:2020ajv}. Next we focus on the case that the measurement is background dominated ($\lambda_\text{s}<2\sqrt{\frac{\lambda_\text{d}}{\tau}}$). For our benchmark dark count rate of $\lambda_d$ this gives $\tau>250\,{\rm s}$. Long measurement times on a fixed frequency could be adopted in a ``hint'' scenario where the axion mass is thought to be known by some other means (for example, an astrophysical hint, or highly accurate relic density prediction), and a resonant DM search is required to verify the hint. To consider this scenario, we take the measurement time on each frequency to be $\tau=3\,$yr, i.e. an entire experimental campaign. The sensitivity in this case is: \begin{eqnarray} \safemaths{g_{a\gamma}} &>& \num{1.63}\times \SI{e-12}{\GeV^{-1}} \left(\frac{0.01}{\eta}\right)^{\frac{1}{2}} \left(\frac{\SI{2}{\tesla}}{\safemaths{B_\text{e}}}\right) \, \left(\frac{100}{\beta}\right) \, \left(\frac{(\SI{0.2}{\m})^2}{A}\right)^{\frac{1}{2}} \, \left(\frac{\lambda_\text{d}}{\SI{e-3}{\hertz}}\right)^{\frac{1}{4}}\, \left(\frac{3\,\text{yr}}{\tau}\right)^{\frac{1}{4}}\times \nonumber\\ &\times&\left(\frac{\SI{0.3}{\frac{\GeV}{\centi\metre^3}}}{\rho_a}\right)^{\frac{1}{2}} \, \left(\frac{\safemaths{m_a}}{\SI{2.83}{\meV}}\right)^{\frac{3}{2}} \quad \text{(background dominated)}. \label{eq:sensitivity_backgroundDominated} \end{eqnarray} Using now again the maximum peak value from Eq.~\eqref{eq:TwoInterfaces_Maximum_at_resonance} to eliminate $\beta$ in the previous equation we obtain the sensitivity estimate \begin{eqnarray} \safemaths{g_{a\gamma}} &>& \num{1.94}\times \SI{e-12}{\GeV^{-1}}\, \left(\frac{0.01}{\eta}\right)^{\frac{1}{2}} \left(\frac{\SI{2}{\tesla}}{\safemaths{B_\text{e}}}\right) \, \left(\frac{(\SI{0.2}{\m})^2}{A}\right)^{\frac{1}{2}} \, \left(\frac{\lambda_d}{\SI{e-3}{\hertz}}\right)^{\frac{1}{4}}\, \left(\frac{3\,\text{yr}}{\tau}\right)^{\frac{1}{4}}\,\times \nonumber\\ &\times&\left(\frac{\SI{0.3}{\frac{\GeV}{\centi\metre^3}}}{\rho_a}\right)^{\frac{1}{2}} \, \left(\frac{\SI{2.83}{\meV}}{\safemaths{m_a}}\right)^{\frac{1}{2}}\,\,\left(\frac{\Delta_j}{\pi}\right)^2\left(\frac{\SI{2}{\milli\metre}}{d}\right)^2\times \Sigma \,. \label{eq:sensitivity_backgroundDominated_explicit} \end{eqnarray} To complete our discussion we also estimate the sensitivity for bolometric detectors whose performance is specified by the NEP. The minimal detectable signal power which such a detector can detect is $P_s>{\rm NEP}/\sqrt{\tau}$. Evaluating this leads to the sensitivity: \begin{eqnarray} \safemaths{g_{a\gamma}}&>&\num{9.7}\times \SI{e-13}{\GeV^{-1}}\,\left(\frac{\rm NEP}{10^{-21}{\rm W}/\sqrt{\rm Hz}}\right)^{\frac{1}{2}} \, \left(\frac{(\SI{0.2}{\m})^2}{A}\right)^{\frac{1}{2}} \, \left(\frac{3\,\text{yr}}{\tau}\right)^{\frac{1}{4}}\,\times\nonumber\\ &\times& \left(\frac{\safemaths{m_a}}{\SI{2.83}{\meV}}\right)\,\left(\frac{\SI{0.3}{\frac{\GeV}{\centi\metre^3}}}{\rho_a}\right)^{\frac{1}{2}} \left(\frac{100}{\beta}\right) \label{eq:sensitivity_NEP} \end{eqnarray} The sensitivity estimate in Eq.~\eqref{eq:sensitivity_NEP} has a similar order of magnitude as the SPD sensitivity, cf.\ Eq.~\eqref{eq:sensitivity_backgroundDominated} but a slightly different scaling with the axion mass. \begin{figure}\centering \includegraphics[width=0.55\textwidth]{figures/TwoInterfaces_Scanning_and_Hint_Legend.pdf} \\ \includegraphics[width=0.99\textwidth]{{figures/material_2_forecast}.pdf} \caption{Sensitivity for ``Material 2'' baseline parameters (see text for details) for various loss values $\Gamma$. Top row: $\eta=0.01$. Bottom row: $\eta=1$. We fix the dark count rate $\lambda_d=10^{-3}\,$Hz. The yellow band shows QCD axion models, and the dashed blue line the CAST exclusion on $\safemaths{g_{a\gamma}}$. The scanning scenarios are defined in the text.} \label{fig:Scanning_Sensitivity} \end{figure} \begin{figure}\centering \includegraphics[width=0.55\textwidth]{figures/TwoInterfaces_Scanning_and_Hint_Legend.pdf} \\ \includegraphics[width=0.55\textwidth]{{figures/linewidth}.pdf} \caption{Linewidth of the boost parameter for ``Material 2'' baseline parameters (see text for details) for various loss values $\Gamma$. } \label{fig:linewidth} \end{figure} \subsubsection{Scanning Strategies} We now compute forecasts for the baseline parameters of ``Material 2'' (best approximation to \MnBiTe{2}{2}{5}, with refractive index $n=5$ and $\mu=1$), and consider three possibilities for the losses,\,\footnote{Note that we now take into account the frequency scaling of the losses which we have found in section~\ref{sec:damping}. In all previous results of this paper we did not take into account this scaling since it was not necessary in order to understand the physical picture. However, here we want to estimate a realistic sensitivity of a DA search and therefore we take the frequency scaling of the losses into account.} $\Gamma_m /\omega=\Gamma_\rho /\omega=10^{-5}, 10^{-4},10^{-3}$. Assuming a fixed ratio $\Gamma/\omega$ is consistent with our model for the impurity based losses, and assumes $\epsilon_2$ is approximately constant in the relevant range. For fixed ratio $\Gamma/\omega$, there are larger losses at higher frequencies. We first assumed SPD efficiency of $\eta=0.01$ and dark count rate $\lambda_d=10^{-3}\,$Hz, which has been demonstrated. We also show a more optimistic sensitivity estimate with $\eta=1$ (dotted line) for $\Gamma_\rho/\omega=\Gamma_m/\omega=10^{-4}$. The surface area of the TMI layer is fixed to be $A=(0.2\,{\rm m})^2$, where $0.2\,{\rm m}$ is on the order of half of the de Broglie wavelength. Furthermore we use the main resonance $j=0$ for the sensitivity estimate. We consider two different scanning scenarios, with $B$-field values from $1\,$T to $10\,$T: \begin{itemize} \item Scanning I. We begin at the highest frequency with the largest $B$-field where the base power is largest and the QCD band is at the largest $\safemaths{g_{a\gamma}}$. We scan to the top of the QCD band. We then move by the width $\gamma_0$ on to the next frequency at lower $B$, and repeat for a total scan time of 3 years.\,\footnote{Note that we assume the peak power is achieved over the width $\gamma_0$. While this is less conservative than assuming the minimal value (i.e., half the maximum), note that power also exists outside of $\gamma_0$, which would still be integrated over during the scan. As this is an estimate, rather than a detailed exclusion limit of an experiment, the final limit would likely fall somewhere between the two.} Fig.~(\ref{fig:Scanning_Sensitivity},a). We compute the optimal thickness with the largest axion mass within the scanned region. \item Scanning II. We scan for a fixed time set equal on all frequencies and repeat for a total scan time of 3 years. In each step we move in frequency by the width $\gamma_0$, Fig.~\ref{fig:linewidth} (Eq.~\ref{eq:gammaloss}). We compute the optimal thickness with the axion mass that is in the middle of the scanned interval. \end{itemize} In each case the limit is found for signal to noise equal to two, 95\% C.L. exclusion. In the Scanning II case we assume that each individual scan takes the same amount of time $\tau$. Then with the bandwidth from Eq.~\eqref{eq:gammaloss} (Fig.~\ref{fig:linewidth}) we can calculate the total number of scans. From this we then calculate the scan time for each individual scan such that the total scanning time for each case is $t_\text{scan}=3\,$years. Depending on the individual scan time $\tau$ we calculate the sensitivity in the right limit, cf.\ Eq.~\eqref{eq:sensitivity_NotbackgroundDominated_explicit} and~\eqref{eq:sensitivity_backgroundDominated_explicit}. In the Scanning I scenario for $\eta=0.01$, we find that a wide range of the QCD band can only be covered in the case with extremely small losses, $\Gamma/\omega=10^{-5}$. With this scanning strategy, $\eta=1$ detection efficiency allows a wide range of the top of QCD band to be scanned for all loss parameters. In the Scanning II scenario the QCD band cannot be reached with $\eta=0.01$. However, with $\eta=1$ we find that a reasonable portion of the upper part of the QCD band can be scanned with $\Gamma/\omega=10^{-4}$. With very low losses $\Gamma/\omega=10^{-5}$ and $\eta=1$ the Scanning II scenario reaches almost KSVZ sensitivity across a wide range of masses. We also considered the intermediate case $\eta=0.1$, which allows some sensitivity to the QCD axion band with $\Gamma/\omega=10^{-4}$. We conclude that a successful QCD-sensitive experiment requires high efficiency SPDs. \subsection{Parameter Study} \begin{table} \caption{Parameter reference values and ranges. Our benchmark material is ``Material 2'', based on \MnBiTe{2}{2}{5}.\label{tab:toorad_params} } \centering \begin{tabular}{llll} \toprule \multicolumn{2}{l}{Parameter name \& symbol} & Range & Benchmark \\ \midrule \multicolumn{4}{l}{\textit{TMI parameters}}\\ \addlinespace[2pt] Decay constant & $\makeAQ{f}$ & [50, 200]\,\si{\eV} & \SI{70}{\eV} \\ AQ mass & $\makeAQ{m}$ & $\sim\mathcal{O}(\si{\meV})$ & \SI{1.8}{\meV} \\ Permittivity & $\epsilon$ &[9,49] & 25 \\ Magnetic permeability & $\mu$ & $\sim\mathcal{O}(1)$ & 1\\ Magnon losses & $\safemaths{\Gamma_m}$ & [\num{e-5}, \num{e-3}]\,\si{\meV} & \\ Specific conductance & $\safemaths{\Gamma_\rho}$ & [\num{e-5}, \num{e-3}]\,\si{\meV} & \\ Area of crystal face & $A$ &$(0.2\,{\rm m})^2$ & \\ Thickness & $d$ & $d_{\text{opt}}$, cf.\ Eq.~\eqref{eq:DA_AQ_P_optimalThickness}\, & \\ \midrule \multicolumn{4}{l}{\textit{Experimental parameters}}\\ \addlinespace[2pt] External $B$-field & $\safemaths{B_\text{e}}$ & [1, 10]\,\si{\tesla} & \SI{2}{\tesla} \\ Detection effciency & $\eta$ & [0.01, 1] & 0.01\\ Dark count rate & $\lambda_\text{d}$ & $\gtrsim \SI{1}{\milli\hertz}$ & \SI{1}{\milli\hertz} \\ \bottomrule \end{tabular} \end{table} We now wish to investigate how the sensitivity and scan range depend on the yet unknown material parameters of the TMIs. In this section we consider only the scanning II scenario. In Table~\ref{tab:toorad_params} we list the unknown parameters, and reasonable ranges they might take in different materials within our rough approximations to the theoretical uncertainties. The ranges for the parameters have been motivated in Section~\ref{sec:params}. In Fig.~\ref{fig:Parameterstudy} we study the effect of varying the AQ decay constant $f_\Theta$ and the refractive index $n$ on the scan range and sensitivity (we do not vary the AQ mass, since this has the trivial effect of changing the lower limit of the scan range). The sensitivity and other parameters are fixed as described in the previous subsection. Let us first discuss the scanning range. The smaller $n$ and $f_\Theta$ the larger is the axion mass range that can be probed. This is because the upper range of the scanned axion mass is determined by Eq.~\eqref{eq:Scanning_range}. To understand the effect of $n$ and $\makeAQ{f}$ on the sensitivity, it is enlightening to study the behaviour of the sensitivity estimates in the limit that the external $B$-field is very large, i.e. $m_a\approx\omega_\text{\tiny LO}\approx b\sim \frac{B_e}{n f_\Theta}$. Both sensitivity estimates in the background dominated, cf.\ Eq.~\eqref{eq:sensitivity_backgroundDominated}, and in the non-background dominated limit, cf.\ Eq.~\eqref{eq:sensitivity_NotbackgroundDominated_explicit}, are proportional to $g_{a\gamma}\sim\frac{1}{B_e}\frac{1}{d_\text{opt}^2}$, where we have assumed that $\Sigma$ does not vary too much.\footnote{Remember that $\Sigma$ would be exactly $3$, if we would choose for each axion mass that is scanned the exact optimal thickness. However, in a scanning scenario this will for practical reasons not be possible and we choose $d$ to be the optimal thickness that corresponds to the axion mass that is in the center of all axion masses that are scanned. As a consequence $\Sigma$ can also be slightly larger than $3$ in the whole axion mass that is being scanned.} Plugging in the optimal thickness we obtain the scaling behaviour: \begin{eqnarray} g_{a\gamma}\sim \left(\frac{1}{B_e}\right)^{\frac{1}{6}}\, \left(\frac{1}{\makeAQ{f}}\right)^{\frac{5}{6}}\,\sqrt{n}. \label{eq:sensitivity_scaling} \end{eqnarray} The strongest scaling is induced by the AQ decay constant $f_\Theta$. This view is also confirmed by the plots in Fig.~\ref{fig:Parameterstudy}. However increasing $f_\Theta$ also leads to a smaller scanning interval such that the reached $C_{a\gamma}$ in the QCD band is almost constant. The refractive index $n$ enters in the sensitivity only weakly with a square root dependence. However for fixed $f_\Theta$ it is visible from the plots in Fig.~\ref{fig:Parameterstudy} that decreasing $n$ gives a slightly better limit on the DA-photon coupling. Furthermore, the scaling in eq.~\eqref{eq:sensitivity_scaling} only applies so long as the approximation $m_a\approx\omega_\text{\tiny LO}\approx b\sim \frac{B_e}{n \makeAQ{f}}$ holds. At large $\makeAQ{f}$ this approximation breaks down for suitable values of $B_e$ (either the experimental maximum, or spin flop field, whichever is lower). With these effects in mind, we revisit the candidate AQ material (Bi$_{1-x}$Fe$_x$)$_2$Se$_3$\xspace\, (``Material 1''), considered in Paper~I. We estimate that this material has slightly smaller $\makeAQ{f}$, and will thus have a slightly worse sensitivity to $\safemaths{g_{a\gamma}}$ than the alternative Material 2, although it will have a narrower possible scan range. To be more optimistic with Material 1, we adopt $n=3$ for presentation (although this has a very small effect). Our results are collected in fig.~\ref{fig:summary_plot}.\footnote{Appendix~\ref{sec:axion_dm} gives more details about the QCD axion model assumptions indicated in this figure.} \begin{figure} \centering \includegraphics[width=0.55\textwidth]{figures/DA_AP_P_mixing/TwoInterfaces_parameterScan_Legend.pdf} \\ \includegraphics[width=1.1\textwidth]{figures/DA_AP_P_mixing/TwoInterfaces_Parameterscan.pdf} \caption{Sensitivity estimate for the DA-photon coupling $g_{a\gamma}$ varying the external $B$-field from $\SI{1}{\tesla}$ to $\SI{10}{\tesla}$. The surface area is fixed to $A=(0.2\,{\rm m})^2$. The thickness $d$ is set to the optimal thickness, cf.\ Eq.~\eqref{eq:DA_AQ_P_optimalThickness}. We assume each frequency is scanned for the same amount of time, and the total scanning time is $t_\text{scan}=3\,$years. For the detector $n_b=10^{-3}\,$Hz and efficiency $\eta=1$. The yellow band represents the QCD band with $C_{a\gamma}=12.75\cdots 0.25$, cf.\ eq.~\eqref{eq:def_gag} for the definition of $C_{a\gamma}$. The dashed blue line shows the CAST limit.} \label{fig:Parameterstudy} \end{figure} \FloatBarrier \section{Discussion and Conclusions}\label{sec:conclusions} \begin{figure} \centering \includegraphics[width=5.9in]{figures/toorad_summary_plot_update} \caption{The projected TOORAD sensitivity for Material 1 [(Bi$_{1-x}$Fe$_x$)$_2$Se$_3$\xspace-inspired] and Material 2 (\MnBiTe{2}{2}{5}-inspired) for different losses ($\Gamma_m=\Gamma=\Gamma_\rho$) and detector sensitivities. See Table~\ref{tab:toorad_params} for all other benchmark parameter values. We show limits and forecasts~\cite{2020_Zenodo_OHare} for CAST~\cite{hep-ex/0702006,1705.02290}, IAXO~\cite{1904.09155}, and various haloscopes~\cite{DePanfilis:1987dk,0910.5914,1706.00209,1803.03690,Du:2018uak,1903.06547,Lawson:2019brd,Braine:2019fqb,2001.05102,Beurthey:2020yuq,Backes:2020ajv}~(for $\rho_\text{loc} = \SI{0.3}{\GeV/\centi\m^3}$) as well as the bounds from hot dark matter constraints~\cite{2011.14704}, energy loss arguments in SN1987A~\cite{1906.11844}. The preferred regions cold dark matter~\cite{Aghanim:2018eyx} in the realignment scenario, and with the latest cosmic string decay calculations~\cite{2007.04990} are also indicated as horizontal arrows. The QCD~axion band encompasses all ``preferred'' KSVZ-type axion models as defined in ref.~\cite{1705.05370}, in addition to the original KSVZ and DFSZ models.\label{fig:summary_plot}} \end{figure} \subsection{Summary of Results} The present work has developed the theory of axion quasiparticles in topological magnetic insulators, and how such materials can be used to detect axion dark matter. \textbf{Model of Axion Quasiparticles:} We first presented in some detail the symmetry criteria for the existence of axion quasiparticles, and the Dirac model for their realisation in topological magnetic insulators. While already known in the literature (e.g. refs.~\cite{2010NatPh...6..284L,Sekine:2014xva,Zhang_2020,Sekine2020}), these have not been shown in detail in relation to axion DM, and provide important background to the subsequent results. We laid out carefully the symmetry criteria necessary for a material to posses an AQ. Our exploration of the model sheds light on the nature of the AQ as a longitudinal magnon, i.e. a spatially and temporally varying AF spin fluctuation. It is non-linearly related to the transverse magnons of ordinary AFMR. In order to estimate the parameters $\makeAQ{f}$ and $\makeAQ{m}$ of the model, we used the result of the \emph{ab initio} calculation given in ref.~\cite{2010NatPh...6..284L} for (Bi$_{1-x}$Fe$_x$)$_2$Se$_3$\xspace on a cubic lattice. We rescaled the results to use updated values of the material parameters of (Bi$_{1-x}$Fe$_x$)$_2$Se$_3$\xspace, and \MnBiTe{2}{2}{5}, for which there is not a result available in the literature. More accurate \emph{ab initio} calculations of the parameters for both (Bi$_{1-x}$Fe$_x$)$_2$Se$_3$\xspace\, and \MnBiTe{2}{2}{5} are highly desirable. We considered multiple possible sources of loss in these materials, and attempted to estimate the contributions to the polariton linewidth. This often involved extrapolation of results obtained at different frequencies and only measured in related materials. Direct spectroscopic measurement of all these parameters is thus necessary. \textbf{Axion Quasiparticle Detection:} We computed explicitly the transmission function of AQ materials. This transmission function displays a magnetic field-dependent gap, and a series of resonances, which depend on the size of the loss terms. By measuring the frequency of the upper and lower ends of this gap, and the linewidths of the resonances, one could determine the parameters of the model directly. Furthermore, the gap in the polariton spectrum, and the scaling of the gap size with field strength, demonstrate directly the existence of the AQ and its coupling to the electromagnetic field via a Chern-Simons interaction. Thus, THz transmission spectroscopy can be used to discover the AQ. The considered material candidates that can host an AQ are all antiferromagnets. Antiferromagnets exhibit an antiferromagnetic resonance (AFMR) with typical resonance frequencies in the THz regime. This raises the question how one can distinguish the AFMR from the axion-polariton resonance in the transmission spectrum. It is well known how the AFMR frequency scales with a non-zero external $B$-field~\cite{PhysRev.85.329,Keffer1953,Mills_1974}. This scaling is distinct from that of the axion-polariton resonance, which consists of a fixed resonance at $\makeAQ{m}$, and a second one near $\omega_\text{\tiny LO}=\sqrt{\makeAQ{m}^2+b_0^2(B/B_0)^2}$ (where $b_0=b(B_0)$ and $B_0$ is a reference scale). We expect transmission spectra of the AF axion insulator \MnBiTe{}{2}{4} to show the single AFMR, while the AQ material \MnBiTe{2}{2}{5} will show both the axion polariton resonances and AFMR. Comparing results for both materials and the $B$-field dependence will help isolate the effect of the AQ. \textbf{Axion Dark Matter Detection:} We developed the computation of the power output of an AQ material in the presence of axion DM. The system bears many similarities to dielectric and plasma haloscopes, and is characterised by a boost amplitude, $\beta(\omega)$. The boost amplitude increases with thicker sample sizes, and the height and width of the boost are affected by magnon and photon losses. The power is amplified by $\beta^2$ compared to a magnetized mirror, and for realistic models of the loss $10^2\lesssim \beta^2\lesssim 10^3$ with a bandwidth of order $10^{-4}$ to $10^{-3}$. Figure~\ref{fig:summary_plot} shows our best estimates for the discovery potential of TOORAD compared to other constraints on axion dark matter, and proposals for future experiments. The present best estimate shows that TOORAD, using a material similar to \MnBiTe{2}{2}{5} could scan an $\mathcal{O}(1)$ range in the upper half of the QCD axion model band if the SPD efficiency is very good, $\eta\approx 1$. In the best case scenario with low dark count rate detectors the KSVZ band can be reached. The primary difference between the two material candidates considered lies in the estimated value of $\makeAQ{f}$, with slightly higher values being favourable in the scan depth, but having a slightly narrower total range. If the spin flop transition of the material is lower than the maximum 10 T field assumed, then the scans would begin at lower frequencies, and span a slightly smaller range of masses. \subsection{Discussion} \textbf{Comparison to other axion detection proposals:} We have considered detecting the dark matter axion via the axion-photon coupling, $\safemaths{g_{a\gamma}}$, combined with the mixing between the photon and the AQ. It is interesting to note that if the dark matter axion also possess a coupling to electrons, $g_{ae}$, then this can excite AFMR in the TMI via the ``axion wind'' derivative interaction~\cite{Kakhidze:1990in} (this interaction has been successfully constrained with nuclear magnetic resonance~\cite{Garconeaax4539} and ferromagnetic resonance~\cite{2018EPJC...78..703C,Crescini:2020cvl}). The AFMR axion wind interaction opens the possibility that AQ materials could measure both couplings, $\safemaths{g_{a\gamma}}$ and $g_{ae}$, with the same material by tuning to different resonant modes. This could be used to perform model discrimination between the KSVZ model, with loop suppressed electron coupling, and the DFSZ model, with leading order electron coupling. This would be an interesting line of future research. Similarly to dielectric and plasma haloscopes, TOORAD aims to avoid the Compton wavelength limits imposed in traditional cylindrical cavities. Most experiments try to avoid this limit through breaking translation invariance on roughly half Compton wavelength scales. Examples include dielectric haloscopes~\cite{TheMADMAXWorkingGroup:2016hpc} like MADMAX~\cite{Brun:2019lyf} and LAMPOST~\cite{Baryakhtar:2018doz}, multicavity arrays \cite{Goryachev:2017wpw,Jeong:2018ljc} such as RADES~\cite{Melcon:2018dba,Melcon:2020xvj} and hybrid approaches using dielectric loaded resonators~\cite{Morris:1984nu,Quiskamp:2020yrx} such as Orpheus~\cite{Carosi:2020akt}. In contrast, TOORAD aims to give the photon an effective mass (in the low spin wave momentum limit). In this sense, the most similar analogue in axion experimental design is a plasma haloscope~\cite{Lawson:2019brd}, which directly gives the photon a mass in the form of a plasma frequency. The THz regime represents a unique challenge for axion detection, as it represents an intermediate regime between scales and technologies. Dielectric haloscopes have been proposed at lower~\cite{Brun:2019lyf} and higher~\cite{Baryakhtar:2018doz} frequencies. THz represents a middle ground between the use of discrete, movable disks and ${\cal O}(1000)$ layer deposited thin films implying unique engineering challenges to cover the available parameter space. Dish antennas~\cite{2013JCAP...04..016H} are the simplest structure to target THz, due to their broadband nature, however they lack resonant enhancement that could allow a more targeted search at higher signal to noise. Currently the only proposed dish antenna in this range is BRASS~\cite{BRASS}. A more recent idea in the meV range is to use the axion's coupling to phonon polaritons or magnons~\cite{Mitridate:2020kly}, however the resonance frequency in this proposal is not easily tuned, which makes scanning axion masses difficult. To cover a range of axion masses, different materials of high quality would need to be measured. Further, the single quanta measurement of such particles remains challenging~\cite{Mitridate:2020kly}. As the field of THz axion detection is still very young, and each approach has different material or engineering challenges, it is important to have a wide range of ideas in order have a chance to look in this well motivated, but very difficult, parameter space. \textbf{Materials Science:} In terms of material research we have revealed there is a stark contrast between conventional strong dynamical axion response in solids and dynamical axion quasiparticle response suitable for DM detection discussed here. \begin{itemize} \item The axion quasiparticles for DM detection favour longitudinal spin waves with linear coupling to photons. In contrast, the heterogeneous dynamical axion field present in the chiral magnetic effect or antiferromagnetic resonance of the standard transversal spin modes does not provide within minimal models for such a coupling~\cite{Zhang_2020}. \item While conventional large axion response can be achieved close to the magnetic phase transition~\cite{Zhang_2020}, a DM search favours lower temperatures, ensuring sharper resonance linewidth free of thermal and scattering disorder. \item The static quantised axion insulators are protected by axion odd symmetries such as spatial inversion (parity). Our dynamical axion quasiparticles favour $\mathcal{PT}$ symmetric systems: $\mathcal{PT}$ allows for Dirac quasiparticles enhancing the (dynamical) nonquantized AQ response by allowing tunability close to the topological phase transition. \end{itemize} Antiferromagnetism is favourable in many ways for axion DM detection. Reasons for this include its compatibility with tunable axionic Dirac quasiparticles~\cite{Smejkal2016}, availability of semiconducting band-structure with potentially large band-gaps, high critical temperatures, and large spin-flop fields. Furthermore, multi-sublattice systems can provide for a combination of separated heavy atomic elements with strong spin-orbit interaction and lighter magnetic elements. \textbf{Materials wishlist:} We close with stating the desirable properties of an AQ material for axion DM detection. \begin{itemize} \item Longitudinal spin wave mass, $\makeAQ{m}$, in the meV range. The goal is to detect the QCD axion in this mass range. With much smaller $\makeAQ{m}$ there are already existing technologies, while for much larger values the QCD axion is already excluded. \item Decay constant, $\makeAQ{f}$, in the 10 to 100 eV range.\footnote{Recall that in the Dirac model $\makeAQ{f}^2=2 M_0^2 J$ where $M_0$ is the bandgap and $J$ is the spin wave stiffness.} For $\makeAQ{f}$ much larger than 100 eV the AQ is not strongly coupled enough to the $\Theta$ term for efficient mixing. Another way to express this requirement is that the polariton gap for fields of order 1 T should be of order $\makeAQ{m}$. \item Low refractive index ($n\lesssim 5$) and high resistivity ($\rho>10^3$ meV$^{-1}$) in THz, preferably measured from the axion-polariton spectrum resonance. \item Low impurity density: impurity separation scale of microns or larger. \item High spin flop field. This should definitely exceed 1 T for sufficiently large power output. Larger spin flop fields permit a wider scan range. \item High N\'{e}el temperature. The experiment can be operated in a dilution refrigerator with $T\ll 4$ K. However, the further this is below the N\'{e}el temperature, the better, since we expect magnon losses to decrease for $T\ll T_N$. \item Ability to manufacture samples with thickness in excess of 1 mm. Ultimately one must also machine multiple samples together into a large surface area disk. \end{itemize} We have shown that, with plausible assumptions, \MnBiTe{2}{2}{5} and (Bi$_{1-x}$Fe$_x$)$_2$Se$_3$\xspace both satisfy many of these requirements, although we expect the AQ phase of \MnBiTe{2}{2}{5} to be more stable, since it does not require magnetic doping. If it can be proven that any material satisfies the above requirements, then, in combination with existing detector and magnet technology, such a material can be used to make an effective search for axion dark matter in the theoretically well-motivated mass range near 1 meV. \acknowledgments We thank Bobby Acharya, Caterina Braggio, {Nicol\`o} Crescini, Matthew Lawson, Erik Lentz, Chang Liu, Eduardo Neto, Naomi Nimubona, Alireza Qaiumzadeh, Andreas Ringwald, and David Tong for useful discussions. DJEM, SH, and MA are supported by the Alexander von Humboldt Foundation and the German Federal Ministry of Education and Research. JSE is supported through Germany's ExcellenceStrategy - EXC 2121 ``Quantum Universe" - 390833306. KCF was supported in part by Army Research Office under Cooperative Agreement Number W911NF-17-1-0574. FC-D is supported by STFC grant ST/P001246/1, Stephen Hawking Fellowship EP/T01668X/1. EH is supported by STFC grant ST/T000988/1. AM is supported by the European Research Council under Grant No. 742104 and by the Swedish Research Council (VR) under Dnr 2019-02337 ``Detecting Axion Dark Matter In The Sky And In The Lab (AxionDM)". AS is supported by the Special Postdoctoral Researcher Program of RIKEN. LS acknowledges the EU FET Open RIA Grant No. 766566, the Elasto-Q-Mat (DFG SFB TRR 288), Czech Science Foundation Grant No. 19-28375X, and Sino-German DFG project DISTOMAT. This research was supported by the Munich Institute for Astro- and Particle Physics (MIAPP) which is funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) under Germany´s Excellence Strategy – EXC-2094 – 390783311. \FloatBarrier
\section{Introduction} The Discrete Nonlinear Schr\"odinger equation (DNLS) \begin{equation} i\dot{\phi}_n+{\kappa\nu}\left(\phi_{n+1}+\phi_{n-1}\right)+\gamma |\phi_n|^2\phi_n=0,\,\,\,n\in {\mathbb{Z}},\;\;\gamma>0,\label{eq:DNLS0} \end{equation} is one of the most important nonlinear lattice systems \cite{HennigTsironis},\cite{Kevrekidis},\cite{Eil},\cite{DNLS}. It appears as a fundamental, inherently discrete model in a great variety of physical contexts. The study of its dynamics has been an exciting topic of research as it deals with such diverse physical and biological phenomena as wave motion in coupled nonlinear waveguides, dynamics of modulated waves in nonlinear electric lattices, localisation of electromagnetic waves in photonic crystals, energy localisation in discrete condensed matter and biological systems and the dynamics of Bose-Einstein Condensates \cite{BEC1}, to mention a few. In Eq. \eqref{eq:DNLS0}, $\kappa>0$ is a discretisation parameter, while the sign of the parameters $\nu$ and $\gamma$ renders the DNLS as focusing (same sign) or defocusing (opposite sign). A crucial difference from its continuous limit $\kappa\rightarrow\infty$ leading to the cubic Nonlinear Schr\"odinger equation (NLS) \begin{eqnarray} i\partial_t u + \nu u_{xx}+\gamma |u|^{2}u=0,\;\; x\in\mathbb{R},\label{eq:NLS0} \end{eqnarray} is that the DNLS \eqref{eq:DNLS0} is a non-integrable discretisation of the integrable partial differential equation \eqref{eq:NLS0}. This is not the case for another discretisation of NLS \eqref{eq:NLS0}, known as the Ablowitz-Ladik equation (AL) \cite{AL}, \cite{AL2}, \cite{Herbst}, \begin{equation} i\dot{\psi}_n+\kappa\nu(\psi_{n+1}+\psi_{n-1}) +\mu\,|\psi_{n}|^2(\psi_{n+1}+\psi_{n-1})=0,\,\,\,n\in {\mathbb{Z}},\;\;\mu> 0. \label{eq:AL0} \end{equation} Like in (\ref{eq:DNLS0}) the sign of the parameters $\nu$ and $\mu$ determines whether the model is of focusing or defocusing kind. Most importantly, the AL lattice is an integrable discretisation of \eqref{eq:NLS0}, as it was shown by the discrete version of the Inverse Scattering Transform \cite{AL}, and therefore it has an infinite number of conserved quantities. We remark that the AL is one of the few known completely integrable (infinite) lattice systems admitting soliton solutions \cite{Ablowitz},\cite{Faddeev}. On the infinite lattice with vanishing boundary conditions, general solutions can be obtained \cite{AL2}. For example, for $\kappa=\nu=1$ and $\mu>0$, the one-soliton solution reads as \begin{equation} \begin{split} \psi^s_n&=\frac{\sinh\beta}{\sqrt{\mu}}\mathrm{sech}\left[\beta(n-v_st)\right]\exp(-i(\omega t-\alpha n)),\\ \;\;\omega&=-2\cos \alpha \cosh \beta,\\ v_s&=2\beta^{-1}\sin \alpha \sinh \beta,\label{eq:one-soliton} \end{split} \end{equation} with $\alpha \in [-\pi,\pi]$ and $\beta \in [0,\infty)$. System (\ref{eq:AL0}) possesses the following conserved quantity \begin{equation} P_{\mu}=\sum_{n}\ln(1+\mu |\psi_n|^2)\label{eq:Pmu}. \end{equation} In \cite{Ver1}, the Inverse Scattering Transform method has been developed for nonvanishing boundary conditions and N-dark soliton solutions of the AL equation have been given in terms of the Casorati determinant in \cite{Maruno}. Yet in similarity with the integrable NLS \eqref{eq:NLS0}, another important class of solutions of the AL is the one of rational solutions which are discrete versions of the Peregrine soliton and the Kuznetsov-Ma breather \cite{akhm_AL}, \cite{akhm_AL2}. Strictly speaking, all the aforementioned analytical solutions exist only for the AL. In the case of the soliton solution \eqref{eq:one-soliton} of the AL this is manifested in the fact that it exhibits continuous translation symmetry and possesses a band of velocities for each $\beta$, which allow it to travel along the lattice. This is not the case for the DNLS for which a localised state can be pinned due to the Peierls-Nabarro barrier \cite{PN1},\cite{PN2}, \cite{PN3}. Therefore, the question of the persistence of solitary wave dynamics and the existence of localised structures in non-integrable lattices, such as the DNLS \eqref{eq:DNLS0}, has attracted tremendous interest. As a milestone in this context, we recall the construction of localised in space, time periodic or time-quasiperiodic solutions of lattice dynamical systems, including the DNLS as special case \cite{MackayAubry}, \cite{Aubry},\cite{MJ}, starting from the anti-continuous limit $\kappa\rightarrow 0$. For key works regarding numerical computations of discrete solitons we refer to \cite{ChrisFl},\cite{AubyMarin}. Other seminal results on the existence of nonlinear localised modes of the DNLS equations have been gained by nonlinear analysis methods, in particular variational ones, establishing the existence of localised structures as critical points of suitable functionals \cite{Wein99},\cite{Pan1},\cite{Pan2},\cite{Pan3},\cite{Pan4}. Important extensions concern the existence of more complex structures in higher dimensional set-ups, such as the discrete vortex solutions, see \cite{DNLS} and references therein. The crucial issue of existence and stability of travelling solitons in DNLS lattices has been investigated by a combination of analytical and numerical methods verifying in many cases the robustness of the discrete localised structures under perturbations, \cite{Peli0},\cite{Jesus1},\cite{Peli1},\cite{Peli2}. In this context we also refer to the reviews \cite{FlachWillis}, \cite{reviewsC}, \cite{PanosImaRev}. In the present work, we investigate a persistence/existence problem, by examining in the sense of ``continuous dependence'', the closeness of the solutions of the DNLS and the AL for close enough initial data. That is, the following question is investigated here: {\em assuming that the initial data of the DNLS \eqref{eq:DNLS0} and the AL \eqref{eq:AL0} are sufficiently close in a suitable metric, do the associated solutions remain close for sufficiently long times?} We argue that answering this question is important because of the following reasons: \begin{itemize} \item Whereas, it is natural to expect, at least in some cases of parametric regimes, that sufficiently weak non-integrable perturbations (e.g. stemming from gain/loss or forcing terms or higher order terms) lead to solutions staying close to those of the underlying integrable (core) system dynamics, in the case of the DNLS and AL lattices, there is not such a limiting connection between the systems. \item An affirmative answer to the question above will establish that the already diverse dynamical features of the DNLS itself are even further enriched as then the DNLS closely share such solutions that are provided by the functional form of the analytical solutions of the AL-lattice (at least) for small amplitudes. From this perspective, not only the soliton solutions but also the discrete rational solutions are relevant. \end{itemize} In our aim to answer the above question, we proceed by analytically proving that \textit{at least under certain smallness conditions on the initial data of the DNLS and the AL lattices, the corresponding solutions remain close for all times.} To be precise, we state the result for the infinite lattice with vanishing boundary conditions \begin{equation} \label{vanbc} \lim_{|n|\rightarrow\infty}\phi_n=\lim_{|n|\rightarrow\infty}\psi_n=0. \end{equation} Hence, the natural phase space for the systems is the Hilbert-space of the square-summable sequences \begin{equation} \label{sl2} l^2=\left\{ \phi=(\phi_n)_{n \in {\mathbb{Z}}}\,\in {\mathbb{C}}\,\,\,\vert \, || \phi||_{l^2}=\left(\sum_{n }|\phi_n|^2\right)^{1/2}\right\}. \end{equation} Consider then, the initial conditions for the DNLS \eqref{eq:DNLS0} and AL \eqref{eq:AL0} \begin{equation} \label{inDNLS} \phi_n(0)=\phi_{n,0},\,\,\,n\in {\mathbb{Z}}, \end{equation} and \begin{equation} \label{inAL} \psi_n(0)=\psi_{n,0},\,\,\,n\in {\mathbb{Z}}, \end{equation} respectively. The main result of the paper is the following \begin{theorem} \label{Theorem:closeness} Consider the DNLS equation \eqref{eq:DNLS0}. We assume that for every $0<\epsilon<1$, the initial conditions \eqref{inDNLS} of the DNLS \eqref{eq:DNLS0} and the initial conditions \eqref{inAL} of the AL \eqref{eq:AL0} satisfy: \begin{eqnarray} \label{eq:distance0} || \phi(0)-\psi(0)||_{l^2}&\le& C_0\, \varepsilon^3,\\ \label{eq:distance01} || \phi(0)||_{l^2}&\le& C_{\gamma,0}\, \varepsilon,\\ \label{eq:Pmu0} P_{\mu}(0)&=&\sum_{n}\ln(1+\mu|\psi_n(0)|^2)\le C_{\mu,0}\,\varepsilon^2 \end{eqnarray} for some constants $C_0, C_{\gamma,0},\,C_{\mu,0}>0$. Then, for arbitrary finite $0<T_{\small{f}}<\infty$, there exists a constant $C=C(\gamma,\mu, C_0, C_{\mu,0},C_{\gamma,0},T_{\small{f}})$, such that the corresponding solutions for every $t\in [0,T_{\small{f}}]$, satisfy the estimate \begin{equation} ||y(t)||_{l^2}=|| \phi(t)-\psi(t)||_{l^2}\le C \varepsilon^3.\label{eq:boundy} \end{equation} \end{theorem} For the proof of Theorem \ref{Theorem:closeness} we use suitable estimates for the solutions of the AL lattice based on its \textit{deformed power or norm}, and energy arguments for the difference of solutions of the systems. It also makes essential use of the global existence of solutions for both lattices ensured by considering a physically relevant variant of a DNLS system which combines both systems studied first in \cite{Cai94} (the so-called Salerno model, see \cite{Salerno}, \cite{Cai94}). An immediate consequence follows from Theorem \ref{Theorem:closeness}, due to embedding $||y||_{l^{\infty}}\leq ||y||_{l^{2}}$ which holds for every $y\in l^2$ and can be applied to the estimate \eqref{eq:boundy}. \begin{corollary} \label{Corollary:closeness2} Under the assumptions \eqref{eq:distance01}-\eqref{eq:Pmu0}, for every $0<\epsilon<1$ and $t\in [0,T_{\small{f}}]$, the maximal distance $|| y(t)||_{l^\infty}=\sup_{n\in {\mathbb{Z}}}|y_n(t)|=\sup_{n\in {\mathbb{Z}}}|\psi_n(t)-\phi_n(t)|$ between individual units of the systems satisfies the estimate \begin{equation} ||y(t)||_{l^\infty}\le \tilde{C} \varepsilon^3,\label{eq:boundy1} \end{equation} for some constant $\tilde{C}=\tilde{C}(\gamma,\mu, C_{\mu,0},C_{\gamma,0},T_{\small{f}})$. \end{corollary} Theorem \ref{Theorem:closeness} establishes the closeness of the solutions to the AL and the DNLS as $\varepsilon \rightarrow 0$, with an explicit expression for the associated constant $C$ in dependence on the parameters of both systems. Its main application is that it rigorously justifies that at least small amplitude localised structures provided by the analytical solutions of the integrable AL-lattice persist in the DNLS lattice. In other words, the DNLS lattice admits small amplitude solutions of the order ${\cal{O}}(\varepsilon)$, that stay ${\cal{O}}(\varepsilon^3)$-close to the analytical solutions of the AL for any $0<T_{\small{f}}<\infty$. In this regard, the analytical arguments show that the growth of the distance $||y(t)||_{l^2}$ is uniformly bounded for any $\epsilon>0$ and $t\in (0,\infty)$ as \begin{eqnarray} \label{gr} \frac{d}{dt}||y(t)||_{l^2}\leq M\,\varepsilon^3, \end{eqnarray} ($M$ depends on the parameters and initial data but not on $t$), and consequently, the distance of solutions growths at most linearly for any $t\in (0,\infty)$, as \begin{eqnarray} \label{gr1} ||y(t)||_{l^2}\leq M\, t\,\varepsilon^3. \end{eqnarray} In a similar context, we refer also to the linear time-growth estimates for the relevant distant function between the solutions of the complex Ginzburg-Landau pde and the NLS pde, when the inviscid limit of the former is considered \cite{JWU}, which can even grow exponentially \cite{OG}. The closeness result of Theorem \ref{Theorem:closeness} can be extended to other important cases of DNLS systems. These include the DNLS with generic power-nonlinearity $F(z)=|z|^{2\sigma}z$ for $\sigma>0$ and saturable nonlinearities of the form $F(z)=\frac{z|z|^2}{1+|z|^2}$ and $F(z)=\frac{z}{1+|z|^2}$. The extensions may consider higher-dimensional lattices $\mathbb{Z}^N$, $N\geq 1$. Note that for generalisations of the AL lattice in $\mathbb{Z}^2$, analytical localised solutions have been constructed \cite{Kim2},\cite{2DAL4},\cite{2DAL2},\cite{2DAL3}. To corroborate our analytical results we include the results of a numerical study treating the example of the soliton solution \eqref{eq:one-soliton} when launched on DNLS lattice with the cubic nonlinearity \eqref{eq:DNLS0}, and the DNLS with saturable nonlinearity. The numerical findings are in excellent agreement with the theoretical results. The presentation of the paper is as follows: Section \ref{secII} recalls some basic properties of the DNLS and the AL lattices, focusing on their conserved quantities and auxiliary results that will aid the main proofs. In Section \ref{secIII} we prove the global existence result for the extended Salerno model of \cite{Salerno},\cite{Cai94}. Section \ref{SecIV} contains the proof of the main result Theorem \ref{Theorem:closeness}, while section \ref{Nlat} provides its extensions to higher-dimensional lattices and the saturable nonlinearities. In section \ref{SecNum} we present the results of the numerical study. Section \ref{SecCon} summarises the findings and provides a brief plan for further relevant studies. \section{Preliminaries} \setcounter{equation}{0} \label{secII} For convenience, we set $\kappa=\nu=1$, without affecting the generality of the proofs, which are valid in either the focusing or the defocusing case. The AL \eqref{eq:AL0} can be derived from the Hamiltonian given by \begin{equation} H=\sum_{n} \overline{\psi}_n(\psi_{n+1}+\psi_{n-1}) \end{equation} with the following deformed Poisson bracket \begin{equation} \left\{\psi_m,\overline{\psi}_n\right\}=(1+\mu|\psi_m|^2)\delta_{m,n},\,\,\,\, \left\{\psi_m,{\psi}_n\right\}=\left\{\overline{\psi}_m,\overline{\psi}_n\right\}=0, \end{equation} yielding the equation of motion as \begin{equation} \dot{\psi}_n=\left\{H,\psi\right\}. \end{equation} The DNLS can be derived from the Hamiltonian \begin{equation} H=\sum_{n}\left(\overline{\phi}_n(\phi_{n+1}+\phi_{n-1})-\frac{\gamma}{2}|\phi|^4\right), \end{equation} using the standard Poisson bracket and the equation of motion \begin{equation} i\dot{\phi}_n=\left\{H,\phi\right\}. \end{equation} For the DNLS the norm \begin{equation} \label{eq:Pgamma} P_{\gamma}=\sum_{n}|\phi_n|^2, \end{equation} is conserved. The AL equation is completely integrable \cite{AL}, whereas its DNLS counterpart (\ref{eq:DNLS0}) is known to be nonintegrable \cite{DNLS},\cite{Herbst}. Notice that in (\ref{eq:AL0}) and (\ref{eq:DNLS0}) the nonlinear terms are both of cubic order. However, they are \textit{markedly different} in the sense that, the nonlinear terms in (\ref{eq:AL0}) are of nonlocal nature compared to the local terms in (\ref{eq:DNLS0}). In the case of the vanishing boundary conditions \eqref{vanbc}, the functional space setting is based on the spaces of complex summable sequences \begin{equation} l^p=\left\{ \phi=(\phi_n)_{n \in {\mathbb{Z}}}\,\in {\mathbb{C}}\,\,\, ||\phi||_{l^p}=\left(\sum_{n }|\phi_n|^p\right)^{1/p}\right\}. \end{equation} For any $\phi=(\phi_n)_{n \in {\mathbb{Z}}},\psi=(\psi_n)_{n \in {\mathbb{Z}}}\in l^2$ we consider the inner product \begin{equation} (\phi,\psi)_{l^2}=\sum_{n \in {\mathbb{Z}}}\phi_n \overline{\psi}_n, \end{equation} where $\overline{\psi}$ denotes the conjugate of $\psi_n$. With the associated norm \begin{equation} || \phi||_{l^2}^2=(\phi,\phi), \end{equation} $(l^2,(\cdot,\cdot),||\cdot||)$ is a complex Hilbert space. We will use the continuous embeddings \begin{eqnarray} \label{embe} l^r\subset l^s,\,\,\,|| \phi||_{l^s}\le || \phi||_{l^r},\,\,\,1 \le r\le s \le \infty.\label{eq:embeddings} \end{eqnarray} The following auxiliary result will aid the ensuing studies. \begin{lemma} \label{lemaux1} Let $\mu >0$. Assume that the initial condition \eqref{inAL} of the AL-lattice \eqref{eq:AL0} is such that \begin{eqnarray} \label{aux0} P_{\mu}(0)=\sum_{n}\ln(1+\mu |\psi_n(0)|^2)< \infty. \end{eqnarray} Then, the corresponding solution of the AL lattice satisfies the estimate \begin{equation} \mu || \psi(t) ||_{l^2}^2= \sum_{n}|\psi_n(t)|^2\le \exp(P_{\mu}(0))-1,\qquad \forall t\ge 0.\label{eq:psiconserved} \end{equation} \end{lemma} \noindent{\bf Proof:} Using that the function \begin{equation} f:\,{\mathbb{R}}_{+}\rightarrow {\mathbb{R}}_{+},\,\,\,x \mapsto \ln(1+\mu x), \end{equation} is continuous and bijective, we write \begin{equation} \label{auxeq1} P_{\mu}= \sum_{n}\ln(1+\mu|\psi_n|^2)=\sum_{n}|\lambda_n|^2. \end{equation} >From \eqref{auxeq1}, and by using the embedding \eqref{embe} for $s=2k$ and $r=2$, we get the estimate: \begin{eqnarray} \mu \sum_{n}|\psi_n|^2&=&\sum_{n}\left(\exp(|\lambda_n|^2)-1\right)=\sum_{n}\,\left(\sum_{k=0}^{\infty}\frac{|\lambda_n|^{2k}}{k!}-1\right)\nonumber\\ &=&\sum_{n}\,\sum_{k=1}^{\infty}\frac{|\lambda_n|^{2k}}{k!}=\sum_{k=1}^{\infty}\frac{1}{k!}\,\sum_{n}\left(|\lambda_n|^{2}\right)^k\nonumber\\ &\le&\sum_{k=1}^{\infty}\frac{1}{k!}\,\left(\sum_{n}|\lambda_n|^{2}\right)^k=\sum_{k=1}^{\infty}\frac{P_{\mu}^k}{k!}\nonumber\\ &=&\sum_{k=0}^{\infty}\frac{P_{\mu}^k}{k!}-1=\exp(P_{\mu})-1. \end{eqnarray} Since $P_{\mu}(t)$ is conserved, i.e $P_{\mu}(t)=P_{\mu}(0)$ for all $t\geq 0$, it follows that \begin{equation} \mu \sum_{n}|\psi_n(t)|^2\le \exp(P_{\mu}(0))-1,\qquad \forall t\ge 0, \end{equation} and the proof is finished.\ \ $\Box$ \section{Global existence of solutions for the Salerno lattice} \label{secIII} \setcounter{equation}{0} For the current study of existence and uniqueness of a global solution of the AL and DNLS, we combine them in the so called Salerno model introduced first in \cite{Cai94}: \begin{equation} i\frac{d \psi_n}{dt}+(1+\mu\,|\psi_{n}|^2)(\psi_{n+1}+\psi_{n-1})+ \gamma|\psi_n|^2\psi_n=0,\,\,\,n\in {\mathbb{Z}},\label{eq:systemglobal} \end{equation} with $\psi_n \in {\mathbb{C}}$ and initial conditions: \begin{equation} \psi_{n}(0)=\psi_{n,0},\,\,\,n \in {\mathbb{Z}}.\label{eq:icsglobal} \end{equation} Note that for $\gamma=0$ ($\mu=0$), the AL (DNLS) results from (\ref{eq:systemglobal}). The study of the Salerno model provided information about the intrinsic collapse of localised states in the presence of integrability-breaking terms, in particular, how the reflection symmetry and translational symmetry of the integrable AL are broken by the on-site nonlinearity of the DNLS. Thereby the study of the global existence of solutions of the Salerno system is an essential tool in the present functional analytic set-up for the main closeness results of AL and DNLS. We start by noticing that for any $\psi \in l^2$ the linear operator $A:\,l^2 \rightarrow l^2$, \begin{equation} (A\psi)_{n}=\psi_{n+1}+\psi_{n-1}, \end{equation} is continuous, since \begin{equation} || A\psi||_{l^2}^2\le 4|| \psi||_{l^2}^2.\label{eq:boundlinearA} \end{equation} We formulate the infinite dimensional dynamical system (\ref{eq:systemglobal})-(\ref{eq:icsglobal}) as as an initial value problem in the Hilbert space $l^2$ (see \cite{NT2005}): \begin{eqnarray} \dot{\psi}&=&F(\psi)\equiv i[(1+\mu\,|\psi|^2)A\psi+ \gamma|\psi|^2\psi],\,\,\,t>0,\label{eq:Hilbertsystem}\\ \psi(0)&=&\psi_0.\label{eq:Hilbertic} \end{eqnarray} Regarding the global existence of a unique solution to (\ref{eq:Hilbertsystem})-(\ref{eq:Hilbertic}), we have the following \begin{proposition} \label{lemINDNLS} For every $\psi_0\in l^2$, the problem (\ref{eq:Hilbertsystem})-(\ref{eq:Hilbertic}) possesses a unique global solution $\psi(t)$ on $[0,\infty)$ belonging to $C^1([0,\infty),l^2)$. \end{proposition} \noindent{\bf Proof:} First, we prove the {\it local existence} of a solution: For this aim, the system (\ref{eq:systemglobal})-(\ref{eq:icsglobal}) is conveniently expressed as an equivalent system of integral equations \begin{equation} \psi_n(t)=\psi_n(0)+i\,\int_{0}^t\left[(1+\mu\,|\psi_{n}(\tau)|^2)\Delta \psi_{n}(\tau)]+ \gamma|\psi_n(\tau)|^2\psi_n(\tau)\right] d\tau, \end{equation} with the notation $\Delta \psi_n=\psi_{n+1}+\psi_{n-1}$. We consider the set \begin{equation} {\cal{B}}=\left\{\phi\in C[0,\tilde{t}\,],l^2\,|\,|| \phi||_{l^2}\le \kappa \right\}, \end{equation} which is a Banach space itself, with norm \begin{equation} || \phi||_{{\cal{B}}}=\sup_{t\in [0,\tilde{t}\,]}|| \phi ||_{l^2}. \end{equation} Next, for $\phi \in l^2(\mathbb{Z})$, we define the nonlinear operator \begin{equation} Q_n(\phi(t))=\phi_n(0)+i\,\int_{0}^t\left[(1+\mu\,|\phi_{n}(\tau)|^2)\Delta \phi_{n}+ \gamma|\phi_n(\tau)|^2\phi_n(\tau)\right]d\tau. \end{equation} We shall prove that the operator $Q$ establishes a contraction mapping on ${\cal{B}}$. Note first, that it satisfies the upper bound \begin{equation} || Q(\phi) ||_{{\cal{B}}}\le \kappa_0+\tilde{t}\left[(1+\mu \kappa^2)2\kappa+\gamma \kappa^3\right]. \end{equation} We may choose $\kappa_0<\kappa/2$ and \begin{equation} \tilde{t}\le \frac{\kappa}{(1+\mu \kappa^2)2\kappa+\gamma \kappa^3}, \end{equation} so that $Q:\, {\cal{B}} \rightarrow {\cal{B}}$. Now, for every $\phi, \psi \in {\cal{B}}$, we have \begin{eqnarray} Q_n(\phi(t))-Q_n(\psi(t))&=&i\,\int_{0}^t\left(\left[(1+\mu\,|\phi_{n}(\tau)|^2)\Delta\phi_{n}(\tau)+ \gamma|\phi_n(\tau)|^2 \phi_n(\tau)\right]\right.\nonumber\\ &-&\left.\left[(1+\mu\,|\psi_{n}(\tau)|^2)\Delta\psi_{n}(\tau)+ \gamma|\psi_n(\tau)|^2 \psi_n(\tau)\right] \right)d\tau\nonumber\\ &=&\int_{0}^t\left((\Delta \phi_n-\Delta \psi_n)+\mu (|\phi_{n}|^2\Delta \phi_n-|\psi_{n}|^2\Delta \psi_n)-\gamma (|\phi_{n}|^2 \phi_n-|\psi_{n}|^2 \psi_n)\right) d\tau, \end{eqnarray} and estimate the norm as \begin{equation} || Q(\phi)-Q(\psi)||_{{\cal{B}}} \le \tilde{t} \left[2+(18\mu +2\gamma )\kappa^2\right]|| \phi-\psi||_{l^2}. \end{equation} Choosing $\tilde{t}$ such that \begin{equation} \tilde{t}\le \min\left\{ \frac{\kappa}{2(1+\mu \kappa^2)\kappa+\gamma \kappa^3}, \,\frac{1}{2+(18\mu +2\gamma )\kappa^2}\right\}, \end{equation} it is assured that $Q$ is a contraction mapping on ${\cal{B}}$. Then by Banach's fixed point theorem, there exists a {\it unique solution} of (\ref{eq:systemglobal}) provided by the unique fixed point of $Q$. To justify that $\psi(t)$ is $C^1$ with respect to $t$, we see from (\ref{eq:systemglobal}) that \begin{equation} \sup_{t\in [0,\tilde{t}\,]} ||\dot{\psi}(t)||_{l^2} \le 2(1+\mu \kappa^2)\kappa+\gamma \kappa^3. \end{equation} Consequently, the solution belongs to $C^1([0,\tilde{t}\,],l^2)$. Then, constructing a {\it maximal solution} is achieved by repeating the procedure above with initial conditions $\psi(\tilde{t}-T_{\small{f}})$ for some $0<T_{\small{f}}<\tilde{t}$. To conclude with global existence of solutions, we remark that the Hamiltonian of \eqref{eq:systemglobal} is \begin{eqnarray} \label{inham} H_{\small{S}}=\sum_n(\psi_n\overline{\psi}_{n+1}+\overline{\psi}_n\psi_{n+1})-\frac{\gamma}{2}\sum_n|\psi_n|^2-\frac{1}{\mu}\sum_n\ln(1+\mu|\psi_n|^2). \end{eqnarray} The \textit{deformed} Poisson-brackets are \begin{eqnarray*} \{\psi_n,\overline{\psi}_m\}&=&i(1+\mu|\psi_n|^2)\delta_{nm},\\ \{\psi_n,\psi_m\}&=&\{\overline{\psi}_n,\overline{\psi}_m\}=0, \end{eqnarray*} and the equation of motion (\ref{eq:systemglobal}) is obtained as \begin{eqnarray*} \dot{\psi}_n=\{H_{\small{S}},\psi_n\}. \end{eqnarray*} The system (3.1) conserves also the quantity $P_\mu(t)$ given in \eqref{eq:Pmu} (see also \cite{Cai94}). Then, for all initial conditions $\psi_0\in \ell^2$, global existence in $l^2$ follows actually from the conservation of \eqref{eq:Pmu}, the help of the elementary inequality $\ln(1+\mu x)\leq \mu x$ for all $x>0$ and Lemma \ref{lemaux1}, providing that $||\psi(t)||_{l^2} < \infty,\,\,\,\forall t\ge 0$. Similarly, global existence for the AL \eqref{eq:AL0} is ensured by the conservation of \eqref{eq:Pmu}. For the DNLS \eqref{eq:DNLS0}, global existence in $l^2$ is established by the conservation of $P_{\gamma}(t)$ given in \eqref{eq:Pgamma}. This concludes the proof. \ \ $\Box$ \section{Proofs of Closeness of the AL and DNLS solutions} \setcounter{equation}{0} \label{SecIV} \noindent{\bf Proof of Theorem \ref{Theorem:closeness}:} Closeness will be proved in the metric ${\rm dist}_{l^2}(\varphi,\theta)=|| \varphi - \theta ||_{l^2},\,\,\forall \varphi,\theta \in l^2$. We consider the local distance of the solutions $y_n=\phi_n-\psi_n$. On the one hand, we have that \begin{eqnarray} \label{dev0} \frac{d}{dt}|| y(t)||_{l^2}^2&=&2|| y(t)||_{l^2} \frac{d}{dt}|| y(t)||_{l^2}, \end{eqnarray} while, on the other hand, we estimate the derivative of the $l^2$-norm as follows: \begin{equation} \begin{split} \label{dev1} \frac{d}{dt}|| y||_{l^2}^2 &= \sum_{n}\bigg\{i\big[(\overline{y}_{n+1}+ \overline{y}_{n-1})y_n-({y}_{n+1}+ {y}_{n-1})\overline{y}_n\big]\\ &+i\mu |\psi_n|^2\big[(\overline{\psi}_{n+1} +\overline{\psi}_{n-1})y_n- ({\psi}_{n+1} +{\psi}_{n-1})\overline{y}_n\big]\\ &-i\gamma |\phi_n|^2(\overline{\phi}_n y_n-\phi_n \overline{y}_n)\bigg\}\\ &= 2\mu \sum_{n}|\psi_n|^2\bigg[(\mathrm{Im}\psi_{n+1}+\mathrm{Im}\psi_{n-1})\mathrm{Re} y_n-(\mathrm{Re}\psi_{n+1}\mathrm{Re}\psi_{n-1})\mathrm{Im} y_n\bigg]\\ &+2\gamma \sum_{n}|\phi_n|^2\bigg[\mathrm{Im}y_n \mathrm{Re}\phi_n-\mathrm{Im}y_n \mathrm{Re}\phi_n\bigg]\\ &\le 4\mu \sup_{n} |\psi_n|^2\sum_{n}\bigg[|\psi_{n+1}|+|\psi_{n-1}|\bigg]|y_n|+4\gamma \sup_{n} |\phi_n|^2\sum_{n}|\phi_n| |y_n|\\ &\le 2\big(4\mu || \psi(t)||_{l^2}^3+2\gamma || \phi(t)||_{l^2}^3\big) || y(t)||_{l^2}. \end{split} \end{equation} For the estimate \eqref{dev1}, we made use of the Cauchy-Schwarz and the continuous embeddings (\ref{eq:embeddings}). Then, combining \eqref{dev0} and \eqref{dev1}, one has for $t>0$: \begin{equation} \label{ode1} \frac{d}{dt}|| y(t)||_{l^2}\le 2\left(\gamma || \phi(t)||_{l^2}^3+2\mu || \psi(t)||_{l^2}^3\right). \end{equation} Note that under the hypotheses (\ref{eq:distance0})-(\ref{eq:Pmu0}), Proposition \ref{lemINDNLS} ensures that the right-hand side of \eqref{ode1} is uniformly bounded for all $t\in [0,\infty)$. Furthermore, due to the conservation of the quantities \eqref{eq:Pmu} and (\ref{eq:Pgamma}) (see also Proposition \ref{lemINDNLS}), the $l^2$ norm of $\psi$ and $\phi$ remains of the size $\epsilon$ for all times. Integrating the inequality \eqref{ode1} in the arbitrary interval $[0, T_{\small{f}}]$, and using the assumption \eqref{eq:distance0} on the distance $||y(0)||_{l^2}=||\phi(0)-y(0)||_{l^2}$ of the initial data, we obtain that \begin{equation*} \begin{split} || y(t)||_{l^2}&\leq 2\left(\gamma C_{0,\gamma}^3+2\mu C_{0,\mu}^3\right)T_{\small{f}}\varepsilon^3+||y(0)||_{l^2}\\ &\leq 2\left(\gamma C_{0,\gamma}^3+2\mu C_{0,\mu}^3\right)T_{\small{f}}\varepsilon^3+C_0\varepsilon^3. \end{split} \end{equation*} Hence, for the constant \begin{equation} \label{loc11} C=2\left(\gamma C_{0,\gamma}^3+2\mu C_{0,\mu}^3\right)T_{\small{f}}+C_0, \end{equation} we conclude with the claimed estimate \eqref{eq:boundy}. \ \ $\Box$ \\ The proof of Theorem \ref{Theorem:closeness} shows that the distance between the solutions of the AL and the DNLS measured in terms of the $l^2-$metric remains small (bounded above by ${\cal{O}}(\varepsilon^3)$), compared to the $l^2-$norm of the solutions themselves. Corollary \ref{Corollary:closeness2} follows immediately from (\ref{eq:boundy}) and continuous embedding $||y||_{l^\infty} \le ||y||_{l^2}$ and shows features for the $l^{\infty}-$norm (sup norm), determining the maximal distance between individual units, analogous to those of the $l^2-$ norm. \section{Remarks on Extensions to higher dimensional lattices and other nonlinearities} \label{Nlat} \setcounter{equation}{0} In this section, we report on extensions of Theorem \ref{Theorem:closeness} in higher dimensional lattices $\mathbb{Z}^N$, for $N\geq 2$ and for generalised nonlinearities. In the first paragraph, we comment on the closeness of the solutions of higher dimensional DNLS lattices with a generalised power nonlinearity to those of the $N$-dimensional generalisation of the AL-lattice. In the second paragraph we remark on the validity of Theorem \ref{Theorem:closeness} for the case of the DNLS with saturable nonlinearities. \paragraph{DNLS in higher dimensional lattices.} The result of Theorem \eqref{Theorem:closeness} can be extended to higher dimensional DNLS and AL lattices of the form \begin{eqnarray} \label{NDNLS} i\dot{\phi}_n+(\Delta_d\phi)_n+ \gamma|\phi_n|^{2\sigma}\phi_n=0,\;\;\sigma>0, \end{eqnarray} and \begin{eqnarray} \label{NAL} i\dot{\psi}_n+(\Delta_d\psi)_n+ \mu|\psi_n|^{2}\sum_{j=1}^N(\mathcal{T}_{j}\psi)_{n\in\mathbb{Z}^N}=0, \end{eqnarray} respectively. The $N$-dimensional AL \eqref{NAL} is motivated by \cite{Kim}, where the case $N=2$ is studied as the specific limit of a 2D-generalisation of the Salerno model \ref{eq:systemglobal}. The operator $(\Delta_d\psi)_n$ is the $N$-dimensional discrete Laplacian \begin{eqnarray*} (\Delta_d\psi)_{n\in\mathbb{Z}^N}=\sum_{m\in \mathcal{N}_n}\psi_m-2N\psi_n, \end{eqnarray*} where $\mathcal{N}_n$ denotes the set of $2N$ nearest neighbors of the point in $\mathbb{Z}^N$ with label $n$. With the linear operator $\mathcal{T}_{j}$ which is defined for every $\psi_n$, $n=(n_1,n_2,\ldots,n_N)\in\mathbb{Z}^N$, as \begin{eqnarray} \label{defopT} (\mathcal{T}_{j}\psi)_{n\in\mathbb{Z}^N}=\psi_{(n_1,n_2,\ldots,n_{j}+1,n_{j+1},\ldots,n_{N})}+\psi_{(n_1,n_2,\ldots,n_{j}-1,n_{j+1},\ldots,n_{N})},\;\;j=1,\ldots,N, \end{eqnarray} the nonlocal nonlinearity in \eqref{NAL} generalises the one of \eqref{eq:AL0}. Analytical solutions of the generalisation of the AL system \eqref{NAL} when $N=2$, have been derived in \cite{Kim2},\cite{2DAL4},\cite{2DAL2},\cite{2DAL3}. \paragraph{DNLS with saturable nonlinearity.} Another important example concerns the DNLS with the \textit{saturable} nonlinearity \begin{eqnarray} \label{DNLS1} \mathrm{i}\dot{\phi}_n+(\phi_{n+1}-2\phi_n+\phi_{n-1})_n+ \frac{\gamma |\phi_n|^2\phi_n}{1+\rho|\phi_n|^2}=0,\;\;\gamma,\rho>0, \end{eqnarray} and consequently, its other counterpart \begin{eqnarray} \label{DNLS2} \mathrm{i}\dot{U}_n+ (U_{n+1}-2U_n+U_{n-1})- \frac{\Gamma U_n}{1+|U_n|^2}=0,\;\;\Gamma>0, \end{eqnarray} because the models \eqref{DNLS1} and \eqref{DNLS2} are not independent: solutions of the saturable model \eqref{DNLS1} can be mapped to the solutions of the model \eqref{DNLS2} by the invertible transformation \begin{eqnarray*} \phi_n(t)=\frac{1}{\sqrt{\rho}}\exp\left(\frac{i\gamma t}{\rho}\right)U_n(t),\;\;\Gamma=\frac{\gamma}{\rho}, \end{eqnarray*} see \cite{Satn1}. For the saturable DNLS, numerous studies have verified the propagation of discrete solitons and the emergence of breathers in the 1D and 2D lattices \cite{Satn1},\cite{Satn2},\cite{Satn3},\cite{Satn4},\cite{Satn5}. The conserved quantities of the DNLS model \eqref{DNLS2} are the power $P_{\gamma}(t)$ given in \eqref{eq:Pgamma} and the Hamiltonian \begin{eqnarray*} \label{HS} \mathcal{H}_{\tiny{s}}=\sum_{n}|U_{n+1}-U_n|^2 +\Gamma\sum_{n}\ln(1+|U_n|^2). \end{eqnarray*} The extension of Theorem \ref{Theorem:closeness} to both saturable models follows from the model \eqref{DNLS1}. The corresponding evolution equation for the local distance $y_n=\phi_n-\psi_n$, between the solutions of the DNLS \eqref{DNLS1} and the AL lattice \eqref{eq:AL0} is \begin{eqnarray*} i\dot{y}_n=-(y_{n+1}-2y_n+y_{n-1})-\left[\frac{\gamma |\phi_n|^2\phi_n}{1+\rho|\phi_n|^2}-\mu|\psi_n|^{2}(\psi_{n+1}+\psi_{n-1})\right], \end{eqnarray*} and the derivative of its $l^2$ norm satisfies \begin{eqnarray} \label{locNS2} \frac{1}{2}\frac{d}{dt}|| y||_{l^2}^2=-\gamma\mathrm{Im}\sum_{n}\frac{|\phi_n|^2\phi_n}{1+\rho|\phi_n|^2}\overline{y}_n+\mu\mathrm{Im}\sum_{n}\left[|\psi_n|^{2}(\psi_{n+1}+\psi_{n-1})\right]\overline{y}_n. \end{eqnarray} The first term on the right-hand side of \eqref{locNS2} is estimated as \begin{eqnarray*} \left|\mathrm{Im}\sum_{n}\frac{\phi_n|\phi_n|^2}{1+\rho|\phi_n|^2}\overline{y}_n\right|\leq \sum_{n}|\phi_n|^3\,|y_n|\leq ||\phi||_{l^2}^3||y||_{l^2}, \end{eqnarray*} which can be used to derive exactly the same differential inequality \eqref{ode1}, yielding Theorem \ref{Theorem:closeness} under the same assumptions and same size of $\epsilon$ for the closeness estimate \eqref{eq:boundy}. Such an extension is also valid for higher dimensional DNLS saturable models. \begin{figure}[tbp!] \begin{center} \begin{tabular}{cc} \includegraphics[width=.50\textwidth]{evol_cubic_1.eps} \includegraphics[width=.50\textwidth]{evol_sat_1.eps}\\ \end{tabular} \end{center} \caption{Spatiotemporal evolution of the initial condition \eqref{sin1} in the DNLS lattice with $\gamma=1$ for the cubic nonlinearity (left panel) and the saturable nonlinearity (right panel). Parameters of the initial condition $a=\pi/10$ and $\beta=0.02$, $\mu=1$. } \label{fig1} \end{figure} \begin{figure}[tbp!] \begin{center} \begin{tabular}{cc} \includegraphics[width=.50\textwidth]{norml2_1.eps} \includegraphics[width=.50\textwidth]{norminf_1.eps}\\ \includegraphics[width=.50\textwidth]{XCM_1.eps} \end{tabular} \end{center} \caption{Top row: Time evolution of $||y(t)||_{l^2}$ and $||y(t)||_{l^{\infty}}$, corresponding to the soliton dynamics shown in the upper panel of Figure \ref{fig1} for the DNLS with cubic and saturable nonlinearity (details in the text of section \ref{SecNum}). Bottom row: Space time evolution of the soliton center $X_{\mathrm{CM}}=(\sum_n n|\phi_n|^2)/(\sum_n |\phi_n|^2)$ for the cubic and the saturable DNLS. } \label{fig2} \end{figure} \begin{figure}[tbp!] \begin{center} \begin{tabular}{cc} \includegraphics[width=.50\textwidth]{err_cubic.eps} \includegraphics[width=.50\textwidth]{err_sat.eps} \end{tabular} \end{center} \caption{ Logarithmic scaled plots of the variation of the distance functions $||y(t)||_{l^2}$ and $||y(t)||_{l^{\infty}}$ as functions of $\epsilon$, for fixed $T_f=1000$. Left panel: Cubic nonlinearity. Right panel: Saturable nonlinearity. Details are given in the text.} \label{fig3} \end{figure} \paragraph{Comments on global existence and quasi-collapse in higher dimensional lattices.} Crucial to our discussion of higher dimensional conservative discrete nonlinear Schr\"odinger equations is the assurance of the global existence of their solutions. The solutions of the DNLS \eqref{NDNLS} exist unconditionally for any $\sigma>0$ and any $N\geq 1$. This is a vital difference to its NLS pde counterpart whose solutions may blow-up in finite time when $\sigma>2/N$. The same unconditional global existence is shared by the higher dimensional AL \eqref{NAL} or Salerno models. As explained in \cite{Kim} for the 2D-lattice, if the value of the deformed power is $P_0$, then the sup-norm $||\phi||_{l^{\infty}}$ of the solution can never exceed the value $[\exp(\mu P_0)-1]$. This is actually the argument of Lemma \ref{lemaux1}, which can be extended to the case $N\geq 1$, establishing global existence of solutions for the $N$-dimensional AL and Salerno equations. The work \cite{Kim} provides an analysis of the notion of \textit{quasi-collapse} which can be observed in discrete systems: Blow-up in finite time for the the NLS pde corresponds to the effect of concentration of all energy in few sites in the conservative discrete NLS counterparts. The quasi-collapse supplies the mechanism for the emergence of very narrow self-trapped states in the lattice from its initial distribution, which however, does not exhibit a finite-time-singularity (unless additional energy gain mechanisms are present \cite{Dgl}). \section{ A numerical study: Persistence of the AL-soliton in DNLS} \setcounter{equation}{0} \label{SecNum} To illustrate the applicability of the analytical results we performed a numerical study examining the dynamics of the DNLS lattice for both types of nonlinearity, cubic and saturable. As initial conditions we used the one-soliton solution of the AL \eqref{eq:one-soliton}: \begin{eqnarray} &&\phi_n(0)=\psi^s_n(0)\nonumber\\ \label{sin1} &=&\frac{\sinh\beta}{\sqrt{\mu}} \mathrm{sech}(\beta n)\exp(i\alpha n),\,\,\,n\in {\mathbb{Z}},\\ &&|| \psi^s(0)||_{l^2}=|| \phi(0)||_{l^2}=\varepsilon, \label{sin2} \end{eqnarray} where $\alpha \in [-\pi,\pi]$ and $\beta \in [0,\infty)$. In order to comply with the smallness condition \eqref{sin2}, we chose the parameter values accordingly so that persistence of the corresponding AL soliton in the DNLS can be expected. Figure \ref{fig1} depicts the spatio-temporal evolution of the density $|\phi_n(t)|^2$ of the soliton initial condition when $\alpha=\pi/10$ and $\beta=0.02$, for the DNLS equation with $\gamma=1$. The dynamics for the cubic (saturable) DNLS is shown in the left (right) panel. The evolution is presented for the time span $t\in [0,2500]$ ($T_{\small{f}}=2500$) and for a chain of $K=2000$ units with periodic boundary conditions. The evolution in both DNLS systems confirms the persistence of the AL soliton with amplitude of order $\mathcal{O}(\varepsilon)$ in both lattices. Notably, persistence lasts for a significant large time interval, in particular with view to that our analysis is a ``continuous dependence on the initial data result'' {\em where generally, the time interval of such a dependence on the initial data for a given equation might be short}. Moreover, we studied the continuous dependence of two different systems, the cubic and the saturable DNLS, respectively. The dynamics of the solitons are almost indistinguishable in both DNLS lattices. Note that for this example of initial condition, the value of the $l^2$-norm \eqref{sin2} of the initial condition is $\varepsilon=0.2$. Our numerical results confirm convincingly the analytical predictions presented by the Theorem \ref{Theorem:closeness} and Corollary \ref{Corollary:closeness2}, concerning the distance $$y(t)=\phi(t)-\psi(t),$$ of the solutions of the DNLS and the AL: First, Figure \ref{fig2} depicts the time evolution of $||y(t)||_{l^2}$ (left panel) and $||y(t)||_{l^{\infty}}$ (right panel), corresponding to the dynamics of the cubic DNLS shown in the upper panel of Figure \ref{fig1}. The time evolution for the cubic DNLS is plotted as the blue curve while for the saturable as red. However, the curves are still indistinguishable, in conformity with the dynamics portrayed in Figure \ref{fig1}. The results of Figure 2, provide a first justification that both $||y(t)||_{l^2}$ and $||y(t)||_{l^{\infty}}$ remain small for significantly long time intervals. Another interesting feature is the preservation of the soliton's speed as shown in the bottom panel of Figure \ref{fig2}. For the considered value of $\beta$, we have $\sinh(\beta)\approx\beta$, so the soliton's speed is $v_s=2\sin(\alpha)=0.6181$. To be more precise, we examined the variation of the distances for varying small $\epsilon$. Figure 3, depicts logarithmic scaled plots of the variation of the distances $||y||_{l^2}$ and $||y||_{l^{\infty}}$ as functions of $\epsilon$ for fixed $T_f=1000$. The left (right) panel illustrates the results of the study for the DNLS with cubic (saturable) nonlinearity. The dashed lines in both panels, correspond to lines of the analytical estimates of Theorem \ref{Theorem:closeness} and Corollary \ref{Corollary:closeness2}, respectively, of the form $||y||_{l^2}$ vs $C\epsilon^3$ and $||y||_{l^{\infty}}$ vs $\tilde{C}\epsilon^3$. For the cubic case, we have $C=82.41, \tilde{C}=26.71$. For the saturable case, $C=82.69, \tilde{C}=26.79$. The dots on the full lines correspond to the numerically detected rates of the variations of the distance functions fitted to the lines of the form $||y||_{l^2}$ versus $C\epsilon^a$ and $||y||_{l^{\infty}}$ versus $\tilde{C}\epsilon^b$, for the above values of constants $C$ and $\tilde{C}$: for the case of the cubic nonlinearity we found that $a=5.00$ and $b=5.60$, while for the saturable nonlinearity we found that $a=5.01$ and $b=5.60$. The numerical results illustrate that the analytical estimates are not only fulfilled, but also that the numerical variation of the distance functions is of significantly lower rate, namely of order $\sim\epsilon^5$. \section{Conclusions} \label{SecCon} We have proved closeness of solutions of the integrable Ablowitz-Ladik equation and the non-integrable Discrete Nonlinear Schr\"odinger equation, in the sense of ``a continuous dependence of the solutions on their initial data''. For the Discrete Nonlinear Schr\"odinger equation we have considered the physically important examples of the cubic and the saturable nonlinearity. The analytical results are of relevance in regard to the persistence of small amplitude solutions of the Ablowitz-Ladik equation in non-integrable discrete Nonlinear Schr\"odinger equations. For an illustration of such persistence we have performed numerical simulations considering the analytical 1-soliton solution of the Ablowitz-Ladik equation. It has turned out that the numerical findings are in excellent agreement with the analytical predictions; thus corroborating that small amplitude solitary waves close to the analytical soliton of the Ablowitz-Ladik equation persist in Discrete Nonlinear Schr\"odinger equations for both types of nonlinearities, cubic as well as saturable. Future plans shall concern studies illustrating the persistence of other localised wave forms, supplied by the analytical solutions of the Ablowitz-Ladik equation, in other (nonintegrable) Discrete Nonlinear Schr\"odinger models. An important example is that of rational solutions. Particularly these rational solutions are non-trivial for computational studies, as the corresponding parameter values must be suitably chosen such that "small amplitude" waveforms get formed in order to apply our analytical methods appropriate for low-amplitude solutions. It would also be interesting to investigate the extension of the theoretical results to other models with higher order linear and nonlinear coupling operators (such as the discrete $p$-Laplacian \cite{GJ1}, the discrete biharmonic operator \cite{PNK2020}, and even other generalisations of the Ablowitz-Ladik system \cite{Kim2}, \cite{PM1}, \cite{PM2}, \cite{JC19}. Such works are in progress and relevant results will be reported elsewhere \cite{DJNpro}. \section*{Acknowledgment} We would like to thank the referee for his/her constructive comments and suggestions. J.C.-M. acknowledges support from the Regional Government of Andalusia and EU (FEDER program) under the projects P18-RT-3480 and US-1380977, and MICINN, AEI and EU (FEDER program) under the projects PID2019-110430GB-C21 and PID2020-112620GB-I00.
\section{Proofs of Section \ref{sec:2}}\label{sec:appen:1} \subsection{Proof of Lemma \ref{lem:1}}\label{pf:lem:1} We have \begin{align*} \begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{\mu_k, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{\mu_k, \nu}^k \end{pmatrix}^T \begin{pmatrix} \Delta{\boldsymbol{x}}^k\\ \Delta{\boldsymbol{\lambda}}^k \end{pmatrix} & \stackrel{\eqref{equ:derivative:AL}}{=} (\Delta{\boldsymbol{x}}^k)^T\rbr{I + \nu M_kG_k}\nabla_{{\boldsymbol{x}}}\mathcal{L}^k + \mu_k (\Delta{\boldsymbol{x}}^k)^TG_k^Tc_k + (\Delta{\boldsymbol{\lambda}}^k)^Tc_k \\ & \quad + \nu (\Delta{\boldsymbol{\lambda}}^k)^TG_kG_k^TG_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k\\ & \stackrel{\eqref{equ:Newton:AL}}{=} (\Delta{\boldsymbol{x}}^k)^T\nabla_{{\boldsymbol{x}}}\mathcal{L}^k - \mu_k\|c_k\|^2 + c_k^T\Delta{\boldsymbol{\lambda}}^k - \nu\|G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k\|^2\\ & \stackrel{\eqref{equ:Newton:AL}}{=} - (\Delta{\boldsymbol{x}}^k)^TB_k\Delta{\boldsymbol{x}}^k +c_k^T(\Delta{\boldsymbol{\lambda}}^k + {\hat{\Delta}}{\boldsymbol{\lambda}}^k) - \mu_k\|c_k\|^2 - \nu\|G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k\|^2. \end{align*} This completes the proof. \subsection{Proof of Theorem \ref{thm:1}}\label{pf:thm:1} Under Assumption \ref{ass:D:LICQ}, \eqref{equ:Newton:AL} in Line 3 can be solved by Lemma 16.1 in \cite{Nocedal2006Numerical}. Therefore, it suffices to show that, in each iteration, the While loop in Line 4 will stop in finite time. Then, $\alpha_k$ in Line 7 can be selected using backtracking line search by mean value theorem. For the While loop, it suffices to show that there exist thresholds $\mu, \delta>0$ such that $\forall \mu_k\geq \mu, \delta_k\leq \delta,$ and $k$, \begin{equation}\label{pequ:1} \begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{\mu_k, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{\mu_k, \nu}^k \end{pmatrix}^T \begin{pmatrix} \Delta{\boldsymbol{x}}^k\\ \Delta{\boldsymbol{\lambda}}^k \end{pmatrix} \leq -\delta_k \nbr{\begin{pmatrix} \Delta {\boldsymbol{x}}^k\\ G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}}^2. \end{equation} To show this, let us decompose $\Delta{\boldsymbol{x}}^k$ as \begin{equation}\label{N:1} \Delta{\boldsymbol{x}}^k = \Delta{\boldsymbol{u}}^k + \Delta{\boldsymbol{v}}^k \quad\text{where}\quad \Delta{\boldsymbol{u}}^k\in \text{Image}(G_k^T) \text{ and } G_k\Delta{\boldsymbol{v}}^k = {\boldsymbol 0}. \end{equation} Then $\Delta{\boldsymbol{u}}^k = G_k^T{\boldsymbol{a}}^k$ for some ${\boldsymbol{a}}^k$, and hence $\|\Delta{\boldsymbol{u}}^k\| \leq \sqrt{\kappa_{2,G}}\|{\boldsymbol{a}}^k\|$ by \eqref{Prop:1}, and further \begin{equation}\label{NN:A:3} \|c_k\| \stackrel{\eqref{equ:Newton:AL}}{=} \|G_k\Delta{\boldsymbol{x}}^k\| \stackrel{\eqref{N:1}}{=}\| G_k\Delta{\boldsymbol{u}}^k\| = \|G_kG_k^T{\boldsymbol{a}}^k\| \stackrel{\eqref{Prop:1}}{\geq} \kappa_{1,G}\|{\boldsymbol{a}}^k\| \geq \frac{\kappa_{1,G}}{\sqrt{\kappa_{2,G}}}\|\Delta{\boldsymbol{u}}^k\|. \end{equation} Moreover, by Assumption \ref{ass:D:LICQ} and \eqref{Prop:1}, we obtain \begin{equation}\label{N:2} \begin{aligned} \|\Delta{\boldsymbol{\lambda}}^k\| & \stackrel{\eqref{equ:Newton:AL}}{=} \| (G_kG_k^T)^{-1}(G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k + M_k^T\Delta{\boldsymbol{x}}^k) \| \leq \frac{1}{\kappa_{1,G}}(\|G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k\| + \kappa_M\|\Delta{\boldsymbol{x}}^k\|),\\ \|{\hat{\Delta}}{\boldsymbol{\lambda}}^k\| & \stackrel{\eqref{equ:Newton:AL}}{=} \| (G_kG_k^T)^{-1}(G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k + G_kB_k\Delta{\boldsymbol{x}}^k) \|\leq \frac{1}{\kappa_{1,G}}(\|G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k\| + \sqrt{\kappa_{2,G}}\kappa_B\|\Delta{\boldsymbol{x}}^k\|) . \end{aligned} \end{equation} Then, we apply Lemma \ref{lem:1} and have \begin{align}\label{pequ:56} \begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{\mu_k, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{\mu_k, \nu}^k \end{pmatrix}^T & \begin{pmatrix} \Delta{\boldsymbol{x}}^k\\ \Delta{\boldsymbol{\lambda}}^k \end{pmatrix} \nonumber\\ = & - (\Delta{\boldsymbol{x}}^k)^TB_k\Delta{\boldsymbol{x}}^k +c_k^T(\Delta{\boldsymbol{\lambda}}^k + {\hat{\Delta}}{\boldsymbol{\lambda}}^k) - \mu_k\|c_k\|^2 - \nu\|G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k\|^2 \nonumber\\ & \hskip-0.6cm \stackrel{\eqref{N:1}}{=} -(\Delta{\boldsymbol{v}}^k)^TB_k \Delta{\boldsymbol{v}}^k - 2(\Delta{\boldsymbol{u}}^k)^TB_k \Delta{\boldsymbol{v}}^k - (\Delta{\boldsymbol{u}}^k)^TB_k \Delta{\boldsymbol{u}}^k+ c_k^T(\Delta{\boldsymbol{\lambda}}^k + {\hat{\Delta}}{\boldsymbol{\lambda}}^k) \nonumber\\ & \quad - \mu_k\|c_k\|^2 - \nu\|G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k\|^2 \nonumber\\ \leq& -\gamma_{RH}\|\Delta{\boldsymbol{v}}^k\|^2 + 2\|\Delta{\boldsymbol{v}}^k\|\cdot\|B_k\Delta{\boldsymbol{u}}^k\| -(\Delta{\boldsymbol{u}}^k)^TB_k \Delta{\boldsymbol{u}}^k + \frac{2}{\kappa_{1,G}}\|c_k\|\cdot\|G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k\| \nonumber\\ &\quad + \frac{\kappa_M+\sqrt{\kappa_{2,G}}\kappa_B}{\kappa_{1,G}}\|c_k\|\cdot\|\Delta{\boldsymbol{x}}^k\| - \mu_k\|c_k\|^2 - \nu\|G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k\|^2, \end{align} where the third inequality is due to Assumption \ref{ass:D:LICQ} and \eqref{N:2}. Noting that \begin{align*} 2\|\Delta{\boldsymbol{v}}^k\|\cdot\|B_k\Delta{\boldsymbol{u}}^k\| \leq & \frac{\gamma_{RH}}{4}\|\Delta{\boldsymbol{v}}^k\|^2 + \frac{4}{\gamma_{RH}}(\Delta{\boldsymbol{u}}^k)^TB_k^2\Delta{\boldsymbol{u}}^k,\\ \frac{2}{\kappa_{1,G}}\|c_k\|\cdot\|G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k\| \leq & \frac{2}{\kappa_{1,G}^2\nu}\|c_k\|^2 + \frac{\nu}{2}\|G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k\|^2,\\ \frac{\kappa_M+\sqrt{\kappa_{2,G}}\kappa_B}{\kappa_{1,G}}\|c_k\|\cdot\|\Delta{\boldsymbol{x}}^k\| \leq & \frac{(\kappa_M+\sqrt{\kappa_{2,G}}\kappa_B)^2}{\kappa_{1,G}^2\gamma_{RH}}\|c_k\|^2 + \frac{\gamma_{RH}}{4}\|\Delta{\boldsymbol{x}}^k\|^2, \end{align*} we plug the above inequalities into \eqref{pequ:56} and obtain \begin{align*} \begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{\mu_k, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{\mu_k, \nu}^k \end{pmatrix}^T & \begin{pmatrix} \Delta{\boldsymbol{x}}^k\\ \Delta{\boldsymbol{\lambda}}^k \end{pmatrix} \nonumber\\ \leq & -\frac{3\gamma_{RH}}{4}\|\Delta{\boldsymbol{v}}^k\|^2 + (\Delta{\boldsymbol{u}}^k)^T\rbr{\frac{4}{\gamma_{RH}}B_k^2 - B_k}\Delta{\boldsymbol{u}}^k - \frac{\nu}{2}\|G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k\|^2\\ & \quad + \rbr{\frac{2}{\kappa_{1,G}^2\nu} + \frac{\rbr{\kappa_M+\sqrt{\kappa_{2,G}}\kappa_B }^2 }{\kappa_{1,G}^2\gamma_{RH} } - \mu_k}\|c_k\|^2 + \frac{\gamma_{RH}}{4}\|\Delta{\boldsymbol{x}}^k\|^2\\ \stackrel{\eqref{N:1}}{=} & -\frac{3\gamma_{RH}}{4}\|\Delta{\boldsymbol{x}}^k\|^2 + (\Delta{\boldsymbol{u}}^k)^T\rbr{\frac{4}{\gamma_{RH}}B_k^2 + \frac{3\gamma_{RH}}{4}I - B_k}\Delta{\boldsymbol{u}}^k - \frac{\nu}{2}\|G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k\|^2\\ & \quad + \rbr{\frac{2}{\kappa_{1,G}^2\nu} + \frac{\rbr{\kappa_M+\sqrt{\kappa_{2,G}}\kappa_B }^2 }{\kappa_{1,G}^2\gamma_{RH} } - \mu_k}\|c_k\|^2 + \frac{\gamma_{RH}}{4}\|\Delta{\boldsymbol{x}}^k\|^2\\ \leq & - \frac{\gamma_{RH}\wedge \nu}{2}(\|\Delta{\boldsymbol{x}}^k\|^2 + \|G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k\|^2) + (\Delta{\boldsymbol{u}}^k)^T\rbr{\frac{4}{\gamma_{RH}}B_k^2+ \frac{3\gamma_{RH}}{4}I - B_k}\Delta{\boldsymbol{u}}^k \nonumber\\ & \quad \quad + \rbr{\frac{2}{\kappa_{1,G}^2\nu} + \frac{\rbr{\kappa_M+\sqrt{\kappa_{2,G}}\kappa_B }^2 }{\kappa_{1,G}^2\gamma_{RH} } - \mu_k}\|c_k\|^2. \end{align*} By \eqref{NN:A:3}, Assumption \ref{ass:D:LICQ} and, with loss of generality (WLOG), supposing $\kappa_B \geq \gamma_{RH}$, we have \begin{equation*} (\Delta{\boldsymbol{u}}^k)^T\rbr{\frac{4B_k^2}{\gamma_{RH}}+ \frac{3\gamma_{RH}}{4}I - B_k}\Delta{\boldsymbol{u}}^k \leq \frac{\kappa_{2,G}}{\kappa_{1,G}^2}\rbr{\frac{4\kappa_B^2}{\gamma_{RH}} + \frac{3\gamma_{RH}}{4} +\kappa_B }\|c_k\|^2 \leq \frac{6\kappa_{2,G}\kappa_B^2}{\kappa_{1,G}^2\gamma_{RH}}\|c_k\|^2. \end{equation*} Combining the above two displays, we have that \eqref{pequ:1} holds when \begin{equation}\label{N:7} \mu_k \geq \frac{2}{\kappa_{1,G}^2\nu} + \frac{\rbr{\kappa_M+\sqrt{\kappa_{2,G}}\kappa_B }^2 }{\kappa_{1,G}^2\gamma_{RH}} + \frac{6\kappa_{2,G}\kappa_B^2}{\kappa_{1,G}^2\gamma_{RH}} \quad \text{and}\quad \delta_k \leq \frac{\gamma_{RH}\wedge \nu}{2}. \end{equation} Noting that the thresholds $\mu_k$ and $\delta_k$ on the right hand side are independent of $k$, and Algorithm \ref{alg:SQP} increases $\mu_k$ and decreases $\delta_k$ by a factor of $\rho$ in each while loop, thus, there exist $K$, ${\hat{\mu}}$, ${\hat{\delta}}>0$ such that $\mu_k = {\hat{\mu}}$ and $\delta_k = {\hat{\delta}}$, $\forall k \geq K$. This completes the proof. \subsection{Proof of Lemma \ref{lem:2}}\label{pf:lem:2} By Theorem \ref{thm:1}, we have $\mu_k = {\hat{\mu}}$ and $\delta_k = {\hat{\delta}}$ for all $k \geq K$. To simplify the notation, we suppress the iteration index $k$. By Taylor expansion and \eqref{Prop:1}, \begin{equation}\label{pequ:2} \mathcal{L}_{{\hat{\mu}}, \nu}({\boldsymbol{x}}+\alpha\Delta{\boldsymbol{x}}, {\boldsymbol{\lambda}}+\alpha\Delta{\boldsymbol{\lambda}}) \leq \mathcal{L}_{{\hat{\mu}}, \nu} + \alpha \begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{{\hat{\mu}}, \nu}\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\hat{\mu}}, \nu} \end{pmatrix}^T\begin{pmatrix} \Delta{\boldsymbol{x}}\\ \Delta{\boldsymbol{\lambda}} \end{pmatrix} + \frac{\alpha^2\kappa_{\mathcal{L}_{{\hat{\mu}}, \nu}}}{2}\nbr{\begin{pmatrix} \Delta{\boldsymbol{x}}\\ \Delta{\boldsymbol{\lambda}} \end{pmatrix}}^2. \end{equation} Moreover, WLOG supposing $\kappa_M \geq 1\geq \kappa_{1,G}$, we have \begin{align*} \frac{\kappa_{\mathcal{L}_{{\hat{\mu}}, \nu}}}{2}\nbr{\begin{pmatrix} \Delta{\boldsymbol{x}}\\ \Delta{\boldsymbol{\lambda}} \end{pmatrix}}^2 & \stackrel{\eqref{N:2}}{\leq} \frac{\kappa_{\mathcal{L}_{{\hat{\mu}}, \nu}}}{2}\|\Delta{\boldsymbol{x}}\|^2 + \frac{\kappa_{\mathcal{L}_{{\hat{\mu}}, \nu}}}{\kappa_{1,G}^2}\rbr{\|G\nabla_{{\boldsymbol{x}}}\mathcal{L}\|^2 + \kappa_M^2\|\Delta{\boldsymbol{x}}\|^2}\\ & \;\; \leq \frac{2\kappa_{\mathcal{L}_{{\hat{\mu}}, \nu}} \kappa_M^2}{\kappa_{1,G}^2}\nbr{\begin{pmatrix} \Delta{\boldsymbol{x}}\\ G\nabla_{{\boldsymbol{x}}}\mathcal{L} \end{pmatrix}}^2 \leq -\frac{2\kappa_{\mathcal{L}_{{\hat{\mu}}, \nu}}\kappa_M^2 }{{\hat{\delta}}\kappa_{1,G}^2}\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{{\hat{\mu}}, \nu}\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\hat{\mu}}, \nu} \end{pmatrix}^T\begin{pmatrix} \Delta{\boldsymbol{x}}\\ \Delta{\boldsymbol{\lambda}} \end{pmatrix}, \end{align*} where the last inequality is from the While loop in Line 4 of Algorithm \ref{alg:SQP}. Combining with \eqref{pequ:2}, \begin{align*} \mathcal{L}_{{\hat{\mu}}, \nu}({\boldsymbol{x}}+\alpha\Delta{\boldsymbol{x}}, {\boldsymbol{\lambda}}+\alpha\Delta{\boldsymbol{\lambda}}) \leq \mathcal{L}_{{\hat{\mu}}, \nu} + \alpha\rbr{1 - \frac{2\alpha\kappa_{\mathcal{L}_{{\hat{\mu}}, \nu}}\kappa_M^2}{{\hat{\delta}}\kappa_{1,G}^2}} \begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{{\hat{\mu}}, \nu}\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\hat{\mu}}, \nu} \end{pmatrix}^T\begin{pmatrix} \Delta{\boldsymbol{x}}\\ \Delta{\boldsymbol{\lambda}} \end{pmatrix}. \end{align*} Now the Armijo condition \eqref{equ:Armijo} holds when \begin{align*} 1 - \frac{2\alpha\kappa_{\mathcal{L}_{{\hat{\mu}}, \nu}}\kappa_M^2}{{\hat{\delta}}\kappa_{1,G}^2}\geq \beta \Longleftrightarrow \alpha \leq \frac{(1-\beta){\hat{\delta}}\kappa_{1,G}^2}{2\kappa_{\mathcal{L}_{{\hat{\mu}}, \nu}}\kappa_M^2}. \end{align*} Thus, if we use backtracking line search, $\alpha$ will be uniformly away from zero. This finishes the proof. \subsection{Proof of Theorem \ref{thm:3}}\label{pf:thm:3} By Theorem \ref{thm:1} and Lemma \ref{lem:2}, we know $\mu_k = {\hat{\mu}}$, $\delta_k = {\hat{\delta}}$, $\alpha_k \geq {\hat{\alpha}}$ for any $k\geq K$. By the Armijo condition \eqref{equ:Armijo} and the While loop in Line 4 of Algorithm \ref{alg:SQP}, \begin{equation*} \mathcal{L}_{{\hat{\mu}}, \nu}^{k+1} \leq \mathcal{L}_{{\hat{\mu}}, \nu}^k + \alpha_k \beta\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{{\hat{\mu}}, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\hat{\mu}}, \nu}^k \end{pmatrix}^T \begin{pmatrix} \Delta{\boldsymbol{x}}^k\\ \Delta{\boldsymbol{\lambda}}^k \end{pmatrix}\leq \mathcal{L}_{{\hat{\mu}}, \nu}^k - {\hat{\alpha}}\beta{\hat{\delta}}\nbr{\begin{pmatrix} \Delta{\boldsymbol{x}}^k\\ G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}}^2. \end{equation*} Summing over $k = K,K+1,\ldots$, we obtain \begin{align*} {\hat{\alpha}}\beta{\hat{\delta}}\sum_{k=K}^{\infty}\nbr{\begin{pmatrix} \Delta{\boldsymbol{x}}^k\\ G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}}^2 \leq \mathcal{L}_{{\hat{\mu}}, \nu}({\boldsymbol{x}}^K, {\boldsymbol{\lambda}}^K) - \min_{\mathcal{X}\times\Lambda}\mathcal{L}_{{\hat{\mu}}, \nu}({\boldsymbol{x}}, {\boldsymbol{\lambda}}) <\infty. \end{align*} Thus, $\|\Delta{\boldsymbol{x}}^k\|\rightarrow 0$ and $\|G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k\|\rightarrow 0$. Finally, we have \begin{align*} \|\nabla_{{\boldsymbol{x}}}\mathcal{L}^k\| & \leq \|(I - G_k^T(G_kG_k^T)^{-1}G_k)\nabla_{{\boldsymbol{x}}}\mathcal{L}^k\| + \|G_k^T(G_kG_k^T)^{-1}G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k\|\\ & \stackrel{\eqref{equ:Newton:AL}}{=} \|(I - G_k^T(G_kG_k^T)^{-1}G_k)B_k\Delta{\boldsymbol{x}}^k\| + \|G_k^T(G_kG_k^T)^{-1}G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}_k\| \rightarrow 0,\\ \|c_k\| & \stackrel{\eqref{equ:Newton:AL}}{=} \|G_k\Delta{\boldsymbol{x}}^k\|\rightarrow 0. \end{align*} This completes the proof. \section{Local Convergence of Algorithm \ref{alg:SQP}}\label{sec:appen:2} We show superlinear convergence rate for Algorithm \ref{alg:SQP}. We suppose that the iterates $\{({\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k)\}_k$ generated by Algorithm \ref{alg:SQP} converge to a KKT point $({\boldsymbol{x}}^\star, {\boldsymbol{\lambda}}^\star)\in \mathcal{X}\times \Lambda$. Let us denote $\nabla f_\star = \nabla f({\boldsymbol{x}}^\star)$, $G_\star = G({\boldsymbol{x}}^\star)$, $\nabla\mathcal{L}^\star = \nabla\mathcal{L}({\boldsymbol{x}}^\star, {\boldsymbol{\lambda}}^\star)$, and $\nabla_{{\boldsymbol{x}}}^2\mathcal{L}^\star = \nabla_{{\boldsymbol{x}}}^2\mathcal{L}({\boldsymbol{x}}^\star, {\boldsymbol{\lambda}}^\star)$. We first localize Assumptions \ref{ass:D:bound}, \ref{ass:D:LICQ}. \begin{assumption}\label{ass:D:Local} We assume \begin{enumerate}[label=(\alph*),topsep=0pt] \setlength\itemsep{0.0em} \item there exists $\gamma_{RH}'$ such that ${\boldsymbol{x}}^T\nabla_{{\boldsymbol{x}}}^2\mathcal{L}({\boldsymbol{x}}^\star, {\boldsymbol{\lambda}}^\star){\boldsymbol{x}}\geq \gamma_{RH}' \|{\boldsymbol{x}}\|^2$, $\forall {\boldsymbol{x}}\in \{{\boldsymbol{x}}: G({\boldsymbol{x}}^\star){\boldsymbol{x}} = {\boldsymbol 0}, {\boldsymbol{x}}\neq {\boldsymbol 0}\}$, and $G({\boldsymbol{x}}^\star)$ has full row rank; \item $\nabla_{{\boldsymbol{x}}}^2\mathcal{L}({\boldsymbol{x}}, {\boldsymbol{\lambda}})$ and $G({\boldsymbol{x}})$ are Lipschitz continuous at $({\boldsymbol{x}}^\star, {\boldsymbol{\lambda}}^\star)$; \item $B_k$ satisfies $\nbr{\rbr{B_k - \nabla_{{\boldsymbol{x}}}^2\mathcal{L}({\boldsymbol{x}}^\star, {\boldsymbol{\lambda}}^\star)}\Delta{\boldsymbol{x}}^k } = o\rbr{\nbr{\Delta{\boldsymbol{x}}^k}}$. \end{enumerate} \end{assumption} The following lemma shows that the iterates converge superlinearly when the stepsize $\alpha_k = 1$. \begin{lemma}\label{lem:3} Suppose $({\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k)\rightarrow ({\boldsymbol{x}}^\star, {\boldsymbol{\lambda}}^\star)$. Under Assumption \ref{ass:D:Local}, we have \begin{align*} \lim\limits_{k\rightarrow\infty} \frac{\|\Delta{\boldsymbol{x}}^k\|}{\|{\boldsymbol{x}}^k - {\boldsymbol{x}}^\star\|} = 1, \quad \lim\limits_{k\rightarrow \infty}\frac{\|{\boldsymbol{x}}^k+\Delta{\boldsymbol{x}}^k - {\boldsymbol{x}}^\star\|}{\|{\boldsymbol{x}}^k - {\boldsymbol{x}}^\star\|} = 0, \quad \lim\limits_{k\rightarrow \infty}\frac{\|{\boldsymbol{\lambda}}^k + \Delta{\boldsymbol{\lambda}}^k -{\boldsymbol{\lambda}}^\star\|}{\|{\boldsymbol{x}}^k - {\boldsymbol{x}}^\star\|} = 0. \end{align*} \end{lemma} \begin{proof} Let $P_\star = I - G_\star^T(G_\star G_\star^T)^{-1}G_\star$ and $P_k = I - G_k^T(G_k G_k^T)^{-1}G_k$. Suppose ${\boldsymbol{x}}$ is the solution of the following system \begin{equation*} \begin{pmatrix} P_\star\nabla_{{\boldsymbol{x}}}^2\mathcal{L}^\star\\ G_\star \end{pmatrix}{\boldsymbol{x}} = {\boldsymbol 0}. \end{equation*} If ${\boldsymbol{x}} \neq {\boldsymbol 0}$, then $P_\star{\boldsymbol{x}} = {\boldsymbol{x}}$ as $G_\star{\boldsymbol{x}} = {\boldsymbol 0}$ and, thus, ${\boldsymbol{x}}^TP_\star\nabla_{{\boldsymbol{x}}}^2\mathcal{L}^\star{\boldsymbol{x}} = {\boldsymbol{x}}^T\nabla_{{\boldsymbol{x}}}^2\mathcal{L}_\star{\boldsymbol{x}} \geq \gamma_{RH}'\|{\boldsymbol{x}}\|^2 \neq {\boldsymbol 0}$ by Assumption \ref{ass:D:Local}, which contradicts that ${\boldsymbol{x}}$ is the solution to the linear system. Thus, $\begin{pmatrix} P_\star\nabla_{{\boldsymbol{x}}}^2\mathcal{L}^\star\\ G_\star \end{pmatrix}$ has full column rank and, for all sufficiently large $k$, so does the matrix $\begin{pmatrix} P_k\nabla_{{\boldsymbol{x}}}^2\mathcal{L}_\star\\ G_k \end{pmatrix}$. By Taylor expansion and the fact that $\nabla\mathcal{L}^\star = {\boldsymbol 0}$, we know \begin{align*} \nabla_{{\boldsymbol{x}}}\mathcal{L}^k = & \nabla_{{\boldsymbol{x}}}\mathcal{L}^\star + \nabla_{{\boldsymbol{x}}}^2\mathcal{L}^\star({\boldsymbol{x}}^k - {\boldsymbol{x}}^\star) + O(\|{\boldsymbol{x}}^k - {\boldsymbol{x}}^\star\|^2)= \nabla_{{\boldsymbol{x}}}^2\mathcal{L}^\star({\boldsymbol{x}}^k - {\boldsymbol{x}}^\star) + O(\|{\boldsymbol{x}}^k - {\boldsymbol{x}}^\star\|^2)\\ c_k = & c_\star + G_k({\boldsymbol{x}}^k - {\boldsymbol{x}}^\star) + O(\|{\boldsymbol{x}}^k - {\boldsymbol{x}}^\star\|^2) = G_k({\boldsymbol{x}}^k - {\boldsymbol{x}}^\star) + O(\|{\boldsymbol{x}}^k - {\boldsymbol{x}}^\star\|^2). \end{align*} Thus, we have \begin{align*} P_k\nabla_{{\boldsymbol{x}}}^2\mathcal{L}^\star({\boldsymbol{x}}^k + \Delta{\boldsymbol{x}}^k - {\boldsymbol{x}}^\star) &= P_k\nabla_{{\boldsymbol{x}}}^2\mathcal{L}^\star\Delta{\boldsymbol{x}}^k + P_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k + O(\|{\boldsymbol{x}}^k - {\boldsymbol{x}}^\star\|^2) \\ &\stackrel{\eqref{equ:Newton:AL}}{=} P_k\rbr{\nabla_{{\boldsymbol{x}}}^2\mathcal{L}^\star - B_k}\Delta{\boldsymbol{x}}^k + O(\|{\boldsymbol{x}}^k - {\boldsymbol{x}}^\star\|^2),\\ G_k({\boldsymbol{x}}^k+\Delta{\boldsymbol{x}}^k - {\boldsymbol{x}}^\star) &\stackrel{\eqref{equ:Newton:AL}}{=} G_k({\boldsymbol{x}}^k - {\boldsymbol{x}}^\star) - c_k =O(\|{\boldsymbol{x}}^k - {\boldsymbol{x}}^\star\|^2). \end{align*} Combining the above displays with the fact that $\begin{pmatrix} P_k\nabla_{{\boldsymbol{x}}}^2\mathcal{L}_\star\\ G_k \end{pmatrix}$ has full column rank, and using Assumption \ref{ass:D:Local}, we further obtain \begin{equation}\label{pequ:3} \|{\boldsymbol{x}}^k+\Delta{\boldsymbol{x}}^k - {\boldsymbol{x}}^\star\| = o(\|\Delta{\boldsymbol{x}}^k\|) + O(\|{\boldsymbol{x}}^k - {\boldsymbol{x}}^\star\|^2). \end{equation} Noting the fact that \begin{equation}\label{pequ:4} 1 - \frac{\|{\boldsymbol{x}}^k+\Delta{\boldsymbol{x}}^k - {\boldsymbol{x}}^\star\|}{\|{\boldsymbol{x}}^k - {\boldsymbol{x}}^\star\|}\leq \frac{\|\Delta{\boldsymbol{x}}^k\|}{\|{\boldsymbol{x}}^k - {\boldsymbol{x}}^\star\|} \leq 1+ \frac{\|{\boldsymbol{x}}^k+\Delta{\boldsymbol{x}}^k - {\boldsymbol{x}}^\star\|}{\|{\boldsymbol{x}}^k - {\boldsymbol{x}}^\star\|}, \end{equation} we combine with \eqref{pequ:3} and have $\|\Delta{\boldsymbol{x}}^k\|/\|{\boldsymbol{x}}^k - {\boldsymbol{x}}^\star\|\rightarrow 1$. Plugging back into \eqref{pequ:3}, we obtain $\|{\boldsymbol{x}}^k+\Delta{\boldsymbol{x}}^k - {\boldsymbol{x}}^\star\|/\|{\boldsymbol{x}}^k - {\boldsymbol{x}}^\star\| \rightarrow 0$. For the dual variable, we apply $\nabla_{{\boldsymbol{x}}}\mathcal{L}^k = \nabla f_k + G_k^T{\boldsymbol{\lambda}}^k$, and have \begin{align}\label{N:3} G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k & = G_k\nabla f_k + G_kG_k^T{\boldsymbol{\lambda}}^\star + G_kG_k^T({\boldsymbol{\lambda}}^k - {\boldsymbol{\lambda}}^\star) \nonumber\\ &= G_\star\nabla_{{\boldsymbol{x}}}\mathcal{L}^\star + \int_{0}^{1}\nabla_{{\boldsymbol{x}}}^T\rbr{G\nabla f}({\boldsymbol{x}}^\star + t({\boldsymbol{x}}^k - {\boldsymbol{x}}^\star))({\boldsymbol{x}}^k - {\boldsymbol{x}}^\star) \;dt \nonumber\\ & \quad + G_\star G_\star^T{\boldsymbol{\lambda}}^\star + \int_{0}^{1}\nabla_{{\boldsymbol{x}}}^T(GG^T{\boldsymbol{\lambda}}^\star)({\boldsymbol{x}}^\star + t({\boldsymbol{x}}^k - {\boldsymbol{x}}^\star))({\boldsymbol{x}}^k - {\boldsymbol{x}}^\star) \;dt \nonumber\\ & \quad + G_kG_k^T({\boldsymbol{\lambda}}^k - {\boldsymbol{\lambda}}^\star) \nonumber\\ & = \int_{0}^{1}\nabla_{{\boldsymbol{x}}}^T\cbr{G\nabla f + GG^T{\boldsymbol{\lambda}}^\star}({\boldsymbol{x}}^\star + t({\boldsymbol{x}}^k - {\boldsymbol{x}}^\star))({\boldsymbol{x}}^k - {\boldsymbol{x}}^\star) \;dt + G_kG_k^T({\boldsymbol{\lambda}}^k - {\boldsymbol{\lambda}}^\star) \nonumber\\ & = \int_{0}^{1}M^T({\boldsymbol{x}}^\star + t({\boldsymbol{x}}^k - {\boldsymbol{x}}^\star), {\boldsymbol{\lambda}}^\star)({\boldsymbol{x}}^k - {\boldsymbol{x}}^\star) dt + G_kG_k^T({\boldsymbol{\lambda}}^k - {\boldsymbol{\lambda}}^\star). \end{align} Moreover, we obtain \begin{align*} G_kG_k^T\Delta{\boldsymbol{\lambda}}^k &\stackrel{\eqref{equ:Newton:AL}}{=} - G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k - M_k^T\Delta{\boldsymbol{x}}^k\\ &\hskip -5pt \stackrel{\eqref{N:3}}{=} - G_kG_k^T({\boldsymbol{\lambda}}^k- {\boldsymbol{\lambda}}^\star) - M_k^T({\boldsymbol{x}}^k + \Delta{\boldsymbol{x}}^k - {\boldsymbol{x}}^\star) \\ &\quad \quad+\int_{0}^{1}\rbr{M_k - M({\boldsymbol{x}}^\star+t({\boldsymbol{x}}^k - {\boldsymbol{x}}^\star), {\boldsymbol{\lambda}}^\star)}^T({\boldsymbol{x}}^k - {\boldsymbol{x}}^\star) dt. \end{align*} Thus, \begin{align*} G_kG_k^T({\boldsymbol{\lambda}}^k + \Delta{\boldsymbol{\lambda}}^k - {\boldsymbol{\lambda}}^\star) & = \int_{0}^{1}\rbr{M({\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k) - M({\boldsymbol{x}}^\star+t({\boldsymbol{x}}^k - {\boldsymbol{x}}^\star), {\boldsymbol{\lambda}}^\star)}^T({\boldsymbol{x}}^k - {\boldsymbol{x}}^\star) \\ &\quad -M^T({\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k)({\boldsymbol{x}}^k + \Delta{\boldsymbol{x}}^k - {\boldsymbol{x}}^\star), \end{align*} which implies $$\|{\boldsymbol{\lambda}}^k + \Delta{\boldsymbol{\lambda}}^k - {\boldsymbol{\lambda}}^\star\| = O(\|{\boldsymbol{x}}^k + \Delta{\boldsymbol{x}}^k - {\boldsymbol{x}}^\star\|) + o(\|{\boldsymbol{x}}^k - {\boldsymbol{x}}^\star\|) = o(\|{\boldsymbol{x}}^k - {\boldsymbol{x}}^\star\|).$$ This finishes the proof. \end{proof} An immediate corollary is that the penalty terms $\|G({\boldsymbol{x}}^k+\Delta{\boldsymbol{x}}^k)\nabla_{{\boldsymbol{x}}}\mathcal{L}({\boldsymbol{x}}^k+\Delta{\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k+\Delta{\boldsymbol{\lambda}}^k)\|$ and $\|c({\boldsymbol{x}}^k+\Delta{\boldsymbol{x}}^k)\|$ are both of the order $o(\|\Delta{\boldsymbol{x}}^k\|)$. \begin{corollary}\label{cor:1} Under the setup of Lemma \ref{lem:3}, we have \begin{equation*} \|c({\boldsymbol{x}}^k + \Delta {\boldsymbol{x}}^k)\| = o(\|\Delta{\boldsymbol{x}}^k\|), \quad \quad \|G({\boldsymbol{x}}^k+\Delta{\boldsymbol{x}}^k)\nabla_{{\boldsymbol{x}}}\mathcal{L}({\boldsymbol{x}}^k + \Delta{\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k + \Delta{\boldsymbol{\lambda}}^k)\| = o(\|\Delta{\boldsymbol{x}}^k\|). \end{equation*} \end{corollary} \begin{proof} Let ${\boldsymbol{x}}^t = {\boldsymbol{x}}^\star + t({\boldsymbol{x}}^k +\Delta{\boldsymbol{x}}^k - {\boldsymbol{x}}^\star)$ and ${\boldsymbol{\lambda}}^t = {\boldsymbol{\lambda}}^\star + t({\boldsymbol{\lambda}}^k +\Delta{\boldsymbol{\lambda}}^k - {\boldsymbol{\lambda}}^\star)$. Using the Taylor expansion and Lemma \ref{lem:3}, \begin{align*} \|c({\boldsymbol{x}}^k + \Delta{\boldsymbol{x}}^k) \|= & \|c({\boldsymbol{x}}^\star) + \int_{0}^{1}G({\boldsymbol{x}}^t)({\boldsymbol{x}}^k + \Delta{\boldsymbol{x}}^k - {\boldsymbol{x}}^\star) \; dt\| \\ = & O(\|{\boldsymbol{x}}^k + \Delta{\boldsymbol{x}}^k - {\boldsymbol{x}}^\star\|) = o(\|{\boldsymbol{x}}^k - {\boldsymbol{x}}^\star\|) = o(\|\Delta{\boldsymbol{x}}^k\|). \end{align*} Furthermore, \begin{align*} \|G({\boldsymbol{x}}^k + \Delta{\boldsymbol{x}}^k)&\nabla_{{\boldsymbol{x}}}\mathcal{L}({\boldsymbol{x}}^k+\Delta{\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k+\Delta{\boldsymbol{\lambda}}^k)\| \\ &= \bigg\|G({\boldsymbol{x}}^\star)\nabla_{{\boldsymbol{x}}}\mathcal{L}({\boldsymbol{x}}^\star, {\boldsymbol{\lambda}}^\star) + \int_{0}^{1}\begin{pmatrix} M^T({\boldsymbol{x}}^t, {\boldsymbol{\lambda}}^t) & G({\boldsymbol{x}}^t)G^T({\boldsymbol{x}}^t) \end{pmatrix}\begin{pmatrix} {\boldsymbol{x}}^k +\Delta{\boldsymbol{x}}^k - {\boldsymbol{x}}^\star\\ {\boldsymbol{\lambda}}^k + \Delta{\boldsymbol{\lambda}}^k - {\boldsymbol{\lambda}}^\star \end{pmatrix}\bigg\|\\ &= O\rbr{\nbr{\begin{pmatrix} {\boldsymbol{x}}^k +\Delta{\boldsymbol{x}}^k - {\boldsymbol{x}}^\star\\ {\boldsymbol{\lambda}}^k + \Delta{\boldsymbol{\lambda}}^k - {\boldsymbol{\lambda}}^\star \end{pmatrix}}} = o(\|{\boldsymbol{x}}^k - {\boldsymbol{x}}^\star\|)= o(\|\Delta{\boldsymbol{x}}^k\|), \end{align*} which completes the proof. \end{proof} The following theorem establishes local convergence for Algorithm \ref{alg:SQP}. \begin{theorem}[Local convergence of Algorithm \ref{alg:SQP}]\label{thm:2} Suppose $({\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k) \rightarrow ({\boldsymbol{x}}^\star, {\boldsymbol{\lambda}}^\star)$ and Assumption \ref{ass:D:Local} holds at $({\boldsymbol{x}}^\star, {\boldsymbol{\lambda}}^\star)$. Then $\alpha_k = 1$, for sufficiently large $k$, and \begin{equation*} \nbr{\begin{pmatrix} {\boldsymbol{x}}^{k+1} - {\boldsymbol{x}}^\star\\ {\boldsymbol{\lambda}}^{k+1} - {\boldsymbol{x}}^\star \end{pmatrix}} = o\rbr{\|{\boldsymbol{x}}^k - {\boldsymbol{x}}^\star\|}. \end{equation*} \end{theorem} \begin{proof} By Lemma \ref{lem:3}, it suffices to show that $\alpha_k = 1$ for sufficiently large $k$. That is \begin{equation}\label{pequ:55} \mathcal{L}_{{\hat{\mu}}, \nu}({\boldsymbol{x}}^k + \Delta{\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k+\Delta{\boldsymbol{\lambda}}^k) \leq \mathcal{L}_{{\hat{\mu}}, \nu}^k +\beta\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{{\hat{\mu}}, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\hat{\mu}}, \nu}^k \end{pmatrix}^T \begin{pmatrix} \Delta{\boldsymbol{x}}^k\\ \Delta{\boldsymbol{\lambda}}^k \end{pmatrix}. \end{equation} Let us denote ${\boldsymbol{x}}^{\xi_i} = {\boldsymbol{x}}^k + \xi_i\Delta{\boldsymbol{x}}^k$ for $\xi_i \in(0, 1)$ and $i=1,2$, and ${\boldsymbol{x}}^{t} = {\boldsymbol{x}}^\star + t({\boldsymbol{x}}^k+\Delta{\boldsymbol{x}}^k - {\boldsymbol{x}}^\star)$. Then we apply Taylor expansion multiple times, and have \begin{align*} f({\boldsymbol{x}}^k& +\Delta{\boldsymbol{x}}^k) \\ & = f_k + \nabla^Tf_k\Delta{\boldsymbol{x}}^k + \frac{1}{2}(\Delta{\boldsymbol{x}}^k)^T\nabla^2 f({\boldsymbol{x}}^{\xi_1})\Delta{\boldsymbol{x}}^k\\ & = f_k + \frac{1}{2}\nabla^Tf_k\Delta{\boldsymbol{x}}^k + \frac{1}{2}\nabla^Tf({\boldsymbol{x}}^k + \Delta{\boldsymbol{x}}^k)\Delta{\boldsymbol{x}}^k + \frac{1}{2}(\Delta{\boldsymbol{x}}^k)^T\rbr{\nabla^2 f({\boldsymbol{x}}^{\xi_1}) - \nabla^2 f({\boldsymbol{x}}^{\xi_2})}\Delta{\boldsymbol{x}}^k\\ & = f_k + \frac{1}{2}\rbr{\nabla f_k + \nabla f_\star}^T\Delta{\boldsymbol{x}}^k + \underbrace{O(\|{\boldsymbol{x}}^k +\Delta{\boldsymbol{x}}^k - {\boldsymbol{x}}^\star\|\cdot\|\Delta{\boldsymbol{x}}^k\|) + o(\|\Delta{\boldsymbol{x}}^k\|^2)}_{o(\|\Delta{\boldsymbol{x}}^k\|^2) \text{ by Lemma \ref{lem:3}}}. \end{align*} Similarly, \begin{equation*} c({\boldsymbol{x}}^k + \Delta{\boldsymbol{x}}^k) = c_k + \frac{1}{2}(G_k + G_\star)\Delta{\boldsymbol{x}}^k + o(\|\Delta{\boldsymbol{x}}^k\|^2). \end{equation*} Combining the above two displays with Corollary \ref{cor:1} and the definition \eqref{equ:augmented:L}, we have \begin{align*} \mathcal{L}_{{\hat{\mu}}, \nu}&({\boldsymbol{x}}^k + \Delta{\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k+\Delta{\boldsymbol{\lambda}}^k) - \mathcal{L}_{{\hat{\mu}}, \nu}^k\\ & = \frac{1}{2}\rbr{\nabla f_k + \nabla f_\star}^T\Delta{\boldsymbol{x}}^k + \frac{1}{2}({\boldsymbol{\lambda}}^k + \Delta{\boldsymbol{\lambda}}^k)^T\rbr{G_k + G_\star}\Delta{\boldsymbol{x}}^k + (\Delta{\boldsymbol{\lambda}}^k)^T c_k\\ & \quad - \frac{{\hat{\mu}}}{2}\|c_k\|^2 - \frac{\nu}{2}\|G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k\|^2 + o(\|\Delta{\boldsymbol{x}}^k\|^2)\\ & = \frac{1}{2}\nabla_{{\boldsymbol{x}}}^T\mathcal{L}^k\Delta{\boldsymbol{x}}^k + \frac{1}{2}\nabla^Tf_\star\Delta{\boldsymbol{x}}^k + \frac{1}{2} (\Delta{\boldsymbol{\lambda}}^k)^Tc_k + \frac{1}{2}({\boldsymbol{\lambda}}^k + \Delta{\boldsymbol{\lambda}}^k)^TG_\star\Delta{\boldsymbol{x}}^k\\ & \quad - \frac{{\hat{\mu}}}{2}\|c_k\|^2 - \frac{\nu}{2}\|G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k\|^2+ o(\|\Delta{\boldsymbol{x}}^k\|^2)\\ & = \frac{1}{2}\nabla_{{\boldsymbol{x}}}^T\mathcal{L}^k\Delta{\boldsymbol{x}}^k + \frac{1}{2} (\Delta{\boldsymbol{\lambda}}^k)^Tc_k + \underbrace{\frac{1}{2}({\boldsymbol{\lambda}}^k + \Delta{\boldsymbol{\lambda}}^k - {\boldsymbol{\lambda}}^\star)^TG_\star\Delta{\boldsymbol{x}}^k}_{o(\|\Delta{\boldsymbol{x}}^k\|^2) \text{ by Lemma \ref{lem:3}}}\\ & \quad - \frac{{\hat{\mu}}}{2}\|c_k\|^2 - \frac{\nu}{2}\|G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k\|^2+ o(\|\Delta{\boldsymbol{x}}^k\|^2)\\ & \stackrel{\eqref{equ:Newton:AL}}{=} \frac{1}{2}\cbr{- (\Delta{\boldsymbol{x}}^k)^TB_k\Delta{\boldsymbol{x}}^k +c_k^T\rbr{\Delta{\boldsymbol{\lambda}}^k + {\hat{\Delta}}{\boldsymbol{\lambda}}^k} - {\hat{\mu}}\|c_k\|^2 - \nu\|G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k\|^2}+ o(\|\Delta{\boldsymbol{x}}^k\|^2), \end{align*} where the second equality uses the facts that $\nabla_{{\boldsymbol{x}}}\mathcal{L}^k = \nabla f_k + G_k^T{\boldsymbol{\lambda}}^k$ and $G_k\Delta{\boldsymbol{x}}^k = -c_k$; the third equality uses the fact that $\nabla_{{\boldsymbol{x}}}\mathcal{L}^\star = \nabla f_\star + G_\star^T{\boldsymbol{\lambda}}^\star = {\boldsymbol 0}$. By Lemma \ref{lem:1}, we further have \begin{align*} \mathcal{L}_{{\hat{\mu}}, \nu}&({\boldsymbol{x}}^k + \Delta{\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k+\Delta{\boldsymbol{\lambda}}^k) - \mathcal{L}_{{\hat{\mu}}, \nu}^k\\ & = \frac{1}{2}\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{{\hat{\mu}}, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\hat{\mu}}, \nu}^k \end{pmatrix}^T \begin{pmatrix} \Delta{\boldsymbol{x}}^k\\ \Delta{\boldsymbol{\lambda}}^k \end{pmatrix} + o(\|\Delta{\boldsymbol{x}}^k\|^2)\\ & = \beta\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{{\hat{\mu}}, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\hat{\mu}}, \nu}^k \end{pmatrix}^T \begin{pmatrix} \Delta{\boldsymbol{x}}^k\\ \Delta{\boldsymbol{\lambda}}^k \end{pmatrix} + \rbr{\frac{1}{2}-\beta}\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{{\hat{\mu}}, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\hat{\mu}}, \nu}^k \end{pmatrix}^T \begin{pmatrix} \Delta{\boldsymbol{x}}^k\\ \Delta{\boldsymbol{\lambda}}^k \end{pmatrix}+o(\|\Delta{\boldsymbol{x}}^k\|^2)\\ & \leq \beta\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{{\hat{\mu}}, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\hat{\mu}}, \nu}^k \end{pmatrix}^T \begin{pmatrix} \Delta{\boldsymbol{x}}^k\\ \Delta{\boldsymbol{\lambda}}^k \end{pmatrix} - \rbr{\frac{1}{2}-\beta}{\hat{\delta}}\|\Delta{\boldsymbol{x}}^k\|^2 + o(\|\Delta{\boldsymbol{x}}^k\|^2), \end{align*} where the last inequality is due to the While loop of Algorithm \ref{alg:SQP} in Line 4. Thus \eqref{pequ:55} will be satisfied for sufficiently large $k$, which completes the proof. \end{proof} \section{Proofs of Section \ref{sec:3}}\label{sec:appen:3} \subsection{Proof of Lemma \ref{lem:6}}\label{pf:lem:6} By unbiasedness condition in Assumption \ref{ass:ran:1}, we have \begin{align*} \mathbb{E}_{\xi^k_g}[{\bar{\Delta}} {\boldsymbol{x}}^k] = & \mathbb{E}[{\bar{\Delta}}{\boldsymbol{x}}^k \mid {\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k] \stackrel{\eqref{equ:ran:Newton}}{=} -\mathbb{E}\sbr{\begin{pmatrix} I & {\boldsymbol 0} \end{pmatrix}\begin{pmatrix} B_k & G_k^T\\ G_k & {\boldsymbol 0} \end{pmatrix}^{-1}\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_k\\ c_k \end{pmatrix} {\bigg\vert} {\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k}\\ = & -\begin{pmatrix} I & {\boldsymbol 0} \end{pmatrix}\begin{pmatrix} B_k & G_k^T\\ G_k & {\boldsymbol 0} \end{pmatrix}^{-1}\mathbb{E}\sbr{\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k\\ c_k \end{pmatrix} {\bigg\vert} {\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k } = -\begin{pmatrix} I & {\boldsymbol 0} \end{pmatrix}\begin{pmatrix} B_k & G_k^T\\ G_k & {\boldsymbol 0} \end{pmatrix}^{-1}\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}^k\\ c_k \end{pmatrix} \\ \stackrel{\eqref{equ:Newton:AL}}{=} & \Delta{\boldsymbol{x}}^k, \end{align*} and \begin{align*} \mathbb{E}_{\xi^k_g,\xi^k_H}[{\bar{\Delta}} {\boldsymbol{\lambda}}^k] &= \mathbb{E}[{\bar{\Delta}}{\boldsymbol{\lambda}}^k\mid {\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k] \\ &\hskip-4pt \stackrel{\eqref{equ:ran:Newton}}{=} -\mathbb{E}\sbr{(G_kG_k^T)^{-1}G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k +(G_kG_k^T)^{-1}{\bar{M}}_k^T{\bar{\Delta}}{\boldsymbol{x}}^k \mid {\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k}\\ &= -(G_kG_k^T)^{-1}G_k\mathbb{E}[{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k \mid {\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k] - (G_kG_k^T)^{-1}\mathbb{E}[{\bar{M}}_k^T{\bar{\Delta}}{\boldsymbol{x}}^k\mid {\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k]\\ & = -(G_kG_k^T)^{-1}G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k - (G_kG_k^T)^{-1}\mathbb{E}[{\bar{M}}_k^T \mid {\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k]\mathbb{E}[{\bar{\Delta}}{\boldsymbol{x}}^k\mid {\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k]\\ & = -(G_kG_k^T)^{-1}G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k - (G_kG_k^T)^{-1}M_k^T\Delta{\boldsymbol{x}}^k\\ & \stackrel{\eqref{equ:Newton:AL}}{=} \Delta{\boldsymbol{\lambda}}^k. \end{align*} Here, the fourth equality is due to the independence between $\xi_g^k$ and $\xi_H^k$. Moreover, by the bounded variance condition in Assumption \ref{ass:ran:1}, we have \begin{align*} \mathbb{E}_{\xi_g^k}\sbr{\|G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k\|^2} & = \mathbb{E}[\|G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k\|^2 \mid {\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k]\\ & = \|G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k\|^2 + \mathbb{E}\sbr{\|G_k({\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k - \nabla_{{\boldsymbol{x}}}\mathcal{L}^k) \|^2\mid {\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k }\\ & \leq \|G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k\|^2 + \|G_k\|^2\mathbb{E}_{\xi_g^k}\sbr{\|{\bar{g}}_k - \nabla f_k\|^2}\\ & \stackrel{\eqref{Prop:1}}{\leq} \|G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k\|^2 + \kappa_{2,G}\psi_g, \end{align*} and \begin{align}\label{N:5} \mathbb{E}_{\xi^k_g}\sbr{\|{\bar{\Delta}} {\boldsymbol{x}}^k\|^2} & = \mathbb{E}_{\xi^k_g}\sbr{ \nbr{\begin{pmatrix} I & {\boldsymbol 0} \end{pmatrix}\begin{pmatrix} B_k & G^T_k\\ G_k & {\boldsymbol 0} \end{pmatrix}^{-1}\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k\\ c_k \end{pmatrix}}^2 } \nonumber\\ & \leq \|\Delta{\boldsymbol{x}}^k\|^2 + \mathbb{E}\bigg[\bigg\| \underbrace{\begin{pmatrix} B_k & G_k^T\\ G_k & {\boldsymbol 0} \end{pmatrix}^{-1}}_{\eqqcolon \mathcal{K}}\begin{pmatrix} {\bar{g}}_k - \nabla f_k\\ {\boldsymbol 0} \end{pmatrix} \bigg\|^2{\bigg\vert} {\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k \bigg]. \end{align} It hence suffices to bound $\|\mathcal{K}\|$. Suppose $G_k^T = Y_kM_k$ where $Y_k$ has orthonormal columns spanning $\text{Image}(G_k^T)$ and $M_k$ is a square matrix, and suppose $Z_k$ has orthonormal columns spanning $\text{Ker}(G_k)$. By Assumption \ref{ass:ran:1}, we know $M_k$ is nonsingular and $Z_k^TB_kZ_k \succeq \gamma_{RH} I$. Then we can show \begin{multline*} \mathcal{K}= \begin{pmatrix*} Z_k(Z_k^TB_kZ_k)^{-1}Z_k^T & (I - Z_k(Z_k^TB_kZ_k)^{-1}Z_k^TB_k)Y_kM_k^{-1}\\ M_k^{-1}Y_k^T(I - B_kZ_k(Z_k^TB_kZ_k)^{-1}Z_k^T) & M_k^{-1}Y_k^T(B_kZ_k(Z_k^TB_kZ_k)^{-1}Z_k^TB_k - B_k)Y_kM_k^{-1} \end{pmatrix*}. \end{multline*} Since $\|M_k^{-1}\|^2 = \|M_k^{-1}(M_k^{-1})^T\| = \|(G_kG_k^T)^{-1}\| \stackrel{\eqref{Prop:1}}{\leq} 1/\kappa_{1,G}$ and $\|(Z_k^TB_kZ_k)^{-1}\| \leq 1/\gamma_{RH}$, we bound $\|\mathcal{K}\|$ by the sum of the operator norm of its each block, and get \begin{equation*} \|\mathcal{K}\|\leq \frac{1}{\gamma_{RH}} + \frac{2}{\sqrt{\kappa_{1,G}}}\rbr{1 + \frac{\kappa_B}{\gamma_{RH}}} + \frac{1}{\kappa_{1,G}}\rbr{\frac{\kappa_B^2}{\gamma_{RH}} + \kappa_B}. \end{equation*} WLOG, we suppose $\kappa_B \geq 1\geq \gamma_{RH}\vee \kappa_{1,G}$, and further simplify the bound by \begin{equation*} \|\mathcal{K}\|\leq \frac{5\kappa_B}{\sqrt{\kappa_{1,G}}\gamma_{RH}} + \frac{2\kappa_B^2}{\kappa_{1,G}\gamma_{RH}} \leq \frac{8\kappa_B^2}{\kappa_{1,G}\gamma_{RH}}. \end{equation*} Plugging the above inequality into \eqref{N:5} completes the proof. \subsection{Proof of Theorem \ref{thm:4}}\label{pf:thm:4} WLOG, we suppose $(\kappa_M\wedge \kappa_B \wedge \kappa_{2,G})\geq1\geq (\kappa_{1,G}\vee \gamma_{RH})$. By Taylor expansion and \eqref{Prop:1}, \begin{align}\label{N:8} \mathcal{L}_{\mu, \nu}^{k+1} & \leq \mathcal{L}_{\mu, \nu}^k + \alpha_k\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{\mu, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{\mu, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix} + \frac{\kappa_{\mathcal{L}_{\mu, \nu}}\alpha_k^2}{2}\nbr{\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix} }^2. \end{align} Similar to \eqref{N:2}, we apply \eqref{equ:ran:Newton} and have \begin{equation*} \|{\bar{\Delta}}{\boldsymbol{\lambda}}^k\|^2\leq \frac{2}{\kappa_{1,G}^2}\rbr{\|G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k\|^2 + \|{\bar{M}}_k\|^2\|{\bar{\Delta}}{\boldsymbol{x}}^k\|^2}\leq \frac{2}{\kappa_{1,G}^2}\rbr{1\vee \|{\bar{M}}_k\|^2}\rbr{\|G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k\|^2 + \|{\bar{\Delta}}{\boldsymbol{x}}^k\|^2}. \end{equation*} Thus, \begin{equation}\label{N:6} \nbr{\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix} }^2 \leq \frac{4}{\kappa_{1,G}^2}\rbr{1\vee \|{\bar{M}}_k\|^2}\nbr{\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix} }^2. \end{equation} Moreover, we obtain \begin{align}\label{N:9} \kappa_{\mathcal{L}_{\mu, \nu}}\alpha_k^2\cdot&\mathbb{E}_{\xi^k_g,\xi^k_H}\sbr{\nbr{\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix} }^2} \nonumber\\ \leq & \frac{4\kappa_{\mathcal{L}_{\mu, \nu}}\kappa_M }{\kappa_{1,G}^2}\alpha_k^2\cdot\mathbb{E}_{\xi^k_g}\sbr{\nbr{\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix} }^2} \nonumber\\ \leq & \frac{4\kappa_{\mathcal{L}_{\mu, \nu}}\kappa_M}{\kappa_{1,G}^2}\alpha_k^2\cbr{\nbr{\begin{pmatrix} \Delta{\boldsymbol{x}}^k\\ G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix} }^2 + \frac{64\kappa_B^4/\kappa_{1,G}^2 + \kappa_{2,G}}{\gamma_{RH}^2}\psi_g} \nonumber\\ = & \frac{4\kappa_{\mathcal{L}_{\mu, \nu}}\kappa_M}{\kappa_{1,G}^2}\alpha_k^2\nbr{\begin{pmatrix} \Delta{\boldsymbol{x}}^k\\ G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix} }^2 + \frac{\kappa_{\mathcal{L}_{\mu, \nu}}\kappa_M (256\kappa_B^4/\kappa_{1,G}^2 + 4\kappa_{2,G}) }{\kappa_{1,G}^2\gamma_{RH}^2}\alpha_k^2\psi_g \nonumber\\ \leq & \frac{4\kappa_{\mathcal{L}_{\mu, \nu}}\kappa_M}{\kappa_{1,G}^2}\alpha_k^2\nbr{\begin{pmatrix} \Delta{\boldsymbol{x}}^k\\ G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix} }^2 + \frac{256\kappa_{\mathcal{L}_{\mu, \nu}}\kappa_M (\kappa_B^4 + \kappa_{2,G} \kappa_{1,G}^2) }{\kappa_{1,G}^4\gamma_{RH}^2}\alpha_k^2\psi_g, \end{align} where the first inequality is due to \eqref{N:6} and the fact that $\mathbb{E}_{\xi^k_H}[\|{\bar{M}}_k\|^2]\leq \kappa_M$ as in \eqref{def:bound:M}; the second inequality is due to Lemma \ref{lem:6}. On the other hand, we note that the condition on $\mu$ in \eqref{N:7} can be simplified as \begin{equation*} \frac{2}{\kappa_{1,G}^2\nu} + \frac{\rbr{\kappa_M+\sqrt{\kappa_{2,G}}\kappa_B }^2 }{\kappa_{1,G}^2\gamma_{RH}} + \frac{6\kappa_{2,G}\kappa_B^2}{\kappa_{1,G}^2\gamma_{RH}} \leq \frac{2\rbr{\kappa_M+\sqrt{\kappa_{2,G}}\kappa_B }^2}{\kappa_{1,G}^2(\gamma_{RH}\wedge\nu)} + \frac{6\kappa_{2,G}\kappa_B^2}{\kappa_{1,G}^2\gamma_{RH}} \leq \frac{8\rbr{\kappa_M^2 + \kappa_{2,G}\kappa_B^2}}{\kappa_{1,G}^2(\gamma_{RH}\wedge\nu)}, \end{equation*} which is implied by the statement of the theorem. Thus, by the proof of Theorem \ref{thm:1}, \begin{align}\label{N:10} \alpha_k\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{\mu, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{\mu, \nu}^k \end{pmatrix}^T\begin{pmatrix} \Delta{\boldsymbol{x}}^k\\ \Delta{\boldsymbol{\lambda}}^k \end{pmatrix} \leq -\frac{\gamma_{RH}\wedge \nu}{2}\alpha_k\nbr{\begin{pmatrix} \Delta{\boldsymbol{x}}^k\\ G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix} }^2. \end{align} Taking conditional expectation on both sides of \eqref{N:8}, applying Lemma \ref{lem:6}, and combining with \eqref{N:9} and \eqref{N:10}, we obtain \begin{align}\label{pequ:5} &\mathbb{E}_{\xi^k_g,\xi^k_H}\sbr{\mathcal{L}_{\mu, \nu}^{k+1}} \nonumber\\ &\leq \mathcal{L}_{\mu, \nu}^k + \alpha_k\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{\mu, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{\mu, \nu}^k \end{pmatrix}^T\begin{pmatrix} \Delta{\boldsymbol{x}}^k\\ \Delta{\boldsymbol{\lambda}}^k \end{pmatrix} + \frac{2\kappa_{\mathcal{L}_{\mu, \nu}}\kappa_M}{\kappa_{1,G}^2}\alpha_k^2\nbr{\begin{pmatrix} \Delta{\boldsymbol{x}}^k\\ G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}}^2 + \frac{128\kappa_{\mathcal{L}_{\mu, \nu}}\kappa_M (\kappa_B^4 + \kappa_{2,G}\kappa_{1,G}^2) }{\kappa_{1,G}^4\gamma_{RH}^2}\alpha_k^2\psi_g \nonumber\\ &\hskip-5pt \stackrel{\eqref{N:10}}{\leq} \mathcal{L}_{\mu, \nu}^k - \alpha_k\rbr{\frac{\gamma_{RH}\wedge \nu}{2} - \frac{2\kappa_{\mathcal{L}_{\mu, \nu}}\kappa_M }{\kappa_{1,G}^2}\alpha_k }\nbr{\begin{pmatrix} \Delta{\boldsymbol{x}}^k\\ G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}}^2 + \frac{128\kappa_{\mathcal{L}_{\mu, \nu}}\kappa_M (\kappa_B^4 + \kappa_{2,G}\kappa_{1,G}^2)\alpha_k^2 }{\kappa_{1,G}^4\gamma_{RH}^2}\psi_g. \end{align} Moreover, we know \begin{align*} \|\nabla_{{\boldsymbol{x}}}\mathcal{L}^k\| & \leq \|(I - G_k^T(G_kG_k^T)^{-1}G_k)\nabla_{{\boldsymbol{x}}}\mathcal{L}^k\| + \|G_k^T(G_kG_k^T)^{-1}G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k\|\\ & \stackrel{\eqref{equ:Newton:AL}}{=} \|(I - G_k^T(G_kG_k^T)^{-1}G_k)B_k\Delta{\boldsymbol{x}}^k\| + \|G_k^T(G_kG_k^T)^{-1}G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}_k\|\\ & \stackrel{\eqref{Prop:1}}{\leq} 2\kappa_B\|\Delta{\boldsymbol{x}}^k\| + \frac{1}{\sqrt{\kappa_{1,G}}}\|G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}_k\|,\\ \|c_k\|& \stackrel{\eqref{equ:Newton:AL}}{=}\|G_k\Delta{\boldsymbol{x}}^k\| \stackrel{\eqref{Prop:1}}{\leq}\sqrt{\kappa_{2,G}}\|\Delta{\boldsymbol{x}}^k\|. \end{align*} Thus, we have \begin{align*} \|\nabla\mathcal{L}^k\|^2 \leq \rbr{4\kappa_B^2 + \frac{2}{\kappa_{1,G}} + \kappa_{2,G}}\nbr{\begin{pmatrix} \Delta{\boldsymbol{x}}^k\\ G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}}^2 \leq \frac{4\kappa_B^2\kappa_{2,G}^2}{\kappa_{1,G}}\nbr{\begin{pmatrix} \Delta{\boldsymbol{x}}^k\\ G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}}^2, \end{align*} where the last inequality holds as long as $4\kappa_{2,G}^2/\kappa_{1,G} \geq 2/\kappa_{1,G} + \kappa_{2,G} +4$, which is ensured by supposing $\kappa_{2,G} \geq 2$. Plugging the above display into \eqref{pequ:5}, we know that if $\alpha_k \leq \frac{\rbr{\gamma_{RH} \wedge \nu}\kappa_{1,G}^2 }{8\kappa_{\mathcal{L}_{\mu, \nu}}\kappa_M}$, then \begin{equation}\label{pequ:7} \mathbb{E}_{\xi^k_g,\xi^k_H}\sbr{\mathcal{L}_{\mu, \nu}^{k+1}} \leq \mathcal{L}_{\mu, \nu}^k - \frac{\rbr{\gamma_{RH}\wedge \nu}\kappa_{1,G}}{16\kappa_{2,G}^2\kappa_B^2}\alpha_k\|\nabla\mathcal{L}^k\|^2 + \frac{128\kappa_{\mathcal{L}_{\mu, \nu}}\kappa_M (\kappa_B^4 + \kappa_{2,G}\kappa_{1,G}^2 ) }{\kappa_{1,G}^4\gamma_{RH}^2}\alpha_k^2\psi_g. \end{equation} WLOG, we suppose $\kappa_B \geq 2\sqrt{2}$ and $\kappa_{2,G} \geq 9$, then $128\rbr{\kappa_B^4 + \kappa_{2,G}} \leq 2\kappa_{2,G}^2\kappa_B^4$. Moreover, we take full expectation and sum up over $k=0, \ldots, K$ for \eqref{pequ:7}, and obtain \begin{equation*} \min_{\mathcal{X}\times\Lambda}\mathcal{L}_{\mu, \nu}({\boldsymbol{x}}, {\boldsymbol{\lambda}}) - \mathcal{L}_{\mu, \nu}^0 \leq -\frac{\rbr{\gamma_{RH} \wedge\nu}\kappa_{1,G}}{16\kappa_{2,G}^2\kappa_B^2}\sum_{k=0}^{K}\alpha_k\mathbb{E}[\|\nabla\mathcal{L}^k\|^2]+ \frac{2\kappa_{\mathcal{L}_{\mu, \nu}} \kappa_M \kappa_B^4\kappa_{2,G}^2\psi_g}{\kappa_{1,G}^4\gamma_{RH}^2}\sum_{k=0}^{K}\alpha_k^2. \end{equation*} Thus, if $\alpha_k = \alpha$, we have \begin{equation*} \frac{1}{K+1}\sum_{k=0}^{K}\mathbb{E}[\|\nabla\mathcal{L}^k\|^2] \leq \frac{1}{\alpha}\frac{16\kappa_{2,G}^2\kappa_B^2}{\rbr{\gamma_{RH}\wedge \nu} \kappa_{1,G} }\frac{\mathcal{L}_{\mu, \nu}^0 - \min_{\mathcal{X}\times\Lambda}\mathcal{L}_{\mu, \nu}}{K+1} + \frac{32\kappa_{\mathcal{L}_{\mu, \nu}}\kappa_M\kappa_B^6\kappa_{2,G}^4\psi_g}{\kappa_{1,G}^5\gamma_{RH}^2(\gamma_{RH}\wedge\nu)}\alpha. \end{equation*} Finally, if $\sum_{k=0}^{\infty}\alpha_k = \infty$ and $\sum_{k=0}^{\infty}\alpha_k^2 <\infty$, then we have \begin{equation*} \lim\limits_{k\rightarrow \infty}\frac{1}{\sum_{k=0}^K\alpha_k}\sum_{k=0}^K\alpha_k\mathbb{E}[\|\nabla\mathcal{L}^k\|^2] = 0. \end{equation*} This completes the proof. \section{Proofs of Section \ref{sec:4}}\label{sec:appen:4} \subsection{Proof of Lemma \ref{lem:cond:1}}\label{pf:lem:cond:1} Let $P_{\xi_g^k}(\cdot) = P(\cdot \mid {\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k)$ be the conditional probability over randomness in $\xi_g^k$. We have \begin{align*} &\nbr{\begin{pmatrix} {\bar{g}}_k - \nabla f_k + \nu\rbr{{\bar{M}}_kG_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k - M_kG_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k}\\ \nu G_kG_k^TG_k\rbr{{\bar{g}}_k - \nabla f_k} \end{pmatrix}}\\ & \leq \nbr{\begin{pmatrix} {\bar{g}}_k - \nabla f_k \\ \nu G_kG_k^TG_k\rbr{{\bar{g}}_k - \nabla f_k} \end{pmatrix}} + \nu\nbr{{\bar{M}}_kG_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_k - M_kG_k\nabla_{{\boldsymbol{x}}}\mathcal{L}_k}\\ & \stackrel{\eqref{Prop:1}}{\leq} (1+\nu\kappa_{2,G}^{3/2})\nbr{{\bar{g}}_k - \nabla f_k} + \nu\kappa_{2,G}^{1/2}\big(\|{\bar{M}}_k - M_k\|\|{\bar{g}}_k - \nabla f_k\| + \kappa_{\nabla_{{\boldsymbol{x}}}\mathcal{L}}\|{\bar{M}}_k - M_k\| + \kappa_M\|{\bar{g}}_k - \nabla f_k\|\big)\\ & = (1 + \nu\kappa_{2,G}^{3/2} + \nu\kappa_{2,G}^{1/2}\kappa_M)\|{\bar{g}}_k - \nabla f_k\| + \nu\kappa_{2,G}^{1/2}\rbr{\|{\bar{g}}_k - \nabla f_k\|+ \kappa_{\nabla_{{\boldsymbol{x}}}\mathcal{L}} } \|{\bar{M}}_k - M_k\|. \end{align*} Moreover, we have \begin{align*} \|{\bar{M}}_k - M_k\| & \stackrel{\eqref{def:MT}}{\leq} \sqrt{\kappa_{2,G}}\|{\bar{H}}_k - \nabla^2f_k\| + \|{\bar{T}}_k - T_k\|\\ & \stackrel{\eqref{def:MT}}{\leq} \sqrt{\kappa_{2,G}}\|{\bar{H}}_k - \nabla^2f_k\| + \{\|{\bar{g}}_k - \nabla f_k\|^2\sum_{i=1}^{m}\|\nabla^2c_i({\boldsymbol{x}}^k)\|^2\}^{1/2}\\ & \stackrel{\eqref{Prop:1}}{\leq}\sqrt{\kappa_{2,G}}\|{\bar{H}}_k - \nabla^2f_k\| + \kappa_{\nabla_{{\boldsymbol{x}}}^2c}\cdot\|{\bar{g}}_k - \nabla f_k\|. \end{align*} Combining the above two displays, we obtain \begin{multline}\label{N:18} \bigg\|\begin{pmatrix} {\bar{g}}_k - \nabla f_k + \nu\rbr{{\bar{M}}_kG_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k - M_kG_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k}\\ \nu G_kG_k^TG_k\rbr{{\bar{g}}_k - \nabla f_k} \end{pmatrix}\bigg\|\\ \leq \rbr{1+ \nu\kappa_{2,G}^{3/2} + \nu\kappa_{2,G}^{1/2}\kappa_M + \nu\kappa_{2,G}^{1/2}\kappa_{\nabla_{{\boldsymbol{x}}}^2c}\rbr{\|{\bar{g}}_k - \nabla f_k\| + \kappa_{\nabla_{{\boldsymbol{x}}}\mathcal{L}}} }\|{\bar{g}}_k - \nabla f_k\|\\ + \nu\kappa_{2,G} \rbr{\|{\bar{g}}_k - \nabla f_k\| + \kappa_{\nabla_{{\boldsymbol{x}}}\mathcal{L}}}\|{\bar{H}}_k - \nabla^2f_k\|. \end{multline} We suppose $\kappa_{\nabla_{{\boldsymbol{x}}}\mathcal{L}} \geq 1$ without loss of generality, then the above display implies that the condition \eqref{equ:ran:cond:1} is satisfied by requiring \begin{align*} \|{\bar{g}}_k - \nabla f_k\| & \leq \frac{\kappa_{grad}\cdot{\bar{\alpha}}_k\nbr{\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k + \nu{\bar{M}}_k G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k + G_k^Tc_k\\ \nu G_kG_k^TG_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}}\wedge 1 }{2\rbr{1+\nu\kappa_{2,G}^{3/2} + \nu\kappa_{2,G}^{1/2}\kappa_M + 2\nu\kappa_{2,G}^{1/2}\kappa_{\nabla_{{\boldsymbol{x}}}\mathcal{L}}\kappa_{\nabla_{{\boldsymbol{x}}}^2c}}} \eqqcolon t_1^k, \intertext{and} \|{\bar{H}}_k - \nabla^2 f_k\| & \leq \frac{\kappa_{grad}\cdot{\bar{\alpha}}_k\nbr{\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k + \nu{\bar{M}}_k G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k + G_k^Tc_k\\ \nu G_kG_k^TG_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}} }{4\nu\kappa_{2,G}\kappa_{\nabla_{{\boldsymbol{x}}}\mathcal{L}}} \eqqcolon t_2^k. \end{align*} By Assumption \ref{ass:A:1}, we apply Bernstein's inequality (Lemma 4, \cite{Tripuraneni2018Stochastic}) and have \begin{equation*} P_{\xi_g^k}\rbr{\|{\bar{g}}_k - \nabla f_k\| \leq t_1^k} \geq 1 - p_{grad}/2,\quad \quad \text{if }\quad |\xi_g^k| \geq \frac{4M_1^2}{(t_1^k)^2}\log\rbr{\frac{2}{p_{grad}}}. \end{equation*} We also apply the matrix Bernstein's inequality (Theorem 7.7.1, \cite{Tropp2015Introduction}) and have \begin{equation*} P_{\xi_g^k}\rbr{\|{\bar{H}}_k - \nabla^2 f_k\| \leq t_2^k} \geq 1 - p_{grad}/2,\quad \quad \text{if }\quad |\xi_g^k| \geq \frac{4M_2^2}{(t_2^k)^2}\log\rbr{\frac{8d}{p_{grad}}}. \end{equation*} Combining them together, we have $P_{\xi_g^k}(\mathcal{A}_k^c ) \leq p_{grad}$ provided \begin{equation}\label{cond:1} |\xi_g^k| \geq \frac{C_{grad}\log\rbr{\frac{8d}{p_{grad}} }}{\kappa_{grad}^2\cdot {\bar{\alpha}}_k^2\nbr{\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k + \nu{\bar{M}}_k G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k + G_k^Tc_k\\ \nu G_kG_k^TG_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}}^2\wedge 1} \end{equation} for some constant $C_{grad} = C_{grad}(\nu, \kappa_{2,G}, \kappa_M, \kappa_{\nabla_{{\boldsymbol{x}}}\mathcal{L}}, \kappa_{\nabla_{{\boldsymbol{x}}}^2c}, M_1, M_2)$. The above condition \eqref{cond:1} is consistent with \eqref{cond:11} in Algorithm \ref{alg:sample}. To complete the proof, we have to show that \eqref{cond:1} can be satisfied by Algorithm \ref{alg:sample}. That is Algorithm \ref{alg:sample} terminates in finite time. This is not immediate, as the right hand side depends on $\xi_g^k$ as well. Intuitively, as $|\xi_g^k|$ increases, the right hand side term will approach to a fixed quantity with \textit{nonzero} denominator, so that \eqref{cond:1} can be satisfied finally. Let us define \begin{align*} t_g^{k, \star} &= \kappa_{grad}\cdot{\bar{\alpha}}_k\nbr{\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}^k + \nu M_k G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k + G_k^Tc_k\\ \nu G_kG_k^TG_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}}\wedge 1,\\ t_g^k & = \kappa_{grad}\cdot{\bar{\alpha}}_k\nbr{\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k + \nu {\bar{M}}_k G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k + G_k^Tc_k\\ \nu G_kG_k^TG_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}}\wedge 1. \end{align*} By Assumption \ref{ass:A:1}, we have $t_g^{k, \star}>0$. Otherwise, $\|\nu G_kG_k^TG_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k\| = 0$ and thus $\|G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k\| = 0$. Then ${\boldsymbol 0} = G_k(\nabla_{{\boldsymbol{x}}}\mathcal{L}^k + \nu M_k G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k + G_k^Tc_k) = G_kG_k^Tc_k$ and thus $c_k = {\boldsymbol 0}$. Finally, we get $\nabla_{{\boldsymbol{x}}}\mathcal{L}^k = {\boldsymbol 0}$ and $\nabla\mathcal{L}^k = {\boldsymbol 0}$, which contradicts $\|\nabla\mathcal{L}^k\|>0$ in Assumption \ref{ass:A:1}. Moreover, we have \begin{equation}\label{NN:D:2} \abr{t_g^k - t_k^{k,\star}} \leq \kappa_{grad}\cdot{\bar{\alpha}}_k\nbr{\begin{pmatrix} {\bar{g}}_k - \nabla f_k + \nu\rbr{{\bar{M}}_kG_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k - M_kG_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k}\\ \nu G_kG_k^TG_k\rbr{{\bar{g}}_k - \nabla f_k} \end{pmatrix}}. \end{equation} Similar to the sample complexity shown in \eqref{cond:1}, we let the right hand side of \eqref{NN:D:2} be bounded by $t_g^{k, \star}/2$, which is equivalent to requiring \begin{multline*} \nbr{\begin{pmatrix} {\bar{g}}_k - \nabla f_k + \nu\rbr{{\bar{M}}_kG_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k - M_kG_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k}\\ \nu G_kG_k^TG_k\rbr{{\bar{g}}_k - \nabla f_k} \end{pmatrix}}\\ \leq \frac{1}{2}\nbr{\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}^k + \nu M_k G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k + G_k^Tc_k\\ \nu G_kG_k^TG_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}} \wedge \frac{1}{2\kappa_{grad}\cdot{\bar{\alpha}}_k}. \end{multline*} Replacing the denominator of \eqref{cond:1} by the right hand side term of the above display, we have \begin{align}\label{pequ:Event} P_{\xi_g^k}(|t_g^k - t_g^{k, \star}| \leq t_g^{k, \star}/2)\geq 0.99 \end{align} provided \begin{equation}\label{N:11} |\xi_g^k|\geq \frac{C_{grad} \log \rbr{\frac{8d}{0.01}}}{\frac{1}{4}\nbr{\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}^k + \nu M_k G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k + G_k^Tc_k\\ \nu G_kG_k^TG_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}}^2 \wedge \frac{1}{4\kappa_{grad}^2{\bar{\alpha}}_k^2} \wedge 1} = \frac{4\kappa_{grad}^2{\bar{\alpha}}_k^2C_{grad}\log\rbr{\frac{8d}{0.01}}}{\rbr{t_g^{k, \star}}^2 \wedge 4\kappa_{grad}^2{\bar{\alpha}}_k^2}. \end{equation} Under the event \eqref{pequ:Event}, we have $t_g^k \geq \frac{t_g^{k, \star}}{2} >0$ (the denominator in \eqref{cond:1} is positive) and hence the condition \eqref{cond:1} is implied by \begin{equation*} |\xi_g^k| \geq \frac{4C_{grad}\log\rbr{\frac{8d}{p_{grad}}}}{\rbr{t_g^{k, \star}}^2}. \end{equation*} In summary, we combine the above display with \eqref{N:11}, and know that the condition \eqref{cond:1} holds with probability at least 0.99 if \begin{align*} |\xi_g^k| \geq \frac{4C_{grad}\rbr{\kappa_{grad}^2{\bar{\alpha}}_k^2\vee 1} \log \rbr{\frac{8d}{p_{grad}\wedge 0.01}}}{\rbr{t_g^{k, \star}}^2 \wedge 4\kappa_{grad}^2{\bar{\alpha}}_k^2}. \end{align*} We note that the right hand side threshold is a deterministic quantity (conditional on $({\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k)$). Since Algorithm \ref{alg:sample} increases $|\xi_g^k|$ by a factor of $\rho$ in each iteration, the above requirement will finally be satisfied. After $|\xi_g^k|$ attains the threshold, the condition \eqref{cond:1} (i.e. \eqref{cond:11} in Algorithm \ref{alg:sample}) with positive denominator is satisfied with probability at least 0.99 in each While loop iteration. Thus, the While loop will stop in finite time with probability 1. This completes the proof. \subsection{Proof of Lemma \ref{lem:cond:2}}\label{pf:lem:cond:2} Let $P_{\xi_f^k}(\cdot) = P(\cdot \mid {\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k,{\bar{\Delta}}{\boldsymbol{x}}^k, {\bar{\Delta}}{\boldsymbol{\lambda}}^k)$ be the conditional probability over randomness in $\xi_f^k$. We have \begin{align}\label{pequ:decom} \big|{\bar{\mL}}_{{\bar{\mu}}_k, \nu}^k - &\mathcal{L}_{{\bar{\mu}}_k, \nu}^k \big| \nonumber\\ &\hskip-5pt \stackrel{\eqref{N:12}}{\leq} \abr{{\bar{f}}_k - f_k} + \frac{\nu}{2}\abr{\|G_k({\bar{\nabla}} f_k + G_k^T{\boldsymbol{\lambda}}^k) \|^2 - \|G_k(\nabla f_k + G_k^T{\boldsymbol{\lambda}}^k) \|^2} \nonumber\\ & \leq \abr{{\bar{f}}_k - f_k} + \frac{\nu}{2}\|G_k\|^2\nbr{{\bar{\nabla}} f_k - \nabla f_k}^2 + \nu \|G_k(\nabla f_k + G_k^T{\boldsymbol{\lambda}}^k)\|\|G_k\|\|{\bar{\nabla}} f_k - \nabla f_k\| \nonumber\\ & \stackrel{\eqref{Prop:1}}{\leq} \abr{{\bar{f}}_k - f_k} + \nu\kappa_{2,G}\rbr{\nbr{{\bar{\nabla}} f_k - \nabla f_k} + \kappa_{\nabla_{{\boldsymbol{x}}}\mathcal{L}}}\|{\bar{\nabla}} f_k - \nabla f_k\|, \end{align} Thus, to let $\mathcal{B}_k$ happen, we require \begin{equation*} \abr{{\bar{f}}_k - f_k} \leq -\frac{\kappa_f{\bar{\alpha}}_k^2\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix} }{2}, \quad \nbr{{\bar{\nabla}} f_k - \nabla f_k}\leq -\frac{\kappa_f{\bar{\alpha}}_k^2\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix} }{4\nu\kappa_{2,G}\kappa_{\nabla_{{\boldsymbol{x}}}\mathcal{L}}}\wedge 1. \end{equation*} The above condition on $\nbr{{\bar{\nabla}} f_k - \nabla f_k}$ is further implied by requiring \begin{equation*} \nbr{{\bar{\nabla}} f_k - \nabla f_k} \leq \frac{-\kappa_f{\bar{\alpha}}_k^2\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix} \wedge 1}{4\nu\kappa_{2,G}\kappa_{\nabla_{{\boldsymbol{x}}}\mathcal{L}} + 4}. \end{equation*} Thus, we apply Bernstein's inequality (Lemma 4, \cite{Tripuraneni2018Stochastic}), and know that if \begin{align}\label{pequ:sample:f:1} |\xi_f^k| \geq \frac{16(M_0^2 \vee \rbr{1 + \nu\kappa_{2,G}\kappa_{\nabla_{{\boldsymbol{x}}}\mathcal{L}}}^2M_1^2) }{\cbr{\kappa_f{\bar{\alpha}}_k^2\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix}}^2\wedge 1 }\log\rbr{\frac{4}{p_f}}, \end{align} then \begin{align*} P_{\xi_f^k}\bigg(\abr{{\bar{\mL}}_{{\bar{\mu}}_k, \nu}^k - \mathcal{L}_{{\bar{\mu}}_k, \nu}^k} > -\kappa_f{\bar{\alpha}}_k^2\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix} \bigg)\leq p_f/2. \end{align*} Under the same sample size requirement, we also have \begin{align*} P_{\xi_f^k}\bigg(\abr{{\bar{\mL}}_{{\bar{\mu}}_k, \nu}^{s_k} - \mathcal{L}_{{\bar{\mu}}_k, \nu}^{s_k}} > -\kappa_f{\bar{\alpha}}_k^2\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix} \bigg)\leq p_f/2, \end{align*} which further implies the condition \eqref{equ:ran:cond:3}. As for the condition \eqref{equ:ran:cond:4}, we apply \eqref{pequ:decom} to obtain \begin{align*} \mathbb{E}_{\xi_f^k}\big[\big|{\bar{\mL}}_{{\bar{\mu}}_k, \nu}^k - \mathcal{L}_{{\bar{\mu}}_k, \nu}^k \big|^2\big] & \leq 2\mathbb{E}_{\xi_f^k}[|{\bar{f}}_k - f_k|^2] + 2\nu^2\kappa_{2,G}^2\rbr{M_1+\kappa_{\nabla_{{\boldsymbol{x}}}\mathcal{L}}}^2 \mathbb{E}_{\xi_f^k}[\|{\bar{\nabla}} f_k - \nabla f_k\|^2]\\ & \leq \frac{2M_0^2 + 2\nu^2\kappa_{2,G}^2M_1^2\rbr{M_1+\kappa_{\nabla_{{\boldsymbol{x}}}\mathcal{L}}}^2}{|\xi_f^k|}, \end{align*} where the last inequality applies the bound of the sample average variance, i.e. $\mathbb{E}_{\xi_f^k}[|{\bar{f}}_k - f_k|^2] = \frac{1}{|\xi_f^k|}\mathbb{E}[|f({\boldsymbol{x}}^k; \xi) - f_k|^2] \leq M_0^2/|\xi_f^k|$ (and similar for $\mathbb{E}_{\xi_f^k}[\|{\bar{\nabla}} f_k - \nabla f_k\|^2]$). Following the same calculation, we can show the same bound on $\mathbb{E}_{\xi_f^k}\big[\big|{\bar{\mL}}_{{\bar{\mu}}_k, \nu}^{s_k} - \mathcal{L}_{{\bar{\mu}}_k, \nu}^{s_k} \big|^2\big]$. Thus, the condition \eqref{equ:ran:cond:4} is implied by \begin{align}\label{pequ:sample:f:2} |\xi_f^k| \geq \frac{2M_0^2 + 2\nu^2\kappa_{2,G}^2M_1^2\rbr{M_1+\kappa_{\nabla_{{\boldsymbol{x}}}\mathcal{L}}}^2}{{\bar{\epsilon}}_k^2}. \end{align} Combining \eqref{pequ:sample:f:1} and \eqref{pequ:sample:f:2}, the conditions \eqref{equ:ran:cond:3} and \eqref{equ:ran:cond:4} are satisfied when \begin{align*} |\xi_f^k| \geq \frac{C_f\log\rbr{\frac{4}{p_f}}}{\cbr{\kappa_f{\bar{\alpha}}_k^2\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix}}^2\wedge {\bar{\epsilon}}_k^2\wedge 1}, \end{align*} for some constant $C_f = C_f(\nu, M_0, M_1, \kappa_{2,G}, \kappa_{\nabla_{{\boldsymbol{x}}}\mathcal{L}})$. Moreover, we note that the denominator is nonzero. Otherwise, by \eqref{equ:ran:cond:2} we know ${\bar{\Delta}}{\boldsymbol{x}}^k = {\boldsymbol 0}$ and $G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k = {\boldsymbol 0}$. Then, by \eqref{equ:ran:Newton} we know ${\bar{\Delta}}{\boldsymbol{\lambda}}^k = {\boldsymbol 0}$, which contradicts $\|({\bar{\Delta}}{\boldsymbol{x}}^k, {\bar{\Delta}}{\boldsymbol{\lambda}}^k)\|>0$ in Assumption \ref{ass:A:1}. This completes the proof. \subsection{Proof of Lemma \ref{lem:9}}\label{pf:lem:9} It suffices to show that \eqref{equ:ran:cond:2} is satisfied if ${\bar{\mu}}_k$ is sufficiently large and the threshold is independent from $k$. By Lemma \ref{lem:1} and \eqref{equ:ran:Newton}, we have \begin{equation*} \begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}} {\boldsymbol{x}}^k\\ {\bar{\Delta}} {\boldsymbol{\lambda}}^k \end{pmatrix} = -({\bar{\Delta}}{\boldsymbol{x}}^k)^TB_k{\bar{\Delta}} {\boldsymbol{x}}^k + c_k^T({\bar{\Delta}} {\boldsymbol{\lambda}}^k + {\tilde{\Delta}} {\boldsymbol{\lambda}}^k) - {\bar{\mu}}_k\|c_k\|^2 - \nu\|G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_k\|^2. \end{equation*} Let ${\bar{\Delta}}{\boldsymbol{x}}^k = {\bar{\Delta}} {\boldsymbol{u}}^k + {\bar{\Delta}}{\boldsymbol{v}}^k$ with ${\bar{\Delta}}{\boldsymbol{u}}^k \in \text{Image}(G_k^T)$ and $G_k{\bar{\Delta}}{\boldsymbol{v}}^k = {\boldsymbol 0}$, then \begin{align*} &\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}} {\boldsymbol{x}}^k\\ {\bar{\Delta}} {\boldsymbol{\lambda}}^k \end{pmatrix}\\ & = -({\bar{\Delta}}{\boldsymbol{v}}^k)^TB_k{\bar{\Delta}} {\boldsymbol{v}}^k - 2({\bar{\Delta}}{\boldsymbol{v}}^k)^TB_k{\bar{\Delta}} {\boldsymbol{u}}^k - ({\bar{\Delta}}{\boldsymbol{u}}^k)^TB_k{\bar{\Delta}} {\boldsymbol{u}}^k + c_k^T({\bar{\Delta}} {\boldsymbol{\lambda}}^k + {\tilde{\Delta}} {\boldsymbol{\lambda}}^k) \\ &\quad - {\bar{\mu}}_k\|c_k\|^2 - \nu\|G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_k\|^2\\ &\leq -\gamma_{RH}\nbr{{\bar{\Delta}} {\boldsymbol{v}}^k}^2 + 2\|{\bar{\Delta}}{\boldsymbol{v}}^k\|\|B_k{\bar{\Delta}}{\boldsymbol{u}}^k\| - ({\bar{\Delta}}{\boldsymbol{u}}^k)^TB_k{\bar{\Delta}} {\boldsymbol{u}}^k + c_k^T({\bar{\Delta}} {\boldsymbol{\lambda}}^k + {\tilde{\Delta}} {\boldsymbol{\lambda}}^k)\\ &\quad - {\bar{\mu}}_k\|c_k\|^2 - \nu\|G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_k\|^2. \end{align*} Using the fact that $2\nbr{{\bar{\Delta}}{\boldsymbol{v}}^k}\nbr{B_k{\bar{\Delta}}{\boldsymbol{u}}^k} \leq \gamma_{RH}\|{\bar{\Delta}}{\boldsymbol{v}}^k\|^2/4 + 4\|B_k{\bar{\Delta}}{\boldsymbol{u}}^k\|^2/\gamma_{RH}$, $\|{\bar{\Delta}}{\boldsymbol{x}}^k\|^2 = \|{\bar{\Delta}}{\boldsymbol{v}}^k\|^2 + \|{\bar{\Delta}}{\boldsymbol{u}}^k\|^2$, and the setup $\nu \geq \gamma_{RH}$ (see Line 1 of Algorithm \ref{alg:ASto:SQP}), we further have \begin{align*} &\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}} {\boldsymbol{x}}^k\\ {\bar{\Delta}} {\boldsymbol{\lambda}}^k \end{pmatrix}\\ & \leq -\frac{3\gamma_{RH}}{4}\|{\bar{\Delta}} {\boldsymbol{v}}^k\|^2 + ({\bar{\Delta}}{\boldsymbol{u}}^k)^T\rbr{\frac{4B_k^2}{\gamma_{RH}} - B_k}{\bar{\Delta}} {\boldsymbol{u}}^k + c_k^T({\bar{\Delta}} {\boldsymbol{\lambda}}^k + {\tilde{\Delta}} {\boldsymbol{\lambda}}^k)\\ &\quad - {\bar{\mu}}_k\|c_k\|^2 - \nu\|G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_k\|^2\\ & = -\frac{3\gamma_{RH}}{4}\|{\bar{\Delta}}{\boldsymbol{x}}^k\|^2 + ({\bar{\Delta}}{\boldsymbol{u}}^k)^T\rbr{\frac{4B_k^2}{\gamma_{RH}}+ \frac{3\gamma_{RH}}{4}I - B_k}{\bar{\Delta}} {\boldsymbol{u}}^k + c_k^T({\bar{\Delta}} {\boldsymbol{\lambda}}^k + {\tilde{\Delta}}{\boldsymbol{\lambda}}^k)\\ &\quad - {\bar{\mu}}_k\|c_k\|^2 - \nu\|G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_k\|^2\\ & \leq -\frac{\gamma_{RH}}{2}\nbr{\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_k \end{pmatrix}}^2 + D_k, \end{align*} where \begin{multline*} D_k =({\bar{\Delta}}{\boldsymbol{u}}^k)^T\rbr{\frac{4B_k^2}{\gamma_{RH}} + \frac{3\gamma_{RH}}{4}I - B_k}{\bar{\Delta}} {\boldsymbol{u}}^k + c_k^T({\bar{\Delta}} {\boldsymbol{\lambda}}^k + {\tilde{\Delta}}{\boldsymbol{\lambda}}^k) \\ - \frac{\gamma_{RH}}{4}\|{\bar{\Delta}}{\boldsymbol{x}}^k\|^2 - \frac{\nu}{2}\|G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_k\|^2 - {\bar{\mu}}_k\|c_k\|^2. \end{multline*} Noting that $\|{\bar{M}}_k\|\leq \kappa_{M}$, we have inequalities similar to \eqref{NN:A:3} and \eqref{N:2} that \begin{align*} \|{\bar{\Delta}}{\boldsymbol{u}}^k\| &\leq \frac{\sqrt{\kappa_{2,G}}}{\kappa_{1,G}}\|c_k\|,\\ \|{\bar{\Delta}}{\boldsymbol{\lambda}}^k\| & \stackrel{\eqref{equ:ran:Newton}}{=}\| (G_kG_k^T)^{-1}(G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k + {\bar{M}}_k^T{\bar{\Delta}}{\boldsymbol{x}}^k) \| \leq \frac{1}{\kappa_{1,G}}(\|G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k\| + \kappa_{M}\|{\bar{\Delta}}{\boldsymbol{x}}^k\|),\\ \|{\tilde{\Delta}}{\boldsymbol{\lambda}}^k\| & \stackrel{\eqref{equ:ran:Newton}}{=}\| (G_kG_k^T)^{-1}(G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k + G_kB_k{\bar{\Delta}}{\boldsymbol{x}}^k) \|\leq \frac{1}{\kappa_{1,G}}(\|G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k\| + \sqrt{\kappa_{2,G}}\kappa_B\|{\bar{\Delta}}{\boldsymbol{x}}^k\|). \end{align*} Thus, we can bound $D_k$ as \begin{align*} D_k & \leq \rbr{\frac{\kappa_{2,G}}{\kappa_{1,G}^2}\rbr{\frac{4\kappa_B^2}{\gamma_{RH}}+ \frac{3\gamma_{RH}}{4}+\kappa_B }-{\bar{\mu}}_k }\|c_k^2\| + \frac{2}{\kappa_{1,G}}\|c_k\|\|G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k\| \\ &\quad + \frac{\kappa_{M} + \sqrt{\kappa_{2,G}}\kappa_B }{\kappa_{1,G}}\|c_k\|\|{\bar{\Delta}}{\boldsymbol{x}}^k\| - \frac{\gamma_{RH}}{4}\|{\bar{\Delta}}{\boldsymbol{x}}^k\|^2 - \frac{\nu}{2}\|G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_k\|^2\\ & \leq \rbr{\frac{\kappa_{2,G}}{\kappa_{1,G}^2}\rbr{\frac{4\kappa_B^2}{\gamma_{RH}}+ \frac{3\gamma_{RH}}{4}+\kappa_B } + \frac{2}{\nu\kappa_{1,G}^2} + \frac{(\kappa_{M} + \sqrt{\kappa_{2,G}}\kappa_B)^2}{\gamma_{RH}\kappa_{1,G}^2}-{\bar{\mu}}_k }\|c_k\|^2\\ & \leq \rbr{\frac{6\kappa_{2,G}\kappa_B^2}{\kappa_{1,G}^2\gamma_{RH} } + \frac{2+(\kappa_{M} + \sqrt{\kappa_{2,G}}\kappa_B)^2}{\kappa_{1,G}^2\gamma_{RH}} -{\bar{\mu}}_k}\|c_k\|^2\\ & \leq \rbr{\frac{8(\kappa_{M} + \sqrt{\kappa_{2,G}}\kappa_B)^2}{\kappa_{1,G}^2\gamma_{RH}} -{\bar{\mu}}_k}\|c_k\|^2, \end{align*} where the third inequality supposes $\kappa_B\geq \gamma_{RH}$ and uses the setup of $\nu$ that $\nu\geq \gamma_{RH}$; the last inequality supposes $\kappa_M\wedge \kappa_{2,G}\wedge\kappa_B\geq 1$. Thus, as long as \begin{align}\label{pequ:mu:1} {\bar{\mu}}_k \geq \frac{8(\kappa_{M} + \sqrt{\kappa_{2,G}}\kappa_B)^2}{\kappa_{1,G}^2\gamma_{RH}} \eqqcolon {\tilde{\mu}}_1 / \rho, \end{align} we know $D_k\leq 0$ and thus the first condition in \eqref{equ:ran:cond:2} holds. We check the second condition. We have \begin{align*} \rbr{\frac{1}{\nu}I + G_k{\bar{M}}_k}\rbr{G_kG_k^T}^{-1}&{\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k \\ & \stackrel{\eqref{N:13}}{=} \rbr{\frac{1}{\nu}I + G_k{\bar{M}}_k}\rbr{G_kG_k^T}^{-1}c_k + \rbr{I + \nu G_k{\bar{M}}_k}G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_k\\ & \stackrel{\eqref{N:13}}{=} \rbr{\frac{1}{\nu}I + G_k{\bar{M}}_k}\rbr{G_kG_k^T}^{-1}c_k + G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k - {\bar{\mu}}_k G_kG_k^Tc_k, \end{align*} which implies \begin{equation*} \rbr{{\bar{\mu}}_k G_kG_k^T - \rbr{\frac{1}{\nu}I + G_k{\bar{M}}_k}\rbr{G_kG_k^T}^{-1} }c_k = G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k - \rbr{\frac{1}{\nu}I + G_k{\bar{M}}_k}\rbr{G_kG_k^T}^{-1}{\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k \end{equation*} and, by \eqref{Prop:1}, \begin{equation*} \rbr{{\bar{\mu}}_k\kappa_{1,G}-\frac{1 + \nu\kappa_{M}\sqrt{\kappa_{2,G}}}{\kappa_{1,G}\nu} }\|c_k\| \leq \frac{1 + \nu\sqrt{\kappa_{2,G}}(\kappa_{M} + \kappa_{1,G}) }{\kappa_{1,G}\nu} \nbr{\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k. \end{pmatrix}}. \end{equation*} Therefore, as long as \begin{align}\label{pequ:mu:2} {\bar{\mu}}_k \geq \frac{2 + 2\nu\sqrt{\kappa_{2,G}}(\kappa_{M} + \kappa_{1,G}) }{\kappa_{1,G}^2\nu} \eqqcolon {\tilde{\mu}}_2/\rho, \end{align} the second condition in \eqref{equ:ran:cond:2} holds. Combining \eqref{pequ:mu:1} and \eqref{pequ:mu:2} together, we see that \begin{align*} {\bar{\mu}}_k \geq \frac{{\tilde{\mu}}_1\vee {\tilde{\mu}}_2}{\rho} \end{align*} implies that \eqref{equ:ran:cond:2} holds. Moreover, the right hand side in the display above is independent of $k$. As Algorithm~\ref{alg:ASto:SQP} increases ${\bar{\mu}}_k$ by a factor of $\rho$ in each while loop, there must exist ${\bar{K}}<\infty$ such that ${\bar{\mu}}_k= {\bar{\mu}}_{{\bar{K}}}$ for all $k\geq {\bar{K}}$, and ${\bar{\mu}}_{{\bar{K}}} \leq {\tilde{\mu}}\coloneqq {\tilde{\mu}}_1\vee {\tilde{\mu}}_2$. This completes the proof. \subsection{Proof of (\ref{N:14})}\label{pf:N:14} Note that \begin{align*} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k +& \nu{\bar{M}}_k G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k + G_k^Tc_k \\ = & (I - G_k^T(G_kG_k^T)^{-1}G_k){\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k + G_k^T(G_kG_k^T)^{-1}G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k + \nu{\bar{M}}_k G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k + G_k^Tc_k\\ \stackrel{\eqref{equ:ran:Newton}}{=} & - (I - G_k^T(G_kG_k^T)^{-1}G_k)B_k{\bar{\Delta}}{\boldsymbol{x}}^k + \rbr{G_k^T(G_kG_k^T)^{-1} + \nu{\bar{M}}_k}G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k - G_k^TG_k{\bar{\Delta}}{\boldsymbol{x}}^k. \end{align*} Thus, we know \begin{multline}\label{N:15} \begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k + \nu{\bar{M}}_k G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k + G_k^Tc_k\\ \nu G_kG_k^TG_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix} \\ = \begin{pmatrix} -(I - G_k^T(G_kG_k^T)^{-1}G_k)B_k - G_k^TG_k & G_k^T(G_kG_k^T)^{-1} + \nu{\bar{M}}_k\\ {\boldsymbol 0} & \nu G_kG_k^T \end{pmatrix}\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}. \end{multline} Using \eqref{Prop:1}, we let $\Upsilon_1 = 2\kappa_B + \kappa_{2,G} + \nu(\kappa_M + \kappa_{2,G}) + \frac{1}{\sqrt{\kappa_{1,G}}}$ and the first inequality in \eqref{N:14} is satisfied. Further, we know \begin{equation*} \begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix} \stackrel{\eqref{equ:ran:Newton}}{=} \begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ -{\bar{M}}_k^T{\bar{\Delta}}{\boldsymbol{x}}^k - G_kG_k^T{\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix} = \begin{pmatrix} I & {\boldsymbol 0} \\ -{\bar{M}}_k^T & -G_kG_k^T \end{pmatrix}\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix}. \end{equation*} Thus, we let $\Upsilon_2 = 1 + \kappa_M + \kappa_{2,G}$ and the second inequality in \eqref{N:14} is satisfied. Further, we have \begin{align*} \begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix} \stackrel{\eqref{equ:ran:Newton}}{=}& \begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ -(G_kG_k^T)^{-1}{\bar{M}}_k^T{\bar{\Delta}}{\boldsymbol{x}}^k - (G_kG_k^T)^{-1}G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix} \\ =& \begin{pmatrix} I & {\boldsymbol 0} \\ -(G_kG_k^T)^{-1}{\bar{M}}_k^T & - (G_kG_k^T)^{-1} \end{pmatrix}\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}. \end{align*} Thus, we let $\Upsilon_3 = 1 + \kappa_M/\kappa_{1,G} + 1/\kappa_{1,G}$ and the third inequality in \eqref{N:14} is satisfied. Finally, \begin{align*} \begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix} \stackrel{\eqref{N:13}}{=} & \begin{pmatrix} \rbr{I+\nu{\bar{M}}_kG_k}{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k + {\bar{\mu}}_{{\bar{K}}}G_k^Tc_k\\ c_k + \nu G_kG_k^TG_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}\\ \stackrel{\eqref{N:15}}{=}&\begin{pmatrix} -(I - G_k^T(G_kG_k^T)^{-1}G_k)B_k - {\bar{\mu}}_{{\bar{K}}}G_k^TG_k & G_k^T(G_kG_k^T)^{-1} + \nu{\bar{M}}_k\\ -G_k & \nu G_kG_k^T \end{pmatrix}\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}. \end{align*} By Lemma \ref{lem:9}, we know ${\bar{\mu}}_{{\bar{K}}} \leq {\tilde{\mu}}$ with deterministic ${\tilde{\mu}}$. Thus, we let $\Upsilon_4 = \Upsilon_1 + {\tilde{\mu}} \kappa_{2,G}$ and the fourth inequality in \eqref{N:14} is satisfied. This completes the proof. \subsection{Proof of Lemma \ref{lem:8}}\label{pf:lem:8} On the events of $\mathcal{A}_k$ and $\mathcal{B}_k$, the merit function and its gradient are precisely estimated. Since ${\bar{\mu}}_{{\bar{K}}} \leq {\tilde{\mu}}$, we have $\kappa_{\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}}\leq \kappa_{\mathcal{L}_{{\tilde{\mu}}, \nu}}$ by \eqref{Prop:1}. By Taylor expansion, we have \begin{align}\label{N:16} \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^{s_k}& \leq \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k + {\bar{\alpha}}_k\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix} + \frac{\kappa_{\mathcal{L}_{{\tilde{\mu}}, \nu}}{\bar{\alpha}}_k^2}{2}\nbr{\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}} {\boldsymbol{\lambda}}^k \end{pmatrix}}^2 \nonumber\\ & = \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k + {\bar{\alpha}}_k\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k - {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k- {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix} + {\bar{\alpha}}_k\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix} \nonumber\\ & \quad + \frac{\kappa_{\mathcal{L}_{{\tilde{\mu}}, \nu}}{\bar{\alpha}}_k^2}{2}\nbr{\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}} {\boldsymbol{\lambda}}^k \end{pmatrix}}^2 \nonumber\\ & \stackrel{\eqref{event:A_k}}{\leq} \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k + {\bar{\alpha}}_k\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix} + \frac{\kappa_{\mathcal{L}_{{\tilde{\mu}}, \nu}}{\bar{\alpha}}_k^2}{2}\nbr{\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}} {\boldsymbol{\lambda}}^k \end{pmatrix}}^2 \nonumber\\ &\quad + {\bar{\alpha}}_k^2\kappa_{grad}\nbr{\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k + \nu{\bar{M}}_kG_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k + G_k^Tc_k\\ \nu G_kG_k^TG_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}}\nbr{\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix}} \nonumber\\ & \stackrel{\eqref{N:14}}{\leq} \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k + {\bar{\alpha}}_k\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix} + \rbr{\kappa_{\mathcal{L}_{{\tilde{\mu}}, \nu}} \Upsilon_3^2 + \kappa_{grad}\Upsilon_1\Upsilon_3}{\bar{\alpha}}_k^2\nbr{\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}}^2 \nonumber\\ & \stackrel{\eqref{equ:ran:cond:2}}{\leq} \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k + {\bar{\alpha}}_k\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix} - \frac{2\rbr{\kappa_{\mathcal{L}_{{\tilde{\mu}}, \nu}} \Upsilon_3^2 + \kappa_{grad}\Upsilon_1\Upsilon_3}}{\gamma_{RH}}{\bar{\alpha}}_k^2\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix} \nonumber\\ & = \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k + {\bar{\alpha}}_k \rbr{1 - \frac{2\rbr{\kappa_{\mathcal{L}_{{\tilde{\mu}}, \nu}} \Upsilon_3^2 + \kappa_{grad}\Upsilon_1\Upsilon_3}}{\gamma_{RH}}{\bar{\alpha}}_k}\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix}. \end{align} Moreover, by event $\mathcal{B}_k$ we have \begin{align*} {\bar{\mL}}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^{s_k} & \stackrel{\eqref{event:B_k}}{\leq} \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^{s_k} - \kappa_f{\bar{\alpha}}_k^2\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix}\\ &\hskip-5pt \stackrel{\eqref{N:16}}{\leq} \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k + {\bar{\alpha}}_k \rbr{1 - \frac{2\rbr{\kappa_{\mathcal{L}_{{\tilde{\mu}}, \nu}} \Upsilon_3^2 + \kappa_{grad}\Upsilon_1\Upsilon_3} + \kappa_f\gamma_{RH}}{\gamma_{RH}}{\bar{\alpha}}_k}\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix}\\ & \stackrel{\eqref{event:B_k}}{\leq} {\bar{\mL}}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k + {\bar{\alpha}}_k \rbr{1 - \frac{2\rbr{\kappa_{\mathcal{L}_{{\tilde{\mu}}, \nu}} \Upsilon_3^2 + \kappa_{grad}\Upsilon_1\Upsilon_3 + \kappa_f\gamma_{RH}} }{\gamma_{RH}}{\bar{\alpha}}_k}\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix}. \end{align*} Thus, if \begin{equation*} 1 - \frac{2\rbr{\kappa_{\mathcal{L}_{{\tilde{\mu}}, \nu}} \Upsilon_3^2 + \kappa_{grad}\Upsilon_1\Upsilon_3 + \kappa_f\gamma_{RH}} }{\gamma_{RH}}{\bar{\alpha}}_k \geq \beta \Longleftrightarrow {\bar{\alpha}}_k\leq \frac{(1-\beta)\gamma_{RH}}{2\rbr{\kappa_{\mathcal{L}_{{\tilde{\mu}}, \nu}} \Upsilon_3^2 + \kappa_{grad}\Upsilon_1\Upsilon_3 + \kappa_f\gamma_{RH}}}, \end{equation*} we have \begin{equation*} {\bar{\mL}}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^{s_k} \leq {\bar{\mL}}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k + {\bar{\alpha}}_k\beta\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix}, \end{equation*} which completes the proof. \subsection{Proof of Lemma \ref{lem:A:2}}\label{pf:lem:A:2} Since $\mathcal{B}_k$ happens and the $k$-th step is successful, we have \begin{align*} \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^{s_k} & \stackrel{\eqref{event:B_k}}{\leq} {\bar{\mL}}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^{s_k} -\kappa_f{\bar{\alpha}}_k^2\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix} \\ & \stackrel{\eqref{equ:ran:Armijo}}{\leq} {\bar{\mL}}_{{\bar{\mu}}_K, \nu}^k + {\bar{\alpha}}_k\beta\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix} -\kappa_f{\bar{\alpha}}_k^2\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_K, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_K, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix} \\ & \stackrel{\eqref{event:B_k}}{\leq} \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k + {\bar{\alpha}}_k\beta\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix} \rbr{1 - \frac{2\kappa_f{\bar{\alpha}}_k}{\beta}}\\ & \leq \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k + {\bar{\alpha}}_k\beta\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix} \rbr{1 - \frac{2\kappa_f\alpha_{max}}{\beta}}, \end{align*} where the last inequality is due to ${\bar{\alpha}}_k\leq \alpha_{max}$ from Algorithm \ref{alg:ASto:SQP}. Using the input condition on $\kappa_f$ in Line 1 of Algorithm \ref{alg:ASto:SQP} completes the proof. \subsection{Proof of Lemma \ref{lem:4}}\label{pf:lem:4} For each iteration, we have the following three types of steps. \noindent\textbf{Case 1: reliable step.} We have \begin{align}\label{N:17} \nbr{\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}} & \leq \nbr{\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k - \nabla_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k - \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}} + \nbr{\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}} \nonumber\\ &\hskip-4pt \stackrel{\eqref{event:A_k}}{\leq} \kappa_{grad}{\bar{\alpha}}_k\nbr{\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k + \nu{\bar{M}}_k G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k + G_k^Tc_k\\ \nu G_kG_k^TG_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}} + \nbr{\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}} \nonumber\\ &\hskip-4pt \stackrel{\eqref{N:14}}{\leq} \kappa_{grad}{\bar{\alpha}}_k\Upsilon_1\nbr{\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}} + \Upsilon_4\nbr{\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}} \nonumber\\ & \leq \rbr{\kappa_{grad}\alpha_{max}\Upsilon_1 + \Upsilon_4} \nbr{\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}}. \end{align} By Lemma \ref{lem:A:2} and the reliability of the step, we further have \begin{align}\label{pequ:8} \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^{k+1} &-\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \nonumber\\ \leq& \frac{{\bar{\alpha}}_k\beta}{2}\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix} \nonumber\\ \stackrel{\eqref{equ:sufficient:dec}}{\leq}& \frac{{\bar{\alpha}}_k\beta}{4}\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix} - \frac{{\bar{\epsilon}}_k}{4} \nonumber\\ \stackrel{\eqref{equ:ran:cond:2}}{\leq} & -\frac{{\bar{\alpha}}_k\beta\gamma_{RH}}{8}\nbr{\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}}^2 - \frac{{\bar{\epsilon}}_k}{4} \nonumber\\ \stackrel{\eqref{N:17}}{\leq} & -\frac{{\bar{\alpha}}_k\beta\gamma_{RH}}{16}\nbr{\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}}^2 - \frac{{\bar{\alpha}}_k\beta\gamma_{RH}}{16\rbr{\kappa_{grad}\alpha_{max}\Upsilon_1 + \Upsilon_4}^2 }\nbr{\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}}^2 - \frac{{\bar{\epsilon}}_k}{4}. \end{align} Moreover, by Line 13 of Algorithm \ref{alg:ASto:SQP}, ${\bar{\epsilon}}_{k+1} - {\bar{\epsilon}}_k = (\rho-1){\bar{\epsilon}}_k$ and, by Taylor expansion, \begin{align}\label{pequ:9} {\bar{\alpha}}_{k+1}\nbr{\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^{k+1}\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^{k+1} \end{pmatrix}}^2 - & {\bar{\alpha}}_k\nbr{\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}}^2 \nonumber\\ & \leq 2{\bar{\alpha}}_{k+1}\rbr{ \nbr{\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}}^2 + \kappa_{\mathcal{L}_{{\tilde{\mu}}, \nu}}^2{\bar{\alpha}}_k^2\nbr{\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix}}^2 } \nonumber\\ & \leq 2\rho{\bar{\alpha}}_k\rbr{ \nbr{\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}}^2 + \kappa_{\mathcal{L}_{{\tilde{\mu}}, \nu}}^2\alpha_{max}^2\Upsilon_3^2\nbr{\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}}^2 }, \end{align} where the last inequality is due to ${\bar{\alpha}}_{k+1} \leq \rho{\bar{\alpha}}_k$, ${\bar{\alpha}}_k\leq \alpha_{max}$, and \eqref{N:14}. Combining the above displays, \begin{multline}\label{pequ:11} \Phi_{{\bar{\mu}}_{{\bar{K}}}, \nu, \omega}^{k+1} - \Phi_{{\bar{\mu}}_{{\bar{K}}}, \nu, \omega}^k \\ \leq -\frac{\beta\gamma_{RH}\omega}{32}{\bar{\alpha}}_k\nbr{\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}}^2 - \frac{\beta\gamma_{RH}\omega}{32\rbr{\kappa_{grad}\alpha_{max}\Upsilon_1 + \Upsilon_4}^2 } {\bar{\alpha}}_k\nbr{\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}}^2 - \frac{\omega{\bar{\epsilon}}_k}{8}, \end{multline} since \begin{align*} -\frac{\omega\beta\gamma_{RH}}{16} + (1-\omega)\rho\kappa_{\mathcal{L}_{{\tilde{\mu}}, \nu}}^2\alpha_{max}^2\Upsilon_3^2 \leq& -\frac{\omega\beta\gamma_{RH}}{32},\\ -\frac{\omega\beta\gamma_{RH}}{16\rbr{\kappa_{grad}\alpha_{max}\Upsilon_1 + \Upsilon_4}^2 } + (1-\omega)\rho \leq & -\frac{\omega\beta\gamma_{RH}}{32\rbr{\kappa_{grad}\alpha_{max}\Upsilon_1 + \Upsilon_4}^2 },\\ -\frac{\omega}{4} + \frac{1}{2}(1-\omega)(\rho-1) \leq & -\frac{\omega}{8}, \end{align*} as implied by the condition \eqref{equ:cond:omega:1}. \noindent\textbf{Case 2: unreliable step.} For the unreliable step, we apply Lemma \ref{lem:A:2} and \eqref{pequ:8} is changed to \begin{align*} \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^{k+1} - \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k & \leq \frac{{\bar{\alpha}}_k\beta}{2}\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix} \stackrel{\eqref{equ:ran:cond:2}}{\leq} -\frac{{\bar{\alpha}}_k\beta\gamma_{RH}}{4}\nbr{\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}}^2 \nonumber\\ & \stackrel{\eqref{N:17}}{\leq} -\frac{{\bar{\alpha}}_k\beta\gamma_{RH}}{8}\nbr{\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}}^2 - \frac{{\bar{\alpha}}_k\beta\gamma_{RH}}{8\rbr{\kappa_{grad}\alpha_{max}\Upsilon_1 + \Upsilon_4}^2 }\nbr{\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}}^2. \end{align*} By Line 15 of Algorithm \ref{alg:ASto:SQP}, ${\bar{\epsilon}}_{k+1} - {\bar{\epsilon}}_k = -(1-1/\rho){\bar{\epsilon}}_k$, while \eqref{pequ:9} is still the same. Thus, under the condition \eqref{equ:cond:omega:1}, we obtain \begin{multline}\label{pequ:12} \Phi_{{\bar{\mu}}_{{\bar{K}}}, \nu, \omega}^{k+1} - \Phi_{{\bar{\mu}}_{{\bar{K}}}, \nu, \omega}^k \leq -\frac{\beta\gamma_{RH}\omega}{32}{\bar{\alpha}}_k\nbr{\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}}^2 \\ -\frac{\beta\gamma_{RH}\omega}{32\rbr{\kappa_{grad}\alpha_{max}\Upsilon_1 + \Upsilon_4}^2 } {\bar{\alpha}}_k\nbr{\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}}^2 - \frac{1}{2}(1-\omega)\rbr{1-\frac{1}{\rho}}{\bar{\epsilon}}_k. \end{multline} \noindent\textbf{Case 3: unsuccessful step.} Noting that $({\boldsymbol{x}}^{k+1}, {\boldsymbol{\lambda}}^{k+1}) = ({\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k)$, \begin{align}\label{pequ:13} \Phi_{{\bar{\mu}}_{{\bar{K}}}, \nu, \omega}^{k+1} - \Phi_{{\bar{\mu}}_{{\bar{K}}}, \nu, \omega}^k = -\frac{1}{2}(1-\omega)\rbr{1-\frac{1}{\rho}}{\bar{\epsilon}}_k - \frac{1}{2}(1-\omega)\rbr{1 - \frac{1}{\rho}} {\bar{\alpha}}_k\nbr{\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}}^2. \end{align} Noting that under the condition \eqref{equ:cond:omega:1}, we have \begin{gather*} -\frac{\beta\gamma_{RH}\omega}{32\rbr{\kappa_{grad}\alpha_{max}\Upsilon_1 + \Upsilon_4}^2 } \leq - \frac{1}{2}(1-\omega)\rbr{1 - \frac{1}{\rho}},\\ -\frac{\omega}{8} \leq -\frac{1}{2}(1-\omega)\rbr{1-\frac{1}{\rho}}. \end{gather*} Therefore, \eqref{pequ:13} holds for all three cases, which completes the proof. \subsection{Proof of Lemma \ref{lem:5}}\label{pf:lem:5} The proof is similar to that of Lemma \ref{lem:4}. We consider the following three cases. \noindent\textbf{Case 1: reliable step.} For the reliable step, we apply Lemma \ref{lem:A:2} and \eqref{pequ:8} is changed to \begin{align} \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^{k+1} - \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k & \leq \frac{{\bar{\alpha}}_k\beta}{2}\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix}\stackrel{\eqref{equ:sufficient:dec}}{\leq} \frac{{\bar{\alpha}}_k\beta}{4}\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix} - \frac{{\bar{\epsilon}}_k}{4} \nonumber\\ & \stackrel{\eqref{equ:ran:cond:2}}{\leq} -\frac{{\bar{\alpha}}_k\beta\gamma_{RH}}{8}\nbr{\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{k} \end{pmatrix}}^2 - \frac{{\bar{\epsilon}}_k}{4}. \end{align} By Line 13 of Algorithm \ref{alg:ASto:SQP}, ${\bar{\epsilon}}_{k+1} - {\bar{\epsilon}}_k = (\rho-1){\bar{\epsilon}}_k$, while \eqref{pequ:9} is the same. Thus, by the condition on $\omega$ in \eqref{equ:cond:omega:1} we obtain \begin{equation}\label{pequ:14} \Phi_{{\bar{\mu}}_{{\bar{K}}}, \nu, \omega}^{k+1} - \Phi_{{\bar{\mu}}_{{\bar{K}}}, \nu, \omega}^k \leq -\frac{\beta\gamma_{RH}\omega}{32}{\bar{\alpha}}_k\nbr{\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}}^2 - \frac{\omega{\bar{\epsilon}}_k}{8} + \rho(1-\omega){\bar{\alpha}}_k\nbr{\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}}^2. \end{equation} \noindent\textbf{Case 2: unreliable step.} For the unreliable step, \eqref{pequ:8} is changed to \begin{equation*} \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^{k+1} - \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \leq \frac{{\bar{\alpha}}_k\beta}{2}\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix} \stackrel{\eqref{equ:ran:cond:2}}{\leq} -\frac{\beta\gamma_{RH}}{4}{\bar{\alpha}}_k\nbr{\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}}^2. \end{equation*} By Line 15 of Algorithm \ref{alg:ASto:SQP}, ${\bar{\epsilon}}_{k+1} - {\bar{\epsilon}}_k = -(1-1/\rho){\bar{\epsilon}}_k$ and \eqref{pequ:9} is the same. Thus, under the condition on $\omega$ in \eqref{equ:cond:omega:1}, \begin{multline}\label{pequ:15} \Phi_{{\bar{\mu}}_{{\bar{K}}}, \nu, \omega}^{k+1} - \Phi_{{\bar{\mu}}_{{\bar{K}}}, \nu, \omega}^k \\ \leq -\frac{\beta\gamma_{RH}\omega}{32}{\bar{\alpha}}_k\nbr{\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{k} \end{pmatrix}}^2 -\frac{1}{2}(1-\omega)\rbr{1-\frac{1}{\rho}}{\bar{\epsilon}}_k + \rho(1-\omega){\bar{\alpha}}_k\nbr{\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}}^2. \end{multline} \noindent\textbf{Case 3: unsuccessful step.} The result in \eqref{pequ:13} holds. \noindent Combining \eqref{pequ:14}, \eqref{pequ:15}, \eqref{pequ:13}, we have \begin{equation*} \Phi_{{\bar{\mu}}_{{\bar{K}}}, \nu, \omega}^{k+1} - \Phi_{{\bar{\mu}}_{{\bar{K}}}, \nu, \omega}^k \leq \rho(1-\omega){\bar{\alpha}}_k\nbr{\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}}^2, \end{equation*} which completes the proof. \subsection{Proof of Lemma \ref{lem:7}}\label{pf:lem:7} The proof is similar to that of Lemma \ref{lem:4}. We consider the following three cases. \noindent\textbf{Case 1: reliable step.} We have \begin{align}\label{pequ:16} \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^{k+1} - \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k & \leq |\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^{k+1} - {\bar{\mL}}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^{s_k}| + {\bar{\mL}}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^{s_k} - {\bar{\mL}}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k + |{\bar{\mL}}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k - \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k| \nonumber\\ &\hskip-4pt \stackrel{\eqref{equ:ran:Armijo}}{\leq} {\bar{\alpha}}_k\beta\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix} + |{\bar{\mL}}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^{s_k} - \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^{s_k}| + |{\bar{\mL}}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k - \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k| \nonumber\\ &\hskip-4pt \stackrel{\eqref{equ:sufficient:dec}}{\leq} \frac{{\bar{\alpha}}_k\beta}{2}\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix} -\frac{{\bar{\epsilon}}_k}{2} + |{\bar{\mL}}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^{s_k} - \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^{s_k}| + |{\bar{\mL}}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k - \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k| \nonumber\\ &\hskip -4pt \stackrel{\eqref{equ:ran:cond:2}}{\leq} -\frac{\beta{\bar{\alpha}}_k\gamma_{RH}}{4}\nbr{\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}}^2 - \frac{{\bar{\epsilon}}_k}{2} + |{\bar{\mL}}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^{s_k} - \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^{s_k}| + |{\bar{\mL}}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k - \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k|. \end{align} By Line 13 of Algorithm \ref{alg:ASto:SQP}, ${\bar{\epsilon}}_{k+1} - {\bar{\epsilon}}_k = (\rho-1){\bar{\epsilon}}_k$, and \eqref{pequ:9} holds as well. By \eqref{equ:cond:omega:1}, we further have \begin{align}\label{pequ:17} \Phi_{{\bar{\mu}}_{{\bar{K}}}, \nu, \omega}^{k+1} - \Phi_{{\bar{\mu}}_{{\bar{K}}}, \nu, \omega}^k & \leq -\frac{\beta\gamma_{RH}\omega}{32}{\bar{\alpha}}_k\nbr{\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}}^2 - \frac{\omega{\bar{\epsilon}}_k}{8} + \rho(1-\omega){\bar{\alpha}}_k\nbr{\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}}^2 \nonumber\\ &\quad +\omega( |{\bar{\mL}}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^{s_k} - \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^{s_k}| + |{\bar{\mL}}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k - \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k| ). \end{align} \noindent\textbf{Case 2: unreliable step.} The inequality in \eqref{pequ:16} is changed to \begin{align*} \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^{k+1} - \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k & \leq |\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^{k+1} - {\bar{\mL}}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^{s_k}| + {\bar{\mL}}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^{s_k} - {\bar{\mL}}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k + |{\bar{\mL}}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k - \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k| \nonumber\\ &\hskip-4pt \stackrel{\eqref{equ:ran:Armijo}}{\leq} {\bar{\alpha}}_k\beta\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix} + |{\bar{\mL}}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^{s_k} - \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^{s_k}| + |{\bar{\mL}}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k - \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k| \nonumber\\ &\hskip-4pt \stackrel{\eqref{equ:ran:cond:2}}{\leq} -\frac{\beta{\bar{\alpha}}_k\gamma_{RH}}{2}\nbr{\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}}^2 + |{\bar{\mL}}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^{s_k}-\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^{s_k}| + |{\bar{\mL}}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k - \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k|. \end{align*} We further have ${\bar{\epsilon}}_{k+1} - {\bar{\epsilon}}_k = -(1-1/\rho){\bar{\epsilon}}_k$ and \eqref{pequ:9} holds as well. Using \eqref{equ:cond:omega:1}, we then have \begin{align}\label{pequ:18} \Phi_{{\bar{\mu}}_{{\bar{K}}}, \nu, \omega}^{k+1} -& \Phi_{{\bar{\mu}}_{{\bar{K}}}, \nu, \omega}^k \nonumber\\ & \leq -\frac{\beta\gamma_{RH}\omega}{32}{\bar{\alpha}}_k\nbr{\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}}^2 - \frac{1}{2}(1-\omega)\rbr{1-\frac{1}{\rho}}{\bar{\epsilon}}_k + \rho(1-\omega){\bar{\alpha}}_k\nbr{\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}}^2 \nonumber\\ &\quad +\omega( |{\bar{\mL}}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^{s_k} - \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^{s_k}| + |{\bar{\mL}}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k - \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k| ). \end{align} \noindent\textbf{Case 3: unsuccessful step.} The result in \eqref{pequ:13} holds. \noindent Combining \eqref{pequ:17}, \eqref{pequ:18}, \eqref{pequ:13}, we obtain \begin{equation*} \Phi_{{\bar{\mu}}_{{\bar{K}}}, \nu, \omega}^{k+1} - \Phi_{{\bar{\mu}}_{{\bar{K}}}, \nu, \omega}^k \leq \rho(1-\omega){\bar{\alpha}}_k\nbr{\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}}^2 + \omega( |{\bar{\mL}}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^{s_k} - \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^{s_k}| + |{\bar{\mL}}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k - \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k| ), \end{equation*} which completes the proof. \subsection{Proof of Theorem \ref{thm:5}}\label{pf:thm:5} By \eqref{equ:ran:cond:1} and \eqref{equ:ran:cond:3}, we have \begin{equation}\label{NN:D:21} P\rbr{\mathcal{A}_k \mid \mathcal{F}_{k-1}} \geq 1-p_{grad} \quad \text{ and } \quad P\rbr{\mathcal{B}_k \mid \mathcal{F}_{k-0.5}} \geq 1-p_f. \end{equation} We further have \begin{align}\label{pequ:19} \mathbb{E}[\Phi_{{\bar{\mu}}_{{\bar{K}}}}^{k+1} - \Phi_{{\bar{\mu}}_{{\bar{K}}}}^k \mid \mathcal{F}_{k-1}] = & \mathbb{E}[{\boldsymbol{1}}_{\mathcal{A}_k\cap \mathcal{B}_k}(\Phi_{{\bar{\mu}}_{{\bar{K}}}}^{k+1} - \Phi_{{\bar{\mu}}_{{\bar{K}}}}^k) \mid \mathcal{F}_{k-1}] + \mathbb{E}[{\boldsymbol{1}}_{\mathcal{A}_k^C\cap \mathcal{B}_k}(\Phi_{{\bar{\mu}}_{{\bar{K}}}}^{k+1} - \Phi_{{\bar{\mu}}_{{\bar{K}}}}^k )\mid \mathcal{F}_{k-1}] \nonumber\\ &\quad + \mathbb{E}[{\boldsymbol{1}}_{\mathcal{B}_k^C}(\Phi_{{\bar{\mu}}_{{\bar{K}}}}^{k+1} - \Phi_{{\bar{\mu}}_{{\bar{K}}}}^k) \mid \mathcal{F}_{k-1}]. \end{align} Using Lemma \ref{lem:4}, \begin{align}\label{pequ:20} &\mathbb{E}[{\boldsymbol{1}}_{\mathcal{A}_k\cap \mathcal{B}_k}(\Phi_{{\bar{\mu}}_{{\bar{K}}}}^{k+1} - \Phi_{{\bar{\mu}}_{{\bar{K}}}}^k) \mid \mathcal{F}_{k-1}] \nonumber\\ &\quad \leq -\frac{1-\omega}{2}\mathbb{E}\sbr{{\boldsymbol{1}}_{\mathcal{A}_k\cap \mathcal{B}_k} \mid \mathcal{F}_{k-1}} \rbr{1-\frac{1}{\rho}}\rbr{{\bar{\epsilon}}_k + {\bar{\alpha}}_k\nbr{\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}}^2} \nonumber\\ &\quad = -\frac{1-\omega}{2}\mathbb{E}\sbr{{\boldsymbol{1}}_{\mathcal{A}_k}\mathbb{E}\sbr{{\boldsymbol{1}}_{\mathcal{B}_k} \mid \mathcal{F}_{k-0.5}} \mid \mathcal{F}_{k-1}} \rbr{1-\frac{1}{\rho}}\rbr{{\bar{\epsilon}}_k + {\bar{\alpha}}_k\nbr{\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}}^2} \nonumber\\ &\hskip3pt \stackrel{\eqref{NN:D:21}}{\leq} -\frac{1}{2}(1-p_{grad})(1-p_f)(1-\omega)\rbr{1-\frac{1}{\rho}}\rbr{{\bar{\epsilon}}_k + {\bar{\alpha}}_k\nbr{\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}}^2}. \end{align} Using Lemma \ref{lem:5}, \begin{align}\label{pequ:21} \mathbb{E}[{\boldsymbol{1}}_{\mathcal{A}_k^C\cap \mathcal{B}_k}(\Phi_{{\bar{\mu}}_{{\bar{K}}}}^{k+1} - \Phi_{{\bar{\mu}}_{{\bar{K}}}}^k )\mid \mathcal{F}_{k-1}] & \leq (1-\omega)\mathbb{E}[{\boldsymbol{1}}_{\mathcal{A}_k^C\cap \mathcal{B}_k} \mid \mathcal{F}_{k-1}] \rho{\bar{\alpha}}_k\nbr{\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}}^2 \nonumber\\ & \leq (1-\omega)\mathbb{E}[{\boldsymbol{1}}_{\mathcal{A}_k^C} \mid \mathcal{F}_{k-1}] \rho{\bar{\alpha}}_k\nbr{\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}}^2 \nonumber\\ & \hskip-8pt \stackrel{\eqref{NN:D:21}}{\leq} p_{grad}(1-\omega)\rho{\bar{\alpha}}_k\nbr{\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}}^2. \end{align} Using Lemma \ref{lem:7}, \begin{align}\label{pequ:22} \mathbb{E}[{\boldsymbol{1}}_{\mathcal{B}_k^C}(\Phi_{{\bar{\mu}}_{{\bar{K}}}}^{k+1} - \Phi_{{\bar{\mu}}_{{\bar{K}}}}^k) \mid \mathcal{F}_{k-1}]& \leq p_f(1-\omega)\rho{\bar{\alpha}}_k\nbr{\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}}^2 + \omega\big(\mathbb{E}[{\boldsymbol{1}}_{\mathcal{B}_k^C}|{\bar{\mL}}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^{k} - \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^{k}| \mid \mathcal{F}_{k-1}] \nonumber\\ & \quad + \mathbb{E}[{\boldsymbol{1}}_{\mathcal{B}_k^C}|{\bar{\mL}}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^{s_k} - \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^{s_k}| \mid \mathcal{F}_{k-1}] \big) \nonumber\\ & \hskip-4pt \stackrel{\eqref{equ:ran:cond:4}}{\leq} p_f(1-\omega)\rho{\bar{\alpha}}_k\nbr{\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}}^2 + 2\omega\sqrt{p_f}{\bar{\epsilon}}_k, \end{align} where the last inequality also uses H\"older's inequality. Combining \eqref{pequ:19}, \eqref{pequ:20}, \eqref{pequ:21} and \eqref{pequ:22}, \begin{align*} \mathbb{E}[\Phi_{{\bar{\mu}}_{{\bar{K}}}}^{k+1} - \Phi_{{\bar{\mu}}_{{\bar{K}}}}^k \mid \mathcal{F}_{k-1}] & \leq -\frac{1}{2}(1-p_{grad})(1-p_f)(1-\omega)\rbr{1-\frac{1}{\rho}}\rbr{{\bar{\epsilon}}_k + {\bar{\alpha}}_k\nbr{\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}}^2}\\ & \quad + (p_{grad} + p_f)(1-\omega)\rho{\bar{\alpha}}_k\nbr{\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}}^2 + 2\omega\sqrt{p_f}{\bar{\epsilon}}_k. \end{align*} Under the condition \eqref{cond:pp}, we have \begin{equation*} (p_{grad} + p_f)(1-\omega)\rho \vee 2\omega \sqrt{p_f} \leq \frac{1}{4}(1-p_{grad})(1-p_f)(1-\omega)\rbr{1-\frac{1}{\rho}}. \end{equation*} Thus, \begin{equation*} \mathbb{E}[\Phi_{{\bar{\mu}}_{{\bar{K}}}}^{k+1} - \Phi_{{\bar{\mu}}_{{\bar{K}}}}^k \mid \mathcal{F}_{k-1}] \leq -\frac{1}{4}(1-p_{grad})(1-p_f)(1-\omega)\rbr{1-\frac{1}{\rho}}\rbr{{\bar{\epsilon}}_k + {\bar{\alpha}}_k\nbr{\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}}^2}, \end{equation*} which completes the proof. \subsection{Proof of Theorem \ref{thm:6}}\label{pf:thm:6} By Lemma \ref{lem:9}, for any realization of the iteration sequence $\{({\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k)\}_k$, with probability 1 there exists ${\bar{K}}<\infty$ such that ${\bar{\mu}}_k$ is stabilized after ${\bar{K}}$. Note that Algorithm \ref{alg:ASto:SQP} ensures that for $k> {\bar{K}}$, \begin{align*} \|c_k\| = \mathbb{E}\sbr{\|c_k\| \mid \mathcal{F}_{k-1}}& \leq \mathbb{E}[ \|{\bar{\nabla}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \| \mid \mathcal{F}_{k-1}] \\ & \leq \|\nabla\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\| + \mathbb{E}[ \|{\bar{\nabla}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k - \nabla\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\| \mid \mathcal{F}_{k-1}]\\ &\hskip-4pt \stackrel{\eqref{N:18}}{\leq} \|\nabla\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\| + O\rbr{\mathbb{E}_{\xi^k_g}\sbr{\|{\bar{g}}_k - \nabla f_k\| + \|{\bar{H}}_k - \nabla^2f_k\|} }. \end{align*} Here, for two sequences $\{a_k\}_k$ and $\{b_k\}_k$, $a_k =O(b_k)$ means that there exists a constant $C$ such that $a_k \leq C\cdot b_k$ for all sufficiently large $k$. Since $|\xi_g^k|\geq |\xi_g^{k-1}| +1$, WLOG we suppose $|\xi_g^k| \geq O(k)$. Noting that $\mathbb{E}_{\xi^k_g}\sbr{\|{\bar{g}}_k - \nabla f_k\|}\leq (\mathbb{E}_{\xi^k_g}\sbr{\|{\bar{g}}_k - \nabla f_k\|^2})^{1/2} = O(1/\sqrt{k})$ (similar for $\mathbb{E}_{\xi^k_g}[\|{\bar{H}}_k - \nabla^2f_k\|]$), we obtain \begin{equation*} \|c_k\| \leq \|\nabla\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\| + O\rbr{\frac{1}{\sqrt{k}}}. \end{equation*} Moreover, by the definition of $\nabla\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k$ in \eqref{equ:derivative:AL} and the bound on ${\bar{\mu}}_{{\bar{K}}}\leq {\tilde{\mu}}$ in Lemma~\ref{lem:9}, we have \begin{equation*} \|\nabla_{{\boldsymbol{x}}}\mathcal{L}^k\| \leq \|\nabla_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\| + \nu\kappa_M\|G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k\| + {\tilde{\mu}} \sqrt{\kappa_{2,G}}\|c_k\| \end{equation*} and \begin{equation*} \|G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k\| \leq \frac{1}{\nu\kappa_{1,G}}\|\nu G_kG_k^TG_k\nabla_{{\boldsymbol{x}}}\mathcal{L}_k\|\stackrel{\eqref{equ:derivative:AL}}{\leq} \frac{1}{\nu\kappa_{1,G}}(\|\nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\| + \|c_k\|). \end{equation*} Combining the above three displays, there exists a constant $C_1$ such that \begin{equation*} \|\nabla\mathcal{L}^k\| \leq C_1\|\nabla\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\| + O\rbr{\frac{1}{\sqrt{k}}}. \end{equation*} Since ${\bar{\alpha}}_k\leq \alpha_{max}$, we have $\lim\limits_{k\rightarrow \infty} {\bar{\alpha}}_k \|\nabla\mathcal{L}^k\|^2\leq C_1^2\lim\limits_{k\rightarrow \infty} {\bar{\alpha}}_k \|\nabla\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\|^2$. It hence suffices to show that any iteration sequence we have $\lim\limits_{k\rightarrow \infty} {\bar{\alpha}}_k \|\nabla\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\|^2 = 0$. By Theorem \ref{thm:5}, we sum the error recursion for $k \geq {\bar{K}}+1$, compute the conditional expectation given the first ${\bar{K}}+1$ iterates, and obtain \begin{align*} \sum_{k = {\bar{K}}+1}^{\infty}\mathbb{E}[{\bar{\alpha}}_k\|\nabla\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\|^2 \mid \mathcal{F}_{{\bar{K}}}] & \leq C_2\sum_{k={\bar{K}}+1}^{\infty}\mathbb{E}[\Phi_{{\bar{\mu}}_{{\bar{K}}}}^k \mid \mathcal{F}_{{\bar{K}}}] -\mathbb{E}[\Phi_{{\bar{\mu}}_{{\bar{K}}}}^{k+1} \mid \mathcal{F}_{{\bar{K}}}]\\ & \leq C_2(\Phi_{{\bar{\mu}}_{{\bar{K}}}}^{{\bar{K}}+1} - \omega\min_{\mathcal{X}\times\Lambda} \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}({\boldsymbol{x}}, {\boldsymbol{\lambda}}))<\infty, \end{align*} where $C_2 = 4\rho/\cbr{(1-p_{grad})(1-p_f)(1-\omega)(\rho-1)}$. Thus, we have \begin{align*} \lim\limits_{k\rightarrow \infty}\mathbb{E}[{\bar{\alpha}}_k \|\nabla\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\|^2 \mid\mathcal{F}_{{\bar{K}}}] = 0. \end{align*} Since ${\bar{\alpha}}_k\leq \alpha_{max}$ and $\{({\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k)\}_k$ are in a compact set $\mathcal{X}\times \Lambda$, we have ${\bar{\alpha}}_k \|\nabla\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\|^2 \leq C_3$ for some constant $C_3$ uniformly. By the dominant convergence theorem, we get $\mathbb{E}[\lim\limits_{k\rightarrow\infty}{\bar{\alpha}}_k \|\nabla\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\|^2 \mid \mathcal{F}_{{\bar{K}}}] = 0$. Since ${\bar{\alpha}}_k \|\nabla\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\|^2$ is non-negative, we further have $\lim\limits_{k\rightarrow\infty}{\bar{\alpha}}_k \|\nabla\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\|^2 = 0$ almost surely, which completes the proof. \subsection{Proof of Theorem \ref{thm:7}}\label{pf:thm:7} We define two random sequences \begin{align*} \phi_k & =\log\rbr{{\bar{\alpha}}_k},\\ \varphi_k & = \min\cbr{\log\rbr{\tau}, {\boldsymbol{1}}_{\mathcal{A}_{k-1}\cap\mathcal{B}_{k-1}}\rbr{\log(\rho) + \varphi_{k-1}} + (1-{\boldsymbol{1}}_{\mathcal{A}_{k-1}\cap\mathcal{B}_{k-1}})(\varphi_{k-1} - \log(\rho)) }, \end{align*} where $\varphi_0 =\log\rbr{{\bar{\alpha}}_0}$. Let $\tau$ be a deterministic constant such that \begin{align*} \tau \leq \frac{(1-\beta)\gamma_{RH}}{2\rbr{\kappa_{\mathcal{L}_{{\tilde{\mu}}, \nu}} \Upsilon_3^2 + \kappa_{grad}\Upsilon_1\Upsilon_3 + \kappa_f\gamma_{RH}}} \wedge \alpha_{max}, \end{align*} and $\tau = \rho^i\alpha_{max}$ for some $i>0$. Therefore, by the stepsize updating rule in Algorithm \ref{alg:ASto:SQP}, we have that for any $k$, ${\bar{\alpha}}_k = \rho^{j_k}\tau$ for some integer $j_k$. We lower bound $\phi_k$ by $\varphi_k$ using induction. First, we observe that $\phi_k$ and $\varphi_k$ are both $\mathcal{F}_{k-1}$-measurable. Note that $\phi_0 = \varphi_0$. Suppose $\phi_k \geq \varphi_k$ and we consider the following three cases: \noindent\textbf{(a).} If $\phi_k > \log(\tau)$, then $\phi_k \geq \log(\tau) + \log(\rho)$. Thus, $\phi_{k+1} \geq \phi_k - \log(\rho) \geq \log(\tau) \geq\varphi_{k+1}$. \noindent\textbf{(b).} If $\phi_k \leq \log(\tau)$ and ${\boldsymbol{1}}_{\mathcal{A}_k\cap\mathcal{B}_k} = 1$, then, by Lemma \ref{lem:8}, \begin{equation*} \phi_{k+1} = \min\cbr{\log(\alpha_{max}), \phi_k + \log(\rho)} \geq \min\{\log(\tau), \varphi_k + \log(\rho)\} = \varphi_{k+1}. \end{equation*} Here the inequality is due to the definition of $\tau$ and the induction hypothesis. \noindent\textbf{(c).} If $\phi_k\leq \log(\tau)$ and ${\boldsymbol{1}}_{\mathcal{A}_k\cap \mathcal{B}_k} = 0$, then \begin{equation*} \phi_{k+1} \geq \phi_k - \log(\rho) \geq \varphi_k - \log(\rho) \geq \varphi_{k+1}. \end{equation*} Thus, $\phi_k\geq \varphi_k$, $\forall k$. Note that $\varphi_k$ is a random walk with a maximum and a drift upward. Thus \begin{equation*} P\rbr{\limsup_{k\rightarrow \infty} \phi_k \geq \log(\tau)} \geq P\rbr{\limsup_{k\rightarrow \infty} \varphi_k \geq \log(\tau)} = 1, \end{equation*} which shows that ``limsup'' of ${\bar{\alpha}}_k$ is lower bounded. Using Theorem \ref{thm:6} we complete the proof. \section{Additional Simulation Results}\label{sec:appen:5} We list detailed results for each selected CUTEst problem. For NonAdapSQP and the $\ell_1$ SQP under each level of noise, we select the smallest KKT residual obtained by either constant or decaying stepsizes. The convergence results are summarized in Tables \ref{tab:1}, \ref{tab:2}, and \ref{tab:3}. In tables, the column of IdC shows if the algorithm converges, and the column of logR shows $\log(\|\nabla \mathcal{L}^k\|)$. For each problem, the first line is the result of AdapSQP, the second line is the result of NonAdapSQP, and the third line is the result of the $\ell_1$ SQP. \input{table} \section*{Acknowledgments} Sen Na would like to thank Nick Gould for helping on the implementation of CUTEst on Julia. This material was completed in part with resources provided by the University of Chicago Research Computing Center. This material was based upon work supported by the U.S. Department of Energy, Office of Science, Office of Advanced Scientific Computing Research (ASCR) under Contract DE-AC02-06CH11347 and by NSF through award CNS-1545046. \section{Introduction}\label{sec:1} We consider the nonlinear equality-constrained stochastic optimization problem \begin{equation}\label{pro:1} \begin{aligned} \min_{{\boldsymbol{x}} \in \mathbb{R}^{d}}\;\; & f({\boldsymbol{x}}) = \mathbb{E}[f({\boldsymbol{x}}; \xi)],\\ \text{s.t. } & c({\boldsymbol{x}}) = {\boldsymbol 0}, \end{aligned} \end{equation} where $f: \mathbb{R}^d\rightarrow \mathbb{R}$ is the objective, $c:\mathbb{R}^d\rightarrow\mathbb{R}^m$ is the constraint, and $\xi\sim {\mathcal P}$ is a random variable with distribution ${\mathcal P}$. In stochastic optimization, the function $f({\boldsymbol{x}})$, the gradient $\nabla f({\boldsymbol{x}})$, and the Hessian $\nabla^2 f({\boldsymbol{x}})$ either cannot be evaluated due to the expectation of $\xi$, or are too expensive to compute, for example, in big data applications in machine learning. Fortunately, one can generate either a single sample $\xi\sim {\mathcal P}$ and let ${\bar{f}}({\boldsymbol{x}}) = f({\boldsymbol{x}}; \xi)$, ${\bar{\nabla}} f({\boldsymbol{x}}) = \nabla f({\boldsymbol{x}}; \xi)$, ${\bar{\nabla}}^2f({\boldsymbol{x}}) = \nabla^2f({\boldsymbol{x}};\xi)$, or a mini-batch samples $\xi_{i_1}, \ldots \xi_{i_B} \stackrel{i.i.d}{\sim}{\mathcal P}$ and let ${\bar{f}}({\boldsymbol{x}}) = \frac{1}{B}\sum_{j=1}^{B}f({\boldsymbol{x}}; \xi_{i_j})$, ${\bar{\nabla}} f({\boldsymbol{x}}) = \frac{1}{B}\sum_{j=1}^{B}\nabla f({\boldsymbol{x}}; \xi_{i_j})$, ${\bar{\nabla}}^2f({\boldsymbol{x}}) = \frac{1}{B}\sum_{j=1}^{B}\nabla^2 f({\boldsymbol{x}}; \xi_{i_j})$ be the corresponding stochastic estimates at ${\boldsymbol{x}}$. Problem \eqref{pro:1} prominently appears in machine learning where the objective takes the form \begin{equation*} f({\boldsymbol{x}}) = \int f({\boldsymbol{x}}; \by, {\boldsymbol{z}})\; d{\mathcal P}(\by, {\boldsymbol{z}}) \end{equation*} with $(\by, {\boldsymbol{z}})$ representing random input-output pairs with joint distribution ${\mathcal P}(\by, {\boldsymbol{z}})$. The loss function $f$ is parameterized by ${\boldsymbol{x}}$, and our goal is to obtain the optimal parameter ${\boldsymbol{x}}^\star$ by minimizing the loss function under nonlinear constraints. In reality, the distribution ${\mathcal P}(\by, {\boldsymbol{z}})$ is unknown and only $n$ data points, $\{\xi_i = (\by_i, {\boldsymbol{z}}_i)\}_{i=1}^n$, from ${\mathcal P}(\by, {\boldsymbol{z}})$ are available. In that case, ${\mathcal P}(\by, {\boldsymbol{z}})$ is approximated by the empirical distribution and the objective can be written as \begin{equation}\label{pro:finite} f({\boldsymbol{x}}) = \frac{1}{n}\sum_{i=1}^{n}f({\boldsymbol{x}}; \xi_i) = \mathbb{E}\sbr{f({\boldsymbol{x}}; \xi)}, \end{equation} where $\xi\sim \text{Uniform}\rbr{\cbr{\xi_i}_{i=1}^n}$ follows uniform distribution over $n$ discrete data points. The above finite-sum loss function is called the empirical risk. For example, the constrained deep neural networks considered in \cite{Chen2018Constraint, Roy2018Geometry, Nandwani2019Primal, Ravi2019Explicitly} are all in the form of \eqref{pro:finite}. Problem \eqref{pro:1} also appears widely in statistics as a way to estimate model parameters that best fit the data. The constraint set encodes prior information or physical constraints on the parameters. In applications of maximum likelihood estimation (MLE) under constraints, $f({\boldsymbol{x}}, \xi)$ is a negative log-likelihood function evaluated at one data point. For example, \cite{Kirkegaard1972POSITRONFIT, Kaufman1978Method, Nagaraj1991Estimation} studied least square problems under nonlinear equality constraints; \cite{Aitchison1958Maximum, Silvey1959Lagrangian, Sen1979Asymptotic, Dupacova1988Asymptotic} studied constrained MLE; and \cite{Shapiro2000asymptotics} studied constrained $M$-estimation. These references established consistency and asymptotic normality for the optimizer ${\boldsymbol{x}}^\star$ of \eqref{pro:1}. See \cite{Prekopa1973Contributions, Wets1983Stochastic, Ermoliev1985Stochastic, Kall2011Stochastic} for more statistical background on the problem. While there is a rich history on statistical properties for constrained estimators, numerical procedures for solving \eqref{pro:1} are less well developed. When constraints are characterized by an abstract set, the projected stochastic first- and second-order methods have been developed \citep{Nemirovski2009Robust, Bertsekas1982Projected}. However, these projection-based methods are not applicable for \eqref{pro:1}, since the projection to the null space of nonlinear equations may not be easily computed. To our knowledge, only recently \cite{Berahas2020Sequential} proposed the very first practical algorithm for \eqref{pro:1}, which is a stochastic sequential quadratic programming (StoSQP) with $\ell_1$ penalized merit function. Our paper is motivated by \cite{Berahas2020Sequential}, but aims at improving three drawbacks: \begin{enumerate}[label=(\alph*),topsep=0pt] \setlength\itemsep{0.0em} \item The stepsize $\bar{\alpha}_k$ in \cite{Berahas2020Sequential} is set by projecting a quantity to an interval. The quantity and the interval boundaries depend on the magnitude of the search direction, the Lipschitz constant of the merit function, and a prespecified deterministic sequence $\{\beta_k\}_k$. Such a complex stepsize selection scheme is designed to drop off the (stochastic) line search procedure without hurting the adaptivity of the algorithm too much. However, the algorithm is still not adaptive as it requires the prespecified sequence $\{\beta_k\}_k$, which can be overestimated or underestimated in controlling ${\bar{\alpha}}_k$ and, therefore, significantly affects the performance of the algorithm. As shown numerically in \cite{Berahas2020Sequential}, the line search procedure is still preferred for most of problems. Furthermore, in the case of deterministic objective, the paper estimated the Lipschitz constant of $f$ by increasing $\kappa_f$ until the condition \begin{equation*} f({\boldsymbol{x}}^k +{\bar{\alpha}}_k\Delta{\boldsymbol{x}}^k) \leq f({\boldsymbol{x}}^k) + {\bar{\alpha}}_k \nabla^T f({\boldsymbol{x}}^k)\Delta{\boldsymbol{x}}^k + \frac{\kappa_f{\bar{\alpha}}_k^2}{2}\|\Delta{\boldsymbol{x}}^k\|^2 \end{equation*} is satisfied. Doing similar estimation on constraint $c$ and getting $\kappa_c$, one can compute the Lipschitz constant of the merit function, which is a combination of $\kappa_f$ and $\kappa_c$. However, checking the above condition requires the objective evaluation, which has to be replaced by stochastic estimates when $f$ is stochastic. In that case, $\kappa_f$ is a random quantity depending on both the random search direction $\Delta{\boldsymbol{x}}^k$ and the random function evaluation. Thus, the analysis in \cite{Berahas2020Sequential}, which treats $\kappa_f$ as a deterministic quantity, is not strictly applicable for stochastic objective. \item The penalty parameter of the merit function in each iteration is adaptively selected in \cite{Berahas2020Sequential}, which can be viewed as a random walk. The authors showed that the random walk is always stabilized after a number of iterations. However, this result is not enough for StoSQP. It is known in SQP literature that there exists a deterministic threshold of the penalty parameter, such that SQP iterates indeed converge to a stationary point of the Lagrangian instead of the merit function only if the stabilized penalty value is less (or greater depending on the definition) than that threshold. In StoSQP, the stabilized value itself is also random and different in each run. To this end, the authors simply assumed the random stabilized value is always less than the deterministic threshold, and verified such presumption under additional assumptions (see Proposition 33 in \cite{Berahas2020Sequential}). \item When the objective is deterministic, it is widely observed that SQP with the $\ell_1$ penalized merit function has the Maratos effect \citep{Maratos1978Exact}, which results in a slow local convergence rate. Furthermore, the iteration scheme is designed for the primal variable only and does not provide the optimal dual variable. \end{enumerate} The above three drawbacks motivate us to design an adaptive StoSQP allowing the line search. We deal with the drawback (c) by adopting a differentiable exact augmented Lagrangian as the merit function. The iteration scheme selects the stepsize for the primal-dual pair. While the differentiability of the penalty can effectively overcome the Maratos effect for deterministic objectives, the local benefits for stochastic objectives are still an open problem. We deal with the drawback (a) by generalizing the stochastic line search method in \cite{Paquette2020Stochastic} to constrained problems. The generalization is non-trivial since, due to the constraints, we have to use the merit function with varying penalty parameters in the Armijo condition, while \cite{Paquette2020Stochastic} used the fixed objective function. Furthermore, when the search direction is not the gradient of the objective, previous analysis imposed additional assumptions on the direction (see Assumption 4.18 in \cite{Paquette2020Stochastic}). Our paper removes such assumptions. Finally, we deal with the drawback (b) by modifying SQP scheme when selecting the penalty parameters. Our StoSQP requires a different condition on the penalty parameters, under which the stability property of the parameters is preserved, and the iterates are ensured to converge to a stationary point of the Lagrangian. We establish the global convergence of the proposed StoSQP, and show that $\liminf_{k\rightarrow \infty}\|\nabla\mathcal{L}({\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k)\| = 0$ \textit{almost surely}, where $\mathcal{L}(\cdot, \cdot)$ is the Lagrange function. This result is stronger than \cite{Berahas2020Sequential}, which shows $\liminf_{k\rightarrow \infty}\mathbb{E}[\|\nabla\mathcal{L}({\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k)\|] =0$. \subsection{Literature review} Problem \eqref{pro:1} is closely related to two problems classes: constrained deterministic optimization and unconstrained stochastic optimization, both of which have been extensively investigated. We review related literature. \vskip5pt \noindent\textbf{Relationship to constrained deterministic optimization:} The primary approach to solve the constrained deterministic problems is the penalty method \citep{Courant1943Variational, GOULD1986Accurate}. The penalty method interprets the constraints as a penalty of the objective and solves the resulting unconstrained problem. The new objective takes the form \begin{equation*} Q_\mu({\boldsymbol{x}}) = f({\boldsymbol{x}}) + \mu P(c({\boldsymbol{x}})), \end{equation*} where $\mu$ is the penalty parameter and $P(\cdot)$ is the penalty function. The iterate sequence is given by ${\boldsymbol{x}}^k = \argmin_{{\boldsymbol{x}}}Q_{\mu_k}({\boldsymbol{x}})$ with $\mu_k\rightarrow \infty$ monotonically. The simplest penalty is the quadratic, $P(\cdot) = \|\cdot\|_2^2$, however, it results in ill-conditioning issues when $\mu$ is large. In a different class, $P(\cdot) = \|\cdot\|_p$ with $1\leq p\leq \infty$. Such penalty functions have a critical property: there exists a threshold ${\hat{\mu}}$ such that, for any $\mu\geq {\hat{\mu}}$, the minimizers of $Q_\mu({\boldsymbol{x}})$ are also the solutions of the original constrained problem. A penalty function with such a property is called an exact penalty function. Similarly, the exact augmented Lagrangian taking the form \begin{equation*} A_\mu({\boldsymbol{x}}, {\boldsymbol{\lambda}}) = \mathcal{L}({\boldsymbol{x}}, {\boldsymbol{\lambda}}) + \mu V({\boldsymbol{x}}, {\boldsymbol{\lambda}}) = f({\boldsymbol{x}}) + {\boldsymbol{\lambda}}^Tc({\boldsymbol{x}}) + \mu V({\boldsymbol{x}}, {\boldsymbol{\lambda}}) \end{equation*} is the exact penalty function defined on the primal-dual space. Here $V(\cdot, \cdot)$ is a penalty on ${\boldsymbol{x}}$ and ${\boldsymbol{\lambda}}$. Minimizing an exact augmented Lagrangian gives us the optimal primal-dual pair, while minimizing an exact penalty function gives us only the optimal primal variable. The penalty methods based on exact penalties, so called exact penalty methods, do not suffer from the ill-conditioning issues, since $\mu$ needs not tend to infinity. However, the nonsmoothness in most of exact penalties brings new challenges for solving subproblems. The augmented Lagrangian method \citep{Hestenes1969Multiplier, Powell1969method} is related but a different kind of method, where the quadratic penalty $V({\boldsymbol{x}}, {\boldsymbol{\lambda}}) = \frac{1}{2}\|c({\boldsymbol{x}})\|^2$ is used. We emphasize that $A_{\mu}({\boldsymbol{x}}, {\boldsymbol{\lambda}})$ with such $V({\boldsymbol{x}}, {\boldsymbol{\lambda}})$ is not an \textit{exact} augmented Lagrangian, so that the iteration $({\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k) = \argmin_{{\boldsymbol{x}}, {\boldsymbol{\lambda}}}A_{\mu_k}({\boldsymbol{x}}, {\boldsymbol{\lambda}})$ of the penalty method requires $\mu_k\rightarrow \infty$. Differently, the augmented Lagrangian method updates the dual variable independently. The resulting scheme is: ${\boldsymbol{x}}^k = \argmin_{{\boldsymbol{x}}}A_{\mu_k}({\boldsymbol{x}}, {\boldsymbol{\lambda}}^k)$, ${\boldsymbol{\lambda}}^{k+1} = {\boldsymbol{\lambda}}^k + \mu_k c({\boldsymbol{x}}^k)$, with monotonically increasing $\{\mu_k\}_k$. Importantly, the convergence of this method can be assured without increasing $\mu_k$ indefinitely. However, there are two disadvantages. First, the performance of the algorithm depends crucially on a good initialization of $\mu_0$ and ${\boldsymbol{\lambda}}^0$. Second, the sparsity structure of the objective may be affected by the penalty term $\|c({\boldsymbol{x}})\|^2$. Sequential quadratic programming (SQP) is developed to overcome the above limitations of the augmented Lagrangian method \citep{Wilson1963simplicial, Palomares1976Superlinearly, Han1976Superlinearly, Powell1978fast}. SQP applies the Newton's method on KKT equations of \eqref{pro:1}, with Hessian modification and line search to ensure global convergence. The function used in a line search condition is called the merit function. SQP uses an exact penalty/augmented Lagrangian function as well, however, only as a merit function. Thus, a big advantage of SQP is that it computes the search direction without the penalty, so that the penalty parameter only affects the stepsize, but not the direction. This resolves the ill-conditioning issue and preserves the structure of the objective. See \cite{Boggs1995Sequential, Boggs2000Sequential, Gill2005SNOPT, Gill2011Sequential} and references therein for a brief review of~SQP. In this paper, we generalize SQP to StoSQP for solving constrained stochastic optimization. \cite{Berahas2020Sequential} designed a StoSQP using the exact penalty function $Q_{\mu}({\boldsymbol{x}})$ with $P(c({\boldsymbol{x}})) = \|c({\boldsymbol{x}})\|_1$ as the merit function. We instead use the exact augmented Lagrangian $A_{\mu}({\boldsymbol{x}}, {\boldsymbol{\lambda}})$ with $V({\boldsymbol{x}}, {\boldsymbol{\lambda}}) = \|c({\boldsymbol{x}})\|_2^2 + \nu/\mu\cdot\|\nabla^Tc({\boldsymbol{x}})\nabla_{{\boldsymbol{x}}}\mathcal{L}({\boldsymbol{x}}, {\boldsymbol{\lambda}})\|_2^2$ as the merit function. The exactness of such an augmented Lagrangian has been studied in \cite{Pillo1979New, Pillo1980method}. \cite{Lucidi1990Recursive} employed it in a SQP framework for deterministic problems, which we will revisit and modify in Section \ref{sec:2}. The modified algorithm serves as the skeleton of our StoSQP designed in Sections \ref{sec:3} and \ref{sec:4}. For completeness, the convergence of the modified SQP is established as well. \vskip5pt \noindent\textbf{Relationship to unconstrained stochastic optimization:} The stochastic gradient descent (SGD) \citep{Robbins1951stochastic} is the dominant method for solving unconstrained stochastic problems. Numerous variants have been proposed to improve the convergence of SGD \citep{Roux2012stochastic, ShalevShwartz2013Stochastic, Johnson2013Accelerating, Defazio2014SAGA}. In addition to the first-order methods, the second-order stochastic methods, to which our paper is more related, have also received much attention. These methods start from the Newton equation and replace the Hessian and the gradient by their stochastic counterparts. One may have Hessian sketching \citep{Pilanci2016Iterative, Luo2016Efficient, Wang2017Sketched} and Hessian subsampling \citep{Drineas2010Faster, Erdogdu2015Convergence, Bollapragada2018Exact, RoostaKhorasani2018Sub} approaches. We refer to \cite{Bottou2018Optimization, Berahas2020investigation} for a recent review of these methods. The limitation of the aforementioned methods is that the stepsize, which has a large effect on the convergence, has to be tuned manually in practice. A growing body of literature has focused on developing methods for adaptive stepsize selection \citep{Duchi2011Adaptive, Zeiler2012Adadelta, Tieleman2012Lecture, Kingma2015Adam, Dauphin2015Equilibrated, Li2019Convergence, Ward2019AdaGrad, Liu2020variance}. While these methods have been empirically beneficial for training deep neural networks, their theoretical underpinnings are not well understood. Another line of work generalizes the line search for gradient descent to stochastic line search by dynamically controlling the sample size for computing the gradient estimates \citep{Friedlander2012Hybrid, Byrd2012Sample, Krejic2013Line, De2017Automated, Bollapragada2018Adaptive}. Unfortunately, most of the papers study convex problems, do not provide convergence guarantees for the line search, and use sample size selection strategies that depend on unknown quantities such as the true gradient. \cite{RoostaKhorasani2018Sub} studied subsampled Newton method for convex objectives with line search. However, their convergence argument is the progress of the error at each iteration in probability, instead of the progress of the expected error, and their sample size is simply assumed large enough, so that the iteration performs like a deterministic Newton's method. Practical stochastic line search methods with convergence theories have been developed only recently. \cite{Vaswani2019Painless} studied SGD with line search for convex and nonconvex finite-sum problems as in \eqref{pro:finite}. They proved convergence in the case when the optimizer ${\boldsymbol{x}}^\star$ interpolates the data, that is $\nabla f({\boldsymbol{x}}^\star, \xi_i) = 0, \forall i$. The interpolation condition may hold in over-parameterized problems in machine learning \citep{Oymak2020Moderate}, however, it does not hold for general stochastic problems. \cite{Bandeira2014Convergence, Chen2017Stochastic, Gratton2017Complexity, Blanchet2019Convergence} studied convergence of stochastic trust-region methods, where the stepsizes are absorbed in stochastic local quadratic models. \cite{Cartis2017Global} established the expected iteration complexity of stochastic line search for nonconvex objectives, while requiring the function evaluations to be computed exactly. \cite{Serafino2020LSOS} allowed for stochastic function evaluations, but only proved the convergence results for strongly convex objectives. Finally, \cite{Paquette2020Stochastic} generalized the analysis in \cite{Cartis2017Global} and \cite{Serafino2020LSOS} by applying the framework of martingales in \cite{Blanchet2019Convergence}, and obtained convergence guarantees for stochastic line search with convex and nonconvex objectives. Our paper generalizes the results in \cite{Paquette2020Stochastic} to constrained optimization. As discussed earlier, the generalization is not readily available since the search direction in SQP is not the gradient of the merit function and, furthermore, the merit function has varying stochastic penalty parameters. In addition, in unconstrained problems, if one observes a sufficient decrease of the objective in each iteration, then one can claim that the iterates converge to a stationary point (or a minimizer if the objective is convex). However, in constrained problems, if one observes a sufficient decrease of the merit function in each iteration, then one can \textit{only} claim that the iterates converge to a stationary point of the merit function. Only if the merit function has the exact penalty property and the penalty parameter is greater than a threshold, can one claim the iterates indeed converge to a KKT point. In stochastic optimization, the problem is even more challenging: one has to show that the stabilized penalty parameter, a random quantity, is greater than the deterministic threshold to ensure convergence. \cite{Berahas2020Sequential} showed this result under stringent assumptions on the noise, while we modify SQP directly and derive the result for free. \subsection{Structure of the paper} We revisit an old, deterministic SQP proposed by \cite{Lucidi1990Recursive} in Section \ref{sec:2}. We modify that SQP and establish the convergence of the modified SQP. Then, we design a non-adaptive StoSQP in Section \ref{sec:3}, by replacing the Hessian and the gradient in SQP with their stochastic counterparts, and using a prespecified stepsize sequence. The convergence for both constant stepsize and decaying stepsize is established. Finally, we design an adaptive StoSQP in Section \ref{sec:4}, by selecting the stepsize via stochastic line search. The convergence is established as well. The numerical experiments and conclusions are presented in Section \ref{sec:5} and Section \ref{sec:6}, respectively. \vskip 5pt \noindent\textbf{Notations:} We use $\|\cdot\|$ to denote the $\ell_2$ norm for vectors and the operator norm for matrices. $I$ denotes the identity matrix and ${\boldsymbol 0}$ denotes the zero matrix/vector, whose dimensions are clear from the context. For a function $c:\mathbb{R}^d\rightarrow\mathbb{R}^m$, we let $\nabla c \in \mathbb{R}^{d\times m}$ be its Jacobian matrix. For two scalars $a$ and $b$, $a\vee b = \max(a, b)$ and $a\wedge b = \min(a, b)$. For random variables $\xi_1$, $\xi_2$, we denote $\mathbb{E}_{\xi_1}[g(\xi_1, \xi_2)] = \mathbb{E}[g(\xi_1, \xi_2)\mid \xi_2]$ to be the conditional expectation, that is, the expectation taken over randomness in $\xi_1$ only. \section{SQP with Differentiable Exact Augmented Lagrangian}\label{sec:2} In this section, we assume $f$ is deterministic and revisit the SQP in \cite{Lucidi1990Recursive}. We simplify that algorithm and modify the penalty parameter selection step. The global convergence of the new algorithm is established, {\color{black} and the superlinear local convergence is provided in Appendix \ref{sec:appen:2} as well.} Let $\mathcal{L}({\boldsymbol{x}}, {\boldsymbol{\lambda}}) = f({\boldsymbol{x}}) + {\boldsymbol{\lambda}}^Tc({\boldsymbol{x}})$ be the Lagrangian function of \eqref{pro:1}. Solving \eqref{pro:1} is equivalent to finding a primal-dual pair $({\boldsymbol{x}}^\star, {\boldsymbol{\lambda}}^\star)$ such that \begin{equation}\label{equ:KKT} \begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}({\boldsymbol{x}}^\star, {\boldsymbol{\lambda}}^\star)\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}({\boldsymbol{x}}^\star, {\boldsymbol{\lambda}}^\star) \end{pmatrix} = \begin{pmatrix} \nabla f({\boldsymbol{x}}^\star) + G^T({\boldsymbol{x}}^\star){\boldsymbol{\lambda}}^\star\\ c({\boldsymbol{x}}^\star) \end{pmatrix} = \begin{pmatrix} {\boldsymbol 0}\\ {\boldsymbol 0} \end{pmatrix}, \end{equation} where $G({\boldsymbol{x}}) = \nabla^T c({\boldsymbol{x}}) = (\nabla c_1({\boldsymbol{x}}), \ldots, \nabla c_m({\boldsymbol{x}}))^T \in \mathbb{R}^{m\times d}$ is the Jacobian matrix. A point satisfying \eqref{equ:KKT} is called a KKT point. The differentiable exact augmented Lagrangian considered in this paper takes the form \begin{equation}\label{equ:augmented:L} \mathcal{L}_{\mu, \nu}({\boldsymbol{x}}, {\boldsymbol{\lambda}}) = \mathcal{L}({\boldsymbol{x}}, {\boldsymbol{\lambda}}) + \frac{\mu}{2}\|c({\boldsymbol{x}})\|^2 + \frac{\nu}{2}\|G({\boldsymbol{x}})\nabla_{{\boldsymbol{x}}}\mathcal{L}({\boldsymbol{x}}, {\boldsymbol{\lambda}})\|^2. \end{equation} The first penalty characterizes the feasibility error, which can be viewed as a quadratic penalty on $\nabla_{{\boldsymbol{\lambda}}}\mathcal{L}({\boldsymbol{x}}, {\boldsymbol{\lambda}})$. The second penalty characterizes the optimality error, where $\nabla_{{\boldsymbol{x}}}\mathcal{L}({\boldsymbol{x}}, {\boldsymbol{\lambda}})$ is transformed by the Jacobian $G({\boldsymbol{x}})$. Even without the transformation the function \eqref{equ:augmented:L} is still an exact augmented Lagrangian, provided $\mu$ is sufficiently large and $\nu$ is sufficiently small \citep{Bertsekas1982Constrained, Zavala2014Scalable}. However, with $G({\boldsymbol{x}})$ the exact property holds for any $\nu>0$ and, as a result, we only have a single penalty parameter $\mu$ to select. The gradient of $\mathcal{L}_{\mu, \nu}({\boldsymbol{x}}, {\boldsymbol{\lambda}})$ is \begin{align}\label{equ:derivative:AL} \begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{\mu, \nu}({\boldsymbol{x}}, {\boldsymbol{\lambda}})\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{\mu, \nu}({\boldsymbol{x}}, {\boldsymbol{\lambda}}) \end{pmatrix} = & \begin{pmatrix} \rbr{I + \nu M({\boldsymbol{x}}, {\boldsymbol{\lambda}})G({\boldsymbol{x}})}\nabla_{{\boldsymbol{x}}}\mathcal{L}({\boldsymbol{x}}, {\boldsymbol{\lambda}}) + \mu G^T({\boldsymbol{x}})c({\boldsymbol{x}})\\ c({\boldsymbol{x}}) + \nu G({\boldsymbol{x}})G^T({\boldsymbol{x}})G({\boldsymbol{x}})\nabla_{{\boldsymbol{x}}}\mathcal{L}({\boldsymbol{x}}, {\boldsymbol{\lambda}}) \end{pmatrix} \nonumber\\ = & \begin{pmatrix} I + \nu M({\boldsymbol{x}}, {\boldsymbol{\lambda}})G({\boldsymbol{x}}) & \mu G^T({\boldsymbol{x}})\\ \nu G({\boldsymbol{x}})G^T({\boldsymbol{x}})G({\boldsymbol{x}}) & I \end{pmatrix}\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}({\boldsymbol{x}}, {\boldsymbol{\lambda}})\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}({\boldsymbol{x}}, {\boldsymbol{\lambda}}) \end{pmatrix} \end{align} where \begin{equation*} \begin{aligned} M({\boldsymbol{x}}, {\boldsymbol{\lambda}}) = & \nabla_{{\boldsymbol{x}}}^2\mathcal{L}({\boldsymbol{x}}, {\boldsymbol{\lambda}})G^T({\boldsymbol{x}}) + T({\boldsymbol{x}}, {\boldsymbol{\lambda}}) \in \mathbb{R}^{d\times m},\\ T({\boldsymbol{x}},{\boldsymbol{\lambda}}) =& \begin{pmatrix} \nabla^2c_1({\boldsymbol{x}})\nabla_{{\boldsymbol{x}}}\mathcal{L}({\boldsymbol{x}}, {\boldsymbol{\lambda}}) & \cdots & \nabla^2c_m({\boldsymbol{x}})\nabla_{{\boldsymbol{x}}}\mathcal{L}({\boldsymbol{x}}, {\boldsymbol{\lambda}}) \end{pmatrix}. \end{aligned} \end{equation*} We now present a SQP scheme. Given a pair $({\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k)$ at the $k$-th iteration, we denote $f_k = f({\boldsymbol{x}}^k)$, $\nabla f_k = \nabla f({\boldsymbol{x}}^k)$, $G_k = G({\boldsymbol{x}}^k)$, $M_k = M({\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k)$, $c_k = c({\boldsymbol{x}}^k)$, $\nabla_{{\boldsymbol{x}}}\mathcal{L}^k = \nabla_{{\boldsymbol{x}}}\mathcal{L}({\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k)$, $\mathcal{L}_{\mu, \nu}^k = \mathcal{L}_{\mu, \nu}({\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k)$, $\nabla_{{\boldsymbol{x}}}\mathcal{L}_{\mu, \nu}^k = \nabla_{{\boldsymbol{x}}}\mathcal{L}_{\mu, \nu}({\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k)$, and $\nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{\mu, \nu}^k = \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{\mu, \nu}({\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k)$. We then compute the search direction $(\Delta{\boldsymbol{x}}^k, \Delta{\boldsymbol{\lambda}}^k)$ by solving \begin{equation}\label{equ:Newton:AL} \begin{aligned} \begin{pmatrix} B_k & G_k^T\\ G_k & {\boldsymbol 0} \end{pmatrix} \begin{pmatrix} \Delta{\boldsymbol{x}}^k\\ \hat{\Delta}{\boldsymbol{\lambda}}^k \end{pmatrix}& =-\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}^k\\ c_k \end{pmatrix},\\ G_kG_k^T\Delta{\boldsymbol{\lambda}}^k & = - (G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k + M^T_k\Delta{\boldsymbol{x}}^k), \end{aligned} \end{equation} where $B_k$ is the Lagrangian Hessian $\nabla_{{\boldsymbol{x}}}^2\mathcal{L}^k$ or its perturbation. The next iterate is then \begin{equation}\label{equ:update} \begin{pmatrix} {\boldsymbol{x}}^{k+1}\\ {\boldsymbol{\lambda}}^{k+1} \end{pmatrix} = \begin{pmatrix} {\boldsymbol{x}}^k\\ {\boldsymbol{\lambda}}^k \end{pmatrix} + \alpha_k\begin{pmatrix} \Delta{\boldsymbol{x}}^k\\ \Delta{\boldsymbol{\lambda}}^k \end{pmatrix}, \end{equation} where the stepsize $\alpha_k$ is chosen to make the Armijo condition hold \begin{equation}\label{equ:Armijo} \quad \mathcal{L}_{\mu, \nu}^{k+1} \leq \mathcal{L}_{\mu, \nu}^k + \alpha_k\beta\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{\mu, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{\mu, \nu}^k \end{pmatrix}^T \begin{pmatrix} \Delta{\boldsymbol{x}}^k\\ \Delta{\boldsymbol{\lambda}}^k \end{pmatrix} \end{equation} for a prespecified $\beta\in(0, 0.5)$. We emphasize that the dual direction in our algorithm is $\Delta{\boldsymbol{\lambda}}^k$, not ${\hat{\Delta}}{\boldsymbol{\lambda}}^k$ like in most of SQP schemes. ${\hat{\Delta}}{\boldsymbol{\lambda}}^k$ is a fake dual direction and not involved in the algorithm, due to some technical concerns for using \eqref{equ:augmented:L} as the merit function \citep{Lucidi1990Recursive}. Compared with the SQP in \cite{Berahas2020Sequential} that uses the $\ell_1$ penalized merit function, \eqref{equ:update} updates primal and dual variables together, so that the convergence of dual variable is obtained incidentally. The downside of the above iteration scheme is that the penalty parameter $\mu$ is fixed. To ensure the convergence, $\mu$ needs to be large enough so that the square matrix in \eqref{equ:derivative:AL} is invertible. Then $\|\nabla\mathcal{L}_{\mu, \nu}^k\|\rightarrow 0$ implies $\|\nabla\mathcal{L}^k\|\rightarrow 0$. The threshold depends on multiple unknown quantities of the problem, which is hard to tune manually. Thus, we propose an adaptive SQP in Algorithm~\ref{alg:SQP} to resolve this issue. The adaptivity is achieved by the While loop in Line 4. In the While loop, we iteratively check if the projection of the search direction $(\Delta{\boldsymbol{x}}^k, \Delta{\boldsymbol{\lambda}}^k)$ on the gradient $\nabla \mathcal{L}_{\mu_k, \nu}^k$ is upper bounded by $-\delta_k\rbr{\|\Delta{\boldsymbol{x}}^k\|^2 + \|G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k\|^2}$. If not, we increase $\mu_k$ and decrease $\delta_k$ until the condition is satisfied. We show later that the While loop condition will be satisfied if $\mu_k$ is large enough and $\delta_k$ is small enough. Moreover, $\mu_k$ and $\delta_k$ are stabilized after a number of iterations. The other penalty parameter $\nu$ is fixed during the iteration. \begin{algorithm}[!tp] \caption{SQP with Differentiable Exact Augmented Lagrangian} \label{alg:SQP} \begin{algorithmic}[1] \State \textbf{Input:} initial iterate $({\boldsymbol{x}}^0, {\boldsymbol{\lambda}}^0)$, scalars $\nu>0$, $\mu_0>0$, $\delta_0>0$, $\rho>1$, $\beta\in(0, 0.5)$; \For{$k = 0,1,2\ldots$} \State Compute $(\Delta{\boldsymbol{x}}^k, \Delta{\boldsymbol{\lambda}}^k)$ by \eqref{equ:Newton:AL}; \While{$\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{\mu_k, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{\mu_k, \nu}^k \end{pmatrix}^T \begin{pmatrix} \Delta{\boldsymbol{x}}^k\\ \Delta{\boldsymbol{\lambda}}^k \end{pmatrix} > -\delta_k \nbr{\begin{pmatrix} \Delta {\boldsymbol{x}}^k\\ G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}}^2$} \State Let $\mu_k = \rho \mu_k$, $\delta_k = \delta_k/\rho$; \EndWhile \State Select $\alpha_k$ to satisfy the Armijo condition in \eqref{equ:Armijo} with parameters $\mu_k$, $\nu$, and $\beta$; \State Update iterates by \eqref{equ:update}; \State Let $\mu_{k+1} = \mu_k$, $\delta_{k+1} = \delta_k$; \EndFor \end{algorithmic} \end{algorithm} \vskip 5pt \noindent\textbf{Differences to \cite{Lucidi1990Recursive}:} Algorithm \ref{alg:SQP} is similar to the SQP in \cite{Lucidi1990Recursive} but adopts two modifications. First, \cite{Lucidi1990Recursive} applied finite differences to approximate $M_k = \nabla_{{\boldsymbol{x}}}\rbr{G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k}$ in \eqref{equ:Newton:AL}, while we assume that the second-order matrices are computable to simplify the presentation. This allows us to compute the Lagrangian Hessian $\nabla_{{\boldsymbol{x}}}^2\mathcal{L}$, the constraint Hessian $\nabla^2c_i$, $\forall i$, and hence $M_k$. Second, \cite{Lucidi1990Recursive} used a more complex While loop to select $\mu_k$, but their While loop can only ensure that the projection is upper bounded by $-\delta_k(\|c_k\|^2 + \|G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k\|^2)$. This upper bound is not sufficient in our analysis, and we replace $\|c_k\|^2$ by $\|\Delta{\boldsymbol{x}}^k\|^2$. In the rest of this section, we study the global convergence of Algorithm \ref{alg:SQP}. {\color{black} The local convergence is established in Appendix \ref{sec:appen:2}.} We begin by stating several assumptions. \begin{assumption}[Bounded iterates]\label{ass:D:bound} We assume the iteration sequence $\{({\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k)\}_k$ generated by Algorithm \ref{alg:SQP} lies in a convex compact set $\mathcal{X} \times \Lambda$. \end{assumption} \begin{assumption}[Linear independence constraint qualification (LICQ) and Hessian perturbation]\label{ass:D:LICQ} We assume $f$ and $c$ are trice continuously differentiable in $\mathcal{X}$, and $G({\boldsymbol{x}})$ has full row rank for any ${\boldsymbol{x}}\in\mathcal{X}$. Moreover, there exist constants $\gamma_{RH}, \kappa_B>0$ such that, for any iteration $k$, $B_k$ satisfies ${\boldsymbol{x}}^TB_k{\boldsymbol{x}}\geq \gamma_{RH} \|{\boldsymbol{x}}\|^2$ for any ${\boldsymbol{x}}\in \{{\boldsymbol{x}}: G_k{\boldsymbol{x}} = {\boldsymbol 0}, {\boldsymbol{x}}\neq {\boldsymbol 0}\}$, and $\|B_k\|\leq \kappa_B$. \end{assumption} Both assumptions are standard in SQP literature \citep{Bertsekas1982Constrained, Nocedal2006Numerical}. In fact, only the boundedness of ${\boldsymbol{x}}^k$ is required, while the boundedness of ${\boldsymbol{\lambda}}^k$ can be proved in the same way as in Proposition 4.5 of \cite{Lucidi1990Recursive}. For simplicity, we assume the boundedness on the primal-dual pairs. We should mention that we assume the existence of the third derivatives of $f$ and $c$. This is standard for using the augmented Lagrangian merit function \citep{Zavala2014Scalable}, noting that the Hessian $\nabla^2\mathcal{L}_{\mu, \nu}$ needs the third derivatives. Fortunately, the third derivatives are required only for analysis, and never computed in the implementation. An immediate observation is that, by Assumptions \ref{ass:D:bound} and \ref{ass:D:LICQ}, there exist multiple constants $\kappa_{1,G}, \kappa_{2,G}$, $\kappa_M$, $ \kappa_{\nabla_{{\boldsymbol{x}}}\mathcal{L}}$, $\kappa_{\nabla_{{\boldsymbol{x}}}^2c}$, $\kappa_\nu$, and $\kappa_{\mathcal{L}_{\mu, \nu}}$ such that \begin{equation}\label{Prop:1} \begin{aligned} &\kappa_{1,G}\cdot I \preceq G_kG_k^T \preceq \kappa_{2,G}\cdot I, \quad \|M_k\|\leq \kappa_M, \quad \|\nabla_{{\boldsymbol{x}}}\mathcal{L}^k\|\leq \kappa_{\nabla_{{\boldsymbol{x}}}\mathcal{L}}, \quad (\sum_{i=1}^m\|\nabla^2c_i({\boldsymbol{x}}^k)\|^2)^{\frac{1}{2}}\leq \kappa_{\nabla_{{\boldsymbol{x}}}^2c}, \\ &\sup_{\mathcal{X}\times\Lambda}\nbr{\nabla^2\mathcal{L}_{\mu, \nu}\rbr{{\boldsymbol{x}}, {\boldsymbol{\lambda}}}} \leq \kappa_{\mathcal{L}_{\mu, \nu}} = \mu \cdot \sup_{\mathcal{X}}\nbr{\nabla\rbr{ G^T({\boldsymbol{x}})c({\boldsymbol{x}})}}+ \kappa_\nu. \end{aligned} \end{equation} Here, $\kappa_{\mathcal{L}_{\mu, \nu}}$ is the uniform bound of the Hessian $\nabla^2\mathcal{L}_{\mu, \nu}$ in $\mathcal{X}\times \Lambda$. By the definition of $\mathcal{L}_{\mu, \nu}$ in \eqref{equ:augmented:L}, it is proportional to $\mu$. The following lemma simplifies the projection of the search direction $(\Delta{\boldsymbol{x}}^k, \Delta{\boldsymbol{\lambda}}^k)$ on the gradient $\nabla\mathcal{L}_{\mu_k, \nu}^k$. \begin{lemma}\label{lem:1} Suppose $(\Delta{\boldsymbol{x}}^k, \Delta{\boldsymbol{\lambda}}^k)$ is obtained by solving \eqref{equ:Newton:AL}. Then for any $\mu_k, \nu$, \begin{equation*} \begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{\mu_k, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{\mu_k, \nu}^k \end{pmatrix}^T \begin{pmatrix} \Delta{\boldsymbol{x}}^k\\ \Delta{\boldsymbol{\lambda}}^k \end{pmatrix} = - (\Delta{\boldsymbol{x}}^k)^TB_k\Delta{\boldsymbol{x}}^k +c_k^T\rbr{\Delta{\boldsymbol{\lambda}}^k + {\hat{\Delta}}{\boldsymbol{\lambda}}^k} - \mu_k\|c_k\|^2 - \nu\|G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k\|^2. \end{equation*} \end{lemma} \begin{proof} See Appendix \ref{pf:lem:1}. \end{proof} We then show Algorithm \ref{alg:SQP} is well-posed, that is every step in Algorithm \ref{alg:SQP} can be conducted. In particular, \eqref{equ:Newton:AL} in Line 3 can be solved, the While loop in Line 4 will stop in finite time, and $\alpha_k$ in Line 7 can be selected in each iteration. In the following presentation, we let $\mu_k, \delta_k$ denote the value obtained after the While loop, that is the initial value of the $(k+1)$-th iteration. \begin{theorem}[Well-posedness of Algorithm \ref{alg:SQP}]\label{thm:1} Under Assumptions \ref{ass:D:bound} and \ref{ass:D:LICQ}, Algorithm \ref{alg:SQP} is well-posed, and there exist $K, {\hat{\mu}}, {\hat{\delta}} >0$ such that $\mu_k = {\hat{\mu}}$ and $\delta_k = {\hat{\delta}}$, for all $k\geq K$. \end{theorem} \begin{proof} See Appendix \ref{pf:thm:1}. \end{proof} An immediate consequence is that the stepsize $\alpha_k$ is uniformly lower bounded away from zero. \begin{lemma}\label{lem:2} Consider Algorithm \ref{alg:SQP} under Assumptions \ref{ass:D:bound} and \ref{ass:D:LICQ}. There exists a constant ${\hat{\alpha}}>0$ such that $\alpha_k \geq {\hat{\alpha}}$, $\forall k\geq K$, where $K$ is from Theorem \ref{thm:1}. \end{lemma} \begin{proof} See Appendix \ref{pf:lem:2}. \end{proof} The following theorem establishes the global convergence. \begin{theorem}[Global convergence of Algorithm \ref{alg:SQP}]\label{thm:3} Consider Algorithm \ref{alg:SQP} under Assumptions \ref{ass:D:bound} and \ref{ass:D:LICQ}. For any initial iterates $({\boldsymbol{x}}^0, {\boldsymbol{\lambda}}^0)$, we have \begin{align*} \|\nabla\mathcal{L}^k\| = \nbr{\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}^k \end{pmatrix}} = \nbr{\begin{pmatrix} \nabla f_k+G_k^T{\boldsymbol{\lambda}}^k\\ c_k \end{pmatrix}}\rightarrow 0, \quad \text{ as } k\rightarrow \infty. \end{align*} That is, any limiting point of $\{({\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k)\}_k$ is a stationary point of Problem~\eqref{pro:1}. \end{theorem} \begin{proof} See Appendix \ref{pf:thm:3}. \end{proof} The lower bound on $\alpha_k$ plays a key role in showing the global convergence. {\color{black} We show in Appendix \ref{sec:appen:2} that, under some extra conditions, $\alpha_k = 1$ for sufficiently large $k$, which is another critical result that allows us to establish local superlinear convergence rate.} However, when the objective is stochastic, we will see in Section \ref{sec:3} that a constant stepsize does not ensure convergence and, more importantly, the algorithm may even diverge if the constant stepsize is too large. Algorithm \ref{alg:SQP} is a framework that shows how to design an adaptive SQP using differentiable exact augmented Lagrangian as the merit function. The SQP scheme on which the StoSQP in \cite{Berahas2020Sequential} is based uses the $\ell_1$ penalized merit function. That SQP uses a While loop to estimate the Lipschitz constant of the merit function, while we use the While loop to select the penalty parameter. It is known that nonsmooth merit functions cause Maratos effect and result in slow local convergence rate. Fortunately, Algorithm \ref{alg:SQP} has no such trouble, although local benefits of differentiable merit functions on stochastic objectives are still an open problem. \section{A Non-Adaptive Stochastic SQP}\label{sec:3} Starting from this section, we suppose $f$ is stochastic, and its function value, gradient, and Hessian cannot be evaluated. Instead, we suppose to have access to their estimates ${\bar{f}}$, ${\bar{g}}$, and ${\bar{H}}$. In what follows, we use $\bar{(\cdot)}$ to denote random quantities, except for the iterates $({\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k)$. Let $\xi^k_g, \xi^k_H$ be two independent realizations of the random variable $\xi$, and denote \begin{align}\label{def:MT} {\bar{g}}_k = & \nabla f({\boldsymbol{x}}^k; \xi^k_g), \hskip1.2cm {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k = {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}({\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k; \xi^k_g) = {\bar{g}}_k + G^T_k{\boldsymbol{\lambda}}^k, \nonumber\\ {\bar{H}}_k = & \nabla^2f({\boldsymbol{x}}^k; \xi^k_H), \hskip0.9cm {\bar{\nabla}}_{{\boldsymbol{x}}}^2\mathcal{L}^k = {\bar{\nabla}}_{{\boldsymbol{x}}}^2\mathcal{L}({\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k; \xi^k_H) = {\bar{H}}_k + \sum_{j=1}^m{\boldsymbol{\lambda}}_j^k\nabla^2c_j({\boldsymbol{x}}^k),\\ {\bar{M}}_k = & {\bar{\nabla}}_{{\boldsymbol{x}}}^2\mathcal{L}^kG^T_k + {\bar{T}}_k,\quad \quad\quad {\bar{T}}_k = \begin{pmatrix} \nabla^2c_1({\boldsymbol{x}}^k){\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}({\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k; \xi^k_H) & \cdots & \nabla^2c_m({\boldsymbol{x}}^k){\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}({\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k; \xi^k_H) \end{pmatrix}.\nonumber \end{align} In particular, $\xi_g^k$ is used for the estimation of the gradient ${\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k$, while $\xi_H^k$ is used for the estimation of second-order derivatives, including ${\bar{\nabla}}_{{\boldsymbol{x}}}^2\mathcal{L}^k$, ${\bar{M}}_k$, and ${\bar{T}}_k$. Since $\xi^k_g$ and $\xi^k_H$ are independent, ${\bar{M}}_k$ and ${\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k$ are independent as well. The non-adaptive StoSQP is a straightforward counterpart of Algorithm \ref{alg:SQP} where the deterministic gradient and Hessian are replaced by their stochastic estimates, and the line search is replaced by a prespecified sequence of stepsizes $\{\alpha_k\}_k$. As shown in Algorithm \ref{alg:NSto:SQP}, given the iterate $({\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k)$, we generate $\xi^k = (\xi_g^k, \xi_H^k)$ and calculate ${\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k$ and ${\bar{M}}_k$ as in \eqref{def:MT}. Then, the stochastic search direction $({\bar{\Delta}}{\boldsymbol{x}}^k, {\bar{\Delta}}{\boldsymbol{\lambda}}^k)$ is given similarly to \eqref{equ:Newton:AL} by \begin{equation}\label{equ:ran:Newton} \begin{aligned} \begin{pmatrix} B_k & G^T_k\\ G_k & {\boldsymbol 0} \end{pmatrix}\begin{pmatrix} {\bar{\Delta}} {\boldsymbol{x}}^k\\ {\tilde{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix} & = -\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k\\ c_k \end{pmatrix},\\ G_kG_k^T{\bar{\Delta}}{\boldsymbol{\lambda}}^k & = -(G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k + {\bar{M}}^T_k{\bar{\Delta}}{\boldsymbol{x}}^k). \end{aligned} \end{equation} Same as \cite{Berahas2020Sequential}, we suppose $B_k$ is deterministic given $({\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k)$. In practice, $B_k = I$ is sufficient for global convergence. We emphasize again that the dual direction is ${\bar{\Delta}}{\boldsymbol{\lambda}}^k$, not ${\tilde{\Delta}}{\boldsymbol{\lambda}}^k$. Then, for a prespecified stepsize $\alpha_k$, we let \begin{equation}\label{equ:ran:update} \begin{pmatrix} {\boldsymbol{x}}^{k+1}\\ {\boldsymbol{\lambda}}^{k+1} \end{pmatrix} = \begin{pmatrix} {\boldsymbol{x}}^k\\ {\boldsymbol{\lambda}}^k \end{pmatrix} + \alpha_k\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix}. \end{equation} The procedure is summarized in Algorithm \ref{alg:NSto:SQP}. The augmented Lagrangian merit function does not explicitly appear in Algorithm \ref{alg:NSto:SQP}, but is implicitly used in the Newton system in \eqref{equ:ran:Newton}. \begin{algorithm}[!tp] \caption{A Non-Adaptive StoSQP with Differential Exact Augmented Lagrangian} \label{alg:NSto:SQP} \begin{algorithmic}[1] \State \textbf{Input:} initial iterate $({\boldsymbol{x}}^0, {\boldsymbol{\lambda}}^0)$, stepsizes $\{\alpha_k\}_k$; \For{$k = 0,1,2\ldots$} \State Generate independent realizations $\xi_g^k$ and $\xi_H^k$, and compute ${\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k$ and ${\bar{M}}_k$ as in \eqref{def:MT}; \State Compute $({\bar{\Delta}}{\boldsymbol{x}}^k, {\bar{\Delta}}{\boldsymbol{\lambda}}^k)$ by \eqref{equ:ran:Newton}; \State Update iterates by \eqref{equ:ran:update}; \EndFor \end{algorithmic} \end{algorithm} We will show the convergence of $({\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k)$ in expectation for two different stepsize sequences: a constant stepsize and a decaying stepsize. We need the following assumption. \begin{assumption}\label{ass:ran:1} We assume Assumptions \ref{ass:D:bound} and \ref{ass:D:LICQ} hold for iterates generated by Algorithm~\ref{alg:NSto:SQP}. That is $({\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k) \in \mathcal{X} \times \Lambda$, $f$ and $c$ are trice continuously differentiable in $\mathcal{X}$, $G({\boldsymbol{x}})$ has full row rank for any ${\boldsymbol{x}}\in \mathcal{X}$, and $B_k$ satisfies ${\boldsymbol{x}}^TB_k{\boldsymbol{x}} \geq \gamma_{RH} \|{\boldsymbol{x}}\|^2$ for any ${\boldsymbol{x}}\in \{{\boldsymbol{x}}: G_k{\boldsymbol{x}} = {\boldsymbol 0}, {\boldsymbol{x}} \neq {\boldsymbol 0}\}$, and $\|B_k\|\leq \kappa_B$. Furthermore, we assume $\nabla f({\boldsymbol{x}}^k; \xi)$ and $\nabla^2 f({\boldsymbol{x}}^k; \xi)$ are unbiased estimators of $\nabla f_k$ and $\nabla^2f_k$ with bounded variance. That is for some constants $\psi_g$, $\psi_H>0$, \begin{equation}\label{Bound:var} \begin{aligned} \mathbb{E}_{\xi}[\nabla f({\boldsymbol{x}}^k; \xi)] = &\nabla f_k, \quad \;\;\;\;\;\mathbb{E}_{\xi}[\|\nabla f({\boldsymbol{x}}^k; \xi) - \nabla f_k\|^2] \leq \psi_g,\\ \mathbb{E}_{\xi}[\nabla^2 f({\boldsymbol{x}}^k; \xi)] =& \nabla^2f_k, \quad \mathbb{E}_{\xi}[\|\nabla^2 f({\boldsymbol{x}}^k; \xi) - \nabla^2 f_k\|^2] \leq \psi_H. \end{aligned} \end{equation} \end{assumption} Under Assumption \ref{ass:ran:1}, the bounds in \eqref{Prop:1} still hold, and $\mathbb{E}_{\xi^k_H}[\|{\bar{M}}_k\|^2]$ is bounded as well since \begin{align}\label{def:bound:M} \|{\bar{M}}_k\|^2 & \leq 2\|M_k\|^2 + 2\|{\bar{M}}_k - M_k\|^2 \nonumber\\ & \hsize -4pt \stackrel{\eqref{def:MT}}{\leq} 2\|M_k\|^2 + 4\|G_k\|^2\|{\bar{H}}_k - \nabla^2f_k\| + 4\|{\bar{T}}_k - T_k\|^2 \nonumber\\ & \hsize -4pt \stackrel{\eqref{def:MT}}{\leq} 2\|M_k\|^2 + 4\|G_k\|^2\|{\bar{H}}_k - \nabla^2f_k\| + 4\|\nabla f({\boldsymbol{x}}^k; \xi_H^k) - \nabla f_k\|^2\sum_{i=1}^{m}\|\nabla^2c_i({\boldsymbol{x}}^k)\|^2 \nonumber\\ & \hsize -3pt \stackrel{\eqref{Prop:1}}{\leq} 2\kappa_M^2 + 4\kappa_{2,G}\|{\bar{H}}_k - \nabla^2f_k\| + 4\kappa_{\nabla_{{\boldsymbol{x}}}^2c}^2\|\nabla f({\boldsymbol{x}}^k; \xi_H^k) - \nabla f_k\|^2. \end{align} Taking the expectation over $\xi_H^k$ on two sides and using \eqref{Bound:var}, we show $\mathbb{E}_{\xi^k_H}[\|{\bar{M}}_k\|^2]$ is bounded. To ease notations, we abuse $\kappa_M$ in \eqref{Prop:1} to let it denote the bound of $\mathbb{E}_{\xi^k_H}[\|{\bar{M}}_k\|^2]$ as well, so that $\|M_k\| \vee \mathbb{E}_{\xi^k_H}[\|{\bar{M}}_k\|^2] \leq \kappa_M$. The well-posedness of Algorithm \ref{alg:NSto:SQP} is trivial since the Newton system \eqref{equ:ran:Newton} can be solved by Lemma 16.1 in \cite{Nocedal2006Numerical}. The following lemma characterizes the bias and variance of the stochastic search direction. \begin{lemma}\label{lem:6} Under Assumption \ref{ass:ran:1}, we have \begin{align*} &\mathbb{E}_{\xi^k_g}[{\bar{\Delta}} {\boldsymbol{x}}^k] = \Delta{\boldsymbol{x}}^k,\hskip5.4cm \mathbb{E}_{\xi^k_g,\xi^k_H}[{\bar{\Delta}}{\boldsymbol{\lambda}}^k] = \Delta{\boldsymbol{\lambda}}^k,\\ & \mathbb{E}_{\xi_g^k}[\|G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k\|^2] \leq \|G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k\|^2 + \kappa_{2,G}\cdot\psi_g, \hskip 1cm \mathbb{E}_{\xi^k_g}[\|{\bar{\Delta}}{\boldsymbol{x}}^k\|^2]\leq \|\Delta{\boldsymbol{x}}^k\|^2 + \frac{64\kappa_B^4}{\kappa_{1,G}^2\gamma_{RH}^2}\psi_g. \end{align*} \end{lemma} \begin{proof} See Appendix \ref{pf:lem:6}. \end{proof} Using Lemma \ref{lem:6}, we establish the global convergence of Algorithm \ref{alg:NSto:SQP}. \begin{theorem}[Global convergence of Algorithm \ref{alg:NSto:SQP}]\label{thm:4} Consider Algorithm \ref{alg:NSto:SQP} under Assumption \ref{ass:ran:1}. Let $\mu$ be any constant such that $\mu \geq \frac{8\rbr{\kappa_M^2 + \kappa_{2,G}\kappa_B^2}}{\kappa_{1,G}^2(\gamma_{RH}\wedge \nu)}$. We have two cases: \noindent(a) If $\alpha_k = \alpha \leq \frac{\rbr{\gamma_{RH}\wedge \nu}\kappa_{1,G}^2}{8\kappa_{\mathcal{L}_{\mu, \nu}}\kappa_M}$, then \begin{equation*} \frac{1}{K+1}\sum_{k=0}^{K}\mathbb{E}[\|\nabla\mathcal{L}^k\|^2] \leq \frac{1}{\alpha}\frac{16\kappa_{2,G}^2\kappa_B^2}{\rbr{\gamma_{RH}\wedge \nu} \kappa_{1,G} }\frac{\mathcal{L}_{\mu, \nu}^0 - \min_{\mathcal{X}\times\Lambda}\mathcal{L}_{\mu, \nu}}{K+1} + \frac{32\kappa_{\mathcal{L}_{\mu, \nu}}\kappa_M\kappa_B^6\kappa_{2,G}^4\psi_g}{\kappa_{1,G}^5\gamma_{RH}^2(\gamma_{RH}\wedge\nu)}\alpha. \end{equation*} \noindent(b) If $\alpha_k \leq \frac{\rbr{\gamma_{RH}\wedge \nu}\kappa_{1,G}^2}{8\kappa_{\mathcal{L}_{\mu, \nu}}\kappa_M} $, $\sum_{k=0}^{\infty}\alpha_k = \infty$, and $\sum_{k=0}^{\infty}\alpha_k^2<\infty$, then \begin{equation*} \lim\limits_{K\rightarrow \infty} \frac{1}{\sum_{k=0}^{K}\alpha_k}\sum_{k=0}^{K}\alpha_k\mathbb{E}[\|\nabla\mathcal{L}^k\|^2] =0, \end{equation*} which implies $\liminf_{k\rightarrow \infty}\mathbb{E}[\|\nabla\mathcal{L}^k\|] =0$. \end{theorem} \begin{proof} See Appendix \ref{pf:thm:4}. \end{proof} Theorem \ref{thm:4} matches the convergence results in \cite{Berahas2020Sequential}. From (a), we see that, for constant stepsize, the average of the expected KKT residuals converges to a neighborhood of the origin, whose radius is characterized by the constant stepsize. From (b), we see that, for decaying stepsize, the weighted expected KKT residuals converges to zero, which implies the limit inferior goes to zero. From Theorem \ref{thm:4}, we know that the stepsize $\alpha_k$ has to be smaller than a threshold that depends on $\gamma_{RH}, \nu, \kappa_{1,G}, \kappa_M, \kappa_{\mathcal{L}_{\mu, \nu}}$. Note that $\gamma_{RH}$ and $\nu$ are user-specified constants and can be any positive numbers if we set $B_k = \gamma_{RH} I$.\footnote{In fact, if we hope to have fast local convergence rate, $B_k$ should approximate $\nabla^2_{{\boldsymbol{x}}}\mathcal{L}^k$ sufficiently well locally, so that $\gamma_{RH}$ cannot be any positive number, but is determined by the lower bound of the true reduced Hessian.} The constant $\kappa_{1,G}$ can be replaced by $1/\|(G_kG_k^T)^{-1}\|_2$, which can be evaluated explicitly and, conditional on ${\boldsymbol{x}}^k$, is known before setting $\alpha_k$. However, $\kappa_M$ and $\kappa_{\mathcal{L}_{\mu, \nu}}$, which arise from the Taylor expansion of the merit function, are generally not estimable. In particular, $\kappa_{\mathcal{L}_{\mu, \nu}}$ is the bound of the Hessian $\nabla^2\mathcal{L}_{\mu, \nu}$ (see \eqref{Prop:1}), which depends on $\|\nabla^2 f({\boldsymbol{x}})\|$ and $\|\nabla^2\rbr{\|G({\boldsymbol{x}})\nabla_{{\boldsymbol{x}}}\mathcal{L}({\boldsymbol{x}}, {\boldsymbol{\lambda}})\|^2}\|$ that are not computable in the stochastic setting. The situation is similar for $\kappa_M$. In the deterministic setting, one can apply the procedure in \cite{Berahas2020Sequential} to estimate both quantities simultaneously by checking the condition \begin{equation*} \mathcal{L}_{\mu, \nu}^{k+1} \leq \mathcal{L}_{\mu, \nu}^k + \alpha_k\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{\mu, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{\mu, \nu}^k \end{pmatrix}+ \frac{\kappa_L\alpha_k^2}{2}\nbr{\begin{pmatrix} \Delta{\boldsymbol{x}}^k\\ G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}}^2 \end{equation*} in a While loop. If the above condition does not hold, one can increase $\kappa_L$ and decrease $\alpha_k$ until it holds. However, such a procedure requires the exact evaluation of $f$ and is not applicable in stochastic setting. Moreover, \cite{Berahas2020Sequential} adopted a complex stepsize selection scheme. Their $\alpha_k$ is given by projecting a quantity to an interval, where both the quantity and the interval boundaries depend on a prespecified sequence $\{\beta_k\}_k$. Their conditions on $\{\beta_k\}_k$ are just similar to ours on $\{\alpha_k\}_k$ in Theorem \ref{thm:4}. Our analysis shows that, if we know the Lipschitz constant of the merit function, we indeed do not have to adopt a complex scheme to select the stepsize. Our numerical experiments in Section \ref{sec:5} also show that Algorithm \ref{alg:NSto:SQP} is comparable to theirs. The whole stepsize sequence $\{\alpha_k\}_k$ in Algorithm \ref{alg:NSto:SQP} needs to be tuned manually, which makes it impractical. In the next section, we present a line-search StoSQP, where $\alpha_k$ is found via backtracking. \section{An Adaptive Stochastic SQP}\label{sec:4} In this section, we develop an adaptive StoSQP algorithm. To that end, we embed the stochastic line search method from \cite{Paquette2020Stochastic} within our SQP framework. Comparing with the non-adaptive StoSQP in Section \ref{sec:3}, the stepsize in this section is stochastic, so that different analytical tools are required to study convergence. The stochastic line search replaces the uncomputable quantities in \eqref{equ:Armijo}, $\mathcal{L}_{\mu, \nu}$ and $\nabla\mathcal{L}_{\mu, \nu}$, by their stochastic estimates, ${\bar{\mL}}_{\mu, \nu}$ and ${\bar{\nabla}}\mathcal{L}_{\mu, \nu}$. This creates three main challenges. First, the stochastic merit function ${\bar{\mL}}_{\mu, \nu}$ is a random function. Showing it decreases in each iteration is not meaningful, as ${\bar{\mL}}_{\mu, \nu}$ depends on the particular realizations of $\xi$, which varies with $k$. Second, a bad estimate of either $\mathcal{L}_{\mu, \nu}$ or $\nabla\mathcal{L}_{\mu, \nu}$ may cause $\alpha_k$ to become arbitrarily small. As a result, one cannot expect a result in Lemma \ref{lem:2} to hold in this setting. Finally, even if the Armijo condition \eqref{equ:Armijo} is satisfied for stochastic functions, the objective in expectation may be arbitrarily large and the value of $\mathcal{L}_{\mu, \nu}$ may actually increase. \cite{Paquette2020Stochastic} solved these technical challenges for unconstrained problems by combining approaches of \cite{Blanchet2019Convergence} and \cite{Cartis2017Global}. Generally, one requires a sufficiently accurate model in the line search step to ensure the usefulness of the selected random stepsize, which means that the adaptivity is achieved by drawing more samples in each iteration. While this might not seem ideal, it is standard in analysis of other adaptive algorithms \citep{Friedlander2012Hybrid, Byrd2012Sample, Krejic2013Line, De2017Automated, Bollapragada2018Adaptive}. \cite{Paquette2020Stochastic} modified the line search by introducing an additional parameter $\epsilon_k$, which imposes a requirement on the amount of decrease of the stochastic merit function. Similar to the radius in the stochastic trust-region methods, if the decrease of ${\bar{\mL}}_{\mu, \nu}$ is greater than $\epsilon_k$, one can expect that the selected stepsize will also decrease $\mathcal{L}_{\mu, \nu}$; while if the decrease of ${\bar{\mL}}_{\mu, \nu}$ is less than $\epsilon_k$, one will draw more samples to have a more accurate model in the next iteration. Our algorithm generalizes the idea of \cite{Paquette2020Stochastic} to the constrained problems. The generalization has additional two challenges. First, we have to adaptively select the penalty parameter in the algorithm. Without constraints, the Armijo condition in \eqref{equ:Armijo} uses the objective function, and there are no extra parameters. With constraints, we have shown in Theorem \ref{thm:1} that the search direction is only a descent direction of $\mathcal{L}_{\mu, \nu}$ when $\mu$ is large enough. In the stochastic case, $\mu$ is a random quantity and we need to ensure that the selected $\mu$ behaves similarly to that in the deterministic case, that is, $\mu$ stabilizes after a number of iterations. Second, for unconstrained problems, if the Armijo condition is satisfied for $f$ in each iteration, then one can sum over all iterations and claim $\|\nabla f_k\|\rightarrow 0$. For constrained problems, if the Armijo condition is satisfied for $\mathcal{L}_{\mu, \nu}$ with stabilized $\mu$, then one can similarly claim $\|\nabla \mathcal{L}_{\mu, \nu}^k\|\rightarrow 0$. However, this does not imply $\|\nabla \mathcal{L}^k\|\rightarrow 0$, which requires the stabilized $\mu$ to be greater than a deterministic threshold (i.e. to make the matrix in \eqref{equ:derivative:AL} invertible). To resolve the first challenge, we adopt a similar While loop to Algorithm \ref{alg:SQP} and iteratively increase $\mu$ until the projection of the search direction on the gradient has a sufficient decrease. To resolve the second challenge, we modify the While loop condition further and impose a different condition on $\mu$. Our modification is motivated by a critical observation that $c_k\vee \|\nabla \mathcal{L}_{\mu, \nu}^k\|\rightarrow 0$ implies $\|\nabla\mathcal{L}^k\|\rightarrow 0$, for \textbf{any} $\mu,\nu\neq 0$. This is due to the fact that $c_k \vee\|\nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{\mu, \nu}^k\| \rightarrow 0 \Rightarrow \|G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k\|\rightarrow 0$ and $\|G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k\| \vee \|\nabla_{{\boldsymbol{x}}}\mathcal{L}_{\mu, \nu}^k\| \rightarrow 0\Rightarrow \|\nabla_{{\boldsymbol{x}}}\mathcal{L}^k\| \rightarrow 0$ (see \eqref{equ:derivative:AL}). Note that the deterministic SQP in Algorithm \ref{alg:SQP} does not have to overcome the second challenge, because the deterministic Armijo condition directly induces $\|\Delta{\boldsymbol{x}}^k\|\vee \|G_k\nabla\mathcal{L}^k\|\rightarrow 0$, which further induces $\|\nabla\mathcal{L}^k\|\rightarrow 0$ (see Theorem \ref{thm:3}). \cite{Berahas2020Sequential} resolved the second challenge by imposing extra conditions (see Proposition 33 there), while we adjust the algorithm itself and overcome the challenge for free. In what follows, we slightly abuse the notations and use $\xi_{(\cdot)}^k$ to denote a set of realizations of $\xi$. $|\xi_{(\cdot)}^k|$ denotes its size. Given the $k$-th iterate $({\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k, {\bar{\alpha}}_k, {\bar{\epsilon}}_k)$, the algorithm proceeds in four steps: \vskip 5pt \noindent\textbf{Step 1: Estimate the derivatives.} We generate a set of independent realizations $\xi_g^k$ and let \begin{equation}\label{def:g} {\bar{g}}_k = \frac{1}{|\xi_g^k|}\sum_{\zeta\in \xi_g^k}\nabla f({\boldsymbol{x}}^k; \zeta), \quad {\bar{H}}_k = \frac{1}{|\xi_g^k|}\sum_{\zeta\in \xi_g^k}\nabla^2 f({\boldsymbol{x}}^k; \zeta). \end{equation} We compute ${\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k$, ${\bar{\nabla}}_{{\boldsymbol{x}}}^2\mathcal{L}^k$, ${\bar{M}}_k$ and ${\bar{T}}_k$ as in \eqref{def:MT}. Different from the estimation in Section \ref{sec:3}, we do not require ${\bar{g}}_k$ and ${\bar{H}}_k$ to be independent. For some constants $\kappa_{grad}$, $p_{grad}$ to be chosen later, we define the event \begin{align}\label{event:A_k} \mathcal{A}_k = &\bigg\{\nbr{\begin{pmatrix} {\bar{g}}_k - \nabla f_k + \nu \rbr{{\bar{M}}_k G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k - M_kG_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k}\\ \nu G_kG_k^TG_k\rbr{{\bar{g}}_k - \nabla f_k} \end{pmatrix}} \nonumber\\ & \hskip5cm \leq \kappa_{grad}\cdot{\bar{\alpha}}_k\nbr{\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k + \nu{\bar{M}}_k G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k + G_k^Tc_k\\ \nu G_kG_k^TG_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}} \bigg\}, \end{align} for a monotonically increasing sequence $|\xi_g^k|$ chosen so that \begin{equation}\label{equ:ran:cond:1} P(\mathcal{A}_k^c \mid {\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k) \leq p_{grad}. \end{equation} The event $\mathcal{A}_k$ contains all the good estimates of $\nabla\mathcal{L}_{\mu, \nu}^k$ such that $\|{\bar{\nabla}}\mathcal{L}_{\mu, \nu}^k - \nabla\mathcal{L}_{\mu, \nu}^k\|$ is well controlled. An important observation is that the difference ${\bar{\nabla}}\mathcal{L}_{\mu, \nu}^k - \nabla\mathcal{L}_{\mu, \nu}^k$ is independent from $\mu$. We will show later that \eqref{equ:ran:cond:1} can be satisfied for sufficiently large $|\xi_g^k|$. \vskip 5pt \noindent\textbf{Step 2: Select the penalty parameter.} Given the stochastic estimates ${\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k$ and ${\bar{M}}_k$, we generate $B_k$ and compute $({\bar{\Delta}} {\boldsymbol{x}}^k, {\bar{\Delta}}{\boldsymbol{\lambda}}^k)$ by \eqref{equ:ran:Newton}. Then we let \begin{align}\label{N:13} \begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k \end{pmatrix} = \begin{pmatrix} \rbr{I+\nu{\bar{M}}_kG_k}{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k + {\bar{\mu}}_kG_k^Tc_k\\ c_k + \nu G_kG_k^TG_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}, \end{align} where the parameter ${\bar{\mu}}_k$ is chosen to satisfy \begin{align}\label{equ:ran:cond:2} \begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix} \leq - \frac{\gamma_{RH}}{2}\nbr{\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}}^2 \quad \text{ and } \quad \nbr{c_k}\leq \nbr{\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k \end{pmatrix}}. \end{align} The first condition is similar to Line 4 in Algorithm \ref{alg:SQP}, except we do not update $\delta_k$ but fix it to be $\gamma_{RH}/2$ for simplicity. The second condition is not required in Algorithm \ref{alg:SQP}, but is critical in our StoSQP. This additional condition on ${\bar{\mu}}_k$ controls the feasibility error $\|c_k\|$ by $\|{\bar{\nabla}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k\|$. Intuitively, if $\|\nabla\mathcal{L}_{{\bar{\mu}}_k, \nu}^k\|\rightarrow 0$ and $\mathbb{E}_{\xi_g^k}[\|{\bar{\nabla}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k - \nabla\mathcal{L}_{{\bar{\mu}}_k, \nu}^k\|]\rightarrow 0$, then $\|c_k\|\leq \mathbb{E}_{\xi^k_g}[\|{\bar{\nabla}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k\|] \rightarrow 0$. Thus, we have $\|c_k\|\vee \|\nabla\mathcal{L}_{{\bar{\mu}}_k, \nu}^k\|\rightarrow 0$, which implies $\|\nabla\mathcal{L}^k\|\rightarrow 0$ by our observation mentioned before. This condition allows us to not require ${\bar{\mu}}_k$ to be greater than the deterministic threshold which makes the matrix in \eqref{equ:derivative:AL} invertible. \vskip 5pt \noindent\textbf{Step 3: Estimate the merit function.} Given the selected ${\bar{\mu}}_k$ from Step 2, we estimate the merit function that is used in the line search step. Recall that ${\bar{\alpha}}_k$ is from the $(k-1)$-th step. We let ${\boldsymbol{x}}^{s_k} = {\boldsymbol{x}}^k + {\bar{\alpha}}_k{\bar{\Delta}} {\boldsymbol{x}}^k$ and ${\boldsymbol{\lambda}}^{s_k} = {\boldsymbol{\lambda}}^k + {\bar{\alpha}}_k{\bar{\Delta}}{\boldsymbol{\lambda}}^k$ be the test points, and let $c_{s_k} = c({\boldsymbol{x}}^{s_k})$, $G_{s_k} = G({\boldsymbol{x}}^{s_k})$. We then generate a set of independent realizations $\xi_f^k$ and let \begin{align*} {\bar{f}}_k & = \frac{1}{|\xi_f^k|}\sum_{\zeta\in \xi_f^k}f({\boldsymbol{x}}^k; \zeta), \quad\quad\quad {\bar{f}}_{s_k} = \frac{1}{|\xi_f^k|}\sum_{\zeta\in \xi_f^k}f({\boldsymbol{x}}^{s_k}; \zeta), \\ {\bar{\nabla}} f_k & = \frac{1}{|\xi_f^k|}\sum_{\zeta\in \xi_f^k}\nabla f({\boldsymbol{x}}^k; \zeta), \quad \; {\bar{\nabla}} f_{s_k} = \frac{1}{|\xi_f^k|}\sum_{\zeta\in \xi_f^k}\nabla f({\boldsymbol{x}}^{s_k}; \zeta). \end{align*} Note that we distinguish ${\bar{\nabla}} f_k$ from ${\bar{g}}_k$ in \eqref{def:g}, though they are both estimates of $\nabla f_k$. This simplifies the analysis, since the randomness in each step is independent from other steps. Let \begin{equation}\label{N:12} \begin{aligned} {\bar{\mL}}_{{\bar{\mu}}_k, \nu}^k & = {\bar{f}}_k + c_k^T{\boldsymbol{\lambda}}^k + \frac{{\bar{\mu}}_k}{2}\|c_k\|^2 + \frac{\nu}{2}\nbr{G_k\rbr{{\bar{\nabla}} f_k + G^T_k{\boldsymbol{\lambda}}^k} }^2,\\ {\bar{\mL}}_{{\bar{\mu}}_k, \nu}^{s_k} & = {\bar{f}}_{s_k} + c_{s_k}^T{\boldsymbol{\lambda}}^{s_k}+\frac{{\bar{\mu}}_k}{2}\|c_{s_k}\|^2 + \frac{\nu}{2}\nbr{G_{s_k}\rbr{{\bar{\nabla}} f_{s_k} + G_{s_k}^T{\boldsymbol{\lambda}}^{s_k}} }^2 \end{aligned} \end{equation} be the estimates of $\mathcal{L}_{{\bar{\mu}}_k, \nu}^k = \mathcal{L}_{{\bar{\mu}}_k, \nu}({\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k)$ and $\mathcal{L}_{{\bar{\mu}}_k, \nu}^{s_k} = \mathcal{L}_{{\bar{\mu}}_k, \nu}({\boldsymbol{x}}^{s_k}, {\boldsymbol{\lambda}}^{s_k})$, where ${\bar{\mu}}_k$ is from Step 2. For some constants $\kappa_f, p_f$ to be chosen later, we define the event \begin{equation}\label{event:B_k} \mathcal{B}_k = \bigg\{ \abr{{\bar{\mL}}_{{\bar{\mu}}_k, \nu}^k - \mathcal{L}_{{\bar{\mu}}_k, \nu}^k} \vee \abr{{\bar{\mL}}_{{\bar{\mu}}_k, \nu}^{s_k} - \mathcal{L}_{{\bar{\mu}}_k, \nu}^{s_k}} \leq -\kappa_f{\bar{\alpha}}_k^2\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix}\bigg\}, \end{equation} for $|\xi_f^k|$ large enough so that \begin{equation}\label{equ:ran:cond:3} P(\mathcal{B}_k^c \mid {\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k, {\bar{\Delta}}{\boldsymbol{x}}^k, {\bar{\Delta}}{\boldsymbol{\lambda}}^k)\leq p_f \end{equation} and \begin{equation}\label{equ:ran:cond:4} \mathbb{E}_{\xi_f^k}[|{\bar{\mL}}_{{\bar{\mu}}_k, \nu}^k - \mathcal{L}_{{\bar{\mu}}_k, \nu}^k|^2] \vee \mathbb{E}_{\xi_f^k}[|{\bar{\mL}}_{{\bar{\mu}}_k, \nu}^{s_k} - \mathcal{L}_{{\bar{\mu}}_k, \nu}^{s_k}|^2] \leq {\bar{\epsilon}}_k^2. \end{equation} Here ${\bar{\epsilon}}_k$ is updated with the iteration. Again, we will show later that \eqref{equ:ran:cond:3} and \eqref{equ:ran:cond:4} can be satisfied for sufficiently large $|\xi_f^k|$. \vskip 5pt \noindent\textbf{Step 4: Perform the line search step.} Using the above estimates, we update the iterates based on whether the Armijo condition is satisfied. \noindent(a) If the Armijo condition holds: \begin{equation}\label{equ:ran:Armijo} {\bar{\mL}}_{{\bar{\mu}}_k, \nu}^{s_k} \leq {\bar{\mL}}_{{\bar{\mu}}_k, \nu}^k + {\bar{\alpha}}_k\beta\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix}, \end{equation} then we let ${\boldsymbol{x}}^{k+1} = {\boldsymbol{x}}^{s_k}$, ${\boldsymbol{\lambda}}^{k+1} = {\boldsymbol{\lambda}}^{s_k}$ and increase the stepsize by ${\bar{\alpha}}_{k+1} = \rho{\bar{\alpha}}_k \wedge \alpha_{max}$, with $\rho>1$. Moreover, if we observe a sufficient decrease, that is \begin{equation}\label{equ:sufficient:dec} -{\bar{\alpha}}_k\beta\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix} \geq {\bar{\epsilon}}_k, \end{equation} we then increase ${\bar{\epsilon}}_k$ as ${\bar{\epsilon}}_{k+1} = \rho{\bar{\epsilon}}_k$, otherwise ${\bar{\epsilon}}_{k+1} = {\bar{\epsilon}}_k/\rho$. \noindent(b) If the Armijo condition \eqref{equ:ran:Armijo} does not hold, we do not update the current iterates and let ${\boldsymbol{x}}^{k+1} = {\boldsymbol{x}}^k$, ${\boldsymbol{\lambda}}^{k+1} = {\boldsymbol{\lambda}}^k$, and decrease the stepsize ${\bar{\alpha}}_k$ by ${\bar{\alpha}}_{k+1} = {\bar{\alpha}}_k/\rho$ and ${\bar{\epsilon}}_k$ by ${\bar{\epsilon}}_{k+1} = {\bar{\epsilon}}_k/\rho$. The four steps are summarized in Algorithm \ref{alg:ASto:SQP}. Before delving into the algorithm, we briefly comment on the randomness of the iteration. Let $\mathcal{F}_0\subseteq \mathcal{F}_1\subseteq\mathcal{F}_2\subseteq\ldots$ be a filtration of $\sigma$-algebras where $\mathcal{F}_k$ is generated by $\{\xi_f^j, \xi_g^j\}_{j=0}^k$. Let $\mathcal{F}_{k-0.5}$ be the $\sigma$-algebra generated by $\{\xi_f^j, \xi_g^j\}_{j=0}^{k-1} \cup \xi_g^k$. We have $\mathcal{F}_{k-1} \subseteq\mathcal{F}_{k-0.5}\subseteq\mathcal{F}_k$. Finally, we let $\mathcal{F}_{-1} = \sigma({\boldsymbol{x}}^0, {\boldsymbol{\lambda}}^0)$. By ${\bar{\mu}}_k$ we denote the quantity obtained after the While loop in Line 5 of Algorithm \ref{alg:ASto:SQP}. By the construction, it is easy to see \begin{align*} \sigma({\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k)\cup \sigma({\bar{\alpha}}_k)\cup \sigma({\bar{\epsilon}}_k) \subseteq \mathcal{F}_{k-1}, \quad \sigma({\bar{\Delta}}{\boldsymbol{x}}^k, {\bar{\Delta}}{\boldsymbol{\lambda}}^k) \cup \sigma({\bar{\mu}}_k) \subseteq \mathcal{F}_{k-0.5}, \quad \forall k\geq 0. \end{align*} In particular, the filtration $\mathcal{F}_{k-1}$ contains all the randomness before the $k$-th iteration in Line 3. In the $k$-th iteration, we first generate $\xi_g^k$ and obtain $\mathcal{F}_{k-0.5}$. Then, we compute the search direction $({\bar{\Delta}}{\boldsymbol{x}}^k, {\bar{\Delta}}{\boldsymbol{\lambda}}^k)$ and ${\bar{\mu}}_k$. Finally, we generate $\xi_f^k$ and obtain $\mathcal{F}_k$, allowing us to compute $({\boldsymbol{x}}^{k+1}, {\boldsymbol{\lambda}}^{k+1})$. In the line search step, which starts from Line 9 in Algorithm~\ref{alg:ASto:SQP}, ${\bar{\epsilon}}_k$ characterizes the reliability of the decrease we observe on the stochastic merit function. In particular, each iteration is divided into a successful step (Armijo condition is satisfied) or an unsuccessful step (Armijo condition is unsatisfied). If the step is successful, we further divide it into a reliable step or an unreliable step. When the amount of decrease on the stochastic merit function is greater than ${\bar{\epsilon}}_k$, we classify it as a reliable step, because it reduces the deterministic merit function with high-probability as well. We then increase ${\bar{\epsilon}}_k$ and require a less accurate model in the next iteration (see \eqref{equ:ran:cond:4}). When the observed decrease is less than ${\bar{\epsilon}}_k$, we decrease ${\bar{\epsilon}}_k$, as we are not confident that the deterministic merit function is decreased. Thus, we require a more accurate model in the next iteration. \begin{algorithm}[!tp] \caption{An Adaptive StoSQP with Differential Exact Augmented Lagrangian} \label{alg:ASto:SQP} \begin{algorithmic}[1] \State \textbf{Input:} objective $f$, constraint $c$, initial iterates $({\boldsymbol{x}}^0, {\boldsymbol{\lambda}}^0)$, and parameters $\nu\geq\gamma_{RH} >0, {\bar{\alpha}}_0 = \alpha_{max}>0, {\bar{\mu}}_0, {\bar{\epsilon}}_0, \kappa_{grad}>0$, $\rho>1$, $p_{grad}, p_f, \beta\in(0, 1)$, $\kappa_f\in(0, \beta/4\alpha_{max})$; \For{$k = 0,1,2\ldots$} \State Generate $\xi_g^k$ and compute ${\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k, {\bar{M}}_k$, such that $|\xi_g^k|\geq \rbr{|\xi_g^{k-1}|+1}$ ($|\xi_g^{-1}| = 0$) and \begin{equation*} P(\mathcal{A}_k^c \mid {\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k) \leq p_{grad}; \end{equation*} \State Generate $B_k$ such that ${\boldsymbol{x}}^TB_k{\boldsymbol{x}}_k \geq \gamma_{RH}\|{\boldsymbol{x}}\|^2$, for any ${\boldsymbol{x}} \in \{{\boldsymbol{x}}: G_k{\boldsymbol{x}} = {\boldsymbol 0}, {\boldsymbol{x}}\neq {\boldsymbol 0}\}$, and compute $({\bar{\Delta}}{\boldsymbol{x}}^k, {\bar{\Delta}}{\boldsymbol{\lambda}}^k)$ by solving \eqref{equ:ran:Newton}; \While{$\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}} {\boldsymbol{\lambda}}^k \end{pmatrix}>-\frac{\gamma_{RH}}{2}\nbr{\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}}^2$ OR $\|c_k\|>\nbr{\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k \end{pmatrix}}$} \State Let ${\bar{\mu}}_k = \rho{\bar{\mu}}_k$; \EndWhile \State Generate $\xi_f^k$ and compute ${\bar{\mL}}_{{\bar{\mu}}_k, \nu}^k$ and ${\bar{\mL}}_{{\bar{\mu}}_k, \nu}^{s_k}$, such that \begin{align*} P(\mathcal{B}_k^c \mid {\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k, {\bar{\Delta}}{\boldsymbol{x}}^k, {\bar{\Delta}}{\boldsymbol{\lambda}}^k)\leq & p_f,\\ \mathbb{E}_{\xi_f^k}[|{\bar{\mL}}_{{\bar{\mu}}_k, \nu}^k - \mathcal{L}_{{\bar{\mu}}_k, \nu}^k|^2] \vee \mathbb{E}_{\xi_f^k}[|{\bar{\mL}}_{{\bar{\mu}}_k, \nu}^{s_k} - \mathcal{L}_{{\bar{\mu}}_k, \nu}^{s_k}|^2] \leq & {\bar{\epsilon}}_k^2; \end{align*} \If{${\bar{\mL}}_{{\bar{\mu}}_k, \nu}^{s_k} \leq {\bar{\mL}}_{{\bar{\mu}}_k, \nu}^k + {\bar{\alpha}}_k \beta \begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix}$} \Comment{Successful step} \State Let $\begin{pmatrix} {\boldsymbol{x}}^{k+1}\\ {\boldsymbol{\lambda}}^{k+1} \end{pmatrix} = \begin{pmatrix} {\boldsymbol{x}}^k\\ {\boldsymbol{\lambda}}^k \end{pmatrix} + {\bar{\alpha}}_k\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix}$; \State Set ${\bar{\alpha}}_{k+1} = \alpha_{max} \wedge \rho{\bar{\alpha}}_k$; \If{$- {\bar{\alpha}}_k\beta \begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix} \geq {\bar{\epsilon}}_k$} \Comment{Reliable step} \State Let ${\bar{\epsilon}}_{k+1} = \rho{\bar{\epsilon}}_k$; \Else \Comment{Unreliable step} \State Let ${\bar{\epsilon}}_{k+1} = {\bar{\epsilon}}_k/\rho$; \EndIf \Else \Comment{Unsuccessful step} \State Let $\begin{pmatrix} {\boldsymbol{x}}^{k+1}\\ {\boldsymbol{\lambda}}^{k+1} \end{pmatrix} = \begin{pmatrix} {\boldsymbol{x}}^k\\ {\boldsymbol{\lambda}}^k \end{pmatrix}, {\bar{\alpha}}_{k+1} = {\bar{\alpha}}_k/\rho, {\bar{\epsilon}}_{k+1} = {\bar{\epsilon}}_k/\rho$; \EndIf \State ${\bar{\mu}}_{k+1} = {\bar{\mu}}_k$; \EndFor \end{algorithmic} \end{algorithm} \subsection{Well-posedness of Algorithm \ref{alg:ASto:SQP}} We study the well-posedness of Algorithm \ref{alg:ASto:SQP} in this section and show that each step of Algorithm \ref{alg:ASto:SQP} can be performed in finite time. We first lay out the assumption. \begin{assumption}\label{ass:A:1} We assume Assumptions \ref{ass:D:bound} and \ref{ass:D:LICQ} hold for iterates generated by Algorithm~\ref{alg:ASto:SQP}. That is $({\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k) \in \mathcal{X} \times \Lambda$, $f$ and $c$ are trice continuously differentiable in $\mathcal{X}$, $G({\boldsymbol{x}})$ has full row rank for any ${\boldsymbol{x}}\in\mathcal{X}$, and $B_k$ satisfies ${\boldsymbol{x}}^TB_k{\boldsymbol{x}} \geq \gamma_{RH} \|{\boldsymbol{x}}\|^2$ for any ${\boldsymbol{x}}\in \{{\boldsymbol{x}}: G_k{\boldsymbol{x}} = {\boldsymbol 0}, {\boldsymbol{x}} \neq {\boldsymbol 0}\}$, and $\|B_k\|\leq \kappa_B$. Furthermore, we assume $\|\nabla\mathcal{L}^k\|\wedge \|({\bar{\Delta}}{\boldsymbol{x}}^k, {\bar{\Delta}}{\boldsymbol{\lambda}}^k)\|>0$ and, for any realization $\xi \sim \mathcal{P}$ and ${\boldsymbol{x}}\in \mathcal{X}$, we have $|f({\boldsymbol{x}}; \xi) - f({\boldsymbol{x}})| \leq M_0$, $\|\nabla f({\boldsymbol{x}};\xi) - \nabla f({\boldsymbol{x}})\|\leq M_1$, and $\|\nabla^2 f({\boldsymbol{x}};\xi) - \nabla^2 f({\boldsymbol{x}})\|\leq M_2$ for constants $M_0, M_1, M_2 >0$. \end{assumption} The assumption $\|\nabla\mathcal{L}^k\|\wedge \|({\bar{\Delta}}{\boldsymbol{x}}^k, {\bar{\Delta}}{\boldsymbol{\lambda}}^k)\|>0$ is imposed only for analytical reasons. It allows us to generate an infinite sequence of iterates $\{({\boldsymbol{x}}^k, {\boldsymbol{\lambda}}^k)\}_k$. A similar condition can be found in (2.2) in \cite{Bollapragada2018Adaptive}. We mention that a practical algorithm should stop whenever $ \|{\bar{\nabla}} \mathcal{L}^k\| \wedge \|({\bar{\Delta}}{\boldsymbol{x}}^k, {\bar{\Delta}}{\boldsymbol{\lambda}}^k)\|\leq \tau$ for a tolerance $\tau$. The assumption that the difference of each realization to the mean is bounded naturally holds due to the compactness of $\mathcal{X}$, and is commonly used for mini-batch sampling \citep{Tripuraneni2018Stochastic, RoostaKhorasani2018Sub, Paquette2020Stochastic}. By Assumption~\ref{ass:A:1}, \eqref{Prop:1} holds immediately and, by \eqref{def:bound:M}, we know $\|{\bar{M}}_k\|$ is bounded as well. Again, we abuse $\kappa_M$ to let it denote the bound of $\|{\bar{M}}_k\|$, so that $\|{\bar{M}}_k\|\leq \kappa_M$. In order to show that Algorithm \ref{alg:ASto:SQP} is well-posed, it suffices to show that the condition \eqref{equ:ran:cond:1} in Line 3, the condition \eqref{equ:ran:cond:2} in Line 5, and the conditions \eqref{equ:ran:cond:3} and \eqref{equ:ran:cond:4} in Line 8 can be satisfied. We study them in the next three lemmas. \begin{algorithm}[!tp] \caption{Sample size selection} \label{alg:sample} \begin{algorithmic}[1] \State \textbf{Input:} initial $|\xi_g^k|$, problem parameters ${\bar{\alpha}}_k, c_k, G_k, \kappa_{grad}, p_{grad}, d, \nu$, and $\rho>1$, $C_{grad}>0$; \While{True} \State Generate $|\xi_g^k|$ samples to compute ${\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k$ and ${\bar{M}}_k$ as in \eqref{def:MT}; \If{\begin{equation}\label{cond:11} |\xi_g^k| < \frac{C_{grad}\log\rbr{\frac{8d}{p_{grad}} }}{\kappa_{grad}^2\cdot {\bar{\alpha}}_k^2\nbr{\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k + \nu{\bar{M}}_k G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k + G_k^Tc_k\\ \nu G_kG_k^TG_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}}^2\wedge 1} \end{equation}} \State $|\xi_g^k| = \rho|\xi_g^k|$; \Else \State \textbf{Break}; \EndIf \EndWhile \end{algorithmic} \end{algorithm} \begin{lemma}\label{lem:cond:1} Under Assumption \ref{ass:A:1}, the condition \eqref{equ:ran:cond:1} can be satisfied using Algorithm \ref{alg:sample} for a large constant $C_{grad}$. Moreover, Algorithm \ref{alg:sample} terminates in finite time. \end{lemma} \begin{proof} See Appendix \ref{pf:lem:cond:1}. \end{proof} From Lemma~\ref{lem:cond:1}, we observe that the sample complexity $|\xi_g^k|$ depends on a tuning parameter $C_{grad}$. This dependence seems unavoidable and appears in different forms in \cite{Bollapragada2018Adaptive} and \cite{Paquette2020Stochastic}. However, noting that the denominator in \eqref{cond:11} is bounded by $\|{\bar{\nabla}}\mathcal{L}^k\|^2$ which, as the estimator of $\|\nabla\mathcal{L}^k\|^2$, should be close to zero when $k$ is large, the effect of the tuning parameter $C_{grad}$ is negligible. Moreover, the sample complexity is proportional to the inverse of the square of the gradient, which is standard in the literature on adaptive sample size selection strategies \citep{Bollapragada2018Adaptive, Paquette2020Stochastic}. Lastly, we should mention that if we encounter a situation where the denominator in \eqref{cond:11} is zero, we just keep increasing $|\xi_g^k|$ by Line 5. As we proved, the denominator is finally nonzero since \begin{align*} \begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k + \nu{\bar{M}}_k G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k + G_k^Tc_k\\ \nu G_kG_k^TG_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix} \stackrel{|\xi_g^k|\rightarrow\infty}{\longrightarrow}\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}^k + \nu M_k G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k + G_k^Tc_k\\ \nu G_kG_k^TG_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}\neq {\boldsymbol 0}. \end{align*} The true vector is nonzero by noting that: $\|\nu G_kG_k^TG_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k\| = 0$ implies $\|G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k\| = 0$. Then it implies ${\boldsymbol 0} = G_k(\nabla_{{\boldsymbol{x}}}\mathcal{L}^k + \nu M_k G_k\nabla_{{\boldsymbol{x}}}\mathcal{L}^k + G_k^Tc_k) = G_kG_k^Tc_k$ and thus $c_k = {\boldsymbol 0}$. Finally, we get $\nabla_{{\boldsymbol{x}}}\mathcal{L}^k = {\boldsymbol 0}$ and $\nabla\mathcal{L}^k = {\boldsymbol 0}$, which contradicts $\|\nabla\mathcal{L}^k\|>0$ in Assumption \ref{ass:A:1}. The following result shows that the conditions \eqref{equ:ran:cond:3} and \eqref{equ:ran:cond:4} can be satisfied. \begin{lemma}\label{lem:cond:2} Under Assumption \ref{ass:A:1}, the conditions \eqref{equ:ran:cond:3} and \eqref{equ:ran:cond:4} are satisfied if \begin{equation}\label{cond:2} |\xi_f^k| \geq \frac{C_f\log\rbr{\frac{4}{p_f}}}{\cbr{\kappa_f{\bar{\alpha}}_k^2\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_k, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix}}^2\wedge {\bar{\epsilon}}_k^2\wedge 1} \end{equation} for a large constant $C_f$. \end{lemma} \begin{proof} See Appendix \ref{pf:lem:cond:2}. \end{proof} Different from Lemma \ref{lem:cond:1}, the denominator in \eqref{cond:2} is computable given $\mathcal{F}_{k-0.5}$. As a result, there is no need to apply a While loop to find $\xi_f^k$ iteratively, as did in Algorithm \ref{alg:sample} for $\xi_g^k$. The tuning parameter $C_f$ is similar to $C_{grad}$ in Lemma \ref{lem:cond:1} and has ignorable effect on the performance due to the small magnitude of the denominator. Again, we should mention that the denominator in \eqref{cond:2} is nonzero. Otherwise, by \eqref{equ:ran:cond:2} we know ${\bar{\Delta}}{\boldsymbol{x}}^k = {\boldsymbol 0}$ and $G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k = {\boldsymbol 0}$. Then, by \eqref{equ:ran:Newton} we know ${\bar{\Delta}}{\boldsymbol{\lambda}}^k = {\boldsymbol 0}$, which contradicts $\|({\bar{\Delta}}{\boldsymbol{x}}^k, {\bar{\Delta}}{\boldsymbol{\lambda}}^k)\|>0$ in Assumption \ref{ass:A:1}. The last result of this subsection shows that the condition \eqref{equ:ran:cond:2} on ${\bar{\mu}}_k$ can be satisfied, so that the While loop in Line 5 of Algorithm \ref{alg:ASto:SQP} will stop in finite time. Furthermore, like in the deterministic SQP in Algorithm~\ref{alg:SQP}, ${\bar{\mu}}_k$ will stabilize after a number of iterations. \begin{lemma}\label{lem:9} Under Assumption \ref{ass:A:1}, the condition \eqref{equ:ran:cond:2} can be satisfied by the While loop in Line 5 of Algorithm \ref{alg:ASto:SQP}. Furthermore, there exists a deterministic constant ${\tilde{\mu}}>0$ such that ${\bar{\mu}}_k = {\bar{\mu}}_{{\bar{K}}} \leq {\tilde{\mu}}$, $\forall k\geq {\bar{K}}$ for some ${\bar{K}} <\infty$. \end{lemma} \begin{proof} See Appendix \ref{pf:lem:9}. \end{proof} Lemma~\ref{lem:9} is similar to Theorem \ref{thm:1}. It implies that, for each run of Algorithm \ref{alg:ASto:SQP}, the merit function is invariant after certain number of iterations. This property is critical for establishing global convergence. Since we always let $k\rightarrow \infty$, we do not have to study the iteration before ${\bar{K}}$. A difference to Theorem \ref{thm:1} is that the threshold ${\bar{K}}$ is random, which might be different for each run. However, it must exist and be finite. A similar result is showed in \cite{Berahas2020Sequential}. Finally, we note that $\sigma({\bar{\mu}}_{{\bar{K}}}) \subseteq\mathcal{F}_{{\bar{K}}}$ and ${\bar{\mu}}_{{\bar{K}}}$ has a deterministic upper bound ${\tilde{\mu}}$. \subsection{Convergence analysis} Our analysis is based on the convergence of the function \begin{equation*} \Phi_{{\bar{\mu}}_{{\bar{K}}}, \nu, \omega}^k = \omega\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k + \frac{(1-\omega)}{2}{\bar{\epsilon}}_k + \frac{(1-\omega)}{2}{\bar{\alpha}}_k\|\nabla\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\|^2, \end{equation*} where $\omega \in (0, 1)$ is a deterministic parameter specified later. This function is a linear combination of $\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k$, ${\bar{\epsilon}}_k$, and ${\bar{\alpha}}_k\|\nabla\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\|^2$. Throughout the analysis, we condition on $\mathcal{F}_{{\bar{K}}}$ and only study the iterates after ${\bar{K}}$ iterations. By simple calculations (as proved in Appendix \ref{pf:N:14}), we have \begin{equation}\label{N:14} \begin{aligned} \nbr{\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k + \nu{\bar{M}}_k G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k + G_k^Tc_k\\ \nu G_kG_k^TG_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}} \leq \Upsilon_1\nbr{\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}},\\ \Upsilon_2\nbr{\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}} \leq \nbr{\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix}} \leq \Upsilon_3\nbr{\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}},\\ \nbr{\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}} \leq \Upsilon_4\nbr{\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ G_k{\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}^k \end{pmatrix}}, \end{aligned} \end{equation} for some constants $\{\Upsilon_i\}_{i=1}^4$. We have the following two lemmas, which connect the stochastic line search with deterministic line search. \begin{lemma}\label{lem:8} For $k\geq {\bar{K}}$, we suppose the event $\mathcal{A}_k\cap\mathcal{B}_k$ happens, where $\mathcal{A}_k$ is defined in \eqref{event:A_k} and $\mathcal{B}_k$ is defined in \eqref{event:B_k}. If \begin{equation*} {\bar{\alpha}}_k\leq \frac{(1-\beta)\gamma_{RH}}{2\rbr{\kappa_{\mathcal{L}_{{\tilde{\mu}}, \nu}} \Upsilon_3^2 + \kappa_{grad}\Upsilon_1\Upsilon_3 + \kappa_f\gamma_{RH}}}, \end{equation*} then the $k$-th step is a successful step (i.e. the Armijo condition is satisfied). \end{lemma} \begin{proof} See Appendix \ref{pf:lem:8}. \end{proof} \begin{lemma}\label{lem:A:2} For $k\geq K$, we suppose $\mathcal{B}_k$ happens. If the $k$-th step is a successful step, then \begin{equation*} \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^{s_k} \leq \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k + \frac{{\bar{\alpha}}_k\beta}{2}\begin{pmatrix} {\bar{\nabla}}_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ {\bar{\nabla}}_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}^T\begin{pmatrix} {\bar{\Delta}}{\boldsymbol{x}}^k\\ {\bar{\Delta}}{\boldsymbol{\lambda}}^k \end{pmatrix}. \end{equation*} \end{lemma} \begin{proof} See Appendix \ref{pf:lem:A:2}. \end{proof} Using the above two lemmas, we analyze the one-step error recursion for $\Phi_{{\bar{\mu}}_{{\bar{K}}}, \nu, \omega}^k$. We consider three cases of approximation of Algorithm \ref{alg:ASto:SQP}: $\mathcal{A}_k\cap \mathcal{B}_k$, $\mathcal{A}_k^c\cap \mathcal{B}_k$, and $\mathcal{B}_k^c$. We analyze them in the next three lemmas. \begin{lemma}\label{lem:4} For $k \geq {\bar{K}}$, we suppose the event $\mathcal{A}_k\cap\mathcal{B}_k$ happens. Let \begin{equation}\label{equ:cond:omega:1} \frac{\omega}{1-\omega} \geq \frac{32\rho \rbr{\kappa_{\mathcal{L}_{{\tilde{\mu}}, \nu}}\alpha_{max}\Upsilon_3 \vee \rbr{\kappa_{grad}\alpha_{max}\Upsilon_1 + \Upsilon_4} }^2 }{\beta\gamma_{RH}} \vee 4(\rho-1). \end{equation} Then \begin{equation*} \Phi_{{\bar{\mu}}_{{\bar{K}}}, \nu, \omega}^{k+1} - \Phi_{{\bar{\mu}}_{{\bar{K}}}, \nu, \omega}^k = -\frac{1}{2}(1-\omega)\rbr{1-\frac{1}{\rho}}\rbr{{\bar{\epsilon}}_k + {\bar{\alpha}}_k\nbr{\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}}^2}. \end{equation*} \end{lemma} \begin{proof} See Appendix \ref{pf:lem:4}. \end{proof} \begin{lemma}\label{lem:5} For $k\geq {\bar{K}}$, we suppose the event $\mathcal{A}_k^c\cap\mathcal{B}_k$ happens. Suppose $\omega$ satisfies \eqref{equ:cond:omega:1}. Then \begin{equation*} \Phi_{{\bar{\mu}}_{{\bar{K}}}, \nu, \omega}^{k+1} - \Phi_{{\bar{\mu}}_{{\bar{K}}}, \nu, \omega}^k \leq \rho(1-\omega){\bar{\alpha}}_k\nbr{\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}}^2. \end{equation*} \end{lemma} \begin{proof} See Appendix \ref{pf:lem:5}. \end{proof} \begin{lemma}\label{lem:7} For $k\geq {\bar{K}}$, we suppose the event $\mathcal{B}_k^c$ happens. Suppose $\omega$ satisfies \eqref{equ:cond:omega:1}. Then \begin{equation*} \Phi_{{\bar{\mu}}_{{\bar{K}}}, \nu, \omega}^{k+1} - \Phi_{{\bar{\mu}}_{{\bar{K}}}, \nu, \omega}^k \leq \rho(1-\omega){\bar{\alpha}}_k\nbr{\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}}^2 + \omega\rbr{ \abr{{\bar{\mL}}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^{s_k} - \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^{s_k}} + \abr{{\bar{\mL}}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k - \mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k} }. \end{equation*} \end{lemma} \begin{proof} See Appendix \ref{pf:lem:7}. \end{proof} The above three lemmas show how $\Phi_{{\bar{\mu}}_{{\bar{K}}}, \nu, \omega}^k$ changes in each iteration. We observe from Lemma \ref{lem:5} and \ref{lem:7} that if either function or gradient are imprecisely estimated, then there is no guarantee that $\Phi_{{\bar{\mu}}_{{\bar{K}}}, \nu, \omega}^k$ will decrease. The following theorem shows that the increase of $\Phi_{{\bar{\mu}}_{{\bar{K}}}, \nu, \omega}^k$ can be controlled, when probabilities $p_f, p_{grad}$ of bad events are small enough. In particular, in expectation, $\Phi_{{\bar{\mu}}_{{\bar{K}}}, \nu, \omega}^k$ always decreases. Our analysis is conditional on $\mathcal{F}_{{\bar{K}}}$, so that $({\boldsymbol{x}}^{{\bar{K}}+1}, {\boldsymbol{\lambda}}^{{\bar{K}}+1})$ and ${\bar{\mu}}_{{\bar{K}}}$ are fixed. To simplify notations, we let $\Phi_{{\bar{\mu}}_{{\bar{K}}}}^k$ denote $\Phi_{{\bar{\mu}}_{{\bar{K}}}, \nu, \omega}^k$. Recall that $\omega$ is not a parameter of the algorithm. \begin{theorem}[One-step error recursion]\label{thm:5} For $k>{\bar{K}}$, suppose $\omega$ satisfies \eqref{equ:cond:omega:1} and $p_f, p_{grad}$ satisfy \begin{equation}\label{cond:pp} \frac{p_{grad} + \sqrt{p_f}}{(1-p_{grad})(1-p_f)} \leq \frac{\rho-1}{8\rho}\rbr{\frac{1}{\rho} \wedge \frac{1-\omega}{\omega}}. \end{equation} Then, \begin{equation*} \mathbb{E}[\Phi_{{\bar{\mu}}_{{\bar{K}}}}^{k+1} - \Phi_{{\bar{\mu}}_{{\bar{K}}}}^k \mid \mathcal{F}_{k-1}] \leq -\frac{1}{4}(1-p_{grad})(1-p_f)(1-\omega)\rbr{1-\frac{1}{\rho}}\rbr{{\bar{\epsilon}}_k + {\bar{\alpha}}_k\nbr{\begin{pmatrix} \nabla_{{\boldsymbol{x}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k\\ \nabla_{{\boldsymbol{\lambda}}}\mathcal{L}_{{\bar{\mu}}_{{\bar{K}}}, \nu}^k \end{pmatrix}}^2}. \end{equation*} \end{theorem} \begin{proof} See Appendix~\ref{pf:thm:5}. \end{proof} Based on the one-step error recursion, the following theorem shows the convergence of ${\bar{\alpha}}_k\|\nabla\mathcal{L}^k\|^2$. \begin{theorem}\label{thm:6} Suppose the conditions of Theorem \ref{thm:5} are satisfied. Then, almost surely, we have $\lim\limits_{k\rightarrow \infty}{\bar{\alpha}}_k \|\nabla\mathcal{L}^k\|^2 = 0$. \end{theorem} \begin{proof} See Appendix \ref{pf:thm:6}. \end{proof} Our final result establishes the ``liminf'' convergence of $\nabla\mathcal{L}^k$. A key step is to apply the lower bound on the stochastic stepsize in Lemma \ref{lem:8}. Based on this lemma, when both the gradient and function are precisely estimated, a stepsize that is smaller than a fixed threshold will always induce a successful step. If we regard $\{{\bar{\alpha}}_k\}_k$ as a random walk, the supreme of ${\bar{\alpha}}_k$ will not vanish due to a positive upward drift probability. \begin{theorem}[Global convergence]\label{thm:7} Consider Algorithm \ref{alg:ASto:SQP} under Assumption \ref{ass:A:1}. Suppose $\omega$ satisfies \eqref{equ:cond:omega:1} and $p_f, p_{grad}$ satisfy \eqref{cond:pp}. Then, almost surely, we have that \begin{equation*} \liminf_{k\rightarrow \infty}\|\nabla\mathcal{L}^k\| = 0. \end{equation*} \end{theorem} \begin{proof} See Appendix \ref{pf:thm:7}. \end{proof} We have completed the global analysis of Algorithm \ref{alg:ASto:SQP}. For Algorithm \ref{alg:NSto:SQP}, we show in Theorem~\ref{thm:4} that $\liminf_{k\rightarrow\infty}\mathbb{E}[\|\nabla\mathcal{L}^k\|] = 0$, which is standard in stochastic optimization with decaying stepsize. By Fatou's lemma, we further have $\mathbb{E}\sbr{\liminf_{k\rightarrow \infty}\|\nabla\mathcal{L}^k\|} = 0$. However, this result is weaker than the one in Theorem~\ref{thm:7}, where we show $\liminf_{k\rightarrow \infty}\|\nabla\mathcal{L}^k\| = 0$ almost surely. Our result matches the convergence of many non-stochastic algorithms, such as nonlinear conjugate gradient descent \citep{Nocedal2006Numerical}. Compared to Algorithm \ref{alg:NSto:SQP} and StoSQP in \cite{Berahas2020Sequential}, we say Algorithm \ref{alg:ASto:SQP} is adaptive. This does not mean Algorithm \ref{alg:ASto:SQP} has no tuning parameters. In practice, we still need to tune the two error probabilities $p_f, p_{grad}$, and two constants $C_{grad}, C_f$ in Lemmas \ref{lem:cond:1}, \ref{lem:cond:2}. However, this is significantly easier and more convenient than tuning the whole stepsize sequence $\{\alpha_k\}_k$. During the iteration process, Algorithm \ref{alg:ASto:SQP} is able to adjust the stepsize itself, while Algorithm \ref{alg:NSto:SQP} and StoSQP in \cite{Berahas2020Sequential} rely on the prespecified stepsize sequences. It is in this sense that Algorithm \ref{alg:ASto:SQP} is adaptive. However, there is no free lunch. Algorithm~\ref{alg:ASto:SQP} requires a large sample size for having an accurate model with high probability. As a comparison, Algorithm~\ref{alg:NSto:SQP} only needs one sample in each iteration, making it more sample efficient. On the other hand, there is a substantial drawback stemming from over/underestimated stepsizes. In summary, Algorithm~\ref{alg:ASto:SQP} is more robust to tuning parameters, while requiring more samples, and Algorithm~\ref{alg:NSto:SQP} is more sensitive to tuning parameters, while requiring fewer samples. \section{Experiments}\label{sec:5} We implement three StoSQP algorithms for solving constrained nonlinear problems in the CUTEst test set \citep{Gould2014CUTEst}. We use a Julia implementation of the CUTEst \citep{Siqueira2020CUTEst.jl}. The three algorithms that we consider are the $\ell_1$ penalized SQP in \cite{Berahas2020Sequential}, NonAdapSQP in Algorithm~\ref{alg:NSto:SQP}, and AdapSQP in Algorithm~\ref{alg:ASto:SQP}. Of more than 1000 problems in the CUTEst collection, we select the problems that have a non-constant objective with only equality constraints, satisfy $d<1000$, and do not report singularity on $G_kG_k^T$ during the iteration process. This results in a total of 47 problems. The implementation details of each algorithm are as follows. Our code is available at \url{https://github.com/senna1128/Constrained-Stochastic-Optimization}. \begin{enumerate}[label=(\alph*),topsep=0pt] \setlength\itemsep{0.0em} \item The $\ell_1$ SQP in \cite{Berahas2020Sequential}. We implement Algorithm 3 in \cite{Berahas2020Sequential} following the setup in their paper. In particular, using their notations, we let ${\bar{\tau}}_{-1} = 1$, $\epsilon = 10^{-6}$, $\sigma = 0.5$, $\bar{\xi}_{-1} = 1$, and $\theta = 10$. The Lipschitz constant is estimated around the initialization. We try multiple choices for the stepsize related sequence $\{\beta_k\}_k$. In the constant case, we let $\beta_k = 0.01, 0.1, 0.5, 1$ and, in the decaying case, we let $\beta_k = 1/k^{0.6}$ or $1/k^{0.9}$. Note that \cite{Berahas2020Sequential} only tried $\beta_k = 1$. \item NonAdapSQP in Algorithm \ref{alg:NSto:SQP}. Following the same setup as above, we try $\alpha _k = 0.01, 0.1, 0.5, 1$ and $\alpha_k = 1/k^{0.6}$ or $1/k^{0.9}$. \item AdapSQP in Algorithm \ref{alg:ASto:SQP}. We let $\nu = 0.001$, ${\bar{\alpha}}_0 = \alpha_{max} = 1.5$, ${\bar{\mu}}_0 ={\bar{\epsilon}}_0 =\kappa_{grad}= 1$, $\beta = 0.3$, $\rho = 1.2$, $p_{grad} = p_f = 0.9$, $ \kappa_f = 0.04$, $C_{grad} = C_f = 2$. Recall that $C_{grad}$ and $C_f$ are used in selecting $|\xi_g^k|$ and $|\xi_f^k|$ using \eqref{cond:11} and \eqref{cond:2}, respectively. \end{enumerate} For all algorithms, the initialization of primal-dual variables are given by the CUTEst package. Moreover, the CUTEst package provides the deterministic evaluation of the function, the gradient, and the Hessian at any iterates. Based on them, we generate our estimators. In particular, the estimator of $f_k$ is drawn from ${\mathcal N}(f_k, \sigma^2)$, the estimator of $\nabla f_k$ is drawn from ${\mathcal N}(\nabla f_k, \sigma^2(I + {\boldsymbol{1}}\b1^T))$, where ${\boldsymbol{1}}$ denotes the $d$-dimensional all one vector, and the $(i, j)$ and $(j, i)$ entries of the estimator of $\nabla^2 f_k$ is drawn from ${\mathcal N}((\nabla^2 f_k)_{i,j}, \sigma^2)$, with $\sigma^2 = 10^{-8}, 10^{-4}, 10^{-2}, 10^{-1},1$. Throughout the simulation,we let $B_k = I$ and set the maximum iteration budget to be $10^5$. For each algorithm, under each setup (a combination of stepsize and a noise level), we average over 5 independent runs. The stopping criterion is set as \begin{align*} \min(\|{\bar{\alpha}}_k\cdot({\bar{\Delta}}{\boldsymbol{x}}^k; {\bar{\Delta}}{\boldsymbol{\lambda}}^k)\| \wedge \|\nabla \mathcal{L}^k\| ) \leq 10^{-4} \quad \text{OR}\quad k \geq 10^5. \end{align*} If the former happens, we say that the algorithm converges, while if the latter happens, we say that the algorithm diverges. For the $\ell_1$ SQP, ${\bar{\alpha}}_k$ is determined by $\beta_k$ (see \cite{Berahas2020Sequential}) and we also drop ${\bar{\Delta}}{\boldsymbol{\lambda}}^k$ in the first term. We evaluate each algorithm in two aspects: the KKT residual $\|\nabla \mathcal{L}^k\|$, that is the sum of the feasibility error and the optimality error, and the running time. For the $\ell_1$ SQP and NonAdapSQP, we have six cases for both: 4 constant stepsizes and 2 decay stepsizes. The AdapSQP does not need to specify the stepsize in advance. The KKT residual boxplot and the running time boxplot are shown in Figures~\ref{fig:1} and \ref{fig:2}, respectively. From Figure \ref{fig:1}, we observe that NonAdapSQP performs better than the $\ell_1$ SQP when the stepsize is small or the stepsize is decaying. When the stepsize is a large constant, say $0.5$ or $1$, NonAdapSQP may not converge for all problems, especially when the noise level is also high. Interestingly, we only observe the advantage of the decaying stepsize over the constant stepsize for NonAdapSQP, while the $\ell_1$ SQP with a decaying stepsize generally performs worse than with a constant stepsize. As expected, AdapSQP performs the best in all cases under all levels of noises. The superiority is evident when the noise level is high: both NonAdapSQP and the $\ell_1$ SQP cannot obtain a satisfactory KKT residual when $\sigma^2=1$, while the convergence of AdapSQP is stable. This is reasonable as we draw more samples in AdapSQP and have a more accurate model in each iteration. Surprisingly, we see from Figure \ref{fig:2} that having an accurate model in AdapSQP is not as time-consuming as what we expect. In general, AdapSQP requires more time compared to NonAdapSQP and the $\ell_1$ SQP. However, there are some exceptions: \begin{enumerate}[label=(\alph*),topsep=0pt] \setlength\itemsep{0.0em} \item When the stepsize is a small constant, the running time for all three algorithms are comparable (see Figure \ref{TConst1}), but AdapSQP obtains at least $10^2$ times better results in KKT residual (see Figure \ref{KConst1}) than the other two algorithms. \item The running time for NonAdapSQP and the $\ell_1$ SQP increases evidently as the noise level increases (see Figure \ref{TConst2}-\ref{TConst4}), while AdapSQP has very stable running time across all noise levels. \item When the noise level is high, AdapSQP and the $\ell_1$ SQP have comparable running time (see Figure \ref{TConst4}), while only AdapSQP can converge to a KKT point (see Figure \ref{KConst4}). \item When the stepsize is decaying, the running time of AdapSQP and NonAdapSQP gets closer as noise level increases (see Figure \ref{TDecay1}), while AdapSQP steadily performs much better than NonAdapSQP in KKT residuals (see Figure \ref{KDecay1}). \end{enumerate} We emphasize that it is not meaningful to compare the running time in some cases. For example, in Figure \ref{TDecay2}, AdapSQP requires more time than the $\ell_1$ SQP. However, from Figure \ref{KDecay2}, we observe that the $\ell_1$ SQP fails to converge to a KKT point. The large KKT residual suggests that the algorithm terminates due to ${\bar{\alpha}}_k\|{\bar{\Delta}}{\boldsymbol{x}}^k\|\leq 10^{-4}$, which is implicitly because of the fast decay rate of $\beta_k$. We also note that when $\alpha_k, \beta_k = 0.5$ or $1$ and $\sigma^2 = 10^{-8}$, NonAdapSQP and the $\ell_1$ SQP perform similarly to AdapSQP, while requiring much less time. However, such a low noise level is unrealistic in practice. In summary, we observe from Figures \ref{fig:1} and \ref{fig:2} that AdapSQP produces lower KKT residuals in all cases of the stepsize under all noise levels. When the noise level is high or stepsize is small, the running time of AdapSQP is comparable with the other two algorithms, but only it converges stably. The only case where AdapSQP is not preferred is when the stepsize is large \textbf{and} the noise level is low. We also observe that the performance of both NonAdapSQP and the $\ell_1$ SQP depends on the prespecified stepsize sequences, while AdapSQP requires no such sequence and is more robust to the tuning parameters. We provide detailed convergence results for each selected CUTEst problem in Tables \ref{tab:1}, \ref{tab:2}, and \ref{tab:3} in Appendix \ref{sec:appen:5}. \begin{figure}[!htp] \centering \subfigure[$\alpha_k, \beta_k = 0.01$]{\label{KConst1}\includegraphics[width=77mm]{Figure/KKTCon1.png}} \subfigure[$\alpha_k, \beta_k = 0.1$]{\label{KConst2}\includegraphics[width=77mm]{Figure/KKTCon2.png}} \subfigure[$\alpha_k, \beta_k = 0.5$]{\label{KConst3}\includegraphics[width=77mm]{Figure/KKTCon3.png}} \subfigure[$\alpha_k, \beta_k = 1$]{\label{KConst4}\includegraphics[width=77mm]{Figure/KKTCon4.png}} \subfigure[$\alpha_k, \beta_k = k^{-0.6}$]{\label{KDecay1}\includegraphics[width=77mm]{Figure/KKTDecay1.png}} \subfigure[$\alpha_k, \beta_k = k^{-0.9}$]{\label{KDecay2}\includegraphics[width=77mm]{Figure/KKTDecay2.png}} \includegraphics[width=0.3\textwidth]{Figure/legend} \caption{KKT residual boxplot. Each panel corresponds to a stepsize setup, $\alpha_k$ for NonAdapSQP and $\beta_k$ for the $\ell_1$ SQP. Each panel has $5$ groups, corresponding to $5$ different $\sigma^2$. The results of AdapSQP on all panels are the same.}\label{fig:1} \end{figure} \begin{figure}[!htp] \centering \subfigure[$\alpha_k, \beta_k = 0.01$]{\label{TConst1}\includegraphics[width=77mm]{Figure/TimeCon1.png}} \subfigure[$\alpha_k, \beta_k = 0.1$]{\label{TConst2}\includegraphics[width=77mm]{Figure/TimeCon2.png}} \subfigure[$\alpha_k, \beta_k = 0.5$]{\label{TConst3}\includegraphics[width=77mm]{Figure/TimeCon3.png}} \subfigure[$\alpha_k, \beta_k = 1$]{\label{TConst4}\includegraphics[width=77mm]{Figure/TimeCon4.png}} \subfigure[$\alpha_k, \beta_k = k^{-0.6}$]{\label{TDecay1}\includegraphics[width=77mm]{Figure/TimeDecay1.png}} \subfigure[$\alpha_k, \beta_k = k^{-0.9}$]{\label{TDecay2}\includegraphics[width=77mm]{Figure/TimeDecay2.png}} \includegraphics[width=0.3\textwidth]{Figure/legend} \caption{Running time boxplot. Each panel corresponds to a stepsize setup, $\alpha_k$ for NonAdapSQP and $\beta_k$ for $\ell_1$ SQP. Each panel has $5$ groups, corresponding to $5$ different $\sigma^2$. The results of AdapSQP on all panels are the same.}\label{fig:2} \end{figure} \section{Conclusions}\label{sec:6} We proposed an adaptive StoSQP for solving constrained stochastic optimization problems. Our StoSQP framework uses a differentiable exact augmented Lagrangian as the merit function and incorporates a line search procedure to select the stepsize. To this end, we first revisited a classical SQP in \cite{Lucidi1990Recursive} for deterministic objectives. We simplified that algorithm and modified the penalty parameter selection step. We then designed a non-adaptive StoSQP, where the stepsize is given by a deterministic prespecified sequence. We established the global convergence, which matches the results in \cite{Berahas2020Sequential}. Finally, using a stochastic line search method, we developed an adaptive StoSQP that chooses the stepsize adaptively in each iteration. By adjusting the condition on selecting the penalty parameter, the algorithm automatically avoids converging to stationary points of the merit function where the KKT residuals do not vanish. We established a stronger global convergence result for the adaptive StoSQP. We leave the extension to inequality-constrained stochastic optimization for future work, as well as, the development of a more involved StoSQP algorithm, such as trust-region StoSQP. Moreover, establishing a local convergence result is very promising, which is missing in almost all literature on stochastic optimization. Finally, applying some acceleration techniques such as momentum and heavy ball to StoSQP is also an interesting future research direction.
\section{Introduction} Long-range correlations play a crucial role in strongly interacting electronic systems. They are responsible for various phenomena as for instance magnetism, charge density waves and superconductivity. A consistent treatment of nonlocal collective electronic fluctuations often appears to be a challenging task. It is important for an accurate description not only of these effective bosonic modes themselves, but also of their influence on the single-particle characteristics of the system. A consistent model description of strongly-correlated materials should be able to identify leading collective instability channels governing physical processes in the system. Apart from giving physical insight, this often drastically diminishes technical efforts required for solving the problem. Hubbard model is a minimal model that accounts for the interplay between kinetic energy and Coulomb interaction of electrons. For infinite number of spatial dimensions, the Hubbard model can be solved exactly by means of the dynamical mean-field theory (DMFT)~\cite{RevModPhys.68.13}, where the self-energy becomes purely local~\cite{PhysRevLett.62.324}. DMFT is a nonperturbative method that accurately accounts for local correlations by mapping the original lattice model onto an auxiliary local impurity problem, which can be solved numerically exactly. In finite dimensions DMFT turns out to be a good approximation for single-particle quantities, in particular when local correlations are strong~\cite{PhysRevB.91.235114, PhysRevX.11.011058}. However, DMFT reaches its limits when spatial fluctuations become large~\cite{PhysRevB.102.224423}. Further, cluster extensions of DMFT ~\cite{PhysRevB.58.R7475, PhysRevB.62.R9283, RevModPhys.77.1027, PhysRevLett.87.186401, doi:10.1063/1.2199446, RevModPhys.78.865, PhysRevB.94.125133} have been introduced to consider nonlocal correlation effects. However, the range of spatial correlations captured by these methods is limited by the size of the cluster. For this reason, long-range collective fluctuations are usually described by various diagrammatic extensions of DMFT~\cite{RevModPhys.90.025003}. Some of these approaches, such as the $GW$+DMFT~\cite{PhysRevLett.92.196402, PhysRevLett.90.086402, PhysRevLett.109.226401, PhysRevB.87.125149, PhysRevB.90.195114, PhysRevB.94.201106, PhysRevB.95.245130}, the triply irreducible local expansion (TRILEX)~\cite{PhysRevB.92.115109, PhysRevB.93.235124, PhysRevLett.119.166401}, and the dynamical vertex approximation (D$\Gamma$A)~\cite{PhysRevB.75.045118, PhysRevB.80.075104}, as well as most applications of the dual fermion (DF)~\cite{PhysRevB.77.033101, PhysRevB.79.045133, PhysRevLett.102.206401, BRENER2020168310} and the dual boson (DB)~\cite{Rubtsov20121320, PhysRevB.90.235135, PhysRevB.93.045107, PhysRevB.94.205110, PhysRevB.100.165128} theories, take into account only a particular subset of diagrams corresponding to certain channels of instability. Others are based on the exact diagrammatic Monte Carlo (DiagMC) method~\cite{PhysRevLett.81.2514, Kozik_2010}, which allows to consider all diagrammatic contributions~\cite{PhysRevB.94.035102, PhysRevB.96.035152, PhysRevB.102.195109}. $GW$+DMFT is a simple method that is widely used for calculating properties of realistic materials~\cite{PhysRevLett.113.266403, Tomczak_2012, Taranto13, Sakuma13, Tomczak14}. However, among various long-range fluctuations this approach considers only collective charge excitations and does not account for vertex corrections. The latter are important for an accurate description of magnetic, optical and transport properties of the system~\cite{Aryasetiawan08, Sponza17, doi:10.1143/JPSJ.75.013703, PhysRevB.80.161105, Katsnelson_2010, PhysRevB.84.085128, Ado_2015, PhysRevLett.117.046601, PhysRevLett.123.036601, PhysRevLett.124.047401, 2020arXiv201009052S}. More elaborate theories like DF, DB, and D$\Gamma$A, which address all leading collective fluctuations on equal footing, account for vertex corrections and appear to be in a good agreement with numerically exact methods~\cite{PhysRevB.94.035102, PhysRevB.96.035152, PhysRevB.97.125114, PhysRevX.11.011058, PhysRevB.102.195109}. However, the use of the renormilized local four-point vertex makes all these methods numerically expensive for application to realistic materials~\cite{PhysRevB.95.115107, doi:10.7566/JPSJ.87.041004, PhysRevB.103.035120}. At the same time, this vertex cannot be simply neglected, because it represents the screened local interaction between electrons. Therefore, a consistent description of the long-range collective fluctuations requires a theory that combines the simplicity of the $GW$+DMFT diagrammatic scheme with vertex corrections and the equal-footing description of the leading collective modes provided by more elaborate approaches. To resolve this issue, a simple consistent diagrammatic extension of DMFT, dubbed ``dual TRILEX'' ($\text{D-TRILEX}$), has recently been proposed in Ref.~\onlinecite{StepanovHarkov}. This method is a derivative of the DB approach and is based on a set of Hubbard-Stratonovich transformations of fermionic and bosonic variables. This allows to consider local correlation effects exactly within the impurity problem of DMFT, and nonlocal effects perturbatively. The resulting approach considers all leading collective electronic fluctuations on equal footing without any limitation on the range. Unlike the DB method, the $\text{D-TRILEX}$ approach relies on a partially bosonized representation for the renormalized local four-point vertex~\cite{StepanovHarkov} that uncovers explicit contributions of different collective modes. A single (spin or charge) mode approximation of the vertex can be found in prior works~\cite{PhysRevB.94.205110, Stepanov18, Stepanov19}. Similar approximations for the four-point vertex have also been discussed in Refs.~\onlinecite{Husemann09, Friederich10, Gunnarsson15, Krien19-4}. However, only the special form of the partially bosonized approximation introduced in the Ref.~\onlinecite{StepanovHarkov} allows to derive the $\text{D-TRILEX}$ theory that with a low computational complexity comparable to $GW$+DMFT or TRILEX methods reproduces the result of the much more elaborate DB theory even in the strongly-interacting regime. Additionally, unlike the TRILEX method, the $\text{D-TRILEX}$ approach accounts for vertex corrections for both lattice sites that are involved in nonlocal diagrams for the self-energy and the polarization operator. For instance, this allows to preserve the correct orbital structure of considered diagrams~\cite{2020arXiv201003433S}. Furthermore, the $\text{D-TRILEX}$ approach does not suffer from the famous Fierz ambiguity problem~\cite{Jaeckel03, Baier04, Jaeckel02}, which plagues many theories that perform a partially bosonized description of collective modes. The $\text{D-TRILEX}$ theory was introduced only recently~\cite{StepanovHarkov}, and although it has already been extended to a multi-orbital case~\cite{2020arXiv201003433S}, its limits of applicability have not been studied in details so far. In this work we address this important question and justify the validity of the theory in a broad range of physical parameters. To this aim we consider a two-dimensional (2D) Hubbard model on a square lattice and compare the performance of the $\text{D-TRILEX}$ approach with its parental DB method and the numerically exact $\text{DiagMC}$ theory. Note that in this case the absence of the nonlocal interaction and the bosonic hybridization function identically reduces the DB theory to the DF approach. To evaluate the impact of different collective fluctuations on the self-energy, we exploit a partially bosonized representation of the full local four-point vertex and obtain the exact solution of the dual problem with the $\text{DiagMC@DF}$ method~\cite{PhysRevB.96.035152, PhysRevB.102.195109}, as well as the approximate ladder DF solution of the problem. In particular, we explicitly investigate the effect of particle-particle fluctuations that enter the four-point vertex function, since they are believed to be negligibly small at standard fillings~\cite{Pao94}. As the result, we show that exclusion of the irreducible part and transverse contributions from the four-point vertex function often does not lead to a noticeable change of the result, but significantly reduces costs of numerical calculations. The paper is organized as follows: the Section II contains a brief derivation of the $\text{D-TRILEX}$ theory presented in Ref.~\onlinecite{StepanovHarkov}. In Section III we compare the $\text{D-TRILEX}$ self-energy with the ladder DF, the DiagMC@DF, and the exact $\text{DiagMC}$ results in a broad range of temperatures and local interactions. Finally, the Section IV is devoted to conclusions. \section{Theory} \label{sec:Theory} In this Section we highlight the key points of the derivation of the $\text{D-TRILEX}$ method. We begin with the extended Hubbard model described by the following lattice action \begin{align} {\cal S}_{\rm latt} = &-\sum_{k,\sigma} c^{*}_{k\sigma} {\cal G}^{-1}_{k\sigma} c^{\phantom{*}}_{k\sigma} + U\sum_{q}n^{*}_{q\uparrow}n^{\phantom{*}}_{q\downarrow} + \sum_{q,\vartheta} \xi^{\vartheta} \Bigg\{\rho^{*\,\vartheta}_{q} V^{\vartheta}_{\mathbf{q}} \, \rho^{\vartheta}_{q} \Bigg\} \label{eq:action_latt} \end{align} Here, the Grassmann variable $c^{(*)}_{k\sigma}$ with the combined index $k=\{\mathbf{k},\nu\}$ describes the annihilation (creation) of an electron with momentum $\mathbf{k}$, fermionic Matsubara frequency $\nu$, and spin $\sigma = \{\uparrow, \downarrow\}$. ${\cal G}_{k\sigma} = [i\nu+\mu - \varepsilon_{\mathbf{k}}]^{-1}$ is the bare lattice Green's function, where $\varepsilon^{\phantom{*}}_{\mathbf{k}}$ is the dispersion of electrons, and $\mu$ is the chemical potential. $U$ describes the on-site Coulomb interaction between electron densities $n_{q\sigma} = \sum_{k} c^{*}_{k+q, \sigma} c^{\phantom{*}}_{k\sigma}$ that depend on momentum $\mathbf{q}$ and bosonic Matsubara frequency $\omega$ through the combined index $q=\{\mathbf{q},\omega\}$. For the sake of generality, we also introduce a nonlocal interaction $V_{\mathbf{q}}$ in different bosonic channels $\vartheta=\{\varsigma,\text{s}\}$, where ``$\varsigma$'' denotes the particle-hole channel with density ($\varsigma=\text{d}$) and magnetic ($\varsigma=\text{m} = \{x,y,z\}$) components, and ``s'' labels the particle-particle singlet channel. For numerical calculations we restrict ourselves to the Hubbard model and set these nonlocal interactions to zero at the end of the derivation. To shorten the expression for the action we introduce the prefactor $\xi^{\vartheta}$ that for the particle-hole and particle-particle channels respectively reads $\xi^{\varsigma}=1/2$ and $\xi^{\rm s}=1$. Corresponding composite bosonic variables ${\rho^{\vartheta}_{q} = n^{\vartheta}_{q}-\langle{}n^{\vartheta}\rangle}$ are introduced as follows \begin{align} n^{\varsigma}_{q} &= \sum_{k,\sigma\sigma'} c^{*}_{k+q, \sigma} \, \sigma^{\varsigma}_{\sigma\sigma'} c^{\phantom{*}}_{k\sigma'} \label{eq:ndm}\\ n^{\rm s}_{q} &= \frac12\sum_{k,\sigma\sigma'} c^{\phantom{*}}_{q-k, \overline{\sigma}} \, \sigma^{\,z}_{\sigma\sigma'} c^{\phantom{*}}_{k\sigma'} \label{eq:ns} \\ n^{*\,\rm s}_{q} &= \frac12\sum_{k,\sigma\sigma'} c^{*}_{k\sigma} \, \sigma^{\,z}_{\sigma\sigma'} c^{*}_{q-k, \overline{\sigma}^{\,\prime}} \label{eq:ns*} \end{align} where $\sigma^{x,y,z}$ are Pauli matrices in the spin space, $\sigma^{\text{d}}$ is the identity matrix in the same space, and $\overline{\sigma}$ is the opposite spin projection to $\sigma$. The variable $n^{*\,\varsigma}_{q}$ can be found from the relation $n^{*\,\varsigma}_{q} = n^{\varsigma}_{-q}$, and is introduced to unify notations. Note that in the single-band case considered here the composite bosonic variables for the triplet channel are identically equal to zero. The $\text{D-TRILEX}$ approach, as well as its parental DB theory, performs a diagrammatic expansion around a reference system~\cite{BRENER2020168310}, which in this particular work is given by the exactly solvable effective local impurity problem of DMFT~\cite{RevModPhys.68.13} \begin{align} {\cal S}_{\rm imp} =& -\sum_{\nu,\sigma} c^{*}_{\nu\sigma} \left[ i\nu+\mu-\Delta^{\phantom{*}}_{\nu} \right] c^{\phantom{*}}_{\nu\sigma} + U\sum_{\omega}n^{*}_{\omega\uparrow}n^{\phantom{*}}_{\omega\downarrow} \label{eq:actionimp} \end{align} Here, we introduce the fermionic hybridization function $\Delta_{\nu}$ that aims to describe the screening effect of ``bath'' electrons that surround the given lattice site, which plays a role of the local impurity. Note that in the current work we do not consider the bosonic hybridization function, which is usually introduced for the impurity problem of the extended dynamical mean-field theory (EDMFT)~\cite{PhysRevB.52.10295, PhysRevLett.77.3391, PhysRevB.61.5184, PhysRevLett.84.3678, PhysRevB.63.115110}. In DMFT the fermionic hybridization is determined self-consistently demanding that the local part of the dressed lattice Green's function $G_{k\sigma}$ is equal to the Green's function $g_{\nu\sigma}$ of the impurity problem~\eqref{eq:actionimp}. To be consistent, the same hybridization function $\Delta_{\nu}$ has to be subtracted from the remaining part of the lattice action ${{\cal S}_{\rm rem} = {\cal S}_{\rm latt} - \sum_{i} {\cal S}_{\rm imp}}$ so that the original lattice problem~\eqref{eq:action_latt} remains unchanged. The impurity problem~\eqref{eq:actionimp} can be solved numerically exactly using e.g. continious-time quantum Monte Carlo (CTQMC) solvers~\cite{PhysRevB.72.035122, PhysRevLett.97.076405, PhysRevLett.104.146401, RevModPhys.83.349}. This allows to obtain not only the single-particle Green's function $g_{\nu\sigma}$ and the corresponding self-energy $\Sigma^{\rm imp}_{\nu\sigma}$, but also the two-particle quantities in all bosonic channels $\vartheta$ of interest. The latter include the susceptibility $\chi_{\omega}$, the renormalized interaction $w_{\omega}$, and the polarization operator $\Pi^{\rm imp}_{\omega}$, as well as the renormalized local four-point $\Gamma_{\nu\nu'\omega}$ and three-point $\Lambda^{\hspace{-0.05cm}(*)}_{\nu\omega}$ vertex functions. The remaining part of the lattice action ${\cal S}_{\rm rem}$ cannot be taken into account exactly. Instead, it is treated diagrammatically performing an expansion around the impurity problem~\eqref{eq:actionimp}. In a consistent way, this procedure can be carried out with the help of a Hubbard-Stratonovich transformation. The latter allows to rewrite the ${\cal S}_{\rm rem}$ in terms of new fermionic $f$ and bosonic $\varphi$ fields that are dual to original electronic $c$ and composite $\rho$ variables. After that, the impurity problem~\eqref{eq:actionimp} with all original variables can be integrated out, which excludes the possibility of the double counting between ${\cal S}_{\rm imp}$ and ${\cal S}_{\rm rem}$ parts of the lattice problem. This yields the dual boson action (see Ref.~\onlinecite{StepanovHarkov} and Appendix~\ref{app:DB}) \begin{align} {\cal \tilde{S}} = &-\sum_{k,\sigma} f^{*}_{k\sigma}\tilde{\cal G}^{-1}_{k\sigma}f^{\phantom{*}}_{k\sigma} - \sum_{q,\vartheta} \xi^{\vartheta} \Bigg\{\varphi^{*\,\vartheta}_{q} \tilde{\cal W}^{\vartheta\,-1}_{q} \varphi^{\vartheta}_{q} \Bigg\} + \tilde{\cal F}[f,\varphi] \label{eq:dual_action} \end{align} Here, the bare dual fermion ${\tilde{\cal G}_{k\sigma} = \check{G}_{k\sigma} - g_{\nu\sigma}}$ and boson ${\tilde{\cal W}^{\vartheta}_{q} = \check{W}^{\vartheta}_{q} - w^{\vartheta}_{\omega}}$ propagators are given by the difference between corresponding EDMFT and impurity quantities. To prevent misunderstanding, by the EDMFT Green's function $\check{G}_{k\sigma}$ and the renormalized interaction $\check{W}^{\vartheta}_{q}$ we understand the bare lattice Green's function and the bare interaction that are dressed respectively in the local impurity self-energy and polarization operator via Dyson equations \begin{align} \check{G}^{-1}_{k\sigma} &= {\cal G}^{-1}_{k\sigma} - \Sigma^{\rm imp}_{\nu\sigma} \\ \left[\check{W}^{\vartheta}_{q}\right]^{-1} &= \left(U^{\vartheta} + V^{\vartheta}_{\mathbf{q}}\right)^{-1} - \Pi^{\vartheta\,{\rm imp}}_{\omega} \label{eq:W_EDMFT} \end{align} In this way, bare dual quantities that describe spatial fluctuations already take into account the effect of local correlations. Note that in the dual problem~\eqref{eq:dual_action} the bare local interaction $U^{\vartheta}$ is introduced as a fictitious quantity that does not affect the result for physical observables (see Appendix~\ref{app:DB}). This directly follows from the fact that the DB theory is free from the Fierz ambiguity in decoupling of the local Coulomb interaction $U$ into different channels (see e.g. Ref.~\onlinecite{StepanovHarkov}). For actual numerical calculations, the dual interaction $\tilde{\cal F}[f,\varphi]$ is truncated at the two-particle level, which contains only the four-point $\Gamma_{\nu\nu'\omega}$ and three-point $\Lambda^{\hspace{-0.05cm}(*)}_{\nu\omega}$ vertices of the impurity problem~\eqref{eq:actionimp}. These quantities are explicitly defined in Appendix~\ref{app:DB}. With this approximation the theory shows a good agreement with the exact benchmark results~\cite{PhysRevB.94.035102, PhysRevB.96.035152, PhysRevB.97.125114, PhysRevX.11.011058, PhysRevB.102.195109}. However, it still remains relatively complex due to the presence of the four-point vertex function $\Gamma_{\nu\nu'\omega}$. The latter depends on three frequencies, so calculating and using it in realistic multi-orbital simulations, which involve the inversion of the Bethe-Salpeter equation in the frequency-orbital space, becomes time consuming numerically~\cite{PhysRevB.95.115107, doi:10.7566/JPSJ.87.041004, PhysRevB.103.035120}. To cope with this problem, one can make use of yet another Hubbard-Stratonovich transformation over bosonic variables ${\varphi \xrightarrow{} b}$ that generates an effective four-point interaction in a partially bosonized form \begin{align} \Gamma^{\rm d}_{\nu\nu'\omega} &\simeq 2M^{\rm d}_{\nu\nu'\omega} - M^{\rm d}_{\nu,\nu+\omega,\nu'-\nu} - 3M^{\rm m}_{\nu,\nu+\omega,\nu'-\nu} + M^{\rm s}_{\nu,\nu',\omega+\nu+\nu'} \notag\\ \Gamma^{\rm m}_{\nu\nu'\omega} &\simeq 2M^{\rm m}_{\nu\nu'\omega} + M^{\rm m}_{\nu,\nu+\omega,\nu'-\nu} - M^{\rm d}_{\nu,\nu+\omega,\nu'-\nu} - M^{\rm s}_{\nu,\nu',\omega+\nu+\nu'} \notag\\ \Gamma^{\rm s}_{\nu\nu'\omega} &\simeq M^{\rm s}_{\nu\nu'\omega} + \frac12 \left(M^{\rm d}_{\nu,\nu',\omega-\nu-\nu'} + M^{\rm d}_{\nu,\omega-\nu',\nu'-\nu}\right) \notag\\ &\hspace{1.23cm}- \frac32 \left(M^{\rm m}_{\nu,\nu',\omega-\nu-\nu'} + M^{\rm m}_{\nu,\omega-\nu',\nu'-\nu}\right) \label{eq:Gamma} \end{align} This approximation uncovers the underlying structure of the vertex, which consists of all possible collective electronic fluctuations \begin{align} M^{\vartheta}_{\nu\nu'\omega}=\Lambda^{\hspace{-0.05cm}\vartheta}_{\nu\omega} \, \bar{w}^{\vartheta}_{\omega} \, \Lambda^{\hspace{-0.05cm}*\,\vartheta}_{\nu'\omega} \label{eq:M} \end{align} that behave as bosonic modes \begin{align} \bar{w}^{\varsigma}_{\omega} &= w^{\varsigma}_{\omega}-U^{\varsigma}/2 \label{eq:w_dm}\\ \bar{w}^{\rm s} &= w^{\rm s}_{\omega}-U^{\rm s} \label{eq:w_s} \end{align} As Ref.~\onlinecite{StepanovHarkov} shows, the partially bosonized representation~\eqref{eq:Gamma} for the four-point vertex can be fine-tuned in such a way that it nearly cancels the exact four-point vertex from the dual action. Indeed, this approximation does not take into account contributions to the vertex function that cannot be reduced to a single boson propagator. However, this irreducible part can be completely excluded on the level of the ladder approximation for the vertex by a special choice of bare local interactions in different channels ${U^{\rm d/m}=\pm{}U/2}$ and ${U^{\rm s}=U}$. The precise effect of nonladder irreducible contributions on the electronic self-energy is investigated below. As a consequence, this specific choice for the bare interactions $U^{\vartheta}$ provides the most accurate partially bosonized approximation for the four-point vertex function given by the Eq.~\eqref{eq:Gamma}. In addition, it also leads to a correct high-frequency ($\nu\to\infty$ or $\omega\to\infty$) asymptotic behavior of the three-point vertex $\Lambda^{\hspace{-0.05cm}(*)}_{\nu\omega}\to1$~\cite{StepanovHarkov}. At the same time, it should be noted that this special choice of the bare interaction $U^{\vartheta}$ cannot be obtained by any decoupling of the local Coulomb interaction $U$ into different bosonic channels~\cite{StepanovHarkov}. Therefore, it results in a double counting of $U$ in the vertex function, which is explicitly subtracted from the renormalized interaction $w^{\vartheta}_{\omega}$ of the impurity problem in Eqs.~\eqref{eq:w_dm} and~\eqref{eq:w_s}. As follows from these equations and the fact that ${w^{\theta}(\omega\to\infty)=U^{\theta}}$, we prefer to keep the bare Coulomb interaction $U$ only in the particle-hole channel. In this way, it does not contribute to the renormalized singlet interaction $\bar{w}^{\rm s}_{\omega}$~\eqref{eq:w_s}, and becomes equally distributed between density and magnetic channels. The reason for such decomposition lies in the fact that the renormalization of the bare interaction in the particle-particle channel is believed to be negligibly small at standard fillings~\cite{Pao94}. Therefore, the corresponding singlet contribution $M^{\rm s}$, which in the considered form~\eqref{eq:w_s} does not contain the bare interaction $U^{\rm s}$, can be excluded from the theory, as it was consciously done in the previous work~\cite{StepanovHarkov}. To clarify this statement, we explicitly introduce and investigate the effect of singlet terms in the current work. Note that although the bare interaction is (partially or fully) subtracted from the local renormalized interactions~\eqref{eq:w_dm} and~\eqref{eq:w_s}, the partially bosonized approximation~\eqref{eq:Gamma} for the four-point vertex has a correct asymptotic behavior at high frequencies $\Gamma^{\,\rm d/m}\to\pm{}U$ and $\Gamma^{\,\rm s}\to{}U$. This follows from the fact that the four-point function does not depend on the way how the on-site Coulomb interaction $U$ is distributed between different bosonic channels~\cite{StepanovHarkov}. For example, although the singlet bosonic mode $\bar{w}^{\rm s}$ does not contain the constant contribution $U^{\rm s}$, the latter is still present in the singlet vertex function $\Gamma^{\rm s}$~\eqref{eq:Gamma} due to transverse charge and spin fluctuations. After the last Hubbard-Stratonovich transformation the dual problem~\eqref{eq:dual_action} reduces to a simple action of a partially bosonized dual theory (PBDT) written in terms of fermion $f$ and boson $b$ variables, and the local three-point interaction vertex $\Lambda^{\hspace{-0.05cm}(*)}_{\nu\omega}$ only~\cite{StepanovHarkov} \begin{align} {\cal S}_{pb} = &-\sum_{k,\sigma} f^{*}_{k\sigma}\tilde{\cal G}^{-1}_{k\sigma}f^{\phantom{*}}_{k\sigma} -\sum_{q,\vartheta} \xi^{\vartheta} \Bigg\{ b^{*\,\vartheta}_{q}{\cal W}^{\vartheta \, -1}_{q}b^{\vartheta}_{q} \Bigg\} \notag\\ &+ \sum_{q,k,\vartheta} \xi^{\vartheta} \Bigg\{ \Lambda^{\hspace{-0.05cm}\vartheta}_{\nu\omega} \eta^{*\,\vartheta}_{q,k} b^{\vartheta}_{q} + \Lambda^{\hspace{-0.05cm}*\,\vartheta}_{\nu\omega} b^{*\,\vartheta}_{q} \eta^{\vartheta}_{q,k} \Bigg\} \label{eq:fbaction} \end{align} where, similarly to Eqs.~\eqref{eq:ndm},~\eqref{eq:ns} and~\eqref{eq:ns*}, we define \begin{align} \eta^{\varsigma}_{q,k} &= \sum_{\sigma\sigma'} f^{*}_{k+q, \sigma} \, \sigma^{\varsigma}_{\sigma\sigma'} f^{\phantom{*}}_{k\sigma'} \label{eq:eta_dm}\\ \eta^{\rm s}_{q,k} &= \frac12\sum_{\sigma\sigma'} f^{\phantom{*}}_{q-k, \overline{\sigma}} \, \sigma^{\,z}_{\sigma\sigma'} f^{\phantom{*}}_{k\sigma'} \label{eq:eta_s}\\ \eta^{*\,\rm s}_{q,k} &= \frac12\sum_{\sigma\sigma'} f^{*}_{k\sigma} \, \sigma^{\,z}_{\sigma\sigma'} f^{*}_{q-k, \overline{\sigma}^{\,\prime}} \label{eq:eta_sast} \end{align} The bare Green's function $\tilde{\cal G}_{k\sigma}$ of this new problem~\eqref{eq:fbaction} remains unchanged, and the bare bosonic propagators become \begin{align} {\cal W}^{\varsigma}_{q} &= \check{W}^{\varsigma}_{q} - U^{\varsigma}/2 \label{eq:Wdm}\\ {\cal W}^{\rm s}_{q} &= \check{W}^{\rm s}_{q} - U^{\rm s} \label{eq:Ws} \end{align} where the same exclusion of the double counting between different bosonic channels as in Eqs.~\eqref{eq:w_dm} and~\eqref{eq:w_s} takes place. The simplest set of diagrams for the self-energy and polarization operator used in the $\text{D-TRILEX}$ approach~\cite{StepanovHarkov} \begin{align} &\tilde{\Sigma}_{k\sigma} = -\sum_{q,\varsigma} \Bigg\{ \Lambda^{\hspace{-0.05cm}\varsigma}_{\nu\omega} \tilde{G}_{q+k,\sigma} W^{\varsigma}_{q} \Lambda^{\hspace{-0.05cm}*\,\varsigma}_{\nu\omega} - \Lambda^{\hspace{-0.05cm}\rm s}_{\nu\omega} \tilde{G}_{q-k,\overline{\sigma}} W^{\rm s}_{q} \Lambda^{\hspace{-0.05cm}*\,\rm s}_{\nu\omega} \Bigg\} \label{eq:Sigma_dual}\\ &\hspace{1.8cm}\bar{\Pi}^{\varsigma}_{q} = +\sum_{k,\sigma} \Lambda^{\hspace{-0.05cm}*\,\varsigma}_{\nu\omega} \tilde{G}_{k\sigma} \tilde{G}_{q+k,\sigma} \Lambda^{\hspace{-0.05cm}\varsigma}_{\nu\omega} \label{eq:Pi_dual} \\ &\hspace{1.8cm}\bar{\Pi}^{\rm s}_{q} = -\sum_{k} \Lambda^{\hspace{-0.05cm}*\,\rm s}_{\nu\omega} \tilde{G}_{k\uparrow} \tilde{G}_{q-k\downarrow} \Lambda^{\hspace{-0.05cm}\rm s}_{\nu\omega} \label{eq:Pi_dual_s} \end{align} can be obtained from the analog of the Almbladh functional~\cite{doi:10.1142/S0217979299000436} ${\Psi[\tilde{G}, W, \Lambda] = \frac12 \tilde{G} \Lambda^{\hspace{-0.05cm}\vartheta} W^{\vartheta} \Lambda^{\hspace{-0.05cm}*\vartheta} \tilde{G}}$ introduced in the dual space. This ensures the consistency between single- and two-particle quantities produced by the theory. Here, $\tilde{G}_{k\sigma}$ and $W^{\vartheta}_{q}$ are full propagators of the fermion-boson problem~\eqref{eq:fbaction} given by Dyson equations \begin{align} \tilde{G}_{k\sigma}^{-1} &= \tilde{\cal G}_{k\sigma}^{-1} - \tilde{\Sigma}_{k\sigma} \label{eq:Dressed_G}\\ W_{q}^{\vartheta~-1} &= {\cal W}_{q}^{\vartheta~-1} - \bar{\Pi}^{\vartheta}_{q} \label{eq:Dressed_W} \end{align} This simple $GW$-like diagrammatics~\eqref{eq:Sigma_dual},~\eqref{eq:Pi_dual}, and~\eqref{eq:Pi_dual_s} of the $\text{D-TRILEX}$ approach can also be related to its parental DB theory. For simplicity, the main text of the paper contains only a sketch of this derivation presented in Fig.~\ref{fig:diagrams}. Also, here we only consider the case when the nonlocal interaction is discarded ($V^{\vartheta}_{\mathbf{q}}=0$). Then, the DB theory~\eqref{eq:dual_action} identically coincides with the DF approach, and the dual self-energy in the ladder approximation takes the form of $\tilde{\Sigma}^{\rm LDF}$~\cite{PhysRevLett.102.206401} displayed in the first line of Fig.~\ref{fig:diagrams}. This expression can be obtained using the Schwinger-Dyson equation for the dual self-energy~\cite{hafermann2010numerical}. As the result, the second-order contribution $\tilde{\Sigma}^{(2)}$ has a ``1/2'' prefactor that does not appear for the rest of the ladder self-energy $\tilde{\Sigma}^{(3+)}$~\cite{PhysRevB.79.045133}. As two subsequent lines in Fig.~\ref{fig:diagrams} show, if one uses the partially bosonized representation~\eqref{eq:Gamma} for every vertex function that enters $\tilde{\Sigma}^{\rm LDF}$ and keeps only longitudinal contributions in this approximation, the dual self-energy immediately reduces to the $\text{D-TRILEX}$ form~\eqref{eq:Sigma_dual}. By longitudinal contributions we understand $M^{\vartheta}_{\nu\nu'\omega}$ terms, where the bosonic propagator $\bar{w}^{\vartheta}_{\omega}$ carries the main bosonic frequency $\omega$. The exclusion of transverse particle-hole and particle-particle fluctuations from the four-point vertex can be motivated by the fact that their contributions to the self-energy partially cancel each-other, which is demonstrated in the Section~\ref{sec:Results_B}. The explicit analytical derivation of the relation between $\text{D-TRILEX}$ and ladder DB (LDB) self-energies for the general case when the nonlocal interaction is not neglected is shown in Appendix~\ref{app:Sigma}. This result demonstrates the important advantage of the $\text{D-TRILEX}$ theory over its parental LDB method, which drastically reduces costs of numerical calculations. Thus, although the $\text{D-TRILEX}$ approach accounts for the main longitudinal part of the full two-particle ladder fluctuation, the calculation of the self-energy~\eqref{eq:Sigma_dual} and polarization operators~\eqref{eq:Pi_dual} and~\eqref{eq:Pi_dual_s} does not require the inversion of the Bethe-Salpeter equation in the momentum-frequency space. In the ladder DF/DB theory the inversion of the Bethe-Salpeter equation in the frequency space cannot be avoided due to a three-frequency dependence of the local vertex function $\Gamma_{\nu\nu'\omega}$. \begin{figure*}[t!] \includegraphics[width=0.88\linewidth]{D-TRILEX_Sigma.pdf} \caption{\label{fig:diagrams} Top row shows the ladder dual fermion self-energy $\tilde{\Sigma}^{\rm LDF}$, which consists of the first-order Hartree-like term, second-order diagram $\tilde{\Sigma}^{(2)}$, and the rest of the ladder $\tilde{\Sigma}^{(3+)}$. Keeping only longitudinal modes of the partially bosonized representation for the four-point vertex $\Gamma$ (black squares), the LDF self-energy reduces to the self-energy of the $\text{D-TRILEX}$ approach (red diagram at the end of the top row). For $\tilde{\Sigma}^{(2)}$ and $\tilde{\Sigma}^{(3+)}$ the result of this approximation is explicitly shown in the middle and bottom rows, respectively. Red parts of these diagrams that consist of two triangles (three-point vertices) connected by two solid lines (dual Green's functions) is the polarization operator of the $\text{D-TRILEX}$ theory. Wiggly line corresponds to the renormalized interaction.} \end{figure*} We note that the diagrammatic expansion in DF, DB and $\text{D-TRILEX}$ methods is performed in the dual space. The self-energy of the original lattice problem~\eqref{eq:action_latt} can be obtained from the following exact relation~\cite{Rubtsov20121320, PhysRevB.93.045107, PhysRevB.94.205110} \begin{align} \Sigma^{\text{latt}}_{k\sigma} = \Sigma^{\text{imp}}_{\omega\sigma} + \frac{\tilde{\Sigma}_{k\sigma}}{1+g_{\nu\sigma}\tilde{\Sigma}_{k\sigma}} \label{eq:self-en} \end{align} Here, the dual contribution to the lattice self-energy comes with the denominator $(1+g_{\nu\sigma}\tilde{\Sigma}_{k\sigma})$ that excludes unphysical terms from the Dyson equation for the lattice Green's function~\cite{BRENER2020168310}. Note that the expression~\eqref{eq:self-en} requires the explicit calculation of the impurity self-energy that cannot be measured directly as a single-particle correlation function. Instead, $\Sigma^{\rm imp}_{\nu\sigma}$ is usually obtained by inverting the Dyson equation for the full impurity Green's function $g_{\nu\sigma}$, which makes the result noisy at high frequencies. The noise in the self-energy can be reduced using the improved estimators method that, however, requires the measurement of higher-order correlations functions~\cite{Hafermann12, Gunacker16, PhysRevB.100.075119}. Therefore, for calculation of the lattice Green's function it is more convenient to use another exact relation that does not involve $\Sigma^{\rm imp}_{\nu\sigma}$~\cite{Krivenko2010, Rubtsov20121320} \begin{align} G_{k\sigma}^{-1} = \left[g_{\nu\sigma} + g_{\nu\sigma} \tilde{\Sigma}_{k\sigma}g_{\nu\sigma}\right]^{-1} + \Delta_{\nu} - \varepsilon_{\mathbf{k}} \end{align} This expression for the dressed lattice Green's function $G_{k\sigma}$ completes the derivation of the $\text{D-TRILEX}$ approach. \section{Results} \subsection{Comparing different methods} \label{sec:Results_A} \begin{table}[b!] \caption{\label{table}Summary of considered methods that specifies the form of the local four-point vertex and types of diagrams that are used for the diagrammatic expansion. The square corresponds to the exact four-point vertex $\Gamma_{\nu\nu'\omega}$ of the impurity problem. Longitudinal/transverse components $M_{\nu\nu'\omega}$ that enter the partially bosonized approximation for the vertex~\eqref{eq:Gamma} are depicted by two triangles connected by the wavy line placed horizontally/vertically. The ``$-$'' sign in front of the transverse contribution corresponds to the antisymmetric form of the vertex~\eqref{eq:Gamma}. The $\text{DiagMC@PBDT-s}$ approximation can be obtained from the $\text{DiagMC@PBDT}$ method by excluding the singlet contribution $M^{\rm s}_{\nu,\nu',\omega+\nu+\nu'}$ from the partially bozonized vertex~\eqref{eq:Gamma}.} \centering \begin{tabular}{ |c|c|c| } \hline ~Method~ & ~Four-point vertex~ & ~Types of diagrams~ \\ \hline ~D-TRILEX~ & $\vcenter{\hbox{ \scalebox{.4}{ \begin{tikzpicture} \begin{feynman}[small] \vertex (z1); \vertex[below=0.25cm of z1] (b1); \vertex[right=0.5cm of b1] (a1); \vertex[below=0.5cm of a1] (a2); \vertex[below=1.0cm of b1] (a3); [edges=fermion] \vertex[right=0.5cm of a2] (c1); \vertex[above=0.5cm of c1] (c2); \vertex[right=0.5cm of c2] (c3); \vertex[below=1.0cm of c3] (c4); \diagram* [very thick]{ { (b1) -- (a2) -- (a3) -- (b1), }, }; \draw[decorate,decoration={snake,segment length=0.18cm,amplitude=0.15cm},thick](a2) -- (c1); \diagram* [very thick]{ { (c1) -- (c3) -- (c4) -- (c1), }, }; \draw[white] (z1) circle(0.65mm); \end{feynman} \end{tikzpicture} } }}$ & ladder \\ LDF & $\vcenter{\hbox{ \scalebox{.4}{ \begin{tikzpicture} \begin{feynman}[small] \vertex (z1); \vertex[below=0.25cm of z1] (b1); \vertex[right=2cm of b1] (g1); \vertex[left=1.2cm of b1] (b-1) ; \vertex[right=2.5cm of b1] (b-2) ; \vertex[below=0.55cm of b-1] (b00); \vertex[right=1cm of b1] (g2); \vertex[below=1cm of g2] (g3); \vertex[below=1cm of b1] (g4); \diagram* [very thick]{ { (b1) -- (g2) -- (g3) -- (g4) -- (b1), }, }; \end{feynman} \end{tikzpicture} } }}$ & ladder \\ $\text{DiagMC@DF}$ & $\vcenter{\hbox{ \scalebox{.4}{ \begin{tikzpicture} \begin{feynman}[small] \vertex (z1); \vertex[below=0.25cm of z1] (b1); \vertex[right=2cm of b1] (g1); \vertex[left=1.2cm of b1] (b-1) ; \vertex[right=2.5cm of b1] (b-2) ; \vertex[below=0.55cm of b-1] (b00); \vertex[right=1cm of b1] (g2); \vertex[below=1cm of g2] (g3); \vertex[below=1cm of b1] (g4); \diagram* [very thick]{ { (b1) -- (g2) -- (g3) -- (g4) -- (b1), }, }; \draw[white] (z1) circle(0.65mm); \end{feynman} \end{tikzpicture} } }}$ & all \\ ~DiagMC@PBDT~ & $\vcenter{\hbox{ \scalebox{.4}{ \begin{tikzpicture} \begin{feynman}[small] \vertex (z1); \vertex[below=2.0cm of z1] (z2); \vertex[below=0.5cm of z1] (b1); \vertex[right=0.5cm of b1] (a1); \vertex[below=0.5cm of a1] (a2); \vertex[below=1.0cm of b1] (a3); [edges=fermion] \vertex[right=0.5cm of a2] (c1); \vertex[above=0.5cm of c1] (c2); \vertex[right=0.5cm of c2] (c3); \vertex[below=1.0cm of c3] (c4); \diagram* [very thick]{ { (b1) -- (a2) -- (a3) -- (b1), }, }; \draw[decorate,decoration={snake,segment length=0.18cm,amplitude=0.15cm},thick](a2) -- (c1); \diagram* [very thick]{ { (c1) -- (c3) -- (c4) -- (c1), }, }; \diagram* [very thick]{ { (c1) -- (c3) -- (c4) -- (c1), }, }; \vertex[right=0.75cm of c1] (d1) {\huge{$-$}}; \vertex[right=0.5cm of d1] (e1); \vertex[above=0.75cm of e1] (e2); \vertex[right=1.0cm of e2] (e3); \vertex[below=0.5cm of e3] (e4); \vertex[left=0.5cm of e4] (e5); \vertex[below=0.5cm of e5] (f1); \vertex[right=0.5cm of f1] (f2); \vertex[below=0.5cm of f2] (f3); \vertex[left=1.0cm of f3] (f4); \diagram* [very thick]{ { (e2) -- (e3) -- (e5) -- (e2), }, }; \draw[decorate,decoration={snake,segment length=0.18cm,amplitude=0.15cm},thick](e5) -- (f1); \diagram* [very thick]{ { (f1) -- (f3) -- (f4) -- (f1), }, }; \draw[white] (z1) circle(0.65mm); \draw[white] (z2) circle(0.65mm); \end{feynman} \end{tikzpicture} } }}$ & all \\ \hline \end{tabular} \end{table} \begin{figure*}[t!] \includegraphics[width=0.95\linewidth]{comp_sigma.pdf} \caption{\label{fig:compare_sigma} The lattice self-energy $\Sigma^{\rm latt}_{{\bf k},\nu}$ obtained for the first Matsubara frequency $\nu_0=\pi/\beta$ for the inverse temperature $\beta=2$ along the high symmetry path in momentum space ${\bf k}$. The value of the on-site Coulomb potential $U$ for which the calculation was performed is specified in panels. Upper and lower part of each panel corresponds to real and imaginary part of the self energy, respectively. Results are obtained using $\text{D-TRILEX}$ (red line), LDF (dark blue line), $\text{DiagMC@DF}$ (light blue line), DiagMC@PBDB (purple crosses), and DiagMC@PBDB-s (green crosses) methods.} \end{figure*} In this section we consistently investigate the effect of different contributions that make up the renormalized local four-point vertex on the electronic self-energy. To this aim we consider a 2D Hubbard model on a square lattice with the neareast-neighbor hopping amplitude $t=1$ and different values of the on-site Coulomb potential $U$. Numerical calculations are performed at half-filling unless the other filling is explicitly specified. All nonlocal interactions are set to zero $V^{\vartheta}_{\mathbf{q}}=0$. Note that in this case the renormalized interaction of EDMFT $\check{W}^{\vartheta}_{q}$~\eqref{eq:W_EDMFT} coincides with the impurity $w^{\vartheta}_{\omega}$, and the dual boson propagator $\tilde{W}^{\vartheta}_{q}$ becomes zero. As a consequence, the DB action~\eqref{eq:dual_action} reduces to the DF problem~\cite{PhysRevB.77.033101}. Restricting the interaction $\tilde{\cal F}[f]$ to the four-point vertex function $\Gamma_{\nu\nu'\omega}$, the dual problem~\eqref{eq:dual_action} can be solved numerically exactly within the diagrammatic Monte Carlo method for dual fermions ($\text{DiagMC@DF}$)~\cite{PhysRevB.96.035152, PhysRevB.94.035102, PhysRevB.102.195109}. In the current work we perform $\text{DiagMC@DF}$ calculations on the basis of the converged DMFT solution of the lattice problem~\eqref{eq:action_latt}. The corresponding single-site impurity problem of DMFT~\eqref{eq:actionimp} is solved numerically exactly using the open source CT-HYB solver~\cite{HAFERMANN20131280, PhysRevB.89.235128} based on ALPS libraries~\cite{Bauer_2011}. After that, the calculated bare dual Green's function $\tilde{\cal G}_{k\sigma}$ and the local four-point vertex function $\Gamma_{\nu\nu'\omega}$ are used as building blocks for a diagrammatic expansion. A detailed description of the $\text{DiagMC@DF}$ method can be found in Ref.~\onlinecite{PhysRevB.96.035152}. For physical parameters considered in this work, the converged result for the dual self-energy is achieved at the fifth order of expansion. Different levels of approximation for the four-point vertex can be investigated to reveal the effect of contributions that are not accounted for in the $\text{D-TRILEX}$ theory. In particular, the contribution to the self-energy that stems from the irreducible part of the four-point vertex function can be identified by comparing the exact $\text{DiagMC@DF}$ solution of the dual problem~\eqref{eq:dual_action} with the result of another $\text{DiagMC}$ calculation, where the exact local vertex $\Gamma_{\nu\nu'\omega}$ is replaced by its partially bosonized approximation~\eqref{eq:Gamma}. Hereinafter this method is referred to as $\text{DiagMC@PBDT}$ and corresponds to the exact evaluation of the self-energy of the partially bosonized dual theory~\eqref{eq:fbaction}. The next level of approximation that allows to observe the effect of collective fluctuations in the singlet channel can be achieved by performing $\text{DiagMC}$ calculations with the partially bosonized vertex~\eqref{eq:Gamma} where all $M^{\rm s}$ terms are neglected. This calculation is referred to as \text{DiagMC@PBDT-s}. We note that the $\text{DiagMC@DF}$ method does not distinguish between longitudinal and transverse components of the four-point vertex, because the Monte Carlo sampling considers all possible topologies of diagrams. As has been discussed in the Section~\ref{sec:Theory}, the contribution of these modes can be disentangled comparing the self-energy of the ladder dual fermion (LDF) approach, which exploits the exact local four-point vertex, with the result of the $\text{D-TRILEX}$ theory, where only longitudinal modes are taken into account. These calculations are also performed on the basis of the converged DMFT solution, so that the local impurity problem remains the same for all compared theories. Note that the LDF and $\text{D-TRILEX}$ results for the self-energy are obtained within the self-consistent scheme in terms of dressed fermionic~\eqref{eq:Dressed_G} and bosonic~\eqref{eq:Dressed_W} propagators. When possible, we compare our results with the exact $\text{DiagMC}$ solution~\cite{PhysRevLett.119.045701, PhysRevB.97.085117, PhysRevB.100.121102} of the lattice problem~\eqref{eq:action_latt} that was kindly provided by the authors of Refs.~\onlinecite{PhysRevX.11.011058, Wu17}. All methods are summarized in Table~\ref{table}. \subsection{Effect of the local interaction} \label{sec:Results_B} First, we make a scan over a broad range of local Coulomb interactions $U$ at a fixed temperature. We note that in two dimensions DMFT predicts the N\'eel transition at a finite temperature. This transition is forbidden by Mermin-Wagner theorem~\cite{PhysRevLett.17.1133} and thus is an artefact of the DMFT theory. However, since the $\text{DiagMC@DF}$ method uses the DMFT impurity problem as a staring point for the diagrammatic expansion, the $\text{DiagMC@DF}$ theory shows difficult convergence or even divergent result close to the DMFT N\'eel point~\cite{PhysRevB.94.035102, PhysRevB.96.035152}. For this reason, calculations are performed at the inverse temperature $\beta=2$, so that the $\text{DiagMC}$ results are not affected by any convergence issue. Fig.~\ref{fig:compare_sigma} shows the lattice self-energy~\eqref{eq:self-en} calculated for all above-mentioned approaches (see Section~\ref{sec:Results_A}). Note that the self-energy does not contain the constant Hartree part that is equal to $U/2$ at half-filling. The results are obtained for the first Matsubara frequency $\nu_0=\pi/\beta$ along the high symmetry path that connects $\Gamma=(0,0)$, ${\rm X}=(0, \pi)$, and ${\rm M}=(\pi, \pi)$ points in momentum space ${\bf k}=(k_{x}, k_{y})$. Let us first consider the effect of the irreducible part of the four-point vertex comparing the self-energy of $\text{DiagMC@DF}$ (light blue line) and $\text{DiagMC@PBDT}$ (purple crosses) approaches shown in Fig.~\ref{fig:compare_sigma}. We find that at $U=2$ both methods produce identical results, which means that in a weakly-correlated regime the irreducible contributions to the vertex do not affect the self-energy. Upon increasing the local interaction, the discrepancy between these two methods also increases and is noticeable the most in the strongly-correlated regime at $U=8$, which is equal to the bandwidth. After that, at very large interactions $U=10$ and $U=12$ the real part of the $\text{DiagMC@PBDT}$ self-energy again nearly coincides with the one of the $\text{DiagMC@DF}$ approach. The agreement in the imaginary part of the self-energy also improves, but the discrepancy between these two methods remains noticeable. To quantify the difference of the given self-energy from the reference $\text{DiagMC@DF}$ result we calculate the following normalized deviation \begin{align} \delta = \sum_{\bf k}\left|\frac{\Sigma^{\rm ref}_{{\bf k}, \nu_0} - \Sigma^{\phantom{f}}_{{\bf k}, \nu_0}}{\Sigma^{\rm ref}_{{\bf k}, \nu_0}}\right|. \label{eq:norm_diff} \end{align} A similar quantity but for only one k-point was introduced in Ref.~\onlinecite{PhysRevB.102.195109}. The corresponding result for all considered approaches is presented in Fig.~\ref{fig:Ev_and_deviation}. We find that the normalized deviation of the $\text{DiagMC@PBDT}$ method reaches its maximum value $\delta = 15\%$ at $U=8$. As has been pointed out in the Section~\ref{sec:Theory}, the irreducible part can be excluded from the renormalized four-point vertex only in the ladder approximation. In the strongly-correlated regime nonladder diagrams become important~\cite{PhysRevB.94.035102, PhysRevB.96.035152, PhysRevB.102.195109}, which is also confirmed by the increase of the normalized deviation of the LDF approach (blue line in Fig.~\ref{fig:Ev_and_deviation}). Consequently, the contribution of the irreducible part of the vertex to the electronic self-energy also becomes noticeable. We would like to emphasise that by the strength of electronic correlations we mean not only the strength of the interaction, but also the proximity of the system to an instability. The latter can be estimated by the leading eigenvalue (l.e.) of the Bethe-Salpeter equation of the LDF theory~\cite{PhysRevLett.102.206401, Otsuki14} (black line in Fig.~\ref{fig:Ev_and_deviation}), which in our case indicates the strength of antiferromagnetic (AFM) fluctuations. \begin{figure}[t!] \includegraphics[width=1\linewidth]{NormD.pdf} \caption{\label{fig:Ev_and_deviation} The normalized deviation $\delta$ calculated for LDF (blue), $\text{D-TRILEX}$ (red), $\text{DiagMC@PBDT}$ (purple), and $\text{DiagMC@PBDT-s}$ (green) approximations with respect to the reference Diag@DF result. The black line shows the leading eigenvalue (l.e.) of AFM fluctuations. The vertical left axis shows the scale for the normalized deviation, while the vertical right axis displays values for the leading eigenvalue. The inset compares $\delta$ obtained for $\text{D-TRILEX}$ and second-order DF (DF$^{(2)}$, orange) approaches for different inverse temperatures $\beta=2$ (circles), $\beta=4$ (triangles), and $\beta=10$ (squares).} \end{figure} In the next step we investigate the effect of an additional exclusion of all singlet contributions from the partially bosonized four-point vertex~\eqref{eq:Gamma}. At small ($U=2$) and moderate ($U=4$) interactions this immediately leads to a large discrepancy between $\text{DiagMC@PBDT-s}$ (green crosses) and $\text{DiagMC@PBDT}$ (purple crosses) results for the self-energy presented in Fig.~\ref{fig:compare_sigma}. In addition, from Fig.~\ref{fig:Ev_and_deviation} we find that for these values of the interaction the $\text{DiagMC@PBDT-s}$ strongly differs from the reference result, while the $\text{DiagMC@PBDT}$ performs reasonably well. Therefore, one can conclude that singlet fluctuations play an important role in weakly- and moderately-correlated regime. At a first glance this observation is in a contradiction with the statement that particle-particle fluctuations are believed to be negligibly small at standard fillings~\cite{Pao94}. This point is clarified below when we discuss the result of the $\text{D-TRILEX}$ approach. Increasing the interaction to $U=6$, makes the discrepancy between $\text{DiagMC@PBDT}$ and $\text{DiagMC@PBDT-s}$ results rapidly decrease, and in the strongly-correlated regime ($U=8$) both methods produce identical results. Remarkably, for $U=10$ and $U=12$ the $\text{DiagMC@PBDT-s}$ method shows the best agreement with the $\text{DiagMC@DF}$ result among all considered DiagMC-based approximations. This result suggests that in the regime of very large interactions contributions to the self-energy that stem from the irreducible and singlet parts of the renormalized four-point vertex, which are not considered in the $\text{DiagMC@PBDT-s}$ theory, nearly cancel each other. Finally, let us consider the $\text{D-TRILEX}$ method that can be obtained from the LDF theory excluding the irreducible part and neglecting transverse particle-hole and particle-particle fluctuations from the exact local impurity four-point vertex. As Fig.~\ref{fig:compare_sigma} shows, the best agreement between the $\text{D-TRILEX}$ (red line) and the reference $\text{DiagMC@DF}$ (light blue line) results for the imaginary part of the self-energy occurs at $U=2$. At small and moderate values of $U$, the $\text{D-TRILEX}$ self-energy seems to be pinned to the LDF result (dark blue line) at $\Gamma$ and M points. Therefore, the difference between these two methods is mostly visible around local minima located at antinodal ${\text{AN}=(0, \pi)}$ and nodal ${\text{N}=(\pi/2, \pi/2)}$ points. This difference increases with the interaction, and the observed trend persists up to $U=6$. At larger interactions, when the value of the self-energy at local minima becomes similar, the $\text{D-TRILEX}$ result shifts downwards, and at ${U=12}$ becomes pinned to the LDF result at N and AN points. The discrepancy between the $\text{D-TRILEX}$ and the reference results for the real part of the self-energy also increases with the interaction up to $U=8$, and after that decreases again for very large interaction strengths. However, here the best agreement with the exact result is achieved at $U=4$ (see red line in Fig.~\ref{fig:compare_sigma}). It can be explained by the fact, that in the perturbative regime of small interactions ($U=2$) and high temperatures ($\beta=2$) the second-order dual self-energy $\tilde{\Sigma}^{(2)}$ gives the main contribution to the nonlocal part of the total self-energy~\cite{PhysRevB.91.235114, PhysRevB.94.035102, PhysRevB.96.035152, PhysRevB.102.195109}. The $\text{D-TRILEX}$ theory is not based on a perturbation expansion, because it takes into account only a particular ($GW$-like) subset of diagrams. For this reason, this simple theory does not fully reproduce the second-order self-energy $\tilde{\Sigma}^{(2)}$, which leads to a slight underestimation of the result as discussed in Appendix~\ref{app:Sigma}. On the contrary, the $\text{D-TRILEX}$ approach correctly accounts for the screening of the interaction that is represented by longitudinal part of the infinite two-particle ladder in all bosonic channels. At lower temperatures and/or larger interactions, when the system enters the correlated regime, these types of diagrams become more important than the second-order self-energy. To illustrate this point, we also obtained the normalized deviation for the $\text{D-TRILEX}$ approach for $\beta=4$ (for $U=2$ and $U=4$) and $\beta=10$ (for $U=2$), and compared it with $\delta$ calculated for the second-order DF (DF$^{(2)}$) approximation that considers only $\tilde{\Sigma}^{(2)}$ contribution to the dual self-energy. The corresponding result is shown in the inset of Fig.~\ref{fig:Ev_and_deviation}. As expected, the accuracy of the DF$^{(2)}$ approximation rapidly decreases with the temperature and becomes $\delta=16.5\%$ (for $\beta=10$ and $U=2$) and $\delta=22.5\%$ (for $\beta=4$ and $U=4$) in the regime, which is yet above the DMFT N\'eel point $\beta_{N}\simeq12.5$ for $U=2$ and $\beta_{N}\simeq4.3$ for $U=4$. At the same time, the $\text{D-TRILEX}$ theory remains in a reasonable agreement with the reference result. Fig.~\ref{fig:Ev_and_deviation} shows that in the regime of weak and moderate interactions the $\text{D-TRILEX}$ self-energy is relatively close to the $\text{DiagMC@DF}$ result ($\delta=2\%$ for $U=2$ and $\delta=3\%$ for $U=4$). This fact looks paradoxical at a first glance, because the $\text{D-TRILEX}$ method does not take into account singlet fluctuations that were found to be important in this regime of interactions. To explain this result, let us first note that at $U \leq{} 4$ the LDF method is in a very good agreement with the $\text{DiagMC@DF}$ theory. Therefore, in the weakly- and moderately-correlated regime ladder diagrams provide the most important contribution to the self-energy. This fact allows for a direct comparison of the self-energies produced by ladder DF and $\text{D-TRILEX}$ methods with the result of DiagMC@ methods that account for all diagrammatic contributions. Note however, that all DiagMC-based schemes tend to overestimate the reference result, while ladder-like approaches underestimate it. Therefore, the normalized deviation presented in Fig.~\ref{fig:Ev_and_deviation} should be compared cautiously. Fig.~\ref{fig:compare_sigma} shows that $\text{D-TRILEX}$ and $\text{DiagMC@PBDT}$ self-energies obtained at $U=2$ and $U=4$ are very close to the reference result. Both methods do not take into account the irreducible part of the four-point vertex function, but the $\text{D-TRILEX}$ approach additionally neglects all transverse particle-hole and particle-particle modes. Keeping in mind that for these interaction strengths the exclusion of only singlet fluctuations leads to a large overestimation of the self-energy, we can conclude that transverse particle-hole and particle-particle fluctuations partially screen each other. This means that the exclusion of both types of vertical insertions in diagrams, as it is done in the $\text{D-TRILEX}$ theory, turns out to be a good approximation in the weakly- and moderately-correlated regime. On the other hand, excluding only one channel leaves the other channel unscreened, which results in a large contribution to the self-energy. Remarkably, the normalized deviation for all considered approximations shown in Fig.~\ref{fig:Ev_and_deviation} resembles the behavior of the leading eigenvalue of the magnetic channel (black line). For instance, the $\text{D-TRILEX}$ and LDF methods show the largest discrepancy with the $\text{DiagMC@DF}$ result exactly in the region where the l.e. is maximal. As has been pointed out in Ref.~\onlinecite{PhysRevB.102.224423}, approaching an instability leads to collective fluctuations becoming strongly anharmonic, which cannot be captured by simple diagrammatic theories. Consequently, in this regime transverse momentum-dependent fluctuations are expected to be important. At $U=10$ and $U=12$ the agreement of the $\text{D-TRILEX}$ theory with the $\text{DiagMC@DF}$ result improves again. Above we have found that at very large interaction strengths contributions to the self-energy that stem from singlet and irreducible parts of the vertex partially cancel each other. This result suggests that the effect of remaining transverse particle-hole fluctuations becomes weaker at very large interactions, which again justifies the applicability of the $\text{D-TRILEX}$ theory. \begin{figure}[t!] \includegraphics[width=1.0\linewidth]{sigma_kpoints_U2.pdf} \caption{\label{fig:ImSigma_U2} Imaginary part of the lattice self-energy as the function of Matsubara frequency $\nu$ obtained for $U=2$ at the antinodal ${\text{AN}=(0, \pi)}$ (top row) and nodal ${\text{N}=(\pi/2, \pi/2)}$ (bottom row) points. Results are calculated at the inverse temperature $\beta=10$ (left column) and $\beta=15$ (right column) using $\text{D-TRILEX}$ (red line), $\text{scD-TRILEX}$ (red stars), and LDF (dark blue line) approaches. The $\text{DiagMC}$ results (light blue line) are provided by the authors of Ref.~\onlinecite{PhysRevX.11.011058}.} \end{figure} \begin{figure}[b!] \includegraphics[width=1\linewidth]{sigma_U2_DT.pdf} \caption{\label{fig:pseudogap} Imaginary part of the $\text{D-TRILEX}$ self-energy as the function of Matsubara frequency $\nu$ obtained for $U=2$ at the nodal ${\text{N}=(\pi/2, \pi/2)}$ (left panel) and antinodal ${\text{AN}=(0, \pi)}$ (right panel) points for different inverse temperatures $\beta=10$ (red line), $\beta=15$ (dark blue line), and $\beta=20$ (light blue line).} \end{figure} We would like to note that the largest discrepancy between the $\text{D-TRILEX}$ and reference $\text{DiagMC@DF}$ result $\delta = 18\%$ corresponds to the most correlated regime ($U=8$). At small and moderate interactions the normalized difference does not exceed 3.5\% ($U=4$). At the same time, the maximal difference from the parental LDF is only around 10\% ($U=8$), which can be considered as relatively good result for such a simple theory. Finally, we looked at the contribution of the longitudinal particle-particle fluctuations to the $\text{D-TRILEX}$ self-energy~\eqref{eq:Sigma_dual} and, as expected, found it to be negligibly small. Indeed, the renormalized singlet interaction in the $\text{D-TRILEX}$ form~\eqref{eq:Ws} does not contain the bare constant interaction $U^{\rm s}$ and therefore describes only the screening of the Coulomb interaction by particle-particle fluctuations. As the result, we observe that the part of the self-energy that stems from the singlet bosonic mode makes only $3\%$ of the $\text{D-TRILEX}$ self-energy at $U=2$, and does not exceed $1\%$ for other interaction strength. Taking into account all above discussions, this result confirms that all particle-particle fluctuations can indeed be safely excluded from the simple $\text{D-TRILEX}$ theory, which however does not hold for every diagrammatic approach. \begin{figure}[t!] \includegraphics[width=1.0\linewidth]{sigma_kpoints_U4.pdf} \caption{\label{fig:ImSigma_U4} Imaginary part of the lattice self-energy as the function of Matsubara frequency $\nu$ obtained for $U=4$ at the AN (top row) and N (bottom row) points. Results are calculated at the inverse temperature $\beta=4$ (left column) and $\beta=6$ (right column) using $\text{D-TRILEX}$ (red line), $\text{scD-TRILEX}$ (red stars), and LDF (dark blue line) approaches. The reference $\text{DiagMC@DF}$ result (light blue line) is presented only for $\beta=4$ and is reproduced by the $\text{scD-TRILEX}$ method.} \end{figure} \subsection{Low temperature regime} \label{sec:Low_temp} In the previous Section we considered only the high-temperature regime ($\beta=2$), where AFM fluctuations are not very strong especially at $U=2$ and $U=4$. As the next step, we perform calculations at substantially lower temperatures around the DMFT N\'eel point for the interaction strengths up to a half of the bandwidth ($U\leq4$). A detailed investigation of the Hubbard model for $U=2$ and different temperatures has been performed in the recent work~\cite{PhysRevX.11.011058}. This allows for a direct comparison of LDF and $\text{D-TRILEX}$ results with the exact $\text{DiagMC}$ solution of the lattice problem~\eqref{eq:action_latt} presented in that paper. For $U=4$ we consider only the LDF, the $\text{D-TRILEX}$, and the $\text{DiagMC@DF}$ methods due to the lack of the lattice $\text{DiagMC}$ reference data. The LDF, the $\text{D-TRILEX}$, and the $\text{DiagMC@DF}$ results are obtained on the basis of the converged DMFT solution in the same way as in the previous Section. In addition, we also performed fully self-consistent (sc) $\text{D-TRILEX}$ calculations, for which the fermionic hybridization function $\Delta_{\nu}$ of the impurity problem was updated imposing the following self-consistency condition on the local part of the dual Green's function ${\sum_{\bf k}\tilde{G}_{{\bf k}\nu}=0}$ (see e.g. Ref.~\onlinecite{PhysRevB.77.033101}). As has been demonstrated in Ref.~\onlinecite{PhysRevX.11.011058}, upon lowering the temperature even a weakly-interacting system goes from a metallic regime, which is characterised by the imaginary part of the self-energy extrapolating to zero at low Matsubara frequencies, to a correlated regime where a pseudogap opens. The latter can be explained by a Slater mechanism~\cite{PhysRev.82.538} associated with the increase of long-range AFM fluctuations of itinerant electrons. The pseudogap opens first at the AN point, which can be detected by the change of the sign in the slope of the self-energy between the first and the second Matsubara frequency. This N/AN dichotomy appears due to additional suppression of the coherence of single-particle excitations due to the presence of the van Hove singularity at the AN point. Fig.~\ref{fig:ImSigma_U2} shows that despite a small mismatch at the first Matsubara frequency the LDF and $\text{D-TRILEX}$ methods correctly reproduce the $\text{DiagMC}$ result at $U=2$ and $\beta=10$ above the DMFT N\'eel point ($\beta_{N} \simeq 12.5$). Moreover, both $\text{D-TRILEX}$ approaches provide identical results for the self-energy, which almost exactly coincides with the one of the LDF approach. Below the DMFT N\'eel point at $\beta=15$ the $\text{DiagMC}$ self-energy already shows the formation of a pseudogap at the AN point, while the $\text{D-TRILEX}$ and the LDF still exhibit a metallic behaviour. However, for all other frequencies than the first one the LDF self-energy remains in a very good agreement with the exact result. In its turn, the $\text{D-TRILEX}$ self-energy starts to deviate from the LDF result, and this discrepancy is more visible at the AN point. We recall that close to the AFM instability collective fluctuations become strongly anharmonic~\cite{PhysRevB.102.224423}. In particular, this anharmonicity is significant in the Slater regime of weak interactions, where the magnetic fluctuations are formed by itinerant electrons. As a consequence, one can expect that in this regime the transverse modes start to play an important role~\cite{PhysRevB.94.035102, PhysRevB.96.035152, PhysRevB.102.195109}. We note that in the $\text{D-TRILEX}$ method these transverse contributions are fully discarded, while the LDF approach at least accounts for them in the local four-point vertex function of the impurity problem. This fact explains why the LDF shows the formation of the pseudogap at the AN point at a bit lower temperature ${T_{\ast}^{\rm AN}=0.059}$ (${\beta=17}$, see Ref.~\onlinecite{harkov2021parameterizations}) than the one of the $\text{DiagMC}$ method ${T_{\ast}^{\rm AN}=0.065}$~\cite{PhysRevX.11.011058}, and the $\text{D-TRILEX}$ approach captures it at ${T_{\ast}^{\rm AN}=0.050}$ (${\beta=20}$, see Fig.~\ref{fig:pseudogap}). This also explains the result that the most noticeable deviation of the self-energy from the exact result corresponds to the $\text{D-TRILEX}$ method and appears at the AN point where the pseudogap opens first. Now we increase the strength of the interaction to $U=4$ (Fig.~\ref{fig:ImSigma_U4}) and find that at $\beta=4$ slightly above the DMFT N\'eel point ($\beta_{N}\simeq4.3$) the $\text{D-TRILEX}$ self-energy is in a good agreement with the LDF result for the AN point and shows the beginning of the formation of a pseudogap. In its turn, the LDF approach agrees with the $\text{DiagMC@DF}$ theory for all frequencies except for the first one. At the N point the LDF self-energy lies on top of the $\text{DiagMC@DF}$ curve, but the deviation of the $\text{D-TRILEX}$ method from the reference result is more visible. However, the fully self-consistent calculation strongly improves the $\text{D-TRILEX}$ self-energy, which now perfectly agrees with the $\text{DiagMC@DF}$ result. At $\beta=6$ below the DMFT N\'eel point the $\text{DiagMC@DF}$ result suffers from the convergence issue~\cite{PhysRevB.94.035102, PhysRevB.96.035152} and is not shown here. All other considered methods show an insulating self-energy at the AN point, while the N point remains metallic. This result confirms the N/AN dichotomy in the formation of a pseudogap. Also, this result suggests that at moderate interactions collective magnetic fluctuations are less anharmonic in contrast to the weakly-interacting regime. This fact can be attributed to a more localized behavior of electrons when going away from Slater towards Heisenberg regime of magnetic fluctuations. As a consequence, for stronger interactions the formation of the AFM pseudogap can be captured by simpler ladder-like theories. We also note that at moderate interactions the discrepancy between the $\text{D-TRILEX}$ and the LDF approaches slightly increases upon lowering the temperature. However, the self-consistent update of the hybridization function $\Delta_{\nu}$ again improves the agreement between both methods. As explicitly stated in Section~\ref{sec:Theory}, in dual theories the hybridization function $\Delta_{\nu}$ is added to the reference system ${\cal S}_{\rm imp}$ and subtracted from the remaining part of the action ${\cal S}_{\rm rem}$ so that the initial problem~\eqref{eq:action_latt} remains unchanged. Therefore, if the dual problem~\eqref{eq:dual_action} is solved exactly, $\Delta_{\nu}$ can be taken arbitrarily. At the same time, any approximate solution depends on the choice for the hybridization function. In the latter case, the imposed self-consistency condition aims at tuning $\Delta_{\nu}$ in such a way that it accounts for the effect of missing diagrams. In this context the fact that at $U=2$ both sc and non-sc $\text{D-TRILEX}$ methods produce identical results demonstrates that the impurity problem of DMFT serves as good reference system in the weakly interacting regime. On the contrary, already for moderate interaction $U=4$ the self-consistency clearly improves the result of the $\text{D-TRILEX}$ approach, which shows that in this case the DMFT impurity problem does not provide the best possible starting point for partial diagrammatic resummations. \subsection{Doped regime of the $t-t'$ Hubbard model} The two-dimensional Hubbard model on a square lattice with nearest-neighbor $t$ and next-nearest-neighbor $t'$ hopping amplitudes is widely known as a prototype model for high-temperature superconducting cuprate compounds. The opening of a pseudogap and the dichotomy between the N and AN points in this model has been studied recently in Ref.~\onlinecite{Wu17} in the framework of the exact $\text{DiagMC}$ method. There, the authors considered the following set of model parameters $t'=-0.3$, $U=5.6$, $\beta=5$, and $4\%$ hole-doping that leads to a largest onset temperature for the pseudogap. In our work we address this physically interesting regime for a comparable hole doping of $3.4\%$ within the $\text{scD-TRILEX}$ and $\text{DiagMC@DF}$ approaches. The obtained self-energies are compared with the exact result of $\text{DiagMC}$ method that was provided by the authors of the Ref.~\onlinecite{Wu17}. For the sake of consistency, the $\text{DiagMC@DF}$ expansion was performed based on the impurity problem of the $\text{scD-TRILEX}$ approach. \begin{figure}[t!] \centering \includegraphics[width=1\linewidth]{Sigma_gmx.pdf} \caption{\label{fig:U5.6_gmx} Imaginary part of the nonlocal self-energy obtained for the zeroth Matsubara frequency $\nu_0=\pi/\beta$ along the high symmetry path in momentum space ${\bf k}$. Calculations are performed for $U=5.6$, $t'=-0.3$, and $\beta=5$ using $\text{scD-TRILEX}$ (red line) and $\text{DiagMC@DF}$ (light blue line) methods for $3.4\%$ hole-doping. The $\text{DiagMC}$ result (dark blue line) for $4\%$ doping is provided by the authors of Ref.~\onlinecite{Wu17}.} \end{figure} In Fig.~\ref{fig:U5.6_gmx} we compare the imaginary part of the nonlocal self-energy $\Sigma^{\rm nonloc}_{{\bf k},\nu_0}$ calculated for the first Matsubara frequency along the high-symmetry path in momentum-space for all three approaches. To obtain this quantity we subtract the local part $\Sigma^{\rm loc}_{{\bf k},\nu_0}$ from the lattice self energy $\Sigma^{\rm latt}_{{\bf k},\nu_0}$, where ${\Sigma^{\rm loc}_{{\bf k},\nu_0} = \sum_{\bf k}\Sigma^{\rm latt}_{{\bf k},\nu_0}}$. Due to the lack of reference $\text{DiagMC}$ data, the sum over the Brillouin zone in this expression is approximated by the sum over the high-symmetry path in momentum space. We find that the nonlocal part of the $\text{DiagMC@DF}$ self-energy is in a very good agreement with the reference $\text{DiagMC}$ result. The $\text{scD-TRILEX}$ approach also performs remarkably good in this physically nontrivial regime, especially given that the considered value of the local Coulomb interaction $U=5.6$ exceeds the half of the bandwidth. This good agreement in ${\rm Im}\,\Sigma^{\rm nonloc}_{{\bf k},\nu_0}$ indicates that the simple ladder-like $\text{scD-TRILEX}$ method accurately captures the N/AN dichotomy in the formation of a pseudogap in this regime~\cite{Wu17}. This fact additionally confirms our finding that going away from the Slater regime allows to use less sophisticated methods to capture the effect of collective fluctuations. At the same time we find that the $\text{DiagMC@DF}$ and the $\text{scD-TRILEX}$ methods do not provide a good value for the local part of the lattice self-energy. Indeed, ${\rm Im}\,\Sigma^{\rm loc}_{{\bf k},\nu_0}$ of the $\text{DiagMC@DF}$ calculated for the zeroth Matsubara frequency is equal to $-0.77$. The corresponding value for the $\text{scD-TRILEX}$ approach is $-0.80$, while the exact $\text{DiagMC}$ result reads $-1.04$. This discrepancy can again be explained by the fact that DMFT impurity problem does not provide a good starting point for a diagrammatic expansion already for moderate interactions. To address this issue, we exploited the dual self-consistency condition to update the fermionic hybridization as an attempt for the improvement of the reference system (see Section~\ref{sec:Low_temp}). However, the result obtained in this Section clearly demonstrates the need for an even better starting point, which should be able to provide more accurate local quantities to reproduce the exact result. \section{Conclusion} To conclude, in this work we investigated the effect of different collective fluctuations on the single-particle properties of correlated electronic systems. In order to disentangle local and nonlocal effects, we introduced an effective reference system -- a local impurity problem. This effective local problem have been solved numerically exactly providing building blocks for a diagrammatic expansion aiming at describing nonlocal correlation effects. Following the dual fermion/boson idea, we performed this diagrammatic expansion in the dual space truncating the interaction at the two-particle level and thus preserving only the local renormalized four-point vertex function. Using the partially bosonized representation for this four-point vertex, we investigated the effect of different bosonic modes contributing to the vertex on the electronic self-energy. Performing a comprehensive analysis based on DiagMC, $\text{DiagMC@DF}$, LDF, and $\text{D-TRILEX}$ approaches, we have found that irreducible contributions that are not accounted for by the partially bosonized vertex function can be excluded from the theory in a broad range of physical parameters. Indeed, they can be completely eliminated in the ladder approximation by a special choice of the bare local interaction in different channels. In a weakly-interacting regime, the remaining non-ladder contributions have only a minor effect on the electronic self-energy, and at large interactions these contributions are nearly cancelled by transverse singlet fluctuations. In turn, these transverse singlet modes partially cancel transverse particle-hole fluctuations in weakly- and moderately-interacting regimes. Finally, longitudinal singlet bosonic modes have been found to be negligibly small in all considered cases. All these results confirm that in a broad regime of physical parameters the leading contribution to the self-energy is given by the longitudinal particle-hole bosonic modes. This important statement allows for a drastic simplification of the diagrammatic expansion, which implies a huge reduction of computational efforts. Consequently, the $\text{D-TRILEX}$ theory, which appears as the result of this simplification, looks as a very promising and powerful tool for solving a broad class of interacting electronic problems. At the same time, the theory should not be oversimplified. Thus, we have shown that considering only second-order dual self-energy does not provide good result even at weak and moderate interactions when the system enters the correlated regime lowering the temperature. Instead, the $\text{D-TRILEX}$ method performs remarkably good even below the DMFT N\'eel temperature in the regime where the AFM pseudogap starts to develop. A good performance of the $\text{D-TRILEX}$ theory has been confirmed in the moderately-correlated half-filled regime of the Hubbard model, and in the case of a $t-t'$ model for hole-doped cuprate compounds. Importantly, in the latter case we have found that the $\text{D-TRILEX}$ approach provides a reasonably accurate result for the nonlocal part of the self-energy, while the local part is not reproduced correctly. This fact indicates that DMFT does not always provide an optimal way of constructing the local reference (impurity) problem. We have also found that the simple ladder-like $\text{D-TRILEX}$ theory fails to correctly reproduce the pseudogap formation in the weakly-interacting Slater regime of magnetic fluctuations. This can be explained by a strong anharmonicity of collective fluctuations of itinerant electrons close to the AFM instability. On the contrary, increasing the local Coulomb interaction drives the system away from the Slater regime. Thus, the electrons become more localized and their collective behavior turns more harmonic, which can be captured by less demanding ladder-like methods. \begin{acknowledgments} The authors thank Antoine Georges, Evgeny Kozik, Michel Ferrero, Fedor $\check{\rm S}$imkovic, Riccardo Rossi, and Wei Wu for discussions and for providing the $\text{DiagMC}$ data. The authors also thank Jan Gukelberger for the help with the original $\text{DiagMC@DF}$ code. The work of E.A.S. was supported by the European Union’s Horizon 2020 Research and Innovation programme under the Marie Sk\l{}odowska Curie grant agreement No.~839551 - $\text{2DMAGICS}$. The work of A.I.L. is supported by European Research Council via Synergy Grant 854843 - FASTCORR. M.V., S.B., and A.I.L. acknowledge the support by the Cluster of Excellence ``Advanced Imaging of Matter'' of the Deutsche Forschungsgemeinschaft (DFG) - EXC 2056 - Project No. ID390715994. The authors also acknowledge the support by North-German Supercomputing Alliance (HLRN) under the Project No. hhp00042. \end{acknowledgments}
\section{Introduction} \emph{Stochastic gradient descent} (SGD) has gained great popularity in solving machine learning optimization problems~\cite{kingma2014adam,johnson2013accelerating}. SGD leverages the finite-sum structure of the objective function, avoids the expensive computation of exact gradients, and thus provides a feasible and efficient optimization solution in large-scale settings~\cite{bottou2012stochastic}. The convergence and the optimality of SGD have been thoroughly studied ~\cite{ge2015escaping,rakhlin2012making,reddi2018convergence,zhou2019lower,carmon2019lowera,carmon2019lowerb,shamir2013stochastic}. In recent years, new research questions have been raised regarding SGD's impact on a model's generalization power. The seminal work \cite{hardt2016train} tackled the problem using the \emph{algorithmic stability} of SGD, i.e., the progressive sensitivity of the trained model w.r.t.~the replacement of a single (test) datum in the training set. They showed that the generalization error of an SGD-trained model is upper bounded by a uniform stability parameter $\varepsilon_{\text{stab}}$, and relate $\varepsilon_{\text{stab}}$ to the divergence of the two parameter vectors obtained by training on twin datasets. This stability-based analysis of the generalization gap allows one to bypass classical model capacity theorems~\cite{vapnic1998statistical, koltchinskii2000rademacher} or weight-based complexity theorems~\cite{neyshabur2017exploring, bartlett2017spectrally, arora2018stronger}. This framework also provides theoretical insights into many phenomena observed in practice, e.g., the ``train faster, generalize better'' phenomenon, the power of regularization techniques such as weight decay~\cite{krogh1992simple}, dropout~\cite{srivastava2014dropout}, and gradient clipping. Other works have developed the stability notion with advanced analysis ~\cite{bassily2020stability,feldman2019high,kuzborskij2018data} and adapted it into more sophisticated settings such as Stochastic Gradient Langevin Dynamics and momentum SGD~\cite{mou18a,chaudhari2019entropy,chen2018stability,Li2020On}. Despite the promises of this stability-based analysis, it remains open whether the analysis in ~\cite{hardt2016train} can be further improved to reveal the full potential of the stability method, either in general or for specific data-distributions. \begin{table*}[ht] \begin{center} \caption{Current landscape of stability bounds. [H] indicates results in~\cite{hardt2016train}, [K] indicates results in \cite{kuzborskij2018data} and * indicates results in this paper. $\beta$ is the smoothness parameter. $\zeta$ is a data-dependent constant defined in Lemma \ref{lem_SGD_data_dep}. $\widehat{\varepsilon}_{\text{stab}}$ is on-average stability defined in Def \ref{avg_stab}. $a$, $b$ are small constants free of $T$ and $n$. We only keep $T$ and $n$ term in the bounds.} \label{tab:results-summary} \vskip 0.15in \renewcommand{\arraystretch}{0.9} \begin{tabular}{||l||p{.15\textwidth}|p{.14\textwidth}|p{.18\textwidth}|p{.21\textwidth}||} \hline \textit{SGD Step Size} & \multicolumn{2}{c|}{Constant $\alpha_{t} = a/\beta$} & $\alpha_{t}= a/(\beta t)$ & $\alpha_t = b/t$\\ \hline \textit{Loss function} & Strongly Convex & Convex & Non-Convex & Non-Convex with $\widehat{\varepsilon}_{\text{stab}}$\\ \hline \hline \textit{Upper Bound} & $O(\frac{1}{n})$ [H] & $O(T/n)$ [H] & $O \left(T^{\frac{a}{1+a}}/n\right)$ [H] $ O\left(T^a/{n^{1+a}}\right)$* & $O\left(T^{\frac{\zeta b}{1+\zeta b}}/n\right)$[K] $O(T^{\zeta b}/n^{1 + \zeta b})^*$ \\ \hline \textit{Lower Bound} & $\Omega(\frac{1}{n})^*$ & $\Omega(T/n)$* & $\Omega(\frac{T^a}{n^{1+a}})$*& Open\\ \hline \end{tabular} \end{center} \end{table*} \noindent\textbf{Our results:} We provide three kinds of results (see Table~\ref{tab:results-summary}) that complement each other: a) tight existing lower bounds that show settings where stability analysis cannot be improved further for general datasets, b) weaker lower bounds that hint at a possible improvement, along with complementary improved upper bounds, also for general datasets and c) in settings where existing data-independent analysis cannot be improved, we derive improved data-dependent bounds. Below we summarize some of the existing open questions in this line of research, grouped according to properties of the loss function, along with our results addressing these problems. \subsection{Convex and Strongly Convex Loss} The following are the main results presented in \cite{hardt2016train} for convex and strongly-convex loss functions (with certain Lipschitz and smoothness conditions), when optimized using SGD. Here $n$ denotes the size of the sample, $T$ the number of steps in SGD, and $\alpha_t$ the size of the SGD step in the $t$-th iteration. \vspace{0.1cm} \noindent{1.} For convex loss functions, the stability is upper bounded by $\sum_{i=1}^{T} \alpha_{t}/n$. The smaller the number of iterations $T$ is, the lower this upper bound. Hence ``train faster, generalize better". \noindent{2.} In practice, one often uses constant step size: $\alpha_t=\alpha$. For convex loss functions the upper bound would then scale linearly in the number of iterations $T$, which seems to be too pessimistic. \cite{hardt2016train} show that by adding a $\frac{\mu}{2} \vert\vert w\vert\vert_{2}^{2}$ regularization term to the convex loss function, where $w$ is the vector of weights and $\mu \in \Theta(1)$ is a small constant, one gets a much better stability upper bound for constant step size that does not depend on $T$, and is $O(1/n)$. This gives rise to the following questions: \vspace{0.1cm} \noindent\textbf{Question 1:} Are the upper bounds of \cite{hardt2016train} for convex and strongly-convex functions tight? That is, can one construct loss functions that satisfy the hypotheses and exhibit the claimed worst-case stability performance? We remark that, to the best of our knowledge, the only construction available in the literature is ~\cite{bassily2020stability}. The authors analyze the stability of a loss function in order to derive lower bounds, but unfortunately the loss function is not smooth and therefore does not satisfy the hypothesis in \cite{hardt2016train}. \vspace{0.1cm} \noindent\textbf{Question 2:} How important is the regularization term in order to make the transition from convex to strongly-convex; and therefore the improvement from an $O(T/n)$ upper bound to an $O(1/n)$ upper bound for constant step-size SGD? We provide the following answers to the above questions: \noindent\textbf{Result 1:} The answer to question 1 is yes, i.e., there exist smooth, convex and strongly-convex loss functions that achieve the worst-case stability upper bound. \noindent\textbf{Result 2: (Data-dependent bounds)} We derive an upper bound on the stability for linear model loss function that is independent of $T$ (the number of iterations), even when the weight $\mu$ of the regularization term is very small (of the order of $1/n^4$), as long as the data satisfies a natural condition related to the Rayleigh quotient. Sharing a similar spirit with \cite{kuzborskij2018data}, our result suggests that the property of distribution plays an important role in generalization of SGD, and nice properties of the data can almost replace the need for regularization. \subsection{Non-Convex Loss} \cite{hardt2016train} also prove an upper bound for non-convex loss functions, and one wonders again whether the bound is tight. After only being able to prove a slightly weaker lower bound, we realized that this was because one can actually improve the analysis in~\cite{hardt2016train}! \noindent\textbf{Result 3:} We provide matching lower and upper bounds on the stability of SGD for non-convex functions, that are tighter than the upper bound in \cite{hardt2016train} for a wide and interesting range of values of $T$ (e.g., when $n<T<n^{10}$). In the non-convex setting, the bounds in both \cite{hardt2016train} and our Result 3 assume a decreasing step-size $\alpha_t \propto 1/t$ in SGD. However, in practice the constant step-size case is very important. Although it is not derived formally, the techniques in \cite{hardt2016train} can be employed to show an \emph{exponential} upper bound for non-convex loss functions minimized using SGD with constant-size step, raising the question of the existence of a better analysis. \noindent{\textbf{Result 4:}} We show that without any additional assumptions on either the loss function or the data distribution, improving on this analysis is hopeless by providing a lower bound that is exponential in $T$. \noindent{Data-dependent bounds:} This naturally raises the question of deriving data-dependent bounds on stability in the non-convex setting. The work in \cite{kuzborskij2018data} took the first step in this direction by analyzing SGD using concept of ``average stability'' from ~\cite{bousquet2002stability,shalev2010learnability}, and deriving upper bounds on it. Finally, we show: \noindent\textbf{Result 5:} The improved analysis for uniform stability of SGD on non-convex and smooth loss functions can also be applied to improve on the result in~\cite{kuzborskij2018data} and obtain a tighter bound for the average stability of SGD. In summary, we essentially close the open questions of tightness in data-independent settings for all three classes of functions, and improve upper bounds in the data-dependent setting. We hope that our results will initiate further efforts to better understand the data-dependent setting under non-convex loss functions and analyze the conditions under which one can expect better upper bounds on stability and generalization of SGD. \section{Related Works} \label{related} The stability framework suggests that a stable machine learning algorithm results in models with good generalization performance \cite{kearns1999algorithmic,bousquet2002stability,elisseeff2005stability,shalev2010learnability,devroye1979distributiona,devroye1979distributionb,rogers1978finite}. It serves as a mechanism for provable learnability when uniform convergence fails \cite{shalev2010learnability,nagarajan2019uniform}. The concept of uniform stability was introduced in order to derive high probability bounds on the generalization error~\cite{bousquet2002stability}. Uniform stability describes the worst case change in the loss of a model trained on an algorithm when a single data point in the dataset is replaced. In~\cite{hardt2016train}, a uniform stability analysis for \emph{iterative algorithms} is proposed to analyze SGD, generalizing the one-shot version in~\cite{bousquet2002stability}. Algorithmic uniform stability is widely used in analyzing the generalization performance of SGD~\cite{mou18a,feldman2019high,chen2018stability}. The worst case leave-one-out type bounds also closely connect uniform stability with \emph{differential private learning}~\cite{feldman2018privacy,feldman2020private,dwork2006calibrating,wu2017bolt}, where the uniform stability can lead to provable privacy guarantees. While the upper bounds of algorithmic stability of SGD have been extensively studied, the tightness of those bounds remains open. In addition to uniform stability, an \textit{average stability} of the SGD is studied in \cite{kuzborskij2018data} where the authors provide \textit{data-dependent} upper bounds on stability\footnote{While it is an interesting open problem to get data-dependent lower bounds by lower bounding the average stability, we construct lower bounds on the worst-case stability. Thus our lower bounds are general and not data-dependent.}. Our analysis framework for deriving improved bounds in ~\cite{hardt2016train} can also be applied to improve the data-dependent stability results in ~\cite{kuzborskij2018data}. In \cite{bassily2020stability}, a lower bound on the stability of SGD for nonsmooth convex losses is proposed. The lower bound is designed to illustrate the tightness of the stability analysis \emph{without} smoothness assumptions. In this work, we report for the first time lower bounds on the uniform stability of SGD for smooth loss functions. Our tightness analysis suggests the necessity of additional assumptions for analyzing the generalization of SGD for deep learning. \section{Preliminaries} \label{preliminary} In this section we introduce the notion of uniform stability and establish notation. We first introduce the quantities \emph{empirical risk}, \emph{population risk}, and \emph{generalization gap}. Given an unknown distribution $\mathcal{D}$ on labeled sample space $Z=X \times \mathbb{R}$, let $S=\{z_1,...,z_n\}$ denote a set of $n$ samples $z_i=(x_i,y_i)$ drawn i.i.d. from $\mathcal{D}$. Let $w \in \mathbb{R}^{d}$ be the parameter(s) of a model that predicts $y$ given $x$, and let $f$ be a loss function where $f(w;z)$ denotes the loss of the model with parameter(s) $w$ on sample $z$. Let $f(w;S)$ denote the \textit{empirical risk} $f(w;S)=E_{z \sim S }[f(w;z)]=\frac{1}{n} \sum_{i=1}^{n} f(w;z_i)$ with corresponding \textit{population risk} $E_{z \sim \mathcal{D} }[f(w;z)]$. The \textit{generalization error} of the model with parameter(s) $w$ is defined as the difference between the empirical and population risks: $$\vert E_{z\sim \mathcal{D}} [f(w;z)] -E_{z\sim S} [f(w;z)]\vert. $$ Next we introduce \emph{stochastic gradient descent} (SGD). We follow the setting of \cite{hardt2016train}: starting with initialization $w_{0} \in \mathbb{R}^{d}$, an SGD update step takes the form $$w_{t+1} = w_t-\alpha_t\nabla_w f(w;z_{i_t}),$$ where $i_t$ is drawn from $[n]=\{1,2,\cdots,n\}$ uniformly and independently in each round. The analysis of SGD requires the following crucial properties of the loss function $f(\cdot,z)$ at any fixed point $z$, viewed solely as a function of the parameter(s) $w$: \begin{definition}[$L$-Lipschitz] A function $f(w)$ is $L$-Lipschitz if $\forall u,v \in \mathbb{R}^{d}$: $|f(u)-f(v)| \leq L\|u-v\|$. \end{definition} \begin{definition}[$\beta$-smooth] A function $f(w)$ is $\beta$-smooth if $\forall u,v \in \mathbb{R}^{d}$: $|\nabla f(u)- \nabla f(v)| \leq \beta\|u-v\|$. \end{definition} \begin{definition} [$\gamma$-strongly-convex] A function $f(w)$ is $\gamma$-strongly-convex if $\forall u,v \in \mathbb{R}^{d}$: $$f(u)>f(v)+ \nabla f(v)^\top [u-v]+\frac{\gamma}{2}\|u-v\|^2.$$ \end{definition} \begin{definition}[$\rho$-Lipschitz Hessian] A loss function $f$ has a $\rho$-Lispchitz Hessian if $\forall u, v\in \mathbb{R}^d$, $\|\nabla^2f(u) - \nabla^2f(v)\|\leq\rho\|u-v\|.$ \end{definition} \paragraph{Algorithmic Stability:} Next we define the key concept of \textit{algorithmic stability}, which was introduced by~\cite{bousquet2002stability} and adopted by~\cite{hardt2016train}. Informally, an algorithm is \textit{stable} if its output only varies slightly when we change a single sample in the input dataset. When this stability is \textit{uniform} over all datasets differing at a single point, this leads to an upper bound on the generalization gap. We now flesh this out more formally. \begin{definition} Two sets of samples $S, S'$ are twin datasets if they differ at a single entry, i.e., $S = \{z_1,...z_i,...,z_n\}$ and $S'=\{z_1,...,z_i',...,z_n\}$. \end{definition} Now, let $\mathcal{A}$ be a (possibly randomized) algorithm which is parameterized by a sample $S$ of $n$ datapoints as $\mathcal{A}(S)$. \begin{definition}(Stability) Define the algorithmic stability parameter $\varepsilon_{\text{stab}}(\mathcal{A},n)$ as \begin{equation*} \inf \{\varepsilon:\sup_{{z, S, S'}} \mathbb{E}_{\mathcal{A}}\vert f(\mathcal{A}(S);z)-f(\mathcal{A}(S');z)\vert \leq \varepsilon \}. \end{equation*} \end{definition} The expectation $\mathbb{E}_{\mathcal{A}}$ factors in the possible randomness of $\mathcal{A}$. For such an algorithm, one can define its expected generalization error as $$GE(\mathcal{A},n)\coloneqq \mathbb{E}_{S,\mathcal{A}}[E_{z\sim \mathcal{D}} [f(\mathcal{A}(S);z)] -E_{z\sim S} [f(\mathcal{A}(S^{'});z)]].$$ We also define a data-dependent stability which is an average stability that was introduced by~\cite{rakhlin2005stability,shalev2010learnability} and was applied for analyzing algorithmic stability of SGD by \cite{kuzborskij2018data}. \begin{definition}[On-average stability]\label{avg_stab} Let $\mathcal{D}$ be the data distribution and $w_0$ be the initialized weight. A randomized algorithm $\mathcal{A}$ is ${\widehat{\varepsilon}}_{\text{stab}}(\mathcal{D}, w_0)$-on-average stable if \begin{equation*} \mathbb{E}_{S,S'}\mathbb{E}_{\mathcal{A}} [f(\mathcal{A}_S;z) - f(\mathcal{A}_{S^{'}};z)] \leq {\widehat{\varepsilon}}_{\text{stab}}(\mathcal{D}, w_0), \end{equation*} where $S\stackrel{iid}{\sim}\mathcal{D}^m$ and $S^{'}$ is its copy with $i$-th example replaced by $z\stackrel{iid}{\sim}\mathcal{D}$. \end{definition} Throughout this paper, we will write ${\varepsilon}_{\text{stab}}$ and ${\widehat{\varepsilon}}_{\text{stab}}$ omitting dependencies that are clear in context. \vspace{0.1cm} \noindent\textbf{Stability and generalization:} It was proved in~\cite{hardt2016train} that $GE(\mathcal{A},n) \leq \varepsilon_{\text{stab}}(\mathcal{A},n)$. Furthermore, the authors observed that an $L$-Lipschitz condition on the loss function $f$ enforces a uniform upper bound: $\sup_{z\in Z}|f(w;z)-f(w';z)| \leq L\|w-w'\|$. This implies that for a Lipschitz loss, the algorithmic stability $\varepsilon_{\text{stab}}(\mathcal{A},n)$ (and hence the generalization error $GE(\mathcal{A},n)$) can be bounded by obtaining bounds on $\|w-w'\|$. And in \cite{kuzborskij2018data} they have similar results in the notion of on-average stability. Let $w_{t}$ and $w_{t}^{'}$ be the parameters obtained by running SGD on twin datasets $S,S'$ respectively for $t$ iterations. The \emph{divergence quantity} is defined as $\delta_{t}\coloneqq \mathbb{E}_{\mathcal{A}}\vert\vert w_{t}-w_{t}^{'}\vert\vert$. While \cite{hardt2016train} reports upper bounds on $\delta_{t}$ for different loss functions, e.g., convex and non-convex loss functions, we investigate the tightness of those bounds. \section{Main Results} \label{main} In this section we report our main results. We first consider the convex case with constant step size, where we prove 1) that the existing bounds in ~\cite{hardt2016train} are tight, and 2) for linear models, the we report a data-dependent analysis to show that $\varepsilon_{\text{stab}}$ does not increase with $t$. Then we move on to the non-convex case, where a) for decreasing step size we report a lower bound suggests that within a wide range of $T$, existing bound in ~\cite{hardt2016train} is not tight. We prove a tighter upper bound which matches our lower bound thus, and b) for constant step size we give loss functions whose divergence $\delta_{t}$ increases exponentially with $t$. \subsection{Convex Case} In this section we analyze the stability of SGD when the loss function is convex and smooth. We begin with a construction which shows that Theorem 3.8 in~\cite{hardt2016train} is tight. Our lower bound analysis will require the quadratic function \begin{equation}\label{quad_fn} f(w;z)=\frac{1}{2} w^\top Aw - yx^\top w, \end{equation} where $A$ is a $d\times d$ matrix. In the construction of lower bounds, we carefully choose $A$ and $S$ so that the single data point replaced in the twin data set will cause the instability of SGD. In particular, we will choose $A$ to be a PSD matrix in the convex case in the construction of the lower bound and choose $A$ to be an indefinite matrix with some strictly negative eigenvalues in the non-convex case. We first begin with the following lemma which describes how $\|w_t-w'_t\|$ behaves for functions defined in Equation~\ref{quad_fn}. \begin{lemma}[Dynamics of divergence] \label{lem1} Let $f(w;x) = \frac{1}{2}w^\top Aw - yx^\top w$. Suppose $[x_i-x_i']/\|x_i-x_i'\|$ is an eigenvector of $A$, i.e., $A[x_i-x_i'] = \lambda_{xx'}[x_i-x_i']$. Let $\Delta_{t}$ be $w_t-w_t'$, $\alpha_t \leq \lambda_{xx'}$ be the step size of SGD and $\Delta_0 =0$. If one runs SGD on $f(w,S)$ and $f(w,S')$ where $S,S'$ are twin datasets and ${x'}_i^\top x_j = 0, x_i^\top x_j = 0, \;\forall j \neq i$, then the dynamics of $\Delta_t$ are given by \begin{equation} \mathbb{E}_{\mathcal{A}} \|\Delta_{t+1}\| = (1-\alpha_t \lambda_{xx'})\mathbb{E}_{\mathcal{A}}\|\Delta_t\|+\frac{\alpha_t}{n}\|x_i-x_i'\|. \end{equation} \end{lemma} The next lemma recursively applies Lemma~\ref{lem1}. We will carefully chose $\lambda_{xx'}$ in the following lemma for lower bound constructions in the convex and non-convex cases. \begin{lemma} [Lower bound on divergence] \label{lem2} Let $f(w;x) = \frac{1}{2}w^\top Aw - yx^\top w$. Suppose $[x_i-x_i']/\|x_i-x_i'\|$ is an eigenvector of $A$ where $A[x_i-x_i'] = \lambda_{xx'}[x_i-x_i']$. Let $\Delta_{t}$ be $w_t-w_t'$, $\alpha_t \leq \lambda_{xx'}$ be the step size of SGD and $\Delta_0 =0$. If one runs SGD on $f(w,S)$ and $f(w,S')$ where $S,S'$ are twin datasets and ${x'}_i^\top x_j = 0, x_i^\top x_j = 0, \;\forall j \neq i$, then we have $$\mathbb{E}_{\mathcal{A}}\|\Delta_{T}\| \geq \frac{\|x_i-x_i'\|}{n} \sum_{t=1}^{T-1} \prod_{\tau=t+1}^{T-1} \alpha_t(1-\alpha_\tau\lambda_{xx'}).$$ \end{lemma} Now we can present our tightness results. We begin with the convex case. The main idea of the construction is to leverage Equation~\ref{quad_fn} with specially designed $A$ and $S,S'$ to ensure that $\mathbb{E}_{\mathcal{A}}\|w_T-w'_T\|$ will diverge. To obtain the $L$-Lipschitz condition, we trim $f(w;S)$ to mimic the Huber loss function~\cite{huber1992robust} so that the smoothness is maintained for the piecewise function. \begin{thm} [Lower bound for convex losses]\label{CvxLowerBound} Let $w_t,w_t'$ be the outputs of SGD on twin datasets $S,S'$ respectively. Let $\Delta_{t} = w_t-w_t'$ and $\alpha_t$ be the step size of SGD. There exists a function $f$ which is convex, $\beta$-smooth, and $L$-Lipschitz, and twin datasets $S,S'$ such that \begin{equation} \varepsilon_{\text{stab}} \geq \frac{L}{2n} \sum_{t=1}^{T} \alpha_t. \end{equation} \end{thm} The convex upper bound in Theorem 3.8 of~\cite{hardt2016train} states that $\mathbb{E}_{\mathcal{A}}\|\Delta_T\| \leq \sum_{i=1}^{T} \frac{ \alpha_t L}{n}$, which implies that the divergence increases throughout training. The lower bound in Theorem~\ref{CvxLowerBound} suggests the tightness of the upper bound. However, in practice, this is not commonly observed; the generalization performance does not deteriorate as the number of training iterations increases. Under the $\gamma$-strongly-convex loss function condition,~\cite{hardt2016train} provides an $O(\frac{1}{n})$ uniform stability bound, which fits better with empirical observations on classical convex losses. In the next theorem, we show the tightness of the $O(\frac{1}{n})$ bound for strongly-convex losses. \begin{thm} [Lower bound for strongly-convex losses] \label{strongly_cvx_lowerbound} Let $w_t,w_t'$ be the outputs of SGD on twin datasets $S,S'$ respectively, $\Delta_{t}$ be $w_t-w_t'$ and $\alpha =\frac{1}{2 \beta}$ be the step size of SGD. There exists a function $f$ which is $\gamma$-strongly-convex and $\beta$-smooth, and twin datasets $S,S'$ such that the divergence and stability of the two SGD outputs satisfies \begin{equation} \varepsilon_{\text{stab}} \geq \frac{1}{16\gamma n}. \end{equation} \end{thm} Theorem \ref{strongly_cvx_lowerbound} provides evidence for the tightness of the $O(\frac{1}{n})$ stability bound on SGD. To obtain such stability, the loss function must satisfy $\nabla^2_w f(w;z) >\gamma I_d$ with $\gamma=\Omega(1)$. In general this does not hold, e.g., the Hessian of an individual linear regression loss term is $x_j x_j^\top$ which is not strongly-convex. In practice one can incorporate a strongly-convex regularizer to impose strong convexity, often resulting in improved generalization performance in practice~\cite{shalev2010learnability,bousquet2002stability}. However, an $O(1)$ regularization term will bias the loss function away from achieving sufficiently low empirical risk. This motivates us to investigate a weaker condition than strong convexity which still can enforce an $O\left( \frac{1}{n} \right)$ stability, without substantially biasing the loss function. In the remainder of this section, we restrict ourselves to a family of linear model loss functions and show that the $O(\frac{1}{n})$ stability results can be obtained under the framework of average stability. The results of Theorem~\ref{cvxupperbound} have a dependence on a property of the distribution, and are thus data-dependent. We begin with the definition of a $\xi$-bounded Rayleigh quotient. Essentially, a bounded Rayleigh quotient dataset requires an average linear dependence of $Span\{x_1,...,x_n\}$. Recall that the $i$-th sample is of the form $z_{i}=(x_{i},y_{i})$. \begin{definition} \label{self_corr} A set $S=\{(x_1,y_1),...,(x_n,y_n)\}$ is defined to have $\xi_S$- bounded Rayleigh quotient if $\forall v \in Span\{x_1,...,x_n\}$ $$ v^\top (\frac{1}{n}\sum^{n}_{i=1}x_ix_i^\top)v\geq \xi_S v^\top v.$$ A distribution $\mathcal{D}$ has a $(\xi,n,\mu)$-inversely bounded Rayleigh quotient if there exists a constant $\xi>0$ such that $$\mathbb{E}_{S\sim \mathcal{D}^n} \left[ \frac{1}{\xi_S+\mu} \right] \leq \frac{1}{\xi+\mu}.$$ \end{definition} \begin{remark} The value of $\xi_S$ is always lower bounded by the minimum nonzero eigenvalue of $\frac{1}{n} \sum_{j} x_j x_j^\top $ which is the empirical covariance matrix of sample size $n$. \end{remark} \begin{prop}[Example of distribution with inversely bounded Rayleigh quotient] \label{invers_eigen} Suppose that $S=\{(x_1,y_1),\ldots,(x_n,y_n)\}$ is sampled from $\mathcal{D}$ with the $x_j$ sampled from a $d$-dimensional spherical Gaussian with dimension $d>10$. Then, $\mathcal{D}$ has a $(\frac{1}{5},n,\mu)$-inversely bounded Rayleigh quotient if $\mu = \Omega(\frac{1}{n^4})$ and $n \geq 2d$. \end{prop} \begin{remark} Proposition~\ref{invers_eigen} implies that for data generated in the form of $\Tilde{x}=UDx$ where $U \in \mathbb{R}^{d \times k}$ is a column-wise orthonormal matrix, $D=diag(\lambda_1,...,\lambda_k)\in {\mathbb{R}_+}^{k \times k}$ is a diagonal matrix and $x \sim \mathcal{N}(0,I_k)$, the empirical covariance matrix has a bounded regularized inverse. Thus distribution of $\Tilde x$ has a $(\frac{1}{5\lambda_{k}},n,\frac{1}{n^4})$-inversely bounded Rayleigh quotient. \end{remark} In our next theorem, we leverage the inversely bounded Rayleigh quotient condition to prove a non-accumulated on-average stability bound for SGD on \emph{linear models} with a regularized loss function. We characterize a linear model by rewriting the loss function $f(w;z)$ in terms of $f_y(w^\top x)$ where $f_y(\cdot)$ is a scalar function depending only on the inner product of the model parameter $w$ and the input feature $x$. \begin{thm} [Data-dependent stability of SGD with inversely bounded Rayleigh quotient] \label{cvxupperbound} Suppose a loss function $f(w;z)$ is of the form $$f(w;S) =\frac{1}{n} \sum_{j=1}^{n} f_{y_j}(w^\top x_j)+\frac{\mu}{2} w^\top w,$$ where $f_y(w^\top x)$ satisfies $(1)\; |f_y'(\cdot)| \leq L $ , $(2)\; 0<\gamma \leq f_y''(\cdot) \leq \beta$, (3) $S , S'$ are sampled from $\mathcal{D}$ which has $(\xi,n,\frac{\mu}{\gamma})$ -inversely bounded Rayleigh quotient with bounded support on $x$: $\|x\| \leq R$ and 4) $\mu =\Omega(\frac{\gamma}{n^4})$. Let $w_t$ and $w_t'$ be the outputs of SGD on $S$ and $S'$ after $t$ steps, respectively. Let the divergence $\Delta_{t}=w_t-w_t'$ and $\alpha\leq \frac{\mu }{2\beta^2R^2}$ be the step size of SGD. Then, \begin{equation} {\widehat{\varepsilon}}_{\text{stab}} \leq \frac{16L^2R^2}{\xi\gamma n}. \end{equation} \end{thm} \begin{remark} The inversely bounded Rayleigh quotient condition allows SGD to maintain an average stability guarantee for a family of widely used models with a negligible regularizer and large sample size. The theorem suggests that if the dataset $S$ is sampled from a `good' distribution, one can obtain an advanced generalization property which mainly depends on the distribution. The theorem also justifies the common choice of small values for the weight in the $L_2$-regularizer (also known as \textit{weight decay}) when training ridge regression type models. \end{remark} \textbf{Example: Linear regression.} Linear regression minimizes the quadratic loss on $w$: $f(w,S) = \frac{1}{2n}\sum_{x_j\in S} (x_j^\top w-y_j)^2$. Note that the Hessian of an individual linear regression loss term is $x_j x_j^\top$ which is \textit{not strongly-convex}. However, one can rewrite the loss function as $f_y(w^\top x)$ where $f''_y(\cdot) = 1 $. Hence Theorem~\ref{cvxupperbound} can be applied to give a data-dependent bound on the stability of SGD in above example. \subsection{Non-Convex Case} In this section, we construct a non-convex loss function to analyze the tightness of the divergence bound in \cite{hardt2016train}. We first focus on the case where SGD applies a step size that \textit{decreases with $t$}. Define a \emph{hitting time} to be the time $t$ that satisfies $w_{t-1}-w_{t-1}^{'} = 0$ and $w_{t}-w_{t}^{'} \neq 0$. We first fix a hitting time $t_{0}$ and prove Lemma~\ref{thm2}. \begin{lemma}[Divergence of non-convex loss function]\label{thm2} There exists a function $f$ which is non-convex and $\beta$-smooth, twin datasets $S,S'$ and constant $a>0$ such that the following holds: if SGD is run using step size $\alpha_t = \frac{a}{0.99 \beta t}$ for $1 \leq t < T$, and $w_t, w_t'$ are the outputs of SGD on $S$ and $S'$, respectively, and $\Delta_{t}=w_t-w_t'$, then $$ \forall 1 \leq t_0 \leq T,\ \ \ \ \mathbb{E}_{\mathcal{A}}\left[ \|\Delta_T\| | \Delta_{t_0} \neq 0 \right] \geq \frac{1}{2n} \left(\frac{T}{t_0}\right)^a. $$ \end{lemma} The following theorem follows from Lemma~\ref{thm2} by optimizing over $t_{0}$. The choice of hitting time $t_0$ plays an important role in the analysis, which is also illustrated in the ``burn-in Lemma'' 3.11 in \cite{hardt2016train}. \begin{thm}[Lower bound for non-convex loss functions]\label{thm3} Let $w_t, w_t'$ be the outputs of SGD on twin datasets $S,S'$, and $\Delta_{t}=w_t-w_t'$. There exists a function $f$ which is non-convex and $\beta$-smooth, twin datasets $S,S'$ and constants $a<0.1$ such that the divergence of SGD after $T>n$ rounds using constant step size $\alpha_t = \frac{a}{0.99\beta t}$ satisfies \begin{equation}\varepsilon_{\text{stab}} \geq \frac{T^{a}}{6n^{1+a}}.\end{equation} \end{thm} In the above theorem, the lower bound is derived by choosing $t_0=n$ in Lemma~\ref{thm2}. The bound in \cite{hardt2016train} is of the form $O\left( \frac{T^{\frac{a}{1+a}}}{n}\right)$ which does not match the above lower bound. According to the lower bound provided in Theorem \ref{thm3}, the bound in \cite{hardt2016train} may not be tight in the region $T^{\frac{a}{1+a}} \leq n$. We investigate this gap and derive a tighter bound in the next theorem which improves on Theorem 3.12 in~\cite{hardt2016train}. To prove a better upper bound for non-convex losses, we first consider the case of sampling from the data without replacement, which we call \emph{permutation SGD}. We need the following lemma, which gives us the expectation of divergence for a given hitting time $t_k + 1$, which is the timestamp of permutation SGD first selecting the $k$-th different sample. \begin{lemma} \cite{hardt2016train}\label{lem_SGD} Assume $f$ is $\beta$-smooth and $L$-Lipschitz. Let $w_t, w_t'$ be outputs of $SGD$ on twin datasets $S,S'$ respectively after $t$ iterations and let $\Delta_{t}=[w_t-w_t']$ and $\delta_t = \mathbb{E}\|\Delta_t\|$. Running SGD on $f(w;S)$ with step size $\alpha_t = \frac{a}{\beta t }$ satisfies the following conditions: \begin{itemize} \item The SGD update rule is a $(1+\alpha_t \beta)$-expander and $2\alpha_t L$-bounded. \item $\mathbb{E}_{\mathcal{A}}[ \|\Delta_{t}\| | \Delta_{t-1} ] \leq \left(1+\alpha_t\beta \right)\|\Delta_{t-1}\| +\frac{2\alpha_tL}{n}$. \item $\mathbb{E}_{\mathcal{A}}[ \|\Delta_{T}\| | \Delta_{t_{k}}=0 ] \leq \big(\frac{T}{t_{k}}\big)^{ a}\frac{2L}{ n}$. \end{itemize} \end{lemma} By taking the expectation over hitting time $t_k + 1$ from 0 to $n$ we obtain an upper bound on the stability for non-convex losses. \begin{thm} [Permutation SGD]\label{permutation} Assume $f$ is $\beta$-smooth and $L$-Lipschitz. Running $T>n$ iterations of SGD on $f(w;S)$ with step size $\alpha_t = \frac{a}{\beta t }$, the stability of SGD satisfies\\ \begin{equation} \varepsilon_{\text{stab}} \leq \frac{2L^2T^a}{n^{1+a}}. \end{equation} \end{thm} Dividing our bound by the bound in Theorem 3.12 of~\cite{hardt2016train}, we obtain the ratio $ \Omega \left( \frac{T^{\frac{a^2}{1+a}}}{n^a}\right)$. This factor is less than 1 (and so we improve the upper bound) exactly when $T^{\frac{a}{1+a}} \leq n$. Note that this is potentially a large range as $a$ is a small and positive constant. We remark that our tight bound is for \emph{permutation SGD}. We also prove the bound for \emph{uniform sampling SGD} which uses sampling with replacement with an additional $\log(n)$ factor, and still achieves a polynomial improvement for a wide range of $T$. \begin{lemma} \label{lem_prob_rule} Let $w_t, w_t'$ be outputs of $SGD$ on twin datasets $S,S'$ after $t$ iterations and let $\Delta_{t}=w_t-w_t'$. Suppose that $t_k = ct_{k-1}$. Then the following conditions hold: \begin{itemize} \item $\mathbb{P}[ \Delta_{t_k-1}=0| \Delta_{t_{k}}\neq 0 ]\leq \frac{n}{n+t_{k-1}}$. \item $\mathbb{P}[ \Delta_{t_k-1} \neq0| \Delta_{t_{k}}\neq 0 ]\leq \frac{1}{c}\left(1+\frac{t_k}{n}\right)$. \item $\mathbb{E}_{\mathcal{A}}[ \|\Delta_{T}\|| \Delta_{t_{k}}\neq 0 ] \leq \frac{1}{c}\left(1+\frac{t_k}{n}\right)\mathbb{E}_{\mathcal{A}}[ \|\Delta_{T}\| | \Delta_{t_{k-1}}\neq 0 ] +\big(\frac{T}{t_{k-1}}\big)^{ a}\frac{2L}{ n}$. \end{itemize} \end{lemma} By applying the last inequality in Lemma~\ref{lem_prob_rule} recursively, we could bound the case where the hitting time is not equal to $t_k.$ Then we obtain an upper bound for the stability of uniform sampling SGD as follows: \begin{thm}[Uniform sampling SGD]\label{unif_indep} Assume $f$ is $\beta$-smooth and $L$-Lipschitz. Running $T>n$ iterations of SGD on $f(w;S)$ with step size $\alpha_t = \frac{a}{\beta t }$, the stability of SGD satisfies\\ $$\varepsilon_{\text{stab}} \leq 16\log(n)L^2\frac{T^a}{n^{1+a}}. $$ \end{thm} In~\cite{kuzborskij2018data}, the data-dependent stability of SGD is analyzed, incorporating the dependence on the variance of SGD curvature and the loss of the initial parameter $w_0$ in analyzing the divergence of SGD. This framework has applications in transfer learning, as well as implications including optimistic generalization error. We observe that our analysis in Theorems ~\ref{permutation} and~\ref{unif_indep} can be combined with the data-dependent framework, and we now report our data-dependent versions of Theorems~\ref{permutation} and~\ref{unif_indep}. The analysis requires the additional bounded variance assumption for SGD which we now present: In the rest of this section we assume the variance of SGD satisfies \[ \mathbb{E}_{S, z}\left[\|\nabla f(w_{t}; z) - \nabla \mathbb{E}_{z}(f(w_{t}; z))\|^2\right] \leq \sigma^2,\;\;\;\; \forall t. \] We borrow the following lemma from~\cite{kuzborskij2018data} which is a data-dependent version of Lemma~\ref{lem_SGD}. \begin{lemma} \cite{kuzborskij2018data}\label{lem_SGD_data_dep} Assume $f$ is $\beta$-smooth, $L$-Lipschitz, and has a $\rho$-Lipschitz Hessian. With $w_0$ the initial weight and $w_t$, $w_{t'}$ the outputs of SGD on twin datasets $S,S'$ respectively after $t$ iterations, let $\Delta_t =[w_t - w_{t'}]$. Running SGD on $f(w;S)$ with step size $\alpha_t = \frac{b}{t}$ where $b \leq \min\{\frac{2}{\beta}, \frac{1}{8\beta^2\ln T^2}\}$ has the following properties: \begin{itemize} \item The SGD update rule is a $(1+\alpha_t\psi_t)$-expander and $\alpha_t L$-bounded. Here $\psi_t = \min\{\beta, \kappa_t\}$ where $$\kappa_t = \|\nabla^2 f(w_0;z_t)\|_2 + \frac{\rho}{2}\|\sum_{k=1}^{t-1}\alpha_k\nabla f(w_{S, k}; z_k)\|+ \frac{\rho}{2}\|\sum_{k=1}^{t-1}\alpha_k\nabla f(w_{S^{'}; k}, z_k)\|. $$ \item $\mathbb{E}_{\mathcal{A}}[\|\Delta_{t+1}\||\Delta_{t_0}=0] \leq\{\mathbb{E}_{\mathcal{A}}[\|\Delta_{t}\||\Delta_{t_0}=0][1+(1-\frac{1}{n})\alpha_t\psi_t]\} + \frac{2\alpha_tL}{n}.$ \item $E_{S,S^{'}}\{E_{\mathcal{A}}[\|\Delta_{T}\||\Delta_{t_0}=0]\} \leq \frac{L}{n}\left(\frac{T}{t_0}\right)^{\zeta b}$, where $$\zeta = \tilde{O}(\min\{\beta, E_z[\|\nabla^2f(w_0; z)\|_2] + \Delta^*_{1, \sigma^2}\})$$ $$\Delta^*_{1, \sigma^2} = \rho(b\sigma + \sqrt{bE_z[f(w_0; z)] - \inf_{w}E_z[f(w; z)].}$$ \end{itemize} \end{lemma} Similar to the proof of Theorem~\ref{permutation}, we apply Lemma~\ref{lem_SGD_data_dep} to show a data-dependent version of Theorem~\ref{permutation}. \begin{thm}[Data-dependent version of Theorem~\ref{permutation}]\label{permutation_new} Assume $f$ is $\beta$-smooth, $L$-Lipschitz, and has a $\rho$-Lipschitz Hessian. Let $w_0$ be the initial weight and $w_t$, $w_{t'}$ be the outputs of SGD on twin datasets $S$ and $S'$ respectively after $t$ iterations. Let $\Delta_t =[w_t - w_{t'}]$. Running SGD on $f(w;S)$ with step size $\alpha_t = \frac{b}{t}$ where $b \leq \min\{\frac{2}{\beta}, \frac{1}{8\beta^2\ln T^2}\}$ satisfies\\ \begin{equation} {\widehat{\varepsilon}}_{\text{stab}} \leq \frac{L^2T^{\zeta b}}{\zeta n^{1+\zeta b}}. \end{equation} \end{thm} We could obtain the ratio $\Omega(T^{\frac{(\zeta b)^2}{1+\zeta b}}/(\mathbb{E}_{S,\mathcal{A}}[f(w_T;S)]^\frac{1}{1+ \zeta b}n)^{\zeta b})$ by dividing our stability bound in the results of Theorem 4 of~\cite{kuzborskij2018data}. This factor is less than 1 when $T^{\frac{\zeta b}{1+\zeta b}}<\mathbb{E}_{S,\mathcal{A}}[f(w_T;S)]^\frac{1}{1+ \zeta b}n$. Since $b\leq \min\{2/\beta, 1/(8\beta^2\ln T^2)\}$ and $\zeta$ is bounded above by $\beta$, and $\mathbb{E}_{S,\mathcal{A}}[f(w_T;S)]$ is usually $\Theta(1)$, within a large range of $T$ we have a polynomial improvement over Theorem 4 of~\cite{kuzborskij2018data}. The following lemma is a direct application of Lemma \ref{permutation}. It is also an on-average extension of Lemma~\ref{lem_prob_rule} part 3. \begin{lemma}[Data-dependent version of Lemma~\ref{lem_prob_rule}]\label{lem_prob_rule_new} Let $w_t, w_t'$ be outputs of $SGD$ on twin datasets $S,S'$ respectively after $t$ iterations and let $\Delta_{t}=w_t-w_t'$. And let $b$, $\zeta$ be as in Lemma~\ref{lem_SGD_data_dep}. Suppose that $t_k = ct_{k-1}$. Then the following condition holds: \begin{equation} \mathbb{E}_{S,S^{'}}\mathbb{E}_{\mathcal{A}}[ \|\Delta_{T}\|| \Delta_{t_{k}}\neq 0 ] \leq \big(\frac{T}{t_{k-1}}\big)^{\zeta b}\frac{L}{\zeta n} + \mathbb{E}_{S, S{'}}\mathbb{E}_{\mathcal{A}}[ \|\Delta_{T}\| | \Delta_{t_{k-1}}\neq 0 ] \frac{1}{c}\left(1+\frac{t_k}{n}\right). \end{equation} \end{lemma} Based on the above lemma, we can prove an upper bound of on-average stability with uniform sampling SGD using the same technique as for Theorem~\ref{unif_dep}. \begin{thm}[Data-dependent version of Theorem~\ref{unif_indep}] \label{unif_dep} Assume $f$ is $\beta$-smooth, $L$-Lipschitz, and has a $\rho$-Lipschitz Hessian. Let $w_t,w_{t'}$ be the outputs of SGD on twin datasets $S,S'$ respectively after $t$ iterations and let $\Delta_t =[w_t - w_{t'}]$ and $\delta_t = E_\mathcal{A}\|\Delta_t\|$. And let $\zeta$ follow the same definition as in Lemma~\ref{lem_SGD_data_dep}. Running SGD on $f(w;S)$ with step size $\alpha_t = \frac{b}{t}$ where $b < 1$ satisfies\\ \begin{equation} {\widehat{\varepsilon}}_{\text{stab}} \leq \frac{16\log(n)L^2T^{\zeta b}}{\zeta n^{1+\zeta b}}. \end{equation} \end{thm} We conclude this section with the following lower bound on the uniform stability of SGD with constant stepsize for non-convex loss functions. We show that for non-convex functions satisfying classical conditions $\beta$-smooth, we cannot avoid a pessimistic bound. Thus, in order to analyze the generalization power of SGD for deep learning loss functions from an optimization perspective, different conditions are necessary. \begin{thm} \label{noncvx_lowerbound} Let $w_t, w_t'$ be the outputs of SGD on twin datasets $S,S'$, and let $\Delta_{t}=w_t-w_t'$. There exists a non-convex, $\beta$-smooth function $f$, twin sets $S,S'$ and constants $a,\gamma$ such that the divergence of SGD after $T>n$ rounds using constant step size $\alpha = \frac{a}{0.99 \gamma }$ satisfies $$\varepsilon_{\text{stab}} \geq \exp(aT/2)/n^2$$ \end{thm} \section{Conclusion and Future Work}\label{conclusion} We first provided matching upper and lower data-independent bounds on the stability of SGD for three kinds of loss functions: convex, strongly-convex, and non-convex, essentially closing the gap in all cases. We then provided stronger data-dependent generalization bounds for both convex and non-convex loss functions by analyzing average-stability, showing that nice properties of data can both improve generalization and also reduce the need for regularization. At least two interesting open questions arise from our work: a) Can one obtain data-dependent lower bounds on average-stability that show the tightness of existing analysis? b) Can one devise properties of data-distributions or loss functions (perhaps motivated by deep learning) that imply better data-dependent stability bounds? \bibliographystyle{plain}
\section{Introduction} Doubly ionized helium ($He^{2+}$ or $\alpha$ particle) is the second most abundant species in the solar wind after the singly ionized Hydrogen ($H^+$ or proton). Despite helium being the second most abundant element in the solar wind, doubly ionized helium atom abundance in the quiet solar wind does not exceed 4-5\% \citep{Laming2001Feldman} and is strongly regulated by a number of processes occurring in the chromosphere, transition region and corona. Helium is four times heavier than hydrogen and as a consequence, it constitutes 25\% of the solar wind mass flux. The first ionization potential (FIP) of helium being the highest among the solar elements, helium gets ionized later than any other element and this occurs at the topside of the chromosphere. It is believed that the FIP effect \citep{Laming2015} primarily depletes the helium abundance in the chromosphere and the transition region. Processes like gravitational settling, Coulomb collisions and other wave-particle interactions also contribute in varying degrees to the helium depletion process at different heights \citep{Moses2020}. The variation of $A_{He}$ with solar activity was first indicated by \cite{Hirshberg1973} and \cite{Ogilvie1974} by comparing these with the variations in the sunspot numbers (SSN). These authors used multiple satellite data to show the relationship between $A_{He}$ and SSN. Subsequently, \cite{feldman1978long} used IMP satellite data to extend the result of \cite{Ogilvie1974} and indicated a possible delay between the variations in $A_{He}$ and SSN. \cite{Aellig2001} extended the solar cycle variation of $A_{He}$ using WIND data and found out a linear relationship between the SSN and the $A_{He}$ for the slow solar wind. No such strong relationship was found to exist for the fast-solar wind. It was also found that the linear relationship between the solar wind velocity and the $A_{He}$ for the slow solar wind is strong during minima but weak during maxima. Further, in order to understand the variation of $A_{He}$ for slow solar wind, \cite{Kasper2007, Kasper2012} investigated the solar activity variation of $A_{He}$ for approximately one full solar cycle. The above studies suggest the possible association between the sources of the solar wind and solar activity variation of $A_{He}$. In addition to this, right from the work of \cite{feldman1978long}, it is suggested that there exists a delay (hysteresis) between $A_{He}$ and SSN. In recent times, \cite{Alterman2019} investigated the delay in $A_{He}$ variation with respect to the variations in SSN and found a linear relationship between the solar wind velocity and the delay. Although the solar activity dependence of $A_{He}$ and the hysteresis between $A_{He}$ and SSN were shown, it is not known whether helium abundance in solar wind behaved identically in the last four solar cycles. The answer to this question can shed light on the long-term changes in the way helium got processed in the coronal magnetic field of the Sun. This is an important question as many authors showed declining solar activity from cycle 23 onwards \citep{Janardhan2011}. The results presented in this work provide evidence that the variation of helium abundance started changing from cycle 23 onwards and is conspicuously different in cycle 24. \begin{figure*} \includegraphics[scale=0.32]{fig1_MN-21-0020-L.R1.pdf} \caption{\textbf{Frequency of distribution of $A_{He}$ in different velocity bins in the last four solar cycles.} Frequency distribution of $A_{He}$ events with 1\% bin size for four velocity bins, viz. (1) $<$ 300 km/s (2) 300-400 km/s (3) 400-500 km/s (4) 500-600 km/s (6) $\geq$ 600 km/s in solar cycles 21 (a), 22 (b), 23 (c) and 24 (d). Each velocity window is marked with different colors (filled circle joined by solid line) and are shown at the top of the Figure. The frequency distributions are approximated by log-normal distributions wherein A, $\sigma$ and m are the fit parameters namely normalization coefficient, standard deviation and median in linear scale respectively. It can be noted that m monotonically decreases for 300-400 km/s and 400-500 km/s velocity bin as one goes from cycle 21 to cycle 24. Further, the shift of the peak $A_{He}$ from the usual 4-5\% (in cycles 21 and 22) to 2-3\% in the 400-500 km/s velocity range and increase in the frequency in the 300-400 km/s velocity range in cycle 24 are also conspicuous. The vertical dashed lines mark $A_{He}$ of 4.5\%. This figure also reveals that the frequency of occurrence for $A_{He}$ $>$ 10\% events are insignificant in statistical sense. \label{fig:1}} \end{figure*} \section{Dataset} The low resolution OMNI (LRO) database used in this work contains multi-spacecraft data (like IMP, Wind, ACE, Geotail etc.,) having 1-hour cadence. Some of these satellites are in earth orbit and for these satellites, the measurements made outside the terrestrial magnetosphere are considered. The plasma data from some spacecraft and parameters are compared and cross-normalized with respect to the Wind/SWE/NLF data. For the present investigation wherein proton and alpha measurements are used, primarily four multi-source data are used. These are IMP6/IMP7/IMP8 satellite data during 1971-1978, IMP8 data during 1973-2001, IMP8/ISEE3 data during 1978-1982 and IMP8, Wind, ACE, Geotail data during 1995-2019. These aspects are detailed comprehensively in \url{https://omniweb.gsfc.nasa.gov/html/ow_data.html}. One can also find the discussions on the time shifting of the dataset for various satellites, data averaging scheme, spacecraft prioritization, cleaning of source data as well as the possible sources of random and systematic differences between hourly averages of pairs of like parameters obtained by two spacecraft in this link. In addition, \cite{King2005} and references cited therein also provide the nuances of the normalization scheme for ACE and WIND satellites that are major contributors to this ONMI dataset. Although the OMNI database starts from 1963, the $A_{He}$ dataset is available since 1971. The data are parsed to create data for the solar cycles 21-24 marked by the years 1976-1986, 1987-1996, 1997-2008 and 2009-2019 respectively. \section{Results} Solar cycle 24 turns out to be the weakest cycle in the last one hundred years \citep{hathaway2015solar}. In order to evaluate the changes, if any, in the solar wind helium abundance in cycle 24 compared to the previous three cycles, we performed a number of extensive analyses of $A_{He}$ data taken at 1-hour cadence and available in the OMNI database (\url{https://cdaweb.gsfc.nasa.gov/index.html/}) spanning over almost half a century and encompassing the last four solar cycles (cycle 21 to cycle 24). \subsection{Frequency of $A_{He}$ events ($\leq$ 10\% and $\geq$ 10\%) in the last four solar cycles } As a first step, we divided the 1 hourly $A_{He}$ data for each solar cycle in five velocity bins, viz. (1) $<$ 300 km/s, (2) 300-400 km/s, (3) 400-500 km/s, (4) 500-600 km/s, and (5) $\geq$ 600 km/s. For a given velocity bin, we evaluated the frequency distributions of $A_{He}$ events. We note that the frequency distributions can be well-approximated by log-normal distributions for all the velocity bins except for the bin $<$ 300 km/s (Figure:\ref{fig:1}). \begin{equation} Frequency = \frac{A}{\sigma \sqrt{2 \pi}} exp \{ \frac{-(log(A_{He})-\mu)^2}{2 \sigma^2}\} \label{eq1} \end{equation} \begin{equation} m = exp (\mu) \label{eq2} \end{equation} In equation (\ref{eq1}), A is the normalization factor, $\sigma$ is the standard deviation (shape parameter) and $\mu$ is the centre (median) of the log-normal distribution. Equation (\ref{eq2}) is used to convert $\mu$ from log scale to linear scale. This linear counterpart of $\mu$ is marked as m and this is basically the median value. The corresponding values of A, m and $\mu$ are mentioned in each sub-plot of Fig. \ref{fig:1}. It can be noted that the median value of $A_{He}$ monotonically decreases for 300-400 km/s and 400-500 km/s velocity bin as one goes from cycle 21 to cycle 24. However, for the other two velocity bins, the median value increases in cycle 22 before dropping again in cycles 23 and 24. The most important feature to be noted is the shift of the peak $A_{He}$ from the usual 4-5\% (in cycles 21 and 22) to 2-3\% in the 400-500 km/s velocity range and increase in the frequency in the 300-400 km/s velocity range in cycle 24. Interestingly, these two velocity bins contain around $\sim$ 80\% of the total data points. Based on Fig. \ref{fig:1}, we fix the upper limit of $A_{He}$ at 10\% and proceed to evaluate the velocity dependence of $A_{He}$ for the four solar cycles in sections 3.2 and 3.3. \begin{figure*} \includegraphics[scale=0.32]{fig2_MN-21-0020-L.R1.pdf} \caption{\textbf{Frequency of $A_{He}$ $>$ 10\% events in the last four cycles.} Year-wise frequency of $A_{He}$ $>$ 10\% events (marked in blue vertical bars) and yearly averaged sunspot numbers (SSN) (marked in red vertical bars) in the last four solar cycles marked by a, b, c and d. This frequency is calculated with respect to the number of all $A_{He}$ events in a particular year. Peak value of the $A_{He}$ frequencies are 12.55\%, 10.25\%, 3.44\% and 1.98\% as one goes from cycle 21 to 24. \label{fig:2}} \end{figure*} We also evaluate the yearly frequency of events with $A_{He}$ $>$ 10\% vis-à-vis yearly averaged sunspot numbers (SSN) for the four solar cycles (Fig.\ref{fig:2}) and note that these events start reducing significantly from cycle 23 and by cycle 24, the frequency of these events does not exceed 2\%. \subsection{Solar cycle variation of $A_{He}$ $\leq$ 10\%} \begin{figure*} \includegraphics[scale=0.32]{fig3_MN-21-0020-L.R1.pdf} \caption{\textbf{Variation of $A_{He}$ $\leq$ 10\% in the last four solar cycles: -} Spearman Rank Correlation analysis between averaged (for 250 days) $A_{He}$ and sunspot numbers (SSN) for 12 velocity quantiles in the last four solar cycles. Results for cycle 21 to cycle 24 are represented in a, b, c and d respectively. The Spearman Rank Correlation coefficient, $\rho$ ($A_{He},SSN$), values and the mid-point of each velocity quantile are shown on the top of each panel. Note that the highest and lowest velocity quantiles are removed from this representation. Each velocity quantiles are marked by filled circles of different colours joined by solid lines and SSN variations are marked by black filled circles joined by dashed lines. The $\rho$ ($A_{He},SSN$) values maximize at 369 km/s, 372 km/s, 373 km/s in cycles 21, 22 and 23 respectively. However, in cycle 24, The $\rho$ ($A_{He},SSN$) value maximizes at 401 km/s. The apparent phase offset between the $A_{He}$ and SSN becomes negligible in cycle 24. \label{fig:3}} \end{figure*} \begin{figure*} \includegraphics[scale=0.32]{fig4_MN-21-0020-L.R1.pdf} \caption{\textbf{Delayed correlation between $A_{He}$ ($\leq$ 10\%) and SSN in four solar cycles.} Variation of delay (filled black dots joined by dashed line) between SSN and $A_{He}$ for each velocity quantile in four solar cycles marked by a (21), b(22), c(23) and d(24). The peak $\rho$ ($A_{He},SSN$) values between SSN and $A_{He}$ with (blue solid dots joined by solid blue line) and without (blue solid dots joined by dashed blue line) delay for each velocity quantile are also plotted for each cycle. The standard deviations are calculated by varying the peak $\rho$ ($A_{He},SSN$) by 1\% and considering the associated delays. The red lines mark the linear fits (equations and $R^2$ values are shown in each figure) for the delays in each cycle. The peak $\rho$ ($A_{He},SSN$) value maximizes between 350-400 km/s in all the four cycles. However, slopes of the linear fits in cycle 23-24 and particularly in cycle 24 are significantly less compared to cycles 21-22. \label{fig:4}} \end{figure*} In Fig. \ref{fig:3}, we divide the solar wind velocity in each cycle into 12 quantiles and neglect the fastest and slowest quantiles to avoid possible measurement uncertainties and spreading out of the velocity range. Therefore, this work is primarily applicable for slow and intermediate solar wind velocities. For each velocity bin, both $A_{He}$ and sunspot numbers (SSN) are first averaged for 250 days and plotted for the four cycles separately. The legend in each cycle shows the mid-point of each quantile and the corresponding Spearman Rank Correlation co-efficient, $\rho$ ($A_{He},SSN$), between $A_{He}$ and SSN. Fig, \ref{fig:3} reveals that $\rho$ ($A_{He},SSN$) maximizes at 369 km/s, 372 km/s, 373 km/s in cycles 21, 22 and 23 respectively. However, in cycle 24, The $\rho$ ($A_{He},SSN$) value maximizes at 401 km/s and it does not change significantly at higher velocity unlike other cycles.. Therefore, $\rho$ maximizes at a higher velocity in cycle 24 compared to the previous three solar cycle. We also note that there is an apparent phase offset (delay) between the $A_{He}$ and SSN but this offset starts decreasing in cycle 23 and eventually becomes negligible in cycle 24. The dependence of this phase offset with the solar wind velocity is taken up for further scrutiny for the four solar cycles. \subsection{Delay between $A_{He}$ and SSN} In order to derive the phase offsets between $A_{He}$ and SSN for four solar cycles, both the time series are first subjected to 1-day average followed by 13 months smoothing. This is done to remove the discreteness in the data and also to eliminate the influence of the orientation of the heliospheric current sheet with respect to the satellites. SSNs are shifted in steps of 10 days starting from 0 to 600 and the peak $\rho$ ($A_{He},SSN$) values are obtained for each velocity bin with the corresponding delay times. These results are plotted in Fig. \ref{fig:4} that shows $\rho$ ($A_{He},SSN$) without delay in dashed blue line and peak $\rho$ ($A_{He},SSN$) with delay in solid blue line for each velocity quantile. The delays at different velocity quantiles are marked in filled black circles joined by dashed line to aid the eye. Positive delay means changes in $A_{He}$ follow the changes in SSN. The standard deviations are calculated by considering 1\% variation of the peak $\rho$ ($A_{He},SSN$) and the associated delays. It can be observed that the $\rho$ ($A_{He},SSN$) maximizes between 350-400 km/s in all the four cycles. However, the slopes of the linear fits (the fit equations are mentioned in the figure \ref{fig:4}) for delay are significantly reduced in cycle 23-24. We note that the delay for even the highest velocity quantile does not exceed 200 days. Not only that, the differences in delay between the lowest and highest quantiles are not significantly different. We varied $A_{He}$ from 4\% to 10\% and linear fit parameters are obtained in each case. This is tabulated and provided as a supplementary material. It is found that the slopes remain consistently higher (close to 1 or more) in cycle 21 and 22 and consistently lower (highest value of slope is 0.64 at $A_{He}$ = 5\%) in cycle 24 for all values of $A_{He}$. \section{Discussion and Conclusions} The helium abundance in the photosphere is taken to be nearly 8.5\% \citep{grevesse1998standard} but it generally remains about 4 – 5\% \citep{Laming2001Feldman} in the solar corona. This suggests that the helium abundance is depressed by processes that occur in the chromosphere, transition region and in the corona. Helium being heavier than hydrogen, it undergoes enhanced gravitational settling \citep{Hirshberg1973}. In addition, FIP effect \citep{Laming2015} can change the helium abundance. When the downward or upward propagating Alfv\'en waves encounter the chromosphere, these exert upward ponderomotive forces on the ions that raise the ions up in altitude \citep{Laming2012, Rakowski2012}. Subsequently, if the magnetic loops open up due to magnetic reconnection, the low FIP ions are released into the corona. While this effect enhances the abundance of lower FIP elements in the corona, it also conversely implies that it depletes the higher FIP elements. Therefore, FIP effect suggests that if there are significant changes in the closed loop coronal magnetic field configuration from one cycle to other, it will have impact on the helium abundance as well as delay. This investigation shows that the maximum correlation coefficient between $A_{e}$ and SSN is obtained at a different velocity bin in cycle 24 as compared to the previous three cycles. Given this, it is also important to evaluate the sources of the slow/intermediate solar winds and how these affect the helium abundance. It was proposed earlier that the slow solar wind originates from two primary sources, viz., streamer belt and active region \citep{Kasper2007}. While active regions have stronger magnetic fields compared to streamer belt, the latter has longer magnetic loops that facilitates enhanced processing of the solar wind helium. This leads to the delay in $A_{He}$ with respect to the sunspot numbers. Interestingly, this delay is solar wind velocity dependent and, in general, more for higher velocities \citep{Alterman2019}. However, as shown by our analysis starting from cycle 23, this processing seems to have become less sensitive to the solar wind velocity. At this juncture, it may be noted that the time lag of the order of 100s of days suggests that He fractionation is a slow process. Whether it indicates the dominant role of gravitational settling in the He fractionation, is a question that requires further attention. Interestingly, as discussed by \cite{Laming2019}, extreme He depletions reported by earlier works \citep{Kasper2012, Kepko2016} are unlikely to be reproduced by ponderomotive force and thus gravitational settling appears to be the most dominant mechanism. Therefore, the reduced time lag across the velocity bins and systematic shift of $A_{He}$ frequency to lower $A_{He}$ values in cycle 24 may be suggestive of systematic changes in ponderomotive force as well as the gravitational settling in closed magnetic loops. It is to be noted that length of the magnetic loop is also important for He processing. Although these are speculative scenarios, there are indications that systematic changes did occur in the Sun starting from cycle 23. One such example is the changes in the occurrence and characteristics of pseudostreamers and dipole streamers. Pseudostreamers are known to be additional sources of slow solar wind \citep{Crooker2012}. Interestingly, occurrence of pseudostreamers were found to be significantly higher during the minimum of the solar cycle 23 unlike cycles 21 and 22 when these structures almost disappeared \citep{Owens2014}. On the other hand, the dipole streamers were shown \citep{Owens2014} to be less tightly confined to the solar equator at the end of cycle 23 compared to the previous two cycles. This difference in the pseudostreamers and dipole streamers at the end of solar cycle 23 indicate towards the possible change in the processing of the slow solar wind at the end of cycle 23. Some of the earlier works \citep{Levine1977, Wang1990} suggest that the origin of slow solar wind is the boundary of the coronal holes. As the magnetic flux tubes from the boundary of the coronal hole are expanded, the bulk speed of the slow solar wind decreases. This reduces the proton flux beyond 2.5 $R_\odot$ and as a result, the alpha particle enrichment in the solar wind decreases through reduced momentum transfer via Coulomb collisions \citep{Burgi1992}. This scenario is particularly valid for solar minimum when the magnetic flux tubes undergo strong over-expansion. We suggest that large scale magnetic flux tube topologies are quite different (in statistical sense) in solar cycle 24 (starting from 23) that affected the processing as well as the velocity dependence of the helium enrichment process in the solar wind. This proposition gets indirect support from the fact that the polar field went through unusual reversal in SC24 \citep{Janardhan2018}. The higher $A_{He}$ events is, in general, thought to be associated with transient coronal disturbances like solar flare, eruptive prominences etc \citep{Borrini1982}. Many of these processes are believed to throw helium-rich plasma from the lower solar corona to the interplanetary medium causing helium abundance enhancements. The frequency of occurrence of such transient disturbances is approximately in phase with the solar cycle \citep{Borrini1982}. Further, it is known that the number of X, M and C-class flares dropped drastically in cycle 23 compared to the earlier cycles \citep{Hudson2014}. The number of such flares is even less in cycle 24. This may be one of the reasons for the lower frequency of higher $A_{He}$ events in cycle 24 compared to the previous three cycles. As stated earlier, solar cycle 24 turns out to be the weakest in the last century and the Sun was unusually quiet since the deep minimum of cycle 23. Many authors highlighted the declining solar activity from the cycle 23 onwards based on observations \citep{Janardhan2011} or dynamo models \citep{Choudhuri2007}. Observations during Ulysses first (cycle 22) and third orbit (cycle 23) revealed that solar wind in the minimum of cycle 23 was weaker characterized by significantly less dense, cooler wind with less mass and momentum flux compared to the first orbit during the solar minimum in cycle 22 \citep{McComas2008}. The peculiarities of solar cycle 24 have also been highlighted by earlier workers \citep{Antia2013}. Therefore, we believe that the large scale coronal magnetic field topology and dynamics of the Sun went through significant changes in cycle 24 that affected the way helium was processed in the solar wind. Recent helium abundance measurements \citep{Moses2020} in the solar corona provides credence to this proposition. Further modelling investigations are needed to explain the changes in the helium abundance in cycle 24 and to predict the possible variation in the cycle 25. \section*{Acknowledgements} We would like to thank the managing team of OMNI dataset (\url{https://cdaweb.gsfc.nasa.gov/team.html}). We thank and acknowledge the significant efforts put forward by the PIs of the all satellites, data of which are used to generate this integrated, cross-calibrated OMNI dataset. This work is supported by the Department of Space, Government of India. \section*{Data Availability} The data can be obtained from \url{https://cdaweb.gsfc.nasa.gov/index.html/}. \bibliographystyle{mnras}
\section{Introduction} \label{sec:intro} Magnetic Resonance (MR) Imaging provides high value in spine clinical diagnosis, with standard classification and grading schemes for spinal pathologies built on MRI. Some of these rely on subtle findings specific to MRI such as end-plate abnormalities and high-intensity zones \cite{harada_imaging_2019}. While spine MRI is unmatched for diagnosis and post-operative prognosis \cite{Kim2017}, surgery guidance is dominated by radiation imaging: CT and fluoroscopy. A primary requirement for intra-operative use is geometric accuracy, which is typically lower in MRI due to acquisition of thicker slices. Super-resolution (SR) could be an enabler for use of MRI intra-operatively in spine procedures. We take up deep learning super-resolution as a direct means of improving spine MRI resolution, leveraging the unique possibility in MRI of acquiring multiple contrast images and with different slicing direction. \textbf{Related work:} Some state-of-the-art single image super-resolution (SISR) techniques for natural images include Residual Channel Attention network (RCAN) \cite{Zhang2018} and Residual Feature Distillation Network (RFDN) \cite{Liu2020}. Recent work in MRI super-resolution include \cite{jurek_cnn-based_2020}, which evaluated SSIM improvement in SRCNN for brain MRI, and showed superior reconstruction compared to fusion of thick slices of different anatomical orientation. Multi-contrast super-resolution has been explored in \cite{lyu_multi-contrast_2020} where synergizing multiple contrasts was shown to achieve better super-resolution results, using a composition of loss terms including MSE, adversarial, perceptual and textural loss. Other approaches in literature include residual deep learning \cite{He2020} and use of cross-plane self-similarity in MRI \cite{du_super-resolution_2020}. Peculiar to MRI, the different MRI contrast images have similar texture patterns. State-of-art SISR networks like RCAN, RFDN, can be augmented to utilize this. Reference based SISR methods have been effective in leveraging texture details from reference images to assist resolution enhancement \cite{Zhang2019}. But VGG \cite{vgg2014} type feature-maps which are used in natural image SR would not be suited, as they are known to be sensitive to lower order image characteristics, capturing structure more than texture. The learnt filters are also not guaranteed to be orthogonal, making comparison and matching using simplistic distance metrics questionable. \begin{figure}[htb] \centering \centerline{\includegraphics[width=1\linewidth]{first_v3.png}} \caption{Proposed SISR with texture transfer} \label{fig:front} \end{figure} In our work we emphasize on using textures of multi-contrast MRI images as reference for super-resolution. Texture transfer (TT) attempts to replace the texture features of Low Resolution (LR) MRI input with matched textures of the High Resolution (HR) reference. Before comparing the LR textures with the reference textures, the reference images are degraded by blurring so that matching operates in similar sampling frequency. In place of VGG feature maps like in prior works, we use wavelet scattering to extract multiscale texture features and use a texture-based loss function for texture transfer. Our approach achieves texture transfer by extracting wavelet scattering features, compared using dense matching to an unpaired HR reference, and combining texture information from the matched reference. Fig. \ref{fig:front} shows a quick overview of the proposed reference-based texture transfer approach. We summarize our contributions as follows: \begin{enumerate} \item A module applicable onto baseline architectures like SRCNN \cite{Dong2016}, RCAN, RFDN, providing a reference-based, unpaired, texture transfer strategy using wavelet scattering and texture loss, utilizing multi-contrast MRI. \item We explore the effect of using different kinds of reference images in improving the resolution quality; for instance, use of axial reference images to train model for sagittal LR-HR. \item We compare 3 existing SISR architectures: SRCNN, RCAN, RFDN on sagittal and axial MRI input LR images with different types of MRI reference images. Results show improvement for most cases across models improving the in-plane and through-plane resolution (4x) both quantitatively and qualitatively. \end{enumerate} \begin{figure*}[htb] \begin{minipage}[b]{0.68\linewidth} \centering \centerline{\frame{\includegraphics[width=.9\linewidth]{Architecture_v3.png}}} \centerline{ (i) (a)\, SRCNN, (b)\,RCAN and (c)\,RFDN with reference-based texture transfer}\medskip \end{minipage} \begin{minipage}[b]{0.28\linewidth} \centering \centerline{\frame{\includegraphics[width=1.2\linewidth,height=1.15\linewidth]{Texture_transfer_v4.png}}} \centerline{(ii) Feature swapper}\medskip \centering \end{minipage} \caption{SISR Architectures of with reference-based texture transfer} \label{fig:flowchart} \end{figure*} \section{SUPER RESOLUTION THROUGH TEXTURE TRANSFER} \label{sec:Superresolution} \subsection{Background study for texture transfer} \label{ssec:Method} The concept of reference-based texture transfer has been inspired from the idea of neural style transfer using VGG features \cite{Zhang2019} in SISR. For MR images, texture details can be retrieved from the images acquired across multiple protocols and hence can be used for texture transfer. Wavelet is one of the best ways to decompose the image into various frequency bands \cite{Livens1997}, which can be effectively used in texture extraction. Hence, in our approach of reference-based texture transfer, we compute the wavelet transform of the LR image to be super resolved and the high resolution reference to extract texture features. In the transformed domain, feature swapping is performed wherein the texture features of LR is replaced with the best matched texture features of the reference by dense comparison. To minimize the difference between the swapped texture features and the texture features of super resolved output, we include a texture loss term in the loss function. In the proposed method, Morlet wavelet transform \cite{Andreux2020} is used for computing the texture features of the image. Morlet wavelet filters are very similar to Gabor filters \cite{Livens1997}, which have been widely used in texture extraction. Wavelet coefficients are computed at different scales, where scale denotes the level of decomposition of the image. Additionally, in the proposed approach based on wavelet transform, wavelet filters at different rotation angles are considered to ensure rotation invariance in the computed features. \subsection{Feature Swapping} \label{ssec:TT} There are two main steps in feature swapping - Dense matching and texture transfer. The LR image ($I_{LR}$) is first upsampled to the actual size using bicubic interpolation. The HR reference images are down-sampled and up-sampled using bicubic interpolation to obtain blurred reference images so as to bring them to the same frequency bandwidth as the LR input. The process of feature swapping is illustrated in Fig. \ref{fig:flowchart}. The wavelet scattering coefficients are obtained for upsampled LR input ($I_{LR}\uparrow$), HR reference ($I_{Ref}$) and blurred HR reference ($I_{Ref}\downarrow\uparrow$). The features of LR input and that of blurred reference are sampled into small dense patches of size 3x3 with a stride of 1. Each texture patch of $I_{LR}\uparrow$ is compared with every other texture patches of $I_{Ref}\downarrow\uparrow$, to get the corresponding reference texture patch index that gives the highest correlation. To represent this mathematically, let the sampling function be given as $P$ and the similarity map between the $i^{th}$ input texture patch and the $j^{th}$ reference texture patch can be given as $s(i,j)$. The similarity between two patches is calculated as a dot product. \begin{equation} s(i,j) = \langle\, P_{i}(\phi_{J,L}(I_{LR}\uparrow))\, , \, P_{j}(\phi_{J,L}(I_{Ref}\downarrow\uparrow))\, \rangle \end{equation} Here $\phi_{J,L}$ denotes the texture feature extractor with scale $J$ and number of rotation angles $L$. The index of the reference texture patch that gives the maximum similarity is chosen as the texture for that particular LR image texture patch. \begin{equation} S(i) = \argmax_j \,s(i,j) \end{equation} $S(i)$ is the index of reference texture patch of maximum correlation. This operation (called as dense matching operation) is repeated for every LR input patch to obtain the best matching correspondences in texture and can be formulated as, \begin{equation} M(J,L) = D( \phi_{J,L}(I_{LR}\uparrow) , \phi_{J,L}(I_{Ref}\downarrow\uparrow) \end{equation} Here, $D$ denotes the dense matching operation and $M(J,L)$ is the matching correspondences between the features of LR input and that of blurred reference. Based on the correspondences, the patches of texture features of HR reference are placed at the appropriate positions. We call this operation of transfer of texture information from the HR reference to the LR input as texture transfer. \begin{equation} F = H( \phi_{J,L}(I_{Ref}), M(J,L)) \end{equation} where, $H$ denotes the texture transfer operation and $F$ denotes the transferred features that can be concatenated to the SISR model during training at a specified layer (typically at one of the initial layers) of the model based on its architecture. \subsection{Loss functions} \label{ssec:loss} We used three loss functions in the proposed approach namely the reconstruction loss in the image domain, perceptual loss and texture loss in the feature domain. The reconstruction loss $L_{rec}$ is given as, \begin{equation} L_{rec} = \|I_{SR} - I_{HR}\|_1 \end{equation} where $I_{SR}$ is the super resolved (or predicted) image and the $I_{HR}$ is the HR ground-truth image. The perceptual loss component is applied \cite{Johnson2016} to improve the visual quality of the image by enforcing similarity with respect to the ground truth in the feature space. Typically, we adopt the ReLU5-1 layer of VGG19 \cite{Liu2015}. It can be given by, \begin{equation} L_p = \frac{1}{S} \sum_{i=1}^{N}\| \theta_i (I_{SR}) - \theta_i (I_{HR}) \|_F \end{equation} where $S$ is the features size (width * height * number of channels), $N$ is the number of channels and $\theta_i$ denotes the $i^{th}$ channel of VGG19. The third loss function enforces texture similarity between the swapped features of LR (from reference images) and the super resolved image. The texture loss is computed by taking Frobenius norm of Gram matrix of the extracted texture features. \begin{equation} L_t = \frac{1}{W} \| Gr(\phi_{J,L} (I_{SR})) - Gr(F) \|_{F} \end{equation} Here, $F$ and $\phi_{J,L}$ are defined in Section \ref{ssec:TT}, $W$ is the feature size and $Gr(.)$ calculates the Gram matrix, which helps in computing the texture information \cite{Gatys2016}. \section{EXPERIMENTS} \label{sec:Experiments} \subsection{Data preparation} \label{ssec:Dataset} We have used two publicly available datasets for training and validation - Zenodo\cite{zenodo} and Dataset1 from SpineWeb \cite{noauthor_spineweb_nodate}. We have chosen 23 volumes of T2-weighted turbo spin echo 3D MR of Zenodo and 8 MRI T1-weighted volumes of SpineWeb Dataset1 for training. The HR patches are created by randomly cropping twenty 64 x 64 patches from each MRI 2D slice making a total of 14000 patches (10920 sagital view patches from Zenodo and 3080 sagittal SpineWeb patches together) for training. For testing, 312 sagittal view images of Zenodo and 316 axial view images of SpineWeb are used. Wilcoxon signed-rank test with an alpha of 0.05 is used to assess statistical significance. \renewcommand{\arraystretch}{0.9} \begin{table*}[htb] \small \centering \begin{tabular}{|c|c|c|c|c|} \hline \multirow{2}{4em}{Model name} & \multicolumn{2}{c|}{Sagittal view data} & \multicolumn{2}{c|}{Axial view data} \\\cline{2-5} & PSNR (dB) & SSIM & PSNR (dB) & SSIM \\ \hline Bicubic & 35.1682 & 0.9221 & 28.9117 & 0.8827 \\ \hline SRCNN ($L_1+L_p$) & 37.4923 & 0.9483 & 29.7490 & 0.8985 \\ \hline SRCNN ($L_1+L_p+L_t$)-Sag & \textbf{38.0789} & \textbf{0.9550} & \textbf{30.0975} & \textbf{0.9041} \\ \hline SRCNN($L_1+L_p+L_t$)-Ax & \textbf{38.1703} & \textbf{0.9557} & \textbf{30.1647} & \textbf{0.9050} \\ \hline RCAN ($L_1+L_p$) & 38.4679 & 0.9596 & 30.3360 & 0.9066 \\ \hline RCAN ($L_1+L_p+L_t$)-Sag & \textbf{38.5239} & \textbf{0.9601} & \textbf{30.3383} & \textbf{0.9072} \\ \hline RCAN ($L_1+L_p+L_t$)-Ax & \textbf{38.5320} & \textbf{0.9603} & \textbf{30.3883} & \textbf{0.9078} \\ \hline RFDN ($L_1+L_p$) & 38.4368 & 0.9586 & 30.3409 & 0.9073 \\ \hline RFDN ($L_1+L_p+L_t$)-Sag & \textbf{38.5021} & \textbf{0.9587} & 30.1427 & 0.9055 \\ \hline RFDN ($L_1+L_p+L_t$)-Ax & \textbf{38.5497} & \textbf{0.9594} & 30.2344 & 0.9066 \\ \hline \end{tabular} \caption{Quantitative comparison of SRCNN, RCAN and RFDN without and with texture transfer (metrics improvements shown in bold). Sagittal view data - Zenodo images, Axial view data - SpineWeb images. Sagittal and axial texture transfer models end with '-Sag' and '-Ax'} \label{tab:1} \end{table*} \begin{figure*}[htb] \centering \centerline{\includegraphics[width=0.95\linewidth]{Results_v4.png}} \caption{Visual comparison of methods SRCNN, RCAN and RFDN with and without texture transfer} \label{fig:res} \end{figure*} \subsection{Training details with and without texture transfer} \label{ssec:training} The models chosen for training are the pre-existing SISR models - SRCNN, RCAN and RFDN with and without texture transfer. For each model we conduct three trainings - one without TT with only $L_1$ and $L_p$ loss components. (denoted by model name followed by ($L_1+L_p$)) and the other two with TT based on two different sets of reference images (sagital and axial reference, denoted by model name followed by ($L_1+L_p+L_t$) with suffix '-Sag' or '-Ax' respectively ). Before training the baseline models with TT, feature swapping followed by concatenation of swapped features to one of the initial layers of the model is performed. The two types of reference images used in our study are - 1. Sagital TT: Four sagittal reference images from Zenodo for sagittal reference based training 2. Axial TT: Five Axial reference images for axial reference based training. For texture extraction we use the Morlet wavelet transform with J = 2 and L = 8. We have used Adam optimizer with learning rate 1e-4 for all the models. The batch size is chosen to be 9 for SRCNN and RFDN, and 16 for RCAN. All the implementations are carried out using Pytorch. \section{RESULTS} \label{sec:typestyle} The three convolutional neural network (CNN) models (SRCNN, RCAN and RFDN) are chosen based on the complexity of the architectures. The SRCNN is the simplest of the three models. RCAN is one of the state-of-the-art deep models with residual blocks and channel attention layers. RFDN is one of the recent models having multiple residual feature distillation blocks. Table \ref{tab:1} shows the quantitative comparison of the proposed approach. From the table, the following observations are noted. 1) The performance improvement of the proposed texture transfer has been consistent across the SISR baseline CNN models in most of the cases under study (highlighted in bold). 2) The axial texture transfer results are better than sagittal texture transfer. This is an important observation which emphasizes the purpose of reference based texture transfer. The reason could be that the texture features taken from high resolution reference image (in this case axial reference images which are T1-weighted images of voxel size 0.3 mm x 0.3 mm) are richer as compared to those with lower resolution. 3) The performance improvements are consistent across models for sagittal texture transfer. The resulting metrics are found to be statistically significant (pvalue $<$ 0.05). For axial texture transfer, the SRCNN and RCAN show improvements while RFDN has shown equivalent performance in SSIM and a reduction in performance in PSNR. Since RFDN has multiple dense connections with multi-distillation blocks, we believe that the layer through which TT is done could be a reason in influencing the overall performance. As a future work, we are studying more CNN-based SISR models to understand the consistency of different texture transfer strategies across layers of the models. Fig. \ref{fig:res} shows the inter-vertebral sections of the lumbar spine anatomy. The qualitative comparison of bicubic interpolation method and models with and without TT is shown. From figure it is clear that the linear structures (highlighted with a box) in the discs are reconstructed with better agreement to the groundtruth as compared with the baseline CNN models. \section{CONCLUSION} \label{sec:typestyle} Towards enabling the use of MRI in spine surgery intra-operative guidance, we take up single image super-resolution from clinical MRI, and demonstrated our novel method of reference-based texture transfer, implemented in 3 baseline architectures, and evaluated on two public datasets for multi-contrast SR in different slicing directions. Comparing with the baseline, the proposed texture transfer with texture loss exhibits good improvements in the performance evaluation metrics together with visual quality improvement. The observations show that the proposed neural texture transfer can be a potential source of improving the resolution of MRI images. \section{Compliance with Ethical Standards} \label{sec:cwe} This research study was conducted retrospectively using human subject data made available in open access by Zenodo \cite{zenodo} and SpineWeb - Dataset1 \cite{noauthor_spineweb_nodate}. Ethical approval was not required as confirmed by the license attached with the open access data. \section{Acknowledgements} \label{sec:ack} No funding was received for conducting this study. The authors have no relevant financial or non-financial interests to disclose. \bibliographystyle{IEEEbib}
\section{Introduction} Stochastic gradient descent (SGD) is the simple and efficient optimization algorithm behind the success of deep learning and attracts increasingly more attention in the field of machine learning \citep{allen2018convergence, xing2018_walk_sgd, Zhang_optimizationProperitesSGD,Wang2020,he2020recent, liu2021noise, Simsekli2019tailindex}. Minibatch noise, also known as the SGD noise, is the primary type of noise in the learning dynamics of neural networks. Practically, minibatch noise is unavoidable because the memory of a modern computer is limited while the size of the datasets we use is large; this demands the dataset to be split into ``minibatches" for training. At the same time, using minibatch is also a recommended practice because using a smaller batch size often leads to better generalization performance \citep{Hoffer2017}. Therefore, understanding minibatch noise in SGD has been one of the primary topics in deep learning theory. However, the SGD noise is not easy to understand and previous works are mostly limited to empirical studies or rely on the heavy use of approximations. Dominantly many theoretical studies take two approximations: (1) the continuous-time approximation, which takes the infinitesimal step-size limit $\lambda\to 0$; (2) the Hessian approximation, which assumes that the covariance matrix of the SGD noise is equal to the Hessian $H$. While these approximations have been shown to provide some qualitative understanding, the limitation of these approximations is not well understood. For example, it is still unsure when such approximations are valid, which hinders our capability to assess the correctness of the results obtained by approximations. In this work, we fill this gap by deriving analytical formulae for discrete-time SGD with arbitrary learning rates and exact minibatch noise covariance. In summary, the main \textbf{contributions} are: \begin{enumerate} \item we derive the strength and the shape of the minibatch SGD noise in the cases where the noise for discrete-time SGD is analytically solvable; \item we show that SGD noise takes a different form in different kinds of minima and propose general and more accurate approximations. \end{enumerate} \textbf{Organization}. In Section~\ref{sec: background}, we introduce the background. Section~\ref{sec: related works} discusses the related works. Section~\ref{sec:theory} outlines our theoretical results and verify them experimentally. Section~\ref{sec:general} derives new approximation formulae for SGD noises. In Section~\ref{sec: applications}, we show how our results can be applied to analyze relevant problems. For reference, the relationship of this work to the previous works is shown in Table~\ref{tab: related works}; a comparison of the obtained results with previous works for a special case is provided in Table~\ref{tab:summary} of Appendix~\ref{app: comparison}. We also provide a table of contents at the beginning of the appendix. \begin{table}[t!] \centering \caption{\small Summary of related works on the noise and stationary distribution of SGD. This work fills the gap of the lack of theoretical results for the actual SGD dynamics, which is \textit{discrete-time} and with \textit{minibatch noise}.}\label{tab: related works} \resizebox{\textwidth}{!}{ \begin{tabular}{c|ccc} \hline Setting & Artificial Noise & Hessian Approximation Noise & \textbf{\textit{Minibatch Noise}} \\ \hline Continuous-time & \cite{sato2014approximation, Welling2011} & \cite{jastrzebski2018three, pmlr-v97-zhu19e} & \cite{mori2021logarithmic}\\ & \cite{Mandt2017, meng2020dynamic} &\cite{wu2020noisy,Xie2020} & \\ \hline \textbf{\textit{Discrete-time}} & \cite{yaida2018fluctuation, gitman2019understanding} & \cite{liu2021noise} & \textbf{This Work}\\ & \cite{liu2021noise} & \\ \hline \end{tabular}} \vspace{-1em} \end{table} \vspace{-2mm} \section{Background}\label{sec: background} \vspace{0mm} In this section, we introduce the minibatch SGD algorithm. Let $\{x_i, y_i\}_{i=1}^{N}$ be a training set. We can define the gradient descent (GD) algorithm for a differentiable loss function $L$ as $\mathbf{w}_t = \mathbf{w}_{t-1} - \lambda \nabla_\mathbf{w}L(\mathbf{w},\{ \mathbf{x}, \mathbf{y}\})$, where $\lambda$ is the learning rate and $\mathbf{w}\in\mathbb{R}^{D}$ is the weights of the model. For the minibatch technique to be applicable, the loss function needs to take an additive form. \begin{definition} A loss function $L(\{x_i, y_i\}_{i=1}^{N}, \mathbf{w})$ is additive if $ L(\{x_i, y_i\}_{i=1}^{N}, \mathbf{w}) = \frac{1}{N}\sum_{i=1}^N \ell(x_i, y_i, \mathbf{w})$ for some differentiable, non-negative function $\ell(\cdot)$. \end{definition} This definition is quite general. Most commonly studied and used loss functions are additive, e.g., the mean-square error (MSE) and cross-entropy loss. For an additive loss, the minibatch SGD with momentum algorithm can be defined. \begin{definition}\label{def: with replacement} The \textit{minibatch SGD with momentum} algorithm by sampling {with replacement} computes the update to the parameter $\mathbf{w}$ with the following set of equations:\vspace{0mm} \begin{equation}\label{eq: with replacement} \begin{cases} \hat{\mathbf{g}}_t= \frac{1}{S}\sum_{i\in B_t} \nabla \ell(x_i, y_i, \mathbf{w}_{t-1});\\ \mathbf{m}_t = \mu \mathbf{m}_{t-1} + \hat{\mathbf{g}}_t;\\ \mathbf{w}_t = \mathbf{w}_{t-1} - \lambda \mathbf{m}_t. \end{cases} \end{equation} where $\mu\in[0,1)$ is the momentum hyperparameter, $S := |B_t|$ is the minibatch size, and the set $B_t=\{i_1,...i_S\}$ are $S$ i.i.d. random integers sampled uniformly from $[1,N]$. \end{definition} Note that $S$ can be larger than $N$ in this case. The \textit{without-replacement} sampling is defined in Definition~\ref{def: without replacement} in Appendix~\ref{app: der of C}, and the two algorithms are identical when $N\gg S$. We also allow the learning rate $\lambda$ to either be a scalar or a positive-definite preconditioning matrix $\Lambda$. We can decompose the gradient into a deterministic plus a stochastic term. For minibatch sampling with or without replacement, we have that $\mathbb{E}_{\rm B}[\hat{\mathbf{g}}_t] = \nabla L $ is equal to the gradient for the GD algorithm. We use $\mathbb{E}_{\rm B}(\cdot)$ to denote the expectation over batches, and use $\mathbb{E}_{\mathbf{w}}(\cdot)$ to denote the expectation over the stationary distribution of the model parameters. Therefore, we can write $\hat{\mathbf{g}}_t = \mathbb{E}_{\rm B}[\hat{\mathbf{g}}_t] + \eta_t,$ where $\eta_t:= \frac{1}{S}\sum_{i\in B_t} \nabla \ell(x_i, y_i, \mathbf{w}_{t-1}) - \mathbb{E}_{\rm B}[\hat{\mathbf{g}}_t]$ is the noise term; of central importance to us is the noise covariance matrix defined as $C:= \text{cov}(\eta_t, \eta_t)$. Also, we consider the asymptotic model fluctuation $\Sigma:= \lim_{t\to\infty} \text{cov}(\mathbf{w}_t, \mathbf{w}_t)$. $\Sigma$ gives the strength and shape of the fluctuation of $\mathbf{w}$ around a local minimum and is another quantity of central importance to this work. \vspace{-2mm} \section{Related Works}\label{sec: related works} \vspace{0mm} \textbf{Asymptotic Distribution of Parameters}. Both statistics and machine learning care about the distribution of the model parameters. It is well known that the maximum likelihood estimators (MLE) have an asymptotic Gaussian distribution around the true parameter, $\hat{\theta}_{MLE} \sim \mathcal{N}(\theta, (n J_\theta)^{-1})$, where $n$ is the number of samples and $J$ is the single datum Fisher information matrix (FIM) \citep{wasserman2013all, van2000asymptotic}. This property is the basis behind many important methods in machine learning and statistics, such as natural gradient descent (NGD) \citep{Amari:1998:NGW:287476.287477}, hypothesis testing, and uncertainty estimation \citep{ly2017tutorial}. \textbf{Noise and Fluctuation in SGD}. Deep learning models are trained with SGD and its variants. To understand the parameter distribution in deep learning, one needs to understand the stationary distribution of SGD \citep{Mandt2017}. \citet{sato2014approximation} describes the stationary distribution of stochastic gradient Langevin dynamics using discrete-time Fokker-Planck equation. \citet{yaida2018fluctuation} connects the covariance of parameter $\Sigma$ to that of the noise $C$ through the fluctuation-dissipation theorem. When $\Sigma$ is known, one may obtain by Laplace approximation the stationary distribution of the model parameter around a local minimum $w^*$ as $\mathcal{N}(w^*, \Sigma)$. Therefore, knowing $\Sigma$ can be of great practical use. For example, it has been used to estimate the local minimum escape efficiency \citep{pmlr-v97-zhu19e, liu2021noise}; it can also be used to assess parameter uncertainty and prediction uncertainty when a Bayesian prior is specified \citep{Mandt2017, gal2016dropout, pmlr-v108-pearce20a}. \textbf{Hessian Approximation of the Minibatch Noise.} Despite the importance of the model fluctuation $\Sigma$, there has been no significant progress in understanding what $\Sigma$ actually looks like in learning problems. Early attempts assume isotropic noise in the continuous-time limit \citep{sato2014approximation, Mandt2017}. More recently, the importance of noise structure was realized \citep{Hoffer2017,jastrzebski2018three,pmlr-v97-zhu19e,haochen2020shape}. The ``Hessian approximation", which assumes $C\approx H$, has often been adopted for understanding SGD (see Table~\ref{tab: related works}); this assumption is often motivated by the fact that $C=J_w \approx H$, where $J_w$ is the FIM \citep{pmlr-v97-zhu19e}. \cite{jastrzebski2018three} combined this approximation with the continuous-time approximation to argue that the dynamics are the same for the same ratio $\lambda/S$ and that a larger ratio results in better generalization \citep{smith2017bayesian}. However, it is not known under what conditions the Hessian approximation is valid, and some empirical observations suggest that it can be very inaccurate \citep{liu2021noise}. \textbf{Discrete-time SGD}. The work closest to this work in spirit is \citet{liu2021noise}. Some other works also consider discrete-time SGD \citep{fontaine2021convergence, dieuleveut2017bridging, toulis2016asymptotic}, but the focus is not on deriving analytical formulae or does not deal with the stationary distribution at all. \vspace{-2mm} \section{Exact Results on the Shape and Strength of SGD Noise} \label{sec:theory} \vspace{0mm} This section presents and discusses the cause, shape, and strength of SGD noise and fluctuation for linear regression, which is possibly the only setting where the minibatch noise is exactly solvable. To emphasize the message, we discuss the label noise case in more detail. The other situations also deserve detailed analysis; we delay such discussion to the appendix due to space constraints. \textbf{Notation}: $S$ denotes the minibatch size. $\mathbf{w}\in \mathbb{R}^D$ is the model parameter viewed in a vectorized form; $\lambda \in \mathbb{R}_+$ denotes a scalar learning rate; when the learning rate takes the form of a preconditioning matrix, we use $\Lambda \in \mathbb{R}^{D\times D}$. $A\in \mathbb{R}^{D\times D}$ denotes the covariance matrix of the input data. $\gamma \in \mathbb{R}$ denotes the weight decay hyperparameter; when the weight decay hyperparameter is a matrix, we write $\Gamma \in \mathbb{R}^{D\times D}$. $\mu$ is the momentum hyperparameter in SGD. For two matrices $A, B$, the commutator is defined as $[A, B]:=AB-BA$. Other notations are introduced in the context.\footnote{Let us clarify the terminology a little more; throughout this work, the word \textit{fluctuation} refers to $\Sigma$; the word \textit{noise} refers to $C$. We use the word \textit{global minimum} to refer to the global minimum of the loss function, i.e., where $L=0$, and a \textit{local minimum} refers to a minimum that has a non-negative loss, i.e., $L\geq 0$.} \vspace{-2mm} \subsection{Warm-up} \vspace{0mm} When $N\gg S$, the following proposition gives the exact noise covariance due to minibatch sampling. For arbitrary $N$ and $S$, the exact noise covariance is given in Appendix~\ref{app: der of C}. \begin{proposition}\label{prop: noise_cov}The noise covariance of SGD as defined in Definitions~\ref{def: with replacement} and \ref{def: without replacement} with $N\gg S$ is\vspace{0mm} \begin{equation}\label{eq:noise_cov} C(\mathbf{w})=\frac{1}{SN}\sum_{i=1}^{N}\nabla \ell_i \nabla \ell_i^{\rm T}-\frac{1}{S}\nabla L(\mathbf{w})\nabla L(\mathbf{w})^{\rm T},\vspace{0mm} \end{equation} where the notations $\ell_i(\mathbf{w}):= l(x_i, y_i, \mathbf{w})$ and $L(\mathbf{w}):=L(\{x_i, y_i\}_{i=1}^{N}, \mathbf{w})$ are used. \end{proposition This gradient covariance matrix $C$ is crucial to understand the minibatch noise. The standard literature often assumes $C(\mathbf{w})\approx H(\mathbf{w})$; however, the following proposition shows that this approximation can easily break down \begin{proposition}\label{prop: no noise condition} Let $\mathbf{w}_*$ be the solution such that $L(\mathbf{w}_*)=0$, then $C(\mathbf{w}_*)=0$.\vspace{0mm} \end{proposition} \textit{Proof}. Because $\ell_i$ is non-negative for all $i$, $L(\mathbf{w}_*)=0$ implies that $\ell_i(\mathbf{w}_*)=0$. The differentiability in turn implies that each $\nabla\ell_i(\mathbf{w}_*)=0$; therefore, $C=0$. $\square$ This proposition implies that if our model can achieve zero training loss (which is achievable for an overparametrized model), there is no noise. This already suggests that the Hessian approximation $C\sim H$ is wrong, since the Hessian is unlikely to vanish in any minimum. The fact that the noise strength vanishes at $L=0$ suggests that the SGD noise might at least be proportional to $L(\mathbf{w})$, which we will show to be true for many cases. Now, we show that there are at least four causes for noises to arise: label noise, input noise, regularization, or underparametrization. We study the strength and shape of the noise and fluctuations of these cases. \vspace{0mm} \subsection{Random Noise in the Label}\label{sec: label noise} We first consider the case when the labels are mislabeled. The loss function takes the form\vspace{0mm} \begin{equation} L(\mathbf{w}) = \frac{1}{2N}\sum_{i=1}^N(\mathbf{w}^{\rm T} x_i - y_i)^2, \label{eq: loss fucntion label} \end{equation} where $x_i\in \mathbb{R}^D$ are drawn from a zero-mean Gaussian distribution with covariance matrix $A:= \mathbb{E}_{\rm B}[xx^{\rm T}]$, and $y_i=\mathbf{u}^{\rm{T}}x_i + \epsilon_i$, for some fixed $\mathbf{u}$ and $\epsilon_i \in \mathbb{R}$ is drawn from a distribution with zero mean and finite second momentum $\sigma^2$. We redefine $\mathbf{w} -\mathbf{u} \to \mathbf{w} $, which is a standard trick to simplify notation. We also let $N \to \infty$ with $D$ held fixed, which is needed for the problem to be analytically solvable. We can now find the noise $C$. \begin{lemma}\label{prop: label noise covariance}$($Covariance matrix for SGD noise in the label$)$ Let the model be updated according to Eq.~\eqref{eq: with replacement} with random noise in the label while $N\to \infty$. Then,\vspace{0mm} \begin{equation} C = \frac{1}{S}(A\Sigma A + {\rm Tr}[A\Sigma]A+ \sigma^2 A).\vspace{0mm}\label{eq: label noise covariance} \end{equation} \end{lemma} The model fluctuation can be obtained using this lemma. \begin{theorem}\label{thm: Sigma label}$($Fluctuation of model parameters with random noise in the label$)$ Let the assumptions be the same as in Proposition~\ref{prop: label noise covariance} and $[\Lambda,A]=0$. Then,\vspace{0mm} \begin{equation}\label{eq: solution} \Sigma = \frac{\sigma^2}{S}\left( 1 + \frac{ \kappa_{\mu}}{S}\right) \Lambda G_{\mu}^{-1},\vspace{0mm} \end{equation} where $\kappa_{\mu}:=\frac{ {\rm Tr}[\Lambda AG_{\mu}^{-1}]}{1 - \frac{1}{S}{\rm Tr} [\Lambda AG_{\mu}^{-1}]}$ with $G_{\mu}:=2(1-\mu)I_D-\left(\frac{1-\mu}{1+\mu}+\frac{1}{S}\right)\Lambda A$. \end{theorem} \textit{Proof Sketch}. We first show that the asymptotic fluctuation $\Sigma$ of the parameters in discrete-time SGD is related to $C$ through the following matrix equation: \vspace{0mm} \begin{equation} (1-\mu) (\Lambda H\Sigma + \Sigma H \Lambda) - \frac{1+\mu^2}{1-\mu^2}\Lambda H\Sigma H \Lambda+ \frac{\mu}{1-\mu^2}(\Lambda H\Lambda H\Sigma +\Sigma H\Lambda H\Lambda) = \Lambda C\Lambda. \label{eq: preconditioning matrix eq} \end{equation} Equation~\eqref{eq: preconditioning matrix eq} can be seen as a general form of the Lyapunov equation \citep{lyapunov1992general} and is very hard to solve in general \citep{hammarling1982numerical, ye1998stability, simoncini2016computational}. Solving this equation exactly in a few settings of machine learning relevance is one of the main technical contributions of this work. $\square$ \begin{remark} The subscript $\mu$ refers to momentum. To obtain results for simple SGD, one can set $\mu=0$, which has the effect of reducing $G_{\mu}\to G=2I_D - \left(1+\frac{1}{S}\right)\Lambda A$. From now on, we focus on the case when $\mu=0$ for notational simplicity, but we note that the results for momentum can be likewise studied. \end{remark} If $\sigma^2=0$, then $\Sigma=0$. This means that when zero training loss is achievable, the model parameter has no stationary fluctuation, which corroborates Proposition~\ref{prop: no noise condition}. The following limit is worth discussing. When a scalar learning rate $\lambda \ll 1$ and $1 \ll S$, we have\vspace{0mm} \begin{equation}\label{eq: cts time approximation} \Sigma \approx \frac{\lambda\sigma^2}{2 S} I_D,\vspace{-0mm} \end{equation} which is the result one would expect from the continuous-time theory with the Hessian approximation \citep{liu2021noise, Xie2020, pmlr-v97-zhu19e}, except for a correction factor of $\sigma^2$. Therefore, a Hessian approximation fails to account for the randomness in the data of strength $\sigma^2$. Moreover, it is worth comparing the exact result in Theorem~\ref{thm: Sigma label} with Eq.~\eqref{eq: cts time approximation} in the regime of non-vanishing learning rate and small batch size. One notices two differences: (1) an anisotropic enhancement, appearing in the matrix $G_{\mu}$ and taking the form $-\lambda(1+1/S)A$; compared with the result in \citet{liu2021noise}, this term is mainly due to the effect of using a large learning rate in the discrete-time SGD, but slightly enlarged by the factor $1/S$; (2) an isotropic enhancement term $\kappa$, which causes the overall magnitude of fluctuations to increase; this term does not appear in the previous works that are based on the Hessian approximation, and is due to the minibatch sampling process alone. Therefore, the minibatch sampling process causes two different kinds of enhancement to the fluctuation, potentially increasing the exploration power of SGD at initialization but reduces the convergence speed. From Theorem~\ref{thm: Sigma label}, one can also calculate the approximation error and the test loss; since they are not the main messages, we discuss them in Appendix~\ref{app: errors label}. Theorem~\ref{thm: Sigma label} can be verified empirically. We run 1d experiment in Figure~\ref{fig:label noise}(a) and high dimensional experiments in Figures~\ref{fig:label noise}(b)-(c), where We choose $D=2$ for visualization. We see that the continuous Hessian approximation fails badly for both large and small batch sizes. When the batch size is large, both the discrete-time Hessian approximation and our solution give a very accurate estimate of the shape and the spread of the distribution. This suggests that when the batch size is large, discreteness is the determining factor of the fluctuation. When the batch size is small, the discrete Hessian approximation severely underestimates the strength of the noise. This reflects the fact that the isotropic noise enhancement is dominant at a small batch size. \begin{figure}[tb!] \captionsetup[subfigure]{justification=centering} \centering \begin{subfigure}{0.38\columnwidth} \includegraphics[width=\linewidth]{plots/label_noise/comparison_label_noise_lambda.png} \vspace{-2em} \caption{$a=1$, $S=10$} \end{subfigure} \begin{subfigure}{0.30\columnwidth} \includegraphics[width=\linewidth]{plots/label_noise/minibatch_2d_S_50.png} \vspace{-2em} \caption{$S=50$} \end{subfigure} \begin{subfigure}{0.29\columnwidth} \includegraphics[width=\linewidth]{plots/label_noise/minibatch_2d_lr_1.5.png} \vspace{-2em} \caption{ $S=10$} \end{subfigure} \vspace{-0.5em} \caption{\small Comparison between theoretical predictions and experiments. (a) 1d experiment. We plot $\Sigma$ as an increasing function of $\lambda$. We see that the continuous-time approximation fails to predict the divergence at a learning rate and the prediction in \citet{liu2021noise} severely underestimates the model fluctuation. In contrast, our result is accurate throughout the entire range of learning rates. (b)-(c) 2d experiments. The Hessian has eigenvalues $1$ and $0.5$, and $\lambda=1.5$. For a large batch size, the discrete-time Hessian approximation is quite accurate; for a small $S$, the Hessian approximation underestimates the overall strength of the fluctuation. In contrast, the continuous-time result is both inaccurate in shape and in strength.} \label{fig:label noise} \vspace{-1em} \end{figure} \iffalse Note that Theorem~\ref{thm: Sigma label} also implies a necessary condition for convergent parameter covariance. \begin{corollary}\label{cor: label convergence} If $\Sigma$ is positive and finite, then $\lambda a^* < \frac{2S}{2+S}$, where $a^*$ is the largest eigenvalue of $A$. \end{corollary} \vspace{0mm} This corollary suggests that the stability of SGD is crucially dependent on the batch size. When the batch size is too small, one also needs to scale down the learning rate to prevent the instability of optimization. As $S\to \infty$, the condition for stability converges to $2$, which is the stability condition for discrete-time SGD \citep{liu2021noise}, that is, discreteness of time step is the major factor affecting the stability at a large batch size. \fi Now, combining Theorem~\ref{thm: Sigma label} and the Lemma, one can obtain an explicit form of the noise covariance. \begin{theorem}\label{prop: explicit C label} The noise covariance matrix of minibatch SGD with random noise in the label is \begin{equation}\label{eq: explicit C label} C = \frac{\sigma^2}{\color{orange} S} {\color{orange} A} +\frac{\sigma^2}{S^2}\left(1+\frac{\kappa_{\mu}}{S}\right)\left(\Lambda AG_{\mu}^{-1}+{\rm Tr} [\Lambda AG_{\mu}^{-1}] I_D\right)A. \end{equation} \end{theorem} By definition, $C=J$ is the exact FIM. The Hessian approximation, in sharp contrast, can only account for the term in {\color{orange} orange}. A significant modification that contains both anisotropic and isotropic (up to Hessian) contributions is required to fully understand SGD noise, even in this simple example. Additionally, comparing this result with the training loss \eqref{eq: trainingloss label}, one can find that the noise covariance is proportional to the training loss. In fact, we will see that the proportionality to training loss is a general feature of the SGD noise in Section~\ref{sec:general}. We also study the case when the input is contaminated with noise. Interestingly, the result is the same with the label noise case with $\sigma^2$ replaced by a more complicated term of the form ${\rm Tr}[AK^{-1}BU]$. We thus omit this part from the main text. A detailed discussion can be found in Appendix~\ref{sec: input noise}. In the next section, we study the effect of regularization on SGD noise and fluctuation. \vspace{0mm} \subsection{Learning with Regularization}\label{sec: regularization} In this section, we show that regularization also causes SGD noise. The loss function for $\Gamma-L_2$ regularized linear regression is\vspace{0mm} \begin{align} L_\Gamma(\mathbf{w}) &=\frac{1}{2N}\sum_{i=1}^{N}\left[(\mathbf{w}-\mathbf{u})^{\rm T}x_i\right]^2 + \frac{1}{2} \mathbf{w}^{\rm T} \Gamma \mathbf{w} =\frac{1}{2}(\mathbf{w}-\mathbf{u})^{\rm T}A(\mathbf{w}-\mathbf{u})+ \frac{1}{2} \mathbf{w}^{\rm T} \Gamma \mathbf{w},\label{eq: loss function regular} \end{align} where $\Gamma$ is a symmetric matrix; conventionally, one set $\Gamma=\gamma I_D$ with a scalar $\gamma>0$. For conciseness, we assume that there is no noise in the label, namely $y_i=\mathbf{u}^{\rm T}x_i$ with a constant vector $\mathbf{u}$. One important quantity in this case will be $\mathbf{u} \mathbf{u}^{\rm T} := U$. The noise covariance for this form of regularization can be calculated but takes a complicated form. \begin{proposition}\label{prop: C of regular}$($Noise covariance matrix for learning with L$_2$ regularization$)$ Let the algorithm be updated according to Eq.~\eqref{eq: with replacement} or \eqref{eq: without replacement} with L$_2$ regularization with $N\to \infty$ and $[A,\Gamma]=0$. Then the noise covariance is\vspace{0mm} \begin{equation} C=\frac{1}{S}\left(A\Sigma A+{\rm Tr}[A\Sigma]A+{\rm Tr}[\Gamma'^{\rm T} A\Gamma' U]A + \Gamma A' U A' \Gamma\right),\nonumber\vspace{0mm} \end{equation} where $A':=K^{-1}A$, $\Gamma':=K^{-1}\Gamma$ with $K:=A+\Gamma$. \end{proposition} Notice that the last term $\Gamma A' U A' \Gamma$ in $C$ is unique to the regularization-based noise: it is rank-1 because $U$ is rank-1. This term is due to the mismatch between the regularization and the minimum of the original loss. \begin{figure}[t!] \centering \includegraphics[width=0.45\linewidth]{plots/regularization/comparison-L2-4-1-64.png} \includegraphics[width=0.28\linewidth]{plots/logistic_regression_mnist.png} \vspace{-0.8em} \caption{\small \textbf{Left}: 1d experiments with $L_2$ regularization with weight decay strength $\gamma$. The parameters are set to be $a=4$, $\lambda=1$, $S=64$. This shows a case where the optimal $\gamma$ is negative. \textbf{Right}: Logistic regression on MNIST trained with SGD; with $\lambda=1.5$, $S=32$. We see that the optimal performance is also achieved at negative weight decay strength $\gamma$, showing that the theory is relevant for natural learning examples.} \label{fig:regularization} \vspace{-1em} \end{figure} \begin{theorem}\label{thm: errors of regular}$($Test loss and model fluctuation for L$_2$ regularization$)$ Let the assumptions be the same as in Proposition~\ref{prop: C of regular}. Then \begin{equation} L_{\rm test}=\frac{\lambda}{2S}\left({\rm Tr}[AK^{-2}\Gamma^2 U ]\kappa+r\right)+\frac{1}{2}{\rm Tr}[AK^{-2}\Gamma^2U],\label{eq: regular test loss \end{equation}% where $\kappa:=\frac{{\rm Tr}[A^2 K^{-1}G^{-1}]}{1-\frac{\lambda}{S}{\rm Tr}[A^2 K^{-1}G^{-1}]}$, $r:=\frac{{\rm Tr}[A^3 K^{-3} \Gamma^2 G^{-1}U]}{1-\frac{\lambda}{S}{\rm Tr}[A^2 K^{-1} G^{-1}]}$, with $G:=2I_D-\lambda\left(K+\frac{1}{S}K^{-1}A^2\right)$. Moreover, let $[\Gamma, U] =0$, then \vspace{0mm} \begin{align} \Sigma=&\frac{\lambda}{S}{\rm Tr}[AK^{-2}\Gamma^2U]\left(1+\frac{\lambda \kappa}{S}\right)AK^{-1}G^{-1}+\frac{\lambda}{S}\left(A^2 K^{-2}\Gamma^2 U+\frac{\lambda r}{S}A \right)K^{-1}G^{-1}.\label{eq: regularization solution} \end{align} \end{theorem} The test loss \eqref{eq: regular test loss} has an interesting consequence. One can show that there exist situations where the optimal $\Gamma$ is \textit{negative}. \begin{corollary}\label{cor: negative gamma} Let $\gamma^*= \arg\min_\gamma L_{\rm test}$. There exist $a$, $\lambda$ and $S$ such that $\gamma^*<0$. \end{corollary} This result is surprising from a Bayesian perspective. In the Bayesian formalism, weight decay $\Gamma$ is usually understood as a prior distribution for the model parameters \citep{Gal2016UncertaintyID, pmlr-v108-pearce20a}. A naive interpretation of this result is that it is sometimes better to assume a divergent distribution! For example, in MC Dropout, the Bayesian model precision is proportional to $1/\gamma$, and a negative $\gamma$ seems to suggest a breakdown of the method \citep{gal2016dropout}. This means that some revision is needed to interpret the SGD weight decay in Bayesian learning. In SGD, weight decay not only determines the prior of the model, it also directly affects the SGD landscape by shifting the curvature by $\gamma$, and discrete-time SGD cannot be stable in a local minimum with a curvature larger than $\frac{2}{\lambda}$ and the model will escape eventually. Therefore, in discrete-time, choosing a $\gamma$-prior forbids part of the solutions to be found by the SGD dynamics, and this part of the forbidding region can be seen as an ``implicit prior" of SGD. For illustration, we plot in Figure~\ref{fig:regularization}-Left the test loss \eqref{eq: regular test loss} for a 1d example while varying either $S$ or $\lambda$. The orange vertical lines show the place where the theory predicts a divergence in the test loss. Figure~\ref{fig:regularization}-Right shows a natural learning example where the optimal $\gamma$ is negative. We also plot a standard case where the optimal $\gamma$ is close to 0 in Appendix~\ref{app: extra exp}. Also, we note that the proposed theory agrees better with the experiment. \vspace{0mm} \subsection{The Role of Overparametrization}\label{sec: high dimension linear regression} \vspace{0mm} In this section, we show how over-and-underparametrization might play a role in determining the minibatch noise. The simplest natural setting to study this is the high-dimensional linear regression task \citep{hastie2019surprises}. Here, we take $N,D\to\infty$ with the ratio $\alpha:=N/D$ held fixed. The loss function is \vspace{0mm} \begin{equation}\label{eq: loss function high dimension} L(\mathbf{w})=\frac{1}{2N}\sum_{i=1}^N\left(\mathbf{w}^\mathrm{T}x_i-y_i\right)^2. \end{equation} As in the standard literature \citep{hastie2019surprises}, we assume the existence of label noise: $y_i = \mathbf{u}^{\rm T}x_i + \epsilon_i$, with $\text{Var}[\epsilon_i] =\sigma^2$. A key difference between our setting and the standard high-dimensional setting is that, in the standard setting, one uses the GD algorithm with vanishing learning rate $\lambda$ instead of the SGD algorithm with a non-vanishing learning rate. The analysis becomes much more complicated. Solving the high-dimensional regression problem with non-vanishing $\lambda$ and a minibatch noise is another main technical contribution of this work. In this setting, we can obtain the following result on the noise covariance matrix. \begin{proposition}\label{prop: high D C} Let $\hat{A}= \frac{1}{N}\sum_i^{N} x_i x^{\rm T}_i$. With fixed $S$, $\lambda$, and $\alpha$, SGD induces a noise \vspace{0mm} \begin{equation} C = \frac{1}{S}\left(\mathrm{Tr}[\hat{A}\Sigma]-\hat{A}\Sigma\right)\hat{A}+ \max\left\{0, \frac{\sigma^2}{S}\left(1-\frac{1}{\alpha}\right)\hat{A}\right\}. \end{equation}\vspace{-2mm} \end{proposition} \vspace{0mm} We note that this proposition can only be derived using the general formulation we present in the next section; this shows an important application of our general theory. An interesting observation is that one additional term proportional to $\sigma^2$ emerges in the underparametrized regime ($\alpha > 1$). However, for the overparametrized regime, the noise is completely dependent on $\Sigma$, which is a sign that the stationary solution has no fluctuation, i.e., $\Sigma=0$ according to Eq.~\eqref{eq: preconditioning matrix eq}. In fact, one can prove the following theorem. \begin{theorem}\label{thm: trace of high D} When a stationary solution exists for $\mathbf{w}$, we have \begin{equation} {\rm Tr}[\hat{A}\Sigma] = \max\left\{0, \frac{\lambda\sigma^2}{S}\left(1-\frac{1}{\alpha}\right)\hat{\kappa} \right\}, \end{equation} where $\hat{\kappa}:=\frac{{\rm Tr}[\hat{G}^{-1}\hat{A}]}{1-\frac{\lambda}{S}{\rm Tr}[\hat{G}^{-1}\hat{A}]}$ with $\hat{G}:=2I_D-\lambda\left(1-\frac{1}{S}\right)\hat{A}$. \end{theorem} Note that the factor $\hat{\kappa}$ can be exactly obtained in principle by integrating over Eq.~\eqref{eq:MP}. The above theorem implies that, in the overparametrized regime, there is no fluctuation. This is because an overparametrized model can memorize all the data points, and the noise strength decays to 0 as we approach the global minimum. The necessary condition for a stationary solution to exist is actually non-trivial. The following theorem analyzes the stability of SGD for this setting. The details are given in Appendix~\ref{sec:stability}. \begin{theorem}\label{prop: stability} In a highly underparameterized regime with $\alpha\gg 1$ or a highly overparameterized regime with $\alpha\ll 1$, if a linearly stable stationary distribution of $\mathbf{w}$ exists, then $\frac{\lambda}{S}\le \frac{2}{aD}$. \end{theorem} \begin{figure}[tb!] \vspace{-1em} \centering \includegraphics[width=0.5\linewidth]{plots/high-dimensional2.png} \includegraphics[width=0.22\linewidth]{plots/dnn_mnist_stability.png} \includegraphics[width=0.22\linewidth]{plots/dnn_mnist_stability_adam.png} \vspace{-1em} \caption{\small \textbf{Left}: High-dimensional linear regression. We see that the predicted fluctuation coefficient agrees with the experiment well. The slight deviation is due to a finite training time and finite $N$ and $D$. On the other hand, a naive Hessian approximation results in a qualitatively wrong result. \textbf{Mid}: Variance of training loss of a neural network with width $d$ and tanh activation. We see that the variance explodes after $d\geq 200$. In contrast, rescaling the learning rate by $1/d$ results in a constant noise level in training. This suggests that the stability condition we derived for high-dimension regression is also useful for understanding deep learning. \textbf{Right}: Stability of Adam with the same setting. Adam also experiences similar stability problem when the model width increases.} \label{fig:high dimension} \vspace{-1em} \end{figure} See Figure~\ref{fig:high dimension}-Left for an experiment. We vary $N$ with $D=1000$ held fixed. We set $\lambda=0.01$ and $S=32$. We see that the agreement between the theory and experiment is good, even for this modest dimension number $D$. The vertical line shows where the over-to-underparametrization transition takes place. As expected, there is no fluctuation when $\alpha<1$, and the fluctuation gradually increases as $\alpha \to \infty$. On the other hand, the Hessian approximation gives a wrong picture, predicting fluctuation to rise when there is no fluctuation and predicting a constant fluctuation just when the fluctuation starts to rise. One implication of the dependence on the dimension is that the stability of a neural network trained with SGD may strongly depend on its width $d$. See Figure~\ref{fig:high dimension}-Mid and Right. We train a two-layer tanh network on MNIST and plot the variance of its training loss in the first epoch with fixed $\lambda=0.5$. We see that, when $d\geq 200$, the training starts to destabilize, and the training loss begins to fluctuate dramatically. We also try to rescale the learning rate by $1/d$ as suggested by Proposition~\ref{prop: stability}, which successfully keeps the variance of the training loss roughly constant across all $d$. This suggests a training technique worth being explored by practitioners in the field. In Figure~\ref{fig:high dimension}-Right, we find similar stability problem in Adam with the same setting. \vspace{-2mm} \section{Noise Structure for Generic Settings} \label{sec:general} \vspace{0mm} The results in the previous sections suggests that the SGD noises differ for different kinds of situation, and this motivates us to derive the noise covariance differently for different kinds of minima. Let $f(\mathbf{w},x)$ denote the output of the model for a given input $x\in\mathbb{R}^D$. Here, we consider a more general case; $f(\mathbf{w},x)$ may be any differentiable function, e.g., a non-linear deep neural network. The number of parameters in the model is denoted by $P$, and hence $\mathbf{w}\in\mathbb{R}^P$. For a training dataset $\{x_i,y_i\}_{i=1,2,\dots,N}$, the loss function with a $L_2$ regularization is given by\vspace{0mm} \begin{equation} L_\Gamma(\mathbf{w})=L_0(\mathbf{w})+\frac{1}{2}\mathbf{w}^\mathrm{T}\Gamma\mathbf{w},\label{eq: general loss} \end{equation} where $L_0(\mathbf{w})=\frac{1}{N}\sum_{i=1}^N\ell(f(\mathbf{w},x_i),y_i)$ is the loss function without regularization, and $H_0$ is the Hessian of $L_0$. We focus on the MSE loss $\ell(f(\mathbf{w},x_i),y_i)=[f(\mathbf{w},x_i)-y_i]^2/2$. The following theorem summarizes the noise covariance near a local or a global minimum with or without regularization. The formal statement and proof is given in Section~\ref{app: general}. \begin{theorem} $($Approximation formulae for general SGD noise$)$ Consider running SGD in the neighborhood of a local minimum $\mathbf{w}^*$ of Eq.~\eqref{eq: general loss}. When the regularization term is present, then \begin{equation} C \approx \frac{2L_0(\mathbf{w}^*)}{S}H_0(\mathbf{w}^*)-\frac{1}{S}\Gamma\mathbf{w}^*\mathbf{w}^{*\mathrm{T}}\Gamma. \end{equation} When there is no regularization and the model is not at a global minimum, \begin{equation} C \approx \frac{2L_0(\mathbf{w}^*)}{S}H_0(\mathbf{w}^*). \end{equation} When there is no regularization, and $\mathbf{w}^*$ is a global minimum, \begin{equation} C \approx \frac{1}{S} \left({\rm Tr}[H_0(\mathbf{w}^*) \Sigma] I_D - H_0(\mathbf{w}^*) \Sigma\right) H_0(\mathbf{w}^*). \end{equation} \end{theorem} \begin{remark} The Hessian approximation was invoked in most of the literature without considering the conditions of its applicability \citep{jastrzebski2018three, pmlr-v97-zhu19e, liu2021noise, wu2020noisy, Xie2020}. Our formal treatment in Section~\ref{app: general} also provides such conditions for the applicability. The reason for the failure of the Hessian approximation is that, while the FIM is equal to the expected Hessian $J=\mathbb{E}[H]$, there is no reason to expect the expected Hessian to be close to the actual Hessian of the minimum. \end{remark} \begin{remark} One crucial message this theorem delivers is that the SGD noise is different in strength and shape in different kinds of local minima and that they need to be analyzed differently. The previous works all treat all the minima as if the noise is similar \citep{jastrzebski2018three, pmlr-v97-zhu19e, liu2021noise, wu2020noisy, Xie2020}, which can lead to inaccurate or even incorrect understanding. For example, Theorem 3.2 in \cite{Xie2020} predicts a high escape probability from a sharp local or global minimum. However, this is incorrect because a model at a global minimum has zero probability of escaping due to a vanishing gradient. In contrast, the escape rate results derived in \cite{mori2021logarithmic} correctly differentiate the local and global minima. \end{remark}\vspace{0mm} We also note that these general formulae agree much better with the exact solutions we obtained in the previous section than the Hessian approximation. For example, the dependence of the noise strength on the training loss in Theorem~\ref{thm: Sigma label}, and the rank-$1$ noise of regularization are all well-reflected in these formulae. In contrast, the simple Hessian approximation misses these crucial distinctions. \iffalse \begin{table*}[tb!] {\small \begin{center} \begin{minipage}[c]{0.6\textwidth} \renewcommand\arraystretch{1.5} \begin{tabular}{c|c} \hline\hline & Noise covariance $C$ \\ \hline With regularization & $\frac{2L_0(\mathbf{w}^*)}{S}H_0(\mathbf{w}^*)-\frac{1}{S}\Gamma\mathbf{w}^*\mathbf{w}^{*\mathrm{T}}\Gamma$\\ No reg. local minimum & $\frac{2L_0(\mathbf{w})}{S}H_0(\mathbf{w})$\\ No reg. global minimum & $\frac{(\mathbf{w}-\mathbf{w}^*)^\mathrm{T}H_0(\mathbf{w}^*)(\mathbf{w}-\mathbf{w}^*)}{S}H_0(\mathbf{w}^*)$\\ \hline\hline \end{tabular} \end{minipage}\hfill \begin{minipage}[c]{0.39\textwidth} \caption{Summary of the minibatch SGD noise in three situations. When regularization is applied, the noise is parameter independent and may be well approximated by a Gaussian distribution. When there is no regularization, the noise becomes dependent on the parameter $\mathbf{w}$.} \vspace{-0em} \label{tab:summary general theory} \end{minipage} \vspace{-2em} \end{center} } \end{table*} \fi \vspace{-2mm} \section{Applications}\label{sec: applications} \vspace{0mm} One major advantage of analytical solutions is that they can be applied in a simple ``plug-in" manner by the practitioners or theorists to analyze new problems they encounter. In this section, we briefly outline a few examples where the proposed theories can be relevant. \iffalse \begin{figure}[tb!] \captionsetup[subfigure]{justification=centering} \centering \begin{subfigure}{0.3\columnwidth} \includegraphics[width=\linewidth]{plots/tail_index/tail_index.png} \vspace{-1.5em} \caption{$a=1$, $\sigma^2 =\epsilon^2 =1$, $\lambda=0.1$} \end{subfigure} \begin{subfigure}{0.3\columnwidth} \includegraphics[width=\linewidth]{plots/tail_index/tail_index_small_epsilon.png} \vspace{-1.5em} \caption{$\sigma^2 =\epsilon^2=0.01$} \end{subfigure} \begin{subfigure}{0.3\columnwidth} \includegraphics[width=\linewidth]{plots/tail_index/tail_index_smallest_epsilon.png} \vspace{-1.5em} \caption{$\sigma^2 =\epsilon^2=0.0001$} \end{subfigure} \caption{Tail index estimation for a 1d example. For the cutoff power-law distribution, the smaller the $\epsilon$ is, the more negative the correlation between $\beta$ and $S$ is. For $\epsilon$ is larger than 1, the $\beta$ vs $S$ relation is always close to square root.} \label{fig:tail index} \vspace{-1em} \end{figure} \fi \vspace{0mm} \subsection{Second-order Methods}\label{sec: second order} \vspace{0mm} Understanding stochastic second-order methods (including the adaptive gradient methods) is important for deep learning \citep{agarwal2017second, zhiyi2021distributional}. In this section, we apply our theory to two standard second-order methods: damped Newton's method (DNM) and natural gradient descent (NGD). We provide more accurate results than that derived in \citet{liu2021noise}. The derivations are given in Appendix~\ref{app: second order}. For DNM, the preconditioning learning rate matrix is defined as $\Lambda:= \lambda A^{-1}$. The model fluctuation is shown to be proportional to the inverse of the Hessian: $\Sigma = \frac{\lambda \sigma^2}{gS -\lambda D}A^{-1}$, where $g:=2(1-\mu) - \left(\frac{1-\mu}{1+\mu}+\frac{1}{S}\right)\lambda$. The main difference with the previous results is that the fluctuation now depends explicitly on the dimension $D$, and implies a stability condition: $S\geq \lambda D /g$, which corroborates the stability condition in Theorem~\ref{prop: stability}; this implies that the stability of DNM has an intrinsic relation with the dimension of the local landscape, which we leave to a future work to study. For NGD, the preconditioning matrix is defined by the inverse of the Fisher information that $\Lambda:= \frac{\lambda}{S} J(\mathbf{w})^{-1} = \frac{\lambda}{S} C^{-1}$. We show that $\Sigma =\frac{\lambda}{2}\left(\frac{1}{1+D}\frac{1}{1+\mu}+\frac{1}{1-\mu}\frac{1}{S}\right)A^{-1}$ is one solution when $\sigma=0$, which also contains a correction related to $D$ compared to the result in \citet{liu2021noise} which is $\Sigma = \frac{\lambda}{2}\left(\frac{1}{1+\mu}+\frac{1}{1-\mu}\frac{1}{S}\right)A^{-1}$. A consequence is that $J\sim \Sigma^{-1}$. The surprising fact is that the stability of both NGD and DNM now crucially depends on $D$; combining with the results in Section~\ref{sec: high dimension linear regression}, this suggests that the dimension of the problem may crucially affect the stability and performance of the minibatch-based algorithms. \vspace{0mm} \subsection{Relevance for Uncertainty Estimation} \vspace{0mm} It is common that one would like to assess the predictive uncertainty of a deep learning model $f(x,\mathbf{w})$ for a fixed input $x$. Close to a local minimum $\mathbf{w}^*$, we can Taylor expand $f(x, \mathbf{w})= f(x, \mathbf{w}^*) + \nabla^{\rm T} f(x, \mathbf{w}^*)(\mathbf{w} - \mathbf{w}^*) + ...$ to analyze its uncertainty behavior $\text{Var}[f] \approx (\nabla^{\rm T} f) \Sigma (\nabla f)$. This is the predictive variance if one uses SGD as approximate Bayesian inference \citep{Mandt2017, zhang2020cyclical, wenzel2020good}, and our results on $\Sigma$ may be useful both quantitatively and qualitatively. \vspace{0mm} \subsection{Failure of the $\lambda-S$ scaling law}\label{app sec: failure of the scaling law} \vspace{0mm} One well-known fact in deep learning training is that one can scale $\lambda$ linearly as one increases the batch size $S$ to achieve high-efficiency training without hindering the generalization performance; however, it is known that this scaling law fails when the learning rate is too large, or the batch size is too small. In \cite{Hoffer2017}, this scaling law is established on the ground that $\Sigma \sim \lambda/S$. However, our result in Theorem~\ref{thm: Sigma label} suggests the reason for the failure even for the simple setting of linear regression. Recall that the exact $\Sigma$ takes the form: \[\Sigma = \frac{\lambda \sigma^2}{S}\left( 1 + \frac{ \kappa_{\mu}}{S}\right) G_{\mu}^{-1}\] for a scalar $\lambda$. One notices that the leading term is indeed proportional to $\lambda/S$. However, the discrete-time SGD results in a second-order correction in $S$, and the term proportional to $1/S^2$ does not contain a corresponding $\lambda$; this explains the failure of the scaling law in small $S$, where the second-order contribution of $S$ becomes significant. To understand the failure at large $\lambda$, we need to look at the term $G_\mu$: \[G_{\mu}=2(1-\mu)I_D-\left(\lambda\frac{1-\mu}{1+\mu}+\frac{\lambda}{S}\right) A.\] One notices that the second term contains a part that only depends on $\lambda$ but not on $S$. This part is negligible compared to the first term when $\lambda$ is small; however, it becomes significant as the second term approaches the first term. Therefore, increasing $\lambda$ changes this part of the fluctuation, and thus the scaling law no more holds if $\lambda$ is large. \begin{wrapfigure}{r!}{0.3\linewidth} \centering \vspace{-3.5em} \includegraphics[width=\linewidth]{plots/tail_index/tail_index_a_1_main.png} \vspace{-2em} \caption{\small Comparison of our theory with continuous-time theory the on the SGD stationary distribution for $a\lambda=1$. Continuous-time theory severely underestimates the heaviness of the tail.} \label{fig:tail index main} \vspace{-1.5em} \end{wrapfigure} \vspace{0mm} \subsection{Power Law Tail in Discrete-time SGD}\label{sec: tail index} \vspace{0mm} It has recently been discovered that the SGD noise causes a heavy-tail distribution \citep{Simsekli2019tailindex, simsekli2020hausdorff}, with a tail decaying like a power law with tail index $\beta$ \citep{hodgkinson2020multiplicative}. In continuous-time, the stationary distribution has been found to obey a Student's t-like distribution, $p(w) \sim \left(\sigma^2+a w^2\right)^{-(1 +\beta)/2}$ \citep{meng2020dynamic,mori2021logarithmic}. Our result in Eq.~\eqref{eq: solution} can serve as a tool to find the discrete-time correction to the tail index of the stationary distribution. In Appendix~\ref{app: tail index proof}, we show that the tail index of discrete-time SGD in 1d can be estimated as $\beta(\lambda,S) = \frac{2S}{a\lambda}-S$. A clear discrete-time contribution is $-(S+1)$ which depends only on the batch size, while $\frac{2S}{a\lambda}+1$ is the tail index in the continuous-time limit \citep{mori2021logarithmic}. See Figure~\ref{fig:tail index main}; the proposed formula agrees with the experiment. Knowing the tail index $\beta$ is very important for understanding the SGD dynamics because $\beta$ is equal to the smallest moment of $w$ that diverges. For example, when $\beta\leq 4$, then the kurtosis of $w$ diverges, and one expects to see outliers of $w$ very often during training; when $\beta\leq 2$, then the second moment of $w$ diverges, and one does not expect $w$ to converge in the minimum under consideration. Our result suggests that the discrete-time dynamics always leads to a heavier tail than the continuous-time theory expects, and therefore is more unstable. \vspace{-2mm} \section{Outlook}\label{sec: discussion} \vspace{0mm} In this work, we have tackled the minibatch SGD problem with a focus on exactly solvable results to promote our fundamental understanding of SGD. Previously, almost no analytical result had been available for minibatch SGD, and the present work fills this gap. The limitation of this work is obvious; the focus on solvable models has restricted us to the simple problems of variants of linear regression. However, this should not be taken as a setback; it is well known that only very restricted classes of problems can be exactly solved, and their solutions have enhanced our fundamental understanding of almost every branch of science, including not limited to physics \citep{wadati1989exactly}, ecology \citep{petrovskii2005exactly}, and economics \citep{gale1989theory}. As we have demonstrated, even the solutions to linear regression can have implications for deep learning problems, and it is our hope that this work will draw more attention to the study of SGD and to finding the exactly solvable models for understanding deep learning. \bibliographystyle{apalike} \input{arxiv_bib} \clearpage \clearpage \section{Introduction} Stochastic gradient descent (SGD) is a simple and efficient optimization algorithm behind the unprecedented success of deep learning, and attracts increasingly more attention in the field of machine learning \citep{allen2018convergence, xing2018_walk_sgd, Zhang_optimizationProperitesSGD,Wang2020,he2020recent, liu2020stochastic}. It is now well established that stochastic noise in SGD directly affects the performance of the SGD algorithm, both in terms of the training efficiency and generalization ability \citep{Hoffer2017}. At the same time, the SGD noise is not easy to understand, partially because of the lack of analytical results. Previous works are mostly limited to empirical studies. For examples, let $S$ denote the minibatch size; then the rule of thumb of rescaling the learning rate $\lambda$ by $1/S$ is now well-established empirically \citep{Hoffer2017}. Recently, it has also been shown that the noise in SGD takes a heavy-tail nature, with a measurable tail index, mimicking many types of noises in nature \citep{Simsekli2019tailindex}. However, the existence of a plethora of empirical results is in sharp contrast to the lack of theoretical and analytical results in the field. For the existing theoretical studies, dominantly many of the previous theoretical works take two approximations: (1) the continuous-time approximation, which take the infinitesimal step-size limit $\lambda\to 0$; (2) the Hessian approximation, which assumes that the covariance matrix of the SGD noise is approximated by the Hessian $H$. In this work, we remove these two approximations altogether, and focus on deriving analytical results on discrete-time SGD noise where the learning rate can be arbitrarily large and the noise covariance matrix is treated exactly. These results are then used for motivating a more general and accurate approximation to the minibatch SGD noise. In summary, \begin{itemize} \item we show that minibatch SGD does not always cause a noise; this implies that it is not always suitable to treat SGD as a Markov chain Monte Carlo (MCMC) algorithm for sampling a posterior parameter distribution \item we derive the strength and the shape of the minibatch SGD noise in the cases where the noise for discrete-time SGD is analytically solvable \item we propose a general and more accurate approximation to the minibatch noise; we also apply our general formulation to study the effect of minibatch noise in the high-dimensional linear regression problem. \vspace{-0mm \end{itemize} The organization of the paper is as follows. In Section~\ref{sec: background}, we define minibatch SGD. In Section~\ref{sec: related works}, we discuss the related works. In Section~\ref{sec:theory}, we outline the theoretical results and verify them experimentally. In Section~\ref{sec:general}, we discuss the formulation to understand minibatch noise in a general setting. In the last section, we conclude this work and discuss possible future works. For reference, we summarize the analytical results for a special case in Table~\ref{tab:summary}. \begin{table*}[t!] {\footnotesize \centering \caption{\small Summary of the results of this work and comparison with previous results. For notational conciseness, we compare the case when all the relevant matrices commute. The model fluctuation $\Sigma$, the expected training loss $L_{\rm train}$ and the expected test loss $L_{\rm test}$ calculated by continuous- and discrete-time theories with Hessian approximation $C\approx H$ are presented. Exact solutions to these quantities obtained in the present work are shown in the rightmost column.}\vspace{-3mm} \label{tab:summary} \renewcommand\arraystretch{1.4} \begin{tabular}{c|c|c|c} \hline\hline & \multicolumn{2}{c|}{Hessian Approximation} & Exact Solution\\ \hline & Cts-time Approximation & D-time Solution & This Work \\ \hline & { $\Sigma$} & { $\Sigma$} & { $\Sigma$}\\ \hlin Label Noise & $\frac{\lambda}{2S}I_D$ & $\frac{\lambda}{S}(2I_D -\lambda A)^{-1}$ & $\frac{\lambda \sigma^2}{S}\left( 1 + \frac{\lambda \kappa}{S}\right) \left[2 I_D - \lambda \left(1 + \frac{1}{S}\right)A \right]^{-1}$ \\ Input Noise & $\frac{\lambda}{2S}I_D$ & $\frac{\lambda}{S}(2I_D-\lambda K)^{-1}$ & $\frac{\lambda {\rm Tr}[AK^{-1}BU]}{S}\left( 1 + \frac{\lambda \kappa'}{S}\right) \left[2 I_D - \lambda \left(1 + \frac{1}{S}\right)K \right]^{-1}$ \\ $L_2$ Regularization & $\frac{\lambda}{2S}I_D$ & $\frac{\lambda}{S}(2I_D-\lambda K)^{-1}$ & Eq.~\eqref{eq: regularization solution} \\ \hline\hline & { $L_{\rm train}$} & {$L_{\rm train}$} & {$L_{\rm train}$} \\ \hlin Label Noise & $\frac{\lambda}{4S}{\rm Tr}[A]+\frac{1}{2}\sigma^2$ & Eq.~\eqref{eq: label training discrete K approx} & $\frac{\sigma^2}{2}\left(1+\frac{\lambda \kappa}{S}\right)$ \\ Input Noise & $\frac{\lambda}{4S}{\rm Tr}[K]+\frac{1}{2}{\rm Tr}[AK^{-1}BU]$ & Eq.~\eqref{eq: input training discrete K approx} & $\frac{1}{2}{\rm Tr}[AK^{-1}BU]\left(1+\frac{\lambda }{S}\kappa'\right)$ \\ $L_2$ Regularization & $\frac{\lambda}{4S}{\rm Tr}[K]+\frac{1}{2}{\rm Tr}[AK^{-1}\Gamma U]$ & Eq.~\eqref{eq: Kapprox training} & Eq.~\eqref{eq: regularization training loss} \\ \hline\hline & { $L_{\rm test}$} & {$L_{\rm test}$} & {$L_{\rm test}$} \\ \hlin Label Noise & $\frac{\lambda}{4S}{\rm Tr}[A]$ & $\frac{\lambda}{2S}{\rm Tr}[A(2I_D-\lambda A)^{-1}]$ & $\frac{\lambda\sigma^2}{2S}\kappa$ \\ Input Noise & $\frac{\lambda}{4S}{\rm Tr}[A]+\frac{1}{2}{\rm Tr}[B'^{\rm T}AB'U]$ & Eq.~\eqref{eq: input test discrete K approx} & $\frac{\lambda}{2S}{\rm Tr}[AK^{-1}BU] \kappa'+\frac{1}{2}{\rm Tr}[B'^{\rm T}AB'U]$ \\ $L_2$ Regularization & $\frac{\lambda}{4S}{\rm Tr}[A]+\frac{1}{2}{\rm Tr}[AK^{-2}\Gamma^2 U]$ & Eq.~\eqref{eq: Kapprox test} & Eq.~\eqref{eq: regular test loss} \\ \hline\hline \end{tabular} } \vspace{-1em} \end{table*} \section{Background}\label{sec: background} In this section, we introduce the minibatch SGD algorithm, starting from its relationship with gradient descent (GD) and online learning. Let $\{x_i, y_i\}_{i=1}^{N}$ be a training set. We can define the GD algorithm for a differentiable loss function $L$ as follows: \vspace{-1mm} \begin{equation} \mathbf{w}_t = \mathbf{w}_{t-1} - \lambda \nabla_\mathbf{w}L(\mathbf{w},\{ \mathbf{x}, \mathbf{y}\}), \vspace{-1mm} \end{equation} where $\lambda$ is the learning rate and $\mathbf{w}\in\mathbb{R}^{D}$ is the weights of the model as a vector. There is no stochasticity in GD. For the minibatch technique to be applicable, we assume that the loss function takes an additive form. \begin{definition} A loss function $L(\{x_i, y_i\}_{i=1}^{N}, \mathbf{w})$ is said to be additive if \vspace{-2mm} \begin{equation} L(\{x_i, y_i\}_{i=1}^{N}, \mathbf{w}) = \frac{1}{N}\sum_{i=1}^N \ell(x_i, y_i, \mathbf{w})\vspace{-2mm} \end{equation} for some differentiable, non-negative function $\ell(\cdot)$. \end{definition} This definition is quite general. Most of the commonly studied and used loss functions are additive; for example, the mean-square error (MSE) for regression and the cross-entropy loss for classification are additive. If the loss function is additive, then the minibatch SGD can be defined as follows: \begin{definition}\label{def: with replacement} A minibatch SGD \textit{with replacement} computes the update to the parameter $\mathbf{w}$ with the following set of equations:\vspace{0mm} \begin{equation}\label{eq: with replacement} \begin{cases} \hat{\mathbf{g}}_t= \frac{1}{S}\sum_{i\in B_t} \nabla \ell(x_i, y_i, \mathbf{w}_{t-1});\\ \mathbf{w}_t = \mathbf{w}_{t-1} - \lambda \hat{\mathbf{g}}_t, \end{cases}\vspace{0mm} \end{equation} where $S := |B_t|$ is called the minibatch size, and the set $B_t=\{i_1,...i_S\}$ are $S$ i.i.d. random integers sampled uniformly from $[1,N]$. Note that $S$ can be larger than $N$ in this case. \end{definition} Let us define the without-replacement sampling. \begin{definition}\label{def: without replacement} A minibatch SGD \textit{without replacement} computes the update to the parameter $\mathbf{w}$ with the following set of equations: \vspace{0mm} \begin{equation}\label{eq: without replacement} \begin{cases} \hat{\mathbf{g}}_t= \frac{1}{S}\sum_{i\in B_t} \nabla \ell(x_i, y_i, \mathbf{w}_{t-1});\\ \mathbf{w}_t = \mathbf{w}_{t-1} - \lambda \hat{\mathbf{g}}_t, \end{cases}\vspace{0mm} \end{equation} where $S := |B_t|\leq N$ is the minibatch size, and the set $B_t$ is an element uniformly-randomly drawn from the set of all $S$-size subsets of $\{1,...,N\}$. \end{definition} \vspace{-1mm} When $N\to \infty$, the minibatch SGD algorithm is equivalent to online learning. For both algorithms, we decompose the gradient into a deterministic term and a stochastic term. Notice that, in both definitions, $\mathbb{E}_{\rm B}[\hat{\mathbf{g}}_t] = \nabla L $ is equal to the gradient for the GD algorithm. We use $\mathbb{E}_{\rm B}(\cdot)$ to denote the expectation over batches, and use $\mathbb{E}_{\mathbf{w}}(\cdot)$ to denote the expectation over the stable distribution of the model parameters. Therefore, we can write\vspace{0mm} \begin{equation} \hat{\mathbf{g}}_t = \mathbb{E}_{\rm B}[\hat{\mathbf{g}}_t] + \eta_t,\vspace{0mm} \end{equation} where $\eta_t:= \frac{1}{S}\sum_{i\in B_t} \nabla \ell(x_i, y_i, \mathbf{w}_{t-1}) - \mathbb{E}_{\rm B}[\hat{\mathbf{g}}_t]$ is the fluctuation term; of central importance to us is the noise covariance matrix defined as $C:= \text{cov}(\eta_t, \eta_t)$. When the loss function can be approximated by a quadratic form, one can apply the results in \cite{liu2020stochastic} to obtain the asymptotic fluctuation of the model parameters in discrete-time SGD through the matrix equation\vspace{0mm} \begin{equation} \Sigma K + K\Sigma - \lambda K\Sigma K = \lambda C,\vspace{0mm} \end{equation} where $K$ is the local Hessian of the loss function, and $\Sigma:= \lim_{t\to\infty} \text{cov}(\mathbf{w}_t, \mathbf{w}_t)$ is the asymptotic model fluctuation. Here $\Sigma$ gives the strength and the shape of the fluctuation of $\mathbf{w}$ around a local minimum and is yet another quantity of central importance to this work alongside $C$. \section{Related Works}\label{sec: related works} Minibatch noise is a major type of noise involved in the learning of modern neural networks. Practically, it is unavoidable because the memory of a modern computer is limited while the size of the datasets we use is large; this demands the dataset to be split into ``minibatches" for training. At the same time, using minibatch is also a recommended practice because using a smaller batch-size often leads to better generalization ability \citep{Hoffer2017}. Therefore, understanding minibatch noise has been one of the major topics in the theory of deep learning. \textbf{Hessian Approximation.} Theoretical analysis of SGD was first made for the stochastic gradient Langevin dynamics (SGLD) algorithm, which assumes that the covariance matrix of the noise is a full-rank isotropic Gaussian \citep{Welling2011,Ge2015,neelakantan2015adding,pmlr-v65-raginsky17a}. However, it is now known that the SGD noise is neither isotropic nor Gaussian \citep{pmlr-v97-zhu19e}. While the importance of the structure of the noise was realized several years ago \citep{Hoffer2017,jastrzebski2018three,pmlr-v97-zhu19e,haochen2020shape}, a standard but crude approximation of the minibatch noise which assumes $C\approx H$ has often been adopted to understand SGD. As one of the earliest theoretical work that proposed this approximation, \cite{Hoffer2017} argued that generalization performance with a large batch size can be good if training is long enough. \cite{jastrzebski2018three} combined this approximation with the continuous-time approximation to argue that the dynamics is the same for the same value of the ratio $\lambda/S$ and that a larger ratio results in better generalization. Such a scaling rule among the learning rate, the batch size and the momentum hyperparameter was proposed by \cite{smith2017bayesian} under the same set of assumptions as well. Later, \cite{pmlr-v97-zhu19e} showed that a significant enhancement for the escape rate from a sharp minimum is brought about by the anisotropy of the noise covariance. However, although it is widely used, this Hessian approximation remains crude and may deviate far from the truth as shown in experiments \cite{liu2020stochastic}. \textbf{Overparametrization and High-Dimensional Linear Regression}. One mystery in deep learning is that modern neural networks are often overparametrized \citep{neyshabur2018the}, meaning that they often have more parameters than the number of data points; yet the overparametrized networks do not tend to overfit, and the performance even seem to improve with a higher number of parameters \citep{Zhang_rethink}. A minimal model of the generalization ability of overparametrized neural networks is the high-dimensional linear regression problem \citep{hastie2019surprises,deng2019model,ADVANI2020428}, where an interesting phenomenon called ``double descent" can be studied analytically. In this work, we also take the high-dimensional linear regression as a minimal model of an overparametrized neural network and study the effect of minibatch noise on it. \textbf{Heavy-Tail SGD.} For a long time, the gradient noise in SGD has been assumed to be Gaussian \citep{Ahn2012,chen2014stochastic,Mandt2017} by invoking the central limit theorem. More recently, further steps towards a better understanding of SGD noise have been taken. It has been noticed that the model parameter dependence of the SGD noise results in a heavy tail stationary distribution of the model parameter \citep{Simsekli2019tailindex,nguyen2019exit,Panigrahi2019,wu2020noisy,hodgkinson2020multiplicative,meng2020dynamic}. The general formulation of this work suggests that the stationary distribution of model parameters might be heavy-tail, which we confirm with experiments in Appendix~\ref{app: phase diagram} \section{What Causes Minibatch Noise?} \label{sec:theory} In order to understand minibatch noise, we need to first answer the question: what may actually cause minibatch noise? A naive answer is that minibatch noise will arise whenever minibatch sampling is employed. However, this is indeed not the case. The behavior of SGD may still be deterministic even when minibatch sampling is used to train the model. This section, therefore, is devoted to understanding the condition for minibatch noise to arise and to disappear. \subsection{General Setting} When $N\gg S$, the following proposition gives the exact noise covariance due to minibatch sampling. For general $N$ and $S$, the noise covariance is calculated in Appendix~\ref{app: der of C}. \begin{proposition}\label{prop: noise_cov}The covariance matrix of noise in SGD due to minibatch sampling as defined in Definitions~\ref{def: with replacement} and \ref{def: without replacement} with $N\gg S$ is \begin{equation}\label{eq:noise_cov} C(\mathbf{w})=\frac{1}{SN}\sum_{i=1}^{N}\nabla \ell_i \nabla \ell_i^{\rm T}-\frac{1}{S}\nabla L(\mathbf{w})\nabla L(\mathbf{w})^{\rm T}, \end{equation} where the simplified notations $\ell_i(\mathbf{w}):= l(x_i, y_i, \mathbf{w})$ and $L(\mathbf{w}):=L(\{x_i, y_i\}_{i=1}^{N}, \mathbf{w})$ are used. \end{proposition}\vspace{-1mm} This gradient covariance matrix $C$ is crucial to understand the minibatch noise. Let $H(\mathbf{w})$ denote the Hessian matrix of $L(\mathbf{w})$. The standard literature often uses the Hessian approximation $C(\mathbf{w})\approx H(\mathbf{w})$ to study the properties of minibatch noise; however, the following proposition shows that this approximation can easily break down and does not hold in some cases. \begin{proposition}\label{prop: no noise condition} Let $\mathbf{w}_*$ be the solution such that $L(\mathbf{w}_*)=0$. Then $C(\mathbf{w}_*)=0$.\vspace{-1mm} \end{proposition} \textit{Proof}. Because $\ell_i$ is non-negative for all $i$, $L(\mathbf{w}_*)=0$ implies that $\ell_i(\mathbf{w}_*)=0$. The differentiability in turn implies that each $\nabla\ell_i(\mathbf{w}_*)=0$; therefore, $C=0$. $\square$ This proposition implies that, if our model is expressive enough to memorize all the data points, then at the global minimum, there is no noise, i.e., an overparametrized model has no fluctuation at asymptotic time. Also note that this proposition shows that the commonly used Hessian approximation $C\sim H$ is wrong; since the Hessian matrix is unlikely to vanish in any local minimum, whereas the noise covariance matrix indeed vanishes. However, this does not mean that the only type of model that experiences fluctuation are the ones that are underparametrized. In fact, quite surprisingly, we will show that, when a regularization term exists in the training, all models will exhibit fluctuations at convergence. We now show that there are at least four causes for fluctuations to arise: the existence of label noise, input noise, regularization, and underparametrization. We study the strength and shape of the noise and fluctuation of these cases in the setting of linear regression. \subsection{Random Noise in the Label}\label{sec: label noise} For linear regression, the loss function takes the form\vspace{-2mm} \begin{equation} L(\mathbf{w}) = \frac{1}{2N}\sum_{i=1}^N(\mathbf{w}^{\rm T} x_i - y_i)^2, \label{eq: loss fucntion label}\vspace{-2mm} \end{equation} where $x_i\in \mathbb{R}^D$ are drawn from a zero-mean Gaussian distribution with covariance matrix $A:= \mathbb{E}_{\rm B}[xx^{\rm T}]$, and $y_i=\mathbf{u}^{\rm{T}}x_i + \epsilon_i$, for some fixed $\mathbf{u}$ and $\epsilon_i \in \mathbb{R}$ is drawn from a distribution with zero mean and finite second momentum $\sigma^2$. We deal with the case where $N \to \infty$ with $D$ held fixed. We start with redefining $\mathbf{w} -\mathbf{u} \to \mathbf{w} $, which is a standard trick to simplify notation. For such a problem setting, the covariance matrix for the SGD noise is calculated in the following proposition. \begin{proposition}\label{prop: label noise covariance}$($Covariance matrix for SGD noise in the label$)$ Let the algorithm be updated according to Eq.~\eqref{eq: with replacement} or \eqref{eq: without replacement} with random noise in the label while $N\to \infty$ with fixing $D$. Then the expected SGD noise covariance is\vspace{-1mm} \begin{equation} C = \frac{1}{S}(A\Sigma A + {\rm Tr}[A\Sigma]A+ \sigma^2 A),\vspace{-1mm}\label{eq: label noise covariance} \end{equation} where $\Sigma:=\mathbb{E}_\mathbf{w}[\mathbf{w}\mathbf{w}^{\rm T}]$ is the stationary covariance matrix of the model parameters. \end{proposition} By combining Proposition~\ref{prop: label noise covariance} with the result in \cite{liu2020stochastic}, $\Sigma$ can be obtained explicitly. \begin{theorem}\label{thm: Sigma label}$($Fluctuation of model parameters with random noise in the label$)$ Let $C$ be given by Proposition~\ref{prop: label noise covariance}. Then\vspace{-1mm} \begin{equation}\label{eq: solution} \Sigma = \frac{\lambda \sigma^2}{S}\left( 1 + \frac{\lambda \kappa}{S}\right) G^{-1},\vspace{-1mm} \end{equation} where $\kappa:=\frac{ {\rm Tr}[AG^{-1}]}{1 - \frac{\lambda}{S}{\rm Tr} [AG^{-1}]}$ with $G:=2I_D - \lambda\left(1 + \frac{1}{S} \right)A$. \end{theorem} \begin{remark} For SGD with momentum, according to \cite{liu2020stochastic}, the solution has a similar form if $G$ is replaced by $G_M:=2(1-\mu)I_D-\lambda\left(\frac{1-\mu}{1+\mu}+\frac{1}{S}\right)A$, where $\mu\in[0,1)$ is the momentum hyperparameter.\vspace{-2mm} \end{remark} If $\sigma^2=0$, then $\Sigma=0$. This means that when zero training loss is achievable, the final model parameter has no variance, which corroborates the result in Proposition~\ref{prop: no noise condition}. It is worth discussing a limiting case. When $\lambda \ll 1$ and $1 \ll S$, we have\vspace{0mm} \begin{equation}\label{eq: cts time approximation} \Sigma \approx \frac{\lambda\sigma^2}{2 S} I_D,\vspace{-0mm} \end{equation} which is the result one would expect from the continuous-time theory with the Hessian approximation \citep{liu2020stochastic}. The above theorem is exact for discrete-time SGD, and it is worth comparing the exact result with Eq.~\eqref{eq: cts time approximation} to see the effect of a large learning rate and minibatch sampling on the parameter fluctuation. One immediately notices two differences: (1) an anisotropic enhancement, appearing in the matrix $G$ and taking the form $-\lambda(1+1/S)A$; compared with the result in \cite{liu2020stochastic}, this term is mainly due to the effect of using a large learning rate in the discrete-time SGD, but slightly enlarged by the factor $1/S$; (2) an isotropic enhancement term $\kappa$, which causes an overall magnitude of fluctuations to increase; this term does not appear in the previous works that are based on the Hessian approximation, and this term is due to the minibatch sampling process alone. Therefore, we see that the minibatch sampling process causes two different kinds of enhancement to the fluctuation, potentially increasing the exploration power of SGD at initialization but reduces the convergence speed at convergence. From Theorem~\ref{thm: Sigma label}, one can also calculate the approximation error and the test loss; since they are irrelevant to the main message, we derive and discuss these results in Appendix~\ref{app: errors label}. Note that Theorem~\ref{thm: Sigma label} also implies a necessary condition for convergent parameter covariance. \begin{corollary}\label{cor: label convergence} If $\Sigma$ is positive and finite, then $\lambda a^* < \frac{2S}{2+S}$, where $a^*$ is the largest eigenvalue of $A$. \end{corollary} \vspace{0mm} This corollary suggests that the stability of SGD is crucially dependent on the batch size. When the batch size is too small, one also needs to scale down the learning rate to prevent the instability of optimization. As $S\to \infty$, the condition for stability converges to $2$, which is the stability condition for discrete-time SGD \citep{liu2020stochastic}, that is, discreteness of time step is the major factor affecting the stability at a large batch size. We now verify the theory with experiment. In Figures~\ref{fig:label noise}(a)-(b). we run a 1d experiment with $N=10000$ and $\sigma^2 = 0.25$. Comparing the predicted $\Sigma$, we see that the proposed theory agrees with the experiment across all ranges of $S$ and $\lambda$. The continuous theory with the Hessian approximation fails almost everywhere, while the recently proposed discrete theory with the Hessian approximation underestimates the fluctuation when $S$ is small or $\lambda$ is large. We also make a comparison for higher dimensions. See Figures~\ref{fig:label noise}(c)-(d), where we plot the distribution of the parameter after training. We choose $D=2$ for visualization. We see that the continuous Hessian approximation fails badly for both large batch size and small batch size. When the batch size is large, both the discrete Hessian approximation and our solution give a very accurate estimate of the shape and the spread of the distribution. This suggests that, when the batch size is large, the discreteness is the determining factor of the fluctuation. When the batch size is small, the discrete Hessian approximation severely underestimates the strength of the noise. This reflects the fact that the isotropic noise enhancement is dominant at a small batch size. \begin{figure}[tb] \captionsetup[subfigure]{justification=centering} \centering \begin{subfigure}{0.45\columnwidth} \includegraphics[width=\linewidth]{plots/label_noise/comparison_label_noise_S.png} \vspace{-2em} \caption{$a=1.5$, $\lambda=1$} \end{subfigure} \begin{subfigure}{0.45\columnwidth} \includegraphics[width=\linewidth]{plots/label_noise/comparison_label_noise_lambda.png} \vspace{-2em} \caption{$a=1$, $S=10$} \end{subfigure} \begin{subfigure}{0.45\columnwidth} \includegraphics[width=\linewidth]{plots/label_noise/2d-S-100.png} \vspace{-2em} \caption{$\lambda=1.6$, $S=100$,\\ $a_1=1,\ a_2=0.5$} \end{subfigure} \begin{subfigure}{0.45\columnwidth} \includegraphics[width=\linewidth]{plots/label_noise/2d-S-10.png} \vspace{-2em} \caption{$\lambda=1.6$, $S=10$,\\ $a_1=1,\ a_2=0.5$} \end{subfigure} \vspace{-1em} \caption{Experiments with label noise. (a)-(b) $1$d experiments. (c)-(d) $2$d experiments.} \label{fig:label noise} \vspace{-0.5em} \end{figure} \subsection{Random Noise in the Input}\label{sec: input noise} Similar to label noise, noise in the input data can also cause fluctuation. We assume that the training data points $\tilde{x}_i = x_i + \eta_i$ can be decomposed into a signal part and a random part. As before, we assume Gaussian distributions, $x_i \sim \mathcal{N}(0, A)$ and $\eta_i \sim \mathcal{N}(0, B)$. The problem remains analytically solvable if we replace the Gaussian assumption by the weaker assumption that the fourth-order moment exists and takes some matrix form. For conciseness, we assume that there is no noise in the label, namely $y_i=\mathbf{u}^{\rm T}x_i$ with a constant vector $\mathbf{u}$. One important quantity in this case will be $\mathbf{u} \mathbf{u}^{\rm T} := U$. Notice that the trick $\mathbf{w} - \mathbf{u} = \mathbf{w}$ no more works, and so we write the difference explicitly here. The loss function then takes the form \begin{align}\label{eq: loss input} L(\mathbf{w})&=\frac{1}{2N}\sum_{i=1}^{N}\left[(\mathbf{w}-\mathbf{u})^{\rm T}x_i + \mathbf{w}^{\rm T}\eta_i\right]^2\nonumber\\ &=\frac{1}{2}(\mathbf{w}-\mathbf{u})^{\rm T}A(\mathbf{w}-\mathbf{u})+\frac{1}{2}\mathbf{w}^{\rm T}B\mathbf{w}. \end{align} The gradient $\nabla L=(A+B)(\mathbf{w}-\mathbf{u})+B\mathbf{u}$ vanishes at $\mathbf{w}_*:=(A+B)^{-1}A\mathbf{u}$, which is the minimum of the loss function and the expectation of the parameter at convergence. It can be seen that, even at the minimum $\mathbf{w}_*$, the loss function remains finite unless $\mathbf{u}=0$, which reflects the fact that in the presence of input noise, the network is not expressive enough to memorize all the information of the data. The SGD noise covariance for this type of noise is calculated in the following proposition. \begin{proposition}\label{prop: noise input}$($Covariance matrix for SGD noise in the input$)$ Let the algorithm be updated according to Eq.~\eqref{eq: with replacement} or \eqref{eq: without replacement} with random noise in the input while the limit $N\to \infty$ is taken with $D$ held fixed. Then the noise covariance is\vspace{0mm} \begin{equation} C=\frac{1}{S} \left\{ K\Sigma K+ {\rm Tr}[K\Sigma]K + {\rm Tr}[AK^{-1}BU]K \right \},\label{eq: C of input}\vspace{0mm} \end{equation} where $K:=A+B$, and $\Sigma:=\mathbb{E}_{\mathbf{w}}\left[(\mathbf{w}-\mathbf{w}_*)(\mathbf{w}-\mathbf{w}_*)^{\rm T}\right]$. \end{proposition} \begin{remark} It can be seen that the form of the covariance \eqref{eq: C of input} of input noise is similar to that of label noise \eqref{eq: label noise covariance} with replacing $A$ by $K$ and $\sigma^2$ by ${\rm Tr}[AK^{-1}BU]$, suggesting that these two types of noise share a similar nature. \end{remark} Defining the test loss as $L_{\rm test}:=\frac{1}{2}\mathbb{E}_{\mathbf{w}} \mathbb{E}_{\rm B} \left[(\mathbf{w}^{\rm T}x-\mathbf{u}^{\rm T}x)^2\right]$, Proposition~\ref{prop: noise input} can then be used to calculate the test loss and the model fluctuation. \begin{theorem}\label{thm: errors of input}$($Test loss and model fluctuation for noise in the input$)$ For SGD with noise in the input given in Proposition~\eqref{prop: noise input}, the test loss is\vspace{0mm} \begin{equation} L_{\rm test}=\frac{\lambda}{2S}{\rm Tr}[AK^{-1}BU] \kappa'+\frac{1}{2}{\rm Tr}[B'^{\rm T}AB'U],\vspace{0mm} \label{eq: test loss of input} \end{equation} where $\kappa':=\frac{ {\rm Tr}[KG'^{-1}]}{1 - \lambda \frac{1}{S}{\rm Tr} [KG'^{-1}]}$ with $G':=2I_D - \lambda\left(1 + \frac{1}{S} \right)K$, and $B':=K^{-1}B$. Moreover, if $[K,U]=0$, then the covariance matrix of model parameters is\vspace{0mm} \begin{equation \Sigma=\frac{\lambda {\rm Tr}[AK^{-1}BU]}{S}\left( 1 + \frac{\lambda \kappa'}{S}\right) \left[2 I_D - \lambda \left(1 + \frac{1}{S}\right)K \right]^{-1}.\vspace{0mm}\nonumber \end{equation} \end{theorem} \begin{remark} Note that $[K,U]=0$ is necessary only for an analytical expression of $\Sigma$. It can be obtained by solving Eq.~\eqref{eq: matrix eq of input} even without invoking $[K,U]=0$. \end{remark} \subsection{Learning with Regularization}\label{sec: regularization} In this section, we show that regularization also causes minibatch noise. Specifically, we consider a generalized form of $L_2$ regularization. The loss function for $\Gamma-L_2$ regularized linear regression is\vspace{-1mm} \begin{align} L_\Gamma(\mathbf{w}) &=\frac{1}{2N}\sum_{i=1}^{N}\left[(\mathbf{w}-\mathbf{u})^{\rm T}x_i\right]^2 + \frac{1}{2} \mathbf{w}^{\rm T} \Gamma \mathbf{w} \nonumber\\ &=\frac{1}{2}(\mathbf{w}-\mathbf{u})^{\rm T}A(\mathbf{w}-\mathbf{u})+ \frac{1}{2} \mathbf{w}^{\rm T} \Gamma \mathbf{w},\label{eq: loss function regular} \end{align} where $\Gamma$ is a symmetric matrix; conventionally, we take $\Gamma=\gamma I_D$ with a scalar $\gamma>0$. The noise covariance for this form of regularization can be calculated but takes a rather complicated form. \begin{proposition}\label{prop: C of regular}$($Noise covariance matrix for learning with L$_2$ regularization$)$ Let the algorithm be updated according to Eq.~\eqref{eq: with replacement} or \eqref{eq: without replacement} with L$_2$ regularization while $N\to \infty$ with fixing $D$ and $[A,\Gamma]=0$. Then the noise covariance is\vspace{0mm} \begin{equation} C=\frac{1}{S}\left(A\Sigma A+{\rm Tr}[A\Sigma]A+{\rm Tr}[\Gamma'^{\rm T} A\Gamma' U]A + \Gamma A' U A' \Gamma\right),\vspace{0mm} \end{equation} where $A':=K^{-1}A$, $\Gamma':=K^{-1}\Gamma$ with $K:=A+\Gamma$, and $\Sigma:=\mathbb{E}_{\mathbf{w}}\left[(\mathbf{w}-\mathbf{w}_*)(\mathbf{w}-\mathbf{w}_*)^{\rm T}\right]$. \end{proposition} Notice that the last term $\Gamma A' U A' \Gamma$ in $C$ is unique to the regularization -based noise: it is rank-1 because $U$ is rank-1. This term is due to the misbatch between the regularization and the minimum of the original loss. Similar to the previous subsection, the test loss and the fluctuation are provided by the following theorem. \begin{theorem}\label{thm: errors of regular}$($Test loss and model fluctuation for learning with L$_2$ regularization$)$ For noise induced by L$_2$ regularization given in Propostion~\ref{prop: C of regular}, let $[A,\Gamma]=0$. Then \begin{equation} L_{\rm test}=\frac{\lambda}{2S}\left({\rm Tr}[AK^{-2}\Gamma^2 U ]\kappa+r\right)+\frac{1}{2}{\rm Tr}[AK^{-2}\Gamma^2U],\label{eq: regular test loss} \end{equation}% where $\kappa:=\frac{{\rm Tr}[A^2 K^{-1}G^{-1}]}{1-\frac{\lambda}{S}{\rm Tr}[A^2 K^{-1}G^{-1}]}$, $r:=\frac{{\rm Tr}[A^3 K^{-3} \Gamma^2 G^{-1}U]}{1-\frac{\lambda}{S}{\rm Tr}[A^2 K^{-1} G^{-1}]}$, with $G:=2I_D-\lambda\left(K+\frac{1}{S}K^{-1}A^2\right)$. Moreover, if $A$, $\Gamma$ and $U$ commute with each other, then the model fluctuation is\vspace{0mm} \begin{align} \Sigma=\frac{\lambda}{S}{\rm Tr}[AK^{-2}\Gamma^2U]\left(1+\frac{\lambda \kappa}{S}\right)AK^{-1}G^{-1}+\frac{\lambda}{S}\left(A^2 K^{-2}\Gamma^2 U+\frac{\lambda r}{S}A \right)K^{-1}G^{-1}.\label{eq: regularization solution} \end{align} \end{theorem} The approximation error is derived in Appendix~\ref{app: der of errors of regular}. The test loss \eqref{eq: regular test loss} leads to a rather surprising result. By minimizing it, one can show that there exist situations where the optimal $\Gamma$ is negative. For a 1d case, the condition for negative optimal $\gamma$ is given in the following corollary. \begin{corollary}\label{cor: negative gamma} There exist $a$, $\lambda$ and $S$ such that $\gamma<0$. The optimal $\gamma$ is negative if and only if\vspace{0mm} \begin{equation} \frac{2}{1+\frac{2}{S}}<a\lambda<\sqrt{\frac{S}{2}},{\textup{ and}}\ S\ne 2.\vspace{0mm} \label{eq: condition for minus gamma} \end{equation} \end{corollary} This result is surprising from a Bayesian perspective. In the Bayesian formalism, weight decay $\Gamma$ is usually understood as a prior distribution which the parameters are expected to obey. However, this result suggests that it is sometimes better to assume a divergent distribution! This means that some revisions might be needed when we interpret weight decay in the Bayesian sense. We plot in Figure~\ref{fig:regularization} the test loss \eqref{eq: regular test loss} for a 1d example to see the optimal $\gamma$ while varying either $S$ or $\lambda$. The orange vertical lines show the place where the theory predicts a divergence in the test loss. Figure~\ref{fig:regularization}(a) is a standard case, where the optimal $\gamma$ is close to $0$; Figure~\ref{fig:regularization}(b) shows a case where the optimal $\gamma$ is negative. Also, we note that the proposed theory agrees better with experiment. \begin{figure}[tb!] \captionsetup[subfigure]{justification=centering} \centering \begin{subfigure}{0.48\linewidth} \includegraphics[width=\linewidth]{plots/regularization/comparison-L2-1-0_5-1.png} \vspace{-1.8em} \caption{$a=1$, $\lambda=0.5$, $S=1$} \end{subfigure} \begin{subfigure}{0.48\linewidth} \includegraphics[width=\linewidth]{plots/regularization/comparison-L2-4-1-64.png} \vspace{-1.8em} \caption{$a=4$, $\lambda=1$, $S=64$} \end{subfigure} \vspace{-1em} \caption{Experiments with $L_2$ regularization with weight decay strength $\gamma$. } \label{fig:regularization} \end{figure} \subsection{The Role of Overparametrization}\label{sec: high dimension linear regression} In this section, we show how overparametrization and underparametrization might play a role in determining the minibatch noise. The simplest natural setting to study this is the high-dimensional linear regression task \citep{hastie2019surprises}. Here, we take $N,D\to\infty$ with the ratio $\alpha:=N/D$ held fixed. The loss function is \vspace{-1mm} \begin{equation}\label{eq: loss function high dimension} L(\mathbf{w})=\frac{1}{2N}\sum_{i=1}^N\left(\mathbf{w}^\mathrm{T}x_i-y_i\right)^2.\vspace{-1mm} \end{equation} Some degree of noise is also required in this setting. For simplicity, we assume the existence of label noise: $y_i = \mathbf{u}^{\rm T}x_i + \epsilon_i$, with $\text{Var}[\epsilon_i] =\sigma^2$. The other settings can also be dealt with in a similar manner, but the resulting expression will be much more complicated. Notice a key difference between this setting and the standard high-dimensional setting. In the standard setting, one uses the GD algorithm with vanishing learning rate $\lambda$ instead of the SGD algorithm; with a non-vanishing learning rate, the analysis becomes much more complicated. In this setting, we can obtain the following result on the noise covariance matrix. \begin{proposition}\label{prop: high D C} With fixed $S$, $\lambda$, and $\alpha$, running the minibatch SGD iteration on Eq.~\eqref{eq: loss function high dimension} induces a noise with covariance\vspace{0mm} \begin{equation} C=\begin{cases} \frac{1}{S}\left(\mathrm{Tr}[\hat{A}\Sigma]-\hat{A}\Sigma\right)\hat{A}+\frac{\sigma^2}{S}\left(1-\frac{1}{\alpha}\right)\hat{A} &\text{for }\alpha>1, \\ \frac{1}{S}\left(\mathrm{Tr}[\hat{A}\Sigma]-\hat{A}\Sigma\right)\hat{A} &\text{for }\alpha\leq 1, \vspace{0mm} \end{cases} \end{equation} where $\Sigma:=\mathbb{E}_{\mathbf{w}}\left[(\mathbf{w}-\mathbf{w}_*)(\mathbf{w}-\mathbf{w}_*)^{\rm T}\right]$ and $\hat{A}= \frac{1}{N}\sum_i^{N} x_i x^{\rm T}_i$. \end{proposition} \vspace{0mm} We note that this proposition can only be derived using the general formulation we present in the next section; this shows an important application of our general theory. An interesting observation is that one additional term proportional to $\sigma^2$ emerges in the underparametrized regime ($\alpha > 1$). However, for the overparametrized regime, the noise is completely dependent on $\Sigma$, which is a sign that the stationary solution has no fluctuation, i.e. $\Sigma=0$ according to the results in \cite{liu2020stochastic}. In fact, one can prove the following theorem. \begin{theorem}\label{thm: trace of high D} When a stationary solution exists for $\mathbf{w}$, we have \begin{equation} {\rm Tr}[\hat{A}\Sigma] = \begin{cases} \frac{\lambda\sigma^2}{S}\left(1-\frac{1}{\alpha}\right)\hat{\kappa}&\text{for }\alpha>1,\\ 0 &\text{for }\alpha\leq 1, \end{cases} \end{equation} where $\hat{\kappa}:=\frac{{\rm Tr}[\hat{G}^{-1}\hat{A}]}{1-\frac{\lambda}{S}{\rm Tr}[\hat{G}^{-1}\hat{A}]}$ with $\hat{G}:=2I_D-\lambda\left(1-\frac{1}{S}\right)\hat{A}$. \end{theorem} Note that the factor $\hat{\kappa}$ can be exactly obtained in principle by integrating over Eq.~\eqref{eq:MP}. Also, notice that the condition for a stationary solution to exist for $\mathbf{w}$ is, in fact, non-trivial and is given by the stability condition of the minibatch SGD algorithm; we present a detailed analysis in Appendix~\ref{sec:stability}; the key result is that $\lambda$ needs to be of order $1/D$ for the convergence. The above theorem implies that, in the overparametrized regime, there is no asymptotic fluctuation! This is because an overparametrized model can memorize all the data points and therefore minibatch noise does not play a role at convergence. Thus one needs to be very careful when interpreting and using SGD as an MCMC sampling algorithm in the overparametrized regime. To make SGD work as an MCMC algorithm here, some additional technique is needed; for example, data augmentation techniques might provide an additional source of noise for minibatch SGD to fluctuate. See Figure~\ref{fig:high dimension}. We perform an experiment with $D=1000$ held fixed, and by varying $N$. We set $\lambda=0.01$ and $S=32$. We see that the agreement between the theory and experiment is very good, even for this modest dimension number $D$. The vertical line shows where the overparametrization-to-underparametrization transition takes place. We see that, as expected, there is no fluctuation when $\alpha<1$, and the fluctuation gradually increases to a plateau value as $\alpha \to \infty$. On the other hand, the Hessian approximation gives a wrong picture, predicting fluctuation to rise when there is no fluctuation, and predicting a constant fluctuation just when the fluctuation starts to rise. To our knowledge, this is the first work that deals with the effect of minibatch noise in a high-dimensional ridgeless linear regression problem. \begin{figure} \centering \includegraphics[width=0.5\linewidth]{plots/high-dimensional2.png} \vspace{-1em} \caption{High-dimensional linear regression. We see that the predicted fluctuation coefficient agrees with the experiment well. The slight deviation is due to a finite training time and finite $N$ and $D$. On the other hand, a naive Hessian approximation results in a qualitatively wrong result.} \label{fig:high dimension} \end{figure} \section{General Formulation} \label{sec:general} So far, we have considered the linear regression problem. In this section, we discuss more generic situations. Let $f(\mathbf{w},x)$ denote the output of the model for a given input $x\in\mathbb{R}^D$. Here, we consider a more general case; $f(\mathbf{w},x)$ may be any differentiable function, e.g., a neural network. The number of parameters in the model is denoted by $P$, and hence $\mathbf{w}\in\mathbb{R}^P$. For a training dataset $\{x_i,y_i\}_{i=1,2,\dots,N}$, the loss function with a $L_2$ regularization is given by\vspace{-1mm} \begin{equation} L_\Gamma(\mathbf{w})=L_0(\mathbf{w})+\frac{1}{2}\mathbf{w}^\mathrm{T}\Gamma\mathbf{w},\vspace{-1mm} \end{equation} where $L_0(\mathbf{w})=\frac{1}{N}\sum_{i=1}^N\ell(f(\mathbf{w},x_i),y_i)$ is the loss function without regularization. We will use the following shorthand notations: $\ell_i:=\ell(f(\mathbf{w},x_i),y_i), \quad \ell_i':=\frac{\partial\ell_i}{\partial f}, \quad \ell_i'':=\frac{\partial^2\ell_i}{\partial f^2}.$ Hereafter, we assume the MSE loss $\ell_i=[f(\mathbf{w},x_i)-y_i]^2/2$; the analysis is straightforward to extend to other loss functions such as the cross-entropy loss. When $L_0(\mathbf{w})$ is small at $\mathbf{w}$, $\ell_i'$ is small for typical $i$, which implies that $\langle\ell'^2\rangle:=(1/N)\sum_{i=1}^N(\ell_i')^2$ is small. Near a minimum, therefore, we can derive (see Appendix~\ref{app: general hessian derivation}) without regularization: $H_0(\mathbf{w})\approx\frac{1}{N}\sum_{i=1}^N\nabla f(\mathbf{w},x_i)\nabla f(\mathbf{w},x_i)^\mathrm{T}, where $H_0 := \nabla\nabla L_0$. The Hessian with regularization is just given by $H_\Gamma(\mathbf{w})= H_0(\mathbf{w})+\Gamma$. On the other hand, the SGD noise covariance $C(\mathbf{w})$ is given by Eq.~(\ref{eq:noise_cov}). By performing an approximation to replace $(\ell_i')^2$ by its average over samples, i.e., $(\ell_i')^2\to\langle\ell'^2\rangle$, the SGD noise covariance is directly related to the Hessian: \begin{align} C(\mathbf{w})&\approx \frac{\langle\ell'^2\rangle}{SN}\sum_{i=1}^N\nabla f(\mathbf{w},x_i)\nabla f(\mathbf{w},x_i)^\mathrm{T} -\frac{1}{S}\nabla L_0(\mathbf{w})\nabla L_0(\mathbf{w})^\mathrm{T} \nonumber \\ &\approx\frac{2L_0(\mathbf{w})}{S}H_0(\mathbf{w})-\frac{1}{S}\nabla L_0(\mathbf{w})\nabla L_0(\mathbf{w})^\mathrm{T}. \label{eq:cov_Hessian}% \end{align} Near a minimum $\mathbf{w}^*$ of the full loss $L_\Gamma(\mathbf{w})$, we have \begin{equation} \nabla L_0(\mathbf{w})\approx H_0(\mathbf{w}^*)(\mathbf{w}-\mathbf{w}^*)-\Gamma\mathbf{w}^*, \label{eq:nabla_L0} \end{equation} within the approximation $L_\Gamma(\mathbf{w})\approx L_\Gamma(\mathbf{w}^*)+(1/2)(\mathbf{w}-\mathbf{w}^*)^\mathrm{T}H_\Gamma(\mathbf{w}^*)(\mathbf{w}-\mathbf{w}^*)^\mathrm{T}$. Equations~(\ref{eq:cov_Hessian}) and (\ref{eq:nabla_L0}) give the SGD noise covariance near a minimum of $L_\Gamma(\mathbf{w})$. Now it is worth discussing two different cases separately: (1) with regularization and (2) without regularization. We first discuss the case when regularization is present. In this case, the regularization $\Gamma$ is not small enough, and the SGD noise covariance is \emph{not} proportional to the Hessian. Near a local or global minimum $\mathbf{w}\approx \mathbf{w}^*$, the first term of the right-hand side of Eq.~(\ref{eq:nabla_L0}) is negligible, and hence we obtain\vspace{-1mm} \begin{equation} C(\mathbf{w})\approx\frac{2L_0(\mathbf{w}^*)}{S}H_0(\mathbf{w}^*)-\frac{1}{S}\Gamma\mathbf{w}^*\mathbf{w}^{*\mathrm{T}}\Gamma.\vspace{-1mm} \end{equation} The SGD noise does not vanish even at a global minimum of $L_\Gamma(\mathbf{w})$. Note that this also agrees with the exact result derived in Section~\ref{sec: regularization}: together with an anisotropic noise that is proportional to the Hessian, a rank-$1$ noise proportional to the strength of the regularization appears. This rank-1 noise is a signature of regularization. On the other hand, as we will see below, the SGD noise covariance is proportional to the Hessian near a minimum when there is no regularization, $\Gamma\approx 0$. We have \begin{align} C(\mathbf{w})\approx\frac{2L_0(\mathbf{w})}{S}H_0(\mathbf{w} -\frac{1}{S}H_0(\mathbf{w}^*)(\mathbf{w}-\mathbf{w}^*)(\mathbf{w}-\mathbf{w}^*)^\mathrm{T}H_0(\mathbf{w}^*).\vspace{-1mm} \label{eq:C_no_reg \end{align} For this case, we need to differentiate between a local minimum and a global minimum. When $L_0(\mathbf{w}^*)$ is not small enough (e.g. at a local but not global minimum), the last term in Eq.~(\ref{eq:C_no_reg}) is negligible, and hence\vspace{-1mm} \begin{equation} C(\mathbf{w})\approx\frac{2L_0(\mathbf{w})}{S}H_0(\mathbf{w}),\vspace{-1mm} \end{equation} which is proportional to the Hessian. On the other hand, when $L_0(\mathbf{w}^*)$ is vanishingly small (e.g. at a global minimum), we have $2L_0(\mathbf{w})\approx (\mathbf{w}-\mathbf{w}^*)^\mathrm{T}H_0(\mathbf{w}^*)(\mathbf{w}-\mathbf{w}^*)$, and thus obtain\vspace{-1mm} \begin{align} C(\mathbf{w})\approx\frac{1}{S}\Bigl[(\mathbf{w}-\mathbf{w}^*)^\mathrm{T}H_0(\mathbf{w}^*)(\mathbf{w}-\mathbf{w}^*)H_0(\mathbf{w}^*) -H_0(\mathbf{w}^*)(\mathbf{w}-\mathbf{w}^*)(\mathbf{w}-\mathbf{w}^*)^\mathrm{T}H_0(\mathbf{w}^*)\Bigr]. \label{eq:cov_global}\vspace{-1mm} \end{align} It should be noted that the second term on the right-hand side of Eq.~(\ref{eq:cov_global}) would typically be much smaller than the first term for large $D$. For example, when $H_0(\mathbf{w}^*)=aI_D$ with $a>0$, the first and the second terms are respectively given by $(a^2/S)\|\mathbf{w}-\mathbf{w}^*\|^2I_D$ and $-(a^2/S)(\mathbf{w}-\mathbf{w}^*)(\mathbf{w}-\mathbf{w}^*)^\mathrm{T}$. The Frobenius norm of the former is given by $(Da^2/S)\|\mathbf{w}-\mathbf{w}^*\|^2$, while that of the latter is given by $(a^2/S)\|\mathbf{w}-\mathbf{w}^*\|^2$, which indicates that in Eq.~(\ref{eq:cov_global}), the first term is dominant over the second term for large $D$. Therefore the second term of Eq.~(\ref{eq:cov_global}) can be dropped for large $D$, and Eq.~(\ref{eq:cov_global}) is simplified as\vspace{-1mm} \begin{equation} C(\mathbf{w})\approx\frac{(\mathbf{w}-\mathbf{w}^*)^\mathrm{T}H_0(\mathbf{w}^*)(\mathbf{w}-\mathbf{w}^*)}{S}H_0(\mathbf{w}^*). \label{eq:cov_global_simplified} \end{equation} Again, the SGD noise covariance is proportional to the Hessian. In conclusion, as long as the regularization is small enough, that the SGD noise covariance near a minimum is proportional to the Hessian is a good approximation. This implies that the noise is multiplicative, which is known to lead to a heavy tail distribution \citep{clauset2009power, levy1996power}. In fact, even for the simple settings that we studied in Section~\ref{sec:theory}, one can observe a clear power-law distribution of $\mathbf{w}$ in the tail; for a detailed discussion, see Appendix~\ref{app: phase diagram}. Thus, we have studied the nature of the minibatch SGD noise in three different situations. We summarize these results in Table~\ref{tab:summary general theory}. As an example, we have demonstrated the power of this general formulation by applying it to the high-dimensional linear regression problem in Section~\ref{sec: high dimension linear regression}. \begin{table}[tb!] \caption{Summary of the minibatch SGD noise in three situations. When regularization is applied, the noise is parameter independent and may be well approximated by a Gaussian distribution. When there is no regularization, the noise becomes dependent on the parameter $\mathbf{w}$.} \vspace{-0.8em} \label{tab:summary general theory} \centering \renewcommand\arraystretch{1.5} \begin{tabular}{c|c} \hline\hline & Noise covariance $C$ \\ \hline With regularization & $\frac{2L_0(\mathbf{w}^*)}{S}H_0(\mathbf{w}^*)-\frac{1}{S}\Gamma\mathbf{w}^*\mathbf{w}^{*\mathrm{T}}\Gamma$\\ No reg. local minimum & $\frac{2L_0(\mathbf{w})}{S}H_0(\mathbf{w})$\\ No reg. global minimum& $\frac{(\mathbf{w}-\mathbf{w}^*)^\mathrm{T}H_0(\mathbf{w}^*)(\mathbf{w}-\mathbf{w}^*)}{S}H_0(\mathbf{w}^*)$\\ \hline\hline \end{tabular} \end{table} \section{Discussion}\label{sec: discussion} In this work, we have tackled the minibatch SGD problem from a holistic approach. Previously, almost no analytical result had been available for minibatch SGD, and the present work fills this gap. Our result suggests that the minibatch noise needs to be analyzed differently in different situations. When the model is overparametrized, there is no asymptotic noise; on the other hand, when there is a mismatch between the model capacity and the data points, possibly due to regularization, data augmentation or inherent uncertainty in the dataset, the asymptotic noise will not vanish and has a strength and shape reflecting the type of noise that is present. There are a number of interesting implications of the present work, and it is our hope that this work will draw more attention to the study of the following problems. \textbf{Exploration and Exploitation of SGD.} Our general formulation suggests that the stationary distribution might be heavy-tail, corroborating the results in a series of previous works. The fact that SGD causes heavy-tail noise has different implications for the training of a network at initialization and at convergence. At initialization, a heavy-tail distribution encourages exploration without causing divergence, and thus should be desirable. At convergence, it has been shown that, if the stationary distribution is power-law like, then the convergence might be very slow \citep{roberts1996exponential}. \textbf{Escaping from Local Minimum.} Escaping from local minima is directly linked to the optimization efficiency and the generalization ability of the SGD algorithm \citep{Xie2020}. Our solution suggests that SGD may induce different kinds of fluctuations in different settings and this means that one might design special tricks such that the escape rate from a local minimum can be maximized. \textbf{Large Batch Scaling Rules.} Using a large learning rate may dramatically speed up training on a large dataset, often at the expense of generalization accuracy \citep{Hoffer2017}. One major trick proposed to reduce the performance drop is the batch-learning-rate scaling \citep{goyal2017accurate}, where one can double the learning rate to offset the negative effect of doubling the batch size. However, it is also known experimentally that this scaling breaks down at large $S$. Our solution suggests an answer: increasing the learning rate to offset large batch size stops working when a large learning rate causes the local minimum to become unstable. As a remedy, the theory suggests a different trick: by introducing some artificial noise in the label, one can scale up its variance linearly as one scales up the batch size, because the local stability of SGD is independent of the noise strength but dependent on $\lambda$. \clearpage \bibliographystyle{apalike} \input{arxiv_bib} \section{Introduction} \vspace{-1mm} Stochastic gradient descent (SGD) is a simple and efficient optimization algorithm behind the unprecedented success of deep learning, and attracts increasingly more attention in the field of machine learning \citep{allen2018convergence, xing2018_walk_sgd, Zhang_optimizationProperitesSGD,Wang2020,he2020recent, liu2020stochastic}. It is now well established that stochastic noise in SGD directly affects the performance of the SGD algorithm, both in terms of the training efficiency and generalization ability \citep{Hoffer2017}. At the same time, the SGD noise is not easy to understand, partially because of the lack of analytical results. Previous works are mostly limited to empirical studies. For examples, let $S$ denote the minibatch size; then the rule of thumb of rescaling the learning rate $\lambda$ by $1/S$ is now well-established empirically \citep{Hoffer2017}. Recently, it has also been shown that the noise in SGD takes a heavy-tail nature, with a measurable tail index, mimicking many types of noises in nature \cite{Simsekli2019tailindex}. However, the existence of a plethora of empirical results is in sharp contrast to the lack of theoretical and analytical results in the field. For the existing theoretical studies, dominantly many of the previous theoretical works take two approximations: (1) the continuous-time approximation, which take the infinitesimal step-size limit $\lambda\to 0$; (2) the Hessian approximation, which assumes that the covariance matrix of the SGD noise is approximated by the Hessian $H$. In this work, we remove these two approximations altogether, and focus on deriving analytical results on discrete-time SGD noise where the learning rate can be arbitrarily large and the noise covariance matrix is treated exactly. These results are then used for motivating a more general and accurate approximation to the minibatch SGD noise. In summary, \vspace{-3mm} \begin{itemize} \item we show that minibatch SGD does not always cause a noise; this implies that it is not always suitable to treat SGD as a Markov chain Monte Carlo (MCMC) algorithm for sampling a posterior parameter distribution;\vspace{-1mm} \item we derive the strength and the shape of the minibatch SGD noise in the cases where the noise for discrete-time SGD is analytically solvable \vspace{-1mm} \item we propose a general and more accurate approximation to the minibatch noise; we also apply our general formulation to study the effect of minibatch noise in the high-dimensional linear regression problem. \vspace{-0mm \vspace{-3mm} \end{itemize} The organization of the paper is as follows. In Section~\ref{sec: background}, we define minibatch SGD. In Section~\ref{sec: related works}, we discuss the related works. In Section~\ref{sec:theory}, we outline the theoretical results and verify them experimentally. In Section~\ref{sec:general}, we discuss the formulation to understand minibatch noise in a general setting. In the last section, we conclude this work and discuss possible future works. For reference, we summarize the analytical results for a special case in Table~\ref{tab:summary}. \begin{table*}[t!] {\footnotesize \centering \caption{\small Summary of the results of this work and comparison with previous results. For notational conciseness, we compare the case when all the relevant matrices commute. The model fluctuation $\Sigma$, the expected training loss $L_{\rm train}$ and the expected test loss $L_{\rm test}$ calculated by continuous- and discrete-time theories with Hessian approximation $C\approx H$ are presented. Exact solutions to these quantities obtained in the present work are shown in the rightmost column.}\vspace{-3mm} \label{tab:summary} \renewcommand\arraystretch{1.4} \begin{tabular}{c|c|c|c} \hline\hline & \multicolumn{2}{c|}{Hessian Approximation} & Exact Solution\\ \hline & Cts-time Approximation & D-time Solution & This Work \\ \hline & { $\Sigma$} & { $\Sigma$} & { $\Sigma$}\\ \hlin Label Noise & $\frac{\lambda}{2S}I_D$ & $\frac{\lambda}{S}(2I_D -\lambda A)^{-1}$ & $\frac{\lambda \sigma^2}{S}\left( 1 + \frac{\lambda \kappa}{S}\right) \left[2 I_D - \lambda \left(1 + \frac{1}{S}\right)A \right]^{-1}$ \\ Input Noise & $\frac{\lambda}{2S}I_D$ & $\frac{\lambda}{S}(2I_D-\lambda K)^{-1}$ & $\frac{\lambda {\rm Tr}[AK^{-1}BU]}{S}\left( 1 + \frac{\lambda \kappa'}{S}\right) \left[2 I_D - \lambda \left(1 + \frac{1}{S}\right)K \right]^{-1}$ \\ $L_2$ Regularization & $\frac{\lambda}{2S}I_D$ & $\frac{\lambda}{S}(2I_D-\lambda K)^{-1}$ & Eq.~\eqref{eq: regularization solution} \\ \hline\hline & { $L_{\rm train}$} & {$L_{\rm train}$} & {$L_{\rm train}$} \\ \hlin Label Noise & $\frac{\lambda}{4S}{\rm Tr}[A]+\frac{1}{2}\sigma^2$ & Eq.~\eqref{eq: label training discrete K approx} & $\frac{\sigma^2}{2}\left(1+\frac{\lambda \kappa}{S}\right)$ \\ Input Noise & $\frac{\lambda}{4S}{\rm Tr}[K]+\frac{1}{2}{\rm Tr}[AK^{-1}BU]$ & Eq.~\eqref{eq: input training discrete K approx} & $\frac{1}{2}{\rm Tr}[AK^{-1}BU]\left(1+\frac{\lambda }{S}\kappa'\right)$ \\ $L_2$ Regularization & $\frac{\lambda}{4S}{\rm Tr}[K]+\frac{1}{2}{\rm Tr}[AK^{-1}\Gamma U]$ & Eq.~\eqref{eq: Kapprox training} & Eq.~\eqref{eq: regularization training loss} \\ \hline\hline & { $L_{\rm test}$} & {$L_{\rm test}$} & {$L_{\rm test}$} \\ \hlin Label Noise & $\frac{\lambda}{4S}{\rm Tr}[A]$ & $\frac{\lambda}{2S}{\rm Tr}[A(2I_D-\lambda A)^{-1}]$ & $\frac{\lambda\sigma^2}{2S}\kappa$ \\ Input Noise & $\frac{\lambda}{4S}{\rm Tr}[A]+\frac{1}{2}{\rm Tr}[B'^{\rm T}AB'U]$ & Eq.~\eqref{eq: input test discrete K approx} & $\frac{\lambda}{2S}{\rm Tr}[AK^{-1}BU] \kappa'+\frac{1}{2}{\rm Tr}[B'^{\rm T}AB'U]$ \\ $L_2$ Regularization & $\frac{\lambda}{4S}{\rm Tr}[A]+\frac{1}{2}{\rm Tr}[AK^{-2}\Gamma^2 U]$ & Eq.~\eqref{eq: Kapprox test} & Eq.~\eqref{eq: regular test loss} \\ \hline\hline \end{tabular} } \vspace{-1em} \end{table*} \vspace{-3mm} \section{Background}\label{sec: background} \vspace{-1mm} In this section, we introduce the minibatch SGD algorithm, starting from its relationship with gradient descent (GD) and online learning. Let $\{x_i, y_i\}_{i=1}^{N}$ be a training set. We can define the GD algorithm for a differentiable loss function $L$ as follows: \vspace{-1mm} \begin{equation} \mathbf{w}_t = \mathbf{w}_{t-1} - \lambda \nabla_\mathbf{w}L(\mathbf{w},\{ \mathbf{x}, \mathbf{y}\}), \vspace{-1mm} \end{equation} where $\lambda$ is the learning rate and $\mathbf{w}\in\mathbb{R}^{D}$ is the weights of the model as a vector. There is no stochasticity in GD. For the minibatch technique to be applicable, we assume that the loss function takes an additive form. \begin{definition} A loss function $L(\{x_i, y_i\}_{i=1}^{N}, \mathbf{w})$ is said to be additive if \vspace{-2mm} \begin{equation} L(\{x_i, y_i\}_{i=1}^{N}, \mathbf{w}) = \frac{1}{N}\sum_{i=1}^N \ell(x_i, y_i, \mathbf{w})\vspace{-2mm} \end{equation} for some differentiable, non-negative function $\ell(\cdot)$. \end{definition} This definition is quite general. Most of the commonly studied and used loss functions are additive; for example, the mean-square error (MSE) for regression and the cross-entropy loss for classification are additive. If the loss function is additive, then the minibatch SGD can be defined as follows: \begin{definition}\label{def: with replacement} A minibatch SGD \textit{with replacement} computes the update to the parameter $\mathbf{w}$ with the following set of equations:\vspace{-1mm} \begin{equation}\label{eq: with replacement} \begin{cases} \hat{\mathbf{g}}_t= \frac{1}{S}\sum_{i\in B_t} \nabla \ell(x_i, y_i, \mathbf{w}_{t-1});\\ \mathbf{w}_t = \mathbf{w}_{t-1} - \lambda \hat{\mathbf{g}}_t, \end{cases}\vspace{-1mm} \end{equation} where $S := |B_t|$ is called the minibatch size, and the set $B_t=\{i_1,...i_S\}$ are $S$ i.i.d. random integers sampled uniformly from $[1,N]$. Note that $S$ can be larger than $N$ in this case. \end{definition} Let us define the without-replacement sampling. \begin{definition}\label{def: without replacement} A minibatch SGD \textit{without replacement} computes the update to the parameter $\mathbf{w}$ with the following set of equations: \vspace{-1mm} \begin{equation}\label{eq: without replacement} \begin{cases} \hat{\mathbf{g}}_t= \frac{1}{S}\sum_{i\in B_t} \nabla \ell(x_i, y_i, \mathbf{w}_{t-1});\\ \mathbf{w}_t = \mathbf{w}_{t-1} - \lambda \hat{\mathbf{g}}_t, \end{cases}\vspace{-2mm} \end{equation} where $S := |B_t|\leq N$ is the minibatch size, and the set $B_t$ is an element uniformly-randomly drawn from the set of all $S$-size subsets of $\{1,...,N\}$. \end{definition} \vspace{-1mm} When $N\to \infty$, the minibatch SGD algorithm is equivalent to online learning. For both algorithms, we decompose the gradient into a deterministic term and a stochastic term. Notice that, in both definitions, $\mathbb{E}_{\rm B}[\hat{\mathbf{g}}_t] = \nabla L $ is equal to the gradient for the GD algorithm. We use $\mathbb{E}_{\rm B}(\cdot)$ to denote the expectation over batches, and use $\mathbb{E}_{\mathbf{w}}(\cdot)$ to denote the expectation over the stable distribution of the model parameters. Therefore, we can write\vspace{-1mm} \begin{equation} \hat{\mathbf{g}}_t = \mathbb{E}_{\rm B}[\hat{\mathbf{g}}_t] + \eta_t,\vspace{-1mm} \end{equation} where $\eta_t:= \frac{1}{S}\sum_{i\in B_t} \nabla \ell(x_i, y_i, \mathbf{w}_{t-1}) - \mathbb{E}_{\rm B}[\hat{\mathbf{g}}_t]$ is the fluctuation term; of central importance to us is the noise covariance matrix defined as $C:= \text{cov}(\eta_t, \eta_t)$. When the loss function can be approximated by a quadratic form, one can apply the results in \cite{liu2020stochastic} to obtain the asymptotic fluctuation of the model parameters in discrete-time SGD through the matrix equation\vspace{-2mm} \begin{equation} \Sigma K + K\Sigma - \lambda K\Sigma K = \lambda C,\vspace{-2mm} \end{equation} where $K$ is the local Hessian of the loss function, and $\Sigma:= \lim_{t\to\infty} \text{cov}(\mathbf{w}_t, \mathbf{w}_t)$ is the asymptotic model fluctuation. Here $\Sigma$ gives the strength and the shape of the fluctuation of $\mathbf{w}$ around a local minimum and is yet another quantity of central importance to this work alongside $C$. \vspace{-3mm} \section{Related Works}\label{sec: related works} \vspace{-1mm} Minibatch noise is a major type of noise involved in the learning of modern neural networks. Practically, it is unavoidable because the memory of a modern computer is limited while the size of the datasets we use is large; this demands the dataset to be split into ``minibatches" for training. At the same time, using minibatch is also a recommended practice because using a smaller batch-size often leads to better generalization ability \citep{Hoffer2017}. Therefore, understanding minibatch noise has been one of the major topics in the theory of deep learning. \textbf{Hessian Approximation.} Theoretical analysis of SGD was first made for the stochastic gradient Langevin dynamics (SGLD) algorithm, which assumes that the covariance matrix of the noise is a full-rank isotropic Gaussian \cite{Welling2011,Ge2015,neelakantan2015adding,pmlr-v65-raginsky17a}. However, it is now known that the SGD noise is neither isotropic nor Gaussian \citep{pmlr-v97-zhu19e}. While the importance of the structure of the noise was realized several years ago \cite{Hoffer2017,jastrzebski2018three,pmlr-v97-zhu19e,haochen2020shape}, a standard but crude approximation of the minibatch noise which assumes $C\approx H$ has often been adopted to understand SGD. As one of the earliest theoretical work that proposed this approximation, \cite{Hoffer2017} argued that generalization performance with a large batch size can be good if training is long enough. \cite{jastrzebski2018three} combined this approximation with the continuous-time approximation to argue that the dynamics is the same for the same value of the ratio $\lambda/S$ and that a larger ratio results in better generalization. Such a scaling rule among the learning rate, the batch size and the momentum hyperparameter was proposed by \cite{smith2017bayesian} under the same set of assumptions as well. Later, \cite{pmlr-v97-zhu19e} showed that a significant enhancement for the escape rate from a sharp minimum is brought about by the anisotropy of the noise covariance. However, although it is widely used, this Hessian approximation remains crude and may deviate far from the truth as shown in experiments \cite{liu2020stochastic}. \textbf{Overparametrization and High-Dimensional Linear Regression}. One mystery in deep learning is that modern neural networks are often overparametrized \cite{neyshabur2018the}, meaning that they often have more parameters than the number of data points; yet the overparametrized networks do not tend to overfit, and the performance even seem to improve with a higher number of parameters \cite{Zhang_rethink}. A minimal model of the generalization ability of overparametrized neural networks is the high-dimensional linear regression problem \cite{hastie2019surprises,deng2019model,ADVANI2020428}, where an interesting phenomenon called ``double descent" can be studied analytically. In this work, we also take the high-dimensional linear regression as a minimal model of an overparametrized neural network and study the effect of minibatch noise on it. \textbf{Heavy-Tail SGD.} For a long time, the gradient noise in SGD has been assumed to be Gaussian \cite{Ahn2012,chen2014stochastic,Mandt2017} by invoking the central limit theorem. More recently, further steps towards a better understanding of SGD noise have been taken. It has been noticed that the model parameter dependence of the SGD noise results in a heavy tail stationary distribution of the model parameter \cite{Simsekli2019tailindex,nguyen2019exit,Panigrahi2019,wu2020noisy,hodgkinson2020multiplicative,meng2020dynamic}. The general formulation of this work suggests that the stationary distribution of model parameters might be heavy-tail, which we confirm with experiments in Appendix~\ref{app: phase diagram} \vspace{-3mm} \section{What Causes Minibatch Noise?} \label{sec:theory} \vspace{-1mm} In order to understand minibatch noise, we need to first answer the question: what may actually cause minibatch noise? A naive answer is that minibatch noise will arise whenever minibatch sampling is employed. However, this is indeed not the case. The behavior of SGD may still be deterministic even when minibatch sampling is used to train the model. This section, therefore, is devoted to understanding the condition for minibatch noise to arise and to disappear. \vspace{-2mm} \subsection{General Setting} \vspace{-1mm} When $N\gg S$, the following proposition gives the exact noise covariance due to minibatch sampling. For general $N$ and $S$, the noise covariance is calculated in Appendix~\ref{app: der of C}. \begin{proposition}\label{prop: noise_cov}The covariance matrix of noise in SGD due to minibatch sampling as defined in Definitions~\ref{def: with replacement} and \ref{def: without replacement} with $N\gg S$ is\vspace{-2mm} \begin{equation}\label{eq:noise_cov} C(\mathbf{w})=\frac{1}{SN}\sum_{i=1}^{N}\nabla \ell_i \nabla \ell_i^{\rm T}-\frac{1}{S}\nabla L(\mathbf{w})\nabla L(\mathbf{w})^{\rm T},\vspace{-2mm} \end{equation} where the simplified notations $\ell_i(\mathbf{w}):= l(x_i, y_i, \mathbf{w})$ and $L(\mathbf{w}):=L(\{x_i, y_i\}_{i=1}^{N}, \mathbf{w})$ are used. \end{proposition}\vspace{-1mm} This gradient covariance matrix $C$ is crucial to understand the minibatch noise. Let $H(\mathbf{w})$ denote the Hessian matrix of $L(\mathbf{w})$. The standard literature often uses the Hessian approximation $C(\mathbf{w})\approx H(\mathbf{w})$ to study the properties of minibatch noise; however, the following proposition shows that this approximation can easily break down and does not hold in some cases. \begin{proposition}\label{prop: no noise condition} Let $\mathbf{w}_*$ be the solution such that $L(\mathbf{w}_*)=0$. Then $C(\mathbf{w}_*)=0$.\vspace{-1mm} \end{proposition} \textit{Proof}. Because $\ell_i$ is non-negative for all $i$, $L(\mathbf{w}_*)=0$ implies that $\ell_i(\mathbf{w}_*)=0$. The differentiability in turn implies that each $\nabla\ell_i(\mathbf{w}_*)=0$; therefore, $C=0$. $\square$ This proposition implies that, if our model is expressive enough to memorize all the data points, then at the global minimum, there is no noise, i.e., an overparametrized model has no fluctuation at asymptotic time. Also note that this proposition shows that the commonly used Hessian approximation $C\sim H$ is wrong; since the Hessian matrix is unlikely to vanish in any local minimum, whereas the noise covariance matrix indeed vanishes. However, this does not mean that the only type of model that experiences fluctuation are the ones that are underparametrized. In fact, quite surprisingly, we will show that, when a regularization term exists in the training, all models will exhibit fluctuations at convergence. We now show that there are at least four causes for fluctuations to arise: the existence of label noise, input noise, regularization, and underparametrization. We study the strength and shape of the noise and fluctuation of these cases in the setting of linear regression. \vspace{-3mm} \subsection{Random Noise in the Label}\label{sec: label noise} \vspace{-1mm} For linear regression, the loss function takes the form\vspace{-2mm} \begin{equation} L(\mathbf{w}) = \frac{1}{2N}\sum_{i=1}^N(\mathbf{w}^{\rm T} x_i - y_i)^2, \label{eq: loss fucntion label}\vspace{-2mm} \end{equation} where $x_i\in \mathbb{R}^D$ are drawn from a zero-mean Gaussian distribution with covariance matrix $A:= \mathbb{E}_{\rm B}[xx^{\rm T}]$, and $y_i=\mathbf{u}^{\rm{T}}x_i + \epsilon_i$, for some fixed $\mathbf{u}$ and $\epsilon_i \in \mathbb{R}$ is drawn from a distribution with zero mean and finite second momentum $\sigma^2$. We deal with the case where $N \to \infty$ with $D$ held fixed. We start with redefining $\mathbf{w} -\mathbf{u} \to \mathbf{w} $, which is a standard trick to simplify notation. For such a problem setting, the covariance matrix for the SGD noise is calculated in the following proposition. \begin{proposition}\label{prop: label noise covariance}$($Covariance matrix for SGD noise in the label$)$ Let the algorithm be updated according to Eq.~\eqref{eq: with replacement} or \eqref{eq: without replacement} with random noise in the label while $N\to \infty$ with fixing $D$. Then the expected SGD noise covariance is\vspace{-1mm} \begin{equation} C = \frac{1}{S}(A\Sigma A + {\rm Tr}[A\Sigma]A+ \sigma^2 A),\vspace{-1mm}\label{eq: label noise covariance} \end{equation} where $\Sigma:=\mathbb{E}_\mathbf{w}[\mathbf{w}\mathbf{w}^{\rm T}]$ is the stationary covariance matrix of the model parameters. \end{proposition} By combining Proposition~\ref{prop: label noise covariance} with the result in \cite{liu2020stochastic}, $\Sigma$ can be obtained explicitly. \begin{theorem}\label{thm: Sigma label}$($Fluctuation of model parameters with random noise in the label$)$ Let $C$ be given by Proposition~\ref{prop: label noise covariance}. Then\vspace{-1mm} \begin{equation}\label{eq: solution} \Sigma = \frac{\lambda \sigma^2}{S}\left( 1 + \frac{\lambda \kappa}{S}\right) G^{-1},\vspace{-1mm} \end{equation} where $\kappa:=\frac{ {\rm Tr}[AG^{-1}]}{1 - \frac{\lambda}{S}{\rm Tr} [AG^{-1}]}$ with $G:=2I_D - \lambda\left(1 + \frac{1}{S} \right)A$. \end{theorem} \begin{remark} For SGD with momentum, according to \cite{liu2020stochastic}, the solution has a similar form if $G$ is replaced by $G_M:=2(1-\mu)I_D-\lambda\left(\frac{1-\mu}{1+\mu}+\frac{1}{S}\right)A$, where $\mu\in[0,1)$ is the momentum hyperparameter.\vspace{-2mm} \end{remark} If $\sigma^2=0$, then $\Sigma=0$. This means that when zero training loss is achievable, the final model parameter has no variance, which corroborates the result in Proposition~\ref{prop: no noise condition}. It is worth discussing a limiting case. When $\lambda \ll 1$ and $1 \ll S$, we have\vspace{0mm} \begin{equation}\label{eq: cts time approximation} \Sigma \approx \frac{\lambda\sigma^2}{2 S} I_D,\vspace{-0mm} \end{equation} which is the result one would expect from the continuous-time theory with the Hessian approximation \citep{liu2020stochastic}. The above theorem is exact for discrete-time SGD, and it is worth comparing the exact result with Eq.~\eqref{eq: cts time approximation} to see the effect of a large learning rate and minibatch sampling on the parameter fluctuation. One immediately notices two differences: (1) an anisotropic enhancement, appearing in the matrix $G$ and taking the form $-\lambda(1+1/S)A$; compared with the result in \citep{liu2020stochastic}, this term is mainly due to the effect of using a large learning rate in the discrete-time SGD, but slightly enlarged by the factor $1/S$; (2) an isotropic enhancement term $\kappa$, which causes an overall magnitude of fluctuations to increase; this term does not appear in the previous works that are based on the Hessian approximation, and this term is due to the minibatch sampling process alone. Therefore, we see that the minibatch sampling process causes two different kinds of enhancement to the fluctuation, potentially increasing the exploration power of SGD at initialization but reduces the convergence speed at convergence. From Theorem~\ref{thm: Sigma label}, one can also calculate the approximation error and the test loss; since they are irrelevant to the main message, we derive and discuss these results in Appendix~\ref{app: errors label}. Note that Theorem~\ref{thm: Sigma label} also implies a necessary condition for convergent parameter covariance. \begin{corollary}\label{cor: label convergence} If $\Sigma$ is positive and finite, then $\lambda a^* < \frac{2S}{2+S}$, where $a^*$ is the largest eigenvalue of $A$. \end{corollary} \vspace{-2mm} This corollary suggests that the stability of SGD is crucially dependent on the batch size. When the batch size is too small, one also needs to scale down the learning rate to prevent the instability of optimization. As $S\to \infty$, the condition for stability converges to $2$, which is the stability condition for discrete-time SGD \citep{liu2020stochastic}, that is, discreteness of time step is the major factor affecting the stability at a large batch size. We now verify the theory with experiment. In Figures~\ref{fig:label noise}(a)-(b). we run a 1d experiment with $N=10000$ and $\sigma^2 = 0.25$. Comparing the predicted $\Sigma$, we see that the proposed theory agrees with the experiment across all ranges of $S$ and $\lambda$. The continuous theory with the Hessian approximation fails almost everywhere, while the recently proposed discrete theory with the Hessian approximation underestimates the fluctuation when $S$ is small or $\lambda$ is large. We also make a comparison for higher dimensions. See Figures~\ref{fig:label noise}(c)-(d), where we plot the distribution of the parameter after training. We choose $D=2$ for visualization. We see that the continuous Hessian approximation fails badly for both large batch size and small batch size. When the batch size is large, both the discrete Hessian approximation and our solution give a very accurate estimate of the shape and the spread of the distribution. This suggests that, when the batch size is large, the discreteness is the determining factor of the fluctuation. When the batch size is small, the discrete Hessian approximation severely underestimates the strength of the noise. This reflects the fact that the isotropic noise enhancement is dominant at a small batch size. \begin{figure}[tb] \captionsetup[subfigure]{justification=centering} \centering \begin{subfigure}{0.49\columnwidth} \includegraphics[width=\linewidth]{plots/label_noise/comparison_label_noise_S.png} \vspace{-2em} \caption{$a=1.5$, $\lambda=1$} \end{subfigure} \begin{subfigure}{0.49\columnwidth} \includegraphics[width=\linewidth]{plots/label_noise/comparison_label_noise_lambda.png} \vspace{-2em} \caption{$a=1$, $S=10$} \end{subfigure} \begin{subfigure}{0.49\columnwidth} \includegraphics[width=\linewidth]{plots/label_noise/2d-S-100.png} \vspace{-2em} \caption{$\lambda=1.6$, $S=100$,\\ $a_1=1,\ a_2=0.5$} \end{subfigure} \begin{subfigure}{0.49\columnwidth} \includegraphics[width=\linewidth]{plots/label_noise/2d-S-10.png} \vspace{-2em} \caption{$\lambda=1.6$, $S=10$,\\ $a_1=1,\ a_2=0.5$} \end{subfigure} \vspace{-1em} \caption{Experiments with label noise. (a)-(b) $1$d experiments. (c)-(d) $2$d experiments.} \label{fig:label noise} \vspace{-1em} \end{figure} \vspace{-3mm} \subsection{Random Noise in the Input}\label{sec: input noise} \vspace{-1mm} Similar to label noise, noise in the input data can also cause fluctuation. We assume that the training data points $\tilde{x}_i = x_i + \eta_i$ can be decomposed into a signal part and a random part. As before, we assume Gaussian distributions, $x_i \sim \mathcal{N}(0, A)$ and $\eta_i \sim \mathcal{N}(0, B)$. The problem remains analytically solvable if we replace the Gaussian assumption by the weaker assumption that the fourth-order moment exists and takes some matrix form. For conciseness, we assume that there is no noise in the label, namely $y_i=\mathbf{u}^{\rm T}x_i$ with a constant vector $\mathbf{u}$. One important quantity in this case will be $\mathbf{u} \mathbf{u}^{\rm T} := U$. Notice that the trick $\mathbf{w} - \mathbf{u} = \mathbf{w}$ no more works, and so we write the difference explicitly here. The loss function then takes the form \vspace{-2mm} \begin{align}\label{eq: loss input} L(\mathbf{w})&=\frac{1}{2N}\sum_{i=1}^{N}\left[(\mathbf{w}-\mathbf{u})^{\rm T}x_i + \mathbf{w}^{\rm T}\eta_i\right]^2\nonumber\\ &=\frac{1}{2}(\mathbf{w}-\mathbf{u})^{\rm T}A(\mathbf{w}-\mathbf{u})+\frac{1}{2}\mathbf{w}^{\rm T}B\mathbf{w}.\vspace{-1mm} \end{align} The gradient $\nabla L=(A+B)(\mathbf{w}-\mathbf{u})+B\mathbf{u}$ vanishes at $\mathbf{w}_*:=(A+B)^{-1}A\mathbf{u}$, which is the minimum of the loss function and the expectation of the parameter at convergence. It can be seen that, even at the minimum $\mathbf{w}_*$, the loss function remains finite unless $\mathbf{u}=0$, which reflects the fact that in the presence of input noise, the network is not expressive enough to memorize all the information of the data. The SGD noise covariance for this type of noise is calculated in the following proposition. \begin{proposition}\label{prop: noise input}$($Covariance matrix for SGD noise in the input$)$ Let the algorithm be updated according to Eq.~\eqref{eq: with replacement} or \eqref{eq: without replacement} with random noise in the input while the limit $N\to \infty$ is taken with $D$ held fixed. Then the noise covariance is\vspace{-1mm} \begin{equation} C=\frac{1}{S} \left\{ K\Sigma K+ {\rm Tr}[K\Sigma]K + {\rm Tr}[AK^{-1}BU]K \right \},\label{eq: C of input}\vspace{-1mm} \end{equation} where $K:=A+B$, and $\Sigma:=\mathbb{E}_{\mathbf{w}}\left[(\mathbf{w}-\mathbf{w}_*)(\mathbf{w}-\mathbf{w}_*)^{\rm T}\right]$. \end{proposition} \begin{remark} It can be seen that the form of the covariance \eqref{eq: C of input} of input noise is similar to that of label noise \eqref{eq: label noise covariance} with replacing $A$ by $K$ and $\sigma^2$ by ${\rm Tr}[AK^{-1}BU]$, suggesting that these two types of noise share a similar nature. \end{remark} Defining the test loss as $L_{\rm test}:=\frac{1}{2}\mathbb{E}_{\mathbf{w}} \mathbb{E}_{\rm B} \left[(\mathbf{w}^{\rm T}x-\mathbf{u}^{\rm T}x)^2\right]$, Proposition~\ref{prop: noise input} can then be used to calculate the test loss and the model fluctuation. \begin{theorem}\label{thm: errors of input}$($Test loss and model fluctuation for noise in the input$)$ For SGD with noise in the input given in Proposition~\eqref{prop: noise input}, the test loss is\vspace{-1mm} \begin{equation} L_{\rm test}=\frac{\lambda}{2S}{\rm Tr}[AK^{-1}BU] \kappa'+\frac{1}{2}{\rm Tr}[B'^{\rm T}AB'U],\vspace{-1mm} \label{eq: test loss of input} \end{equation} where $\kappa':=\frac{ {\rm Tr}[KG'^{-1}]}{1 - \lambda \frac{1}{S}{\rm Tr} [KG'^{-1}]}$ with $G':=2I_D - \lambda\left(1 + \frac{1}{S} \right)K$, and $B':=K^{-1}B$. Moreover, if $[K,U]=0$, then the covariance matrix of model parameters is\vspace{-1mm} \begin{equation \Sigma=\frac{\lambda {\rm Tr}[AK^{-1}BU]}{S}\left( 1 + \frac{\lambda \kappa'}{S}\right) \left[2 I_D - \lambda \left(1 + \frac{1}{S}\right)K \right]^{-1}.\vspace{-2mm}\nonumber \end{equation} \end{theorem} \begin{remark} Note that $[K,U]=0$ is necessary only for an analytical expression of $\Sigma$. It can be obtained by solving Eq.~\eqref{eq: matrix eq of input} even without invoking $[K,U]=0$. \end{remark} \vspace{-3mm} \subsection{Learning with Regularization}\label{sec: regularization} \vspace{-1mm} In this section, we show that regularization also causes minibatch noise. Specifically, we consider a generalized form of $L_2$ regularization. The loss function for $\Gamma-L_2$ regularized linear regression is\vspace{-1mm} \begin{align} L_\Gamma(\mathbf{w}) &=\frac{1}{2N}\sum_{i=1}^{N}\left[(\mathbf{w}-\mathbf{u})^{\rm T}x_i\right]^2 + \frac{1}{2} \mathbf{w}^{\rm T} \Gamma \mathbf{w} \nonumber\\ &=\frac{1}{2}(\mathbf{w}-\mathbf{u})^{\rm T}A(\mathbf{w}-\mathbf{u})+ \frac{1}{2} \mathbf{w}^{\rm T} \Gamma \mathbf{w},\label{eq: loss function regular} \end{align} where $\Gamma$ is a symmetric matrix; conventionally, we take $\Gamma=\gamma I_D$ with a scalar $\gamma>0$. The noise covariance for this form of regularization can be calculated but takes a rather complicated form. \begin{proposition}\label{prop: C of regular}$($Noise covariance matrix for learning with L$_2$ regularization$)$ Let the algorithm be updated according to Eq.~\eqref{eq: with replacement} or \eqref{eq: without replacement} with L$_2$ regularization while $N\to \infty$ with fixing $D$ and $[A,\Gamma]=0$. Then the noise covariance is\vspace{-1mm} \begin{equation} C=\frac{1}{S}\left(A\Sigma A+{\rm Tr}[A\Sigma]A+{\rm Tr}[\Gamma'^{\rm T} A\Gamma' U]A + \Gamma A' U A' \Gamma\right),\nonumber\vspace{-1mm} \end{equation} where $A':=K^{-1}A$, $\Gamma':=K^{-1}\Gamma$ with $K:=A+\Gamma$, and $\Sigma:=\mathbb{E}_{\mathbf{w}}\left[(\mathbf{w}-\mathbf{w}_*)(\mathbf{w}-\mathbf{w}_*)^{\rm T}\right]$. \end{proposition} Notice that the last term $\Gamma A' U A' \Gamma$ in $C$ is unique to the regularization -based noise: it is rank-1 because $U$ is rank-1. This term is due to the misbatch between the regularization and the minimum of the original loss. Similar to the previous subsection, the test loss and the fluctuation are provided by the following theorem. \begin{theorem}\label{thm: errors of regular}$($Test loss and model fluctuation for learning with L$_2$ regularization$)$ For noise induced by L$_2$ regularization given in Propostion~\ref{prop: C of regular}, let $[A,\Gamma]=0$. Then \vspace{-6mm} {\small \begin{equation} L_{\rm test}=\frac{\lambda}{2S}\left({\rm Tr}[AK^{-2}\Gamma^2 U ]\kappa+r\right)+\frac{1}{2}{\rm Tr}[AK^{-2}\Gamma^2U],\label{eq: regular test loss}\vspace{-1mm}% \end{equation}}% where $\kappa:=\frac{{\rm Tr}[A^2 K^{-1}G^{-1}]}{1-\frac{\lambda}{S}{\rm Tr}[A^2 K^{-1}G^{-1}]}$, $r:=\frac{{\rm Tr}[A^3 K^{-3} \Gamma^2 G^{-1}U]}{1-\frac{\lambda}{S}{\rm Tr}[A^2 K^{-1} G^{-1}]}$, with $G:=2I_D-\lambda\left(K+\frac{1}{S}K^{-1}A^2\right)$. Moreover, if $A$, $\Gamma$ and $U$ commute with each other, then the model fluctuation is\vspace{-1mm} \begin{align} \Sigma=&\frac{\lambda}{S}{\rm Tr}[AK^{-2}\Gamma^2U]\left(1+\frac{\lambda \kappa}{S}\right)AK^{-1}G^{-1}\nonumber\\ &+\frac{\lambda}{S}\left(A^2 K^{-2}\Gamma^2 U+\frac{\lambda r}{S}A \right)K^{-1}G^{-1}.\label{eq: regularization solution} \end{align} \end{theorem} The approximation error is derived in Appendix~\ref{app: der of errors of regular}. The test loss \eqref{eq: regular test loss} leads to a rather surprising result. By minimizing it, one can show that there exist situations where the optimal $\Gamma$ is negative. For a 1d case, the condition for negative optimal $\gamma$ is given in the following corollary. \begin{corollary}\label{cor: negative gamma} There exist $a$, $\lambda$ and $S$ such that $\gamma<0$. The optimal $\gamma$ is negative if and only if\vspace{-2mm} \begin{equation} \frac{2}{1+\frac{2}{S}}<a\lambda<\sqrt{\frac{S}{2}},{\textup{ and}}\ S\ne 2.\vspace{-2mm} \label{eq: condition for minus gamma} \end{equation} \end{corollary} \vspace{-2mm} This result is surprising from a Bayesian perspective. In the Bayesian formalism, weight decay $\Gamma$ is usually understood as a prior distribution which the parameters are expected to obey. However, this result suggests that it is sometimes better to assume a divergent distribution! This means that some revisions might be needed when we interpret weight decay in the Bayesian sense. We plot in Figure~\ref{fig:regularization} the test loss \eqref{eq: regular test loss} for a 1d example to see the optimal $\gamma$ while varying either $S$ or $\lambda$. The orange vertical lines show the place where the theory predicts a divergence in the test loss. Figure~\ref{fig:regularization}.a is a standard case, where the optimal $\gamma$ is close to $0$; Figure~\ref{fig:regularization}.b shows a case where the optimal $\gamma$ is negative. Also, we note that the proposed theory agrees better with experiment. \begin{figure}[tb!] \captionsetup[subfigure]{justification=centering} \centering \begin{subfigure}{0.48\linewidth} \includegraphics[width=\linewidth]{plots/regularization/comparison-L2-1-0_5-1.png} \vspace{-1.8em} \caption{$a=1$, $\lambda=0.5$, $S=1$} \end{subfigure} \begin{subfigure}{0.48\linewidth} \includegraphics[width=\linewidth]{plots/regularization/comparison-L2-4-1-64.png} \vspace{-1.8em} \caption{$a=4$, $\lambda=1$, $S=64$} \end{subfigure} \vspace{-1em} \caption{Experiments with $L_2$ regularization with weight decay strength $\gamma$. } \vspace{-1.5em} \label{fig:regularization} \end{figure} \vspace{-2mm} \subsection{The Role of Overparametrization}\label{sec: high dimension linear regression} \vspace{-1mm} In this section, we show how overparametrization and underparametrization might play a role in determining the minibatch noise. The simplest natural setting to study this is the high-dimensional linear regression task \cite{hastie2019surprises}. Here, we take $N,D\to\infty$ with the ratio $\alpha:=N/D$ held fixed. The loss function is \vspace{-1mm} \begin{equation}\label{eq: loss function high dimension} L(\mathbf{w})=\frac{1}{2N}\sum_{i=1}^N\left(\mathbf{w}^\mathrm{T}x_i-y_i\right)^2.\vspace{-1mm} \end{equation} Some degree of noise is also required in this setting. For simplicity, we assume the existence of label noise: $y_i = \mathbf{u}^{\rm T}x_i + \epsilon_i$, with $\text{Var}[\epsilon_i] =\sigma^2$. The other settings can also be dealt with in a similar manner, but the resulting expression will be much more complicated. Notice a key difference between this setting and the standard high-dimensional setting. In the standard setting, one uses the GD algorithm with vanishing learning rate $\lambda$ instead of the SGD algorithm; with a non-vanishing learning rate, the analysis becomes much more complicated. In this setting, we can obtain the following result on the noise covariance matrix. \begin{proposition}\label{prop: high D C} With fixed $S$, $\lambda$, and $\alpha$, running the minibatch SGD iteration on Eq.~\eqref{eq: loss function high dimension} induces a noise with covariance\vspace{-1mm} \begin{equation} C=\begin{cases} \frac{1}{S}\left(\mathrm{Tr}[\hat{A}\Sigma]-\hat{A}\Sigma\right)\hat{A}+\frac{\sigma^2}{S}\left(1-\frac{1}{\alpha}\right)\hat{A} &\text{for }\alpha>1, \\ \frac{1}{S}\left(\mathrm{Tr}[\hat{A}\Sigma]-\hat{A}\Sigma\right)\hat{A} &\text{for }\alpha\leq 1, \vspace{-1mm}\nonumber \end{cases} \end{equation} where $\Sigma:=\mathbb{E}_{\mathbf{w}}\left[(\mathbf{w}-\mathbf{w}_*)(\mathbf{w}-\mathbf{w}_*)^{\rm T}\right]$ and $\hat{A}= \frac{1}{N}\sum_i^{N} x_i x^{\rm T}_i$. \end{proposition} \vspace{-2mm} We note that this proposition can only be derived using the general formulation we present in the next section; this shows an important application of our general theory. An interesting observation is that one additional term proportional to $\sigma^2$ emerges in the underparametrized regime ($\alpha > 1$). However, for the overparametrized regime, the noise is completely dependent on $\Sigma$, which is a sign that the stationary solution has no fluctuation, i.e. $\Sigma=0$ according to the results in \cite{liu2020stochastic}. In fact, one can prove the following theorem. \begin{theorem}\label{thm: trace of high D} When a stationary solution exists for $\mathbf{w}$, we have \begin{equation} {\rm Tr}[\hat{A}\Sigma] = \begin{cases} \frac{\lambda\sigma^2}{S}\left(1-\frac{1}{\alpha}\right)\hat{\kappa}&\text{for }\alpha>1,\\ 0 &\text{for }\alpha\leq 1, \end{cases} \end{equation} where $\hat{\kappa}:=\frac{{\rm Tr}[\hat{G}^{-1}\hat{A}]}{1-\frac{\lambda}{S}{\rm Tr}[\hat{G}^{-1}\hat{A}]}$ with $\hat{G}:=2I_D-\lambda\left(1-\frac{1}{S}\right)\hat{A}$. \end{theorem} Note that the factor $\hat{\kappa}$ can be exactly obtained in principle by integrating over Eq.~\eqref{eq:MP}. Also, notice that the condition for a stationary solution to exist for $\mathbf{w}$ is, in fact, non-trivial and is given by the stability condition of the minibatch SGD algorithm; we present a detailed analysis in Appendix~\ref{sec:stability}; the key result is that $\lambda$ needs to be of order $1/D$ for the convergence. The above theorem implies that, in the overparametrized regime, there is no asymptotic fluctuation! This is because an overparametrized model can memorize all the data points and therefore minibatch noise does not play a role at convergence. Thus one needs to be very careful when interpreting and using SGD as an MCMC sampling algorithm in the overparametrized regime. To make SGD work as an MCMC algorithm here, some additional technique is needed; for example, data augmentation techniques might provide an additional source of noise for minibatch SGD to fluctuate. See Figure~\ref{fig:high dimension}. We perform an experiment with $D=1000$ held fixed, and by varying $N$. We set $\lambda=0.01$ and $S=32$. We see that the agreement between the theory and experiment is very good, even for this modest dimension number $D$. The vertical line shows where the overparametrization-to-underparametrization transition takes place. We see that, as expected, there is no fluctuation when $\alpha<1$, and the fluctuation gradually increases to a plateau value as $\alpha \to \infty$. On the other hand, the Hessian approximation gives a wrong picture, predicting fluctuation to rise when there is no fluctuation, and predicting a constant fluctuation just when the fluctuation starts to rise. To our knowledge, this is the first work that deals with the effect of minibatch noise in a high-dimensional ridgeless linear regression problem. \begin{figure} \centering \includegraphics[width=0.68\linewidth]{plots/high-dimensional2.png} \vspace{-1em} \caption{High-dimensional linear regression. We see that the predicted fluctuation coefficient agrees with the experiment well. The slight deviation is due to a finite training time and finite $N$ and $D$. On the other hand, a naive Hessian approximation results in a qualitatively wrong result.} \label{fig:high dimension} \vspace{-1em} \end{figure} \vspace{-2mm} \section{General Formulation} \label{sec:general} \vspace{-1mm} So far, we have considered the linear regression problem. In this section, we discuss more generic situations. Let $f(\mathbf{w},x)$ denote the output of the model for a given input $x\in\mathbb{R}^D$. Here, we consider a more general case; $f(\mathbf{w},x)$ may be any differentiable function, e.g., a neural network. The number of parameters in the model is denoted by $P$, and hence $\mathbf{w}\in\mathbb{R}^P$. For a training dataset $\{x_i,y_i\}_{i=1,2,\dots,N}$, the loss function with a $L_2$ regularization is given by\vspace{-1mm} \begin{equation} L_\Gamma(\mathbf{w})=L_0(\mathbf{w})+\frac{1}{2}\mathbf{w}^\mathrm{T}\Gamma\mathbf{w},\vspace{-1mm} \end{equation} where $L_0(\mathbf{w})=\frac{1}{N}\sum_{i=1}^N\ell(f(\mathbf{w},x_i),y_i)$ is the loss function without regularization. We will use the following shorthand notations: $\ell_i:=\ell(f(\mathbf{w},x_i),y_i), \quad \ell_i':=\frac{\partial\ell_i}{\partial f}, \quad \ell_i'':=\frac{\partial^2\ell_i}{\partial f^2}.$ Hereafter, we assume the MSE loss $\ell_i=[f(\mathbf{w},x_i)-y_i]^2/2$; the analysis is straightforward to extend to other loss functions such as the cross-entropy loss. When $L_0(\mathbf{w})$ is small at $\mathbf{w}$, $\ell_i'$ is small for typical $i$, which implies that $\langle\ell'^2\rangle:=(1/N)\sum_{i=1}^N(\ell_i')^2$ is small. Near a minimum, therefore, we can derive (see Appendix~\ref{app: general hessian derivation}) without regularization: $H_0(\mathbf{w})\approx\frac{1}{N}\sum_{i=1}^N\nabla f(\mathbf{w},x_i)\nabla f(\mathbf{w},x_i)^\mathrm{T}, where $H_0 := \nabla\nabla L_0$. The Hessian with regularization is just given by $H_\Gamma(\mathbf{w})= H_0(\mathbf{w})+\Gamma$. On the other hand, the SGD noise covariance $C(\mathbf{w})$ is given by Eq.~(\ref{eq:noise_cov}). By performing an approximation to replace $(\ell_i')^2$ by its average over samples, i.e., $(\ell_i')^2\to\langle\ell'^2\rangle$, the SGD noise covariance is directly related to the Hessian: \vspace{-6mm} {\small \begin{align} C(\mathbf{w})&\approx \frac{\langle\ell'^2\rangle}{SN}\sum_{i=1}^N\nabla f(\mathbf{w},x_i)\nabla f(\mathbf{w},x_i)^\mathrm{T} -\frac{1}{S}\nabla L_0(\mathbf{w})\nabla L_0(\mathbf{w})^\mathrm{T} \nonumber \\ &\approx\frac{2L_0(\mathbf{w})}{S}H_0(\mathbf{w})-\frac{1}{S}\nabla L_0(\mathbf{w})\nabla L_0(\mathbf{w})^\mathrm{T}. \label{eq:cov_Hessian}% \end{align}}% Near a minimum $\mathbf{w}^*$ of the full loss $L_\Gamma(\mathbf{w})$, we have \begin{equation} \nabla L_0(\mathbf{w})\approx H_0(\mathbf{w}^*)(\mathbf{w}-\mathbf{w}^*)-\Gamma\mathbf{w}^*, \label{eq:nabla_L0} \end{equation} within the approximation $L_\Gamma(\mathbf{w})\approx L_\Gamma(\mathbf{w}^*)+(1/2)(\mathbf{w}-\mathbf{w}^*)^\mathrm{T}H_\Gamma(\mathbf{w}^*)(\mathbf{w}-\mathbf{w}^*)^\mathrm{T}$. Equations~(\ref{eq:cov_Hessian}) and (\ref{eq:nabla_L0}) give the SGD noise covariance near a minimum of $L_\Gamma(\mathbf{w})$. Now it is worth discussing two different cases separately: (1) with regularization and (2) without regularization. We first discuss the case when regularization is present. In this case, the regularization $\Gamma$ is not small enough, and the SGD noise covariance is \emph{not} proportional to the Hessian. Near a local or global minimum $\mathbf{w}\approx \mathbf{w}^*$, the first term of the right-hand side of Eq.~(\ref{eq:nabla_L0}) is negligible, and hence we obtain\vspace{-1mm} \begin{equation} C(\mathbf{w})\approx\frac{2L_0(\mathbf{w}^*)}{S}H_0(\mathbf{w}^*)-\frac{1}{S}\Gamma\mathbf{w}^*\mathbf{w}^{*\mathrm{T}}\Gamma.\vspace{-1mm} \end{equation} The SGD noise does not vanish even at a global minimum of $L_\Gamma(\mathbf{w})$. Note that this also agrees with the exact result derived in Section~\ref{sec: regularization}: together with an anisotropic noise that is proportional to the Hessian, a rank-$1$ noise proportional to the strength of the regularization appears. This rank-1 noise is a signature of regularization. On the other hand, as we will see below, the SGD noise covariance is proportional to the Hessian near a minimum when there is no regularization, $\Gamma\approx 0$. We have\vspace{-6mm} {\tiny \begin{multline} C(\mathbf{w})\approx\frac{2L_0(\mathbf{w})}{S}H_0(\mathbf{w} -\frac{1}{S}H_0(\mathbf{w}^*)(\mathbf{w}-\mathbf{w}^*)(\mathbf{w}-\mathbf{w}^*)^\mathrm{T}H_0(\mathbf{w}^*).\vspace{-1mm} \label{eq:C_no_reg \end{multline}}% For this case, we need to differentiate between a local minimum and a global minimum. When $L_0(\mathbf{w}^*)$ is not small enough (e.g. at a local but not global minimum), the last term in Eq.~(\ref{eq:C_no_reg}) is negligible, and hence\vspace{-1mm} \begin{equation} C(\mathbf{w})\approx\frac{2L_0(\mathbf{w})}{S}H_0(\mathbf{w}),\vspace{-1mm} \end{equation} which is proportional to the Hessian. On the other hand, when $L_0(\mathbf{w}^*)$ is vanishingly small (e.g. at a global minimum), we have $2L_0(\mathbf{w})\approx (\mathbf{w}-\mathbf{w}^*)^\mathrm{T}H_0(\mathbf{w}^*)(\mathbf{w}-\mathbf{w}^*)$, and thus obtain\vspace{-1mm} \begin{multline} C(\mathbf{w})\approx\frac{1}{S}\Bigl[(\mathbf{w}-\mathbf{w}^*)^\mathrm{T}H_0(\mathbf{w}^*)(\mathbf{w}-\mathbf{w}^*)H_0(\mathbf{w}^*)\\ -H_0(\mathbf{w}^*)(\mathbf{w}-\mathbf{w}^*)(\mathbf{w}-\mathbf{w}^*)^\mathrm{T}H_0(\mathbf{w}^*)\Bigr]. \label{eq:cov_global}\vspace{-1mm} \end{multline} It should be noted that the second term on the right-hand side of Eq.~(\ref{eq:cov_global}) would typically be much smaller than the first term for large $D$. For example, when $H_0(\mathbf{w}^*)=aI_D$ with $a>0$, the first and the second terms are respectively given by $(a^2/S)\|\mathbf{w}-\mathbf{w}^*\|^2I_D$ and $-(a^2/S)(\mathbf{w}-\mathbf{w}^*)(\mathbf{w}-\mathbf{w}^*)^\mathrm{T}$. The Frobenius norm of the former is given by $(Da^2/S)\|\mathbf{w}-\mathbf{w}^*\|^2$, while that of the latter is given by $(a^2/S)\|\mathbf{w}-\mathbf{w}^*\|^2$, which indicates that in Eq.~(\ref{eq:cov_global}), the first term is dominant over the second term for large $D$. Therefore the second term of Eq.~(\ref{eq:cov_global}) can be dropped for large $D$, and Eq.~(\ref{eq:cov_global}) is simplified as\vspace{-1mm} \begin{equation} C(\mathbf{w})\approx\frac{(\mathbf{w}-\mathbf{w}^*)^\mathrm{T}H_0(\mathbf{w}^*)(\mathbf{w}-\mathbf{w}^*)}{S}H_0(\mathbf{w}^*). \label{eq:cov_global_simplified} \end{equation} Again, the SGD noise covariance is proportional to the Hessian. In conclusion, as long as the regularization is small enough, that the SGD noise covariance near a minimum is proportional to the Hessian is a good approximation. This implies that the noise is multiplicative, which is known to lead to a heavy tail distribution \citep{clauset2009power, levy1996power}. In fact, even for the simple settings that we studied in Section~\ref{sec:theory}, one can observe a clear power-law distribution of $\mathbf{w}$ in the tail; for a detailed discussion, see Appendix~\ref{app: phase diagram}. Thus, we have studied the nature of the minibatch SGD noise in three different situations. We summarize these results in Table~\ref{tab:summary general theory}. As an example, we have demonstrated the power of this general formulation by applying it to the high-dimensional linear regression problem in Section~\ref{sec: high dimension linear regression}. \begin{table}[tb!] {\tiny \caption{Summary of the minibatch SGD noise in three situations. When regularization is applied, the noise is parameter independent and may be well approximated by a Gaussian distribution. When there is no regularization, the noise becomes dependent on the parameter $\mathbf{w}$.} \vspace{-0.8em} \label{tab:summary general theory} \centering \renewcommand\arraystretch{1.5} {\small \begin{tabular}{c|c} \hline\hline & Noise covariance $C$ \\ \hline With regularization & $\frac{2L_0(\mathbf{w}^*)}{S}H_0(\mathbf{w}^*)-\frac{1}{S}\Gamma\mathbf{w}^*\mathbf{w}^{*\mathrm{T}}\Gamma$\\ No reg. local minimum & $\frac{2L_0(\mathbf{w})}{S}H_0(\mathbf{w})$\\ No reg. global minimum& $\frac{(\mathbf{w}-\mathbf{w}^*)^\mathrm{T}H_0(\mathbf{w}^*)(\mathbf{w}-\mathbf{w}^*)}{S}H_0(\mathbf{w}^*)$\\ \hline\hline \end{tabular} } \vspace{-2em} } \end{table} \vspace{-2mm} \section{Discussion}\label{sec: discussion} \vspace{-1mm} In this work, we have tackled the minibatch SGD problem from a holistic approach. Previously, almost no analytical result had been available for minibatch SGD, and the present work fills this gap. Our result suggests that the minibatch noise needs to be analyzed differently in different situations. When the model is overparametrized, there is no asymptotic noise; on the other hand, when there is a mismatch between the model capacity and the data points, possibly due to regularization, data augmentation or inherent uncertainty in the dataset, the asymptotic noise will not vanish and has a strength and shape reflecting the type of noise that is present. There are a number of interesting implications of the present work, and it is our hope that this work will draw more attention to the study of the following problems. \textbf{Exploration and Exploitation of SGD.} Our general formulation suggests that the stationary distribution might be heavy-tail, corroborating the results in a series of previous works. The fact that SGD causes heavy-tail noise has different implications for the training of a network at initialization and at convergence. At initialization, a heavy-tail distribution encourages exploration without causing divergence, and thus should be desirable. At convergence, it has been shown that, if the stationary distribution is power-law like, then the convergence might be very slow \citep{roberts1996exponential}. \textbf{Escaping from Local Minimum.} Escaping from local minima is directly linked to the optimization efficiency and the generalization ability of the SGD algorithm \cite{Xie2020}. Our solution suggests that SGD may induce different kinds of fluctuations in different settings and this means that one might design special tricks such that the escape rate from a local minimum can be maximized. \textbf{Large Batch Scaling Rules.} Using a large learning rate may dramatically speed up training on a large dataset, often at the expense of generalization accuracy \cite{Hoffer2017}. One major trick proposed to reduce the performance drop is the batch-learning-rate scaling \cite{goyal2017accurate}, where one can double the learning rate to offset the negative effect of doubling the batch size. However, it is also known experimentally that this scaling breaks down at large $S$. Our solution suggests an answer: increasing the learning rate to offset large batch size stops working when a large learning rate causes the local minimum to become unstable. As a remedy, the theory suggests a different trick: by introducing some artificial noise in the label, one can scale up its variance linearly as one scales up the batch size, because the local stability of SGD is independent of the noise strength but dependent on $\lambda$. \clearpage \section{Introduction} \section{Background} [Discuss our recent work] [Discuss continuous time approximation] [Discuss standard minibatch approximation] \section{General Setting} Let $\{x_i, y_i\}_{i=1}^{N}$ be a training set. \begin{definition} A loss function $L(\{x_i, y_i\}_{i=1}^{N}, \mathbf{w})$ is said to be additive if \[ L(\{x_i, y_i\}_{i=1}^{N}, \mathbf{w}) = \frac{1}{N}\sum_{i=1}^N \ell(x_i, y_i, \mathbf{w})\] for some differentiable, non-negative function $\ell(\cdot)$. \end{definition} This definition is in fact quite general. Most of the commonly studied and used loss functions are additive; for example, the MSE-loss for regression and the cross-entropy loss for classification. We specifically consider the following kind of loss function. If the loss function is additive, then the mini-batch stochastic gradient descent (SGD) can be defined as following. \begin{definition} A mini-batch SGD \textit{with replacement} computes the update to the parameter $\mathbf{w}$ with the following dynamical equation: \begin{equation} \begin{cases} \hat{\mathbf{g}}_t= \frac{1}{S}\sum_{i\in B_t} \nabla \ell(x_i, y_i, \mathbf{w}_{t-1})\\ \mathbf{w}_t = \mathbf{w}_{t-1} - \lambda \hat{\mathbf{g}}_t, \end{cases} \end{equation} where $S := |B_t|\leq N$ is called the mini-batch size, and $\lambda$ is the learning rate; and the set $B_t=\{i_1,...i_S\}$ are $S$ i.i.d. random integers sampled uniformly from $[1,N]$. \end{definition} We can also define the without-replacement noise. \begin{definition} A mini-batch SGD \textit{without replacement} computes the update to the parameter $\mathbf{w}$ with the following dynamical equation: \begin{equation} \begin{cases} \hat{\mathbf{g}}_t= \frac{1}{S}\sum_{i\in B_t} \nabla \ell(x_i, y_i, \mathbf{w}_{t-1})\\ \mathbf{w}_t = \mathbf{w}_{t-1} - \lambda \hat{\mathbf{g}}_t, \end{cases} \end{equation} where $S := |B_t|\leq N$ is called the mini-batch size, and $\lambda$ is the learning rate; and the set $B_t$ is a element uniformly-randomly drawn from the set of all $S$-size subsets of $\{1,...,N\}$. \end{definition} We focus on analyzing this kind of mini-batch SGD for its notational conciseness. The average over batches is the gradient of the loss function: $\mathbb{E}\left[\hat{\mathbf{g}}\right]=\mathbf{g}_t:=\nabla L(\mathbf{w}_t)$, where we have used the simplified notation $L(\mathbf{w}):=L(\{x_i, y_i\}_{i=1}^{N}, \mathbf{w})$. Here and through after, we use $\mathbb{E}(\cdot)$ to denote the expectation over batches, and use $\mathbb{E}_{\mathbf{w}}(\cdot)$ to denote the expectation over the stable distribution of the model parameters. The variance of $\hat{\mathbf{g}}_t$ is derived exactly \citep{Hoffer2017}: \begin{equation} C(\mathbf{w}_{t-1}):=\mathbb{E}[\hat{\mathbf{g}}_t \hat{\mathbf{g}}_t^{\rm T}] - \mathbb{E}[\hat{\mathbf{g}}_t ]\mathbb{E}[\hat{\mathbf{g}}_t^{\rm T}] = \frac{1}{NS} \sum_{i=1}^{N}\nabla l_i(\mathbf{w}_{t-1}) \nabla l_i(\mathbf{w}_{t-1})^{\rm T}, \end{equation} where we have used the shorthand $l_i(\mathbf{w}):= l(x_i, y_i, \mathbf{w})$. In the limit of $S=1$ or $N\to \infty$, two cases coincide. For large $N$, the noise covariance is given by \begin{align} C(\mathbf{w})=\frac{1}{SN}\sum_{i=1}^{N}\nabla l_i \nabla l_i^{\rm T}. \end{align} The gradient covariance matrix $C$ will be crucial for us to understand the mini-batch noise. Let $H(\mathbf{w})$ denote the Hessian matrix of $L(\mathbf{w})$; the standard literature often uses the approximation $C(\mathbf{w})\approx H(\mathbf{w})$ to study the properties of mini-batch noise; however, the following proposition shows that this approximation can be easily violated and is unlikely to hold in some cases. Regarding the mini-batch covariance matrix $C$, the following result can be easily proved. \begin{proposition}\label{prop: no noise condition} Let $\mathbf{w}_*$ be the solution such that $L(\mathbf{w}_*)=0$, then $C(\mathbf{w}_*)=0$. \end{proposition} This proposition shows that, if our model is expressive enough to memorize all the data points, then at the global minimum, there is no noise. This proposition, though easy to prove, reveals some interesting fundamental property of the mini-batch noise: an over-parametrized model has no fluctuation at asymptotic time. Notice that this proposition shows that the commonly used approximation $C\sim H$ is wrong; since the Hessian matrix is unlikely to vanish in any local minimum, while the noise covariance matrix vanishes. Therefore, as $t\to \infty$, the only kind of model that experiences fluctuation are the ones that are underparametrized, i.e., having insufficient capacity to memorize all the data point. This work aims at deriving analytical facts about the mini-batch noise and the fluctuation it causes at asymptotic-time and close to a local minimum. \section{Theory of Mini-Batch Noise} \subsection{Random Noise in the Label} We focus on the setting where the loss function may be approximated by a quadratic potential\footnote{This work focuses on studying the steady-state aspects of the mini-batch noise; this means that we often take the limit $t\to \infty$; in this late time regime, the dynamics is close to convergence to a local minimum and the quadratic potential approximation should hold well.}. This may be regarded as an approximation to a non-linear model close to a local minimum, or as an exact solution to the linear regression problem. Our loss function then takes the form \begin{equation} L(\mathbf{w}) = \frac{1}{2N}\sum_{i=1}^N(\mathbf{w}^{\rm T} x_i - y_i)^2 \end{equation} where $x_i\in \mathbb{R}^D$ are drawn from a gaussian distribution with symmetric covariance matrix $A:= \mathbb{E}[xx^{\rm T}]$, and $y_i=\mathbf{u}^{\rm{T}}x_i + \epsilon_i$, for some fixed $\mathbf{u}$ and $\epsilon_i \in \mathbb{R}$ are drawn from a distribution with zero mean and finite second momentum $\sigma^2$. By proposition~\ref{prop: no noise condition}, in the regime $D\geq N$, the loss function can be reduced to zero and there is no randomness as $t\to \infty$; therefore, we first focus on the case when $D<N$. We first deal with the case when $N \to \infty$; when $N\to\infty,\ S=1$, we recover the standard online learning setting; when $S>1$, we are in a generalized online setting, where the model receives $S$ data point for every new update. We start with redefining $\mathbf{w} -\mathbf{u} \to \mathbf{w} $, which is a standard trick to simplify notation. Now, we are ready to write down the covariance matrix for the noise: \begin{align} C(\mathbf{w})=\frac{1}{NS} \sum_{i=1}^{N}\nabla l_i(\mathbf{w}_{t-1}) \nabla l_i(\mathbf{w}_{t-1})^{\rm T} &= \frac{1}{S} \frac{1}{N}\sum_i^N(\mathbf{w}^{\rm T}x_i - \epsilon_i)x_i x_i^{\rm T}(\mathbf{w}^{\rm T}x_i - \epsilon_i)^{\rm T}\nonumber\\ &= \frac{1}{S} \frac{1}{N}\sum_i^N(\mathbf{w}^{\rm T} x_ix_i x_i^{\rm T}x_i^{\rm T} \mathbf{w} + \epsilon_i^2 x_ix_i^{\rm T} ) \label{eq: C sum}\\ &= \frac{1}{S}(2A\mathbf{w}\mathbf{w}^{\rm T}A + {\rm Tr}[A\mathbf{w}\mathbf{w}^{\rm T}]A + \sigma^2 A ), \label{eq: C large number} \end{align} where we have invoked the law of large numbers and the expectation of product of four Gaussian random variables in the third line as detailed in Appendix~\ref{App: large number}. Writing $\Sigma:=\mathbb{E}_{\mathbf{w}}[\mathbf{w}\mathbf{w}^{\rm T}]$, we obtain \begin{equation} \mathbb{E}_\mathbf{w}[C(\mathbf{w})] =: C = \frac{1}{S}(2A\Sigma A + {\rm Tr}[A\Sigma]A+ \sigma^2 A). \end{equation} We can now plug this into the general solution obtained in a recent work \citep{liu2020stochastic} to obtain that \begin{equation} \Sigma A + A\Sigma - \lambda\left(1 + \frac{2}{S} \right) A \Sigma A - \lambda\frac{1}{S}{\rm Tr}[A\Sigma]A = \lambda \frac{1}{S} \sigma^2 A, \end{equation} or, \begin{equation} \left [I_D - \lambda\left(\frac{1}{2} + \frac{1}{S} \right)A \right]\Sigma A + A\Sigma \left [I_D - \lambda\left(\frac{1}{2} + \frac{1}{S} \right) A \right] - \lambda\frac{1}{S}{\rm Tr}[A\Sigma]A = \lambda\frac{1}{S} \sigma^2 A \end{equation} To solve this, we first need to find ${\rm Tr}[A\Sigma]$. Multiplying by $G^{-1}: = \left [I_D - \lambda\left(\frac{1}{2} + \frac{1}{S} \right)A \right]^{-1}$ and taking trace, we obtain \begin{equation*} 2 {\rm Tr}[A\Sigma] - \lambda \frac{1}{S} {\rm Tr}[A\Sigma] {\rm Tr} [A G^{-1} ] =\lambda \frac{1}{S} \sigma^2 {\rm Tr}[ A G^{-1} ], \end{equation*} which solves to \begin{equation} {\rm Tr}[A\Sigma] = \lambda\frac{\sigma^2}{S} \frac{ {\rm Tr}[AG^{-1}]}{{2} - \lambda \frac{1}{S}{\rm Tr} [AG^{-1}]} := \frac{\lambda\sigma^2}{S}\kappa, \end{equation} which is a complicated term and does not seem to be simplifiable. Now, the solution to $\Sigma$ is \begin{equation}\label{eq: solution} \Sigma = \frac{\lambda \sigma^2}{S}\left( 1 + \frac{\lambda \kappa}{S}\right) \left[2 I_D - \lambda \left(1 + \frac{2}{S}\right)A \right]^{-1}. \end{equation} There are a few interesting things about this result. The first corroborates our result in the previous section. When $\sigma^2=0$, then $\Sigma=0$. This means that when zero training loss is achieveable, then the final model parameter has no variance. For SGD with momentum, by applying the results derived in \cite{liu2020stochastic}, the form of the solution is similar with simply replacing $G$ by $G_M:=(1-\mu)I_D-\lambda\left(\frac{1}{2}\frac{1-\mu}{1+\mu}+\frac{1}{S}\right)A$. The second effect of minibatch noise is the term $1+2/S$ appearing in he denominator. We notice that a stable distribution only exits if $2>\lambda(1 + 2/S)a^*$, where $a^*$ is the largest eigenvalue of $A$, and this term can be seen as the ill-condition caused by using a larger step, and the first observation is that, when minibatch noise exists, it exacerbates the ill-conditioning problem and making the dynamics easier to diverge. When the noise is white gaussian, the dynamics converges only when $\lambda a^*<2$ \citep{liu2020stochastic}; for mini-batch noise, this bound reduces to $\lambda a^*<2S/(S + 2)$: one needs to use smaller learning rate to avoid divergence. The third effect is seen in the term $1+ \lambda \kappa/S$. This also causes the fluctuation of $\Sigma$ to increase, compared to the continuous dynamics. Notice that we can also write \eqref{eq: solution} as \begin{equation} \Sigma = \frac{\lambda \sigma^2}{S}\left( \frac{2}{2 - \frac{\lambda}{S}{\rm Tr}[AG^{-1}]}\right) \left[2 I_D - \lambda \left(1 + \frac{2}{S}\right)A \right]^{-1}. \end{equation} Therefore, one additional source of divergence emerges at $2<\frac{\lambda}{S}{\rm Tr}[AG^{-1}]$. Solving for this, we obtain that the condition for convergence is \begin{equation} 2S > \sum_i^D \left|\frac{\lambda a_i}{1 - \lambda\left(\frac{2+S}{2S}\right) a_i}\right|; \end{equation} this cannot be solved exactly, but this is a stronger condition than the first condition that $\lambda a^*<\frac{2S}{(2 + S)}$; we have that a necessary condition for above inequality to hold is that \begin{equation} 2S > \frac{\lambda a^*}{1 - \lambda\left(\frac{2+S}{2S}\right) a^*} \longrightarrow \lambda a^* < \frac{2S}{3+S} < \frac{2S}{(2 + S)}. \end{equation} When $S=1$, we need to set the learning rate such that $\lambda a^*<\frac{1}{2}$ for convergence. The sufficient condition for convergence is \begin{equation} \lambda a^* < \frac{2S}{2 + d + S} \end{equation} which is tight in the extreme case when $a_1\approx a_2\approx... \approx a_D \approx a^*$. This means that for high dimensional problems where the data has full rank, one needs to use proportionally smaller learning rate. It is worth discussing a few limiting cases; when $\lambda \ll 1$ and $1 \ll S$, we have \begin{equation} \Sigma \approx \frac{\sigma^2}{2\lambda S} I_D, \end{equation} which reduces to the standard approximation that $C\approx A$. Now we calculate the approximation error, that is the expected training loss, resulting from mini-batch noise. As in \cite{liu2020stochastic}, the approximation error is \begin{equation} \mathbb{E}_{\mathbf{w}}[L(\mathbf{w})] = \frac{1}{2}{\rm Tr}[A\Sigma]+\frac{1}{2}\sigma^2 = \frac{1}{2} \frac{\lambda\sigma^2}{S}\kappa+\frac{1}{2}\sigma^2. \end{equation} The test loss defined as $\frac{1}{2}\mathbb{E}_{\mathbf{w}}\mathbb{E}\left[(\mathbf{w}^{\rm T}x)^2\right]$ is given by \begin{align} \frac{1}{2}\mathbb{E}_{\mathbf{w}}\left[\mathbf{w}^{\rm T}A\mathbf{w}\right] = \frac{\lambda\sigma^2}{2S}\kappa. \end{align} When the learning rate $\lambda$ is vanishingly small, the expected test loss diminishes whereas the training error remains finite as long as label noise exists. \subsection{Random Noise in the Input} A second potential source of noise is randomness in the input data. This also causes the data complexity to rise and creates asymptotic noise in the training. We assume that the training data points $\tilde{x}_i = x_i + \eta_i$ can be decomposed into a signal part and a random part. As before, we assume Gaussian distributions so that the results are analytically solvable, $x_i \sim \mathcal{N}(0, A)$ and $\eta_i \sim \mathcal{N}(0, B)$. Equivalently, the problem remains analytically solvable if we replace the Gaussian assumption by the weaker condition that the fourth order moment exist and takes some matrix form. For now we assume that there is no noise in the label, namely $y_i=\mathbf{u}^{\rm T}x_i$ with a constant vector $\mathbf{u}$. When the noise is input dependent, the noise is also dependent on $\mathbf{u}$. We denote its outer-product as $\mathbf{u} \mathbf{u}^{\rm T} := U$. Notice that the trick $\mathbf{w} - \mathbf{u} = \mathbf{w}$ no more works, and so we write the difference explicitly here. It is worthwhile to explicitly write the expression of the loss function by invoking the law of large numbers as \begin{align} L(\mathbf{w})&=\frac{1}{2N}\sum_{i=1}^{N}\left[(\mathbf{w}-\mathbf{u})^{\rm T}x_i + \mathbf{w}^{\rm T}\eta_i\right]^2\nonumber\\ &=\frac{1}{2}(\mathbf{w}-\mathbf{u})^{\rm T}A(\mathbf{w}-\mathbf{u})+\frac{1}{2}\mathbf{w}^{\rm T}B\mathbf{w}. \end{align} Taking the gradient of the loss function yields \begin{align} \nabla L(\mathbf{w})=(A+B)(\mathbf{w}-\mathbf{u})+B\mathbf{u}. \end{align} The gradient vanishes at $\mathbf{w}_*:=(A+B)^{-1}A\mathbf{u}$, which is the minimum of the loss function and the mean of the parameter stabel distribution. It can be seen that, even at the minimum $\mathbf{w}_*$, the loss function remains finite unless $\mathbf{u}=0$, which suggests that in the presence of input noise, the expressivity of the network is not sufficient enough to capture all the information of the data so that the training error will never become zero. Now we define $\mathbb{E}_{\mathbf{w}}\left[(\mathbf{w}-\mathbf{w}_*)(\mathbf{w}-\mathbf{w}_*)^{\rm T}\right] = \Sigma$, then we have \begin{align} &\mathbb{E}_{\mathbf{w}}[\mathbf{w}\mathbf{w}^{\rm T}]=\Sigma+(A+B)^{-1}AUA(A+B)^{-1}:=\Sigma+A'UA'^{\rm T}:=\Sigma_A,\\ &\mathbb{E}_{\mathbf{w}}\left[(\mathbf{w}-\mathbf{u})(\mathbf{w}-\mathbf{u})^{\rm T}\right]=\Sigma+B'UB'^{\rm T}:=\Sigma_B, \end{align} where we use the shorthand notations $A':=(A+B)^{-1}A$, $B':=(A+B)^{-1}B$ and $\Sigma_{A}:=\Sigma+A'UA'^{\rm T}$, $\Sigma_{B}:=\Sigma+B'UB'^{\rm T}$. We remark that the covariance matrix $\Sigma$ here still satisfies the matrix equations derived in \cite{liu2020stochastic} with the Hessian being $(A+B)$. The noise term then takes the form \begin{align} C(\mathbf{w}) &= \frac{1}{S} \frac{1}{N}\sum_i^N(\mathbf{w}^{\rm T}\tilde{x}_i - \mathbf{u}^{\rm T}{x}_i )\tilde{x}_i \tilde{x}_i^{\rm T}(\mathbf{w}^{\rm T}\tilde{x}_i - \mathbf{u}^{\rm T}{x}_i )^{\rm T} \nonumber\\ &= \frac{1}{S} \big\{ 2A(\mathbf{w} -\mathbf{u}) (\mathbf{w}-\mathbf{u})^{\rm T} A + 2B\mathbf{w}\mathbf{w}^{\rm T} B + 2A(\mathbf{w}-\mathbf{u})\mathbf{w}^{\rm T}B+2B\mathbf{w}(\mathbf{w}-\mathbf{u})^{\rm T}A \nonumber\\ &\qquad\ + {\rm Tr}[A(\mathbf{w} -\mathbf{u}) (\mathbf{w}-\mathbf{u})^{\rm T} ](A +B) + {\rm Tr}[B \mathbf{w}\mathbf{w}^{\rm T} ](A+B) \big\},\label{eq: C of input large number} \end{align} and the asymptotic noise can be found as \begin{align} C&:=\mathbb{E}_{\mathbf{w}}[C(\mathbf{w})]\nonumber\\ &=\frac{1}{S} \left\{ 2(A+B)\Sigma(A+B)+ {\rm Tr}[A\Sigma_B +B\Sigma_A](A+B) \right \}\\ &:=\frac{1}{S} \left\{ 2K\Sigma K+ {\rm Tr}[K\Sigma]K + {\rm Tr}[AK^{-1}BU]K \right \},\label{eq: C of input} \end{align} where $K:=A+B$. The details of deriving this noise covariance can be found in Appendix~\ref{App: C of input}. It can be seen that the form of the covariance \eqref{eq: C of input} of input noise is similar to that of label noise \eqref{eq: C large number} with replacing $A$ by $K$ and replacing $\sigma^2$ by ${\rm Tr}[AK^{-1}BU]$. This means that these two types of noise have a similar nature. Explicitly, the matrix equation satisfied by $\Sigma$ is given by \begin{align} \Sigma K+K\Sigma - \lambda\left(1+\frac{2}{S}\right)K\Sigma K =\frac{\lambda}{S}\left\{{\rm Tr}[K\Sigma] K +{\rm Tr}[AK^{-1}BU]K\right\}.\label{eq: matrix eq of input} \end{align} From it, we can obtain ${\rm Tr}[K\Sigma]$: \begin{align} {\rm Tr}[K\Sigma]=\frac{\lambda {\rm Tr}[AK^{-1}BU]}{S}\kappa', \label{eq: trace of input} \end{align} where $\kappa':=\frac{ {\rm Tr}[KG'^{-1}]}{{2} - \lambda \frac{1}{S}{\rm Tr} [KG'^{-1}]}$ with $G':=I_D - \lambda\left(\frac{1}{2} + \frac{1}{S} \right)K$. With Eq.~\eqref{eq: matrix eq of input}, we are able to derive the training error and the test error. For the training error, it is defined as the expectation of the loss function: \begin{align} \mathbb{E}_{\mathbf{w}}[L(\mathbf{w})]&=\frac{1}{2}{\rm Tr}[A\Sigma_B +B\Sigma_A]\nonumber\\ &=\frac{1}{2}{\rm Tr}[AK^{-1}BU]\left(1+\frac{\lambda }{S}\kappa'\right). \end{align} Noticeably, the training loss decomposes to two additive terms. The term that is proportional to $1$ is the bias, caused by having insufficient model expressivity to fit all the data points perfect, while the second term that is proportional to $\lambda \kappa'/S$ is the variance in model parameter, induced by the randomness of minibatch noise. The test error is defined as $\frac{1}{2}\mathbb{E}_{\mathbf{w}} \mathbb{E} \left[(\mathbf{w}^{\rm T}x-\mathbf{u}^{\rm T}x)^2\right]$. From Eq.~\eqref{eq: matrix eq of input}, the test loss again takes the form of a bias-variance tradeoff: \begin{align} \frac{1}{2}\mathbb{E}_{\mathbf{w}}\left[(\mathbf{w}-\mathbf{u})^{\rm T}A(\mathbf{w}-\mathbf{u})\right]&=\frac{1}{2}{\rm Tr}[A\Sigma_B]\nonumber\\ &=\frac{\lambda}{4S}{\rm Tr}[AK^{-1}BU]\left( 1 + \frac{\lambda \kappa'}{S}\right){\rm Tr}[AG'^{-1}]+\frac{1}{2}{\rm Tr}[B'^{\rm T}AB'U]\nonumber\\ &= \frac{\lambda}{2S}{\rm Tr}[AK^{-1}BU] \kappa'+\frac{1}{2}{\rm Tr}[B'^{\rm T}AB'U]. \end{align} It is obvious that the test loss is always smaller than or equal to the training loss because all matrices involved here are positive-semidefinite. In order to solve for $\Sigma$ explicitly, we have to assume that $[K,U]=0$ because $\Sigma$ is a function of $K$ and $U$. Under such assumption, we can obtain the solution to $\Sigma$ by simply replacing terms in Eq.~\eqref{eq: solution} as \begin{align} \Sigma=\frac{\lambda {\rm Tr}[AK^{-1}BU]}{S}\left( 1 + \frac{\lambda \kappa'}{S}\right) \left[2 I_D - \lambda \left(1 + \frac{2}{S}\right)K \right]^{-1}. \label{eq: solution of input} \end{align} In general, this assumption does not hold so that we can only know the training and test error exactly. [TODO] \subsection{Learning with Regularization} In this section, we show that regularization also induces mini-batch noise. Especially, we consider a generalize form of $L_2$ regularization in this section. The loss function for $\Gamma-L_2$ regularized linear regression is \begin{equation} L_\Gamma(\mathbf{w}) =\frac{1}{2N}\sum_{i=1}^{N}\left[(\mathbf{w}-\mathbf{u})^{\rm T}x_i\right]^2 + \frac{1}{2} \mathbf{w}^{\rm T} \Gamma \mathbf{w}, \end{equation} where $\Gamma$ is a symmetric matrix. Conventionally, $\Gamma=\gamma I_D$ for a scalar $\gamma>0$. The covariance matrix of the noise is then given by \begin{align} C(\mathbf{w}) &= \frac{1}{S} \frac{1}{N}\sum_i^N\left[(\mathbf{w}-\mathbf{u})^{\rm T}x_i x_i+ \Gamma\mathbf{w}\right]\left[x_i^{\rm T} x_i^{\rm T}(\mathbf{w}-\mathbf{u})+ \mathbf{w}^{\rm T}\Gamma\right] \nonumber\\ &= \frac{1}{S} \big\{ 2A(\mathbf{w} -\mathbf{u}) (\mathbf{w}-\mathbf{u})^{\rm T} A + \Gamma\mathbf{w}\mathbf{w}^{\rm T} \Gamma + A(\mathbf{w}-\mathbf{u})\mathbf{w}^{\rm T}\Gamma+\Gamma\mathbf{w}(\mathbf{w}-\mathbf{u})^{\rm T}A + {\rm Tr}[A(\mathbf{w} -\mathbf{u}) (\mathbf{w}-\mathbf{u})^{\rm T} ]A \big\},\label{eq: C of regular large number} \end{align} and the asymptotic noise can be found as \begin{align} C=\frac{1}{S}\left\{(A+\Gamma)\Sigma(A+\Gamma)+A\Sigma A+{\rm Tr}[A\Sigma]A+X\right\},\label{eq: C of regular} \end{align} where \begin{align} X=A\Gamma'U(A+\Gamma)+(A+\Gamma)UA'^{\rm T}\Gamma-AU\Gamma-\Gamma UA+\Gamma A' UA'^{\rm T}\Gamma +{\rm Tr}[\Gamma'^{\rm T} A\Gamma' U]A. \end{align} Therefore, the matrix equation obeyed by $\Sigma$ reads \begin{align} \Sigma K + K \Sigma -\lambda\left(1+\frac{1}{S}\right)K\Sigma K -\frac{\lambda}{S}A \Sigma A=\frac{\lambda}{S}{\rm Tr}[A\Sigma]A+\frac{\lambda}{S}X, \label{eq: matrixeq of regular} \end{align} with shorthand notation $K:= A+\Gamma$. When $[A,\Gamma]=0$, the trace term ${\rm Tr}[A\Sigma]$ is given by \begin{align} {\rm Tr}[A\Sigma]=\frac{\lambda}{S}\alpha, \end{align} where \begin{align} \alpha:=\frac{{\rm Tr}[XAG^{-1}]}{1-\frac{\lambda}{S}{\rm Tr}[A^2G^{-1}]}, \end{align} and \begin{align} G:=2K-\lambda\left(1+\frac{1}{S}\right)K^2-\frac{\lambda}{S}A^2. \end{align} Without assuming $[A,\Gamma]=0$, we cannot derive ${\rm Tr}[A\Sigma]$. Similarly, we can derive the training error and the test error via Eq.~\eqref{eq: matrixeq of regular}. The training error is again defined as the expectation of the loss function: \begin{align} \mathbb{E}_{\mathbf{w}}[L(\mathbf{w})]&=\frac{1}{2}{\rm Tr}[A\Sigma_{\Gamma} +\Gamma\Sigma_A]\nonumber\\ &=\frac{1}{2}{\rm Tr}[K\Sigma] + \frac{1}{2}{\rm Tr}[AK^{-1}\Gamma U]\nonumber\\ &=\frac{\lambda}{2S}{\rm Tr}\left[KG^{-1}\left(X+\frac{\lambda}{S}\alpha A\right)\right]+\frac{1}{2}{\rm Tr}[AK^{-1}\Gamma U]. \end{align} The test loss is derived as well: \begin{align} \frac{1}{2}\mathbb{E}_{\mathbf{w}} \mathbb{E} \left[(\mathbf{w}^{\rm T}x-\mathbf{u}^{\rm T}x)^2\right]&=\frac{1}{2}\mathbb{E}_{\mathbf{w}}\left[(\mathbf{w}-\mathbf{u})^{\rm T}A(\mathbf{w}-\mathbf{u})\right]\nonumber\\ &=\frac{1}{2}{\rm Tr}[A\Sigma_{\Gamma}]\nonumber\\ &= \frac{\lambda}{2S}\alpha+\frac{1}{2}{\rm Tr}[\Gamma'^{\rm T}A\Gamma'U].\label{eq: regular test loss} \end{align} Because $\Gamma$ may not be positive-semidefinite, the test loss is possible to be larger than the training loss, which is different from the input noise case. Again, if $A$, $\Gamma$ and $U$ commute with each other, we can explicitly solve for $\Sigma$: \begin{align} \Sigma=\frac{\lambda}{S}\left(X+\frac{\lambda}{S}\alpha A\right)G^{-1}. \end{align} \subsection{Minibath Noise in the High-Dimensional Limit} In this section, we consider the limiting case when $N,\ D\to \infty$ while keeping the ratio $\alpha:=\frac{N}{D}$ fixed. When $\alpha > 1$, the model is said to be underparametrized, and when $\alpha<1$, the model is said to be overparametrized. As we have seen above, the case of input noise is qualitatively the same as label noise, but with a shifted data covariance matrix; therefore, for notational conciseness, we focus on the case of label noise in this section. \subsection{Summary and Implication} We have seen that the distribution of label, the distribution of the input, the usage of regularization all play a role in determining the level and shape of the asymptotic noise induced by minibatch noise. Here, we attempt at deepening our understanding of the problems by defining the concepts of \textit{effective noise} and \textit{effective curvature} of the problems we considered. See Table~\ref{tab:concepts}. \begin{table}[] \centering \begin{tabular}{c|ccc} \hline\hline & effective noise & effective curvature & Effective Data Complexity \\ \hline Continuous-time Approximation & $\frac{\lambda}{S}K$ & $K$ & $\sigma^2$\\ Label Noise & & \\ Input Noise & & \\ $L_2$ Regularization & & \\ \end{tabular} \caption{Caption} \label{tab:concepts} \end{table} \section{Some Interesting Cases of Regularization} \subsection{Optimal $\gamma$ in 1 Dimension} For one dimensional case, we use lowercase letters. The training loss is given by \begin{align} \mathbb{E}_{w}[L(w)]=\frac{a\gamma}{2(a+\gamma)}\frac{2(a+\gamma)-\lambda\left[\left(1+\frac{1}{S}\right)(a+\gamma)^2+\frac{2}{S}a(a-\gamma)\right]}{2(a+\gamma)-\lambda\left[\left(1+\frac{1}{S}\right)(a+\gamma)^2+\frac{2}{S}a^2\right]}u^2. \end{align} The test loss is \begin{align} \frac{1}{2}\mathbb{E}_{w} \mathbb{E} \left[(wx-ux)^2\right]=\frac{a\gamma^2}{2(a+\gamma)}\frac{2-\lambda\left(1+\frac{1}{S}\right)(a+\gamma)}{2(a+\gamma)-\lambda\left[\left(1+\frac{1}{S}\right)(a+\gamma)^2+\frac{2}{S}a^2\right]}u^2.\label{eq: 1d test regular} \end{align} For one dimensional case, the condition for convergence is given by $1-\frac{\lambda}{S}{\rm Tr}[A^2G^{-1}]>0$. Explicitly, \begin{align} \lambda\left(1+\frac{1}{S}\right)(a+\gamma)^2-2(a+\gamma)+\lambda\frac{2}{S}a^2<0. \end{align} For a given $\gamma$, the requirement for the learning rate is \begin{align} \lambda<\frac{2(a+\gamma)}{\left(1+\frac{1}{S}\right)(a+\gamma)^2+\frac{2}{S}a^2}. \end{align} For a given $\lambda$, the condition for $\gamma$ is \begin{align} \frac{S- a (1 + S) \lambda - \sqrt{S^2 - 2 a^2 (1 + S) \lambda^2}}{(1 + S) \lambda}<\gamma<\frac{S- a (1 + S) \lambda + \sqrt{S^2 - 2 a^2 (1 + S) \lambda^2}}{(1 + S) \lambda}.\label{eq: gamma condition} \end{align} It indicates a constraint on $\lambda$: \begin{align} a\lambda<\frac{S}{\sqrt{2(1+S)}}.\label{eq: constriant 1} \end{align} We are interested in the situation where the optimal $\gamma$ which minimizes the test error \eqref{eq: 1d test regular} is negative. It is obvious that if $\gamma$ is allowed to take positive values according to the constraints \eqref{eq: gamma condition}, the test loss reaches its minimal value $0$ while $\gamma=0$. There is no other $\gamma$ that can make the test loss vanishes because the numerator can never be $0$ due to the convergence condition. We focus on the case where $\gamma$ can only take negative values, therefore the optimal $\gamma$ is also negative. The condition is that the upper bound on $\gamma$ is negative, namely \begin{align} \frac{S- a (1 + S) \lambda + \sqrt{S^2 - 2 a^2 (1 + S) \lambda^2}}{(1 + S) \lambda}<0. \end{align} It translates into \begin{align} a\lambda>\frac{2}{1+\frac{2}{S}}. \label{eq: constriant 2} \end{align} Combining with Eq.~\eqref{eq: constriant 1}, we obtain the necessary condition for negative optimal $\gamma$: \begin{align} S>2(1+\sqrt{2})\to S\ge 5. \end{align} We plot in Figure~\ref{fig:testloss} the test loss \eqref{eq: 1d test regular} to see the optimal $\gamma$ while varying either $S$ or$\lambda$. With negative optimal $\gamma$, the test loss is always finite. \begin{figure} \centering \begin{subfigure}{0.4\linewidth} \includegraphics[width=\linewidth]{plots/test_loss_to_S.pdf} \vspace{-1em} \caption{test loss versus $S$} \end{subfigure} \begin{subfigure}{0.45\linewidth} \includegraphics[width=\linewidth]{plots/test_loss_to_lambda.pdf} \vspace{-1.5em} \caption{test loss versus $\lambda$} \end{subfigure} \vspace{-0.5em} \caption{(a) Test loss versus $\gamma$ with different batch size $S$. For small $S$, $\gamma$ can take positive values; therefore the optimal $\gamma$ is $0$ as expected. For larger $S$, only negative $\gamma$ is permitted and a clear existence of an optimal value exists and the test loss remains finite. (b) Test error versus $\gamma$ with different learning rate $\lambda$. Here the batch size is set to be $S=50$. For a large enough $S$, if the learning rate is too small, we can still have vanishing optimal $\gamma$ because the condition Eq.~\eqref{eq: constriant 2} is not achieved. While the learning rate gets larger to make the condition fulfilled, negative optimal $\gamma$ appears naturally.} \label{fig:testloss} \end{figure} \subsection{Optimal $\gamma$ in High Dimension} We present the condition satisfied by the optimal $\gamma$ which optimizes the test loss \eqref{eq: regular test loss} for a scalar $\gamma$ by evaluating the point where the derivative of the test error with respect to $\gamma$ vanishes. Specifically, the equations are given by \begin{align} \frac{\lambda}{2S}\frac{\partial}{\partial \gamma}\alpha+\frac{1}{2}\frac{\partial}{\partial \gamma}{\rm Tr}[\Gamma'^{\rm T}A\Gamma'U]=0, \end{align} in which \begin{align} \frac{\partial}{\partial \gamma}\alpha=\frac{2}{\left(1-\frac{\lambda}{S}{\rm Tr}[A^2G^{-1}]\right)^2}\bigg\{ &\left(1-\frac{\lambda}{S}{\rm Tr}[A^2G^{-1}]\right)\bigg[ \gamma({\rm Tr}[G^{-1}A^4(A+\gamma I_D)^{-3}U]\nonumber\\ &+{\rm Tr}[A^2G^{-1}]{\rm Tr}[A^2(A+\gamma I_D)^{-3}U])\nonumber\\ & - {\rm Tr}\left[G^{-2}XA\left[I-\lambda\left(1+\frac{1}{S}\right)(A+\gamma I_D)\right]\right]\bigg] \nonumber\\ &-\frac{\lambda}{S}{\rm Tr}[XAG^{-1}]{\rm Tr}\left[G^{-2}A^2\left[I-\lambda\left(1+\frac{1}{S}\right)(A+\gamma I_D)\right]\right] \bigg\}, \end{align} \begin{align} \frac{\partial}{\partial \gamma}{\rm Tr}[\Gamma'^{\rm T}A\Gamma'U]=2\gamma{\rm Tr}\left[A^2(A+\gamma I_D)^{-3}U\right]. \end{align} \subsection{Limiting Cases} It is worth consider several limiting cases of $\Gamma$. When $\Gamma$ is very small, the noise $X$ can be expanded in increasing order of $\Gamma$ as \begin{equation} X = \Gamma A^{-1} \Gamma U A + AU\Gamma A^{-1} \Gamma + 3\Gamma U \Gamma + {\rm Tr}[\Gamma A^{-1} \Gamma U]A + O(\Gamma^3) \end{equation} which means that the noise vanishes as $\Gamma$ vanishes, since both the zeroth and the first order terms in $\Gamma$ vanish. If $\Gamma= \gamma I_D$ for some small scalar $\gamma$, we have \begin{align} X=\gamma^2 (A^{-1}U A + AU A^{-1}+3U)+\gamma^2{\rm Tr}[A^{-1}U]A. \end{align} Because $U$ is a rank-1 matrix, if it aligns with an eigenvalue of $A$, the prefactor in the full-rank term should be ${\rm Tr}[A^{-1}U]=u_i / a_i$. If it aligns with the largest eigenvalue, the rank-1 contribution in $X$ is comparable to the full-rank contribution; if it aligns with the smallest eigenvalue, the full-rank contribution dominates. On the other hand, when $\Gamma$ is very large, we have the limit \begin{equation} X = AUA + {\rm Tr}[AU] A + O (\Gamma^{-1}). \end{equation} The interesting fact is that the noise becomes insensitive to $\Gamma$ as $\Gamma$ becomes very large. We can consider continuous-time limit by ignoring higher order terms in $\lambda$ in Eq.~\eqref{eq: matrixeq of regular}: \begin{align} \Sigma K+K\Sigma=\frac{\lambda}{S}X. \end{align} \subsection{Comparison with Input Noise} To compare with the case with input noise, we set $\Gamma=B$ with the assumption $[A,B]=0$. We show that while $A\ge B$ in the sense that $A-B$ is positive-semidefinite, the test loss of input noise with $B$ is always larger than that of weight decay regularization with $\Gamma=B$. Because the final term in both expressions is the same, we take the difference of the first term. \begin{align} \Delta&:={\rm Tr}[AK^{-1}BU]\kappa'-\alpha\nonumber\\ &= \frac{{\rm Tr}[AK^{-1}BU] {\rm Tr}[KG'^{-1}]}{{2} - \lambda \frac{1}{S}{\rm Tr} [KG'^{-1}]}-\frac{{\rm Tr}[XAG^{-1}]}{1-\frac{\lambda}{S}{\rm Tr}[A^2G^{-1}]}. \end{align} Because $B$ is positive-semidefinite, we have \begin{align} G\ge 2G' K. \end{align} Therefore, \begin{align} \Delta&\ge \frac{1}{1-\frac{\lambda}{S}{\rm Tr}[A^2G^{-1}]}\left[{\rm Tr}[AK^{-1}BU]{\rm Tr}[A^2G^{-1}]-{\rm Tr}[XAG^{-1}]\right]\nonumber\\ &=\frac{1}{1-\frac{\lambda}{S}{\rm Tr}[A^2G^{-1}]}\left[{\rm Tr}[A^2BK^{-2}U]{\rm Tr}[A^2G^{-1}]-{\rm Tr}[f(U)AG^{-1}]\right], \end{align} where \begin{align} f(U)&=AB'U(A+B)+(A+B)UA'^{\rm T}B-AUB-B UA+B A' UA'^{\rm T}B +{\rm Tr}[B'^{\rm T} AB' U]A\nonumber\\ &=BA'UA'^{\rm T}B+{\rm commutators}. \end{align} Plugging in all things, the difference $\Delta$ is lower bounded as \begin{align} \Delta&\ge\frac{1}{1-\frac{\lambda}{S}{\rm Tr}[A^2G^{-1}]}{\rm Tr}\left[\left({\rm Tr}[A^2BK^{-2}U]I_D-BAK^{-1}UK^{-1}B\right)A^2G^{-1}\right]\nonumber\\ &\ge \frac{1}{1-\frac{\lambda}{S}{\rm Tr}[A^2G^{-1}]}{\rm Tr}\left[(A-B)A^3BK^{-2}G^{-1}U\right], \end{align} where we used ${\rm Tr}[A]I_D\ge A$ in the second line. If $A\ge B$, it follows that $\Delta\ge 0$, which means that the test error of input noise is not smaller than that of weight decay while $\Gamma=B$. \section{General Theory} So far, we have considered the linear regression problem with large $N$ limit with $D$ held fixed. In this section, we discuss more generic situations. Let $f(\mathbf{w},x)$ denote the output of the network for a given input $x\in\mathbb{R}^D$. In the linear regression, $\mathbf{w}\in\mathbb{R}^D$ and $f(\mathbf{w},x)=\mathbf{w}^\mathrm{T}x$, but we consider more general case. The number of parameters in the network is denoted by $P$, and hence $\mathbf{w}\in\mathbb{R}^P$. For a training dataset $\{x_i,y_i\}_{i=1,2,\dots,N}$, the loss function is given by \begin{equation} L(\mathbf{w})=\frac{1}{N}\sum_{i=1}^N\ell(f(\mathbf{w},x_i),y_i). \end{equation} We will use the following shorthand notations: \begin{equation} \ell_i=\ell(f(\mathbf{w},x_i),y_i), \quad \ell_i'=\frac{\partial\ell_i}{\partial f}, \quad \ell_i''=\frac{\partial^2\ell_i}{\partial f^2}. \end{equation} For the mean-square error, we have $\ell_i=[f(\mathbf{w},x_i)-y_i]^2/2$. The Hessian of the loss function $H(\mathbf{w})$ is given by \begin{equation} H(\mathbf{w})=\frac{1}{N}\sum_{i=1}^N\ell_i''\nabla f(\mathbf{w},x_i)\nabla f(\mathbf{w},x_i)^\mathrm{T}+\frac{1}{N}\sum_{i=1}^N\ell_i'\nabla\nabla^\mathrm{T}f(\mathbf{w},x_i). \end{equation} When $\mathbf{w}$ is close to a local (or global) minimum of $L(\mathbf{w})$, $\ell_i'\approx 0$ for all $i$, and hence we have \begin{equation} H(\mathbf{w})\approx\frac{1}{N}\sum_{i=1}^N\ell_i''\nabla f(\mathbf{w},x_i)\nabla f(\mathbf{w},x_i)^\mathrm{T}. \end{equation} For the mean-square error, $\ell_i''=1$, so we have \begin{equation} H(\mathbf{w})\approx\frac{1}{N}\sum_{i=1}^N\nabla f(\mathbf{w},x_i)\nabla f(\mathbf{w},x_i)^\mathrm{T} \quad \text{(MSE)} \end{equation} near a local or global minimum. On the other hand, the SGD noise covariance {\small \bibliographystyle{apalike} \section{Introduction} The simple and efficient optimization algorithm behind the unprecedented success of deep learning, stochastic gradient descent (SGD) attracts increasingly more attention in the field of machine learning \citep{allen2018convergence, xing2018_walk_sgd, Zhang_optimizationProperitesSGD, liu2020stochastic}. It is now established that the stochastic noise in SGD is directly related to the performance of the SGD algorithm, both in terms of the training efficiency and generalization ability \citep{}. At the same time, the SGD noise is notoriously hard to understand due to the lack of analytical results. Previous works are mostly limited to empirical studies. For examples, let $S$ denote the minibatch size, the famous rule-of-thumb of rescaling the learning rate $\lambda$ by $1/S$ is now well-established empirically \citep{}. Recently, it is also shown that the the noise in SGD takes a heavy-tail nature, with a well-measureble tail index, mimicking many types of noises in nature \cite{}. However, the existence of a plethora of empirical results is in sharp contrast to the lack of theoretical results in the field. Dominantly many of the previous theoretical works take two approximations: (1) the continuous-time approximation \citep{}, which take the infinitesical step-size limit $\lambda\to 0$; (2) hessian approximation, which assumes that the covariance matrix of the SGD noise is approximated by the Hessian \citep{}. In this work, we remove these two approximation altogether, and focus on deriving analytical results on discrete-time SGD noise when the learning rate is arbitrarily large and when the noise covariance matrix is not approximated. We then apply our analytical results to better understand of the nature of SGD noise in general. The contributions of this work include [TODO] The organization of the paper is as follows [TODO] The main analytical results of this work is summarized in Table~\ref{tab:summary}. \section{Background} In this section, we define the minibatch technique, starting from its relationship to gradient descent (GD) and online learning. Let $\{x_i, y_i\}_{i=1}^{N}$ be a training set, then we can define the gradient GD algorithm simply as the following for a differentiable loss function $L$: \begin{equation} \mathbf{w}_t = \mathbf{w}_{t-1} - \lambda \nabla_\mathbf{w}L(\mathbf{w}, \mathbf{x}, \mathbf{y}), \end{equation} where $\lambda$ is the learning rate. Notice that there is no stochasticity in GD. To consider apply minibatch technique, we also need the loss function to take an ``additive" form. \begin{definition} A loss function $L(\{x_i, y_i\}_{i=1}^{N}, \mathbf{w})$ is said to be additive if \[ L(\{x_i, y_i\}_{i=1}^{N}, \mathbf{w}) = \frac{1}{N}\sum_{i=1}^N \ell(x_i, y_i, \mathbf{w})\] for some differentiable, non-negative function $\ell(\cdot)$. \end{definition} This definition is in fact quite general. Most of the commonly studied and used loss functions are additive; for example, the MSE-loss for regression and the cross-entropy loss for classification. If the loss function is additive, then the mini-batch stochastic gradient descent (SGD) can be defined as following. \begin{definition} A mini-batch SGD \textit{with replacement} computes the update to the parameter $\mathbf{w}$ with the following dynamical equation: \begin{equation} \begin{cases} \hat{\mathbf{g}}_t= \frac{1}{S}\sum_{i\in B_t} \nabla \ell(x_i, y_i, \mathbf{w}_{t-1})\\ \mathbf{w}_t = \mathbf{w}_{t-1} - \lambda \hat{\mathbf{g}}_t, \end{cases} \end{equation} where $S := |B_t|\leq N$ is called the mini-batch size, and $\lambda$ is the learning rate; and the set $B_t=\{i_1,...i_S\}$ are $S$ i.i.d. random integers sampled uniformly from $[1,N]$. \end{definition} We can also define the without-replacement noise. \begin{definition} A mini-batch SGD \textit{without replacement} computes the update to the parameter $\mathbf{w}$ with the following dynamical equation: \begin{equation} \begin{cases} \hat{\mathbf{g}}_t= \frac{1}{S}\sum_{i\in B_t} \nabla \ell(x_i, y_i, \mathbf{w}_{t-1})\\ \mathbf{w}_t = \mathbf{w}_{t-1} - \lambda \hat{\mathbf{g}}_t, \end{cases} \end{equation} where $S := |B_t|\leq N$ is called the mini-batch size, and $\lambda$ is the learning rate; and the set $B_t$ is a element uniformly-randomly drawn from the set of all $S$-size subsets of $\{1,...,N\}$. \end{definition} When $N\to \infty$, the minibatch SGD algorithm is equivalent to online learning. For both algorithms, it is standard to write the gradient as a decomposition of a deterministic term and a stochastic term. Notice that, in both definitions, $\mathbb{E}_{B}[\hat{\mathbf{g}}_t] = \nabla L $ is the gradient for the GD algorithm; therefore, we can write \begin{equation} \hat{\mathbf{g}}_t = \mathbb{E}_{B}[\hat{\mathbf{g}}_t] + \eta_t \end{equation} where $\eta_t:= \frac{1}{S}\sum_{i\in B_t} \nabla \ell(x_i, y_i, \mathbf{w}_{t-1}) - \mathbb{E}_{B}[\hat{\mathbf{g}}_t]$ is the fluctuation term; of central importance to us is the noise covariance matrix defined as $C:= \text{cov}(\eta_t, \eta_t)$. Conventionally, the SGD noise is approached by making two approximations: (1) the continuous-time approximation: this involves taking the limit $\lambda \to 0$, and treat the stochastic difference equations as the limiting differential equations \citep{}; however, such approximation is unlikely to reflect empirical phenomena well because the practice often runs in the regime of non-vanishing learning rate \citep{liu2020stochastic}; (2) the hessian approximation: this approximation relies on a series of approximations, and approximates the noise covariance as $C \approx H(\mathbf{w}^*)$, where $H(\mathbf{w}^*$ is the hessian at the local minimum $\mathbf{w}^*$. While this approximation tend to hold qualitatively, it has been shown that its prediction may deviate very far from truth. In this work, we propose to solve the stationary fluctuation of SGD analytically. This will, we believe, allow us to understand the limitation of the standard approximation and enhance our understand SGD-based learning methods including common deep learning practices. \begin{table}[t!] {\footnotesize \centering \caption{Summary of the results of this work and comparison with previous results. For notational conciseness, we compare the case when all the relevant matrices commute. [Too long]} \label{tab:summary} \vspace{-1EM} \renewcommand\arraystretch{1.4} \begin{tabular}{c|c|c|c} \hline\hline & \multicolumn{2}{c|}{Hessian Approximation} & Exact Solution\\ \hline & Cts-time Approximation & D-time Solution & This Work \\ \hline & { $\Sigma$} & { $\Sigma$} & { $\Sigma$}\\ \hlin Label Noise & $\frac{\lambda}{2S}I_D$ & $\frac{\lambda}{S}(2I_D -\lambda A)^{-1}$ & $\frac{\lambda \sigma^2}{S}\left( 1 + \frac{\lambda \kappa}{S}\right) \left[2 I_D - \lambda \left(1 + \frac{1}{S}\right)A \right]^{-1}$ \\ Input Noise & $\frac{\lambda}{2S}I_D$ & $\frac{\lambda}{S}(2I_D-\lambda K)^{-1}$ & $\frac{\lambda {\rm Tr}[AK^{-1}BU]}{S}\left( 1 + \frac{\lambda \kappa'}{S}\right) \left[2 I_D - \lambda \left(1 + \frac{1}{S}\right)K \right]^{-1}$ \\ $L_2$ Regularization & $\frac{\lambda}{2S}I_D$ & $\frac{\lambda}{S}(2I_D-\lambda K)^{-1}$ & Eq.~\eqref{eq: regularization solution} \\ \hline\hline & { $L_{\rm training}$} & {$L_{\rm training}$} & {$L_{\rm training}$} \\ \hlin Label Noise & $\frac{\lambda}{4S}{\rm Tr}[A]+\frac{1}{2}\sigma^2$ & Eq.~\eqref{eq: label training discrete K approx} & $\frac{\sigma^2}{2}\left(1+\frac{\lambda \kappa}{S}\right)$ \\ Input Noise & $\frac{\lambda}{4S}{\rm Tr}[K]+\frac{1}{2}{\rm Tr}[AK^{-1}BU]$ & Eq.~\eqref{eq: input training discrete K approx} & $\frac{1}{2}{\rm Tr}[AK^{-1}BU]\left(1+\frac{\lambda }{S}\kappa'\right)$ \\ $L_2$ Regularization & $\frac{\lambda}{4S}{\rm Tr}[K]+\frac{1}{2}{\rm Tr}[AK^{-1}\Gamma U]$ & Eq.~\eqref{eq: Kapprox training} & Eq.~\eqref{eq: regularization training loss} \\ \hline\hline & { $L_{\rm test}$} & {$L_{\rm test}$} & {$L_{\rm test}$} \\ \hlin Label Noise & $\frac{\lambda}{4S}{\rm Tr}[A]$ & $\frac{\lambda}{2S}{\rm Tr}[A(2I_D-\lambda A)^{-1}]$ & $\frac{\lambda\sigma^2}{2S}\kappa$ \\ Input Noise & $\frac{\lambda}{4S}{\rm Tr}[A]+\frac{1}{2}{\rm Tr}[B'^{\rm T}AB'U]$ & Eq.~\eqref{eq: input test discrete K approx} & $\frac{\lambda}{2S}{\rm Tr}[AK^{-1}BU] \kappa'+\frac{1}{2}{\rm Tr}[B'^{\rm T}AB'U]$ \\ $L_2$ Regularization & $\frac{\lambda}{4S}{\rm Tr}[A]+\frac{1}{2}{\rm Tr}[AK^{-2}\Gamma^2 U]$ & Eq.~\eqref{eq: Kapprox test} & Eq.~\eqref{eq: regular test loss} \\ \hline\hline \end{tabular} } \end{table} \section{Related Works} Minibatch noise is the major kind of noise involved in the learning of modern neural networks. Empirically, it is a necessary practice because the memory of a modern computer is highly limited while the size of the datasets we use are very large; this demands that the dataset has to be split to ``minibatches" for training. At the same time, using minibatch is also a recommended practice, in the sense that use smaller batch-size often leads to better generalization ability \citep{Hoffer2017}. Therefore, understanding minibatch noise has been one of the major topics in the theory of deep learning. Empirically, quite a lot of interesting things have been noticed about using minibatch technique. For example, it is known to enjoy a scaling relation with the learning rate $\lambda$. [Discuss standard minibatch approximation] [Discuss heavy tail SGD] \section{Theory of Mini-Batch Noise} \label{sec:theory} \subsection{General Setting} We focus on analyzing this kind of mini-batch SGD for its notational conciseness. The average over batches is the gradient of the loss function: $\mathbb{E}\left[\hat{\mathbf{g}}\right]=\mathbf{g}_t:=\nabla L(\mathbf{w}_t)$, where we have used the simplified notation $L(\mathbf{w}):=L(\{x_i, y_i\}_{i=1}^{N}, \mathbf{w})$. Here and through after, we use $\mathbb{E}(\cdot)$ to denote the expectation over batches, and use $\mathbb{E}_{\mathbf{w}}(\cdot)$ to denote the expectation over the stable distribution of the model parameters. The variance of $\hat{\mathbf{g}}_t$ is derived exactly: \begin{align} C(\mathbf{w})= \begin{cases} \frac{1}{S}\left[\frac{N-S+1}{N^2}\sum_{i=1}^{N}\nabla \ell_i \nabla \ell_i^{\rm T}-\nabla L(\mathbf{w})\nabla L(\mathbf{w})^{\rm T} \right],\ (\text{with replacement})\\ \frac{N-S}{S(N-1)}\left[\frac{1}{N}\sum_{i=1}^{N}\nabla \ell_i \nabla \ell_i^{\rm T}-\nabla L(\mathbf{w})\nabla L(\mathbf{w})^{\rm T}\right], \ (\text{without replacement}) \end{cases} \label{eq:noise_cov} \end{align} where we have used the shorthand $\ell_i(\mathbf{w}):= l(x_i, y_i, \mathbf{w})$. In the limit of $S=1$ or $N\to \infty$, two cases coincide. For large $N$, the noise covariance is given by \begin{align} C(\mathbf{w})=\frac{1}{SN}\sum_{i=1}^{N}\nabla \ell_i \nabla \ell_i^{\rm T}-\frac{1}{S}\nabla L(\mathbf{w})\nabla L(\mathbf{w})^{\rm T}. \end{align} The gradient covariance matrix $C$ will be crucial for us to understand the mini-batch noise. Let $H(\mathbf{w})$ denote the Hessian matrix of $L(\mathbf{w})$; the standard literature often uses the approximation $C(\mathbf{w})\approx H(\mathbf{w})$ to study the properties of mini-batch noise; however, the following proposition shows that this approximation can be easily violated and is unlikely to hold in some cases. Regarding the mini-batch covariance matrix $C$, the following result can be easily proved. \begin{proposition}\label{prop: no noise condition} Let $\mathbf{w}_*$ be the solution such that $L(\mathbf{w}_*)=0$, then $C(\mathbf{w}_*)=0$. \end{proposition} This proposition shows that, if our model is expressive enough to memorize all the data points, then at the global minimum, there is no noise. This proposition, though easy to prove, reveals some interesting fundamental property of the mini-batch noise: an over-parametrized model has no fluctuation at asymptotic time. Notice that this proposition shows that the commonly used approximation $C\sim H$ is wrong; since the Hessian matrix is unlikely to vanish in any local minimum, while the noise covariance matrix vanishes. Therefore, as $t\to \infty$, the only kind of model that experiences fluctuation are the ones that are underparametrized, i.e., having insufficient capacity to memorize all the data point. This work aims at deriving analytical facts about the mini-batch noise and the fluctuation it causes at asymptotic-time and close to a local minimum. \subsection{Random Noise in the Label} We focus on the setting where the loss function may be approximated by a quadratic potential\footnote{This work focuses on studying the steady-state aspects of the mini-batch noise; this means that we often take the limit $t\to \infty$; in this late time regime, the dynamics is close to convergence to a local minimum and the quadratic potential approximation should hold well.}. This may be regarded as an approximation to a non-linear model close to a local minimum, or as an exact solution to the linear regression problem. Our loss function then takes the form \begin{equation} L(\mathbf{w}) = \frac{1}{2N}\sum_{i=1}^N(\mathbf{w}^{\rm T} x_i - y_i)^2 \end{equation} where $x_i\in \mathbb{R}^D$ are drawn from a gaussian distribution with symmetric covariance matrix $A:= \mathbb{E}[xx^{\rm T}]$, and $y_i=\mathbf{u}^{\rm{T}}x_i + \epsilon_i$, for some fixed $\mathbf{u}$ and $\epsilon_i \in \mathbb{R}$ are drawn from a distribution with zero mean and finite second momentum $\sigma^2$. By proposition~\ref{prop: no noise condition}, in the regime $D\geq N$, the loss function can be reduced to zero and there is no randomness as $t\to \infty$; therefore, we first focus on the case when $D<N$. We first deal with the case when $N \to \infty$; when $N\to\infty,\ S=1$, we recover the standard online learning setting; when $S>1$, we are in a generalized online setting, where the model receives $S$ data point for every new update. We start with redefining $\mathbf{w} -\mathbf{u} \to \mathbf{w} $, which is a standard trick to simplify notation. Now, we are ready to write down the covariance matrix for the noise: \begin{align} C(\mathbf{w})&=\frac{1}{NS} \sum_{i=1}^{N}\nabla l_i(\mathbf{w}_{t-1}) \nabla l_i(\mathbf{w}_{t-1})^{\rm T} - \frac{1}{S}\nabla L(\mathbf{w}_{t-1})\nabla L(\mathbf{w}_{t-1})^{\rm T}\nonumber\\ &= \frac{1}{S} \frac{1}{N}\sum_i^N(\mathbf{w}^{\rm T}x_i - \epsilon_i)x_i x_i^{\rm T}(\mathbf{w}^{\rm T}x_i - \epsilon_i)^{\rm T} - \frac{1}{S}\left[\frac{1}{N}\sum_i^N (\mathbf{w}^{\rm T}x_i - \epsilon_i)x_i\right]\left[\frac{1}{N}\sum_j^N x_j^{\rm T}(\mathbf{w}^{\rm T}x_j - \epsilon_j)^{\rm T}\right]\nonumber\\ &= \frac{1}{S} \frac{1}{N}\sum_i^N(\mathbf{w}^{\rm T} x_ix_i x_i^{\rm T}x_i^{\rm T} \mathbf{w} + \epsilon_i^2 x_ix_i^{\rm T} ) - \frac{1}{S}\left[\frac{1}{N}\sum_i^N(\mathbf{w}^{\rm T} x_ix_i)\right]\left[\frac{1}{N}\sum_j^N(x_i^{\rm T}x_i^{\rm T}\mathbf{w})\right] \label{eq: C sum}\\ &= \frac{1}{S}(A\mathbf{w}\mathbf{w}^{\rm T}A + {\rm Tr}[A\mathbf{w}\mathbf{w}^{\rm T}]A + \sigma^2 A ), \label{eq: C large number} \end{align} where we have invoked the law of large numbers and the expectation of product of four Gaussian random variables in the third line as detailed in Appendix~\ref{App: large number}. Writing $\Sigma:=\mathbb{E}_{\mathbf{w}}[\mathbf{w}\mathbf{w}^{\rm T}]$, we obtain \begin{equation} \mathbb{E}_\mathbf{w}[C(\mathbf{w})] =: C = \frac{1}{S}(A\Sigma A + {\rm Tr}[A\Sigma]A+ \sigma^2 A). \end{equation} We can now plug this into the general solution obtained in a recent work \citep{liu2020stochastic} to obtain that \begin{equation} \Sigma A + A\Sigma - \lambda\left(1 + \frac{1}{S} \right) A \Sigma A - \lambda\frac{1}{S}{\rm Tr}[A\Sigma]A = \lambda \frac{1}{S} \sigma^2 A, \label{eq: matrixeq label} \end{equation} or, \begin{equation} \left [I_D - \frac{\lambda}{2}\left(1 + \frac{1}{S} \right)A \right]\Sigma A + A\Sigma \left [I_D - \frac{\lambda}{2}\left(1 + \frac{1}{S} \right) A \right] - \lambda\frac{1}{S}{\rm Tr}[A\Sigma]A = \lambda\frac{1}{S} \sigma^2 A \end{equation} To solve this, we first need to find ${\rm Tr}[A\Sigma]$. Multiplying by $G^{-1}: = \left [2I_D - \lambda\left(1 + \frac{1}{S} \right)A \right]^{-1}$ and taking trace, we obtain \begin{equation*} {\rm Tr}[A\Sigma] - \lambda \frac{1}{S} {\rm Tr}[A\Sigma] {\rm Tr} [A G^{-1} ] =\lambda \frac{1}{S} \sigma^2 {\rm Tr}[ A G^{-1} ], \end{equation*} which solves to \begin{equation} {\rm Tr}[A\Sigma] = \lambda\frac{\sigma^2}{S} \frac{ {\rm Tr}[AG^{-1}]}{1 - \frac{\lambda}{S}{\rm Tr} [AG^{-1}]} := \frac{\lambda\sigma^2}{S}\kappa, \end{equation} which is a complicated term and does not seem to be simplifiable. Now, the solution to $\Sigma$ is \begin{equation}\label{eq: solution} \Sigma = \frac{\lambda \sigma^2}{S}\left( 1 + \frac{\lambda \kappa}{S}\right) \left[2 I_D - \lambda \left(1 + \frac{1}{S}\right)A \right]^{-1}. \end{equation} There are a few interesting things about this result. The first corroborates our result in the previous section. When $\sigma^2=0$, then $\Sigma=0$. This means that when zero training loss is achieveable, then the final model parameter has no variance. For SGD with momentum, by applying the results derived in \cite{liu2020stochastic}, the form of the solution is similar with simply replacing $G$ by $G_M:=2(1-\mu)I_D-\lambda\left(\frac{1-\mu}{1+\mu}+\frac{1}{S}\right)A$. The second effect of minibatch noise is the term $1+1/S$ appearing in the denominator. We notice that a stable distribution only exits if $2>\lambda(1 + 1/S)a^*$, where $a^*$ is the largest eigenvalue of $A$, and this term can be seen as the ill-condition caused by using a larger step, and the first observation is that, when minibatch noise exists, it exacerbates the ill-conditioning problem and making the dynamics easier to diverge. When the noise is white gaussian, the dynamics converges only when $\lambda a^*<2$ \citep{liu2020stochastic}; for mini-batch noise, this bound reduces to $\lambda a^*<2S/(S + 1)$: one needs to use smaller learning rate to avoid divergence. The third effect is seen in the term $1+ \lambda \kappa/S$. This also causes the fluctuation of $\Sigma$ to increase, compared to the continuous dynamics. Notice that we can also write \eqref{eq: solution} as \begin{equation} \Sigma = \frac{\lambda \sigma^2}{S}\left( \frac{1}{1 - \frac{\lambda}{S}{\rm Tr}[AG^{-1}]}\right) \left[2 I_D - \lambda \left(1 + \frac{1}{S}\right)A \right]^{-1}. \end{equation} Therefore, one additional source of divergence emerges at $1<\frac{\lambda}{S}{\rm Tr}[AG^{-1}]$. Solving for this, we obtain that the condition for convergence is \begin{equation} 2S > \sum_i^D \left|\frac{\lambda a_i}{1 - \lambda\left(\frac{1+S}{2S}\right) a_i}\right|; \end{equation} this cannot be solved exactly, but this is a stronger condition than the first condition that $\lambda a^*<\frac{2S}{(1 + S)}$; we have that a necessary condition for above inequality to hold is that \begin{equation} 2S > \frac{\lambda a^*}{1 - \lambda\left(\frac{1+S}{2S}\right) a^*} \longrightarrow \lambda a^* < \frac{2S}{2+S} < \frac{2S}{(1 + S)}. \end{equation} When $S=1$, we need to set the learning rate such that $\lambda a^*<\frac{2}{3}$ for convergence. The sufficient condition for convergence is \begin{equation} \lambda a^* < \frac{2S}{1 + D + S} \end{equation} which is tight in the extreme case when $a_1\approx a_2\approx... \approx a_D \approx a^*$. This means that for high dimensional problems where the data has full rank, one needs to use proportionally smaller learning rate. It is worth discussing a few limiting cases; when $\lambda \ll 1$ and $1 \ll S$, we have \begin{equation} \Sigma \approx \frac{\sigma^2}{2\lambda S} I_D, \end{equation} which reduces to the standard approximation that $C\approx A$. Now we calculate the approximation error, that is the expected training loss, resulting from mini-batch noise. As in \cite{liu2020stochastic}, the approximation error is \begin{equation} L_{\rm training}:=\mathbb{E}_{\mathbf{w}}[L(\mathbf{w})] = \frac{1}{2}{\rm Tr}[A\Sigma]+\frac{1}{2}\sigma^2 = \frac{1}{2} \frac{\lambda\sigma^2}{S}\kappa+\frac{1}{2}\sigma^2 =\frac{\sigma^2}{2}\left(1+\frac{\lambda \kappa}{S}\right). \label{eq: trainingloss label} \end{equation} The test loss defined as $L_{\rm test}:=\frac{1}{2}\mathbb{E}_{\mathbf{w}}\mathbb{E}\left[(\mathbf{w}^{\rm T}x)^2\right]$ is given by \begin{align} L_{\rm test}=\frac{1}{2}\mathbb{E}_{\mathbf{w}}\left[\mathbf{w}^{\rm T}A\mathbf{w}\right] = \frac{\lambda\sigma^2}{2S}\kappa.\label{eq: testloss label} \end{align} When the learning rate $\lambda$ is vanishingly small, the expected test loss diminishes whereas the training error remains finite as long as label noise exists. See Figure~\ref{fig:label noise}, where we run a $1d$ experiment, with $N=10000$ and $\sigma^2 = 0.25$. We see that the proposed theory agrees with experiment across all ranges of $S$ and $\lambda$. The continuous-time hessian approximation almost fail everywhere, while the recently proposed discrete-time hessian approximation fails when $S$ is small or when $\lambda$ is large. \begin{figure}[htb] \centering \begin{subfigure}{0.4\linewidth} \includegraphics[width=\linewidth]{plots/label_noise/comparison_label_noise_S.png} \vspace{-1em} \caption{$a=1.5$, $\lambda=1$} \end{subfigure} \begin{subfigure}{0.4\linewidth} \includegraphics[width=\linewidth]{plots/label_noise/comparison_label_noise_lambda.png} \vspace{-1em} \caption{$a=1$, $S=10$} \end{subfigure} \begin{subfigure}{0.4\linewidth} \includegraphics[width=\linewidth]{plots/label_noise/2d-S-100.png} \vspace{-1em} \caption{$\lambda=1.6$, $a_1=1,\ a_2=0.5$, $S=100$} \end{subfigure} \begin{subfigure}{0.38\linewidth} \includegraphics[width=\linewidth]{plots/label_noise/2d-S-10.png} \vspace{-1em} \caption{$\lambda=1.6$, $a_1=1,\ a_2=0.5$, $S=10$} \end{subfigure} \vspace{-0.5em} \caption{Experiment with label noise. (a-b) $1$d experiments. (c-d) $2$d experiments.} \label{fig:label noise} \end{figure} \subsection{Random Noise in the Input} A second potential source of noise is randomness in the input data. This also causes the data complexity to rise and creates asymptotic noise in the training. We assume that the training data points $\tilde{x}_i = x_i + \eta_i$ can be decomposed into a signal part and a random part. As before, we assume Gaussian distributions so that the results are analytically solvable, $x_i \sim \mathcal{N}(0, A)$ and $\eta_i \sim \mathcal{N}(0, B)$. Equivalently, the problem remains analytically solvable if we replace the Gaussian assumption by the weaker condition that the fourth order moment exist and takes some matrix form. For now we assume that there is no noise in the label, namely $y_i=\mathbf{u}^{\rm T}x_i$ with a constant vector $\mathbf{u}$. When the noise is input dependent, the noise is also dependent on $\mathbf{u}$. We denote its outer-product as $\mathbf{u} \mathbf{u}^{\rm T} := U$. Notice that the trick $\mathbf{w} - \mathbf{u} = \mathbf{w}$ no more works, and so we write the difference explicitly here. It is worthwhile to explicitly write the expression of the loss function by invoking the law of large numbers as \begin{align} L(\mathbf{w})&=\frac{1}{2N}\sum_{i=1}^{N}\left[(\mathbf{w}-\mathbf{u})^{\rm T}x_i + \mathbf{w}^{\rm T}\eta_i\right]^2\nonumber\\ &=\frac{1}{2}(\mathbf{w}-\mathbf{u})^{\rm T}A(\mathbf{w}-\mathbf{u})+\frac{1}{2}\mathbf{w}^{\rm T}B\mathbf{w}. \end{align} Taking the gradient of the loss function yields \begin{align} \nabla L(\mathbf{w})=(A+B)(\mathbf{w}-\mathbf{u})+B\mathbf{u}. \end{align} The gradient vanishes at $\mathbf{w}_*:=(A+B)^{-1}A\mathbf{u}$, which is the minimum of the loss function and the mean of the parameter stabel distribution. It can be seen that, even at the minimum $\mathbf{w}_*$, the loss function remains finite unless $\mathbf{u}=0$, which suggests that in the presence of input noise, the expressivity of the network is not sufficient enough to capture all the information of the data so that the training error will never become zero. Now we define $\mathbb{E}_{\mathbf{w}}\left[(\mathbf{w}-\mathbf{w}_*)(\mathbf{w}-\mathbf{w}_*)^{\rm T}\right] = \Sigma$, then we have \begin{align} &\mathbb{E}_{\mathbf{w}}[\mathbf{w}\mathbf{w}^{\rm T}]=\Sigma+(A+B)^{-1}AUA(A+B)^{-1}:=\Sigma+A'UA'^{\rm T}:=\Sigma_A,\\ &\mathbb{E}_{\mathbf{w}}\left[(\mathbf{w}-\mathbf{u})(\mathbf{w}-\mathbf{u})^{\rm T}\right]=\Sigma+B'UB'^{\rm T}:=\Sigma_B, \end{align} where we use the shorthand notations $A':=(A+B)^{-1}A$, $B':=(A+B)^{-1}B$ and $\Sigma_{A}:=\Sigma+A'UA'^{\rm T}$, $\Sigma_{B}:=\Sigma+B'UB'^{\rm T}$. We remark that the covariance matrix $\Sigma$ here still satisfies the matrix equations derived in \cite{liu2020stochastic} with the Hessian being $(A+B)$. The noise term then takes the form \begin{align} C(\mathbf{w}) &= \frac{1}{S} \frac{1}{N}\sum_i^N(\mathbf{w}^{\rm T}\tilde{x}_i - \mathbf{u}^{\rm T}{x}_i )\tilde{x}_i \tilde{x}_i^{\rm T}(\mathbf{w}^{\rm T}\tilde{x}_i - \mathbf{u}^{\rm T}{x}_i )^{\rm T} - \frac{1}{S}\nabla L(\mathbf{w})\nabla L(\mathbf{w})^{\rm T} \nonumber\\ &= \frac{1}{S} \big\{ A(\mathbf{w} -\mathbf{u}) (\mathbf{w}-\mathbf{u})^{\rm T} A + B\mathbf{w}\mathbf{w}^{\rm T} B + A(\mathbf{w}-\mathbf{u})\mathbf{w}^{\rm T}B+B\mathbf{w}(\mathbf{w}-\mathbf{u})^{\rm T}A \nonumber\\ &\qquad\ + {\rm Tr}[A(\mathbf{w} -\mathbf{u}) (\mathbf{w}-\mathbf{u})^{\rm T} ](A +B) + {\rm Tr}[B \mathbf{w}\mathbf{w}^{\rm T} ](A+B) \big\},\label{eq: C of input large number} \end{align} and the asymptotic noise can be found as \begin{align} C&:=\mathbb{E}_{\mathbf{w}}[C(\mathbf{w})]\nonumber\\ &=\frac{1}{S} \left\{ (A+B)\Sigma(A+B)+ {\rm Tr}[A\Sigma_B +B\Sigma_A](A+B) \right \}\\ &:=\frac{1}{S} \left\{ K\Sigma K+ {\rm Tr}[K\Sigma]K + {\rm Tr}[AK^{-1}BU]K \right \},\label{eq: C of input} \end{align} where $K:=A+B$. The details of deriving this noise covariance can be found in Appendix~\ref{App: C of input}. It can be seen that the form of the covariance \eqref{eq: C of input} of input noise is similar to that of label noise \eqref{eq: C large number} with replacing $A$ by $K$ and replacing $\sigma^2$ by ${\rm Tr}[AK^{-1}BU]$. This means that these two types of noise have a similar nature. Explicitly, the matrix equation satisfied by $\Sigma$ is given by \begin{align} \Sigma K+K\Sigma - \lambda\left(1+\frac{1}{S}\right)K\Sigma K =\frac{\lambda}{S}\left\{{\rm Tr}[K\Sigma] K +{\rm Tr}[AK^{-1}BU]K\right\}.\label{eq: matrix eq of input} \end{align} From it, we can obtain ${\rm Tr}[K\Sigma]$: \begin{align} {\rm Tr}[K\Sigma]=\frac{\lambda {\rm Tr}[AK^{-1}BU]}{S}\kappa', \label{eq: trace of input} \end{align} where $\kappa':=\frac{ {\rm Tr}[KG'^{-1}]}{1 - \lambda \frac{1}{S}{\rm Tr} [KG'^{-1}]}$ with $G':=2I_D - \lambda\left(1 + \frac{1}{S} \right)K$. With Eq.~\eqref{eq: matrix eq of input}, we are able to derive the training error and the test error. The training loss is given by \begin{align} L_{\rm training}&=\frac{1}{2}{\rm Tr}[A\Sigma_B +B\Sigma_A]\nonumber\\ &=\frac{1}{2}{\rm Tr}[AK^{-1}BU]\left(1+\frac{\lambda }{S}\kappa'\right). \end{align} Noticeably, the training loss decomposes to two additive terms. The term that is proportional to $1$ is the bias, caused by having insufficient model expressivity to fit all the data points perfect, while the second term that is proportional to $\lambda \kappa'/S$ is the variance in model parameter, induced by the randomness of minibatch noise. The test error is defined as $L_{\rm test}:=\frac{1}{2}\mathbb{E}_{\mathbf{w}} \mathbb{E} \left[(\mathbf{w}^{\rm T}x-\mathbf{u}^{\rm T}x)^2\right]$. From Eq.~\eqref{eq: matrix eq of input}, the test loss again takes the form of a bias-variance tradeoff: \begin{align} L_{\rm test}&=\frac{1}{2}\mathbb{E}_{\mathbf{w}}\left[(\mathbf{w}-\mathbf{u})^{\rm T}A(\mathbf{w}-\mathbf{u})\right]=\frac{1}{2}{\rm Tr}[A\Sigma_B]\nonumber\\ &=\frac{\lambda}{2S}{\rm Tr}[AK^{-1}BU]\left( 1 + \frac{\lambda \kappa'}{S}\right){\rm Tr}[AG'^{-1}]+\frac{1}{2}{\rm Tr}[B'^{\rm T}AB'U]\nonumber\\ &= \frac{\lambda}{2S}{\rm Tr}[AK^{-1}BU] \kappa'+\frac{1}{2}{\rm Tr}[B'^{\rm T}AB'U]. \end{align} It is obvious that the test loss is always smaller than or equal to the training loss because all matrices involved here are positive-semidefinite. In order to solve for $\Sigma$ explicitly, we have to assume that $[K,U]=0$ because $\Sigma$ is a function of $K$ and $U$. Under such assumption, we can obtain the solution to $\Sigma$ by simply replacing terms in Eq.~\eqref{eq: solution} as \begin{align} \Sigma=\frac{\lambda {\rm Tr}[AK^{-1}BU]}{S}\left( 1 + \frac{\lambda \kappa'}{S}\right) \left[2 I_D - \lambda \left(1 + \frac{1}{S}\right)K \right]^{-1}. \label{eq: solution of input} \end{align} In general, this assumption does not hold so that we can only know the training and test error exactly. [TODO] \subsection{Learning with Regularization} In this section, we show that regularization also induces mini-batch noise. Especially, we consider a generalize form of $L_2$ regularization in this section. The loss function for $\Gamma-L_2$ regularized linear regression is \begin{align} L_\Gamma(\mathbf{w}) &=\frac{1}{2N}\sum_{i=1}^{N}\left[(\mathbf{w}-\mathbf{u})^{\rm T}x_i\right]^2 + \frac{1}{2} \mathbf{w}^{\rm T} \Gamma \mathbf{w}\nonumber\\ &=\frac{1}{2}(\mathbf{w}-\mathbf{u})^{\rm T}A(\mathbf{w}-\mathbf{u})+ \frac{1}{2} \mathbf{w}^{\rm T} \Gamma \mathbf{w}, \end{align} where $\Gamma$ is a symmetric matrix. Conventionally, $\Gamma=\gamma I_D$ for a scalar $\gamma>0$. The covariance matrix of the noise is then given by \begin{align} C(\mathbf{w}) &= \frac{1}{S} \frac{1}{N}\sum_i^N\left[(\mathbf{w}-\mathbf{u})^{\rm T}x_i x_i+ \Gamma\mathbf{w}\right]\left[x_i^{\rm T} x_i^{\rm T}(\mathbf{w}-\mathbf{u})+ \mathbf{w}^{\rm T}\Gamma\right] - \frac{1}{S}\nabla L_\Gamma(\mathbf{w})\nabla L_\Gamma(\mathbf{w})^{\rm T} \nonumber\\ &= \frac{1}{S} \big\{ A(\mathbf{w} -\mathbf{u}) (\mathbf{w}-\mathbf{u})^{\rm T} A + {\rm Tr}[A(\mathbf{w} -\mathbf{u}) (\mathbf{w}-\mathbf{u})^{\rm T} ]A \big\},\label{eq: C of regular large number} \end{align} and the asymptotic noise can be found as \begin{align} C=\frac{1}{S}\left(A\Sigma A+{\rm Tr}[A\Sigma]A+{\rm Tr}[\Gamma'^{\rm T} A\Gamma' U]A + \Gamma A' U A' \Gamma\right),\label{eq: C of regular} \end{align} where we have assumed $[A,\Gamma]=0$ to make the equation solvable. The matrix equation obeyed by $\Sigma$ reads \begin{align} \Sigma K + K \Sigma -\lambda K\Sigma K -\frac{\lambda}{S}A \Sigma A=\frac{\lambda}{S}{\rm Tr}[A\Sigma]A+\frac{\lambda}{S}\left({\rm Tr}[AK^{-2}\Gamma^2 U]A + AK^{-1}\Gamma U \Gamma K^{-1} A\right), \label{eq: matrixeq of regular} \end{align} with shorthand notation $K:= A+\Gamma$. The trace term ${\rm Tr}[A\Sigma]$ is given by \begin{align} {\rm Tr}[A\Sigma]=\frac{\lambda}{S}\left({\rm Tr}[AK^{-2} \Gamma^2 U]\kappa + \alpha\right), \end{align} where \begin{align} &\kappa:=\frac{{\rm Tr}[A^2 K^{-1}G^{-1}]}{1-\frac{\lambda}{S}{\rm Tr}[A^2 K^{-1}G^{-1}]},\nonumber\\ &\alpha:=\frac{{\rm Tr}[A^3 K^{-3} \Gamma^2 G^{-1}U]}{1-\frac{\lambda}{S}{\rm Tr}[A^2 K^{-1} G^{-1}]}, \end{align} and \begin{align} G:=2I_D-\lambda\left(K+\frac{1}{S}K^{-1}A^2\right). \end{align} Without assuming $[A,\Gamma]=0$, we cannot derive ${\rm Tr}[A\Sigma]$. Similarly, we can derive the training error and the test error via Eq.~\eqref{eq: matrixeq of regular}. The training error is given by \begin{align} L_{\rm training}&=\frac{1}{2}{\rm Tr}[A\Sigma_{\Gamma} +\Gamma\Sigma_A]\nonumber\\ &=\frac{1}{2}{\rm Tr}[K\Sigma] + \frac{1}{2}{\rm Tr}[AK^{-1}\Gamma U]\nonumber\\ &=\frac{\lambda}{2S}{\rm Tr}[AK^{-2}\Gamma^2 U ]{\rm Tr}[AG^{-1}]\left(1+\frac{\lambda \kappa}{S}\right)+\frac{\lambda}{2S}\left({\rm Tr}[A^2 K^{-2}\Gamma^2 G^{-1}U]+\frac{\lambda \alpha}{S}{\rm Tr}[AG^{-1}]\right)+\frac{1}{2}{\rm Tr}[AK^{-1}\Gamma U].\label{eq: regularization training loss} \end{align} The test loss is derived as well: \begin{align} L_{\rm test}&=\frac{1}{2}\mathbb{E}_{\mathbf{w}} \mathbb{E} \left[(\mathbf{w}^{\rm T}x-\mathbf{u}^{\rm T}x)^2\right]\nonumber\\ &=\frac{1}{2}\mathbb{E}_{\mathbf{w}}\left[(\mathbf{w}-\mathbf{u})^{\rm T}A(\mathbf{w}-\mathbf{u})\right]=\frac{1}{2}{\rm Tr}[A\Sigma_{\Gamma}]\nonumber\\ &= \frac{\lambda}{2S}\left({\rm Tr}[AK^{-2}\Gamma^2 U ]\kappa+\alpha\right)+\frac{1}{2}{\rm Tr}[AK^{-2}\Gamma^2U].\label{eq: regular test loss} \end{align} Because $\Gamma$ may not be positive-semidefinite, the test loss is possible to be larger than the training loss, which is different from the input noise case. Again, if $A$, $\Gamma$ and $U$ commute with each other, we can explicitly solve for $\Sigma$: \begin{align} \Sigma=\frac{\lambda}{S}{\rm Tr}[AK^{-2}\Gamma^2U]\left(1+\frac{\lambda \kappa}{S}\right)AK^{-1}G^{-1}+\frac{\lambda}{S}\left(A^2 K^{-2}\Gamma^2 U+\frac{\lambda \alpha}{S}A \right)K^{-1}G^{-1}.\label{eq: regularization solution} \end{align} \subsection{Minibath Noise in the High-Dimensional Limit} In this section, we consider the limiting case when $N,\ D\to \infty$ while keeping the ratio $\alpha:=\frac{N}{D}$ fixed. When $\alpha > 1$, the model is said to be underparametrized, and when $\alpha<1$, the model is said to be overparametrized. As we have seen above, the case of input noise is qualitatively the same as label noise, but with a shifted data covariance matrix; therefore, for notational conciseness, we focus on the case of label noise in this section. \begin{figure}[t!] \centering \begin{subfigure}{0.45\linewidth} \includegraphics[width=\linewidth]{plots/label_phase.png} \vspace{-2em} \caption{phase diagram of label noise} \end{subfigure} \begin{subfigure}{0.45\linewidth} \includegraphics[width=\linewidth]{plots/regularization_phase_lambda_to_gamma.png} \vspace{-2em} \caption{phase diagram of regularization, $\lambda$ to $\gamma$} \end{subfigure} \begin{subfigure}{0.45\linewidth} \includegraphics[width=\linewidth]{plots/regularization_phase_S_to_gamma_small_lambda.png} \vspace{-2em} \caption{regularization, $S$ to $\gamma$ with $a\lambda<\sqrt{\frac{1}{2}}$} \end{subfigure} \begin{subfigure}{0.45\linewidth} \includegraphics[width=\linewidth]{plots/regularization_phase_S_to_gamma_large_lambda.png} \vspace{-2em} \caption{regularization, $S$ to $\gamma$ with $a\lambda>\sqrt{\frac{1}{2}}$} \end{subfigure} \caption{I-div denotes the phase where the first moment or the mean of the model parameter diverges. II-div denotes the phase where the parameter variance diverges. II-con represents the phase where the variance is finite. (a) The blue curve shows the divergence condition that $S=\frac{2a\lambda}{2-a\lambda}$ resulting from $1-\frac{\lambda}{S}{\rm Tr}[AG^{-1}]=0$. The red vertical line shows the divergence of the first moment, namely $a\lambda=2$. (b) Phase diagram of regularization with fixed $S$. The blue curve is $\lambda = \frac{2(a+\gamma)}{(a+\gamma)^2+\frac{2}{S}a^2}$ from the divergence condition. (c)-(d) Regularization with fixed $\lambda$. (c) While $a\lambda<\sqrt{\frac{1}{2}}$, the blue curve $S=\frac{2a^2\lambda^2}{-\lambda^2 (a+\gamma)^2+2\lambda(a+\gamma)}$ intersects with $S=1$. In the horizontal axis, we denote $a_1:=\frac{1-a\lambda-\sqrt{1-2a^2\lambda^2}}{\lambda}$ and $a_2:=\frac{1-a\lambda+\sqrt{1-2a^2\lambda^2}}{\lambda}$. (d) While $a\lambda>\sqrt{\frac{1}{2}}$, the blue curve is always above $S=1$.} \label{fig: phase} \end{figure} \section{Implications of some Specific Cases} \subsection{Phase Diagrams} In Figure~\ref{fig: phase} we plot the phase diagrams for the three types of noise. Figure~\ref{fig: phase}(a) plots the different phases for label noise with fixed $a$. The red region called I-div represents the phase where the first moment namely the mean of the model parameter is divergent while $a\lambda\ge 2$. The blue region is where the variance diverges but the mean exists. Interestingly, a diverging variance does not mean that a stationary distribution does not exist. The reason follows. The mini-batch noise \eqref{eq: C large number} is a state-dependent noise so that the parameter no longer satisfies a Gaussian distribution. It has been suggested that $\mathbf{w}$ actually obeys a heavy-tail power law \citep{Simsekli2019tailindex}. As shown in Figure~\ref{fig:tail}(a), the distribution $P(\mathbf{w})$ is found to obey a power law and there exist hyparameters that result in a tail exponent smaller than $2$. The yellow region is where both the variance and the mean exist. Our previous discussions are all within this phase. For input noise and $L_2$ regularization with fixed $\gamma$, the phase diagram is similar to (a) with replacing $a$ by $k$. Because there are 3 hyparameters in regularization, we plot additional phase diagrams for this situation. In Figure~\ref{fig: phase}(b), we plot $\lambda$ versus $\gamma$ with frozen $S$. Figures~\ref{fig: phase}(c)-(d) are the diagrams with fixed $\lambda$. For small learning rate such that $a\lambda<\sqrt{\frac{1}{2}}$, the II-div phase is divided into two. For larger learning rate, too small batch size $S$ is not allowed to have a finite variance. This may be understood in a similar way that the heavy-tail distributions are understood in natural science and social science \citep{}. The heavy-tail distributions is often assumed to take a power law form, with probability density $p(|w|) \sim |w|^{-\beta}$ for some non-negative real-valued $\beta$; this power-law probability density often comes with a cutoff term to prevent divergence when $w$ is small\footnote{This is sometimes called the infrared-cutoff in the physics literature.}. For example, two ways to include infrared cutoffs are $p_\beta(|w|) \sim (|w| + \epsilon)^{-\beta}$ for some small positive $\epsilon$ and $p(|w|) \sim |w|^{-\beta}\exp(-1/|w|)$; as long as we are focus on the behavior of $|w|$ when $|w|$ is large, we do not have care about the exact form of the cutoff, and we therefore omit it from the discussion. A well-known property of a $\beta-$power-law distribution is that its $m$-th moments all diverge for $m\geq \beta - 1$; this can be seen easily: \begin{equation} \mathbb{E}[w^m] = \int_0^\infty dw w^m w^{-\beta} \sim w^{m-\beta + 1}|_\infty = \begin{cases} \infty & \text{if } m-\beta + 1 > 1,\\ 0 & \text{if } m-\beta + 1 < 0;\\ \end{cases} \end{equation} when $m = \beta -1$, one has logarithmic divergence. Therefore, it is reasonable to hypothesize that, in the phase diagrams we considered, the distribution of $w$ is takes a $\beta-$power-law distribution and $\beta=\beta(\lambda, S)$ is a function of the relevant hyperparameters of SGD, such as $\lambda$ and $S$; the line at which the $m$-th moment diverges thus corresponds to the line where $\beta \leq m-1$. We therefore set up experiment to verify this hypothesis. See Figure~\ref{fig:tail}. We fit the distribution of $w$ in the $1$d label noise experiments with a $\beta$ power-law distribution, and we can measure clear tail exponent $\beta$ as a function of $S$ (left). Even more interestingly, the functional form of $\beta(S)$ also seems to be take a power-law form with $\beta(S) \sim S^{0.5}$. Combining these two results, we see that the distribution of $w$ empirically obeys a $S^{0.5}$-power law distribution, and, in turn, suggests that the heavy-tail behavior vanishes as $S\to \infty$. \begin{figure} \centering \includegraphics[width=0.4\linewidth]{plots/label_noise/tail-exponent.png} \includegraphics[width=0.4\linewidth]{plots/label_noise/tail-exponent-loglog.png} \caption{Tail exponent $\beta$ for label noise experiment. We fit probability density of $w$ by $p(w)\sim w^{-\beta}$. $\beta$ is then measured as a function of $S$, which also obeys a power law $\beta(S) \sim S^{\frac{1}{2}}$. This means that $p(w)\sim w^{-S^{0.5}}$.} \label{fig:tail} \end{figure} \subsection{Optimal $\gamma$ for Regularization} For one dimensional case, we use lowercase letters. The training loss is given by \begin{align} L_{\rm training}=\frac{a\gamma}{2(a+\gamma)}\frac{2(a+\gamma)-\lambda\left[(a+\gamma)^2+\frac{2}{S}a(a-\gamma)\right]}{2(a+\gamma)-\lambda\left[(a+\gamma)^2+\frac{2}{S}a^2\right]}u^2. \end{align} The test loss is \begin{align} L_{\rm test}=\frac{a\gamma^2}{2(a+\gamma)}\frac{2-\lambda(a+\gamma)}{2(a+\gamma)-\lambda\left[(a+\gamma)^2+\frac{2}{S}a^2\right]}u^2.\label{eq: 1d test regular} \end{align} For one dimensional case, the condition for convergence is given by $1-\frac{\lambda}{S}{\rm Tr}[A^2 K^{-1}G^{-1}]>0$. Explicitly, \begin{align} \lambda(a+\gamma)^2-2(a+\gamma)+\lambda\frac{2}{S}a^2<0. \end{align} For a given $\gamma$, the requirement for the learning rate is \begin{align} \lambda<\frac{2(a+\gamma)}{(a+\gamma)^2+\frac{2}{S}a^2}. \end{align} For a given $\lambda$, the condition for $\gamma$ is \begin{align} \frac{1-a\lambda-\sqrt{1-\frac{2}{S}a^2 \lambda^2}}{\lambda}<\gamma<\frac{1-a\lambda+\sqrt{1-\frac{2}{S}a^2 \lambda^2}}{\lambda}.\label{eq: gamma condition} \end{align} It indicates a constraint on $\lambda$: \begin{align} a\lambda<\sqrt{\frac{S}{2}}.\label{eq: constriant 1} \end{align} \begin{figure}[htb] \centering \begin{subfigure}{0.4\linewidth} \includegraphics[width=\linewidth]{plots/test_to_S_fixed.pdf} \vspace{-1em} \caption{test loss versus $S$} \end{subfigure} \begin{subfigure}{0.4\linewidth} \includegraphics[width=\linewidth]{plots/test_to_lambda_fixed.pdf} \vspace{-1.5em} \caption{test loss versus $\lambda$} \end{subfigure} \vspace{-0.5em} \caption{(a) Test loss versus $\gamma$ with different batch size $S$. For small $S$, $\gamma$ can take positive values; therefore the optimal $\gamma$ is $0$ as expected. For larger $S$, only negative $\gamma$ is permitted and a clear existence of an optimal value exists and the test loss remains finite. (b) Test error versus $\gamma$ with different learning rate $\lambda$. Here the batch size is set to be $S=50$. For a large enough $S$, if the learning rate is too small, we can still have vanishing optimal $\gamma$ because the condition Eq.~\eqref{eq: constriant 2} is not achieved. While the learning rate gets larger to make the condition fulfilled, negative optimal $\gamma$ appears naturally.} \label{fig:testloss} \end{figure} We are interested in the situation where the optimal $\gamma$ which minimizes the test error \eqref{eq: 1d test regular} is negative. It is obvious that if $\gamma$ is allowed to take positive values according to the constraints \eqref{eq: gamma condition}, the test loss reaches its minimal value $0$ while $\gamma=0$. There is no other $\gamma$ that can make the test loss vanishes because the numerator can never be $0$ due to the convergence condition. We focus on the case where $\gamma$ can only take negative values, therefore the optimal $\gamma$ is also negative. The condition is that the upper bound on $\gamma$ is negative, namely \begin{align} \frac{1-a\lambda+\sqrt{1-\frac{2}{S}a^2 \lambda^2}}{\lambda}<0. \end{align} It translates into \begin{align} a\lambda>\frac{2}{1+\frac{2}{S}}. \label{eq: constriant 2} \end{align} Combining with Eq.~\eqref{eq: constriant 1}, we obtain the necessary condition for negative optimal $\gamma$: \begin{align} \frac{2}{1+\frac{2}{S}}<\sqrt{\frac{S}{2}} \to (S-2)^2>0 \to S\ne 2. \end{align} We plot in Figure~\ref{fig:testloss} the test loss \eqref{eq: 1d test regular} to see the optimal $\gamma$ while varying either $S$ or $\lambda$. With negative optimal $\gamma$, the test loss is always finite. \begin{figure}[htb] \centering \begin{subfigure}{0.4\linewidth} \includegraphics[width=\linewidth]{plots/regularization/comparison-L2-1-0_5-1.png} \vspace{-1em} \caption{$a=1$, $\lambda=0.5$, $S=1$} \end{subfigure} \begin{subfigure}{0.4\linewidth} \includegraphics[width=\linewidth]{plots/regularization/comparison-L2-4-1-64.png} \vspace{-1em} \caption{$a=4$, $\lambda=1$, $S=64$} \end{subfigure} \vspace{-0.5em} \caption{Experiment with $L_2$ regularization with weight decay strength $\gamma$. } \label{fig:regularization} \end{figure} For higher dimension, it is possible to calculate the optimal $\gamma$ for minimizing the test loss \eqref{eq: regular test loss} as well. Specifically, the condition is given by \begin{align} \frac{d}{d\gamma}L_{\rm test}:=\frac{1}{2}\frac{d}{d\gamma}\frac{f(\gamma)}{g(\gamma)}=0, \end{align} where \begin{align} &f(\gamma):=\gamma^2{\rm Tr}\left[AK^{-2}\left(I_D + \frac{\lambda}{S}A^2 K^{-1} G^{-1}\right)U\right],\\ &g(\gamma):=1-\frac{\lambda}{S}{\rm Tr}[A^2 K^{-1} G^{-1}]. \end{align} Although it is impossible to solve the equation analytically, it can be solved numerically. \subsection{Limiting Cases in Learning with Regularization} It is worth considering several limiting cases of $\Gamma$. We define the effective noise as \begin{align} X:=\frac{1}{S}\left({\rm Tr} [AK^{-2}\Gamma^2 U]A+AK^{-1}\Gamma U \Gamma K^{-1}A\right). \end{align} When $\Gamma$ is very small, the effective noise $X$ can be expanded in increasing order of $\Gamma$ as \begin{equation} X = \frac{1}{S}\left(\Gamma U \Gamma + {\rm Tr}[A^{-1} \Gamma^2 U]A\right) + \mathcal{O}(\Gamma^3), \end{equation} where the first term is rank-1 and the second term is full rank. If $\Gamma= \gamma I_D$ for some small scalar $\gamma$, we have \begin{align} X=\frac{\gamma^2}{S}\left(U+{\rm Tr}[A^{-1}U]A\right). \end{align} If the rank-1 matrix $U$ aligns with the $i$-th eigenvalue of $A$, the prefactor in the full-rank term should be ${\rm Tr}[A^{-1}U]=u_i / a_i$. If it aligns with the largest eigenvalue, the rank-1 contribution in $X$ is comparable to the full-rank contribution; if it aligns with the smallest eigenvalue, the full-rank contribution dominates. On the other hand, when $\Gamma$ is very large, we have the limit \begin{equation} X = \frac{1}{S}\left(AUA + {\rm Tr}[AU] A\right) + O (\Gamma^{-1}). \end{equation} The interesting fact is that the noise becomes insensitive to $\Gamma$ as $\Gamma$ becomes very large. \subsection{Comparison between Regularization and Input Noise} To compare learning with regularization with the case with input noise, we set $\Gamma=B$ with the assumption $[A,B]=0$. We show that while $A\ge B$ in the sense that $A-B$ is positive-semidefinite, the test loss of input noise with $B$ is always larger than that of weight decay regularization with $\Gamma=B$. Because the final term in both expressions is the same, we take the difference of the first term. \begin{align} \Delta&:={\rm Tr}[AK^{-1}BU]\kappa'-{\rm Tr}[AK^{-2}B^2U]\kappa-\alpha\nonumber\\ &= \frac{{\rm Tr}[AK^{-1}BU] {\rm Tr}[KG'^{-1}]}{1 - \lambda \frac{1}{S}{\rm Tr} [KG'^{-1}]}-\frac{{\rm Tr}[AK^{-2}B^2U]{\rm Tr}[A^2 K^{-1}G^{-1}]}{1-\frac{\lambda}{S}{\rm Tr}[A^2K^{-1}G^{-1}]} - \frac{{\rm Tr}[A^3 K^{-3}B^2G^{-1}U]}{1-\frac{\lambda}{S}{\rm Tr}[A^2K^{-1}G^{-1}]}. \end{align} Because $B$ is positive-semidefinite, we have \begin{align} G\ge G'. \end{align} Therefore, \begin{align} \Delta&\ge \frac{1}{1-\frac{\lambda}{S}{\rm Tr}[A^2K^{-1}G^{-1}]}\left[{\rm Tr}[A^2K^{-2}BU]{\rm Tr}[A^2K^{-1}G^{-1}]-{\rm Tr}[A^3 K^{-3}B^2G^{-1}U]\right]\nonumber\\ &\ge\frac{1}{1-\frac{\lambda}{S}{\rm Tr}[A^2K^{-1}G^{-1}]}{\rm Tr}\left[A^4K^{-3}BG^{-1}U-A^3 K^{-3}B^2G^{-1}U\right]\nonumber\\ &\ge \frac{1}{1-\frac{\lambda}{S}{\rm Tr}[A^2K^{-1}G^{-1}]}{\rm Tr}\left[(A-B)A^3K^{-3}BG^{-1}U\right], \end{align} where we used ${\rm Tr}[A]I_D\ge A$ in the second line. If $A\ge B$, it follows that $\Delta\ge 0$, which means that the test error of input noise is not smaller than that of weight decay while $\Gamma=B$. \section{Comparison with Conventional Hessian Approximation} We compare our results for the three cases with the conventional Hessian approximation of the noise covariance that $C\approx \frac{K}{S}$ with $K$ being the Hessian of the loss function. \subsection{Label Noise} We first consider discrete-time dynamics with the Hessian approximation. The matrix equation is given by \begin{align} \Sigma A + A\Sigma -\lambda A \Sigma A=\frac{\lambda}{S} A. \end{align} Comparing to the exact result \eqref{eq: matrixeq label}, it is a large $S$ limit up to the constant $\sigma^2$. This constant factor is ignored during the approximation that $J(\mathbf{w}):=\mathbb{E}[\nabla l\nabla l^{\rm T}]\approx \mathbb{E}[\nabla \nabla^{\rm T} l]:=K(\mathbf{w})$, which is exact only when $l(\{x_i\},\mathbf{w})$ is a \textit{negative log likelihood} function of $\mathbf{w}$. Solving the matrix equation yields the fluctuation as \begin{align} \Sigma = \frac{\lambda}{S}(2I_D -\lambda A)^{-1}. \end{align} The training loss and test loss are given respectively: \begin{align} &L_{\rm training}=\frac{\lambda}{2S}{\rm Tr}[A(2I_D-\lambda A)^{-1}]+\frac{1}{2}\sigma^2,\label{eq: label training discrete K approx}\\ &L_{\rm test}=\frac{\lambda}{2S}{\rm Tr}[A(2I_D-\lambda A)^{-1}].\label{eq: label test discrete K approx} \end{align} By taking the large $S$ limit directly from our exact equation \eqref{eq: matrixeq label}, the factor $\sigma^2$ is present: \begin{align} \Sigma A + A\Sigma -\lambda A \Sigma A=\frac{\lambda}{S}\sigma^2 A. \end{align} For the continuous-time limit with Hessian approximation, the matrix equation is \begin{align} \Sigma A + A\Sigma=\frac{\lambda}{S} A, \end{align} which is the small $\lambda$ limit up to the factor $\sigma^2$. The variance is solved as \begin{align} \Sigma=\frac{\lambda}{2S}I_D. \end{align} The training and test error are \begin{align} &L_{\rm training}=\frac{\lambda}{4S}{\rm Tr}[A]+\frac{1}{2}\sigma^2,\\ &L_{\rm test}=\frac{\lambda}{4S}{\rm Tr}[A]. \end{align} Again, taking the small $\lambda$ limit directly from our result yields the presence of the factor $\sigma^2$ on the right hand side of the matrix equation. \subsection{Input Noise} The case with input noise is similar to the previous one with replacing $A$ by $K$ and $\sigma^2$ by ${\rm Tr}[AK^{-1}BU]$. The model parameter variance resulting from the discrete-time dynamics under the Hessian approximation is given by \begin{align} \Sigma=\frac{\lambda}{S}(2I_D-\lambda K)^{-1}. \end{align} The training and test error are \begin{align} &L_{\rm training}=\frac{\lambda}{2S}{\rm Tr}[K(2I_D-\lambda K)^{-1}]+\frac{1}{2}{\rm Tr}[AK^{-1}BU],\label{eq: input training discrete K approx} \\ &L_{\rm test}=\frac{\lambda}{2S}{\rm Tr}[A(2I_D-\lambda K)^{-1}]+\frac{1}{2}{\rm Tr}[B'^{\rm T}AB'U].\label{eq: input test discrete K approx} \end{align} Large $S$ limit from the exact matrix equation results in a prefactor in the fluctuation as \begin{align} \Sigma=\frac{\lambda}{S}{\rm Tr}[AK^{-1}BU](2I_D-\lambda K)^{-1}. \end{align} For continuous-time limit, we take $\lambda\to 0$. The Hessian approximation gives \begin{align} &\Sigma=\frac{\lambda}{2S}I_D,\\ &L_{\rm training}=\frac{\lambda}{4S}{\rm Tr}[K]+\frac{1}{2}{\rm Tr}[AK^{-1}BU],\\ &L_{\rm test}=\frac{\lambda}{4S}{\rm Tr}[A]+\frac{1}{2}{\rm Tr}[B'^{\rm T}AB'U]. \end{align} Large $S$ limit again brings a prefactor ${\rm Tr}[AK^{-1}BU]$. \subsection{$L_2$ Regularization} For learning with regularization, there is more difference between the Hessian approximation and taking limit directly from the exact theory. We first adopt the Hessian approximation for the discrete-time dynamics. The matrix equation is written as \begin{align} \Sigma K + K\Sigma-\lambda K \Sigma K = \frac{\lambda}{S}K, \end{align} which is similar to the previous subsection. However, it is much different from the large $S$ limit of the exact matrix equation \eqref{eq: matrixeq of regular}: \begin{align} \Sigma K + K\Sigma-\lambda K \Sigma K =\frac{\lambda}{S}\left({\rm Tr}[AK^{-2}\Gamma^2U]A+AK^{-1}\Gamma U\Gamma K^{-1}A\right). \end{align} This significant difference suggests that the conventional Fisher-to-Hessian approximation fails badly. The fluctuation, the training and test loss with the Hessian approximation are given by \begin{align} &\Sigma=\frac{\lambda}{S}(2I_D-\lambda K)^{-1}, \label{eq: Kapprox Sigma}\\ &L_{\rm training}=\frac{\lambda}{2S}{\rm Tr}[K(2I_D -\lambda K)^{-1}]+\frac{1}{2}{\rm Tr}[AK^{-1}\Gamma U], \label{eq: Kapprox training}\\ &L_{\rm test}=\frac{\lambda}{2S}{\rm Tr}[A(2I_D -\lambda K)^{-1}]+\frac{1}{2}{\rm Tr}[AK^{-2}\Gamma^2 U],\label{eq: Kapprox test} \end{align} while the large $S$ limit of the exact theory yields \begin{align} &\Sigma=\frac{\lambda}{S}{\rm Tr}[AK^{-2}\Gamma^2U]AK^{-1}(2I_D-\lambda K)^{-1}+\frac{\lambda}{S}A^2 K^{-3} \Gamma^2 (2I_D-\lambda K)^{-1} U, \label{eq: limit Sigma}\\ &L_{\rm training}=\frac{\lambda}{2S}{\rm Tr}[AK^{-2}\Gamma^2U]{\rm Tr}[A(2I_D-\lambda K)^{-1}] + \frac{\lambda}{2S}{\rm Tr}[A^2 K^{-2}\Gamma^2(2I_D-\lambda K)^{-1}U] + \frac{1}{2}{\rm Tr}[AK^{-1}\Gamma U],\label{eq: limit training}\\ &L_{\rm test}=\frac{\lambda}{2S}{\rm Tr}[AK^{-2}\Gamma^2U]{\rm Tr}[A(2I_D-\lambda K)^{-1}] + \frac{\lambda}{2S}{\rm Tr}[A^3 K^{-3}\Gamma^2(2I_D-\lambda K)^{-1}U] + \frac{1}{2}{\rm Tr}[AK^{-2}\Gamma^2 U].\label{eq: limit test} \end{align} The continuous-time results are obtained by taking small $\lambda$ limit to Eqs.~\eqref{eq: Kapprox Sigma} to \eqref{eq: Kapprox test} for the Hessian approximation and Eqs.~\eqref{eq: limit Sigma} to \eqref{eq: limit test} for limiting cases of the exact theory. Specifically, for the Hessian approximation we have \begin{align} &\Sigma=\frac{\lambda}{2S}I_D, \\ &L_{\rm training}=\frac{\lambda}{4S}{\rm Tr}[K]+\frac{1}{2}{\rm Tr}[AK^{-1}\Gamma U],\\ &L_{\rm test}=\frac{\lambda}{4S}{\rm Tr}[A]+\frac{1}{2}{\rm Tr}[AK^{-2}\Gamma^2 U]. \end{align} Small $\lambda$ limit of the exact theory reads \begin{align} &\Sigma=\frac{\lambda}{2S}{\rm Tr}[AK^{-2}\Gamma^2U]AK^{-1}+\frac{\lambda}{2S}A^2 K^{-3} \Gamma^2 U, \\ &L_{\rm training}=\frac{\lambda}{4S}{\rm Tr}[AK^{-2}\Gamma^2U]{\rm Tr}[A] + \frac{\lambda}{4S}{\rm Tr}[A^2 K^{-2}\Gamma^2U] + \frac{1}{2}{\rm Tr}[AK^{-1}\Gamma U],\\ &L_{\rm test}=\frac{\lambda}{4S}{\rm Tr}[AK^{-2}\Gamma^2U]{\rm Tr}[A] + \frac{\lambda}{4S}{\rm Tr}[A^3 K^{-3}\Gamma^2U] + \frac{1}{2}{\rm Tr}[AK^{-2}\Gamma^2 U]. \end{align} \section{General Theory} \label{sec:general} So far, we have considered the linear regression problem with large $N$ limit with $D$ held fixed. In this section, we discuss more generic situations. Let $f(\mathbf{w},x)$ denote the output of the network for a given input $x\in\mathbb{R}^D$. In the linear regression, $\mathbf{w}\in\mathbb{R}^D$ and $f(\mathbf{w},x)=\mathbf{w}^\mathrm{T}x$, but we consider more general case. The number of parameters in the network is denoted by $P$, and hence $\mathbf{w}\in\mathbb{R}^P$. For a training dataset $\{x_i,y_i\}_{i=1,2,\dots,N}$, the loss function is given by \begin{equation} L(\mathbf{w})=\frac{1}{N}\sum_{i=1}^N\ell(f(\mathbf{w},x_i),y_i). \end{equation} We will use the following shorthand notations: \begin{equation} \ell_i=\ell(f(\mathbf{w},x_i),y_i), \quad \ell_i'=\frac{\partial\ell_i}{\partial f}, \quad \ell_i''=\frac{\partial^2\ell_i}{\partial f^2}. \end{equation} For the mean-square error, we have $\ell_i=[f(\mathbf{w},x_i)-y_i]^2/2$. \subsection{Relation between the SGD noise and the Hessian} The Hessian of the loss function $H(\mathbf{w})$ is given by \begin{equation} H(\mathbf{w})=\frac{1}{N}\sum_{i=1}^N\ell_i''\nabla f(\mathbf{w},x_i)\nabla f(\mathbf{w},x_i)^\mathrm{T}+\frac{1}{N}\sum_{i=1}^N\ell_i'\nabla\nabla^\mathrm{T}f(\mathbf{w},x_i). \end{equation} When $\mathbf{w}$ is close to a local (or global) minimum of $L(\mathbf{w})$, $\ell_i'\approx 0$ for all $i$, and hence we have \begin{equation} H(\mathbf{w})\approx\frac{1}{N}\sum_{i=1}^N\ell_i''\nabla f(\mathbf{w},x_i)\nabla f(\mathbf{w},x_i)^\mathrm{T}. \end{equation} For the mean-square error, $\ell_i''=1$, so we have \begin{equation} H(\mathbf{w})\approx\frac{1}{N}\sum_{i=1}^N\nabla f(\mathbf{w},x_i)\nabla f(\mathbf{w},x_i)^\mathrm{T} \quad \text{(MSE)} \end{equation} near a local or global minimum. On the other hand, the SGD noise covariance $C(\mathbf{w})$ is given by Eq.~(\ref{eq:noise_cov}). Assuming $S\ll N$, we have \begin{align} C(\mathbf{w})&=\frac{1}{S}\left[\frac{1}{N}\sum_{i=1}^N\nabla\ell_i\nabla\ell_i^\mathrm{T}-\nabla L(\mathbf{w})\nabla L(\mathbf{w})^\mathrm{T}\right] \nonumber \\ &=\frac{1}{S}\left[\frac{1}{N}\sum_{i=1}^N\left(\ell_i'\right)^2\nabla f(\mathbf{w},x_i)\nabla f(\mathbf{w},x_i)^\mathrm{T}-\nabla L(\mathbf{w})\nabla L(\mathbf{w})^\mathrm{T}\right]. \label{eq:cov} \end{align} Hereafter, we assume the mean-square error. By performing an approximation to replace $(\ell_i')^2$ by its average over samples, i.e., $(\ell_i')^2\to\bar{\ell'^2}:=(1/N)\sum_{i=1}^N\left(\ell_i'\right)^2$, the SGD noise covariance is directly related to the Hessian: \begin{equation} C(\mathbf{w})\approx\frac{\bar{\ell'^2}}{SN}\sum_{i=1}^N\nabla f(\mathbf{w},x_i)\nabla f(\mathbf{w},x_i)^\mathrm{T}-\frac{1}{S}\nabla L(\mathbf{w})\nabla L(\mathbf{w})^\mathrm{T} \approx\frac{\bar{\ell'^2}}{S}H(\mathbf{w})-\frac{1}{S}\nabla L(\mathbf{w})\nabla L(\mathbf{w})^\mathrm{T}. \label{eq:cov_Hessian} \end{equation} Near a local or global minimum in which $L(\mathbf{w})$ is not close enough to zero, $\bar{\ell'^2}$ is not small while $\nabla L(\mathbf{w})\approx 0$, and hence we obtain \begin{equation} C(\mathbf{w})\approx\frac{\bar{\ell'^2}}{S}H(\mathbf{w}), \end{equation} where $\bar{\ell'^2}$ is evaluated at the local minimum. On the other hand, near a global minimum in which $L(\mathbf{w})\approx 0$, i.e., every $\ell_i$ is close to its minimum value, $\bar{\ell'^2}$ is also very small. In this case, we cannot drop the last term of Eq.~(\ref{eq:cov_Hessian}), although it is often neglected in the analysis [citation!]. Now we assume, without loss of generality, $\mathbf{w}=0$ is the global minimum we consider. Then we have \begin{equation} \ell_i'=f(\mathbf{w},x_i)-y_i\approx \mathbf{w}^\mathrm{T}\nabla f(0,x_i), \label{eq:ell_n'} \end{equation} where we have performed the Taylor expansion of $f(\mathbf{w},x_i)$ around the global minimum and used $f(0,x_i)=y_i$ at the global minimum. Thus $\ell_i'$ is proportional to $\mathbf{w}$ and vanishes just at the global minimum. Correspondingly, we obtain \begin{equation} \bar{{\ell'}^2}\approx\frac{1}{N}\sum_{i=1}^N\mathbf{w}^\mathrm{T}\nabla f(0,x_i)\nabla f(0,x_i)^\mathrm{T}\mathbf{w}\approx\mathbf{w}^\mathrm{T}H(0)\mathbf{w}. \end{equation} On the other hand, the last term of Eq.~(\ref{eq:cov_Hessian}) is expressed as \begin{equation} \frac{1}{S}\nabla L(\mathbf{w})\nabla L(\mathbf{w})^\mathrm{T}\approx H(0)\mathbf{w}\mathbf{w}^\mathrm{T}H(0). \end{equation} Therefore the SGD noise covariance is approximately given by \begin{equation} C(\mathbf{w})\approx\frac{1}{S}\left[\mathbf{w}^\mathrm{T}H(0)\mathbf{w}H(0)-H(0)\mathbf{w}\mathbf{w}^\mathrm{T}H(0)\right]. \label{eq:cov_global} \end{equation} The SGD noise vanishes at a global minimum as expected: $C(0)=0$. \subsection{SGD noise in the presence of Regularization} In the most general case, a regularization term $R(\mathbf{w})$ might exist in the loss function: \begin{equation} L(\mathbf{w})=\frac{1}{N}\sum_{i=1}^N\ell(f(\mathbf{w},x_i),y_i) + R(\mathbf{w}). \end{equation} Unlike the simple non-regularized part, here, the additional term $R$ is independent of the sampling, and the minimizer of $R(\mathbf{w})$ is in general different from the minimizer of the original loss function. The simplest kind of regularization is the $L_2$ norm, $R(\mathbf{w})=||\mathbf{w}||_2^2$. [TODO, what can we show in this case?] \subsection{Infinite-dimensional limit in the linear regression problem} Now we apply general theory in Sec.~\ref{sec:general} to linear regressions in the high-dimensional limit, $N,D\to\infty$ with $\alpha:=N/D$ held fixed. The loss function \begin{equation} L(\mathbf{w})=\frac{1}{2N}\sum_{i=1}^N\left(\mathbf{w}^\mathrm{T}x_i-y_i\right)^2 \end{equation} with $y_i=\mathbf{u}^\mathrm{T}+\epsilon_i$ is written as \begin{equation} L(\mathbf{w})=\frac{1}{2}\left(\mathbf{w}-\mathbf{u}-\hat{A}^+\mathbf{v}\right)^\mathrm{T}\hat{A}\left(\mathbf{w}-\mathbf{u}-\hat{A}^+\mathbf{v}\right)-\frac{1}{2}\mathbf{v}^\mathrm{T}\hat{A}^+\mathbf{v}+\frac{1}{2N}\sum_{i=1}^N\epsilon_i^2, \end{equation} where \begin{equation} \hat{A}:=\frac{1}{N}\sum_{i=1}^Nx_ix_i^\mathrm{T} \end{equation} is an empirical covariance for the training data and \begin{equation} \mathbf{v}:=\frac{1}{N}\sum_{i=1}^Nx_i\epsilon_i. \end{equation} The symbol $(\cdot)^+$ denotes the Moore-Penrose pseudo inverse. The minimum of the loss function is given by \begin{equation} \mathbf{w}^*=\mathbf{u}+\hat{A}^+\mathbf{v}+\Pi\mathbf{r}, \end{equation} where $\mathbf{r}\in\mathbb{R}^D$ is an arbitrary vector and $\Pi$ is the projection onto the null space of $\hat{A}$. Since $1-\Pi=\hat{A}^+\hat{A}$, $\mathbf{w}^*$ is also expressed as \begin{equation} \mathbf{w}^*=\hat{A}^+(\hat{A}\mathbf{u}+\mathbf{v})+\Pi\mathbf{r}. \end{equation} In an underparameterized regime $\alpha>1$, $\Pi=0$ almost surely holds as long as the minimum eigenvalue of $A$ (not $\hat{A}$) is positive~\cite{hastie2019surprises}. In this case, $\hat{A}^+=\hat{A}^{-1}$ and we obtain \begin{equation} \mathbf{w}^*=\mathbf{u}+\hat{A}^{-1}\mathbf{v} \quad\text{for }\alpha>1. \end{equation} On the other hand, in an overparameterized regime $\alpha>1$, $\Pi\neq 0$ and there are infinitely many global minima. In the ridgeless regression, we consider the global minimum that has the minimum norm $\|\mathbf{w}^*\|$, which corresponds to \begin{equation} \mathbf{w}^*=\hat{A}^+(\hat{A}\mathbf{u}+\mathbf{v})=(1-\Pi)\mathbf{u}+\hat{A}^+\mathbf{v} \quad\text{for ridgeless regression with }\alpha<1. \end{equation} In both cases, the loss function is expressed as \begin{equation} L(\mathbf{w})=\frac{1}{2}\left(\mathbf{w}-\mathbf{w}^*\right)^\mathrm{T}\hat{A}\left(\mathbf{w}-\mathbf{w}^*\right)-\frac{1}{2}\mathbf{v}^\mathrm{T}\hat{A}\mathbf{v}+\frac{1}{2N}\sum_{i=1}^N\epsilon_i^2. \end{equation} Within the Gaussian approximation, $\mathbf{w}_t$ after a sufficiently long time evolution $t\to\infty$ under the SGD dynamics is regarded as a Gaussian random vector \begin{equation} \mathbf{w}\sim\mathcal{N}(\mathbf{w}^*,\Sigma), \end{equation} where $\Sigma=\mathbb{E}[(\mathbf{w}-\mathbf{w}^*)(\mathbf{w}-\mathbf{w}^*)^\mathrm{T}]$ satisfies \begin{equation} \lambda\hat{A}\Sigma+\lambda\Sigma\hat{A}-\lambda^2\hat{A}\Sigma\hat{A}=C. \label{eq:Sigma_high_dim} \end{equation} The SGD noise covariance $C(\mathbf{w})$ is given by Eq.~(\ref{eq:cov_Hessian}). In the present case, the Hessian is given by $H(\mathbf{w})=\hat{A}$ and \begin{equation} \bar{\ell'^2}=\frac{1}{N}\sum_{i=1}^N(\ell_i')^2 =\frac{1}{N}\sum_{i=1}^N\left(\mathbf{w}^\mathrm{T}x_i-y_i\right)^2 =\frac{2}{N}\sum_{i=1}^N\ell_i =2L(\mathbf{w}). \end{equation} On the other hand, $\nabla L(\mathbf{w})\nabla L(\mathbf{w})^\mathrm{T}=\hat{A}(w-w^*)(w-w^*)^\mathrm{T}\hat{A}$, and hence $\mathbb{E}[\nabla L(\mathbf{w})\nabla L(\mathbf{w})^\mathrm{T}]=\hat{A}\Sigma\hat{A}$. Therefore we obtain \begin{equation} C=\mathbb{E}[C(\mathbf{w})]=\frac{2L_\mathrm{training}}{S}\hat{A}-\frac{1}{S}\hat{A}\Sigma\hat{A}. \label{eq:C_high_dim} \end{equation} The training error $L_\mathrm{training}$ is evaluated as follows. First, we define $X\in\mathbb{R}^{N\times D}$ as $X_{ik}=(x_i)_k$, and $\vec{\epsilon}\in\mathbb{R}^N$ as $\vec{\epsilon}_i=\epsilon_i$. Then $\mathbf{w}^*=(1-\Pi)\mathbf{u}+\hat{A}^+\mathbf{v}=(1-\Pi)\mathbf{u}+(X^\mathrm{T}X)^+X^\mathrm{T}\vec{\epsilon}$. With this notation, $\hat{A}=X^\mathrm{T}X/N$ and the loss function is expressed as \begin{equation} L(w)=\frac{1}{2}(\mathbf{w}-\mathbf{w}^*)^\mathrm{T}\hat{A}(\mathbf{w}-\mathbf{w}^*)-\frac{1}{2N}\vec{\epsilon}^\mathrm{T}X(X^\mathrm{T}X)^+X^\mathrm{T}\vec{\epsilon}+\frac{1}{2N}\sum_{i=1}^N\epsilon_i^2. \end{equation} We therefore obtain \begin{equation} L_\mathrm{training}=\frac{1}{2}\mathrm{Tr}(\hat{A}\Sigma)-\frac{1}{2N}\mathbb{E}[\vec{\epsilon}^\mathrm{T}X(X^\mathrm{T}X)^+X^\mathrm{T}\vec{\epsilon}]+\frac{\sigma^2}{2}. \end{equation} Here, \begin{equation} \mathbb{E}[\vec{\epsilon}^\mathrm{T}X(X^\mathrm{T}X)^+X^\mathrm{T}\vec{\epsilon}] =\sigma^2\mathrm{Tr}[(X^\mathrm{T}X)(X^\mathrm{T}X)^+] =\sigma^2\mathrm{Tr}(1-\Pi). \label{eq:L_training_calc} \end{equation} We can prove that the following identity is almost surely satisfied~\cite{hastie2019surprises} as long as the smallest eigenvalue of $A$ (not $\hat{A}$) is positive: \begin{equation} \mathrm{Tr}(1-\Pi)=\min\{D,N\}. \end{equation} We therefore obtain \begin{equation} L_\mathrm{training}=\frac{1}{2}\mathrm{Tr}(\hat{A}\Sigma)-\frac{\sigma^2}{2N}\min\{D,N\}+\frac{\sigma^2}{2} =\left\{\begin{aligned} &\frac{1}{2}\mathrm{Tr}(\hat{A}\Sigma)+\frac{1}{2}\left(1-\frac{1}{\alpha}\right)\sigma^2 & \text{for }\alpha>1, \\ &\frac{1}{2}\mathrm{Tr}(\hat{A}\Sigma) & \text{for }\alpha\leq 1 \end{aligned} \right. \label{eq:L_training_high_dim} \end{equation} By substituting Eq.~(\ref{eq:L_training_high_dim}) into Eq.~(\ref{eq:C_high_dim}), we obtain the following SGD noise covariance: \begin{equation} C=\left\{\begin{aligned} &\frac{1}{S}\left[\mathrm{Tr}(\hat{A}\Sigma)-\hat{A}\Sigma\right]\hat{A}+\frac{\sigma^2}{S}\left(1-\frac{1}{\alpha}\right)\hat{A} &\text{for }\alpha>1, \\ &\frac{1}{S}\left[\mathrm{Tr}(\hat{A}\Sigma)-\hat{A}\Sigma\right]\hat{A} &\text{for }\alpha\leq 1. \end{aligned} \right. \label{eq:C_high_dim_result} \end{equation} By using Eq.~(\ref{eq:C_high_dim_result}), we can obtain $\Sigma$ by solving Eq.~(\ref{eq:Sigma_high_dim}). It should be noted that in an overparameterized regime $\alpha<1$, $\Sigma=0$ is the solution. However, the stability of this solution is not trivial. Now we analyze stability of the stationary distribution $\mathbf{w}\sim\mathcal{N}(\mathbf{w}^*,\Sigma)$, where $\Sigma$ is the solution of Eq.~(\ref{eq:Sigma_high_dim}). Since at a finite time $t$, $\mathbf{w}_t$ has the covariance $\Sigma_t$ satisfying \begin{equation} \Sigma_{t+1}=\Sigma_t-\lambda\hat{A}\Sigma_t-\lambda\Sigma_t\hat{A}+\lambda^2\hat{A}\Sigma\hat{A}+\lambda^2C_t, \end{equation} where $C_t:=\mathbb{E}[C(w_t)]$, the linear stability of the stationary distribution can be analyzed by considering the dynamics of $\sigma_t$ with $\Sigma_t=\Sigma+\sigma_t$. We find \begin{align} \sigma_{t+1}&=\sigma_t-\lambda(\sigma_t\hat{A}+\hat{A}\sigma_t)+\lambda^2\hat{A}\sigma_t\hat{A}+\frac{\lambda^2}{S}\left[{\rm Tr}(\hat{A}\sigma_t)-\hat{A}\sigma_t\right]\hat{A} \nonumber \\ &=:\mathcal{L}\sigma_t, \label{eq:L} \end{align} where $\mathcal{L}$ is a super-operator. \textit{When all the eigenvalues of $\mathcal{L}$ are between $-1$ and $1$}, the stationary distribution with $\mathbb{E}[w]=0$ and $\mathbb{E}[ww^\mathrm{T}]=\Sigma$ is linearly stable. Now we consider the basis that diagonalizes $\hat{A}$. Eigenvalues of $\hat{A}$ are denoted by $\hat{a}_1\leq \hat{a}_2\leq\dots\leq \hat{a}_D$. From Eq.~(\ref{eq:L}), we can obtain the following expressions: \begin{align} &\text{For }k\neq l, \quad (\sigma_{t+1})_{k,l}=(\sigma_t)_{k,l}\left[1-\lambda(\hat{a}_k+\hat{a}_l)+\lambda^2\hat{a}_k\hat{a}_l-\frac{\lambda^2}{S}\hat{a}_k\hat{a}_l\right] \label{eq:off_diag} \\ &\text{For }k=l, \quad (\sigma_{t+1})_{k,k}=(\sigma_t)_{k,k}-2\lambda \hat{a}_k(\sigma_t)_{k,k}+\lambda^2\hat{a}_k(\sigma_t)_{k,k}+\frac{\lambda^2}{S}\hat{a}_k\sum_m\hat{a}_m(\sigma_t)_{m,m}-\frac{\lambda^2}{S}\hat{a}_k^2(\sigma_t)_{k,k} \label{eq:diag} \end{align} In this way, the diagonal and off-diagonal parts are separated. For off-diagonal parts (\ref{eq:off_diag}), the linear stability condition yields \begin{equation} -1<1-\lambda(\hat{a}_k+\hat{a}_l)+\lambda^2\left(1-\frac{1}{S}\right)\hat{a}_k\hat{a}_l<1. \label{eq:off_diag_stability} \end{equation} For diagonal parts (\ref{eq:diag}), the linear stability condition is written as follows: \begin{equation} \|W\|<1, \label{eq:diag_stability} \end{equation} where $W\in\mathbb{R}^{D\times D}$ with \begin{equation} W_{k,l}=(1-\lambda \hat{a}_k)^2\delta_{k,l}+\frac{\lambda^2}{S}\hat{a}_k\hat{a}_l(1-\delta_{k,l}) \end{equation} and $\|W\|$ denotes the operator norm of $W$ (that is, $\|W\|<1$ implies that all the eigenvalues of $W$ are between $-1$ and $1$). Thus we find that the stationary distribution is linearly stable iff both Eq.~(\ref{eq:off_diag_stability}) and Eq.~(\ref{eq:diag_stability}) are satisfied. It is shown that Eq.~(\ref{eq:off_diag_stability}) is satisfied whenever Eq.~(\ref{eq:diag_stability}) is satisfied. Therefore, we only have to consider Eq.~(\ref{eq:diag_stability}). A necessary condition of Eq.~(\ref{eq:diag_stability}) is $|\hat{\mathbf{a}}^\mathrm{T}W\hat{\mathbf{a}}|\leq\|\hat{\mathbf{a}}\|^2$, where $\hat{\mathbf{a}}=(\hat{a}_1,\hat{a}_2,\dots,\hat{a}_D)^\mathrm{T}$. This condition yields \begin{equation} \lambda\frac{S-1}{S}\sum_k\hat{a}_k^4+\frac{\lambda}{S}\left(\sum_k\hat{a}_k^2\right)^2\leq 2\sum_k\hat{a}_k^3. \end{equation} When $N,D\gg S$, we obtain \begin{equation} \frac{\lambda}{S}\leq\frac{2\sum_k\hat{a}_k^3}{\left(\sum_k\hat{a}_k^2\right)^2}. \label{eq:stability_approx} \end{equation} This is a necessary condition of linear stability when $N,D\gg S$. Therefore, if Eq.~(\ref{eq:stability_approx}) is not satisfied, the stationary distribution is linearly unstable. In particular, as a simple case, we consider the linear regression problem when each training data $x_i$ ($i=1,2,\dots,N$) has i.i.d. entries of zero mean and variance $a$ (this corresponds to $A=aI_D$). According to the random matrix theory, for large $D$ and $N$ with $\alpha=N/D$, the distribution of eigenvalues of $\hat{A}=(1/N)\sum_{i=1}^Nx_ix_i^\mathrm{T}$ obeys the Marchenko-Pastur law: \begin{equation} \rho_a(z)=\max\{1-\alpha,0\}\delta(z)+\frac{\alpha}{a}\frac{\sqrt{(a_+-z)(z-a_-)}}{2\pi z}\bm{1}_{z\in[a_-,a_+]}, \quad a_\pm=a\left(1\pm\frac{1}{\sqrt{\alpha}}\right)^2, \label{eq:MP} \end{equation} where $D\rho_a(z)dz$ is the average number of eigenvalues of $\hat{A}$ between $z$ and $z+dz$, and hence $\int_{-\infty}^\infty dz\,\rho_a(z)=1$. The following formula is well known [citation!]: \begin{equation} \int_{-\infty}^\infty dz\, z^r\rho_a(z)=a^r\sum_{k=0}^{r-1}\frac{\alpha^{-k}}{k+1}\frac{r!}{k!(r-k)!}\frac{(r-1)!}{k!(r-k-1)!}. \end{equation} By using this formula, we can explicitly calculate $\sum_k\hat{a}_k^2=D\int_{-\infty}^\infty dz\,z^2\rho_a(z)$ and $\sum_k\hat{a}_k^3=D\int_{-\infty}^\infty dz\, z^3\rho_a(z)$ in Eq.~(\ref{eq:stability_approx}). As extreme cases, we consider $\alpha\gg 1$, which corresponds to a highly underparameterized regime, and $\alpha\ll 1$, which corresponds to a highly overparameterized regime. When $\alpha\gg 1$, $\int_{-\infty}^\infty dz\,z^r\rho_a(z)\approx a^r$, and hence Eq.~(\ref{eq:stability_approx}) reads \begin{equation} \frac{\lambda}{S}\leq\frac{2}{aD} \quad \text{when }\alpha=\frac{N}{D}\gg 1. \label{eq:stability_under} \end{equation} On the other hand, when $\alpha\ll 1$, $\int_{-\infty}^\infty dz\,z^r\rho_a(z)\approx a^rD\alpha^{1-r}$, and we obtain \begin{equation} \frac{\lambda}{S}\leq\frac{2}{aD} \quad \text{when }\alpha=\frac{N}{D}\ll 1. \label{eq:stability_over} \end{equation} We find that the stability condition in the underparameterized limit $\alpha\to\infty$ coincides with that in the overparameterized limit $\alpha\to 0$. Although $\Sigma=0$ is always the solution in an overparameterized regime $\alpha<1$, this trivial solution becomes unstable when $\lambda/S$ exceeds a threshold, which is equal to $2/(aD)$ for $\alpha\ll 1$. [TODO, write out the matrix equation that $\Sigma$ satisfies in the underparametrized regime] [TODO, generalization loss and experiments] We gave the training error in Eq.~(\ref{eq:L_training_high_dim}). We can also calculate the test error as follows: \begin{equation} L_\mathrm{test}=\mathbb{E}\left[\frac{1}{2}(\mathbf{w}-\mathbf{u})^\mathrm{T}A(\mathbf{w}-\mathbf{u})\right]=\frac{1}{2}\mathbb{E}_\epsilon\left[(\mathbf{w}^*-\mathbf{u})^\mathrm{T}A(\mathbf{w}^*-\mathbf{u})\right]+\frac{1}{2}\mathrm{Tr}(\Sigma A), \label{eq:L_test_high_dim} \end{equation} where $\mathbb{E}_\epsilon[\cdot]$ denotes the average over label noises $\vec{\epsilon}$. The last term of Eq.~(\ref{eq:L_test_high_dim}) represents the effect of a finite learning rate, which always increases the test error for a given minimum. Therefore, we should finally decrease the learning rate. However, it does not necessarily mean that large learning rates are harmful for generalization. Indeed, Eq.~(\ref{eq:stability_approx}) indicates that a large learning rate destabilizes sharp minima with large $\{\hat{a}_k\}$, and hence helps to find flat minima, which are considered to indicate good generalization. Following similar calculations for the training error around Eq.~(\ref{eq:L_training_calc}), we obtain \begin{equation} L_\mathrm{test}=\frac{1}{2}\mathbf{u}^\mathrm{T}\Pi A\Pi\mathbf{u}+\frac{\sigma^2}{2N}\mathrm{Tr}[(1-\Pi)A\hat{A}^+]+\frac{1}{2}\mathrm{Tr}(A\Sigma). \end{equation} In an underparameterized regime $\alpha>1$, $\Pi=0$ and hence \begin{equation} \frac{1}{2}\mathbf{u}^\mathrm{T}\Pi A\Pi\mathbf{u}+\frac{\sigma^2}{2N}\mathrm{Tr}[(1-\Pi)A\hat{A}^+]=\frac{\sigma^2}{2N}\mathrm{Tr}[A\hat{A}^{-1}]=\frac{\sigma^2}{2N}\mathrm{Tr}\left[A\left(\frac{X^\mathrm{T}X}{N}\right)^{-1}\right]. \end{equation} Let us define $Z$ as $X=ZA^{1/2}$. Then, $Z$ is a random matrix which has i.i.d. entries of zero mean and unit variance. We thus obtain \begin{equation} \frac{\sigma^2}{2N}\mathrm{Tr}[(1-\Pi)A\hat{A}^+]=\frac{\sigma^2}{2N}\mathrm{Tr}\left(\frac{Z^\mathrm{T}Z}{N}\right)^{-1}. \end{equation} Since the eigenvalue distribution of $Z^\mathrm{T}Z/N$ obeys the Marchenko-Pastur law, i.e. Eq.~(\ref{eq:MP}) with $a=1$, we have \begin{equation} \frac{\sigma^2}{2N}\mathrm{Tr}\left(\frac{Z^\mathrm{T}Z}{N}\right)^{-1}=\frac{\sigma^2}{2}\frac{1}{\alpha}\int dz\,\frac{\rho_1(z)}{z}. \end{equation} The integral $\int dz\,\rho_1(z)/z$ for $\alpha>1$ has been evaluated in the previous work~\cite{hastie2019surprises} as follows: \begin{equation} \int dz\,\frac{\rho_1(z)}{z}=\frac{\alpha}{\alpha-1}. \end{equation} Therefore we finally obtain the test error in an underparameterized regime $\alpha>1$ as \begin{equation} L_\mathrm{test}=\frac{\sigma^2}{2}\frac{1}{\alpha-1}+\frac{1}{2}\mathrm{Tr}(A\Sigma). \end{equation} On the other hand, in an overparameterized regime, following similar calculations, we obtain \begin{equation} \frac{\sigma^2}{2N}\mathrm{Tr}[(1-\Pi)A\hat{A}^+]=\frac{\sigma^2}{2N}\mathrm{Tr}\left[(1-\Pi)\left(\frac{Z^\mathrm{T}Z}{N}\right)^{-1}\right]=\frac{\sigma^2}{2}\frac{1}{\alpha}\lim_{\delta\to +0}\int_{\delta}^\infty dz\, \frac{1}{z}\rho_1(z). \end{equation} The integral $\lim_{\delta\to +0}\int_\delta^\infty dz\,\rho_1(z)/z$ is also evaluated in Ref.~\cite{hastie2019surprises} as \begin{equation} \lim_{\delta\to +0}\int_\delta^\infty dz\,\frac{\rho_1(z)}{z}=\frac{\alpha^2}{1-\alpha}. \end{equation} In an overparameterized regime, we can achieve a global minimum of the loss function, and there exists a solution with $\Sigma=0$. Therefore, we obtain the test error in an overparameterized regime $\alpha<1$ as \begin{equation} L_\mathrm{test}=\frac{1}{2}\mathbf{u}^\mathrm{T}\Pi A\Pi\mathbf{u}+\frac{\sigma^2}{2}\frac{\alpha}{1-\alpha}. \end{equation} {\small \bibliographystyle{apalike}
\section{Introduction} There are many ways to express our opinions. When we exchange views online, we do not always immediately measure the emotional impact of our message. Even when the opinions expressed are legitimate, well-intentioned and constructive, a poor phrasing may make the conversation go awry \cite{Zhang2018}. Recently, Natural Language Processing (NLP) research has tackled the problem of abusive language detection by developing accurate classification models that flag toxic (or abusive, offensive, hateful) comments \citep{davidson2017automated, Pavlopoulos2017b, Wulczyn2017,Gamback2017, fortuna2018survey, Zhang2018, 10.1371/journal.pone.0203794, Zampieri2019}. \begin{table} \small \begin{center} \begin{tabular}{|p{2.5cm}|p{4.3cm}| } \hline \textsc{Input offensive comment} & you now have to defend this clown along with his russian corruption. \\ \textsc{Generated civil comment} & \textbf{you now have to defend this guy from his russian ties........} \\ \hline\hline \textsc{Input offensive comment} & blaming trudeau and the government is just stupid. \\ \textsc{Generated civil comment} & \textbf{blaming trudeau and the liberal government is just wrong.} \\ \hline\hline \textsc{Input offensive comment} & dubya\footnotemark was a moron. \\ \textsc{Generated civil comment} & \textbf{dubya was a republican.} \\ \hline \end{tabular} \caption{\small Examples of offensive sentences from the Civil Comments test set and the more civil rephrasing generated by our model. The third example shows that its strategy may involve shifting the original intent, since ``republican'' is not a non-offensive synonym of ``moron''.} \vspace*{-4mm} \label{tab:first_examples} \end{center} \end{table} \footnotetext[2]{A nickname for George W. Bush.} The prospect of healthier conversations, nudged by Machine Learning (ML) systems, motivates the development of Natural Language Understanding and Generation (NLU and NLG) models that could later be integrated in a system suggesting alternatives to vituperative comments before they are posted. A first approach would be to train a text-to-text model \citep{bahdanau2014neural, vaswani2017attention} on a corpus of parallel comments where each offensive comment has a courteous and fluent rephrasing written by a human annotator. However, such a solution requires a large paired labeled dataset, in practice difficult and expensive to collect (see Section \ref{discussion}). Consequently, we limit our setting to the unsupervised case where the comments are only annotated in attributes related to toxicity, such as the Civil Comments dataset \citep{DBLP:journals/corr/abs-1903-04561}. We summarize our investigations with the following research question: \\ \noindent \rqone: \textit{Can we fine-tune end-to-end a pre-trained text-to-text transformer to suggest civil rephrasings of rude comments using a dataset solely annotated in toxicity?} \\ Answering this question might provide researchers with an engineering proof-of-concept that would enable further exploration of the many complex questions that arise from such a tool being used in conversations. The main contributions of this work are the following: \begin{itemize}[leftmargin=*,noitemsep] \item We addressed for the second time the task of unsupervised civil rephrases of toxic texts, relying for the first time on the Civil Comments dataset, and achieving results that reflect the effectiveness of our model over baselines. \item We developed a non-task specific approach (i.e. with no human hand-crafting in its design) that can be generalized and later applied to related and/or unexplored attribute transfer tasks. \end{itemize} While several of the ideas we combine in our model have been studied independently, to the best of our knowledge, no existing unsupervised models combine sequence-to-sequence bi-transformers, transfer learning from large pre-trained models, and self-supervised fine-tuning (denoising auto-encoder and cycle consistency). We discuss the related work introducing these tools and techniques in the following section. \section{Related work} Unsupervised complex text attribute transfer (like civil rephrasing of toxic comments) remains in its early stages, and our particular applied task has only a single antecedent \citep{nogueira-dos-santos-etal-2018-fighting}. There is a great variety of useful works to tackle the task and this section attempts to summarize the vast majority of these works. We describe below the recent strategies \cite[such as attention mechanisms][]{bahdanau2014neural} that led to significant progress in supervised NLU and NLG tasks. Then, we present the most related lines of work in unsupervised text-to-text tasks. \subsection{Transformers\footnote{To avoid confusion we denote as bi-transformer the original encoder-decoder transformer whereas encoder-only and decoder-only models are called uni-transformers here.} are state-of-the-art architectures in NLP} \citet{vaswani2017attention} showed that transformer architectures, based on attention mechanisms, achieved state-of-the-art results when applied to supervised Neural Machine Translation (NMT). More generally, transformers have proven capable in various NLP and speech tasks \citep{8462506, huang2018music, le2019flaubert, li2019neural}. Moreover, transformers benefit from pre-training before being fine-tuned on downstream tasks \citep{Devlin2018, dai2019transformer, yang2019xlnet, conneau2019cross, raffel2019exploring}. Subsequent research has adopted uni-transformers in many supervised classification and regression tasks \citep{Devlin2018} and in unsupervised language modeling \citep{radford2019language, keskarCTRL2019, Dathathri2020Plug}, until \citet{raffel2019exploring} proposed a unified pre-trained bi-transformer applicable to any text classification, text regression and text-to-text task. Further, recent works tackle the language detoxification of unconditional language models \citep{KrauseGeDi2020, gehman2020realtoxicityprompts}. \subsection{Unsupervised losses enable training text-to-text models end-to-end}\label{related_baselines} After the success of unsupervised image-to-image style transfer in computer vision (CV), some approaches have addressed unsupervised text-to-text tasks. Unsupervised Neural Machine Translation (UNMT) is maybe the most promising of them. \citet{artetxe2018unsupervised, conneau2017word, lample2017unsupervised, lample2018phrase, conneau2019cross} introduced methods based on techniques aligning the embedding spaces of monolingual datasets and tricks such as denoising auto-encoding losses \citep{10.1145/1390156.1390294} and back-translation \citep{sennrich2015improving, edunov2018understanding}. Abstractive summarization (or sentence compression) is also studied in unsupervised settings. \citet{baziotis2019seq3} trained a model with a compressor-reconstructor strategy similar to back-translation while \citet{liu2019summae} trained a denoising auto-encoder that embeds sentences and paragraphs in a common space. Unsupervised attribute transfer is the task most related to our work. It mainly focuses on sentiment transfer with standard review datasets \citep{maas-etal-2011-learning,he2016ups, shen2017style, li-etal-2018-delete}, but also addresses sociolinguistic datasets containing text in various registers \citep{gan2017semantic, rao-tetreault-2018-dear} or with different identity markers \citep{voigt-etal-2018-rtgender, prabhumoye-etal-2018-style, lample2018multipleattribute}. When paraphrase generation aims at being explicitly attribute-invariant, it is referred as obfuscation or neutralization \citep{emmery-etal-2018-style, xu-etal-2019-privacy, pryzant2020automatically}. Literary style transfer \citep{xu-etal-2012-paraphrasing, pang2019unsupervised} has also been tackled by recent work. Here, we apply attribute transfer to a large dataset annotated in toxicity, but we also use the Yelp review dataset from \citet{shen2017style} for comparison purposes (see Section \ref{experiments}). Initial unsupervised attribute transfer approaches sought to build a shared and attribute-agnostic latent representation encoding for the input sentence, with adversarial training. Then, a decoder, aware of the destination attribute, generated a transferred sentence \cite{shen2017style, hu2017toward, fu2018style, zhang2018style, xu2018unpaired, john-etal-2019-disentangled}. Unsupervised attribute transfer approaches that do not rely on a latent space are also present in literature. \citet{li-etal-2018-delete} assumed that style markers are very local and proposed to delete the tokens most conveying the attribute, before retrieving a second sentence in the destination style. They eventually combined both sentences with a neural network. \citet{lample2018multipleattribute} applied UNMT techniques from \citet{conneau2019cross} to several attribute transfer tasks, including social media datasets. \citet{xu2018unpaired, gong2019reinforcement, luo2019dual, wu2019hierarchical} trained models with reinforcement learning. \citet{dai2019transformer} introduced unsupervised training of a transformer called StyleTransformer (ST) with a discriminator network. Our approach differs from these unsupervised attribute transfer models in that they did not either leverage large pre-trained transformers, or train with a denoising objective. The most similar work to ours is \citet{nogueira-dos-santos-etal-2018-fighting} who trained for the first time an encoder-decoder rewriting offensive sentences in a non-offensive register with non-parallel data from Twitter \citep{ritter-etal-2010-unsupervised} and Reddit \citep{serban2017deep}. Our approach differs in the following aspects. First, we use transformers pre-trained on a large corpus instead of randomly initialized RNNs for encoding and decoding. Second, their approach involves collaborative classifiers to penalize generation when the attribute is not transferred, while we train end-to-end with a denoising auto-encoder. Even if their model shows high accuracy scores, it suffers from low fluency, with offensive words being often replaced by a placeholder (e.g. ``big'' instead of ``f*cking''). As underlined by \citet{lample2018multipleattribute}, applying Generative Adversarial Networks (GANs) \citep{zhu2017unpaired} to NLG is not straightforward because generating text implies a sampling operation that is not differentiable. Consequently, as long as text is represented by discrete tokens, loss gradients computed with a classifier cannot be back-propagated without tricks such as the REINFORCE algorithm \citep{he2016dual} or the Gumbel-Softmax approximation \cite{baziotis2019seq3} which can be slow and unstable. Besides, controlled text generation \citep{ficler-goldberg-2017-controlling, keskarCTRL2019,le2019flaubert, Dathathri2020Plug} is a NLG task that consists of a language model conditioned on the attributes of the generated text such as the style. But a major difference with attribute transfer is the absence of a constraint regarding the preservation of the input's content. \section{Method} \subsection{Formalization of the attribute text rewriting problem} Let $X_T$ and $X_C$ be our two non-parallel corpora of comments satisfying the respective attributes ``toxic'' and ``civil''. Let $X = X_T \cup X_C $. We aim at learning a parametric function $f_{\theta}$ mapping a pair of source sentence $x$ and destination attribute $a$ to a fluent sentence $y$ satisfying $a$ and preserving the meaning of $x$. In our case, there are two attributes ``toxic'' and ``civil'' that we assumed to be mutually exclusive. We denote $\alpha(x)$ to be the attribute of $x$ and $\bar{\alpha}(x)$ the other attribute (for instance when $\alpha(x)=$ ``civil'', then $\bar{\alpha}(x)=$ ``toxic''). Note that $f_{\theta}(x, \alpha(x))$ can simply be $x$. \subsection{Our approach is based on bi-conditional encoder-decoder generation} Our approach is to train an autoregressive (AR) language model (LM) conditioned on both the input text $x$ and the destination attribute $a$. We compute $f_{\theta}$ with a LM $p(y|x, a; \theta)$. As we do not have access to ground-truth targets $y$, we propose in section \ref{training} a training function that we assume to maximize $p(y|x, a; \theta)$ if and only if $y$ is a fluent sentence with attribute $a$ and preserving $x$'s content. Additionnaly, we use an AR generating model where inference of $\hat{y}$ is sequential and the token generated at step $t+1$ depends on the tokens generated at previous steps: $p(\hat{y}_{t+1}|\hat{y}_{:t}, x, a; \theta)$. To condition on the input text, we follow the work of \citet{bahdanau2014neural, vaswani2017attention, nogueira-dos-santos-etal-2018-fighting, conneau2019cross, lample2018multipleattribute, dai-etal-2019-style, liu2019summae, raffel2019exploring} and opt for an encoder-decoder framework. \citet{lample2018multipleattribute, dai-etal-2019-style} argue that in unsupervised attribute rewriting tasks, encoders do not necessarily output disentangled representations, independent of its attribute. However, the t-SNE visualization of the latent space in \citet{liu2019summae} allowed us to assume that encoders can output a latent representation $z$, attending to content rather than on an attribute, with a similar training. The LM is conditioned on the destination attribute with control codes introduced by \citet{keskarCTRL2019}. A control code is a fixed sequence of tokens prepended to the decoder's input $s$, and supposed to prepare the generation in the space of sentences with the destination attribute $a$. We define $\gamma(a,s) = concat(c(a),s)$ where $c(a)$ is the control code of attribute $a$. \subsection{Training the encoder-decoder with an unsupervised objective} \label{training} Denoising objectives to train transformers are an effective self-supervised strategy. \citet{Devlin2018, yang2019xlnet} pre-trained a uni-transformer encoder as a masked language model (MLM) to teach the system general-purpose representations, before fine-tuning on downstream tasks. \citet{conneau2019cross, lample2018multipleattribute, song2019mass, liu2019summae, raffel2019exploring} explore various deshuffling and denoising objectives to pre-train or fine-tune bi-transformers. During training, we corrupt the encoder's input $x$ with the noise function from \citet{Devlin2018}: $\eta$ masks tokens randomly with probability 15\%. Then, masks are replaced by a random token in the vocabulary with probability 10\% or left as a sentinel (a shared mask token) with probability 90\%. We train the model as an denoising auto-encoder (DAE), meaning that we minimize the negative log-likelihood \[\mathcal{L}_{\text{DAE}} = \mathbb{E}_{x \sim X}\, \left[-\log p(x|\eta(x), \alpha(x); \theta)\right]\] The hypothesis is that optimizing the DAE objective teaches the controlled generation to the model. Inspired by an equivalent approach in unsupervised image-to-image style transfer \citep{zhu2017unpaired}, we add a cycle-consistency (CC) objective \citep{nogueira-dos-santos-etal-2018-fighting, edunov2018understanding, prabhumoye-etal-2018-style, lample2018multipleattribute, conneau2019cross, dai-etal-2019-style}: \[\mathcal{L}_{\text{CC}} = \mathbb{E}_{x \sim X}\,\left[-\log p(x|f_{\tilde{\theta}}(x, \bar{\alpha}(x)), \alpha(x); \theta)\right]\] which enforces content preservation in the generated prediction. As the cycle-consistency objective computes a non-differentiable AR pseudo-prediction $\hat{y}$ during stochastic gradient descent training, gradients are not back-propagated to $\tilde{\theta} = \hat{\theta}_{\tau-1}$ at training step $\tau$. Finally, the loss function sums the DAE and the CC objectives with weighting coefficients: \({\mathcal{L} = \lambda_{\text{DAE}} \mathcal{L}_{\text{DAE}} + \lambda_{\text{CC}} \mathcal{L}_{\text{CC}}}\) \subsection{The text-to-text bi-transformer architecture} \label{T5} The architectures for the encoder and decoder are uni-transformers. Contrary to \citet{vaswani2017attention, conneau2019cross, raffel2019exploring} we do not keep decoder's layers computing cross attention between the encoder's outputs $h$ and the decoder hidden variables because generation suffers from too much conditioning on the input sentence and we observe no significant change in the output sentence. Rather, we follow \citet{liu2019summae} and compute the latent representation $z$ with an affine transformation of the encoder's hidden state $h_0$ (corresponding to the first token of the input text). Let $x \in X$ be the input sequence of token. It is embedded then encoded by the uni-transformer encoder: \setlength{\abovedisplayskip}{6pt} \setlength{\belowdisplayskip}{6pt} \begin{align} x_{\text{Emb}} & = f_{\theta_{\text{Emb}}}(x) \nonumber \\ h_{\text{Enc}} & = f_{\theta_{\text{Enc}}}(x_{\text{Emb}}) \nonumber \\ h^0_{\text{Enc}} & = h_{\text{Enc}}[0,:] \nonumber \\ z & = f_{\theta_{\text{Dense}}}(h^0_{\text{Enc}}) \nonumber \end{align} $z$ is an aggregate sequence representation for the input. There are different heuristics that can be used to integrate it in the decoder. We considered summing $z$ to the embedding of each token of the uni-transformer decoder's input $s$ since it balances the backpropagation of the signals coming from the original input and from the output being generated in the destination attribute space and it worked well in practice in our experiments. \setlength{\abovedisplayskip}{6pt} \setlength{\belowdisplayskip}{6pt} \begin{align} \gamma_{\text{Emb}} & = f_{\theta_{\text{Emb}}}(\gamma(a,s)) \nonumber \\ h_{Dec} & = f_{\theta_{\text{Enc}}}(\gamma_{\text{Emb}} + z) \nonumber \\ \hat{y} & = f_{\theta_{\text{LMHead}}}(h_{\text{Dec}}) \nonumber \end{align} Plus, the encoder and the decoder uni-transformers share the same embedding layer and the LM Head is tied to the embeddings. Except for the dense layer computing the latent variable $z$, all parameters are coming from the pre-trained bi-transformer published by \citet{raffel2019exploring}. Thus, our DAE and CC objectives \textbf{fine-tune} T5's parameters and this is why we call our model a conditional auto-encoder text-to-text transfer transformer (CAE-T5). \section{Experiments}\label{experiments} \subsection{Datasets}\label{datasets} We employed the largest publicly available toxicity detection dataset to date, which was used in the `Jigsaw Unintended Bias in Toxicity Classification' Kaggle challenge.\footnote{\url{https://www.tensorflow.org/datasets/catalog/civil_comments}} The 2M comments of the \textbf{Civil Comments dataset} stem from a commenting plugin for independent news sites. They were created from 2015 to 2017 and appeared on approximately 50 English-language news sites across the world. Each of these comments was annotated by crowd raters (at least 3 each) for toxicity and toxicity subtypes \cite{DBLP:journals/corr/abs-1903-04561}. Following the work of \citet{dai-etal-2019-style} for the IMDB Movie Review dataset (positive/negative sentiment labels), we constructed a sentence-level version of the dataset. Initially, we fine-tuned a pre-trained BERT \citep{Devlin2018} toxicity classifier on the Civil Comments dataset. Then, we split the comments in sentences with NLTK’s sentence tokenizer.\footnote{\url{https://www.nltk.org/api/nltk.tokenize.html}} Eventually, we created $X_T$ (respectively $X_C$) with sentences whose system-generated toxicity score (using our BERT classifier) is greater than $0.9$ (respectively less than $0.1$) to increase the dataset's polarity. The test ROC-AUC of the toxicity classifier is $0.98$ with a precision of $0.95$ and a recall of $0.38$. Even with this low recall $|X_T|$ is large enough (approx. 90k, see Table~\ref{tab:dataset_stats}). We also conducted a comparison to other style transfer baselines on the \textbf{Yelp Review Dataset} (Yelp), commonly used to compare unsupervised attribute transfer systems. It consists of restaurant and business reviews annotated with a binary positive / negative label. \citet{shen2017style} processed it and \citet{li-etal-2018-delete} collected human reference human references for the test set\footnote{\url{https://github.com/lijuncen/Sentiment-and-Style-Transfer/tree/master/data/yelp}}. Table~\ref{tab:dataset_stats} shows statistics for these datasets. \begin{table} \centering \small \begin{tabular}{|l|c|c|c|c|} \hline Dataset & \multicolumn{2}{c|}{\textbf{Yelp}} & \multicolumn{2}{c|}{\textbf{Polar Civ. Com.}} \\ Attribute & Positive & Negative & Toxic & Civil\\\hline Train & 266,041 & 177,218 & 90,293 & 5,653,785 \\ Dev & 2,000 & 2,000 & 4,825 & 308,130 \\ Test & 500 & 500 & 4,878 & 305,267 \\\hline Av. len. & 11.0 & 13.0 & 19.4 & 21.9 \\\hline \end{tabular} \caption{\small Statistics for the Yelp dataset and the processed version of the Civil Comments dataset. Average lengths are the average numbers of SentencePiece tokens.} \label{tab:dataset_stats} \end{table} \subsection{Evaluation} Evaluating a text-to-text task is challenging, especially when no gold pairs are available. Attribute transfer is successful if generated text: 1) has the destination control attribute, 2) is fluent and 3) preserves the content of the input text. \subsubsection{Automatic evaluation} We follow the current approach of the community \citep{NIPS2018_7959, logeswaran2018content, wang2019controllable, xu2019variational, lample2018multipleattribute, dai-etal-2019-style, he2020probabilistic} and approximate the three criteria with the following metrics: \begin{enumerate}[wide, labelwidth=!, labelindent=0pt] \item \textbf{Attribute control}: Accuracy (ACC) computes the rate of successful changes in attributes. It measures how well the generation is conditioned by the destination attribute. We predict toxic and civil attributes with the same fine-tuned BERT classifier that pre-processed the Civil Comments dataset (single threshold at $0.5$). \item \textbf{Fluency}: Fluency is measured by perplexity (PPL). To measure PPL, we employed GPT2 \citep{radford2019language} LMs fine-tuned on the corresponding datasets (Civil Comments and Yelp). \item \textbf{Content preservation}: Content preservation is the most difficult aspect to measure. UNMT \citep{conneau2019cross}, summarization \citep{liu2019summae} and sentiment transfer \citep{li-etal-2018-delete} have access to a few hundred samples with at least one human reference of the transferred text and evaluate content preservation by computing metrics based on matching words (e.g., BLEU \citet{papineni-etal-2002-bleu}) between the generated prediction and the reference(s) (ref-metric). However, as we do not have these paired samples, we compute a content preservation score between the input and the generated sentences (self-metric). \begin{table} \small \begin{center} {\tiny \begin{tabular}{p{1.0cm}|p{2.5cm}|c c} & \sc Text & \sc BLEU & \sc SIM \\\hline Original & furthermore, kissing israeli ass doesn't help things a bit \\ Human rephrasing & \textbf{also, supporting the israelis doesn't help things a bit.} & 57.6 & 70.6\%\\ \hline Original & just like the rest of the marxist idiots. \\ Human rephrasing & \textbf{it is the same thing with people who follow Karl Marx doctrine} & 3.4 & 65.3\%\\\hline Original & you will go down as being the most incompetent buffoon ever elected, congrats!\\ Human rephrasing & \textbf{you could find out more about it.} & 2.3 & 16.2\% \end{tabular} } \caption{\small Evaluation with BLEU and SIM of examples rephrased by human crowdworkers.} \vspace*{-4mm} \label{tab:first_examples_assessed} \end{center} \end{table} Table~\ref{tab:first_examples_assessed} shows the BLEU scores (based on exact matches) of three examples rephrased by human annotators (Section \ref{discussion}). In the top-most example, BLEU score is high. This is explained by the fact that only 4 words are different between the two texts. In contrast to the first example, the two texts in the second example have only 1 word in common. Thus, the BLEU score is low. Despite the low evaluation, however, the candidate text could have been a valid rephrase of the reference text. The high complexity of our task explains the motivation for a more general quantitative metric between input and generated text, capturing the semantic similarity rather than overlapping tokens. \citet{fu2018style, john-etal-2019-disentangled, gong2019reinforcement, pang2019unsupervised} proposed to represent sentences as a (weighted) average of their words embeddings before computing the cosine similarity between them. We adopted a similar strategy but we embedded sentences with the pre-trained universal sentence encoder \citep{cer2018universal} and call it the sentence similarity score (SIM). The first two sentence pairs of Table~\ref{tab:first_examples_assessed} have high similarity scores. The rephrasings preserve the original content while not necessarily overlapping much with the original text. However, the last rephrasing does not preserve the initial content and have a low similarity score with its source sentence. As a statistical evidence, the self-SIM score comparing each of the 1,000 test Yelp reviews with their human rewriting is 80.2\% whereas the self-SIM score comparing the Yelp review test set to a random derangement of the human references is 36.8\%. We optimised all three metrics because doing otherwise comes at the expense of the remaining metric(s). We aggregated the scores of the three metrics by computing the geometric mean\footnote{The geometric mean is not sensitive to the scale of the individual metrics.} (GM) of ACC, 1/PPL and self-SIM. \end{enumerate} \subsubsection{Human evaluation} Following \citet{li-etal-2018-delete, zhang-etal-2018-learning-sentiment, zhang2018style, wu2019hierarchical, ijcai2019-732, wang2019controllable, john-etal-2019-disentangled, liu2019revision, luo2019dual, jin2019imat} and to further confirm the performance of CAE-T5, we hired human annotators on Appen to rate in a blind fashion different models' civil rephrasings of 100 randomly selected test toxic comments, in terms of attribute transfer (Att), fluency (Flu), content preservation (Con) and overall quality (Over) on a Likert scale from 1 to 5. Each rephrasing was annotated by 5 different crowd-workers whose annotation quality is controlled by test questions. If a rephrasing is rated 4 or 5 on Att, Flu and Con then it is ``successful'' (Suc). \subsection{Baselines} We compare the output text that CAE-T5 generates with a selection of unpaired style-transfer models described in Section \ref{related_baselines} \citep{shen2017style, li-etal-2018-delete, fu2018style, luo2019dual, dai-etal-2019-style}. We also compare with Input Masking. It is inspired by an interpretability method called Input Erasure (IE) \cite{Li2016}. IE is used to interpret the decisions of neural models. Initially, words are removed one at a time and the altered texts are then re-classified (i.e., as many re-classifications as the words). Then, all the words that led to a decreased re-classification score (based on a threshold) are returned as the ones most related to the decision of the neural model. Our baseline follows a similar process, but instead of deleting, it uses a pseudo token (\textsc{`[mask]'}) to mask one word at a time. When all the masked texts have been scored by the classifier, the rephrased text is returned, comprising as many masks as the tokens that led to a decreased re-classification score (set to 20\% after preliminary experiments). We employed a pre-trained BERT as our toxicity classifier, fine-tuned on the Civil Comments dataset (see Section \ref{datasets}). \iffalse \subsection{Experimental setup} \subsubsection{Architecture details} We fine-tuned the pre-trained ``large'' bi-transformer from \citet{raffel2019exploring}. Both uni-transformers (encoder and decoder) have $24$ blocks each made of a 16-headed self-attention layer and a feed-forward network. The attention, dense and embedding layers have respective dimensions of $64$, $4096$ and $1024$, for a total of around 800 million parameters. Input sentences are lowercased then tokenized with SentencePiece\footnote{\url{gs://t5-data/vocabs/cc_all.32000/sentencepiece.model}} \citep{kudo-richardson-2018-sentencepiece} and eventually truncated to a maximum sequence length of $32$ for the Yelp dataset and $128$ for the processed Civil Comments dataset. The control codes are $c(a) = concat(a, \texttt{":\:"})$ for attributes $a \in \{\texttt{"positive"}, \texttt{"negative"}\}$ in the sentiment transfer task and $a \in \{\texttt{"toxic"}, \texttt{"civil"}\}$ when we apply to the Civil Comments dataset. \subsubsection{Training details} During training, we apply dropout regularization at a rate of $0.1$. We set $\lambda_{AE} = \lambda_{CC} = 1.0$. DAE and back-transfer (in the course of the CC computation) are trained with teacher-forcing; we do not need AR generation since we have access to a target for the decoder's output. Each training step computes the loss on a mini-batch made of 64 sentences sharing the same attribute. Mini-batches of attributes $a$ and $\bar{a}$ are interleaved. Since the Civil Comments dataset is class imbalanced, we sample comments from the toxic class of the training set at each epoch. The optimizer is AdaFactor \citep{shazeer2018adafactor} and we train for 88900 steps for 19 hours on a TPU v2 chip. \subsubsection{Evaluation details} Decoding is greedy. The parametric models used to compute ACC and PPL are 12-layer, 12 headed pre-trained, and fine-tuned uni-transformers with hidden size $768$. The BERT classifier is an encoder followed by a sequence classification head and the GPT2 LM is a decoder with a LM head on top. We use the sacrebleu\footnote{\url{https://github.com/mjpost/sacrebleu/blob/master/sacrebleu/sacrebleu.py}} implementation for BLEU and the universal sentence encoder pre-trained by Google to compute SIM\footnote{\url{https://tfhub.dev/google/universal-sentence-encoder/2}}. \fi \subsection{Results} \subsubsection{Quantitative comparison to prior work} Table~\ref{tab:civil_comments_results} shows quantitative results on the Civil Comments dataset. Surprisingly, the perplexity (capturing fluency) of text generated by our model is lower than the perplexity computed on human comments. This can be explained by social media authors of comments expressing an important variability in language formal rules, that is only partially replicated by CAE-T5. Other approaches such as StyleTransformer (ST) and CrossAlignment (CA) have higher accuracy but at a cost of both higher perplexity and lower content preservation, meaning that they are better are discriminating toxic phrases but struggle to rephrase in a coherent manner. In Table~\ref{tab:yelp_results} we compare our model to prior work in attribute transfer by computing evaluation metrics for different systems on the Yelp test dataset. We achieve competitive results with low perplexity while getting good sentiment controlling (above human references). Our similarity though is lower, showing that some content is lost when decoding, hence the latent space does not fully capture the semantics. It is fairer to compare our model to other style transfer baselines on the Yelp dataset since our model is based on sub-word tokenization while the baselines are often based on a limited size pre-trained word embedding: many more words from the Civil Comments dataset could be attributed to the unknown token if we want to keep reasonable size vocabulary, resulting in a performance drop. The human evaluation results shown in Table~\ref{tab:civil_comments_results_human} correlate with the automatic evaluation results. When considering the aggregated scores (geometric mean, success rate and overall human judgement), our model is ranked first on the Civil Comments dataset and second on the Yelp Review dataset, behind DualRL yet our approach is more stable and therefore easier to train when compared to reinforcement learning approaches. \begin{table}[t] \centering \small \begin{tabular}{|l|c|c|c||c|} \hline \textbf{Model} & \textbf{ACC} $\uparrow$ & \textbf{PPL} $\downarrow$ & \textbf{self-SIM} $\uparrow$ & \textbf{GM} $\uparrow$ \\\hline\hline Copy input & 0\% & 6.8 & 100\% & 0.005 \\ Random civil & 100\% & 6.6 & 20.0\% & 0.311 \\ Human & 82.0\% & 9.2 & 73.8\% & 0.404 \\\hline\hline CA & 94.0\% & 11.8 & 38.4\% & 0.313 \\\hline IE (BERT) & 86.8\% & 7.5 & 55.6\% & 0.401 \\\hline ST (Cond) & 97.8\% & 47.2 & 68.3\% & 0.242 \\ ST (M-C) & \textbf{98.8\%} & 64.0 & 67.9\% & 0.219\\\hline\hline CAE-T5 & 75.0\% & \textbf{5.2} & \textbf{70.0\%} & \textbf{0.466} \\\hline \end{tabular} \caption{\small Automatic evaluation scores of different models trained and evaluated on the processed Civil Comments dataset. The scores are computed on the toxic test set. ``Human'' corresponds to 427 human rewritings of randomly sampled toxic comments from the train set. ``Random civil'' means we randomly sampled 4,878 comments from the civil test set.} \label{tab:civil_comments_results} \end{table} \begin{table*}[t] \centering \small \begin{tabular}{|l|c|c|c|c||c||c|c|} \hline \textbf{Model} & \textbf{ACC} $\uparrow$ & \textbf{PPL} $\downarrow$ & \textbf{self-SIM} $\uparrow$ & \textbf{ref-SIM} $\uparrow$ & \textbf{GM} $\uparrow$ & \textbf{self-BLEU} & \textbf{ref-BLEU} \\\hline\hline Copy input & 1.3\% & 11.1 & 100\% & 80.2\% & 0.105 & 100 & 32.5 \\ Human references & 79.4\% & 14.0 & 80.2\% & 100\% & 0.357 & 32.7 & 100 \\\hline\hline CrossAlignment \citep{shen2017style} & 73.5\% & 54.4 & 61.0\% & 59.0\% & 0.202 & 21.5 & 9.6\\\hline \citep{li-etal-2018-delete} & & & & & & & \\ RetrieveOnly & \textbf{99.9\%} & \textbf{4.9} & 47.1\% & 48.0\% & 0.213 & 2.7 & 1.8 \\ TemplateBased & 84.1\% & 46.0 & 76.0\% & 68.2\% & 0.240 & 57.0 & 23.2 \\ DeleteOnly & 85.2\% & 48.7 & 72.6\% & 67.7\% & 0.233 & 33.9 & 15.2 \\ D\&R & 89.8\% & 35.8 & 72.0\% & 67.6\% & 0.262 & 36.9 & 16.9 \\\hline \citep{fu2018style} & & & & & & & \\ StyleEmbedding & 8.1\% & 29.8 & 83.9\% & 69.8\% & 0.132 & \textbf{67.5} & 21.9 \\ MultiDecoder & 47.2\% & 74.2 & 67.7\% & 61.4\% & 0.163 & 40.4 & 15.2 \\\hline DualRL \citep{luo2019dual} & 88.1\% & 20.5 & 83.6\% & \textbf{77.2\%} & \textbf{0.330} & 58.7 & 29.0 \\\hline \citep{dai-etal-2019-style} & & & & & & & \\ StyleTransformer (Conditional) & 91.7\% & 44.8 & 80.3\% & 74.2\% & 0.254 & 53.2 & 25.6\\ StyleTransformer (Multi-Class) & 85.9\% & 29.1 & \textbf{84.2\%} & 77.1\% & 0.292 & 62.8 & \textbf{29.2} \\\hline\hline CAE-T5 & 84.9\% & 22.9 & 67.7\% & 64.4\% & 0.293 & 27.3 & 14.0 \\\hline \end{tabular} \caption{\small Automatic evaluation scores of different models trained and evaluated on the Yelp dataset. Accuracy is computed by a BERT classifier fine-tuned on the Yelp train set (accurate at $98.7\%$ on the test set). Perplexity is measured by a GPT2 language model fine-tuned on the Yelp train set. ``self-'' refers to a comparison to the input and ``ref-'' to a human reference.} \label{tab:yelp_results} \end{table*} \begin{table}[t] \centering \small \begin{tabular}{|l|c|c|c||c|c|} \hline \textbf{Model} & \textbf{Att} $\uparrow$ & \textbf{Flu} $\uparrow$ & \textbf{Con} $\uparrow$ & \textbf{Suc} $\uparrow$ & \textbf{Over} $\uparrow$ \\\hline\hline CA & \textbf{2.98} & 2.32 & 1.89 & 6 \% & 1.81 \\\hline IE (BERT) & 2.77 & 2.39 & 2.20 & 6 \% & 1.89 \\\hline ST (Cond) & 2.91 & 2.36 & 2.08 & 5\% & 1.87 \\ ST (M-C) & 2.93 & 2.42 & 2.10 & 5\% & 1.93 \\\hline\hline CAE-T5 & 2.72 & \textbf{3.06} & \textbf{2.63} & \textbf{13\%} & \textbf{2.52} \\\hline \end{tabular} \caption{\small Human evaluation of different models trained and evaluated on the Civil Comments dataset.} \label{tab:civil_comments_results_human} \end{table} \subsubsection{Qualitative analysis} Table~\ref{tab:qual} shows examples of rephrases of toxic comments automatically generated by our system. The top first two examples emphasize the ability for the model to perform fluent control generation conditioned on both the input sentence and the destination attribute. We present more results showing that we can effectively suggest fluent civil rephrases of toxic comments in the Appendix Table~\ref{tab:qual_results_civil_comments_toxic}. However we observe more failures than in the sentiment transfer task (see examples in the Appendix Table~\ref{tab:qual_results_yelp}). We identify three natures of failure: \begin{description} \item[Supererogation] generation does not stop early enough and produces fluent, transferred, related but unnecessary content. \item[Hallucination] conditioning on the initial sentence fails and the model generates fluent but unrelated content. \item[Position reversal] the author's opinion is shifted. \end{description} In order to assess the frequency of hallucination and supererogation, we randomly selected 100 toxic comments from the test set and manually labeled the generated sentences with the non-mutually exclusive labels ``contains supererogation'' and ``contains hallucination''. We counted on average 17\% of generated sentences with surrerogation and 34\% of generated sentences showing hallucination (often local). We observe that the longer the input comment, the more prone to hallucination is the generated text. While supererogation and hallucination can be explained by the probabilistic nature of generation, we assume that position reversal is due to bias in the dataset, where toxic comments are correlated with negative comments. Thus, offensive comments tend to be transferred to supportive comments even though a human being would rephrase attacks as polite disagreements. Interestingly, our model is able to add toxicity in civil comments as shown by the examples in the Appendix Table~\ref{tab:qual_results_civil_comments_civil}. Even if such an application shows limited interest for online platforms, it is worth warning about its potential misuse. \begin{table}[t] \centering \small \begin{tabular}{p{3cm}|p{4cm}} \sc input & \sc mitigated \\\hline stop being ignorant and lazy and try reading a bit about it. & try reading and \textcolor{green}{\textbf{be a little more informed}} about it before you try to make a comment.\\\hline this is absolutely the most idiotic post i have ever read on all levels. & this is absolutely the most \textcolor{green}{\textbf{important thing}} i have read on this thread over the years.\\\hline trump may be a moron, but clinton is a moron as well. & trump may be a \textcolor{red}{\textit{clinton supporter}}, but clinton is a \textcolor{red}{\textit{trump supporter}} as well.\\\hline shoot me in the head if you didn't vote for trump.& \textcolor{magenta}{\cancel{you're right}} if you didn't vote for trump. \textcolor{blue}{\bcancel{i'm not sure i'd vote}}\\\hline 50\% of teachers don’t have any f*cks to give.& 50\% of teachers don’t have \textcolor{orange}{\xcancel{a phd in anything.}}\\\hline \end{tabular} \caption{\small Examples of automatically transferred test sentences by our system, \textcolor{green}{\textbf{valid rewriting}}, and highlighted flaws \textcolor{red}{\textit{failure in attribute transfer or fluency}}, \textcolor{blue}{\bcancel{supererogation}}, \textcolor{magenta}{\cancel{position reversal}}, and \textcolor{orange}{\xcancel{hallucination}}.} \label{tab:qual} \end{table} \iffalse \begin{table*}[t] \centering \small \begin{tabular}{l p{13cm}} \hline \multicolumn{2}{c}{\textbf{Positive to Negative}} \\\hline Input & portions are very generous and food is fantastically flavorful . \\ DualRL & portions are very \textcolor{green}{thin} and food is \textcolor{red}{confusing} .\\ ST (Multi) & portions are very \textcolor{red}{poorly} and food is \textcolor{red}{springs} \textcolor{green}{flavorless} .\\ CAE-T5 & portions are very \textcolor{green}{small} and food is \textcolor{green}{awfully greasy for the price} .\\ Human & portions are very \textcolor{green}{small} and food is \textcolor{green}{not flavorful} .\\\hline \multicolumn{2}{c}{\textbf{Negative to Positive}} \\\hline Input & the store is dumpy looking and management needs to change .\\ DualRL & the store is \textcolor{green}{perfect} looking and management \textcolor{red}{speaks to change perfectly} . \\ ST (Multi) & the store is \textcolor{green}{dumpy} looking and management \textcolor{red}{moved to change} . \\ CAE-T5 & the store is \textcolor{green}{neatly organized and clean} and \textcolor{green}{staff is on top of it} . \\ Human & managment \textcolor{green}{is top notch} , the \textcolor{green}{place looks great} .\\\hline\hline \multicolumn{2}{c}{\textbf{Toxic to Civil}} \\\hline Input & and then they need to do what it takes to get rid of this mentally ill bigot! \\ CAE-T5 & and then they need to do what they can to get rid of this \textcolor{green}{kind of man that is causing the whole problem!}\\\hline Input & this is absolutely the most idiotic post i have ever read on all levels.\\ CAE-T5 & this is absolutely the most \textcolor{green}{important thing} i have read on this thread over the years.\\\hline Input & trump may be a moron, but clinton is a moron as well.\\ CAE-T5 & trump may be a \textcolor{red}{clinton supporter}, but clinton is a \textcolor{red}{trump supporter} as well.\\\hline Input & shoot me in the head if you didn't vote for trump.\\ CAE-T5 & \textcolor{magenta}{you're right} if you didn't vote for trump. \textcolor{blue}{i'm not sure i'd vote}\\\hline Input & 50\% of teachers don’t have any f*cks to give.\\ CAE-T5 & 50\% of teachers don’t have \textcolor{orange}{a phd in anything.}\\\hline \multicolumn{2}{c}{\textbf{Civil to Toxic}} \\\hline Input & and just which money tree is going to pay for this? \\ CAE-T5 & and just where is the money going to come from to pay for this \textcolor{green}{crap}? \textcolor{blue}{when is this crap going to end? who cares????}\\\hline\hline \end{tabular} \caption{\small Examples of transferred sentences from test sets. \textcolor{green}{green} indicates valid rewriting, \textcolor{red}{red} shows failure either in attribute transfer or in fluency and \textcolor{blue}{blue} highlights supererogation. Some examples see a change in attribute with position reversal (\textcolor{magenta}{magenta}) or hallucination (\textcolor{orange}{orange}).} \label{tab:qual_results} \end{table*} \fi \subsection{Discussion}\label{discussion} Supervised learning is a natural approach when addressing text-to-text tasks. In our study, we submit the civil rephrasing of toxic comments task to human crowd-sourcing. We randomly sampled 500 sentences from the toxic train set. For each sentence, we asked 5 annotators to rephrase it in a civil way, to assess if the comment was offensive and if it was possible to rewrite it in a way that is less rude while preserving the content. On 2500 answers, we tally 427 examples not flagged as impossible to rewrite and with a rephrasing different from the original sentence. This low $17.1\%$ yield is caused by two main issues. On the one hand, unfortunately not all toxic comments can be reworded in a civil manner so as to express a constructive point of view; severely toxic comments that are solely made of insults, identity attacks, or threats are not ``rephrasable''. On the other hand, evaluating crowd-workers with test questions and answers is complex. The perplexity being higher on crowd-workers' rephrases than on randomly sampled civil comments raises concerns about the production of human references \textit{via} crowd-sourcing. The nature of large datasets labeled in toxicity and the lack of incentives for crowd-sourcing civil rephrasing annotation makes it expensive and difficult to train systems in a supervised framework. These limitations motivates unsupervised approaches. Lastly, the more complex is the unsupervised attribute transfer task, the more difficult is its automatic evaluation. In our case, evaluating whether the attribute is actually transferred requires to train an accurate toxicity classifier. Furthermore, the language model we use to assess the fluency of the generated sentences has some limitations and does not generalize to all varieties of language encountered in social media. Finally measuring the amount of relevant content preserved between the source and generated texts remains a challenging, open research topic. \section{Conclusion and future work} This work is the second one to tackle civil rephrasing to our knowledge and the first one to address it with a fully end-to-end discriminator-free text-to-text self-supervised training. CAE-T5 leverages the NLU / NLG power offered by large pre-trained bi-transformers. The quantitative and qualitative analysis shows that ML systems could contribute to some extent to pacify online conversations, even though many generated examples still suffer from critical semantic drift. In the future, we plan to explore whether the decoding can benefit from NAR generation \citep{ma2019flowseq, ren2020study}. We are also interested in the recent paradigm shift proposed by \citet{kumar2018vmf}, where the generated tokens representation is continuous, allowing more flexibility in plugging attribute classifiers without sampling. \section*{Acknowledgments} This work was completed in partial fulfillment for the PhD degree of the first author, which was supported by an unrestricted gift from Google. We are also grateful for support from the Google Cloud Platform credits program. We thank Thomas Bonald and Ion Androutsopoulos for their discussion, insight and useful comments. \bibliographystyle{acl_natbib}
\section{Introduction} \label{sec:intro} Recent advances in Artificial Intelligence (AI), especially in machine learning (ML) and deep learning (DL), and their integration into software-based systems of all domains raise new challenges to engineering modern AI-based systems. These systems are data-intensive, continuously evolving, self-adapting, and their behavior has a degree of (commonly accepted) uncertainty due to inherent non-determinism. These characteristics require adapted and new constructive and analytical quality assurance (QA) approaches from the field of software engineering (SE) in order to guarantee the quality during development and operation in live environments. However, as pointed out by Borg~\cite{borg2021aiq}, already the concept of "quality" in AI-based systems is not well-defined. Furthermore, as pointed out by Lenarduzzi et al.~\cite{lenarduzzi2021sqai}, terminology differs in AI and software engineering. The knowledge and background of different communities are brought together for developing AI-based systems. While this leads to new and innovative approaches, exciting breakthroughs, as well as a significant advancement in what can be achieved with modern AI-based systems, it also fuels the babel of terms, concepts, perceptions, and underlying assumptions and principles. For instance, the term "regression" in ML refers to regression models or regression analysis, whereas in SE it refers to regression testing. Speaking about "testing", this term is defined as the activity of executing the system to reveal defects in SE but refers to the evaluation of performance characteristics (e.g., accuracy) of a trained model with a holdout validation dataset in ML. The consequences are increasing confusion and potentially conflicting solutions for how to approach quality assurance for AI-based systems and how to tackle the associated challenges. While this paper starts from a software engineering point of view, its goal is to incorporate and discuss also many other perspectives, which eventually aggregate into a multi-dimensional big picture of quality assurance for AI-based systems. In this paper, we first discuss the terminology on quality assurance for AI in Section~\ref{sec:terminology}. Then, we discuss challenges on QA for AI in Section~\ref{sec:challenges}. Finally, in Section~\ref{sec:conclusion} we conclude the paper. \section{Background and Terminology} \label{sec:terminology} \emph{AI-based system} (also called \emph{AI-enabled system}) refers to a software-based system that comprises AI components besides traditional software components. However, there are different definitions of what AI means, which vary in their scope and level of detail. AI is (human) intelligence demonstrated by machines, which implies the automation of tasks that normally would require human intelligence. For our context, i.e., quality assurance, we pragmatically include those AI techniques in our working definition of AI that require new or significantly adapted quality assurance techniques. This comprises supervised ML and DL, which require to transfer control from source code (where traditional QA can be applied) to data. Borg~\cite{borg2021aiq} explicitly introduces the term \emph{MLware} for the subset of AI that, fueled by data, realizes functionality through machine learning. \emph{Software quality} is defined as the capability of a software product to satisfy stated and implied needs when used under specified conditions~\cite{ISO2005SoftwareQualityGuide}. \emph{Software quality assurance} is then the systematic examination of the extent to which a software product is capable of satisfying stated and implied needs~\cite{ISO2005SoftwareQualityGuide}. \emph{AI components}, especially based on supervised ML or DL, differ fundamentally from traditional components because they are data-driven in nature, i.e., their behavior is non-deterministic, statistics-orientated and evolves over time in response to the frequent provision of new data~\cite{amershi2019software}. An AI component embedded in a system comprises the data, the ML model, and the framework. Data are collected and pre-processed for use. Learning program is the code for running to train the model. Framework (e.g., Weka, scikit-learn, and TensorFlow) offers algorithms and other libraries for developers to choose from when writing the learning program. To characterize AI-based systems for the purpose of quality assurance, it is meaningful to consider several dimensions. Such dimensions are the \emph{artifact type} dimension, the \emph{process} dimension and the \emph{quality characteristics} dimension. The dimensions and their values are shown in Fig.~\ref{fig:qaai}. \begin{figure}[h] \centering \includegraphics[width=\textwidth]{QAAI-Dimensions.pdf} \caption{Dimensions of AI-based Systems and Quality Assurance} \label{fig:qaai} \end{figure} On the artifact type dimension, we can consider, based on the characterization of AI components in the previous paragraph, the system, framework, model and data perspective. On the process dimension, we can distinguish whether AI components and systems are developed in isolation or continuously by iteratively taking feedback from the deployed components into account based on DevOps principles. For all artifact and process settings, quality characteristics are relevant. For instance, additional \emph{quality properties} of AI components and AI-based systems have to be taken into account. Zhang et al.~\cite{zhang2020machine} consider the following quality properties: \begin{itemize} \item \emph{Correctness} refers to the probability that an AI component gets things right. \item \emph{Model relevance} measures how well an AI component fits the data. \item \emph{Robustness} refers to the resilience of an AI component towards perturbations. \item \emph{Security} measures the resilience against potential harm, danger or loss made via manipulating or illegally accessing AI components. \item \emph{Data privacy} refers to the ability of an AI component to preserve private data information. \item \emph{Efficiency} measures the construction or prediction speed of an AI component. \item \emph{Fairness} ensures that decisions made by AI components are in the right way and for the right reason to avoid problems in human rights, discrimination, law, and other ethical issues. \item \emph{Interpretability} refers to the degree to which an observer can understand the cause of a decision made by an AI component. \end{itemize} Felderer et al.~\cite{felderer2019testing} highlight the additional importance of \emph{data quality} for the quality of AI components. According to ISO/IEC 25012~\cite{ISO2008DataQuality} data quality characteristics in the context of software development can be classified into inherent and system-dependent data characteristics. \emph{Inherent data quality} refers to data itself, in particular to data domain values and possible restrictions, relationships of data values and meta-data. \emph{System-dependent data quality} refers to the degree to which data quality is reached and preserved within a system when data is used under specified conditions. For the framework, which ultimately is software, the classical software quality characteristics based on ISO/IEC 25010~\cite{ISO2011SoftwareQuality}, i.e., effectiveness, efficiency, satisfaction, freedom from risk and context coverage for quality in use as well as functional suitability, performance efficiency, compatibility, usability, reliability, security, maintainability, and portability for system/software product quality can be applied. \emph{Testing of AI components} or \emph{AI-based systems} refers to any activity aimed at detecting differences between existing and required behaviors of AI components or AI-based systems. The testing properties (such as correctness, robustness, or efficiency) stem from the quality characteristics defined before. Testing can target the data, the ML model, the framework, or the entire system. Depending on whether testing activities for AI components are performed before or after ML model deployment one can distinguish offline and online testing. \emph{Offline testing} tests the AI component with historical data, but not in an application environment~\cite{zhang2020machine}. Cross-validation using a validation dataset is a typical offline testing approach to make sure that the AI component meets the required conditions. \emph{Online testing} tests deployed AI components in a real or virtual application environment. Online testing complements offline testing, because the latter relies on historical data not fully representing future data, is not able to test some problematic circumstances occurring in real environments like data loss, and has no access to direct user feedback. A common online testing technique is \emph{A/B testing}, which is a splitting testing technique to compare two or more versions of a deployed component. A/B tests are often performed as experiments and the activity is called continuous experimentation in software engineering~\cite{ros2018continuous,auer2018current}. \section{Challenges} \label{sec:challenges} A wide range of challenges exists, which stem from the novelty of the topic. Currently, there is a lack of (standardized) approaches for quality assurance of AI-based systems. Many attempts are in progress to fill the void. Yet the understanding of the problem is still very incomplete. It prolongs to fundamental questions like what are relevant quality characteristics (see previous section) and what is a bug. An example for a "new type of bug" unseen in conventional software is the phenomenon of adversarial examples \cite{yuan2019adversarial}, where small variations in the input (e.g., noise in image data or recorded speech that is not or barely noticeable for the human user) has a dramatic impact on the output as it results in a severe misclassification. In addition to outlining important concepts and terms in the previous section, this section elaborates on the following key challenges encountered in the development of approaches for quality assurance and testing of AI-based systems. \begin{itemize} \item Understandability and interpretability of AI models \item Lack of specifications and defined requirements \item Need for validation data and test input generation \item Defining expected outcomes as test oracles \item Accuracy and correctness measures \item Non-functional properties of AI-based systems \item Self-adaptive and self-learning characteristics \item Dynamic and frequently changing environments \end{itemize} \subsubsection{Understandability and interpretability:} Data scientists are struggling with the problem that ML and in particular DL are producing models that are opaque, non-intuitive, and difficult for people to understand. The produced models turned out to be uninterpretable "black boxes" \cite{goebel2018explainable}. This challenge propagates to testing and quality assurance activities and it affects debugging models when they have confirmed defects. Black-box testing is a common approach in software quality assurance. So why does the lack of understandability and interpretability also have an impact on testing? The challenge for quality assurance results from the \emph{lack of specifications and defined requirements} that developers and testers are used to have for conventional software systems and which provide the knowledge necessary to understand, build and test the system~\cite{bosch2018takes}. \subsubsection{Lack of specifications and defined requirements:} Data-based/learning-based approaches do not rely on specifications and predefined requirements. They automatically generate models from existing data. The data used for learning consists of a wide range of input and labeled output. Model generation is an exploratory approach. Learning algorithms are applied to seek relevant "rules" how to connect the input to the expected output. Whether such rules can be found and how adequate they are to accurately model the connection is usually unclear at the beginning of the learning process. Conventional software development works in the exact opposite way compared to data-based/learning-based approaches~\cite{fischer2020applying}. Specifications are defining the required behavior of the system, i.e., the "rules". They are available before the system is implemented. People have learned about relevant rules, for example, by experience (e.g., domain experts) or because they have acquired the knowledge from specifications (e.g., developers). The goal in testing conventionally developed systems is to come up with inputs and labeled outputs to verify and validate the implemented rules. Testing explores representative scenarios as well as boundaries and corner cases. This goal is also important for testing AI-based systems. However, testing techniques for conventional systems are supposed to rely on specifications to derive inputs or to determine the expected outcome for an input, which leads to further challenges such as the challenge of \emph{test input generation} and \emph{defining test oracles} when testing AI-based systems. \subsubsection{Test input generation:} In testing, it is usually the case that systems have a huge input space to be explored. Hence, at the core of any testing approach is the problem that completely exercising even a moderately complex system is impossible due to the combinatorial explosion of the number of possible inputs. Testing AI-based systems is no difference~\cite{marijan2019challenges}. Software testing techniques commonly deal with the challenge of huge input spaces by adopting sampling strategies for selecting inputs when designing test cases. A number of testing techniques have been developed that are classified~\cite{7346375} as specification-based (black-box), structure-based (white-box), or experience-based. Similar techniques suitable for AI-based system testing are yet to emerge. First techniques have been proposed that exploit structure information of deep neural networks to derive coverage measures such as various forms of neuron coverage (see, e.g.,~\cite{10.1145/3293882.3330579}). Inputs (test data) is generated with the goal to maximize coverage. Various approaches are currently explored, from random generation (fuzzing)~\cite{10.1145/3293882.3330579} to GAN-based metamorphic approaches~\cite{zhang2018deeproad}. However, due to the lack of interpretability and understandability (resulting from a lack of specifications and requirements), identifying and selecting representative inputs to construct meaningful test cases is still an open challenge~\cite{braiek2020testing}. \subsubsection{Defining test oracles:} The goal of testing is to reveal faults in terms of incorrect responses or behavior of the system in reaction to a specific input. In order to determine whether the observed output (responses and behavior) is correct or incorrect, it has to be compared to some expected output. The source providing information about what is a correct output is called test oracle~\cite{barr2015oracle}. In manually constructing test cases, a human tester defines the input and the corresponding expected output. In a production setting, however, the input is dynamically created throughout the actual use of the system in a particular context or environment. It typically includes values and value combinations that have never been used before and which were even not anticipated to be used at all. Hence, the "oracle problem" of determining the correct output for an input, a core challenge in testing, dramatically increases when testing in performed in production environments under diverse settings. \subsubsection{Accuracy and correctness:} Closely related is the \emph{accuracy problem}. Software is expected to be deterministic and correct. Any deviation from the expected behavior and any difference in the output is considered a defect that is supposed to be fixed. It is well known, that real-world software is not defect-free and there is no perfect system. However, the underlying principles and the level of correctness currently achieved in software engineering is different from what AI-based systems exhibit. AI-based systems are accepted to be inherently "defective", as they usually operate in a defined accuracy range. Yet a system with 99\% accuracy will "fail" in about one out of hundred runs. Applying conventional testing and quality assurance principles and approaches is incompatible with the underlying assumption that the system is considered correct although it exhibits a high number of contradicting ("failing") cases. The corresponding testing techniques and quality metrics developed for deterministic systems first need to be adapted before they can be used to assess systems with probabilistic behavior. \subsubsection{Non-functional properties:} Testing for \emph{non-functional aspects} is always challenging and requires suitable approaches to specify expected properties. This also holds for testing of AI-based systems, where testing non-functional aspects has rarely been explored~\cite{zhang2020machine}. Especially robustness and efficiency are well suited for testing in production. Testing robustness of AI components is challenging because input data has more diverse forms, for instance image or audio data. Especially adversarial robustness, where perturbations are designed to be hard to detect are also hard to define in terms of corresponding test oracles. Metamorphic relations~\cite{xie2011testing,dwarakanath2018identifying} are therefore frequently exploited as alternative ways to construct test oracles. Testing efficiency for AI components has to deal not only with prediction speed, but also with construction speed, which poses challenges to measuring and analyzing performance, especially in a real-time context when decisions have to be made instantaneous (e.g., in autonomous driving). \subsubsection{Self-adaptive and self-learning systems:} Regression testing is a major task in any modern software development project. The agile paradigm and the DevOps movement have led to short development cycles with frequent releases as well as the widespread use of techniques such as Continuous Integration, Deployment, and Delivery~\cite{humble2010continuous}. The answer to the question how quality assurance can keep up with the continuously growing development speed is automated testing. Test automation, however, is a major cost-driver. First, due to the effort for initially setting up the test environment and implementing the automated tests, and second, even more so due to the effort for maintaining the automated tests when the system under test has been changed~\cite{garousi2016developing}. In contrast to conventional software that is evolved over a series of development iterations, many AI-based systems are designed to evolve dynamically at run-time by self-adapting to changing environments and continuously learning from the input they process~\cite{khritankov2021feedbackloops}. Testing dynamic self-adaptive systems raises many open issues about how to cope with the complexity and dynamics that result from the flexibility of self-adaptive and self-learning systems~\cite{eberhardinger2014towards}. \subsubsection{Dynamic environments:} AI components often operate in dynamic and frequently changing environments. Examples are typically data intensive applications that have to integrate data from various sources (including sensors, web data, etc.), which all have different characteristics regarding their data quality~\cite{foidl2019technical,foidl2019risk}. Data can also stem from simulators or AI components may have to control simulations. Due to the complexity and non-determinism of the environment, testability (i.e., controllability and observability) is highly challenging. Furthermore, due to information heterogeneity also privacy and security aspects are essential. To address these issues, run-time monitoring and online testing have been suggested. Online testing, the assessment of the system's behavior is performed live, in production and in a real application environment~\cite{zhang2020machine}. Real application environments provide the advantage of real user integration and real user experience. In modern cloud-based environments user information can easily be collected and used to evaluate and continuously improve the system (e.g., in web-based recommender systems). However, this requires a significant number of users with a clear user profile. In addition, applying testing in production for business-critical users poses business risks. In addition, one has to carefully select metrics to guarantee their validity and reliability. The term "testing in production" can even be considered as an oxymoron, especially if systems are safety-critical and can harm the health of impacted stakeholders (e.g., for autonomous systems controlling vehicles). In that context, clear constraints have to be defined and guarantees under which conditions testing in production can be performed at all because safety-criticality requires clear strategies to remove defects before deployment or to handle them properly in production. However, besides safety also privacy and ethical issues may restrict the applicability of testing in production and therefore require specific constraints and monitors. \section{Summary and Conclusions} \label{sec:conclusion} In this paper, we discussed terminology and challenges on quality assurance for AI-based systems. To characterize AI-based systems for the purpose of quality assurance, we defined the three dimensions artifact type (i.e., data, model, framework, and system), process (from isoloated to continuous), and quality characteristics (with respect to software quality, quality-in-use, and data quality). Furthermore, we elaborated on the key challenges of (1) understandability and interpretability of AI models, (2) lack of specifications and defined requirements, (3) need for validation data and test input generation, (4) defining expected outcomes as test oracles, (5) accuracy and correctness measures, (6) non-functional properties of AI-based systems, (7) self-adaptive and self-learning characteristics, and (8) dynamic and frequently changing environments. In order to properly address the challenges raised in this paper and to enable high quality AI-based systems, first and foremost, exchange of knowledge and ideas between the SE and the AI community is needed. One channel of exchange is education or training through dedicated courses~\cite{kastner2020teaching} or media~\cite{hulten2019building}. Another one are dedicated venues for exchange and discussion of challenges on quality assurance for AI-based systems like the IEEE International Conference On Artificial Intelligence Testing or the workshop Quality Assurance for AI collocated with the Software Quality Days. \section*{Acknowledgements} \label{sec:acknowledgements} The research reported in this paper has been partly funded by the Federal Ministry for Climate Action, Environment, Energy, Mobility, Innovation and Technology (BMK), the Federal Ministry for Digital and Economic Affairs (BMDW), and the Province of Upper Austria in the frame of the COMET - Competence Centers for Excellent Technologies Programme managed by Austrian Research Promotion Agency FFG. \bibliographystyle{splncs}
\section{Introduction} Topological defects associated with phase transitions in the early Universe have been the subject of intense study (see e.g., Ref.~\cite{Vilenkin:2000jqa}). Cosmic string is such a topological defect associated with U$(1)$ symmetry breaking. One of the most important examples is the cosmic string in the axion model~\cite{Peccei:1977hh,Peccei:1977hh,Weinberg:1977ma,Wilczek:1977pj}, which solves the strong CP problem by utilizing the Nambu-Goldstone boson accompanying the breaking of the global U$(1)$ Peccei-Quinn (PQ) symmetry. As an interesting phenomenological feature of the cosmic string, it can exhibit the superconductivity~\cite{Witten:1984eb}. For example, when the symmetry breaking field couples to chiral fermions with non-vanishing U$(1)_\mathrm{QED}$ charges, the cosmic string shows superconductivity. The bosonic superconducting string is also possible if the cosmic string induces the spontaneous breaking of U$(1)_\mathrm{QED}$ inside the string while U$(1)_\mathrm{QED}$ is unbroken outside of the string. Recently, the superconductivity of the cosmic strings has gathered renewed attention in the axion models~\cite{Fukuda:2020kym,Abe:2020ure,Agrawal:2020euj}. As discussed in Ref.~\cite{Fukuda:2020kym}, the axion string becomes the chiral superconductor in which the KSVZ fermions carry the current traveling in only one direction along the string in the KSVZ axion model~\cite{Kim:1979if,Shifman:1979if}. Once such a chiral superconducting string forms a closed loop, it stops shrinking at some point when the kinetic energy of the carrier fermions becomes non-negligible compared to the weight of the string loop. Such a stable configuration is called a Vorton~\cite{Carter:1993wu,Brandenberger:1996zp,Martins:1998gb,Martins:1998th,Carter:1999an}. If the Vorton has a lifetime of cosmological timescale, it contributes to the dark matter density and may significantly affect the cosmology of the axion models. In this paper, we study the stability of the fermion which carries the superconducting current on the string (see also Refs.~\cite{Barr:1987ij,Davis:1999ec,Jeannerot:2004bs} for earlier works). We find that the carrier particle immediately decays in a curved string in typical axion models. Accordingly, the lifetime of the string loop is not far from that of the carrier particles in the vacuum. Thus the Vorton cannot be long-lived. The organization of this paper is as follows. In Sec.~\ref{sec:Axion}, we briefly review the axion model and the associated superconducting string. In Sec.~\ref{sec:decayonmodulation}, we discuss the decay rate of the charge carrier when the strings are curved. In Sec.~\ref{sec:vorton}, we discuss the fate of the Vorton. The final section is devoted to our conclusions. \section{Axion and Superconducting String} \label{sec:Axion} In this section, we briefly review the superconductivity of the global string associated with the PQ-symmetry breaking. \subsection{KSVZ Axion and Global String} Throughout this paper, we consider the KSVZ axion model~\cite{Kim:1979if,Shifman:1979if}, which consists of a complex scalar field $\phi$ and $N_f$ KSVZ fermions, $\psi$, of the fundamental representation of the SU$(3)_c$ gauge group of QCD.% \footnote{ In this paper, we use the convention for the four-component fermion in Ref.~\cite{Dreiner:2008tw}. } We will take $N_f = 1$ for successful cosmology (see later discussion). The U(1) PQ-symmetry is defined by the phase rotations, \begin{align} \label{eq:PQcharge} \phi \to \phi' = e^{i \alpha} \phi\ , \quad \psi_L \to \psi_L' = e^{-i\alpha}\psi_L\ , \quad \psi_R \to \psi_R' = \psi_R\ , \end{align} where $\psi_{L,R} = P_{L,R} \psi$ and $\alpha$ is a rotation parameter. The PQ-symmetry allows couplings between $\phi$ and $\psi$, \begin{align} \label{eq:Yukawa} &\mathcal{L}= \partial_\mu \phi^* \partial^\mu \phi + \bar{\psi}i\gamma^\mu\partial_\mu \psi - V(\phi) + y_\psi\phi \bar{\psi} P_L \psi + h.c.\ , \\ & \label{eq:potential} V(\phi)= \frac{\lambda}{4} (|\phi|^2 - v_{\mathrm{PQ}}^2)^2 \ , \end{align} where $y_\psi (> 0)$ is a Yukawa coupling constant, $\lambda (> 0)$ the quartic coupling constant, and $v_{\mathrm{PQ}}$ is a parameter with a mass dimension one. At the vacuum, the PQ-symmetry is spontaneously broken by the VEV of $\phi$, \begin{align} \langle \phi \rangle = v_{\mathrm{PQ}}\ , \end{align} where we take $v_{\mathrm{PQ}} > 0$. From the Yukawa coupling, the KSVZ fermion obtains a mass, \begin{align} m_\psi = y_\psi v_{\mathrm{PQ}}\ . \end{align} In the broken phase, the PQ-symmetry is realized as a shift symmetry of the axion, $a$, \begin{align} a/f_{\mathrm{PQ}} \to a'/f_{\mathrm{PQ}} = a/f_{\mathrm{PQ}} + \alpha , \quad \psi_L \to \psi_L' = e^{-i\alpha}\psi_L\ , \quad \psi_R \to \psi_R' = \psi_R\ , \end{align} where the axion resides in $\phi$ as, \begin{align} \phi = v_{\mathrm{PQ}}\,e^{ia/f_{\mathrm{PQ}}}\ , \quad f_{\mathrm{PQ}} = \sqrt{2} v_{\mathrm{PQ}}\ . \end{align} Due to the QCD anomaly, the axion obtains a non-trivial scalar potential, and the effective $\theta$-angle of the QCD is erased at the minimum of the axion potential. Associated with the PQ-breaking, there are the global cosmic string configurations which have non-trivial topological numbers in $\pi_1(\mathrm{U}(1))$ (see e.g., Ref.~\cite{Vilenkin:2000jqa}). For a straight cosmic string, the string configuration is given by, \begin{align} \label{eq:string} \phi = v_{\mathrm{PQ}}h(\rho) e^{in_w \varphi}\ , \end{align} where ($\rho, \varphi,z$) is the cylindrical coordinate along the straight string in the $z$-direction. The integer $n_w \in \pi_1(\mathrm{U}(1))$ is the winding number. For a scalar potential in Eq.\,\eqref{eq:potential}, the field equation of $h$ is given by, \begin{align} \label{eq:h} h''(\rho) + \frac{h'(\rho)}{\rho} - \frac{n_w^2}{\rho^2} h(\rho) - \frac{1}{2}m_\phi^2(h(\rho)^2-1)h(\rho) = 0\ , \end{align} with boundary conditions, \begin{align} &h(\rho)\propto \rho^{|n_{w}|} \ , \quad (\rho\to 0)\ ,\\ &h(\rho)\to 1\ , \quad \,\,\,\,\,\,\,(\rho \to \infty)\ . \end{align} Here, $m_\phi$ denotes the mass of the modulus component of $\phi$, $m_{\phi} = \sqrt{\lambda}v_{\mathrm{PQ}}$.% \footnote{Asymptotically, $h(\rho) = \sqrt{1 - 2 n_w^2/(m_\phi\rho )^2} $ for $m_\phi\rho \gg 1$.} Unlike the Abrikosov-Nielsen-Olesen (ANO) local string~\cite{Nielsen:1973cs}, the tension of the global string is logarithmically divergent since the angular gradient of $\phi$ is not compensated by the gauge field. Nonetheless, those strings are expected to be formed at the phase transition in the early Universe, where the divergence is cut off by a typical distance between the strings of the order of the Hubble length, $H^{-1}$. That is, the string tension $\mu$ at the formation is roughly given by, \begin{align} \mu \sim 2\pi v_{\mathrm{PQ}}^2 \log \frac{m_{\phi}}{H}\ . \end{align} We assume that the PQ-breaking takes place after the end of inflation. In the following analysis, we take $N_f = 1$, otherwise, the KSVZ axion potential has a discrete $\mathrm{Z}_{N_f} (N_f > 1)$ symmetry which is broken by the VEV of the axion. Thus, the model with $N_f > 1$ suffers from the domain-wall problem, while the model with $N_f = 1$ is free from this problem.% \footnote{If we allow flavor dependent PQ charges of $\psi$'s, it is possible to avoid the domain wall number for $N_f > 1$.} In the model with $N_f= 1$, the axion dark matter density is dominated by the axions produced by the decay of the string-wall network at the QCD phase transition in the case that the PQ breaking takes place after inflation. The simulations suggest the axion abundance exceeds the observed dark matter density for $f_{\mathrm{PQ}} >\order{10^{11}}$\,GeV~\cite{Hiramatsu:2010yn,Hiramatsu:2012gg,Gorghetto:2018myk,Gorghetto:2020qws}. To avoid cosmological and astrophysical constraints, we consider the range of the axion decay constant in, \begin{align} f_{\mathrm{PQ}} = 10^8- 10^{11}\,\mathrm{GeV}\ , \end{align} where the lower bound comes from the astrophysical constraints~\cite{Raffelt:2006cw,Chang:2018rso,Irastorza:2018dyq,Hamaguchi:2018oqw}. In the case that the PQ-breaking takes place after inflation, the KSVZ fermions are in the thermal-equilibrium. Since they become heavy due to the PQ-breaking and get the mass $y_\psi v_{\mathrm{PQ}}$, they need to decay into the SM particles to avoid the cosmological problems. The KSVZ fermions can decay well before the Big-Bang Nucleosynthesis if, for example, $\psi_R$ has the same quantum number as the down-type quark, ${d}_R$, in the SM.% \footnote{As defined in Eq.\,\eqref{eq:PQcharge}, $\psi_R$ is neutral under the PQ symmetry.} In this case, the decay operator is given by, \begin{align} \label{eq:decay} \mathcal{O}_D = y_{D}H_\mathrm{SM}\bar{\psi}_Rq_{L} + h.c.\ , \end{align} where $H_\mathrm{SM}$ and $q_L$ are the Higgs and the quark doublets in the SM. The corresponding decay rate is given by, \begin{align} \Gamma_D = \frac{|y_D|^2}{16\pi} m_\psi \ . \label{eq:free_decay} \end{align} Here, we consider the decay rate into only one generation of the quark doublets for simplicity. Note that $\psi$ has the same gauge charges with ${d}_R$. In this case, the KSVZ fermion has the QED charge $q_\psi = -1/3$. We may instead assign $\psi_R$ the same quantum number with the up-type quarks, ${u}_R$. In this case, the QED charge of $\psi$ is given by $q_\psi = 2/3$, although the change of the charge does not affect the following arguments. \subsection{Superconductivity of Axion String} Around an infinitely long string, the Dirac equation of the fermion coupling to the string has the zero mode solutions which are normalizable in the transverse plane of the string~\cite{Weinberg:1981eu,Jackiw:1981ee}. The normalizable fermion zero mode can propagate along the string as a massless mode. When the fermion zero mode has non-trivial gauge charges, it carries the superconducting current~\cite{Witten:1984eb}. Recently, Ref.~\cite{Fukuda:2020kym} revisited the string superconductivity in the KSVZ axion model. It showed that the axion strings generically exhibit the chiral superconductivity. We here briefly review the fermion zero modes and the superconductivity of the string. We consider the Dirac equation around the straight cosmic string along the $z$-axis, \begin{align} \left[i\gamma^\mu\partial_\mu - m_\psi h(\rho) \left( e^{i\varphi}P_L + e^{-i\varphi}P_R \right) \right]\psi= 0 \ . \end{align} where $\rho= \sqrt{x^2 + y^2}$ and $\varphi$ is the azimuthal angle on the $(x,y)$ plane. Here, we assume the winding number of the string is $n_w = 1$. For now, let us assume that $\psi$ depends only on the transverse coordinate $(x,y)$. Then, the Dirac equation is reduced to, \begin{align} &i \gamma^1\left(\partial_1 + i(i\gamma^1\gamma^2)\partial_2\right)\psi_{L} = m_\psi h(\rho)e^{-i\varphi} \psi_{R}\ , \\ &i \gamma^1 \left(\partial_1 +i(i\gamma^1\gamma^2)\partial_2\right)\psi_{R} = m_\psi h(\rho)e^{i\varphi} \psi_{L}\ . \end{align} The explicit solution which is normalizable in the transverse plane is given by \cite{Jackiw:1981ee}, \begin{align} \label{eq:zeromode} \psi^0(x,y) = \mathcal{N} \eta \exp(-\int_0^\rho m_\psi h(\rho')d\rho')\ , \quad \eta = \left[\begin{array}{c} 0 \\ 1 \\ i \\ 0 \end{array} \right]\ , \end{align} which satisfies% \footnote{It is convenient to note $\partial_1 \pm i \partial_2 = e^{\pm i\varphi } (\partial_\rho \pm i \rho^{-1} \partial_\varphi)$.} \begin{align} i\gamma^1\gamma^2\psi_{L}^0 = - \psi_{L}^0\ , \quad i\gamma^1\gamma^2\psi_{R}^0 = \psi_{R}^0\ , \quad \psi_{R}^0 = -i \gamma^1 \psi_{L}^0\ , \quad \partial_\varphi \psi_{L,R}^0= 0 \ . \end{align} The normalization constant $\mathcal{N}$ will be determined later. The zero-mode configuration in Eq.\,\eqref{eq:zeromode} is localized at around the core of the cosmic string with a finite size of $\mathcal{O}(m_\psi^{-1})$. Interestingly, the normalizable transverse zero modes lead to the ``massless" propagation modes along the cosmic string. Let us the assume, \begin{align} \label{eq:massless} \psi^0(t,x,y,z) = \alpha(t,z)\psi^0(x,y)\ . \end{align} then, the Dirac equation in the four-dimensional spacetime is reduced to, \begin{align} (\gamma^0\partial_0 + \gamma^3 \partial_3)\alpha(t,z)\eta = 0 \ , \end{align} or \begin{align} (\partial_0 + \partial_3)\alpha(t,z) = 0 \ , \end{align} since $\gamma^0\gamma^3 \eta = \eta$. The general solution of this equation, \begin{align} \alpha(t,z) = \alpha(t-z) \ , \end{align} corresponds to the ``massless" chiral fermion which moves at the speed of light in the positive $z$-direction. Note that both the particle $\psi^0$ and the anti-particle, $\psi^{0\,c}=i\gamma_2\psi^{0*}$, move in the same direction along the string. They also have the same chirality in the longitudinal two-dimensional spacetime, i.e., $\gamma^0\gamma^3 \psi^{0(c)} = \psi^{0(c)}$. When the straight string is placed in a constant electric field in the $z$-direction, $E_z$, the fermion zero modes are induced on the string. The resulting current on the string grows in the applied time $\mathit{\Delta}t$ as~\cite{Witten:1984eb}, \begin{align} J = \frac{q_\psi^2}{2\pi} E_z \mathit{\Delta}t \ , \end{align} which is a characteristic of a superconducting wire. This current is persistent and remains even after the electric field is turned off.% \footnote{In Ref.\,\cite{Witten:1984eb}, it is considered the vector-like charge carrier on the string. For detailed discussion on the chiral nature of the superconducting string, see e.g., Refs.\,\cite{Callan:1984sa,Kaplan:1987kh,Naculich:1987ci}.} \section{Stability of Fermion Zero Mode in Curved String} \label{sec:decayonmodulation} In the above discussion, we considered the straight cosmic string. In general, however, the cosmic strings are curved. Macroscopically, cosmic strings have a curvature radius of $\order{H^{-1}}$ (see e.g., Refs.~\cite{Hiramatsu:2010yn,Hiramatsu:2012gg}). They also have microscopic curvatures induced by the thermal fluctuations. In this section, we consider the decay of the fermion zero mode in a curved string. \subsection{Schematic Picture of Zero Mode Decay} \label{sec:classical_escape} \begin{figure} \centering \includegraphics[width=0.8\linewidth]{curved.pdf} \caption{Schematic pictures of the decay of the fermion zero mode in the curved string. The curvature radius of the curve is $\order{m_\phi^{-1}}$. For the zero mode with $\abs{p_z} \gg m_\psi$, it escapes from the string at the curve and decays via the decay operator. For the zero mode with $\abs{p_z} < m_\psi$, it decays through the quantum tunneling.} \label{fig:curved} \end{figure} For a zero mode in a straight cosmic string, its decay is prevented by the energy conservation and the longitudinal momentum conservation. The initial energy and the momentum in the $z$-direction are $E_i=p_i^z = E$, respectively. Thus, the energy and the longitudinal momentum conservation leads to, $E_f = p_f^z = E$, and hence, the phase space of the transverse momentum of the final state is vanishing. For a zero mode in a curved string with finite string core size, on the other hand, it is expected that the fermion zero mode decays into the SM particles through the decay operator since the longitudinal momentum conservation is broken by the curvature of the string~(see Refs.~\cite{Davis:1988ip,Jeannerot:2004bs} for related works). For example, let us consider a curved string with its curvature radius is comparable to the string core size, i.e., $\order{m_\phi^{-1}}$ (see Fig.\,\ref{fig:curved}). In this case, the zero mode with $\abs{p_z} \gg m_\psi$ simply goes out of the string and behaves as a massive free fermion~\cite{Witten:1984eb} (see the Appendix~\ref{sec:classical}). Thus, it immediately decays into the SM particles through the decay operator. For the zero mode with $\abs{p_z} < m_\psi$, on the other hand, it does not go out of the string due to the energy conservation. Even in this case, it is expected that the fermionic zero mode decays into the SM particles through the off-shell fermion, i.e., the quantum tunneling. Let us emphasize that the fermion zero mode is stable even on a curved string when the core radius of the string is vanishing, i.e., $m_\phi \to \infty$. In this limit, the straight string picture is valid at any point on the string even if it is curved with a finite curvature radius.% \footnote{In other words, the fermion zero mode does not have injection momentum onto the potential wall made by the curve of the string for $m_\phi\to\infty$.} Thus, the fermion zero mode is trapped inside the two-dimensional spacetime along the string. Hence, even the fermion zero mode with $E\gg m_\psi$ cannot escape from the string and moves along the string. \subsection{Decay of Fermion Zero Mode in Curved String} \label{sec:decay_master} To discuss the decay rate of the zero mode in a curved string, let us consider a slight modulation on a straight string along the $z$-axis. We consider a modulation in the $y$-direction in which the position of the string center is given by \begin{align} \label{eq:curve} (x,y,z) = \left(0, f(z), z\right)\ . \end{align} We consider that the maximal value of $|f|$ is much smaller than the string core size $m_\phi^{-1}$, so that the modulation can be treated perturbatively. In the following, we consider a time-independent modulation. The curve in Eq.\,\eqref{eq:curve} modulates the string profile function $h(\rho)$, \begin{align} \label{eq:modulation} h(\rho) \to h(\rho) + \delta h(\rho,\varphi,z)\ , \quad \delta h(\rho,\varphi,z) = \frac{y}{\rho}\frac{d h(\rho)}{d\rho}\times f(z)\ , \end{align} for $|f|\ll m_\phi^{-1}$. The modulation couples to the fermion via the Yukawa coupling, \begin{align} \label{eq:yukawa_modulation} \mathcal{O}_M = m_\psi \delta h(\rho,\varphi,z) \bar{\psi}(e^{i\varphi}P_L+e^{-i\varphi}P_R)\psi \ , \end{align} which originates from Eq.\,\eqref{eq:Yukawa}. The quantized KSVZ fermion field in the presence of a straight string along the $z$-axis with a length $L_{\mathrm{str}}$ and a winding number $n_w = 1$ is given by \begin{align} \hat\psi =& \frac{1}{\sqrt{L_{\mathrm{str}}}}\sum_{n>0} \left(e^{-iE_n(t-z)} u(\rho)\, \hat{b}^{0}_n + e^{iE_n(t-z)} v(\rho)\, \hat{d}^{0}_n{}^\dagger \right) \cr &+\sum (\mbox{bounded massive modes}) + \sum (\mbox{unbounded modes}) \ . \end{align} The first line denotes the zero-mode contribution of energy $E_n = 2\pi n/L_{\mathrm{str}}$ $(n>0)$. The wave functions $u(\rho)$ and $v(\rho)$are given by, \begin{align} \label{eq:wavefunction} u(\rho) = \mathcal{N} \eta \exp\left(-\int_0^\rho m_\psi h(\rho')d\rho'\right)\ , \quad v(\rho) = i\gamma_2 u(\rho)^* \ ,\quad \int dxdy |u(\rho)|^2 = 1 \ , \end{align} where $h(\rho)$ is the profile function of a straight string in Eq.\,\eqref{eq:h}. The normalization constant $\mathcal{N}$ is fixed by the third condition in Eq.\,\eqref{eq:wavefunction}.% \footnote{The normalization constant is approximately given by $\mathcal{N} \simeq m_\psi/\sqrt{{2\pi}}$ for $m_\phi\gg m_\psi$ . } The second and the third terms represent the massive bounded modes in the string and the unbounded continuous modes, respectively~\cite{Davis:1999ec,Ringeval:2000kz,Ringeval:2001xd}. The creation operators of the zero modes satisfy, \begin{align} \label{eq:quantized1} \{\hat{b}^0_n,\hat{b}^{0\dagger}_{n'}\} = \delta_{nn'}\ , \quad \{\hat{d}^0_n,\hat{d}^{0\dagger}_{n'}\} = \delta_{nn'}\ . \end{align} The unbounded continuous mode asymptotically behaves as a massive free particle with a mass $m_\psi$ away from the string. In the limit of $L_\mathrm{str}\to \infty$, the quantized field becomes \begin{align} \label{eq:quantized2} \hat\psi =& \int_0^\infty \frac{dE}{2\pi} \left(e^{-iE(t-z)} u(\rho)\, \hat{b}^{0}(E) + e^{iE(t-z)} v(\rho)\, \hat{d}^{0}(E){}^\dagger \right) \cr &+\int (\mbox{bounded massive modes}) + \int (\mbox{unbounded modes}) \ , \end{align} with the creation/annihilation operators, \begin{align} \label{eq:normalization} \{\hat{b}^0(E),\hat{b}^{0}(E')^\dagger\} = (2\pi)\delta(E-E')\ , \quad \{\hat{d}^0(E),\hat{d}^{0}(E')^\dagger\} = (2\pi)\delta(E-E')\ . \end{align} Here, $\hat{b}^0(E)$ and $\hat{d}^0(E)$ correspond to $\sqrt{L_{\mathrm{str}}}\,\hat{b}^0_n$ and $\sqrt{L_{\mathrm{str}}}\,\hat{d}^0_n$, respectively. \begin{figure}[tpb] \begin{center} \begin{tikzpicture} \begin{feynhand} \vertex [particle] (i1) at (-1.5,3) {$\psi^0$}; \vertex [particle] (f1) at (3,4) {$q_L$}; \vertex [particle] (f2) at (3,2) {$H_\mathrm{SM}$}; \vertex [particle] (i2) at (0,2.5) {$\delta h$}; \vertex [dot] (w1) at (0,3) {}; \vertex [dot](w2) at (1.5,3){}; \propag [fermion] (i1) to (w1); \propag [fermion] (w1) to [edge label = $\psi^{*}$] (w2) ; \propag [fermion] (w2) to (f1); \propag [chasca] (w2) to (f2); \end{feynhand} \end{tikzpicture} \caption{The Feynman diagram corresponding to the leading order contribution to the zero mode decay into the quark and the Higgs in Eq.\,\eqref{eq:Born}. } \label{fig:Diagram} \end{center} \end{figure} Now, let us calculate the matrix element of the decay process of the fermion zero mode by using the quantized field in Eq.\,\eqref{eq:quantized2}. In the presence of the modulation, the matrix element for the decay process is given by \begin{align} \label{eq:amplitude0} \hat{T} = \langle 0| \hat{a}_q \hat{a}_H Te^{i\int d^4x\left[\mathcal{O}_M+\mathcal{O}_D\right] } \hat{b}^0(E)^{\dagger}|0\rangle \ . \end{align} Here, $\hat{a}_{q}$ and $\hat{a}_H$ are the annihilation operators of the quark and the Higgs doublets, respectively. The state $|0\rangle$ denotes the ground state with a global string with $n_w = 1$. In the Born approximation (Fig.\,\ref{fig:Diagram}), the amplitude becomes, \begin{align} \label{eq:Born} \hat{T} \simeq -y_D^*m_\psi \bar{u}_{\mathrm{q}}P_R \int d^4x\int d^4x' \delta h(x) \langle 0| T\psi(x')\bar{\psi}(x)|0\rangle P(\varphi)u(\rho)e^{-iE(t-z)}e^{ip_fx'}\ . \end{align} Here $\bar{u}_q$ is the wave function of $q_L$ in the final state, $P(\varphi) = e^{i\varphi}P_L + e^{-i\varphi}P_R$, and $p_f$ denotes the sum of the final state four-dimensional momenta. In the presence of the string, the exact form of the propagator of $\psi$ is not known even for $\delta h = 0$. In the present analysis, we only take account of the unbounded fermion contributions to the propagator and approximate it by that of the free fermion, \begin{align} \label{eq:propagator} \langle 0| T\psi(x)\bar{\psi}(x')|0\rangle \simeq \int\frac{d^4p}{i(2\pi)^4} \frac{m_\psi+\slashed{p}}{m_\psi^2 - p^2 + i \epsilon}e^{-ip(x-x')}\ . \end{align} Under this approximation, the matrix element is reduced to, \begin{align} \hat{T} \simeq -y^*_D m_\psi \bar{u}_{\mathrm{q}}P_R \int d^4x\int d^4x' \delta h(x) \int\frac{d^4p}{i(2\pi)^4} \frac{m_\psi+\slashed{p}}{m_\psi^2 - p^2 + i \epsilon}e^{ip(x-x')} P(\varphi)u(\rho)e^{-iE(t-z)}e^{ip_fx'}\ . \end{align} By integrating over $x'$, $p$ and $t$, we obtain, \begin{align} \label{eq:hatT} \hat{T} \simeq i(2\pi)\delta(E-E_f)y_D^*m_\psi \bar{u}_{\mathrm{q}}P_R \int d^3x \delta h(x) \frac{e^{-i\varphi}m_\psi+e^{+i\varphi}\slashed{p}_f}{m_\psi^2 - p_f^2 + i \epsilon} u(\rho)e^{iEz}e^{-i\mathbf{p}_f\cdot\mathbf{x}}\ . \end{align} Incidentally, the off-shell fermion zero modes do not contribute to the decay rate in the Born approximation since \begin{align} \left. \langle 0| T\psi(x)\bar{\psi}(x')|0\rangle \right|_{\mbox{\footnotesize{zero mode}}}\propto \left[ \begin{array}{cccc} 0&0&0&0 \\ -i&0&0&i \\ 1&0&0&-1 \\ 0&0&0&0 \end{array} \right]\ , \end{align} and hence, $\left. \langle 0| T\psi(x)\bar{\psi}(x')|0\rangle \right|_{\mbox{\footnotesize{zero mode}}}\times P(\varphi)u(\rho)=0$. To specify the modulation, we consider a periodic curve with a period $L$, that is, \begin{align} \label{eq:sinuous} &f(z) = \sum_{n=-\infty}^\infty c_n e^{-i\frac{2\pi n}{L}z}\ , \\ &c_n = \frac{1}{L}\int_{-L/2}^{L/2} dz e^{i\frac{2\pi n}{L}z}f(z) \ , \end{align} with $c_{-n} = c_n^*$.% \footnote{Strictly speaking, we need to assume $\delta h(z) \to 0$ for $|z| \to \infty$ to justify the amplitude in Eq.\,\eqref{eq:amplitude0}. This assumption requires a dumping factor at $|z|\to \infty$. However, since the decay rate should not depend on the shape at $|z|\to\infty$, we estimate the decay rate by using the periodic modulation as it is. In the appendix~\ref{sec:SingleGaussian}, we confirm that the consistent decay rate is obtained for a non-periodic modulation with $\delta h(z)\to 0$ at $|z|\to \infty$. } In this case, the integration over $z$ results in, \begin{align} \label{eq:Tdxdy} \hat{T} \simeq& i(2\pi)^2\delta(E-E_f) y_D^* m_\psi\bar{u}_{\mathrm{q}}P_R \sum_{n}c_n\delta(E-p_{f}^z-k_n) \cr &\qquad\qquad\times \int d^2x \frac{e^{-i\varphi}m_\psi+e^{+i\varphi}\slashed{p}_f}{m_\psi^2 - p_f^2 + i \epsilon} \sin\varphi \frac{dh}{d\rho}u(\rho)e^{-i \left.\mathbf{p}_f\cdot\mathbf{x}\right|_{\perp}}\ , \end{align} where $k_n = 2\pi n/L$ $(n\in \mathbb{Z})$ and the subscript $\perp$ denotes the $(x,y)$ space components. For each a modulation mode, the total invariant mass of the final state satisfies, \begin{align} 0 \le p_f^2 \le E^2-(E-k_n)^2 = 2 Ek_n -k_n^2 \ . \end{align} Thus, the decay rate of the high energy mode in a slowly curved string, $E\gg |k_n|$, gets contributions only from the modes with $n>0$. The result also confirms that the decay rate is vanishing in a straight string, $n=0$, where $p_f^2 = 0$. Our main interest is the fate of the fermion zero modes with $E\lesssim v_{\mathrm{PQ}}$ in a slowly curved string, $k_n \ll m_\phi$. For such a fermion, we find $p_f^2 < m_\psi^2$, $\slashed{p}_{f}\eta \ll m_\psi \eta$, and hence, the amplitude is reduced to \begin{align} \label{eq:amplitude} \hat{T} \simeq i(2\pi)^2\delta(E-E_f) y_D^* \bar{u}_{\mathrm{q}}P_R \sum_{n>0}c_n\delta(E-p_{f}^z-k_n) \int d^2x e^{-i\varphi} \sin\varphi \frac{dh}{d\rho}u(\rho)e^{-i \left.\mathbf{p}_f\cdot\mathbf{x}\right|_{\perp}}\ . \end{align} The integrand is highly suppressed for $\rho \gg m_{\phi,\psi}^{-1}$. In this region, $\left.\mathbf{p}_f\cdot\mathbf{x}\right|_{\perp} \ll 1$, and hence, \begin{align} \hat{T}\simeq (2\pi)^3\delta(E-E_f)y_D^* \bar{u}_{\mathrm{q}}P_R \sum_{n>0}c_n\delta(E-p_{f}^z-k_n) \xi\left(\frac{m_\phi}{m_\psi}\right) \eta\ , \end{align} where $\xi(m_\phi/m_\psi)$ is defined by, \begin{align} \xi\left(\frac{m_\phi}{m_\psi}\right)= \xi\left({m_\phi},{m_\psi}\right) = \frac{i\mathcal{N}}{2\pi} \int d^2x e^{-i\varphi} \sin\varphi \frac{dh}{d\rho} \exp\left(-\int_0^\rho m_\psi h(\rho')d\rho'\right)\ . \end{align} Asymptotically $\xi(m_\phi/m_\psi \to \infty) \to 0.54 \times m_\psi/m_\phi$ and $\xi(m_\phi/m_\psi \to 0) \to 0.13 \sqrt{m_\phi/m_\psi}$ (see Fig.~\ref{fig:xir}).% \footnote{Here, the numerical coefficients originate from $0.13 = \sqrt{h'(0)}/(2\sqrt{2\pi}) $ and $0.54 = \int_0^\infty y h' dy/2\sqrt{\pi}$ with $y=\rho m_{\phi}$.} The suppression of the amplitude for $m_\phi/m_\psi \gg 1 $ is reasonable since the straight string picture becomes valid at any point on the string in this limit. \begin{figure}[tbp] \centering{\includegraphics[width=0.5\textwidth]{xir.pdf}} \caption{ The numerical estimation of the function $\xi(m_\phi/m_\psi)$. } \label{fig:xir} \end{figure} By dividing the squared matrix element by the total time and the total length of the string,% \footnote{The total time and the length are given by $T_{\mathrm{interval}} = (2\pi) \delta(E)|_{E = 0}$ and $L_{\mathrm{str}}=(2\pi)\delta(p_z)|_{p_z = 0} $, respectively.} we obtain the decay rate of one fermion zero mode with energy $E$, \begin{align} \label{eq:decayrate_integral} \Gamma(E) \simeq |y_D|^2 \xi^2\left(\frac{m_\phi}{m_\psi}\right) \sum_{n>0}|c_n|^2\!\int\!\!\! \frac{d^3\mathbf{p}_q}{(2\pi)^3 2p_q^0} \frac{d^3\mathbf{p}_H}{(2\pi)^3 2p_H^0} (2\pi)^4\delta(E-E_f)\delta(E-p_{f}^z-k_n) (p_q^0 - p_q^z)\ . \end{align} Here, $\mathbf{p}_{q,H}$ are the three momenta of the quark and the Higgs doublets. We neglect the masses of the quarks and Higgs. Throughout this paper, we consider the decay rate of the in-flight fermion. This is appropriate since we are interested in the decay rate of the fermion measured from outside of the string. The phase space integration (see the appendix~\ref{sec:phasespace}) results in \begin{align} \label{eq:decayrate_master} \Gamma(E) \simeq \frac{1}{24}|y_D|^2 \xi^2\left(\frac{m_\phi}{m_\psi}\right)E^3 \sum_{n>0}^{k_n <2 E}|c_n|^2 \mathcal{F}(k_n/E)\ , \end{align} where \begin{align} \mathcal{F}(x) = x^2(1-x/2)\ . \end{align} Let us comment on the case of a sharply curved string, which can appear as kinks and cusps in the cosmic string (see e.g., Ref.~\cite{Gouttenoire:2019kij}). In this case, $p_f^2$ can be of $\order{m_\psi^2}$, and hence, the contribution of the pole of the propagator in Eq.\,\eqref{eq:Tdxdy} is significant. This contribution corresponds to the process in the left panel of Fig.\,\ref{fig:curved} in which the fermion zero mode escapes from the string and decays. The decay rate of such a process is also suppressed for a large $m_\phi$ due to the factor of $dh/d\rho$ in the integrand of Eq.\,\eqref{eq:Tdxdy}. This suppression is consistent with the observation that the fermion zero mode does not decay in a straight string, because the string looks like a straight one at any point in the limit of $m_\phi \to \infty$. In this analysis, we do not take into account the contributions of the bounded massive modes to the fermion propagator~\cite{Davis:1999ec,Ringeval:2000kz,Ringeval:2001xd}. The fermion zero mode can also decay into the SM particles through the mixing with the bounded massive modes due to the modulation. In the appendix \ref{sec:classical}, we discuss the classical motion of the fermion along the curved string. In the classical treatment the mixing with the bounded massive modes should correspond to the oscillation of the fermion around the center of the string. We also note that we have eventually approximated the propagator in Eq.\,\eqref{eq:propagator} by $m_\psi^{-1}$. Since the fermion mass inside the cosmic string is smaller than $m_\psi$, the actual decay rate could be enhanced compared to the present estimate. At any rate, the decay rate given in Eq.\,\eqref{eq:decayrate_master} should be regarded as the lower limit of the decay rate. \subsection{Sinuous Modulation} As a simple example of the modulation, let us consider a sinuous modulation with \begin{align} f(z) = \frac{\varepsilon}{m_\phi}\sin\left(\frac{2\pi z}{L}\right)\ , \end{align} where $\varepsilon\ll 1$ and $L/2\pi \gg m_\phi^{-1}$. The Fourier coefficients of this modulation are given by \begin{align} &c_1 = i \frac{\varepsilon}{2m_\phi}\ ,\\ &c_n = 0 \ , \quad (n>1) \ , \end{align} where $c_{-n} = c_{n}^*$. The resultant decay rate is given by \begin{align} \label{eq:decayrate_sin} \Gamma(E) &\simeq \frac{\pi^2}{24}\frac{\varepsilon^2|y_D|^2E}{m_\phi^2L^2} \left(1-\frac{\pi}{EL}\right)\xi^2\left(\frac{m_\phi}{m_\psi}\right)\ . \end{align} The decay rate is non-vanishing only for $E > \pi/L$. For a sinuous modulation in Eq.\,\eqref{eq:sinuous}, the maximal curvature radius is \begin{align} R = \frac{L^2}{(2\pi)^2 \varepsilon m_\phi}\ . \end{align} In terms of this curvature radius, the decay rate is given by, \begin{align} \label{eq:decayrate_sin_R} \Gamma(E) &\simeq \frac{1}{96}\varepsilon|y_D|^2\frac{E}{m_\phi R} \xi^2\left(\frac{m_\phi}{m_\psi}\right)\ . \end{align} Here, we have assumed $E \gg 1/L$. This expression suggests that the decay rate in a curved string with a large curvature radius $R$ is suppressed by a single power of $R$. In the appendix \ref{sec:SingleGaussian}, we calculate the decay rate of the fermion zero mode in a straight string with a Gaussian modulation. There, we find the same dependence on the curvature radius $R$ with Eq.\,\eqref{eq:decayrate_sin_R}. \subsection{Piecewise Circle Modulation} \label{sec:pCircle} \begin{figure}[tbp] \centering{\includegraphics[width=0.4\textwidth]{pCircle.pdf}} \caption{ The modulation of the periodic piecewise circle with the radius $R$ and the period $L$. The maximum amplitude of the modulation is given by $f(L/4) \simeq L^2/32R$ for $R\gg L$. } \label{fig:pcircle} \end{figure} Next, let us consider a periodic modulation given by a piecewise circle with the curvature radius $R$ and a period $L$, i.e., $ f(z+ n L) = f(z)$ with integers $n$, \begin{align} &f(z) = \begin{cases} \sqrt{R^2 - (z- L/4)^2} - \sqrt{R^2 - L^2/16}\ , & (0< z < L /2) \ , \\ -\sqrt{R^2 - (z-3L/4)^2} + \sqrt{R^2 - L^2/16}\ , & ( L/2< z < L)\ , \end{cases} \end{align} (Fig.\,\ref{fig:pcircle}). The modulation is piecewise smooth. The maximum amplitude of the modulation is given by, \begin{align} f(z = L/4) \simeq \frac{L^2}{32 R}\ , \end{align} for $R\gg L$. Accordingly, the perturbative condition, $|\delta h^2| \ll |\delta h|$, is satisfied for \begin{align} \label{eq:perturbL} L \ll \sqrt{\frac{32 R}{m_\phi}} \ll R \ , \end{align} where the final inequality comes from the assumption, $R \gg m_\phi^{-1}$. In this case, the Fourier coefficients for large $R$ are given by, \begin{align} \label{eq:c2n+1} c_{2n+1} = \frac{iL^2}{2\pi^3(2n+1)^3R}, \quad c_{2n} = 0\ , \end{align} where $n$ is an integer. As a result, the decay rate of the fermion zero mode on a piecewise circle is given by, \begin{align} \label{eq:decayrate_piecewise} \Gamma(E) \simeq \frac{|y_D|^2 E}{2^{8}3^2} \frac{L^2}{R^2}\left(1-\frac{1}{EL}\frac{84\zeta(3)}{\pi^3}\right)\xi^2\left(\frac{m_\phi}{m_\psi}\right)\ . \end{align} \begin{figure}[tbp] \centering{\includegraphics[width=0.8\textwidth]{segments.pdf}} \caption{The approximation of the circular string by taking its segments with a chord length $L/2$. For a perturbative analysis, we take a short chord length which satisfies Eq.\,\eqref{eq:perturbL}. } \label{fig:segments} \end{figure} As an application of the decay rate in Eq.\,\eqref{eq:decayrate_piecewise}, let us consider a closed string loop. For simplicity, we assume a circular loop with a large radius $R$ compared to the string core size $m_\phi^{-1}$. To apply the perturbative analysis, we take segments of the ring with the chord length of $L/2$ (Fig.\,\ref{fig:segments}). Here, $L$ is taken to satisfy the perturbativity condition in Eq.\,\eqref{eq:perturbL}. Then, the decay rate for a given $L$ can be approximated by Eq.\,\eqref{eq:decayrate_piecewise}. For the optimal lower limit on the decay rate, we take \begin{align} L\simeq \sqrt{\frac{32 R}{m_\phi}}\ . \end{align} Then, we obtain the lower limit on the decay rate of the fermion zero mode on a ring, \begin{align} \label{eq:ring_decay} \Gamma(E) \gtrsim \frac{|y_D|^2E}{72 m_\phi R} \xi^2\left( \frac{m_\phi}{m_\psi}\right)\ , \end{align} where we have assumed $E \gg \pi/\sqrt{32 R m_{\phi}^{-1}}$. The above lower limit can be applied to a long string with a curvature radius of $R$. In the early Universe, the typical macroscopic curvature radius of the string is $\order{H^{-1}}$. Thus, the lower limit of the decay rate is \begin{align} \Gamma(E) \gtrsim \frac{|y_D|^2E}{72 m_\phi} \xi^2\left( \frac{m_\phi}{m_\psi}\right) \frac{H}{\kappa}\ , \end{align} where we assume $R = \kappa/H$ with $\kappa \lesssim \order{1}$. Therefore, we find that the high energy modes, \begin{align} E \gtrsim \frac{72 m_\phi\kappa}{|y_D|^2} \xi^{-2}\left( \frac{m_\phi}{m_\psi}\right) \ , \end{align} cannot survive the cosmic time. \subsection{Thermal Modulation} Finally, let us roughly estimate the fermion decay rate in the presence of thermal fluctuations at the cosmic temperature $T \ll v_{\mathrm{PQ}}$. Along the straight string, there are two translational massless moduli fields, $\delta \phi_{x,y}(t,z)$ (see e.g., Ref.\cite{Shifman:2012zz}). These moduli fields correspond to the Nambu-Goldstone modes associated with spontaneous breaking of the translational symmetry in the transverse dimension due to the cosmic string. The moduli fields are thermalized with the SM thermal bath through the coupling to the gluons. The thermal fluctuation of the moduli fields is roughly given by \begin{align} \delta \phi_{x,y} \sim T \sin(Tz) \ , \end{align} where the typical momentum of the thermal fluctuation is of $\order{T}$. Since the moduli fields are the modulation of the string configuration, $\delta h$, the above fluctuation corresponds to \begin{align} f(z) \sim \frac{T}{m_\phi v_{\mathrm{PQ}}} \sin(Tz)\ , \end{align} where we approximate $dh(\rho)/d\rho \sim m_\phi$. Here, we neglect the time-dependence of the moduli fluctuation, which does not affect the order of magnitude estimate of the decay rate for $T \ll E$. By substituting the fluctuation into Eq.\,\eqref{eq:decayrate_sin}, we obtain, \begin{align} \label{eq:decayrate_thermal} \Gamma(E)\sim \frac{1}{96} \frac{|y_D|^2 T^4 E}{m_\phi^2 v_{\mathrm{PQ}}^2} \xi^2\left(\frac{m_\phi}{m_\psi}\right) \ . \end{align} Thus, the decay of the fermion zero mode caused by thermal fluctuation becomes smaller than the Hubble expansion rate at a temperature lower than, \begin{align} T \lesssim 20\frac{m_\phi}{|y_D|\xi } \left(\frac{v_{\mathrm{PQ}}}{E}\right)^{1/2}\left(\frac{v_{\mathrm{PQ}}}{M_\mathrm{Pl}}\right)^{1/2} \sim 4\times 10^5\,\mathrm{GeV}\times \frac{1}{|y_D|\xi} \left(\frac{m_\phi}{10^9\,\mathrm{GeV}}\right) \left(\frac{v_{\mathrm{PQ}}}{10^9{\,\mathrm{GeV}}}\right)^{1/2} \left(\frac{v_{\mathrm{PQ}}}{E}\right)^{1/2} \ . \end{align} Here, $M_\mathrm{Pl}$ is the reduced Planck scale. Below this temperature, the decay of the fermion zero mode induced by the thermal fluctuation becomes ineffective. \section{Fate of Vorton} \label{sec:vorton} \subsection{Vorton Radius} As discussed in Ref.~\cite{Fukuda:2020kym}, the superconductivity of the axion string may have significant effects on the cosmological evolution of the axion string network. In particular, the formation of the stable configuration, the Vorton, may contribute to the dark matter density. We review how the Vorton is stabilized by considering a string loop with a length $L_\mathrm{loop}$ and a total QED charge, $Q$, carried by the fermion zero modes. Here, we assume that the length of the string loop is much longer than its core size of $\mathcal{O}(m_\phi^{-1})$. If there is no charge dissipation nor leakage, $Q$ of the string loop is conserved. Due to the Fermi statistics, the total charge is related to the Fermi momentum of the fermion zero modes, $\varepsilon_F$, via, \begin{align} \label{eq:Q} Q = \frac{1}{2\pi} N_c q_\psi\varepsilon_F L_\mathrm{loop} \ , \end{align} where $N_c = 3$ is the color factor. Here, we approximate the distribution of the fermion zero modes by the Fermi-Dirac distribution at the zero temperature. The total energy of the fermion zero modes trapped in the string loop is \begin{align} E_Q = \frac{1}{4\pi} N_c \varepsilon_F^2 L_\mathrm{loop} = \frac{\pi Q^2}{N_cq_\psi^2L_\mathrm{loop}}\ . \end{align} The total energy of the string is given by the sum of the fermion energy and the weight of the string loop, \begin{align} E(L_\mathrm{loop}) \sim \mu L_\mathrm{loop} + \frac{\pi Q^2}{N_cq_\psi^2L_\mathrm{loop}}\ , \end{align} with $\mu$ being the string tension, \begin{align} \mu \simeq 2\pi v_{\mathrm{PQ}}^2 \log(m_{\phi} L_\mathrm{loop}) \ . \end{align} The string loop shrinks by emitting the axions. As $L_\mathrm{loop}$ decreases, the Fermi momentum increases due to the charge conservation. When $L_\mathrm{loop}$ decreases, the kinetic energy of the fermion zero modes and the string tension balances and the string loop is stabilized for \begin{align} \label{eq:vortonlength} L_\mathrm{loop} \sim \sqrt{\frac{1}{2N_c \log(m_{\phi} L_\mathrm{loop})}}\frac{Q}{q_\psi v_{\mathrm{PQ}}}\ . \end{align} The corresponding stable configuration is called the Vorton. Notably, the Fermi momentum in the Vorton does not depend on the total charge, and is given by, \begin{align} \varepsilon_F \sim 2\pi \sqrt{\frac{2\log(m_{\phi}L_\mathrm{loop})}{N_c}}v_{\mathrm{PQ}} > v_{\mathrm{PQ}}\ . \label{eq:FermiMomentum} \end{align} In this paper, we do not discuss the formation and the evolution of the Vortons in detail. Instead, we consider a Vorton with a typical total charge formed at the cosmic temperature $T_\mathrm{form}$ with a loop length $\order{H^{-1}}$, \begin{align} Q \sim\left(\frac{M_\mathrm{Pl}}{v_\mathrm{PQ}}\right)^{1/2}\ . \end{align} according to Ref.\,\cite{Fukuda:2020kym}. Here we take the $T \sim m_\phi \sim v_\mathrm{PQ}$. If there is no charge leakage, the radius of the Vorton is expected to be, \begin{align} \label{eq:radius} R \sim \frac{Q}{v_{\mathrm{PQ}}} \sim \frac{1}{v_{\mathrm{PQ}}}\left(\frac{M_\mathrm{Pl}}{v_\mathrm{PQ}}\right)^{1/2}\ . \end{align} In the following argument, we discuss the fate of the Vorton with the radius of this order. \subsection{Decay of Fermion Zero Mode in Vorton} As we have discussed in the previous section, the fermion zero mode decays through the decay operator when the string is curved. As we have also seen in Sec.\,\ref{sec:pCircle}, the perturbative analysis can be used to give a lower limit on the decay rate of string loop with a curvature radius, $R \gg m_\phi^{-1}$. Now, let us apply the lower limit on the decay rate in Eq.\,\eqref{eq:ring_decay} to discuss the stability of the Vorton. By substituting the Vorton radius in Eq.\,\eqref{eq:radius}, the lower limit on the decay rate is, \begin{align} \label{eq:decayrate_vorton} \Gamma(E)\gtrsim \frac{|y_D|^2 v_\mathrm{PQ}}{72m_\phi} \left(\frac{v_\mathrm{PQ}}{M_\mathrm{Pl}}\right)^{1/2} E \,\xi^2\left(\frac{m_\phi}{m_\psi}\right) \ . \end{align} This decay rate is much larger than the Hubble expansion rate, $H\simeq T^2/M_\mathrm{Pl}$ $(T\lesssim v_{\mathrm{PQ}})$, especially for the fermion zero mode with the Fermi momentum, $E = \varepsilon_F$, unless $y_D$ is highly suppressed for $T < v_\mathrm{PQ}$. Thus, we find that the high momentum fermion zero mode is short lived. Once the high momentum zero modes decay, the total charge decreases and its radius shrinks.% \footnote{The circular string loop starts spinning when it emits the SM particles by the decay of the fermion zero mode. However, the string loop shrinks by emitting the axions even if it is spinning since the axions carry away the angular momentum of the spinning string loop.} Once it shrinks, then, remaining fermion zero modes on the string obtain high momenta and the Fermi momentum is again given by Eq.\,\eqref{eq:FermiMomentum}. Thus, the lower limit on the rate of the charge leakage is given by, \begin{align} -\frac{\dot{Q}}{Q} \gtrsim \frac{|y_D|^2 v_\mathrm{PQ}}{144 m_\phi} \left(\frac{v_\mathrm{PQ}}{M_\mathrm{Pl}}\right)^{1/2} \varepsilon_F \xi^2\left(\frac{m_\phi}{m_\psi}\right) = \frac{\pi v_\mathrm{PQ}\varepsilon_F}{9 m_\phi m_\psi} \left(\frac{v_\mathrm{PQ}}{M_\mathrm{Pl}}\right)^{1/2} \xi^2\left(\frac{m_\phi}{m_\psi}\right)\times \Gamma_D\ . \end{align} The lifetime of the Vorton for $m_\phi \gg m_\psi$ is \begin{align} \tau_{\rm Vorton} \sim -\left(\frac{\dot{Q}}{Q}\right)^{-1} & \lesssim 10^6 \times \tau_{D} \left( \frac{v_{\mathrm{PQ}}}{10^9~\mathrm{GeV}}\right)^{-1/2} \left(\frac{m_\phi^3}{m_{\psi}v_{\mathrm{PQ}}^2}\right) \\ & \simeq |y_D|^{-2} \times 10^{-26}~\mathrm{sec} \left( \frac{v_{\mathrm{PQ}}}{10^9~\mathrm{GeV}}\right)^{-3/2} \left(\frac{m_\phi^3}{m_{\psi}^2v_{\mathrm{PQ}}}\right) \ , \end{align} where we have used $\varepsilon_F \sim v_\mathrm{PQ}$. Therefore, we expect that the Vorton immediately disappears by losing its charge through the decay operator in Eq.\,\eqref{eq:decay}. One caveat is that the Vorton can have magnetic fields up to of $\order{\varepsilon_F /4\pi^2\rho_*}$, where $\rho_* = \order{\max[{m_\phi^{-1}},{m_\psi^{-1}}]}$ represents a typical thickness of the fermion zero mode current. Since the magnetic fields affect the wave functions of the charged particles, they can also affect the decay rate. For the decay caused by higher Fourier modes in Eq.\,\eqref{eq:c2n+1}, however, the plane wave approximation for the final state is valid. The decay rate with such higher Fourier modes is high enough as seen in Eq.\,\eqref{eq:c2n+1}. Thus, we do not expect that the magnetic field makes the Vorton have a cosmological lifetime. \section{Conclusion} In this paper, we studied the stability of the fermion which carries the superconducting current in the axion string. In particular, we discussed the effect of the decay operator of the charge carriers. We found the superconductivity is indeed stable for a straight string or infinitely small string core size. We also found that the charge carriers decay when the string with a finite core size is curved. We obtained the lower limit on the decay rate which is suppressed only by a power law of the curvature radius of the string. As a result, the charge carriers of the Vorton are not long-lived, and hence, the Vortons that appear in the axion models do not have a lifetime of the cosmological timescale. Our analysis on the decay rate of the fermion zero mode can be applied for generic fermionic superconductive strings. Although we have argued that the Vorton does not contribute to the dark matter density, the superconductive nature of the global string in the axion model may affect the cosmology in the axion model. For example, Ref.~\cite{Fukuda:2020kym} pointed out that the energy density of the cosmic string can deviate from the scaling law if it exhibits the superconductivity. Therefore, further study of the effects of the superconductivity of the axion string is required. Finally, let us comment on the possibility of the stable Vorton. If the fermions are stable in the vacuum, the corresponding fermion zero modes in the string are stable. Thus, for example, if the electron zero mode appears in the string and the charge of the Vorton is large enough, the Vorton can be stable (see Ref.\,\cite{Witten:1984eb} for the $\mathrm{O}(10)$ model and see also Ref.\,\cite{Abe:2020ure} in the context of the DFSZ axion model~\cite{Zhitnitsky:1980tq,Dine:1981rt}). It is, however, not clear how such a large charge is achieved in the cosmological evolution for the electron zero modes. We leave the details of these possibilities for future work. \section*{Acknowledgments} The authors thank H.~Fukuda for useful comments. This work is supported by Grant-in-Aid for Scientific Research from the Ministry of Education, Culture, Sports, Science, and Technology (MEXT), Japan, 17H02878 (M.I. and S.S.), 18H05542 (M.I.), 18K13535, 19H04609, 20H01895 and 20H05860 (S.S.), and by World Premier International Research Center Initiative (WPI), MEXT, Japan. This work is also supported by the Advanced Leading Graduate Course for Photon Science (S.K.), the JSPS Research Fellowships for Young Scientists (S.K.) and International Graduate Program for Excellence in Earth-Space Science (Y.N.).
\section{Introduction} \subsection{Background and Motivations} \IEEEPARstart{L}{ately}, Mobile Edge Computing (MEC) has emerged as a powerful computing paradigm for the future Internet of Things (IoTs) scenarios. MEC servers are mostly deployed in proximity to the users, with the merits of seamless coverage and extremely low communication latency to the users. Also, the MEC servers are light-weight, enabling their potential large-scale application in various scenarios. \par Despite an attractive prospect, two crucial issues might be encountered by the real application: \begin{enumerate} \item The large-scale deployment of grid-power MEC servers has almost exhausted the existing energy resource and resulted in an enormous carbon footprint. This in essence goes against the green computing initiative. \item With millions or billions of small servers deployed amid every corner of the city, some of the locations could be quite unaccommodating for the construction of grid power facility, and even for those in a good condition, the construction and operation overhead of the power facility alone should not be taken lightly. \end{enumerate} \par With these two challenges encountered during the large-scale application of MEC, we initiate an alternative usage of \textit{intermittent energy supply}. These supplies could be \textit{solar power}, \textit{wind power} or \textit{wireless power}, etc. Amid these alternatives, renewable energy, such as solar power and wind power, could elegantly address both the two concerns. The wireless power still breaches the green computing initiative, but can at least save the construction and operation cost of a complete grid power system for all the computing units. \par However, all of these intermittent energy supplies reveal a nature of unreliability: power has to be stored in a battery with limited capacity for future use, and this limited energy is clearly incapable of handling all the workloads when mass requests are submitted. With this concern, servers have two potential options to accommodate the increasing workloads: \begin{enumerate} \item They directly reject some of the requests (perhaps those require greater computation), in a bid to save energy for the subsequent requests. \item They lower the processing frequency of their cores to save energy and accommodate the increasing workloads. Nevertheless, this way does not come without a cost: each request might suffer a prolonged processing time. \end{enumerate} \par These heuristic ideas of energy conservation elicit the problem we are discussing in this paper. We are particularly interested in the potential request treatment (i.e., should we reject an incoming request, and if not, how should we schedule the processing frequency for it) and their consequent effects on the overall system performance. \par The problem could become even more sophisticated if regarding the unknown and non-stationary request arrival and energy harvest pattern. Traditional rule-based methods clearly are incompetent in this volatile context: as a result of their inflexibility, even though they might work in a particular setting (a specific arrival pattern, for example), they may not work equally well if in a completely different environment. \par Being motivated, we shall design a both effective and adaptive solution that is able to cope with the uncertainty brought by the energy supply and request pattern. Moreover, the solution should be highly programmable, allowing custom design based on the operators' expectations towards different performance metrics. \par \subsection{Contributions } The major contributions of our work are presented in the following: \begin{enumerate} \item We have analyzed the real working procedure of an intermittent-energy-driven MEC system, based on which, we propose an event-driven schedule scheme, which is deemed much matching with the working pattern of this system. \item Moreover, we propose an energy reservation mechanism to accommodate the event-driven feature. This mechanism is novel and has not been available in other sources, to our best knowledge. \item Based on the proposed scheduling mechanism, we have formulated an optimization problem, which basically covers a few necessary system constraints and two main objectives: cumulative processing time and acceptance ratio. \item We propose a deep reinforcement learning-based solution, dubbed {\color{black} \textbf{N}eural network-based \textbf{A}daptive \textbf{F}requency \textbf{A}djustment} (NAFA), to optimize the joint request treatment and frequency adjustment action. \item We do the experiments based on real solar data. By our experimental results, we substantiate the effectiveness and adaptiveness of our proposed solutions. In addition to the general results, we also develop a profound analysis of the working pattern of different solutions. \end{enumerate} \par To the best knowledge of the authors, our main focus on event-driven scheduling for an intermittent energy-supplied system has not been presented in other sources. Also, our proposed solution happens to be the first trackable deep reinforcement learning solution to an SMDP model. It has the potential to be applied to other network systems that follow a similar event-driven working pattern. In this regard, we consider our novel work as a major contribution to the field. \section{Related Work} \subsection{Edge intelligence} {\color{black} Artificial intelligence (AI) have been broadly studied thanks to their unlimited potential in image classification, natural language processing, and scheduling (e.g. \cite{huang2020ant}, \cite{wu2020collaborate}). To further boost the performance of AI, some literature has proposed MEC-combined solutions. Khan et al. in \cite{khan2019deep} proposed a deep unified model for Face Recognition, and further integrated the model into the edge computing system. Experimental results show that such a combination significantly reduces data latency of processing the needed data and increases the real-time response. Another interesting direction is to boost the performance of edge intelligent systems by a secure data-shared algorithm. To illustrate, Feng et al. in \cite{feng2020attribute} proposed an Attribute-Based Encryption (ABE) parallel outsourced decryption for edge intelligent Internet of Vehicles (IoV). The parallel design increases decryption speed in the resource-constrained IoV context while maintaining the same security compared with the original ABE scheme. In another recent work \cite{yang2019efficient}, targetting the edge artificial intelligence scenario, Yang et al. proposed a multi pedestrian tracking method based on the rank constraint. Their proposed method is beneficial to eliminate ambiguous detection responses during association, and further increases the tracking performance in the intelligence edge device. \par } {\color{black} \subsection{Reinforcement learning and its application in edge} Reinforcement learning is another key technique that was frequently applied into the scheduling problems persisted in an edge-computing system. This particular technique usually bases upon two main genres of models, i.e., Markov Decision Process (MDP), and Semi Markov Decision Process (SMDP). \subsubsection{MDP-based reinforcement learning} \par Refs.\cite{chen_performance_2018,wei_dynamic_2019,min_learning-based_2019,xu2019optimized} are typical examples of edge Markov Decision Process (MDP) based reinforcement learning techniques that is applied into the scheduling problem in edge.} Specifically, in \cite{chen_performance_2018}, Chen \textit{et al.} combined the technique of Deep Q Network (DQN) with a multi-object computation offloading scenario. By maintaining a neural network inside its memory, the {\color{black}Mobile User} (MU) is enabled to intelligently select an offloading object among the accessible base stations. Wei \textit{et al.} in \cite{wei_dynamic_2019} introduced a reinforcement learning algorithm to address the offloading problem in the IoT scenario, based on which, they further proposed a value function approximation method in an attempt to accelerate the learning speed. In \cite{min_learning-based_2019}, Min \textit{et al.} further considered the privacy factors in healthcare IoT offloading scenarios and proposed a reinforcement learning-based scheme for a privacy-ensured data offloading. \par {\color{black} The above works are all based on MDP, which means that their action scheduling is performed periodically based on a fixed time interval. However, in the real scenario, the workflow of an agent (server or MU) is usually event-driven, and requires prompt scheduling response. A more reasonable setting is that the agent could promptly make the scheduling and perform actions once an event has occurred (e.g. a request arrives) but not wait until a fixed periodicity is met.} \subsubsection{Event-Driven SMDP-based reinforcement learning } \par Unlike the conventional MDP model, for an SMDP model, the time interval between two sequential actions does not necessarily need to be the same. As such, it is super matching for an event-triggered schedule, like the one we need for the requests scheduling. \par SMDP is a powerful modeling tool that has been applied to many fields, such as wireless networks, operation management, etc. In \cite{zheng_smdp-based_2015}, Zheng \textit{et al.} first applied SMDP in the scenario of vehicular cloud computing systems. A discounted reward is adopted in their system model, based on which, the authors further proposed a value iteration method to derive the optimal policy. In \cite{baljon_smdp-based_2017}, SMDP is first applied to energy harvesting wireless networks. For problem-solving, the authors adopted a model-based policy iteration method. However, the model-based solution proposed in the above work can not address the problem when the state transition probability is unknown, and in addition, it cannot deal with the well-known curse-of-dimensionality issue. \par To fix the gap, based on an SMDP model that is exclusively designed for a {\color{black} Narrow Band Internet of Things (NB-IOT)} Edge Computing System, Lei \textit{et al.} in \cite{lei_joint_2019} further proposed a reinforcement learning-based algorithm. However, the proposed algorithm is still too restricted and cannot be applied in our current studied problems, since several assumptions (e.g., exponential sojourn time between events) must be made in advance. Normally, these assumptions are inevitable for the derivation of state-value or policy-value estimation in an SMDP model, but unfortunately, could be the main culprit leading to great divergence between theory and reality. This potential drawback inspires us to \textbf{jettison all the assumptions} typically presented in an SMDP formulation in our research.\par \subsection{DVFS and its optimization} {\color{black} Dynamic Voltage and Frequency Scaling (DVFS) is a technique to adjust the frequency of a micro-processor, and is widely employed in cloud and edge to achieve energy conservation of computing. In the cloud, Wu et al. \cite{wu2019power} designed a scheduling algorithm for the cloud datacenter with the DVFS technique. Their proposed method efficiently assigns proper resources to jobs according to their requirements, and the authors claim that their approach, while efficiently reduces the energy consumption of a data center, does not sacrifice the system performance. In an edge environment, Dinh et al. in \cite{dinh2017offloading} jointly optimize the task allocation decision and its CPU frequency. By exploiting these benefits brought by proper allocation decisions and CPU frequency, the mobile device's energy consumption could be lower, while the task latency performance can be improved. The above works rely on frequency adjustment in the dimension of the task. Another study \cite{ajirlou2020machine2} has considered adaptive frequency adjustment at the instruction level. Essentially, they proposed to classify individual instruction into the corresponding propagation delay classes in real-time, and the clock frequency is accordingly adjusted to reduce the gap between the actual propagation delay and the clock period, and thereby reaping the benefits of dynamic frequency adjustment. The instruction-level optimization is also studied by an earlier work \cite{zhang2017bandits2}. Their main motivation is that the timing speculation (i.e., frequency) has a sweet spot for each instruction. Too much timing speculation (i.e., higher frequency, or too aggressive acceleration) could increase timing error probability, which may inversely hurt the performance. To find the sweet spot, a bandit algorithm is proposed to balance exploration and exploitation. \par In this work, we will focus on the task/job level optimization of the dynamic frequency, while leaving the instruction-level optimization a future work. } \section{Problem Formulation} \label{Problem Formulation} \subsection{System Overview} \begin{figure*}[!t] \centering \includegraphics[width=6.5in]{pic/system_architecture.pdf} \caption{System architecture for an intermittent-energy-supplied MEC system.} \end{figure*} In this paper, we target the optimization problem in a multi-users single-server MEC system that is driven by intermittent energy supply (e.g., renewable energy, wireless charging). As depicted in Fig. 1, multiple central processing units (CPUs) and a limited-capacity battery, together with communication and energy harvesting modules, physically constitute an MEC server. Our proposed MEC system makes scheduling on requests following an event-driven workflow, i.e., our request scheduling process is evoked immediately once a request is collected. {\color{black} Our solution is different from the general batch-scheduling methods, which would require the requests to wait in a queue until the scheduler evokes (either periodically or until a sufficient number of requests are queued). Compared to batch-scheduling, event-driven scheduling could make a faster response on the incoming request, and therefore could ensure a higher quality of service. But we admit that since more information could be gathered when requests are scheduled in batch, better performance of batch scheduling may be gained in return. } Formally, the proposed event-driven process can be specified by the following steps: \begin{enumerate} \item Collect the request and check the current system status, e.g., battery and energy reservation status and CPU core status. \item Do schedule to the incoming request based on its characteristic and current system status. Explicitly, the scheduler is supposed to make the following decisions: \begin{enumerate} \item Decide whether to accept the request or not. \item If accepted, decide the \textit{processing frequency} of the request. We refer to \textit{processing frequency} as the frequency that a CPU core might turn to while processing this particular request. The scheduler should not choose the frequency that might potentially \textit{over-reserve} the currently available energy or \textit{over-load} the available cores. \end {enumerate} \item Do energy reservation for the request based on the decided frequency. A CPU core cannot use more than the reserved energy to process this request. \item The request is scheduled to the corresponding CPU core and start processing. \end{enumerate}\par Given that the system we study is \textbf{not} powered by reliable energy supply (e.g., coal power), a careful plan of the available energy is supposed to be made in order to promote the system performance. \subsection{Formal Statement} \begin{table}[!t] \caption{Key notations for problem formulation} \label{table notations} \centering \begin{tabular}{cc } \hline Notations & Meanings \\ \hline $a_i$ & action scheduled for the $i$-th request \\ $f_n$ & $n$-th processing frequency option (GHz) \\ $d_i$ & data size of the $i$-th request (bits) \\ $\nu$ & computation complexity per bit \\ $\kappa$ & effective switched capacitance \\ $m$ & number of CPU cores \\ $\tau_{a_i}$ & processing time of the $i$-th request \\ $e_{a_i}$ & energy consumption of the $i$-th request \\ $B_{i}$ & battery status when $i$-th request arrives \\ $B_{max}$ & maximum battery capacity \\ \multirow{2}{*}{$\lambda_{i,i+1}$/$\rho_{i,i+1}$} & captured/consumed energy between \\ & arrivals of the $i$-th and $(i+1)$-th request\\ $S_{i}$ & reserved energy when $i$-th request arrives\\ \multirow{2}{*}{$\Psi_i$} & number of working CPU cores \\ &when the $i$-th request arrives\\ $\eta$ & tradeoff parameter\\ \hline \end{tabular} \end{table} In this subsection, we shall formally introduce the optimization problem by rigorous mathematics formulation (key notations and their meanings are given in Table \ref{table notations}). We consider the optimization problem for an MEC server with $m$ CPU cores, all of whose frequency can be adaptively adjusted via Dynamic Voltage and Frequency Scaling (DVFS) technique. Then we first specify the {\color{black}action} for the optimization problem. \subsubsection{Action} The decision (or action) in this system specifies the treatment of the incoming request. Explicitly, it specifies 1) whether to accept the request or not, 2) the processing frequency of the request. Formally, let $i$ index an incoming request by its arrival order. The action for the $i$-th request is denoted by $a_i$. Explicitly, we note that: \begin{itemize} \item $a_i \in \left\{0, 1,\dots,n \right \}$ denotes the action index of the CPU frequency at which the request is scheduled, where $n$ represents the maximum index (or total potential options) for frequency adjustment. For option $n$, $f_n$ GHz frequency will be scheduled to the request. \item Specially, when $a_i=0 $, the request will be rejected immediately. \end{itemize} \subsubsection{ Processing Time and Energy Consumption } The action we take might have a direct influence on the request \textit{processing time}, which can be specified by: \begin{align} \label{processing time} \begin{split} \tau_{a_i}&=\begin{cases} \frac{ \nu \cdot d_i }{ f_{a_i}} & a_i \in \{ 1, \dots,n \} \\ 0 & a_i=0 \end{cases} \end{split} \end{align} where we denote $d_i$ as the processing data size of an offloading request, $\nu$ as the required CPU cycles for computing one bit of the offloading data. Without loss of generality, we assume $d_i$, i.e., processing data size, as a stochastic variable while regarding $\nu$, i.e., required CPU cycles per bit, fixed for all requests. \par Also, by specifying the processing frequency, we can derive the \textit{energy consumption} for processing the request, which can be given as: \begin{align} \label{energy consumption} \begin{split} e_{a_i}= \begin{cases} \kappa f_{a_i}^2 \cdot \nu \cdot d_i & a_i \in \{ 1,\dots,n \} \\ 0 & a_i=0\end{cases} \end{split} \end{align} where we denote $\kappa$ as the effective switched capacitance of the CPUs. \subsubsection{Battery Status} Recall that the MEC server is driven by intermittent energy supply, which indicates that the server has to store the captured energy in its battery for future use. Concretely, we shall introduce a virtual queue, which serves as a measurement of the server's current battery status. Formally, we let a virtual queue, whose backlog is denoted by $B_i$, to capture the energy status when the $i$-th request arrives. $B_i$ evolves following this rule: \begin{equation} \label{battery status} B_{i+1}=\min \left \{B_{i}+ \lambda_{i,i+1}- \rho_{i,i+1} , B_{max} \right\} \end{equation} Here, \begin{enumerate} \item $\lambda_{i,i+1}$ represents the amount of energy that was captured by the server between the arrivals of the $i$-th and $(i+1)$-th request. \item $\rho_{i,i+1}$ is the consumed energy during the same interval. It is notable that the consumed energy i.e., $\rho_{i,i+1}$, is highly related to the frequency of the current running cores, due to which, is also relevant to the past \textit{actions}, regarding the fact that it is the past actions that determine the frequency of the current running cores. \item $B_{max}$ is the maximum capacity of the battery. we use this value to cap the battery status since the maximum energy status could not exceed the full capacity of the server's battery. \end{enumerate} \subsubsection{Energy Reservation Status} Upon receiving each of the coming requests, we shall reserve the corresponding amount of energy for which so that the server could have enough energy to finish this request. This reservation mechanism is essential in maintaining the stability of our proposed system. \par To be specific, we first have to construct a virtual queue to record the \textit{energy reservation status}. The energy reservation queue, with backlog $S_i$, evolves between request arrivals following this rule: \begin{equation} \label{energy reservation status} S_{i+1}= \max \left \{S_{i}+ e_{a_i} - \rho_{i,i+1} ,0 \right \} \end{equation} where $\rho_{i,i+1}$ is the consumed energy (same definition in Eq. (\ref{battery status})) and $e_{a_i}$ is the energy consumption for the $i$-th request (same definition in Eq. (\ref{energy consumption})). By this means, $S_{i+1}$ exactly measures how much energy has been reserved by the {\color{black} first} to the $i$-th request \footnote{Some may wonder the rationale behind the subtraction of $\rho_{i,i+1}$. Considering the case that in a specific timestamp (e.g., the timestamp that the $i$-th request arrives), the processing of a past request (e.g., the $(i-1)$-th request) could be unfinished, but have already consumed some of the reservation energy. Then, the reservation energy for it should subtract the already consumed part.}. \par \subsubsection{Energy Constraint} By maintaining the \textit{energy reservation status}, we can specify \textit{energy constraint} to control the action when the energy has already been full-reserved. The constraint can be given as follows: \begin{equation} S_{i}+ e_{a_i} \leq B_{i} \end{equation} By this constraint, we ensure that the request has to be rejected if not enough energy (that has not been reserved) is available. \subsubsection{Resource Constraint} Recall that we assume a total number of $m$ CPU cores are available for request processing. When the computation resources have already been full-loaded, the system has no option but to reject the arrived requests. So, we introduce the following constraint: \begin{equation} \label{resource constraint} \Psi_i+ \mathbb{I}\{a_i \neq 0\} \leq m \end{equation} where $\Psi_i$ denotes the number of currently working CPU cores. By this constraint, we ensure that the server could not be overloaded by the accepted request. \subsubsection{Optimization Problem} Now we shall formally introduce the problem that we aim to optimize, which is given as follows: \begin{equation} \begin{split} \textit{ (P1)} & \quad \textbf{Obj1:} \quad \min_{\{a_i\}} \sum_{i=1}^{\infty} \tau_{a_i} \quad \\ & \quad \textbf{Obj2:} \quad \max_{\{a_i\}} \sum_{i=1}^{\infty} \mathbb{I}\{a_i \neq 0\} \\ &\quad\textbf{C1:} \quad S_{i}+ e_{a_i} \leq B_{i} \\ & \quad \textbf{C2:} \quad \Psi_i+ \mathbb{I}\{a_i \neq 0\} \leq m \end{split} \end{equation} \par There are two objectives that we need to consider in this problem: 1) the first objective is the cumulative \textit{processing time} of the system, 2) and the second objective is the cumulative \textit{acceptance}. Besides, two constraints, i.e., \textit{Energy Constraint} and \textit{Resource Constraint}, have been covered in our system constraints. \par Obviously, \textit{P1} is unsolvable due to the following facts: \begin{itemize} \item \textbf{Existence of stochastic variables.} Stochastic variables, e.g., $d_{i}$ (data size of requests), $\lambda_{i,i+1}$ (energy supplied) and request arrival rate, persist in \textit{P1}. \item \textbf{Multi-objective quantification.} The two objectives considered in our problem are mutually exclusive and there is not an explicit quantification between them. \end{itemize} To bridge the gap, we 1) set up a tradeoff parameter to balance the two objectives and transform the problem into a single objective optimization problem, 2) transform the objective function into an expected form. This leads to our newly formulated \textit{P2}: \begin{equation} \begin{split} \label{P2} \textit{ (P2)} &\quad \quad \max_{\{a_i\}} \sum_{i=1}^{\infty} \mathbb{E} \left[ \mathbb{I}\{a_i \neq 0\}-\eta \tau_{a_i} \right] \\ &\quad\textbf{C1:} \quad S_{i}+ e_{a_i} \leq B_{i} \\ & \quad \textbf{C2:} \quad \Psi_i+ \mathbb{I}\{a_i \neq 0\} \leq m \end{split} \end{equation} where $\eta$ serves as the tradeoff parameter to balance cumulative \textit{acceptance} and cumulative \textit{ processing time}. \textit{P2} is more concrete after the transformation, but still, we encounter the following challenges when solving \textit{P2}: \begin{itemize} \item \textbf{Exact constraints.} Both C1 and C2 are exact constraints that should be strictly restricted for each request. This completely precludes the possibility of applying an offline deterministic policy to solve the problem, noticing that $B_i$, $S_i$ in C1 and $\Phi_i$ in C2 are all stochastic for each request. \item \textbf{Unknown and non-stationary supplied pattern of energy.} The supplied pattern of intermittent energy is highly discrepant, varying from place to place and hour to hour\footnote{Considering the energy harvest pattern of solar power. We have a significant difference in harvest magnitude between day and night.}. As such, the stochastic process $\lambda_{i,i+1}$ in Eq. (\ref{battery status}) may not be stationary, i.e., $\lambda_{i,i+1}$ samples from an ever-changing stochastic distribution that is relevant with request order $i$, and moreover, it is unknown to the scheduler. \item \textbf{Unknown and non-stationary arrival pattern.} The arrival pattern of the request's data size is unknown to the system, and also, could be highly discrepant at temporal scales. \item\textbf{Unknown stochastic distribution of requests' data size.} The processing data size could vary between requests and its distribution is typically unknown to the scheduler. \item \textbf{Coupling effects of actions between requests.} The past actions towards an earlier request might have a direct effect on the later scheduling process (see the evolvement of $S_{i}$ and $B_i$) \end{itemize} Regarding the above challenges, we have to resort to an online optimization solution for problem-solving. The solution is expected to learn the stochastic pattern from the historical knowledge, and meanwhile, can strictly comply with the system constraint. \par {\color{black} \subsection{Connection Between Our Problem and Knapsack} Our defined problem can be viewed in a classical knapsack view. The key problem of the knapsack is that: if we have $N$ items (indexed by $i$) with a value $v_i$ and a weight $w_i$, which subset of items should we put into a knapsack with capacity $B$, such that the total value of collected items maximized? If we view a request as an item, the energy consumption of processing it as weight, the reward of accepting it as value, and the available energy as knapsack capacity, our problem can be viewed as an extension of the knapsack problem. But the key difference is that: \begin{itemize} \item The item list is not finite and fixed. The item (request) arrives across the timeline with the unknown pattern of weights (energy consumption) and values (rewards). Before a request’s arrival, the scheduler can not access the request's value and weight. In addition, the scheduler is supposed to make the decision once a request arrives. \item The knapsack capacity (available energy) is growing across the timeline since the server continuously harvests energy. Also, how much energy will be harvested in the future is unknown to the scheduler. \item There is another constraint other than the available energy constraint. The number of requests that can be simultaneously hosted by the server is constrained (See Eq. (6)). \item The action space is no longer 0-1, as in the original knapsack problem. The action space of our problem includes whether to accept the request, as well as the processing frequency of it. \end{itemize} The main deviation between our problem and knapsack is caused by the event-driven scheduling. The scheduler should make a prompt decision once an item (request) arrives but is not allowed to make the decision after receiving a batch of requests. In terms of the batch-scheduling case, if the batch size is sufficiently large, the problem can be reduced to a knapsack problem with finite action set and multiple knapsack capacity (i.e., multiple constraints). However, when using event-driven scheduling (do scheduling once a request arrives), this reduction may not hold. } \section {Deep Reinforcement Learning-Based Solution} \subsection{Formulation of a Semi-Markov Decision Process} To develop our reinforcement learning solution, we shall first transform the problem into an \textit{Semi-Markov Decision Process} (SMDP) formulation. In our SMDP formulation, we assume the system \textit{state} as the system running status when a request has come, or when the scheduler is supposed to take \textit{action}. After an action being taken by the scheduler, a \textit{reward} would be achieved, and the state (or system status) correspondingly transfers. It follows an \textit{event-driven} process, that is, the scheduler decides the action once a request has come but does nothing while awaiting. And as a result, the time interval between two sequential actions may not be the same. This is the core characteristic of an SMDP model and is the major difference from a normal MDP model. \par Now we shall specify the three principal elements (i.e., states, action, and rewards) in our SMDP formulation in sequence, and please note that most of the notations we used henceforth are consistent with those in Section \ref{Problem Formulation}. \subsubsection{System States} A system state is given as a tuple: \begin{equation} \label{state formulation} s_i \triangleq \{ T_i, B_i, S_i, \psi_{i,1} \dots, \psi_{i,n}, d_i \} \end{equation} Explicitly, \begin{itemize} \item $T_i$ is the \textbf{24-hour-scale local time} when the $i-$th request arrives in the MEC server. We incorporate this element in our state in order to accommodate the temporal factor that persists in the energy and request pattern. \item $B_i$ is the \textbf{battery status}, same as we specify in Eq. (\ref{battery status}). \item $S_i$ is the \textbf{energy reservation status}, same as we specify in Eq. (\ref{energy reservation status}). \item $\psi_{i,n}$ denotes the\textbf{ running CPU cores in the frequency of $f_n$ GHz}. Meanwhile, it is intuitive to see that $\Psi_i= \sum_{n^{\prime}=1}^n\psi_{i,n}$ where $\Psi_i$ is the total running cores we specify in Eq. (\ref{resource constraint}). \item $d_i$ is the \textbf{data size} of the $i$-th request. \end{itemize} Information captured by a state could be comprehended as the current system status that might support the action scheduling of the incoming $i$-th request. More explicitly, we argue that the formulated states should at least cover the system status that helps construct a \textit{possible action set}, but could cover more types of informative knowledge to support the decision (e.g., $T_i$ in our current formulation, which will be formally analyzed later). The concept of \textit{possible action set} would be given in our explanation of \textit{system actions}. \subsubsection{System Actions} \label{action set} Once a request arrives, given the current state (i.e., the observed system status), the scheduler is supposed to take action, deciding the treatment of the request. Indicated by the system constraints C1 and C2 in \textit{P2}, we are supposed to make a restriction on the to-be taken action. By specifying the states (or observing the system status), it is not difficult to find that we can indeed get a closed-form possible action set, as follows: \begin{equation} a_i \in \mathcal{A}_{s_i} \triangleq \{ a | \Psi_i+ \mathbb{I}\{a \neq 0\} \leq m, S_{i}+ e_{a} \leq B_{i} \} \end{equation} where $\Psi_i$, $B_{i}$ and $S_i$ are all covered in our state formulation. By taken action from the defined possible action set, we address challenge 1) \textbf{exact constraints}, that we specify in \textit{P2}. \subsubsection{System Rewards} Given state and action, a system reward will be incurred, in the following form: \begin{equation} \label{reward} r(s_i,a_i)= \mathbb{I}\{a_i \neq 0\}- \eta \tau_{a_i} \end{equation} The reward of different treatments of a request is consistent with our objective formulation in \textit{P2} (see Eq. (\ref{P2})). The goal of our MDP formulation is to maximize the expected achieved rewards, which means that we aim to maximize $ \sum_{i=1}^{\infty} \mathbb{E} \left[ \mathbb{I}\{a_i \neq 0\}- \eta \tau_{a_i} \right]$, the same form with the objective in \textit{P2}. Besides, here we can informally regard $\mathbb{I}\{a_i \neq 0\}$ as a "real reward" of accepting a request and $\tau_{a_i}$ as the "penalty" of processing a request. \subsubsection{State Transferred Probability} After an action being taken, the state will be transferred to another one when the next arrival of the request occurs. The state transferred probability to a specific state is assumed to be \textit{stationary} given the current state, as well as the current action, i.e., we need to assume that: \begin{equation} \label{state transfer probability } p(s_{i+1} |s_i,a_i)= \text{a constant} \end{equation} \par This assumption is the core part in our MDP formulation, which is our main motivation to cover $T_i$ and $\psi_{i,1} \dots, \psi_{i,n}$ (rather than $\Psi_{i}$) in our state formulation. {\color{black} By this constant state transferred probability assumption, we are allowed to estimate the transferred probability, and thereby given a fighting chance to maximize the achieved rewards in an online fashion. To justify this assumption given our defined state formulation, we refer the readers to Appendix \ref{appendix A} for a detailed explanation. { \color{black} And to make the MDP formulation easier to grasp, we prepare a scheduling example, which has been moved to Appendix \ref{appendix B} due to the space limit. } } \par \par \subsection{State-Action Value Function} \label{old State-Action Value Function} Recall that our ultimate goal is to maximize the expected cumulative reward. For this purpose, we leverage Bellman optimality to find the optimal discounted state-action value, i.e., $Q_{\pi^*}(s,a)$, as follows: \begin{equation} \begin{split} \label{final iterate update function} &Q_{\pi^*}(s,a) = \mathbb{E}_{s^{\prime}} \left[ r(s,a)+ \beta \max_{a^{\prime} \in \mathcal{A}_{s^{\prime}}} Q_{\pi^*}(s^{\prime},a^{\prime}) \right] \end{split} \end{equation} where $\pi^*$ is the optimal policy under discounted formulation, and $\beta$ is the discounted factor. {\color{black} Detailed explanation about how to derive $Q_{\pi^*}(s,a)$ is available in Appendix \ref{Appendix C}.} This state-action value., i.e., $Q_{\pi^*}(s,a)$ indeed specifies the value of taking a specific action, which is basically composed of two parts: \begin{enumerate} \item The first part is the expected reward that is immediately obtained after actions have been taken, embodied by $\mathbb{E}[r(s,a)]$. \item The second part is the discounted future expected rewards after the action has been taken, embodied by $ \mathbb{E}[\beta \max_{a^{\prime} \in \mathcal{A}_{s^{\prime}}} Q_{\pi^*}(s^{\prime},a^{\prime})] $. This literally addresses challenge 5) \textbf{Coupling effects of actions between requests} we proposed below \textit{P2}. The coupling effects are in fact embodied by these discounted expected rewards: by taking a different action, the state might experience a different transfer probability and thereby making the future rewards being affected. By this MDP formulation, we are enabled to have a concrete model of this coupling effect to the future. \end{enumerate}\par Besides, specified by the proposed challenges below \textit{P2}, we know that both the energy and request arrival pattern, as well as the data size distribution, are all unknown to the scheduler, which means that it is hopeless to derive the closed-form $Q_{\pi^*}(s,a)$. More explicitly, since the state transferred probability $p(s^{\prime} |s,a)$ (or $p(s_{i+1} |s_i,a_i)$ in Eq. (\ref{state transfer probability })) is an unknown constant, we cannot expand the expectation in Eq. (\ref{final iterate update function}), making $Q_{\pi^*}(s,a)$ unachievable in an analytical way. Without knowledge of $Q_{\pi^*}(s,a)$, we are unable to fulfill our ultimate goal, i.e., to derive $\pi^*$. \par Fortunately, there still exists an alternative path to derive $Q_{\pi^*}(s,a)$. (Henceforth, we use $Q(s,a)$ to denote $Q_{\pi^*}(s,a)$ for sake of brevity). If we have sufficient amount of data over a specific state and action (captured by a set $X_{s,a}$), each piece of which shapes like this 4-element tuple: $x \triangleq (s, a, r(s,a) , s^{\prime})$, then we can optimize $Q(s,a)$ by minimizing the \textit{estimation error}, namely: \begin{equation} \begin{split} \label{estimate Q2} \frac{1}{|X|} \sum_{x \in X} \left[ Q(s,a)- \left( r(s,a)+ \beta \max_{a^{\prime} \in \mathcal{A}_{s^{\prime}}} Q(s^{\prime},a^{\prime}) \right) \right]^2 \end{split} \end{equation} where $X=X_{s_1,a_1} \cup \dots \cup X_{s_1,a_n} \cup \dots$ captures all the available data. In this way, we do not need prior knowledge about the transferred probability i.e., $p(s^{\prime} |s,a)$, but we learn it from the real state transferred data. This learning-based method completely resolves the \textbf{unknown distribution issues} we raised below \textit{P2}. \par However, due to \textbf{infinite amount of states} in our formulated problem, the problem is still intractable. We simply cannot iteratively achieve $Q(s,a)$ for every possible state-action pair, but at least, this initial idea points out a concrete direction that elicits our later double deep Q network solution. \subsection{A Double Deep Q Network Solution} In the previous section, we provide an initial idea about how to derive $Q(s,a)$ in a learning way. But we simply cannot record $Q(s,a)$ for each state due to the unbounded state space. This hidden issue motivates us to use a neural network to predict the optimal state-action value (abbreviated as \textit{Q value} henceforth). Explicitly, we input a specific state to the neural network and output the Q value for action $1$ to $n$. By this means, we do not need to record the Q value, but it is estimated based on the output after going through the neural network. \par Formally, the estimated Q value can be denoted by $Q\left(s, a ; \theta_{i}\right)$ where $\theta_{i}$ denotes the parameters of the neural network (termed Q network henceforth) after $i$ steps of training. And following the same idea we proposed before, we expect to minimize the estimation error (or \textit{loss} henceforth), in this form: \begin{equation} \begin{split} \label{Loss} &L_{i}\left(\theta_{i};\tilde{X}_{i}\right)\\ =&\frac{1}{|\tilde{X}_i|} \sum_{x \in \tilde{X}_i} \left[ Q(s,a; \theta_{i})- \left( r(s,a)+ \beta \max_{a^{\prime} \in \mathcal{A}_{s^{\prime}}} Q(s^{\prime},a^{\prime}; \theta_{i}) \right) \right]^2 \end{split} \end{equation} {\color{black} where, \begin{itemize} \item $x \triangleq (s, a, r(s,a) , s^{\prime})$ is a tuple that captures a piece of data (which includes state, action, reward and next states). \item $\tilde{X}_i$ is a sub-set of total available data when doing training for the $i$-th step, which is often referred to as \textit{mini-batch}. We introduce such a concept here since the data acquiring process is an online process. In other words, we do not have all the training data naturally, but we obtain it through continuous interaction (i.e., acting action) and continuous policy update. As a result of this continuous update of data, it is simply not "cost-effective" to involve all the historical data we currently have in every step of training. As a refinement, only a subset of the data, i.e., $\tilde{X}_i$, is involved in the loss back-propagating for each step of training. \item $|\tilde{X}_i|$ is the cardinality of mini-batch $\tilde{X}_i$. \item $\theta_{i} \in \mathbb{R}^d$ denotes the parameters of the Q network. \item $Q(s,a; \theta_{i})$ is the predicted Q value for action $a$ via feeding state $s$ to the Q network. \item $L_{i}\left(\theta_{i};\tilde{X}_{i}\right)$ is the loss function that we need to minimize by adjusting $\theta_{i}$ under mini-batch $\tilde{X}_i$. \item $\beta$ is the discounted factor. \end{itemize} } \par \begin{figure*}[!hbtp] \begin{equation} \begin{aligned} \label{double q Loss} &L_{i}\left(\theta_{i};\tilde{X}_{i}\right)=\frac{1}{|\tilde{X}_i|} \sum_{x \in \tilde{X}_i} \left[Q\left(s, a ; \theta_{i}\right)- \left(r(s,a) + \beta Q\left(s^{\prime}, \mathop{\arg\max} _{a^{\prime} \in \mathcal{A}_{s^{\prime}}}Q(s^{\prime},a^{\prime}; \theta_{i}); \theta_{i}^{-}\right) \right )\right]^{2} \end{aligned} \end{equation} {\color{black}where $\theta_{i} \in \mathbb{R}^d$ and $\theta_{i}^{-} \in \mathbb{R}^d$ respectively denote the parameters of original Q network and target nework. $Q(s,a; \theta_{i})$ is the predicted Q value for action $a$ via feeding state $s$ to the \textbf{target} Q network with network parameters $\theta_{i}^{-}$. Other notations are consistent with those in Equation (\ref{Loss}).} \end{figure*} {\color{black} However, the above-defined loss, though is quite intuitive, would possibly lead to training instability of the neural network, since it is updated too radically (see \cite{mnih_human-level_2015}). As per \cite{van2016deep}, a double network solution would ensure a more stable performance. In this solution, we introduce another network, known as \textit{target network}, whose parameters are denoted by $\theta_{i}^{-}$. The target network has exactly the same network architecture as the Q network, and its parameters would be overridden periodically by the Q network. Informally, it serves as a "mirror" of the past Q network, which significantly reduces the training variation of the current Q network. The re-written loss function after adopting the double network architecture can be viewed in Eq. (\ref{double q Loss}) (located at the top of this page). } \par \begin{algorithm}[h] \caption {Training Stage of NAFA} \begin{algorithmic}[1] \REQUIRE ~~\\ Initial/minimum exploration factor, $\epsilon_0$/ $\epsilon_{min}$;\\ Discount factor for rewards/exploration factor, $\beta$/ $\xi$;\\ Tradeoff Parameter, $\eta$; Learning rate $\gamma$;\\ Update periodicity of target nework, $\zeta$;\\ Steps per episode, $N_{max}$; Training episodes, $ep_{max}$;\\ Batch size, $|\tilde{X}_i|$; Memory size, $X_{max}$;\\ \ENSURE~~\\ After-trained network parameters; $\theta_{final}$ \STATE Initialize $\theta_i$ and $\theta_{i}^{-}$ with arbitrary values \STATE Initialize $i=1$, $\epsilon=\epsilon_0$ \STATE Initialize empty replay memory $X$ \STATE Initialize enviroment (or system status) \FOR{$ep \in \{1,2, \dots,ep_{max}\}$} \STATE Wait until the first request comes \REPEAT \STATE Observe current system status $s$ \IF{ $\text{random()}<\epsilon$} \STATE Randomly select action $a$ from $\mathcal{A}_s$ \ELSE \STATE $ a=\operatorname{argmax}_{a \in \mathcal{A}_s } Q\left(s, a ; \theta_i\right)$ \ENDIF \STATE Perform action $a$ and realize reward $r(s,a)$ \STATE Wait until the next request comes \STATE Observe current system status $s^{\prime}$ \STATE Store $(s,a,r(s,a),s^{\prime})$ into replay memory $X$ \STATE Sample minibatch $\tilde{X}_{i} \sim X$ \STATE Update parameter $\theta_{i+1}$ following \begin{align} \label{gradient descent}\theta_{i+1}= \theta_{i}-\gamma \nabla_{\theta_{i}} L_i\left(\theta_{i};\tilde{X}_{i} \right)\end{align} \STATE $\epsilon_i=\epsilon_{min} + (\epsilon_{0}-\epsilon_{min}) \cdot \exp(-i /\xi )$ \IF{ $i \mod \zeta=0$} \STATE $\theta_{i+1}^{-}=\theta_{i+1}$ \ELSE \STATE $\theta_{i+1}^{-}=\theta_{i}^{-}$ \ENDIF \STATE $i=i+1$ \UNTIL{ $i>ep\cdot N_{max}$ } \STATE Reset the environment (or system status) \ENDFOR \STATE $\theta_{final}=\theta_{i}$ \end{algorithmic} \label{Training Algorithm} \end{algorithm} Now we shall formally introduce our proposed solution termed \textbf{N}eural network-based \textbf{A}daptive \textbf{F}requency \textbf{A}djustment (NAFA), whose running procedure on training and application stage are respectively shown in Algorithm \ref{Training Algorithm} and Algorithm \ref{Application Algorithm}. Overall, the running procedure of NAFA can be summarized as follows: \begin{enumerate} \item \textbf{Initialization:} NAFA first initializes the Q network with arbitrary values and set the exploration factor to a pre-set value. \item \textbf{Iterated Training:} We divide the training into several episodes of training. The environment (i.e., the system status) will be reset to the initial stage each time an episode ends. In each episode, after the first request comes, the following sub-procedures perform in sequence: \begin{enumerate} \item \textbf{Schedule Action:} NAFA observes the current system status $s$ (or state in our MDP formulation). Targeting the to-be scheduled request (i.e., the $i$-th request), NAFA adopts a $\epsilon$-greedy strategy. Explicitly, with probability $\epsilon$, NAFA randomly explores the action space and randomly selects an action. With probability $1-\epsilon$, NAFA greedily selects action based on the current system status $s$ and the current Q network's output. \item \textbf{Interaction:} NAFA performs the decided action $a$ within the \textbf{environment}. A corresponding reward would be realized as per Eq. (\ref{reward}). Note that the \textbf{environment} here could be real \textbf{operation enviroment} of a MEC server, or could be a \textbf{simulation environment} that is set up for a training purpose. \item \textbf{Data Integration:} After the interaction, NAFA sleeps until a new request has arrived. Once evoked, NAFA checks the current status $s^{\prime}$ (regarded as next state in the current iteration) and stores it into \textit{replay memory} collectively with current state $s$, action $a$, and realized reward $r(s,a)$. The replay memory has a maximum size $X_{max}$. If the replay memory goes full, the oldest data will be replaced by the new one. \item \textbf{Update Q Network:} A fixed batch size of data is sampled from replay memory to the minibatch $\tilde{X}_i$. Then, NAFA performs back-propagation with learning rate $\gamma$ on the Q network using samples within minibatch $\tilde{X}_i$ and the loss function defined in Eq. (\ref{double q Loss}). \item \textbf{Update Exploration Factor and Target Q Network:} NAFA discounts $\epsilon$ using a discount factor $\xi$ and update the target network at a periodicity of $\zeta$ steps. After that, NAFA starts a new training iteration. \end{enumerate} \begin{algorithm}[h] \caption {Application Stage of NAFA} \begin{algorithmic}[1] \REQUIRE ~~\\ After-trained network parameters; $\theta_{final}$ \ENSURE~~\\ Action sequence; $a_1, a_2, \dots$ \STATE $i=1$ \FOR{each request comes} \STATE Observe system status $s_i$ \STATE $a_i=\operatorname{argmax}_{a \in \mathcal{A}_s} Q\left(s_i, a; \theta_{final}\right)$ \STATE Perform action $a_i$ \STATE $ i=i+1$ \ENDFOR \end{algorithmic} \label{Application Algorithm} \end{algorithm} \item \textbf{Application:} After training has finished (i.e., it has gone through $ep_{max} \cdot N_{max}$ steps of training), the algorithm uses the obtained Q network (whose parameters denoted by $\theta_{final}$) to schedule requests in the real \textbf{operation enviroment}, i.e., based on current state $s_i$, action $a_i=\operatorname{argmax}_{a \in \mathcal{A}_{s_i}} Q\left(s_i, a; \theta_{final}\right)$ will be taken for each request. \end{enumerate} \subsection{Discussion} {\color{black} \subsubsection{Computation complexity of NAFA} Suppose we use a neural network which contains $n$ linear hidden layers, $m$ training samples, and $j$ nodes in each layer as the training model of NAFA. For forward propagating from a layer to its next layer, we have $\mathcal{O}(m*j^2)$ computation complexity, since the weights matrix between connected layers is in the demension of $j^2$, and we need to multiply the inputs (i.e., $m$ training samples) with the weights. After the matrix multiplcation, we apply the activation function to the output of each layer, which has the computation complexity of $\mathcal{O}(m*j)$. So, the forwarding complexity of NAFA for each layer is $\mathcal{O}(m*j+m*j^2 )$, and for $n$ layers in total it is $\mathcal{O}(n*(m*j+m*j^2) ) =\mathcal{O}(n*m*j^2)$. For the backward process, we compute the error signals for each node, and backward it to the previous layers. The time complexity is thus in the same scale with forwarding, which is also $\mathcal{O}(n*m*j^2)$. As such, the total computation complexity of NAFA's training process is $\mathcal{O}(n*m*j^2)$. \subsubsection{The way NAFA addresses the five challenges proposed below P2 } \begin{itemize} \item \textbf{Exact constraints.} NAFA defines an action set based on the current state, so NAFA will not take invalid actions that may possibly violate the exact constraint (See \ref{action set}). \item \textbf{Unknown and non-stationary supplied pattern of energy.} NAFA incorporates the local time into its state formulation to make the state transformation stationary (See Observation \ref{stationary energy arrival} in Appendix \ref{appendix A}), and uses the historical data to predict the value of a state (See our loss function in Eq.(\ref{double q Loss}) on how we predict the value), but remains agnostic about the real supplied pattern of energy. \item \textbf{Unknown and non-stationary arrival pattern.} As the arrival pattern is also related to time, the local time incorporated into NAFA's states could make the state transformation stationary (See Observation \ref{stationary request arrival} in Appendix \ref{appendix A}). Also, NAFA is agnostic to the real request arrival pattern, but use the learning techniques to support decision. \item\textbf{Unknown stochastic distribution of requests' data size.} We incorporate the data size of an incoming reqeust into NAFA's state formulation, based on which, NAFA is enabled to estimate the reward of computing the incoming request. Again, by our learning design, NAFA does not need to know the data size distribution, but can only care about the value of a specific state, which is learned by the historical data. \item \textbf{Coupling effects of actions between requests.} To address this challenge, NAFA incorporates two parts when estimating the value of an state-action pair (aka Q value, see section \ref{old State-Action Value Function} ). The first part is the immediate reward of accepting a request, and the second part is the future rewards that is closely related to the state transformation. The coupling effects of action is profiled in the futures rewards, that is, taking an action may impact the state transformation, and thereby affecting the future reward after this action. Our state-value formulation accounts for this coupling effects of action. \end{itemize} \subsubsection{Notes for implementation of NAFA} Recall that NAFA is required to estimate the processing time and energy consumption of a request using Eq. (\ref{processing time}) and Eq. (\ref{energy consumption}). However, we state that such a calculation is replaceable. One can take advantage of other formulation to calculate these two metrics if her formulations are closer to the real energy consumption and processing time of a request. Also, we need to clarify that these estimations do not necessarily need to be 100\% exact to the real quantities. For energy consumption, we allow the estimation to be an {\color{black} over-estimation}. By doing so, the request still would not fail in the middle of computation, since we have reserved more energy based on the overestimated expected energy consumption \footnote{\color{black}We note that when applying overestimation of energy consumption, we need to slightly modify Eq. (\ref{energy reservation status}) in our framework in order to maintain the normal operation. Once a request finishes, the server should check how much energy is really used by processing the requests, and derive how much energy has been over-reserved by the previous reservation. Then this quantity should be subtracted to eliminate the estimation error. }. For the processing time, which only affects the reward calculation, should not affect the working mechanism of the whole system, but of course, an accurate estimation certainly help NAFA to make a properer decision. } \section{Experiment} \subsection{Setup} \subsubsection{Basic setting} \begin{itemize} \item \textbf{Programming and running environment:} We have implemented NAFA\footnote{Source codes of NAFA and baseline methods, as well as the simulation environment and dataset, are all available in https://github.com/huangtiansheng/NAFA} and the simulation environment on the basis of PyTorch and gym (a site package that is commonly used for environment construction in RL). Besides, all the computation in our simulation is run by a high-performance workstation (Dell PowerEdge T630 with 2xGTX 1080Ti). \item \textbf{Simulation of energy arrival:} In our simulation, NAFA is deployed on an MEC server which is driven by solar power (a typical example of intermittent energy supply). To simulate the energy arrival pattern, we use the data from HelioClim-3\footnote{http://www.soda-pro.com/web-services/radiation/helioclim-3-archives-for-free}, a satellite-derived solar radiation database. Explicitly, we derive the Global Horizontal Irradiance (GHI) data in Kampala, Uganda (latitude 0.329, longitude 32.499) from 2005-01-01 to 2005-12-31 (for train dataset) and 2006-01-01 to 2006-12-31 (for test dataset). Note that the GHI data in some days are missing in the dataset, so we use 300 out of 365 days of intact data respectively from the train and test dataset during our experiment. By the GHI data \footnote{\color{black} The GHI data in Helioclim is discrete by hours, so the time unit mentioned henceforth is 1 hour. }, we calculate the amount of arrival energy during a given time interval $[t_1,t_2]$ ({\color{black}where $t_1$ and $t_2$ are integers}), as the following form: {\color{black} \begin{equation} \lambda_{t_1,t_2}= \sum_{t=t_1}^{t_2}\text{panel\_size} \cdot\text{GHI}(t) \end{equation} } where \text{panel\_size} is the solar panel size of an MEC server. By using $\lambda_{t_1,t_2}$, we can derive the energy arrival between two request arrivals, i.e., $\lambda_{i,i+1}$. \item \textbf{Simulation of request arrival and data size:} We use a Poisson process (with arrival rate $\lambda_r$) to generate the request arrival events (similar simulation setting available in \cite{xu2017online,mao2016dynamic}). The data size of the request follows a uniform distribution (similar setting available in \cite{lyu2017optimal,chen2020joint}) in the scale of 10MB to 30MB, i.e., $d_i \sim \text{Uniform}(10,30)$ MB. \item \textbf{Action space:} We consider 4 possible actions for each request (i.e., three correspond to different levels of frequency and one is rejection action). Formally, for the $i$-th request, $a_i \in \{0,1,2,3\}$, where actions $\{1,2,3\}$ correspond to processing frequency $\{2,3,4\}$GHz and action $0$ induces request rejection. \item \textbf{Network Structure:} The target network and Q network in NAFA have exactly the same structure: a Deep Neural Network (DNN) model with two hidden layers, each with 200 and 100 neurons, activated by ReLu, and an output layer, which outputs the estimated Q value for all 4 actions. \begin{table}[!t] \caption{Simulation parameters} \label{table simulation} \centering \begin{tabular}{ccc } \hline Symbols & Meanings & Values \\ \hline $\nu$ & computation complexity & 2e4 \\ $\kappa$ & effective switched capacitance & 1e-28 \\ $m$ & number of CPU cores & 12\\ $B_{max}$ & battery capacity & 1e6 (Joules)\\ \text{panel\_size} & solar panel size & 0.5 ($m^2$)\\ \hline \end{tabular} \end{table} \item \textbf{Simulation parameters:} All of the simulation parameters have been specified in Table \ref{table simulation}. \begin{table}[!t] \caption{Training hyper-parameters for NAFA} \label{table NAFA} \centering \begin{tabular}{ccc } \hline Symbols & Meanings & Values \\ \hline $\epsilon_{0}$ & initial exploration factor & 0.5 \\ $\epsilon_{min}$ & minimum exploration factor & 0.01 \\ $\xi$ & discount factor for exploration & 3e4\\ $\gamma$ & learning rate & 5e-4 \\ $\beta$ & discount factor for rewards & 0.995\\ $\zeta$ & target nework update periodicity & 5000\\ $|\tilde{X}_i|$ & batch size & 80\\ $X_{max}$ & size of replay buffer & 1e6\\ \hline \end{tabular} \end{table} \item \textbf{Hyper-parameters and training details of NAFA:} All hyper-parameters are available in Table \ref{table NAFA}. In our simulation, we use $ep_{max}=30\times 5$ episodes to train the model. The simulation time for each episode of training is 10 straight days. We reset the simulation environment based on different GHI data once the last request within these 10 days has been scheduled.\footnote{So, in our real implementation, training steps $N_{max}$ is not necessarily identical for all the training episodes.} Besides, it is important to note that, since we only have $30\times 10$ days of GHI data as our training dataset, we re-use the same $30\times 10$ days of GHI data for training episodes between $30\times 2$ to $30\times5$. \item \textbf{Uniformization of states:} In our implementation of NAFA, we have uniformed all the elements' values in a state to the scale of $[0,1]$ before its input to the neural network. We are prone to believe that such a uniformization might potentially improve the training performance. \end{itemize} \par \begin{figure*}[!t] \centering \includegraphics[ width=6.5in]{pic/reward_fix_arrival.pdf} \caption{\color{black}Box plot demonstrating rewards per day vs. tradeoff $\eta$ fixing $\lambda_r=30$. Each of the sub-figures demonstrates reward data of 300 straight simulation days, using the same testing dataset.} \label{fix arrival rewards} \end{figure*} \subsubsection{Baselines} For an evaluation purpose, we implement three baseline methods, specified as follows: \begin{itemize} \item \textbf{Best Fit (BF):} Best Fit is a rule-based scheduling algorithm derived from \cite{farahnakian2016energy}. In our problem, BF tends to reserve energy for future use by scheduling the minimized processing frequency for the incoming request. Explicitly, it selects an action: \begin{equation} a_i= \begin{cases} \operatorname{argmin}_{a \in \mathcal{A}_{s_i} } f_{a} & |\mathcal{A}_{s_i}|>1 \\ 0 & \text{otherwise} \end{cases} \end{equation} \item \textbf{Worst Fit (WF):} Worst Fit is another rule-based scheduling algorithm derived from \cite{xian2007energy}. In our problem, WF is desperate to reduce the processing time of each request. It achieves this goal via scheduling the maximized processing frequency for the incoming request as far as it is possible. Explicitly, it selects an action: \begin{equation} a_i= \begin{cases} \operatorname{argmax}_{a \in \mathcal{A}_{s_i} } f_{a} & |\mathcal{A}_{s_i}|>1 \\ 0 & \text{otherwise} \end{cases} \end{equation} \item \textbf{linUCB:} linUCB is an online learning solution and it is typically applied in a linear contextual bandit model (see \cite{chu2011contextual}). In our setting, linUCB learns the immediate rewards achieved by different contexts (or states in our formulation) and it greedily selects the action that maximizes its estimated immediate rewards. However, it disregards the state transfer probability, or in other words, it ignores the rewards that might be obtained in the future. Besides, same as NAFA, in our implementation of linUCB, we perform the same uniformization process for a state before its training. We do this in a bid to ensure a fair comparison. {\color{black} \item \textbf{Sliding-Window (SW):} SW is an online learning solution proposed in \cite{liu2020resource}. In our setting, we allow SW to be prophetic, i.e., it is given extra information for the states $s_{i}$, \dots, $s_{i+M}$ while making decision $a_i$. SW always chooses an action that maximizes the cumulative rewards for requests indexed within the window $[i,i+M]$. For each window, it calculates the on-off decision of the first $L \leq M$ requests in the window, utilizing the request and energy arrival pattern of the entire $M$ requests. In our setting, we set $M=500$ and $L=300$.} \end{itemize} In our experiment, we train linUCB and NAFA for the same amount of episodes. After training, we use 300 straight days of simulation based on the same test dataset to validate the performance of different scheduling strategies. \subsection{Results} \subsubsection{Tradeoff factor vs. Average Rewards} With the request arrival rate fixing to $\lambda_r=30$ and different settings of tradeoff factor $\eta$, we shall show how different scheduling strategies work. The results can be viewed in the box plot, shown in Fig. \ref{fix arrival rewards}. From this plot, we can derive the following observations: \begin{itemize} \item In all the settings of $\eta$, NAFA outperforms all the other baselines in terms of average returned rewards. This result strongly shows the superiority of our proposed solution: not only is NAFA capable of adaptively adjusting its action policy based on the operator's preference (embodied by tradeoff $\eta$), but it also has a stronger learning performance, comparing with another learning algorithm, i.e., linUCB. \item With $\eta$ becoming bigger, NAFA's, linUCB's, and SW's average rewards approach to 0 while other rule-based algorithms (i.e., WF and BF) reduce to a negative number. Our explanation for this phenomenon is that when $\eta$ is set to a sufficiently high value, the penalty brought by processing time has exceeded the real rewards brought by accepting a request (see our definition of rewards in Eq.(\ref{reward})). As such, accepting a request which takes too much time to process, is no longer a beneficial action for this extreme tradeoff setting, so both NAFA and linUCB learn to only accept a small portion of requests (perhaps those with smaller data size) and only acquire a slightly positive reward. {\color{black} The prophetic algorithm SW is given extra rewards information in the future, so it can also adaptively adjust its decision based on changing $\eta$. But the algorithm still cannot receive the largest rewards since it cannot see through the whole training process (i.e., $M$ cannot be large enough to cover the whole training process). Even though we allow $M$ to be large enough (i.e., give it unconstrained future information), its computation complexity may explode if using deep search to iterate all the action combinations). } \end{itemize} \subsubsection{Processing Time vs. Rejection Ratio} \begin{figure}[!hbtp] \centering \includegraphics[ width=3.5in]{pic/latency_fix_lambda.pdf} \caption{\color{black}Processing time vs. rejection ratio when fixing $\lambda_r=30$. NAFA-\textbf{number}, SW-\textbf{number} and linUCB-\textbf{number} are used to denote different values of $\eta$ setting for different algorithms. } \label{latency_fix_lambda} \end{figure} Recall that the reward is exactly composed of two parts: real reward of accepting a request, and a penalty of processing time. To draw a clearer picture of these two parts, we show in Fig. \ref{latency_fix_lambda} how different algorithms (and in a different setting of $\eta$) perform in terms of processing time and rejection ratio when fixing $\lambda_r=30$. Intuitively, we derive the following observations: \begin{itemize} \item Comparing BF with WF, BF leads to a higher average processing time, but meanwhile, a lower average rejection ratio is also observed. This phenomenon is wholly comprehensible if considering the working pattern of BF and WF. BF tends to schedule the incoming request to a lower processing frequency in an attempt to conserve energy for future use. This conserved action might lead to a higher average processing time. But at the same time, it is supposed to have a lower rejection ratio when the power supply is limited (e.g. at nights). By contrast, WF might experience more rejection due to power shortage at this time, as a result of its prodigal manner. \item With a larger tradeoff $\eta$, NAFA, linUCB and SW all experiences a drop in terms of processing latency, but a rise in the rejection ratio is also observed. It again corroborates that the tradeoff parameter $\eta$ defined in rewards is functioning well, meeting the original design purpose. In this way, operators should be able to adaptively adjust the algorithm's performance based on their own appetites towards the two objectives. \item NAFA-0, NAFA-1, and NAFA-2 significantly outperform BF in terms of both the two objectives, i.e., smaller processing time and lower rejection ratio. Besides, NAFA-2 and NAFA-3 also outperform WF. Of the same tradeoff parameter, linUCB is outperformed by NAFA in terms of both the two objectives in most of the experiment groups. Finally, not an algorithm outperforms NAFA in both the objectives. These observations further justified the superiority of NAFA. \end{itemize} \subsubsection{Analysis of Request Treatment and Rejection Motivation} \begin{figure}[!htbp] \centering \includegraphics[ width=3.5in]{pic/composition_fix_lambda.pdf} \caption{\color{black}Composition of request treatment and rejection motivations for different algorithms when fixing $\lambda_r=30$. We assume the rejections is led by \textbf{full-reserved} when energy in the battery has mostly be reserved, so there is no action can be taken. Analogously, the requests are rejected by the \textbf{full-loaded} when all the free CPU cores are exhausted (in a rare case that the server is simultaneously full-loaded and full-reserved, we count it as full-reserved). Request rejected due to neither of the reasons will be counted as \textbf{conservation} purpose. } \label{fix arrival survey} \end{figure} \begin{table*}[!tbp] \caption{Experimental data under the setting of different tradeoff parameters $\eta$ and a fixed request arrival rate $\lambda_r=30$. {\color{black}Higher acceptance percentage, lower average processing time, and higher rewards are better. Reward is the ultimate goal that we like to evaluate in different settings.} The data of the highest acceptance, the lowest average processing time, and the highest average rewards among the same group of experiment have been highlighted. } \label{data fixing lambda} \centering {\color{black} \begin{tabular}{cccccccccc} \hline Tradeoff & Methods & \multicolumn{3}{c}{Percentage of Rejection Motivations} & \textbf{Acceptance} & \textbf{Average} & \textbf{Average} \\ \cline{3-5} & &Full-reserved & Full-loaded & Conservation & \textbf{Percentage} &\textbf{Processing time} & \textbf{Rewards} & \\ \hline \multirow{4}{*}{$\eta=0$} &BF & 0.06\%& 24.92\%& 0.00\%& 75.02\%& 0.333& 540.957\\ \cline{2-9} &WF& 25.40\%& 1.53\%& 0.00\%& 73.07\%& \textbf{0.165}& 526.897\\ \cline{2-9} &NAFA & 0.27\%& 8.05\%& 0.02\%& 91.65\%& 0.258& 660.853\\ \cline{2-9} &linUCB & 1.94\%& 9.23\%& 0.00\%& 88.83\%& 0.277& 640.520\\ \cline{2-9} &SW& 1.47\%& 6.50\%& 0.00\%& \textbf{92.03}\%& 0.260& \textbf{663.627}\\ \hline \hline \multirow{4}{*}{$\eta=2$} &BF& 0.06\%& 24.92\%& 0.00\%& 75.02\%& 0.333& 60.721\\ \cline{2-9} &WF & 25.40\%& 1.53\%& 0.00\%& 73.07\%& \textbf{0.165}& 288.581\\ \cline{2-9} & NAFA& 0.06\%& 0.78\%& 19.61\%& 79.56\%& 0.173& \textbf{324.494}\\ \cline{2-9} & linUCB& 20.51\%& 2.33\%& 1.31\%& 75.86\%& 0.183& 283.609\\ \cline{2-9} & SW& 15.27\%& 3.20\%& 0.00\%& \textbf{81.53}\%& 0.201& 297.731\\ \hline \hline \multirow{4}{*}{$\eta=4$} &BF& 0.06\%& 24.92\%& 0.00\%& \textbf{75.02\%}& 0.333& -419.514\\ \cline{2-9} &WF& 25.40\%& 1.53\%& 0.00\%& 73.07\%& 0.165& 50.266\\ \cline{2-9} &NAFA& 0.06\%& 0.01\%& 42.50\%& 57.44\%& 0.100& \textbf{124.661}\\ \cline{2-9} &linUCB& 0.06\%& 0.02\%& 46.83\%& 53.10\%& \textbf{0.095}& 109.064\\ \cline{2-9} &SW& 25.40\%& 1.53\%& 0.00\%& 73.07\%& 0.165& 50.266\\ \hline \hline \multirow{4}{*}{$\eta=6$} &BF& 0.06\%& 24.92\%& 0.00\%& \textbf{75.02}\%& 0.333& -899.750\\ \cline{2-9} &WF& 25.40\%& 1.53\%& 0.00\%& 73.07\%& 0.165& -188.050\\ \cline{2-9} &NAFA& 0.06\%& 0.00\%& 74.22\%& 25.73\%& \textbf{0.036}& \textbf{30.253}\\ \cline{2-9} &linUCB& 0.06\%& 0.00\%& 73.90\%& 26.04\%& 0.037& 29.594\\ \cline{2-9} &SW& 0.06\%& 0.00\%& 99.94\%& 0.00\%& 0.000& 0.000\\ \hline \hline \multirow{4}{*}{$\eta=8$} & BF& 0.06\%& 24.92\%& 0.00\%& \textbf{75.02}\%& 0.333& -1379.985\\ \cline{2-9} & WF& 25.40\%& 1.53\%& 0.00\%& 73.07\%& 0.165& -426.365\\ \cline{2-9} &NAFA& 0.06\%& 0.00\%& 93.58\%& 6.36\%& \textbf{0.008}& \textbf{2.503}\\ \cline{2-9} &linUCB& 0.06\%& 0.00\%& 91.49\%& 8.46\%& 0.010& 2.086\\ \cline{2-9} &SW& 0.06\%& 0.00\%& 99.94\%& 0.00\%& 0.000& 0.000\\ \hline \hline \end{tabular} } \end{table*} To have a closer inspection on the algorithms' performance and to explore the hidden motivation that leads to rejection, by Fig. \ref{fix arrival survey}, we show the composition of requests treatment while again fixing $\eta=30$. Based on the figure, the following observations follow: \begin{itemize} \item Most of the rejections of WF is caused by energy full-reserved while most of the rejections of BF is resulting from resource full-loaded. This phenomenon is in accordance with their respective behavioral pattern. BF, which is thrifty on energy usage, might experience too-long processing time, which in turn leads to unnecessary rejection when all the CPU cores are full (i.e., resource full-loaded). By contrast, a prodigal usage of energy might bring about energy full-reserved, as WF is experiencing. \item linUCB, NAFA and SW are able to balance the tradeoff between resource full-loaded and energy full-loaded, and thereby, resulting in an increase in the overall request acceptance ratio. \item With $\eta$ becoming larger, linUCB and NAFA both develop a conservation action pattern: some requests are deliberately rejected when no resource full-loaded or energy full-loaded is experiencing. There are two explanations for this pattern: the first is that a) penalty brought by processing latency exceeds the rewards brought by acceptance, even if the action with the highest frequency is taken. Then there is simply no benefit to accept such a request (typically is a request with a large data size). The second motivation is b) the algorithm learns to reject some specific requests (perhaps those larger ones) if the system is nearly full-loaded and full-reserved. Apparently, the conservation pattern that linUCB develops is mostly based on the first motivation, as it has no regard on the state transfer (or informally, the future), while NAFA should be able to learn both of the two motivations. In addition, corroborated by Fig. \ref{fix arrival rewards}, NAFA could indeed gain us more rewards and therefore substantiate the necessity of full consideration of both the two motivations. SW \end{itemize} To gain us a more accurate observation, we demonstrate the average request treatment data in Table \ref{data fixing lambda}. \subsubsection{Rewards vs. Request Arrival Rate} \begin{figure}[!hbtp] \centering \includegraphics[ width=3.5in]{pic/rewards_fix_tradeoff_0.pdf} \caption{\color{black} Average Rewards vs. Request Arrival Rate when fixing tradeoff parameter $\eta=0$ } \label{fix tradeoff=0 rewards} \end{figure} \begin{figure}[!hbtp] \centering \includegraphics[ width=3.5in]{pic/rewards_fix_tradeoff_3.pdf} \caption{\color{black} Average Rewards vs. Request Arrival Rate when fixing tradeoff parameter $\eta=3$ } \label{fix tradeoff=3 rewards} \end{figure} In this experiment, we fix the tradeoff parameter to $\eta=0$ and $\eta=3$, and see how the returned rewards evolve with the change of request arrival rate $\lambda_r$. By Fig. \ref{fix tradeoff=0 rewards}, we find that: \begin{itemize} \item Fixing tradeoff $\eta=0$, all the algorithms experience a rise in rewards with the growth of request arrival rate. This phenomenon is quite comprehensible since every single request brings positive rewards (a constant 1 when $\eta=0$) if being proper scheduled. \item However, the growth of WF and BF stagnates as the arrival rate becomes really big. By contrast, NAFA seems to continuously increase in the acquired rewards. By this observation, we see that the traditional rule-based algorithms apparently are incompetent of meeting the scheduling requirement when the system is in high-loaded status. \item linUCB experiences a drastic jitter under different request arrival rates. We speculate that this jitter is resulting from a constant reward achieved for every state (or context). When $\eta=0$, the algorithm simply reduces to a random selection since each action has exactly the same expected rewards for almost all the states (except those when the system is full-loaded or full-reserved). {\color{black} \item SW performs roughly the same with NAFA in the setting of $\eta = 0$. But when $\lambda_r = 35$ and $\lambda_r=40$, a better performance of NAFA is observed. } \end{itemize} By Fig. \ref{fix tradeoff=3 rewards}, we also find that, for $\eta=3$: \begin{itemize} \item BF gained a negative average reward. This is resulting from the excessively high processing time penalty if only employing the least processor frequency. \item NAFA again acquirs the highest average reward in all groups of experiments. \end{itemize} \subsubsection{Acceptance Ratio and Processing Time vs. Request Arrival Rate} \begin{figure}[!hbtp] \centering \includegraphics[ width=3.5in]{pic/acceptance_fix_tradeoff.pdf} \caption{\color{black}Average acceptance ratio vs. request arrival rate. NAFA-\textbf{Number}, SW-\textbf{Number} and linUCB-\textbf{Number} represent the algorithms trained in the setting of $\eta=$\textbf{Number}. } \label{acceptance_fix_tradeoff} \end{figure} \begin{figure}[!hbtp] \centering \includegraphics[ width=3.5in]{pic/latency_fix_tradeoff.pdf} \caption{\color{black} Average processing time vs. request arrival rate. NAFA-\textbf{Number}, SW-\textbf{Number} and linUCB-\textbf{Number} represent the algorithms trained in the setting of $\eta=$\textbf{Number}. } \label{latency_fix_tradeoff} \end{figure} To show the whole picture, we now demonstrate in Fig. \ref{acceptance_fix_tradeoff} and Fig. \ref{latency_fix_tradeoff} how the two objectives, i.e., acceptance ratio and processing time evolve with different request arrival rates. Based on the result, we give the following observations: \begin{itemize} \item Processing time of BF and WF shows little variation with request arrival rate. This phenomenon is intuitive since these rule-based methods are prone to schedule the same frequency to the incoming request (the largest one for WF and the smallest one for BF). \item Compared to WF, BF acquires a higher acceptance ratio when the request rate is relatively low, but WF surpasses BF when the request rate becomes greater. Obviously, this phenomenon seems to be telling us that when the request rate is sufficiently high, the system is more vulnerable to resource full-loaded than to energy full-reserved. \item NAFA-0 yields the largest acceptance ratio while NAFA-3 yields the smallest processing time, comparing to other baselines. This corroborates the effectiveness and high adaptiveness of NAFA. {\color{black} \item SW-0 acquires the second-largest acceptance ratio and linUCB acquires the second-smallest processing time. This substantiates some sort of adaptiveness of linUCB and SW, However, their performance could not match up with NAFA due to their "near-sighted" action pattern.} \end{itemize} \begin{table*}[!htbp] \caption{Experimental data under the setting of different request arrival rates $\lambda_r$, and a fixed tradeoff parameter $\eta=3$. {\color{black}Higher acceptance percentage, lower average processing time, and higher rewards are better. Reward is the ultimate goal we like to evaluate in different settings.} The data of the highest acceptance, the lowest average processing time and the highest average rewards among the same group of experiment have been highlighted. } \label{data with different request rate} \centering {\color{black} \begin{tabular}{cccccccc} \hline Request & Methods & \multicolumn{3}{c}{Percentage of Rejection Motivations} & \textbf{Acceptance} & \textbf{Average} & \textbf{Average} \\ \cline{3-5} Arrival Rate & & Full-reserved & Full-loaded & Conservation & \textbf{Percentage}&\textbf{Porcessing time} &\textbf{Rewards} \\ \hline \multirow{4}{*}{$\lambda_r=10$} &BF& 0.05\%& 0.01\%& 0.00\%& 99.85\%& 0.444& -79.897\\ \cline{2-8} &WF& 0.05\%& 0.00\%& 0.00\%& \textbf{99.95\%}& 0.222& \textbf{79.931}\\ \cline{2-8} &NAFA& 0.05\%& 0.00\%& 1.28\%& 98.67\%& 0.218& 79.907\\ \cline{2-8} &linUCB& 0.05\%& 0.00\%& 13.70\%& 86.25\%& \textbf{0.188}& 71.819\\ \cline{2-8} &SW& 0.05\%& 0.00\%& 0.00\%& \textbf{99.95}\%& 0.222& \textbf{79.931}\\ \hline \hline \multirow{4}{*}{$\lambda_r=20$} & BF& 0.05\%& 0.78\%& 0.00\%& \textbf{92.12\%}& 0.409& -147.452\\ \cline{2-8} & WF& 11.14\%& 0.01\%& 0.00\%& 88.75\%& 0.200& 138.410\\ \cline{2-8} &NAFA& 0.07\%& 0.01\%& 8.91\%& 90.97\%& 0.197& \textbf{152.735}\\ \cline{2-8} &linUCB& 0.05\%& 0.00\%& 23.90\%& 76.02\%& \textbf{0.162}& 132.316\\ \cline{2-8} &SW& 11.14\%& 0.01\%& 0.00\%& 88.75\%& 0.200& 138.410\\ \hline \hline \multirow{4}{*}{$\lambda_r=30$} &BF& 0.06\%& 2.49\%& 0.00\%& \textbf{75.02\%}& 0.333& -179.397\\ \cline{2-8} &WF& 25.40\%& 0.15\%& 0.00\%& 73.07\%& 0.165& 169.423\\ \cline{2-8} &NAFA& 0.06\%& 0.03\%& 25.12\%& 74.52\%& 0.151& \textbf{211.238}\\ \cline{2-8} &linUCB& 22.40\%& 0.08\%& 10.85\%& 65.93\%& \textbf{0.141}& 169.323\\ \cline{2-8} &SW& 25.40\%& 0.15\%& 0.00\%& 73.07\%& 0.165& 169.423\\ \hline \hline \multirow{4}{*}{$\lambda_r=40$} &BF& 0.05\%& 3.95\%& 0.00\%& 60.49\%& 0.269& -193.469\\ \cline{2-8} &WF& 31.57\%& 0.56\%& 0.00\%& 62.88\%& 0.143& 192.471\\ \cline{2-8} &NAFA& 0.99\%& 0.14\%& 31.34\%& \textbf{66.26\%}& 0.133& \textbf{254.438}\\ \cline{2-8} &linUCB& 29.23\%& 0.37\%& 9.13\%& 57.97\%& \textbf{0.125}& 196.661\\ \cline{2-8} &SW& 31.57\%& 0.56\%& 0.00\%& 62.88\%& 0.143& 192.471\\ \hline \hline \multirow{4}{*}{$\lambda_r=50$} &BF& 0.06\%& 4.99\%& 0.00\%& 50.04\%& 0.222& -199.659\\ \cline{2-8} &WF& 34.62\%& 1.08\%& 0.00\%& 54.57\%& 0.124& 207.774\\ \cline{2-8} &NAFA& 1.95\%& 0.28\%& 36.46\%& \textbf{58.82\%}& 0.118& \textbf{279.897}\\ \cline{2-8} &linUCB& 32.58\%& 0.80\%& 8.57\%& 50.81\%& \textbf{0.110}& 215.257\\ \cline{2-8} &SW& 34.53\%& 1.08\%& 0.08\%& 54.58\%& 0.124& 207.791\\ \hline \hline \multirow{4}{*}{$\lambda_r=60$} &BF& 0.05\%& 5.75\%& 0.00\%& 42.49\%& 0.189& -203.620\\ \cline{2-8} &WF& 36.31\%& 1.60\%& 0.00\%& 47.65\%& 0.109& 216.563\\ \cline{2-8} &NAFA& 1.66\%& 0.23\%& 45.38\%& \textbf{50.62\%}& \textbf{0.096}& \textbf{316.105}\\ \cline{2-8} &linUCB& 35.18\%& 1.30\%& 8.39\%& 43.47\%& 0.103& 223.750\\ \cline{2-8} &SW& 36.13\%& 1.60\%& 0.17\%& 47.66\%& 0.109& 216.574\\ \hline \end{tabular} } \end{table*} To enable an accurate observation, we demonstrate in Table \ref{data with different request rate} our experimental data given different request arrival rate and a fixed tradeoff parameter $\eta=3$. \section{Conclusion and Future Prospect} In this paper, we have studied an adaptive frequency adjustment problem in the scenario of intermittent energy supplied MEC. Concerning multiple tradeoffs persisted in the formulated problem, we propose a deep reinforcement learning-based solution termed NAFA for problem-solving. By our real solar data-based experiments, we substantiate the adaptiveness and superiority of NAFA, which drastically outperforms other baselines in terms of acquired reward under different tradeoff settings. \par For a potential extension of our proposed solution, we are particularly interested in a more advanced technique, known as Federated Learning (FL, \cite{mcmahan2016communication}). FL allows multiple servers to collectively train a Deep Q network, while do not necessarily need to expose their private data to a centralized entity. This novel training paradigm is pretty advantageous over our extensions from the single-server to the multi-servers scenario: we might gain access to request and energy arrival patterns from different servers (perhaps in different venues and owned by different operators) without knowing its training data. {\color{black}Another interesting direction for extension to the multi-servers scenario is to employ meta reinforcement learning (e.g., \cite{qu2021dmro}). By learning properly initialized weights of models for different servers, the reinforcement learning process on different servers might be further accelerated. } \ifCLASSOPTIONcaptionsoff \newpage \fi \section{Introduction} \subsection{Background and Motivations} \IEEEPARstart{L}{ately}, Mobile Edge Computing (MEC) has emerged as a powerful computing paradigm for the future Internet of Things (IoTs) scenarios. MEC servers are mostly deployed in proximity to the users, with the merits of seamless coverage and extremely low communication latency to the users. Also, the MEC servers are light-weight, enabling their potential large-scale application in various scenarios. \par Despite an attractive prospect, two crucial issues might be encountered by the real application: \begin{enumerate} \item The large-scale deployment of grid-power MEC servers has almost exhausted the existing energy resource and resulted in an enormous carbon footprint. This in essence goes against the green computing initiative. \item With millions or billions of small servers deployed amid every corner of the city, some of the locations could be quite unaccommodating for the construction of grid power facility, and even for those in a good condition, the construction and operation overhead of the power facility alone should not be taken lightly. \end{enumerate} \par With these two challenges encountered during the large-scale application of MEC, we initiate an alternative usage of \textit{intermittent energy supply}. These supplies could be \textit{solar power}, \textit{wind power} or \textit{wireless power}, etc. Amid these alternatives, renewable energy, such as solar power and wind power, could elegantly address both the two concerns. The wireless power still breaches the green computing initiative, but can at least save the construction and operation cost of a complete grid power system for all the computing units. \par However, all of these intermittent energy supplies reveal a nature of unreliability: power has to be stored in a battery with limited capacity for future use, and this limited energy is clearly incapable of handling all the workloads when mass requests are submitted. With this concern, servers have two potential options to accommodate the increasing workloads: \begin{enumerate} \item They directly reject some of the requests (perhaps those require greater computation), in a bid to save energy for the subsequent requests. \item They lower the processing frequency of their cores to save energy and accommodate the increasing workloads. Nevertheless, this way does not come without a cost: each request might suffer a prolonged processing time. \end{enumerate} \par These heuristic ideas of energy conservation elicit the problem we are discussing in this paper. We are particularly interested in the potential request treatment (i.e., should we reject an incoming request, and if not, how should we schedule the processing frequency for it) and their consequent effects on the overall system performance. \par The problem could become even more sophisticated if regarding the unknown and non-stationary request arrival and energy harvest pattern. Traditional rule-based methods clearly are incompetent in this volatile context: as a result of their inflexibility, even though they might work in a particular setting (a specific arrival pattern, for example), they may not work equally well if in a completely different environment. \par Being motivated, we shall design a both effective and adaptive solution that is able to cope with the uncertainty brought by the energy supply and request pattern. Moreover, the solution should be highly programmable, allowing custom design based on the operators' expectations towards different performance metrics. \par \subsection{Contributions } The major contributions of our work are presented in the following: \begin{enumerate} \item We have analyzed the real working procedure of an intermittent-energy-driven MEC system, based on which, we propose an event-driven schedule scheme, which is deemed much matching with the working pattern of this system. \item Moreover, we propose an energy reservation mechanism to accommodate the event-driven feature. This mechanism is novel and has not been available in other sources, to our best knowledge. \item Based on the proposed scheduling mechanism, we have formulated an optimization problem, which basically covers a few necessary system constraints and two main objectives: cumulative processing time and acceptance ratio. \item We propose a deep reinforcement learning-based solution, dubbed {\color{black} \textbf{N}eural network-based \textbf{A}daptive \textbf{F}requency \textbf{A}djustment} (NAFA), to optimize the joint request treatment and frequency adjustment action. \item We do the experiments based on real solar data. By our experimental results, we substantiate the effectiveness and adaptiveness of our proposed solutions. In addition to the general results, we also develop a profound analysis of the working pattern of different solutions. \end{enumerate} \par To the best knowledge of the authors, our main focus on event-driven scheduling for an intermittent energy-supplied system has not been presented in other sources. Also, our proposed solution happens to be the first trackable deep reinforcement learning solution to an SMDP model. It has the potential to be applied to other network systems that follow a similar event-driven working pattern. In this regard, we consider our novel work as a major contribution to the field. \section{Related Work} \subsection{Edge intelligence} {\color{black} Artificial intelligence (AI) have been broadly studied thanks to their unlimited potential in image classification, natural language processing, and scheduling (e.g. \cite{huang2020ant}, \cite{wu2020collaborate}). To further boost the performance of AI, some literature has proposed MEC-combined solutions. Khan et al. in \cite{khan2019deep} proposed a deep unified model for Face Recognition, and further integrated the model into the edge computing system. Experimental results show that such a combination significantly reduces data latency of processing the needed data and increases the real-time response. Another interesting direction is to boost the performance of edge intelligent systems by a secure data-shared algorithm. To illustrate, Feng et al. in \cite{feng2020attribute} proposed an Attribute-Based Encryption (ABE) parallel outsourced decryption for edge intelligent Internet of Vehicles (IoV). The parallel design increases decryption speed in the resource-constrained IoV context while maintaining the same security compared with the original ABE scheme. In another recent work \cite{yang2019efficient}, targetting the edge artificial intelligence scenario, Yang et al. proposed a multi pedestrian tracking method based on the rank constraint. Their proposed method is beneficial to eliminate ambiguous detection responses during association, and further increases the tracking performance in the intelligence edge device. \par } {\color{black} \subsection{Reinforcement learning and its application in edge} Reinforcement learning is another key technique that was frequently applied into the scheduling problems persisted in an edge-computing system. This particular technique usually bases upon two main genres of models, i.e., Markov Decision Process (MDP), and Semi Markov Decision Process (SMDP). \subsubsection{MDP-based reinforcement learning} \par Refs.\cite{chen_performance_2018,wei_dynamic_2019,min_learning-based_2019,xu2019optimized} are typical examples of edge Markov Decision Process (MDP) based reinforcement learning techniques that is applied into the scheduling problem in edge.} Specifically, in \cite{chen_performance_2018}, Chen \textit{et al.} combined the technique of Deep Q Network (DQN) with a multi-object computation offloading scenario. By maintaining a neural network inside its memory, the {\color{black}Mobile User} (MU) is enabled to intelligently select an offloading object among the accessible base stations. Wei \textit{et al.} in \cite{wei_dynamic_2019} introduced a reinforcement learning algorithm to address the offloading problem in the IoT scenario, based on which, they further proposed a value function approximation method in an attempt to accelerate the learning speed. In \cite{min_learning-based_2019}, Min \textit{et al.} further considered the privacy factors in healthcare IoT offloading scenarios and proposed a reinforcement learning-based scheme for a privacy-ensured data offloading. \par {\color{black} The above works are all based on MDP, which means that their action scheduling is performed periodically based on a fixed time interval. However, in the real scenario, the workflow of an agent (server or MU) is usually event-driven, and requires prompt scheduling response. A more reasonable setting is that the agent could promptly make the scheduling and perform actions once an event has occurred (e.g. a request arrives) but not wait until a fixed periodicity is met.} \subsubsection{Event-Driven SMDP-based reinforcement learning } \par Unlike the conventional MDP model, for an SMDP model, the time interval between two sequential actions does not necessarily need to be the same. As such, it is super matching for an event-triggered schedule, like the one we need for the requests scheduling. \par SMDP is a powerful modeling tool that has been applied to many fields, such as wireless networks, operation management, etc. In \cite{zheng_smdp-based_2015}, Zheng \textit{et al.} first applied SMDP in the scenario of vehicular cloud computing systems. A discounted reward is adopted in their system model, based on which, the authors further proposed a value iteration method to derive the optimal policy. In \cite{baljon_smdp-based_2017}, SMDP is first applied to energy harvesting wireless networks. For problem-solving, the authors adopted a model-based policy iteration method. However, the model-based solution proposed in the above work can not address the problem when the state transition probability is unknown, and in addition, it cannot deal with the well-known curse-of-dimensionality issue. \par To fix the gap, based on an SMDP model that is exclusively designed for a {\color{black} Narrow Band Internet of Things (NB-IOT)} Edge Computing System, Lei \textit{et al.} in \cite{lei_joint_2019} further proposed a reinforcement learning-based algorithm. However, the proposed algorithm is still too restricted and cannot be applied in our current studied problems, since several assumptions (e.g., exponential sojourn time between events) must be made in advance. Normally, these assumptions are inevitable for the derivation of state-value or policy-value estimation in an SMDP model, but unfortunately, could be the main culprit leading to great divergence between theory and reality. This potential drawback inspires us to \textbf{jettison all the assumptions} typically presented in an SMDP formulation in our research.\par \subsection{DVFS and its optimization} {\color{black} Dynamic Voltage and Frequency Scaling (DVFS) is a technique to adjust the frequency of a micro-processor, and is widely employed in cloud and edge to achieve energy conservation of computing. In the cloud, Wu et al. \cite{wu2019power} designed a scheduling algorithm for the cloud datacenter with the DVFS technique. Their proposed method efficiently assigns proper resources to jobs according to their requirements, and the authors claim that their approach, while efficiently reduces the energy consumption of a data center, does not sacrifice the system performance. In an edge environment, Dinh et al. in \cite{dinh2017offloading} jointly optimize the task allocation decision and its CPU frequency. By exploiting these benefits brought by proper allocation decisions and CPU frequency, the mobile device's energy consumption could be lower, while the task latency performance can be improved. The above works rely on frequency adjustment in the dimension of the task. Another study \cite{ajirlou2020machine2} has considered adaptive frequency adjustment at the instruction level. Essentially, they proposed to classify individual instruction into the corresponding propagation delay classes in real-time, and the clock frequency is accordingly adjusted to reduce the gap between the actual propagation delay and the clock period, and thereby reaping the benefits of dynamic frequency adjustment. The instruction-level optimization is also studied by an earlier work \cite{zhang2017bandits2}. Their main motivation is that the timing speculation (i.e., frequency) has a sweet spot for each instruction. Too much timing speculation (i.e., higher frequency, or too aggressive acceleration) could increase timing error probability, which may inversely hurt the performance. To find the sweet spot, a bandit algorithm is proposed to balance exploration and exploitation. \par In this work, we will focus on the task/job level optimization of the dynamic frequency, while leaving the instruction-level optimization a future work. } \section{Problem Formulation} \label{Problem Formulation} \subsection{System Overview} \begin{figure*}[!t] \centering \includegraphics[width=6.5in]{pic/system_architecture.pdf} \caption{System architecture for an intermittent-energy-supplied MEC system.} \end{figure*} In this paper, we target the optimization problem in a multi-users single-server MEC system that is driven by intermittent energy supply (e.g., renewable energy, wireless charging). As depicted in Fig. 1, multiple central processing units (CPUs) and a limited-capacity battery, together with communication and energy harvesting modules, physically constitute an MEC server. Our proposed MEC system makes scheduling on requests following an event-driven workflow, i.e., our request scheduling process is evoked immediately once a request is collected. {\color{black} Our solution is different from the general batch-scheduling methods, which would require the requests to wait in a queue until the scheduler evokes (either periodically or until a sufficient number of requests are queued). Compared to batch-scheduling, event-driven scheduling could make a faster response on the incoming request, and therefore could ensure a higher quality of service. But we admit that since more information could be gathered when requests are scheduled in batch, better performance of batch scheduling may be gained in return. } Formally, the proposed event-driven process can be specified by the following steps: \begin{enumerate} \item Collect the request and check the current system status, e.g., battery and energy reservation status and CPU core status. \item Do schedule to the incoming request based on its characteristic and current system status. Explicitly, the scheduler is supposed to make the following decisions: \begin{enumerate} \item Decide whether to accept the request or not. \item If accepted, decide the \textit{processing frequency} of the request. We refer to \textit{processing frequency} as the frequency that a CPU core might turn to while processing this particular request. The scheduler should not choose the frequency that might potentially \textit{over-reserve} the currently available energy or \textit{over-load} the available cores. \end {enumerate} \item Do energy reservation for the request based on the decided frequency. A CPU core cannot use more than the reserved energy to process this request. \item The request is scheduled to the corresponding CPU core and start processing. \end{enumerate}\par Given that the system we study is \textbf{not} powered by reliable energy supply (e.g., coal power), a careful plan of the available energy is supposed to be made in order to promote the system performance. \subsection{Formal Statement} \begin{table}[!t] \caption{Key notations for problem formulation} \label{table notations} \centering \begin{tabular}{cc } \hline Notations & Meanings \\ \hline $a_i$ & action scheduled for the $i$-th request \\ $f_n$ & $n$-th processing frequency option (GHz) \\ $d_i$ & data size of the $i$-th request (bits) \\ $\nu$ & computation complexity per bit \\ $\kappa$ & effective switched capacitance \\ $m$ & number of CPU cores \\ $\tau_{a_i}$ & processing time of the $i$-th request \\ $e_{a_i}$ & energy consumption of the $i$-th request \\ $B_{i}$ & battery status when $i$-th request arrives \\ $B_{max}$ & maximum battery capacity \\ \multirow{2}{*}{$\lambda_{i,i+1}$/$\rho_{i,i+1}$} & captured/consumed energy between \\ & arrivals of the $i$-th and $(i+1)$-th request\\ $S_{i}$ & reserved energy when $i$-th request arrives\\ \multirow{2}{*}{$\Psi_i$} & number of working CPU cores \\ &when the $i$-th request arrives\\ $\eta$ & tradeoff parameter\\ \hline \end{tabular} \end{table} In this subsection, we shall formally introduce the optimization problem by rigorous mathematics formulation (key notations and their meanings are given in Table \ref{table notations}). We consider the optimization problem for an MEC server with $m$ CPU cores, all of whose frequency can be adaptively adjusted via Dynamic Voltage and Frequency Scaling (DVFS) technique. Then we first specify the {\color{black}action} for the optimization problem. \subsubsection{Action} The decision (or action) in this system specifies the treatment of the incoming request. Explicitly, it specifies 1) whether to accept the request or not, 2) the processing frequency of the request. Formally, let $i$ index an incoming request by its arrival order. The action for the $i$-th request is denoted by $a_i$. Explicitly, we note that: \begin{itemize} \item $a_i \in \left\{0, 1,\dots,n \right \}$ denotes the action index of the CPU frequency at which the request is scheduled, where $n$ represents the maximum index (or total potential options) for frequency adjustment. For option $n$, $f_n$ GHz frequency will be scheduled to the request. \item Specially, when $a_i=0 $, the request will be rejected immediately. \end{itemize} \subsubsection{ Processing Time and Energy Consumption } The action we take might have a direct influence on the request \textit{processing time}, which can be specified by: \begin{align} \label{processing time} \begin{split} \tau_{a_i}&=\begin{cases} \frac{ \nu \cdot d_i }{ f_{a_i}} & a_i \in \{ 1, \dots,n \} \\ 0 & a_i=0 \end{cases} \end{split} \end{align} where we denote $d_i$ as the processing data size of an offloading request, $\nu$ as the required CPU cycles for computing one bit of the offloading data. Without loss of generality, we assume $d_i$, i.e., processing data size, as a stochastic variable while regarding $\nu$, i.e., required CPU cycles per bit, fixed for all requests. \par Also, by specifying the processing frequency, we can derive the \textit{energy consumption} for processing the request, which can be given as: \begin{align} \label{energy consumption} \begin{split} e_{a_i}= \begin{cases} \kappa f_{a_i}^2 \cdot \nu \cdot d_i & a_i \in \{ 1,\dots,n \} \\ 0 & a_i=0\end{cases} \end{split} \end{align} where we denote $\kappa$ as the effective switched capacitance of the CPUs. \subsubsection{Battery Status} Recall that the MEC server is driven by intermittent energy supply, which indicates that the server has to store the captured energy in its battery for future use. Concretely, we shall introduce a virtual queue, which serves as a measurement of the server's current battery status. Formally, we let a virtual queue, whose backlog is denoted by $B_i$, to capture the energy status when the $i$-th request arrives. $B_i$ evolves following this rule: \begin{equation} \label{battery status} B_{i+1}=\min \left \{B_{i}+ \lambda_{i,i+1}- \rho_{i,i+1} , B_{max} \right\} \end{equation} Here, \begin{enumerate} \item $\lambda_{i,i+1}$ represents the amount of energy that was captured by the server between the arrivals of the $i$-th and $(i+1)$-th request. \item $\rho_{i,i+1}$ is the consumed energy during the same interval. It is notable that the consumed energy i.e., $\rho_{i,i+1}$, is highly related to the frequency of the current running cores, due to which, is also relevant to the past \textit{actions}, regarding the fact that it is the past actions that determine the frequency of the current running cores. \item $B_{max}$ is the maximum capacity of the battery. we use this value to cap the battery status since the maximum energy status could not exceed the full capacity of the server's battery. \end{enumerate} \subsubsection{Energy Reservation Status} Upon receiving each of the coming requests, we shall reserve the corresponding amount of energy for which so that the server could have enough energy to finish this request. This reservation mechanism is essential in maintaining the stability of our proposed system. \par To be specific, we first have to construct a virtual queue to record the \textit{energy reservation status}. The energy reservation queue, with backlog $S_i$, evolves between request arrivals following this rule: \begin{equation} \label{energy reservation status} S_{i+1}= \max \left \{S_{i}+ e_{a_i} - \rho_{i,i+1} ,0 \right \} \end{equation} where $\rho_{i,i+1}$ is the consumed energy (same definition in Eq. (\ref{battery status})) and $e_{a_i}$ is the energy consumption for the $i$-th request (same definition in Eq. (\ref{energy consumption})). By this means, $S_{i+1}$ exactly measures how much energy has been reserved by the {\color{black} first} to the $i$-th request \footnote{Some may wonder the rationale behind the subtraction of $\rho_{i,i+1}$. Considering the case that in a specific timestamp (e.g., the timestamp that the $i$-th request arrives), the processing of a past request (e.g., the $(i-1)$-th request) could be unfinished, but have already consumed some of the reservation energy. Then, the reservation energy for it should subtract the already consumed part.}. \par \subsubsection{Energy Constraint} By maintaining the \textit{energy reservation status}, we can specify \textit{energy constraint} to control the action when the energy has already been full-reserved. The constraint can be given as follows: \begin{equation} S_{i}+ e_{a_i} \leq B_{i} \end{equation} By this constraint, we ensure that the request has to be rejected if not enough energy (that has not been reserved) is available. \subsubsection{Resource Constraint} Recall that we assume a total number of $m$ CPU cores are available for request processing. When the computation resources have already been full-loaded, the system has no option but to reject the arrived requests. So, we introduce the following constraint: \begin{equation} \label{resource constraint} \Psi_i+ \mathbb{I}\{a_i \neq 0\} \leq m \end{equation} where $\Psi_i$ denotes the number of currently working CPU cores. By this constraint, we ensure that the server could not be overloaded by the accepted request. \subsubsection{Optimization Problem} Now we shall formally introduce the problem that we aim to optimize, which is given as follows: \begin{equation} \begin{split} \textit{ (P1)} & \quad \textbf{Obj1:} \quad \min_{\{a_i\}} \sum_{i=1}^{\infty} \tau_{a_i} \quad \\ & \quad \textbf{Obj2:} \quad \max_{\{a_i\}} \sum_{i=1}^{\infty} \mathbb{I}\{a_i \neq 0\} \\ &\quad\textbf{C1:} \quad S_{i}+ e_{a_i} \leq B_{i} \\ & \quad \textbf{C2:} \quad \Psi_i+ \mathbb{I}\{a_i \neq 0\} \leq m \end{split} \end{equation} \par There are two objectives that we need to consider in this problem: 1) the first objective is the cumulative \textit{processing time} of the system, 2) and the second objective is the cumulative \textit{acceptance}. Besides, two constraints, i.e., \textit{Energy Constraint} and \textit{Resource Constraint}, have been covered in our system constraints. \par Obviously, \textit{P1} is unsolvable due to the following facts: \begin{itemize} \item \textbf{Existence of stochastic variables.} Stochastic variables, e.g., $d_{i}$ (data size of requests), $\lambda_{i,i+1}$ (energy supplied) and request arrival rate, persist in \textit{P1}. \item \textbf{Multi-objective quantification.} The two objectives considered in our problem are mutually exclusive and there is not an explicit quantification between them. \end{itemize} To bridge the gap, we 1) set up a tradeoff parameter to balance the two objectives and transform the problem into a single objective optimization problem, 2) transform the objective function into an expected form. This leads to our newly formulated \textit{P2}: \begin{equation} \begin{split} \label{P2} \textit{ (P2)} &\quad \quad \max_{\{a_i\}} \sum_{i=1}^{\infty} \mathbb{E} \left[ \mathbb{I}\{a_i \neq 0\}-\eta \tau_{a_i} \right] \\ &\quad\textbf{C1:} \quad S_{i}+ e_{a_i} \leq B_{i} \\ & \quad \textbf{C2:} \quad \Psi_i+ \mathbb{I}\{a_i \neq 0\} \leq m \end{split} \end{equation} where $\eta$ serves as the tradeoff parameter to balance cumulative \textit{acceptance} and cumulative \textit{ processing time}. \textit{P2} is more concrete after the transformation, but still, we encounter the following challenges when solving \textit{P2}: \begin{itemize} \item \textbf{Exact constraints.} Both C1 and C2 are exact constraints that should be strictly restricted for each request. This completely precludes the possibility of applying an offline deterministic policy to solve the problem, noticing that $B_i$, $S_i$ in C1 and $\Phi_i$ in C2 are all stochastic for each request. \item \textbf{Unknown and non-stationary supplied pattern of energy.} The supplied pattern of intermittent energy is highly discrepant, varying from place to place and hour to hour\footnote{Considering the energy harvest pattern of solar power. We have a significant difference in harvest magnitude between day and night.}. As such, the stochastic process $\lambda_{i,i+1}$ in Eq. (\ref{battery status}) may not be stationary, i.e., $\lambda_{i,i+1}$ samples from an ever-changing stochastic distribution that is relevant with request order $i$, and moreover, it is unknown to the scheduler. \item \textbf{Unknown and non-stationary arrival pattern.} The arrival pattern of the request's data size is unknown to the system, and also, could be highly discrepant at temporal scales. \item\textbf{Unknown stochastic distribution of requests' data size.} The processing data size could vary between requests and its distribution is typically unknown to the scheduler. \item \textbf{Coupling effects of actions between requests.} The past actions towards an earlier request might have a direct effect on the later scheduling process (see the evolvement of $S_{i}$ and $B_i$) \end{itemize} Regarding the above challenges, we have to resort to an online optimization solution for problem-solving. The solution is expected to learn the stochastic pattern from the historical knowledge, and meanwhile, can strictly comply with the system constraint. \par {\color{black} \subsection{Connection Between Our Problem and Knapsack} Our defined problem can be viewed in a classical knapsack view. The key problem of the knapsack is that: if we have $N$ items (indexed by $i$) with a value $v_i$ and a weight $w_i$, which subset of items should we put into a knapsack with capacity $B$, such that the total value of collected items maximized? If we view a request as an item, the energy consumption of processing it as weight, the reward of accepting it as value, and the available energy as knapsack capacity, our problem can be viewed as an extension of the knapsack problem. But the key difference is that: \begin{itemize} \item The item list is not finite and fixed. The item (request) arrives across the timeline with the unknown pattern of weights (energy consumption) and values (rewards). Before a request’s arrival, the scheduler can not access the request's value and weight. In addition, the scheduler is supposed to make the decision once a request arrives. \item The knapsack capacity (available energy) is growing across the timeline since the server continuously harvests energy. Also, how much energy will be harvested in the future is unknown to the scheduler. \item There is another constraint other than the available energy constraint. The number of requests that can be simultaneously hosted by the server is constrained (See Eq. (6)). \item The action space is no longer 0-1, as in the original knapsack problem. The action space of our problem includes whether to accept the request, as well as the processing frequency of it. \end{itemize} The main deviation between our problem and knapsack is caused by the event-driven scheduling. The scheduler should make a prompt decision once an item (request) arrives but is not allowed to make the decision after receiving a batch of requests. In terms of the batch-scheduling case, if the batch size is sufficiently large, the problem can be reduced to a knapsack problem with finite action set and multiple knapsack capacity (i.e., multiple constraints). However, when using event-driven scheduling (do scheduling once a request arrives), this reduction may not hold. } \section {Deep Reinforcement Learning-Based Solution} \subsection{Formulation of a Semi-Markov Decision Process} To develop our reinforcement learning solution, we shall first transform the problem into an \textit{Semi-Markov Decision Process} (SMDP) formulation. In our SMDP formulation, we assume the system \textit{state} as the system running status when a request has come, or when the scheduler is supposed to take \textit{action}. After an action being taken by the scheduler, a \textit{reward} would be achieved, and the state (or system status) correspondingly transfers. It follows an \textit{event-driven} process, that is, the scheduler decides the action once a request has come but does nothing while awaiting. And as a result, the time interval between two sequential actions may not be the same. This is the core characteristic of an SMDP model and is the major difference from a normal MDP model. \par Now we shall specify the three principal elements (i.e., states, action, and rewards) in our SMDP formulation in sequence, and please note that most of the notations we used henceforth are consistent with those in Section \ref{Problem Formulation}. \subsubsection{System States} A system state is given as a tuple: \begin{equation} \label{state formulation} s_i \triangleq \{ T_i, B_i, S_i, \psi_{i,1} \dots, \psi_{i,n}, d_i \} \end{equation} Explicitly, \begin{itemize} \item $T_i$ is the \textbf{24-hour-scale local time} when the $i-$th request arrives in the MEC server. We incorporate this element in our state in order to accommodate the temporal factor that persists in the energy and request pattern. \item $B_i$ is the \textbf{battery status}, same as we specify in Eq. (\ref{battery status}). \item $S_i$ is the \textbf{energy reservation status}, same as we specify in Eq. (\ref{energy reservation status}). \item $\psi_{i,n}$ denotes the\textbf{ running CPU cores in the frequency of $f_n$ GHz}. Meanwhile, it is intuitive to see that $\Psi_i= \sum_{n^{\prime}=1}^n\psi_{i,n}$ where $\Psi_i$ is the total running cores we specify in Eq. (\ref{resource constraint}). \item $d_i$ is the \textbf{data size} of the $i$-th request. \end{itemize} Information captured by a state could be comprehended as the current system status that might support the action scheduling of the incoming $i$-th request. More explicitly, we argue that the formulated states should at least cover the system status that helps construct a \textit{possible action set}, but could cover more types of informative knowledge to support the decision (e.g., $T_i$ in our current formulation, which will be formally analyzed later). The concept of \textit{possible action set} would be given in our explanation of \textit{system actions}. \subsubsection{System Actions} \label{action set} Once a request arrives, given the current state (i.e., the observed system status), the scheduler is supposed to take action, deciding the treatment of the request. Indicated by the system constraints C1 and C2 in \textit{P2}, we are supposed to make a restriction on the to-be taken action. By specifying the states (or observing the system status), it is not difficult to find that we can indeed get a closed-form possible action set, as follows: \begin{equation} a_i \in \mathcal{A}_{s_i} \triangleq \{ a | \Psi_i+ \mathbb{I}\{a \neq 0\} \leq m, S_{i}+ e_{a} \leq B_{i} \} \end{equation} where $\Psi_i$, $B_{i}$ and $S_i$ are all covered in our state formulation. By taken action from the defined possible action set, we address challenge 1) \textbf{exact constraints}, that we specify in \textit{P2}. \subsubsection{System Rewards} Given state and action, a system reward will be incurred, in the following form: \begin{equation} \label{reward} r(s_i,a_i)= \mathbb{I}\{a_i \neq 0\}- \eta \tau_{a_i} \end{equation} The reward of different treatments of a request is consistent with our objective formulation in \textit{P2} (see Eq. (\ref{P2})). The goal of our MDP formulation is to maximize the expected achieved rewards, which means that we aim to maximize $ \sum_{i=1}^{\infty} \mathbb{E} \left[ \mathbb{I}\{a_i \neq 0\}- \eta \tau_{a_i} \right]$, the same form with the objective in \textit{P2}. Besides, here we can informally regard $\mathbb{I}\{a_i \neq 0\}$ as a "real reward" of accepting a request and $\tau_{a_i}$ as the "penalty" of processing a request. \subsubsection{State Transferred Probability} After an action being taken, the state will be transferred to another one when the next arrival of the request occurs. The state transferred probability to a specific state is assumed to be \textit{stationary} given the current state, as well as the current action, i.e., we need to assume that: \begin{equation} \label{state transfer probability } p(s_{i+1} |s_i,a_i)= \text{a constant} \end{equation} \par This assumption is the core part in our MDP formulation, which is our main motivation to cover $T_i$ and $\psi_{i,1} \dots, \psi_{i,n}$ (rather than $\Psi_{i}$) in our state formulation. {\color{black} By this constant state transferred probability assumption, we are allowed to estimate the transferred probability, and thereby given a fighting chance to maximize the achieved rewards in an online fashion. To justify this assumption given our defined state formulation, we refer the readers to Appendix \ref{appendix A} for a detailed explanation. { \color{black} And to make the MDP formulation easier to grasp, we prepare a scheduling example, which has been moved to Appendix \ref{appendix B} due to the space limit. } } \par \par \subsection{State-Action Value Function} \label{old State-Action Value Function} Recall that our ultimate goal is to maximize the expected cumulative reward. For this purpose, we leverage Bellman optimality to find the optimal discounted state-action value, i.e., $Q_{\pi^*}(s,a)$, as follows: \begin{equation} \begin{split} \label{final iterate update function} &Q_{\pi^*}(s,a) = \mathbb{E}_{s^{\prime}} \left[ r(s,a)+ \beta \max_{a^{\prime} \in \mathcal{A}_{s^{\prime}}} Q_{\pi^*}(s^{\prime},a^{\prime}) \right] \end{split} \end{equation} where $\pi^*$ is the optimal policy under discounted formulation, and $\beta$ is the discounted factor. {\color{black} Detailed explanation about how to derive $Q_{\pi^*}(s,a)$ is available in Appendix \ref{Appendix C}.} This state-action value., i.e., $Q_{\pi^*}(s,a)$ indeed specifies the value of taking a specific action, which is basically composed of two parts: \begin{enumerate} \item The first part is the expected reward that is immediately obtained after actions have been taken, embodied by $\mathbb{E}[r(s,a)]$. \item The second part is the discounted future expected rewards after the action has been taken, embodied by $ \mathbb{E}[\beta \max_{a^{\prime} \in \mathcal{A}_{s^{\prime}}} Q_{\pi^*}(s^{\prime},a^{\prime})] $. This literally addresses challenge 5) \textbf{Coupling effects of actions between requests} we proposed below \textit{P2}. The coupling effects are in fact embodied by these discounted expected rewards: by taking a different action, the state might experience a different transfer probability and thereby making the future rewards being affected. By this MDP formulation, we are enabled to have a concrete model of this coupling effect to the future. \end{enumerate}\par Besides, specified by the proposed challenges below \textit{P2}, we know that both the energy and request arrival pattern, as well as the data size distribution, are all unknown to the scheduler, which means that it is hopeless to derive the closed-form $Q_{\pi^*}(s,a)$. More explicitly, since the state transferred probability $p(s^{\prime} |s,a)$ (or $p(s_{i+1} |s_i,a_i)$ in Eq. (\ref{state transfer probability })) is an unknown constant, we cannot expand the expectation in Eq. (\ref{final iterate update function}), making $Q_{\pi^*}(s,a)$ unachievable in an analytical way. Without knowledge of $Q_{\pi^*}(s,a)$, we are unable to fulfill our ultimate goal, i.e., to derive $\pi^*$. \par Fortunately, there still exists an alternative path to derive $Q_{\pi^*}(s,a)$. (Henceforth, we use $Q(s,a)$ to denote $Q_{\pi^*}(s,a)$ for sake of brevity). If we have sufficient amount of data over a specific state and action (captured by a set $X_{s,a}$), each piece of which shapes like this 4-element tuple: $x \triangleq (s, a, r(s,a) , s^{\prime})$, then we can optimize $Q(s,a)$ by minimizing the \textit{estimation error}, namely: \begin{equation} \begin{split} \label{estimate Q2} \frac{1}{|X|} \sum_{x \in X} \left[ Q(s,a)- \left( r(s,a)+ \beta \max_{a^{\prime} \in \mathcal{A}_{s^{\prime}}} Q(s^{\prime},a^{\prime}) \right) \right]^2 \end{split} \end{equation} where $X=X_{s_1,a_1} \cup \dots \cup X_{s_1,a_n} \cup \dots$ captures all the available data. In this way, we do not need prior knowledge about the transferred probability i.e., $p(s^{\prime} |s,a)$, but we learn it from the real state transferred data. This learning-based method completely resolves the \textbf{unknown distribution issues} we raised below \textit{P2}. \par However, due to \textbf{infinite amount of states} in our formulated problem, the problem is still intractable. We simply cannot iteratively achieve $Q(s,a)$ for every possible state-action pair, but at least, this initial idea points out a concrete direction that elicits our later double deep Q network solution. \subsection{A Double Deep Q Network Solution} In the previous section, we provide an initial idea about how to derive $Q(s,a)$ in a learning way. But we simply cannot record $Q(s,a)$ for each state due to the unbounded state space. This hidden issue motivates us to use a neural network to predict the optimal state-action value (abbreviated as \textit{Q value} henceforth). Explicitly, we input a specific state to the neural network and output the Q value for action $1$ to $n$. By this means, we do not need to record the Q value, but it is estimated based on the output after going through the neural network. \par Formally, the estimated Q value can be denoted by $Q\left(s, a ; \theta_{i}\right)$ where $\theta_{i}$ denotes the parameters of the neural network (termed Q network henceforth) after $i$ steps of training. And following the same idea we proposed before, we expect to minimize the estimation error (or \textit{loss} henceforth), in this form: \begin{equation} \begin{split} \label{Loss} &L_{i}\left(\theta_{i};\tilde{X}_{i}\right)\\ =&\frac{1}{|\tilde{X}_i|} \sum_{x \in \tilde{X}_i} \left[ Q(s,a; \theta_{i})- \left( r(s,a)+ \beta \max_{a^{\prime} \in \mathcal{A}_{s^{\prime}}} Q(s^{\prime},a^{\prime}; \theta_{i}) \right) \right]^2 \end{split} \end{equation} {\color{black} where, \begin{itemize} \item $x \triangleq (s, a, r(s,a) , s^{\prime})$ is a tuple that captures a piece of data (which includes state, action, reward and next states). \item $\tilde{X}_i$ is a sub-set of total available data when doing training for the $i$-th step, which is often referred to as \textit{mini-batch}. We introduce such a concept here since the data acquiring process is an online process. In other words, we do not have all the training data naturally, but we obtain it through continuous interaction (i.e., acting action) and continuous policy update. As a result of this continuous update of data, it is simply not "cost-effective" to involve all the historical data we currently have in every step of training. As a refinement, only a subset of the data, i.e., $\tilde{X}_i$, is involved in the loss back-propagating for each step of training. \item $|\tilde{X}_i|$ is the cardinality of mini-batch $\tilde{X}_i$. \item $\theta_{i} \in \mathbb{R}^d$ denotes the parameters of the Q network. \item $Q(s,a; \theta_{i})$ is the predicted Q value for action $a$ via feeding state $s$ to the Q network. \item $L_{i}\left(\theta_{i};\tilde{X}_{i}\right)$ is the loss function that we need to minimize by adjusting $\theta_{i}$ under mini-batch $\tilde{X}_i$. \item $\beta$ is the discounted factor. \end{itemize} } \par \begin{figure*}[!hbtp] \begin{equation} \begin{aligned} \label{double q Loss} &L_{i}\left(\theta_{i};\tilde{X}_{i}\right)=\frac{1}{|\tilde{X}_i|} \sum_{x \in \tilde{X}_i} \left[Q\left(s, a ; \theta_{i}\right)- \left(r(s,a) + \beta Q\left(s^{\prime}, \mathop{\arg\max} _{a^{\prime} \in \mathcal{A}_{s^{\prime}}}Q(s^{\prime},a^{\prime}; \theta_{i}); \theta_{i}^{-}\right) \right )\right]^{2} \end{aligned} \end{equation} {\color{black}where $\theta_{i} \in \mathbb{R}^d$ and $\theta_{i}^{-} \in \mathbb{R}^d$ respectively denote the parameters of original Q network and target nework. $Q(s,a; \theta_{i})$ is the predicted Q value for action $a$ via feeding state $s$ to the \textbf{target} Q network with network parameters $\theta_{i}^{-}$. Other notations are consistent with those in Equation (\ref{Loss}).} \end{figure*} {\color{black} However, the above-defined loss, though is quite intuitive, would possibly lead to training instability of the neural network, since it is updated too radically (see \cite{mnih_human-level_2015}). As per \cite{van2016deep}, a double network solution would ensure a more stable performance. In this solution, we introduce another network, known as \textit{target network}, whose parameters are denoted by $\theta_{i}^{-}$. The target network has exactly the same network architecture as the Q network, and its parameters would be overridden periodically by the Q network. Informally, it serves as a "mirror" of the past Q network, which significantly reduces the training variation of the current Q network. The re-written loss function after adopting the double network architecture can be viewed in Eq. (\ref{double q Loss}) (located at the top of this page). } \par \begin{algorithm}[h] \caption {Training Stage of NAFA} \begin{algorithmic}[1] \REQUIRE ~~\\ Initial/minimum exploration factor, $\epsilon_0$/ $\epsilon_{min}$;\\ Discount factor for rewards/exploration factor, $\beta$/ $\xi$;\\ Tradeoff Parameter, $\eta$; Learning rate $\gamma$;\\ Update periodicity of target nework, $\zeta$;\\ Steps per episode, $N_{max}$; Training episodes, $ep_{max}$;\\ Batch size, $|\tilde{X}_i|$; Memory size, $X_{max}$;\\ \ENSURE~~\\ After-trained network parameters; $\theta_{final}$ \STATE Initialize $\theta_i$ and $\theta_{i}^{-}$ with arbitrary values \STATE Initialize $i=1$, $\epsilon=\epsilon_0$ \STATE Initialize empty replay memory $X$ \STATE Initialize enviroment (or system status) \FOR{$ep \in \{1,2, \dots,ep_{max}\}$} \STATE Wait until the first request comes \REPEAT \STATE Observe current system status $s$ \IF{ $\text{random()}<\epsilon$} \STATE Randomly select action $a$ from $\mathcal{A}_s$ \ELSE \STATE $ a=\operatorname{argmax}_{a \in \mathcal{A}_s } Q\left(s, a ; \theta_i\right)$ \ENDIF \STATE Perform action $a$ and realize reward $r(s,a)$ \STATE Wait until the next request comes \STATE Observe current system status $s^{\prime}$ \STATE Store $(s,a,r(s,a),s^{\prime})$ into replay memory $X$ \STATE Sample minibatch $\tilde{X}_{i} \sim X$ \STATE Update parameter $\theta_{i+1}$ following \begin{align} \label{gradient descent}\theta_{i+1}= \theta_{i}-\gamma \nabla_{\theta_{i}} L_i\left(\theta_{i};\tilde{X}_{i} \right)\end{align} \STATE $\epsilon_i=\epsilon_{min} + (\epsilon_{0}-\epsilon_{min}) \cdot \exp(-i /\xi )$ \IF{ $i \mod \zeta=0$} \STATE $\theta_{i+1}^{-}=\theta_{i+1}$ \ELSE \STATE $\theta_{i+1}^{-}=\theta_{i}^{-}$ \ENDIF \STATE $i=i+1$ \UNTIL{ $i>ep\cdot N_{max}$ } \STATE Reset the environment (or system status) \ENDFOR \STATE $\theta_{final}=\theta_{i}$ \end{algorithmic} \label{Training Algorithm} \end{algorithm} Now we shall formally introduce our proposed solution termed \textbf{N}eural network-based \textbf{A}daptive \textbf{F}requency \textbf{A}djustment (NAFA), whose running procedure on training and application stage are respectively shown in Algorithm \ref{Training Algorithm} and Algorithm \ref{Application Algorithm}. Overall, the running procedure of NAFA can be summarized as follows: \begin{enumerate} \item \textbf{Initialization:} NAFA first initializes the Q network with arbitrary values and set the exploration factor to a pre-set value. \item \textbf{Iterated Training:} We divide the training into several episodes of training. The environment (i.e., the system status) will be reset to the initial stage each time an episode ends. In each episode, after the first request comes, the following sub-procedures perform in sequence: \begin{enumerate} \item \textbf{Schedule Action:} NAFA observes the current system status $s$ (or state in our MDP formulation). Targeting the to-be scheduled request (i.e., the $i$-th request), NAFA adopts a $\epsilon$-greedy strategy. Explicitly, with probability $\epsilon$, NAFA randomly explores the action space and randomly selects an action. With probability $1-\epsilon$, NAFA greedily selects action based on the current system status $s$ and the current Q network's output. \item \textbf{Interaction:} NAFA performs the decided action $a$ within the \textbf{environment}. A corresponding reward would be realized as per Eq. (\ref{reward}). Note that the \textbf{environment} here could be real \textbf{operation enviroment} of a MEC server, or could be a \textbf{simulation environment} that is set up for a training purpose. \item \textbf{Data Integration:} After the interaction, NAFA sleeps until a new request has arrived. Once evoked, NAFA checks the current status $s^{\prime}$ (regarded as next state in the current iteration) and stores it into \textit{replay memory} collectively with current state $s$, action $a$, and realized reward $r(s,a)$. The replay memory has a maximum size $X_{max}$. If the replay memory goes full, the oldest data will be replaced by the new one. \item \textbf{Update Q Network:} A fixed batch size of data is sampled from replay memory to the minibatch $\tilde{X}_i$. Then, NAFA performs back-propagation with learning rate $\gamma$ on the Q network using samples within minibatch $\tilde{X}_i$ and the loss function defined in Eq. (\ref{double q Loss}). \item \textbf{Update Exploration Factor and Target Q Network:} NAFA discounts $\epsilon$ using a discount factor $\xi$ and update the target network at a periodicity of $\zeta$ steps. After that, NAFA starts a new training iteration. \end{enumerate} \begin{algorithm}[h] \caption {Application Stage of NAFA} \begin{algorithmic}[1] \REQUIRE ~~\\ After-trained network parameters; $\theta_{final}$ \ENSURE~~\\ Action sequence; $a_1, a_2, \dots$ \STATE $i=1$ \FOR{each request comes} \STATE Observe system status $s_i$ \STATE $a_i=\operatorname{argmax}_{a \in \mathcal{A}_s} Q\left(s_i, a; \theta_{final}\right)$ \STATE Perform action $a_i$ \STATE $ i=i+1$ \ENDFOR \end{algorithmic} \label{Application Algorithm} \end{algorithm} \item \textbf{Application:} After training has finished (i.e., it has gone through $ep_{max} \cdot N_{max}$ steps of training), the algorithm uses the obtained Q network (whose parameters denoted by $\theta_{final}$) to schedule requests in the real \textbf{operation enviroment}, i.e., based on current state $s_i$, action $a_i=\operatorname{argmax}_{a \in \mathcal{A}_{s_i}} Q\left(s_i, a; \theta_{final}\right)$ will be taken for each request. \end{enumerate} \subsection{Discussion} {\color{black} \subsubsection{Computation complexity of NAFA} Suppose we use a neural network which contains $n$ linear hidden layers, $m$ training samples, and $j$ nodes in each layer as the training model of NAFA. For forward propagating from a layer to its next layer, we have $\mathcal{O}(m*j^2)$ computation complexity, since the weights matrix between connected layers is in the demension of $j^2$, and we need to multiply the inputs (i.e., $m$ training samples) with the weights. After the matrix multiplcation, we apply the activation function to the output of each layer, which has the computation complexity of $\mathcal{O}(m*j)$. So, the forwarding complexity of NAFA for each layer is $\mathcal{O}(m*j+m*j^2 )$, and for $n$ layers in total it is $\mathcal{O}(n*(m*j+m*j^2) ) =\mathcal{O}(n*m*j^2)$. For the backward process, we compute the error signals for each node, and backward it to the previous layers. The time complexity is thus in the same scale with forwarding, which is also $\mathcal{O}(n*m*j^2)$. As such, the total computation complexity of NAFA's training process is $\mathcal{O}(n*m*j^2)$. \subsubsection{The way NAFA addresses the five challenges proposed below P2 } \begin{itemize} \item \textbf{Exact constraints.} NAFA defines an action set based on the current state, so NAFA will not take invalid actions that may possibly violate the exact constraint (See \ref{action set}). \item \textbf{Unknown and non-stationary supplied pattern of energy.} NAFA incorporates the local time into its state formulation to make the state transformation stationary (See Observation \ref{stationary energy arrival} in Appendix \ref{appendix A}), and uses the historical data to predict the value of a state (See our loss function in Eq.(\ref{double q Loss}) on how we predict the value), but remains agnostic about the real supplied pattern of energy. \item \textbf{Unknown and non-stationary arrival pattern.} As the arrival pattern is also related to time, the local time incorporated into NAFA's states could make the state transformation stationary (See Observation \ref{stationary request arrival} in Appendix \ref{appendix A}). Also, NAFA is agnostic to the real request arrival pattern, but use the learning techniques to support decision. \item\textbf{Unknown stochastic distribution of requests' data size.} We incorporate the data size of an incoming reqeust into NAFA's state formulation, based on which, NAFA is enabled to estimate the reward of computing the incoming request. Again, by our learning design, NAFA does not need to know the data size distribution, but can only care about the value of a specific state, which is learned by the historical data. \item \textbf{Coupling effects of actions between requests.} To address this challenge, NAFA incorporates two parts when estimating the value of an state-action pair (aka Q value, see section \ref{old State-Action Value Function} ). The first part is the immediate reward of accepting a request, and the second part is the future rewards that is closely related to the state transformation. The coupling effects of action is profiled in the futures rewards, that is, taking an action may impact the state transformation, and thereby affecting the future reward after this action. Our state-value formulation accounts for this coupling effects of action. \end{itemize} \subsubsection{Notes for implementation of NAFA} Recall that NAFA is required to estimate the processing time and energy consumption of a request using Eq. (\ref{processing time}) and Eq. (\ref{energy consumption}). However, we state that such a calculation is replaceable. One can take advantage of other formulation to calculate these two metrics if her formulations are closer to the real energy consumption and processing time of a request. Also, we need to clarify that these estimations do not necessarily need to be 100\% exact to the real quantities. For energy consumption, we allow the estimation to be an {\color{black} over-estimation}. By doing so, the request still would not fail in the middle of computation, since we have reserved more energy based on the overestimated expected energy consumption \footnote{\color{black}We note that when applying overestimation of energy consumption, we need to slightly modify Eq. (\ref{energy reservation status}) in our framework in order to maintain the normal operation. Once a request finishes, the server should check how much energy is really used by processing the requests, and derive how much energy has been over-reserved by the previous reservation. Then this quantity should be subtracted to eliminate the estimation error. }. For the processing time, which only affects the reward calculation, should not affect the working mechanism of the whole system, but of course, an accurate estimation certainly help NAFA to make a properer decision. } \section{Experiment} \subsection{Setup} \subsubsection{Basic setting} \begin{itemize} \item \textbf{Programming and running environment:} We have implemented NAFA\footnote{Source codes of NAFA and baseline methods, as well as the simulation environment and dataset, are all available in https://github.com/huangtiansheng/NAFA} and the simulation environment on the basis of PyTorch and gym (a site package that is commonly used for environment construction in RL). Besides, all the computation in our simulation is run by a high-performance workstation (Dell PowerEdge T630 with 2xGTX 1080Ti). \item \textbf{Simulation of energy arrival:} In our simulation, NAFA is deployed on an MEC server which is driven by solar power (a typical example of intermittent energy supply). To simulate the energy arrival pattern, we use the data from HelioClim-3\footnote{http://www.soda-pro.com/web-services/radiation/helioclim-3-archives-for-free}, a satellite-derived solar radiation database. Explicitly, we derive the Global Horizontal Irradiance (GHI) data in Kampala, Uganda (latitude 0.329, longitude 32.499) from 2005-01-01 to 2005-12-31 (for train dataset) and 2006-01-01 to 2006-12-31 (for test dataset). Note that the GHI data in some days are missing in the dataset, so we use 300 out of 365 days of intact data respectively from the train and test dataset during our experiment. By the GHI data \footnote{\color{black} The GHI data in Helioclim is discrete by hours, so the time unit mentioned henceforth is 1 hour. }, we calculate the amount of arrival energy during a given time interval $[t_1,t_2]$ ({\color{black}where $t_1$ and $t_2$ are integers}), as the following form: {\color{black} \begin{equation} \lambda_{t_1,t_2}= \sum_{t=t_1}^{t_2}\text{panel\_size} \cdot\text{GHI}(t) \end{equation} } where \text{panel\_size} is the solar panel size of an MEC server. By using $\lambda_{t_1,t_2}$, we can derive the energy arrival between two request arrivals, i.e., $\lambda_{i,i+1}$. \item \textbf{Simulation of request arrival and data size:} We use a Poisson process (with arrival rate $\lambda_r$) to generate the request arrival events (similar simulation setting available in \cite{xu2017online,mao2016dynamic}). The data size of the request follows a uniform distribution (similar setting available in \cite{lyu2017optimal,chen2020joint}) in the scale of 10MB to 30MB, i.e., $d_i \sim \text{Uniform}(10,30)$ MB. \item \textbf{Action space:} We consider 4 possible actions for each request (i.e., three correspond to different levels of frequency and one is rejection action). Formally, for the $i$-th request, $a_i \in \{0,1,2,3\}$, where actions $\{1,2,3\}$ correspond to processing frequency $\{2,3,4\}$GHz and action $0$ induces request rejection. \item \textbf{Network Structure:} The target network and Q network in NAFA have exactly the same structure: a Deep Neural Network (DNN) model with two hidden layers, each with 200 and 100 neurons, activated by ReLu, and an output layer, which outputs the estimated Q value for all 4 actions. \begin{table}[!t] \caption{Simulation parameters} \label{table simulation} \centering \begin{tabular}{ccc } \hline Symbols & Meanings & Values \\ \hline $\nu$ & computation complexity & 2e4 \\ $\kappa$ & effective switched capacitance & 1e-28 \\ $m$ & number of CPU cores & 12\\ $B_{max}$ & battery capacity & 1e6 (Joules)\\ \text{panel\_size} & solar panel size & 0.5 ($m^2$)\\ \hline \end{tabular} \end{table} \item \textbf{Simulation parameters:} All of the simulation parameters have been specified in Table \ref{table simulation}. \begin{table}[!t] \caption{Training hyper-parameters for NAFA} \label{table NAFA} \centering \begin{tabular}{ccc } \hline Symbols & Meanings & Values \\ \hline $\epsilon_{0}$ & initial exploration factor & 0.5 \\ $\epsilon_{min}$ & minimum exploration factor & 0.01 \\ $\xi$ & discount factor for exploration & 3e4\\ $\gamma$ & learning rate & 5e-4 \\ $\beta$ & discount factor for rewards & 0.995\\ $\zeta$ & target nework update periodicity & 5000\\ $|\tilde{X}_i|$ & batch size & 80\\ $X_{max}$ & size of replay buffer & 1e6\\ \hline \end{tabular} \end{table} \item \textbf{Hyper-parameters and training details of NAFA:} All hyper-parameters are available in Table \ref{table NAFA}. In our simulation, we use $ep_{max}=30\times 5$ episodes to train the model. The simulation time for each episode of training is 10 straight days. We reset the simulation environment based on different GHI data once the last request within these 10 days has been scheduled.\footnote{So, in our real implementation, training steps $N_{max}$ is not necessarily identical for all the training episodes.} Besides, it is important to note that, since we only have $30\times 10$ days of GHI data as our training dataset, we re-use the same $30\times 10$ days of GHI data for training episodes between $30\times 2$ to $30\times5$. \item \textbf{Uniformization of states:} In our implementation of NAFA, we have uniformed all the elements' values in a state to the scale of $[0,1]$ before its input to the neural network. We are prone to believe that such a uniformization might potentially improve the training performance. \end{itemize} \par \begin{figure*}[!t] \centering \includegraphics[ width=6.5in]{pic/reward_fix_arrival.pdf} \caption{\color{black}Box plot demonstrating rewards per day vs. tradeoff $\eta$ fixing $\lambda_r=30$. Each of the sub-figures demonstrates reward data of 300 straight simulation days, using the same testing dataset.} \label{fix arrival rewards} \end{figure*} \subsubsection{Baselines} For an evaluation purpose, we implement three baseline methods, specified as follows: \begin{itemize} \item \textbf{Best Fit (BF):} Best Fit is a rule-based scheduling algorithm derived from \cite{farahnakian2016energy}. In our problem, BF tends to reserve energy for future use by scheduling the minimized processing frequency for the incoming request. Explicitly, it selects an action: \begin{equation} a_i= \begin{cases} \operatorname{argmin}_{a \in \mathcal{A}_{s_i} } f_{a} & |\mathcal{A}_{s_i}|>1 \\ 0 & \text{otherwise} \end{cases} \end{equation} \item \textbf{Worst Fit (WF):} Worst Fit is another rule-based scheduling algorithm derived from \cite{xian2007energy}. In our problem, WF is desperate to reduce the processing time of each request. It achieves this goal via scheduling the maximized processing frequency for the incoming request as far as it is possible. Explicitly, it selects an action: \begin{equation} a_i= \begin{cases} \operatorname{argmax}_{a \in \mathcal{A}_{s_i} } f_{a} & |\mathcal{A}_{s_i}|>1 \\ 0 & \text{otherwise} \end{cases} \end{equation} \item \textbf{linUCB:} linUCB is an online learning solution and it is typically applied in a linear contextual bandit model (see \cite{chu2011contextual}). In our setting, linUCB learns the immediate rewards achieved by different contexts (or states in our formulation) and it greedily selects the action that maximizes its estimated immediate rewards. However, it disregards the state transfer probability, or in other words, it ignores the rewards that might be obtained in the future. Besides, same as NAFA, in our implementation of linUCB, we perform the same uniformization process for a state before its training. We do this in a bid to ensure a fair comparison. {\color{black} \item \textbf{Sliding-Window (SW):} SW is an online learning solution proposed in \cite{liu2020resource}. In our setting, we allow SW to be prophetic, i.e., it is given extra information for the states $s_{i}$, \dots, $s_{i+M}$ while making decision $a_i$. SW always chooses an action that maximizes the cumulative rewards for requests indexed within the window $[i,i+M]$. For each window, it calculates the on-off decision of the first $L \leq M$ requests in the window, utilizing the request and energy arrival pattern of the entire $M$ requests. In our setting, we set $M=500$ and $L=300$.} \end{itemize} In our experiment, we train linUCB and NAFA for the same amount of episodes. After training, we use 300 straight days of simulation based on the same test dataset to validate the performance of different scheduling strategies. \subsection{Results} \subsubsection{Tradeoff factor vs. Average Rewards} With the request arrival rate fixing to $\lambda_r=30$ and different settings of tradeoff factor $\eta$, we shall show how different scheduling strategies work. The results can be viewed in the box plot, shown in Fig. \ref{fix arrival rewards}. From this plot, we can derive the following observations: \begin{itemize} \item In all the settings of $\eta$, NAFA outperforms all the other baselines in terms of average returned rewards. This result strongly shows the superiority of our proposed solution: not only is NAFA capable of adaptively adjusting its action policy based on the operator's preference (embodied by tradeoff $\eta$), but it also has a stronger learning performance, comparing with another learning algorithm, i.e., linUCB. \item With $\eta$ becoming bigger, NAFA's, linUCB's, and SW's average rewards approach to 0 while other rule-based algorithms (i.e., WF and BF) reduce to a negative number. Our explanation for this phenomenon is that when $\eta$ is set to a sufficiently high value, the penalty brought by processing time has exceeded the real rewards brought by accepting a request (see our definition of rewards in Eq.(\ref{reward})). As such, accepting a request which takes too much time to process, is no longer a beneficial action for this extreme tradeoff setting, so both NAFA and linUCB learn to only accept a small portion of requests (perhaps those with smaller data size) and only acquire a slightly positive reward. {\color{black} The prophetic algorithm SW is given extra rewards information in the future, so it can also adaptively adjust its decision based on changing $\eta$. But the algorithm still cannot receive the largest rewards since it cannot see through the whole training process (i.e., $M$ cannot be large enough to cover the whole training process). Even though we allow $M$ to be large enough (i.e., give it unconstrained future information), its computation complexity may explode if using deep search to iterate all the action combinations). } \end{itemize} \subsubsection{Processing Time vs. Rejection Ratio} \begin{figure}[!hbtp] \centering \includegraphics[ width=3.5in]{pic/latency_fix_lambda.pdf} \caption{\color{black}Processing time vs. rejection ratio when fixing $\lambda_r=30$. NAFA-\textbf{number}, SW-\textbf{number} and linUCB-\textbf{number} are used to denote different values of $\eta$ setting for different algorithms. } \label{latency_fix_lambda} \end{figure} Recall that the reward is exactly composed of two parts: real reward of accepting a request, and a penalty of processing time. To draw a clearer picture of these two parts, we show in Fig. \ref{latency_fix_lambda} how different algorithms (and in a different setting of $\eta$) perform in terms of processing time and rejection ratio when fixing $\lambda_r=30$. Intuitively, we derive the following observations: \begin{itemize} \item Comparing BF with WF, BF leads to a higher average processing time, but meanwhile, a lower average rejection ratio is also observed. This phenomenon is wholly comprehensible if considering the working pattern of BF and WF. BF tends to schedule the incoming request to a lower processing frequency in an attempt to conserve energy for future use. This conserved action might lead to a higher average processing time. But at the same time, it is supposed to have a lower rejection ratio when the power supply is limited (e.g. at nights). By contrast, WF might experience more rejection due to power shortage at this time, as a result of its prodigal manner. \item With a larger tradeoff $\eta$, NAFA, linUCB and SW all experiences a drop in terms of processing latency, but a rise in the rejection ratio is also observed. It again corroborates that the tradeoff parameter $\eta$ defined in rewards is functioning well, meeting the original design purpose. In this way, operators should be able to adaptively adjust the algorithm's performance based on their own appetites towards the two objectives. \item NAFA-0, NAFA-1, and NAFA-2 significantly outperform BF in terms of both the two objectives, i.e., smaller processing time and lower rejection ratio. Besides, NAFA-2 and NAFA-3 also outperform WF. Of the same tradeoff parameter, linUCB is outperformed by NAFA in terms of both the two objectives in most of the experiment groups. Finally, not an algorithm outperforms NAFA in both the objectives. These observations further justified the superiority of NAFA. \end{itemize} \subsubsection{Analysis of Request Treatment and Rejection Motivation} \begin{figure}[!htbp] \centering \includegraphics[ width=3.5in]{pic/composition_fix_lambda.pdf} \caption{\color{black}Composition of request treatment and rejection motivations for different algorithms when fixing $\lambda_r=30$. We assume the rejections is led by \textbf{full-reserved} when energy in the battery has mostly be reserved, so there is no action can be taken. Analogously, the requests are rejected by the \textbf{full-loaded} when all the free CPU cores are exhausted (in a rare case that the server is simultaneously full-loaded and full-reserved, we count it as full-reserved). Request rejected due to neither of the reasons will be counted as \textbf{conservation} purpose. } \label{fix arrival survey} \end{figure} \begin{table*}[!tbp] \caption{Experimental data under the setting of different tradeoff parameters $\eta$ and a fixed request arrival rate $\lambda_r=30$. {\color{black}Higher acceptance percentage, lower average processing time, and higher rewards are better. Reward is the ultimate goal that we like to evaluate in different settings.} The data of the highest acceptance, the lowest average processing time, and the highest average rewards among the same group of experiment have been highlighted. } \label{data fixing lambda} \centering {\color{black} \begin{tabular}{cccccccccc} \hline Tradeoff & Methods & \multicolumn{3}{c}{Percentage of Rejection Motivations} & \textbf{Acceptance} & \textbf{Average} & \textbf{Average} \\ \cline{3-5} & &Full-reserved & Full-loaded & Conservation & \textbf{Percentage} &\textbf{Processing time} & \textbf{Rewards} & \\ \hline \multirow{4}{*}{$\eta=0$} &BF & 0.06\%& 24.92\%& 0.00\%& 75.02\%& 0.333& 540.957\\ \cline{2-9} &WF& 25.40\%& 1.53\%& 0.00\%& 73.07\%& \textbf{0.165}& 526.897\\ \cline{2-9} &NAFA & 0.27\%& 8.05\%& 0.02\%& 91.65\%& 0.258& 660.853\\ \cline{2-9} &linUCB & 1.94\%& 9.23\%& 0.00\%& 88.83\%& 0.277& 640.520\\ \cline{2-9} &SW& 1.47\%& 6.50\%& 0.00\%& \textbf{92.03}\%& 0.260& \textbf{663.627}\\ \hline \hline \multirow{4}{*}{$\eta=2$} &BF& 0.06\%& 24.92\%& 0.00\%& 75.02\%& 0.333& 60.721\\ \cline{2-9} &WF & 25.40\%& 1.53\%& 0.00\%& 73.07\%& \textbf{0.165}& 288.581\\ \cline{2-9} & NAFA& 0.06\%& 0.78\%& 19.61\%& 79.56\%& 0.173& \textbf{324.494}\\ \cline{2-9} & linUCB& 20.51\%& 2.33\%& 1.31\%& 75.86\%& 0.183& 283.609\\ \cline{2-9} & SW& 15.27\%& 3.20\%& 0.00\%& \textbf{81.53}\%& 0.201& 297.731\\ \hline \hline \multirow{4}{*}{$\eta=4$} &BF& 0.06\%& 24.92\%& 0.00\%& \textbf{75.02\%}& 0.333& -419.514\\ \cline{2-9} &WF& 25.40\%& 1.53\%& 0.00\%& 73.07\%& 0.165& 50.266\\ \cline{2-9} &NAFA& 0.06\%& 0.01\%& 42.50\%& 57.44\%& 0.100& \textbf{124.661}\\ \cline{2-9} &linUCB& 0.06\%& 0.02\%& 46.83\%& 53.10\%& \textbf{0.095}& 109.064\\ \cline{2-9} &SW& 25.40\%& 1.53\%& 0.00\%& 73.07\%& 0.165& 50.266\\ \hline \hline \multirow{4}{*}{$\eta=6$} &BF& 0.06\%& 24.92\%& 0.00\%& \textbf{75.02}\%& 0.333& -899.750\\ \cline{2-9} &WF& 25.40\%& 1.53\%& 0.00\%& 73.07\%& 0.165& -188.050\\ \cline{2-9} &NAFA& 0.06\%& 0.00\%& 74.22\%& 25.73\%& \textbf{0.036}& \textbf{30.253}\\ \cline{2-9} &linUCB& 0.06\%& 0.00\%& 73.90\%& 26.04\%& 0.037& 29.594\\ \cline{2-9} &SW& 0.06\%& 0.00\%& 99.94\%& 0.00\%& 0.000& 0.000\\ \hline \hline \multirow{4}{*}{$\eta=8$} & BF& 0.06\%& 24.92\%& 0.00\%& \textbf{75.02}\%& 0.333& -1379.985\\ \cline{2-9} & WF& 25.40\%& 1.53\%& 0.00\%& 73.07\%& 0.165& -426.365\\ \cline{2-9} &NAFA& 0.06\%& 0.00\%& 93.58\%& 6.36\%& \textbf{0.008}& \textbf{2.503}\\ \cline{2-9} &linUCB& 0.06\%& 0.00\%& 91.49\%& 8.46\%& 0.010& 2.086\\ \cline{2-9} &SW& 0.06\%& 0.00\%& 99.94\%& 0.00\%& 0.000& 0.000\\ \hline \hline \end{tabular} } \end{table*} To have a closer inspection on the algorithms' performance and to explore the hidden motivation that leads to rejection, by Fig. \ref{fix arrival survey}, we show the composition of requests treatment while again fixing $\eta=30$. Based on the figure, the following observations follow: \begin{itemize} \item Most of the rejections of WF is caused by energy full-reserved while most of the rejections of BF is resulting from resource full-loaded. This phenomenon is in accordance with their respective behavioral pattern. BF, which is thrifty on energy usage, might experience too-long processing time, which in turn leads to unnecessary rejection when all the CPU cores are full (i.e., resource full-loaded). By contrast, a prodigal usage of energy might bring about energy full-reserved, as WF is experiencing. \item linUCB, NAFA and SW are able to balance the tradeoff between resource full-loaded and energy full-loaded, and thereby, resulting in an increase in the overall request acceptance ratio. \item With $\eta$ becoming larger, linUCB and NAFA both develop a conservation action pattern: some requests are deliberately rejected when no resource full-loaded or energy full-loaded is experiencing. There are two explanations for this pattern: the first is that a) penalty brought by processing latency exceeds the rewards brought by acceptance, even if the action with the highest frequency is taken. Then there is simply no benefit to accept such a request (typically is a request with a large data size). The second motivation is b) the algorithm learns to reject some specific requests (perhaps those larger ones) if the system is nearly full-loaded and full-reserved. Apparently, the conservation pattern that linUCB develops is mostly based on the first motivation, as it has no regard on the state transfer (or informally, the future), while NAFA should be able to learn both of the two motivations. In addition, corroborated by Fig. \ref{fix arrival rewards}, NAFA could indeed gain us more rewards and therefore substantiate the necessity of full consideration of both the two motivations. SW \end{itemize} To gain us a more accurate observation, we demonstrate the average request treatment data in Table \ref{data fixing lambda}. \subsubsection{Rewards vs. Request Arrival Rate} \begin{figure}[!hbtp] \centering \includegraphics[ width=3.5in]{pic/rewards_fix_tradeoff_0.pdf} \caption{\color{black} Average Rewards vs. Request Arrival Rate when fixing tradeoff parameter $\eta=0$ } \label{fix tradeoff=0 rewards} \end{figure} \begin{figure}[!hbtp] \centering \includegraphics[ width=3.5in]{pic/rewards_fix_tradeoff_3.pdf} \caption{\color{black} Average Rewards vs. Request Arrival Rate when fixing tradeoff parameter $\eta=3$ } \label{fix tradeoff=3 rewards} \end{figure} In this experiment, we fix the tradeoff parameter to $\eta=0$ and $\eta=3$, and see how the returned rewards evolve with the change of request arrival rate $\lambda_r$. By Fig. \ref{fix tradeoff=0 rewards}, we find that: \begin{itemize} \item Fixing tradeoff $\eta=0$, all the algorithms experience a rise in rewards with the growth of request arrival rate. This phenomenon is quite comprehensible since every single request brings positive rewards (a constant 1 when $\eta=0$) if being proper scheduled. \item However, the growth of WF and BF stagnates as the arrival rate becomes really big. By contrast, NAFA seems to continuously increase in the acquired rewards. By this observation, we see that the traditional rule-based algorithms apparently are incompetent of meeting the scheduling requirement when the system is in high-loaded status. \item linUCB experiences a drastic jitter under different request arrival rates. We speculate that this jitter is resulting from a constant reward achieved for every state (or context). When $\eta=0$, the algorithm simply reduces to a random selection since each action has exactly the same expected rewards for almost all the states (except those when the system is full-loaded or full-reserved). {\color{black} \item SW performs roughly the same with NAFA in the setting of $\eta = 0$. But when $\lambda_r = 35$ and $\lambda_r=40$, a better performance of NAFA is observed. } \end{itemize} By Fig. \ref{fix tradeoff=3 rewards}, we also find that, for $\eta=3$: \begin{itemize} \item BF gained a negative average reward. This is resulting from the excessively high processing time penalty if only employing the least processor frequency. \item NAFA again acquirs the highest average reward in all groups of experiments. \end{itemize} \subsubsection{Acceptance Ratio and Processing Time vs. Request Arrival Rate} \begin{figure}[!hbtp] \centering \includegraphics[ width=3.5in]{pic/acceptance_fix_tradeoff.pdf} \caption{\color{black}Average acceptance ratio vs. request arrival rate. NAFA-\textbf{Number}, SW-\textbf{Number} and linUCB-\textbf{Number} represent the algorithms trained in the setting of $\eta=$\textbf{Number}. } \label{acceptance_fix_tradeoff} \end{figure} \begin{figure}[!hbtp] \centering \includegraphics[ width=3.5in]{pic/latency_fix_tradeoff.pdf} \caption{\color{black} Average processing time vs. request arrival rate. NAFA-\textbf{Number}, SW-\textbf{Number} and linUCB-\textbf{Number} represent the algorithms trained in the setting of $\eta=$\textbf{Number}. } \label{latency_fix_tradeoff} \end{figure} To show the whole picture, we now demonstrate in Fig. \ref{acceptance_fix_tradeoff} and Fig. \ref{latency_fix_tradeoff} how the two objectives, i.e., acceptance ratio and processing time evolve with different request arrival rates. Based on the result, we give the following observations: \begin{itemize} \item Processing time of BF and WF shows little variation with request arrival rate. This phenomenon is intuitive since these rule-based methods are prone to schedule the same frequency to the incoming request (the largest one for WF and the smallest one for BF). \item Compared to WF, BF acquires a higher acceptance ratio when the request rate is relatively low, but WF surpasses BF when the request rate becomes greater. Obviously, this phenomenon seems to be telling us that when the request rate is sufficiently high, the system is more vulnerable to resource full-loaded than to energy full-reserved. \item NAFA-0 yields the largest acceptance ratio while NAFA-3 yields the smallest processing time, comparing to other baselines. This corroborates the effectiveness and high adaptiveness of NAFA. {\color{black} \item SW-0 acquires the second-largest acceptance ratio and linUCB acquires the second-smallest processing time. This substantiates some sort of adaptiveness of linUCB and SW, However, their performance could not match up with NAFA due to their "near-sighted" action pattern.} \end{itemize} \begin{table*}[!htbp] \caption{Experimental data under the setting of different request arrival rates $\lambda_r$, and a fixed tradeoff parameter $\eta=3$. {\color{black}Higher acceptance percentage, lower average processing time, and higher rewards are better. Reward is the ultimate goal we like to evaluate in different settings.} The data of the highest acceptance, the lowest average processing time and the highest average rewards among the same group of experiment have been highlighted. } \label{data with different request rate} \centering {\color{black} \begin{tabular}{cccccccc} \hline Request & Methods & \multicolumn{3}{c}{Percentage of Rejection Motivations} & \textbf{Acceptance} & \textbf{Average} & \textbf{Average} \\ \cline{3-5} Arrival Rate & & Full-reserved & Full-loaded & Conservation & \textbf{Percentage}&\textbf{Porcessing time} &\textbf{Rewards} \\ \hline \multirow{4}{*}{$\lambda_r=10$} &BF& 0.05\%& 0.01\%& 0.00\%& 99.85\%& 0.444& -79.897\\ \cline{2-8} &WF& 0.05\%& 0.00\%& 0.00\%& \textbf{99.95\%}& 0.222& \textbf{79.931}\\ \cline{2-8} &NAFA& 0.05\%& 0.00\%& 1.28\%& 98.67\%& 0.218& 79.907\\ \cline{2-8} &linUCB& 0.05\%& 0.00\%& 13.70\%& 86.25\%& \textbf{0.188}& 71.819\\ \cline{2-8} &SW& 0.05\%& 0.00\%& 0.00\%& \textbf{99.95}\%& 0.222& \textbf{79.931}\\ \hline \hline \multirow{4}{*}{$\lambda_r=20$} & BF& 0.05\%& 0.78\%& 0.00\%& \textbf{92.12\%}& 0.409& -147.452\\ \cline{2-8} & WF& 11.14\%& 0.01\%& 0.00\%& 88.75\%& 0.200& 138.410\\ \cline{2-8} &NAFA& 0.07\%& 0.01\%& 8.91\%& 90.97\%& 0.197& \textbf{152.735}\\ \cline{2-8} &linUCB& 0.05\%& 0.00\%& 23.90\%& 76.02\%& \textbf{0.162}& 132.316\\ \cline{2-8} &SW& 11.14\%& 0.01\%& 0.00\%& 88.75\%& 0.200& 138.410\\ \hline \hline \multirow{4}{*}{$\lambda_r=30$} &BF& 0.06\%& 2.49\%& 0.00\%& \textbf{75.02\%}& 0.333& -179.397\\ \cline{2-8} &WF& 25.40\%& 0.15\%& 0.00\%& 73.07\%& 0.165& 169.423\\ \cline{2-8} &NAFA& 0.06\%& 0.03\%& 25.12\%& 74.52\%& 0.151& \textbf{211.238}\\ \cline{2-8} &linUCB& 22.40\%& 0.08\%& 10.85\%& 65.93\%& \textbf{0.141}& 169.323\\ \cline{2-8} &SW& 25.40\%& 0.15\%& 0.00\%& 73.07\%& 0.165& 169.423\\ \hline \hline \multirow{4}{*}{$\lambda_r=40$} &BF& 0.05\%& 3.95\%& 0.00\%& 60.49\%& 0.269& -193.469\\ \cline{2-8} &WF& 31.57\%& 0.56\%& 0.00\%& 62.88\%& 0.143& 192.471\\ \cline{2-8} &NAFA& 0.99\%& 0.14\%& 31.34\%& \textbf{66.26\%}& 0.133& \textbf{254.438}\\ \cline{2-8} &linUCB& 29.23\%& 0.37\%& 9.13\%& 57.97\%& \textbf{0.125}& 196.661\\ \cline{2-8} &SW& 31.57\%& 0.56\%& 0.00\%& 62.88\%& 0.143& 192.471\\ \hline \hline \multirow{4}{*}{$\lambda_r=50$} &BF& 0.06\%& 4.99\%& 0.00\%& 50.04\%& 0.222& -199.659\\ \cline{2-8} &WF& 34.62\%& 1.08\%& 0.00\%& 54.57\%& 0.124& 207.774\\ \cline{2-8} &NAFA& 1.95\%& 0.28\%& 36.46\%& \textbf{58.82\%}& 0.118& \textbf{279.897}\\ \cline{2-8} &linUCB& 32.58\%& 0.80\%& 8.57\%& 50.81\%& \textbf{0.110}& 215.257\\ \cline{2-8} &SW& 34.53\%& 1.08\%& 0.08\%& 54.58\%& 0.124& 207.791\\ \hline \hline \multirow{4}{*}{$\lambda_r=60$} &BF& 0.05\%& 5.75\%& 0.00\%& 42.49\%& 0.189& -203.620\\ \cline{2-8} &WF& 36.31\%& 1.60\%& 0.00\%& 47.65\%& 0.109& 216.563\\ \cline{2-8} &NAFA& 1.66\%& 0.23\%& 45.38\%& \textbf{50.62\%}& \textbf{0.096}& \textbf{316.105}\\ \cline{2-8} &linUCB& 35.18\%& 1.30\%& 8.39\%& 43.47\%& 0.103& 223.750\\ \cline{2-8} &SW& 36.13\%& 1.60\%& 0.17\%& 47.66\%& 0.109& 216.574\\ \hline \end{tabular} } \end{table*} To enable an accurate observation, we demonstrate in Table \ref{data with different request rate} our experimental data given different request arrival rate and a fixed tradeoff parameter $\eta=3$. \section{Conclusion and Future Prospect} In this paper, we have studied an adaptive frequency adjustment problem in the scenario of intermittent energy supplied MEC. Concerning multiple tradeoffs persisted in the formulated problem, we propose a deep reinforcement learning-based solution termed NAFA for problem-solving. By our real solar data-based experiments, we substantiate the adaptiveness and superiority of NAFA, which drastically outperforms other baselines in terms of acquired reward under different tradeoff settings. \par For a potential extension of our proposed solution, we are particularly interested in a more advanced technique, known as Federated Learning (FL, \cite{mcmahan2016communication}). FL allows multiple servers to collectively train a Deep Q network, while do not necessarily need to expose their private data to a centralized entity. This novel training paradigm is pretty advantageous over our extensions from the single-server to the multi-servers scenario: we might gain access to request and energy arrival patterns from different servers (perhaps in different venues and owned by different operators) without knowing its training data. {\color{black}Another interesting direction for extension to the multi-servers scenario is to employ meta reinforcement learning (e.g., \cite{qu2021dmro}). By learning properly initialized weights of models for different servers, the reinforcement learning process on different servers might be further accelerated. } \ifCLASSOPTIONcaptionsoff \newpage \fi
\section{Introduction}\label{sec1} Let $\N$ be the set of non-negative integers, $\N_{+}$ the set of positive integers and for $k\in\N_{+}$ we write $\N_{\geq k}$ for the set of integers $\geq k$. Let $A\subset\N_{+}$ be given and take $n\in\N$. By an $A$-partition $\lambda=(\lambda_{1},\ldots, \lambda_{k})$, of a non-negative integer $n$ with parts in $A$, we mean representation of $n$ in the form $$ n=\lambda_{1}+\ldots+\lambda_{k}, $$ where $\lambda_{i}\in A$. The representations of $n$ differing only in order of the terms are counted as a one. We also put $$ \op{Part}_{A}(n)=\{\lambda:\;\lambda\;\mbox{is}\;A\mbox{-partition of}\;n\}, $$ and consider the corresponding partition function $$ P_{A}(n):=\#\op{Part}_{A}(n). $$ It is well know that the ordinary generating function of the sequence $(P_{A}(n))_{n\in\N}$ takes the form $$ \prod_{a\in A}\frac{1}{1-x^{a}}=\sum_{n=0}^{\infty}P_{A}(n)x^{n}. $$ In particular, if $A=\N_{+}$, then $P_{A}(n)$, simply denoted as $p(n)$, is the famous partition function introduced by L. Euler and extensively studied by S. Ramanujan. The function $p(n)$ counts the number of partitions with parts in $\N_{+}$, i.e., unrestricted partitions of $n$. Many questions concerning arithmetic properties of $p(n)$ is still unsolved. Probably, the most famous one, is the question whether the sequence $\{p(n)\mod{m}\}_{n\in\N}$ is equidistributed modulo $m$, i.e., whether, for any given $m\in\N_{\geq 2}$ and each $r\in\{0,\ldots, m-1\}$, there is an equality $$ \limsup_{N\rightarrow +\infty}\frac{\#\{n\leq N:\;p(n)\equiv r\pmod*{m}\}}{N}=\frac{1}{m}. $$ For discussion on this topic see \cite{AO}. The literature concerning arithmetic properties of functions counting various partitions is enormous. One of the central problems in partition theory is to obtain partition identities \cite{And1}. More precisely, if $\cal{W}$ is a certain property which can be applied to the parts of a given $A$-partition $\lambda$ of a positive integer $n$, then by $P_{A}(\cal{W},n)$ we denote the number of $A$-partitions of $n$ which have the property $\cal{W}$. Thus, by a partition identity we mean an identity of the form $$ P_{A_{1}}(\cal{W}_{1},n)=P_{A_{2}}(\cal{W}_{2},n), $$ where $A_{1}, A_{2}\subset \N_{+}$ and $\cal{W}_{1}, \cal{W}_{2}$ are given properties. The basic identity of the kind is Euler's famous identity $$ \prod_{n=1}^{\infty}(1+x^{n})=\prod_{n=1}^{\infty}\frac{1}{1-x^{2n-1}}, $$ which gives the equality between the number of partitions into distinct parts and the number of partitions into odd parts. Equivalently $$ P_{\N_{+}}(\mbox{distinct parts},n)=P_{\N_{+}}(\mbox{odd parts},n). $$ Euler's identity can be proved by a simple manipulation of infinite products. Much deeper partition identities are two (of many known) Rogers-Ramanujan type identities. These identities can be deduced from the equalities of the type: infinite product $=$ infinite series, i.e., \begin{align*} \prod_{n=1}^{\infty}\frac{1}{(1-x^{5n-1})(1-x^{5n-4})}&=\sum_{n=1}^{\infty}\frac{x^{n^{2}}}{(1-x)(1-x^{2})\cdot\ldots\cdot (1-x^{n})},\\ \prod_{n=1}^{\infty}\frac{1}{(1-x^{5n-2})(1-x^{5n-3})}&=\sum_{n=1}^{\infty}\frac{x^{n^{2}+n}}{(1-x)(1-x^{2})\cdot\ldots\cdot (1-x^{n})}. \end{align*} The first identity implies that the number of partitions of $n$ such that the adjacent parts differ by at least 2 is the same as the number of partitions of $n$ such that each part is congruent to either 1 or 4 modulo 5, i.e., $$ P_{\N_{+}}(\mbox{adjacent parts differ by at least 2},n)=P_{\N_{+}}(\mbox{parts}\equiv 1, 4\pmod*{5},n). $$ The second one implies that the number of partitions of $n$ such that the adjacent parts differ by at least 2 and such that the smallest part is at least 2 is the same as the number of partitions of $n$ such that each part is congruent to either 2 or 3 modulo 5. Mentioned identities are only special cases of more general one which can be found in the literature. However, according to our best knowledge nothing is known about identities of the form \begin{equation}\label{eq1} P_{A_{1}}(\cal{W}_{1},n)=P_{A_{2}}(\cal{W}_{2},m)\neq 0, \end{equation} where $n, m$ are {\it different} positive integers. Of course, in the above, we are interested in non-trivial identities. More precisely, if the set of values of $P_{A_{i}}(\cal{W}_{i},n)$ contains all positive integers for some $i\in\{1,2\}$ then the problem is trivial. For example, if $A_{1}=\{2^{j}:\;j\in\N\}$ and the property $\cal{W}_{1}$ says that at least two parts in $A_{1}$-partition of $n$ are equal, then, for $s(n):=P_{A_{1}}(\cal{W}_{1},n)$ we clearly have $$ \sum_{n=0}^{\infty}s(n)x^{n}=\prod_{n=0}^{\infty}(1+x^{2^{n}}+x^{2^{n+1}}), $$ and the sequence $\{s(n)\}_{n\in\N}$ is a famous Stern sequence satisfying the recurrence relations $$ s(0)=1,\quad s(2n)=s(n)+s(n-1),\quad s(2n+1)=s(n). $$ One can easily prove that $s(2^{n})=n+1$ and thus the sequence $(s(n))_{n\in\N}$ contains all positive integers. Thus the question concerning the existence of positive integer solutions of related equation is trivial. Of great interests would be the proof of non-existence of $A_{i}, \cal{W}_{i}, i=1, 2$ such that the corresponding partition functions $P_{A_{i}}(\cal{W}_{i},n), i=1, 2,$ have exponential growth and equation (\ref{eq1}) has infinitely many solutions in positive integers. Note that if $P_{A_{i}}(\cal{W}_{i},n)$ has an exponential growth then the set $A_{i}$ is necessarily infinite. A related question is to whether given partition function takes values in a given infinite set. Especially, in the set of values of a given polynomial. In other words we are interested in the solvability in non-negative integers of the equation \begin{equation}\label{eq2} f(m)=P_{A}(\cal{W},n)\neq 0, \end{equation} where $f\in\Q[x]$ is of positive degree and positive leading coefficient. Again we are interested in non-trivial situations only. Here if $f$ is linear, then we enter in the realm of partition congruences. The Ramanujan congruences $$ p(5n+4)\equiv 0\pmod*{5},\quad p(7n+5)\equiv 0\pmod*{7},\quad p(11n+7)\equiv 0\pmod*{11} $$ and its various generalizations give some non-trivial examples when equation (\ref{eq2}) has infinitely many solutions in positive integers. Indeed, each equation $$ p(n)=5m, \quad p(n)=7m,\quad p(n)=11m $$ has infinitely many solutions in positive integers. In fact, one can prove that for each prime $q\neq 3$ the Diophantine equation $p(n)=qm$ has infinitely many solutions in positive integers. Indeed, Nicolas, Ruzsa and S\'{a}rk\"{o}zy \cite{NRS} proved this for $q=2$, and Ono proved that such a statement is true for each $q\geq 5$ \cite{Ono}. In case of equation (\ref{eq2}) more can be said provided we know some arithmetic properties of the partition function $P_{A}(\cal{W},n)$. For example, if $A=\{2^{i}:\;i\in\N\}$ then so called binary partition function $b(n):=P_{A}(n)$ counting the partitions with all parts being powers of $2$, satisfies the recurrence relation $$ b(0)=1,\quad b(2n)=b(2n-1)+b(n),\quad b(2n+1)=b(2n). $$ A classical result of Churchhouse states that $\nu_{2}(b(n))\in\{1,2\}$ for $n\in\N_{\geq 2}$ \cite{Chu}. Thus, if $$ \{1,2\}\cap\{\nu_{2}(f(m)):\;m\in\N_{+}\}=\emptyset $$ then equation (\ref{eq2}) has at least $\op{deg} f$ solutions possibly coming from the integer solutions of the equation $f(m)=1$. Our discussion above shows that the problem of solvability of equation (\ref{eq1}) or equation (\ref{eq2}) is interesting, difficult and worth of further investigations. It is clear that our questions are on the intersection of discrete mathematics, combinatorics and Diophantine equations. This suggest to start investigations with the case of $A$ finite. This is reasonable due to the fact that $p_{A}(n)$ is a quasi polynomial (see for example \cite{RS}). More precisely, if $A=(a_{1},\ldots, a_{k})$ and $L_{A}:=\op{lcm}(a_{1}, \ldots, a_{k})$, then $$ p_{A}(L_{A}n+i)\in\Q[n]\quad\mbox{for}\quad i=0, 1, \ldots, L_{A}-1. $$ Thus, if $A_{1}, A_{2}$ are finite, then solvability in positive integers of equation (\ref{eq1}) or a more general equation (\ref{eq2}), is equivalent with the solvability in non-negative integers, of at least one equation of the type $$ p_{A_{1}}(L_{A_{1}}m+i)=p_{A_{2}}(L_{A_{2}}n+j), $$ where $i\in\{0, 1, \ldots, L_{A_{1}}-1\}, j\in\{0, 1, \ldots, L_{A_{2}}-1\}$, or $$ f(m)=p_{A_{1}}(L_{A_{1}}n+i),\quad i\in\{0, 1, \ldots, L_{A_{1}}-1\}, $$ respectively. Thus, we enter into realm of polynomial Diophantine equations with separable variables where great deal of methods are for our disposal. In the rest of the paper, in case of the set $A=\{1,\ldots, m\}$ instead of writing $P_{A}(x)$ and $\op{Part}_{A}(n)$, we will simply write $P_{m}(x)$ and $\op{Part}_{m}(n)$, respectively. Let us describe the content of the paper in some details. In Section \ref{sec2} we prove that for each $f\in\Z[x]$ with positive degree and positive leading coefficient and $A=\{a_{1}, a_{2}\}\subset \N_{+}$ with $\gcd(a_{1},a_{2})=1$, the Diophantine equation $P_{A}(x)=f(y)$ has infinitely many solutions in positive integers (Theorem \ref{a1a2}). Section \ref{sec3} is mainly devoted to the study of the equation $P_{3}(x)=P_{n}(y)$ for $n=4, 5$. In particular, we describe all positive integer solutions in both cases and present some related results (Theorem \ref{P3P4} and Theorem \ref{P3P5}). In Section \ref{sec4} we study some equation involving $P_{A}(x)$, where $A=\{1,2,a\}, a\in\N_{\geq 3}$. In particular, we obtain a general result concerning the existence of infinitely many positive integer solutions of the equation $P_{A}(x)=P_{4}(y)$ (Theorem \ref{PA4}). We also obtain, under weak assumptions on $a, b\in\N_{\geq 3}, a\neq b$, that for $A=\{1, 2, a\}, B=\{1, 2, b\}$, the Diophantine equation $P_{A}(x)=P_{B}(y)$ has infinitely many solutions in positive integers (Theorem \ref{12a12b}). In Section \ref{sec5} we obtain several results concerning the square values of $P_{A}(x)$. In particular we describe the set of positive integer solutions of the equation $y^2=P_{n}(x)$ for $n=3, 4, 5$. We also discuss results of some computations. Finally, in the last section we collect some general questions and conjectures concerning various aspects of the Diophantine equations of the form $P_{A}(x)=P_{B}(y)$ and report results of various computations. \section{The case of $A=\{a_{1},a_{2}\}$}\label{sec2} In this short section we prove a general result concerning the existence of positive integer solutions of the Diophantine equation $$ P_{A}(x)=f(y), $$ where $A=\{a_{1}, a_{2}\}, a_{1}<a_{2}$ and $f\in\Z[y]$ is a non-constant polynomial with positive leading coefficient. More precisely, based on the formula obtained by Sert\"{o}z in \cite{Se} we easily prove the following. \begin{thm}\label{a1a2} Let $A=\{a_{1}, a_{2}\}\subset\N_{+}$. Then, for each $f\in\Z[x]$ with positive leading coefficient, the Diophantine equation $P_{A}(x)=f(y)$ has infinitely many solutions in positive integers. \end{thm} \begin{proof} Without loss of generality we can assume that $\gcd(a_{1},a_{2})=1$. Then, by Sert\"{o}z result \cite{Se}, we know that the following formula holds $$ P_{A}(n)=\frac{n+a_{1}\cdot a_{1}'+a_{2}\cdot a_{2}'}{a_{1}a_{2}}-1, $$ where $a_{i}\cdot a_{i}'\equiv-n\pmod*{a_{i+1}}$ and $1\leq a_{i}'(n)\leq a_{i+1}$ for $i=1, 2$ and if $i=2$, then $i+1$ is taken modulo 2. In particular, for each $n\in\N_{+}$ $$ P_{A}(n)=\left\lfloor\frac{n}{a_{1}a_{2}}\right\rfloor\quad\mbox{or}\quad P_{A}(n)=\left\lfloor\frac{n}{a_{1}a_{2}}\right\rfloor +1. $$ Thus, let us take $n=a_{1}a_{2}(f(m)-1)$, with $m\in\N_{+}$ chosen in such a way that $f(m)>1$. We thus consider the congruence $$ a_{i}\cdot a_{i}'\equiv-n\equiv -a_{1}a_{2}(f(m)-1)\equiv 0\pmod*{a_{i+1}} $$ and due to co-primality condition and the bound for $a_{1}', a_{2}'$, we get that $a_{i}'=a_{i+1}$, i.e., we have that $a_{1}'=a_{2}, a_{2}'=a_{1}$. In consequence $$ P_{A}(a_{1}a_{2}(f(m)-1))=\frac{a_{1}a_{2}(f(m)-1)+a_{1}a_{2}+a_{2}a_{1}}{a_{1}a_{2}}-1=f(m) $$ and our theorem is proved. \end{proof} \section{The equation $P_{3}(x)=P_{n}(y)$ for $n=4, 5$}\label{sec3} In this section we are interesting in the characterization of positive integer solutions of the Diophantine equation $$ P_{3}(x)=P_{n}(y) $$ for $n=4, 5$. \begin{thm}\label{P3P4} The Diophantine equation $P_{3}(x)=P_{4}(y)$ has infinitely many solutions in integers. \end{thm} \begin{proof} First of all we recall that \begin{align*} P_{3}(n)&=\left\lfloor\frac{(n+3)^{2}}{12}\right\rceil,\\ P_{4}(n)&=\left\lfloor\frac{(n+1)(n^2+23n+85)}{144}-\frac{n+4}{8}\left\lfloor\frac{n+1}{2}\right\rfloor\right\rceil, \end{align*} where $\lfloor x\rceil$ denotes the nearest integer to $x$. For concise proofs of these two identities see \cite[p. 57-60]{AE}. An alternative recent proof of these and related equalities were obtained by Castillo et al. \cite{Cas}. From the form of $P_{3}(n)$ we see that for $i\in\{0,\ldots, 5\}$ the expression $P_{3}(6n+i)$ is a polynomial in $n$. More precisely, we define $P_{i,6,3}(n)=P_{3}(6n+i)$ and observe that \begin{equation*} \begin{array}{ll} P_{0,6,3}(n)=3n^2+3n+1, & P_{1,6,3}(n)=(n+1)(3n+1), \\ P_{2,6,3}(n)=(n+1)(3n+2), & P_{3,6,3}(n)=3(n+1)^2,\\ P_{4,6,3}(n)=(n+1)(3n+4), & P_{5,6,3}(n)=(n+1)(3n+5).\\ \end{array} \end{equation*} We can similar treat the case of $P_{4}(n)$ and by defining $P_{2i+1,6,4}(n)=P_{4}(6n+2i+1)$ for $i=0, 1, 2$ and $P_{2i,12,4}(n)=P_{4}(12n+2i)$ for $i=0, 1, \ldots, 5$, we get \begin{equation*} \begin{array}{ll} P_{1,6,4}(n)=\frac{1}{2} (n+1) \left(3 n^2+6 n+2\right), & P_{3,6,4}(n)=\frac{3}{2} (n+1)^2 (n+2), \\ P_{5,6,4}(n)=\frac{3}{2} (n+1) (n+2)^2, & \\ P_{0,12,4}(n)=12n^3+15n^2+6n+1, & P_{2,12,4}(n)=12n^3+21n^2+12n+2, \\ P_{4,12,4}(n)=(n+1)(12n^2+15n+5), & P_{6,12,4}(n)=3(n+1)^2(4n+3), \\ P_{8,12,4}(n)=3(n+1)^2(4n+5), & P_{10,12,4}(n)=(n+1)(12n^2+33n+23). \end{array} \end{equation*} In order to characterize all integers solutions of the Diophantine equation $P_{3}(x)=P_{4}(y)$ we need to perform case by case analysis. More precisely, we consider all possible combinations of the equations \begin{equation*}\label{type12} {\rm (I)}\quad P_{i,6,3}(x)=P_{2j+1,6,4}(y)\quad\quad\mbox{or}\quad\quad {\rm(II)}\quad P_{i,6,3}(x)=P_{2j,12,4}(y), \end{equation*} i.e., we deal with 54 equations. In each case we deal in the same way. Because the degree of $P_{i,6,3}$ is 2, each equation of interests can be reduced to the equation of the type $Y^2=f(X)$ for some $f\in\Z[X]$ and the degree of $f$ is 3. If $f$ has no multiple roots, by classical Siegel result, we know that the curve defined by the equation $Y^2=f(X)$ has only finitely many integral points. On the other hand, if $f$ has multiple roots then there is a chance that our equation has infinitely many integral solutions which can be parameterized via polynomials. In order to see what is going on, let us consider the equation \begin{equation}\label{063064} P_{1,6,3}(x)=P_{3,6,4}(y),\;\mbox{i.e.},\; (x+1)(3x+1)=\frac{3}{2}(y+1)^2(y+2) \end{equation} or equivalently $Y^2=X^3-108X+1728$, where we put $X=6(3y+4), Y=36(3x+2)$. Our equation represents an elliptic curve, say $E$, in the plane $(X,Y)$ and standard methods allow to find that the curve $E$ has trivial torsion and the rank of $E$ is equal to 2, with the generators $(X,Y)=(6, -36), (-2, 44)$. Using internal {\sc Magma} \cite{Mag} procedures \quad {\tt E:=EllipticCurve([-108,1728]);} \quad {\tt IntegralPoints(E);}\\ (the background for this latter routine is found in \cite{GPZell} and \cite{StTz}; see also \cite{Tz1996}) we find that the point $(X,Y)\in E(\Q)$ has integer coordinates, if and only if \begin{align*} (X,Y)\in\{ &(-12, \pm 36), (-3, \pm 45), (-2, \pm 44), (6, \pm 36), (16, \pm 64), \\ &(22, \pm 100), (78, \pm 684), (96, \pm 936), (7926, \pm 705636)\}. \end{align*} Direct check shows that only the points $P_{1}=(96, -936)$ and $P_{2}=(7926, -705636)$ correspond to the solutions of our equation. We thus get that the only integer solutions of equation (\ref{063064}) are $(x,y)=(8, 4), (6533, 439)$. We thus get the equalities \begin{align*} P_{1,6,3}(8)&=P_{3,6,4}(4)=225,\\ P_{1,6,3}(6533)&=P_{3,6,4}(439)=128066400. \end{align*} Case by case analysis reveals that the solutions exist only in the following cases: \begin{align*} (i,j)&=(0, 0), (1, 0), (1, 1), (1, 2), (5, 1)\quad\mbox{in the case (I)}\quad \mbox{and}\\ (i,j)&=(0,0), (1,0), (2,1), (3,4), (5,2)\quad\mbox{in the case (II)}. \end{align*} In the table below we give all integral solutions in these cases. \begin{equation*} \begin{array}{|l|l|} \hline \hline (i,j) & \mbox{integral solutions}\;(x,y)\;\mbox{of}\; P_{i,6,3}(x)=P_{2j+1,6,4}(y) \\ \hline \hline (0, 0) & (0, 0)\\ (0, 1) & (0, 0) \\ (1, 1) & (8, 4), (6533, 439)\\ (1, 2) & (293, 54) \\ (3, 1) & ((t-1)(2 t^2+2 t+1), 2(t-1)(t+1)), t\in\N_{+} \\ (3, 2) & (2 t^3+t-1, 2 t^2-1), t\in\N_{+} \\ (5, 1) & (5, 3)\\ \hline \hline (i,j) & \mbox{integral solutions}\;(x,y)\;\mbox{of}\; P_{i,6,3}(x)=P_{2j,12,4}(y) \\ \hline \hline (0, 0) & ((t-1)(2 t^2-t+1), 2 (t-1) t), t\in\N_{+}\\ (1, 0) & (0, 0) \\ (2, 1) & (0, 0) \\ (3, 4) & (2 t^3+3 t^2+t-1, t^2+t-1), t\in\N_{+}\\ (5, 2) & (0, 0) \\ \hline \end{array} \end{equation*} \begin{center} Table. Values of $(i,j)$ such that the corresponding equations of types (I), (II) have solutions in non-negative integers. \end{center} Having the form of solutions presented in the table above, we can easily back to our original Diophantine equation $P_{3}(X)=P_{4}(Y)$ and found that solutions take the form $(X,Y)=(6x+i, 6y+2j)$ in the first type equation, and $(X,Y)=(6x+i, 12y+2j+1)$ in the second type equation. \end{proof} In our next theorem we characterize the set of positive integer solutions of the Diophantine equation $P_{3}(x)=P_{5}(y)$. \begin{thm}\label{P3P5} The equation $P_{3}(x)=P_{5}(y)$ has only finitely many solutions in positive integers. More precisely, the pair $(x,y)$ is a solution if and only if $(x,y)\in \cal{A}$, where \begin{align*} \cal{A}=\{&(1, 1), (2, 2), (3, 3), (5, 4), (6, 5), (8, 6), (16, 10), (18, 11), (26, 14), \\ &(45, 20), (174, 45), (217, 51), (457, 77), (468, 78), (701, 97), (10093, 388)\}. \end{align*} \end{thm} \begin{proof} Direct check reveals that $P_{5}(60n+i), i\in\{0,\ldots, 59\}$ is a polynomial in variable $n$. Thus, one can perform the same analysis as in the case of the equation $P_{3}(x)=P_{4}(y)$. However, here the situation is a bit more complicated because, after necessary simplifications, we need to work with the equations of the type $Y^2=f(X)$, where $f$ is a polynomial of degree 4. We need to consider $6\cdot 60=360$ equations in order to get the result. Here we may apply the {\sc Magma} procedure \texttt{IntegralQuarticPoints()} based on the paper \cite{Tz1996}. It worked well in all except the 8 cases, where the {\sc Magma} function failed to determine the complete set of integral solutions. These 8 problematic equations are of the form $$ P_{3}(6y+i)=P_{5}(60x+j) $$ for $$ (i,j)\in\cal{A}=\{(3,9), (3, 12), (3, 21), (3, 24), (3, 33), (3, 36), (3, 48), (3, 57)\}. $$ The equations corresponding to $(i, j)=(3, 48), (3, 57)$ are of the following form \begin{eqnarray*} Y^2 &=& u(54000u^3 - 16200u^2 + 1410u - 18),\\ Y^2 &=& u(54000u^3 + 16200u^2 + 1410u + 18), \end{eqnarray*} respectively, where $u=x+1.$ In both cases we obtain that $u$ is a square multiplied by a divisor of 18. Therefore we need to handle the equations $$ (2\delta^2 v)^2=(60\delta u)^3 - 18\delta(60\delta u)^2 + 94\delta^2(60\delta u) - 72\delta^3, $$ where $\delta\in\{\pm 1, \pm 2, \pm 3, \pm 6, \pm 9, \pm 18\}.$ One more time we use the MAGMA procedure \texttt{IntegralPoints()} to determine the integral points on these elliptic curves. We only need to consider points having first coordinate divisible by $60\delta.$ It turns out that $u=0$ is the only solution, that is $(x,Y)=(-1,0).$ In the remaining 6 cases, we observed that the discriminant of $P_{3}(6y+i)=P_{5}(60x+j)$ with respect to $y$ is equal to $$ F(u)=432u^4 + 648u^3 + 282u^2 + 18u, $$ for suitable substitution of the form $u=ax+b$ (depending on values of $i, j$). The expression for $u$ are given below $$ \begin{array}{|l|l|l|l|l|l|l|} \hline (i,j) & (3, 9) & (3, 12) & (3, 21) & (3, 24) & (3, 33) & (3,36) \\ \hline u & 5x+1 & -5x-2 & 5x+2 & -5x-3 & 5x+3 & -5x-4\\ \hline \end{array} $$ Therefore we only need to determine integral points on the curve $$ 72u^4 + 108u^3 + 47u^2 + 3u=30v^2. $$ We obtain that 3 divides $u,$ so $u=3u_1$ for some integer $u_1.$ We have that $$ u_1(648u_1^3+324u_1^2+47u_1+1)=30v_1^2,\mbox{ where }v=3v_1. $$ The factorization yields the following elliptic curves $$ X^3+324\delta X^2+30456\delta^2X+419904\delta^3=Y^2, \mbox{ where }\delta\in\{1,2,3,5,6,10,15,30\}. $$ We determined the integral points on these curves and checked if $X$ is divisible by $648\delta,$ the only such solution corresponds to $X=0.$ Hence we do not obtain integral solution in case of these six curves. \end{proof} In the light of the result one can ask for which sequences $A$ of the form $A=\{1, 2, 3, a\}, a\geq 4$, the Diophantine equation $P_{3}(x)=P_{A}(y)$ has infinitely many solutions in positive integers. It is not difficult to find many values of $a$ with this property. Indeed, for a fixed $a$ the equation has the form that a quadratic polynomial is equal to a cubic polynomial, hence we may expect a genus 1 curve. However, we for certain values of $a$ we may obtain infinitely many integral solutions. The strategy we follow is simple, we determine polynomials $P_A(6an+k)$ in $n$ that are not square-free and then deal with the equation $P_{3}(6m+3)=3(m+1)^2=P_A(6an+k)$. This works for $a\in\{4, 6, 12, 14, 20\}$. In these cases the equation $P_{3}(x)=P_{A}(y)$ has a polynomial solution and hence infinitely many solutions in positive integers. We close this section with the following \begin{conj} There are infinitely many values of $a\in\N_{\geq 4}$ such that for $A=\{1, 2, 3, a\}$, the Diophantine equation $P_{3}(x)=P_{A}(y)$ has infinitely many solutions in positive integers. \end{conj} \section{Some properties of $P_{A}(x)$ for $A=\{1,2,a\}, a\geq 3$, and related equations}\label{sec4} In this section we obtain explicit expression for $P_{A}(n)$ in case of $A=\{1, 2, a\}$. As an application we deduce several results concerning Diophantine properties of $P_{A}(n)$. \begin{thm}\label{12aexpres} Let $a\in\N_{\geq 3}$ and put $A=\{1,2,a\}$. If $a=2c$ for some $c\in\N_{\geq 2}$ then \begin{equation*} P_{A}(4cn+i)=2cn^2+\left(c+2\left\lfloor\frac{i}{2}\right\rfloor+2\right)n+\begin{cases}\begin{array}{ll} \left\lfloor\frac{i+2}{2}\right\rfloor, & i\in\{0, \ldots, 2c-1\} \\ 2\left\lfloor\frac{i}{2}\right\rfloor +2-a,& i\in\{2c, \ldots, 4c-1\} \end{array} \end{cases}. \end{equation*} If $a=2c+1$ for some $c\in\N_{+}$ then \begin{align*} P_{A}(2(2c+1)n&+i)=(2c+1)n^2+(c+i+2)n\\ &+\begin{cases}\begin{array}{ll} \left\lfloor\frac{i+2}{2}\right\rfloor, & i\in\{0, \ldots, 2c\} \\ i+1-a,& i\in\{2c+1, \ldots, 4c+1\} \end{array} \end{cases}. \end{align*} \end{thm} \begin{proof} Let $A=\{1,2,a\}$ and recall that $$ \frac{1}{(1-x)(1-x^2)(1-x^a)}=\sum_{n=0}^{\infty}P_{A}(n)x^{n}, \quad \frac{1}{(1-x)(1-x^2)}=\sum_{n=0}^{\infty}\left(\left\lfloor\frac{n}{2}\right\rfloor+1\right)x^{n}. $$ Thus, using the identity $(1-x^{a})F_{A}(x)=\frac{1}{(1-x)(1-x^2)}$ by comparison of coefficients of like powers on both sides of we get that $P_{A}(n)$ satisfies the following recurrence relation: $$ P_{A}(n)=\left\lfloor\frac{n}{2}\right\rfloor+1, n\leq a-1\quad\mbox{and}\quad P_{A}(n)=P_{A}(n-a)+\left\lfloor\frac{n}{2}\right\rfloor+1\;\mbox{for} \;n\geq a. $$ Knowing that $P_{A}(n)$ satisfies recurrence relation of the presented form and using the (conjectural) form of the solution it is easy to perform the rest of the proof by induction. We omit the tiresome details. \end{proof} There are many papers devoted to the explicit computation of the function $P_{A}(n)$ for given $A=\{a_{1},\ldots, a_{k}\}$ under various conditions on $a_{1}, \ldots, a_{k}$. Although the result above can also be deduced from known results (see for example \cite{Ehr, SerOz}), the explicit form with exact values of coefficients is very useful in what follows. Having the explicit form of the $P_{A}(2an+i), i\in\{0,\ldots, 2a-1\}, A=\{1,2,a\}$ one can obtain certain results concerning polynomial values taken by the partition function $P_{A}(n), n\in\N_{+}$. We start with the following simple \begin{cor} Let $a\in\N_{\geq 3}$ and put $A=\{1, 2, a\}$. \begin{enumerate} \item If $a\equiv 0\pmod*{2}$, then $P_{A}(2n)=P_{A}(2n+1)$ for each $n\in\N$. \item If $a\equiv 1\pmod*{2}$, then $$ P_{A}(n)=P_{A}(n+1)\;\Longleftrightarrow\; n=2j, j\in\left\{1,\ldots,\frac{a-3}{2}\right\}. $$ \end{enumerate} \end{cor} \begin{proof} \noindent (1) Let us put $a=2c, c\in\N_{\geq 2}$. The statement is an immediate consequence of the first formula from Theorem \ref{12aexpres}. Indeed, for each $i\in\{0,\ldots, 2c-1\}$ and $m\in\N$ we have the equality $$ P_{A}(4c m+2i)=P_{A}(4c m+2i+1). $$ Because of the equality $\{4cn+2i:\;n\in\N,\;i\in\{0,\ldots, 2c-1\}\}=2\N$ (the set of even non-negative integers) we get the result. \noindent (2) Let us put $a=2c+1, c\in\N_{+}$. Because $\{2(2c+1)n+i:\;n\in\N,\;i\in\{0,\ldots, 4c+1\}\}=\N$ to get the solutions of $P_{A}(n)=P_{A}(n+1)$ it is enough to consider the solutions (in $m\in\N$) of equations $P_{A}(2(2c+1)m+2i)=P_{A}(2(2c+1)m+2i+1)$ or $P_{A}(2(2c+1)m+2i+1)=P_{A}(2(2c+1)m+2i+2)$. We consider the former equation first. If $i<c$ then we deal with the equation $$ (2c+1)m^2+(c+2i+2)m+i+1=(2c+1)m^2+(c+2i+3)m+i+1, $$ i.e., $m=0$ and $n=2i$ for $i=0,\ldots, c-1=\frac{a-3}{2}$. If $i=c$ then we work with the equation $$ (2c+1)m^2+(c+2i+2)m+i+1=(2c+1)m^2+(c+2i+3)m+2i+2-c, $$ i.e., $m=-1$ and we do not get any new solution. The same analysis can be applied to the equation $P_{A}(2(2c+1)m+2i+1)=P_{A}(2(2c+1)m+2i+2)$ and we easily get that it has no solutions in $\N$. We omit the simple details. \end{proof} \begin{thm}\label{PA4} Let $a\in\N_{\geq 3}$ and put $A=\{1,2, a\}$. \begin{enumerate} \item If $a\not\equiv 2\pmod*{4}$ then the Diophantine equation $P_{A}(m)=P_{4}(n)$ has infinitely many solutions in positive integers. \item If $a\equiv 2\pmod*{4}$ then the Diophantine equation $P_{A}(m)=P_{4}(n)$ has only finitely many solutions in integers. \end{enumerate} \end{thm} \begin{proof} The general strategy of the proof is the following. The set of integer solutions of the equation $P_{A}(m)=P_{4}(n)$ is the sum of sets $U_{i,j}, i\in\{0,\ldots, 2a-1\}, j\in\{0,\ldots, 11\}$, where $$ U_{i,j}=\{(2am+i,12n+j):\;P_{A}(2am+i)=P_{4}(12n+j),\;m, n\in\N\}. $$ Thus, in order to show that the Diophantine equation $P_{A}(x)=P_{4}(y)$ has infinitely many solutions it is enough to prove that for some $i\in\{0,\ldots, 2a-1\}, j\in\{0,\ldots, 11\}$ the set $U_{i,j}$ is infinite. However, because $\op{deg}P_{A}(2am+i)$ has degree 2 and $\op{deg}P_{4}(12n+j)=3$, the set $U_{i,j}$ is infinite if and only if the discriminant (with respect to the variable $m$) of the polynomial $$ F_{i,j,a}(m,n)=P_{A}(2am+i)-P_{4}(12n+j) $$ is a square. Here, we treat $i, j$ and $n\in\N$ as variables. Moreover, because $P_{4}(12n+j)$ is o degree three, then the discriminant $$ G_{i,j,a}(n)= \op{Disc}_{m}(F_{i,j,a}(m,n)) $$ is a polynomial of degree three in the variable $n$. Thus, the value of $G_{i,j,a}(n)$ is square for infinitely many values of $n\in\N$ if and only if $G_{i,j,a}$, treated as a polynomial in the variable $n$, has double root. This, in turn, is equivalent with the vanishing of the discriminant of $G_{i,j,a}$. Summing up we get the following implication $$ U_{i,j,a}\;\mbox{is infinite}\;\Longrightarrow\;H_{i,j,a}:=\op{Disc}_{n}(\op{Disc}_{m}(F_{i,j,a}(m,n)))=0. $$ From our discussion it follows that we need to investigate the vanishing of $H_{i,j}$. However, before we will go one, let us note that a priori $U_{i,j,a}$ can be finite and the condition $H_{i,j,a}=0$ can be still satisfied (in other words we can not expect to have equivalence between the conditions above). This is clear. Due to the form of the polynomial $F_{i,j,a}$ to get an element of $U_{i,j,a}$ some additional congruence conditions need to be satisfied (which are not seen in discriminant computations). Indeed, let us take $a=9, i=0, j=3$, i.e., $$ F_{0,3,9}(m,n)=9 m^2+6 m-(12 n^3-24 n^2-15 n-2). $$ Then $G_{0,3,9}(n)=108(n+1)(2 n+1)^2$. Thus $G_{0,3,9}(n)$ is a square if and only if $n=3u^2-1$. However, $F_{0,3,9}(m,3u^2-1)=(3m-18u^3+3u+1)(3m+18u^3-3u+1)$ and it is clear that our equation has no solutions. After this discussion let us back to the proof of the statement. To get the first part of our theorem we perform case by case analysis. If $a\equiv 0\pmod*{4}$, say $a=4s$ then $H_{2s-2, 3, 4s}=0$ and we have that $$ G_{2s-2,3,4s}(n)=48(n+1)(2n+1)^2s. $$ Thus, in order to make the above expression a square, we need to take $n=3su^2-1$. Then $$ F_{2s-2,3,4s}(m, 3su^2-1)=s(-2 m+18 s u^3-3 u-1)(2 m+18 s u^3-3 u+1) $$ and $m=\frac{1}{2} \left(18 s u^3-3 u-1\right)$. Summing up: if $u$ is odd positive integer then the numbers \begin{align*} x&=8sm+2s-2=2 \left(36 s^2 u^3-6 s u-s-1\right),\\ y&=12n+3=9 \left(4 s u^2-1\right) \end{align*} solve the equation $P_{A}(x)=P_{4}(y)$. Because in the case $a\equiv 1, 3\pmod*{4}$ the reasoning goes in exactly the same way we present only the appropriate values of $i, j$ and the corresponding solutions $x, y$. If $a\equiv 1\pmod*{4}$, i.e., $a=4s+1$ then we take $i=2s-1, j=2$ and $u$ positive odd number and get \begin{align*} x&=\frac{1}{2}(9(4s+1)^2u^3-3(4s+1)u-4(s+1)),\\ y&=(9s+4)u^2-7, \end{align*} positive integers solving the equation $P_{A}(x)=P_{4}(y)$. If $a\equiv 1\pmod*{4}$, i.e., $a=4s+3$ then we take $i=s+1, j=0$ and $u$ positive odd number and get \begin{align*} x&=\frac{1}{2}(9(4s+3)^2u^3+(4s+3)u-2(2s+3)),\\ y&=3((4s+3)u^2-1), \end{align*} positive integers solving the equation $P_{A}(x)=P_{4}(y)$. To get the second part of our theorem we need to investigate the vanishing of $H{i,j,4s+2}$. Because we have exact expression for $P_{A}(4(2s+1)m+2i)$ (which is equal to $P_{A}(4(2s+1)m+2i)$) it is enough to consider $H_{i,j,4s+2}$ for $j=0, \ldots, 11$ as a polynomial in two variables: $s$ and $i$. Because we need to consider two cases $i\in\{0,\ldots, 2s\}$ and $i\in\{2s+1,\ldots, 4s-1\}$ we work with 24 polynomials $H_{i,j,4s+2}$. It is easy compute these polynomials. Each has the form $$ C(i,j)(2s+1)^2Q_{j}(i,s)R_{j}(i,s), $$ where $C(i,j)\in\Z$ and $Q_{j}, R_{j}$ are quadratic inhomogeneous polynomials. In each case the quadratic forms $Q_{j}, R_{j}$ has no integer zeros. Because in each case the reasoning is the same we present only one typical example. So let us suppose that $i\in\{0,\ldots, 2s\}$ and take $j=0$. Then $$ H_{i,0,4s+2}=-27648(2s+1)^2(4(i^2+s^2)-4i(2 s-1)+3)(36(i^2+s^2)-36 i (2s-1)-4 s+25) $$ and quick computation reveals that each factor is non-zero for $s\in\Z$ and $i\in\N$. Performing the same analysis for the rest of polynomials we get the statement of our theorem. \end{proof} The first part of the above result can be further generalized. In order to get the generalization we will need the following simple \begin{thm} Let $a\in\N_{\geq 3}$ and put $A=\{1, 2, a\}$. The Diophantine equation $y^2=P_{A}(x)$ has infinitely many solutions in positive integers. \end{thm} \begin{proof} First we consider the case $a$ is not a square. Let $a$ be even, i.e., $a=2c$ for some $c$. Take $i=0$ in the first formula in Theorem \ref{12aexpres}, i.e., we work with the Diophantine equation $$ P_{A}(4cn)=2cn^2+(c+2)n+1=y^2. $$ In order to show that the equation $P_{A}(4cn)=y^2$ has infinitely many integral solutions, we will follow the standard argument to parameterize (rational) solutions since we know that $(n,y)=(0,1)$ solves the equation. The lines through $(0,1)$ can be written as $y=mn+1.$ Therefore we get that $2cn^2+(c+2)n+1=\left(mn+1\right)^2,$ that is $n=0$ or $$ n=\frac{c+2-2m}{m^2-2c}. $$ Here $m=u/v$ is a rational parameter, so we have that $$ n=\frac{(c+2)v^2-2uv}{u^2-2cv^2}. $$ For our assumption, $a=2c$ is not a square, then we consider the Pell-equation $u^2-2cv^2=1$ and denote the sequence of positive integer solutions by $(u_k,v_k).$ In this case it follows that $n=(c+2)v_k^2-2u_kv_k$ and $y=(c+2)u_kv_k-2u_k^2.$ Let us now consider the case with $a=2c+1$ odd. Applying the second formula in Theorem \ref{12aexpres} with $i=0$, we work with the Diophantine equation $$ P_{A}(2(2c+1)n)=(2c+1)n^2+(c+2)n+1=y^2. $$ Again, in order to show that the equation $P_{A}(4cn)=y^2$ has infinitely many integral solutions, we follow the standard argument. The pair $(n,y)=(0,1)$ solves the equation. The lines through $(0,1)$ can be written as $y=mn+1.$ Therefore, we get that $(2c+1)n^2+(c+2)n+1=\left(mn+1\right)^2,$ that is $n=0$ or $$ n=\frac{c+2-2m}{m^2-2c-1}. $$ Here $m=u/v$ is a rational parameter, so we have that $$ n=\frac{(c+2)v^2-2uv}{u^2-(2c+1)v^2}. $$ For our assumption, $a=2c+1$ is not a square, then we consider the Pell-equation $u^2-(2c+1)v^2=1$ and denote the sequence of positive integer solutions by $(u_k,v_k).$ In this case it follows that $n=(c+2)v_k^2-2u_kv_k$ and $y=(c+2)u_kv_k-2u_k^2$. Summing up: we proved that if $a$ is not a square then the Diophantine equation $y^2=P_{A}(x)$ has infinitely many solutions in positive integers. It remains to deal with the case when $a$ is a square (even or odd). We follow similar lines, so we only provide details in case of $a=4t^2$, that is when $a$ is an even square. Again, using the first formula from Theorem \ref{12aexpres} with $c=2t^2, i=2t^2-2<c-1$ we get that $$ P_{A}(8t^2n+2t^2-2)=4t^2n^2+4t^2n+t^2=t^2(2n+1)^2, $$ and for each $n\in\N_{+}$ the number $P_{A}(8t^2n+2t^2-2)$ is a square and the Diophantine equation $y^2=P_{A}(x)$ has infinitely many solutions in positive integers. If $a=(2t+1)^2$ is an odd square, then using the second formula from Theorem \ref{12aexpres} with $c=2t(2t+1)$ and $i=2t^2-2$ we find that $$ P_{A}(2(2t+1)^2n+2t^2-2)=((2t+1)n+t)^2. $$ For each $n\in\N$ the number $P_{A}(2(2t+1)^2n+2t^2-2)$ is a square and our theorem is proved. \end{proof} \begin{thm}\label{12a12b} Let $a, b\in\N_{\geq 3}, a<b$ such that $a,b$ are divisible by 4 and either $a/2$ or $b/2$ is not a square. Put $A=\{1, 2, a\}, B=\{1, 2, b\}$. The Diophantine equation $P_{A}(x)=P_{B}(y)$ has infinitely many solutions in positive integers. \end{thm} \begin{proof} Let $a=2s$ and $b=2t.$ It follows from Theorem \ref{12aexpres} that \begin{eqnarray*} P_A(4sn)&=&2sn^2+(s+2)n+1,\\ P_B(4tm)&=&2tm^2+(t+2)m+1. \end{eqnarray*} Suppose that $a/2=s$ is not a square. We have the solution $(0,0)$ of the equation $P_A(4sn)=P_B(4tm)$ so we write $n=km$ for some rational number $k=u/v.$ Solving the equation for $m$ provides that either $m=0$ or $$ m=\frac{(t+2)v^2-suv-2uv}{2su^2-2v^2}. $$ Since $s$ and $t$ are even integers the numerator is divisible by 2 and we obtain the expression $$ m=\frac{(s+2)/2uv-(t+2)/2v^2}{v^2-su^2}. $$ The integer $s$ is not a square, hence we consider the sequence of positive solutions $(u_k,v_k)$ of the Pell-equation $v^2-su^2=1.$ For these solutions we have $m=(s+2)/2u_kv_k-(t+2)/2v_k^2$ and $n=(s+2)/2u_k^2-(t+2)/2u_kv_k.$ \end{proof} In view of theorem above we formulate the following conjecture. \begin{conj} Let $a, b\in\N_{\geq 3}, a<b$ and put $A=\{1, 2, a\}, B=\{1, 2, b\}$. The Diophantine equation $P_{A}(x)=P_{B}(y)$ has infinitely many solutions in positive integers. \end{conj} Let us note that to prove the above conjecture it is enough to find a pair $(i,j)$ of integers such that $i\in\{0,\ldots, 2a-1\}, j\in\{0,\ldots, 2b-1\}$ and the Diophantine equation $P_{A}(2ax+i)=P_{B}(2by+j)$ has infinitely many solutions in integers. Although for any fixed values of $a, b$ it is easy to find suitable $i, j$ we were unable to get the general result. \section{Remarks on the Diophantine equation $y^2=P_{A}(x)$}\label{sec5} A difficult and still unsolved question is whether the number $p(n)$ can be a perfect power. Let us recall that $p(n)$ counts the number of all partitions of $n$, i.e., $$ \prod_{n=1}^{\infty}\frac{1}{1-x^{n}}=\sum_{n=0}^{\infty}p(n)x^{n}. $$ In other words, we do not know any example of $n\geq 2$ such that $y^k=p(n)$ for some $k\in\N_{\geq 2}$. In fact Zhi-Wei Sun conjectured that the equation $y^{k}=p(n)$ has no solutions in positive integers $n, y, k$ with $k\geq 2$. Let us also note that Alekseyev checked that there are no solutions with $n\leq 10^{8}$ \cite{mathover}. A question arises whether some results concerning the equation $y^2=P_{k}(x)$ can be proved for some values of $k\in\N_{+}$. We know that the Diophantine equation $y^2=P_{k}(x)$ has infinitely many solutions in positive integers for $k\leq 4$. Indeed, to get the result for $k=3$ it is enough to back to the explicit form of $P_{3}(6n+i)$ presented in the proof of Theorem \ref{P3P4}. It is easy to see that for $i\in\{0, 1, 4, 5\}$ the Diophantine equation $$ y^2=P_{3}(6n+i) $$ has infinitely many solutions in positive integer. For example, if $i=4$ we deal with the equation $y^2=(n+1)(3n+4)$. Thus, if $(u_{k}, v_{k})$ is a solution of the Pell equation $v^2-3u^2=1$ then the pair $(n, y)=(u_{k}^2-1, u_{k}v_{k})$ solves our equation. If $k=4$ then again we back to the explicit form of $P_{4}(6n+2i+1)$ for $i=0, 1, 2$ and $P_{4}(12n+2i)$ for $i=0, 1, \ldots, 5$. A quick inspection reveals that the equation $y^2=P_{4}(6n+2i+1)$ has infinitely many solutions for $i=1, 2$. For example, if $i=1$ then it is enough to take $n=6u^2-2$ and $y=3u(6u^2-1)$. Similarly, it is easy to see that equation $y^2=P_{4}(12n+2i)$ has infinitely many solutions for $i=3, 4$. The first non-trivial problem is characterization of the positive integer solutions of the Diophantine equation $y^2=P_{5}(x)$. We prove the following \begin{thm} The equation $y^2=P_{5}(x)$ has only finitely many solutions in positive integers. More precisely, the pair $(x,y)$ is a solution if and only if $(x,y)=(1,1), (2027, 77129)$. \end{thm} \begin{proof} We have 60 curves of the form $y^2=P_{5}(60n+i), i\in\{0,\ldots, 59\}$. If $i\in\{5, 20, 25, 40\}$ the corresponding quartic has no $\mathbb{Q}_{5}$-rational points, and thus has no rational points at all. Similarly as in the proof of Theorem \ref{P3P4} and Theorem \ref{P3P5}, we apply the procedure \texttt{IntegralQuarticPoints()} to determine all integral solutions in the remaining 56 cases. In particular, the solution $(1, 1)$ comes from the equation $y^2=P_{5}(60n+1)$ with $n=0$. The solution $(2027, 77129)$ comes from the solution $(n,y)=(33, 77129)$ of the equation $y^2=P_{5}(60n+47)$. The procedure works well, except in 6 special cases. Here we do not get any error message like in the special cases appearing in the proof of Theorem \ref{P3P5}, but warnings about time-consuming final enumerations. The 6 problematic polynomials correspond to $i\in\{21, 24, 48, 51, 54, 57\}$. The equations (up to multiplication by $16$) corresponding to $i=21, 24$ give the following equations \begin{eqnarray*} 5y^2&=&u(36u^3+108u^2+34u+12),\quad u=5(2n+1),\\ 5y^2&=&u(36u^3-108u^2+34u-12),\quad u=2(5n+3), \end{eqnarray*} respectively. Hence we need to resolve the following elliptic equations $$ Y^2=X^3+108\delta X^2+3384\delta^2X+15552\delta^3, $$ where $\delta$ divides 60. We only get the trivial solution given by $u=0$. For $i\in\{48, 51, 54, 57\}$ after the substitution $u=2(n+1)$ we get the following quartic equations \begin{eqnarray*} y^2&=&u(4500u^3-2700u^2+470u-12),\\ y^2&=&u(4500u^3-900u^2-70u+4),\\ y^2&=&u(4500u^3+900u^2-70u-4),\\ y^2&=&u(4500u^3+2700u^2+470u+12). \end{eqnarray*} We obtain elliptic equations in a similar way as before, so we omit details. It turns out that we get only the trivial solution with $u=0$ from these cases. \end{proof} The case of the equation $y^2=P_{6}(x)$ is far more difficult. To get the solutions we need to consider 60 genus 2 curves $$ C_{i}:\;y^2=P_{6}(60n+i),\quad i=0, \ldots, 59. $$ Let $J_{i}=\op{Jac}(C_{i})$ be the Jacobian of the curve $C_{i}$ and by $r_{i}$ denote the rank of $J_{i}$. We checked that $r_{i}\leq 5$ for $0\leq i\leq 59$. \begin{equation*} \begin{array}{|l||l|} \hline r & \mbox{values of}\;i\;\mbox{such that}\;r_{i}\leq r \\ \hline 0 & 3, 14, 34, 47, 50, 51, 55, 59 \\ 1 & 18, 22, 27, 32, 35, 38, 41, 43, 44, 45, 46, 54 \\ 2 & 0, 7, 8, 9, 15, 23, 24, 25, 26, 28, 29, 30, 33, 36, 37, 39, 40, 42, 49, 52, 53, 57, 58 \\ 3 & 2, 5, 6, 11, 17, 31, 48 \\ 4 & 4, 10, 13, 16, 19, 20, 21, 56 \\ 5 & 1, 12\\ \hline \end{array} \end{equation*} \begin{center} Table. Upper bounds for the $\Q$-rank of the Jacobian $J_{i}$ of the curve $C_{i}:\;y^2=P_{6}(60x+i)$ for $i=0, \ldots, 59$. \end{center} It is curious that the polynomial $P_{6}(60n+i)$ is reducible (in the ring $\Q[n]$) for $i\in\{40,\ldots, 59\}$ and thus, instead of working with genus two curve we need to play with certain curves of the type $y^2=Q_{i}(x)$, where $Q_{i}$ is a quartic polynomial. If the rank of the Mordell-Weil group is less than the genus of the curve, that is 2 in these cases, then classical Chabauty's method \cite{Chab} may be applied to determine all rational points on the hyperelliptic curves. If the rank is greater than or equal to 2, then there are two different approaches to compute the set of integral points on the curves (see \cite{BMSST, GallHyp}). The difficulty is that one needs a Mordell-Weil basis. Among the above curves there are some for which we were not able to obtain such bases, these are as follows $C_i$ with $$ i\in\{15,16,23,24,27,28,29,31,32,33,35,36,38,39 \}.$$ The most interesting one may be the hyperelliptic curve given by $$ y^2=12x^5 + 1125x^4 + 41960x^3 + 778050x^2 + 7171020x + 26276400, $$ which, as computed with the help of {\sc Magma}, is the minimal model of the curve $C_{27}:~~y^2=P_6(60n+27).$ In this case the rank is 1, however we were unable to found a generator of the Mordell-Weil group. We finish with the following \begin{conj} Let $n\in\N_{\geq 6}$. The only positive integer solution of the Diophantine equation $y^2=P_{n}(x)$ is $x=y=1$. \end{conj} \bigskip Motivated by the results above one can ask a more general \begin{ques} Let $A\subset \N_{+}$ and suppose that the Diophantine equation $y^2=P_{A}(x)$. How large the number $\#A$ can be? \end{ques} In case of $\#A=5$ there is a large number of sets such that $P_{A}(L_{A}n+i)$ is a square of a polynomial in $n$. More precisely, with the constraint $\op{max}(A)\leq 15$, there are exactly 119 different pairs $(A,i)$ such that $P_{A}(L_{A}n+i)$ is a square of a polynomial with integer coefficients. For example, if $A=\{1, 2, 8, 10, 15\}$, then $L_{A}=120$ and for $i=1, 11, 41, 43, 73, 83, 91, 113$ we have $P_{A}(L_{A}n+i)$ is a square of a polynomial. In particular, $$ P_{A}(120n+1)=(4n+1)^2(15n+1)^2. $$ In the table below we collect data concerning our search. \begin{equation*} \begin{array}{|l|l|l|} \hline A & L_{A} & i \\ \hline \{1,2,8,10,15\} & 120 & 1,11,41,43,73,83,91,113 \\ \{1,4,5,10,12\} & 60 & 12,16,36,52 \\ \{1,4,8,9,12\} & 72 & 1,13,19,25,37,43,49,61,67 \\ \{1,5,6,8,10\} & 120 & 2,8,13,17,32,37,53,58,73, 77,82,88,97,98,112,113\\ \{2,3,7,8,14\} & 168 & 32,102,144,158 \\ \{2,4,5,6,10\} & 60 & 12,16,17,21,36,41,52,57 \\ \{3,4,6,9,12\} & 36 & 3,7,11,27,31,35 \\ \{3,5,6,9,15\} & 90 & 18,23,24,28,29,34,54,59,64,78,83,88 \\ \{4,5,6,12,15\} & 60 & 27,51 \\ \{4,7,9,12,14\} & 252 & 58,64,142,148,226,232 \\ \{5,6,8,9,10\} & 360 & 8,29,53,74,89,98,104,113,128,149,173,194,209,\\ & & 218,224,233,248,269,293,314,329,338, 344,353 \\ \{5,7,9,14,15\} & 630 & 47,113,173,197,257,323,383,407,467,533,593,617 \\ \{7,8,10,14,15\} & 840 & 182,212,364,422,574,604,812,814 \\ \hline \end{array} \end{equation*} \begin{center} Table. The sets $A$ such that $\#A=5, \op{max}(A)\leq 15$ and there is an $i\in\{0,\ldots, L_{A}-1\}$ such that $P_{A}(L_{A}n+i)$ is a square of a polynomial in $\Z[n]$, \end{center} In case of $\#A=6$ there is a large number of sets such that $P_{A}(L_{A}n+i)$ is a square of a polynomial (with rational coefficients) in $n$ times a linear factor (note that this is only possibility to get infinitely many square values). However, in each case the values of a corresponding linear factor nor the value of $P_{A}(L_{A}n+i)$ can be a square of an integer. \ We were able to find only the one set $A$ with 7 elements, $\op{max}(A)\leq 10$ and such that $y^2=P_{A}(x)$ has infinitely many solutions in positive integers. More precisely, if $A=\{1,2,4,5,8,9,10\}$ then \begin{align*} P_{A}(360n+95)&=25(3n+1)^2(18n+5)^2(36n+13)(40n+13),\\ P_{A}(360n+226)&=25(3n+2)^2(18n+13)^2(36n+23)(40n+27). \end{align*} One can easily check that the factor $(36n+13)(40n+13)$ is a square infinitely often. The smallest values of $n$ which makes this factor a square, are $n=0, 494, 712842, \ldots$. However, the factor $(36n+23)(40n+27)$ takes square values for infinitely many values negative values of $n$ and thus is not of interests for us. \section{Problems, questions and conjectures}\label{sec6} Besides the conjectures stated in previous sections, we formulate now several question and conjectures which hopefully will stimulate further research. \begin{ques} Let $k\in\N_{\geq 2}$ and $f\in\Z[x]$ be given. Does there exist an ascending sequence of sets $A_{2}=\{a_{1}, a_{2}\}\subset\ldots \subset A_{k}=\{a_{1},\ldots, a_{k}\}\ldots \subset\N_{+}$ such that the Diophantine equation $P_{A_{k}}(x)=f(y)$ has at least $C_{k,f}$ solutions in positive integers and $C_{k,f}\rightarrow +\infty$ as $k\rightarrow +\infty$? \end{ques} Let us observe that without the condition $C_{k,f}\rightarrow +\infty$ the question is not difficult. Indeed, let us take $A_{2}=\{a_{1}, a_{2}\}\subset\N_{+}$ and suppose that $\gcd(a_{1},a_{2})=1$. As we already proved in Theorem \ref{a1a2} the Diophantine equation $P_{A_{2}}(x)=f(y)$ has infinitely many solutions in positive integers. If $C\in\N$ is fixed let us take an increasing sequence $\{a_{3}, a_{4},\ldots, a_{k}\}$ of positive integers such that $a_{3}$ is grater then the smallest integer $N$ such that there is at least $C$ values of $x$ for which there is an integer $y$ satisfying $P_{A_{2}}(x)=f(y)$. Then, for $A_{k}=\{a_{1}, a_{2}, a_{3},\ldots, a_{k}\}$ the Diophantine equation $$ P_{A_{k}}(x)=f(y) $$ has at least $C$ solutions in positive integers. Indeed, this is simple consequence of the recurrence relation satisfied by the sequence $\{P_{A_{k}}(n)\}_{n\in\N}$. Indeed, because $P_{A_{k}}(n)=P_{A_{k-1}}(n)$ for $n<a_{k}$, then $P_{A_{k}}(n)=P_{A_{2}}(n)$ for $n<\min\{a_{3},\ldots, a_{k}\}=a_{3}$ and hence the result. \bigskip We proved that the equation $P_{3}(x)=P_{5}(x)$ has only finitely many solutions in positive integers and it is quite natural to ask whether there are $A, B$ satisfying $\#A=3, \#B=5$, such that the equation $P_{A}(x)=P_{B}(y)$ has infinitely many solutions in positive integers. To get the result in this direction we will need the following. \begin{lem}\label{specb} Let $b\in\N_{\geq 4}$ and put $B=\{1, 2, 3, 4, b\}$. \begin{enumerate} \item If $b=4(6k+1), j=3(8k-1)$ for some $k\in\N_{+}$, then $P_{B}(3bn+j)=(3n+2)((6k+1)n+2k)Q_{1}(k,n)$, where $$ Q_{1}(k,n)=3(6k+1)^2n^2+2(9k+1)(6k+1)n+6k(4k+1). $$ \item If $b=4(6k+5), j=24k+13$ for some $k\in\N_{+}$, then $P_{B}(3bn+j)=(3n+1)((6k+5)n+4k+3)Q_{2}(k,n)$, where $$ Q_{2}(k,n)=3(6k+5)^2n^2+2(6k+5)(9k+7)n+24k^2+36k+1). $$ \item If $b=4(12k+2), j=48k+1$ for some $k\in\N_{+}$, then $P_{B}(3bn+j)=(3n+1)(2(6k+1)n+8k+1)Q_{3}(k,n)$, where $$ Q_{3}(k,n)=12(6k+1)^2n^2+2(6k+1)(36k+5)n+96k^2+24k+1. $$ \item If $b=4(12k+10), j=48k+1$ for some $k\in\N_{+}$, then $P_{B}(3bn+j)=(3n+2)(2(6k+5)n+4k+3)Q_{4}(k,n)$, where $$ Q_{4}(k,n)=12(6k+5)^2n^2+2(6k+5)(36k+29)n+3(4k+3)(8k+7). $$ \end{enumerate} \end{lem} \begin{proof} Let us note that the sequence $\{P_{B}(n)\}_{n\in\N}$ satisfies the following recurrence relation $$ P_{B}(n)=\begin{cases}\begin{array}{ll} P_{A}(n), & n<b, \\ P_{B}(n-b)+P_{A}(n), & b\leq n, \end{array} \end{cases} $$ where $A=\{1, 2, 3, 4\}$. We know the polynomial expressions for $P_{A}(12n+i), i\in\{0,\ldots, 11\}$ and that $P_{B}(L_{b}n+j), j\in\{0,\ldots, L_{b}-1\}$, where $L_{b}=\op{LCM}(1,2,3,4,b)$, is a polynomial of degree 4 with rational coefficients. Using induction one can obtain the expression for the polynomials of interests. We omit tiresome details. \end{proof} \begin{thm} Let $a\in\N_{\geq 3}, b\in\N_{\geq 4}$ and put $A=\{1, 2, a\}, B=\{1, 2, 3, 4, b\}$. If $a\equiv 1, 2, 5, 7, 11, 10\pmod*{12}$ and $b=4a$, then the Diophantine equation $P_{A}(x)=P_{B}(y)$ has infinitely many solutions in positive integers. \end{thm} \begin{proof} Note that if $a\equiv 1, 2, 5, 7, 11, 10\pmod*{12}$, then $a$ can be written in one of the following form: $a=6k+1, a=6k+5, a=12k+2$ $a=12k+10$. Thus, in each case, the value of $b=4a$ is exactly the value of $b$ considered in Lemma \ref{specb}. Following the idea of proof of Theorem \ref{PA4} we present the values of $i, j$ such that the polynomial $P_{A}(2am+i)-P_{B}(3bn+j)$ is reducible and the coefficient in of the linear factor (in $m$) near $m$ is equal to 1. Let $a=6k+1, b=4a, i=11k, j=3(8k-1)$. Then $P_{A}(2am+i)-P_{B}(3bn+j)=R_{1}(m,n)R_{2}(m,n)$, where \begin{align*} R_{1}(m,n)&=m-3(6k+5)n^2-2(9k+7)n-4k+1,\\ R_{2}(m,n)&=(6k+1)m+3(6k+1)^2n^2+2(6k+1)(9k+1)n+24k^2+12k+1. \end{align*} Thus, if $m=3(6k+5)n^2+2(9k+7)n+4k-1$ then $P_{A}(2am+i)=P_{B}(3bn+j)$ and our equation has infinitely many solutions. Because in each case we proceed in the same way we present only the values of $a, i, b, j$ and the corresponding solution for $m$. If $a=6k+5, i=7k+4, b=4(6k+4), j=24k+13$, then $$ m=3(6k+5)n^2+2(9k+7)n+2(2k+1). $$ If $a=2(6k+1), i=14k, b=8(6k+1), j=48k+1$, then $$ m=6(6k+1)n^2+(36k+5)n+8k. $$ If $a=2(6k+5), i=2(11k+8), b=8(6k+5), j=3(16k+11)$, then $$ m=6(6k+5)n^2+(36k+29)n+8k+5. $$ \end{proof} We proved that for many choices of sequences $A, B$, the corresponding Diophantine equation $P_{A}(x)=P_{B}(y)$ has infinitely many solutions in positive integers. However, in each case under consideration we had $\op{min}\{\#A,\#B\}\leq 3$. This observation lead us to the following. \begin{ques} Let $A, B\subset \N_{+}$. Let us suppose that the Diophantine equation $P_{A}(x)=P_{B}(y)$ has infinitely many (non-trivial) solutions in positive integers. How large the number $\op{min}\{\#A, \#B\}$ can be? \end{ques} Let us explain what a trivial solution means. More precisely, if for example $A=\{1, pa_{2},...,pa_{k}\}$ then if $P_{A}(pn)$ is a non-zero, then in each representation $$ 1\cdot x_{1}+\sum_{i=2}^{k}pa_{i}x_{i}=pn $$ we need to have $p|x_{1}$ and thus we get a representation $$ 1\cdot y_{1}+\sum_{i=2}^{k}a_{i}x_{i}=n. $$ It is clear that this mapping can be reversed. Thus, by taking $B=\{1, a_{2}, ..., a_{k}\}$ we have the boring identity $P_{A}(pn)=P_{B}(n)$. Thus, in regards to question above, we considered equations of the form $P_A(x)=P_B(y),$ where $A,B$ are sets having 5 elements from $\{1,2,\ldots,10\}$ and one of the elements is 1. We searched for reducible polynomials $P_A(x)-P_B(y)$ having a linear or quadratic factor. We implemented a parallel algorithm and used SageMath on a machine having 16 cores. It took about 10 hours to determine the appropriate polynomials. There are 44982 such cases. Among these polynomials we looked for examples providing infinitely many integral solutions. To reduce the time of computation a timeout was set to be 60 seconds. There are 392 cases for which the 60 seconds were not sufficient to compute the result. There are 2338 quadratic equations that yield infinitely many integral solutions and 2100 linear equations that provide parametric solutions. However, even in the case of reducibility we sometimes get factors without positive integer solutions. We present several examples. Let $A=\{1,2,4,5,6\}$ and $B=\{1,4,6,9,10\}.$ Here we obtain that $P_A(60m+22)-P_B(180n+111)$ is, up to a constant factor, equal to $f_{1}(m,n)f_{2}(m,n)$, where \begin{eqnarray*} f_{1}(m,n)&=&150m^2 + 450n^2 + 155m + 630n + 259,\\ f_{2}(m,n)&=&30m^2 - 90n^2 + 31m - 126n - 36. \end{eqnarray*} The equation $f_{1}(m,n)=0$ has no solution modulo 5. The equation $f_{2}(m,n)=0$ has infinitely many integral solutions. However, all are negative and are not of interest for us. As a second example consider $A=\{1,2,4,6,10\}$ and $B=\{1,2,5,6,8\}.$ We get that $P_A(60m+17)-P_B(120n+17)$ is, up to a constant factor, equal to $g_{1}(m,n)g_{2}(m,n)g_{3}(m,n)$, where \begin{eqnarray*} g_{1}(m,n)&=&m-2n\\ g_{2}(m,n)&=&15m + 30n + 14,\\ g_{3}(m,n)&=&75m^2 + 300n^2 + 70m + 140n + 31. \end{eqnarray*} We obtain infinitely many integral solutions from the equation $g_{1}(m,n)=0$ (however, these are trivial solutions). The other two equations have no solutions modulo 5. As a third example let $A=\{1,2,3,4,6\},B=\{1,2,4,5,10\}.$ It follows that $P_A(12m+1)-P_B(20n+1)=1/6h_{1}(m,n)h_{2}(m,n)$, where \begin{eqnarray*} h_{1}(m,n)&=&6m^2 + 10n^2 + 9m + 12n + 5\\ h_{2}(m,n)&=&6m^2 - 10n^2+ 9m - 12n. \end{eqnarray*} The equation $h_{1}(m,n)=0$ can be written as $$ 15(36m+27)^2+(180n+108)^2=6399, $$ and it follows that the only integral solution is given by $(m,n)=(-1,-1).$ The equation $h_{2}(m,n)=0$ has infinitely many positive integral solutions, the two smallest being $(m,n)=(2928,2268), (11252256,8715960)$. For given $A\in\N_{+}$ the function $P_{A}(n)$ has a dual nature: from one side it is a quasi-polynomial and hance an algebraic object. On the other side $P_{A}(n)$ is counting function and thus live in a realm of combinatorics. In this paper we mainly operated on the former side. Thus, it is natural to state the following general question. \begin{prob} Let $A, B\subset\N_{+}$. Does there exist combinatorial conditions on $A$ and $B$ which guarantees non-existence (or finiteness) of integral solutions of the Diophantine equation $P_{A}(x)=P_{B}(y)$? \end{prob} It is clear that the above problem can be stated in a grater generality. More precisely, we can ask whether there are some combinatorial conditions which guarantee that for not necessarily finite sets $A_{1}, A_{2}$, and corresponding properties $\cal{W}_{1}, \cal{W}_{2}$, the equation $p_{A_{1}}(\cal{W}_{1},x)=p_{A_{2}}(\cal{W}_{2},y)$ has only finitely many solutions in positive integers. As we mentioned above, the partition functions count combinatorial objects. Thus, equality between different partition functions at certain integer arguments is equivalent with the statement that certain finite sets have the same number of elements. This suggest the following \begin{prob} Let $A, B\subset\N_{+}$ and suppose that the Diophantine equation $p_{A}(x)=p_{B}(y)$ has infinitely many solutions in integers. Moreover, let $x=\phi(n), y=\psi(n)$ be parametrization of one (of possibly many) infinite part of the solution set, i.e., $p_{A}(\phi(n))=p_{B}(\psi(n))$ for each $n\in\N_{+}$. Describe the bijection (in combinatorial or other way) between the sets $\op{Part}(\phi(n))=\op{Part}(\psi(n))$. \end{prob} Motivated by our findings presented in Theorem \ref{P3P5} and related results we formulate the following \begin{conj} Let $m, n\in\N_{+}$. If $(m,n)\neq (3, 4)$ and $3\leq m<n$, then the Diophantine equation $P_{m}(x)=P_{n}(y)$ has only finitely many solutions in non-negative integers. \end{conj} \begin{rem} {\rm Let us note that from the recurrence relation satisfied by the sequence $\{P_{m}(k)\}_{k\in\N}$, i.e., $$ P_{m}(k)=P_{m-1}(k), k<m, \quad P_{m}(k)=P_{m-1}(k)+P_{m}(k-m),\;k\geq m, $$ we know that the equation $P_{m}(x)=P_{n}(y)$ has trivial solutions $x=y=i, i\leq m$. So, it is reasonable to consider the set $$ C_{m,n}:=\{(x, y)\in\Z\times\Z:\;P_{m}(x)=P_{n}(y)\wedge y\geq n\}. $$ We believe that much stronger property is true, i.e., $$ \bigcup_{\min\{m, n\}\geq 3, m<n, (m,n)\neq (3,4)}C_{m,n}(\N)<+\infty. $$ } \end{rem} \begin{acknowledgement} The authors are grateful to Nikolaos Tzanakis for his ideas to complete the proof of Theorem \ref{P3P5}. We are also grateful for an anonymous referee for remarks which led to improving the presentation. \end{acknowledgement} \newcommand{\noop}[1]{} \def\cprime{$'$}
\section{Derivation of Consensus Equations}\label{supp:derivation} For the first-order consensuses, we have \begin{align*} &\mathbb P(\widetilde Y_1 = j_1)=\sum_{i\in[K]}\mathbb P(\widetilde Y_1 = j_1| Y_1=i) \mathbb P(Y_1=i). \end{align*} For the second-order consensuses, we have \begin{align*} &\mathbb P(\widetilde Y_1 = j_1,\widetilde Y_2 = j_2) \\ =&\sum_{i\in[K]}\mathbb P(\widetilde Y_1 = j_1,\widetilde Y_2 = j_2| Y_1= i, Y_2 = i) \mathbb P(Y_1=Y_2=i)\\ \overset{(a)}{=}&\sum_{i\in[K]}\mathbb P(\widetilde Y_1 = j_1,\widetilde Y_2 = j_2| Y_1= i, Y_2 = i)\cdot \mathbb P(Y_1=i) \\ \overset{(b)}{=}&\sum_{i\in[K]}\mathbb P(\widetilde Y_1 = j_1| Y_1 = i)\cdot\mathbb P(\widetilde Y_2 = j_2| Y_2 = i)\cdot \mathbb P(Y_1=i), \end{align*} where equality $(a)$ holds due to the $2$-NN label clusterability, i.e., $Y_1 = Y_2 (=Y_3)$ w.p. 1, and equality $(b)$ holds due to the conditional independency between $\widetilde Y_1$ and $\widetilde Y_2$ given their clean labels. For the third-order consensuses, we have \begin{align*} &\mathbb P(\widetilde Y_1 = j_1,\widetilde Y_2 = j_2,\widetilde Y_3 = j_3) \\ =&\sum_{i\in[K]}\mathbb P(\widetilde Y_1 = j_1,\widetilde Y_2 = j_2,\widetilde Y_3 = j_3| Y_1=i, Y_2=i, Y_3=i) \mathbb P(Y_1=Y_2=Y_3=i) \\ \overset{(a)}{=}&\sum_{i\in[K]}\mathbb P(\widetilde Y_1 = j_1,\widetilde Y_2 = j_2,\widetilde Y_3 = j_3| Y_1= i, Y_2 = i, Y_3=i) \mathbb P(Y_1=i) \\ \overset{(b)}{=}&\sum_{i\in[K]}\mathbb P(\widetilde Y_1 = j_1| Y_1 = i)\mathbb P(\widetilde Y_2 = j_2| Y_2 = i)\mathbb P(\widetilde Y_3 = j_3| Y_3 = i) \mathbb P(Y_1=i). \end{align*} where equality $(a)$ holds due to the $3$-NN label clusterability, i.e., $Y_1 = Y_2 = Y_3$ w.p. 1, and equality $(b)$ holds due to the conditional independency between $\widetilde Y_1$, $\widetilde Y_2$ and $\widetilde Y_3$ given their clean labels. With the above analyses, there are $2$ first-order equations, \begin{equation*} \begin{split} \mathbb P(\widetilde Y_1=1) &= p_1(1-e_1) + (1-p_1)e_2, \\ \mathbb P(\widetilde Y_1=2) &= p_1 e_1 + (1-p_1)(1-e_2). \end{split} \end{equation*} There are $4$ second-order equations for different combinations of $\widetilde{Y}_1,\widetilde{Y}_2$, e.g., \begin{equation*} \begin{split} \mathbb P(\widetilde Y_1=1, \widetilde Y_2=1) &= p_1(1-e_1)^2 + (1-p_1)e_2^2, \\ \mathbb P(\widetilde Y_1=1, \widetilde Y_2=2) &= p_1(1-e_1)e_1 + (1-p_1)e_2(1-e_2), \\ \mathbb P(\widetilde Y_1=2, \widetilde Y_2=1) &= p_1(1-e_1)e_1 + (1-p_1)e_2(1-e_2), \\ \mathbb P(\widetilde Y_1=1, \widetilde Y_2=1) &= p_1 e_1^2 + (1-p_1)(1-e_2)^2. \end{split} \end{equation*} There are $8$ third-order equations for different combinations of $\widetilde{Y}_1,\widetilde{Y}_2, \widetilde{Y}_3$, e.g., \begin{equation*} \begin{split} \mathbb P(\widetilde Y_1=1, \widetilde Y_2=1, \widetilde Y_3=1) &= p_1(1-e_1)^3 + (1-p_1)e_2^3, \\ \mathbb P(\widetilde Y_1=1, \widetilde Y_2=1, \widetilde Y_3=2) &= p_1(1-e_1)^2 e_1 + (1-p_1) e_2^2 (1-e_2), \\ \mathbb P(\widetilde Y_1=1, \widetilde Y_2=2, \widetilde Y_3=1) &= p_1(1-e_1)^2 e_1 + (1-p_1) e_2^2 (1-e_2), \\ \mathbb P(\widetilde Y_1=1, \widetilde Y_2=2, \widetilde Y_3=2) &= p_1(1-e_1)e_1^2 + (1-p_1) e_2 (1-e_2)^2, \\ \mathbb P(\widetilde Y_1=2, \widetilde Y_2=1, \widetilde Y_3=1) &= p_1(1-e_1)^2 e_1 + (1-p_1) e_2^2 (1-e_2), \\ \mathbb P(\widetilde Y_1=2, \widetilde Y_2=1, \widetilde Y_3=2) &= p_1(1-e_1)e_1^2 + (1-p_1) e_2 (1-e_2)^2, \\ \mathbb P(\widetilde Y_1=2, \widetilde Y_2=2, \widetilde Y_3=1) &= p_1(1-e_1)e_1^2 + (1-p_1) e_2 (1-e_2)^2, \\ \mathbb P(\widetilde Y_1=2, \widetilde Y_2=2, \widetilde Y_3=2) &= p_1 e_1^3 + (1-p_1)(1-e_2)^3. \end{split} \end{equation*} For a general $K$-class classification problem, we show one first-order consensus below: \begin{align*} & {\bm{e}}_j^\top {\bm{c}}^{[1]} = \mathbb P(\widetilde Y_1 = j) \\ {=}&\sum_{i\in[K]}\mathbb P(\widetilde Y_1 = j| Y_1 = i) \mathbb P(Y_1=i) \\ {=}&\sum_{i\in[K]} T_{ij} \cdot p_i {=} {\bm{e}}_j^\top {\bm{T}}^\top \vp. \end{align*} The second-order consensus follows the example below: \begin{align*} & {\bm{e}}_j^\top {\bm{c}}^{[2]}_{r} = \mathbb P(\widetilde Y_1 = j,\widetilde Y_2 = (j+r)_K) \\ \overset{(a)}{=}&\sum_{i\in[K]}\mathbb P(\widetilde Y_1 = j| Y_1 = i)\mathbb P(\widetilde Y_2 = (j+r)_K| Y_2 = i) \mathbb P(Y_1=i) \\ {=}&\sum_{i\in[K]} T_{i,j} \cdot T_{i,(j+r)_K} \cdot p_i \overset{(b)}{=} {\bm{e}}_j^\top ({\bm{T}} \circ {\bm{T}}_r)^\top \vp, \end{align*} where equality $(a)$ holds again due to the $2$-NN label clusterability the conditional independency (similar to binary cases), and equality $(b)$ holds due to ${\bm{T}}_r[i,j] = T_{i,(j+r)_K}$. We also show one third-order consensus below: \begin{align*} & {\bm{e}}_j^\top {\bm{c}}^{[3]}_{r} = \mathbb P(\widetilde Y_1 = j,\widetilde Y_2 = (j+r)_K, \widetilde Y_3 = (j+s)_K) \\ \overset{(a)}{=}&\sum_{i\in[K]}\mathbb P(\widetilde Y_1 = j| Y_1 = i)\mathbb P(\widetilde Y_2 = (j+r)_K| Y_2 = i)\mathbb P(\widetilde Y_3 = (j+s)_K| Y_3 = i) \mathbb P(Y_1=i) \\ {=}&\sum_{i\in[K]} T_{i,j} \cdot T_{i,(j+r)_K} \cdot T_{i,(j+s)_K} \cdot p_i \overset{(b)}{=} {\bm{e}}_j^\top ({\bm{T}} \circ {\bm{T}}_r \circ {\bm{T}}_s)^\top \vp, \end{align*} where equality $(a)$ holds again due to the $3$-NN label clusterability the conditional independency (similar to binary cases), and equality $(b)$ holds due to ${\bm{T}}_r[i,j] = T_{i,(j+r)_K}$, ${\bm{T}}_s[i,j] = T_{i,(j+s)_K}$. \section{Theoretical Guarantees}\label{supp:theorem} \subsection{Uniqueness of \texorpdfstring{${\bm{T}}$}{}}\label{supp:proof_unique} We need to prove the following equations have a unique solution when ${\bm{T}}$ is non-singular and informative. \begin{tcolorbox}[colback=grey!5!white,colframe=grey!5!white] \begin{center} \textbf{Consensus Equations} \end{center} \begin{itemize}\setlength\itemsep{-0.5em}\setlength{\itemindent}{-2em} \item First-order ($K$ equations): \begin{align*} {\bm{c}}^{[1]} := {\bm{T}}^\top \vp, \end{align*} \item Second-order ($K^2$ equations): \begin{align*} {\bm{c}}^{[2]}_{r} := ({\bm{T}}\circ {\bm{T}}_r)^\top \vp, ~r \in [K], \end{align*} \item Third-order ($K^3$ equations): \begin{align*} {\bm{c}}^{[3]}_{r,s} := ({\bm{T}}\circ {\bm{T}}_r \circ {\bm{T}}_s)^\top \vp, ~r,s \in [K]. \end{align*} \end{itemize} \vspace{-12pt} \end{tcolorbox} Firstly, we need the following Lemma for the Hadamard product of matrices: \begin{lem}\cite{horn2012matrix}\label{ppt:hadamard_tr} For column vectors ${\bm{x}}$ and ${\bm{y}}$, and corresponding diagonal matrices ${\bm{D}}_{{\bm{x}}}$ and ${\bm{D}}_{{\bm{y}}}$ with these vectors as their main diagonals, the following identity holds: \[ {{\bm{x}}}^*({{\bm{A}}} \circ {{\bm{B}}}) {{\bm{y}}} = \mathrm{tr}\left({\bm{D}}_{{\bm{x}}}^* {{\bm{A}}} {\bm{D}}_{{\bm{y}}} {{\bm{B}}}^\top\right), \] where ${\bm{x}}^*$ denotes the conjugate transpose of ${\bm{x}}$. \end{lem} The following proof focuses on the second and third-order consensuses. It is worth noting that, although the first-order consensus is not necessary for the derivation of the unique solution, it still helps improve the stability of solving for ${\bm{T}}$ and $\vp$ numerically. \paragraph{Step I: Transform the second-order equations.} Denoted by ${\bm{T}}_r = {\bm{T}} {\bm{S}}_r$, where ${\bm{S}}_r$ permutes particular columns of ${\bm{T}}$. Let ${\bm{e}}_i$ be the column vector with only the $i$-th element being $1$ and $0$ otherwise. With Lemma~\ref{ppt:hadamard_tr}, the second-order consensus can be transformed as \[ {\bm{e}}_i^\top {\bm{c}}^{[2]}_{r} = {\bm{e}}_i^\top ({\bm{T}} \circ {\bm{T}}_r)^\top \vp = \mathrm{tr}\left({\bm{D}}_{{\bm{e}}_i} {{\bm{T}}}^\top {\bm{D}}_{\vp} {{\bm{T}}} {\bm{S}}_r\right) \] Then the $(i,(i+r)_K)$-th element of matrix $ {{\bm{T}}}^\top {\bm{D}}_{\vp} {{\bm{T}}}$ is \[ ({{\bm{T}}}^\top {\bm{D}}_{\vp} {{\bm{T}}})[{i,(i+r)_K}] = {\bm{e}}_i^\top {\bm{c}}^{[2]}_{r}. \] With a fixed ${\bm{e}}_i^\top {\bm{c}}^{[2]}_{r}, \forall i,r \in [K]$, denote by \begin{equation}\label{eq:prove_o2} {{\bm{T}}}^\top {\bm{D}}_{\vp} {{\bm{T}}}= {\bm{T}}_{\dag}, \end{equation} where ${\bm{T}}_{\dag}[{i,(i+r)_K}] = {\bm{e}}_i^\top {\bm{c}}^{[2]}_{r}$. Note ${\bm{T}}_\dag$ is fixed given ${\bm{c}}^{[2]}_r, \forall r\in[K]$. \paragraph{Step II: Transform the third-order equations.} Following the idea in Step I, we can also transform the third-order equations. First, notice that \[ {\bm{e}}_i^\top {\bm{c}}^{[3]}_{r,s} = {\bm{e}}_i^\top [ ({\bm{T}} \circ {\bm{T}}_s) \circ {\bm{T}}_r ]^\top \vp = \mathrm{tr}\left({\bm{D}}_{{\bm{e}}_i} ({\bm{T}} \circ {\bm{T}}_s)^\top {\bm{D}}_{\vp} {{\bm{T}}} {\bm{S}}_r \right). \] Then the $(i,(i+r)_K)$-th element of matrix $({\bm{T}} \circ {\bm{T}}_s)^\top {\bm{D}}_{\vp} {{\bm{T}}}$ is \[ (({\bm{T}} \circ {\bm{T}}_s)^\top {\bm{D}}_{\vp} {{\bm{T}}})[{i,(i+r)_K}] = {\bm{e}}_i^\top {\bm{c}}^{[3]}_{r,s}. \] With a fixed ${\bm{e}}_i^\top {\bm{c}}^{[3]}_{r,s}, \forall i,r \in [K]$, denote by \begin{equation}\label{eq:prove_o31} ({\bm{T}} \circ {\bm{T}}_s)^\top {\bm{D}}_{\vp} {{\bm{T}}} = {\bm{T}}_{\ddag,s} \Rightarrow {{\bm{T}}}^\top {\bm{D}}_{\vp} ({\bm{T}} \circ {\bm{T}}_s) = {\bm{T}}_{\ddag,s}^\top, \end{equation} where ${\bm{T}}_{\ddag,s}[{i,(i+r)_K}] = {\bm{e}}_i^\top {\bm{c}}^{[3]}_{r,s}$. According to Eqn.~(\ref{eq:prove_o2}), we have \[ {{\bm{T}}}^\top {\bm{D}}_{\vp} ({\bm{T}} \circ {\bm{T}}_s) = {{\bm{T}}}^\top {\bm{D}}_{\vp} {\bm{T}} {\bm{T}}^{-1} ({\bm{T}} \circ {\bm{T}}_s) = {\bm{T}}_{\dag} {\bm{T}}^{-1} ({\bm{T}} \circ {\bm{T}}_s) = {\bm{T}}_{\ddag,s}^\top. \] Thus \begin{equation}\label{eq:hard_problem} ({\bm{T}} \circ {\bm{T}}_s) = {\bm{T}}\mT_{\dag}^{-1}{\bm{T}}_{\ddag,s}^\top, \forall s\in[K]. \end{equation} \paragraph{Step III: From matrices to vectors} With Step I and Step II, we could transform the equations formulated by the second and the third-order consensuses to a particular system of multivariate quadratic equations of ${\bm{T}}$ in Eqn.~(\ref{eq:hard_problem}). Generally, these equations could have up to $2^{K^2}$ solutions introduced by different combinations of each element in ${\bm{T}}$. To prove the uniqueness of ${\bm{T}}$, we need to exploit the structure of the equations in (\ref{eq:hard_problem}). For a clear representation of the structure of equations and solutions, we first consider one subset of the equations in (\ref{eq:hard_problem}). Specifically, let $s=0$ we have \begin{equation}\label{eq:eq2solve} ({\bm{T}} \circ {\bm{T}}) = {\bm{T}}\mT_{\dag}^{-1}{\bm{T}}_{\ddag}^\top. \end{equation} Then we need to study the number of feasible ${\bm{T}}$ satisfying Eqn.~(\ref{eq:eq2solve}). Denote by ${\bm{A}} = {\bm{T}}_{\ddag}({\bm{T}}_{\dag}^{-1})^\top$. Then each row of ${\bm{T}}$, denoted by ${\bm{u}}^\top$, is a solution to the equation \begin{equation}\label{eq:vector_problem} {\bm{A}}{\bm{u}} = {\bm{D}}_{{\bm{u}}} {\bm{u}}~~~~~\text{(a.k.a.~} {\bm{A}}{\bm{u}} = {\bm{u}} \circ {\bm{u}} \text{)}. \end{equation} Till now, in Step III, we split the matrix ${\bm{T}}$ to several vectors ${\bm{u}}$, and transform our target from finding a matrix solution ${\bm{T}}$ for (\ref{eq:hard_problem}) to a set of vector solutions ${\bm{u}}$ for (\ref{eq:vector_problem}). Assume there are $M$ feasible ${\bm{u}}$ vectors. We collect all the possible ${\bm{u}}$ and define ${\bm{U}} := [{\bm{u}}_1, {\bm{u}}_2, \cdots, {\bm{u}}_M], {\bm{u}}_{i} \ne {\bm{u}}_{i'}, \forall i,i' \in [M]$. If $M=K$, we know there exists at most $K!$ different ${\bm{T}}$ (considering all the possible permutations of ${\bm{u}}$) that Eqn.~(\ref{eq:eq2solve}) holds. Further, by considering an informative ${\bm{T}}$ as Assumption~\ref{ap:informative}, we can identify a particular permutation. Therefore, if $M=K$ and ${\bm{T}}$ is informative, we know there exists and only exists one unique ${\bm{T}}$ that Eqn.~(\ref{eq:eq2solve}) holds. \paragraph{Step IV: Constructing the $M$-th vector} Supposing $M>K$, we have \[ {\bm{A}} {\bm{U}} = {\bm{A}} [{\bm{u}}_1, {\bm{u}}_2, \cdots, {\bm{u}}_K, \cdots {\bm{u}}_M] = [{\bm{D}}_{{\bm{u}}_1}{\bm{u}}_1, {\bm{D}}_{{\bm{u}}_2}{\bm{u}}_2, \cdots, {\bm{D}}_{{\bm{u}}_K}{\bm{u}}_K, \cdots {\bm{D}}_{{\bm{u}}_M}{\bm{u}}_M]. \] With a non-singular ${\bm{T}}$ (Assumption~\ref{ap:invT}), without loss of generality, we will assume the first $K$ columns are full-rank. Then ${\bm{u}}_M$ must be a linear combination of the first $K$ columns, i.e., ${\bm{u}}_M = \sum_{i\in[K]}\lambda_i {\bm{u}}_i = {\bm{U}} {\bm{\lambda}}_0$, where ${\bm{\lambda}}_0 = [\lambda_1,\lambda_2,\cdots,\lambda_K,0,\cdots,0]$. According to the equation ${\bm{A}}{\bm{u}} = {\bm{D}}_{{\bm{u}}} {\bm{u}} = {\bm{u}} \circ {\bm{u}}$, we have \[ {\bm{A}}{\bm{u}}_M = {\bm{D}}_{{\bm{u}}_M} {\bm{u}}_M = {\bm{D}}_{{\bm{U}}{\bm{\lambda}}_0} {\bm{U}} {\bm{\lambda}}_0, \] and \[ {\bm{A}}{\bm{u}}_M = \sum_{i\in[M]} {\bm{\lambda}}_0[i] {\bm{A}}{\bm{u}}_i = \sum_{i\in[M]} {\bm{\lambda}}_0[i] {\bm{u}}_i \circ {\bm{u}}_i = ({\bm{U}}\circ {\bm{U}}) {\bm{\lambda}}_0. \] Thus \[ ({\bm{U}}\circ {\bm{U}}) {\bm{\lambda}}_0 = {\bm{D}}_{{\bm{U}}{\bm{\lambda}}_0} {\bm{U}} {\bm{\lambda}}_0 = ({\bm{U}} {\bm{\lambda}}_0) \circ ({\bm{U}} {\bm{\lambda}}_0). \] Note that, the matrix ${\bm{U}}$ can be written as ${\bm{U}} =[{\bm{U}}_K, {\bm{U}}_{M-K}]$, and the vector ${\bm{\lambda}}_0$ can be written as ${\bm{\lambda}}_0 = [ {\bm{\lambda}}^\top, 0, \cdots, 0]^\top$, where ${\bm{\lambda}}:=[\lambda_1,\cdots,\lambda_K]^\top$. Then the above equation can be transformed as follows: \[ ({\bm{U}}_K \circ {\bm{U}}_K){\bm{\lambda}} = {\bm{u}}_M \circ {\bm{u}}_M, \text{~and~~} {\bm{U}}_K{\bm{\lambda}} = {\bm{u}}_M. \] Similarly, $\forall s\in[K]$, we have \[ ({\bm{U}}_K \circ (\bar{\bm{S}}_s{\bm{U}}_K)){\bm{\lambda}} = {\bm{u}}_M \circ (\bar{\bm{S}}_s{\bm{u}}_M), \text{~and~~} {\bm{U}}_K{\bm{\lambda}} = {\bm{u}}_M, \] where $\bar{\bm{S}}_s {\bm{u}}_M$ denotes a row circular shift such that $(\bar{\bm{S}}_s {\bm{u}}_M)[{i}] = {\bm{u}}_M[{i+s}]$. Note $\bar{\bm{S}}_s = {\bm{S}}_s^\top$. Applying Lemma~\ref{ppt:hadamard_tr}, we have \[ \mathrm{tr}( {\bm{D}}_{{\bm{e}}_i} {\bm{U}}_K {\bm{D}}_{{\bm{\lambda}}} {\bm{U}}_K^\top \bar{\bm{S}}_s^\top ) = \mathrm{tr}( {\bm{D}}_{{\bm{e}}_i} {\bm{U}}_K {\bm{D}}_{{\bm{\lambda}}} {\bm{U}}_K^\top {\bm{S}}_s ) = ({\bm{u}}_M \circ (\bar{\bm{S}}_s {\bm{u}}_M))[i] \] Then the $(i,(i+s)_K)$-th element of matrix ${\bm{U}}_K {\bm{D}}_{{\bm{\lambda}}} {\bm{U}}_K^\top$ is \[ ({\bm{U}}_K {\bm{D}}_{{\bm{\lambda}}} {\bm{U}}_K^\top)[{i,(i+s)_K}] = ({\bm{u}}_M \circ (\bar{\bm{S}}_s {\bm{u}}_M))[i] = {\bm{u}}_M[i] \cdot {\bm{u}}_M[{(i+s)_K}]. \] Then we have \[ {\bm{U}}_K {\bm{D}}_{{\bm{\lambda}}} {\bm{U}}_K^\top = {\bm{Q}}, \text{~and~~} {\bm{Q}} = {\bm{u}}_M {\bm{u}}_M^\top. \] When ${\bm{T}}$ is non-singular, we know ${\bm{U}}$ is invertible (full-rank), then \[ {\bm{D}}_{{\bm{\lambda}}} = ({\bm{U}}_K^{-1} {\bm{u}}_M) ({\bm{U}}_K^{-1} {\bm{u}}_M)^\top. \] Thus ${\sf Rank}({\bm{D}}_{{\bm{\lambda}}})=1$. Recalling $\bm{1}^\top{\bm{\lambda}} = 1$, the vector ${\bm{\lambda}}$ could only be one-hot vectors, i.e. ${\bm{e}}_i, \forall i\in[K]$. This proves ${\bm{u}}_M$ must be the same as one of ${\bm{u}}_i, i\in[K]$. \paragraph{Wrapping-up: Unique ${\bm{T}}$} From Step III, we know that, if $M=K$, we have a unique ${\bm{T}}$ under the assumption that ${\bm{T}}$ is informative and non-singular. Step IV proves the $M$-th ($M>K$) vector ${\bm{u}}$ must be identical to one of ${\bm{u}}_i, i \in [K]$, indicating we only have $M=K$ non-repetitive ${\bm{u}}$ vectors. Therefore, our consensus equations are sufficient for guaranteeing a unique ${\bm{T}}$. Besides, note there is no approximation applied during the whole proof. Thus with a perfect knowledge of ${\bm{c}}^{[\nu]},\nu=1,2,3,$ the unique ${\bm{T}}$ satisfying the consensus equations is indeed the true noise transition matrix. \subsection{Feasibility of Assumption $|E_3^*| = \Theta(N)$}\label{supp:feasibleE} We discuss the feasibility of our assumption on the number of $3$-tuples. According to the definition of $E_3^*$, we know there are no more than $|E_3^*| \le \lfloor N/3 \rfloor$ feasible $3$-tuples. Strictly deriving the lower bound for $|E_3^*|$ is challenging due to the unknown distributions of representations. To roughly estimate the order of $|E_3^*|$ (i.e., the maximum number of non-overlapping $3$-tuples), we consider a special scenario where those high-dimensional representations could be mapped to a $2$-D square of width $\sqrt{N/3}$, each grid of width $1$ has exactly $3$ mapped representations, and one mapped representation is at the center of each grid (also the center of each circle). Consider a particular construction of feasible $3$-tuples as illustrated in Figure~\ref{fig:circle}. We require that, for each grid, the $2$-NN fall in the corresponding circle. Otherwise, they may become the $2$-NN of representations in other nearby girds. Assume the $2$-NN are independently and uniformly distributed in the unit square, thus the probability of both $2$-NN falling in the circle is $(\pi/4)^2$. Noting there are $N/3$ grids in the big square illustrated in Figure~\ref{fig:circle}, the expected number of feasible $3$-tuples in this case is $\frac{\pi^2}{48}\cdot N = \Theta(N)$. Although this example only considers a special case, it demonstrates the order of $|E_3^*|$ could be $\Theta(N)$ with appropriate representations. \begin{figure}[h] \centering \includegraphics[width = 0.25\textwidth]{fig/circle.pdf} \caption{Illustration of a special case.} \label{fig:circle} \end{figure} \subsection{Proof for Lemma~\ref{lem:sample_c}}\label{supp:proof_c} Then we present the proof for Lemma~\ref{lem:sample_c}. \begin{proof} Recall in Eqn.~(\ref{eq:EM_HOC}), each high-order consensus pattern could be estimated by the sample mean of $|E_3^*|$ independent and identically distributed random variables, thus according to Hoeffding's inequality \cite{hoeffding1963probability}, w.p. $1-\delta$, we have \[ |\hat {\bm{c}}^{[i]}[j] - {\bm{c}}^{[i]}[j]| \le \sqrt{\frac{\ln \frac{2}{\delta}}{2|E_3^*|}}, i=1,2,3, \forall j, \] which is at the order of $O(\sqrt{{\ln(1/\delta)}/{N}})$. \end{proof} \subsection{Proof for Theorem~\ref{thm:sample}}\label{supp:proof_sample} Consider a particular uniform off-diagonal matrix ${\bm{T}}$, where the off-diagonal elements are $T_{ij} = \frac{1-T_{ii}}{K-1}$. Recall the clean prior probability for the $i$-th class is $p_i$. To find the upper bound for the sample complexity, we can only consider a subset of our consensus equations. Specifically, we consider the equations related to the $i$-th element of Eqn.~(\ref{eq:o1}) and Eqn.~(\ref{eq:o2}) when $r=0$. Then a solution to our consensus equations will need to satisfy at least the following two equations: \begin{align} \hat{p}_i \hat{T}_{ii} + (1-\hat{p}_i) \frac{1-\hat{T}_{ii}}{K-1} = \hat{c}_1, \label{eqn:1}\\ \hat{p}_i \hat{T}^2_{ii} + (1-\hat{p}_i) \frac{(1-\hat{T}_{ii})^2}{(K-1)^2} = \hat{c}_{2}, \label{eqn:2} \end{align} where $\hat{p}_i$ and $\hat{T}_{ii}$ denote the estimated clean prior probability and noisy transition matrix, $\hat{c}_1$ and $\hat{c}_{2}$ denote the corresponding estimates of first- and second-order statistics. Lemma~\ref{lem:sample_c} shows, with probability $1-\delta$: \[ |\hat{c}_i - c_i| \leq O\left(\sqrt{\frac{\ln(1/\delta)}{N}}\right). \] Multiplying both sides of Eqn. (\ref{eqn:1}) by $T_{ii}$ and adding Eqn. (\ref{eqn:2}), we have \[ K(K-1)\hat{p}_i \hat{T}^2_{ii} + (1-\hat{p}_i)(1-\hat{T}_{ii}) = (K-1)\hat{c}_1 \hat{T}_{ii} + (K-1)^2\hat{c}_2. \] Note the above equality also holds for the true values $p_i,T_{ii},c_1,c_2$. Taking the difference we have \begin{align*} &(\hat{T}_{ii}-T_{ii})(K(K-1)p_i (T_{ii}+\hat{T}_{ii}) - (1-p_i)-(K-1)c_1) \\ =& (K-1)^2 (\hat{c}_2-c_2) + (K-1)(\hat{c}_1 - c_1) \hat{T}_{ii} - K(K-1)\hat T_{ii}^2 (\hat p_i - p_i) - (\hat T_{ii}-1) (\hat p_i - p_i). \end{align*} Taking the absolute value for both sides yields \begin{align*} & |\hat{T}_{ii}-T_{ii}| \cdot |K(K-1)p_i (T_{ii}+\hat{T}_{ii}) - (1-p_i)-(K-1)c_1| \\ \leq & (K-1)^2 |\hat{c}_2-c_2| + (K-1)|\hat{c}_1 - c_1| + (K(K-1)+1) |\hat p_i - p_i| \end{align*} From Eqn.~(\ref{eqn:1}), we have \[ \hat p_i = \frac{K-1}{K} \frac{\hat c_1 - 1/K}{\hat T_{ii} - 1/K} + \frac{1}{K}. \] Thus \[ |\hat p_i - p_i| \le \frac{K-1}{K} \frac{|\hat c_1 - c_1|}{\min(\hat T_{ii}, T_{ii})-1/K}, \] indicating $ |\hat p_i - p_i|$ is at the order of $|\hat c_1 - c_1|$. Note that \begin{align*} K(K-1)p_i (T_{ii}+\hat{T}_{ii}) - (1-p_i)-(K-1)c_1 \geq K(K-1)p_i T_{ii} - (1-p_i)-(K-1) c_1. \end{align*} When $K(K-1)p_i T_{ii} - (1-p_i)-(K-1) c_1 > 0$, we have \begin{align*} |\hat{T}_{ii}-T_{ii}| \leq \frac{(K-1)^2 |\hat{c}_2-c_2| + (K-1)|\hat{c}_1 - c_1| + (K(K-1)+1) \frac{K-1}{K} \frac{|\hat c_1 - c_1|}{\min(\hat T_{ii}, T_{ii})-1/K} }{K(K-1)p_i T_{ii} - (1-p_i)-(K-1) c_1}. \end{align*} Then by union bound we know, w.p. $1-2\delta$, the estimation error $|\hat{T}_{ii} - T_{ii}|$ is at the same order as $|\hat{c}_i - c_i|$, i.e. $O(\sqrt{\frac{\ln(1/\delta)}{N}})$. \section{More Discussions}\label{supp:discuss} \subsection{Soft $2$-NN Label Clusterability}\label{supp:relax2nn} The soft $2$-NN label clusterability means one's $2$-NN may have a certain (but small) probability of belonging to different clean classes. Statistically, if we use a new matrix ${\bm{T}}^{\text{soft}}$ to characterize the probability of getting a different nearest neighbor, i.e. $T^{\text{soft}}_{ij} = \mathbb P(Y_{2} = j | Y_1=i) = \mathbb P(Y_{3} = j | Y_1=i)$, the second-order consensuses become ${\bm{c}}^{[2]}_{r} := ({\bm{T}}\circ ({\bm{T}}^{\text{soft}}{\bm{T}}_r))^\top \vp$ and the third-order consensuses become $ {\bm{c}}^{[3]}_{r,s} := ({\bm{T}}\circ ({\bm{T}}^{\text{soft}}{\bm{T}}_r) \circ ({\bm{T}}^{\text{soft}}{\bm{T}}_s))^\top \vp$. Specifically, if $T^{\text{soft}}_{ij} = e, \forall i\ne j$ and $T^{\text{soft}}_{ii} = 1-(K-1)e, 0 \le e<1/K$, where $e$ captures the small perturbation of the 2-NN assumption, our solution will likely output a transition matrix that affects the label noise between the effects of ${\bm{T}}^{\text{soft}}{\bm{T}}$ and ${\bm{T}}$. The above observation informs us that our estimation will be away from the true ${\bm{T}}$ by at most a factor $e$. % When $e=0$, we recover the original $2$-NN label clusterability condition. \subsection{Local \texorpdfstring{${\bm{T}}(X)$}{}}\label{supp:localT} \paragraph{Sparse regularizer} Compared with estimating one global ${\bm{T}}$ using the whole dataset of size $N$, each local estimation will have access to only $M$ instances, where $M\ll N$. Thus the feasibility of returning an accurate ${\bm{T}}(x_n)$ requires more consideration. In some particular cases, e.g., \textsf{HOC}{} Local in Table~\ref{table:cifar-inst}, when $\vp$ is sparse due to the local datasets, we usually add a regularizer to ensure a sparse $\vp$, such as $\sum_{i\in[K]}\ln (c_i + \varepsilon), \varepsilon \rightarrow 0_+$, where $c_i$ is the $i$-th element of $\vp$. Note the standard sparse regularizer, i.e. $\ell_1$-norm $\|\vp\|_1$, could not be applied here since $\|\vp\|_1 = 1$. Therefore, with a regularizer that shrinks the search space and fewer variables, we could get an accurate estimate of $T(X)$ with a small $M$. \paragraph{Other extensions} Even with $M$-NN noise clusterability, estimating ${\bm{T}}(X)$ for the whole dataset requires executing Algorithm~\ref{alg:Test} a numerous number of times ($\sim N/M$). If equipped with prior knowledge that the label noise can be divided into several groups and ${\bm{T}}={\bm{T}}(X)$ within each group \cite{xia2020parts,wang2020fair}, we only need to estimate ${\bm{T}}$ for each group by treating instances in each group as a local dataset and directly apply Algorithm~\ref{alg:Test}. As a preliminary work on estimating ${\bm{T}}$ relying on clusterability, the focus of this paper is to provide a generic method for estimating ${\bm{T}}$ given a dataset. Designing efficient algorithms to split the original dataset into a tractable number of local datasets is interesting for future investigation. \subsection{Feasibility of Assumption~\ref{ap:invT} and Assumption~\ref{ap:informative}}\label{supp:feasibilityAP} \begin{enumerate} \item Denote the confusion matrix by ${\bm{C}}[h]$, where each element is $C_{ij}[h]:=\mathbb P(Y=i,h(X)=j)$ and $h(X)=j$ represents the event that the classifier predicts $j$ given feature $X$. Then the noisy confusion matrix could be written as $\widetilde{\bm{C}}[h]:= {\bm{T}}^\top {\bm{C}}[h]$. If ${\bm{T}}$ is non-singular (a.k.a. invertible), statistically, we can always find the inverse matrix ${\bm{T}}^{-1}$ such that the clean confusion matrix could be recovered as ${\bm{C}}[h]=({\bm{T}}^{-1})^\top \widetilde{\bm{C}}[h]$. Otherwise, we may think the label noise is too ``much'' such that the clean confusion matrix is not recoverable by ${\bm{T}}$. Then learning ${\bm{T}}$ may not be meaningful anymore. Therefore, Assumption~\ref{ap:invT} is effectively ensuring the necessity of estimating ${\bm{T}}$. \item We require $T_{ii} > T_{ij}$ in Assumption~\ref{ap:informative} to ensure instances from observed class $i$ (observed from noisy labels) are informative \cite{liu2017machine}. Intuitively, this assumption characterizes a particular permutation of row vectors in ${\bm{T}}$. Otherwise, there may exist $K!$ possible solutions by considering all the permutations of $K$ rows \cite{liu2020surrogate}. \end{enumerate} \section{More Detailed Experiment Settings}\label{supp:exp_set} \subsection{Generating the Instance-Dependent Label Noise }\label{sec:instance_noise_gen} In this section, we introduce how to generate instance-based label noise, which is illustrated in Algorithm \ref{algorithm1}. Note this algorithm follows the state-of-the-art method \cite{xia2020parts,zhu2020second}. Define the noise rate (the global flipping rate) as $\eta$. To calculate the probability of $x_{n}$ mapping to each class under certain noise conditions, we set sample instance flip rates $q_{n}$ and sample parameters $W$. The size of $W$ is $ S\times K $, where $S$ denotes the length of each feature. First, we sample instance flip rates $q_{n}$ from a truncated normal distribution $\mathbf{N}(\eta, 0.1^{2}, [0, 1])$ in Line~2. The average flipping rate (a.k.a. average noise rate) is $\eta$. $q_n$ avoids all the instances having the same flip rate. Then, in Line~3, we sample parameters $W$ from the standard normal distribution for generating the instance-dependent label noise. Each column of $W$ acts as a projection vector. After acquiring $q_{n}$ and $W$, we can calculate the probability of getting a wrong label for each instance$(x_{n},y_n)$ in Lines~4~--~6. Note that in Line~5, we set $p_{y_{n}} = -\infty$, which ensures that $x_{n}$ will not be mapped to its own true label. In addition, Line~7 ensures the sum of all the entries of $p$ is 1. Suppose there are two features: ${x}_{i}$ and ${x}_{j}$ where ${x}_{i} = {x}_{j}$. Then the possibility $p$ of these two features, calculated by ${x}\cdot W$, from the Algorithm~\ref{algorithm1}, would be exactly the same. Thus the label noise is strongly instance-dependent. Note Algorithm~\ref{algorithm1} cannot ensure $T_{ii}(X)>T_{ij}(X)$ when $\eta>0.5$. To generate an informative dataset, we set $0.9 \cdot T_{ii}(X)$ as the upper bound of $T_{ij}(X)$ and distribute the remaining probability to other classes. \begin{algorithm*}[!t] \caption{Instance-Dependent Label Noise Generation} \label{algorithm1} \begin{algorithmic}[1] \renewcommand{\algorithmicrequire}{\textbf{Input:}} \renewcommand{\algorithmicensure}{\textbf{Iteration:}} \REQUIRE ~~\\ 1: Clean examples ${({x}_{n},y_{n})}_{n=1}^{N}$; Noise rate: $\eta$; Size of feature: $1\times S$; Number of classes: $K$. \ENSURE ~~\\ 2: Sample instance flip rates $q_n$ from the truncated normal distribution $\mathcal{N}(\eta, 0.1^{2}, [0, 1])$;\\ 3: Sample $W \in \mathcal{R}^{S \times K}$ from the standard normal distribution $\mathcal{N}(0,1^{2})$;\\ \textbf{for} $n = 1$ to $N$ \textbf{do} \\ 4: \qquad $p = {x}_{n} \cdot W$ ~~~~ \algcom{// Generate instance dependent flip rates. The size of $p$ is $1\times K$.} \\ 5: \qquad $p_{y_{n}} = -\infty$ ~~~~~\algcom{// Only consider entries that are different from the true label}\\ 6: \qquad $p = q_{n} \cdot \texttt{SoftMax}(p) $ ~~~~ \algcom{// Let $q_n$ be the probability of getting a wrong label} \\ 7: \qquad $p_{y_{n}} = 1 - q_{n}$ ~~~~\algcom{// Keep clean w.p. $1 - q_{n}$} \\ 8: \qquad Randomly choose a label from the label space as noisy label $\tilde{y}_{n}$ according to $p$; \\ \textbf{end for}\\ \renewcommand{\algorithmicensure}{\textbf{Output:}} \ENSURE ~~\\ 9: Noisy examples ${({x}_{i},\tilde{y}_{n})}_{n=1}^{N}$. \end{algorithmic} \end{algorithm*} \subsection{Basic Hyper-Parameters}\label{supp:hyper} To testify the classification performance, we adopt the flow: 1) Pre-training $\rightarrow$ 2) Global Training $\rightarrow$ 3) Local Training. Our \textsf{HOC}{} estimator is applied once at the beginning of each above step. Each training stage re-trains the model. In Stage-1, we load the standard ResNet50 model pre-trained on ImageNet to obtain basic representations. At the beginning of Stage-2 and Stage-3, we use the representations given by the current model. All experiments are repeated three times. \emph{\textsf{HOC}{} Global} only employs one global ${\bm{T}}$ with $G=50$ and $|E|=15k$ as inputs of Algorithm~\ref{algorithm1}. \emph{\textsf{HOC}{} Local} uses $300$ local matrices % ($250$-NN noise clusterability, $|D_{h(n)}|=250$, $G=30$, $|E|=100$) for CIFAR-10 and $5$ local matrices ($10k$-NN noise clusterability, $|D_{h(n)}|=10k$, $G=30$, $|E|=5k$) for CIFAR-100. Note the local matrices may not cover the whole dataset. For those uncovered instances, we simply apply ${\bm{T}}$. \paragraph{Other hyperparameters:} \squishlist \item Batch size: 128 (CIFAR), 32 (Clothing1M) \item Learning rate: \begin{itemize} \item CIFAR-10: Pre-training: $0.1$ for $20$ epochs $\rightarrow$ $0.01$ for $20$ epochs. Global Training: $0.1$ for $20$ epochs $\rightarrow$ $0.01$ for $20$ epochs. Local Training: $0.1$ for $60$ epochs $\rightarrow$ $0.01$ for $60$ epochs $\rightarrow$ $0.001$ for $60$ epochs. \item CIFAR-100: Pre-training: $0.1$ for $30$ epochs $\rightarrow$ $0.01$ for $30$ epochs. Global Training: $0.1$ for $30$ epochs $\rightarrow$ $0.01$ for $30$ epochs. Local Training: $0.1$ for $30$ epochs $\rightarrow$ $0.01$ for $30$ epochs $\rightarrow$ $0.001$ for $30$ epochs. \item Clothing1M: $0.01$ for $25$ epochs $\rightarrow$ $0.001$ for $25$ epochs $\rightarrow$ $0.0001$ for $15$ epochs $\rightarrow$ $0.00001$ for $15$ epochs (Pre-training, Global training, and local training) \end{itemize} \item Momentum: 0.9 \item Weight decay: 0.0005 (CIFAR) and 0.001 (Clothing1M) \item Optimizer: SGD (Model training) and Adam with initial a learning rate of $0.1$ (solving for ${\bm{T}}$) \end{list} For each epoch in Clothing1M, we sample 1000 mini-batches from the training data while ensuring the (noisy) labels are balanced. The global ${\bm{T}}$ is obtained by an average of ${\bm{T}}$ from $5$ random epochs. We only use ${\bm{T}}(X) = {\bm{T}}$ in local training. Estimating local transition matrices using \textsf{HOC}{} on Clothing1M is feasible, e.g., assuming $M$-NN noise clusterability, but it may be time-consuming to tune $M$. Noting our current performance is already satisfying, and the focus of this paper is on the ability to estimate ${\bm{T}}$, we leave the combination of ${\bm{T}}(X)$ with loss correction or other advanced techniques for future works. \subsection{Global and Local Estimation Errors on CIFAR-10 with Human Noise}\label{supp:est_error_local} Algorithm~\ref{algorithm2} details the generation of local datasets. Notice the fact that the $i$-th row of ${\bm{T}}(x_n)$ could be any feasible values when $p_i = 0$, so as the estimates $\hat{\bm{T}}_{\textsf{local}}$. In such case, we need to refer to ${\bm{T}}$ to complete the information. Particularly, we calculate the weighted average value with the corresponding $\hat{\bm{T}}$ as \begin{equation*} \hat{\bm{T}}_{\textsf{local}}[i] = (1-\zeta + \hat p_i) \hat{\bm{T}}_{\textsf{local}}[i] + (\zeta- \hat p_i) \hat{\bm{T}}[i], \end{equation*} where $\hat{\bm{T}}_{\textsf{local}}[i]$ and $\hat{\bm{T}}[i]$ denote the $i$-th row of estimates $\hat{\bm{T}}_{\textsf{local}}$ and $\hat{\bm{T}}$, $\hat p_i$ denotes the estimated clean prior probability of class-$i$ given the local dataset. We use $\zeta=1$ for local estimates of CIFAR-10, and $\zeta=0.5$ for local estimate of CIFAR-100. Figure~\ref{fig:local_illu} illustrates the variation of local estimation errors on CIFAR-10 with human noise using \textsf{HOC}{}. \begin{algorithm*}[!t] \caption{Local Datasets Generation} \label{algorithm2} \begin{algorithmic}[1] \renewcommand{\algorithmicrequire}{\textbf{Input:}} \renewcommand{\algorithmicensure}{\textbf{Iteration:}} \REQUIRE ~~\\ 1: Maximal rounds: $G'$. Local dataset size: $L$. Noisy dataset: $\widetilde{D}=\{( x_n, \tilde y_n)\}_{n\in [N]}$. Noisy dataset size: $|D|$. \ENSURE ~~\\ 2: Initialize the $|D|$-dimensional index list: $S=\bm{1}$\\ \textbf{for} $k = 1$ to $G'$ \textbf{do} \\ \qquad\textbf{if}({${\sf size}(S[S>0])>0$}) \textbf{then}\\ 3:\qquad$\text{Idx}_{\sf selected} = \texttt{random.choice}(S[S>0])$ ~~~~ \algcom{// Choose a local center index randomly from the unselected index of $\widetilde{D}$.}\\ \qquad\textbf{else}\\ 4:\qquad$\text{Idx}_{\sf selected} = \texttt{random.randint}(0, |D|)$ ~~~~ \algcom{// If the selected index has covered $\widetilde{D}$, we choose local center randomly.}\\ \qquad\textbf{end if}\\ 5:\qquad$\text{Idx}_{\sf local} = \texttt{ SelectbyDist}(\text{Idx}_{\sf selected}, L)$ ~~~~ \algcom{// Select the index of $L$ features closest to $\text{Idx}_{\sf selected}$.}\\ 6:\qquad$S[\text{Idx}_{\sf local}] = -1$ ~~~~ \algcom{// Mark the state of the selected index in $S$ to avoid duplicate selection.}\\ 7:\qquad$\widetilde D_k = \widetilde{D}[\text{Idx}_{\sf local}]$ ~~~~ \algcom{// Build a local dataset by selecting $( x_i, \tilde y_i), i \in \text{Idx}_{local}$.}\\ \textbf{end for}\\ \renewcommand{\algorithmicensure}{\textbf{Output:}} \ENSURE ~~\\ 8: Local Datasets $\widetilde D_k = \{(x_n,\tilde{y}_n)\} \cup \{(x_{n_1},\tilde y_{n_1}), \cdots, (x_{n_M},\tilde y_{n_M})\}$, $n_i, k \in [L], i\in [M]$. \end{algorithmic} \end{algorithm*} \begin{figure} \centering \includegraphics[width=0.45\textwidth]{fig/cifar10_global_local.pdf} \caption{{Illustration of the global and local estimation errors. Global estimation error: 0.0970. Local estimation errors: mean = 0.1103, standard deviation = 0.0278.}} \label{fig:local_illu} \end{figure} \section{Conclusions} This paper has proposed a new and flexible estimator of the noise transition matrix relying on the first-, second-, and third-order consensuses checking among an example and its' $2$-NN's noisy labels. Future directions of this work include extending our estimator to collaborate with other learning with noisy label techniques. We are also interested in developing algorithms to identify critical masses of instances that share similar noise rates such that our estimator can be applied to local estimation more efficiently. % \rev{ \section*{Proof Sketch for Theorem~\ref{thm:unique}} The high-level idea of the proof is to connect the Hadamard products to matrix products, and prove that any linear combination of two or more rows of ${\bm{T}}$ does not exist in ${\bm{T}}$. \textbf{Step I: Transform the second-order equations.}~ By exploiting the relation between Hadamard products and matrix products, the second-order equations can be transformed to ${{\bm{T}}}^\top {\bm{D}}_{\vp} {{\bm{T}}}= {\bm{T}}_{\dag}$, where ${\bm{T}}_\dag$ is fixed given ${\bm{c}}^{[2]}_r, \forall r\in[K]$, and ${\bm{D}}_{\vp}$ is a diagonal matrix with $\vp$ as its main diagonals, \textbf{Step II: Transform the third-order equations.}~ Following the idea in Step I, we can also transform the third-order equations to $({\bm{T}} \circ {\bm{T}}_s) = {\bm{T}}\mT_{\dag}^{-1}{\bm{T}}_{\ddag,s}^\top, \forall s\in[K]$, where ${\bm{T}}_{\ddag,s}$ is fixed given ${\bm{c}}^{[3]}_{r,s}, \forall r,s$. \textbf{Step III: From matrices to vectors}~ We analyze the rows ${\bm{u}}^\top$ of ${\bm{T}}$ and transform the equations in Step II to (e.g. $s=0$) ${\bm{A}}{\bm{u}} = {\bm{u}} \circ {\bm{u}}$, where ${\bm{A}} = {\bm{T}}_{\ddag}({\bm{T}}_{\dag}^{-1})^\top$. Then we need to find the number of feasible vectors ${\bm{u}}$. \textbf{Step IV: Construct the $(K+1)$-th vector}~ When ${\bm{T}}$ is non-singular, we prove the $(K+1)$-th solution ${\bm{u}}_{K+1}$ must be identical ${\bm{u}}_k, k\in[K]$. \textbf{Wrapping-up: Unique ${\bm{T}}$}~ Step IV shows ${\bm{T}}$ only contains $K$ different feasible rows. The informativeness of ${\bm{T}}$ ensures the unique order of these $K$ rows. Thus ${\bm{T}}$ is unique. } \section{The Power of High-Order Consensuses} % We now present our alternative to estimate ${\bm{T}}$. Our idea builds around the concept of using high-order consensuses of the noisy labels $\widetilde Y$s among each training instance and its 2-NN. In this section, we consider the case when ${\bm{T}}(X)$ is the same for different $X$, i.e., ${\bm{T}}(X) \equiv {\bm{T}}$. \subsection{Warm-up: A Binary Example} For a gentle start, consider binary cases ($K=2$) with classes $\{1,2\}$. Short-hand error rates $e_1 := T_{12}:=\mathbb P(\widetilde Y = 2|Y=1)$, $e_2:=T_{21}:=\mathbb P(\widetilde Y = 1|Y=2)$. $p_1 := \mathbb P(Y=1)$ denotes the clean prior probability of class-$1$. We are inspired by the matching mechanism for binary error rates estimation \cite{liu2017machine,liu2020surrogate}. Intuitively, with $1$-NN label clusterability, for two representations in the same dataset with minimal distance, their labels should be identical. Otherwise, we know there must be exactly one example with the corrupted label. Similarly, if $k$-NN label clusterability holds, by comparing the noisy label of one representation with its $k$-NN, we can write down the probability of the $k+1$ noisy label consensuses (including agreements and disagreements) as a function of $e_1,e_2,p_1$. \textbf{Going beyond votes from $k$-NN noisy labels}~ To infer whether the label of an instance is clean or corrupted, one could use the $2$-NN of this instance and take a majority vote. For example, if the considered instance has the label ``1'' and the other two neighbors have the label ``2'', it can be inferred that the label of the considered instance is corrupted since ``2'' is in the majority. Nonetheless, this inference would be wrong when the $2$-NN are corrupted. Increasing accuracy of the naive majority vote \cite{liu2015online} or other inference approaches \cite{liu2012variational} requires stronger clusterability that more neighbor representations should belong to the same clean class. Our approach goes beyond simply using the votes among $k$-NNs. Instead, we will rely on the statistics of high-order consensuses among the $k$-NN noisy labels. As a result, our method enjoys a robust implementation with only requiring $2$-NN label clusterability. \textbf{Consensuses in binary cases}~ We now derive our approach for the binary case to deliver our main idea. We present the general form of our estimator in the next subsection. Let $\widetilde Y_1$ be the noisy label of one particular instance, $\widetilde Y_2$ and $\widetilde Y_3$ be the noisy labels of its nearest neighbor and second nearest neighbor. With $2$-NN label clusterability, their clean labels are identical, i.e. $Y_1 = Y_2 = Y_3$. For $\widetilde Y_1$, noting $ \mathbb P(\widetilde Y_1 = j) = \sum_{i\in[K]}\mathbb P(\widetilde Y_1 = j| Y_1 = i)\cdot \mathbb P(Y_1=i), $ we have the following \textbf{two} first-order equations: \vspace{-3pt} \begin{equation*} \begin{split} \mathbb P(\widetilde Y_1=1) &= p_1(1-e_1) + (1-p_1)e_2, \\ \mathbb P(\widetilde Y_1=2) &= p_1 e_1 + (1-p_1)(1-e_2). \end{split} \end{equation*} \vspace{-3pt} For the second-order consensuses, we have {\vspace{-17pt}\small \begin{align*} &\mathbb P(\widetilde Y_1 = j_1,\widetilde Y_2 = j_2) \\ \overset{(a)}{=}&\sum_{i\in[K]}\mathbb P(\widetilde Y_1 = j_1,\widetilde Y_2 = j_2| Y_1= i, Y_2 = i)\cdot \mathbb P(Y_1=i) \\ \overset{(b)}{=}&\sum_{i\in[K]}\mathbb P(\widetilde Y_1 = j_1| Y_1 = i)\cdot\mathbb P(\widetilde Y_2 = j_2| Y_2 = i)\cdot \mathbb P(Y_1=i), \end{align*}\vspace{-17pt}} where equality $(a)$ holds due to the $2$-NN label clusterability, i.e., $Y_1 = Y_2 (=Y_3)$ w.p. 1, and equality $(b)$ holds due to the conditional independency between $\widetilde Y_1$ and $\widetilde Y_2$ given their clean labels. In total, there are \textbf{four} second-order equations for different combinations of $\widetilde{Y}_1,\widetilde{Y}_2$, e.g., % \vspace{-3pt} \begin{equation*} \begin{split} \mathbb P(\widetilde Y_1=1, \widetilde Y_2=1) &= p_1(1-e_1)^2 + (1-p_1)e_2^2, \\ \mathbb P(\widetilde Y_1=1, \widetilde Y_2=2) &= p_1(1-e_1)e_1 + (1-p_1)e_2(1-e_2). \end{split} \end{equation*} \vspace{-3pt} Similarly, given $Y_1 = Y_2 = Y_3$, there are \textbf{eight} third-order equations defined for consensuses among % $\widetilde Y_1,\widetilde Y_2,\widetilde Y_3$ , e.g., \[ \mathbb P(\widetilde Y_1=1, \widetilde Y_2=1, \widetilde Y_3=1) = p_1(1-e_1)^3 + (1-p_1)e_2^3. \] Figure~\ref{fig:illustHOC} illustrates the above consensus checking process. We leave more details and full derivations to Appendix~\ref{supp:derivation}. The left-hand side of each above equation is the probability of a particular first-, second-, or third-order consensus pattern of $\widetilde Y$, which could be estimated given the noisy dataset $\widetilde D$. These consensus patterns encode the high-order information of ${\bm{T}}$. Later in Section~\ref{sec:unique_T}, we will prove that given the consensus probability (LHS), the first three order consensus equations we presented above are sufficient to jointly identify a unique solution to ${\bm{T}}$, which indeed corresponds to the true ${\bm{T}}$. \begin{figure}[!t] \centering \includegraphics[width=0.41\textwidth]{fig/HOC-consensus_t1.pdf} \vspace{-5pt} \caption{Illustration of high-order consensuses. }% \vspace{-7pt} \label{fig:illustHOC} \end{figure} \subsection{Estimating \texorpdfstring{${\bm{T}}$}{}: The General Form}\label{sec:global} \vspace{-5pt} We generalize this idea to classifications with multiple classes. For a $K$-class classification problem, define $ \bm p:= [\mathbb P(Y=i), i\in[K]]^\top $ and \vspace{-2pt} \begin{equation}\label{eq:TS} \bm T_r := {\bm{T}} \cdot {\bm{S}}_r,~ \forall r \in [K], \vspace{-2pt} \end{equation} where ${\bm{S}}_r:=[ {\bm{e}}_{r+1}, {\bm{e}}_{r+2}, \cdots, {\bm{e}}_{K}, {\bm{e}}_{1}, {\bm{e}}_{2}, \cdots {\bm{e}}_{r}]$ is a cyclic permutation matrix, and ${\bm{e}}_{r}$ is the $K\times 1$ column vector of which the $r$-th element is $1$ and $0$ otherwise. The matrix ${\bm{S}}_r$ cyclically shifts each column of ${\bm{T}}$ to its left side by $r$ units. Similar to the previous binary example, the LHS of the equation is the probability of different distributions of $\widetilde Y$s among each instance and its $2$-NN. Let $(i+r)_K := [(i+r-1) \mod K] + 1$. For the first-, second-, and third-order consensuses, we can respectively denote them in vector forms as follows ($\forall r \in [K], s \in [K]$). {\vspace{-15pt}\small\begin{align*} {\bm{c}}^{[1]} &= [\mathbb P(\widetilde Y_1=i),i\in[K]]^\top, \\ {\bm{c}}^{[2]}_{r} &= [\mathbb P(\widetilde Y_1=i,\widetilde Y_2=(i+r)_K), i \in [K]]^\top, \\ {\bm{c}}^{[3]}_{r, s} \hspace{-2pt} &= \hspace{-2pt}[\mathbb P(\widetilde Y_1=i,\widetilde Y_2=(i+r)_K,\widetilde Y_3=(i+s)_K), i \in [K]]^\top. \end{align*}} Denote by $\circ$ the Hadamard product of two matrices. We now present the system of consensus equations for estimating ${\bm{T}}$ and $\vp$ in the general form:% \begin{tcolorbox}[colback=grey!5!white,colframe=grey!5!white] \vspace{-5pt} \begin{center} \textbf{Consensus Equations} \end{center} \vspace{-9pt} \begin{itemize}\setlength\itemsep{-0.8em}\setlength{\itemindent}{-2em} \item First-order ($K$ equations): \vspace{-5pt} \begin{align}\label{eq:o1} {\bm{c}}^{[1]} := {\bm{T}}^\top \vp, \end{align} \item Second-order ($K^2$ equations): \vspace{-5pt} \begin{align}\label{eq:o2} {\bm{c}}^{[2]}_{r} := ({\bm{T}}\circ {\bm{T}}_r)^\top \vp, ~r \in [K], \end{align} \item Third-order ($K^3$ equations): \vspace{-5pt} \begin{align}\label{eq:o3} {\bm{c}}^{[3]}_{r,s} := ({\bm{T}}\circ {\bm{T}}_r \circ {\bm{T}}_s)^\top \vp, ~r,s \in [K]. \end{align} \end{itemize} \vspace{-15pt} \end{tcolorbox} \vspace{-7pt} While we leave the full details of derivation to Appendix~\ref{supp:derivation}, we show one second-order consensus below for an example: {\vspace{-17pt} \small \begin{align*} & {\bm{e}}_j^\top {\bm{c}}^{[2]}_{r} = \mathbb P(\widetilde Y_1 = j,\widetilde Y_2 = (j+r)_K) \\ \overset{(a)}{=}&\sum_{i\in[K]}\mathbb P(\widetilde Y_1 = j| Y_1 = i)\mathbb P(\widetilde Y_2 = (j+r)_K| Y_2 = i) \mathbb P(Y_1=i) \\ {=}&\sum_{i\in[K]} T_{i,j} \cdot T_{i,(j+r)_K} \cdot p_i \overset{(b)}{=} {\bm{e}}_j^\top ({\bm{T}} \circ {\bm{T}}_r)^\top \vp, \end{align*} \vspace{-17pt} } where equality $(a)$ holds again due to the $2$-NN label clusterability and the conditional independency (similar to binary cases), and equality $(b)$ holds due to ${\bm{T}}_r[i,j] = T_{i,(j+r)_K}$. We note that although there are higher-order consensuses according to this rule, we only consider up to third-order consensuses of $\widetilde Y$ as shown in Eqns.~(\ref{eq:o1})--(\ref{eq:o3}). For ease of notation, we define two stacked vector-forms for ${\bm{c}}^{[2]}_{r,s}, {\bm{c}}^{[3]}_{r,s} $ : \vspace{-3pt} \begin{align}\label{eq:long2} {\bm{c}}^{[2]}:&=[({\bm{c}}^{[2]}_{r})^\top,\forall r\in[K]]^\top,\\ \label{eq:long3} {\bm{c}}^{[3]}:&=[({\bm{c}}^{[3]}_{r,s})^\top,\forall r,s \in [K]]^\top. \end{align} \subsection{The \textsf{HOC}{} Estimator}\label{sec:HOCestimator} Solving the consensus equations requires estimating the consensus probabilities ${\bm{c}}^{[1]}$, ${\bm{c}}^{[2]}$, and ${\bm{c}}^{[3]}$. In this subsection, we will first show the procedures for estimating these probabilities and then formulate an efficient optimization problem for ${\bm{T}}$ and $\vp$. To summarize, there are three steps: \squishlist \item \textbf{Step 1:} Find $2$-NN for each $\bar x_n$ from the noisy dataset $\widetilde D$. \item \textbf{Step 2:} Compute each $\hat{\bm{c}}^{[\nu]}$ using $\bar x_n$ and their 2-NN. % \item \textbf{Step 3:} Formulate the optimization problem in (\ref{eq:problem2}). \end{list} Denote by $E\subseteq[N]$. We elaborate on each step as follows. \vspace{-3pt} \textbf{Step 1: Find $2$-NN~} Given the noisy dataset $\{(x_n,\tilde y_n), n \in E\}$, for each representation $\bar x_n={\bm{f}}_{\sf conv}(x_n)$, we can find its $2$-NN $\bar x_{n_1}, \bar x_{n_2}$ as: {\vspace{-17pt}\small \[ n_1 = \hspace{-5pt}\argmin_{n'\in E,n'\ne n}~\hspace{-5pt}\textsf{Dist}(\bar x_n, \bar x_{n'}), ~ n_2 = \hspace{-5pt}\argmin_{n'\in E,n'\ne n\ne n_1}\hspace{-5pt}\textsf{Dist}(\bar x_n, \bar x_{n'}), \]\vspace{-17pt}} and the corresponding noisy labels $\tilde y_{n_1}, \tilde y_{n_2}$. $\textsf{Dist}(A,B)$ measures the distance between $A$ and $B$ - we will use $\textsf{Dist}$ as the negative cosine similarity in our experiment. % \textbf{Step 2: Empirical mean~} Denote by $\mathds 1\{\cdot\}$ the indicator function taking value $1$ when the specified condition is met and $0$ otherwise. Let $E$ be a set of indices and $|E|$ be the number of them. The probability of each high-order consensus could be estimated by the empirical mean using a particular set of sampled examples in $E$: $\{(\tilde y_n, \tilde y_{n_1}, \tilde y_{n_2}), n\in E\}$ as follows ($\forall i$). {\vspace{-17pt} \small \begin{align} {\hat{{\bm{c}}}}^{[1]}[i] &= \frac{1}{|E|} \sum_{n\in E}\mathds 1{\{\tilde y_n =i\}},\nonumber \\ {\hat{{\bm{c}}}}^{[2]}_{r}[i] &= \frac{1}{|E|} \sum_{n\in E}\mathds 1{\{\tilde y_n =i,\tilde y_{n_1}=(i+r)_K\}}, \label{eq:EM_HOC} \\ {\hat{{\bm{c}}}}^{[3]}_{r,s}[i] &= \frac{1}{|E|} \sum_{n\in E}\mathds 1{\{\tilde y_n =i,\tilde y_{n_1}=(i+r)_K,\tilde y_{n_2}=(i+s)_K\}}.\nonumber \end{align} \vspace{-17pt}} The motivation of identifying a subset $E$ for the estimators is due to the desired provable convergence to the expectation. Each $3$-tuple in the sample should be independent and identically distributed (i.i.d.) so that each ${\hat{{\bm{c}}}}^{[\nu]}$ is consistent. However, the existence of nearest neighbors, e.g., when both $n$ and $n_1$ belong to $E$ and $n$ is a $2$-NN of $n_1$, may violate the i.i.d. property of these $3$-tuples. Denote by \[ E_3^* = \argmax_{E\subseteq [N]} |E|,~~ \textsf{s.t.}~~ |\{ n, n_1, n_2, \forall n \in E \}| = 3|E|. \] Then any subset $E \subseteq E_3^*$ guarantees the i.i.d. property. Note it is generally time-consuming to find the best $E$. For an efficient solution (with empirical approximation), we randomly sample $|E|$ center indices from $[N]$ and repeat Step 1 and Step 2 multiple times with different $E$ (as Line~3~--~Line~8 in Algorithm~\ref{algorithm1}). We will further discuss the magnitude of $|E|$ in Section~\ref{sec:sample_cplxy} and Appendix~\ref{supp:proof_c}. \textbf{Step 3: Optimization~} With ${\hat{{\bm{c}}}}^{[1]}$, ${\hat{{\bm{c}}}}^{[2]}$, and ${\hat{{\bm{c}}}}^{[3]}$, we formulate the optimization problem in (\ref{eq:problem1}) to jointly solve for ${\bm{T}},\vp$. \vspace{-12pt} \begin{subequations}\label{eq:problem1} \begin{align} \mathop{\sf minimize}\limits_{{\bm{T}},\vp} \qquad &\sum_{\nu=1}^3\|{\hat{{\bm{c}}}}^{[\nu]} - {{{\bm{c}}}}^{[\nu]}\|_2 \label{eq:p1_obj} \\ {\sf subject~to} \qquad & \text{Eqns.~(\ref{eq:TS})~--~(\ref{eq:long3})} \label{eq:p1_var} \\ & p_{i} \ge 0, T_{ij} \ge 0, i,j\in[K] \label{eq:p1_c1}\\ & \sum_{i\in[K]} p_i = 1, \sum_{j\in[K]} T_{ij} = 1, i\in[K] \label{eq:p1_c2}. \end{align} \end{subequations} The crucial components in (\ref{eq:problem1}) are: \squishlist \item Objective (\ref{eq:p1_obj}): the sum of errors from each order of consensus, where the error is defined in $\ell_2$-norm. \item Variable definitions (\ref{eq:p1_var}): the closed-form relationship between intermediate variables (such as ${\bm{c}}^{[\nu]}$ and ${\bm{T}}_r$) and the optimized variables (${\bm{T}}$ and $\vp$). \item Constraints (\ref{eq:p1_c1}) and (\ref{eq:p1_c2}): feasibility of a solution. \end{list} \textbf{Challenges for solving the constrained optimization problem}~ The problem in (\ref{eq:problem1}) is a constrained optimization problem with $K(K+1)$ variables, $K(K+1)$ inequality constraints, and $(K+1)$ equality constraints, and it is generally hard to guarantee its convexity. Directly solving this problem using the Lagrangian-dual method may take a long time to converge \cite{boyd2004convex}. % \textbf{Unconstrained soft approximation}~ Notice that both $\vp$ and each row of ${\bm{T}}$ are probability measures. Instead of directly solving for ${\bm{T}}$ and $\vp$, we seek to relax the constraints by introducing auxiliary and unconstrained variables to represent ${\bm{T}}$ and $\vp$. % Particularly, we turn to optimizing variables $\bar{\bm{T}} \in \mathbb R^{K\times K}$ and $\bar\vp \in \mathbb R^{K}$ that are associated with ${\bm{T}}$ and $\vp$ by ${\bm{T}} := \sigma_T(\bar{\bm{T}}),~ \vp := \sigma_p (\bar \vp)$, where $\sigma_T(\cdot)$ and $\sigma_p(\cdot)$ are softmax functions such that \begin{equation}\label{eq:softmax} T_{ij} := \frac{\exp(\bar T_{ij})}{\sum_{k\in[K]}\exp(\bar T_{ik})}, ~ p_i := \frac{\exp(\bar p_{i})}{\sum_{k\in[K]}\exp(\bar p_{k})}. \end{equation} Therefore, we can drop all the constraints in (\ref{eq:problem1}) and focus on solving the unconstrained optimization problem with $K(K+1)$ variables. Our new optimization problem is given as follows: \vspace{-10pt} \begin{subequations}\label{eq:problem2} \begin{align} \mathop{\sf minimize}\limits_{\bar{\bm{T}}, \bar\vp} \qquad &\sum_{\nu=1}^3\|{\hat{{\bm{c}}}}^{[\nu]} - {{{\bm{c}}}}^{[\nu]}\|_2 \label{eq:p2_obj} \\ {\sf subject~to} \qquad & \text{Eqns.~(\ref{eq:TS})~--~(\ref{eq:long3}), Eqn.~(\ref{eq:softmax})}. \label{eq:p2_var} \end{align} \end{subequations} Equations in (\ref{eq:p2_var}) are presented only for a clear objective function. Given the solution of problem (\ref{eq:problem2}), we can calculate ${\bm{T}}$ and $\vp$ according to Eqn.~(\ref{eq:softmax}). \rev{Note the search space of ${\bm{T}}$ before and after soft approximation differs only in corner cases (before: $T_{ij}\ge 0$, after: $T_{ij}>0$). For each original and non-corner ${\bm{T}}$, there exists a soft approximated ${\bm{T}}$ that leads to the same transition probabilities. Thus the soft approximation preserves the property of ${\bm{T}}$, e.g. the uniqueness in Theorem~\ref{thm:unique}.} Algorithm~\ref{alg:Test} summarizes our High-Order-Consensus (\textsf{HOC}{}) estimator. \begin{algorithm}[tb] \caption{The \textsf{HOC}{} Estimator} \label{alg:Test} \begin{algorithmic}[1] \STATE {\bfseries Input:} Rounds: $G$. Sample size: $|E|$. Noisy dataset: $\widetilde{D}=\{( x_n, \tilde y_n)\}_{n\in [N]}$. Representation extractor: ${\bm{f}}_{\sf conv}$. \STATE {\bfseries Initialization:} Set ${\hat{{\bm{c}}}}^{[1]}$, ${\hat{{\bm{c}}}}^{[2]}$, ${\hat{{\bm{c}}}}^{[3]}$ to $0$. Extract representations $x_n\leftarrow {\bm{f}}_{\sf conv}(x_n), \forall n\in[N]$. $\bar{\bm{T}} = K{\bm{I}} - \bm{1} \bm{1}^\top$. $\bar\vp = \bm{1}/K$. \algcom{// ${\bm{I}}$: identity matrix, $\bm{1}$: all-ones column vector.} \REPEAT \label{line:rndsmp_0} \STATE $E\leftarrow$ \texttt{RndSmp}$([N],|E|)$; \algcom{// sample $|E|$ center indices} \\ \STATE $\{(\tilde y_n,\tilde y_{n_1},\tilde y_{n_2}), n\in[E]\}\leftarrow$ \texttt{Get2NN}$(\widetilde{D},E)$; \\ \hfill \algcom{// find the noisy labels of the $2$-NN of $x_n,n\in[E]$}\\ \STATE $({\hat{{\bm{c}}}}^{[1]}_{\sf{tmp}}$, ${\hat{{\bm{c}}}}^{[2]}_{\sf{tmp}}$, ${\hat{{\bm{c}}}}^{[3]}_{\sf{tmp}})\leftarrow$ \texttt{CountFreq}($E$) \algcom{// as Eqn.~(\ref{eq:EM_HOC})} \STATE ${\hat{{\bm{c}}}}^{[\nu]} \leftarrow {\hat{{\bm{c}}}}^{[\nu]} + {\hat{{\bm{c}}}}^{[\nu]}_{\sf{tmp}}, \nu \in \{1,2,3\}$; \UNTIL{$G$ times} \label{line:rndsmp_1} \STATE ${\hat{{\bm{c}}}}^{[\nu]} \leftarrow {\hat{{\bm{c}}}}^{[\nu]} / G, \nu \in \{1,2,3\}$; \hfill \algcom{// estimate ${\bm{c}}^{[\nu]}$ $G$ times} \STATE Solve the unconstrained problem % in (\ref{eq:problem2}) with ${(\hat{{\bm{c}}}}^{[1]},{\hat{{\bm{c}}}}^{[2]},{\hat{{\bm{c}}}}^{[3]})$ by gradient decent, get $\bar{\bm{T}}$ and $\bar\vp$% \STATE {\bfseries Output:} Estimates $\hat{\bm{T}} \leftarrow \sigma_T(\bar{\bm{T}}),~ \hat\vp \leftarrow \sigma_p (\bar \vp)$. \end{algorithmic} \end{algorithm} \vspace{-10pt} \subsection{Flexible Extensions to Instance-Dependent Noise}\label{sec:IDN} Algorithm~\ref{alg:Test} provides a generically applicable and light tool for fast estimation of ${\bm{T}}$. The flexibility makes it possible to be applied to more sophisticated instance-dependent label noise. We briefly discuss possible applications to estimating the local noise transition matrix ${\bm{T}}(X)$. \textbf{Locally homogeneous label noise}~ Intuitively, by considering a local dataset in which every representation shares the same ${\bm{T}}(X)$, the method in Section~\ref{sec:global} can then be applied locally to estimate the local ${\bm{T}}(X)$. % Specially, % using a ``waypoint" $\bar x_n$, we build a local dataset $\widetilde{{D}}_n$ that includes the $M$-NN of $\bar x_n$, i.e., $\widetilde D_n = \{(x_n,\tilde{y}_n)\} \cup \{(x_{n_i},\tilde y_{n_i}), \forall i\in[M]\}$, where $\{n_i, i\in[M]\}$ are the indices of the $M$-NN of $\bar x_n$. We introduce the following definitions: \begin{defn}[$M$-NN noise clusterability]\label{ap:sameT} We call $\widetilde D_n$ satisfies $M$-NN noise clusterability if the $M$-NN of $\bar x_n$ have the same noise transition matrix as $x_n$, i.e., ${\bm{T}}(x_n) = {\bm{T}}(x_{n_i}), \forall i \in [M]$. % \end{defn} \begin{defn}[$(H,M)$-coverage] We call $\widetilde{D}$ satisfies $(H,M)$-coverage if there exist $H$ instances $\bar x_{h(n)}, n\in[H]$ such that $\widetilde{D} = \cup_{n=1}^H \widetilde{D}_{h(n)}$, where each $\widetilde{D}_{h(n)}$ satisfies $M$-NN noise clusterability. % \end{defn} Note Dentition~\ref{ap:sameT} focuses on the clusterability of noise transition matrices, which is different from the clusterability of the true classes of labels. When $M$-NN noise clusterability holds for $\bar x_n$, the label noise in local dataset $\widetilde{D}_n$ is effectively homogeneous. If $\widetilde D$ further satisfies $(H,M)$-coverage, we can divide the training data $\widetilde D$ to $H$ local sub-datasets $\widetilde{D}_{h(n)}, n\in[H]$ and separately apply Algorithm~\ref{alg:Test} on each of them. The local estimates allow us to apply loss correction separately using different ${\bm{T}}(X)$ at different parts of the training data. \rev{Besides, when there is no $M$-NN noise clusterability, we may require knowing properly constructed sub-spaces to separate the data, with each part of them sharing similar noise rates \cite{xia2020extended,xia2020parts}. We leave more detailed discussions in Appendix~\ref{supp:localT}.} \section{Experiments} \begin{table*}[!t] \caption{The best epoch (clean) test accuracy (\%) with synthetic label noise.} % \begin{center} \scalebox{.8}{{\begin{tabular}{c|cccccc} \hline \multirow{2}{*}{Method} & \multicolumn{3}{c}{\emph{Inst. CIFAR-10} } & \multicolumn{3}{c}{\emph{Inst. CIFAR-100} } \\ & $\eta = 0.2$&$\eta = 0.4$&$\eta = 0.6$ & $\eta = 0.2$&$\eta = 0.4$&$\eta = 0.6$\\ \hline\hline CE (Standard) &85.66$\pm$0.62 & 76.89$\pm$0.93 & 60.29$\pm$1.17 & 57.26$\pm$1.33 & 41.33$\pm$0.89 & 25.08$\pm$1.85 \\ Peer Loss \cite{liu2019peer} &89.52$\pm$0.22 & 83.44$\pm$0.30 & 75.15$\pm$0.82 & 61.13$\pm$0.48 & 48.01$\pm$0.12 & 33.00$\pm$1.47\\ $L_{\sf DMI}$ \cite{xu2019l_dmi} &88.67$\pm$0.70 & 83.65$\pm$1.13 & 69.82$\pm$1.72 & 57.36$\pm$1.18 & 43.06$\pm$0.97 & 26.13$\pm$2.39\\ $L_{q}$ \cite{zhang2018generalized} & 85.66$\pm$1.09 & 75.24$\pm$1.07 & 61.30$\pm$3.35 & 56.92$\pm$0.24 & 40.17$\pm$1.52 & 25.58$\pm$3.12\\ Co-teaching \cite{han2018co} & 88.84$\pm$0.20 & 72.61$\pm$1.35 & 63.76$\pm$1.11 & 43.37$\pm$0.47 & 23.20$\pm$0.44 & 12.43$\pm$0.50\\ Co-teaching+ \cite{yu2019does} & 89.82$\pm$0.39 & 73.44$\pm$0.38 & 63.61$\pm$1.78 & 41.62$\pm$1.05 & 24.73$\pm$0.85 & 12.25$\pm$0.35\\ JoCoR \cite{wei2020combating} & 88.82$\pm$0.20 & 71.13$\pm$1.94 & 63.88$\pm$2.05 & 44.55$\pm$0.62 & 23.92$\pm$0.32 & 13.05$\pm$1.10\\ Forward \cite{patrini2017making} & 87.87$\pm$0.96 & 79.81$\pm$2.58 & 68.32$\pm$1.68 & 57.69$\pm$1.55 & 42.62$\pm$0.92 & 27.35$\pm$3.42\\ T-Revision \cite{xia2019anchor} & \textbf{90.31$\pm$0.37} & 84.99$\pm$0.81 & 72.06$\pm$3.40 & 58.00$\pm$0.20 & 40.01$\pm$0.32 & 40.88$\pm$7.57\\ \textsf{HOC}{} Global & {89.71$\pm$0.51} & {84.62$\pm$1.02} & {70.67$\pm$3.38} & \textbf{68.82$\pm$0.26} & \textbf{62.29$\pm$1.11} & \textbf{52.96$\pm$1.85}\\ \textsf{HOC}{} Local & \textbf{90.03$\pm$0.15} & \textbf{85.49$\pm$0.80} & \textbf{77.40$\pm$0.47} & 67.47$\pm$0.85 & 61.20$\pm$1.04 & 49.84$\pm$1.81\\ \hline \end{tabular}}} \end{center} \vspace{-7pt} \label{table:cifar-inst} \end{table*} We present experiment settings as follows. \textbf{Datasets and models~} \textsf{HOC}{} is evaluated on three benchmark datasets: CIFAR-10, CIFAR-100 \cite{krizhevsky2009learning} and Clothing1M \cite{xiao2015learning}. For the standard training step, we use ResNet34 for CIFAR-10 and CIFAR-100, and ResNet50 for Clothing1M. The representations come from the outputs before the final fully-connected layer of ResNet34/50. The distance between different representations is measured by the negative cosine similarity. \textbf{Noise type~} \textsf{HOC}{} is tested on both synthetic label noise and real-world human label noise. The synthetic label noise includes two regimes: \emph{symmetric} noise and \emph{instance-dependent} noise. For both regimes, the noise rate $\eta$ is the overall ratio of instances with a corrupted label in the whole dataset. The symmetric noise is generated by randomly flipping a clean label to the other possible classes w.p. $\eta$ \citep{xia2019anchor}. The basic idea of generating instance-dependent noise is to randomly generate one vector for each class ($K$ vectors in total) and project each incoming feature onto these $K$ vectors \cite{xia2020parts}. The label noise is added by jointly considering the clean label and the projection results. See Appendix~\ref{sec:instance_noise_gen} for more details. The \emph{real-world human noise} comes from human annotations. Particularly, for the $50,000$ training images in CIFAR-10, we \emph{re-collect} human annotations\footnote{We only collect one annotation for each image with a cost of \textcent $10$ per image.} from Amazon Mechanical Turk (MTurk) in February 2020. For the Clothing1M dataset, we train on 1 million noisy training instances reflecting the real-world human noise. \subsection{Performance of Estimating \texorpdfstring{${\bm{T}}$}{}} We compare \textsf{HOC}{} with T-revision \cite{xia2019anchor} following the flow: 1) Estimation $\rightarrow$ 2) Training $\rightarrow$ 3) Revision. For a fair comparison, we follow their training framework and parameter settings to get representations. Particularly, we obtain the same model as the one that T-revision adopts before revision. As illustrated in Figure~\ref{fig:est_err}, compared with the dynamical revision adopted in T-revision, \textsf{HOC}{} does not need to change or adapt in different epochs and still achieves lower estimation errors no matter the model is trained with forward corrected loss or reweighted loss. \subsection{Performance of Classification Accuracy} \begin{table}[tb] \caption{The best epoch test accuracy (\%) with human noise. } \begin{center} \scalebox{.75}{{ \begin{tabular}{c|cc} \hline Method & Clothing1M & Human CIFAR-10 \\ \hline \hline CE (standard) & 68.94 & 83.50\\ CORES$^2${} \cite{sieve2020} & 73.24 & 89.98\\ $L_{\sf DMI}$ \cite{xu2019l_dmi} & 72.46 & 86.33\\ Co-teaching \cite{han2018co} &69.21 & 90.39 \\ JoCoR \cite{wei2020combating} &70.30 & 90.10 \\ Forward \cite{patrini2017making} & 70.83 & 86.82\\ PTD-R-V\cite{xia2020parts} & 71.67 & 85.92 \\ \textsf{HOC}{} & \textbf{73.39} & \textbf{90.62}\\ \hline \end{tabular} }} \end{center} \vspace{-15pt} \label{table:c1m} \end{table} To test the classification performance, we adopt the flow: 1) Pre-training $\rightarrow$ 2) Global Training $\rightarrow$ 3) Local Training. Our \textsf{HOC}{} estimator is applied once at the beginning of each above step. In Stage-1, we load the standard ResNet50 model pre-trained on ImageNet to obtain basic representations. At the beginning of Stage-2 and Stage-3, we use the representations given by the current model. All experiments are repeated three times. \emph{\textsf{HOC}{} Global} only employs one global ${\bm{T}}$ with $G=50$ and $|E|=15k$ as inputs of Algorithm~\ref{algorithm1}. \emph{\textsf{HOC}{} Local} uses $300$ local matrices % ($250$-NN noise clusterability, $G=30$, $|E|=100$) for CIFAR-10 and $5$ local matrices ($10k$-NN noise clusterability, $G=30$, $|E|=5k$) for CIFAR-100.\footnote{Our unconstrained transformation provides much better convergence such that running \textsf{HOC}{} Local on CIFAR will at most double the running time of a standard training with CE.} See more details in Appendix~\ref{supp:exp_set}. Without sophisticated learning techniques, we simply feed the estimated transition matrices given by \textsf{HOC}{} into \emph{forward loss correction} \cite{patrini2017making}. We report the performance on synthetic instance-dependent label noise in Table~\ref{table:cifar-inst} and real-world human-level label noise in Table~\ref{table:c1m}. Comparing with these baselines (with similar data augmentations), both global estimates and local estimates given by \textsf{HOC}{} achieve satisfying performance, and the local estimates indeed provide sufficient performance improvement on CIFAR-10. When there are $100$ classes, ${\bm{T}}$ contains $10k$ variables thus local estimates with only $10k$ instances may not be accurate, which leads to a slight performance drop in \textsf{HOC}{} Local on CIFAR-100 (but it still outperforms other methods). \textbf{Real human-level noise}~ On CIFAR-10 with our self-collected human-level noisy labels, \textsf{HOC}{} achieves a $0.097$ estimation error in the global ${\bm{T}}$ and a $0.110\pm 0.027$ error in estimating $300$ local transition matrices. See more details in Appendix~\ref{supp:est_error_local}. \rev{ \subsection{Feasibility of $2$-NN label clusterability}\label{sec:feasibility} We show the ratio of feasible $2$-NN tuples in Table~\ref{table:2nn}. One $2$-NN tuple is called feasible if $\bar x_n$ and its $2$-NN belong to the same true class. The feature extractors are obtained from overfitting CIFAR-10/100 with different noise levels. For example, \emph{CIFAR-10 Inst.} $\eta=0.2$ indicates that we use the standard CE loss to train ResNet34 on CIFAR-10 with $20\%$ instance-dependent label noise. The convolution layers when the model approaches nearly $100\%$ training accuracy are selected as the feature extractor ${\bm{f}}_{\sf conv}(X)$. Table~\ref{table:2nn} shows, with a standard feature extractor, there are more than $2/3$ of the feasible $2$-NN tuples in most cases. Besides, reducing the sample size from $50k$ to $5k$ will not substantially reduce the ratio of feasible $2$-NN tuples. \begin{table}[!t] \caption{The ratio of feasible $2$-NN tuples with different feature extractors. $|E|=5k$: Sample $5k$ examples from the whole dataset in each round, and average over $10$ rounds. $|E|=50k$: Check the feasibility of all $2$-NN tuples.} % \begin{center} \scalebox{.75}{{\begin{tabular}{c|cccccc} \hline \multirow{2}{*}{Feature Extractor} & \multicolumn{3}{c}{\emph{CIFAR-10} } & \multicolumn{3}{c}{\emph{CIFAR-100} } \\ & $|E|=5k$&$|E|=50k$ & $|E|=5k$&$|E|=50k$\\ \hline\hline \emph{Clean} & 99.99 & 99.99 & 99.88 & 99.90 \\ \emph{Inst.} $\eta=0.2$ & 87.88 & 89.06 & 82.82 & 84.33 \\ \emph{Inst.} $\eta=0.4$ & 78.15 & 79.85 & 64.88 & 68.31\\ \hline \end{tabular}}} \end{center} \vspace{-7pt} \label{table:2nn} \end{table} } \section{Theoretical Guarantees} We will prove that our consensus equations are sufficient for estimating a unique ${\bm{T}}$, and show the advantage of our approach in terms of a better sample complexity than the anchor point approach. \subsection{Uniqueness of Solution}\label{sec:unique_T} Before formally presenting the uniqueness guarantee, we introduce two assumptions as we will need. \begin{ap}[Nonsingular ${\bm{T}}$]\label{ap:invT} The noise transition matrix is non-singular, i.e., ${\sf Rank}({\bm{T}}) = K$. \end{ap} \begin{ap}[Informative ${\bm{T}}$]\label{ap:informative} The diagonal elements of ${\bm{T}}$ are dominant, i.e., $T_{ii} > T_{ij}, \forall i \in [K], j\in[K], j\ne i$. \end{ap} Assumption~\ref{ap:invT} is commonly made in the literature and ensures the effect of label noise is invertible \cite{van2017theory}. Assumption~\ref{ap:informative} characterizes a particular permutation of row vectors in ${\bm{T}}$ \cite{liu2020surrogate}. See more discussions on their feasibility in Appendix~\ref{supp:feasibilityAP}. The uniqueness is formally stated in Theorem~\ref{thm:unique}. \rev{The proof is sketched at the end of main paper and detailed in Appendix~\ref{supp:proof_unique}.} \begin{thm}\label{thm:unique} When $\widetilde D$ satisfies the $2$-NN label clusterability and ${\bm{T}}$ is nonsingular and informative, with a perfect knowledge of ${\bm{c}}^{[\nu]}, \nu=1,2,3$, the solution of consensus equations (\ref{eq:o1})~--~(\ref{eq:o3}) returns the true ${\bm{T}}$ \underline{uniquely}. \end{thm} \textbf{Challenges}~ Proving Theorem~\ref{thm:unique} is challenging due to: 1) The coupling effect between ${\bm{T}}$ and $\vp$ makes the structure of solution ${\bm{T}}$ unclear; 2) Naively replacing $\vp$, e.g., using $\vp = ({\bm{T}}^\top)^{-1}{\bm{c}}^{[1]}$, will introduce matrix inverse, which cannot be canceled with the Hadamard product; 3) A system of third-order equations with $K^2$ variables will have up to $3^{K^2}$ solutions and the closed-form is not explicit. \textbf{Local estimates}~ Our next corollary~\ref{cor:IDN_unique} extends Theorem~\ref{thm:unique} to local datasets, when ${\bm{T}}$ can be heterogeneous. \begin{cor}\label{cor:IDN_unique} When $\widetilde{D}$ satisfies $(H,M)$-coverage, each $ \widetilde{D}_{h(n)}$ satisfies 2-NN label clusterability, and ${\bm{T}}(x_{h(n)})$ is nonsingular and informative, with a perfect knowledge of the local ${\bm{c}}^{[\nu]}, \nu=1,2,3$, the solution of consensus equations~(\ref{eq:o1})~--~(\ref{eq:o3}) is unique and recovers ${\bm{T}}(x_{h(n)})$. \end{cor} \subsection{Sample Complexity}\label{sec:sample_cplxy} We next show that with the estimates $\hat{\bm{c}}^{[1]}$, $\hat{\bm{c}}^{[2]}$, and $\hat{\bm{c}}^{[3]}$, \textsf{HOC}{} returns a reasonably well solution. Recall that, in Section~\ref{sec:HOCestimator}, Step 2 requires a particular $E\subseteq E^*_3$ to guarantee the i.i.d. property of the sample $\{(\tilde y_n, \tilde y_{n_1}, \tilde y_{n_2}), n\in E\}$. For a tractable sample complexity, we focus on a particular dataset $\widetilde D$ and feature extractor ${\bm{f}}_{\sf conv}$ such that 1) $|E_3^*|=\Theta(N)$ % and 2) $T_{ij} = \frac{1-T_{ii}}{K-1}, \forall j\ne i, i\in[N],j\in[N]$. \rev{Supposing each tuple is drawn from non-overlapping balls, condition 1) is satisfied when the number of these non-overlapping balls covering the representation space is $\Theta(N)$. See Appendix~\ref{supp:feasibleE} for a detailed example when the representations are uniformly distributed.} Lemma~\ref{lem:sample_c} shows the error upper bound of our estimates $\hat {\bm{c}}^{[\nu]}, \nu = 1,2,3.$ See Appendix~\ref{supp:proof_c} for the proof. % \begin{lem}\label{lem:sample_c} With probability $1\hspace{-1pt}-\hspace{-1pt}\delta$, $\forall \nu,l,$ the estimation error $|\hat {\bm{c}}^{[\nu]}[l] \hspace{-1pt}-\hspace{-1pt} {\bm{c}}^{[\nu]}[l]|$ is bounded at the order of $O(\sqrt{\ln(1/\delta)/N})$. \end{lem} Lemma~\ref{lem:sample_c} is effectively the sample complexity of estimating $|E_3^*|$ i.i.d. random variables by the sample mean. % Due to assuming a uniform diagonal ${\bm{T}}$, we only need to consider the estimation error of $\hat T_{ii}$. For each $i\in[K]$, see the result in Theorem~\ref{thm:sample} and the proof in Appendix~\ref{supp:proof_sample}. \begin{thm}\label{thm:sample} When $ T_{ii} > \frac{1-\mathbb P(Y=i)+(K-1) \mathbb P(\widetilde Y=i)}{K(K-1)\mathbb P(Y=i)}$, w.p. $1-2\delta$, $|\hat T_{ii}-T_{ii}|$ is bounded at the order of $O(\sqrt{{\ln(1/\delta)}/{N}})$. \end{thm} Theorem~\ref{thm:sample} indicates the sample complexity of our solution has the same order in terms of $N$ compared to a standard empirical mean estimation in Lemma~\ref{lem:sample_c}. Remark~\ref{rmk:compare} shows our approach is better than using a set of anchor points in the sample complexity. \begin{rmk}[Comparison]\label{rmk:compare} The methods based on anchor points estimate ${\bm{T}}$ with $N_{\text{AC}}<N$ ($N_{\text{AC}} \ll N$ in many cases) anchor points. Thus w.p. $1-\delta$, the estimation error is at the order of $O(\sqrt{{\ln(1/\delta)}/{N_{\text{AC}}}})$. \end{rmk} \section{Introduction} Training deep neural networks (DNNs) relies on the large-scale labeled datasets while they often include a non-negligible fraction of wrongly annotated instances. \rev{The corrupted patterns tend to be memorized by the over-parameterized DNNs \cite{xia2021robust,han2020survey}, and lead to unexpected and disparate impacts \cite{liu2021importance}.} % A variety of approaches were proposed to address the problem of learning with noisy labels. The implementations of a major line of them, e.g., \citet{patrini2017making,xiao2015learning,xia2020parts,berthon2020confidence,xia2019anchor,yao2020dual,li2021provably}, depend on accurate knowledge of the \emph{noise transition matrix} ${\bm{T}}$, which characterizes the probabilities of a training example being wrongly annotated. It has been show that \cite{liu2015classification,patrini2017making}, with perfect knowledge of ${\bm{T}}$, the minimizer of a corrected or reweighted expected risk (loss) defined on the noisy distribution is the same as the minimizer of the true expected risk (loss) of the clean distribution. % These results clearly established the power and benefits of knowing ${\bm{T}}$. Estimating ${\bm{T}}$ is challenging without accessing clean labels. Existing works on estimating ${\bm{T}}$ often rely on finding a number of high-quality anchor points \cite{scott2015rate,liu2015classification,patrini2017making}, or approximate anchor points \cite{xia2019anchor}, which are defined as the training examples that belong to a particular class almost surely. To find the anchor point, a model needs to be trained to accurately characterize the noisy label distribution. This model will help inform the selection of anchor points. {Again relying on this model, ${\bm{T}}$ is then estimated using posterior noisy label distributions of the anchor points.} While the anchor point approach observes a significant amount of successes, it suffers from several limitations: 1) accurately fitting noisy distributions is challenging when the number of label classes is high; 2) the number of anchor points restricts the estimation accuracy; and 3) it lacks the flexibility to extend to more complicated noise settings. \rev{Other methods such as confident learning \cite{northcutt2017learning,northcutt2021confident} may not explicitly identify anchor points, but they still need to fit the noisy distributions and find some ``confident points'', thus suffer from the above limitations.} In this paper, we provide an alternative to estimate ${\bm{T}}$ without resolving to anchor points. % The only requirement we need is clusterability, i.e., the \textbf{two} nearest-neighbor representations of a training example and the example itself belong to the same true label class. Our main contributions summarize as follows: \vspace{-2pt} \squishlist \item Based on the clusterability condition, we propose a novel ${\bm{T}}$ estimator by exploiting a set of high-order consensuses information among neighbor representations' noisy labels. Compared with the methods using anchor points, our estimator uses a much larger set of training examples and benefits from a much better sample complexity. \item We prove that using up to third-order consensuses is sufficient to identify the true noise transition matrix uniquely. \item Extensive empirical studies on CIFAR-10/100 datasets with synthetic noisy labels, the Clothing1M dataset with real-world human noise, and the CIFAR-10 dataset with our self-collected human annotations, demonstrate the advantage of our estimator. % \item Open-source contribution and flexible extension: we will contribute to the community 1) a generically applicable and light tool for fast estimation of the noise transition matrix. This flexible tool has the potential to be applied to more sophisticated noise settings, including instance-dependent ones (Section~\ref{sec:IDN}). 2) A noisy version of the CIFAR-10 dataset with human-level label noise. \end{list} \subsection{Related Works} In the literature of learning with label noise, a major set of works focus on designing \emph{risk-consistent} methods, i.e., performing empirical risk minimization (ERM) with specially designed loss functions on noisy distributions leads to the same minimizer as if performing ERM over the corresponding unobservable clean distribution. The \emph{noise transition matrix} is a crucial component for implementing risk-consistent methods, e.g., loss correction \cite{patrini2017making}, loss reweighting \cite{liu2015classification}, label correction \cite{xiao2015learning} and unbiased loss \cite{natarajan2013learning}. To a certain degree, the knowledge of it also helps tune hyperparameters in other approaches, e.g., label smoothing \cite{lukasik2020does}. As introduced previously, anchor points are critical for estimating the transition matrix in above mentioned existing methods - we further elaborate this in Section \ref{sec:lc}. Some recently proposed risk-consistent approaches do not require the knowledge of transition matrix, including: $L_{\sf DMI}$ \cite{xu2019l_dmi} based on an information theoretical measure, peer loss \cite{liu2019peer} \rev{by punishing over-agreements with noisy labels, robust $f$-divergence \cite{wei2021when}}, and CORES$^2$ \cite{sieve2020} built on a confidence-regularizer. However, to principally handle a more complicated case when the noise transition matrix depends on each feature locally, i.e., instance-dependent noise, the ability to estimate \emph{local transition matrices} remains a significant and favorable property. % Examples include the potential of applying local transition matrices to different groups of data \cite{xia2020parts}, using confidence scores to revise transition matrices \cite{berthon2020confidence}, and estimating the second-order information of local transition matrices \cite{zhu2020second}. Thus we need an estimation approach that scales and generalizes well to these situations. As a growing literature, we are aware of other promising approaches that do not rely on the estimation of ${\bm{T}}$, e.g., focusing on the numerical property of loss functions and designing bounded loss functions \cite{amid2019robust,amid2019two,zhang2018generalized,wang2019symmetric,gong2018decomposition,ghosh2017robust,shu2020learning}, using sample selection to pick up reliable instances from the dataset \cite{jiang2017mentornet,han2018co,yu2019does,yao2020searching,wei2020combating}, among many more. We compare to some of the popular ones using experiments. \section{Preliminaries}\label{Sec:pre} This section introduces the preliminaries, including problem formulation, anchor points, and the clusterability condition. \subsection{Our Setup} We summarize the important definitions as follows. \textbf{Clean/Noisy distribution~} The traditional classification problem with clean labels often builds on a set of $N$ training examples denoted by $D:=\{( x_n,y_n)\}_{n\in [N]},$ where $[N] := \{1,2,\cdots,N\}$. Each example $(x_n,y_n)$ could be seen as a snapshot of random variable $(X,Y)$ drawn from a clean distribution $\mathcal D$. Let $\mathcal X$ and $\mathcal Y$ denote the space of feature $X$ and label $Y$, respectively. % In our considered weakly-supervised classification problem, instead of having access to the clean dataset $D$, the learner could only obtain a noisy dataset $\widetilde D :=\{( x_n, \tilde y_n)\}_{n\in [N]},$ where the noisy label $\tilde y_n$ may or may not be the same as $y_n$. Noisy examples $(x_n,\tilde y_n)$ are generated according to random variables $(X,\widetilde Y)$ drawn from a distribution $\widetilde{\mathcal{D}}$. \textbf{Noise transition matrix~} We model the relationship between $(X,Y)$ and $(X,\widetilde Y)$ using a noise transition matrix ${\bm{T}}(X)$, where each element $T_{ij}(X)$ represents the probability of mislabeling a clean label $Y=i$ to the noisy label $\widetilde Y = j$, i.e. $T_{ij}(X):=\mathbb P(\widetilde{Y}=j|Y=i,X).$ We call ${\bm{T}}(X)$ the \emph{local} transition matrix in this paper since it is defined for a particular feature $X$. Most of the literature would focus on the case where the noise is independent of feature $X$: ${\bm{T}}(X) \equiv {\bm{T}}$. The knowledge of ${\bm{T}}$ enables a variety of learning with noisy label solutions. Below we illustrate solutions with the celebrated loss correction approach \cite{natarajan2013learning,patrini2017making}. \textbf{The learning task~} The classification task aims to identify a classifier ${\bm{f}}: \mathcal X \rightarrow \mathcal Y$ that maps $X$ to $Y$ accurately. We focus on minimizing the empirical risk using DNNs with respect to the cross-entropy (CE) loss defined as $ \ell({\bm{f}}(X),Y) = - \ln(f_X[Y]), ~ Y \in [K], $ where $f_X[Y]$ denotes the $Y$-th component of column vector ${\bm{f}}(X)$ and $K$ is the number of classes. \subsection{Loss Correction and Estimating \texorpdfstring{${\bm{T}}$}{}}\label{sec:lc} In the popular loss correction approach \cite{patrini2017making}, when the noise transition matrix is known, forward or backward loss correction can be applied to design a corrected loss. For example, the forward loss correction function can be designed as: $ \ell^{\rightarrow}({\bm{f}}(X),\widetilde Y):= \ell({\bm{T}}^\top {\bm{f}}(X),\widetilde Y), $ where ${\bm{T}}^\top$ denotes the transpose of matrix ${\bm{T}}$. If ${\bm{T}}$ is perfectly known in advance, it can be shown that the minimizer of the corrected loss under the noisy distribution is the same as the minimizer of the original loss $\ell$ under the clean distribution \cite{patrini2017making}. We would like to emphasize that in addition to loss correction, the knowledge of noise transition matrices is potentially useful in other approaches, especially when dealing with the challenging instance-dependent label noise where ${\bm{T}}(X)$ differs for different $X$. For example, it was shown that knowing ${\bm{T}}(X)$ helps improve the robustness of peer loss when the noise transition matrix differs across instances \cite{zhu2020second}, and can help improve fairness guarantees when label noise is group-dependent \cite{wang2020fair}. Knowing ${\bm{T}}$ also tends to be helpful in setting hyperparameters in sample selection \cite{han2018co} and label smoothing \cite{lukasik2020does,wei2021understanding}. \textbf{Estimating ${\bm{T}}$ with anchor points~} The traditional approach for estimating ${\bm{T}}$ relies on anchor points \cite{scott2015rate,liu2015classification}, which are defined as the training examples ($X$s) that belong to a specific class almost surely. Formally, an $x$ is an anchor point for the class $i$ if $\mathbb P(Y = i|X=x)$ is equal to one or close to one \cite{xia2019anchor}. Further, if $\mathbb P(Y = i|X = x)=1$, we have $ \mathbb P(\widetilde Y=j | X=x) = \sum_{k\in[K]} T_{kj} \mathbb P(Y=k|X=x) = T_{ij}. $ The matrix ${\bm{T}}$ can be obtained via estimating the noisy class posterior probabilities for anchor points heuristically \cite{patrini2017making} or theoretically \cite{liu2015classification}. While the anchor point approach observes a significant amount of successes, this method suffers from three major limitations: \squishlist \item The implementation of it requires that the trained model can perfectly predict the probability of the noisy labels, which is challenging when the number of classes is high, and when the number of training instances is limited. \item The number of available and identifiable anchor points can become a bottleneck even if the posterior distribution can be perfectly learned. \item The lack of flexibility to zoom into a subset of training data also limits its potential to be applied to estimate local transition matrices for more challenging instance-dependent settings \cite{xia2019anchor}. \end{list} \subsection{Clusterability} The alternative we are seeking builds on the notion of clusterability. Intuitively, clusterability implies that two instances are likely to have the same labels if they are close to each other \cite{gao2016resistance}. To facilitate the discovery of close-by instances, our solution will resolve to representation learning \cite{bengio2013representation}. Recent literature shows, even though label noise makes the model generalizes poorly, it still induces good representations \cite{li2020noisy}. {Formally, for a neural network with both convolutional layers and linear layers, e.g., ResNet \cite{he2016deep}, we denote the convolution layers by function ${\bm{f}}_{\sf conv}$ and the representations by $\bar X := {\bm{f}}_{\sf conv}(X)$.} With the above, we define $k$-Nearest-Neighbor ($k$-NN) label clusterability\footnote{Distances are measured between representations. Feature $x_n$ and its representation $\bar x_n$ refer to the same data point in different views.} as: \begin{defn}[$k$-NN label clusterability]\label{def:cluster} We call a dataset $D$ satisfies $k$-NN label clusterability if $\forall n \in [N]$, the representation $\bar x_n$ and its $k$-Nearest-Neighbor $\bar x_{n_1}, \cdots, \bar x_{n_k}$ belong to the same true class. \end{defn} \begin{figure}[!t] \centering \includegraphics[width=0.43\textwidth]{fig/HOC-clusterability_t1.pdf} \vspace{-5pt} \caption{Illustration of $k$-NN label clusterability. } \vspace{-7pt} \label{fig:illustCluster} \end{figure} \rev{ See Figure~\ref{fig:illustCluster} for an illustration of the $k$-NN clusterability. There are three primary properties of the definition: \begin{itemize}[itemsep= 1 pt,topsep = -2 pt, leftmargin = 5mm] \item The $k_1$-NN label clusterability condition is harder to satisfy than $k_2$-NN label clusterability when $k_1 > k_2$; \item The cluster containing the same clean labels is not required to be a continuum, e.g., in Figure~\ref{fig:illustCluster}, two clusters of class ``1'' can be far away; \item Our $k$-NN label clusterability only requires the existence of these feasible points, i.e., specifying the true class is not necessary. \end{itemize} } The $k$-NN label clusterability likely holds in many tasks, such as image classification when features are well-extracted by convolutional layers \cite{han2019deep,ji2019invariant,kolesnikov2019revisiting} \rev{and each feature belongs to a unique true class. The high-level intuition is that similar representations should belong to the same label class. One can consider a label generation process \cite{feldman2020does,liu2021importance} where the feature distribution is modeled as a mixture of many disjoint sub-distributions, and the labeling function maps each sub-distribution to a unique label class. Therefore, samples from the same sub-distribution have the same true label. In this paper, instead of requiring identical labels for a big cluster defined by a large $k$, we will only require the $\mathbf{2}$ nearest neighbors to have the same clean labels with the example itself, i.e., \emph{$2$-NN label clusterability}. Its feasibility will be demonstrated in Section~\ref{sec:feasibility}. \textbf{Comparison to anchor points}~ The anchor point approach relies on training a classifier to identify anchor points and the corresponding true class. Our label clusterability definition \emph{does not require the knowledge of true label class} as claimed in the third property. Moreover, if good representations are available apriori, our method is \emph{model-free}.} Next, we will elaborate our proposed ${\bm{T}}$ estimator leveraging $2$-NN label clusterability. Relaxation of $2$-NN label clusterability is discussed in Appendix~\ref{supp:relax2nn}.
\section*{References}} \captionsetup{skip=4pt} \setlength{\abovecaptionskip}{1ex} \setlength{\belowcaptionskip}{1ex} \setlength{\floatsep}{1ex} \setlength{\textfloatsep}{1ex} \newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}} \newcolumntype{M}[1]{>{\centering\arraybackslash}m{#1}} \makeatletter \renewcommand\section{\@startsection{section}{1}{\z@}% {-8\p@ \@plus -4\p@ \@minus -4\p@}% {6\p@ \@plus 4\p@ \@minus 4\p@}% {\normalfont\large\bfseries\boldmath \rightskip=\z@ \@plus 8em\pretolerance=10000 }} \renewcommand\subsection{\@startsection{subsection}{2}{\z@}% {-8\p@ \@plus -4\p@ \@minus -4\p@}% {6\p@ \@plus 4\p@ \@minus 4\p@}% {\normalfont\normalsize\bfseries\boldmath \rightskip=\z@ \@plus 8em\pretolerance=10000 }} \renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}% {-4\p@ \@plus -4\p@ \@minus -4\p@}% {-1.5em \@plus -0.22em \@minus -0.1em}% {\normalfont\normalsize\bfseries\boldmath}} \makeatother \begin{document} \title{CyberSecurity Challenges for Software Developer Awareness Training in Industrial Environments} \titlerunning{CyberSecurity Challenges for Industrial Software Developers} \author{ Tiago Gasiba\inst{1,2} \and Ulrike Lechner\inst{2} \and Maria Pinto-Albuquerque\inst{3} } \authorrunning{T. Gasiba et al.} \institute{ Siemens AG, Munich, Germany\\ \email{<EMAIL>} \and Universität der Bundeswehr München, Munich, Germany\\ \email{<EMAIL>} \email{<EMAIL>} \and Instituto Universitário de Lisboa (ISCTE-IUL), ISTAR-IUL, Lisboa, Portugal\\ \email{<EMAIL>} } \maketitle \input{001_abstract} \input{010_introduction} \input{020_related_work} \input{030_method} \input{040_csc_artifact} \input{050_results_discussions} \input{060_conclusions} \input{100_ack} \footnotesize \small \bibliographystyle{splncs04} \section{Introduction} \label{sec:introduction} Over the last years, the number of industrial security-related incidents, e.g., reported by the ICS-CERT~\cite{ICS_CERT}, has been steadily increasing. When malicious parties exploit security vulnerabilities present in products and services, the outcome of its exploitation has serious negative consequences for society, the customers, and the company that produced the software. Think, e.g., of critical infrastructures as the grid, transportation, or production lines: a security vulnerability in the code may cause interruptions in service quality or cause safety issues for society or individual customers when critical machinery fails. Several efforts can be made to increase the level of security in critical infrastructures. These efforts include, among others: analysis of threat and risks, implementing a secure software development lifecycle process, deployment of static application security testing tools, code reviews, and training. This paper addresses the software vulnerabilities through awareness training of software developers in the industry, based on a serious game: the CyberSecurity Challenges (CSC). Serious Games are games that {\it are designed for a primary purpose other than pure entertainment} \cite{2016_Doerner_Serious_Games}. The serious game "CyberSecurity Challenges" (CSC) aims at raising awareness of secure coding topics among industrial software engineers. In this game, software developers are trained to spot security vulnerabilities in software and write secure code. i.e., code that is free from known vulnerabilities and adheres to secure coding policies. Previous work introduced the CyberSecurity Challenges from a theoretical point-of-view \cite{gasiba_re19,Gasiba2020_QUATIC} and focused on particular aspects \cite{Gasiba2020_CyberICPS}. The current work extends previous publications by a presentation of a unified view on the design process, tailoring to the industry's needs and the perceived usefulness of the CSC events. Our results are based on data from several CSC events held in the industry from 2017 to 2020. As such, the main contributions of this work are: \begin{itemize} \item {\bf CSC Artifact}: consolidated view of the design and deployment of CSCs, based on results from thirteen events held in an industrial context, and \item {\bf CSC Evaluation}: analysis of results from industry events covering the following aspects: adequacy of CSC as a means to raise secure coding awareness, impact of CSC on software developers, and success factors for CSC events. \end{itemize} This paper aims to guide practitioners who wish to develop or refine a software developer awareness training in an industrial context, provide a solid reference to the research community who wishes to address serious games for the industry, and close the existing literature gap. This work is organized as follows. In the following section, we will give a summary of what CSC games are and describe its origin. Section \ref{sec:related_work} presents previous work related. In Section \ref{sec:Method}, the research method and research questions are introduced. The unified view of the CSC artifact is presented in Section \ref{sec:csc_industry}. Section \ref{sec:results} presents a summary of the survey results, together with critical discussions. Finally, Section \ref{sec:conclusions} concludes the paper with an outlook of the work and next steps. \section{Cybersecurity Challeges at a glance} The CyberSecurity Challenges (CSCs) are a serious game, designed to raise awareness for cybersecurity topics among industrial software engineers. A CSC game consists of several challenges designed to raise awareness on secure coding guidelines and secure coding on software developers. These challenges are oriented towards improving the defensive skills of the participants. Defensive challenges are challenges that help the players write code that has no (known) vulnerabilities and adheres to secure coding guidelines. The Capture-the-Flag genre was the original inspiration for the game. Capture-the-Flag (CTFs) are associated with offensive skills, e.g., system penetration, and reverse engineering, and they can often last hours or even days~\cite{mirkovic2014class}. Unlike CTF games, which teach the participants to attack and break into systems, CSC focus on improving skills to write and develop secure code. These games thus have no intention to cause any harm or inspire unlawful actions. The challenges are composed of C, C++, Java, and Web exercises. The focus on these programming languages and genre inspiration is rooted in internal demand for training and internal decisions taken in the company where CSC is developed. Thus, the games are designed to match software developers' interests and organizations' needs for developer training. This interest can be motivated by several factors, e.g., the need to show due diligence and certification purposes. The CSC event is delivered individually (Standalone) or after a workshop on secure coding (Workshop). In both cases, the duration of the event is designed to fit a single working day. During the game, the participants solve secure coding challenges related to secure coding guidelines, either individually or as part of a team. Although the challenges can include an offensive part (e.g., on how malicious parties exploit systems), the main focus and emphasis of the challenges is on developing secure software, i.e., on the defensive perspective. For each solved challenge, points are awarded, and the winner of the game is the one with the highest amount of points. Participants to the event can have either a background in a single programming language or be mixed, e.g., both C and Web developers. \section{Related Work} \label{sec:related_work} Although several methods exist to deal with software vulnerabilities, e.g., requirements engineering and code reviews, we focus on awareness training for software developers. Several previous studies indicate that software developers lack secure programming awareness and skills~\cite{Assal2019,gitlab_2019,tahaei2019survey}. In 2020, Bruce Schneier, a well-known security researcher, and evangelist stated that {\it less than 50\% of software developers can spot security vulnerabilities in software} \cite{Schneier2020}. His comment adds to a discussion on secure coding skills: In 2011, Xie et al.~\cite{Xie2011} did several interviews with 15 senior professional software developers in the industry with an average of 12 years of experience. Their study has shown a disconnect between software security concepts and their role in their jobs. Awareness training on Information security is addressed in McIlwraith \cite{McIlwraith2006}, which looks at employee behavior and provides a systematic methodology and a baseline on implementing awareness training. In their work, Stewart et al. \cite{Stewart2012} argue that communicators, e.g., trainers, must understand the audiences' constraints and supporting beliefs to provide an effective awareness program. There is a stream of literature on compliance with security policies, which deals with employees in general and not with software developers specifically. This stream of literature explores many reasons why people do not comply with IT-security policies. The unified framework by Moody et al.~\cite{moody2018toward} summarizes the academic discussion on compliance with IT-security policies. Empirical findings include that neither deterrence nor punishment such as e.g., public blame, works to increase compliance. However, increasing IT-security awareness increases the level of compliance \cite{Stewart2012}. In their seminal review article, Hänsch et al.~\cite{2014_Benenson_Defining_Security_Awareness} define IT-security awareness in the three dimensions: {\it Perception} (knowledge of existing software vulnerabilities), {\it Protection} (knowing the existing mechanisms - best practices - that avoid software vulnerabilities), and {\it Behavior} (knowledge and intention to write secure code). The concept of IT-security awareness is typically used in IT security management contexts, and we use this concept to evaluate our work. While these findings are for the compliance of employees with IT-security policies and awareness of IT security, little empirical research is done on IT-security awareness in software development and what makes software developers comply with security policies in software development. Graziotin et al.~\cite{Graziotin2018} show that \textit{happy developers are better coders}, i.e., produce higher quality code and software. Their work suggests that by keeping developers happy, we can expect that the code they write has a better quality and, by implication, be more secure. Davis et al.\cite{Davis2014} show, in their construct, that cybersecurity games have the potential to increase the overall happiness of software developers. Their conclusions support our approach to use a serious game approach to train software developers in secure coding. Awareness games are a well-established instrument in information security and are discussed in de-facto standards as the BSI Grundschutz-Katalog \cite{2016_Grundschutz_Katalog} (M 3.47, Planspiele) as one means to raise awareness and increase the level of security. Frey et al.~\cite{Maria2019} show both the potential impact of playing cybersecurity games on the participants and show the importance of playing games as a means of cybersecurity awareness. They conclude that cybersecurity games can be a useful means to build a common understanding of security issues. Rieb et al. \cite{Rieb2018} provide a review of serious games in cybersecurity and conclude that there are many approaches. However, only a few have an evaluation of their usefulness and are available beyond the immediate context of a consulting or cyber-security company. The games listed mainly address information security rather than secure coding. Documented and evaluated games are \cite{2016_Beckers_Serious_Game} and \cite{Rieb2018}. Capture-the-flag is one particular genre of serious games in the domain of Cybersecurity \cite{Davis2014}. Game participants win flags when they manage to solve a task. Forensics, cryptography, and penetration testings are skills necessary for solving tasks and capturing flags. They are considered fun, but there are hardly any empirical results on these games' effects on participants' skill levels. The present work uses serious games to achieve the goal of {\it raising secure coding awareness of software developers in the industry}. Previous work on selected design aspects and a smaller empirical basis on the CSC includes \cite{Gasiba2020_RankingSCG,Gasiba2020_PlayerProfile,gasiba_re19,Gasiba2020_CyberICPS,Gasiba2020_CyberICPS_Journal,Gasiba2020_QUATIC,Gasiba2020_TrustCOMM}. \section{Method} \label{sec:Method} The design science paradigm, according to Hevner \cite{2004_hevner_design_science}, Baskerville and Heje \cite{baskerville2010explanatory} guides our research in the industry. Design and evaluation of designs in iterative approaches are an integral part of design research: this article presents our design after 13 CSC events and the evaluation of the design. The events took place from 2017 to 2020, with more than 200 game participants. \input{tables/tbl_events} Table~\ref{tbl:csc_events} summarizes the CSC events. CSC games were designed in three design cycles: 1) Initial Design (events 1-5), 2) Refinement (events 6-9) and 3) Sifu/Online (events 10-13). The CSC events participants were all software developers specializing in web technologies and the C/C++ programming language. The events took place mostly in Germany but also in China and Turkey. The players' age ranged from 25 to 60, the background industry of the participants was critical infrastructures, in particular, industry automation (50.85\%), energy (37.29\%), and healthcare (11.86\%), the overall number of years of work experience was as follows: one year (13.7\%), two years (11.0\%), three years (19.2\%), four years (6.8\%) and five or more years (49.3\%). Regarding the average number of security training over the previous five years, the results are as follows: Germany - 3.57, China - 2.10, and Turkey 1.50. According to the first and second design cycles, the evaluation of these CSC events is structured according to the following research questions. For analysis of the survey results concerning the Sifu platform, we refer the reader to~\cite{Gasiba2020_CyberICPS}. \begin{itemize}[leftmargin=+.43in] \item[ {\bf RQ1:}] To what extent are CSC adequate to raise awareness about secure coding? \item[ {\bf RQ2:}] What is the impact that CSC workshops have on the participants? \item[ {\bf RQ3:}] Which factors are considered essential for a successful CSC event? \end{itemize} To address these research questions, the authors have conducted semi\- structured interviews (SSI) \cite{newcomer2015conducting}, and developed a small survey. The semi-structured interview questions were asked to the participants, one after another in a round-the-table. The participants' answers were recorded on paper. The semi-structured interviews were performed during the first design cycle and were part of the feedback round after the CSC event. They were based on the following questions: a) "what went well and you would you like to keep" and b) "what did not go well and would you like to change". These questions gave a good insight and allowed us to improve later versions of the game. They were also fundamental for requirements elicitation (see~\cite{gasiba_re19}). \input{tables/tbl_survey_1} The survey was administered to the CSC participants, in the refinement cycle, after completion of the event. The survey consisted of an online survey. Participation in the SSI and the survey was opt-in. Furthermore, all participants consented to participate in research, and the collected data was anonymized. We have used a more formal survey methodology to evaluate the game's usefulness concerning the level of awareness and the skills in secure coding. Table~\ref{tbl:survey:survey_1} shows the questions that were asked in the survey and the related research questions. The survey used a five-point Likert scale of agreement with the following mapping: strongly disagree (1), disagree(2), neutral (3), agree (4), and strongly agree (5). RQ1 addresses the aspect of the usefulness of the CSC artifact, and the corresponding survey questions are based on the three dimensions of awareness, as defined by Hänsch et al. \cite{2014_Benenson_Defining_Security_Awareness}: Perception (PE), Protection (PR) and Behavior (BE) (cf. Sec. Related Work). The questions for RQ2 focus on clarity of the description of the challenges, the coaches' role during the game, and the general motivation of training secure coding. These questions address the design of CSC games and events. RQ3 questions address the challenges and their relation to software developers' everyday work practices in the industry. The survey questions for RQ2 and RQ3 are based on the authors' experience in industrial software engineering, feedback from CSC evaluations of events 1 to 5, and various discussions with colleagues. All the collected data were processed using the statistics package RStudio 1.2.5019. Availability of the gathered data is provided in the same authors' included references and on a forthcoming publication. \section{Design of the CyberSecurity Challenges} \label{sec:csc_industry} In this section, we present the design of the CyberSecurity Challenges for industrial software developers. The sub-sections provide a detailed overview of the architecture, the schedule, and the design of challenges. The results presented in this section distill the experience obtained through the three design cycles of the CSC games, i.e., of the thirteen CSC events. \subsection{Architecture} \begin{figure}[http] \centering \includegraphics[width=.75\columnwidth]{figures/CSC_Architecture.pdf} \caption{Architecture of CyberSecurity Challenges infrastructure} \label{fig:CSC_Architecture} \end{figure} Figure~\ref{fig:CSC_Architecture} shows the architecture of CSC infrastructure. Each participant accesses the challenges through a computer. A server hosts the applications that run the game logic, a "countdown" clock, and a dashboard that records individual players and teams' progress. The dashboard uses the open-source CTFd \cite{chung} project. A description of the challenges will be given in the following. \subsection{CSC Time Schedule} Table~\ref{tbl:agenda} shows a typical time-plan for the one-day CSC event consisting of seven blocks: 1) welcome, 2) team building, 3) introduction, 4) main event, 5) winner announcement, 6) feedback and 7) walk-through. The last block, the walk-through, was not initially planned and is the direct result of players feedback --- the participants preferred to dedicate one hour of the main event to provide final explanations and closure on selected exercises. The authors decided to place the feedback and survey before the walk-through to increase the chance of collecting feedback from the participants. \input{tables/tbl_agenda} The duration of similar training events ranges from several days \cite{mirkovic2014class} (less common) to a single day \cite{SANS642} (more common). Note that the first CTF is done in academia, while a commercial provider does the latter. Additionally, a difference to typical Capture-the-Flag events are the two agenda items {\it Introduction} and {\it Walk-through}. \subsection{Defensive Challenges} The primary focus of the CSC game's challenges are Web and C/C++. In contrast to C/C++, for the web challenges, it was decided not to focus on a single programming language or framework since many of these programming languages and frameworks are in everyday use in the company where the CSC game was developed. In this case, we chose a generic approach based on the Open Web Application Security Project - OWASP~\cite{OWASP}. The challenges' design took two approaches: 1) based on open-source components and 2) design of own challenges. The first approach was used in the Refinement design cycle, while the second approach in the Sifu/Online design cycle. A common approach to the design of the challenges is given in~\cite{Gasiba2020_QUATIC}. Each challenge is presented to the participants according to the following phases: {\it Phase 1} - introduction, {\it Phase 2} - challenge, and {\it Phase 3} - conclusion. The types of challenges are: Single-Choice Questions (SCQ), Multiple-Choice Questions (MCQ), Text-Entry Questions (TEQ), Associate-Left-Right (ALR), Code-Snippet Challenge (CsC), and Code-Entry Challenge (CEC). Second, Phase 1 presents an introduction to the challenge and sets up the scenario; the main part of the challenge is phase 2; phase 3 concludes the challenge by adding additional text related to secure coding guidelines or additional questions related to phase 2. \subsubsection{Challenges using Open-Source Components} \input{tables/tbl_tools} Challenges on secure coding for software developers can be implemented by using and adapting existing open source components. Since most of the available projects focus on the offensive perspective, the following adaptations are suggested: 1) include an incomplete description on how to solve the challenge, and 2) provide follow-up questions related to secure coding guidelines. Fig.~\ref{fig:web_challenge_phase_1}-\ref{fig:web_challenge_phase_3} shows an example of a challenge for Web developers using OWASP JuiceShop. This challenge's learning goal is to understand what SQL injections are and how to identify an SQL injection quickly. Phase 1 sets the stage for the challenge (Fig.~\ref{fig:web_challenge_phase_1}). In Phase 2, the player is assisted with how to find the vulnerability, through the textual description, as in Fig~\ref{fig:web_challenge_phase_2}, or also directed by the game coaches. The last phase consists of an additional question related to the exercise, as shown in Fig~\ref{fig:web_challenge_phase_3}, which directs the player to secure coding guidelines. Table~\ref{tbl:tools} shows the open-source projects and components in which have been used to design CSC challenges for Web and for C/C++, along with the expected effort required to modify them. Note that the design of these challenges is based on open source components that include an offensive perspective. Therefore, after the components' adaptation, it is more natural and more accurate to describe these types of challenges as being {\it defensive/offensive}. \subsubsection{Defensive Challenges using Sifu Platform} \begin{figure}[http] \centering \begin{minipage}{.49\textwidth} \centering \includegraphics[width=.99\linewidth]{figures/Challenges2o_Web_1.pdf} \vspace*{-2em} \caption{Web Challenge: Phase 1} \label{fig:web_challenge_phase_1} \vspace*{1em} \end{minipage} \begin{minipage}{.49\textwidth} \centering \includegraphics[width=.99\linewidth]{figures/Challenges2o_Web_2.pdf} \vspace*{-2em} \caption{Web Challenge: Phase 2} \label{fig:web_challenge_phase_2} \vspace*{1em} \end{minipage} \begin{minipage}{.48\textwidth} \centering \includegraphics[width=.99\linewidth]{figures/Challenges3o_Web_3.pdf} \vspace*{-2em} \caption{Web Challenge: Phase 3} \label{fig:web_challenge_phase_3} \end{minipage} \begin{minipage}{.48\textwidth} \centering \includegraphics[width=.99\linewidth]{figures/sifu_platform_2.pdf} \vspace*{-2em} \caption{Sifu Platform} \label{fig:sifu_platform} \end{minipage} \end{figure} The Sifu platform hosts code projects containing vulnerabilities in a web application. The reason to choose a web interface is to avoid that the players need to install any software on their machine, which might be difficult in an industrial setting. The players' task is to fix the project's source code to bring it to an acceptable solution (therefore focusing on the defensive perspective). An acceptable solution is a solution where the source code is compliant to secure coding guidelines and does not have known vulnerabilities. The Sifu platform contains two main components: 1) challenge assessment and 2) an automatic coach. The challenge assessment component analyses the proposed solution submitted by a player and determines if it is acceptable. Analysis is based on several tools, e.g., compiler output, static code analysis, and dynamic code analysis. The automatic coach component is implemented through an artificial intelligence technique that provides hints to the participant when the solution is not acceptable, with the intent to guide the participant to an acceptable solution. Figure~\ref{fig:sifu_platform} shows the Sifu platform. Note that only phase 2 is shown in the figure. The player can browse the different files of the project. All the hints issued by the automatic coach are available on the right-hand side. If the player experiences errors when using the platform, these can be reported for later analysis and improvement. The Sifu platform's main advantage is that the participants do not need to install any software in their machine - a browser with internet or intranet access is sufficient. However, since untrusted and potentially malicious code will be executed in the platform during the analysis stage, several security mechanisms need to be implemented to guarantee that the players cannot hack it. These challenges were developed in the Sifu/Online design cycle, and further and detailed information on the implementation is available in~\cite{Gasiba2020_CyberICPS}. For more information about the Sifu platform we also refer the reader to \cite{Gasiba2020_CyberICPS_Journal}. \section{Results} \label{sec:results} This section presents a quantitative analysis of the CSC artifact based on the semi-structured interviews and online survey collected during the design cycles Initial Design and Refinement. \subsection{Initial Design Cycle ––– CSC 1 to 5} As discussed in section \ref{sec:Method}, in this design cycle, the participants were asked to provide feedback on what should be kept and what should be changed in the CSC event. The participants were encouraged to discuss what they felt was important openly. These discussions were used to inform the design of future CSC events. In this cycle, requirements were collected on traits that serious games for software developers in the industry should have. A summary of the findings is as follows: 1) {\it challenges should focus on the defensive perspective}, 2) {\it challenges should reflect real-world examples}, 3) {\it challenges should be aligned with the work environment}, 4) {\it careful planning in terms of duration should be performed}, and 5) {\it participants should be able to solve challenges without knowledge of extra tools}. A more in-depth analysis of the feedback and resulting requirements is available in~\cite{gasiba_re19}. \subsection{Artifact Refinement Cycle ––– CSC 6 to 9} \begin{figure}[http] \centering \includegraphics[width=1.0\columnwidth]{figures/survey_results.pdf} \vspace{-2em} \caption{Evaluation of Usefulness of CSC Events 6-9} \label{fig:survey_1_results} \end{figure} Figure~\ref{fig:survey_1_results} shows the overall results of the answers to the survey. The research questions are used to group the results. We observe an overall agreement on all the survey questions. In particular, considering negative answers (-), neutral answers (N) and positive answers (+), this table shows the following overall results for each research question: $RQ1^-=7.89\%$, $RQ1^N=16.13\%$, $RQ1^+=75.99\%$, $RQ2^-=4.82\%$, $RQ2^N=12.05\%$, $RQ2^+=83.13\%$, $RQ3^-=4.19\%$, $RQ3^N=12.56\%$, and $RQ3^+=83.26\%$. These results give a good indication that CSC games are suitable as a means to train software developers in secure coding guidelines, as the factors on awareness (RQ1) and impact on participants (RQ2) have high levels of agreement (i.e., higher than 75\%. However, we observe the difficulty in making every participant happy, in particular, due to the residual values on negative and neutral answers. Further analysis is required to understand this. Based on our experience, we believe that this fact might be correlated with the participants' previous experience. \input{tables/tbl_survey_1_rq_analysis} Table~\ref{tbl:survey_1:rq:analysis} shows a ranking of the different survey questions, grouped by research question. The ranking is performed by sorting the questions based on the average agreement value. In terms of adequacy (RQ1), and impact on the participants (RQ2), the two highest-ranking answers are: to understand the importance of SDLC (Q10), and understand consequences of a breach (Q2) for RQ1, and help from coaches (Q13), and understand the need to develop secure software (Q12) respectively. The lowest-ranked factors for RQ1 are "find more information" (Q9) and "prepared to handle secure coding issues at work" (Q3). Although the rank is low, the average agreement is positive. The surprising result obtained for Q3 is likely related to the large number of neutral answers. Further investigations are required to determine the root cause of this observation. The collected results for RQ3 serve to inform practitioners who wish to design such games for an industrial context. It provides a ranked list of factors that participants consider to have a positive impact on CSC games. The three top factors that contribute to the success of a CSC game that should be considered by practitioners who wish refine the CSC game are the following: different kinds of challenges (Q17), based on real-life examples (Q20), and participants should work in teams rather and individually (Q16). In terms of awareness, taking into consideration negative answers (-), neutral answers (N), and positive answers (+), the perception (PE), behavior (BE), and protection (PR) show the following results: PE$^-=8.04\%$, PE$^N=7.14\%$, PE$^+=84.82\%$, BE$^-=7.89\%$, BE$^N=20.79\%$, BE$^+=71.33\%$, PR$^-=7.78\%$, PR$^N=14.37\%$, PR$^+=77.84\%$. These results show similar values for the negative answers (around 8\%), which might be related to the players' background. The highest result is related to perception, which also has the least amount of neutral answers. While we observe strong agreement on the behavior and protection constructs (more than 70\%), there are still many neutral answers. We believe that the large amount of neutral answers is also related to player background and the fact that the challenge type is not purely defensive, i.e., it is defensive/offensive, as discussed in section \ref{sec:csc_industry}. The reasoning for this is based on the better results obtained in the study of the Sifu platform (see~\cite{Gasiba2020_CyberICPS}). \subsection{Sifu/Online Cycle ––– CSC 10 to 13} In this design cycle, the CSC challenges were further developed as the Sifu platform \cite{Gasiba2020_CyberICPS}. The participants were asked to evaluate the platform through 5-point Likert scale questions. Survey questions were based on the Awareness \cite{2014_Benenson_Defining_Security_Awareness}, and Happiness \cite{2018_Graziotin_Happy_Developers} dimensions. The following is a summary of the results, in terms of the three awareness dimensions: perception (PE), behavior (BE), and protection (PR); and in terms of happiness (HP). PE$^-=2.22\%$, PE$^N=8.89\%$, PE$^+=88.89\%$, BE$^-=0.0\%$, BE$^N=8.06\%$, BE$^+=91.94\%$, PR$^-=6.67\%$, PR$^N=11.11\%$, PR$^+=82.22\%$, HP$^-=8.22\%$, HP$^N=10.27\%$, HP$^+=81.51\%$. The negative results (-) correspond to strongly disagree and disagree, neutral (N) to neutral answers, and positive results (+) correspond to agree and strongly agree. A more in-depth analysis of these results, along with the Sifu platform's design, and the survey questions, can be found in \cite{Gasiba2020_CyberICPS_Journal}. The collected answers again indicate an agreement with the awareness theory, in the following sequence: behavior, perception, and finally, protection. Also, the participants report having fun and being happy while playing challenges in the Sifu platform. The Hellinger distance is used to measure the distance between two probability mass functions (PMF). The distance between the PMF of the three awareness constructs was computed to compare the results obtained in the second (refinement) and third cycle (Sifu/Online). The obtained results are as follows (from higher distance value to smaller distance value): behavior ($d=0.25$), perception ($d=0.10$), and protection ($d=0.04$). These results show that using the Sifu platform results in the most significant improvement in agreement on the behavior construct. Although both cycles indicate positive results, the participants have a more substantial agreement that solving the Sifu platform's challenges helps in actual behavior (i.e., using defensive challenges), than using defensive/offensive challenges. In terms of protection, the distance between the PMF is low (0.04), indicating that the agreement level is similar for the protection construct for both the defensive/offensive and the defensive challenges. These results were as expected since the improvements to the challenges and the corresponding design cycles performed in the Sifu platform increase the adequacy to improve software developer awareness in terms of behavior. \subsection{Discussions} In this work, we have presented and evaluated an awareness training program for software developers in the industry, which was designed through three design cycles \cite{2004_hevner_design_science}. The types of CSC challenges for each design cycle were as follows: offensive, defensive/offensive, and defensive. The initial design cycle was mostly used for requirements elicitation to further develop and refine the CyberSecurity Challenges for software developers in the industry. In the second design cycle, defensive/offensive challenges were introduced. These challenges adapt existing open-source projects to adopt a defensive perspective. Finally, in the third design cycle, defensive challenges are introduced using the Sifu platform. Our experience has shown that software developers highly appreciate playing CSC games based on direct feedback from participants. It was also observed that playing CSC games can be done as either a standalone event or after a secure coding training. Furthermore, the participants have claimed that the challenges have helped solidify, understand, and practice secure coding in real scenarios, the concepts discussed during training. While the challenges, as described for the second and third design cycle, seem to address software developers and management's needs adequately, the third design cycle was shown to result in a higher agreement in terms of behavior. Participants report on the happiness and fun in participating in these events. However, a long term study on the impact of CSC events on software quality is not possible. The reason for this is related to the large number of factors that hinder this study, which include, among others: job rotation, changing and evolving IT security technologies, discovery of new attack vectors, and evolving programming languages and programming language standards. Therefore, we need to suffice with the fact that these events are both welcome by software developers and, with the fact that CSC has had continuous management approval throughout the years, and also the fact that it has been introduced in the standard teaching curriculum in the company where it was developed. While previous work such as McIlwraith \cite{McIlwraith2006} provides a generic approach for awareness training, we show a method that explicitly addresses software developers in the industry and is based on a serious game inspired in the Capture-the-Flag format. Nevertheless, some of the traits introduced by McIlwraith are also common with our artifact, e.g., the usage of web-based media and web-based text. While the CSC artifact was designed for Web and C/C++ challenges, we think our approach can be generalized to other programming languages. Other possible usages of our artifact include a refresher on previously acquired knowledge, a self-evaluation tool for individuals, and a recruiting tool used by human resources. However, further work might be required either for non-industrial environments or participants with different backgrounds, e.g., management or human-resources. \subsection{Threats to Validity} There are threats to the validity of or findings - threats as they are typical or inherent to design research. An example of these threats is the inclusion of mixed workshops in the study, which can introduce a bias in our analysis. While the authors cannot control the types of workshops, since they were dictated internal demand, we think that the obtained conclusions also apply to these workshops. First, we evaluate the impact on awareness of IT-security topics. The path from awareness training to secure products and services is long, and other research would be needed to evaluate whether such a game has impacted the quality of code. Due to the large number of factors that affect code quality, this is, in practice, however not possible. Nevertheless, awareness is a well-established endpoint in IT security research. As in any design research, we cannot argue that our solution is the best, and we need to suffice with the argument that our artifact and outcome of research is successful, both in terms of developers happiness and management approval. There are several external variables that we cannot control in an industrial setting that can limit our evaluations' validity. Although we have explicitly mentioned to the participants that the survey questions refer to the CSC event, we cannot exclude questions' misinterpretation due to the participants' different cultural and language backgrounds. Also, we cannot exclude a bias for socially desired answers and positive bias with the game setting. However, for the validity of our findings, we refer to the fact that all game participants were industrial software engineers, and participation in the survey was not mandatory. Our results demonstrate that these are a viable method for awareness training on secure coding in the industry in terms of the CSC game's usefulness. We base this observation on the fact that it is approved by management, has high internal demand, and is liked and enjoyed by most participants. \section{Conclusions and Further Work} \label{sec:conclusions} In this work, we provide an overview of the design and implementation of CyberSecurity Challenges - a serious game to raise awareness on secure coding for software developers in the industry. The CyberSecurity Challenges have been developed following a design science research design structured in three design cycles: Initial Design, Refinement, and Sifu/Online. The design cycles extended from 2017 until 2020 and consisted of thirteen events where more than 200 software developers participated. Our contribution addresses practitioners who wish to develop or refine a software developer awareness training for the industry and the research community by understanding the usage of serious games targeting software developers in the industry. This paper consists of two main parts: 1) an overview of the design of the CyberSecurity Challenges and 2) an evaluation of the CyberSecurity Challenge game and events, including the usefulness of CyberSecurity Challenges. In the first part, we presented a consolidated view of CyberSecurity Challenges. This consolidated view is the result of all the lessons learned throughout the three design cycles. We provide an analysis and report of the main results that practitioners can use to design a similar awareness training program. We also discuss the differences and similarities to other existing awareness training programs. In the second part, we analyze results from semi-structured interviews from the first design cycle and a survey collected during the second design cycle. Overall, software developers enjoy playing CyberSecurity challenges, either as a standalone event or together with a training workshop on secure programming. Furthermore, we present results on the impact that the game has on the participants and discuss essential factors for successful awareness training. Our positive results, continuous management endorsement, and the fact that these games have been introduced as a standard part of the company's teaching curricula validate our design approach. Additionally, our results show that CyberSecurity challenges are a viable approach for awareness training on secure coding. As further steps, the authors would like to design a systematic approach to identify topics for challenges and assessing these challenges for relevance. Towards this, more empirical analyses are required. Thus, parallel and next steps include an empirical study on the awareness of various secure coding topics to tailor the challenges to different software developer groups' needs. Also, as the COVID-19 crises limits travel and physical presence, we will continue to enhance the online version of the game. We also plan to enricht the scope of defensive challenges. \section*{Acknowledgements} The authors would like to thank the participants of the CyberSecurity Challenges for their time and their valuable answers and comments. Also, the authors would also like to thank Kristian Beckers and Thomas Diefenbach for their helpful, insightful, and constructive comments and discussions. This work is financed by portuguese national funds through FCT - Fundação para a Ciência e Tecnologia, I.P., under the project FCT UIDB/04466/2020. Furthermore, the third author thanks the Instituto Universitário de Lisboa and ISTAR-IUL for their support.
\section{Introduction} The Fuzzy Dark Matter (FDM) model~\citep[e.g.,][]{Hu:2000ke} recently emerged as an alternative that can solve the small-scale challenges to the Cold Dark Matter (CDM) model, while preserving the behaviour of CDM on large scales. Due to its ultra-light mass and bosonic nature, FDM exhibits a wave-like behaviour on Galactic scales, that leads to cosmological and astrophysical consequences. The effects of these on different observables allows to constrain the one and only parameter, the particle mass $m_\psi$ of the FDM model~\citep[for reviews on these effects see][]{Ferreira:2020fam,Hui:2021tkt}. The proposed mass range for which the FDM produces a solitonic core in the interior of galaxies, thus addressing the ``core-cusp'' problem, is of the order of $m_\psi \sim 10^{-22}$~eV~\citep{Hui:2016ltb}. However, the current observations are pushing the lower bound to heavier particle masses. The suppression in the matter power spectrum induced by FDM can be measured by the Lyman-$\alpha$ forest observations, and has put a lower bound of $m_\psi \ge 10^{-20}$ eV \citep{Rogers2020}. These bounds are in tension with the previously expected canonical value of $m_\psi$ required to solve the small-scale problem. The dwarf spheroidal galaxies (dSphs), as a dark matter dominated system, are the promising astrophysical probes of the nature of dark matter. The stellar kinematic data of the dSphs therefore enable us to place constraints on the particle mass based on the dynamical analysis~\citep{Schive2014,Chen:2016unw,Gonzales-Morales:2016mkl, Hayashi2020}. However, several groups have suggested that dark matter density profiles in the luminous dSphs could be affected by baryonic physics~\citep[e.g.,][]{Read:2018fxs,Hayashi:2020jze}. For the ultra faint dwarf (UFD) galaxies, which host much smaller stellar masses than the luminous ones, the impact of baryonic feedback on their inner dark matter densities can be negligible~\citep[e.g.,][]{2020MNRAS.497.2393L} and thus the UFDs are ideal targets to derive reliable constraints on the FDM model. Nevertheless, only a few have studied the FDM model by UFDs. Using the measurement of half-light masses of two UFDs, Draco II and Triangulum II, a mass estimate of $m_{\psi} \sim 3.7-5.6 \times 10^{-22}$ eV was obtained by~\citet{Calabrese:2016hmp}. In~\cite{Safarzadeh:2019sre}, using Milky Way UFDs, a bound on $m_\psi$ was obtained, $m_\psi > 10^{-21}$~eV. This bound was compared with the bounds from the analysis of luminous dSphs, showing that those are in tension with each other. As more stellar kinematic data of UFDs become available, it is essential to perform a full Jeans analysis to update the constraint on $m_\psi$. In this letter, we perform the Jeans analysis of the stellar kinematic data of 18 UFDs to constrain $m_\psi$. We show that these systems prefer $m_\psi$ that is higher than the canonical expectation of the FDM. We compare our mass constraints to the most relevant bounds that exist in the literature and found that they are compatible within uncertainties. Among the UFDs, Segue 1 provides the most strongest constraint, which challenges the proposed canonical mass range of the FDM model with $m_\psi \sim 10^{-22} - 10^{-21}$ eV. \section{Models} To constrain $m_\psi$, we adopt here the spherical Jeans equation, which relates a stellar phase-space distribution to a dark matter halo mass distribution. For a spherically symmetric system in dynamical equilibrium, this is given by~\cite{2008gady.book.....B}: \begin{equation} \frac{\partial[\nu(r)\sigma^2_r(r)]}{\partial r} + \frac{2\nu(r)\beta_{\mathrm{ani}}(r)\sigma^2_r(r)}{r} = -\nu(r)\frac{GM(r)}{r^2}\,, \label{eq:Jeans} \end{equation} where $r$ denotes the radius from the center of a system, $\nu(r)$ is the three dimensional stellar density distribution, $G$ is the gravitational constant, and $M(r)$ is the dark matter mass distribution. The stellar velocity ellipsoid defined by $(\sigma_r,\sigma_{\theta},\sigma_{\phi})$ is equationed with spherical coordinates. Since $\sigma_{\theta}=\sigma_{\phi}$ for spherical symmetry, the stellar velocity anisotropy is written as $\beta_{\mathrm{ani}}(r)\equiv1-\sigma^2_{\theta}(r)/\sigma^2_{r}(r)$. Here, we adopt a general and realistic stellar anisotropy model proposed by \cite{Baes:2007tx}: \begin{equation} \label{eq:anisotropy} \beta_{\mathrm{ani}}(r) = \frac{\beta_0+\beta_{\infty}(r/r_{\beta})^{\eta}}{1+(r/r_{\beta})^{\eta}}\,, \end{equation} where $\beta_0$ and $\beta_{\infty}$ are the inner and outer anisotropy parameters. The spatial dependence of $\beta_{\mathrm{ani}}$ is characterized by the transition sharpness $\eta$ and radius $r_{\beta}$. To compare observed line-of-sight velocity dispersion profiles with the model, we project the radial dispersion profile from equation~(\ref{eq:Jeans}) into the line-of-sight direction: \begin{equation} \label{eq:losdisp} \Sigma(R)\sigma_{\mathrm{ los}}^2(R)=2\int_R^\infty\!\! dr \Bigl(1-\beta_{\mathrm{ani}}(r)\frac{R^2}{r^2}\Bigr)\frac{\nu(r)\sigma_r^2(r)}{\sqrt{1-R^2/r^2}}\,, \end{equation} where $R$ is the projected radius, and $\Sigma(R)$ is the projected stellar density profile derived from the intrinsic stellar density $\nu(r)$, and $\sigma_{\mathrm{los}}$ is the line-of-sight velocity dispersion. In this work, we assume the Plummer profile for the stellar density profile~\citep{Plummer:1911zza}, $\Sigma(R)=(\pi r^2_{\mathrm{half}})^{-1} [1+R^2/r^2_{\mathrm{half}}]^{-2}$ where $r_{\mathrm{half}}$ is the projected half-light radius. FDM can form a soliton core in the central parts of a galaxy, which corresponds to the ground state solution of the Schr\"odinger-Poisson equation. Owing to high-resolution FDM simulations~\citep[e.g.,][]{Schive2014}, the radial profile of the soliton core can be written analytically: \begin{equation} \rho_{\rm soliton}(r) = \frac{\rho_c}{[1+0.091(r/r_c)^2]^8}\,, \label{eq:soliton_dens} \end{equation} where $r_c$ is the soliton core radius and $\rho_c$ is the central density given by \begin{equation} \rho_{c} = 1.9\times10^{12} \Bigl(\frac{m_{\psi}}{10^{-23}\ {\rm eV}}\Bigr)^{-2} \Bigl(\frac{r_c}{{\rm pc}}\Bigr)^{-4} \ [M_{\odot}\ {\rm pc}^{-3}]\,. \end{equation} The mass profile, $M_{\rm soliton}(r)=\int^{r}_{0}4\pi\,s^2\rho(s)ds$ can be also calculated analytically~\citep{Chen:2016unw}. The simulations also predicted the scaling relation between a soliton core radius, particle mass, and dark halo mass, \begin{equation} r_c \simeq 1600\left(\frac{m_{\psi}}{10^{-23} \mathrm{eV}}\right)^{-1} \left(\frac{M_{\mathrm200}}{10^{12}M_{\odot}}\right)^{-1/3}\ \mathrm{pc}\,, \label{eq:scaling} \end{equation} where $M_\mathrm{200}$ is the enclosed mass within $r_\mathrm{200}$ in which the spherical overdensity is 200 times the critical density of the universe. We thus determine the soliton core radius $r_c$, given $m_\psi$ and $M_{\mathrm{200}}$ as free parameters. Beyond the core radius, the halo profile is akin to a Navarro-Frenk-White~(NFW) profile~\citep{Navarro:1996gj}, \begin{equation} \rho_{\mathrm{NFW}}(r) = \frac{\rho_{s}}{(r/r_s)(1+r/r_s)^2}\,. \end{equation} To transition from the central soliton core to the outer NFW halo, we impose a density continuity condition at the radius $r_\epsilon$, \begin{equation} \frac{\rho_{s}}{(r_\epsilon/r_s)(1+r_\epsilon/r_s)^2}=\frac{\rho_{c}}{[1+0.091(r_\epsilon/r_c)^2]^8} = \epsilon\rho_c\,, \end{equation} and $r_\epsilon$ can be derived as $r_\epsilon=(0.091)^{-1/2}r_c(\epsilon^{-1/8}-1)^{1/2}$. Thus, when $\epsilon$ and $r_s$ are given, $\rho_s$ can be determined. According to the numerical simulations~\citep{Schive2014,Mocz:2018ium}, $r_\epsilon$ should be larger than $3r_c$. The halo with a heavier $m_\psi$ has a very small core and most of the halo is described by an NFW profile. Since a large part of the halo has a similar behaviour to a CDM halo, we impose the concentration-mass relation of the NFW halos predicted by CDM simulations: \begin{eqnarray} C_{200}(M_{200},x_{\mathrm{sub}}) = && c_0 \left[1+\sum^{3}_{i=1} \left[a_i \log_{10}\left(\frac{M_{200}}{10^8 h^{-1}M_{\odot}}\right)\right]^i \right] \nonumber \\ && \times \left[1+b\log_{10}(x_{\mathrm{sub}})\right]. \label{eq:c200} \end{eqnarray} Here, we utilize $c_0=19.9$, $a_i=\{-0.195,0.089,0.089\}$, and $b=-0.54$, which are the best-fit parameters for the concentration-mass relation~\citep{Moline:2016pbm}. The subhalo distance from the center of a host halo divided by $r_{200}$ of the host halo is given by $x_{\mathrm{sub}}\equiv r_{\mathrm{sub}}/r_{200,\mathrm{host}}$. The $r_{200}$ of the Milky Way halo, $r_{200,\mathrm{MW}}$, has a large uncertainty $r_{200}\simeq210\pm50$~kpc. However, the error of $r_{200,\mathrm{MW}}$ may not have impact on the concentration parameter. Therefore, we adopt $r_{200,\mathrm{MW}}=210$~kpc in this work~\footnote{We performed the same MCMC analyses for the case of $r_{200,\mathrm{MW}}=160$ and $260$~kpc and obtained $m_\psi=1.0^{+8.6}_{-0.6}\times10^{-19}$~eV and $1.1^{+8.8}_{-0.7}\times10^{-19}$~eV, respectively. Thus, we confirmed the uncertainty on $r_{200,\mathrm{MW}}$ can be negligible.}. \section{Data and Analysis} To scrutinize FDM halos of the Milky Way UFDs, we select 18 galaxies~(Bo\"otes~I, Coma~Bernices, Canes~Venatici~I, Canes~Venatici~II, Eridanus~II, Grus~2, Hercules, Hydra~II, Leo~IV, Reticulum~II, Segue~1, Segue~2, Triangulum~II, Tucana~3, Tucana~4, Ursa~Major~I, Ursa~Major~II, and Willman~1). They have more than 10 stellar kinematic data of their member stars. The stellar structural parameters of these galaxies are taken from~\citet{2015ApJ...813..109D} and \citet{2018ApJ...860...66M}. For the stellar kinematic sample analyzed in the present study, we use the published data from the original spectroscopic observation papers~\citep{2007ApJ...670..313S,2011ApJ...733...46S,2011AJ....142..128W,2013ApJ...770...16K,2015ApJ...810...56K,2015ApJ...808...95S,2017ApJ...838...83K,2017ApJ...838...11S,2020ApJ...892..137S,2021arXiv210100013J,Zoutendijk:2021kee}. To identify the member stars, we adopt the methods in the above literature. For the influence of unresolved binary stars on a stellar kinematics, several papers indicated that multi epoch observations can exclude binary candidates from stellar spectroscopic data and concluded that the presence of binaries is likely to have only mild influence on estimates of the velocity dispersion of UFDs. Thus, we ignore this effect. Given the available observational data, we fit models for $\rho_{\mathrm{soliton}}(r) + \rho_{\mathrm{NFW}}(r)$ and $\beta_{\mathrm{ani}}(r)$ with the likelihood function $\log(\mathcal{L}_\mathrm{tot})=\log(\mathcal{L}_\mathrm{vel})+\log(\mathcal{L}_\mathrm{NFW})+\log(\mathcal{L}_{r_\mathrm{half}})$. We assume that the line-of-sight velocity distribution is a Gaussian; thus the likelihood function coming from the stellar kinematics is written by \begin{equation} -2\log(\mathcal{L}_\mathrm{vel}) = \sum_{i}\left[\frac{(v_i-\langle v \rangle)^2}{\sigma^2_i} + \log(2\pi\sigma^2_i)\right]\,, \label{eq:likeli_1} \end{equation} where $v_i$ and $R_i$ are the line-of-sight velocity and the projected radius from the center of the galaxy of the $i^{\mathrm th}$ star in the kinematic sample. The averaged line-of-sight velocity of the member stars $\langle v \rangle$ is a nuisance parameter. The dispersion $\sigma^2_i$ can be written by the measurement error $\delta_{v,i}$ and the intrinsic dispersion: $\sigma^2_i=\delta^2_{v,i}+\sigma^2_{\mathrm{los}}(R_i)$. Meanwhile, we require the outer NFW halo to satisfy the concentration-mass relation; thus, the likelihood is given by \begin{equation} -2 \log({\cal L}_{\rm NFW}) = \frac{[\log_{10}(c_{200}) - \log_{10}(C_{200})]^2}{\sigma^2_{\rm CDM}}\,. \end{equation} We estimate $c_{200}$ from the parameters $(r_s,\rho_s,M_{200})$ and $C_{200}$ is the median subhalo concentration-mass relation in Eq.~\ref{eq:c200} with $\sigma_{\rm CDM} = 0.13$~\citep{Moline:2016pbm}. We also consider the uncertainties of the half-light radius ($r_{\mathrm{half}}$) of the Plummer profile as the following form: $-2\log(\mathcal{L}_{r_\mathrm{half}})=(r_\mathrm{half}-r_\mathrm{half,obs})^2/\delta r^2_\mathrm{half,obs}$, where $r_\mathrm{half,obs}$ and $\delta r_\mathrm{half,obs}$ are the measured half-light radius and its error based on the photometric data. Our model has 10 free parameters~$(m_{\psi}$, $M_{\mathrm{200}}$, $\epsilon$, $r_s$, $\beta_0$, $\beta_\infty$, $r_\beta$, $\eta$, $r_\mathrm{half}$ and $\langle v \rangle)$. We adopt flat priors over the following ranges: $-3\leq\log_{10}(m_{\psi}/10^{-23}\mathrm{eV})\leq8$, $8\leq\log_{10}(M_{\mathrm{200}}/M_{\odot})\leq11$, $-5\leq\log_{10}(\epsilon)\leq \log_{10}(0.5)$, $0\leq\log_{10}(r_{s,\beta}/[\mathrm{pc}])\leq4$, $1 \le \eta \le 10, ~0 \le 2^{\beta_{0(\infty)}} \le 1(2), ~0 \le r_\mathrm{half}/\mathrm{pc} \le 1000$, and $-1000\le \langle v \rangle/(\mathrm{km~s^{-1}}) \le +1000$. For the range of $M_{\mathrm{200}}$, several numerical studies implied that UFD-sized galaxies~($L_\ast\sim10^{2.5-5.0}L\odot$) reside in dark matter halos of mass $M_{\mathrm{200}}\sim10^8-10^9M_\odot$~\citep[e.g.,][]{2015MNRAS.453.1305W}. To obtain conservative limits on $m_\psi$, we however adopt the heavier upper limit of this prior range. We map the posterior distributions of these parameters using the public python package {\it emcee}~\citep{2013PASP..125..306F}. For each galaxy, we set the sampler to 280 walkers and 6000 steps and removed 1000 steps as burn-in. \section{Results and discussion} In Fig.~\ref{fig:m_psi}, we show the estimated $m_\psi$, from all galaxies. The median, 1- and 2-$\sigma$ credible intervals are computed from the posterior probability distribution functions~(PDFs). We find that even though there surely exist large uncertainties on $m_\psi$ caused by a small sample size, the majority of the UFDs favor $m_\psi \gtrsim 10^{-22}~\mathrm{eV}$~(the horizontal dashed line in this figure), which was considered the key particle mass to resolve the core-cusp problem~\citep[e.g.,][]{Marsh:2015wka}. In particular, the fitting result for Segue~1 shows the significantly large FDM mass, $m_\psi=1.1^{+8.3(+403)}_{-0.7(-1.1)}\times10^{-19}~\mathrm{eV}$ at 1- and 2-$\sigma$ credible intervals\,\footnote{ The estimated dark halo mass, $M_{200}$, for Segue~1 is $\log_{10}(M_{200}/M_\odot)=9.6^{+0.74}_{-0.68}$ at $1\sigma$ credible intervals.}. These results show that the soliton core in UFDs is very small, which confirms the existence of a large NFW outer halo around the solitonic core, supporting the profile used in the fit of this work. Fig.~\ref{fig:PDFs} shows the posterior PDFs of Segue~1. To focus on $m_\psi$, we show the posteriors of $M_{200}$ and $m_\psi$ only, while the other parameters are indicated at the upper-right corner. As shown in this figure, $m_\psi$ can be constrained {\it statistically} by our analysis. Note that the constraint on $m_\psi$ from Segue~1 comes mainly from the kinematic sample in the inner part (especially within 10~pc) in our {\it unbinned} analysis. The unbinned analysis can trace the inner kinematic structures in the UFDs, while the binned one might smear out such information, and thus may not provide such a strong constraint on $m_\psi$ as the unbinned one. \begin{figure}[t!] \centering \includegraphics[width=\columnwidth]{comparison_ver4.pdf} \caption{Estimated FDM mass, $m_{\psi}$, for 17 UFDs. The points show the median values of $m_{\psi}$, and orange solid and blue dotted errors are 1- and 2-$\sigma$ credible intervals. The horizontal dashed line corresponds to $m_{\psi}=10^{-22}~\mathrm{eV}$.} \label{fig:m_psi} \end{figure} It is important to understand how the constraints obtained here relate to the bounds obtained from the other independent work. This is shown in Fig.~\ref{fig:constraints}, where we compare our constraint on $m_{\psi}$ from Segue~1, the strongest constraint obtained from this work, shown in red, with a selection of the strongest ones compiled in the review paper~\citep{Ferreira:2020fam}\footnote{There are also other strong constraints not shown here like~\citet{Schutz:2020jox} and \citet{Nadler:2020prv}}. The blue shaded regions represent the values of $m_{\psi}$ that are currently excluded by analysis of the correspondent observations. In this figure we also show the previous bounds obtained using UFDs from~\cite{Safarzadeh:2019sre} and~\cite{Marsh:2018zyw}. We find that the constraint on $m_{\psi}$ for Segue~1 falls in the allowed region of the other observations like CMB, LSS, and BHSR from M87 and SMBHs, even though there is a slight tension with the bound from BHSR from SMBHs. This result is also compatible with the previous bounds obtained using UFDs, updating on these bounds and obtaining stronger constraints in $m_{\psi}$. Our result from Segue 1 is allowed even considering the bounds from Lyman-$\alpha$ measurements, which was to date the strongest bounds requiring $m_{\psi} > 2 \times 10^{-20}\, \mathrm{eV}$, and the first constraint compatible with this bound. Although not shown in the figure, this is also true for the constraints obtained from the other 17 UFDs, which are all compatible with these bounds within the uncertainty in their mass constraint. The Segue~1 constraint seems to be in tension with the ones from the survival of the Eri~II star cluster ("Eridanus II - star cluster" in in Fig.~\ref{fig:constraints}), although compatible with the condition for the existence of a subhalo to host Eri~II, $m_{\psi} > 8 \times 10^{-22} \, \mathrm{eV}$~\citep{Marsh:2018zyw}. The survival bound comes from gravitational heating due to the solitonic core. This has recently been challenged~\citep{Schive:2019rrw}, where heating is reduced by tidal disruption of the halo, allowing for the survival of the star cluster for higher $m_{\psi}$ like ours. Future simulations are necessary to verify this effect. \begin{figure}[t!] \centering \includegraphics[width=\columnwidth]{PDFs_Seg1_fullanalysis_small.pdf} \caption{Posterior distributions of $M_{200}$ and $m_\psi$ for Segue~1. The dashed vertical lines in the 1D histograms are the median and 1$\sigma$ credible intervals. At the upper right corner, the other parameters~(the median and 1$\sigma$ credible intervals) are indicated.} \label{fig:PDFs} \end{figure} The constraint obtained from Segue~1, however, is in tension with the bounds coming from luminous dSphs, Fornax and Sculptor. These bounds require $m_{\psi} < 2.9 - 4 \times 10^{-21} \, \mathrm{eV}$~\citep{Gonzales-Morales:2016mkl,Marsh:2015wka}. Our constraints fall in the excluded region of $m_{\psi}$ from the luminous dSphs, which is also in tension with the bounds from other observations. The same conclusion was found in~\cite{Safarzadeh:2019sre} where a comparative analysis of the constraints on $m_{\psi}$ using data of the half-light radius of dSphs and UFDs was made, using a subgroup of the UFDs using here. Therefore, $m_{\psi}$ found from the analysis of UFDs cannot explain the density profile of Fornax and Sculptor. This might be indicative that it is challenging for the FDM to address the small-scale problems of the CDM model. This was also pointed out, in the context of the cusp-core problem, using a different argument in~\cite{Burkert:2020laq}. However, we note that these luminous dSphs could have been affected by baryonic processes. This can change the density structure of their halo, meaning that we are not probing the intrinsic dark matter profile. This might challenge the bounds coming from these systems. As discussed in~\cite{Safarzadeh:2019sre}, the FDM soliton profile might be too simplistic, and if allowed to change for different systems, which might also depend on the baryonic effects, would allow a more realistic description of the core of different systems and lead to different bounds on $m_{\psi}$. In this sense, Milky Way UFDs are ideal objects to probe the nature of DM theory, making us believe that the results presented in this work are a robust measure of the properties of the FDM. We should also emphasize that our work is based on a fit to a profile for the halo that consists of a soliton core surrounded by an NFW profile, with the relation between the core mass and the halo mass given in~\cite{Schive2014}. However, different simulations~\citep{Mocz:2017wlg,Mina:2020eik} report a different relation (although the analysis of the dSphs used the same relation as used in this work). Another possibility is that the relation between core and soliton size is not as straightforward as the one used in this analysis. These different relations can change the conclusions reached here. We should also bear in mind that a soliton core in recent FDM simulations is not static but keeps oscillating with amplitude as large as the order of core radius.~\citep{Veltmaat:2018dfz,Schive:2019rrw}. This phenomenon is described theoretically in~\citet{Li:2020ryg}. This suggests that our analysis based on the simple steady-state modeling of FDM might not describe the FDM halo potential perfectly, which would alter the FDM mass constraints obtained in this work. Future simulations of the FDM model might help answer these questions. Most importantly, future simulations that include baryons and can test the effect of baryonic effects in the dSph halos would be important to understand this discrepancy between dSphs and other observations. \begin{figure}[t!] \centering \includegraphics[width=\columnwidth]{bounds_blue2.png} \caption{Summary of the most relevant constraints on the FDM mass to date. The blue shaded regions represent the excluded regions. We highlight in red the constraint for Segue~1 from this work. The first line presents the bounds from Cosmic Microwave Background~(CMB) and Large Scale Structure~(LSS) from~\cite{Hlozek:2014lca,Hlozek:2017zzf}, and those from black hole superradiance (BHSR) from supermassive BH~(SMBH) in M87~\citep{Davoudiasl:2019nlo} and from SMBHs~\citep{Stott:2018opm}. The second line presents the bounds from Lyman-$\alpha$ observations~\citep{Nori:2018pka,Armengaud:2017nkf,Irsic:2017yje,Rogers2020}, from darker to lighter. The bounds from dSphs come from Fornax and Sculptor given in~\citet[][darker]{Gonzales-Morales:2016mkl}, and ~\citet[][lighter]{Marsh:2015wka}, and two constraints with error bars are from Draco and Sextans~\citep{Chen:2016unw}. Bellow the dashed line we present the previous and current constraints using UFDs from~\cite{Safarzadeh:2019sre}, and from Eridanus II by~\cite{Marsh:2018zyw}.} \label{fig:constraints} \end{figure} \section{Conclusions} In this work, we scrutinized the FDM model through a dynamical analysis of 18 UFDs with the simulation-driven FDM halo density profile. In this work, we were able to put the strongest constraints to date on the FDM mass, with a preference for higher masses $m_\psi \gtrsim 10^{-21} \, \mathrm{eV}$, with the strongest one from Segue 1, $m_\psi=1.1^{+8.3}_{-0.7}\times10^{-19}\ (1\sigma) \, \mathrm{eV}$. This means that the core present in these UFDs is small and shows that for these galaxies, for which the kinematic data available covers a larger spatial extent than the obtained $r_c$, a density profile of a soliton core embedded in an NFW outer profile is needed. The our constraints are compatible with previous bounds from the literature, except classical dSphs~(Fornax and Sculptor), a discrepancy already noted in the literature, which might come from baryonic feedback on the dark matter distribution in these luminous galaxies. As UFDs are hardly affected by baryonic effects, they are the ideal laboratory to test DM models. With the huge increase in the amount of high quality spectroscopic and astrometric observations in the near future, it will be possible to use UFDs to improve on the constraints obtained here, showing the power of UFDs to help understand the nature of DM. \section*{Acknowledgements} We would like to give special thanks to Eiichiro Komatsu and Simon D. M. White for useful discussions. This work was supported in part by the MEXT Grant-in-Aid for Scientific Research on Innovative Areas, No.~20H01895~(for K.H.).
\section{A Parallel Constant-Factor Minimum Cut Approximation}\label{sec:const-approx} Step one of Karger's procedure for producing a tree packing is to compute a constant-factor approximation to the minimum cut, which is then used to derive the sampling probability for constructing a sparse skeleton. In this section, we will derive an algorithm for a constant-factor approximate minimum cut that runs in $O(m \log^2(n))$ work and $O(\polylog(n))$ depth. Karger and Motwani~\cite{karger1994derandomization} give an algorithm that runs in $O(m^2/n)$ work and $O(\polylog(n))$ depth. We achieve our bounds by improving Karger's algorithm and speeding up several of the components. Specifically, we use the following combination of ideas, new and old. \begin{enumerate}[leftmargin=*] \setlength\itemsep{0em} \item We extend a $k$-approximation algorithm of Karger~\cite{karger1993global} to work in parallel, allowing us to produce an $O(\log(n))$-approximate minimum cut in low work and depth \item The $\log(n)$-approximate minimum cut allows us to make $O(\log\log(n))$ guesses of the minimum cut such that at least one of them is a constant-factor approximation \item We use a faster sampling technique for producing Karger's skeletons for weighted graphs. This is done by transforming the graph into a graph that maintains an approximate minimum cut but has edge weights each bounded by $O(m \log(n))$, and then using binomial random variables to sample all of the multiedges of a particular edge at the same time, instead of separately. \item We show that the parallel sparse $k$-certificate algorithm of Cheriyan, Kao, and Thurimella~\cite{cheriyan1993scan} for unweighted graphs can be modified to run on weighted graphs \item We show that Karger and Motwani's parallelization of Matula's algorithm can be modified to run on weighted graphs \end{enumerate} \noindent We will use the following result due to Karger. \begin{definition}[$p$-skeleton of a graph] Given an unweighted graph $G$ and a probability $p$, the \emph{skeleton} $G(p)$ consists of the vertices of $G$ and a random subset of the edges of $G$, each sampled with probability $p$. \end{definition} \begin{lemma}[Karger~\cite{karger1995random}]\label{lemma:sampling_verified} With high probability, if $G(p)$ is constructed and has minimum cut $\hat{c} = \Omega(\log(n)/\varepsilon^2)$ for $\varepsilon \leq 1$, then the minimum cut in $G$ is $(1 \pm \varepsilon)\hat{c}/p$. \end{lemma} \subsection{Parallelising the $k$-approximation algorithm} Karger describes an $O(m n^{2/k} \log(n))$ time sequential algorithm for finding a cut in a graph within a factor of $k$ of the optimal cut~\cite{karger1993global}. Karger's algorithm works by randomly selecting edges to contract with probability proportional to their weight until a single vertex remains, and keeping track of the component with smallest incident weight (not including internal edges) during the contraction. This relies on the following Lemma. \begin{lemma}[Karger~\cite{karger1993global}]\label{lem:approx-trial} Given a weighted graph with minimum cut $c$, with probability $n^{-2/k}$, the meta-vertex with minimum incident weight encountered during a single trial of the contraction algorithm implies a cut of weight at most $kc$. \end{lemma} \noindent Running $O(n^{2/k}\log(n))$ rounds yields a cut of size at most $kc$ w.h.p. Here we show how to parallelize Karger's algorithm using our batched mixed operations algorithm yielding the following result: \begin{lemma}\label{lem:k-approx} For a weighted graph, a cut within a factor of $k$ of the minimum cut can be found w.h.p.\ in $O(m n^{2/k} \log^2(n))$ work and polylogarithmic depth. \end{lemma} \noindent Karger shows how to parallelize picking the (weighted) random permutation of the edges with $O(m \log^2 (n))$ work. It can easily slightly modified to improve the bounds by a logarithmic factor as follows. The algorithm selects the edges by running a prefix sum over the edge weights. Assuming a total weight of $W$, it then picks $m$ random integers up to $W$, and for each uses binary search on the result of the prefix sum to pick an edge. This process, however, might end up picking only the heaviest edges. Karger shows that by removing those edges the total weight $W$ decreases by a constant factor, with high probability. Since the edges can be preprocessed to be polynomial in $n$ (see below), repeating for $\log(n)$ rounds the algorithm will select all edges in the appropriate weighted random order. Each round takes $O(m \log(n))$ work for a total of $O(m \log^2 (n))$ work. Replacing the binary search in Karger's algorithm with a sort of the random integers and merge into the result of the prefix sum yields an $O(m \log (n))$ work randomized algorithm. In particular $m$ random numbers uniformly distributed over a range can be sorted in $O(m)$ work and $O(\log (n))$ span by first determining for each number which of $m$ evenly distributed buckets within the range it is in, then sorting by bucket using an integer sort~\cite{RR89} and finally sorting within buckets. The more interesting part to parallelize is identifying the component with smallest incident weight during the contraction process. Identifying the edges that are contracted is easy using a minimum spanning tree over the position on which the edge is selected, but keeping track of the smallest incident weight of a component is somewhat trickier. To achieve this, we use our batched mixed operations framework from Section~\ref{sec:batched-mixed-ops}. In Appendix~\ref{sec:batch-component-weight}, we show that that the following operations have a simple RC{} implementation and therefore are applicable to our method. \begin{itemize}[leftmargin=*] \setlength\itemsep{0em} \item \textproc{SubtractWeight}($v$, $w$): Subtract weight $w$ from vertex $v$ \item \textproc{JoinEdge}($e$): Mark the edge $e$ as ``joined'' \item \textproc{QueryWeight}($v$): Return the weight of the connected component containing the vertex $v$, where the components are induced by the joined edges \end{itemize} \noindent With this tool, we can simulate the contraction process, and determine the minimum incident weight of a component as follows: \begin{enumerate}[leftmargin=*] \setlength\itemsep{0em} \item\label{step:mst-for-approx} Compute an MST with respect to the random edge ordering, where a heavier weight indicates that an edge contracts later \item\label{step:heaviest-edge-for-approx} For each edge $(u,v) \in G$, determine the heaviest edge in the MST on the unique $(u,v)$ path \item\label{step:batch-component-weight} Construct a vertex-weighted tree from the MST, where the weights are the total incident weight on each vertex in $G$. For each edge $(u,v)$ in the MST in contraction order: \begin{itemize}[leftmargin=*] \item Determine the set of edges in $G$ such that $(u,v)$ is the heaviest edge on its MST path. For each such edge identified, \textproc{SubtractWeight} from each of its endpoints by the weight of the edge \item Perform \textproc{JoinEdge} on the edge $(u,v)$ \item Perform \textproc{QueryWeight} on the vertex $u$ \end{itemize} \end{enumerate} \noindent Observe that the weight of a component at the point in time when it is queried is precisely the total weight of incident edges (again, not including internal edges). Taking the minimum over the initial degrees and all query results therefore yields the desired answer. Step~\ref{step:mst-for-approx} takes $O(m\log(n))$ work and $O(\log^2(n))$ depth to compute the random edge permutation using Karger's technique~\cite{karger1993global}, and $O(m)$ work and $O(\log(n))$ depth to run a parallel MST algorithm~\cite{karger1995randomized}. Step~\ref{step:heaviest-edge-for-approx} takes $O(m \log(n))$ work and $O(\log(n))$ depth using RC trees~\cite{acar2005experimental,acar2020batch}, and Step~\ref{step:batch-component-weight} takes $O(m \log(n))$ work and $O(\log^2(n))$ depth using our batched mixed operations algorithm (Theorem~\ref{theorem:batch}). Based on Lemma~\ref{lem:approx-trial}, trying $O(n^{2/k}\log(n))$ random contractions yields the result of Lemma~\ref{lem:k-approx}. Setting $k = \log (n)$ then gives a $\log (n)$ approximation in $O(m \log^2 (n))$ work and $O(\log^2(n))$ depth. \subsection{Transformation to bounded edge weights} For our algorithm to be efficient, we require that the input graph has small integer weights. Karger~\cite{karger1995random} gives a transformation that ensures all edge weights of a graph are bounded by $O(n^5)$ without affecting the minimum cut by more than a a constant factor. For our algorithm $O(n^5)$ would be too big, so we design a different transformation that guarantees all edge weights are bounded by $O(m \log(n))$, and only affects the weight of the minimum cut by a constant factor. \begin{lemma}\label{lem:low-weight-transform} There exists a transformation that, given an integer-weighted graph $G$, produces an integer-weighted graph $G'$ no larger than $G$, such that $G'$ has edge weights bounded by $O(m\log(n))$, and the minimum cut of $G'$ is a constant-approximate minimum cut in $G$. \end{lemma} \begin{proof} Let $G$ be the input graph and suppose that the true value of the minimum cut is $c$. First, we use Lemma~\ref{lem:k-approx} to obtain a $O(\log(n))$-approximate minimum cut, whose value we denote by $\tilde{c}$ ($c \leq \tilde{c} \leq c \log(n)$). We can contract all edges of the graph with weight greater than $\tilde{c}$ since they can not appear in the minimum cut. Let $s = \tilde{c} / (2m \log(n))$. We delete (not contract) all edges with weight less than $s$. Since there are at most $m$ edges in any cut, this at most affects the value of a cut by $sm = \tilde{c} / (2 \log(n)) \leq c/2$. Therefore the minimum cut in this graph is still a constant factor approximation to the minimum cut in $G$. Next, scale all remaining edge weights down by the factor $s$, rounding down. All edge weights are now integers in the range $[1, 2m \log(n)]$. This is the transformed graph $G'$. It remains to argue that the value of the minimum cut is a constant-factor approximation. First, note that the scaling process preserves the order of cut values, and hence the true minimum cut in $G$ has the same value in $G'$ as the minimum cut in $G'$. Consider any cut in $G'$, and scale the weights of the edges back up by a factor $s$. This introduces a rounding error of at most $s$ per edge. Since any cut has at most $m$ edges, the total rounding error is at most $sm \leq c/2$. Therefore the value of the minimum cut in $G'$ is a constant factor approximation to the value of the minimum cut in $G$. \end{proof} \noindent Lastly, observe that this transformation can easily be performed in parallel by using a work-efficient connected components algorithm to perform the edge contractions, as is standard (see e.g.~\cite{karger1996new}). \subsection{Sampling the skeleton from a weighted graph} Note that by definition, the $p$-skeleton of a graph has $O(pm)$ edges in expectation. For a weighted graph, the $p$-skeleton is defined as the $p$-skeleton of the corresponding unweighted multigraph in which an edge of weight $w$ is replaced by $w$ parallel multiedges. The $p$-skeleton of a weighted graph therefore has $O(pW)$ edges in expectation, where $W$ is the total weight in the graph. Karger gives an algorithm for generating a $p$-skeleton in $O(pW \log(m))$ work, which relies on performing $O(pW)$ independent random samples with probabilities proportional to the weight of each edge, each of which takes $O(\log(m))$ amortized time. In Karger's algorithm, given a guess of the minimum cut $c$, he computes $p$-skeletons for $p = \Theta(\log(n)/c)$, which results in a skeleton of $O(m \log(n))$ edges, and hence takes $O(m \log^2(n))$ work to compute. Our algorithm instead does the following. For each edge $e$ in the graph, sample a binomial random variable $x \sim B(w(e),p)$. The skeleton then contains the edge $e$ with weight $x$ (conceptually, $x$ unweighted copies of the multiedge $e$). This results in the same graph as if sampled using Karger's technique. In Appendix~\ref{sec:binomial}, we show how to use recent results on sampling binomial random variables to perform samples from $B(n',1/2)$ in $O(\log(n'))$ time w.h.p., and from $B(n',p)$ in $O(\log^2(n'))$ time w.h.p., for any $n' \leq N$ after $O(N^{1/2+\varepsilon})$ work preprocessing. Since we can preprocess the graph to have edge weights at most $O(m\log(n))$ (Lemma~\ref{lem:low-weight-transform}), this is no more than $O(m)$ work in preprocessing. At first glance, this does not improve on Karger's bounds, since we need to perform $O(\log^2(n))$ work per edge when sampling from $B(n,p)$. However, we use the fact that only the first sample of the graph needs to be this expensive. In Karger's algorithm, and by extension, our algorithm, subsequent samples always take $p$ as exactly half of the value of $p$ from last iteration, and hence we can use subsampling to only require random variables from $B(n,1/2)$. This means that we can perform up to $O(\log(n))$ rounds of subsampling in $O(m\log^2(n))$ total work, instead of $O(m\log^3(n))$ work. \subsection{Sparse certificates} A \emph{$k$-connectivity certificate} of a graph $G = (V,E)$ is a graph $G' = (V, E' \subset E)$ such that every cut in $G$ of weight at most $k$ has the same weight in $G'$. In other words, a $k$-connectivity certificate is a subgraph that preserves cuts of weight up to $k$. A $k$-connectivity certificate is called \emph{sparse} if it has $O(kn)$ edges. Cheriyan, Kao, and Thurimella~\cite{cheriyan1993scan} introduce a parallel graph search called \emph{scan-first search}, which they show can be used to generate $k$-connectivity certificates of undirected graphs. Here, we briefly note that the algorithm can easily be extended to handle weighted graphs. The scan-first search algorithm is implemented as follows \begin{algorithm}[H] \caption{Scan-first search~\cite{cheriyan1993scan}} \label{alg:scan_first_search} \small \begin{algorithmic}[1] \small \Procedure{SFS}{$G = (V,E)$ : \algtype{Graph}, $r$ : \algtype{Vertex}} \State Find a spanning tree $T'$ rooted at $r$ \State Find a preorder numbering to the vertices in $T'$ \State For each vertex $v \in T'$ with $v \neq r$, let $b(v)$ denote the neighbor of $v$ with the smallest preorder number \State Let $T$ be the tree formed by $\{v, b(v)\}$ for all $v \neq r$ \EndProcedure \end{algorithmic} \end{algorithm} \noindent Using a linear work, low depth spanning tree algorithm, scan-first search can easily be implemented in $O(m)$ work and $O(\log(n))$ depth. Cheriyan, Kao, and Thurimella show that if $E_i$ are the edges in a scan-first search forest of the graph $G_{i-1} = (V, E \setminus (E_1 \cup ... E_{i-1}))$, then $E_1 \cup ... E_k$ is a sparse $k$-connectivity certificate. A sparse $k$-connectivity certificate can therefore be found in $O(km)$ work and $O(k \log(n))$ depth by running scan-first search $k$ times. In the weighted setting, we treat an edge of weight $w$ as $w$ parallel unweighted multiedges. As always, this is only conceptual, the multigraph is never actually generated. To compute certificates in weighted graphs, we therefore use the following simple modification. After computing each scan-first search tree, instead of removing the edges present from $G$, simply lower their weight by one, and remove them only if their weight becomes zero. It is easy to see that this is equivalent to running the ordinary algorithm on the unweighted multigraph. We therefore have the following. \begin{lemma} Given a weighted, undirected graph $G = (V,E)$, a sparse $k$-connectivity certificate can be found in $O(km)$ work and $O(k \log(n))$ depth. \end{lemma} \subsection{Parallel Matula's algorithm for weighted graphs} Matula~\cite{matula1993linear} gave a linear time sequential algorithm for a $(2+\varepsilon)$-approximation to edge connectivity (unweighted minimum cut). It is easy to extend to weighted graphs so that it runs in $O(m \log(n) \log(W))$ time, where $W$ is the total weight of the graph. Using standard transformations to obtain polynomially bounded edge weights, this gives an $O(m \log^2(n))$ algorithm. Karger and Motwani~\cite{karger1994derandomization} gave a parallel version of Matula's unweighted algorithm that runs in ${O}(m^2/n)$ work. We will show that a slight modification to this algorithm makes it work on weighted graphs in $O(dm \log(W/m))$ work and $O(d \log(n) \log(W))$ depth, where $d$ is the minimum weighted degree of the graph. When $d = O(\log(n))$ and $W = O(m \polylog(n))$, this results in a final work bound of $O(m \log(n) \log\log(n))$. Essentially, Karger and Motwani's version of Matula's algorithm does the following steps as indicated in Algorithm~\ref{alg:matula}. \begin{algorithm}[H] \caption{Approximate minimum cut} \label{alg:matula} \small \begin{algorithmic}[1] \small \Procedure{Matula}{$G = (V,E)$ : \algtype{Graph} } \State \alglocal{} $d$ \algassign{} minimum degree in $G$ \State \alglocal{} $k$ \algassign{} $d / (2 + \varepsilon)$ \State \alglocal{} $C$ \algassign{} Compute a sparse $k$-certificate of $G$ \State \alglocal{} $G'$ \algassign{} Contract all non-certificate edges of $E$ \State \algreturn{} $\min(d, \textproc{Matula}(G'))$ \EndProcedure \end{algorithmic} \end{algorithm} It can be shown that at each iteration, the size of the graph is reduced by a constant factor, and hence there are at most $O(\log(n))$ iterations. Furthermore, the work performed at each step is geometrically decreasing, so the total work, using the sparse certificate algorithm of Cheriyan, Kao, and Thurimella~\cite{cheriyan1993scan} is $O(dm)$ and the depth is $O(d \log^2(n))$. To extend the algorithm to weighted graphs, we can replace the sparse certificate routine with our modified version for weighted graphs, and replace the computation of $d$ with the equivalent weighted degree. By interpreting an edge-weighted graph as a multigraph where each edge of weight $w$ corresponds to $w$ parallel multiedges, we can see that the algorithm is equivalent. To argue the cost bounds, note that like in the original algorithm where the size of the graph decreases by a constant factor each iteration, the total weight of the graph must decrease by a constant factor in each iteration. Because of this, it is no longer true that the work of each iteration is geometrically decreasing. Naively, this gives a work bound of $O(d m \log(W))$, but we can tighten this slightly as follows. Observe that after performing $\log(W/m)$ iterations, the total weight of the graph will have been reduced to $O(m)$, and hence, like in the sequential algorithm, the work must subsequently begin to decrease geometrically. Hence the total work can actually be bounded by $O(d m \log(W/m) + dm) = O(dm \log(W/m))$. We therefore have the following. \begin{lemma}\label{lem:parallel-matula} Given an undirected, weighted graph $G$ with minimum weighted-degree $d$ and total weight $W$, a constant-factor approximation to the minimum cut can be computed in $O(dm\log(W/m))$ work and $O(d \log(n) \log(W))$ depth. \end{lemma} \subsection{A parallel approximation algorithm for minimum cut} The final ingredient needed to produce the parallel minimum cut approximation is a trick due to Karger. Recall that to produce Karger's skeleton graph, the sampling probability must be inversely proportional to the weight of the minimum cut, which paradoxically is what we are trying to compute. This issue is solve by using \emph{doubling}. The algorithm makes successively larger guesses of the minimum cut and computes the resulting approximation. It can then verify whether the guess was too high by checking whether the minimum cut in the skeleton contained too few edges (Lemma~\ref{lemma:sampling_verified}). Specifically, Karger's sampling theorem~(Lemma 6.3.2 of \cite{karger1995random}) says that we will know that we have made the correct guess within a factor two when the skeleton has $\Omega(\log(n))$ edges in its minimum cut. To perform the minimum amount of work, we use Lemma~\ref{lem:k-approx} to first produce a $O(\log(n))$-approximation to the minimum cut, which allows us to make just $O(\log\log(n))$ guesses with the guarantee that one of them will be correct to within a factor two. Our algorithm proceeds by making these $O(\log\log(n))$ guesses in parallel. For each, we consider the corresponding skeleton graph and compute a $\Theta(\log(n))$ certificate, since, by assumption, until we have made the correct guess, the minimum cut in the skeleton will be less than $O(\log(n))$ w.h.p. This then guarantees that we can run our version of parallel Matula's algorithm in $O(n \log(n) \log\log(n))$ work (Lemma~\ref{lem:parallel-matula}), since, after producing the certificate, the total weight of the graph is at most $O(n \log(n))$, and the minimum degree is no more than $O(\log(n))$. The details are depicted in Algorithm~\ref{alg:approx_min_cut}. It takes $O(m\log^2(n))$ work to produce the sequence of graph skeletons, $O(m\log(n)\log\log(n))$ work to compute the sparse certificates, and $O(n\log(n)(\log\log(n))^2)$ work to compute the resulting approximations from Matula's algorithm. All together, the algorithm takes at most $O(m\log^2(n))$ work, and runs in $O(\log^3(n))$ depth. \begin{algorithm} \caption{Approximate minimum cut algorithm} \label{alg:approx_min_cut} \small \begin{algorithmic}[1] \small \Procedure{ApproxMinCut}{$G = (V,E)$ : \algtype{Graph} } \State\label{code:logn-approx} \alglocal{} $C$ \algassign{} A $\log(n)$-approximation of MinCut($G$) \ParallelFor{$c \in \{ C/\log(n), 2C/\log(n), ... C \}$} \State $p(c)$ \algassign{} $\Theta(\log(n)/c)$ \State \alglocal{} $G_p$ \algassign{} Compute the skeleton graph $G'(p)$ \State \alglocal{} $G_p'$ \algassign{} Compute a $\Theta(\log(n))$-certificate of $G_p$ \State $\hat{c}(c)$ \algassign{} \textproc{Matula}($G_p'$) \EndParallelFor \If{$\hat{c}(C/\log(n)) \leq O(\log(n))$} \State \algreturn{} $\hat{c}(C/\log(n))$ \Else \State \alglocal{} $c$ \algassign{} $\min \{ c\ |\ \hat{c}(c) \geq O(\log(n)) \}$ \State \algreturn{} $\hat{c}(c) / p(c)$ \EndIf \EndProcedure \end{algorithmic} \end{algorithm} \noindent To see that the final returned value is correct, we appeal to Karger's sampling theorem, which says that w.h.p., if our guess of the minimum cut is too high by a factor two, the minimum cut of the skeleton will have less than $O(\log(n))$ edges w.h.p.~\cite{karger1995random}, and hence the certificate algorithm does not damage the minimum cut. Once our guess is below the minimum cut by a factor two, the sampling theorem says that the minimum cut of the skeleton exceeds $\Omega(\log(n))$. Provided that we set the constant of the $\Theta(\log(n))$ certificate to be a constant factor larger than this threshold, a Chernoff bound shows us that one of our guesses leads to a skeleton with approximate minimum cut $\hat{c} = \Omega(\log(n))$ that is not damaged by the certificate, and then Lemma~\ref{lemma:sampling_verified} says that $\hat{c} / p$ is a constant-factor approximation of the minimum cut w.h.p. This argument works only if the minimum cut of $G$ has size at least $\Omega(\log(n))$, but note that if it does not, the skeleton construction $G'(1)$ (which must occur during the last iteration) and the certificate completely preserve the minimum cut and hence the last iteration of the loop finds a constant factor approximation of the minimum cut in $G$. \begin{comment} \paragraph{An error in Karger's algorithm} In \cite{karger2000minimum}, Corollary 4.2, Karger claims that he can produce the set of $O(\log(n))$ spanning trees with $O(m + n \log(n))$ processors in $O(\log^3(n))$ time (equivalent to $O(m\log^3(n) + n\log^4(n))$ work and $O(\log^3(n))$ depth in our model). In his proof, he claims that the skeleton construction can be performed the same as in the sequential case and is trivial to parallelize. He cites ``[Karger 1994a]'', which is missing from the bibliography, but it likely meant to refer to his PhD thesis~\cite{karger1995random}. However, we note that there is at least one non-trivial difference between the sequential and parallel sampling algorithms, which is the approximate minimum cut that is used to compute the sampling probability. The sequential algorithm uses Matula's algorithm~\cite{matula1993linear} to obtain this approximation. In his thesis~\cite{karger1995random} and in the paper~\cite{karger1994using}, Karger gives a parallelization of Matula's algorithm for unweighted graphs that he claims runs in $O(cm \polylog(n))$ work (Theorem 4.1 of \cite{karger1994using} or Lemma 5.2.8 of \cite{karger1995random}), where $c$ is the size of the minimum cut. However, we note that the work of the algorithm is dependent on the computation of an $O(d)$-certificate, where $d$ is the minimum degree of the graph, a subroutine that takes $\Omega(dm)$ work using either the sparse certificate algorithm of Cheriyan, Kao, and Thurimella~ \cite{cheriyan1993scan}, or Karger's own sparse certificate algorithm~\cite{karger1994derandomization}. The runtime should therefore be proportional to $d$. In the reduction to solve the weighted case, Karger takes a skeleton of the weighted graph, which has minimum cut $O(\log(n))$, but is not guaranteed to have low degree. His remark following Theorem 4.1 of \cite{karger1994using} that the skeleton ought to have $O(n \polylog(n))$ edges suggests that he also intended to take a sparse $O(\log(n))$ certificate of the skeleton, which would result in the skeleton having low degree, though this is not stated. In a later work with Karger and Motwani~\cite{karger1994derandomization}, they give a correct bound of $O(m^2/n)$ for the unweighted algorithm. We therefore believe that Karger's bounds as stated in Corollary 4.2 of \cite{karger2000minimum} are not justified. Our result (Theorem~\ref{thm:tree-packing}) corrects this. \end{comment} \section{Bulk Path Updates For RC Trees}\label{sec:batch-addpath} Given an RC tree of a tree on $n$ vertices and a set of $k$ path updates of the form $(v_i, x_i)$, denoting that $x_i$ is to be added to the weight of all edges on the path from $r$ to $v_i$, we can apply all of them in $O(n)$ work and $O(\log(n))$ depth w.h.p. The idea is similar to a standard treefix sum algorithm. First, the algorithm associates each vertex $v_i$ with its weight $x_i$. Now the operation is to add to each edge $(u,v)$, where $v$ is a child of $u$, the weight of all vertices in the subtree rooted at $v$. The algorithm then proceeds in two steps. First, in a traversal of the RC tree, it computes, for each cluster $C$, the total weight $W(C)$ of all vertices in it. This step is the same as the first step of our batched mixed operations algorithm, and takes $O(n)$ work and $O(\log(n))$ depth w.h.p. Second, for each child cluster of the root, it traverses the RC tree top-down, maintaining the weight $w$ of all vertices that are descendants of the current cluster (initially zero). This is achieved when recursing on $\ra{C}{t}$, by adding $W(C) - W(\ra{C}{t})$ to the accumulated weight $w$, otherwise keeping $w$ the same. When reaching a base edge cluster, the value $w$ is added to the weight of the edge. This takes $O(n)$ work and $O(\log(n))$ depth w.h.p. \section{Mixed Component Weight Operations}\label{sec:batch-component-weight} Here, we describe a simple RC implementation of the following operations, which is hence amenable to our batched mixed operations framework. \begin{itemize}[leftmargin=*] \setlength\itemsep{0em} \item \textproc{SubtractWeight}($v, w$): Subtract weight $w$ from vertex $v$ \item \textproc{JoinEdge}($e$): Mark the edge $e$ as ``joined'' \item \textproc{QueryWeight}($v$): Return the weight of the connected component containing the vertex $v$, where the components are induced by the joined edges \end{itemize} \noindent The values stored in the RC clusters are as follows. Vertices store their weight, and unary clusters store the weight of the component reachable via joined edges from the boundary vertex. A binary cluster is either \emph{joined}, meaning that its boundary vertices are connected by joined edges, in which case it stores a single value, the weight of the component reachable via joined edges from the boundaries, otherwise it is \emph{split}, in which case it stores a pair: the weight of the component reachable via joined edges from the top boundary, and the weight of the component reachable via joined edges from the bottom boundary. We provide pseudocode for the update operations for Illustration in Algorithm~\ref{alg:component-weight}. \begin{algorithm} \begin{algorithmic}[1] \small \Procedure{$f_{\mbox{\small unary}}$}{$v_v, t, U$} \If{t = $(t_v, b_v)$} \algreturn{} $t_v$ \Else\ \algreturn{} $v_v + t + \sum_{u_v \in U} u_v$ \EndIf \EndProcedure \Procedure{$f_{\mbox{\small binary}}$}{$v_v, t, b, U$} \If{$t = t_v$ and $b = b_v$} \State \algreturn{} $t_v + b_v + v_v + \sum_{u_v \in U} u_v$ \ElsIf{$t = (t_{t_v}, t_{b_v})$ \algand{} $b = b_v$} \State \algreturn{} $(t_{t_v}, t_{b_v} + v_v + b_v + \sum_{u_v \in U} u_v)$ \ElsIf{$t = t_v$ \algand{} $b = (b_{t_v}, b_{b_v})$} \State \algreturn{} $(t_v + v_v + b_{t_v} + \sum_{u_v \in U} u_v)$ \ElsIf{$t = (t_{t_v}, t_{b_v})$ \algand{} $b = (b_{t_v}, b_{b_v})$} \State \algreturn{} $(t_{t_v}, b_{b_v})$ \EndIf \EndProcedure \Procedure{SubtractWeight}{$v, w$} \State $\ra{v}{\text{value}}$ \algassign{} $\ra{v}{\text{value}}$ - $w$ \State Reevaluate the $f(\cdot)$ on path to root. \EndProcedure \Procedure{JoinEdge}{$e$} \State $\ra{e}{\text{value}}$ \algassign{} 0 \State Reevaluate the $f(\cdot)$ on path to root. \EndProcedure \end{algorithmic} \caption{A simple RC{} implementation of \textproc{SubtractWeight} and \textproc{JoinEdge}.} \label{alg:component-weight} \end{algorithm} \noindent The initial value of a vertex is its starting weight. The initial value of an edge is $(0, 0)$, indicating that it is split at the beginning. Note that $f_{\mbox{\small unary}}$ and $f_{\mbox{\small binary}}$ can be evaluated in constant time, and the structure of the updates involves setting the value at a leaf using an associative operation and re-evaluating the values of the ancestor clusters. We can argue that the values are correctly maintained by structural induction. First consider unary clusters. If the top subcluster is split, then the representative vertex and unary subclusters are not reachable via joined edges, and hence the only reachable component is the component reachable inside the top subcluster from its top boundary, whose weight is $t_v$. If the top subcluster is joined, then the representative vertex is reachable, which is by definition the boundary vertex of the unary subclusters, and hence the reachable component is the union of the reachable components of all of the subclusters, whose weight is as given. For binary clusters, there are four possible cases, depending on whether the top and bottom subclusters are joined or not. If both are joined, then the representative and hence the boundary of all subclusters is reachable from both boundaries, and hence the cluster is joined and the reachable component is the union of the reachable components of the subclusters. If either subcluster is split, then the reachable component at the corresponding boundary is just the reachable component of the subcluster, whose weight is as given. Lastly, if one of the subclusters is not split, then the corresponding boundary can reach the representative vertex, and hence the reachable components of the unary subclusters, whose weights are as given. It remains to argue that we can implement \textproc{QueryWeight} with a simple RC implementation. Consider a vertex $v$ whose component weight is desired and consider the parent cluster $P$ of $v$, i.e.,\ the cluster of which $v$ is the representative. If $P$ has no binary subclusters that are joined, observe that $P$ must contain the entire component of $v$ induced by joined edges, since the only way for a component to exit a cluster is via a boundary which would have to be joined. Answering the query in this situation is therefore easy; the result is the sum of the weights of $v$, the unary subclusters of $P$, the bottom boundary weight of the top subcluster (if it exists), and the top bounary weight of the bottom subcluster (if it exists). Suppose instead that $P$ contains a binary subcluster that is joined to some boundary vertex $u \neq v$. Since the subcluster is joined, $u$ is in the same induced component as $v$, and hence \textproc{QueryWeight}($v$) has the same answer as \textproc{QueryWeight}($u$). By standard properties of RC trees, since $u$ is a boundary of $P$, we also know that the leaf cluster $u$ is the child of some ancestor of $P$. Since the root cluster has no binary subclusters, this process of jumping to joined boundaries must eventually discover a vertex that falls into the easy case, and since such a vertex $u$ is always the child of some ancestor is $P$, the algorithm only examines clusters that are on or are children of the root-to-$v$ path in the RC tree, and hence the algorithm is a simple RC implementation. \section{Conclusion} We present a randomized $O(m\log^2 n)$ work, $O(\log^3 n)$ depth parallel algorithm for minimum cut. It is the first parallel minimum cut algorithm to match the work bound of the best sequential algorithm, making it work efficient. Finding a faster parallel algorithm for minimum cut would therefore entail finding a faster sequential algorithm. It remains an open problem to find a deterministic algorithm for minimum cut, even a sequential one, that runs in $O(m \polylog n)$ time. \section*{Acknowledgments} We thank the anonymous referees for their comments and suggestions, and Phil Gibbons and Danny Sleator for their feedback on the manuscript. We thank Ticha Sethapakdi for helping with the figures. This research was supported by NSF grants CCF-1901381, CCF-1910030, and CCF-1919223. \section{Dynamic tree data structures}\label{sec:dynamic-trees} \begin{comment} \paragraph{Deterministic vs randomized RC trees} RC trees have previously been implemented using randomized tree contraction algorithms~\cite{acar2005experimental,acar2020batch}. The primary reason for this is because the randomized algorithms can be shown to be \emph{dynamizable}~\cite{acar2004dynamizing}, that is, it is possible to perform structural changes to the tree, such as inserting or deleting edges, and to update the resulting tree contraction efficiently without running it from scratch. It is not known how to do this using the deterministic variants of tree contraction. However, since our algorithms only make \emph{value updates} to the tree, e.g., changing edge weights, and do not make structural changes, we can implement RC trees using the deterministic tree contraction algorithm of Gazit, Miller, and Tate~\cite{gazit1988optimal}. This means that the randomized bounds usually obtained by the use of RC trees can be made deterministic. \end{comment} \begin{comment} \subsection{Parallel batch-dynamic subtree queries with path updates}\label{sec:batchtrees} We now present the batch-dynamic algorithm that can perform $k$ queries and updates in $O(k\log(1+n/k))$ work and $O(\log(n))$ depth. As in the non-batched case, the algorithm first computes a static RC tree of the rooted tree $T$, which takes $O(n)$ work and $O(\log(n))$ depth. Each cluster node stores the same augmented values as in the non-batch case. \paragraph{Updates} A naive batch update algorithm would first generate all of the clusters in the path decompositions of all the paths. This would take $O(k \log(n))$ work, though, which already exceeds our desired time bounds. The trick to obtain improved bounds is to work incrementally from the bottom of the RC tree and combine updates on the way up. We assume that the batch of updates contains no duplicate vertices. This is easily achieved by preprocessing the batch and combining duplicates if there are any. We use the fact that given a cluster in the RC tree, we can easily determine the next cluster above it in a path decomposition in constant time (Lemma~\ref{lem:path_decomposition}). The algorithm determines, for each update, the first cluster on the path decomposition, and then processes the clusters level by level. At the lowest level of each update, the cluster $C$ is annotated with a value $p_{\text{update}}(C)$, containing the amount $x$ that will be added to that cluster. The algorithm then works level-by-level bottom up, for each affected cluster $C$, adds $p_{\text{update}}(C)$ to $p_+(C)$ and then recomputes the values of $p_{\min}$ and $w_{\min}$ using their recurrence relations. If $C$ has a subsequent cluster $C'$ in the path decomposition, then $C'$ is added to the list of affected clusters, and $p_{\text{update}}(C')$ is incremented by $p_{\text{update}}(C)$. The same $C'$ may be incremented concurrently by multiple predecessors, but since it can only have a constant number of predecessors per level, this is easy to implement in constant time. Since we only perform constant work for each node in the RC tree that is an ancestor of one of the update leaves, Lemma~\ref{lem:batch-bound} implies that the work of the algorithm is $O(k \log(1+n/k))$. Since the algorithms processes level-by-level and takes constant time per level and the RC tree has $O(\log(n))$ height, the update algorithm has $O(\log(n))$ depth. \begin{algorithm}[h] \caption{Batch path update algorithm} \label{alg:batch_path_update} \begin{algorithmic}[1] \Procedure{BatchAddPath}{$U = \{ (v_i, x_i) \}$ : \algtype{(vertex, number) list } } \State \alglocal{} N \algassign{} \textproc{Ancestors}($\{ \{ v_i \} \}$) $\cup$ \textproc{Children}(\textproc{Ancestors}($\{ \{ v_i \} \}$)) \State \alglocal{} $p_{\text{update}}(C)$ \algassign{} $0$ for each $C \in N$ \ParallelFor{\algeach{} $(v, x) \in U$} \State \alglocal{} $C$ \algassign{} $\textproc{FirstClusterInPathDecomposition}(v)$ \State $p_{\text{update}}(C)$ \algassign $x$ \EndParallelFor \ParallelFor{\algeach{} level of nodes $N_i \in N$, bottom up} \ParallelFor{\algeach{} cluster node $C \in N_i$} \State $p_+(C)$ \algassign{} $p_+(C) + p_{\text{update}}(C)$ \State \textproc{UpdateCluster}($C$) \If{$p_{\text{update}}(C) \neq 0$ \algand{} $\textproc{TopBoundary}(C) \neq r$} \State \alglocal{} $P$ \algassign{} \textproc{NextClusterInPathDecomposition}($C$) \State \textproc{FetchAndAdd}($p_{\text{update}}(P), p_{\text{update}}(C)$) \EndIf \EndParallelFor \EndParallelFor \EndProcedure \end{algorithmic} \end{algorithm} \paragraph{Subtree queries} Subtree queries use some similar ideas from the sequential case, and some new ones. First, as is the same in the sequential case, the algorithm must aggregate the sums of the $p_+$ values for contiguous paths of binary clusters. This can be performed in exactly the same way, but traversing the tree in parallel. To parallelize computing the lightest edge in multiple subtrees requires an additional pair of observations. First, the subtree decomposition for a vertex $v$ consists of constant number of clusters plus the subtree decomposition of at most one other vertex. Secondly, the other subtree decomposition on which the first one depends always corresponds to a vertex higher in the RC tree. This means that we can traverse the RC tree top down and fill in the values of the subtree queries. Each query is the minimum of a constant number of unary cluster minimums, and at most one other subtree minimum, which will have already been computed since it is at a higher level. \begin{algorithm}[H] \caption{Batch subtree query algorithm} \label{alg:batch_subtree_query} \begin{algorithmic}[1] \Procedure{BatchQuerySubtree}{$Q = \{ v_i \}$ : \algtype{vertex list } } \State \alglocal{} N \algassign{} \textproc{Ancestors}($\{ \{ v_i \} \}$) $\cup$ \textproc{Children}(\textproc{Ancestors}($\{ \{ v_i \} \}$)) \State \alglocal{} $p_\text{extra}(C)$ \algassign{} $0$ for each $C \in N$ \For{\algeach{} cluster node $C$ in a parallel top-down traversal of $\textproc{Ancestors}(Q)$} \If{$C$ \algis{} a \algtype{binary cluster}} \For{\algeach{} \algtype{binary cluster} $B$ \algin{} \textproc{BinaryChildren}($C$)} \State $p_{\text{extra}}(B)$ \algassign{} $p_{\text{extra}}(C)$ + $p_+(C)$ \EndFor \EndIf \EndFor \State \alglocal{} answer($v$) \algassign{} $\infty$ for each $v \in Q$ \For{\algeach{} cluster node $C$ in a parallel top-down traversal of $N$} \If{$C = \{ v \}$ for some $v \in Q$} \State answer($v$) = $\min_{c \in \textproc{UnaryChildren}(\textproc{Cluster}(v))} w_{\min}(c)$ \If{\textproc{Cluster}($v$) \algis{} a \algtype{binary cluster}} \State \alglocal{} bottom\_edge \algassign{} \textproc{Bottom}(\textproc{Cluster}($v$)) \State \alglocal{} edge\_weight \algassign{} $\min(w_{\min}(\text{bottom\_edge}), p_{\min}(\text{bottom\_edge}) + p_{\text{extra}}(\text{bottom\_edge}))$ \State answer($v$) \algassign{} $\min(\text{answer}(v), \text{edge\_weight})$ \State answer($v$) \algassign{} $\min(\text{answer}(v), \text{answer}(\textproc{BottomBoundary}(\text{bottom\_edge})))$ \EndIf \EndIf \EndFor \EndProcedure \end{algorithmic} \end{algorithm} \paragraph{Edge queries} Edge queries are very similar. The contiguous sums of $p_+$ are aggregated down the tree, and the resulting values are read off the binary clusters corresponding to the edges. \begin{algorithm}[H] \caption{Batch edge query algorithm} \label{alg:batch_edge_query} \begin{algorithmic}[1] \Procedure{BatchQueryEdge}{$Q = \{ e_i \}$ : \algtype{vertex list } } \State \alglocal{} $p_\text{extra}(C)$ \algassign{} $0$ for each $C \in \textproc{Ancestors}(Q)$ \ParallelFor{\algeach{} level of nodes $N_i \in \textproc{Ancestors}(Q)$, top down} \ParallelFor{\algeach{} cluster node $C \in N_i$} \If{$C$ \algis{} a \algtype{binary cluster}} \For{\algeach{} \algtype{binary cluster} $B$ \algin{} \textproc{BinaryChildren}($C$)} \State $p_{\text{extra}}(B)$ \algassign{} $p_{\text{extra}}(C)$ + $p_+(C)$ \EndFor \EndIf \EndParallelFor \EndParallelFor \State \alglocal{} answer($e$) \algassign{} ($p_{\min}(\{e\}) + p_{\text{extra}}(\{ e \})$) for each $e \in Q$ \State \algreturn{} answer \EndProcedure \end{algorithmic} \end{algorithm} \end{comment} \section{Batched mixed operations on trees }\label{sec:tree-ops} The key part of Geissmann and Gianinazzi's parallel minimum cut algorithm~\cite{geissmann2018parallel} is a data structure that can evaluate a sequence of path weight updates and path weight queries on a tree all in parallel as if the operations were executed sequentially. This allows their algorithm to simulate the steps of Karger's sequential algorithm in low depth. In this section, we introduce a framework that both generalizes and improves on the work bounds of this data structure. Our framework can take any suitable set of weighted tree update and query operations and produce an algorithm for simulating them work efficiently in low depth. This framework is based on parallel RC trees. \begin{definition}[Simple Operations] We say that a sequence of update and query operations on a rooted RC tree is \emph{simple} if \begin{itemize}[leftmargin=*] \item An augmented value is maintained at every cluster that is set directly at the leaves, and can be computed for internal clusters in constant time given the values of the children clusters \item Update operations involve modifying an augmented value at a leaf and then propagating the updated augmented values to each ancestor cluster as above \item Query operations need only examine the values on clusters on a root-to-leaf path and their children \end{itemize} \end{definition} \noindent Properties~\ref{lem:path_decomposition}~and~\ref{lem:subtree-decomposition} suggest that path and subtree operations are simple and therefore amenable to this framework. We will show that they can be implemented as such. \begin{theorem} Given a sequence of $k$ simple operations on a rooted RC tree, there exists an algorithm that can compute the result of all of the query operations as if the sequence of updates and queries was executed sequentially, in $O(n + k\log(n+k))$ work and $O(\log(n)\log(k))$ depth. \end{theorem} \subsection{Batch evaluation algorithm}\label{sec:batcheval} As in the non-batched case, the algorithm first computes a static RC tree of the rooted tree $T$, and computes the initial values of the augmented data ($p_{\min}$ and $w_{\min}$) which takes $O(n)$ work and $O(\log(n))$ depth. We use similar techniques to Geissmann and Gianinazzi~\cite{geissmann2018parallel}, in which we merge sorted update sequences up the tree so that each node of the RC tree knows its value at all relevant times. \guy{the previous sentence makes our result sound incremental. we should point out issues with previous approach.} At a high level, the algorithm works in three phases. In the first phase, the algorithm delivers all of the direct updates (i.e.\ $p_+$ values) \guy{perhaps not clear what direct updates are.} to the relevant nodes. In the second phase, the algorithm traverses the RC tree bottom-up, for each node, merging the updates (based on their order in the operation sequence) present in its children. At the end of these two phases, every node knows its relevant values at all times at which it was affected by an update. Finally, queries can now be performed by looking up the values in the nodes that they depend on after the most recent update. We now describe these ideas in more detail. For each operation in the operation sequence, we first tag it with a timestamp $t$, given by its position in the sequence. This allows us to correctly order sequences of updates that affect the same values, and answer queries with respect to only the previous updates. For each node, instead of storing a single value of $p_{\min}$, $w_{\min}$, and $p_+$, the algorithm stores a timestamped list of values. Let's use the following notation to make things clearer \begin{itemize} \item $p^t_{\min}(B)$ denotes the minimum weight on the cluster path of $B$ at timestamp $t$. \item $w^t_{\min}(C)$ denotes the minimum weight in the cluster $C$ at timestampt $t$ \item $p^t_+(B)$ denotes the amount of weight directly added to cluster $B$ during timestamp $t$ \item $p^t_{\Sigma}(B)$ denotes the sum of all weights added directly to cluster $B$ up to and including timestamp $t$. \end{itemize} Assume that the initial values (before applying any updates) correspond to timestamp $0$, and the first operation starts from timestamp $1$. For a cluster $C$, we denote the list of \emph{relevant timestamps} by $\mathbf{t}(C)$. A timestamp is relevant to a node if its value could change at that timestamp due to an update that occurred at that time. \guy{wordy.} \paragraph{Phase one: Delivering updates to nodes.} The goal of phase one is for each binary cluster in the path decomposition of any of the updates to have a list of timestamped update operations that affected it. In other words, the goal is to populate $p_+(B)$ for all affected binary clusters. Naively, we could achieve this by generating the path decomposition for every update, bucketing the update operations into the clusters, and sorting them. However, since there are $O(k \log(n))$ total clusters in all of the path decompositions w.h.p., sorting them all would take $O(k \log(n) \log(k))$ work, which is a $\log(k)$ factor too high. In the sequential setting, a stable radix sort could be used instead, but there is no known parallel stable radix sort algorithm that runs in low depth. We therefore use a more clever approach. Recall that for simplicity, all path updates are on paths of the form $r-v$, where $r$ is the root vertex of the tree. The algorithm begins by bucketing the update operations based on the vertex $v$ and sorting them in order of their timestamp within each bucket. This can be achieved with a parallel sorting algorithm and hence takes $O(k\log(k))$ work and $O(\log(k))$ depth w.h.p. We now take advantage of the fact that the clusters in the path decomposition of any $v-r$ path are all children of clusters on the $v$ to root path in the RC tree. The main idea is then to walk up the tree in parallel from each affected $v$ in level order, merge \guy{by timestamp?} the updates that were present on the children clusters, and then deliver any updates that need to be delivered to one of the children. Observe that in total, each update operation touches $O(\log(n))$ nodes in the RC tree w.h.p, for a total of $O(k \log(n))$ updates w.h.p. At each node, the algorithm can use a work-efficient merge routine which preserves the timestamp order of the updates and runs in linear work and $O(\log(k))$ depth. Therefore phase one takes $O(k \log(n) + k\log(k))$ total work w.h.p., which is at most $O(k \log(n+k))$ w.h.p. Since there are $O(\log(n))$ levels in the RC tree w.h.p.\ and each one can be processed in parallel, it takes $O(\log(n)\log(k))$ depth w.h.p. \paragraph{Phase two: Merging updates.} After phase one, every binary cluster will contain the relevant updates \guy{what are relevant updates?} in its $p_+$ list. Phase two is to apply the result of these updates to the augmented data $p_{\min}$ and $w_{\min}$ and recursively update the ancestors augmented data. Recall from earlier that in the non-timestamped case, the augmented values were computed in terms of the augmented values of the child clusters. We use a similar idea in the timestamped case, except that we must now merge the relevant timestamp lists of the children, and then compute the augmented value at each timestamp, which will depend on the augmented values of the children at the most recent timestamp. First, set the relevant timestamps of each cluster to $\{0\}$. The relevant timestamps for each cluster are then the union of those of their children, and the timestamps at which the cluster was updated, i.e.\ those at which $p^t_+(C) \in p_+(C)$. For a binary cluster, we can use a parallel prefix sum (scan) algorithm to compute $p^t_{\Sigma}(B)$ for every relevant timestamp $t \in \mathbf{t}(B)$, since, by definition \begin{equation} p^t_{\Sigma}(B) = \sum_{\substack{t' \in \mathbf{t}(B), t' \leq t}} p^{t'}_+(B). \end{equation} This takes linear work in the number of relevant timestamps and $O(\log(k))$ depth. Then, we can calculate the timestamped values using the following recurrences. For binary clusters $B$ with subclusters $c(B)$ and binary subclusters $B^\uparrow$ and $B^\downarrow$ \begin{itemize} \item $p^t_{\min}(B) = \min(p^{t'}_{\min}(B^\uparrow), p^{t''}_{\min}(B^\downarrow)) + p^t_\Sigma(B)$, where $t' = \max \{ \mathbf{t}(B^\uparrow) \leq t \}$, $t'' = \max \{ \mathbf{t}(B^\downarrow) \leq t \}$ \item $w^t_{\min}(B) = \min( p^t_{\min}(B), \displaystyle\min_{c \in c(B)} w^{t_{c}}_{\min}(c) )$ where $t_{c} = \max \{ \mathbf{t}(c) \leq t \}$ \end{itemize} For non-binary clusters $C$ with subclusters $c(C)$, \begin{itemize} \item $w^t_{\min}(C) =\displaystyle\min_{c \in c(C)} w^{t_{c}}_{\min}(c)$ where $t_{c} = \max \{ \mathbf{t}(c) \leq t \}$ \end{itemize} Naively, we could compute the values of $t', t''$ and $t_{c_i}$ using a binary search on the list of timestamps, but this would add an extra $\log$ factor to the work. To make this efficient, we can compute them all at once using a linear work merge on the children's timestamps. Each augmented value at each timestamp can then be computed in constant time. Since each update contributes a relevant timestamp to all of its ancestors, and their direct children, the total number of relevant timestamps across all nodes is $O(k \log(n))$ w.h.p. Since each node performs linear work in this quantity and takes $O(\log(k))$ depth, processing the $O(\log(n))$ levels of the tree in parallel, the total cost of phase two is $O(k \log(n))$ work and $O(\log(n)\log(k))$ depth w.h.p. \paragraph{Phase three: Answering queries.} The final phase is to answer all of the queries in the operation sequence. A naive algorithm for doing so would be to evaluate each query independently. Note that the sequential query algorithms inspect the values of at most $O(\log(n))$ clusters w.h.p.\ to determine their answers. This process can simply be performed independently in parallel for each query, using a binary search to determine the most recent $t' \in \mathbf{t}(C)$ for each cluster $C$ examined, to read the most up-to-date values of $p_{\min}$, $p_+$, and $w_{\min}$. Unfortunately, this algorithm incurs an extra $O(\log(k))$ work overhead due to the binary search. To mitigate this, we simply use the same trick as in phase one, where we bucket each query into the leaf cluster of the vertex/edge that it corresponds to, sort these buckets by timestamp, merge the buckets up the tree maintaining timestamp order, and copying queries to the children if they need to read them. Since, just like updates, queries only ever need to read values that are on or are children of the root-to-leaf path, this requires $O(k \log(n) + k\log(k))$ work in total w.h.p.\ and $O(\log(n)\log(k))$ depth using a linear work $O(\log(k))$ depth merge algorithm. Once the queries have been sorted and delivered, the binary searches can be replaced by merging the query list on each node with the list of relevant timestamps, just like in Phase Two, which also takes $O(k \log(n))$ work and $O(\log(k)\log(n))$ depth w.h.p. Finally, each query can now be answered in $O(\log(n))$ time w.h.p.\ by examining the relevant nodes and finding the correct timestamp to look at in $O(1)$ using the result of the merge. This phase therefore takes $O(k\log(n) + k\log(k))$ total work w.h.p., which is at most $O(k \log(n+k))$, and $O(\log(n)\log(k))$ depth w.h.p. \subsection{Dynamic subtree queries with path updates}\label{sec:seq-tree} We wish to maintain, given a rooted tree $T = (V,E)$ a weight $w(e)$ for each $e \in E$, a data structure that supports the following operations. \begin{itemize}[leftmargin=*] \item \textproc{AddPath}($u, v, x$): Adds $x$ to the weight of all edges on the path from $u \in V$ to $v \in V$, \item \textproc{QuerySubtree}($v$): Returns the smallest weight of an edge in the subtree rooted at $v \in V$, \item \textproc{QueryEdge}($e$): Returns $w(e)$ \end{itemize} \guy{do we need a QueryEdge? Isn't it a special case of QuerySubtree? Perhaps we have to add (inclusive) to the description of querysubtree.} \noindent This can be achieved in the sequential setting in $O(\log(n))$ time by using top trees~\cite{alstrup2005maintaining}. We will now show how to implement this using RC trees. Our solution matches the bounds of the canonical sequential solution given by top trees and link-cut trees; it solves a single query or performs a single update in $O(\log(n))$ time. To simplify the algorithms, we assume that path updates are only ever performed on root-to-vertex paths. This comes at no loss of generality since an update to an arbitrary path $u \to v$ can be performed in this setting by converting \textproc{AddPath}$(u,v,x)$ into \textproc{AddPath}$(r, v, x)$, \textproc{AddPath}$(r,u,x)$, \textproc{AddPath}$(r, \textproc{LCA}(u,v), -2x)$. Given as input, a rooted tree $T$ with root $r$, our algorithm builds a static RC tree~\cite{acar2005experimental,acar2020batch} on $T$. This can be achieved in $O(n)$ work and $O(\log(n))$ depth w.h.p.\ using the tree contraction algorithm of Miller and Reif~\cite{miller1985parallel}. Note that we do not need to employ fully dynamic RC trees since we only perform value updates to the tree, and never links or cuts. Nodes in the RC tree will be augmented to store the following information: \guy{On rereading this I find the late introduction of lazyness confusing. Perhaps we should say from the start something like` ``lazy minimum weight, where the actual min weight is calculated as described below''.} \begin{itemize} \item $w_{\min}(C)$: The minimum weight edge in the cluster $C$ \guy{Technically it is the weigh of the minimum edge in the cluster, not the edge itself, right?} \end{itemize} \noindent Nodes corresponding to binary clusters will additionally store the following: \begin{itemize} \item $p_+(C)$: The total weight that has ever been directly added to the cluster path of $C$ \item $p_{\min}(C)$: The minimum weight edge on the cluster path of $C$ \end{itemize} \guy{Are binary clusters denoted with $B$ or $C$. We seem to be inconsistent.} \noindent $w_{\min}$ and $p_{\min}$ are initially computed and maintained using the following recurrence relations. Given a binary cluster $B$ with subclusters $c(B)$ and top and bottom binary subclusters $B^{\uparrow}$ and $B^{\downarrow}$, we have \begin{itemize} \item $p_{\min}(B) = \min(p_{\min}(B^{\uparrow}), p_{\min}(B^{\downarrow})) + p_+(B)$ \item $w_{\min}(B) = \min(p_{\min}(B), \displaystyle\min_{c \in c(B)} w_{\min}(c))$ \end{itemize} For a nonbinary cluster $C$ with subclusters $c(C)$, we similarly set \begin{itemize} \item $w_{\min}(C) = \displaystyle\min_{c \in c(C)} w_{\min}(c)$ \end{itemize} \paragraph{Updates.} To implement \textproc{AddPath}$(r,v,x)$ our algorithm first identifies the clusters $P = \{ C_i\}$ that make up the path decomposition for $v$. For each such cluster $C_i$, it adds $x$ to $p_+(C_i)$. It then updates all of the affected clusters \guy{what is an affected cluster, this should be stated more clearly} and their ancestor clusters using the update rules above. By Lemma~\ref{lem:path_decomposition}, this can be achieved by simply traversing the path between the base cluster of $u$ and the root of the RC tree. Since the RC tree has $O(\log(n))$ height and constant degree, this process takes $O(\log(n))$ time. \begin{comment} \begin{algorithm}[h] \caption{Path update algorithm} \label{alg:path_update} \begin{algorithmic}[1] \Procedure{AddPath}{$v$ : \algtype{vertex}, $x$ : \algtype{number}} \State \alglocal{} $P$ = \textproc{PathDecomposition}($v$) \For{\algeach{} \algtype{cluster} $C$ \algin{} $P$} \State $p_+(C)$ \algassign{} $p_+(C) + x$ \EndFor \For{\algeach{} \algtype{cluster} $C$ \algin{} $P\ \cup$ \textproc{Ancestors}($P$) in bottom-up order} \State \textproc{UpdateCluster}($C$) \EndFor \EndProcedure \State \Procedure{UpdateCluster}{$C$ : \algtype{cluster}} \If{$C = \{ e \}$ \algis{} a \algtype{binary} leaf cluster} \State $p_{\min}(C)$ \algassign{} $w(e) + p_+(C)$ \State $w_{\min}(C)$ \algassign{} $p_{\min}(C)$ \Else \If{$C$ \algis{} a \algtype{binary cluster}} \State $p_{\min}(C)$ \algassign{} $\min(p_{\min}(\textproc{Top}(C)), p_{\min}(\textproc{Bot}(C))) + p_+(C)$ \State $w_{\min}(C) = \min(p_{\min}(C), \min_{c \in \textproc{Children}(C)} w_{\min}(c))$ \Else \State $w_{\min}(C) = \min_{c \in \textproc{Children}(C)} w_{\min}(c)$ \EndIf \EndIf \EndProcedure \end{algorithmic} \end{algorithm} \end{comment} \guy{This seems like a waste of space. lets define lazy weights from the start.} We must note that this algorithm does not actually fully update the augmented values in the RC tree. To faithfully maintain the values of $p_{\min}$, an update might have to process $\Theta(n)$ nodes, since the weights of the binary children of the path decomposition, and their binary children and so on would have to be updated. To overcome this incompleteness, the remaining updates are performed \emph{lazily} using the $p_+$ values. Specifically, the query algorithms must exploit the following fact: \guy{lets give a notation for actual weight, as opposed to lazy weight instead of the vague ``true''.} \begin{lemma}\label{lem:true_p_val} After performing a sequence of updates, for a binary cluster $C$ the ``true'' value of $p_{\min}(C)$ is given by \begin{equation} p_{\min}(C) + \sum_{b \in B} p_+(b), \end{equation} where $B$ is the contiguous sequence of $C$'s immediate ancestors that are binary clusters (i.e.\ the list of $C$'s ancestors before the first unary ancestor). \end{lemma} \paragraph{Subtree queries.} Given a vertex $v$, a subtree query aims to determine the lightest edge in the subtree rooted at $v$. To achieve this, the algorithm computes the clusters $S = \{ C_i \}$ that make up the subtree decomposition of $v$. The algorithm cannot simply return the minimum value of $w_{\min}(C_i)$ since this does not account for the $p_+$ values. To account for this, owing to Lemma~\ref{lem:true_p_val}, the algorithm wants to compute, for each binary cluster $C$ in the decomposition, the value of $\sum_{b \in B_C} p_+(b)$. Doing this separately for each cluster could lead to a runtime of $O(\log^2(n))$ since each cluster has $O(\log(n))$ ancestors, but owing to Lemma~\ref{lem:subtree-decomposition}, these values can be computed for all of the clusters in a single top-down traversal from the root cluster to the base cluster of $v$, by aggregating $p_+$ for each contiguous chunk of binary clusters along the path and sending the values to their binary children. The answer to the query is then the minimum of the minimum value of $w_{\min}(C_i)$ for each cluster in the decomposition and the corrected value (Lemma~\ref{lem:true_p_val}) of $p_{\min}(C_i)$ for each binary cluster in the decomposition. By Lemma~\ref{lem:subtree-decomposition}, this process takes $O(\log(n))$ time w.h.p. \begin{comment} \begin{algorithm}[h] \caption{Subtree queries} \label{alg:subtree-query} \begin{algorithmic}[1] \Procedure{QuerySubtree}{$v$ : \algtype{vertex}} \State \alglocal{} S \algassign{} \textproc{SubtreeDecomposition}($v$) \State \alglocal{} $p_\text{extra}(C)$ \algassign{} $0$ for each $C \in \textproc{Ancestors}(v)$ \For{\algeach{} \algtype{cluster} $C$ in \textproc{Ancestors}($v$) in top-down order} \If{$C$ \algis{} a \algtype{binary cluster}} \For{\algeach{} \algtype{binary cluster} $B$ \algin{} \textproc{BinaryChildren}($C$)} \State $p_{\text{extra}}(B)$ \algassign{} $p_{\text{extra}}(C)$ + $p_+(C)$ \EndFor \EndIf \EndFor \alglocal{} answer \algassign{} $\infty$ \For{\algeach{} \algtype{cluster} $C$ \algin{} $S$} \State answer \algassign{} $\min(\text{answer}, w_{\min}(C))$ \If{$C$ \algis{} a \algtype{binary cluster}} \State answer \algassign{} $\min(\text{answer}, p_{\min}(C) + p_{\text{extra}}(C))$ \EndIf \EndFor \State \algreturn{} answer \EndProcedure \end{algorithmic} \end{algorithm} \end{comment} \paragraph{Edge queries.} An edge query aims to compute, for a given edge $e$, the weight of the edge $e$. To compute this, the algorithm uses Lemma~\ref{lem:true_p_val} and determines the $O(\log(n))$ binary clusters $\{ C_i \}$ that contain $e$ on their cluster path. The answer is then $p_{\min}(\{ e \}) + \sum p_+(C_i)$. Since the RC tree has height $O(\log(n))$, this takes $O(\log(n))$ time w.h.p. \begin{comment} \begin{algorithm}[h] \caption{Edge queries} \label{alg:edge-query} \begin{algorithmic}[1] \Procedure{QueryEdge}{$e = (u,v)$ : \algtype{edge}} \State \alglocal{} $C$ \algassign{} \textproc{Cluster}($\{ e \}$) \State \alglocal{} answer \algassign{} $p_{\min}(C)$ \While{\textproc{Parent}($C$) is a \algtype{binary cluster}} \State $C$ \algassign{} \textproc{Parent}($C$) \State answer \algassign{} answer + $p_+(C)$ \EndWhile \State \algreturn{} answer \EndProcedure \end{algorithmic} \end{algorithm} \end{comment} \begin{comment} \paragraph{Batch-dynamic subtree queries with path updates} We can also consider a batch-dynamic version of the problem. The goal is to support the following operations in low depth. \begin{itemize}[leftmargin=*] \item \textproc{BatchAddPath}($U = \{ (u_i, v_i, x_i) \}$): For each $(u_i, v_i, x_i)$, adds $x_i$ to the weight of all edges from $u_i$ to $v_i$ \item \textproc{BatchQuerySubtree}($Q = \{ v_i \}$): Returns, for each $v_i$, the lightest edge in the subtree rooted at $v_i$ \item \textproc{BatchQueryEdge}($Q = \{ e_i \})$): Returns, for each edge $e_i$, the weight of $e_i$ \end{itemize} \noindent In Appendix~\ref{sec:batchtrees}, we prove the following theorem. \begin{theorem}\label{thm:batch-dynamic} There exists a parallel data structure that maintains a dynamic tree and supports the operations \textproc{BatchAddPath}, \textproc{BatchQuerySubtree}, and \textproc{BatchQueryEdge} in $O(k \log(1+n/k))$ work and $O(\log(n))$ depth, where $k$ is the batch size of the operation. \end{theorem} \end{comment} \section{Introduction} Minimum cut is a classic problem in graph theory and algorithms. The problem is to find, given an undirected weighted graph $G = (V, E)$, a nonempty subset of vertices $S \subset V$ such that the total weight of the edges crossing from $S$ to $V \setminus S$ is minimized. Early approaches to the problem were based on reductions to maximum $s$-$t$ flows~\cite{gomory1961multi,hao1994faster}. Several algorithms followed which were based on edge contraction~\cite{nagamochi1992computing,nagamochi1992linear,karger1993global,karger1996new}. Karger was the first to observe that tree packings~\cite{nash1961edge} can be used to find minimum cuts~\cite{karger2000minimum}. In particular, for a graph with $n$ vertices and $m$ edges, Karger showed how to use random sampling and a tree packing algorithm of Gabow~\cite{gabow1995matroid} to generate a set of $O(\log n)$ spanning trees such that, with high probability, the minimum cut crosses at most two edges of one of them. A cut that crosses at most $k$ edges of a given tree is called a \emph{$k$-respecting} cut. Karger then gives an $O(m \log^2 n)$-time algorithm for finding minimum 2-respecting cuts, yielding a randomized $O(m\log^3 n)$-time algorithm for minimum cut. Karger also gives a parallel algorithm for minimum 2-respecting cuts in $O(n^2)$ work and $O(\log^3 n)$ depth. Until very recently, these were the state-of-the-art sequential and parallel algorithms for the weighted minimum cut problem. A new wave of interest in the problem has recently pushed these frontiers. Geissmann and Gianinazzi~\cite{geissmann2018parallel} design a parallel algorithm for minimum $2$-respecting cuts that performs $O(m\log^3 n)$ work in $O(\log^2 n)$ depth. Their algorithm is based on parallelizing Karger's algorithm by replacing a sequential data structure for the so-called \emph{minimum path} problem, based on dynamic trees, with a data structure that can evaluate a \emph{batch} of updates and queries in parallel. Their algorithm performs just a factor of $O(\log n)$ more work than Karger's sequential algorithm, but substantially improves on the work of Karger's parallel algorithm. Soon after, a breakthrough from Gawrychowski, Mozes, and Weimann~\cite{gawrychowski2019minimum} gave a randomized $O(m\log^2 n)$ algorithm for minimum cut. Their algorithm achieves the $O(\log n)$ speedup by designing an $O(m\log n)$ algorithm for finding the minimum $2$-respecting cuts, which was the bottleneck of Karger's algorithm. This is the first result to beat Karger's seminal algorithm in over 20 years. An open question posed by Karger was whether a deterministic algorithm can achieve an $O\left(m^{1+o(1)}\right)$ runtime. This was recently resolved in the affirmative by Li~\cite{li2020deterministic} by derandomizing the construction of the spanning trees. In our work, we combine ideas from Gawrychowski et al.\ and Geissmann and Gianinazzi with several new techniques to close the gap between the parallel and sequential algorithms. Our contribution can be summarized by: \begin{theorem}\label{thm:main-theorem} The minimum cut of a weighted graph can be computed with high probability in $O(m \log^2 n)$ work and $O(\log^3 n)$ depth. \end{theorem} \noindent We achieve this using a combination of results that may be of independent interest. Firstly, we design a framework for evaluating mixed batches of updates and queries on trees work efficiently in low depth. This algorithm is based on parallel Rake-Compress Trees (RC trees)~\cite{acar2020batch}. Roughly, we say that a set of update and query operations implemented on an RC tree is \emph{simple} (defined formally in Section~\ref{sec:batched-mixed-ops}) if the updates maintain values at the leaves that are modified by an associative operation and combined at the internal nodes, and the queries read only the nodes on a root-to-leaf path and their children. Simple operation sets include updates and queries on path and subtree weights. \begin{theorem}\label{theorem:batch} Given a bounded-degree RC tree of size $n$ and a simple operation set, after $O(n)$ work and $O(\log n)$ depth preprocessing, batches of $k$ operations from the operation-set, can be processed in $O(k \log (kn))$ work and $O(\log n\log k)$ depth. The total space required is $O(n + k_{max})$, where $k_{max}$ is the maximum size of a batch. \end{theorem} \noindent This result generalizes and improves on Geissmann and Gianinazzi~\cite{geissmann2018parallel} who give an algorithm for evaluating a batch of $k$ path-weight updates and queries in $\Omega(k\log^2 n)$ work. Next, we design a faster parallel algorithm for approximating minimum cuts, which is used as an ingredient in producing the tree packing used in Karger's approach (Section~\ref{sec:packing}). To achieve this, we design a faster sampling scheme for producing graph skeletons, leveraging recent results on sampling binomial random variables, and a transformation that reduces the maximum edge weight of the graph to $O(m \log n)$ while approximately preserving cuts. Lastly, we show how to solve the minimum $2$-respecting cut problem efficiently in parallel, using a combination of our new mixed batch tree operations algorithm and the use of RC trees to efficiently perform a divide-and-conquer search over the edges of the $2$-constraining trees (Section~\ref{sec:two-respect}). \begin{theorem}\label{thm:two-respecting} The minimum $2$-respecting cut of a weighted graph with respect to a given spanning tree can be computed in $O(m \log n)$ work and $O(\log^3 n)$ depth with high probability. \end{theorem} \myparagraph{Application to the unweighted problem} The unweighted minimum cut problem, or edge connectivity problem was recently improved by Ghafarri, Nowicki, and Thorup~\cite{ghaffari2020faster} who give an $O(m\log n + n\log^4 n)$ work and $O(\polylog n)$ depth randomized algorithm which uses Geissmann and Gianinazzi's algorithm as a subroutine. By plugging our improved algorithm into Ghafarri, Nowicki, and Thorup's algorithm, we obtain an algorithm that runs in $O(m\log n + n\log^2 n)$ work and $O(\polylog n)$ depth w.h.p. \section{Batched Mixed Operations on Trees}\label{sec:batched-mixed-ops} The batched mixed operation problem is to take an off-line sequence of mixed operations on a data structure, usually a mix of queries and updates, and process them as a batch. The primary reason for batch processing is to allow for parallelism on what would otherwise be a sequential execution of the operations. We use the term \emph{operation-set} to refer to the set of operations that can be applied among the mixed operations. We are interested in operations on trees, and our results apply to operation-sets that can be implemented on an RC tree in a particular way, defined as follows. \begin{definition} An implementation of an operation-set on trees is a \emph{simple RC{} implementation} if it uses an RC representation of the trees and satisfies the following conditions. \begin{enumerate}[leftmargin=*] \setlength\itemsep{0em} \item The implementation maintains a value at every RC cluster that can be calculated in constant time from the values of the children of the cluster, \item every query operation is implemented by traversing from a leaf to the root examining values at the visited clusters and their children taking contant time per value examined, and using constant space, and \item every update operation involves updating the value of a leaf using an associative constant-time operation, and then reevaluating the values on each cluster on the path from the leaf to the root. \end{enumerate} \end{definition} \noindent Note that every operation has an \emph{associated leaf} (either an edge or vertex). Also note that setting (i.e.,\ overwriting) a value is an associative operation (just return the second of the arguments). For simple RC{} implementations, all operations take time (work) proportional to the depth of the RC tree since they only follow a path to the root taking constant time at each cluster. Although the simple RC{} restriction may seem contrived, most operations on trees studied in previous work~\cite{sleator1983data,alstrup2005maintaining,acar2005experimental} can be implemented in this form, including most path and subtree operations. This is because of a useful property of RC trees, that all paths and subtrees in the source tree can be decomposed into clusters that are children of a single path in the RC tree, and typically operations need just update or collect a contribution from each such cluster. \myparagraph{Example} As an example, consider the following two operations on a rooted tree (the first an update, and the second a query): \begin{itemize}[leftmargin=*] \setlength\itemsep{0em} \item \textproc{addWeight}$(v, w)$ : adds weight $w$ to a vertex $v$ \item \textproc{subtreeSum}$(v)$ : returns the sum of the weights of all of the vertices in the subtree rooted at $v$ \end{itemize} \begin{algorithm}[H] \begin{algorithmic}[1] \footnotesize \Procedure{subtreeSum}{$v$ : \textbf{vertex}} \State $w \leftarrow 0$ \State $x \leftarrow v$; $p \leftarrow \ra{x}{p}$ \While{$p$ \textbf{is a} binary cluster} \If{$(x = \ra{p}{t})$ or $(x = \ra{p}{v})$\label{line:subsumif}} \State $w \leftarrow w + \ra{p}{\ra{b}{w}} + \ra{p}{\ra{v}{w}} + \sum_{u \in \raa{p}{U}} \ra{u}{w}$ \EndIf \State $x \leftarrow p;$ $p \leftarrow \ra{x}{p}$ \EndWhile \State return $w + \ra{p}{\ra{v}{w}} + \sum_{u \in \raa{p}{U}} \ra{u}{w} $ \EndProcedure \end{algorithmic} \caption{The \textproc{subtreeSum} query.} \label{alg:subsum} \end{algorithm} \noindent These operations can use a simple RC{} implementation by keeping as the value of each cluster the sum of values of all its children. This satisfies the first condition since the sums take constant time. Single-edge clusters in the RC tree start with the initial weight of the edge, while single-vertex clusters start with zero weight. An \textproc{addWeight}$(v,w)$ adds weight $w$ to the vertex $v$ (which is a leaf in the RC tree) and updates the sums up to the root cluster. This satisfies the third condition since addition is associative and takes constant time. The query can be implemented as in Algorithm~\ref{alg:subsum}, where $\ra{x}{w}$ is the weight stored on the cluster $x$. It starts at the leaf for $v$ and goes up the RC tree keeping track of the total weight underneath $v$. Note that $x$ will never be a unary cluster, so if not the representative or top subcluster of $p$, it is the bottom subcluster with nothing below it in this cluster. Observe that \textproc{subtreeSum} only examines values on a path from the start vertex to the root and the children along that path. Each step takes constant time and requires constant space, satisfying the second condition. The operation-set therefore has a simple RC{} implementation. \begin{figure*}[t] \centering \includegraphics[width=0.8\textwidth]{img/operation-merging} \caption{Merging the operation lists for a binary cluster consisting of \textproc{addWeight} and \textproc{subtreeSum} operations. Values in the operation sequence, denoted V : $v$, are computed by aggregating the latest values of the children at the given timestamp. For example, at $t_6$ in $p$, the algorithm adds $3$ from $\ra{p}{t}$ at $t_2$, $10$ from $\ra{p}{b}$ at $t_6$, and $2$ from $\ra{p}{v}$ at $t_1$. Queries, denoted Q : $q$, are updated at each level by using the latest values of the children. For example, to update the query at $t_3$, it takes the current value of $1$ from $\ra{p}{t}$ at $t_3$, then adds the weight of $5$ from $\ra{p}{b}$ at $t_0$, and the weight of $2$ from $\ra{p}{v}$ at $t_1$, as per Algorithm~\ref{alg:subsum}.}\label{fig:merging-operations} \end{figure*} \subsection{Batched mixed operations algorithm} We are interested in evaluating batches of operations from an operation-set on trees with a simple RC{} implementation. In particular, we prove Theorem~\ref{theorem:batch}. \begin{proofsketch}[Proof sketch of Theorem~\ref{theorem:batch}] The preprocessing just builds an RC tree on the source tree, and sets the values for each cluster based on the initial values on the leaves. This can be implemented with the Miller-Reif algorithm~\cite{miller1989parallel}, in the binary forking model~\cite{blelloch2020optimal}, or deterministically~\cite{gazit1988optimal}. All take linear work and logarithmic depth (w.h.p for the randomized versions). Our algorithm for each batch is then implemented as follows: \begin{enumerate}[leftmargin=*] \setlength\itemsep{0em} \item Timestamp the operations by their order in the sequence. \item Collect all operations by their associated leaf, and sort within each leaf by timestamp. This can be implemented with a single sort on the leaf identifier and timestamp. \item For each leaf use a prefix sum on the update values to calculate the value of the leaf after each operation, starting from the initial value on the leaf. \item Initialize each query using the value it received from the prefix sum. We now have a list of operations on each leaf sorted by timestamp. For each update we have its value, and for each query we also have its partial evaluation based on the value. We prepend the initial value to the list, and call this the \emph{operation list}. An operation list is \emph{non-trivial} if it has more than just the initial value. \item For each level of the RC tree starting one above the deepest, and in parallel for every cluster on the level for which at least one child has a non-trivial operation list: \begin{enumerate}[leftmargin=*] \item Merge the operation lists from each child into a single list sorted by timestamp. \item Calculate for each element in the merged operations list, the latest value of each child at or before the timestamp. This can be implemented by prefix sums. \item For each list element, calculate the value at that timestamp from the child values collected in the previous step. \item For queries, use the values and/or child values to update the query. \end{enumerate} \end{enumerate} This algorithm needs to have children with non-trivial operation lists identify parents that need to be processed. This can be implemented by keeping a list of all the clusters at a level with non-trivial operation lists left-to-right in level order. When moving up a level, clusters that share the same parent can be combined. An illustration of the merging process is depicted in Figure~\ref{fig:merging-operations} using the operations from Algorithm~\ref{alg:subsum}. We first consider why the algorithm is correct. We assume by structural induction (over subtrees) that the operation lists contain the correct values for each timestamped operation in the list. This is true at the leaves since we apply a prefix sum across the associative operation to calculate the value at each update. For internal clusters, assuming the child clusters have correct operation lists (values for each timestamp valid until the next timestamp, and partial result of queries), we properly determine the operation lists for the cluster. In particular for all timestamps that appear in children we promote them to the parent, and for each we calculate the value based on the current value, by timestamp, for each child. We now consider the costs. The cost of the batch before processing the levels is dominated by the sort which takes $O(k \log k)$ work and $O(\log k)$ depth. The cost at each level is then dominated by the merging and prefix sums which take $O(k)$ work and $O(\log k)$ depth accumulated across all clusters that have a child with a non-trivial operation list. If the RC tree has depth $O(\log n)$ then across all levels the cost is bounded by $O(k \log n)$ work and $O(\log n\log k )$ depth. The total work and depth is therefore as stated. The space for each batch of size $k$ is bounded by the size of the RC tree which is $O(n)$ and the total space of the operation lists at any two adjacent levels, which is $O(k)$. \end{proofsketch} \subsection{Path updates and path/subtree queries} We now consider implementing mixed operations consisting of updating paths, and querying both paths and subtrees. We will use these in Sections~\ref{sec:improvements} and~\ref{sec:two-respect}. In particular we wish to maintain, given a weighted rooted tree $T = (V,E)$, a data structure that supports the following operations. \begin{itemize}[leftmargin=*] \setlength\itemsep{0em} \item \textproc{AddPath}($u, v, w$): For $u,v \in V$ adds $w$ to the weight of all edges on the $u$ to $v$ path. \item \textproc{QuerySubtree}($v$): Returns the lightest weight of an edge in the subtree rooted at $v \in V$, \item \textproc{QueryPath}($u,v$): For $u, v \in V$, returns the lightest weight of an edge on the $u$ to $v$ path. \item \textproc{QueryEdge}($e$): Returns $w(e)$ \end{itemize} \noindent To implement these, we first implement the simpler operations \textproc{AddPath}'($v, w$), which adds weight $w$ to the path from $v$ to the root; and \textproc{QueryPath}'($u,v$), which requires that $v$ be the representative vertex of an ancestor of $u$ in the RC tree. The more general forms can be implemented in terms of these with a constant number of calls given the lowest common ancestor (LCA) in the original tree for \textproc{AddPath}{} and in the RC tree for \textproc{QueryPath}{}. \begin{figure}[t] \centering \includegraphics[width=0.4\columnwidth]{img/addpath} \caption{When a binary cluster joins its children, all \textproc{addPath}s' that originated in the vertex, bottom, or unary subclusters will affect all of the edges in the top cluster path. Here, $w' = w_v + w_b + w_u = 6$ weight is added to edges on the top cluster path due to \textproc{addPath} operations from below.}\label{fig:addpath} \end{figure} \begin{lemma}\label{lem:batch-add-path-subtree-query} \label{lemma:path} The \textproc{AddPath}', \textproc{QuerySubtree}, \textproc{QueryPath}', and \textproc{QueryEdge}{} operations on bounded degree trees can be supported with a simple RC{} implementation. \end{lemma} \begin{algorithm} \footnotesize \begin{algorithmic}[1] \State \textbf{using} \textbf{VertexV} = \textbf{int} \State \textbf{using} \textbf{UnaryV} = \textbf{struct} \{ $m$ : \textbf{edge}, $w$ : \textbf{int} \} \State \textbf{using} \textbf{BinaryV} = \textbf{struct} \{ $m$ : \textbf{edge}, $l$ : \textbf{edge}, $w$ : \textbf{int} \}\medskip \Procedure{$f_{\mbox{\small unary}}$}{$w_v$ : \textbf{VertexV}, $(m_t, l_t, w_t)$ : \textbf{BinaryV}, $U$ : \textbf{UnaryV list}} \State $w' \leftarrow w_v + \sum_{u \in U} \ra{u}{w}$ \State $m_u \leftarrow \min_{u \in U} \ra{u}{m}$ \State \algreturn{} \{ $\min(m_t, l_t + w', m_u), w_t + w'$ \} \EndProcedure \Procedure{$f_{\mbox{\small binary}}$}{$w_v$ : \textbf{VertexV}, $(m_t, l_t, w_t)$ : \textbf{BinaryV}, $(m_b, l_b, w_b)$ : \textbf{BinaryV}, $U$ : \textbf{UnaryV list}} \State $w' \leftarrow w_v + w_b + \sum_{u \in U} \ra{u}{w}$ \State $m_u \leftarrow \min_{u \in U} \ra{u}{m}$ \State \algreturn{} \{ $\min(m_t, m_b, m_u), \min(l_t + w', l_b), w_t + w'$ \} \EndProcedure \Procedure{\textproc{AddPath}'}{$v$ : \textbf{vertex}, $w$ : \textbf{int}} \State $\ra{v}{\text{value}}$ \algassign{} $\ra{v}{\text{value}}$ + $w$ \State Reevaluate the $f(\cdot)$ on path to root. \EndProcedure \end{algorithmic} \caption{A simple RC{} implementation of \textproc{AddPath}{}'.} \label{alg:pathupdate} \end{algorithm} \begin{algorithm} \footnotesize \begin{algorithmic}[1] \Procedure{\textproc{QuerySubtree}}{$v$ : \textbf{vertex}} \State $w \leftarrow \infty$; $l \leftarrow \infty$ \State $x \leftarrow v$; $p \leftarrow \ra{x}{p}$ \While{$p$ \textbf{is a} binary cluster} \If{$(x = \ra{p}{t})$ or $(x = \ra{p}{v})$} \State $w' \leftarrow \ra{\ra{p}{b}}{w} + \ra{\ra{p}{v}}{w} + \sum_{u \in \raa{p}{U}} \ra{u}{w}$ \State $l \leftarrow \min(l + w', \ra{\ra{p}{b}}{l})$ \label{line:sublazy} \State $m \leftarrow \min(m, \ra{\ra{p}{b}}{m}, \min_{u \in \raa{p}{U}} \ra{u}{m})$ \label{line:submin} \EndIf \State $x \leftarrow p$; $p \leftarrow \ra{x}{p}$ \EndWhile \State $w' \leftarrow \ra{\ra{p}{v}}{w} + \sum_{u \in \raa{p}{U}} \ra{u}{w}$ \State return $\min(l + w', m, \min_{u \in \raa{p}{U}} \ra{u}{m})$ \EndProcedure \Procedure{\textproc{QueryEdge}}{$e$ : \textbf{edge}} \State $w \leftarrow w(e)$ \State $x \leftarrow e$; $p \leftarrow \ra{x}{p}$ \While{$p$ \textbf{is a} binary cluster} \If{$x = \ra{p}{t}$} \State $w \leftarrow w + \ra{\ra{p}{b}}{w} + \ra{\ra{p}{v}}{w} + \sum_{u \in \raa{p}{U}} \ra{u}{w}$ \EndIf \State $x \leftarrow p$; $p \leftarrow \ra{x}{p}$ \EndWhile \State return $w + \ra{\ra{p}{v}}{w} + \sum_{u \in \raa{p}{U}} \ra{u}{w}$ \EndProcedure \Procedure{\textproc{QueryPath}'}{$u$ : \textbf{vertex}, $v$ : \textbf{vertex}} \State $m \leftarrow \infty$; $t \leftarrow \infty$; $b \leftarrow \infty$ \State $x \leftarrow u$; $p \leftarrow \ra{x}{p}$ \While{not $\ra{p}{v} = v$}\label{alg:querypathloopstart} \State $w' \leftarrow \ra{\ra{p}{v}}{w} + \sum_{u \in \raa{p}{U}} \ra{u}{w}$ \If{$p$ \textbf{is a} unary cluster} \If{$x = \ra{p}{t}$} $m \leftarrow \min(t + w', m)$ \Else~$m \leftarrow\min(\ra{\ra{p}{t}}{l} + w', m)$ \EndIf \State $t \leftarrow \infty$; $b \leftarrow \infty$\label{alg:querypath-unary} \Else \State $w' \leftarrow w' + \ra{\ra{p}{b}}{w}$ \If{$x = \ra{p}{t}$} $t \leftarrow t + w'$; $b \leftarrow \min(b + w', \ra{\ra{p}{b}}{l})$ \ElsIf{$x = \ra{p}{b}$} $t \leftarrow \min(\ra{\ra{p}{t}}{l} + w', t)$ \Else~$t \leftarrow \ra{\ra{p}{t}}{l} + w'$; $b \leftarrow \ra{\ra{p}{b}}{l}$ \EndIf \EndIf \State $x \leftarrow p$; $p \leftarrow \ra{x}{p}$ \EndWhile\label{alg:querypathloopend} \If{$x = \ra{p}{t}$} $l \leftarrow b$ \ElsIf{$x = \ra{p}{b}$} $l \leftarrow t$ \Else\ \textbf{return} $m$ \EndIf \While{$p$ \textbf{is a} binary cluster} \State $w' \leftarrow \ra{\ra{p}{v}}{w} + \ra{\ra{p}{b}}{w} + \sum_{u \in \raa{p}{U}} \ra{u}{w}$ \If{$(x = \ra{p}{t})$} $l \leftarrow l + w'$ \EndIf \EndWhile \State \textbf{return} $\min(m,l)$ \EndProcedure \end{algorithmic} \caption{A simple RC{} implementation of \textproc{QueryEdge}{}, \textproc{QueryPath}', and \textproc{QuerySubtree}.} \label{alg:pathupdate2} \end{algorithm} \begin{proofsketch} Our simple RC{} implementation for combining values and \textproc{AddPath}' is given in Algorithm~\ref{alg:pathupdate}. The queries are given in Algorithm~\ref{alg:pathupdate2}. The value of each vertex (leaf) in the cluster is the total weight added to that vertex by \textproc{AddPath}'. The value for each unary cluster consists of: $m$, the minimum weight edge in the cluster; and $w$, the total weight of \textproc{AddPath}{}s' originating in the cluster. For each binary cluster we separate the minimum weights on and off the cluster path. In particular, the value of each binary cluster consists of: $m$, the minimum weight edge not on the cluster path; $l$, the minimum edge on the cluster path due to all \textproc{AddPath}{}' originating in the cluster; and $w$, the total weight of \textproc{AddPath}{}s' originating in the cluster. The $f_{\mbox{\small binary}}$ and $f_{\mbox{\small unary}}$ calculate the values for unary and binary clusters from the values of their children. We initialize each vertex with zero, and each edge $e$ with $(m = 0, l = w(e), w = 0)$. It is a simple RC{} implementation since (1) the $f(\cdot)$ can be computed in constant time, (2) the queries just traverse from a leaf on a path to the root (possibly ending early) only examining child values, taking constant time per level and constant space, and (3) the update just sets a leaf using an associative addition, and reevaluates the values to the root. We argue the implementation is correct. Firstly we argue by structural induction on the RC tree that the values as described in the previous paragraph are maintained correctly by $f_{\mbox{\small binary}}$ and $f_{\mbox{\small unary}}$. In particular assuming the children are correct we show the parent is correct. The values are correct for leaves since we increment the value on vertices with \textproc{AddPath}', and initialize the edges appropriately. To calculate the minimum edge weight of a unary cluster $f_{\mbox{\small unary}}$ takes the minimum of three quantities: the minimum off-path edge of the child binary cluster, the overall minimum edge of any of the child unary clusters, and, importantly, the minimum edge on the cluster path of the child binary cluster plus the \textproc{AddPath}{}' weight contributed by the unary clusters and the representative vertex (i.e., $\min(m_t, l_t + w', m_u)$). This is correct since all paths from those clusters to the root go through the cluster path, so it needs to be adjusted. The off-path edges and child unary clusters do not need to be adjusted since no path from the representative vertex goes through them. The minimum weight is therefore correct. The total \textproc{AddPath}{}' weight is correct since it just adds the contributions. For binary clusters we need to separately consider the minimum off- and on-path edges. For the off-path edges the parts that are off the cluster path are the off-path edges from the two binary children, plus all edges from the unary children (i.e., $\min(m_t,m_b,m_u)$). For the on-path edges both the top and bottom binary clusters contribute their on-path edges. The on-path edges from the bottom binary cluster do not need to be adjusted because no vertices in the cluster are below them. The on-path edges from the top binary cluster need to be adjusted by the \textproc{AddPath}{}' weights from all vertices in the bottom cluster, all vertices in unary child clusters, and the representative vertex since they are all below the path (this sum is given by $w'$). See Figure~\ref{fig:addpath}. The minimum of the resulted adjusted top edge and bottom edge is then returned, which is indeed the minimum edge on the path accounting for \textproc{AddPath}{}s' on vertices in the cluster. \textproc{QuerySubtree}{}$(v)$ accumulates the appropriate minimum weights within a subtree as it goes up the RC tree. It starts at the node for which $v$ is its representative vertex. As with the calculation of values it needs to separate the on-path and off-path minimum weight. Whenever coming as the upper binary cluster to the parent, \textproc{QuerySubtree}{} needs to add all the contributing \textproc{AddPath}{}' weights from vertices below it in the parent cluster (the representative vertex, the lower binary cluster and the unary clusters, see Figure~\ref{fig:addpath}) to the current minimum on-path weight. A minimum is then taken with the lower on-path minimum edge to calculate the new minimum on-path edge weight (Line~\ref{line:sublazy}). The off-path minimum is the minimum of the current off-path minimum, the minimum off-path edge of the bottom cluster and the minimums of the unary clusters (Line~\ref{line:submin}). Once we reach a unary cluster we are done since for a unary cluster all subtrees of vertices within the cluster are fully contained within the cluster. The final line therefore just determines the overal minimum for the subtree rooted at $v$ by considering the on-path edges adjusted by \textproc{AddPath}{}' contributions, the off-path edges, and all edges in child unary clusters. \textproc{QueryEdge}{}$(e)$ simply adds the total weight of all \textproc{AddPath}{}' operations that occurred beneath $e$ to the weight of $e$. Specifically, at each iteration of the loop, $w$ contains the $w(e)$ plus the total weight of all \textproc{AddPath}{}' operations originating at any vertex below $e$ that is contained in the current cluster $x$. As the query moves up the RC tree, if the parent cluster is a binary cluster and $x$ is its top subcluster, then the vertices not yet accounted for are those in the bottom subcluster, the representative vertex, and the unary subclusters. If $x$ is the bottom subcluster of its binary parent, or one of its unary subclusters, then no vertices in $p$ but not $x$ are below $e$. When the while loop terminates, $p$ is a unary cluster and $x$ is its binary subcluster. At this point, the representative of $p$, and all unary subclusters of $p$ are below $e$, and hence their weight is added to the total. Since $p$ is a unary cluster, there exists no additional vertices below $e$ in the tree, and hence the final weight contains the contributions of all \textproc{AddPath}{}' operations originating below $e$. Lastly, \textproc{QueryPath}{}' works by maintaining three values, $m, t, b$. To make defining them easier, consider, at each iteration of the main loop (Lines~\ref{alg:querypathloopstart}--\ref{alg:querypathloopend}) in which the current cluster $x$ is a binary cluster, the vertex $c$ which is the closest vertex to $u$ on the cluster path of $x$ (if $u$ is on the cluster path of $x$, say $c = u$). Then, we can define $m$ as the minimum weight edge on the path from $u$ to $c$ (which will be $\infty$ if $u$ is on the cluster path of $x$), $t$ as the minimum weight edge above $c$ on the cluster path of $x$, and $b$ as the minimum weight edge below $c$ on the cluster path of $x$. If $x$ is a unary cluster, then $t$ and $b$ are $\infty$ (undefined), and $m$ is simply the minimum weight edge on the path from $u$ to the boundary of $x$. Observe that it is important for the algorithm to maintain both $t$ and $b$ because it does not know in advance whether $v$ is above or below the current cluster path. It remains to argue that the implementation correctly maintains these values, and that the postprocessing is correct. Each time the algorithm moves up to the next highest cluster, it first computes $w'$, the total weight of all \textproc{AddPath}{}' operations originating below the representative vertex. If the cluster is a unary cluster, and $u$ originated from the top (binary) subcluster, then the path from $u$ to the boundary of $p$ consists of the previous path from $u$ to $c$ (the lightest edge on which is $m$), and the path from $c$ to the boundary of $p$ (the lightest edge on which is $t$). Since $w'$ weight has been added to all edges on the path from $c$ to the boundary of $p$, the lightest such edge is now $t + w'$ and hence the lightest edge on the path from $u$ to the boundary of $p$ is $\min(t + w', m)$. If $u$ did not originate in the top subcluster of $p$, it came from one of the unary subclusters. In this case, the path from $u$ to the boundary of $p$ consists of the path from $u$ to the boundary of $x$, and the cluster path of the top subcluster (which begins at the boundary of $x$ and ends at the boundary of $p$), and hence the lightest edge is $\min(p.t.l + w', m)$. Since the current cluster is a unary cluster, $t$ and $b$ are undefined (Line~\ref{alg:querypath-unary}). If the next cluster is a binary cluster, we reason as follows. If $u$ originated in the top subcluster, then the path from $c$ to the top boundary remains the same, but $w'$ weight is added to every edge (including $t$). The cluster path below $c$ now consists of the edges previously below $c$ to the bottom boundary of $x$, and additionally those on the cluster path of the bottom subcluster (the edges from the bottom boundary of $x$ to the bottom boundary of $p$). The edges below $c$ on the cluster path of the top subcluster (including $b$) have had their weight increased by $w'$, and hence the lightest edge on the path from $c$ to the bottom boundary of $p$ is now $\min(b + w', p.b.l)$. Similarly, if $u$ originated in the bottom subcluster, then the path from $c$ to the bottom boundary hasn't changed, so $b$ is unchanged, and no weight is added to the edge $t$. However, since the path from $c$ to the top boundary of $p$ now includes the cluster path of the top subcluster, the lightest edge from $c$ to the top boundary is now $\min(p.t.l + w', t)$. Otherwise, $u$ must have originated from a unary subcluster of $p$, and hence the cluster path of $p$ contains no edges from $x$, so $t$ is simply the lightest edge in the top subcluster, and $b$ is the lightest edge in the bottom subcluster. Once the main loop terminates (Lines~\ref{alg:querypathloopstart}--\ref{alg:querypathloopend}), by the loop condition, it must be because the current cluster $x$ has $v$ as a boundary. If $u$ originated in the top subcluster of the latest $p$, then $v$ must be the bottom boundary of $p$, and hence the path from $u$ to $v$ consists of the path from $u$ to $c$ and the path from $c$ to $v$ which goes towards the bottom boundary of $p$ and hence contains $b$. Conversely, if $u$ originated in the bottom subcluster of $p$, then the path from $u$ to $v$ goes towards the top boundary of $p$ and hence contains $t$. If $u$ originated in a unary subcluster, then the path from $u$ to $v$ just joins $u$ to the boundary of $x$, hence the lightest edge is $m$. If not, the lightest edge is either $m$, or $b$ or $t$ respectively. The weight of $b$ or $t$ might still be affected by \textproc{AddPath}{}' operations from below, so the total weight of such operations is accumulated by continuing up the RC tree and added to determine the final weight. \end{proofsketch} \begin{corollary} \label{corollary:batch} Given a bounded-degree tree of size $n$, any sequence of $k$ \textproc{AddPath}, \textproc{QuerySubtree}, \textproc{QueryPath}, and \textproc{QueryEdge}{} operations can be evaluated in $O(n + k \log (nk))$ work, $O(\log n \log k)$ depth and $O(n + k)$ space. \end{corollary} \begin{proof} The LCAs required to convert \textproc{AddPath}{} to \textproc{AddPath}'{} and \textproc{QueryPath}{} to \textproc{QueryPath}'{} can be computed in $O(n + m)$ work, $O(\log n)$ depth, and $O(n)$ space~\cite{schieber1988finding}. The rest follows from Theorem~\ref{theorem:batch} and Lemma~\ref{lemma:path}. \end{proof} \subsection{Improving previous results} \label{sec:improvements} Using our batched mixed operations on trees algorithm, we can improve previous results on finding $2$-respecting cuts. In particular we can shave off a log factor in the work of Geissmann and Gianinazzi's parallel algorithm~\cite{geissmann2018parallel}, and we can parallelise Lovett and Sandlund's sequential algorithm~\cite{lovett2019simple}. Geissmann and Gianinazzi find $2$-respecting cuts by first finding an $O(m)$ sequence of mixed \textproc{AddPath}{} and \textproc{QueryPath}{} operations for each of $O(\log n)$ trees. They show how to find each sequence in $O(m \log n)$ work and $O(\log n)$ depth On each set they then use their own data structure to evaluate the sequence in $O(m \log^2 n)$ work and $O(\log^2 n)$ depth, for a total of $O(m \log^3 n)$ work and $O(\log^2 n)$ depth across the sets. Replacing their data structure with the result of Corollary~\ref{corollary:batch} improves their results to $O(m \log^2 n)$ work. Lovett and Sandlund significantly simplify Karger's algorithm by first finding a heavy-light decomposition---i.e., a vertex disjoint set of paths in a tree such that every path in the tree is covered by at most $O(\log n)$ of them. It then reduces finding the $2$-respecting cuts to a sequence of \textproc{AddPath}{} and \textproc{QueryPath}{} operations on the decomposed paths induced by each non-tree edge, for a total of $O(m \log n)$ operations. Using Geissmann and Gianinazzi's $O(n \log n)$ work $O(\log^2 n)$ algorithm for finding a heavy-light decomposition~\cite[Lemma~7]{geissmann2018parallel}, and the result of Corollary~\ref{corollary:batch} again gives an $O(m \log^2 n)$ work, $O(\log^2 n)$ depth algorithm. \section*{Algorithm for Descendant Edges} Assume an undirected weighted graph $G = (V,E)$ with maximum degree 3. Let $T$ be a spanning tree of $G$ and root it at an arbitrary vertex of degree one. Let \code{root}$(T)$ be the root edge. The tree is binary since $G$ has max degree 3. We use the following fact. Let $F_e$ denote the set of edges $(u,v) \in E$ (tree and non-tree) such that the $u \to v$ path in $T$ contains the edge $e$. Then the weight of the cut induced by a pair of edges $\{ e, e' \}$ is given by \begin{equation*} w(F_e \Delta F_{e'}) = w(F_e) + w(F_{e'}) - 2w(F_e \cap F_{e'}) \end{equation*} For each tree edge $e$, our algorithm seeks the tree edge $e'$ that minimizes $w(F_e \Delta F_{e'})$, i.e.\ minimizes $w(F_{e'}) - 2w(F_e \cap F_{e'})$. To do so, it maintains a dynamic tree data structure as it traverses $T$, that satisfies the following invariant: \begin{quote} When visiting $e = (u,v)$, for every edge $e' \in \text{Subtree}(v)$, the weight of $e'$ in the dynamic tree is $w(F_{e'}) - 2w(F_e \cap F_{e'})$ \end{quote} Maintaining this invariant as the algorithm traverses the tree can be achieved with the following observation. When the traversal descends from an edge $p$ to a neighbouring child edge $e = (u,v)$, the following hold for all $e' \in \text{Subtree}(v)$: \begin{enumerate} \item $(F_e \cap F_{e'}) \supseteq (F_{p} \cap F_{e'})$, since any path that goes through $p$ and $e'$ must pass through $e$. \item $(F_e \cap F_{e'}) \setminus (F_{p} \cap F_{e'})$ are the edges $(x,y) \in F_{e'}$ such that $e$ is a \emph{top edge} of the path $x \to y$ in $T$ (i.e., $e$ is on the path from $x$ to $y$ in $T$, but the parent $p$ of $e$ in $T$ is not). \end{enumerate} Therefore, when the algorithm visits the edge $e$, it need only subtract twice the weight of all $x \to y$ paths that contain $e$ as a top edge to maintain the invariant. This can be done efficiently by precomputing the sets of top edges. There are at most two top edges for each path $x \to y$, and they can be found from the LCA of $x$ and $y$ in $T$. We need not consider tree edges since they will never appear in $F_{e'}$. \paragraph{The algorithm.} Let $l(v)$ and $r(v)$ be the left and right child of $v$, respectively. Let \code{DT} be a dynamic tree data structure supporting: \begin{itemize} \item \code{DT.AddToPath}$(u,v,w)$: adds weight $w$ to all edges on path from $u$ to $v$ \item \code{DT.minInSubtree}$(v)$: return the minimum weight of all edges in the subtree rooted at $v$ \item \code{DT.edgeWeight}$(e)$: return the edge weight of $e$ \end{itemize} in $O(\log|T|)$ time. For $e \in T$ let: \begin{itemize} \item $C(e) = w(F_e)$ \item $L(e)$ = list of non-tree edges that have $e$ as a top edge. \end{itemize} By maintaining the aforementioned invariant, the solution follows by taking the minimum value of $C(e) + \texttt{DT.minInSubtree}(v)$ for all edges $e = (u,v)$ during the traversal. The algorithm below returns the weight of the minimum cut of $G$ that 2-respects $T$ and for which one edge is an ancestor of the other. \begin{lstlisting} AddPaths(DT$, E, f$) for each $(u,v) \in E$ DT.addToPath$(u,v, f \times w(u,v))$@\vspace{.15in}@ MinTwoCut$(T, G = (V, E))$ DT.init$(T)$ AddPaths(DT$, E, 1$) for $(e \in T)$ : $C(e)$ = DT.edgeWeight$(e) $ calculate $L(e)$ from $T$ and $E $ return MinCutR(DT, root$(T)$) @\vspace{.15in}@ MinCutR(DT, $e = (u,v)$) AddPaths(DT$, L(e), -2$) $\min_e$ = $C(e)$ $+$ DT.minInSubtree$(v)$ $\min_r = \min_l = \infty$ if $(l(v))$ then $\min_l = $ MinCutR(DT$, (v,l(v))$) if $(r(v))$ then $\min_r = $ MinCutR(DT$, (v,r(v))$) AddPaths(DT$, L(e), 2$) return $\min(\min_e,\min_r,\min_l)$ \end{lstlisting} \newcommand{\srctree}{src tree} \section{SRC Trees} The following uses standard ideas from the literature (originating with rake compress trees by Miller and Reif), although we simplify it here. A simplified rake compress (src) tree is a clustering of a tree in which each cluster has two terminal nodes, $a$ and $b$, where a leaf cluster is a single edge $(a,b)$, and an internal cluster consists of three subclusters $C_a$ with terminals $(a,x)$, $C_b$ with terminals $(x,b)$, and $C_r$ with terminals $(x,y)$. This can be drawn as: \begin{center} \begin{picture}(155,90)(0,0) \put(30,70){$C_a$} \put(100,70){$C_b$} \put(-5,60){\framebox{$a$}} \put(10,63){\line(1,0){50}} \put(67,60){$x$} \put(80,63){\line(1,0){50}} \put(135,60){\framebox{$b$}} \put(76,30){$C_r$} \put(70,15){\line(0,1){40}} \put(67,5){$y$} \end{picture} \end{center} Any tree $T$ in which all vertices have degree 1 or 3 can be clustered into an \srctree{} tree of depth $O(\log |T|)$. Furthermore it can be built from $T$ in $O(|T|)$ work and $O(\log |T|)$ span. We say a \srctree{} is balanced if it has depth $O(\log |T|)$. For a cluster $C$ with terminals $a$ and $b$ the \emph{cluster path}, \code{path}($C$), is the path in $T$ between $a$ and $b$ (either an edge $(a,b)$ or \code{path}$(C_a)$ @ \code{path}$(C_b)$). Claim: Let $S$ be a balanced \srctree{} of $T$, then every path in $T$ is the composition of $O(\log |T|)$ disjoint (not sharing an edge) cluster paths in $S$, and the edges in every subtree in $T$ is the union of the edges in $O(\log |T|)$ disjoint clusters in $S$. Furthermore in both cases the clusters are all children of at most two root to leaf paths in $S$, and can be found by just traversing the tree bottom to top in $O(\log |T|)$ time. A balanced \srctree{} can support \code{addToPath}$(u,v,w)$, \code{minInSubtree}$(u,v)$, and \code{edgeWeight}$(e)$ in $O(\log |T|)$ time as follows. Keep in each cluster $C$: \begin{enumerate} \item $p_{+}(C)$: a weight $w$ that contributes to each edge in the cluster path of $C$ \item $p_{\min}(C)$: the min weight edge on the cluster path of $C$, and \item $o_{\min}(C)$: the min weight edge off the cluster path of $C$. \end{enumerate} Implement \code{addToPath}$(u,v,w)$ by determining the $O(\log n)$ disjoint clusters $C_1, \ldots, C_k$ that the path $u,v$ belong to and adding $w$ to each $p_{+}(C_i)$. Also update $p_{\min}(C_i)$ and $o_{\min}(C_i)$ bottom up along the two paths in the cluster tree corresponding to the path $u,v$. In particular: \begin{eqnarray*} p_{\min}(C) & = & \min(p_{\min}(C_a), p_{\min}(C_b)) + p_{+}(C)\\ o_{\min}(C) & = & \min(p_{\min}(C_r),o_{\min}(C_r),o_{\min}(C_a),o_{\min}(C_b)) \end{eqnarray*} Implement \code{minInSubtree}$(u,v)$ by identifying the $O(\log n)$ disjoint clusters $C_1, \ldots, C_k$ the subtree belongs to and taking the minimum over $p_{\min}(C_i)$ and $o_{\min}(C_i)$ across all. Implement \code{edgeWeight}$(e)$ by identifying the $O(\log n)$ disjoint clusters $C_1, \ldots, C_k$ that contain the edge, and summing $p_{+}(C_i)$. \subsection{Compressed Path Trees} Let $f(.,.)$ be an associative function on edge weights, and a path weight be the sum by $f$ along edges on a path. For a weighted (unrooted) tree $T$ and a set of marked vertices $V \subset T$, the \emph{compressed path tree} is a minimal weighted tree $T_c$ (in terms of size) with vertices $V$ and additional ``steiner vertices'' such that for every pair $(u,v) \in V$, the path weight from $u$ to $v$ is the same in $T$ and $T_c$. It is not hard to show that $T_c$ needs at most $|V| - 2$ steiner vertices and hence at most $2|V|-2$ vertices. Given a balanced \srctree{} $S$ for $T$, and $V \subset T$ let $T_c$ be the compressed path tree of $T$ for $V$. We can generate a \srctree{} $S_c$ of $T_c$ of depth $O(\log |T|)$, in $O(|V| \log (|T|/|V| + 1))$ work and logarithmic span. This can be implemented by using existing algorithms to generate all the edges in the compressed tree $T_c$ (\texttt{https://arxiv.org/abs/2002.05710}) and then just rebuilding a \srctree{} on $T_c$. \subsection{Batch Adding Paths to Root} Given $T$ with root $r$, a weight $w(x)$ for each node $x \in T$, and a \srctree{} $S$ for $T$, we would like to adjust the weight of all edges in $T$ to include the sum of values on nodes in its subtree (far side of the root). We assume the root is the left terminal of the top level cluster of $S$. We first calculate the weight of each cluster $C = (C_a,C_b,C_r,x,y)$ bottom up, in parallel, i.e.: \begin{eqnarray*} W(C) & = & \left\{ \begin{array}{llc} 0 & & \mbox{if an edge}\\ w(x) + w(y) + W(C_a) + W(C_b) + W(C_r) & & \mbox{otherwise} \end{array} \right. \end{eqnarray*} Note that this does not include the weight of the terminals. Then top down we calculate \begin{lstlisting}[numbers=none] addWeight$(C,w)$ if $C$ is an edge, increment its weight by $w$ else addWeight$(C_a, w + W(C) - W(C_a))$ addWeight$(C_b, w)$ addWeight$(C_r, w(y))$ \end{lstlisting} Recursive calls can be applied in parallel. At the root cluster with terminals $a$ (the root of $T$) and $b$, run \code{addWeight}$(C,w(b))$. Total work is $O(|T|)$ and span is $O(\log |T|)$. \section{The Bipartite Problem} (From GMW paper.): Consider two weighted trees $T_1$ and $T_2$ with roots $r_1$ and $r_2$, and a set of weighted edges $L$ between them. The \emph{bipartite problem} is to pick $e_1 \in T_1$ and $e_2 \in T_2$ that minimizes the the sum of the weight of $e_1$, $e_2$ and weights of all edges $(v_1,v_2) \in L$ such that $v_1$ is in the subtree of $e_1$ and $v_2$ is in the subtree of $e_2$. We use the notation $L(T)$ to mean the edges in $L$ limited to those that are incident on $T$. Assume the following on an \srctree{}: \begin{itemize} \item compress$(T_2,L)$: generate compressed \srctree{} from $T_2$ for $V \in \{v_2 : (v_1,v_2) \in L\} \cup \{r_2\}$. Returns a new \srctree{}. \item AddPaths$(T_2,L)$ : takes a tree $T_2$ and for each $(v_1,v_2,w) \in L$, adds the weight $w$ to the path from $v_2$ to $r_2$. Returns a new \srctree{}. \end{itemize} We assume $r_1$ is the $a$ terminal of the root of the \srctree{} of $T_1$. The following algoritm returns the minimum value, but can be modified to return the edges \begin{lstlisting}[numbers=none] Bipartite$(T_1,T_2,T_2',L)$ if isEdge$(T_1)$ then return $T_2'$.minInTree() $+$ $w(T_1)$ else $(C_a,C_b,C_r,x,y) = T_1$ $T_{2a}' =$ AddPaths$(T_2', L(C_b) \cup L(C_r) \cup L(\{x,y\}))$ $m_a =$ Bipartite($C_a$, Compress$(T_2,L(C_a))$, Compress$(T_{2a}',L(C_a))$, $L(C_a)$) $m_b =$ Bipartite($C_b$, Compress$(T_2,L(C_b))$, Compress$(T_2', L(C_b))$, $L(C_b)$) $T_{2r}'$ = AddPaths$(T_2, L(\{y\}))$ $m_r =$ Bipartite($C_r$, Compress$(T_2,L(C_r))$, Compress$(T_{2r}',L(C_r))$, $L(C_r)$) return $\min(m_a,m_b,m_r)$ \end{lstlisting} Recursive calls can be made in parallel. \subsection{Generating the Bipartite Problems} Parallel version. Weigh every edge by the sum of paths on the edge induced by both the tree and non-tree edges. Generate a \srctree{} for $T$. Relabel vertices with integers so they are inorder in $T$. From here on we will not have direct pointers to vertices in a tree since vertices will be copied into different trees. Instead we will use the ordering to find vertices. Note that compressing trees maintains the ordering [double check this]. Collect together non-tree edges by their LCA. Sort right endpoints of sets by the ordering of $T$, and weigh each edge $(u,v,w)$ with $-2w$. For each collection $L$, run compress $T$ based on the endpoints of $L$. To be safe in parallel this will require copying anything that is returned, but we can use the ordered vertex labels to easily find vertices in their tree. Reroot the compressed trees as their LCAs. Run the bipartite problems, with $T_1$ on the left of the root and $T_2$ on the right of the root, sharing the root. Since $L$ is ordered by its right endpoints we can merge it with $T_2$ in linear work. This is true throuout the bipartite algorithm since filtering based on component maintains order, and compressing a tree maintains ordering [need to be careful about this]. \end{document} \section{Producing the Tree Packing}\label{sec:packing} We follow the general approach used by Karger to produce a set of $O(\log n)$ spanning trees such that w.h.p., the minimum cut $2$ respects at least one of them. We have to make several improvements to achieve our desired work and depth bounds. At a high level, Karger's algorithm works as follows. \begin{enumerate}[leftmargin=*] \setlength\itemsep{0em} \item Compute an $O(1)$-approximate minimum cut $c$ \item Sample edges from the unweighted multigraph corresponding to the weighted graph $G$, where an edge with weight $w$ is represented as $w$ parallel edges, with probability $\Theta(\log n/c)$ \item Use the tree packing algorithm of Plotkin~\cite{plotkin1995fast} to generate a packing of $O(\log n)$ trees \end{enumerate} \noindent In this section, we describe the tools required to parallelise this algorithm. \subsection{A parallel version} Step 2 is trivial to parallelize, as the sampling can be done independently in parallel. The sampling procedure produces an unweighted multigraph with $O(m \log n)$ edges, and takes $O(m \log^2 n)$ work and $O(\log n)$ depth. In Step 3, Plotkin's algorithm consists of $O(\log^2 n)$ minimum spanning tree (MST) computations on a weighting of the sampled graph, which has $O(m \log n)$ edges. Naively this would require $O(m \log^3 n)$ work, but we can use a trick of Gawrychowski et al.~\cite{gawrychowski2019minimum}. Since the sampled graph is a multigraph sampled from $m$ edges, each invocation of the MST algorithm only cares about the current lightest of each parallel edge, which can be maintained in $O(1)$ time since the weights of the selected edges change by a constant each iteration. Using Cole, Klein, and Tarjan's linear-work MST algorithm~\cite{cole1996finding} results in a total of $O(m \log^2 n)$ work in $O(\log^3 n)$ depth w.h.p. The only nontrivial part of parallelizing the tree production is actually Step 1, computing an $O(1)$-approximate minimum cut. In the sequential setting, Matula's algorithm~\cite{matula1993linear} can be used, which runs in linear time on unweighted graphs, and on weighted graphs in $O(m \log^2 n)$ time. To the best of our knowledge, the only known parallelization of Matula's algorithm is due to Karger and Motwani~\cite{karger1994derandomization}, but it takes ${O}(m^2/n)$ work. We show how to compute an approximate minimum cut in $O(m \log^2 n)$ work and $O(\log^3 n)$ depth, which allows us to prove the following. \begin{theorem}\label{thm:tree-packing} Given a weighted graph, in $O(m\log^2 n)$ work and $O(\log^3 n)$ depth, a set of $O(\log n)$ spanning trees can be produced such that the minimum cut 2-respects at least one of them w.h.p. \end{theorem} \noindent We achieve our bounds by improving Karger's algorithms and speeding up several of the components. We use the following combination of ideas, new and old. \begin{enumerate}[leftmargin=*] \setlength\itemsep{0em} \item We extend a $k$-approximation algorithm of Karger~\cite{karger1993global} to work in parallel, allowing us to produce a $\log n$-approximate minimum cut in low work and depth. \item We use a faster sampling technique for producing Karger's skeletons for weighted graphs. This is done by transforming the graph into a graph that maintains an approximate minimum cut but has edge weights each bounded by $O(m \log n)$, and then using binomial random variables to sample all of the multiedges of a particular edge at the same time, instead of separately. Subsampling is then used to sample the same graph with decreasing probabilities. \item We show that the parallel sparse $k$-certificate algorithm of Cheriyan, Kao, and Thurimella~\cite{cheriyan1993scan} for unweighted graphs can be modified to run on weighted graphs. \item We show that Karger and Motwani's parallelization of Matula's algorithm can be generalized to weighted graphs. \item We use the $\log n$-approximate minimum cut to allow the algorithm to make just $O(\log\log n)$ guesses of the minimum cut such that at least one of them is an $O(1)$ approximation. \end{enumerate} \subsection{Parallel $\log n$-approximate minimum cut} To compute an $O(1)$-approximate minimum cut, our first step is actually to compute a $\log n$-approximate minimum cut. We parallelize an algorithm of Karger for computing $k$-approximate minimum cuts that is efficient when $k = \Omega(\log n)$~\cite{karger1993global}. \myparagraph{Mixed incremental connectivity and component weight queries} The following ingredient is useful in parallelizing Karger's $k$-approximate minimum cut algorithm. We show that that the following operations have a simple RC{} implementation, and hence can be efficiently implemented. Given a vertex-weighted, undirected graph with given initial vertex weights, we wish to support: \begin{itemize}[leftmargin=*] \setlength\itemsep{0em} \item \textproc{SubtractWeight}($v$, $w$): Subtract weight $w$ from vertex $v$ \item \textproc{JoinEdge}($e$): Mark the edge $e$ as ``joined'' \item \textproc{QueryWeight}($v$): Return the weight of the connected component containing the vertex $v$, where the components are induced by the joined edges \end{itemize} \begin{lemma} The \textproc{SubtractWeight}, \textproc{JoinEdge}, and \textproc{QueryWeight} operations can be supported with a simple RC implementation. \end{lemma} \begin{proofsketch} The values stored in the RC clusters are as follows. Vertices store their weight, and unary clusters store the weight of the component reachable via joined edges from the boundary vertex. A binary cluster is either \emph{joined}, meaning that its boundary vertices are connected by joined edges, in which case it stores a single value, the weight of the component reachable via joined edges from the boundaries, otherwise it is \emph{split}, in which case it stores a pair: the weight of the component reachable via joined edges from the top boundary, and the weight of the component reachable via joined edges from the bottom boundary. We provide pseudocode for the update operations for Illustration in Algorithm~\ref{alg:component-weight}. \begin{algorithm} \footnotesize \begin{algorithmic}[1] \Procedure{$f_{\mbox{\small unary}}$}{$v_v, t, U$} \If{t = $(t_v, b_v)$} \algreturn{} $t_v$ \Else\ \algreturn{} $v_v + t + \sum_{u_v \in U} u_v$ \EndIf \EndProcedure \Procedure{$f_{\mbox{\small binary}}$}{$v_v, t, b, U$} \If{$t = t_v$ and $b = b_v$} \State \algreturn{} $t_v + b_v + v_v + \sum_{u_v \in U} u_v$ \ElsIf{$t = (t_{t_v}, t_{b_v})$ \algand{} $b = b_v$} \State \algreturn{} $(t_{t_v}, t_{b_v} + v_v + b_v + \sum_{u_v \in U} u_v)$ \ElsIf{$t = t_v$ \algand{} $b = (b_{t_v}, b_{b_v})$} \State \algreturn{} $(t_v + v_v + b_{t_v} + \sum_{u_v \in U} u_v)$ \ElsIf{$t = (t_{t_v}, t_{b_v})$ \algand{} $b = (b_{t_v}, b_{b_v})$} \State \algreturn{} $(t_{t_v}, b_{b_v})$ \EndIf \EndProcedure \Procedure{SubtractWeight}{$v, w$} \State $\ra{v}{\text{value}}$ \algassign{} $\ra{v}{\text{value}}$ - $w$ \State Reevaluate the $f(\cdot)$ on path to root. \EndProcedure \Procedure{JoinEdge}{$e$} \State $\ra{e}{\text{value}}$ \algassign{} 0 \State Reevaluate the $f(\cdot)$ on path to root. \EndProcedure \end{algorithmic} \caption{A simple RC{} implementation of \textproc{SubtractWeight} and \textproc{JoinEdge}.} \label{alg:component-weight} \end{algorithm} \noindent The initial value of a vertex is its starting weight. The initial value of an edge is $(0, 0)$, indicating that it is split at the beginning. Note that $f_{\mbox{\small unary}}$ and $f_{\mbox{\small binary}}$ can be evaluated in constant time, and the structure of the updates involves setting the value at a leaf using an associative operation and re-evaluating the values of the ancestor clusters. We can argue that the values are correctly maintained by structural induction. First consider unary clusters. If the top subcluster is split, then the representative vertex and unary subclusters are not reachable via joined edges, and hence the only reachable component is the component reachable inside the top subcluster from its top boundary, whose weight is $t_v$. If the top subcluster is joined, then the representative vertex is reachable, which is by definition the boundary vertex of the unary subclusters, and hence the reachable component is the union of the reachable components of all of the subclusters, whose weight is as given. For binary clusters, there are four possible cases, depending on whether the top and bottom subclusters are joined or not. If both are joined, then the representative and hence the boundary of all subclusters is reachable from both boundaries, and hence the cluster is joined and the reachable component is the union of the reachable components of the subclusters. If either subcluster is split, then the reachable component at the corresponding boundary is just the reachable component of the subcluster, whose weight is as given. Lastly, if one of the subclusters is not split, then the corresponding boundary can reach the representative vertex, and hence the reachable components of the unary subclusters, whose weights are as given. It remains to argue that we can implement \textproc{QueryWeight} with a simple RC implementation. Consider a vertex $v$ whose component weight is desired and consider the parent cluster $P$ of $v$, i.e.,\ the cluster of which $v$ is the representative. If $P$ has no binary subclusters that are joined, observe that $P$ must contain the entire component of $v$ induced by joined edges, since the only way for a component to exit a cluster is via a boundary which would have to be joined. Answering the query in this situation is therefore easy; the result is the sum of the weights of $v$, the unary subclusters of $P$, the bottom boundary weight of the top subcluster (if it exists), and the top bounary weight of the bottom subcluster (if it exists). Suppose instead that $P$ contains a binary subcluster that is joined to some boundary vertex $u \neq v$. Since the subcluster is joined, $u$ is in the same induced component as $v$, and hence \textproc{QueryWeight}($v$) has the same answer as \textproc{QueryWeight}($u$). By standard properties of RC trees, since $u$ is a boundary of $P$, we also know that the leaf cluster $u$ is the child of some ancestor of $P$. Since the root cluster has no binary subclusters, this process of jumping to joined boundaries must eventually discover a vertex that falls into the easy case, and since such a vertex $u$ is always the child of some ancestor is $P$, the algorithm only examines clusters that are on or are children of the root-to-$v$ path in the RC tree, and hence the algorithm is a simple RC implementation. \end{proofsketch} \noindent Invoking Theorem~\ref{theorem:batch}, we obtain the following useful corollary. \begin{corollary}\label{lem:batch-component-weight} Given a vertex-weighted undirected graph, a batch of $k$ \textproc{SubtractWeight}, \textproc{JoinEdge}, and \textproc{QueryWeight} operations can be evaluated in $O(k\log (kn))$ work and $O(\log n \log k)$ depth. \end{corollary} \myparagraph{Parallel $k$-approximate minimum cut} Karger describes an $O(m n^{2/k} \log n)$ time sequential algorithm for finding a cut in a weighted graph within a factor of $k$ of the optimal cut~\cite{karger1993global}. It works by randomly selecting edges to contract with probability proportional to their weight until a single vertex remains, and keeping track of the component with smallest incident weight (not including internal edges) during the contraction. His analysis shows that in a weighted graph with minimum cut $c$, with probability $n^{-2/k}$, the component with minimum incident weight encountered during a single trial of the contraction algorithm corresponds to a cut of weight at most $kc$, and therefore, running $O(n^{2/k}\log n)$ trials yields a cut of size at most $kc$ w.h.p. Although Karger's contraction algorithm is easy to parallelize using a parallel minimum spanning tree algorithm, keeping track of the incident component weights is trickier. To overcome this problem, we show that we can use our batch component weight algorithm to simulate the sequential contraction process efficiently. With this tool, we can determine the minimum incident weight of a component as follows: \begin{enumerate}[leftmargin=*] \setlength\itemsep{0em} \item\label{step:mst-for-approx} Compute an MST with respect to the weighted random edge ordering, where a heavier weight indicates that an edge contracts later \item\label{step:heaviest-edge-for-approx} For each edge $(u,v) \in G$, determine the heaviest edge in the MST on the unique $(u,v)$ path \item\label{step:batch-component-weight} Construct a vertex-weighted tree from the MST, where the weights are the total incident weight on each vertex in $G$. For each edge $(u,v)$ in the MST in contraction order: \begin{itemize}[leftmargin=*] \item Determine the set of edges in $G$ such that $(u,v)$ is the heaviest edge on its MST path. For each such edge identified, \textproc{SubtractWeight} from each of its endpoints by the weight of the edge \item Perform \textproc{JoinEdge} on the edge $(u,v)$ \item Perform \textproc{QueryWeight} on the vertex $u$ \end{itemize} \end{enumerate} \noindent Observe that the weight of a component at the point in time when it is queried is precisely the total weight of incident edges (again, not including internal edges). Taking the minimum over the initial degrees and all query results therefore yields the desired answer. Karger shows how to parallelize picking the (weighted) random permutation of the edges with $O(m \log^2 n)$ work. It can easily slightly modified to improve the bounds by a logarithmic factor as follows. The algorithm selects the edges by running a prefix sum over the edge weights. Assuming a total weight of $W$, it then picks $m$ random integers up to $W$, and for each uses binary search on the result of the prefix sum to pick an edge. This process, however, might end up picking only the heaviest edges. Karger shows that by removing those edges the total weight $W$ decreases by a constant factor, with high probability. Since the edges can be preprocessed to be polynomial in $n$ (see below), repeating for $\log n$ rounds the algorithm will select all edges in the appropriate weighted random order. Each round takes $O(m \log n)$ work for a total of $O(m \log^2 n)$ work. Replacing the binary search in Karger's algorithm with a sort of the random integers and merge into the the result of the prefix sum yields an $O(m \log n)$ work randomized algorithm. In particular $m$ random numbers uniformly distributed over a range can be sorted in $O(m)$ work and $O(\log n)$ depth by first determining for each number which of $m$ evenly distributed buckets within the range it is in, then sorting by bucket using an integer sort~\cite{RR89} and finally sorting within buckets. Step~\ref{step:mst-for-approx} therefore takes $O(m\log n)$ work and $O(\log^2 n)$ depth to compute the random edge permutation, and $O(m)$ work and $O(\log n)$ depth to run a parallel MST algorithm~\cite{karger1995randomized}. Step~\ref{step:heaviest-edge-for-approx} takes $O(m \log n)$ work and $O(\log n)$ depth using RC trees~\cite{acar2005experimental,acar2020batch}, and Step~\ref{step:batch-component-weight} takes $O(m \log n)$ work and $O(\log^2 n)$ depth by Corollary~\ref{lem:batch-component-weight} and the fact that the algorithm performs a batch of $O(n)$ operations. By Karger's analysis, trying $O(n^{2/k}\log n)$ random contractions yields the following lemma, and setting $k = \log n$ gives our desired corollary. \begin{lemma}\label{lem:k-approx} For a weighted graph, a cut within a factor of $k$ of the minimum cut can be found w.h.p.\ in $O(m n^{2/k} \log^2 n)$ work and $O(\log^2 n)$ depth. \end{lemma} \begin{corollary}\label{cor:logn-approx} For a weighted graph, a cut within a factor of $\log n$ of the minimum cut can be found w.h.p.\ in $O(m \log^2 n)$ work and $O(\log^2 n)$ depth. \end{corollary} \subsection{Additional tools and lemmas} \myparagraph{Transformation to bounded edge weights} For our algorithm to be efficient, we require that the input graph has small integer weights. Karger~\cite{karger1995random} gives a transformation that ensures all edge weights of a graph are bounded by $O(n^5)$ without affecting the minimum cut by more than a a constant factor. For our algorithm $O(n^5)$ would be too big, so we design a different transformation that guarantees all edge weights are bounded by $O(m \log n)$, and only affects the weight of the minimum cut by a constant factor. \begin{lemma}\label{lem:low-weight-transform} There exists a transformation that, given an integer-weighted graph $G$, produces an integer-weighted graph $G'$ no larger than $G$, such that $G'$ has edge weights bounded by $O(m\log n)$, and the minimum cut of $G'$ corresponds to an $O(1)$-approximate minimum cut in $G$. \end{lemma} \begin{proof} Let $G$ be the input graph and suppose that the true value of the minimum cut is $c$. First, we use Corollary~\ref{cor:logn-approx} to obtain a $O(\log n)$-approximate minimum cut, whose value we denote by $\tilde{c}$ ($c \leq \tilde{c} \leq c \log n$). We can contract all edges of the graph with weight greater than $\tilde{c}$ since they can not appear in the minimum cut. Let $s = \tilde{c} / (2m \log n)$. We delete (not contract) all edges with weight less than $s$. Since there are at most $m$ edges in any cut, this at most affects the value of a cut by $sm = \tilde{c} / (2 \log n) \leq c/2$. Therefore the minimum cut in this graph is still a constant factor approximation to the minimum cut in $G$. Next, scale all remaining edge weights down by the factor $s$, rounding down. All edge weights are now integers in the range $[1, 2m \log n]$. This is the transformed graph $G'$. It remains to argue that the value of the minimum cut is a constant-factor approximation. First, note that the scaling process preserves the order of cut values, and hence the true minimum cut in $G$ has the same value in $G'$ as the minimum cut in $G'$. Consider any cut in $G'$, and scale the weights of the edges back up by a factor $s$. This introduces a rounding error of at most $s$ per edge. Since any cut has at most $m$ edges, the total rounding error is at most $sm \leq c/2$. Therefore the value of the minimum cut in $G'$ is a constant factor approximation to the value of the minimum cut in $G$. \end{proof} \noindent Lastly, observe that this transformation can easily be performed in parallel by using a work-efficient connected components algorithm to perform the edge contractions, as is standard (see e.g.~\cite{karger1996new}). \myparagraph{Sampling binomial random variables} It will be helpful in the next step to be able to efficiently sample binomial random variables. We will use the following results due to Farach-Colton et al.~\cite{farach2015exact}. \begin{lemma}[Farach-Colton et al.~\cite{farach2015exact}, Theorem 1] Given a positive integer $n$, one can sample a random variate from the binomial distribution $B(n, 1/2)$ in $O(1)$ time with probability $1 - 1/n^{\Omega(1)}$ and in expectation after $O(n^{1/2+\varepsilon})$-time preprocessing for any constant $\varepsilon > 0$, assuming that $O(\log n)$ bits can be operated on in $O(1)$ time. The preprocessing can be reused for any $n' = O(n)$ \end{lemma} \noindent We can also use the following reduction to sample $B(n,p)$ for arbitrary $0 \leq p \leq 1$. \begin{lemma}[Farach-Colton et al.~\cite{farach2015exact}, Theorem 2] Given an algorithm that can draw a sample from $B(n', 1/2)$ in $O(f(n))$ time with probability $1 - 1/n^{\Omega(1)}$ and in expectation for any $n' \leq n$, then drawing a sample from $B(n', p)$ for any real p can be done in $O(f (n)\log n)$ time with probability $1 - 1/n^{\Omega(n)}$ and in expectation, assuming each bit of p can be obtained in $O(1)$ time \end{lemma} \noindent We note, importantly, that the model used by Farach-Colton et al.\ assumes that random $\Theta(\log n)$-size words can be generated in constant time. Since we only assume that we can generate random bits in constant time, we will have to account for this with an extra $O(\log n)$ factor in the work where appropriate. Note that this does not negatively affect the depth since we can pre-generate as many random words as we anticipate needing, all in parallel at the beginning of our algorithm. Lastly, we also remark that although it might not be clear in their definition, the constants in the algorithm can be configured to control the constant in the $\Omega(1)$ term in the probability, and therefore their algorithms take $O(1)$ time and $O(\log n)$ time w.h.p. To make use of these results, we need to show that the preprocessing of Lemma~\ref{lem:sample-binom} can be parallelized. Thankfully, it is easy. The preprocessing phase consists of generating $n^{\varepsilon}$ alias tables of size $O(\sqrt{n \log n})$. H{\"u}bschle-Schneider and Sanders~\cite{hbschleschneider2019parallel} give a linear work, $O(\log n)$ depth parallel algorithm for building alias tables. Building all of them in parallel means we can perform the alias table preprocessing in $O(n^{1/2+\varepsilon})$ work and $O(\log n)$ depth. The last piece of preprocessing information that needs to be generated is a lookup table for decomposing any integer $n' = O(n)$ into a sum of a constant number of square numbers. This table construction is trivial to parallelize, and hence all preprocessing runs in $O(n^{1/2+\varepsilon})$ work and $O(\log n)$ depth. \begin{lemma}\label{lem:sample-binom} Given a positive integer $n$, after $O(n^{1/2+\varepsilon})$ work and $O(\log n)$ depth preprocessing, one can sample random variables from $B(n, 1/2)$ in $O(\log n)$ work w.h.p., and from $B(n,p)$ in $O(\log^2 n)$ work w.h.p. The preprocessing can be reused for any $n' = O(n)$. \end{lemma} \myparagraph{Subsampling $p$-skeletons} Karger defines the $p$-skeleton $G(p)$ of an unweighted graph $G$ as a copy of $G$ where each edge appears with probability $p$. A $p$-skeleton therefore has $O(pm)$ edges in expectation. For a weighted graph, the $p$-skeleton is defined as the $p$-skeleton of the corresponding unweighted multigraph in which an edge of weight $w$ is replaced by $w$ parallel multiedges. The $p$-skeleton of a weighted graph therefore has $O(pW)$ edges in expectation, where $W$ is the total weight in the graph. Karger gives an algorithm for generating a $p$-skeleton in $O(pW \log(m))$ work, which relies on performing $O(pW)$ independent random samples with probabilities proportional to the weight of each edge, each of which takes $O(\log(m))$ amortized time. In Karger's algorithm, given a guess of the minimum cut $c$, he computes $p$-skeletons for $p = \Theta(\log n/c)$. Since no edge of weight greater than $c$ can be contained in the minimum cut, all such edges can be contracted, leaving us with $W \leq mc$, so the skeleton has $O(m \log n)$ edges and takes $O(m \log^2 n)$ work to compute. Since our algorithm does not know the minimum cut $c$ yet, it uses guessing and doubling on $p$, and hence has to compute several $p$-skeletons, so $O(m \log^2 n)$ work is too slow. We overcome this problem using binomial random variables and subsampling. \begin{lemma}\label{lem:subsampling} Given a weighted graph $G$ with edge weights bounded by $m^{2 - \varepsilon}$, an initial sampling probability $p$ and an integer $k$, there exists an algorithm that can produce the skeleton graphs $G(p), G(p/2), ..., G(p/2^k)$ in $O(m\log^2 n + km\log n)$ work w.h.p.\ and $O(k\log n)$ depth. \end{lemma} \begin{proof} Begin by using Lemma~\ref{lem:sample-binom} and performing the required preprocessing for sampling binomial random variables from $B(m^{2-\varepsilon}, 1/2)$, which takes $O(m)$ work and $O(\log n)$ depth. To construct $G(p)$, for each edge $e$ in the graph, sample a binomial random variable $x \sim B(w(e),p)$. The skeleton then contains the edge $e$ with weight $x$ (conceptually, $x$ unweighted copies of the multiedge $e$). This results in the same distribution of graphs as if sampled using Karger's technique, and takes $O(m \log^2 n)$ work w.h.p.\ and $O(\log n)$ depth. For each additional skeleton $G(p')$ requested, subsample from the previous skeleton by drawing binomial random variables from $B(w_{G(2p')}(e), 1/2)$, which takes $O(m \log n)$ work w.h.p.\ and $O(\log n)$ depth. In total, to perform $k$ rounds of sampling, this takes $O(m \log^2 n + km \log n)$ work w.h.p.\ and $O(k \log n)$ depth. \end{proof} \noindent Using subsampling here is important, since otherwise it would cost $O(km\log^2 n)$ work to sample all of the desired skeleton graphs. Additionally, note that Lemma~\ref{lem:low-weight-transform} makes it easy to satisfy the requirement that all edge weights be bounded by $m^{2 - \varepsilon}$. \myparagraph{Parallel weighted sparse certificates} A \emph{sparse $k$-connectivity certificate} of an unweighted graph $G = (V,E)$ is a graph $G' = (V, E' \subset E)$ with at most $O(kn)$ edges, such that every cut in $G$ of weight at most $k$ has the same weight in $G'$. Cheriyan, Kao, and Thurimella~\cite{cheriyan1993scan} introduce a parallel graph search called \emph{scan-first search}, which they show can be used to generate $k$-connectivity certificates of unweighted graphs. Here, we briefly note that the algorithm can easily be extended to handle weighted graphs. The scan-first search algorithm is implemented as follows \begin{algorithm} \footnotesize \caption{Scan-first search~\cite{cheriyan1993scan}} \label{alg:scan_first_search} \begin{algorithmic}[1] \Procedure{SFS}{$G = (V,E)$ : \algtype{Graph}, $r$ : \algtype{Vertex}} \State Find a spanning tree $T'$ rooted at $r$ \State Find a preorder numbering to the vertices in $T'$ \State For each vertex $v \in T'$ with $v \neq r$, let $b(v)$ denote the least neighbor of $v$ in preorder \State Let $T$ be the tree formed by $\{v, b(v)\}$ for all $v \neq r$ \EndProcedure \end{algorithmic} \end{algorithm} \noindent Using a linear work, low depth spanning tree algorithm, scan-first search can easily be implemented in $O(m)$ work and $O(\log n)$ depth. Cheriyan, Kao, and Thurimella show that if $E_i$ are the edges in a scan-first search forest of the graph $G_{i-1} = (V, E \setminus (E_1 \cup ... E_{i-1}))$, then $E_1 \cup ... E_k$ is a sparse $k$-connectivity certificate. A sparse $k$-connectivity certificate can therefore be found in $O(km)$ work and $O(k \log n)$ depth by running scan-first search $k$ times. In the weighted setting, we treat an edge of weight $w$ as $w$ parallel unweighted multiedges. As always, this is only conceptual, the multigraph is never actually generated. To compute certificates in weighted graphs, we therefore use the following simple modification. After computing each scan-first search tree, instead of removing the edges present from $G$, simply lower their weight by one, and remove them only if their weight becomes zero. It is easy to see that this is equivalent to running the ordinary algorithm on the unweighted multigraph. We therefore have the following. \begin{lemma}\label{lem:k-certificate} A sparse $k$-connectivity certificate for a weighted, undirected graph can be found in $O(km)$ work and $O(k \log n)$ depth. \end{lemma} \myparagraph{Parallelizing Matula's algorithm} Matula~\cite{matula1993linear} gave a linear time sequential algorithm for $(2+\varepsilon)$-approximate edge connectivity (unweighted minimum cut). It is easy to extend to weighted graphs so that it runs in $O(m \log n \log W)$ time, where $W$ is the total weight of the graph. Using standard transformations to obtain polynomially bounded edge weights, this gives an $O(m \log^2 n)$ algorithm. Karger and Motwani~\cite{karger1994derandomization} gave a parallel version of Matula's unweighted algorithm that runs in ${O}(m^2/n)$ work. Essentially, their version of Matula's algorithm does the following steps as indicated in Algorithm~\ref{alg:matula}. \begin{algorithm}[H] \footnotesize \caption{Approximate minimum cut} \label{alg:matula} \begin{algorithmic}[1] \Procedure{Matula}{$G = (V,E)$ : \algtype{Graph} } \If{$|V| = 1$} \textbf{return} $\infty$ \EndIf \State \alglocal{} $d$ \algassign{} minimum degree in $G$ \State \alglocal{} $k$ \algassign{} $d / (2 + \varepsilon)$ \State \alglocal{} $C$ \algassign{} Compute a sparse $k$-certificate of $G$ \State \alglocal{} $G'$ \algassign{} Contract all non-certificate edges of $E$ \State \algreturn{} $\min(d, \textproc{Matula}(G'))$ \EndProcedure \end{algorithmic} \end{algorithm} \noindent It can be shown that at each iteration, the size of the graph is reduced by a constant factor, and hence there are at most $O(\log n)$ iterations. Furthermore, the work performed at each step is geometrically decreasing, so the total work using the sparse certificate algorithm of Cheriyan, Kao, and Thurimella~\cite{cheriyan1993scan} is $O(dm)$ and the depth is $O(d \log^2 n)$, where $d$ is the minimum degree of $G$. Here, we give a slight modification to this algorithm that makes it work on weighted graphs in $O(dm \log(W/m))$ work and $O(d \log n \log W)$ depth, where $d$ is the minimum weighted degree of the graph. To extend the algorithm to weighted graphs, we can replace the sparse certificate routine with our modified version for weighted graphs, and replace the computation of $d$ with the equivalent weighted degree. By interpreting an edge-weighted graph as a multigraph where each edge of weight $w$ corresponds to $w$ parallel multiedges, we can see that the algorithm is equivalent. To argue the cost bounds, note that like in the original algorithm where the size of the graph decreases by a constant factor each iteration, the total weight of the graph must decrease by a constant factor in each iteration. Because of this, it is no longer true that the work of each iteration is geometrically decreasing. Naively, this gives a work bound of $O(d m \log(W))$, but we can tighten this slightly as follows. Observe that after performing $\log(W/m)$ iterations, the total weight of the graph will have been reduced to $O(m)$, and hence, like in the sequential algorithm, the work must subsequently begin to decrease geometrically. Hence the total work can actually be bounded by $O(d m \log(W/m) + dm) = O(dm \log(W/m))$. We therefore have the following. \begin{lemma}\label{lem:parallel-matula} Given a weighted graph with minimum weighted-degree $d$ and total weight $W$, an $O(1)$-approximate minimum cut can be found in $O(dm\log(W/m))$ work and $O(d \log n \log W)$ depth. \end{lemma} \subsection{Parallel $O(1)$-approximate minimum cut} We have finally amassed the ingredients needed to produce a parallel $O(1)$-approximate minimum cut algorithm. Well, we need one more trick, unsurprisingly due to Karger. To produce the sampled skeleton graph, Karger's algorithm chooses the sampling probability inversely proportional to the weight of the minimum cut, which paradoxically is what we are trying to compute. This issue is solved by using guessing and doubling. The algorithm guesses the minimum cut and computes the resulting approximation. It can then use Karger's sampling theorem~(Theorem 6.3.1 and Lemma 6.3.2 of \cite{karger1995random}) to verify whether the guess was too high. \begin{lemma}[Karger~\cite{karger1995random}] Let $G$ be a graph with minimum cut $c$ and let $p = \Theta((\log n)/\varepsilon^2 c)$. Then w.h.p.\ the minimum cut in $G(p)$ has value in $(1 \pm \varepsilon)pc$. \end{lemma} \begin{lemma}[Karger~\cite{karger1995random}]\label{lem:sampled_cut_size} w.h.p., if $G(p)$ is constructed and has minimum cut $\hat{c} = \Theta((\log n)\varepsilon^2)$ for $\varepsilon \leq 1$, then the minimum cut $c$ in $G$ has value in $(1 \pm \varepsilon)\hat{c}/p$. \end{lemma} \noindent If the true minimum cut is $c$, then the correct sampling probability for Karger's algorithm is $p = \Theta((\log n)\varepsilon^2 c)$, which produces a skeleton cut of size $\hat{c} = \Theta((\log n)/\varepsilon^2)$ w.h.p. If the algorithm makes a guess $C > 2c$ with corresponding probability $P = \Theta((\log n) / \varepsilon^2 C)$, then Lemma~\ref{lem:sampled_cut_size} says that the minimum cut in the skeleton graph is less than $\hat{c}$ w.h.p. The algorithm can therefore double the guess for $P$ and try again, until the minimum cut in the skeleton is larger than $\hat{c}$, at which point we know that the $P$-skeleton approximates the minimum cut within a factor $\varepsilon$. To perform these steps efficiently, our algorithm does the following: \begin{enumerate}[leftmargin=*] \item Transform the graph using Lemma~\ref{lem:low-weight-transform} to ensure that all weights are bounded by $O(m \log n)$ while retaining an $O(1)$-approximate minimum cut in $O(m \log^2 n)$ work and $O(\log^2 n)$ depth. \item Use Corollary~\ref{cor:logn-approx} to compute a $\log n$-approximate minimum cut value $C$ in $O(m \log^2 n)$ work and $O(\log^2 n)$ depth. \item Sample the skeleton graphs $G(\log^2 n / C), G(\log^2 n / (2C)), ..., G(\log n / C)$ using Lemma~\ref{lem:subsampling}. This is $\log \log n \leq \log n$ skeletons, and hence this takes $O(m \log^2 n)$ work w.h.p.\ and $O(\log^2 n)$ depth. \item For each skeleton graph: \begin{itemize}[leftmargin=*] \item Compute a sparse $\Theta(\log n)$ certificate of the skeleton graph. This takes $O(m \log n)$ work and $O(\log^2 n)$ depth by Lemma~\ref{lem:k-certificate}. \item Compute an $O(1)$-approximate minimum cut in the $\Theta(\log n)$ certificate using Matula's algorithm (Lemma~\ref{lem:parallel-matula}). Since the certificate guarantees that the total weight is at most $O(n \log n)$ and hence that the minimum weighted degree is at most $O(\log n)$, this takes $O(m \log n \log \log n)$ work and $O(\log^2 n \log \log n)$ depth. \end{itemize} \end{enumerate} \noindent Since there are $O(\log \log n)$ skeleton graphs, the total work done by the final step is at most $O(m \log n (\log \log n)^2)$, which is at most $O(m \log^2 n)$, and the depth is $O(\log^3 n)$. The correctness of the algorithm follows from the sampling theorem (Lemma~\ref{lem:sampled_cut_size}) and Karger's discussion~\cite{karger1995random}. Finally, we can conclude the following result. \begin{lemma} Given a weighted, undirected graph, the weight of an $O(1)$-approximate minimum cut can be computed w.h.p.\ in $O(m\log^2 n)$ work and $O(\log^3 n)$ depth \end{lemma} \section{Preliminaries} \label{sec:prelims} \myparagraph{Model of computation} We analyze algorithms in the \emph{work-depth} model using fork-join parallelism. A procedure can \emph{fork} another procedure call to run in parallel and then wait for forked procedures to complete with a \emph{join}. Work is defined as the total number of instructions performed by the algorithm and depth (also called span) is the length of the longest chain of sequentially dependent instructions \cite{Blelloch96}. The model can work-efficiently cross simulate the classic CRCW PRAM model~\cite{Blelloch96}, and the more recent Binary Forking model~\cite{blelloch2020optimal} with at most a logarithmic-factor difference in the depth. \myparagraph{Randomness} We say that a statement happens \emph{with high probability} (w.h.p) in $n$ if for any constant $c$, the constants in the statement can be set such that the probability that the event fails to hold is $O(n^{-c})$. In line with Karger's work on random sampling~\cite{karger1999random}, we assume that we can generate $O(1)$ random bits in $O(1)$ time. Since some of the subroutines we use require random $\Theta(\log n)$-bit words, these take $O(\log n)$ work to generate. The depth is unaffected since we can always pre-generate the anticipated number of random words at the beginning of our algorithms. Our algorithms are Monte Carlo, i.e.,\ correct w.h.p.\ but run in a deterministic amount of time. We can use Las Vegas algorithms, which are fast w.h.p.\ but always correct, as subroutines, because any Las Vegas algorithm can be converted into a Monte Carlo algorithm by halting and returning an arbitrary answer after the desired time. \begin{comment} \myparagraph{Tree contraction} Parallel tree contraction is a framework for producing dynamic tree algorithms, introduced by Miller and Reif \cite{miller1989parallel}. Tree contraction works by performing a sequence of rounds, each applying two operations, rake and compress, in parallel across every vertex of the tree, to produce a sequence of smaller (contracted) trees. The \emph{rake} operation removes a leaf vertex and merges it with its parent. The \emph{compress} operation removes a vertex of degree two and replaces its two incident edges with a single edge joining its neighbors. For a rooted tree the root is never removed, and is the final surviving vertex. The technique of Miller and Reif produces a sequence of $O(\log n)$ trees w.h.p., with $O(n)$ vertices in total across all of the contracted trees w.h.p. Their algorithm applies to bounded-degree trees, but arbitrary-degree trees be handled by converting them into equivalent bounded-degree trees. \end{comment} \myparagraph{Tree contraction} Parallel tree contraction is a technique developed to efficiently apply various operations over trees in logarithmic parallel depth~\cite{miller1989parallel}, and was also later applied to dynamic trees~\cite{acar2005experimental}. Tree contration consists of a set of rake and compress operations. The \emph{rake} operation removes a leaf vertex and merges it with its parent. The \emph{compress} operation removes a vertex of degree two and replaces its two incident edges with a single edge joining its neighbors. Miller and Reif~\cite{miller1989parallel} observed that rakes and compresses can be applied in parallel as long as they are applied to an independent set of vertices. They describe a random-mate technique that ensures that any tree contracts to a single vertex in $O(\log n)$ rounds w.h.p., and using a total of $O(n)$ work in expectation. Gazit, Miller, and Teng~\cite{gazit1988optimal} give a deterministic version with the same bounds, and Blelloch et al.~\cite{blelloch2020optimal} give a version that works in the binary-forking model. Miller and Reif's algorithm applies to bounded-degree trees, but arbitrary-degree trees can typically be handled by converting them into bounded-degree trees. For a rooted tree, the root is never removed, and is the final surviving vertex. \myparagraph{Rake-compress trees} The RC tree~\cite{acar2005experimental,acar2020batch} of a tree $T$ encodes a recursive clustering of $T$ corresponding to the result of tree contraction, where each cluster corresponds to a rake or compress (see Figure~\ref{fig:rc-tree}). A cluster is defined to be a connected subset of vertices and edges of the original tree. Importantly, a cluster can contain an edge without containing its endpoints. The \emph{boundary vertices} of a cluster $C$ are the vertices $v \notin C$ such that an edge $e \in C$ has $v$ as one of its endpoints. All of the clusters in an RC tree have at most two boundary vertices. A cluster with no boundary vertices is called a \emph{nullary cluster} (generated at the top-level \emph{root} cluster), a cluster with one boundary is a \emph{unary cluster} (generated by the rake operation) and a cluster with two boundaries is \emph{binary cluster} (generated by the compress operation). The \emph{cluster path} of a binary cluster is the path in $T$ between its boundary vertices. Nodes in an RC tree correspond to clusters, such that a node is the disjoint union of its children. The leaf clusters of the RC tree are the vertices and edges of the original tree, which are nullary and binary clusters respectively. Note that all non-leaf clusters have exactly one vertex (leaf) cluster as a child. This vertex is that cluster's \emph{representative} vertex. The recursive clustering is then defined by the following simple rule: Each rake or compress operation corresponds to a cluster, such that the operation that deletes vertex $v$ from the tree defines a cluster with representative vertex $v$ whose non-leaf subclusters are all of the clusters that have $v$ as a boundary vertex. Clusters therefore have the useful property that the constituent clusters of a parent cluster $C$ share a single boundary vertex in common---the representative of $C$, and their remaining boundary vertices become the boundary vertices of $C$. In this paper we will be considering rooted trees. In this case the root of the tree is also the representative of the top level nullary cluster of the RC-tree, e.g. vertex \texttt{e} in Figure~\ref{fig:rc-tree}. Non-leaf binary clusters have a binary subcluster whose cluster path is above the representative vertex in the input tree, which we will refer to as the \emph{top cluster}, and a binary subcluster whose cluster path is below the representative vertex, which we call the \emph{bottom cluster}. We will also refer to the binary subcluster of a unary cluster as the top cluster as its cluster path is also above the representative vertex. In our pseudocode, we will use the following notation. For a cluster $x$: $\ra{x}{v}$ is the representative vertex, $\ra{x}{t}$ is the top subcluster, $\ra{x}{b}$ is the bottom subcluster, $\ra{x}{U}$ is a list of unary subclusters, and $\ra{x}{p}$ is the parent cluster. \begin{figure}[t] \centering \begin{subfigure}{0.4\columnwidth} \centering \includegraphics[width=0.9\columnwidth]{img/tree} \caption{A tree} \end{subfigure} \begin{subfigure}{0.4\columnwidth} \centering \includegraphics[width=0.9\columnwidth]{img/clusters} \caption{A recursive clustering of the tree produced by tree contraction. Clusters produced in earlier rounds are depicted in a darker color.} \end{subfigure} \begin{subfigure}{0.8\columnwidth} \bigskip \centering \includegraphics[width=0.8\columnwidth]{img/rc-tree} \caption{The corresponding RC tree. Unary clusters (from rakes) are shown as filled circles, binary clusters as rectangles, and the finalize (nullary) cluster at the root with two concentric circles. The leaf clusters are labeled in lowercase, and the composite clusters are labeled with the uppercase of their representative. The shade of a cluster corresponds to its height in the clustering. Lower heights (i.e., contracted earlier) are darker.} \end{subfigure} \caption{A tree, a clustering, and the corresponding RC tree \cite{acar2020batch}.}\label{fig:rc-tree} \end{figure} \begin{comment} \paragraph{Path Decompositions on RC trees.} Given a rooted tree with root $r$ and a vertex $v$, a \emph{path decomposition} of the path from $r$ to $v$ ($r-v$) is a collection of disjoint binary clusters whose cluster paths cover exactly the edges from $r$ to $v$. \begin{property}\label{lem:path_decomposition} Given an RC tree and a vertex $v$, there exists a path decomposition of $r-v$ such that the clusters are all children of the path from the leaf cluster of $v$ to the root cluster in the RC tree. These clusters can be identified in $O(\log n)$ time. \end{property} For example, in Figure~\ref{fig:rc-tree}, the path from $e$ to $l$ is covered by the clusters $H$, $(i,k)$, and $(k,l)$. Since path decompositions are not unique, whenever we refer to \emph{the} path decomposition, we refer to the one mentioned by Property~\ref{lem:path_decomposition}. \paragraph{Subtree Decompositions on RC trees.} We can define subtree decompositions analogously to path decompositions. Given a rooted tree and a vertex $v$, a \emph{subtree decomposition} of $v$ is a collection of disjoint clusters whose union contains precisely the edges in the subtree rooted at $v$. \begin{property}\label{lem:subtree-decomposition} Given an RC tree and a vertex $v$, there exists a subtree decomposition of $v$ such that the clusters are all children of the path from the leaf cluster of $v$ to the root cluster in the RC tree. These clusters can be identified in $O(\log n)$ \g{work}. \end{property} For example, if the tree in Figure~\ref{fig:rc-tree} is rooted at vertex $e$, the subtree decomposition of the subtree rooted at $h$ consists of the clusters $(h,i)$, $J$, and $K$. Lastly, again, since subtree decompositions are not unique, when we say \emph{the} subtree decomposition, we refer to the one given by Property~\ref{lem:subtree-decomposition}. \end{comment} \myparagraph{Compressed path trees} For a weighted (unrooted) tree $T$ and a set of \emph{marked} vertices $V \subset V(T)$, the compressed path tree is a weighted tree $T_c$ on some subset of the vertices of $T$ including $V$ with the following property: for every pair of vertices $(u,v) \in V\times V$, the weight of the lightest edge on the path from $u$ to $v$ is the same in $T$ and $T_c$. The compressed path three $T_c$ is defined as the smallest such tree. Alternatively, the compressed path tree is the tree $T$ with all unmarked vertices of degree less than three spliced out, where each spliced-out path is replaced by an edge whose weight is the lightest of the weights on the path it replaced. It is not hard to show that $T_c$ has size less than $2|V|$. Compressed path trees are described in \cite{anderson2020work}, where it is shown that given an RC tree for the tree $T$ and a set of $k$ marked vertices, the compressed path tree can be produced in $O(k\log(1+n/k))$ work and $O(\log^2 n)$ depth w.h.p. Gawrychowski et al.~\cite{gawrychowski2019minimum} define a similar notion which they call ``topologically induced trees'', but their algorithm is sequential and requires $O(k \log n)$ work (time). \myparagraph{Karger's minimum cut algorithm} Karger's algorithm for minimum cuts~\cite{karger2000minimum} is based on the notion of \emph{$k$-respecting cuts}. Karger's algorithm is the following two-step process. \begin{enumerate}[leftmargin=*] \item Find $O(\log n)$ spanning trees of $G$ such that w.h.p., the minimum cut $2$-respects at least one of them \item Find, for each of the aforementioned spanning trees, the minimum $2$-respecting cut in $G$ \end{enumerate} Karger solves the first step using a combination of random sampling and \emph{tree packing}. Given a weighted graph $G$, a tree packing of $G$ is a set of weighted spanning trees of $G$ such that for each edge in $G$, its total weight across all of the spanning trees is no more than its weight in $G$. The underlying tree packing algorithms used by Karger have running time proportional to the size of the minimum cut, so random sampling is first used to produce a sparsified graph, or \emph{skeleton}, where the minimum cut has size $\Theta(\log n)$ w.h.p. The sampling process is carefully crafted such that the resulting tree packing still has the desired property w.h.p. Given the skeleton graph, Karger gives two algorithms for producing tree packings such that sampling $\Theta(\log n)$ trees from them guarantees that, w.h.p., the minimum cut $2$-respects one of them. The first approach uses a tree packing algorithm of Gabow~\cite{gabow1995matroid}. The second is based on the packing algorithm of Plotkin et al.~\cite{plotkin1995fast}, and is much more amenable to parallelism. It works by performing $O(\log^2 n)$ minimum spanning tree computations. In total, Step 1 of the algorithm takes $O(m + n\log^3 n)$ time. For the second step, Karger develops an algorithm to find, given a graph $G$ and a spanning tree $T$, the minimum cut of $G$ that $2$-respects $T$. The algorithm works by arbitrarily rooting the tree, and considering two cases: when the two cut edges are on the same root-to-leaf path, and when they are not. Both cases use a similar technique; They consider each edge $e$ in the tree and try to find the best matching $e'$ to minimize the weight of the cut induced by the edges $\{ e, e' \}$. This is achieved by using a dynamic tree data structure to maintain, for each candidate $e'$, the value that the cut would have if $e'$ were selected as the second cutting edge, while iterating over the possibilities of $e$ and updating the dynamic tree. Karger shows that this step can be implemented sequentially in $O(m\log^2 n)$ time, which results in a total runtime of $O(m \log^3 n)$ when applied to the $O(\log n)$ spanning trees. \section{Additional Mixed Tree Operations}\label{sec:additional-tree-ops} We describe a simple RC implementation of \textproc{QueryEdge}{} and \textproc{QueryPath}' in Algorithm~\ref{alg:pathupdate2}. For \textproc{QueryPath}'{} the node $v$ must be the representative node of an ancestor of $u$ in the RC tree. It maintains $m$, the minimum off cluster path, $t$, the minimum on cluster path above where the path from $u$ meets the cluster path, and $b$, the minimum on cluster path below that point. Once $v$ is found it picks one of $b$ or $t$ depending on which side $v$ is, or neither if a unary cluster. If a binary cluster it then needs to continue up the tree to add in the additional weights for binary clusters. \begin{algorithm}[H] \begin{algorithmic}[1] \small \Procedure{\textproc{QueryEdge}}{$e$} \State $w \leftarrow w(e)$ \State $x \leftarrow e$; $p \leftarrow \ra{x}{p}$ \While{binary $p$} \If{$x = \ra{p}{t}$} \State $w \leftarrow w + \ra{\ra{p}{b}}{w} + \ra{\ra{p}{v}}{w} + \sum_{u \in \raa{p}{U}} \ra{u}{w}$ \EndIf \State $x \leftarrow p$; $p \leftarrow \ra{x}{p}$ \EndWhile \State return $w + \ra{\ra{p}{v}}{w} + \sum_{u \in \raa{p}{U}} \ra{u}{w}$ \EndProcedure \Procedure{\textproc{QueryPath}'}{$u,v$} \State $m \leftarrow \infty$; $t \leftarrow \infty$; $b \leftarrow \infty$ \State $x \leftarrow u$; $p \leftarrow \ra{x}{p}$ \While{not $\ra{p}{v} = v$} \State $w' \leftarrow \ra{\ra{p}{v}}{w} + \sum_{u \in \raa{p}{U}} \ra{u}{w}$ \If{unary $p$} \If{$x = \ra{p}{t}$} $m \leftarrow \min(t + w', m)$ \Else~$m \leftarrow\min(\ra{\ra{p}{t}}{l} + w', m)$ \EndIf \State $t \leftarrow \infty$; $b \leftarrow \infty$; \Else \State $w' \leftarrow w' + \ra{\ra{p}{b}}{w}$ \If{$x = \ra{p}{t}$} $t \leftarrow t + w'$; $b \leftarrow \min(b, \ra{\ra{p}{b}}{l})$ \ElsIf{$x = \ra{p}{b}$} $t \leftarrow \min(\ra{\ra{p}{t}}{l} + w', t)$ \Else~$t \leftarrow \ra{\ra{p}{t}}{l} + w'$; $b \leftarrow \ra{\ra{p}{t}}{l}$ \EndIf \EndIf \State $x \leftarrow p$; $p \leftarrow \ra{x}{p}$ \EndWhile \If{$x = \ra{p}{t}$} $l \leftarrow b$ \ElsIf{$x = \ra{p}{b}$} $l \leftarrow t$ \Else~return $m$ \EndIf \While{binary $p$} \State $w' \leftarrow \ra{\ra{p}{v}}{w} + \ra{\ra{p}{b}}{w} + \sum_{u \in \raa{p}{U}} \ra{u}{w}$ \If{$(x = \ra{p}{t})$} $l \leftarrow l + w'$ \EndIf \EndWhile \State return $\min(m,l)$ \EndProcedure \end{algorithmic} \caption{A simple RC{} implementation of \textproc{QueryEdge}{} and \textproc{QueryPath}'.} \label{alg:pathupdate2} \end{algorithm} \section{Sampling Binomial Random Variables}\label{sec:binomial} Our graph sampling procedure makes use of binomial random variables. We will use the following results due to Farach-Colton et al.~\cite{farach2015exact}. \begin{lemma}[Farach-Colton et al.~\cite{farach2015exact}, Theorem 1]\label{lem:sample-binom} Given a positive integer $n$, one can sample a random variate from the binomial distribution $B(n, 1/2)$ in $O(1)$ time with probability $1 - 1/n^{\Omega(1)}$ and in expectation after $O(n^{1/2+\varepsilon})$-time preprocessing for any constant $\varepsilon > 0$, assuming that $O(\log(n))$ bits can be operated on in $O(1)$ time. The preprocessing can be reused for any $n' = O(n)$ \end{lemma} \noindent We can also use the following reduction to sample $B(n,p)$ for arbitrary $0 \leq p \leq 1$. \begin{lemma}[Farach-Colton et al.~\cite{farach2015exact}, Theorem 2] Given an algorithm that can draw a sample from $B(n', 1/2)$ in $O(f(n))$ time with probability $1 - 1/n^{\Omega(1)}$ and in expectation for any $n' \leq n$, then drawing a sample from $B(n', p)$ for any real p can be done in $O(f (n)\log(n))$ time with probability $1 - 1/n^{\Omega(n)}$ and in expectation, assuming each bit of p can be obtained in $O(1)$ time \end{lemma} \noindent We note, importantly, that the model used by Farach-Colton et al.\ assumes that random $\Theta(\log(n))$-size words can be generated in constant time. Since we only assume that we can generate random bits in constant time, we will have to account for this with an extra $O(\log(n))$ factor in the work where appropriate. Note that this does not negatively affect the depth since we can pregenerate as many random words as we anticipate needing, all in parallel at the beginning of our algorithm. Lastly, we also remark that although it might not be clear in their definition, the constants in the algorithm can be configured to control the constant in the $\Omega(1)$ term in the probability, and therefore their algorithms take $O(1)$ time and $O(\log(n))$ time w.h.p. \myparagraph{Preprocessing in parallel} In order to make use of these results, we need to show that the preprocessing of Lemma~\ref{lem:sample-binom} can be parallelized. Thankfully, it is easy. The preprocessing phase consists of generating $n^{\varepsilon}$ alias tables of size $O(\sqrt{n \log(n)})$. H{\"u}bschle-Schneider and Sanders~\cite{hbschleschneider2019parallel} give a linear work, $O(\log(n))$ depth parallel algorithm for building alias tables. Building all of them in parallel means we can perform the alias table preprocessing in $O(n^{1/2+\varepsilon})$ work and $O(\log(n))$ depth. The last piece of preprocessing information that needs to be generated is a lookup table for decomposing any integer $n' = O(n)$ into a sum of a constant number of square numbers. This table construction is trivial to parallelize, and hence all preprocessing runs in $O(n^{1/2+\varepsilon})$ work and $O(\log(n))$ depth. \section{Two simple $O(m\log^2(n))$ work algorithms for $2$-respecting cuts}\label{sec:speed-up-gg} To demonstrate the usefulness of our mixed batch evaluation algorithm for dynamic trees, we will sketch how it can be used to produce two simple $O(m\log^2(n))$ work solutions for the minimum $2$-respecting cut problem. These both result in an $O(m\log^3(n))$ work parallel algorithm for minimum cut. \paragraph{Parallelizing Lovett and Sandlund's algorithm.} Lovett and Sandlund~\cite{lovett2019simple} recently gave an $O(m\log^2(n))$ sequential algorithm for minimum $2$-respecting cuts. Although this does not improve on Karger's bound, it is significantly simpler than Karger's algorithm. This simplicity also makes it fairly straightforward to parallelize using our new batch evaluation algorithm. Their algorithm essentially just loops over the edges in the graph in an order determined by a heavy-light decomposition. What this means is that the graph is decomposed into chains (monotonic paths in a rooted tree) such that any path in the graph is the disjoint union of at most $O(\log(n))$ chains. The edges are then arranged in a list such that the edges of a chain are contiguous and in order from top to bottom. The goal of the algorithm while looping over each edge $e$ is to maintain for every other edge $e'$, the cost of all non-tree edges $(u,v)$ such that the $(u,v)$ path goes through $e'$ but not through $e$. Since each path consists of at most $O(\log(n))$ chains, for each non-tree edge $(u,v)$, it swaps from containing the current edge to not containing the current edge at most $O(\log(n))$ times. The algorithm can then determine which edges cause which paths to become active/inactive when visited in $O(m\log(n))$ time. It is then a simple matter of using dynamic trees to maintain the costs of every edge during the loop, and querying for the edge with the least contribution at each step. Using our batch evaluation algorithm, we can simulate the sequence of dynamic tree operations that would be performed by Lovett and Sandlund's algorithm to obtain an $O(m \log^2(n))$ work solution that runs in $O(\log^2(n))$ depth. \paragraph{Speeding up Geissmann and Gianinazzi's algorithm.} The algorithm of Geissmann and Gianinazzi~\cite{geissmann2018parallel} is essentially a direct parallelization of Karger's. Their important contribution was showing how to take the mixed batch of dynamic tree operations performed sequentially by Karger's algorithm, and evaluate them all at once in parallel. Specifically, they design a data structure for the monotone minimum path problem, which requires maintaining a tree $T$ subject to updates that increase the weight of all vertices along a path, and a query that asks for the minimum weight vertex on a path. Their algorithm can evaluate a sequence of $k$ operations in $O(k\log(n)(\log(n) + \log(k)) + n\log(n))$ work and $O(\log(n)(\log(n) + \log(k)))$ depth. This results in an algorithm for minimum $2$-respecting cut that runs in $O(m \log^3(n))$ work and $O(\log^2(n))$ depth. since Karger's algorithm performs $O(m\log(n))$ tree operations. In Section~\ref{sec:tree-ops}, we presented our algorithm that can evaluate a sequence of dynamic tree operations consisting of subtree queries and path updates. This data structure can easily be modified to instead perform path queries rather than subtree queries; all of the major techniques are exactly the same. Since our algorithm runs $k$ operations in $O(k\log(n+k))$ work and $O(\log(n)\log(k))$ depth, plugging it into Geissmann and Gianinazzi's algorithm, and making the simple reduction from vertex weights to edge weights immediately yields an $O(m\log^2(n))$ work algorithm for minimum $2$-respecting cut that runs in $O(\log^2(n))$ depth. \section{Finding Minimum $2$-respecting Cuts}\label{sec:two-respect} We are given a connected, weighted, undirected graph $G = (V,E)$ and a spanning tree $T$. In this section, we will give an algorithm that finds the minimum $2$-respecting cut of $G$ with respect to $T$ in $O(m \log n)$ work and $O(\log^3 n)$ depth. Our algorithm, like those that came before it, finds the minimum $2$-respecting cut by considering two cases. We assume that the tree $T$ is rooted arbitrarily. In the first case, we assume that the two tree edges of the cut occur along the same root-to-leaf path, i.e.\ one is a descendant of the other. This is called the \emph{descendant edges} case. In the second case, we assume that the two edges do not occur along the same root-to-leaf path. This is the \emph{independent edges} case. Since we are going to use RC trees, we require that $G$ have bounded degree. Note that any arbitrary degree graph can easily be \emph{ternarized} by replacing high-degree vertices with cycles of infinite weight edges, resulting in a graph of maximum degree three with the same minimum cut, and only a constant-factor larger size in terms of edges, which our bounds depend on. \subsection{Descendant edges} We present our minimum $2$-respecting cut algorithm for the descendant edges case. Let $T$ be a spanning tree of a connected graph $G = (V,E)$ of degree at most three, and root $T$ at an arbitrary vertex of degree at most two. The rooted tree is therefore a binary tree. We use the following fact. For any tree edge $e \in T$, let $F_e$ denote the set of edges $(u,v) \in E$ (tree and non-tree) such that the $u$ to $v$ path in $T$ contains the edge $e$. Then the weight of the cut induced by a pair of edges $\{ e, e' \}$ in $T$ is given by \begin{equation*} w(F_e \Delta F_{e'}) = w(F_e) + w(F_{e'}) - 2w(F_e \cap F_{e'}), \end{equation*} where $\Delta$ denotes the symmetric difference between the two sets. For each tree edge $e$, our algorithm seeks the tree edge $e'$ that minimizes $w(F_e \Delta F_{e'})$, which is equivalent to minimizing \begin{equation} w(F_{e'}) - 2w(F_e \cap F_{e'}). \end{equation} To do so, it traverses $T$ from the root while maintaining weights on a tree data structure that satisfies the following invariant: \begin{invariant}[Current subtree invariant]\label{inv:descendant-edges-dt} When visiting $e = (u,v)$, for every edge $e' \in \text{Subtree}(v)$, the weight of $e'$ in the dynamic tree is $w(F_{e'}) - 2w(F_e \cap F_{e'})$ \end{invariant} \noindent The initial weight of each edge $e$ is therefore $w(F_e)$. Maintaining this invariant as the algorithm traverses the tree can then be achieved with the following observation. When the traversal descends from an edge $p = (w,u)$ to a neighboring child edge $e = (u,v)$, the following hold for all $e' \in \text{Subtree}(v)$: \begin{enumerate}[leftmargin=*] \setlength\itemsep{0em} \item $(F_e \cap F_{e'}) \supseteq (F_{p} \cap F_{e'})$, since any path that goes through $p$ and $e'$ must pass through $e$. \item $(F_e \cap F_{e'}) \setminus (F_{p} \cap F_{e'})$ are the edges $(x,y) \in F_{e'}$ such that $e$ is a \emph{top edge} of the path $x-y$ in $T$ (i.e., $e$ is on the path from $x$ to $y$ in $T$, but the parent edge of $e$ is not). \end{enumerate} Therefore, to maintain the current subtree invariant, when the algorithm visits the edge $e$, it need only subtract twice the weight of all $x-y$ paths that contain $e$ as a top edge. This can be done efficiently by precomputing the sets of top edges. There are at most two top edges for each path $x-y$, and they can be found from the LCA of $x$ and $y$ in $T$. We need not consider tree edges since they will never appear in $F_{e'}$. By maintaining the aforementioned invariant, the solution follows by taking the minimum value of $w(F_e) + \textproc{QuerySubtree}(v)$ for all edges $e = (u,v)$ during the traversal. As described, this algorithm is entirely sequential, but it can be parallelized using our batched mixed operations on trees algorithm (Corollary~\ref{corollary:batch}). The operation sequence can be generated as follows. First, the weights $w(F_e)$ for each edge can be computed using the batched mixed operations algorithm (Corollary~\ref{corollary:batch}) where each edge $(u,v)$ of weight $w$ creates an \textproc{AddPath}($u,v,w$) operation, followed by a \textproc{QueryEdge}($e$) for every edge $e \in T$. This takes $O(m\log n)$ work and $O(\log^2 n)$ depth. The LCAs required to compute the sets of top edges can be computed using the parallel LCA algorithm of Schieber and Vishkin~\cite{schieber1988finding} in $O(m)$ work and $O(\log n)$ depth in total. By computing an Euler tour of the tree $T$ (an ordered sequence of visited edges) beginning at the root, the order in which to perform the tree operations can be deduced in $O(n)$ work and $O(\log n)$ depth. Each edge in the Euler tour generates an \textproc{AddPath} operation for each of its top edges, followed by a \textproc{QuerySubtree} operation. Note that each edge is visited twice during the Euler tour. The second visit corresponds to negating the \textproc{AddPath} operations from the first visit. The solution is then the minimum result of all of the \textproc{QuerySubtree} operations. Since there are a constant number of top edges per path, and $O(m)$ paths in total, the operation sequence has length $O(m)$. Using Corollary~\ref{corollary:batch}, we arrive at the following. \begin{theorem}\label{thm:dependent} Given a weighted, undirected graph $G$ and a rooted spanning tree $T$, the minimum $2$-respecting cut of $G$ with respect to $T$ such that one of the cut edges is a descendant of the other can be computed in in $O(m \log n)$ work and $O(\log^2 n)$ depth w.h.p. \end{theorem} \begin{figure*}[t] \centering \includegraphics[width=0.9\textwidth]{img/bipartite} \caption{The bipartite problems are generated by compressing the input tree with respect to the endpoints of the edges whose endpoints share an LCA, then splitting the tree into the left and right halves.}\label{fig:bipartite} \end{figure*} \subsection{Independent edges} The independent edge case is where the two cutting edges do not fall on the same root-to-leaf path. To solve the independent edges problem, we use the framework of Gawrychowski et al.~\cite{gawrychowski2019minimum}, which is to decompose the problem into a set of subproblems, which they call \emph{bipartite problems}. The key challenge in parallelizing the solution to the bipartite problem is dealing with the fact that the resulting trees might not be balanced. The algorithm of Gawrychowski et al.\ relies on performing a biased divide-and-conquer search guided by a heavy-light decomposition~\cite{harel1984fast}, and then propagating results up the trees bottom up. Since the trees may be unbalanced, this can not be easily parallelized. Our solution is to use the recursive clustering of RC trees to guide a divide and conquer search in which we can maintain all of the needed information on the clusters. \begin{definition}[The bipartite problem] Given two weighted rooted trees $T_1$ and $T_2$ and a set of weighted edges that cross from one to the other, $L = \{ (u,v) : u \in T_1, v \in T_2 \}$, the bipartite problem is to select $e_1 \in T_1$ and $e_2 \in T_2$ with the goal of minimizing the sum of the weight of $e_1$ and $e_2$ plus the weights of all edges $(v_1,v_2) \in L$ such that $v_1$ is in the subtree rooted at the bottom endpoint of $e_1$ and $v_2$ is in the subtree rooted at the bottom endpoint of $e_2$. The size of a bipartite problem is the size of $L$ plus the size of $T_1$ and $T_2$. \end{definition} \noindent Gawrychowski et al.\ observe that if $T_1$ and $T_2$ are edge-disjoint subtrees of $T$, then, assigning weights of $w(F_e)$ to each tree edge and weights of $-2w(e)$ to each non-tree edge, the solution to the bipartite problem is the minimum $2$-respecting cut such that $e_1 \in T_1$ and $e_2 \in T_2$. The independent edges problem is then solved by reducing it to several instances of the bipartite problem, and taking the minimum answer among all of them. We will show how to generate the bipartite problems efficiently, and how to solve them efficiently, both in parallel. \subsubsection{Generating the bipartite problems} The following parallel algorithm generates $O(n)$ instances of the bipartite problem with total size at most $O(m)$. For each edge $e$ in $T$, the algorithm first assigns them a weight equal to $w(F_e)$. Now consider all non-tree edges, i.e.\ all edges $e \in E, e \notin T$, group them by the LCA of their endpoints in $T$, and assign them a weight of $-2w(e)$. This forms a partition of the $O(m)$ edges of $G$, each group identified by a vertex. Each vertex in $T$ conversely has an associated (possibly empty) list of non-tree edges. For each vertex $v$ in $T$ with a non-empty associated list of edges, create a compressed path tree of $T$ with respect to the endpoints of the associated edges and $v$. Finally, for each such compressed path tree, root it at $v$ (the common LCA of the edge endpoints). The bipartite problems are now generated as follows. For each vertex $v$ with a non-empty list of non-tree edges, and the corresponding compressed path tree $T_v$, consider the children $x, y$ of $v$ in $T_v$. The bipartite problem consists of $T_1$, which contains the edge $(v,x)$ and the subtree of $T_v$ rooted at $x$, and likewise, $T_2$, which contains the edge $(v,y)$ and the subtree of $T_v$ rooted at $y$, and $L$, the associated list of non-tree edges. See Figure~\ref{fig:bipartite} for an illustration. \begin{lemma} Given a tree and a set of non-tree edges, the corresponding bipartite problems can be generated in $O(m \log n)$ work and $O(\log^2 n)$ depth w.h.p. \end{lemma} \begin{proof} The edge weight values can be computed in the same way as before using our batched mixed operations on trees algorithm in $O(m \log n)$ work and $O(\log^2 n)$ depth. LCAs can be computed using the parallel LCA algorithm of Schieber and Vishkin~\cite{schieber1988finding} in $O(m)$ work and $O(\log n)$ depth. Grouping the edges by LCA can be achieved using a parallel sorting algorithm in $O(m \log n)$ work and $O(\log n)$ depth. Together, these steps take $O(m \log n)$ work and $O(\log^2 n)$ depth. For each group, computing the compressed path tree takes $O(m_i \log(1+n/{m_i})) \leq O(m_i \log n)$ work and $O(\log^2 n)$ depth w.h.p., where $m_i$ is the number of edges in the group. Performing all compressed path tree computations in parallel and observing that the edge lists of each vertex are a disjoint partition of the edges of $G$, this takes at most $O(m \log n)$ work and $O(\log^2 n)$ depth in total w.h.p. \end{proof} \noindent It remains only for us to show that the bipartite problems can be efficiently solved in parallel. \begin{comment} \paragraph{notes} Parallel version. Weigh every edge by the sum of paths on the edge induced by both the tree and non-tree edges. Generate an RC tree for $T$. Relabel vertices with integers so they are inorder in $T$. From here on we will not have direct pointers to vertices in a tree since vertices will be copied into different trees. Instead we will use the ordering to find vertices. Note that compressing trees maintains the ordering [double check this]. Collect together non-tree edges by their LCA. Sort right endpoints of sets by the ordering of $T$, and weigh each edge $(u,v,w)$ with $-2w$. For each collection $L$, run compress $T$ based on the endpoints of $L$. To be safe in parallel this will require copying anything that is returned, but we can use the ordered vertex labels to easily find vertices in their tree. Reroot the compressed trees as their LCAs. Run the bipartite problems, with $T_1$ on the left of the root and $T_2$ on the right of the root, sharing the root. Since $L$ is ordered by its right endpoints we can merge it with $T_2$ in linear work. This is true throuout the bipartite algorithm since filtering based on component maintains order, and compressing a tree maintains ordering [need to be careful about this]. \end{comment} \subsubsection{Solving the bipartite problems} Our solution is a recursive algorithm that utilizes the recursive cluster structure of RC trees. Recall that RC trees consist of unary and binary clusters (and the nullary cluster at the root, but this is not needed by our algorithm). Since the bipartite problems are constructed such that trees $T_1$ and $T_2$ always have a root with a single child, the root cluster of their RC trees consists of exactly one unary cluster. \begin{comment} \begin{figure}[h] \centering \begin{subfigure}{0.45\columnwidth} \centering \includegraphics[height=4cm]{img/unary-cluster.pdf} \caption{A unary cluster consisting of one binary subcluster and two unary subclusters} \end{subfigure} \hspace{1em} \begin{subfigure}{0.45\columnwidth} \centering \includegraphics[height=4cm]{img/binary-cluster.pdf} \caption{A binary cluster consisting of two binary subclusters and one unary subcluster} \end{subfigure} \caption{Unary clusters and binary clusters}\label{fig:clusters} \end{figure} \end{comment} \myparagraph{High-level idea} Recall that the goal is to select an edge $e_1 \in T_1$ and an edge $e_2 \in T_2$ that minimizes their costs plus the cost of all edges $(u,v) \in L$ such that $u$ is a descendant of $e_1$ and $v$ is a descendant of $e_2$. Our algorithm first constructs an RC tree of $T_1$, and weights the edges in $T_1$ and $T_2$ by their cost. At a high level, the algorithm then works as follows. Given a binary cluster $c_1$ of $T_1$, the algorithm maintains weights on $T_2$ such that for each edge $e_2 \in T_2$, its weight is the weight of $e_2$ in the original tree plus the sum of the weights of all edges $(u,v) \in L$ such that $u$ is a descendant of the bottom boundary of $c_1$, and $v$ is a descendant of $e_2$. This implies that for a binary cluster of $T_1$ consisting of an isolated edge $e_1 \in T_1$, the weights of each $e_2 \in T_2$ are precisely such that $w(e_1) + w(e_2)$ is the value of selecting $\{e_1, e_2\}$ as the solution. This idea leads to a very natural recursive algorithm. We start with the topmost unary cluster of $T_1$ and proceed recursively down the clusters of $T_1$, maintaining $T_2$ with weights as described. When the algorithm recurses into the top binary child of a cluster, it must add the weights of all $(u,v) \in L$ that are descendants of that cluster to the corresponding paths in $T_2$. If recursing on the bottom binary subcluster of a binary cluster, the weights on $T_2$ are unchanged. When recursing on a unary cluster, since it has no descendants, the algorithm uses the original weights of $T_2$. Once the recursion hits a binary cluster that consists of a single edge $e_1$, it can return the solution $w(e_1) + w(e_2)$, where $e_2$ is the lightest edge with respect to the current weights on $T_2$. Lastly, to perform this process efficiently, the algorithm \emph{compresses}, using the compressed path tree algorithm~\cite{anderson2020work}, the tree $T_2$ every time it recurses, keeping only the vertices that are endpoints of the crossing edges that touch the current cluster of $T_1$. \myparagraph{Implementation} We provide pseudocode for our algorithm in Algorithm~\ref{alg:bipartite}. Given a bipartite problem $(T_1, T_2, L)$, we use the notation $L(C)$ to denote the edges of $L$ limited to those that are incident on some vertex in the cluster $C$. Furthermore, we use $V_{T_2}(L(C))$ to denote the set of vertices given by the endpoints of the edges in $L(C)$ that are in $T_2$. The pseudocode does not make the parallelism explicit, but all that is required is to run the recursive calls in parallel. The procedure takes as input a cluster $C$ of $T_1$, a compressed version of $T_2$ with its original weights, and $T_2'$, the compressed version of $T_2$ with updated weights. At the top level, it takes the cluster representing all of $T_1$ for the first argument, and the cluster for all of $T_2$ for the second and third argument. The \textproc{Compress} function compresses the given tree with respect to the given vertex set and its root, and returns the compressed tree still rooted at the same root. \textproc{AddPaths}($S$) takes a set $S \subset L$ of edges and for each one, adds $w(u,v)$ to the root-to-$v$ path, where $v \in T_2$, returning a new tree. \begin{algorithm}[h] \footnotesize \caption{Parallel bipartite problem algorithm} \label{alg:bipartite} \small \begin{algorithmic}[1] \small \Procedure{Bipartite}{$C$ : \algtype{Cluster}, $T_2$ : \algtype{Tree}, $T_2'$ : \algtype{Tree}, $L$ : \algtype{Edge list}} \If{$C = \{ e \}$} \State \algreturn{} $w(e) + \textproc{LightestEdge}(T_2')$ \Else \State $T_\text{cmp}$ \algassign{} $T_2$.\textproc{Compress}($V_{T_2}(L(\ra{C}{t}))$) \State $T_2''$ \algassign{} $T_2'$.\textproc{AddPaths}($L(C) \setminus L(\ra{C}{t})$) \State $T_\text{cmp}''$ \algassign{} $T_2''$.\textproc{Compress}($V_{T_2}(L(\ra{C}{t}))$) \State ans \algassign{} \textproc{Bipartite}($\ra{C}{t}$, $T_\text{cmp}$, $T_\text{cmp}''$, $L(\ra{C}{t})$) \For{\algeach{} \algtype{cluster} $C'$ in $\ra{C}{U}$} \State $T_\text{cmp}$ \algassign{} $T_2$.\textproc{Compress}($V_{T_2}(L(C'))$) \State ans \algassign{} $\min$(ans, \textproc{Bipartite}($C'$, $T_\text{cmp}$, $T_\text{cmp}$, $L(C')$)) \EndFor \If{$C$ \algis{} a \algtype{binary cluster}} \State $T_\text{cmp}$ \algassign{} $T_2$.\textproc{Compress}($V_{T_2}(L(\ra{C}{b}))$) \State $T_\text{cmp}'$ \algassign{} $T_2'$.\textproc{Compress}($V_{T_2}(L(\ra{C}{b}))$) \State ans \algassign{} $\min$(ans, \textproc{Bipartite}($T_\text{cmp}$, $T_\text{cmp}'$, $L(\ra{C}{b})$)) \EndIf \State \algreturn{} ans \EndIf \EndProcedure \end{algorithmic} \end{algorithm} \noindent Since this algorithm creates many copies of $T_2$, we must ensure that we can still identify and locate a desired vertex given its label. One simple way to achieve this is to build a static hashtable alongside each copy of $T_2$ that maps vertex labels to the instance of that vertex in that copy. An ingredient that we need to achieve low depth is an efficient way to update the weights in $T_2$ when adding weights to a collection of paths. Although RC trees support batch-adding weights to paths, the standard algorithm does not meet our cost requirements. This is easy to achieve in linear work and $O(\log n)$ depth by propagating the total weight of all updates up the clusters, and then propagating back down the tree, the weight of all updates that are descendants of the current cluster. It remains to analyze the cost of the \textproc{Bipartite} procedure. \begin{theorem} A bipartite problem of size $m$ can be solved in $O(m \log m)$ work and $O(\log^3 m)$ depth w.h.p. \end{theorem} \begin{proof} First, since all recursive calls are made in parallel and the recursion is on the clusters of $T_1$, the number of levels of recursion is $O(\log m)$ w.h.p. We will show that the algorithm performs $O(m)$ work in total at each level, in $O(\log^2 m)$ depth w.h.p. Observe first that at each level of recursion, the edges $L$ for each call are a disjoint partition of the non-tree edges, since each recursive call takes a disjoint subset. We will now argue that each call does work proportional to $|L|$. Since $T_2$ and $T_2'$ are both compressed with respect to $L$, their size is proportional to $|L|$. \textproc{AddPaths} takes linear work in the size of $T_2$ and $O(\log m)$ depth, and hence takes $O(|L|)$ work and $O(\log m)$ depth. \textproc{Compress}($K$) takes $O(|K|\log(1+|T_2|/|K|)) \leq O(|K| + |T_2|)$ work and $O(\log^2 m)$ depth w.h.p.. Since compression is with respect to some subset of $L$, all of the compress operations take $O(|L|)$ work and $O(\log^2 m)$ depth w.h.p. In total, this is $O(|L|)$ work in $O(\log^2 m)$ depth w.h.p.\ at each level for each call. Since the $L$s at each level are a disjoint partition of the non-tree edges, the total work per level is $O(m)$ w.h.p., and hence the desired bounds follow. \end{proof} \noindent Since there are $O(n)$ bipartite problems of total size $O(m)$, solving them all in parallel yields the following, which, when combined with Theorem~\ref{thm:dependent}, proves Theorem~\ref{thm:two-respecting}. \begin{theorem} Given a weighted, undirected graph $G$ and a rooted spanning tree $T$, the minimum $2$-respecting cut of $G$ with respect to $T$ such that the cut edges are independent can be computed in $O(m \log n)$ work and $O(\log^3 n)$ depth w.h.p. \end{theorem} \noindent Combining Theorem~\ref{thm:tree-packing} with Theorem~\ref{thm:two-respecting} on each of the $O(\log n)$ trees in parallel proves Theorem~\ref{thm:main-theorem}.
\section*{Acknowledgment} We thank the RBC and UKQCD collaborations for providing us their DWF gauge configurations. The calculations were performed using the GWU code~\cite{Alexandru:2011ee,Alexandru:2011sc} through the HIP programming model~\cite{Bi:2020wpt}. This work is partially supported by the Guangdong Major Project of Basic and Applied Basic Research No. 2020B0301030008 and by the Science and Technology Program of Guangzhou No. 2019050001. A. A is supported in part by the U.S. Department of Energy, Office of Science, Office of Nuclear Physics under grant no DE-FG02-95ER40907. Y. B. is supported in part by the National Natural Science Foundation of China (NNSFC) under Grant No. 12075253. T. D and K. L are supported by the U.S. DOE Grant No.\ DE-SC0013065 and DOE Grant No.\ DE-AC05-06OR23177 which is within the framework of the TMD Topical Collaboration. Y. Y is also supported by the Strategic Priority Research Program of Chinese Academy of Sciences, Grant No. XDC01040100, XDB34030303, and XDPB15 and also a NSFC-DFG joint grant under grant No. 12061131006 and SCHA 458/22. The numerical calculation has majorly been done on the CAS Xiaodao-1 computing environment, and supported by the Strategic Priority Research Program of Chinese Academy of Sciences, Grant No. XDC01040100, and also by the supercomputing system in the Southern Nuclear Science Computing Center (SNSC). \bibliographystyle{apsrev4-1}
\section{Introduction} I have studied the (a,b)-modules (formal Brieskorn modules) for almost 30 years now and using this structure in many papers on singularity theory. Looking back to several of these papers I realized that may be I have not made enough efforts to convince colleagues that this structure is really interesting and important. The fact to inverse $\partial_z$ in the Weyl algebra $\C\langle z, \partial_z \rangle$ seems a priori "anecdotal" and without serious reasons, mathematicians dont want to replace a "usual" differential equation by a structure using formal series in $\partial_z^{-1}$ and avoiding to use $\partial_z$. The aim of the present text is to give some serious but simple arguments in favor of the use of this structure. I can summarize them in 3 points: \begin{itemize} \item In singularity theory this structure appears naturally and is also present on the space of asymptotic expansions of functions of the Nilsson class. \item There is a very easy way to encode in this structure the regularity of the Gauss-Manin connection. The notion of Bernstein polynomial of a regular (a,b)-module gives in this abstract setting a definition of the logarithm of the eigenvalues of the monodromy. This leads to the notion of "geometric (a,b)-module" which is defined by the regularity and the fact that the roots of the Bernstein polynomial are rational and negative. Moreover the structure of a regular (a,b)-module contains in a natural way an analog of a Hodge filtration (the $b-$adic filtration) and of a weight filtration associated to the nilpotent part of the monodromy (given by the semi-simple and co-semi-simple filtrations). Moreover we have nice functorial properties for geometric (a,b)-modules. \item When we make a formal change of variable $\theta(z) \in \C[[z]]$ with $\theta(0) = 0$ and $\theta'(0)\not= 0$, which means that we replace "a" by $\alpha := \theta(a)$ and "b" by $\beta := b.\theta'(a)$ we obtain a new (a,b)-module and this "change of variable" preserves many interesting properties like regularity, the Bernstein polynomial (and so geometric (a,b)-modules are stable by change of variable), semi-simplicity, monogenic $\tilde{\mathcal{A}}$ modules (frescos) ... (see \cite{[B.12a]}). \end{itemize} This last point allows to use (a,b)-modules in the study of the singularities of a holomorphic map $f: M \to C$ where $M$ is a complex manifold and $C$ is a smooth curve. To use an (a,b)-module structure at a critical value $p \in C$ of $f$, it is necessary to choose a local coordinate near $p$ on $C$ in order to have a complex valued function on $M$ near the singular fiber $f^{-1}(p)$.\\ Then the existence and computation of (quasi-)invariants numbers by change of coordinate in the set of isomorphism classes of geometric (a,b)-modules is an interesting challenge in such a context (see \cite{[B.12a]}). \\ Let me conclude this introduction by saying that when the holomorphic function we are interested in depends on a holomorphic parameter, the consideration of a holomorphic family of geometric (a,b)-modules is helpful for the study of period-integrals depending on such a parameter (see \cite{[B.15]}).\\ \section{What is a (a,b)-module} Consider a germ of holomorphic function $f : (\C^{n+1}, 0) \to (\C, 0)$ and also a germ of $f-$relative holomorphic $(p+1)-$differential form $\omega \in \Omega^{p+1}_{\C^{n+1}, 0}$ satisfying $df\wedge \omega = 0$ and $d\omega = 0$. For $p = n$ these two conditions are satisfied by any $\omega$ in $ \Omega^{n+1}_{\C^{n+1}, 0}$.\\ For each (compact) $p-$cycle in the Milnor's fiber of $f$ we consider the (germ of) {\bf period-integral} $$ \varphi_\gamma(s) := \int_{\gamma_s} \omega/df $$ where $(\gamma_s)_s \in H$ is the horizontal family of $p-$cycles in the fiber of $f$ parametrized by the universal cover $H \to D^*$ of a small enough punctured disc $D^*$ with center $0$ in $\C$. This germ of multivalued function with finite determination has an asymptotic expansion at $s = 0$ of the type $$ \sum_{r \in \Lambda, j \in [0, p], m \in \mathbb{N}} c^{r, j}_m(\gamma).s^{m+r}.(Log\, s)^j $$ where $\Lambda$ is a finite set in $\mathbb{Q}\cap ]-1, 0]$ which converges near the origin (in suitable sectors). In fact, $(\gamma, s) \mapsto \varphi_\gamma(s)$ may be viewed as a germ of multivalued function on the product $H_p(F, \C)\times H $ where $F$ is the Milnor's fiber of $(f, 0)$. \\ For each given $p \in [1, n]$ this function is solution on $(\C, 0)$ of a "regular singular" differential system which is independent of the choices of $\omega$ and $\gamma$ which is the {\bf Gauss-Manin system} in degree $p$. The classical case of a germ $(f, 0)$ with an isolated singularity at the origin\footnote{where only the degree $p = n$ is non trivial} shows that the "good point of view" to look at this differential system is the notion of {\bf Brieskorn module} which replaces the meromorphic connection (on the vector bundle $R^nf_*(\C)\otimes \mathcal{O}_{D^*}$) by the operations "product by $s$" and "$\partial_s^{-1}$", that is to say the primitive in "$s$" vanishing at $s = 0$.\\ This leads to consider a new structure: the notion of "geometric (a,b)-module" corresponding to the formal completion of the Brieskorn module. The regularity of the Gauss-Manin connection implies that the asymptotic expansions we are interested in always converge, so there is no lost of generality to look at them as formal developments. The "geometric" condition encodes in the structure of an (a,b)-module both the regularity of the Gauss-Manin connection and the fact that the roots of the Bernstein polynomial of $f$ are negative rational numbers.\\ The notion of an (a,b)-module itself is very simple:\\ Consider the unitary $\C-$algebra $\mathcal{A} := \C < a, b >$ with two variables a and b satisfying the commutation relation $a.b - b.a = b^2$ corresponding to the relation $\partial_s.s - s.\partial_s = 1$ because "a" will act as the "multiplication by $s$" and "b" will act as the "primitive vanishing at $s=0$". Then complete $\mathcal{A}$ for the $b-$adic filtration of $\mathcal{A}$ defined by the two sided ideals $b^m.\mathcal{A} = \mathcal{A}.b^m, m \in \mathbb{N}$. We obtain the unitary $\C-$algebra $\tilde{\mathcal{A}}$ described as follows: $$ \tilde{\mathcal{A}} := \{ \sum_{m = 0}^{+\infty} \quad b^m.P_m(a), \ {\rm with} \quad P_m \in \C[a] \quad \forall m \in \mathbb{N} \}$$ with the product defined by the relation $a.b - b.a = b^2$ which implies \begin{equation} a.S(b) = S(b).a + b^2.S'(b) \end{equation} for any $S \in \C[b]$, where $S'$ is the "usual" derivative of the polynomial $S$. Inductively, this relation allows to write any element in $ \tilde{\mathcal{A}}$ on the form: $$\sum_{m = 0}^{+\infty} \quad P_m(a).b^m, \ {\rm with} \quad P_m \in \C[a] \quad \forall m \in \mathbb{N}$$ Note that $\C[[b]]$ and $\C[a]$ are commutative sub-algebras in $\tilde{\mathcal{A}}$.\\ \begin{defn}\label{(a,b) 1} An {\bf (a,b)-module} is a $\tilde{\mathcal{A}}-$module which is {\bf free and finite rank} on the sub-algebra $\C[[b]]$. \end{defn} This kind of object is very easy to construct, thanks to the following elementary lemma. \begin{lemma}\label{(a,b) 2} Let $E := \oplus_{j = 1}^k \C[[b]].e_j$ be a free rank $k$ $\C[[b]]-$module. For any choice of \ $x_1, \dots, x_k$ in $E$ there exists an unique structure of (a,b)-module on $E$ such that \begin{enumerate} \item The action of $\C[[b]]$ on $E$ corresponds to the initial structure of $\C[[b]]-$module of $E$. \item For each $j \in [1, k]$ we have $a.e_j = x_j$ and the action of "a" is continuous with respect to the $b-$adic filtration $(b^m.E)_{m \in \mathbb{N}}$ of $E$. \end{enumerate} \end{lemma} \parag{Proof} This is an easy consequence of the formula $(1)$ extended to any $S \in \C[[b]]$ thanks to the hypothesis that "a" is continuous for the $b-$adic filtration of $E$.$\hfill \blacksquare$\\ It is shown in \cite{[B.93]} proposition 1.1 that for any $A \in End_{\C}(\C^k)\otimes_{\C} \C[[z]]$ there exists a unique rank $k$ (a,b)-module $E := \oplus_{j=1}^k \C[[b]].e_j$ such that the basis $(e)$ satisfies $a.(e) = A(a).b.(e) $; so this (a,b)-module represents the simple pole formal differential system $$ z.\frac{dF}{dz}(z) = A(z).F(z) .$$ \section{Geometric (a,b)-modules} First we shall define "regular". \begin{defn}\label{regular 1} We shall say that an (a,b)-module $E$ is a {\bf simple pole} (a,b)-module when it satisfies $a.E \subset b.E$.\\ We shall say that an (a,b)-module $E$ is {\bf regular} when it is a sub-(a,b)-module of a simple pole (a,b)-module. \end{defn} The simplest way to find if an (a,b)-module $E$ is regular is to consider its saturation by $b^{-1}.a$. It is easy to see that \begin{equation} \tilde{E} := \sum_{j=0}^\infty (b^{-1}.a)^j.E \subset E \otimes_{\C[[b]]}\C[[b]][b^{-1}] \end{equation} is stable\footnote{the action of "a" is defined on $\C[[b]][b^{-1}]$ by the commutation relation $a.b^{-1} = b^{-1}.a -1$.} by $a$, so $\tilde{E}$ is a $\tilde{\mathcal{A}}-$module which has no $b-$torsion and satisfies $a.\tilde{E} \subset b.\tilde{E}$ because $a.(b^{-1}.a)^j = b.(b^{-1}.a)^{j+1}$. So when $\tilde{E}$ is a finite rank $\C[[b]]-$module, it is a simple pole (a,b)-module and $E$ is regular. Conversely, it is not difficult to see that $\tilde{E}$ is the smallest $\C[[b]]-$module containing $E$ and stable by $b^{-1}.a$. So $E$ is regular {\bf if and only} if $\tilde{E}$ has finite rank over $\C[[b]]$.\\ \begin{defn}\label{Bernstein} Let $E$ be a simple pole (a,b)-module. Then the {\bf Bernstein polynomial} of $E$ is the {\bf minimal polynomial} of the $\C-$endomorphism $(-b^{-1}.a)$ acting on the finite dimensional vector space $E\big/b.E$.\\ When $E$ is a regular (a,b)-module the {\bf Bernstein polynomial} of $E$ is, by definition, the Bernstein polynomial of $\tilde{E}$, where $\tilde{E}$ is the saturation of $E$ by $b^{-1}.a$. \end{defn} Of course, this definition comes from the fact that when the germ $(f, 0)$ has an isolated singularity, the Bernstein polynomial of $f$ at $0$ is equal to $(\lambda + 1).B_E(\lambda)$ where $B_E$ is the Bernstein polynomial of the (a,b)-module $E$ which is the $b-$completion of the Brieskorn module of $(f,0)$. The factor $(\lambda+1)$ corresponds to the Bernstein polynomial of a non singular germ. \begin{defn}\label{geometric} A regular (a,b)-module $E$ is called {\bf geometric} when its Bernstein polynomial has {\bf negative rational roots}. \end{defn} The rationality of the roots are the counterpart of the fact that the local monodromy of a germ $(f, 0)$ is quasi-unipotent. The negativity is the counterpart of Malgrange positivity result (see \cite{[Ma.74]}). Of course, both encode the famous theorem of Kashiwara \cite{[K.76]} which says that the roots of the Bernstein polynomial of an arbitrary germ $(f, 0)$ has negative rational roots.\\ The regularity of the Gauss-Manin connection has the following counter-part which is often useful. \begin{prop}\label{a-complete} Let $E$ be a regular (a,b)-module. Then $E$ is complete for the $a-$filtration $(a^m.E)_{m \in \mathbb{N}}$.\\ So any geometric (a,b)-module is a module over the algebra of formal power series $$\hat{\mathcal{A}} := \{ P = \sum_{p,q \geq 0} c_{p,q}.a^p.b^q \}$$ which contains $\C[[a]]$ and $\C[[b]]$ as commutative sub-algebras. \end{prop} Note that any $P \in \hat{\mathcal{A}} $ which has a non zero constant term (i.e. $c_{0,0} \not= 0$) is invertible in $\hat{\mathcal{A}} $. So its action on any geometric (a,b)-module $E$ is bijective.\\ The {\bf general existence theorem} of geometric (a,b)-modules\footnote{see \cite{[B.06]} paragraph 2.3. The global case, when $f$ is proper, which associates geometric (a,b)-modules to the hyper-cohomology of the complex $(\hat{K}er(df)^\bullet, d^\bullet)$ is given in \cite{[B.13a]} theorem 4.3.4. See also \cite{[B.12b]} theorem 2.3.1 for the relative case.} shows that for each degree $p \in [0, n]$ the local Gauss-Manin connection of an arbitrary germ $(f, 0)$ is associated to a geometric (a,b)-module $E^p$.\\ This (a,b)-module $E^p$ is obtained as the quotient by its $b-$torsion of the germ of the $p-$th cohomology sheaf of the complex of sheaves $(\hat{K}er(df)^\bullet, d^\bullet)$ defined on the hyper-surface $\{ f = 0 \}$ in an ambiant complex manifold $M$ by defining $\hat{K}er(df)^m $ as the $f-$completion of the kernel of the sheaf map $(\wedge df) : \Omega_M^m \to \Omega_M^{m+1}$.\\ The next theorem explains that any geometric (a,b)-module can be realized as a sub-module of the asymptotic expansion (a,b)-module $\Xi^N_\Lambda$ defined as follows:\\ Let $\Lambda \subset \mathbb{Q}\cap ]0, 1]$ be a finite subset and let $N$ be a non negative integer. Then consider the free $\C[[b]]-$module of finite rank $$ \Xi^N_\Lambda := \sum_{\lambda \in \Lambda, j \in [0, N]} \ \C[[b]].s^{\lambda-1}.\frac{(Log\, s)^j}{j!} $$ where the action of "a" is given by left multiplication by $s$ with the commutation relation given by the formula $(1)$. Interpreting "b" as the primitive without constant, it is easy to see that $$ \Xi^N_\Lambda \simeq \sum_{\lambda \in \Lambda, j \in [0, N]} \ \C[[s]].s^{\lambda-1}.\frac{(Log\, s)^j}{j!} $$ is the "usual" $\C[[s]]-$module of asymptotic expansions.\\ For a finite dimensional vector space $V$, we have a natural structure of $\tilde{\mathcal{A}}-$module on \ $ \Xi^N_\Lambda\otimes_{\C} V$ \ by letting $a$ and $b$ act as $a\otimes Id_V$ and $b \otimes Id_V$. Moreover, it is easy to see that this simple pole (a,b)-module is geometric for any choices of $\Lambda, N$ and $V$. \begin{thm}\label{D-A 1} Any geometric (a,b)-module $E$ may be realized as a sub-(a,b)-module of \ $\Xi^{N}_\Lambda\otimes_{\C} V$ \ for $N$ large enough and $\Lambda$ a finite subset in $\mathbb{Q}\cap ]0, 1]$, where $V$ is a complex vector space of dimension at most equal to $rk(E)$. \end{thm} For a proof see \cite{[B.09b]} theorem 4.2.1. Let now $\Lambda $ be any subset in $\mathbb{Q}/\mathbb{Z}$. For any regular (a,b)-module $E$ let $E_\Lambda$ be the biggest sub-(a,b)-module $G$ in $E$ such that the roots of the Bernstein polynomial $B_G$ of $G$ are modulo $\mathbb{Z}$ in $-\Lambda$. then we have: \begin{lemma}\label{primitif 1} For any regular (a,b)-module $E$ and any $\Lambda \subset \mathbb{Q}/\mathbb{Z}$, $E_\Lambda$ is a normal sub-(a,b)-module of $E$ and the Bernstein polynomial of the quotient $E/E_\Lambda$ has no root which is in $-\Lambda$ modulo $\mathbb{Z}$. \end{lemma} We shall call $E_\Lambda$ the {\bf $\Lambda-$primitive part} of $E$.\\ If $E$ is realized as a sub-(a,b)-module of $\Xi^{N}_M\otimes V$ then the $\Lambda-$primitive par of $E$ is given by the intersection $$ E_{[\Lambda]} = E \cap \big( \Xi^{N}_{[\Lambda]}\otimes V\big).$$ \section{Semi-simplicity} In order to study the structure of a regular (a,b)-module, we start with the classification of the rank 1 (a,b)-module. They are classified by a complex number. The rank 1 (a,b)-module corresponding to $\lambda \in \C$ is denoted $E_\lambda$ and is defined by $E_\lambda := \C[[b]].e_\lambda$ where $a.e_\lambda = \lambda.b.e_\lambda$.\\ It is obvious that such an (a,b)-module has no non trivial normal submodule. In fact any non zero sub-(a,b)-module of $E_\lambda$ is equal to $b^m.E_\lambda$ which is isomorphic to $E_{\lambda+m}$ for some $m \in \mathbb{N}$. So we consider $E_\lambda, \lambda \in \C$ as the simple (a,b)-modules\footnote{There is an interesting analogy between regular (a,b)-modules and pairs $(V, f)$ of a finite dimensional complex vector space $V$ with an $\C-$endomorphism.}. Then we defined a {\bf semi-simple} (necessarily regular) (a,b)-module $E$ as any (a,b)-module isomorphic to a sub-module of a finite direct sum $\oplus_{j=1}^k E_{\lambda_j}$ for some $\lambda_j \in \C$.\\ The following result is proved in \cite{[B.13b]} section 2. \begin{prop}\label{ss-filt.} In any regular (a,b)-module there exists a finite strictly increasing filtration $(S_i(E))_{i \in [0, d]}$ by normal sub-(a,b)-modules in $E = S_d(E)$ such that for each $i \in [1, d]$, $S_i(E)/S_{i-1}(E)$ is the biggest semi-simple sub-(a,b)-module inside $ E/S_{i-1}(E)$ (with the convention $S_0(E) := \{0\}$). It is called the {\bf semi-simple filtration} of $E$.\\ Dualy\footnote{We shall not describe here the notion of dual (a,b)-module for sake of brevity.} in any regular (a,b)-module there exists a finite strictly decreasing filtration $(\Sigma_h(E))_{h \in [1, \delta]}$ by normal sub-(a,b)-modules in $E := \Sigma_0(E)$ such that for each $h \in [1, \delta]$, $\Sigma_h(E)$ is the biggest normal sub-(a,b)-module inside $\Sigma_{h-1}(E)$ such that the quotient $\Sigma_{h-1}(E)/\Sigma_h(E)$ is semi-simple. It is called the {\bf co-semi-simple filtration} of $E$. \end{prop} When a geometric (a,b)-module $E$ is embedded in some \ $\Xi^N_\Lambda \otimes V$ then the semi-simple filtration $S_j(E)$ is given by the intersection $E \cap (\Xi^j_\Lambda \otimes V)$. When the geometric (a,b)-module $E$ is a $\tilde{\mathcal{A}}-$sub-module generated by one element inside some $\Xi^j_\Lambda \otimes_{\C} V$ (so is a fresco, see the next section) it is also easy to compute the co-semi-simple filtration $\Sigma_j(E)$ as the intersection of $E$ with $E \cap (\Xi^{N-j}_\Lambda \otimes V)$ assuming that $N$ is minimal for such an embedding of $E$.\\ In the analogy between regular (a,b)-modules and pairs $(V, f)$ where $V$ is a finite dimensional complex vector space and $f$ an endomorphism of $V$, the semi-simple filtration is the analog of the filtration $(Ker N^m)$ of $V$, where $N$ is the nilpotent part of $E$ (the analogy for the co-semi-simple filtration uses duality). \section{Why Frescos ?} The Gauss-Manin system which corresponds to geometric (a,b)-modules controls the period-integrals associated to any (relative and closed) holomorphic differential form and any cycle $\gamma$ in the homology of the Milnor fiber of $(f, 0)$. But if we are interested in the period-integrals associated to a {\bf given class} of holomorphic $p-$form $\omega$ such that $df\wedge \omega = 0$ and $d\omega = 0$, we shall obtain much more precise informations if we may find a differential equation which has only these period-integrals as solutions. In term of (a,b)-module this corresponds to the fact that we want to consider only the sub-(a,b)-module $\tilde{\mathcal{A}}.[\omega] \subset E^p$ inside the geometric (a,b)-module $E^p$ associated to the Gauss-Manin connection of $(f, 0)$ in degree $p$ (see above). As a sub-(a,b)-module of a geometric (a,b)-module is again a geometric (a,b)-module, this leads to the following definition. \begin{defn}\label{Fresco} A geometric (a,b)-module which is generated as a $\tilde{\mathcal{A}}-$module by {\bf one} generator is called a {\bf fresco}. \end{defn} Of course, this is equivalent to the fact that $E\big/a.E + b.E$ is a $1-$dimensional complex vector space, when $E$ is a geometric (a,b)-module.\\ This notion has several interesting properties: \begin{lemma}\label{basis} Let $F$ be a fresco with generator $e$ over the algebra $\tilde{\mathcal{A}}$ and with $\C[[b]]-$rank $k$. Then $e, a.e, \dots, a^{k-1}.e$ is a $\C[[b]]-$basis of $F$. \end{lemma} \begin{lemma}\label{quotient and +} Let $G \subset F$ be a normal\footnote{So for any $x \in F$, $b.x \in G$ implies $x \in G$.} sub-(a,b)-module of a fresco $F$. Then $G$ is a fresco. Moreover, $F/G$ is also a fresco. \end{lemma} For a proof see \cite{[B.13b]} lemma 1.1.4. \begin{lemma}\label{Bernstein 2} When $F$ is a fresco, the Bernstein polynomial of $F$ is equal to the {\bf characteristic polynomial} of $-b^{-1}.a$ acting on $\tilde{F}/b.\tilde{F}$ (where $\tilde{F}$ is the saturation of $F$ by $b^{-1}.a$). \end{lemma} The following structure theorem is proved in \cite{[B.09b]} theorem 3.4.1. \begin{thm}\label{Fresco structure} Let $F$ be a fresco with $\C[[b]]-$rank $k$. Then $F$ is isomorphic to a quotient $\tilde{\mathcal{A}}\big/\tilde{\mathcal{A}}.\Pi$ where $$ \Pi := (a-\lambda_1.b)S_1^{-1}.(a - \lambda_2.b).S_2^{-1}...S_{k-1}^{-1}.(a - \lambda_k.b) $$ where for each $j \in [1, k] , S_j$ is in $\C[b]$ and satisfies $S_j(0) = 1$, and where $\lambda_1, \dots, \lambda_k$ are rational numbers. \end{thm} Note that in such a presentation of the fresco $F$ the element $$P_F := (a - \lambda_1.b).(a - \lambda_2.b)...(a - \lambda_k.b)$$ which is the initial form in (a,b) of $\Pi$ {\bf depends only on the isomorphism class} of $F$ and is related to the Bernstein polynomial $B_F$ of $F$ by the relation $$ P_F = b^{k}.B_F(-b^{-1}.a) $$ in the algebra $\mathcal{A}[b^{-1}]$ (see the theorem 3.2.1 in \cite{[B.09b]}). We call the homogeneous element $P_F$ of degre $k := rk(F)$ in (a,b) the {\bf Bernstein element} of $F$. Then note that the roots of $B_F$ are the (rational negative) numbers $-\lambda_j + k - j$. So $B_F(x) = \prod_{j=1}^k (x + \lambda_j +j - k)$. This implies that we have $\lambda_j > k-j ,\ \forall j \in [1, k]$.\\ The following corollary of the previous results shows that, in the case of a fresco, the Bernstein polynomial is easier to compute than for a general geometric (a,b)-module. \begin{cor}\label{suite exacte} Let $0 \to G \to F \to H \to 0$ be an exact sequence of frescos. Then we have the equality $P_F = P_G.P_H$ in the algebra $\mathcal{A}$ between Bernstein elements. This gives the relation $$ B_F(x) = B_G(x - rk(H)).B_H(x) \quad {\rm in} \ \C[x]$$ between the Bernstein polynomials. \end{cor} Another important result on frescos is given by the following theorem (see \cite{[B.13b]} theorem 1.2.5) \begin{thm}\label{Principale J.H} Let $F$ be a fresco. Then $F$ admits an {\bf unique Jordan-H\"older sequence} $$0 = F_0 \subset F_1 \subset F_2 \subset \dots \subset F_k = F $$ where, for each $j \in [0,k]$, $F_j$ is a normal fresco of rank $j$ such that $F_{j}/F_{j -1}\simeq E_{\lambda_{j}}$ {\bf such that the sequence $(\lambda_j +j)_{j \in [1, k]}$ is non decreasing}. \\ It is called the {\bf principal Jordan-H\"older sequence} of the fresco\footnote{Recall that $E_\lambda$ the rank 1 regular (a,b)-module defined by $E_\lambda := \C[[b]].e_\lambda$ where $a.e_\lambda = \lambda.b.e_\lambda$.}. \end{thm} \parag{Remarks} \begin{enumerate} \item Any regular (a,b)-module admits a Jordan-H\"older sequence, but, even with the condition that the sequence $(\lambda_j + j)_{j \in [1, k]}$ is non decreasing, it is not unique. in general. \item For a fresco $F$ to admit a Jordan-H\"older sequence with $\lambda_j+j$ strictly decreasing is equivalent to semi-simplicity. \item A $\lambda-$primitive theme (see below) has a unique Jordan-H\"older sequence. So it is its principal Jordan-H\"older sequence. This shows that a non zero semi-simple $\lambda-$primitive theme has rank $1$. \end{enumerate} In term of asymptotic expansions, the notion of fresco has the following characterization which is an easy corollary of the theorem \ref{D-A 1}. \begin{cor}\label{D-A 2} Any fresco $F$ is isomorphic to a $\tilde{\mathcal{A}}-$monogenic sub-module of some $\Xi^N_\Lambda\otimes V$ for some finite subset $\Lambda \subset \mathbb{Q} \cap[0, 1[$, some $ N \in \mathbb{N}$ and some finite dimensional complex vector space $V$. \end{cor} For the fresco $F := \tilde{\mathcal{A}}.[\omega] \subset E^p$ associated to the germ $(f, 0)$ and $\omega \in \Omega_{\C^{n+1}, 0}^p$ such that $df\wedge \omega = 0$ and $d\omega = 0$, we may choose $V := H^p(F, \C)$ where $F$ is the Milnor fiber of $(f, 0)$ and for each $\gamma \in H_p(F, \C) \simeq H^p(F, \C)^*$ the image by $Id\otimes \gamma$ of $[\omega]$ in $\Xi^N_\Lambda$ is given by the asymptotic expansion at $s= 0$ of the integral period $\varphi_\gamma$. This leads to the notion of theme. \section{Themes} When we are interested by a period-integral $\varphi_\gamma(s) := \int_{\gamma_s} \omega/df$ with a {\bf given class} of $d-$closed $f-$relative holomorphic $(p+1)-$differential form $\omega$ and a {\bf given class} $\gamma \in H_p(F, \C)$, the asymptotic expansion at $s = 0$ of $\varphi_\gamma(s)$ defines a monogenic sub$-\tilde{\mathcal{A}}-$module of some $\Xi^N_\Lambda$. This will be called the {\bf theme} of this period-integral.\\ Among the frescos, themes are characterized by the fact that they may be realized in the asymptotic expansions with a $1-$dimensional vector space $V$. This is equivalent to ask that, for each eigenvalue of the monodromy\footnote{the monodromy may be defined directly on $\Xi^N_\Lambda$ by $T(\psi(s)) = \psi(s.e^{2i\pi})$ on the formal power series in $s = \exp(2i\pi.\sigma), \sigma \in H$; so $T$ is the translation by $2i\pi$ on $\sigma := Log\, s$.}, there is exactly one Jordan bloc. Fixing $\gamma \in H_p(F, \C)$ in the case of a period-integral, this Jordan bloc is generated by the component of $\gamma$ on the corresponding spectral subspace of the monodromy of $f$ acting on the $p-$th homology group $H_p(F, \C)$ of the Milnor fiber of $f$.\\ The following result is an "abstract version" of our previous remark on the monodromy of a period-integral associated to a given $\omega$ and a given $\gamma$ which also gives a characterization of $\lambda-$primitive themes. \begin{thm}\label{primitif 2} Let $\lambda$ be in $\mathbb{Q}/\mathbb{Z}$ and let $\Theta$ be a $\lambda-$primitive theme. Then $\Theta$ has a unique normal rank $1$ sub-module. Conversely, any geometric (a,b)-module which has an unique rank $1$ normal sub-module is a $\mu-$primitive theme for some $\mu \in \mathbb{Q}/\mathbb{Z}$. \end{thm} For a proof see \cite{[B.14]} theorem 2.1.6.\\ As the quotient of a $\lambda-$primitive theme by a normal sub-(a,b)-module is again a $\lambda-$primitive theme the following corollary is immediate. \begin{cor}\label{unique J-H} A $\lambda-$primitive theme has a unique Jordan-H\"older sequence. Conversely, any geometric (a,b)-module having a unique Jordan-H\"older sequence is a $\mu-$primitive theme for some $\mu \in \mathbb{Q}/\mathbb{Z}$. \end{cor} Of course, this J-H. sequence must be the principal one, so the sequence $\lambda_j + j$ is non decreasing. \parag{Notation} Let $\Theta$ be a $\lambda-$primitive theme. Then in its Bernstein element $$P_\Theta := (a -\lambda_1)\dots (a -\lambda_k)$$ we have $\lambda_{j+1} = \lambda_j + p_j - 1$ for each $j \in [1, k-1]$ with $p_j \in \mathbb{N}$ and $\lambda_1$ which is is in $\lambda + \mathbb{Z}$, must satisfy $\lambda_1 > k-1$. So $P_\Theta$ is defined by $\lambda_1$ and the integers $p_1, \dots, p_{k-1}$. \\ We shall say that $\lambda_1, p_1, \dots, p_{k-1}$ are the {\bf fundamental data} of the $\lambda-$primitive theme $\Theta$.\\ Defined for each $j \in [1, k-1]$ the vector space $V_j \subset \C[[b]]$ as follows: \begin{itemize} \item When $p_j + \dots + p_{k-1} \geq k-j$ let $q_j := p_j+ \dots + p_{j+h} $ where $h$ is the smallest integer such that $p_j+ \dots + p_{j+h} \geq k-j$. Then put $$V_j := \oplus_{i= 0}^{k-j-1} \ \C.b^{i} \oplus \C.b^{q_j} .$$ \item When $p_j + \dots + p_{k-1} < k-j$ put $$ V_j := \oplus_{i= 0}^{k-j-1} \ \C.b^{i} .$$ \end{itemize} Note that $b^0 = 1$ and $b^{p_j}$ are always in $V_j$. Define now for each $j \in [1, k-1]$ the open set $W_j$ in $V_j$ given by the conditions $S \in V_j$ belongs to $W_j$ if and only if $S(0) = 1$ and the coefficient of $S$ on $b^{p_j}$ is not zero.\\ The theorem \ref{Fresco structure} may be specified as follows (see \cite{[B.14]} theorem 3.2.6). \begin{thm}\label{canonical form}{\bf [Canonical form for $\lambda-$primitive themes]}\\ Let $\Theta$ be a $\lambda-$primitive theme with fundamental data $\lambda_1, p_1, \dots, p_{k-1}$. Then there exists $S_j \in W_j$ such that $\Theta$ is isomorphic to $\tilde{\mathcal{A}}\big/\tilde{\mathcal{A}}.\Pi$ where $$\Pi := (a- \lambda_1.b).S_1^{-1}.(a - \lambda_2.b) \dots S_{k-1}^{-1}.(a - \lambda_k.b) .$$ Conversely, for any such $\Pi \in \tilde{\mathcal{A}}$, the quotient $\tilde{\mathcal{A}}\big/\tilde{\mathcal{A}}.\Pi$ is a $\lambda-$primitive theme. \end{thm} Of course, this allows to produce for each given fundamental data a versal family of $\lambda-$primitive theme (see \cite{[B.15]}).\\ By definition a theme is a sub-(a,b)-module of some $\Xi^N_\Lambda$. So it is natural to ask when such a realization is unique. This leads to the notion of {\bf invariant theme}\footnote{in French : th\`{e}me stable.}. The following result gives two characterizations of invariant themes (see proposition 4.2.4 of \cite{[B.14]}): \begin{thm}\label{invariant} Let $\Theta$ be a theme with rank $k$. The following properties are equivalent: \begin{enumerate} \item There exists a realization of $\Theta$ in some $\Xi^N_\Lambda$ which is invariant by the monodromy (see a previous footnote for a definition of the monodromy on the asymptotic expansion $\Xi^N_\Lambda$$)$. \item There exists an {\bf unique} sub-theme of \ $\Xi := \cup_{\Lambda, N} \ \Xi^N_\Lambda$ which is isomorphic to $\Theta$. \item The $\C-$vector space $Hom_{\tilde{\mathcal{A}}}(\Theta, \Theta)$ has dimension $k$. \end{enumerate} \end{thm} The following theorem for $[\lambda]-$primitive invariant theme is proved in \cite{[B.14]}. \begin{thm}\label{unique} Any invariant $[\lambda]-$primitive theme has an unique canonical form. \end{thm} This result implies that in the versal family of themes with given fundamental data (parametrized by the affine open set $\prod_{j=1}^k \ W_j$; see the theorem \ref{canonical form}) an invariant theme appears only once.\\ This leads to construct some {\bf universal} families of $\lambda-$primitive themes (see \cite{[B.15]}).\\ For the notion of {\bf change of variable} in an (a,b)-module the reader may consult \cite{[B.12a]}.\\ For { \bf concrete non trivial examples} of the use of frescos to analyse asymptotic expansions of period-integrals see \cite{[B.21]}. \newpage
\section{Introduction} \vspace{-.25cm} With increasing number of applications deploying connected devices to perform complicated tasks, machine learning based units (MLUs) become an integrated part of mobile networks. Hence, considering functionality of these blocks in design of communications systems is beneficial in order to both enhancing system performance and utilizing radio resources efficiently. MLU input space contains attributes with different levels of relevance and redundancy regarding the output. Accordingly, severity of performance loss in response to corrupted inputs depends on relevancy of the features. Explaining this behavior is complicated, especially in presence of dependencies among input variables. To this end, we revisit the rate allocation problem and suggest an automated way to determine levels of distortion that MLU can tolerate while reducing its prediction errors given a bandwidth constraint. The tradeoff between compression and accuracy is a well-known dilemma in lossy quantization. Due to the complexity of distributed scenarios, achievable rate distortion (RD) regions are derived for special cases. These studies can be categorized into syntax and relevance based solutions. The syntax based category presents approaches measuring the distance between source sequences $\mathbf{x}$ and their decoded versions $\hat{\mathbf{x}}$. The RD theory \cite{elementsof}, Wyner-Ziv coding and its network extension~\cite{WZ, Gastpar_WZ_ext}, quadratic Gaussian multiterminal source coding (MSC)~\cite{Complete_G_Multiterminal} and MSC for two encoders under logarithmic loss~\cite{The_Multiterminal} belong to this first group. These solutions provide the basis for establishing reliable human to human communications. However, exact reconstruction of transmitted messages is not an optimal criterion when dealing with MLUs in network. In these cases, achieving a high accuracy on final outputs $\mathbf{y}$ determines the system performance. In order to consider final machine learning (ML) predictions in distortion measure, the second relevance based category of solutions target to compress $\mathbf{x}$ while preserving the relevant information for prediction of $\mathbf{y}$. These methods are also tailored for special cases assuming prior knowledge on statistical relation among random variables (RVs) or their probability distributions. Information bottleneck (IB) is a RD function compressing one RV $x$ in a single encoder-decoder system, where mutual information between the quantized message and another variable of interest $y$ is the distortion measure~\cite{the_IB, IBRDproof}. The objective function of this optimization problem has also been used for quantization codebook design \cite{IB_codebook}. Several studies attempted to extend IB for distributed quantization with multiple sources. Multivariate IB introduced in \cite{MIB} employs Bayesian networks (BN) for this purpose, where the optimal assignment form is derived. However, the optimality of this proposal in terms of determining RD regions is not discussed, and its cost function has not been used to select number of clusters in literature. It should also be noted that BN determination is generally far from trivial for ML tasks. Authors of \cite{dist_dv_G} characterize the RD region of distributed IB for discrete and vector Gaussian sources assuming conditional independence of observations given the main signal of interest which does not hold in many learning problems. The Chief Executive Officer (CEO) problem studies the estimation of a data sequence using its independently corrupted versions observed by different agents~\cite{CEO}. These observations are quantized and communicated to a single decoder. The general formulation of CEO can be accounted as relevance based compression, however, its RD region is only investigated for special cases which are not applicable for learning paradigms. The Gaussian CEO \cite{QGCEO, VGCEO1, OptVGCEO} addresses corruptions caused by additive white Gaussian noise. This simple setup cannot comply with complicated MLU models. \cite{The_Multiterminal} provides the RD region of $m$-encoder CEO conveying information regarding another RV under logarithmic loss. Aside from the specific distortion measure having an important impact on making this problem tractable, as in all CEO setups conditional independence of observed sequences given the original data is assumed. Considering the mentioned aspects, these CEO studies have not been evaluated for learning tasks. In addition, authors of \cite{localiz} study the problem of 1-bit rate allocation for localization in wireless sensor networks, while the proposed cost function accounts for both decoding and localization error. Fixed-rate quantization has three main aspects: rate allocation, codebook design, and assignment of RVs to codewords. Here, we focus on integer-valued bit allocation for multiple correlated sources performing scalar uniform quantization with arbitrary distributions while MLU is treated as a black box. This includes all non-adaptive ML blocks once trained and executing tasks online in network, independent of their hypothesis and learning paradigm such as supervised and reinforcement learning, e.g., the proposed approach can be applied on \cite{fr1, fr2} after the convergence. Thus, the provided solution can be used in a wide variety of real-world scenarios. In this paper, we propose a criterion using Kullback-Leibler divergence (KLD) to measure quality of bit allocations. The KLD approximation is performed and discussed for two non-parametric approaches: histogram with smoothing and k-nearest neighbor (kNN). Then performance of the proposed method is investigated for a cart inverted pendulum with ML based controller (MLC) which is a shallow neural network (NN). The results are compared with those of equal bit sharing and a mean square error (MSE) based approach inspired by asymptotically optimal integer-valued bit allocation for Gaussian distributed RVs from~\cite{Integer_opt}. Simulation results show significant gain in system performance for low bit rate region. It can also be seen that a lower quantization noise can be tolerated on two of the features compared to other RVs. \footnote{The proposed method has also shown significant gains for other use-cases including a different setup for the inverted pendulum, indoor environment classification with real data and a synthetic data set. These simulations are presented in an extended version of the paper on arXiv.} This paper is organized as follows. The system model is discussed in Section~\ref{SysModel}. In Section~\ref{method}, the rate allocation approach and KLD estimators are introduced. The simulation setup is elaborated in Section~\ref{EvalSetup}, and numerical results are presented\hspace{-.1cm} in Section\hspace{-.1cm} \ref{numeric}. Finally, \hspace{-.05cm}conclusions are drawn in Section~\ref{conclusion}. \textit{Notation}: Linear-quadratic regulator (LQR) controller matrices $\bb{K}, \bb{Q}$ and vectors are typeset boldface. $\mathbf{x} = [x_1, \cdots, x_N]$ and $\hat{\mathbf{x}} = [\hat{x}_1, \cdots, \hat{x}_N]$ are vectors of non-quantized and quantized MLU input components, and $\mathbf{y}$ represents MLU output. The $i$th element of these vectors is denoted with subscript $i$ as in $x_i$. $p_{\hat{\bb{X}}, \bb{Y}}(\hat{\bb{x}}, \bb{y})$ also shown as $p$, stands for the joint input-output distribution of the MLU assuming a highly accurate quantization. The joint MLU input-output distribution for a given bit allocation $\bb{R} = \{ R_i \}$ is shown as $q_{\hat{\bb{X}}, \bb{Y}}(\hat{\bb{x}}, \bb{y})$ or simply $q$. Data set samples for estimation of KLD are indicated as $\bb{z}_j = [\hat{\bb{x}}_j, \bb{y}_j ] $. Finally, $\hat{p}(\bb{z}_j)$ and $\hat{q}(\bb{z}_j)$ are distribution estimations for $p$, $q$ with data set samples. \vspace{-.4cm} \section{System Model} \label{SysModel} \vspace{-.15cm} \subsection{General Description} \vspace{-.1cm} As shown in Fig.~\ref{BlockDiag}, we study a multiple access channel scenario in which $N$ memoryless stationary sources provide real-valued input attributes $\mathbf{x}$ for a MLU. In presence of complex-valued attributes, the real and imaginary parts can be separated and treated as different RVs. The system performance is evaluated in terms of accuracy on predicting MLU output values $\bb{y}$. The scalar uniform quantization with $R_i$ bits for each symbol is performed on RV of $i$th source which is shown as $p_{\hat{X_i}|X_i}(\hat{x_i}|x_i)$. It is assumed that quantized vector is received error-free at the receiver. Note that application of the proposed method is not dependent on this assumption. To remove it, $\hat{\mathbf{x}}$ should be redefined to capture the effect of factors such as channel coefficient and receiver noise. Here, we seek to build a system model that can be used in practice. So, with no further assumptions, input attributes can be highly correlated and have an arbitrary joint probability density function $p_{\mathbf{X}}(\mathbf{x})$ with $\bb{x} \in \mathcal{X}_1 \times \mathcal{X}_2 \times \cdots \mathcal{X}_N $. Given the available bandwidth $B$ and signal to noise ratio (SNR) $\gamma=\frac{E_b}{N_0 B T_b}$, where $E_b$, $T_b$ and $N_0$ are energy per bit, bit interval and noise power spectral density, respectively, the capacity of bandlimited channel is $C_B = B \times \log_2(1+\gamma)$ bits/sec. Thus, the constraint for allocating bandwidth $B_i$ to $i$th source is $\sum_i B_i \leq B$. Assuming same SNR for all terminals, $\gamma_i = \gamma$, and a given symbol interval $T_s$, the constraint becomes $\sum_i R_i \leq R_\mathrm{sum}$, where $R_i = B_i \times \log_2(1+\gamma) \times T_s$ is the number of bits quantizing each symbol of the $i$th terminal, and $R_\mathrm{sum} = C_B \times T_s$~bits for each symbol~interval. $R_i$ is assumed to be integer-valued as usual in practical systems. The set of feasible bit allocations meeting the constraint are shown by $\mathcal{R}$. To consider different SNR values, the corresponding possible bit allocations should be added to the feasible set. \begin{figure}[t!] \centering \includegraphics[width=.85\columnwidth]{blockdiag} \vspace{-.3cm} \caption{Block diagram of the system model.} \label{BlockDiag} \vspace{-.5cm} \end{figure} In many scenarios, training is performed independent of communications system design and we are not able to modify the MLU. Therefore, it is assumed that learning process is done by non-quantized data and MLU parameters are fixed. In this case, $\sum_i R_i >> R_\mathrm{sum}$ and the joint probability distribution on input and output of the MLU is $p_{\hat{\bb{X}}, \bb{Y}}(\hat{\bb{x}}, \bb{y})$ which is also stated as $p_{\bb{X}, \bb{Y}}(\bb{x}, \bb{y})$ to simplify the notation. This distribution is considered as the true distribution and is used as reference to perform comparisons. Since the MLU model is trained and fixed, and following Markov chain of the system $\bb{Y} \leftrightarrow \bb{X} \leftrightarrow \hat{\bb{X}}$, we can write $q_{ \bb{Y}|\hat{\bb{X}}}(\bb{y} |\hat{\bb{x}}) = \sum_{\bb{x}^\prime \in \mathcal{X}^N} \p(\bb{y}|\bb{x}^\prime) p_{\bb{x} | \hat{\bb{x}}}(\bb{x}^\prime | \hat{\bb{x}})$ or equivalently, \mbox{$q_{ \bb{Y}|\hat{\bb{X}}}(\bb{y} |\hat{\bb{x}}) = \frac{1}{q_{\hat{\bb{X}}}(\hat{\bb{x}})} \sum_{\bb{x}^\prime \in \mathcal{X}^N} p_\bb{X}(\bb{x}^\prime) p_{\hat{\bb{X}}|\bb{X}}(\hat{\bb{x}}|\bb{x}^\prime) \p(\bb{y}|\bb{x}^\prime)$, where} $\p(\bb{y}|\bb{x}^\prime)$ is the fixed distribution learned by ML, and distribution of quantized data $q_{\hat{\bb{X}}}(\hat{\bb{x}})$ and conditional distributions on $\bb{x}$ and $\hat{\bb{x}}$ change for different rate allocations. In order to compare our results with syntax based solutions, a typical MSE based approach is considered. The selected bit allocation using this method is \vspace{-.4cm} \begin{equation} \label{mse} \mathbf{R}^* = \argmin_{\bb{R} \in \mathcal{R} } \sum_{i=1}^N \sigma_i^2, \vspace{-.15cm} \end{equation} where $\sigma_i^2 = \mathbb{E}_{x_i} \{ (x_i- \hat{x_i})^2 \}$ is the MSE between $i$th input feature and its quantized version which is calculated by employing data sets. Expectation is denoted by $\mathbb{E} \{ \cdot \}$. Equal sharing is another method that we investigate to provide a comparison baseline. In this case, $R_i = \lfloor R_\mathrm{sum} / N \rfloor$ and $\lfloor \cdot \rfloor$ returns the greatest integer which is equal or less than its input. This choice of $R_i$ complies with our assumption on no exchange of knowledge among sources and integer-valued $R_i$. Hence, $R_i$ changes only if remainder of $R_\mathrm{sum}/N$ is zero. \vspace{-.5cm} \subsection{Inverted Pendulum on Cart} \vspace{-.2cm} In order to evaluate performance of bit allocations, we investigate the control problem of inverted pendulum on a cart. The controller is supposed to move the cart to position $r = 0.2$ meter in less than 2 seconds while the pendulum is in its equilibrium position, i.e., $\theta= 0$, where $\theta$ is the angle of pendulum with respect to vertical axis. The initial deviation from vertical position is between $-0.1$ and 0.1 radians while the pendulum is placed at $r = 0$. For a given bar length and mass, steady state equations governing the plant are given by \vspace{-.2cm} \begin{equation} \label{LQR} \dot{\bb{x}}_\mathrm{LQR}^\mathrm{T} = \begin{bmatrix} 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1\\ 0 & \frac{m^2 g l^2 }{c} & \frac{-b(I+ml^2)}{c} & 0\\ 0 & \frac{mgl(M+m)}{c} & \frac{-mlb}{c} & 0\\ \end{bmatrix} \bb{x}_\mathrm{LQR}^\mathrm{T} + \begin{bmatrix} 0 \\ 0 \\\frac{I+ml^2}{c} \\ \frac{ml}{c} \end{bmatrix} f, \vspace{-.15cm} \end{equation} where $\bb{x}_\mathrm{LQR} = [r, \theta, \dot{r}, \dot{\theta}] $, $\dot{\bb{x}}_\mathrm{LQR}$ is its derivative with respect to time. $c=(M+m)I+mMl^2$ with $M$, $m$ and $l$ being the cart mass, pendulum mass and length to pendulum center of mass, respectively. $I=ml^2/3$ stands for the moment of inertia for bar mass. $g = 9.8$ and $b = 0.1$ (N/m/sec) are assumed as standard gravity and coefficient of friction for the cart. Finally, $f$ is the force applied to the cart in horizontal direction. To calculate the optimal force, LQR controller with precompensation factor is used for different values of bar length and mass. The cost function of LQR is $\int \bb{x}_\mathrm{LQR}^\mathrm{T} \bb{Q} \bb{x}_\mathrm{LQR} + \bb{u}^\mathrm{T} R_\mathrm{LQR} \bb{u}$, where $\bb{u} = - \bb{K} \bb{x}_\mathrm{LQR}$ and $\bb{K}$ is the matrix of controller coefficients. $\bb{Q}$ and $R_\mathrm{LQR}$ are controller parameters to balance the relative importance of error and control effort, e.g., energy consumption. The system performance of this problem is evaluated in terms of steady state errors. The error-bands for cart position and angle of pendulum are $0.1$ meters and $0.01$ radians, respectively. Thus, an error is counted when the deviation from equilibrium position is outside of these intervals in the last 100 milliseconds, e.g., $|\theta_\mathrm{final}| > 0.01$. Considering steady state error is a standard way of evaluating controllers in a predefined period of time. A steady state error can occur while the system becomes stable after the aforementioned 2 seconds. \vspace{-.4cm} \section{Kullback-Leibler Divergence Based Bit Allocation and its Estimation} \label{method} \vspace{-.15cm} The goal is to find the bit allocation set $\mathbf{R}^* $ which minimizes the following cost function \vspace{-.2cm} \begin{equation} \label{DKL} \bb{R}^* = \argmin_{ \bb{R} \in \mathcal{R} } D_{\mathrm{KL}} \Big( p_{\hat{\bb{X}}, \bb{Y}}(\hat{\bb{x}}, \bb{y}) ||q_{\hat{\bb{X}}, \bb{Y}}(\hat{\bb{x}}, \bb{y}) \Big), \vspace{-.1cm} \end{equation} where $D_{\mathrm{KL}}(\cdot||\cdot)$ is the Kullback-Leibler divergence or relative entropy measuring dissimilarity between two distributions. $\mathcal{R}$ contains all the rate allocations satisfying $\sum_{i=1}^N R_i \leq R_\mathrm{sum}$, where $R_i > 0$ is an integer-valued number. To solve this optimization problem, we estimate the two distributions empirically as explained in the following. The quality and accuracy of solution provided by (\ref{DKL}) is highly dependent on KLD approximation accuracy. Here, we estimate $p$ and $q$ using non-parametric methods, histogram with smoothing and kNN. The histogram estimator is a simple approach with the drawback of having many bins with zero samples. In addition, number of its required bins increases exponentially with data dimension. We also consider kNN estimator to investigate the effect of DKL approximation accuracy on system performance. kNN has been used for mixed continuous-discrete setups, and a high accuracy for strongly correlated data is not guaranteed for this estimator~\cite{kNN_dep}. Let each $T_1$ and $T_2$ be data sets containing $J$ samples $\{\bb{z}_j; j = 1, \cdots, J \}$ drawn from distributions $p$ and $q$, respectively. The kNN estimation of $p$ is \vspace{-.15cm} \begin{equation} \hat{p}(\bb{z}_j) = \frac{k}{J} \times \frac{1}{v(\bb{z}_j)}; \hspace{0.1cm} \bb{z}_j \in T_1, \vspace{-.2cm} \end{equation} where $v(\bb{z}_j) = \frac{\pi^{d/2}}{\Gamma(d/2 +1) } \times \frac{1}{R_p(\bb{z}_j)^d}$ is the volume of a $d$-dimensional ball with radius $R_p(\bb{z}_j)$. $\Gamma (\cdot)$ is the gamma function and $R_p(\bb{z}_j)$ stands for the euclidean distance between $\bb{z}_j$ and its $k$th neighbor in $T_1$. The $k$th neighbor of $\bb{z}_j$ is the $k$th sample in the list of sorted samples of $T_1$ from minimum to maximum euclidean distance regarding $\bb{z}_j$. $d$ is the sum of $N$ and dimension of ML outputs $\bb{y}$. Similarly, an estimate of $q$ can be calculated, where $R_q(\bb{z}_j)$ is the euclidean distance between $\bb{z}_j \in T_1$ and its $k$th neighbor in $T_2$. Therefore, the plugin estimator for KLD of (\ref{DKL}) becomes \vspace{-.15cm} \begin{equation} \label{5} D_{\mathrm{KL}} ( p || q ) \approx \mathbb{E}_{\bb{z}} \Big\{ \log \Big(\frac{\hat{p}(\bb{z}_j) }{\hat{q}(\bb{z}_j) } \Big) \Big\}. \vspace{-.15cm} \end{equation} A well-known difficulty with computing KLD is that to get a finite value, the support set of true distribution should be contained in support set of estimated distribution. While this is reasonable in some applications, it is an extreme condition for learning problems, particularly since distributions are only approximated with limited number of samples. Therefore, data smoothing can be used to overcome the problem. To deal with this situation, the width of histogram bins are selected to be larger than that provided by quantization. Thus for each sample in support set of $p$, we assume the existence of at least one sample when approximating $q$. In this case, instead of $\hat{q}(\bb{z}_j) = \frac{n}{J}$, where $n$ is the number of samples in histogram bin of $\bb{z}_j$, we have \vspace{-.15cm} \begin{equation} \hat{q}(\bb{z}_j) = \frac{n + \alpha}{J + \mu}, \vspace{-.15cm} \end{equation} where $\mu$ is the number of bins in support of $p$ with zero samples from $T_2$. For $n=0$, $\alpha=1$ and otherwise, $\alpha=0$. It is worth mentioning that in this rate allocation setup, the relative KLD values and their order are decisive, not absolute values. The feasible set of this problem is non-convex due to the integer-valued bit allocation assumption, however, it contains a limited number of members. Thus for focusing on impact of KLD approach and its approximation on MLU output, estimations of (\ref{5}) are substituted in (\ref{DKL}) for members of $\mathcal{R}$ and a brute-force search finds the optimal solution. In a high dimensional space, large number of required samples for meaningful estimations with a simple histogram can be restrictive. kNN method can circumvent this problem. The required kNN computations are theoretically expensive for a large data set. However, the calculations for both KLD approximations and solving (3) are performed only once and offline. Once the bit allocations are determined for different bandwidth constraints, one of them is picked for quantization according to the available bandwidth. Therefore, dealing with these computations is feasible in practice without affecting applicability of the proposed approach. \section{Simulation Setup} \label{EvalSetup} \vspace{-.05cm} \subsection{Training the MLC} \vspace{-.05cm} As the MLC, we train a fully-connected shallow NN with 70 neurons. The input features for MLC are mass and length of the bar pendulum, position $r$, velocity $v = \dot{r}$, angular position $\theta$ and angular velocity $q = \dot{\theta}$, implying an input layer dimension of 6. Hence, $\mathbf{x} = [m, l, r, \theta, v, q]$, where values of $m$ and $l$ can be selected from the ranges 0.1 to 2 kg and 20 to 50 cm, respectively. In addition, the output of MLC $y$ is the horizontal force applied to the cart which is shown as $f$ in (2). The NN is trained with a data set generated using LQR controllers for different random values of bar mass and length, with the following parameters: $M=0.5$ kg, $R_\mathrm{LQR} = 0.1$ and $\bb{Q}$ is a $4 \times 4$ matrix with zero entries except for the first and third diagonal elements being 5000 and 100, respectively. The LQR parameters are selected based on a trial and error procedure as elaborated in~\cite{LQR}. The sampling time is $0.01$ seconds. The training and test set contain 600 and 200 sequences, each of length 200, respectively. Validation ratio is $\frac{1}{3}$\footnote{The proposed approach attempts to preserve the performance level of the given fixed MLU. Thus, common learning challenges such as having a limited number of training samples can only worsen the induced MLU performance which persists even in case of delivering nonquantized data. But such degradation is caused by the MLU itself and not the selected quantization.}. Here, we deal with a regression problem. Sigmoid and linear activation functions are used in hidden and output layer, respectively. MSE is the loss function for training and NN weights are initialized with Xavier uniform initializer. Batch gradient descent with batch size of 1000 is the search algorithm. Furthermore, the learning rate is 0.01 with no decay factor. Stop condition is getting no improvement in validation loss for 50 epochs which occurred after 641 epochs. The final MSE achieved on the test set is $\approx 0.23$. \vspace{-.45cm} \subsection{KLD Estimation and Rate Allocation} \vspace{-.05cm} We use the MLC to generate data sets for estimation of KLD. For the uniform quantization, minimum and maximum values of each RV is taken from $T_1$. Since $m$ and $l$ are not expected to change frequently, we assume that their values are transmitted with 10 bits for each feature when needed. Members of $\mathcal{R}$ are selected to satisfy $3 \leq R_i \leq 9$ and $\sum_i R_i = R_\mathrm{sum}$, where we have $ R_\mathrm{sum} - 20$ bits to quantize the last four attributes of vector $\bb{x}$ described in \ref{EvalSetup}. This interval choice both limits the search space and is sufficiently large considering the range of RVs in this problem. For estimating $p$ and $q$, 40000 samples and the typical value of $k= \sqrt{J} = 200$ are used. As explained in section~\ref{SysModel}, we assume $ p_\bb{X}(\bb{x})$ is fixed which is the case for many non-adaptive learning problems. Thus, data set $T_2$ can be constructed directly from $T_1$ by simply quantizing its input samples for a given rate allocation and feeding them into the MLU to compute corresponding outputs. This procedure reduces computations significantly, because the alternative is to run simulations for pendulum environment to build a data set for each bit allocation. On the other hand, for the specific problem of inverted pendulum, very low quality quantization results in force decisions with large distance from the true ones. And after feeding back these force decisions to the plant, $p_\bb{X}(\bb{x})$ starts to diverge from the assumed distribution and consequently, $T_1$ must be updated. In order to avoid this difficulty, distribution on $\bb{x}$ is estimated for different sum rate constraints and bit allocations. Then, KLD between distribution of these allocations and the true distribution $p_\bb{X}(\bb{x})$ is calculated. These KLD estimations show a small value for $R_\mathrm{sum} \geq 42$. Therefore, it is a valid assumption that $p_\bb{X}(\bb{x})$ is almost fixed for sum rate constraints larger than 42 bits. \vspace{-.55cm} \section{Numerical Result} \label{numeric} \vspace{-.1cm} \begin{figure}[t!] \centering \includegraphics[width=.95\columnwidth]{Res} \vspace{-.35cm} \caption{Steady state error probability in percentage vs. $R_\mathrm{sum}$ the total number of quantization bits used in a symbol interval.} \label{SS} \vspace{-.55cm} \end{figure} In this section, the step response of cart inverted pendulum is monitored for 10000 iterations while each iteration simulates a period of 2 seconds. The steady state error probability $P_\mathrm{e}$ with confidence intervals derived by Wald method vs. total number of quantization bits used in a symbol interval $R_\mathrm{sum}$ is depicted in Fig.~\ref{SS}. Simulations are performed for the proposed KLD based approach with histogram and kNN estimation, equal bit sharing and MSE based rate allocation of (\ref{mse}). The proposed method with histogram estimation outperforms other techniques for all sum rate constraints, and indicates a gain of 2 bits in achieving $P_\mathrm{e}<0.001$ at 47 bits with respect to equal sharing and MSE methods. It should be noted that this single inverted pendulum scenario is a sandbox, and the gains and rate of the communication scheme in a real environment with signal overheads and more devices increases rapidly. Particularly, the KLD with histogram picks a significantly better bit allocation for low sum rate values. For instance, if 42 bits can be assigned for the system, error probability for both eqaul sharing and MSE are larger than $40\%$. This number can be reduced to $\approx10\%$ implying a reduction of more than $30\%$ in failures using the KLD. This huge gain is a result of taking ML output into consideration. In order to study the distribution of quantization noise and its pattern when a low error probability is achieved, consider the KLD approach with histogram at 46 bits and $P_\mathrm{e}\approx0.005$. With this constraint, the number of allocated bits for features of $\mathbf{x}$ are $[10, 10, 6, 6, 6, 8]$. Assuming that quantization error variance is defined as $\sigma^2_i = \mathbb{E} \{ (x_i - \hat{x}_i)^2 \}$ for each feature, we have $\sigma^2_3 \approx \sigma^2_4 $ of order of $10^{-6}$. However for $v$ and $q$, quantization variances are $\sigma^2_5 \approx 0.0003 $ and $\sigma^2_6 \approx 0.0001$ which are almost 100 times larger than that of $r$ and $\theta$. This pattern of having lower quantization noise for $\theta$ and $r$ remains the same for bit allocations which turn out to provide low probabilities of error. Therefore, it can be concluded that these features have a higher relevancy or importance for the MLU. For $R_\mathrm{sum} \leq 46$, rate allocations selected by MSE criterion result in the worst steady state error performance among all the methods under study. This performance gap is larger at lower sum rate values, e.g., a loss of $37.4\%$ and $32.7\%$ at $R_\mathrm{sum}= 43$ regarding the KLD with histogram and kNN, respectively. Furthermore, MSE based technique shows a huge improvement from $R_\mathrm{sum} = 44 $ to 45 bits. The reason lies behind the range from which input features take their values, and the fact that MSE is calculated independent of MLC output. In this setup, $v$ and $q$ values are picked from intervals which are almost $9$ and $21$ times bigger than those of $\theta$ and $r$. Therefore at the beginning, the syntax based MSE allocates more bits for $q$ and $v$, although high accuracy on these less relevant RVs doesn't improve the force decision. The first significant enhancement only occurs when $\sigma^2_5$ and $\sigma^2_6$ are small enough, so, extra bits are used for $\theta$. Thus, a change from 4 to 5 in number of bits for $\theta$ when $R_\mathrm{sum} = 44$ becomes 45 bits leads to a decrease of $\approx35.7\%$ in probability of error. The second decrease is also a consequence of allocating 5 bits instead of 4 bits for $r$ when moving from $R_\mathrm{sum} = 46$ to 47. Equal sharing outperforms the MSE results given that $R_\mathrm{sum} \leq 46$, e.g., $P_\mathrm{e}$ $\approx 42.5\%$ instead of $\approx 43.5\%$ for 43 bits. As stated before, the rate allocation provided by this method remains the same, unless sum rate is divisible by 4 which explains improvements at 44 and 48 bits. This method provides better results than KLD with kNN for the constraint of 44 which can be interpreted as a lucky situation for this approach. With 44 bits, equal sharing allocates 6 bits for each of $r, \theta, v$ and $q$. This indicates less quantization noise for more relevant RVs $\theta$ and $r$ which only happens because of their smaller intervals in this specific pendulum scenario. On the other hand, KLD with kNN is not capable of following distributions accurately and settles for a worse bit allocation with $\approx 3\%$ more failures than that of equal sharing. As expected, changing histogram estimator to kNN degrades the performance since kNN is not capable of providing a highly accurate estimation of KLD, particularly for the system under investigation with highly correlated variables. However, it still offers less number of errors compared with the MSE approach for $R_\mathrm{sum} \leq 46$. For the constraint with 42 bits, it achieves a gain of $27\%$ and $25.8\%$ in comparison to MSE and equal bit sharing methods but the selected rate allocation causes $\approx 6.5\%$ higher error probability with respect to the KLD with histogram estimator. KLD with kNN also provides a better or equivalent performance regarding equal sharing for most points, except for $R_\mathrm{sum} = 44$ which was discussed. As shown by the numerical results, using the relevance based KLD approach with histogram is more beneficial in terms of fulfilling the requirements imposed by ML functionalities in a bandwidth limited system. In operation points with high probability of stability, the quantization noise on angle and position are much smaller than other features which indicates they have a higher level of relevance for the MLU. This knowledge can be used in case of having limited resources for providing a best-effort performance. \vspace{-.45cm} \section{Conclusion} \label{conclusion} \vspace{-.1cm} Since intelligent elements governed by ML become an integrated part of communications networks, we introduced a KLD based rate allocation for quantization of multiple correlated sources delivering input of a MLU. Simulation results show that the proposed method provides promising gains in system performance of a cart inverted pendulum problem, particularly for more restricted bandwidth constraints. It should be noted that the final outcome is use-case dependent and more importantly, it highly relies on KLD estimation accuracy. These observations motivate the shift from syntax to relevance based designs which operate in accordance with MLU requirements considering rate and resource limitations. Some potential problems to be addressed in future are to introduce low complexity methods for dealing with instantaneous fluctuations in channel quality, and studying of iterative algorithms to improve the overall system performance by targeting the combination of codebook design, assignment and bit allocation. \vspace{-.45cm} \bibliographystyle{IEEEtran}
\section{Introduction} \label{sec:intro} In many real-world optimization challenges, we encounter optimization problems which are too complex to be explicitly modeled via mathematical functions, but which nonetheless need to be assessed and solved, more often than not requiring significant computational resources to do so. Explicit problem modeling is also an issue when the relationship between decision variables and solution quality cannot be established other than by simulations or experiments. A standard example for the latter is the design of (deep) neural networks. \emph{Black-box optimization algorithms (BBOA)} are algorithms designed to solve problems of the two types above. BBOA are usually iterative procedures, which actively steer the search by using information obtained from previous iterations, with the goal to eventually converge towards an estimated optimal solution. In each generation, a number of solutions candidates are generated and undergo evaluation. Classically, BBOA were manually designed, based on users' experience. A plethora of algorithmic components exist from which users can choose to build their own algorithms, and the number of these components is growing every year. Even though the basic underlying principles of these components can be considered similar in nature, their performances on different problem instances can greatly vary. An important and challenging task is thus to select the most appropriate and efficient algorithm when presented with a new, unknown problem instance. This research problem, formalized as the \emph{algorithm selection problem (ASP)}~\cite{RiceASproblem}, is one of \emph{the} core questions that evolutionary computation aims to answer. The algorithm selection problem is classically tackled by relying on expert knowledge of both the problem instance and the algorithm's strengths and weaknesses. In recent years, however, due to the significant progress in the machine learning (ML) field, there has been a shift towards an \emph{automated} selection~\cite{KerschkeKBHT18,KerschkeT19,MunozASSurvey,JD20} and configuration~\cite{BelkhirDSS17} of algorithms based on supervised learning approaches. The idea behind these approaches is in utilizing ML techniques to design and to train models to accurately predict the performance of different black-box algorithms on previously unseen problem instances, with the goal to use these performance predictions to select and to configure the best algorithm for the problem at hand, respectively. In order to apply supervised learning, problem instances need to be represented in a convenient way via numerical values. That is, we need to quantify relevant characteristics of a problem instance through appropriate measures. These measures are referred to as \emph{features}. In the terminology used in evolutionary computation (EC), features are hence aimed at describing the \emph{fitness landscape} of a problem instance. Fitness landscape analysis has a long tradition in EC. For practical use in black-box optimization, however, the fitness landscape properties can only be described via an informed guessing strategy. Concretely, we can only approximate the fitness landscapes, through the samples that we have evaluated and to which a solution quality has been assigned. Research addressing efficient ways to characterize problem instances via feature approximations is subsumed under the umbrella term \emph{exploratory landscape analysis (ELA)}~\cite{mersmann_exploratory_2011}. Common research questions in ELA concern the number of samples needed to accurately approximate feature values, the design and the selection of features that are descriptive and easy to approximate, and the possibility to use feature values to transfer learned policies from some instances to previously unseen ones. A drawback of existing ELA-approaches are the resources needed to extract and to compute the feature values, the time required to train the models, and a lack of explainability. In this work, we focus on the first issues, the feature extraction. Most ELA-based studies perform a three-step selection/configuration: in the first step a number of search points are sampled (commonly using uniform sampling, Latin Hypercube Designs, or quasi-random sampling~\cite{RenauDDD20}), evaluated, and then plugged into a feature computation algorithm such as the R tool \emph{flacco}~\cite{flacco}. In the second step the model for the classification or regression task is built and an algorithm and/or its configuration is suggested. In the third step, this algorithm is then run on the problem instance under consideration. Clearly, the effort for steps 1 and 2 cannot be neglected, and can have a decisive influence on the usefulness of a per-instance algorithm selection/configuration approach, as its effort needs to pay off compared to the performance of a default solver. Even when neglecting the computational overhead of this approach and focusing on function evaluations only as performance measure (as is commonly done in evolutionary computation~\cite{cocoplat}), the evaluations needed for completing step 1 need to be taken into account. Much research has been done on determining a suitable number of samples, and typical recommendations vary between $30d$~\cite{BelkhirDSS16} and $50d$ samples~\cite{kerschke_low-budget_2016}, where $d$ denotes the dimension of the problem. This is hence a considerable investment. Of course, one could use these samples to \emph{warm-start} the optimization heuristics, e.g., by initiating them in good regions and/or by calibrating their search behavior based on the information obtained from the samples used to compute the features. A charming, yet straightforward alternative would be to integrate the first step of the ELA-based approach described above into the optimization routine, by computing the features based on the search points that a default algorithm would anyway perform. That is, one would use the search trajectory of such a default algorithm to predict and then to select and/or to configure a solver \emph{on the fly}, once or even several times during the optimization process. Similar to parameter control~\cite{KarafotiasHE15,AletiM16,DoerrD20paramControlchapter}, such a dynamic selection would not only allow to \emph{identify} an efficient algorithm for the given problem instance, but could also benefit from \emph{tracking} the best choice while the optimization process (and the best response to its needs) evolves. Such a dynamic algorithm selection can therefore be seen as an ELA-based variant of hyper-heuristics~\cite{BurkeGHKOOQ13hyperheuristicssurvey}. The approach has previously been used in the context of constrained optimization, with the goal to have a dynamic, ELA-guided selection of a suitable constraint handling technique; see~\cite{Malan18DEconstraints} for examples and further references. A key challenge in applying dynamic ELA-based algorithm selection is the fact that the feature values can vary drastically between different sampling strategies~\cite{RenauDDD20}. Since the distribution of points sampled on different problem instances can differ quite drastically even when using the same algorithm, it is not clear, a priori, if or how suitable ML models can be trained. This challenge was confirmed in~\cite{JD19}, where it was shown that the landscape which an algorithm sees locally during the optimization process (i.e., the partial landscape it is aware of at each step of the optimization process) usually differs a lot from the global fitness landscape of the problem it is solving. \paragraph{Our Results.} With the long-term goal to obtain well-performing dynamic ELA-based algorithm selection and configuration techniques, we analyze in this work a first, rather cautious task: ELA-based performance prediction using the trajectory samples of the algorithm under investigation. More precisely, we consider the Covariance Matrix Adaptation Evolution Strategy (CMA-ES~\cite{HansenO01CMAES}), and we aim at predicting its solution quality (measured as target precision, i.e., the difference to an optimal solution in quality space) after a fixed budget of function evaluations. Concretely, we use the first 250 samples evaluated by the CMA-ES and we aim at predicting its performance after additional 250 evaluations, doing so for 20 independent CMA-ES runs. The performance regression is done via a random forest model which takes as input the features computed from the trajectory data and which outputs an estimate for the final solution quality. We then take into account that problem characteristics cannot only be described via classic ELA features, but that internal states of the search heuristics can also be used to derive information about the problem instance at hand. Such approaches have in the past been used, for example, for local surrogate-modelling~\cite{Holena}. We analyze the accuracy gains when using the same state information as in~\cite{Holena}, that is, the values of the CMA-ES internal variables that mainly carry information about the current probability distribution from which the CMA-ES samples candidates for the new generation. In our experiments, the advantage of using this state information over using ELA-features only, however, is only marginal. Concretely, the average difference between true and predicted solution quality decreases from 14.4 to 12.1 when adding the state variables as features (where the average error reported here is taken over all 24 benchmark problems from the BBOB suite of the COCO platform~\cite{cocoplat}, and over all performed CMA-ES runs). We observe in the experiments above that some CMA-ES runs are drastic outliers in terms of performance, at times with the target precision differing from the target precision of all the other runs by up to 10 orders of magnitude. We therefore also consider an intentionally more ``friendly'' setting, in which we analyze the regression quality only for the run achieving median performance on a given problem instance. Conclusions for combining trajectory-based and state variable features remain almost identical to those stated above. We then compare these median trajectory-based predictions to the classical approach using globally sampled features. Here, we pessimistically assume that the samples were computed for free. That is, we couple 2 separate sets of the global feature values approximated from 250 and 2000 uniformly sampled points each to the target precision achieved by the CMA-ES after 500 function evaluations. Interestingly, the difference in prediction accuracy compared to our trajectory-based predictions is rather small. The global predictions still remain, however, more accurate, with an average absolute prediction error of 4.7 vs. 6.2 for the trajectory approach (where again the average is taken over all 24 BBOB functions). Furthermore, we also use this median setting to analyze the influence of feature selection on prediction accuracy. Different state-of-the-art methods were applied, using a transfer learning scenario, to select features estimated to be the most important and to have highest discriminative power. Here again, the differences in prediction accuracy were small, with feature selection surprisingly leading to an overall slightly worsened solution quality than the full feature portfolio. As suggested in~\cite{JD20}, all our experiments are based on two independently trained models: one which aims to predict target precision after 500 evaluations, and one which predicts the logarithm of this target precision. While the former is better in guessing the broader ``ball park'', the latter is more suitable for fine-grained performance prediction, i.e., when the expected performance of the algorithm is very good. As in~\cite{JD20}, we also build a combined regression, which uses either one of the two models, depending on whether the predicted performance is better or worse than a certain threshold. The optimal thresholds differ quite drastically between different feature sets. However, a sensitivity analysis reveals that their influence on overall performance is rather small. Also, the ranking of the different feature portfolios remains almost unaffected by the choice of the threshold. In line with the results in~\cite{JD20}, the combined models perform consistently better than any of the two standalone ones, albeit slightly. \section{Supervised ML for Performance Regression} \label{sec:supervisedml} \textbf{The Experimental Setup.} When it comes to landscape-aware performance prediction, supervised machine learning techniques such as regression and classification have been studied in a variety of settings. Regression models, unlike classification ones, have an advantage of keeping track of the magnitude of differences between performances of different algorithms, as they measure concrete values for performances of all algorithms from the portfolio. Among different supervised learning regressors in the literature, such as support vector machines, Gaussian processes or ridge regression to name a few, it has been empirically shown that random forests outperform other models in terms of prediction accuracy~\cite{HutterXHL14}. A random forest is an ensemble-based meta-estimator that works by fitting multiple decision trees on subsamples of the original data set, then uses averaging as a way to control overfitting. In our experimental setup, we used an off-the-shelf random forest regressor from the Python \emph{scikit-learn} package~\cite{scikit-learn}, without parameter tuning and using 1000 estimators. We restricted this work to a single heuristic, the Covariance Matrix Adaptation Evolution Strategy (CMA-ES~\cite{HansenO01CMAES}). The CMA-ES works by iteratively sampling a new population of candidate solutions from a shifted multivariate normal distribution, choosing the best offspring of the current population based on their respective fitness values, and then updating the parameters of the probability distribution according to the best candidates. For the purpose of our work, we used its standard version, available in the Python \emph{pycma} package~\cite{pycmaes}, which uses a fixed population size and no restarts during the optimization process. As our benchmark, we used the first five instances of all 24 noiseless \emph{BBOB} functions of the \emph{COCO} platform~\cite{cocoplat}, an environment for comparison of algorithm performance in continuous black-box optimization. The different instances of each function are generated by translating and rotating the function in the objective space. These transformations do not affect the performance of CMA-ES, but they do influence some of the feature values, especially those which are not transformation-invariant~\cite{TomeinvarianceASoC} (for the invariant features, the boundary handling can have an effect on the feature values). We focus on dimension $d=5$ here. For our first experiments, we perform 20 independent runs of the CMA-ES on these 120 problem instances, while keeping track of the search trajectories and the internal state variables of the algorithm itself. Throughout this work, we fix the budget of 500 function evaluations, after which we stop the optimization and record the target precision of the best found solution within the budget. In order to predict those recorded target precisions after 500 function evaluations, we compute the trajectory-based landscape features using the first 250 sampled points and their evaluations from the beginning of each trajectory, and couple them with the values of the internal CMA-ES state variables extracted at the $250^{th}$ function evaluation. \begin{figure*}[t] \includegraphics[width=\textwidth]{geom_point_trajectory_true_target_precisions_logscale.pdf} \caption{Target precision achieved by the CMA-ES with a budget of 500 function evaluations, for each of the first five instances of all 24 BBOB functions. Differently colored and shaped points represent 20 independent CMA-ES runs.} \label{fig:true_tp_20_runs} \end{figure*} Figure~\ref{fig:true_tp_20_runs} summarizes the target precision achieved by CMA-ES in each of the 20 runs. We see that the results are more or less homogeneous across different runs and across different instances of the same problem. However, we also observe several outliers, e.g., for functions 7 (outlier for all instances), function 10 (instance 4), function 12 (instance 1). It is important to keep in mind that the randomness of these performances are entirely caused by the randomness of the algorithm itself -- the problem instance does not change between different runs. For landscape feature computation, we use the R package \emph{flacco}~\cite{flacco}. Following suggestions made in~\cite{KerschkeT19,BelkhirDSS17} we restrict ourselves to those feature sets that do not require additional function evaluations for computing the features. Namely, in this work we use 2 original ELA feature sets (\emph{y-Distribution} and \emph{Meta-Model}), as well as \emph{Dispersion}, \emph{Nearest-Better Clustering} and \emph{Information Content} feature sets. This gives us a total of 38 landscape features per problem instance. In addition, we follow up on an idea previously used in~\cite{Holena} and consider a set of internal CMA-ES state variables as features: \begin{itemize} \item Step-size: its value indicates how large is the approximated region from which the CMA-ES samples new candidate solutions. \item Mahalanobis mean distance: represents the measure of suitability of the current sampled population for model training from the point of view of the current state of the CMA-ES algorithm. \item $C$ evolution path length: indicates the similarity of landscapes among previous generations. \item $\sigma$ evolution path ratio: provides information about the changes in the probability distribution used to sample new candidates. \item CMA similarity likelihood: it is a log-likelihood of the set of candidate solutions with respect to the CMA-ES distribution and may also represent a measure of the set suitability for training. \end{itemize} As suggested in~\cite{JD20}, and using the elements described above, we establish two separate regression approaches. One model is trained to predict the actual, true value of the target precision data (we refer to it as the \emph{unscaled model} in the remainder of the paper), while the other predicts the logarithm of the target precision data (the \emph{log-model}). It is important to note that the target precision measure intuitively carries the information about the order of magnitude of the actual distance to the optimum, i.e., the \emph{distance level} to the optimum, which is effectively computed as the log-target precision. For instance, if an algorithm reaches a target precision of $10^{-3}$ for one problem instance and $10^{-7}$ for another, it means that the algorithm found a solution which is 4 distance levels closer to the optimum in the latter scenario. Moreover, to reduce variability, we estimate both models' prediction accuracy through performing a 5-fold \emph{leave-one-instance-out} cross-validation, making sure to train on 4 out of 5 instances per BBOB function, test on the remaining instance and combine the results over the rounds. \textbf{Results.} Adopting our two regression models, we trained them separately in the following three scenarios: using as predictor variables the landscape features only, using the internal CMA-ES state variables only, and using the combination of the two. We trained the random forests 3 independent times and took a median of the 3 runs to ensure the robustness of the results. \begin{figure*}[t] \centering \includegraphics[trim= 1cm 12.5cm 6cm 1cm, clip, width=0.6\textwidth]{rf_format_all_models.pdf} \caption{Absolute prediction errors for both regression models aggregated per BBOB function in 3 different scenarios depending on the feature set used. The \emph{SV} column stands for the CMA-ES state variables, the \emph{ELA} for the landscape features, and the third one is the combination of both.} \label{fig:traj_pred} \end{figure*} Figure~\ref{fig:traj_pred} highlights the absolute prediction errors per BBOB function using two regression models, the unscaled and the log- one, when trained with 3 different feature sets: using only the trajectory landscape data, only the CMA-ES state variable data, and the combination of the two. For the majority of the functions, using the combination of the trajectory data and the state variable data seems to help in improving the performance prediction accuracy, compared to the scenarios which use only one of those two feature sets. We also confirm that the log-model is indeed better at predicted fine-grained target precision (e.g., in the case of F1 (sphere function) or F6 (linear slope function), we know that those functions do not require many function evaluations to converge to the global optimum, and their recorded target precision values are already quite small as they are very near the optimal solution). On the other hand, the unscaled model performs better where the target precision values are higher (e.g., for the functions such as F3, F15 (two versions of Rastrigin function), and also F24 (Lunacek bi-Rastigin), which are all highly multimodal, the number of function evaluations in our budget was not nearly enough to allow for finding a true optimum). We also notice that using only the state variables for the unscaled model does not suffice for an accurate prediction in the most cases. The reverse situation is nevertheless also possible: we see that for F12, using only the state variables yields the best accuracy in the unscaled model. Furthermore, there are also exceptions where using only the landscape data results in a higher accuracy than using the combined features (e.g., F11 for both models, F5 for the unscaled model). \section{Comparison with Global Feature Values} \label{sec:compglobal} We then proceeded to compare the differences in the prediction accuracy from the sets described in the Section~\ref{sec:supervisedml} with the prediction accuracy using the global feature data, both alone and combined with the same CMA-ES state variable data as above. To be able to perform a fair comparison, for the trajectory data we selected from the 20 executed CMA-ES runs those runs with the median target precision value per problem instance and their corresponding features and re-trained the unscaled and the log-model. Global features-wise, both models were also trained using features computed from 2000 and 250 globally uniformly sampled points (the median value of 50 independent feature computations) for each function and instance. \begin{figure*}[t] \centering \includegraphics[trim= 1.5cm 5cm 2cm 1cm, clip, width=\textwidth]{rf_median_runs_format_all_models.pdf} \caption{Absolute prediction errors for both regression models for the median trajectory-based prediction (the first 3 columns of each block) and the median global feature prediction (the middle two columns of each block represent the errors when using the 2000-sample features, and the last two columns correspond to using the 250-sample features).} \label{fig:glob_pred} \end{figure*} Figure~\ref{fig:glob_pred} shows the absolute errors in prediction when the trajectory-based approach is compared with the results using the global features. The highest accuracy is reported in cases when only the global landscape features were used, across almost all problems, with 2000-sample features yielding the best results. Here, we do not observe a huge improvement when combining the global landscape features with the state variable data. It seems that the number of samples used to compute the features can be crucial in reducing the errors in prediction, as global sampling could be linked to a potential higher discriminative power of features thus computed. Again, for certain functions such as F2 and F10 (both of which are different variants of the ellipsoidal function), we observe an overall low accuracy. \section{Sensitivity Analyses} \label{sec:sensitivity} \textbf{Feature Selection.} To provide a sensitivity analysis based on the features used for the performance regression, we performed feature selection in the scenario of transfer learning, i.e., between different supervised tasks, where the features selected for the problem classification task have been evaluated on the performance regression task. To do this, we have explored four state-of-the-art feature selection techniques: \textit{Boruta}~\cite{kursa2010boruta} is a feature selection and ranking algorithm based on random forests algorithm, which only selects features that are statistically significant. \textit{Recursive feature elimination (rfe)}~\cite{granitto2006recursive} learns a model assessing different sets of features by recursively eliminating features per loop until a good model is learnt. It requires an ML algorithm for evaluation, and here we use a random forest. \textit{Stepwise forward and backward selection (swfb)}~\cite{derksen1992backward} tries to fit the best regression model by iteratively selecting and removing features. In our experiments, we used it in both directions simultaneously. \textit{Correlation analysis with different threshold values (cor)}~\cite{benesty2009pearson} is based on the correlation analysis done only using the features (i.e., excluding the target). The result is a feature set where highly correlated features are omitted. In our case, we tested three different correlation thresholds: 0.50, 0.75, and 0.90. Note that while the first three feature selection methods require a supervised ML task, the last one is completely unsupervised and does not depend on the target. Our experimental design has been done using stratified 5-fold cross-validation. For a fair feature selection, we used the aforementioned methods on each training fold separately, then selected the intersection of the features returned by each training fold in the end. These features are further evaluated in the performance regression task. \begin{table*}[t] \centering {\scriptsize{ \begin{tabular}{@{}lccccccc@{}} \toprule & boruta & swfb & rfe & cor0.5 & cor0.75 & cor0.9 \\ \midrule \# selected ELA features & 37 & 1 & 7 & 4 & 9 & 15 \\ \midrule \# selected state variable features & 2 & 0 & 0 & 3 & 3 & 5 \\ \bottomrule \end{tabular} }} \caption{Number of ELA and state variable features for each selected feature portfolio. Details are available in Table~\ref{tab:selectedfeaturesdetails}.} \label{tab:selectedfeatures} \end{table*} Table~\ref{tab:selectedfeatures} summarizes how many features were selected per portfolio, from the whole set of 38 ELA landscape features and 5 CMA-ES state variable features. \begin{table*}[t] \centering \resizebox{\textwidth}{!}{ \begin{tabular}{@{}c|cc|ccc:cccc:cccccc@{}} \toprule & & & \textbf{SV} & \textbf{ELA} & \textbf{ELA} & \textbf{GLOB2k} & \textbf{GLOB2k} & \textbf{GLOB250} & \textbf{GLOB250} & \textbf{boruta} & \textbf{cor} & \textbf{cor} & \textbf{cor} & \textbf{rfe} & \textbf{swfb} \\ & & & & & \textbf{+SV} & & \textbf{+SV} & & \textbf{+SV} & & \textbf{0.5} & \textbf{0.75} & \textbf{0.9} & & \\ \midrule &&& \multicolumn{13}{c}{\textbf{Best threshold $\tau$}} \\ \textbf{FID} & \textbf{min\_tp } & \textbf{ max\_tp} & \textbf{1.336} & \textbf{3.99} & \textbf{4.742} & \textbf{14.497} & \textbf{9.46} & \textbf{0.694} & \textbf{2.605} & \textbf{3.63} & \textbf{1.813} & \textbf{4.901} & \textbf{1.717} & \textbf{7.388} & \textbf{20} \\ \midrule 1 & 0 & 0 & 0.43 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0.21 \\ 2 & 9.25 & 87.47 & 44.69 & 25.47 & 24.46 & 24.49 & 23.65 & 28.96 & 27.98 & 25.16 & 36.78 & 35.28 & 34.62 & 24.51 & 53.85 \\ 3 & 10.34 & 14.63 & 9.73 & 6.62 & 7.02 & 5.62 & 6.25 & 4.43 & 9.39 & 6.73 & 8.08 & 7.7 & 5.63 & 7.95 & 8.82 \\ 4 & 10.29 & 14.53 & 11.86 & 5.08 & 5.08 & 4.81 & 5.73 & 5.1 & 7.49 & 5.18 & 9.26 & 6.71 & 5.59 & 7.53 & 8.41 \\ 5 & 8.53 & 11.34 & 4.59 & 8.24 & 8.15 & 6.02 & 5.52 & 1.48 & 1.06 & 8.21 & 2.36 & 6.76 & 4.91 & 4.52 & 7.74 \\ 6 & 0.04 & 0.11 & 0.78 & 3.87 & 2.15 & 0.24 & 0.27 & 0.33 & 0.37 & 4.46 & 1.02 & 1.19 & 1.65 & 0.89 & 1.43 \\ 7 & 0.13 & 1.83 & 3.84 & 0.36 & 0.39 & 4.49 & 4.07 & 4.62 & 1.13 & 0.42 & 0.86 & 0.6 & 0.65 & 0.67 & 7.94 \\ 8 & 1.22 & 2.59 & 3.02 & 1.06 & 1.1 & 1.25 & 1.22 & 2.03 & 0.84 & 0.95 & 2.02 & 0.93 & 1.04 & 1.42 & 4.88 \\ 9 & 0.68 & 1.36 & 3.05 & 0.34 & 0.34 & 0.59 & 0.53 & 0.77 & 0.48 & 0.33 & 0.52 & 0.26 & 0.29 & 0.86 & 3.47 \\ 10 & 8.44 & 84.69 & 43.33 & 32.06 & 32.85 & 21.39 & 23.16 & 29.29 & 33.35 & 32.13 & 42.18 & 32.73 & 35.01 & 29.64 & 47.68 \\ 11 & 4.97 & 8.83 & 17.48 & 10.37 & 12.63 & 3.46 & 2.99 & 8.26 & 10.18 & 11.17 & 25.11 & 21.61 & 20.86 & 2.43 & 4.77 \\ 12 & 2.53 & 6.32 & 4.76 & 19.34 & 15.89 & 4.03 & 4.16 & 5.76 & 4.13 & 19.45 & 4.38 & 2.31 & 9.69 & 19.32 & 3.56 \\ 13 & 1.09 & 5.92 & 13.62 & 2.07 & 2.13 & 2.29 & 2.32 & 3.51 & 2.21 & 2.11 & 2.45 & 2.04 & 5.37 & 2.03 & 3.5 \\ 14 & 0 & 0 & 1.65 & 0.01 & 0.01 & 0.07 & 0.08 & 1.89 & 0.37 & 0.01 & 0.61 & 0 & 0 & 0 & 5.18 \\ 15 & 8.49 & 12.93 & 7.44 & 6.79 & 6.66 & 6.08 & 6.81 & 6.24 & 8.12 & 5.77 & 7.07 & 6.11 & 5.88 & 6.73 & 9.12 \\ 16 & 0.18 & 0.83 & 0.87 & 6.31 & 5.85 & 0.32 & 0.35 & 0.25 & 0.25 & 6.45 & 0.48 & 4.42 & 4.77 & 2.43 & 1.21 \\ 17 & 0.03 & 0.64 & 2.63 & 0.36 & 0.33 & 0.32 & 0.33 & 0.28 & 0.31 & 0.38 & 4.25 & 0.41 & 0.38 & 0.27 & 2.75 \\ 18 & 0.16 & 0.69 & 1.54 & 0.34 & 0.34 & 0.33 & 0.3 & 4.96 & 0.45 & 0.34 & 0.54 & 0.28 & 0.3 & 0.54 & 1.24 \\ 19 & 0.75 & 1.19 & 18.75 & 0.34 & 0.36 & 0.65 & 0.67 & 1.66 & 0.49 & 0.38 & 9.95 & 0.59 & 0.5 & 0.46 & 8.54 \\ 20 & 1.7 & 1.79 & 3.77 & 0.76 & 0.84 & 0.99 & 1.17 & 0.99 & 0.93 & 0.69 & 3.2 & 1.22 & 3.16 & 1.77 & 5.16 \\ 21 & 0 & 8.12 & 4.86 & 4.55 & 4.52 & 5.02 & 5.02 & 5.2 & 4.95 & 4.53 & 4.72 & 4.84 & 4.83 & 4.83 & 3.72 \\ 22 & 0 & 25.48 & 12.04 & 11.91 & 11.91 & 11.9 & 11.91 & 12.88 & 11.94 & 11.91 & 11.89 & 11.93 & 11.7 & 11.92 & 5.34 \\ 23 & 1.99 & 2.35 & 7.49 & 3.67 & 3.61 & 0.69 & 0.77 & 0.64 & 0.91 & 3.72 & 7.89 & 2.73 & 4.53 & 2.46 & 3.04 \\ 24 & 15.73 & 20.73 & 10.06 & 4.76 & 4.94 & 5.15 & 6.52 & 2.95 & 4.29 & 4.81 & 11.13 & 9.49 & 7.22 & 7.43 & 11.65 \\ \midrule \textbf{Overall RMSE, combined} & & & \textbf{15.05} & \textbf{10.41} & \textbf{10.25} & \textbf{7.74} & \textbf{7.92} & \textbf{9.48} & \textbf{10.05} & \textbf{10.43} & \textbf{13.66} & \textbf{11.67} & \textbf{11.86} & \textbf{9.77} & \textbf{15.73} \\ Overall RMSE, unscaled & & & 15.08 & 11.18 & 10.88 & 9.21 & 9.30 & 9.58 & 10.19 & 11.16 & 14.11 & 11.80 & 12.00 & 10.93 & 17.03 \\ Overall RMSE, log & & & 15.63 & 13.05 & 13.21 & 11.46 & 11.88 & 12.05 & 12.87 & 13.14 & 14.65 & 13.89 & 14.29 & 12.61 & 15.73 \\\bottomrule \end{tabular}} \caption{RMSE values of the combined selector in three scenarios: when the prediction is based on the search trajectory landscape features and state variables (first 3 columns), on global features (next 4 columns), and finally on selected feature portfolios (last 6 columns).} \label{tab:RMSEpermodel} \end{table*} \textbf{Combined Selector Model and Sensitivity Analysis.} As common in ML, we measure the regression accuracy in terms of \emph{Root Mean Squared Error} (RMSE). Table~\ref{tab:RMSEpermodel} summarizes the RMSE values for the different feature portfolios when using (1) the unscaled model, (2) the scaled model, and (3) a combination of unscaled and the log-model (see last three rows of Table~\ref{tab:RMSEpermodel}). The threshold $\tau$ at which the predictive model changes is optimized for each feature portfolio individually, the obtained thresholds are summarized at the top of Table~\ref{tab:RMSEpermodel}. That is, we select the prediction of the log-model when the predicted precision (according to the log-model) is smaller than the threshold value $\tau$, and we use the prediction of the unscaled model otherwise. Note that the optimal threshold value $\tau$ varies significantly between the different feature portfolios. When comparing all the different portfolios (initial trajectory-based, global and selected trajectory-based ones), the good performance of the global feature sets is not surprising. Differences from the initial trajectory-based predictions are marginal for sets such as \emph{boruta}, \emph{cor0.75} and \emph{cor0.9}, whereas \emph{swbf} and \emph{cor0.5} perform constantly worse than \emph{ELA+SV}. Using the \emph{rfe} set, on the other hand, led to better results than using the original feature set. \emph{SV} alone does not achieve good accuracy, but its contribution to ELA-only feature portfolio is around 3\% at the best threshold for the combined model, which is $\tau=4.901$. The absolute errors per instance are plotted in Figure~\ref{fig:abs_error_details}. \begin{figure}[t] \centering \includegraphics[trim= 3cm 4cm 8cm 3cm, clip, width=\textwidth]{Carols-Boxplots-CombinedModel-perInstance-BestThreshold.pdf} \caption{Absolute prediction errors of the combined models using portfolio-specific optimal thresholds $\tau$.} \label{fig:abs_error_details} \end{figure} \section{Conclusions and Future Work} \label{sec:conclusions} We analyzed in this paper the accuracy of predicting the CMA-ES solution quality after given budget based on the features computed from the samples on the CMA-ES search trajectory using two complementary regression models, the unscaled and the log-model. Adding information obtained from the CMA-ES internal state variables does not improve the prediction accuracy drastically compared to the trajectory-based data only. Those results were then contrasted to the regression using the global features, where using the latter ones, especially those computed using a higher number of samples, yielded a consistently better accuracy. Next, we tested whether we would achieve further gains in accuracy through feature selection. Although the overall results are comparable to the ones from initial trajectory-based portfolios, several selected feature sets resulted in worse accuracy than in the initial approach. We ultimately pointed out the advantages of using our combined selector model over relying separately on predictions of the standalone unscaled or log-model across all different feature portfolios in all 3 scenarios. In terms of \textbf{future work,} we plan on continuing this research by considering the following questions and tasks: \\ (0) Performance prediction of \textbf{other solvers}: How accurately can we use trajectory-based features of one algorithm to predict the performance of another algorithm? In this work, we have only tried to predict performance for the same algorithm from whose trajectory the feature values have been computed. A next step would be to test if models for configuring the same algorithm can be trained. When this is successful, transfer learning from one algorithm to another one can be considered. \\ (1) How can we more efficiently capture the \textbf{temporal component}, i.e., the information which sample was evaluated \emph{when} during the search? Using such longitudinal data, both in terms of extracted feature values and in terms of state variable evolution could possibly be done using recurrent neural networks~\cite{zhao2019learning}.\\ (2) \textbf{Combining global and trajectory-based sampling:} In our work, we only considered the case in which \emph{either} global sampling \emph{or} trajectory-based sampling is used. The accuracy of the models based on global sampling was better than that of the trajectory-based features. Even if we keep in mind that this comparison was unfair in that we provided the global feature values ``for free'', the results nevertheless suggest that a combination of global and trajectory-based feature computations could be worthwhile to investigate. How we can optimally balance the budget between global sampling, trajectory-based sampling, and remaining optimization budget is a challenging question in this context. \\ (3) \textbf{Warm-starting} the CMA-ES such that it starts the optimization process with the covariance matrix and other parameters that are extrapolated from the (uniformly or otherwise) distributed global samples might significantly improve the overall accuracy, as the CMA-ES will have a better overview of the whole problem instance "from the get-go". A similar approach has been suggested in~\cite{MohammadiRT15BOCMAES} when switching from a Bayesian optimization algorithm to CMA-ES. \\ (4) \textbf{Feature selection and ranking:} Instead of using transfer learning for feature selection between two different supervised ML tasks, feature selection within the same supervised task has not been considered in this paper. We also plan on making better use of variable importance estimations provided by feature ranking algorithms such as those based on ensemble of predictive clustering trees~\cite{petkovic2020feature} and those based on ReliefF and RReliefF~\cite{robnik2003theoretical}. \\ (5) \textbf{Feature design:} The work~\cite{DerbelLVAT19} suggests several algorithm-specific features for the SOO tree algorithm~\cite{munos2011SOOtree}. Such specific features can much more explicitly capture the characteristics of the algorithm-problem instance interaction. It could be worthwhile to study whether, possibly in addition to the longitudinal data mentioned in (1), such specific features can be identified for other common solvers, such as the CMA-ES. \\ (6) \textbf{Feature portfolio:} We note that our work above is based on the features available in the \emph{flacco} package~\cite{flacco}. Since the design of \emph{flacco}, however, several new feature sets have been suggested. Another straightforward way to extend our analyses would be in the inclusion of these feature sets, with the hope to improve the overall regression accuracy. In this respect, we find in particular the Search Trajectory Networks suggested in~\cite{OchoaM020continupusLON} worth investigating. \\ (7) \textbf{Representation learning of landscapes:} The feature data will be additionally explored by applying representation learning methods that automatically learn new data representations by reducing the dimension of the data, automatically detecting correlations, and removing bias and redundancies presented in the feature data. The work presented in~\cite{eftimov2020linear} showed that linear matrix factorization representations of the ELA features values significantly detects better correlation between different problem instances.\\ (8) \textbf{Hyperparameter tuning of regression models: } Last, but not least, we are planning to explore algorithm portfolio that consists of different regression methods in order to find the most suitable one, together with finding its best hyperparameters for achieving better performance. In this study, we have used random forest for regression without tuning its parameters, since we have been interested in the contribution of different feature portfolios. \vspace{1ex} \textbf{Acknowledgments.} This research benefited from the support of the Paris Ile-de-France region and of a public grant as part of the Investissement d'avenir project, reference ANR-11-LABX-0056-LMH, LabEx LMH. This work was also supported by projects from the Slovenian Research Agency: research core funding No. P2-0098 and project No. Z2-1867. We also acknowledge support by COST Action CA15140 ``Improving Applicability of Nature-Inspired Optimisation by Joining Theory and Practice (ImAppNIO)''. \newcommand{\etalchar}[1]{$^{#1}$} \providecommand{\bysame}{\leavevmode\hbox to3em{\hrulefill}\thinspace} \providecommand{\MR}{\relax\ifhmode\unskip\space\fi MR } \providecommand{\MRhref}[2]{% \href{http://www.ams.org/mathscinet-getitem?mr=#1}{#2} } \providecommand{\href}[2]{#2}
\section{Introduction} \begin{figure*}[t] \center\includegraphics[width=0.99\textwidth]{Figure1.pdf} \caption{(a) Schematic of the orthorhombic NdNiO$_3$ unit cell, with the (101) and (011) crystallographic planes highlighted in red and blue, respectively. Additionally, one NiO$_6$ octahedron is shown in gray. Note that NdGaO$_3$ exhibits a similar unit cell (not shown here) with slightly different lattice parameters (see Methods). (b), (c) Projections of the NdNiO$_3$ crystal structure along the [101] and [011] direction, respectively. The unit cell from panel (a) is indicated by black lines, and the (101) and (011) crystallographic planes by red and blue lines, respectively. The orange lines indicate characteristic \textit{straight} and \textit{zig-zag} patterns of the Ni and Nd cation positions in the two projections. These patterns can be identified in STEM-HAADF images.} \label{structure} \end{figure*} The strong coupling between spin, charge, orbital, and structural degrees of freedom gives rise to exotic ground states in transition-metal oxides (TMOs), such as unusual magnetism, multiferroicity, enhanced thermoelectricity, and high-temperature superconductivity \cite{khomskii2014transition}. The prospect of realizing new, technologically accessible and robust functionality is based on a profound understanding of the mechanisms underlying these phenomena. Along these lines, the structure-property relationship has been considered key in bulk TMOs, yet only few studies have addressed its role in heterostructures. Only recently, the structural modification at heterointerfaces and their relation to the emergence of novel phases has been investigated in detail \cite{Hwang12,zubko2011interface}. This new focus on interfaces is mostly related to tremendous progress in techniques that can obtain detailed structural information about the few atomic layers that constitute an interface. In particular, technical advances in STEM have made it possible to overcome previous limitations, with aberration-corrected STEM not only providing information about the cation sublattice, but also accurately resolving positions of oxygen anions, which are highly relevant for the physics of TMOs \cite{Liao16,Kan16,Dominguez19,Qi15,suyolcu2017octahedral,kim2016polar,suyolcu2017dopant}. One of the simplest structural motifs of ternary TMOs is the perovskite structure \textit{AB}O$_3$, with usually an alkaline-earth or rare-earth element occupying the \textit{A}-site cation position and a transition-metal element on the \textit{B}-site. The ideal cubic structure is only realized in very few compounds. Most perovskites show distortions, which in first approximation can be described by collective tilts and rotations of rigid \textit{B}O$_6$ octahedra \cite{Glazer72,May10}, resulting in possibly anisotropic \textit{B}-O-\textit{B} bond angles that deviate from the cubic 180$^{\circ}$ ones. This has important consequences for the electronic and magnetic properties, since, for example, electronic bandwidths are reduced such that metal-insulator transitions (MITs) are observed. Furthermore, reduced overlap of TM-$d$ and oxygen-$p$ orbitals can strongly modify the magnetic superexchange and therewith the macroscopic magnetic order. In a heterostructure design, this strong connectivity of structural and electronic properties can be used specifically to stabilize new phases \cite{Chen2021,ramesh2019creating,suyolcu2019design,Hwang12,zubko2011interface,Bluschke17}. A prototypical TMO with a pronounced structure-property relation is the rare-earth nickelate NdNiO$_3$ \cite{Torrance92, Catalan08, Middey16review, Catalano18}. In bulk form, NdNiO$_3$ exhibits a MIT at approximately 200\,K that coincides with an antiferromagnetic phase transition and a structural phase transition from the orthorhombic space group $Pbnm$ to monoclinic $P2_{1}/n$ \cite{Garica-Munoz09,Lu16}. The MIT is accompanied by a splitting of the uniformly sized NiO$_6$ octahedra into sets of compressed and expanded NiO$_6$ octahedra, corresponding to a rocksalt-pattern breathing-mode distortion. The proposal to consider NdNiO$_3$ as a negative charge-transfer material \cite{Mizokawa00,Subedi15,Green16} has for the first time led to a satisfactory description of experimental studies, in particular from x-ray spectroscopy \cite{Bisogni16,Fuersich19,Hepting14}. In this model the main electronic contribution to the ground state is $3d^8\underline{L}^1$, where $\underline{L}^1$ denotes one oxygen ligand hole. The insulating phase then arises from a ($3d^8\underline{L}^2$, $3d^8$)-type disproportionation of the NiO$_6$ octahedra with modulated Ni-O bond length \cite{Johnston14} rather than a previously proposed charge transfer between adjacent Ni sites \cite{Staub02}. The electronic and magnetic correlations in NdNiO$_3$ and other rare-earth nickelates are exceptionally sensitive to heteroepitaxial modifications imposed by the substrate \cite{Boris11,Frano13,Middey16review, Catalano18}, which can result in a complete suppression of the MIT for large compressive strain \cite{Hepting14, liu2013heterointerface}. On the other hand, Catalano \textit{et al.} reported that for NdNiO$_3$ films grown on [101]-oriented NdGaO$_3$ substrates, an enhancement of $T_{\text{MIT}}$ by more than 100\,K is possible \cite{Catalano15}. This effect was attributed to the specific three-fold interconnectivity between the film and substrate NiO$_6$-GaO$_6$ octahedral network across the (101) interface (\textit{i.e.} each interfacial Ni forms three bonds via oxygen to Ga ions), together with close lattice matching conditions between NdNiO$_3$ and NdGaO$_3$. These results initiated further studies of films and superlattices on substrates with this unconventional orientation \cite{Middey16,Janson18,kim2016polar,Chakhalian20} that led to important insights into magnetic exchange interactions in thin and ultra-thin NdNiO$_3$ layers \cite{Hepting18,Lu18,Fuersich19}. To gain a deeper understanding of the role of interfacial bonding on the MIT in nickelates, we have investigated the similarities and differences of NdNiO$_3$ thin films grown on (101) and (011) facets of NdGaO$_3$ substrates, respectively (Fig.~\ref{structure}). For both crystallographic facets, the interconnectivity of the octahedral network across the film-substrate interface is three-fold \cite{Catalano18}. In electrical transport measurements we find that the $T_{\text{MIT}}$ can be systematically varied over a wide temperature range as a function of substrate orientation and film thickness. The microscopic structural information provided by STEM reveals differences in octahedral connectivity, film orientation, and tendency towards stacking fault formation. The experimental findings are corroborated by DFT$+U$ calculations suggesting that energetically disfavored phases can be accommodated by crystallographic stacking faults or a reorientation of the NdNiO$_3$ unit cell along the growth direction. Furthermore, our \textit{ab-initio} calculations reveal an enhanced bond-disproportionation in case of [101]-oriented NdNiO$_3$ under tensile strain, rationalizing the enhanced $T_{\text{MIT}}$ in our [101]-oriented films and those of Ref.~\onlinecite{Catalano15}. \section{Methods}\label{methods} Pulsed laser deposition (PLD) was used to grow NdNiO$_3$ thin films on NdGaO$_3$ substrates with (011) and (101) crystallographic surfaces (in $Pbnm$ notation; see Fig.~\ref{structure}), respectively. For each growth, NdNiO$_3$ was deposited simultaneously on a [011]- and [101]-oriented NdGaO$_3$ substrate, yielding pairs of films grown under the same conditions with nominally identical film thicknesses. Details about the growth procedure can be found in Ref.~\onlinecite{Wu13}. The film thicknesses 106, 104, 70, and $40\,\text{\AA}$ were determined from x-ray diffraction and reflectivity measurements. Within our experimental error we obtain identical thicknesses from the analysis of Laue and Kiessig fringes, indicating a single crystalline phase of the whole film. Additionally, an ultra-thin $14.4\,\text{\AA}$ NdNiO$_3$ film was grown on (101) NdGaO$_3$ and capped by a thick NdGaO$_3$ layer. Both, bulk NdNiO$_3$ and NdGaO$_3$ exhibit a \textit{Pbnm} structure at room-temperature, with lattice parameters $a = 5.387\,\text{\AA}$, $b = 5.383\,\text{\AA}$, $c = 7.610 \,\text{\AA}$, and $a=5.428\,\text{\AA}$, $b = 5.498\,\text{\AA}$, and $c = 7.708\,\text{\AA}$, respectively \cite{Garica-Munoz09, vasylechko2000crystal}. Thus, the larger NdGaO$_3$ unit cell dimensions can impose tensile strain on epitaxially grown NdNiO$_3$. The (011) and (101) NdGaO$_3$ facets correspond to cuts perpendicular to the $[111]_{\text{pc}}$ and $[\bar111]_{\text{pc}}$ body diagonal of the pseudocubic unit cell, respectively. Note that while in the simplified pseudocubic reference frame all body diagonal directions are equivalent, the [011] and [101] direction of the orthorhombic \textit{Pbnm} unit cells are distinct. Projections of the crystal structure perpendicular to the (011) and (101) plane are shown in Figs.~\ref{structure}(b,c), with a characteristic \textit{zig-zag line} connecting the Ni-Nd cation positions in the former projection, and a \textit{straight line} in the latter one. In the following, we will use these distinct line patterns to identify the orientation of the substrate and the film in the STEM high-angle annular dark-field (HAADF) images (Figs.~\ref{8MLTEM}(a), \ref{TEM_KF}). The electron-transparent specimens were prepared by employing mechanical grinding, tripod-wedge polishing and argon-ion milling steps, respectively. We used a precision-ion polishing system (Gatan PIPS II, Model 695) at low temperature for argon-ion thinning. The STEM investigations were performed with a JEOL JEM-ARM200F microscope equipped with a cold field-emission electron source, a probe Cs-corrector (DCOR, CEOS GmbH), and a Gatan GIF Quantum ERS spectrometer at 200\,kV. STEM imaging and EELS analysis were conducted at probe semi-convergence angles of 20\,mrad and 28\,mrad, resulting in probe sizes of $0.8\,\text{\AA}$ and $1.0\,\text{\AA}$, respectively. Collection angles for annular dark-field (ABF) and HAADF images were 11-23 mrad and 75-310 mrad respectively, and a collection semi-angle of 111\,mrad was used for EELS investigations. In order to improve the signal-to-noise ratio, frame series with short dwell times ($2\,\text{\textmu s/pixel}$) were used and added after cross-correlation alignment of the ABF images \cite{wang2016oxygen}. Additionally, STEM images were processed with a multivariate weighted principal component analysis routine (MSA Plugin in Digital Micrograph) to decrease the noise level \cite{Bosman06}. Electrical resistance measurements were performed using a Quantum Design Physical Property Measurement System in van-der-Pauw geometry. The data shown in Fig.~\ref{transport} panel (a) and (b) were recorded upon slowly cooling down the sample. In order to get insight into the differences of the electronic structure of NdNiO$_3$ grown on different crystallographic facets, we carried out DFT$+U$ calculations using the VASP (Vienna Ab initio Simulation Package) code \cite{Kresse96, Kresse99} with the generalized gradient approximation GGA-PBE functional \cite{Perdew96}. For NdNiO$_3$ an on-site Hubbard $U$ of 2\,eV was used and the in-plane lattice parameters were fixed to the values of NdGaO$_3$, while the out-of-plane lattice parameter was varied and internal atomic positions were relaxed. Note that for the [101] orientation only the $b$-axis coincides with a main in-plane crystallographic direction, while for [011] orientation it is the $a$-axis. Hence, we define the second in-plane lattice parameter as $a^* = \sqrt{a^2 + c^2}$ and $b^* = \sqrt{b^2 + c^2}$, respectively. Consequently, $a^*$ and $b$ of [101]-oriented NdNiO$_3$ were fixed to the corresponding values calculated for NdGaO$_3$, and $a$ and $b^*$ were fixed for [011]-oriented NdNiO$_3$, while in both cases the out-of-plane lattice parameters $c^*$ were varied and internal atomic positions relaxed. The parameter $c^*$ corresponds to the distance between consecutive Ni planes along the [101] and [011] direction, respectively. Since relaxations performed with the PBE functional are known to overestimate lattice constants, we compared solutions with lattice constants constrained to experimental values and found unchanged trends with variation in energy that are of the same order of magnitude and finally lead to the same conclusion. In addition we tested the possible impact of antiferromagnetic spin polarization. Since calculations become unfeasible for the large unit cells required to stabilize the experimentally observed $(\frac{1}{4} \frac{1}{4} \frac{1}{4})$ magnetic order \cite{Scagnoli08,Hepting18}, we compared the ferromagnetic results with those assuming a $G$-type $(\frac{1}{2} \frac{1}{2} \frac{1}{2})$ order and, again found negligible differences. In order to be as consistent as possible regarding relative energies, we finally used only ferromagnetic calculations for the comparisons. \section{Experimental results} \begin{figure}[tb] \center\includegraphics[width=0.9\columnwidth]{Figure2corr.pdf} \caption{(a), (b) Electrical resistivity $\rho$ as a function of temperature $T$ measured for NdNiO$_3$ films of different thickness grown on [101]- and [011]-oriented NdGaO$_3$ substrates, respectively. Solid lines show $\rho(T)$ measured upon cooling, while additional dashed curves show $\rho(T)$ upon warming for selected samples. The filled symbols indicate the transition temperature $T_{\text{MIT}}$, determined as described in the text. Note that the $14.4\,\text{\AA}$ film (gray dashed lines in panel a) is semiconducting without MIT. All curves, except for the one of the $14.4\,\text{\AA}$ film, are offset in vertical direction by multiples of $250\mu\Omega\cdot\text{cm}$ for clarity. (c), (d) Enlarged views of $\rho$ around the metal-insulator transition temperatures for (101) and (011) samples, respectively. Grey boxes of $\pm 5\mu\Omega\cdot\text{cm}$ hight were used to determine the error bars of $T_{MIT}$. Dotted, vertical lines mark the zero crossing of $-\partial (\text{ln}(\rho)) / \partial T$. (e) $T_{\text{MIT}}$ as a function of NdNiO$_3$ film thickness $d$. The shaded areas indicate the thickness-dependent trends, but serve only as a guide for the eye.} \label{transport} \end{figure} The electrical transport properties of NdNiO$_3$ films grown on (011) and (101) NdGaO$_3$ are shown in Figs.~\ref{transport}(a, b). All films thicker than 14.4\,\AA\ show a clear change in slope in resistivity $\rho(T)$ with decreasing temperature (see the enlarged views Figs.~\ref{transport}(c, d)), signaling a transition from metallic to semiconducting behavior. Various indicators have been employed to extract the transition temperatures $T_{\text{MIT}}$ from $\rho(T)$ in previous studies on nickelates \cite{Mattoni16,Liao18,Catalano15,Dominguez19}. Here we follow Ref.~\cite{Dominguez19} and use the minimum of $\rho(T)$, i.e.\ the temperature where $-\partial (\text{ln}(\rho)) / \partial T$ changes sign, to identify the MIT. Both methods consistently give identical $T_{\text{MIT}}$ values, as indicated by the dotted, vertical lines in Fig.~\ref{transport}(c, d). Note that the absolute values of $T_{\text{MIT}}$ can vary considerably depending on the determination criterion. However, we are interested in relative trends that are reflected as long as the same criterion is applied. Within our set of samples, we find the highest value of $T_{\text{MIT}}=319$~K for the 106~\AA\ thick NdNiO$_3$ film on (101) NdGaO$_3$, which is substantially higher than the $T_{\text{MIT}}$ of 189~K of the corresponding film on (011) NdGaO$_3$, and 150~K reported for films on (001) NdGaO$_3$ \cite{Staub02}. In more detail, Fig.~\ref{transport}(e) displays the transition temperature $T_{\text{MIT}}$ as a function of NdNiO$_3$ layer thickness $d$ for both substrate orientations, with the error bars determined from the width of boxes of $\pm 5\mu\Omega$cm hight (see Fig.~\ref{transport}(c, d)). Notably, $T_{\text{MIT}}$ varies as a function of thickness $d$ (Fig.~\ref{transport}(e)). This trend is particularly pronounced in the case of [101]-oriented substrates (shown as filled, red squares in Fig. \ref{transport}(e)), and extrapolates to a $T_{\text{MIT}}$ of 335~K reported for much thicker films in Ref.~\onlinecite{Catalano15} (reproduced as open square in Fig. \ref{transport}(e)). Moreover, a comparison of the (101) and (011) films of identical nominal thickness indicates that the (101) substrate orientation generally results in a higher $T_{\text{MIT}}$ of more than 50\,K. \begin{figure}[tb] \center\includegraphics[width=0.99\columnwidth]{Figure3corr.pdf} \caption{(a) STEM-HAADF image of the ultra-thin 14.4~\AA\ NdNiO$_3$ film, including the NdGaO$_3$-NdNiO$_3$ substrate-film and the NdNiO$_3$-NdGaO$_3$ film-capping layer interfaces, indicated by dashed orange lines. Purple and orange rectangles correspond to the regions presented in panel (b) and (c), respectively. (b) Atomic-resolution two-dimensional elemental maps of Ga (blue) and Ni (red). Interfacial intermixing occurs within one monolayer at most for both interfaces. (c) The STEM-ABF image provides information about the oxygen positions. The atomic column within the region marked by the white dashed-dotted lines corresponds to \textit{B}-O-\textit{B} bonds, with \textit{B} = Ga, Ni, which are analyzed and quantified in panel (d). The dashed orange lines mark the nominal interfaces. (d) Bond angle measurement across the NdGaO$_3$-NdNiO$_3$-NdGaO$_3$ structure, indicating that the \textit{B}-O-\textit{B} bond angle remains constant within the experimental error. Error bars indicate the 95\% confidence interval, corresponding to two times the standard error. The blue and orange colored areas are guides for the eye indicating the NdGaO$_3$ and NdNiO$_3$ regions, respectively. Note that the \textit{B}-O-\textit{B} bond angle corresponds to the angle of the projection between a \textit{B}-column, two columns of oxygen, and another \textit{B}-column, as illustrated in the corresponding projection (Fig.~\ref{structure}(b)).} \label{8MLTEM} \end{figure} To gain insight into the complex facet and thickness dependence of $T_{\text{MIT}}$, we first discuss the STEM investigation of the thinnest 14.4~\AA\ sample of our series, where a MIT is absent. Note that this sample was capped by a NdGaO$_3$ layer, to avoid the influence of a free surface. The capping layer possibly has a stabilizing function on its $Pbnm$ structure. As shown in the STEM-HAADF image in Fig.~\ref{8MLTEM}(a), the 14.4~\AA\ film is of excellent crystalline quality with coherent interfaces and without traceable defects or stacking faults. Furthermore, atomic resolution STEM-EELS mapping of Ni and Ga (Fig.~\ref{8MLTEM}(b)) suggests that elemental intermixing at the interfaces is limited to one monolayer at most. Detailed information about the local octahedral distortions at the NdGaO$_3$-NdNiO$_3$ interfaces can be obtained from high-resolution STEM-ABF imaging, which allowed us to track the oxygen atomic column positions (Fig.~\ref{8MLTEM}(c)). The analysis of the ABF image is shown in Fig.~\ref{8MLTEM}(d), quantifying the bond angle between the $B$-site cation (Ga, Ni) and oxygen from the substrate region across the film and into the capping layer. Importantly, we find that across the interfaces the Ga-O-Ga and Ni-O-Ni bond angles remain constant within the experimental error, suggesting that the oxygen positions of the NdNiO$_3$ layer are forced to the oxygen positions given by NdGaO$_3$. In other words, this implies that the Ga-O-Ga bond angle of NdGaO$_3$ is transferred to the Ni-O-Ni angle in the epitaxial NdNiO$_3$ layer, which is consistent with a bond-angle transfer scenario from NdGaO$_3$ substrates to NdNiO$_3$ films proposed in Ref.~\onlinecite{Catalano15}. For nickelate films thicker than 14.4~\AA , however, the ABF analysis in Ref.~\onlinecite{Hepting18} revealed a subsequent relaxation of the Ni-O-Ni bond angles up to bulk-like values, indicating that the strongly enhanced $T_{\text{MIT}}$ of thicker NdNiO$_3$ films on [101]-oriented NdGaO$_3$ substrates is likely not caused by altered Ni-O-Ni bond angles, but by effects that will be discussed later. When lowering the temperature, the pinning of oxygen positions in the vicinity of the film-substrate interface obstructs the NiO$_6$ octahedral breathing-mode distortion, and suppresses the MIT. As a result, in thicker films, a thin NdNiO$_3$ layer close to the interface of the NdGaO$_3$ substrate shows no bond-disproportionation down to lowest temperatures \cite{Hepting18}, while layers further away from the interface gradually develop a breathing distortion, which sets the basis for the insulating state. In this scenario, and within the range of film thicknesses considered in Fig.~\ref{transport}, $T_{\text{MIT}}$ naturally decreases as a function of reduced film thickness, with a crossover to a regime of ultra-thin films, where the octahedral breathing mode is fully suppressed. \begin{figure}[tb] \center\includegraphics[width=0.99\columnwidth]{Figure4new.png} \caption{(a), (b) STEM-HAADF images of the 70~\AA\ NdNiO$_3$ films on [101]- and [011]-oriented NdGaO$_3$ substrates, respectively. The insets illustrate the presence of characteristic \textit{straight} and \textit{zig-zag} patterns of the Ni and Nd cation positions, which are indicative of the [101] and [011] orientations, respectively. While the NdNiO$_3$ film on (101) NdGaO$_3$ is entirely [101]-oriented and of high crystalline quality (a), a more defective structure together with reoriented (101) patches is observed for the film on (011) NdGaO$_3$.} \label{TEM_KF} \end{figure} Next, we clarify the mechanisms that are responsible for the different $T_{\text{MIT}}$ of films with nominally identical thickness, but grown on different facets. To this end, we performed STEM-HAADF imaging with atomic resolution on the two 70~\AA -thick films. A representative HAADF image of each sample is shown in Fig.~\ref{TEM_KF}. For [101] substrate orientation, we find that the NdNiO$_3$ exhibits high epitaxial quality (Fig.~\ref{TEM_KF}(a)). In particular, the Nd and Ga ions in the NdGaO$_3$ substrate are arranged in \textit{straight lines}, as expected for [101]-oriented films (see also Fig.~\ref{structure}(b)). A closely similar \textit{straight line} pattern is adopted by the Nd and Ni ions in the film and persists up to the topmost layers, suggesting that the entire film grew in the same orientation as the substrate. By contrast, several regions with crystal defects can be observed in the film on [011]-oriented NdGaO$_3$ (Fig.~\ref{TEM_KF}(b)), which was grown simultaneously under identical conditions (see the Methods section). While the first monolayers of the film exhibit good crystalline quality, the defective regions start to form a few monolayers after the film-substrate interface. The majority of defects in Fig.~\ref{TEM_KF}(b) can be attributed to stacking faults of the perovskite crystal lattice. However, a close inspection of the upper parts between defective regions reveals some patches with rather \textit{straight lines} of Nd and Ni, while overall the Nd and Ni ions are mostly arranged in \textit{zig-zag lines} in accordance with the [011] orientation. Remarkably, this change of the Nd and Ni arrangement is indicative of a reorientation of the NdNiO$_3$ unit cell with respect to the growth direction, \textit{i.e.} from [011] to [101] orientation. The higher defect density and the presence of partially reoriented areas in (011) films indicate an opposite phase preference resulting from lattice mismatch and the need for interfacial connectivity. To verify and quantify these possibly competing energy scales, we consider different epitaxial combinations between film and substrate orientations in a strain minimization scenario, and compare their ground state energies in DFT$+U$ calculations. \section{DFT$+U$ calculations} \begin{figure*}[t] \center\includegraphics[width=0.85\textwidth]{Figure5.pdf} \caption{Top panels: Schematic projections of the dimensions of the bulk NdNiO$_3$ and NdGaO$_3$ unit cells for different film orientations on (a) (101) NdGaO$_3$ and (b) (011) NdGaO$_3$ substrates. The crystallographic in-plane directions ($a^*$, $b^*$, $a$, $b$) of NdNiO$_3$ and NdGaO$_3$ are indicated, together with the normalized, directional lattice mismatch $(l_{\rm NdGaO_3}-l_{\rm NdNiO_3})/l_{\rm NdNiO_3}$ in $\%$. Bottom panels: Ground state energy of NdNiO$_3$ as a function of the normalized out-of-plane lattice spacing as obtained from DFT$+U$ calculations for the four different substrate-film orientation configurations depicted in the top panels. Keeping the in-plane lattice parameters fixed to those of [101]-oriented NdGaO$_3$ in (a) and [011]-oriented NdGaO$_3$ in (b), the ground state energies have been calculated for a range of values for the out-of-plane lattice spacing. Since the NdGaO$_3$ substrate induces tensile strain in all configurations, a reduced $c^*$ spacing is expected with respect to the bulk (for the normalization we used bulk NdNiO$_3$\cite{Garica-Munoz09}, that is $c^*_{(101)}=4.397$\,\AA\ for the (101) phase and $c^*_{(011)}=4.394$\,\AA\ for the (011) phase). Furthermore, the DFT$+U$ derived structures reveal an enhanced bond-disproportionation in [101]- compared to [011]-oriented films on both substrate orientations, as illustrated by the insets.} \label{DFT} \end{figure*} In order to understand the observed differences in $T_{\text{MIT}}$ of films grown on the different NdGaO$_3$ facets, we first address the lattice mismatch as origin of preferred film orientation. Determined by the choice of the substrate facet, NdNiO$_3$ experiences a slightly different lattice mismatch depending on its own relative orientation. This is illustrated in the top part of Fig.~\ref{DFT}(a,b). For all possible combinations of film and substrate orientation, the substrate induces tensile strain to the NdNiO$_3$ film. For the one-to-one configurations we find $\approx0.8\%$ and $\approx2.0\%$ in-plane lattice mismatch for (101)-(101) NdNiO$_3$-NdGaO$_3$ (Fig.~\ref{DFT}(a)) and $\approx1.3\%$ and $\approx0.5\%$ for (011)-(011) (Fig.~\ref{DFT}(b)). The values for the other two arguably counter-intuitive configurations of (011)-(101) and (101)-(011), however, do not differ significantly. Thus, strain minimization alone cannot explain the experimentally observed partial reorientation to (101) for films grown on (011) substrates (Fig.~\ref{TEM_KF}(b)). Next we address the relevance of electronic interactions on the level of DFT$+U$ by discussing the results obtained for the four configurations illustrated in the top panels of Fig.~\ref{DFT} using a Hubbard $U$ of $2\,\text{eV}$, typical for rare-earth nickelates \cite{Hampel17, Varignon17}. The bottom panels of Fig.~\ref{DFT}(a,b) show the ground state energy of NdNiO$_3$ as a function of the normalized out-of-plane lattice spacing $c^*_{(101)}/c_{(101)}^{* \rm bulk}$ and $c^*_{(011)}/c_{(011)}^{*\rm bulk}$, respectively (bulk values were taken from Ref.~\onlinecite{Garica-Munoz09}), while the in-plane lattice constants were fixed to those of (011) and (101) NdGaO$_3$, respectively. On both substrate facets the growth of [011]-oriented NdNiO$_3$ has an overall higher energy and is therefore less favored (bottom panels in Fig.~\ref{DFT}(a,b)). For [101]-oriented NdNiO$_3$ we find a global minimum on both substrate facets for reduced out-of-plane lattice spacings close to 4.31~\AA, in good agreement with out-of-plane lattice spacing of (101) NdNiO$_3$ films determined by resonant x-ray reflectivity \cite{Hepting18}. Thus we conclude that the combination of strain and electronic interactions captured in our DFT$+U$ calculations indicate a preference of [101] film orientation independent of the substrate facet. In addition the DFT$+U$ calculations reveal a second important result: the crystal structures corresponding to the global energy minima differ significantly from the bulk with respect to the size of the bond-disproportionation. Specifically, in the bond-disproportionated ground state of (101) NdNiO$_3$, the long ($d_{\text{L}}$) and short ($d_{\text{S}}$) Ni-O bond lengths in the expanded and compressed NiO$_6$ octahedra are $d_{\text{L}} = 1.97$~\AA\ and $d_{\text{S}} = 1.90$~\AA, respectively. Parametrization of the distortion $\delta d$ as the difference in long and short bond lengths $d_{\text{L}}$ and $d_{\text{S}}$ from the mean value, yields $\delta d = 0.035$~\AA, which is significantly enhanced compared to a $\delta d$ of 0.015~\AA\ calculated for a fully relaxed bulk NdNiO$_3$ unit cell \footnote{The exact numeric value of $\delta d$ depends on details of the calculation, such as the choice of $U$. However, we emphasize that the trend of an enhanced bond-disproportionation for (101) NdNiO$_3$ is robust.}. Conversely, the distortion $\delta d$ of the hypothetical, local minimum structures of (011) NdNiO$_3$, either on (101) or (011) NdGaO$_3$ is similar to that of bulk NdNiO$_3$ \footnote{Importantly, the crystal structures of (011) NdNiO$_3$ (all data points in Fig.~\ref{DFT}, including the side-minima) do not exhibit enhanced bond-disproportionation}. Therefore, we conclude that the orientational structure stabilization is not driven by strain minimization alone, but by its combination with electronic interactions. In other words, the system chooses the orientation with a particular tensile lattice mismatch that maximizes the bond-disproportionation. This explains well our observations for thick films on [101]-oriented substrates, where we clearly observe the stabilization of (101) film orientation (STEM image in Fig.~\ref{TEM_KF}) and an enhancement of $T_{\text{MIT}}$ compared to the bulk. However our DFT$+U$ calculations do not account for effects of interconnectivity in the vicinity of the film-substrate interface. Due to the necessity to form Ga-O-Ni bonds across the interface and the stability of the NdGaO$_3$ $Pbnm$ structure (with only one Ni Wyckoff position $4a$) down to the lowest temperature, this interfacial connectivity prevents the development of bond-disproportionation close to the interface. In the ABF image analysis of Fig.~\ref{8MLTEM} we found that the length scale, on which the oxygen atomic positions are pinned by the [101]-oriented substrate, is of the order of 14~\AA\ (8 atomic layers). Similarly, the HAADF image in Fig.~\ref{TEM_KF}(b) shows that for the (011) film growth the first 5-10 atomic layers of defect-free [011]-oriented NdNiO$_3$ are a related length scale. Above the critical length scale, where the pinning effect of the substrate is relaxed, the above discussed combination of lattice mismatch and electronic correlations takes over and causes the partial reorientation to (101) film alignment and defect formation as observed in the top part of the STEM image in Fig.~\ref{TEM_KF}(b). We conclude that closely similar energy scales of lattice and electronic degrees of freedom in rare-earth nickelates enable the heteroepitaxial stabilization of phases with enhanced electronic interactions. In particular, our study shows that the symmetry of the substrate as well as the choice of the crystal facet can have significant impact on the electronic properties of NdNiO$_3$, as demonstrated by the complex thickness and facet dependence of $T_{\text{MIT}}$. Up to thicknesses of 5-10 atomic layers, the structural pinning of the substrates dominates and determines the orientation and suppression of bond-disproportionation in the NdNiO$_3$ slabs. Above this length scale, lattice mismatch in combination with electronic interactions determine the properties of the films. Our study therefore provides an extraordinarily high level of understanding and control of the bond-disproportionated phase in NdNiO$_3$. \section{Summary} In summary, we investigated in detail the heteroepitaxial modifications in NdNiO$_3$ thin films by combining analytical high-resolution STEM, electrical transport measurements, and DFT$+U$ calculations. We identified a complex interplay between lattice constraints and electronic interactions, which manifests itself in a complicated dependence of the MIT temperature with film thickness and substrate orientation. Finally, we established a picture of competing energy scales that facilitates the stabilization of phases with modified bond-disproportionation by means of facet and thickness control in heterostructures. The amended bond-disproportionation has important implications for the magnetic ground state and the exchange interactions, which can be qualitatively different from the bulk \cite{Hepting18,Lu18,Fuersich19}. The controlled preparation of phases opens a new route to tune material properties in heterostructures for future applications in functional devices. This type of heteroepitaxial control could be used to stabilize exotic phases in $R$NiO$_3$ such as multiferroicity \cite{vandenBrink08, Giovannetti09} and superconductivity \cite{Chaloupka08,Hansmann09,Li2019} and to make them accessible in a technologically relevant parameter range. It would also be interesting to further study the connection of structural effects (and the strength of bond-order) to the emergence of magnetic order. This could possibly be done by using other orthorhombic substrates to tune the nature and the size of the strain. \begin{acknowledgments} We acknowledge U.~Salzberger for TEM specimen preparation and B.~Lemke for technical support. Y.E.S. and P.v.A. acknowledge financial support from the European Union's Horizon 2020 research and innovation program under grant agreement No. 823717 (ESTEEM3). K.F., B.K., and E.B. acknowledge financial support by the Deutsche Forschungsgemeinschaft (DFG, project no. 107745057, TRR80). Y.E.S.\ and K.F.\ contributed equally to this work. \end{acknowledgments}
\section{Introduction} The charmed meson weak decays into light mesons provide a very good channel to study meson-meson interactions at low energies and the nature of the low-lying scalar mesons~\cite{Klempt:2008ux,Bhattacharya:2010id,Liang:2016hmr,Debastiani:2016ayp}. We refer to Ref.~\cite{Oset:2016lyh} for a review about the study on the interactions of light hadrons from the weak decays of the $D$ mesons. Very recently, in Ref.~\cite{Ablikim:2019pit}, the BESIII Collaboration firstly reported on the observation of the decay modes of $D_{s}^{+} \to a_{0}(980)^{+}\pi^{0}$ and $D_{s}^{+}\to a_{0}(980)^{0}\pi^{+}$ in the amplitude analysis of the $D_{s}^{+} \to \pi^{+}\pi^{0}\eta$ decay. The $D_{s}^{+} \to a_{0}(980)^{+(0)}\pi^{0(+)}$ decays are claimed as $W$-annihilation dominant processes. However, the measured absolute branching fraction of $\mathcal{B}[D_{s}^{+} \to a_{0}(980)^{+(0)}\pi^{0(+)}$, $a_{0}(980)^{+(0)} \to \pi^{+(0)}\eta] = (1.46\pm 0.15_\mathrm{sta.}\pm0.23_\mathrm{sys.})\%$ is found to be larger than those of normal $W$-annihilation processes by at least one order of magnitude. In Ref.~\cite{Molina:2019udw} it was proposed that the $D^+_s \to \pi^+ \pi^0 \eta$ decay actually occurs via an internal $W$-conversion process, where $\pi K \bar{K}$ was produced at the first step, and then the $\pi \eta$ state is generated from final state interaction of $K\bar{K}$ in $S$-wave and isospin $I=1$, and the $a_{0}(980)$ resonance is dynamically generated via $\bar{K}K$ and $\pi\eta$ coupled channel interactions as described in the unitary chiral theory~\cite{Oller:1997ti,Oller:2000fj}. The main purpose of Ref.~\cite{Molina:2019udw} is to get the $a_0(980)$ signal, and thus, only the experimental data with the cut $M_{\pi^+\pi^-} > 1$ GeV were studied, for which the tree diagram $D^+_s \to \rho^+ \eta \to \pi^+\pi^0 \eta$ does not contribute. On the other hand, in Ref.~\cite{Hsiao:2019ait} it was shown that the experimental measurements can also be described as an external $W$-emission process $D^+_s \to \rho^+ \eta$. Then the $\rho$ meson decays into a pair of $\pi\pi$ and the $\pi\eta$ pair fuses into $a_0(980)$, which subsequently decays into $\pi\eta$ again. As both the $W$-internal conversion and $W$-external emission processes are believed to be larger than the $W$-annihilation process, the puzzle seems to be resolved, though the two theoretical studies seem to give conflicting results regarding the responsible weak decay mechanism. In the present work, we revisit this issue and argue that the two theoretical works are not necessarily contradicting with each other. As a matter of fact, the triangle mechanism of Ref.~\cite{Hsiao:2019ait} may offer a way to estimate the unknown weak decay coupling between $D_{s}^{+}$ and $\bar{K}K^*(\bar{K}^*K)$, i.e., the first vertex of the triangle diagrams for $D^+_s\to K^+\bar{K}^{*0}/K^{*+}\bar{K}^0\to\pi^+\pi^0\eta$. At the quark level, the decay of $D_{s}^{+}\to \rho^{+}\eta$ proceeds through external $W$-emission $c\to \bar{s} W^{+}$ as shown in Fig~\ref{quark}(a). According to the review of the Particle Data Group~\cite{Zyla:2020zbs}, the absolute branching fractions of the decay modes $D_{s}^{+}\to K^{\ast +}\bar{K}^{0}$ and $D_s^+\to K^+\bar{K}^{*0}$ are $(5.4 \pm 1.2)\%$ and $(5.16 \pm 0.16)\%$ respectively, which are comparable to the absolute branching fraction of $D_{s}^{+}\to \rho^{+}\eta$ that is $(8.9 \pm 0.8)\%$. As a result, if $D^+_s\to \rho^+\eta$ can contribute to the $D^+_s\to a_0^{+(0)}\pi^{0(+)}$ [$a_0 \equiv a_0(980)$] process via the triangle diagrams as in Ref.~\cite{Hsiao:2019ait}, the $D^+_s\to K^+ \bar{K}^{*0}/\bar{K}^0K^{*+}$ processes shown in Fig~\ref{quark}(b) can also contribute via the triangle diagrams, where the $K^*$ decays into $K\pi$ and $K\bar{K}$ produce the $\pi \eta$ pair through final state interactions, from which the $a_0(980)$ resonance can be produced. The latter has not been considered either in Ref.~\cite{Molina:2019udw} or in Ref.~\cite{Hsiao:2019ait}.~\footnote{As we will show later, the anomalously large $a_0\pi\eta'$ coupling adopted in Ref.~\cite{Hsiao:2019ait} helps to increase the branching fraction to meet the experimental number.} As a result, in this work we will consider both $D_{s}^{+} \to \rho^{+}\eta$ and $D_s\to K^+\bar{K}^{*0}/K^{*+}\bar{K}^0$ induced triangle diagrams, which lead to $\pi^+a_0^0$ and $\pi^0 a_0^+$ final states. \begin{figure}[htpb] \centering \includegraphics[scale=0.18]{quark.eps} \caption{(a) External $W$-emission mechanism for $D^+_s\to \rho^+\eta$ and (b) internal $W$-conversion mechanisms for $D^+_s\to K^+\bar{K}^{*0}/K^{*+}\bar{K}^0$.}\label{quark} \end{figure} Compared to Ref.~\cite{Hsiao:2019ait}, we make a further improvement. It is well known that the $a_0(980)$ state does not behave like a normal Breit-Wigner resonance, because of the closeness of the $K\bar{K}$ threshold. It can be dynamically generated as a molecular state from the $K\bar{K}$ and $\pi\eta$ coupled channel interactions in the chiral unitary approach~\cite{Oller:1997ti,Oller:1997ng,Kaiser:1998fi,Locher:1997gr,Nieves:1999bx}. In this work, we then investigate whether with the chiral unitary amplitudes one can describe the BESIII data~\cite{Ablikim:2019pit}. The article is organized as follows. In Sec.~\ref{sec:Interactions}, we lay out the theoretical formalism. In Sec.~\ref{sec:Results} we show our theoretical results and discussions are also given comparing with the experimental data from Ref.~\cite{Ablikim:2019pit}. We summarize in Sec. \ref{sec:Summary}. \section{Theoretical FORMALISM}\label{sec:Interactions} \begin{figure}[htbp] \centering \includegraphics[scale=0.2]{tree.eps}\\ \caption{Tree-level diagram for $D_s^{+}\to \eta\rho^{+} \to \eta \pi^0\pi^{+}$.}\label{tree} \end{figure} To calculate the decay width of $D_s^{+}\to \eta\pi^0\pi^{+}$, we consider the contribution from both the tree-level diagram of Fig.~\ref{tree} and the triangle diagrams of Fig.~\ref{triangle} and Fig.~\ref{triangle KK}. In the process described by the tree-level diagram, $D_{s}^{+}$ first decays into $\rho^{+}$ and $\eta$, then $\rho^{+}$ decays to $\pi^{+}\pi^{0}$ as shown in Fig~\ref{tree}. As pointed out in Ref.~\cite{Hsiao:2019ait}, the $\pi^+$/$\pi^0$ meson can interact with the $\eta$ meson to form $a_0(980)^{+}/a_0(980)^0$ via the triangle diagrams shown in Fig.~\ref{triangle}. On the other hand, if the processes depicted in Fig.~\ref{triangle} can occur, those depicted in Fig.~\ref{triangle KK} can also occur, because 1) the branching fractions of $D_s$ decaying into $K^*\bar{K}/K\bar{K}^*$ are comparable to that of $D_s$ decaying into $\rho\eta$ and 2) $K\bar{K}$ is a dominant channel to which the $a_0(980)$ state couples. As a result, their contributions cannot be neglected. In this work, therefore, we also consider the contribution from $D_{s}^{+}\to K^{\ast+}\bar{K}^{0}/K^+\bar{K}^{*0}$, which can proceed through the triangle mechanisms shown in Fig~\ref{triangle KK}. \begin{figure}[htpb] \centering \includegraphics[scale=0.3]{triangle-rhoeta.eps}\\ \caption{Triangle rescattering diagrams for $D_s^{+} \to (\rho^+\eta \to)\pi^+\pi^0\eta$.}\label{triangle} \end{figure} \begin{figure}[htpb] \centering \includegraphics[scale=0.3]{triangle-KK.eps}\\ \caption{Triangle rescattering diagrams for $D_s^{+}\to (K^{*+}\bar{K}^0 \to)\pi^{+}\pi^0\eta$ and $D_s^{+}\to (K^{+}\bar{K}^{*0} \to)\pi^{+}\pi^0\eta$ .}\label{triangle KK} \end{figure} The follwing effective Hamiltonian is needed to describe the $D_{s}^{+}\to \rho^{+}\eta$ and $ D_{s}^{+} \to K^{\ast+}\bar{K}^{0}/K^+\bar{K}^{*0}$ processes, \begin{equation} \mathcal{H}_{eff}=\frac{G_F}{\sqrt{2}}V_{cs}V_{ud}[c_1^{eff}(\bar{u}d)(\bar{s}c)+c_2^{eff}(\bar{s}d)(\bar{u}c)], \end{equation} where $G_F = 1.166 \times 10^{-5} {\rm GeV}^{-2}$ is the Fermi constant, $V_{cs}$ and $V_{ud}$ are the CKM matrix elements, $c_{1,2}^{eff}$ are the effective Wilson coefficients, and $\bar{q_1}q_2$ stand for vector and axial vector currents, $\bar{q_1}\gamma_\mu(1-\gamma_5)q_2$~\cite{Buras:1998raa,Geng:2017esc,Geng:2018upx,Geng:2020ofy,Han:2021azw}. The amplitude of $D_s^{+}\to \rho^{+} \eta$ and $D_{s}^{+} \to K^{\ast+}\bar{K}^{0}/K^+\bar{K}^{*0}$ can be written as the products of two hadronic matrix elements~\cite{Ali:1998eb,Li:2013xsa} \begin{eqnarray}\label{Ds-KK} \mathcal{A}\left(D_{s}^{+} \to \eta \rho^{+}\right)&=&\frac{G_{F}}{\sqrt{2}} V_{c s} V_{u d} a_{1}\left\langle\rho^{+}|(\bar{u} d)| 0\right\rangle\left\langle\eta|(\bar{s} c)| D_{s}^{+}\right\rangle\\ \mathcal{A}\left(D_s^{+}\to K^{*+}\bar{K}^0\right)&=&\frac{G_{F}}{\sqrt{2}} V_{c s} V_{u d} a_{2}\left\langle \bar{K}^0|(\bar{s} d)| 0\right\rangle\left\langle K^{*+}|(\bar{u} c)| D_{s}^{+}\right\rangle, \\ \mathcal{A}\left(D_s^{+}\to \bar{K}^{*0}K^+\right)&=&\frac{G_{F}}{\sqrt{2}} V_{c s} V_{u d} a_{2}' \left\langle \bar{K}^{*0}|(\bar{s} d)| 0\right\rangle\left\langle K^{+}|(\bar{u} c)| D_{s}^{+}\right\rangle. \end{eqnarray} where $a_{1}=c_{1}^{e f f}+c_{2}^{e f f} / N_{c}$ and $a_{2}=c_{1}^{e f f}/ N_{c}+c_{2}^{e f f} $ with $N_c$ the number of colors. It should be noted that $a_1$ can be calculated in the naive factorization approach, but $a_2$ and $a_2'$ cannot be easily obtained within the factorization approach~\cite{Beneke:2003zv,Ali:1998gb}. In the present work we will fix all of them by fitting directly to data. The current matrix elements between a pseudoscalar meson or vector meson and the vacuum have the following form: \begin{eqnarray} \left\langle\rho^{+}|(\bar{u} d)| 0\right\rangle = m_{\rho} f_{\rho} \epsilon_{\mu}^{*} , ~~ \left\langle \bar{K}^0|(\bar{s} d)| 0\right\rangle = - f_{\bar{K}^0} p_{\bar{K}^0}^{\mu}, ~~ \left\langle \bar{K}^{*0}|(\bar{s} d)| 0\right\rangle = m_{\bar{K}^{*0}}f_{\bar{K}^{*0}}\epsilon_\mu^*, \end{eqnarray} where $f_{K}$, $f_{K^{\ast}}$, and $f_{\rho}$ are the decay constants for $K$, $K^{\ast}$, and $\rho$ mesons, respectively, and $\epsilon_\mu^*$ is the polarization vector of $\rho$ or $K^*$ meson. In this work, we take $f_\rho = 210$ MeV, $f_K =158$ MeV, $f_{K^*} = 214$ MeV as in Refs.~\cite{Ali:1998eb,Wang:2008rk,Ali:2007ff}. The hadronic matrix elements can be written in terms of form factors as follows~\cite{Soni:2018adu} \begin{eqnarray} \left\langle\eta|(\bar{s} c)| D_{s}^{+}\right\rangle&=&\left(p_{D_{s}}+p_{\eta}\right)^{\mu} F_{+}(q^2)+q^{\mu} F_{-}(q^2), \\ \left\langle K^{*+}|(\bar{u} c)| D_{s}^{+}\right\rangle&=&\frac{\epsilon_{\alpha}^{*}}{m_{D_s}+m_{K^{*+}}}\left[-g^{\mu \alpha} P \cdot q' A_{0}\left(q'^{2}\right)+P^{\mu} P^{\alpha} A_{+}\left(q'^{2}\right)\right.\\ &&\left.+q'^{\mu} P^{\alpha} A_{-}\left(q'^{2}\right)+i \varepsilon^{\mu \alpha \beta \gamma}P_\beta q'_\gamma V\left(q'^{2}\right)\right], \\ \left\langle K^{+}|(\bar{u} c)| D_{s}^{+}\right\rangle &=&\left(p_{D_{s}}+p_{K^+}\right)^{\mu} F_{+}(q''^2)+q''_{\mu} F_{-}(q''^2), \end{eqnarray} where $q^{\mu(\prime,\prime\prime)}$ represent the momentum of $\rho$, $K$, and $K^*$ mesons, respectively, and $P^\mu = (p_{D_s} + p_{K^*})^{\mu}$. The form factors of $F_{\pm}(t)$, $A_{0}(t)$, $A_{+}(t)$, $A_{-}(t)$, and $V(t)$ with $t \equiv q^{(\prime,\prime\prime)2}$ can be parameterized as~\cite{Soni:2018adu} \begin{equation} X(t)=\frac{X(0)}{1-a\left(t / m_{D_{s}}^{2}\right)+b\left(t^{2} / m_{D_{s}}^{4}\right)}. \end{equation} In this work, we take these form factors $F_{\pm}$, $A_{0,\pm}$ and $V$ from Ref.~\cite{Soni:2018adu}: $(F_+(0), a, b)^{D_s \to \eta} = (0.78, 0.69, 0.002)$, $(F_+(0), a, b)^{D_s \to K} = (0.60, 1.05, 0.18)$, $(A_+(0), a, b)^{D_s \to K^*} = (0.57, 1.13, 0.21)$, $(A_0(0), a, b)^{D_s \to K^*} = (1.53, 0.61, -0.11)$, and $(A_-(0), a, b)^{D_s \to K^*} = (- 0.82, 1.32, 0.34)$. Note that the terms containing $V(q^{\prime 2})$ and $F_{-}(q^2(q^{\prime\prime 2}))$ do not contribute to the processes we study here. For the strong decays $\rho^{+}\to\pi^{+}\pi^0$ and $K^{*+}\to K\pi$ ($\bar{K}^{*0}\to \bar{K}\pi$), the amplitudes are \begin{align} \mathcal{A}\left(\rho^{+} \to \pi^{+} \pi^{0}\right) = g_{\rho \pi \pi} \epsilon \cdot\left(p_{\pi^{+}}-p_{\pi^{0}}\right), ~~~ \mathcal{A}\left(K^* \to K\pi\right) = g_{K^{*} K \pi} \epsilon \cdot\left(p_{\pi}-p_{K}\right), \end{align} where $g_{\rho\pi\pi}$ and $g_{K^{*} K \pi} $ denote the $\rho$ coupling to $\pi\pi$ and the $K^{*}$ coupling to $K\pi$. With the masses of these particles and the partial decay widths of $\rho \to \pi\pi$ and $K^* \to K \pi$ quoted in the PDG~\cite{Zyla:2020zbs}, we obtain $g_{\rho\pi\pi} = 6.0$, $g_{K^{*+} K \pi}=3.26$, and $g_{K^{*0} K \pi}=3.12$. On the other hand, the couplings~\footnote{It should be stressed that the partial decay widths determine only the absolute value of the corresponding coupling constants, but not their phases. In this work, we assume that they are real and positive, which seems to be a reasonable choice given the reasonable description of the experimental data as shown below.} $a_1=0.96$, $a_2=1.50$ and $a_2'=1.51$ are determined by fitting them to the experimental branching fractions $\mathcal{B}(D_s^+\to \rho^+\eta) = (8.9\pm0.8)\%$, $\mathcal{B}(D_s^+\to K^{*+}\bar{K}^0) = (5.4\pm 1.2)\% $ and $\mathcal{B}(D_s^+\to K^+\bar{K}^{*0}, \bar{K}^{*0}\to K^-\pi^+) = (2.58\pm 0.08)\%$ quoted in the PDG~\cite{Zyla:2020zbs}. Putting all the pieces together, we obtain the decay amplitude of the $D^+_s \to \pi^+ \pi^0 \eta$ from the tree-level diagram of Fig.~\ref{tree} as \begin{equation} \mathcal{A}^{\rm tree}_1=i~\frac{\mathcal{A}(D_s^+\to\eta\rho^+)\mathcal{A}\left(\rho^{+} \to \pi^{+} \pi^{0}\right)}{m_{13}^2-m_{\rho^+}^2+im_{\rho^+}\Gamma_{\rho^+}}, \end{equation} with $m_{13}^2=(p_{\pi^0}+p_{\pi^{+}})^2$ the invariant mass squared of the $\pi^+ \pi^0$ system. Next, we can write the total decay amplitude of $D^+_s \to \pi^+ \pi^0 \eta$ for those triangle diagrams shown in Fig.~\ref{triangle}, \begin{align}\label{triangleA} \mathcal{A}_{2}^{\rho \eta} & = \mathcal{A}_{a}^{\rho \eta}+\mathcal{A}_{b}^{\rho \eta}, \\ \mathcal{A}_{a}^{\rho \eta} & = t_{\pi\eta\to\pi\eta}(m_{12}^2) \int \frac{d^{4} q_{3}}{(2 \pi)^{4}} \frac{{\rm i}\mathcal{A}(D_s^+\to\eta\rho^+)\mathcal{A}\left(\rho^{+} \to \pi^{+} \pi^{0}\right)}{\left(q_{1}^{2}-m_{\rho^{+}}^{2}+i m_{\rho^{+}}\Gamma_{\rho^{+}}\right)\left(q_{2}^{2}-m_{\eta}^{2}+i \epsilon\right)\left(q_{3}^{2}-m_{\pi^{0}}^{2}\right)}, \\ \mathcal{A}_{b}^{\rho \eta} & = t_{\pi\eta\to\pi\eta}(m_{23}^2) \int \frac{d^{4} q_{3}}{(2 \pi)^{4}} \frac{{\rm i}\mathcal{A}(D_s^+\to\eta\rho^+)\mathcal{A}\left(\rho^{+} \to \pi^{0} \pi^{+}\right)}{\left(q_{1}^{2}-m_{\rho^{+}}^{2}+i m_{\rho^{+}}\Gamma_{\rho^{+}}\right)\left(q_{2}^{2}-m_{\eta}^{2}+i \epsilon\right)\left(q_{3}^{2}-m_{\pi^{+}}^{2}\right)}, \end{align} where $m_{12}^{2}=\left(p_{\pi^0}+p_{\eta}\right)^{2}$, $m_{23}^{2}=\left(p_{\pi^{+}}+p_{\eta}\right)^{2}$, and the momenta $(q_1, q_2, q_3)$ are those of $(\rho^+, \eta, \pi^{0(+)})$, respectively. The $t_{\pi\eta\to\pi\eta}$ stands for the two-body $\pi \eta \to \pi \eta$ scattering amplitude, which depends on the invariant mass of the $\pi \eta$ system. The decay amplitudes of $D_{s}^{+} \to \pi^+ \pi^0 \eta $ via triangle diagrams shown in Fig.~\ref{triangle KK} are written as \begin{eqnarray}\label{KK} \mathcal{A}_{3}^{K^*K} &=& \mathcal{A}_{a}^{K^*K}+\mathcal{A}_{b}^{K^*K}+\mathcal{A}_{c}^{K^*K}+\mathcal{A}_{d}^{K^*K}, \\ \mathcal{A}_{a}^{K^*K} & = & \frac{i}{\sqrt{2}} \int \frac{d^{4} q_{3}}{(2 \pi)^{4}} \frac{ \mathcal{A}\left(D_s^{+}\to K^{*+}\bar{K}^0\right) \mathcal{A}\left(K^{*+}\to \pi^{+}K^{0}\right)t_{K\bar{K}\to\pi\eta}(m_{12}^2) }{\left(q_{1}^{2}-m_{K^{*+}}^{2}+im_{K^{*+}}\Gamma_{K^{*+}}\right)\left(q_{2}^{2}-m_{K^0}^{2}+i \epsilon\right)\left(q_{3}^{2}-m_{K^{0}}^{2}\right)}, \\ \mathcal{A}_{b}^{K^*K} & = & -i \int \frac{d^{4} q_{3}}{(2 \pi)^{4}} \frac{ \mathcal{A}\left(D_s^{+}\to K^{*+}\bar{K}^0\right) \mathcal{A}\left(K^{*+}\to \pi^{0}K^{+}\right) t_{K\bar{K}\to\pi\eta}(m_{23}^2) }{\left(q_{1}^{2}-m_{K^{*+}}^{2}+im_{K^{*+}}\Gamma_{K^{*+}}\right)\left(q_{2}^{2}-m_{K^0}^{2}+i \epsilon\right)\left(q_{3}^{2}-m_{K^{+}}^{2}\right)}, \\ \mathcal{A}_{c}^{K^*K} & = & -\frac{i}{\sqrt{2}} \int \frac{d^{4} q_{3}}{(2 \pi)^{4}} \frac{\mathcal{A}\left(D_s^{+}\to \bar{K}^{*0}K^+\right) \mathcal{A}\left(\bar{K}^{*0}\to \pi^{+}K^{-}\right)t_{K\bar{K}\to\pi\eta}(m_{12}^2) }{\left(q_{1}^{2}-m_{K^{*0}}^{2}+im_{K^{*0}}\Gamma_{K^{*0}}\right)\left(q_{2}^{2}-m_{K^+}^{2}+i \epsilon\right)\left(q_{3}^{2}-m_{K^{-}}^{2}\right)}, \\ \mathcal{A}_{d}^{K^*K} & = & -i \int \frac{d^{4} q_{3}}{(2 \pi)^{4}} \frac{\mathcal{A}\left(D_s^{+}\to \bar{K}^{*0}K^+\right) \mathcal{A}\left(\bar{K}^{*0}\to \pi^{0}\bar{K}^{0}\right)t_{K\bar{K}\to\pi\eta}(m_{23}^2) }{\left(q_{1}^{2}-m_{K^{*0}}^{2}+im_{K^{*0}}\Gamma_{K^{*0}}\right)\left(q_{2}^{2}-m_{K^+}^{2}+i \epsilon\right)\left(q_{3}^{2}-m_{K^{0}}^{2}\right)}, \end{eqnarray} with momenta $(q_1, q_2, q_3)$ for $(K^*(\bar{K}^*), \bar{K}(K), K(\bar{K}))$, respectively. It is worth mentioning that one needs to include the isospin factor $-\sqrt{\frac{1}{3}}$ and $\sqrt{\frac{1}{3}}$ for Figs.~\ref{triangle KK}~(a) and (c) and Figs.~\ref{triangle KK}~(b) and (d), respectively. The $t_{K\bar{K}\to\pi\eta}$ stands for the two-body $K \bar{K} \to \pi \eta$ scattering amplitude, which depends on the invariant mass of the $\pi \eta$ system. It should be noted that in the present work, for the $\rho$ and $K^*$ vector meson propagators, we take \begin{eqnarray} G^{\mu\nu}_V(q^2_V) = \frac{i(-g^{\mu\nu} + q^{\mu}_{V} q^{\nu}_{V}/q^2_{V})}{q_{V}^2-m_{V}^2+im_{V}\Gamma_{V}}, \end{eqnarray} where $m_V$ and $\Gamma_V$ are the mass and width of the vector mesons. The triangle loop integrals in these above amplitudes are ultraviolet divergent, in general one needs to include phenomenological form factors to prevent ultraviolet divergence, as shown in Refs.~\cite{Li:2013zcr,Shen:2016tzq,Wu:2016ypc,Zhang:2018eeo,Liu:2019dqc,Xie:2019iwz,Wang:2020duv}. However, as discussed in Refs.~\cite{Hsiao:2019ait,Du:2019idk}, the ultraviolet divergences in the triangle loop diagrams integrals cancel out (for more details see Ref.~\cite{Achasov:2015uua}), thus we do not need to introduce these form factors in this work. In Ref.~\cite{Hsiao:2019ait} the two-body scattering amplitude $t_{\pi\eta \to \pi \eta}$ is parameterized with the Breit-Wigner form. In this work, we describe the final state interaction between $\pi$ and $\eta$ as well as the interaction between $K$ and $\bar{K}$ with the chiral unitary approach. The scattering amplitudes $t_{\pi \eta \to\pi\eta}$ and $t_{K\bar{K}\to\pi\eta}$ can be obtained by solving the following Bethe-Salpeter equation \begin{equation} t=[1-V G]^{-1} V, \end{equation} where $G$ is the loop function of two mesons and $V$ is the transition potential. The loop function can be regularized by either the dimensional regularization scheme or the cutoff regularization scheme. In this work we employ the dimensional regularization scheme. The potential $V$ is a $2 \times 2$ matrix of coupled channels $K \bar{K}$ and $\pi\eta$. At the leading chiral order, the transition potential $V$ can be explicitly written as~\cite{Oller:1997ti,Xie:2014tma,Liang:2014ama,Liang:2015qva,Xie:2018rqv,Duan:2020vye} \begin{align} V_{K \bar{K} \to K \bar{K}} = -\frac{1}{4 f^{2}} s, ~ V_{K \bar{K} \to \pi \eta} = \frac{\sqrt{6}}{12 f^{2}}\left(3 s-\frac{8}{3} m_{K}^{2}-\frac{1}{3} m_{\pi}^{2}-m_{\eta}^{2}\right), ~ V_{\pi \eta \to \pi \eta} = -\frac{1}{3 f^{2}} m_{\pi}^{2}, \nonumber \end{align} where we take the isospin multiplets as $K = (K^+,K^0)$, $\bar{K}= ( \bar{K^0},-K^-)$, and $\pi = (-\pi^+, \pi^0, \pi)$. Then, solving the Bethe-Salpeter equation with $\mu=1$ GeV, $a(\mu)_{\pi\eta}=-1.522$, $a(\mu)_{\bar{K}K}=-1.499$~\cite{Oller:2000fj}, we obtain a resonance with mass $m=983.2$ MeV and width $\Gamma=105.6$ MeV. This can be associated with the $a_0(980)$ state. With the so-obtained decay amplitudes, one can calculate the invariant mass distributions of $D^+_s\to \eta\pi^+\pi^0$ as a function of $m_{12}^2$ and $m_{23}^2$~\cite{Zyla:2020zbs}: \begin{equation} d\Gamma = \frac{1}{(2 \pi)^{3}} \frac{|\mathcal{A}|^{2}}{32 m_{D_{s}}^{3}} d m_{12}^{2} d m_{23}^{2}, \end{equation} where ${\cal A}$ is the total decay amplitude, which is ${\cal A} = {\cal A}^{\rm tree}_1 + {\cal A}_2^{\rho \eta} + {\cal A}_3^{K^* K}$. One can easily obtain the single differential invariant mass distribution $d\Gamma/dm_{\pi\pi}$ and $d\Gamma/dm_{\pi \eta}$ by integrating over $m_{\pi \eta}$ and $m_{\pi \pi}$ with the limits of the Dalitz Plot, respectively. \section{Numerical Results and Discussion}\label{sec:Results} We first show the theoretical results for the $\pi^+\pi^0$ invariant mass distribution in Fig.~\ref{tree-pipi} in comparison with the BESIII data~\cite{Ablikim:2019pit}. The solid curve stands for the total contributions from the tree diagram and the triangle diagrams, while the dashed curve stands for the contribution from only the tree diagram. The solid curve has been adjusted to the strength of the experimental data of BESIII at its peak~\cite{Ablikim:2019pit}. Since we have considered the tree diagram contribution from the $\rho^+$ meson, one can see that the $\rho^+$ peak can be well reproduced. Furthermore, the high energy points for the $\pi^+ \pi^0$ invariant mass distributions can also be well reproduced by including the contributions from the triangle diagrams. It is interesting to mention that the interference between the tree diagram and triangle diagrams is destructive below $m_{\pi^+\pi^0} = 0.8$ GeV, while above that energy point, the interference is constructive. Besides, with $a_1$, $a_2$, and $a_2'$ determined as specified above, we obtain an absolute branching ratio of $\mathcal{B}\left(D_{s}^{+} \to \pi^{+(0)}\left(a_{0}^{0(+)} \to\right) \pi^{0(+)} \eta\right)=1.45\%$. This is in nice agreement with the BESIII measurement. \begin{figure}[htbp] \centering \includegraphics[scale=0.4]{tree-pipi.eps} \caption{Invariant mass distribution of $\pi^+\pi^0$ for the $D_s^{+}\to \eta(\rho^+\to)\pi^0\pi^{+}$ decay, in comparison with the experimental data taken from Ref.~\cite{Ablikim:2019pit}.}\label{tree-pipi} \end{figure} In Fig.~\ref{pi eta} and Fig.~\ref{pi eta cut}, we show the $\pi^{0}\eta$ and $\pi^{+}\eta$ invariant mass distributions of the decay $D_{s}^{+}\to \pi^{+}\pi^{0}\eta$ without and with the cut of $m_{\pi^+\pi^0}>1$ GeV, respectively. From Fig.~\ref{pi eta}, one can see that the contribution from the tree diagram is predominant. The theoretical results can describe the experimental data rather well, particularly the shoulder around $m_{\pi \eta} \sim 0.8$ GeV. In addition, our theoretical results do not show a pronounced asymmetric peak around $m_{\pi \eta} \sim 0.9$ GeV as in Ref.~\cite{Hsiao:2019ait} (see Fig. 4 of that reference). \begin{figure}[htpb] \centering \includegraphics[scale=0.35]{exp-c.eps}~ \includegraphics[scale=0.35]{exp-d.eps} \caption{Invariant mass distributions of $\pi\eta$ for the $D_s^{+}\to \pi (a_0(980)\to)\pi^0\pi^{+}\eta$ decay, in comparison with the BESIII data~\cite{Ablikim:2019pit}.}\label{pi eta} \end{figure} In Fig.~\ref{pi eta cut}, the dashed curves represent the contributions from the $\rho \eta$ triangle diagrams shown in Fig.~\ref{triangle}, while the blue-dashed curves represent the contributions from the $\bar{K}K^*$ triangle diagrams shown in Fig.~\ref{triangle KK}, and the red-solid curves stand for the sum of the two contributions. From Fig.~\ref{pi eta cut}, one can see that after the $m_{\pi^+\pi^0}>1$ GeV cut, the $a_0(980)$ signal is well reproduced, where it is dynamically generated from the $\pi\eta$ and $K\bar{K}$ coupled channel interactions. However, our results at the $a_0(980)$ peak position are somehow larger than the experimental data, especially for the case of $a_0(980)^+$. It should be noted that in Ref.~\cite{Molina:2019udw}, the $\pi K \bar{K}$ final states were produced at the first step with the internal $W$-emission mechanism, and then the final state interaction of $K\bar{K}$ produces $a_0(980)$, which then decays to $\pi \eta$. Clearly, Ref.~\cite{Molina:2019udw} and the present work share the same mechanism for the final state interactions. As a result, both can describe the $\pi\eta$ line shapes, but the present work also determines the global strength of the $D_s$ decay. In principle, both weak mechanisms may play a role. However, a quantitative consideration of the mechanism of Ref.~\cite{Molina:2019udw} inevitably introduces additional free parameters for the weak interaction, which cannot yet be determined. Hence, we will leave such a study to a future work when more precise experimental data become available. \begin{figure}[htpb] \centering \includegraphics[scale=0.35]{exp-e.eps}~ \includegraphics[scale=0.35]{exp-f.eps} \caption{Invariant mass distributions of $\pi\eta$ with the cut of $m_{\pi^+\pi^0}> 1$ GeV for the decay $D_s^{+}\to \pi (a_0(980) \to)\pi^0\pi^{+}\eta$, in comparison with the BESIII data~\cite{Ablikim:2019pit}.}\label{pi eta cut} \end{figure} It is worthwhile mentioning that in our framework that the $K\bar{K}^*$ contribution is larger than the $\rho\eta$ contribution, while the former was not considered in Ref.~\cite{Hsiao:2019ait}, where the $\rho \eta'$ channel plays an important role and a large coupling for $a_0(980)$ to $\pi \eta'$ is used. However, both in the unitary chiral approach and from the experimental information, it is known that the $\pi\eta'$ coupling to the $a_0(980)$ resonance is small. \begin{figure}[htpb] \centering \includegraphics[scale=0.45]{K+K0.eps} \caption{Invariant $K^+ \bar{K}^0$ mass distribution for the $D_s^+ \to \pi^0 K^+ \bar{K}^0$ decay.}\label{KKbar} \end{figure} In addition, we study the $a_0(980)$ state in the $K\bar{K}$ channel from the $D^+_s \to \pi K \bar{K}$ decay by including the contributions from the triangle diagrams, which can be easily obtained with the replacement of the $\pi \eta$ final state by $K\bar{K}$ in Figs.~\ref{triangle} and \ref{triangle KK}. The resulting predictions for the $K^+\bar{K}^0$ invariant mass distributions are shown in Fig.~\ref{KKbar}, which can serve as a highly non-trivial check of the mechanism proposed in this work. \section{Summary} We studied the $D^+_s\to \pi^+\pi^0\eta$ decay recently analysed by the BESIII Collaboration, where the $D^+_s \to \pi^0 a_0(980)^+$ and $D^+_s \to \pi^+ a_0(980)^0$ decay modes are claimed as the $W$-annihilation dominant processes observed for the first time, and their branching fractions, however, are one order of magnitude larger than those of known $W$-annihilation decays. Inspired by Ref.~\cite{Hsiao:2019ait}, we proposed that the anomalously large branching ratios of these decay modes can be understood via triangle diagrams. At first, the $D^+_s$ meson decays weakly into either $\rho^+\eta$ or $K\bar{K}^*/K^*\bar{K}$. The vector mesons then decay into a pair of pseudoscalar mesons, $\pi\pi$ or $K\pi$. One of them interacts with the pseudoscalar meson from the weak decay of $D^+_s$, and generates dynamically the $a_0(980)$ state. With the weak decay couplings determined by fitting to the experimental branching fractions, our method predicted both the absolute branching ratio of $D_s\to a_0\pi$ and the $\pi\eta$ invariant mass distributions, which are in nice agreement with the BESIII data. For the $D^+_s \to \pi^+ \pi^0 \eta$ decay, the contribution from the tree diagram as shown in Fig.~\ref{tree} is the most dominant. After the cut of $M_{\pi^+\pi^0} >1$ GeV, the contributions of the triangle diagrams are crucial to produce the $a_0(980)$ resonance. In addition, we predicted the $K\bar{K}$ invariant mass distributions of the $D_s\to\pi K\bar{K}$ decay, which can be checked by future experimental measurements. Furthermore, the present work provides a way to estimate the effective weak coupling appearing in the $D_s\to K^*\bar{K}\to K\bar{K}\pi$ vertex. The same mechanism might also be relevant to those of similar processes, such as the $D^+\to \pi^+ K\bar{K}$ and $D^+\to \pi^+ \pi^0 \eta$ reactions~\cite{Duan:2020vye,Ikeno:2021kzf}. \label{sec:Summary} \section*{Acknowledgments} This work is partly supported by the National Natural Science Foundation of China under Grants No. 11735003, No. 11975041, No. 11775148, No. 12075288, and No. 11961141004. It is also supported by the Youth Innovation Promotion Association CAS (2016367).
\section{Introduction} \input{1.intro.tex} \vspace{-2pt} \section{Related Work} \input{2.related.tex} \vspace{-2pt} \section{The Proposed Method} \input{3.method.tex} \vspace{-3pt} \section{Experiments} \input{4.experiment.tex} \section{Conclusion} \input{5.conclusion.tex} \bibliographystyle{plain} {\footnotesize \subsection{Problem Definition} Assuming we have a set of heterogeneous multivariate time series from $N$ individuals, i.e., $\{{\bm{X}}_i\}_{i=1}^N$, with each consisting of $S$ time series of length $T$, denoted as ${\bm{X}}_i=({\bm{x}}^1_i,{\bm{x}}^2_i,\dots,{\bm{x}}^{S}_i)^\mathsf{T}\in\mathbb{R}^{S\times{T}}$, where ${\bm{x}}_i^s=(x_{i,1}^s,x_{i,2}^s,\dots,x_{i,T}^s)^\mathsf{T}\in\mathbb{R}^{T}$ represents the $s$-th time series of the $i$-th individual. \revise{One of the $S$ series ${\bm{x}}^{1:S}_i$ is taken as the target series ${\bm{y}}_i$, and the others are taken as the exogenous series.} We aim to train a model that (1) reconstructs Granger causal structures among variables for each individual; (2) generates $K$ common structures among all the $N$ individuals, each structure represented by \revise{a vector ${\bm{p}}_k\in\mathbb{R}^S,k=1,...,K$, with each element representing the Granger contribution of each variable towards the target}; and (3) learns a nonlinear mapping to predict the next value of the target variable series for each individual, i.e., $\hat{y}_{i,T+1}=\mathcal{F}({\bm{x}}^{1:S}_i)$. \subsection{Network Architecture}\label{sec:net} Our InGRA framework consists of two parts: a set of parallel encoders, each predicting the target given the past observations, and an attention mechanism that quantifies variable-wise contributions towards prediction. \begin{figure}[t] \centering \includegraphics[width=0.5\textwidth]{ingra.pdf} \caption{The overview of the InGRA framework.} \label{fig:framework} \vspace{-2pt} \end{figure} As illustrated in Figure~\ref{fig:framework}, for any input multivariate time series ${\bm{X}}_i$, the LSTM encoder specific to $s$-th variable projects the time series ${\bm{x}}_i^s$ into a sequence of hidden state, denoted as ${\bm{h}}_{i,t}^s=\mathcal{H}_s(x_{i,t}^s,{\bm{h}}_{i,t-1}^s)$. The last hidden states, $\{{\bm{h}}_{i,T}^s\}_{s=1}^S$, are used as the hidden embeddings. Then the predicted next value of the target variable conditioned on historical data of variable $s$, denoted as $\hat{y}_{i,T+1}^s$, can be computed by $\hat{y}_{i,T+1}^s=f_s(\mathbf{h}_{i,T}^s)$, where $f_s(\cdot)$ denotes the MLP network specific to variable $s$. Then we obtain the prediction $\hat{y}_{i,T+1}$ by aggregating the predicted values specific to variables through the prototypical Granger causal attention described below. \subsection{Prototypical Granger Causal Attention} We propose a novel attention mechanism in InGRA, namely prototypical Granger causal attention, to detect Granger causal relationships for each individual and uncover common causal structures among heterogeneous individuals. \revise{The goal is to learn attentions for each individual, so that the attention vectors can reflect the Granger causal strength between the $N-1$ exogenous variables and the target variable, and generate a group of prototypical vectors capturing the shared commonality among different individuals.} The idea of the prototypical Granger causal attention mechanism is as follows. The Granger causal attribution corresponding to each individual is first computed according to the concept of Granger causality (Figure~\ref{fig:gc}), followed by the prototype learning that summarizes common causal structures for heterogeneous individuals in the training set, and produces the prototypical attention vector (Figure~\ref{fig:proto}). The details of these two parts are described below. \subsubsection{Granger Causal Attribution} Granger causality~\cite{granger1969,granger1980testing} is a concept of causality based on prediction, which declares that if a time series ${\bm{x}}$ Granger-causes a time series ${\bm{y}}$, then ${\bm{y}}$ can be better predicted using all available information than if the information apart from ${\bm{x}}$ had been used. As illustrated in Figure~\ref{fig:gc}, we obtain the Granger causal attributions by comparing the prediction error when using all available information with the error when using the information excluding one variable series. In particular, given all the hidden embeddings $\{{\bm{h}}_{i,T}^s\}_{s=1}^S$ of the $i$-th individual, we obtain the embedding that encodes all available information and the one that encodes all available information excluding one variable $s$, denoted as ${\bm{h}}^{all}_i$ and ${\bm{h}}_i^{all\backslash{s}}$ respectively, by concatenating the embeddings of corresponding variables: \begin{align} &{\bm{h}}^{all}_i=[{\bm{h}}_{i,T}^j]_{j=1}^S,\quad {\bm{h}}_i^{all\backslash{s}}=[{\bm{h}}_{i,T}^j]_{j=1,j\not=s}^S, \end{align} where $[\cdot]$ represents the concatenation operation. Then we feed them into respective predictors, denoted as $g_{all}(\cdot)$ and $g_s(\cdot)$, to get the predicted value of target and compute the squared errors: \begin{align} \hat{y}_{i,T+1}^{all}=g_{all}({\bm{h}}_i^{all}),&\quad\hat{y}_{i,T+1}^{all\backslash{s}}=g_{s}({\bm{h}}_i^{all\backslash{s}}),\\ \varepsilon_i^{all}=(\hat{y}_{i,T+1}^{all}-y_{i,T+1})^2,&\quad\varepsilon_i^{all\backslash{s}}=(\hat{y}_{i,T+1}^{all\backslash{s}}-y_{i,T+1})^2, \end{align} where the predictor $g_{all}(\cdot)$ and $g_s(\cdot)$ can be MLP networks. Inspired by~\cite{schwab2019granger}, we define the Granger causal attribution of the target variable corresponding to the $s$-th variable as the decrease in error when adding the $s$-th series to the set of available information, computed as: \begin{equation}\label{eq:granger_dec} \Delta\varepsilon_{i}^s=ReLU(\varepsilon^{{all}\backslash{s}}_i-\varepsilon_{i}^{all}), \end{equation} where $ReLU(\cdot)$ is the rectified linear unit. \revise{Since the error decrease is supposed to be a non-negative value, we use $ReLU(\cdot)$ to constrain the non-negativity during the training phase}. For each individual $i$, by normalising the Granger causal attribution, we obtain an attention vector, denoted as $\pmb{q}_i$. The attention factor for the $s$-th variable can be computed as: \begin{equation}\label{eq:granger_att} q_i^s=\frac{\Delta\varepsilon_{i}^s}{\sum_{j=1}^S\Delta\varepsilon_{i}^j}. \end{equation} We can conclude from Equation~(\ref{eq:granger_dec}) and (\ref{eq:granger_att}) that if adding the $s$-th series to the existing time series does not improve the accuracy, then the attention factor $q_i^s$ is zero and the $s$-th time series is Granger noncausal for the target series. The attention factors in Equation (\ref{eq:granger_att}) can capture Granger causality, thus, we refer to the attention mechanism as Granger causal attention. \subsubsection{Prototype Learning} \begin{figure}[t] \centering \includegraphics[width=0.6\linewidth]{granger_causal_v2.pdf} \caption{The Granger causal attention mechanism.} \label{fig:gc} \end{figure} \begin{figure}[t] \centering \includegraphics[width=0.8\linewidth]{prototype_model.pdf} \caption{The Prototypical Granger Causal Attention.} \label{fig:proto} \vspace{-5pt} \end{figure} The Granger causal attention above is not robust enough to reconstruct Granger causal structure, given limited data (e.g., very short time series) of each individual in training. We address the problem by generating Granger causal prototypes from all the individuals, under the assumption that there should be several common causal structures among heterogeneous individuals. The overview of the prototypical attention is illustrated in Figure~\ref{fig:proto} \revise{In particular, we assume there exist $K$ common Granger causal structures, namely Granger causal prototypes, denoted as $\{{\bm{p}}_k\}_{k=1}^K$. The prototype ${\bm{p}}_k\in\mathbb{R}^S$ is a parameter vector to be optimized . The goal is to output one prototype most similar to the Granger causal attention. Thus, we first compute the similarity between the Granger causal attention vector $\pmb{q}_i$ of individual $i$ and each prototype vectors ${\bm{p}}_k$:} \begin{equation} d_{k,i}=\frac{{\bm{p}}_k\cdot\pmb{q}_i}{\|{\bm{p}}_k\|\|\pmb{q}_i\|}, \end{equation} Then we output a prototype most similar to ${\bm{q}}_i$ by sampling from the similarity distribution ${\bm{d}}_i$ using Gumbel-Softmax~\cite{maddison2016concrete,jang2016categorical} : \begin{equation} {\bm{e}}=\text{GumbelSoftmax}({\bm{d}}_i)=\text{softmax}((\log({\bm{d}}_i)+{\bm{g}})/\tau), \end{equation} where $\text{GumbelSoftmax}(\cdot)$ denotes the Gumbel-Softmax function, ${\bm{e}}\in\mathbb{R}^K$ is the sample vector which approaches one-hot, and ${\bm{g}}$ is a vector of i.i.d. samples drawn from Gumbel$(0, 1)$ distribution. The parameter $\tau$ is the softmax temperature, and the distribution becomes discrete when $\tau$ goes to 0. With the sample vector ${\bm{e}}$, the output prototype $\hat{{\bm{p}}}$ can be obtained as $\hat{{\bm{p}}} = [{\bm{p}}_1,{\bm{p}}_2,\dots,{\bm{p}}_K]\cdot{\bm{e}}.$ After normalizing the sampled prototype, we obtain an attention vector for individual $i$, denoted as ${\bm{r}}_i$, namely prototypical attention. The Granger causal attention reflects the Granger causal structure specific to each individual, while the prototypical attention reflects one common Granger causal structure most similar to the Granger causal structure of each individual. To detect the specific and common causal structures simultaneously, we summarize them together and generate the prototypical Granger causal attention ${\bm{a}}_i$ as follows: \begin{equation} {\bm{a}}_i = \alpha\pmb{q}_i+(1-\alpha)\pmb{r}_i, \label{eq:att} \end{equation} where $\alpha\in[0,1]$ is a hyperparameter that controls the ratio of the two attention mechanism. Finally, the prediction of the target variable's next value can be computed as the weighted sum of the predicted values from all variables: \begin{equation}\label{eq:pred_y} \hat{y}_{i,T+1}=\sum_{s=1}^S{a_i^s}\hat{y}_{i,T+1}^s. \end{equation} In practice, we notice that if the data is sparse and the prototype learning module can help enhance the information sharing. However, if the data is abundant then the incremental improvements brought by this module are marginal and we can discard it for both simplicity and efficiency. \vspace{-2pt} \subsection{The Algorithm} In order to obtain accurate prediction and Granger causality structure, and generate diverse common causality structures, the objectives of InGRA consist of three parts. The first two objective functions are to encourage accurate predictors, including the predictors $f(\cdot)$ to perform final prediction and the auxiliary predictors $g(\cdot)$ to compute Granger attribution, and we adopt the the mean squared error (MSE) as the prediction loss function: \begin{equation}\label{eq:pre_loss} \mathcal{L}_\text{pred}=\frac{1}{N}\sum_{i=1}^N(\hat{y}_{i,T+1}-y_{i,T+1})^2, \mathcal{L}_\text{aux}=\frac{1}{N}\sum_{i=1}^N(\varepsilon_i^{all}+\sum_{s=1}^s\varepsilon_i^{all\backslash{s}}). \end{equation} The last objective function is to avoid duplicate prototypes by a diversity regularization term that penalizes on prototypes that are similar to each other~\cite{ming2019interpretable}: \begin{equation} \mathcal{L}_\text{div}=\sum_{i=1}^K\sum_{j=i+1}^K\max(\gamma,\frac{{\bm{p}}_i\cdot\pmb{p}_j}{\|{\bm{p}}_i\|\|\pmb{p}_j\|}), \end{equation} where $\gamma$ controls the closeness to a tolerable degree. To summarize, the loss function, denoted by $\mathcal{L}$, is given by: \begin{equation} \mathcal{L}=\mathcal{L}_\text{pred}+\lambda_1\mathcal{L}_\text{aux}+\lambda_2\mathcal{L}_\text{div}, \end{equation} where $\lambda_1$ and $\lambda_2$ are hyperparameters that adjust the ratios between the losses. We adopt stochastic gradient descent (SGD) to optimize the network parameters and the prototype parameters. To initialize the prototypes, we first pretrain InGRA for several epochs, and then employ $k$-means with cosine similarity on the Granger causal attentions $\{{\bm{q}}\}_{i=1}^N$, and finally we take the cluster centers as the initial prototypes. \revise{In the implementation, given a long MTS of length $L$, we first slide a window of length $T+1$ over the input MTS to generate series data $\{{\bm{x}}^s_{i,t:t+T}\}_{t=1}^{L-T}$, and then split the dataset into training and testing sets. We train our model on the training set, and obtain the network parameters and prototype parameters. By feeding the testing set into the trained InGRA model, we obtain the Granger causal attention ${\bm{q}}_i$ by Equation ~(\ref{eq:granger_att}) and the predicted value $\hat{y}_{i,T+1}$ according to Equation ~(\ref{eq:pred_y}).} \subsection{Experimental Setup} We first evaluate the Granger causal structure recovery performances on homogeneous MTS with two causal benchmark datasets. \textbf{Finance}\footnote{http://www.skleinberg.org/data.html} \cite{kleinberg2009causality} consists of simulated financial market time series with known underlying causal structures. Each dataset includes 25 variables of length 4,000. For each dataset, we choose variables that are related to the most causes as the target variables to test model abilities in the relatively most challenging scenarios. \textbf{FMRI}\footnote{We use the processed FMRI data provide by ~\cite{nauta2019tcdf}.}~\cite{smith2011network} contains 28 different Blood-oxygen-level dependent time series datasets with the ground-truth causal structures. We use the first 5 datasets and take the first variable as the target as causal variables distribute relatively evenly in this dataset. We evaluate the performance on heterogeneous MTS with the following synthetic data. \textbf{Synthetic data}: We first obtain the $S$ time series through the following Non-linear Autoregressive Moving Average (NARMA)~\cite{atiya2000new} generators: \begin{equation}\small x_{i,t}^s = {\alpha_s}x_{i,t-1}^s + {\beta_s}x_{i,t-1}^s\sum_{j=1}^{d}x_{i,t-j}^s + {\gamma_s}\varepsilon_{i,t-d}\varepsilon_{i,t-1} + \varepsilon_{i,t}, \label{eq:syn1} \end{equation} where $\varepsilon_{i,t}$ are zero-mean noise terms of 0.01 variance, $d$ is the order of non-linear interactions, and $\alpha_s$, $\beta_s$ and $\gamma_s$ are parameters specific to variable $s$, generated from $\mathcal{N}(0,0.1)$. Then, we generate the target series from the generated exogenous series via the formula: \begin{equation}\small y_{i,t}=\sum_{s=1}^S{\omega_i^s(\pmb{\eta}_i^s})^\mathsf{T}\tanh{({\bm{x}}_{i,t-p:t-1}^s)}+\varepsilon_{i,t}, \label{eq:syn2} \end{equation} where $\omega_i^s\in\{0,1\}$ controls the underlying causal relationship from the $s$-th variable to the target variable, $\pmb{\eta}_i^s\in\mathbb{R}^p$ controls the causal strength sampling from $\mbox{Unif}\{-1, 1\}$, and ${\bm{x}}_{i,t-p:t-1}^s\in\mathbb{R}^p$ represents the last $p$ historical values of variable $s$ of sample $i$. The 0-1 indicator vector $\pmb{\omega}_i=(\omega_i^1,\omega_i^2,\dots,\omega_i^S)^\mathsf{T}\in\mathbb{R}^S$ is the ground-truth causal structure of $i$-th individual. We compare our method with previous causal discovery methods including linear Granger causality~\cite{granger1969,lutkepohl2005new} and TCDF~\cite{nauta2019tcdf}, as well as the interpretable neural network based prediction method, i.e., IMV-LSTM~\cite{guo2019exploring}, using the standard metrics of Average Precision (AP), and Area Under the ROC Curve (ROC-AUC)~\cite{fawcett2006introduction}. \begin{itemize}[leftmargin=*] \item\textbf{Linear Granger}~\cite{granger1969,granger1980testing}: We conduct a Granger causality test in the context of Vector Autoregression (VAR) as described in chapter 7.6.3 in ~\cite{lutkepohl2005new} and implemented by the Statsmodels package~\cite{seabold2010statsmodels}. In detail, we perform F-test at 5\% significance level. The maximum number of lags to check for order selection is set to 5, which is larger than the causal order in the ground-truth. \item\textbf{TCDF}~\cite{nauta2019tcdf}: TCDF\footnote{\url{https://github.com/M-Nauta/TCDF}} learns causal structure on multivariate time series by attention-based convolutional neural networks combined with a causal validation step. We follow the default settings as described in~\cite{nauta2019tcdf} . \item\textbf{IMV-LSTM}~\cite{guo2019exploring}: IMV-LSTM\footnote{\url{https://github.com/KurochkinAlexey/IMV_LSTM}} is a multi-variable attention-based LSTM model capable of both prediction and variable importance interpretation, with the attention factors reflecting importance of variables in prediction. Thus, we take the learnt attention vectors as the Granger causal weights in the experiment. IMV-LSTM is implemented by Adam optimizer with the mini-batch size 64, hidden layer size 128 and learning rate 0.001. \end{itemize} \subsection{ Performance on Homogeneous MTS} To evaluate the Granger causal discovery performance on homogeneous multivariate time series, we train individual models for each dataset with the hyper-parameter $\alpha$ equaling 0.5. We report AP and ROC-AUC averaged across all datasets, with the standard deviation reported in Table~\ref{tab:single}. As can be seen, the proposed method greatly surpasses other methods. Especially, InGRA recovers the ground-truth causal structure with high scores on the Finance data. \begin{table}[h] \centering \setlength\abovecaptionskip{0pt} \caption{Granger causal structure reconstruction results on Finance and FMRI data.} \label{tab:single} \resizebox{\linewidth}{!}{ \begin{tabular}{@{}ccccc@{}} \toprule \multirow{2}{*}{Methods} & \multicolumn{2}{c}{Finance (9 datasets)} & \multicolumn{2}{c}{FMRI (5 datasets)} \\ \cmidrule(l){2-5} & AP & ROC-AUC & AP & ROC-AUC \\ \midrule IMV-LSTM & 0.778$\pm$0.222 & 0.862$\pm$0.172 & 0.593$\pm$0.239 & 0.620$\pm$0.136 \\ linear Granger & 0.187$\pm$0.036 & 0.652$\pm$0.084 & 0.492$\pm$0.310 & 0.654$\pm$0.126 \\ TCDF & 0.478$\pm$0.263 & 0.766$\pm$0.145 & 0.540$\pm$0.250 & 0.664$\pm$0.099 \\ InGRA & \textbf{1.000$\pm$0.000}$^{**}$ & \textbf{1.000$\pm$0.000}$^{*}$ & \textbf{0.641$\pm$0.327} & \textbf{0.740$\pm$0.122} \\ \bottomrule \end{tabular}}\\ \footnotesize{$^{**}$ and $^{*}$ denotes the p-value is less than 1\% and 5\% respectively.} \setlength\belowcaptionskip{-5pt} \end{table} \vspace{-5pt} \subsection{ Performance on Heterogeneous MTS} \revise{We evaluate the Granger causal discovery performance and the inductive capacity on heterogeneous multivariate time series. We denote the number of common causal structures as $C$, the number of variables as $S$ and the series length as $T$, and generate $100$ multivariate time series for each common causal structure according to Equation (\ref{eq:syn1}) and Equation (\ref{eq:syn2}), forming 100$C$ datasets, with 20\% datasets as unseen series and others as training series. For the inductive methods InGRA and IMV-LSTM, we train one model using all the training series, while for other methods, we train separate models for each dataset.} \begin{table*}[] \centering\setlength\abovecaptionskip{0pt} \caption{Granger causal structure reconstruction results w.r.t the variable number ($C$=3, $T$=1000).} \label{tab:S} \resizebox{0.9\textwidth}{!}{\begin{tabular}{@{}ccccccccc@{}} \toprule \multirow{2}{*}{Methods} & \multicolumn{2}{c}{$S$=5} & \multicolumn{2}{c}{$S$=10} & \multicolumn{2}{c}{$S$=20} \\ \cmidrule(l){2-7} & AP & ROC-AUC & AP & ROC-AUC & AP & ROC-AUC \\ \midrule IMV-LSTM & 0.511$\pm$0.102 & 0.500$\pm$0.236 & 0.536$\pm$0.056 & 0.514$\pm$0.019 & 0.599$\pm$0.087 & 0.619$\pm$0.087 \\ linear Granger & 0.666$\pm$0.107 & 0.822$\pm$0.075 & 0.765$\pm$0.109 & 0.889$\pm$0.063 & 0.826$\pm$0.106 & 0.854$\pm$0.080 \\ TCDF & 0.523$\pm$0.103 & 0.523$\pm$0.214 & 0.548$\pm$0.165 & 0.587$\pm$0.180 & 0.584$\pm$0.162 & 0.642$\pm$0.152 \\ \midrule InGRA ($\alpha=1$) & 0.886$\pm$0.177$^{**}$ & 0.906$\pm$0.143$^{**}$ & 0.974$\pm$0.038$^{**}$ & 0.975$\pm$0.037$^{**}$ & 0.830$\pm$0.108 & 0.883$\pm$0.069$^{**}$ \\ InGRA ($\alpha=0.5$) & \textbf{0.911$\pm$0.147}$^{**}$ & \textbf{0.922$\pm$0.122}$^{**}$ & \textbf{0.998$\pm$0.009}$^{**}$ & \textbf{0.999$\pm$0.008}$^{**}$ & \textbf{0.858$\pm$0.103}$^{*}$ & \textbf{0.939$\pm$0.050}$^{**}$ \\\bottomrule \end{tabular}} \\ {\footnotesize{$^{**}$ denotes the p-value is less than 1\%, and $^{*}$ denotes the p-value is less than 5\%.}} \centering \end{table*} \begin{table*}[] \centering \setlength\abovecaptionskip{0pt}\setlength{\abovecaptionskip}{0pt} \setlength{\belowcaptionskip}{0pt} \caption{Granger causal structure reconstruction results w.r.t the series length ($C$=3, $S$=10).} \label{tab:T} \resizebox{0.9\textwidth}{!}{\begin{tabular}{@{}ccccccccc@{}} \toprule \multirow{2}{*}{Methods} & \multicolumn{2}{c}{$T$=20} & \multicolumn{2}{c}{$T$=100} & \multicolumn{2}{c}{$T$=1000} \\ \cmidrule(l){2-7} & AP & ROC-AUC & AP & ROC-AUC & AP & ROC-AUC \\ \midrule IMV-LSTM & 0.467$\pm$0.025 & 0.541$\pm$0.035 & 0.503$\pm$0.081 & 0.511$\pm$0.018 & 0.536$\pm$0.056 & 0.514$\pm$0.019 \\ linear Granger & 0.400$\pm$0.000 & 0.500$\pm$0.000 & 0.889$\pm$0.152 & 0.943$\pm$0.085 & 0.765$\pm$0.109 & 0.889$\pm$0.063 \\ TCDF & 0.518$\pm$0.131 & 0.513$\pm$0.112 & 0.517$\pm$0.120 & 0.544$\pm$0.166 & 0.548$\pm$0.165 & 0.587$\pm$0.180 \\ \midrule InGRA ($\alpha=1$) & 0.790$\pm$0.142$^{**}$ & 0.793$\pm$0.150$^{**}$ & 0.973$\pm$0.038$^{**}$ & 0.974$\pm$0.038$^{*}$ & 0.974$\pm$0.038$^{**}$ & 0.975$\pm$0.037$^{**}$ \\ InGRA ($\alpha=0.5$) & \textbf{0.824$\pm$0.123}$^{**}$ & \textbf{0.833$\pm$0.117}$^{**}$ & \textbf{0.973$\pm$0.040}$^{**}$ & \textbf{0.976$\pm$0.036}$^{**}$ & \textbf{0.998$\pm$0.009}$^{**}$ & \textbf{0.999$\pm$0.008}$^{**}$ \\\bottomrule \end{tabular}}\\ {\footnotesize{$^{**}$ denotes the p-value is less than 1\%, and $^{*}$ denotes the p-value is less than 5\%.}} \end{table*} \begin{table*}[t!] \centering\setlength\abovecaptionskip{0pt} \caption{Granger causal structure reconstruction results w.r.t. the common structure number $C$ ($S$=10, $T$=1000). We set the hyper-parameter of prototype number $K$ in the model as the same as the ground-truth common structure number $C$.} \label{tab:K} \resizebox{0.8\textwidth}{!}{ \begin{tabular}{@{}ccccccc@{}} \toprule \multirow{2}{*}{Methods} & \multicolumn{2}{c}{$C$=3} & \multicolumn{2}{c}{$C$=5} & \multicolumn{2}{c}{$C$=7} \\ \cmidrule(l){2-7} & AP & ROC-AUC & AP & ROC-AUC & AP & ROC-AUC \\ \midrule InGRA($\alpha=1$) & 0.974$\pm$0.038 & 0.975$\pm$0.037 & 0.891$\pm$0.118 & 0.883$\pm$0.128 & 0.838$\pm$0.118 & 0.850$\pm$0.113 \\ InGRA($\alpha=0.5$) & 0.998$\pm$0.009 & 0.999$\pm$0.008 & 0.924$\pm$0.091 & 0.913$\pm$0.105 & 0.851$\pm$0.113 & 0.855$\pm$0.099 \\ \bottomrule \end{tabular}} \end{table*} We report AP and ROC-AUC results w.r.t the variable number, the series length and the common structure number in Table~\ref{tab:S} to~\ref{tab:K}, respectively. We observe that InGRA outperforms other methods significantly in all cases, and InGRA ($\alpha=0.5$) (with the Prototypical Granger causal attention) performs better than InGRA ($\alpha=1$) (only with Granger causal attention). The observations demonstrate the superior causal discovery performance of InGRA, the effectiveness of the prototypical Granger causal attention in InGRA, and the advantages of utilizing shared commonalities among heterogeneous MTS. Regarding the other competitors, linear Granger performs the best followed by TCDF and IMV-LSTM at most cases. The possible reason is that linear Granger can detect Granger causal relations to some extent, though it utilizes linear model, i.e., Vector autoregression (VAR). TCDF utilizes attention-based CNN to inference potential causals followed by a causal validation step, but the attention it proposed cannot reflect Granger causality, thus achieves unsatisfactory performance. Compare to the performance on homogeneous multivariate time series, the performance of IMV-LSTM drops dramatically, which indicates that the attention mechanism in IMV-LSTM fails given heterogeneous multivariate time series. In Table~\ref{tab:S}, we vary the number of variables to generate datasets of different complexity, and we can see that InGRA outperforms other competitors consistently across different $S$, and achieves good performance when $S$ is as large as 20, demonstrating our method's capability to infer complex causal structures. Since in practice, the size of collected data is often limited, which poses challenges to recover causal structure, thus we also vary the length of time series to see the model robustness to data of small sizes. As can be seen in Table~\ref{tab:T}, InGRA outperforms other methods across all cases, even when $T$ is as small as 20, which demonstrates that advantage of using shared information. We also observe that InGRA ($\alpha=0.5$) surpasses InGRA ($\alpha=1$) by a large margin, which demonstrates the learning prototypical attention can alleviate the over-fitting problem. In Table~\ref{tab:K}, we control the causal heterogeneity by varying the number of common causal structures $C=\{3,5,7\}$. We observe that the performance of InGRA decreases with increasing $C$. \begin{figure}[] \centering\setlength{\abovecaptionskip}{0pt} \setlength{\belowcaptionskip}{-5pt} \includegraphics[width=0.5\linewidth]{tsne_5.pdf} \caption{2D t-SNE projections of attention vectors from 500 individuals. Color of a node indicates the underlying causal structures. The causal groundtruth $\pmb{\omega}_i$ is shown in the legend ($S$=10,$T$=100).} \label{fig:tsne} \end{figure} \vspace{-5pt} \begin{figure}[] \centering\setlength{\abovecaptionskip}{-5pt} \setlength{\belowcaptionskip}{-10pt} \centering \includegraphics[width=0.7\linewidth]{proto_5_v2.eps} \caption{The visualization of prototypes and ground-truth causal structures. Plots are shown for various number of common causal structures $C$ ($S$=10, $T$=1000). Each column of the heat map visualizes one structure.} \label{fig:vis_proto} \vspace{-10pt} \end{figure} \subsection{Visualization} \subsubsection{Visualization of Learned Structures} In Figure~\ref{fig:tsne}, we map the learned causal attention vectors to a 2D space by the visualization tool t-SNE~\cite{maaten2008visualizing}. Individuals of different causal structures are labeled by different colors. From the results, we observe that nodes belonging to the same causal structures are clustered together, which also demonstrates the effectiveness of our method. \subsubsection{Visualization of Learned Prototypes} We visualize the the learned prototypes and the ground-truth causal structures in Figure~\ref{fig:vis_proto}. In this experiments, we set the hyper-parameter of prototype number $K$ equal to the ground-truth common structure number $C$. From the results, we can see that the learned prototypes are similar to the ground-truth causal structures, which demonstrates the learned prototypes are interpretable. \vspace{-1pt} \subsection{Online A/B Tests} In order to further evaluate the effectiveness of InGRA in practice, an online A/B test is conducted on an E-commercial platform, and the process is designed as follows: We first train InGRA on the historical MTS of 30,665 items. Each MTS includes $26$ variables related to searching, recommending and advertising, such as Page View (PV), Gross Merchandise Volume (GMV) and Impression Position In-Page, etc. Here, we take the item popularity as the target series, and generate the underlying causal structure for each item. We sample 100 items whose impression position in-page Granger-causes the item popularity with high confidence, and divide them into two buckets randomly. For Bucket A, we adjust the impression positions in-page of each item by one grid since 2019/08/19 till 2019/08/29, and ensure the intervention has little impact on other variables. For Bucket B, we do nothing. As shown in Figure~\ref{fig:online}, four days after the beginning of the intervention, the item popularity improvement rate of Bucket A consistently outperforms that of Bucket B, and the gap between the two buckets increases significantly since 2019/08/25, which shows that the intervention, i.e., adjusting the impression positions in-page, causes the improvement on item popularities, thus demonstrates the right causal relationships detected by InGRA. \begin{figure}[] \centering\setlength{\abovecaptionskip}{0pt} \includegraphics[width=0.9\linewidth]{online.pdf} \caption{The result of online A/B test. The intervention starts from 08/19, and results in the item popularity improvement rate of Bucket A consistently outperforming Bucket B after 8/22, and the gap between the two buckets increases significantly since 08/25. } \setlength{\belowcaptionskip}{-10pt} \vspace{-4pt} \label{fig:online} \end{figure}
\section{Introduction} The Wasserstein distance, also known as Monge--Kantorovich distance, is used in optimal transport theory to describe and characterize optimal transitions between probability measures. They are characterized by the lowest (or cheapest) average costs to fully transfer a probability measure into another. The costs are most typically proportional to the distance of locations to be connected. \citet{RachevRueschendorf} provide a comprehensive discussion of the Wasserstein distance and \citet{Villani2009} summarizes the optimal transport theory. The nested distance is based on the Wasserstein distance. It has been introduced by \citet{Pflug2009} and generalizes and extends the theory from probability measures to stochastic processes, cf.\ \citet{PflugPichler2011}. The nested distance is employed in multistage stochastic programming to describe the quality of an approximation. Multistage stochastic programming has applications in many sectors, e.g., the financial sector (\citet{Edir05}, \citet{Brodt1983}), in management science or in energy economics (\citet{AnaluiPflug}, \citet{Welington2017, Carpentier, Carpentier2015}). The prices, demands, etc., are often modeled as a stochastic process $\xi=(\xi_0,\dots,\xi_T)$ and the optimal values are rarely obtained analytically. For the numerical approach the stochastic process is replaced by a finite valued stochastic scenario process $\tilde\xi=(\tilde\xi_0,\dots,\tilde\xi_T)$, which is a finite tree. Naturally, the approximation error should be minimized without unnecessarily increasing the complexity of the computational effort. \citet{KiruiPichler} provide a Julia package for generating scenario trees and scenario lattices for multistage stochastic programming. \citet{MaggioniPflug} provide guaranteed bounds and \citet{KopaVitali2020} investigate corresponding reduction techniques. This paper addresses the \emph{Sinkhorn divergence} in place of the Wasserstein distance. This pseudo-distance is also called \emph{Sinkhorn distance} or \emph{Sinkhorn loss}. In contrast to the exact implementation \citet{Bertsekas1989}, e.g., Sinkhorn divergence corresponds to a regularization of the Wasserstein distance, which is strictly convex and which allows to improve the efficiency of the computation by applying Sinkhorn's (fixed-point) iteration procedure. The relaxation itself is similar to the modified objective of interior-point methods in numerical optimization. A cornerstone is the theorem by \citet{Sinkhorn1967a} that shows a unique decomposition for non-negative matrices and ensures convergence of the associated iterative scheme. \citet{Cuturi2013} has shown the potential of the Sinkhorn divergence and made it known to a wider audience. Nowadays, Sinkhorn divergence is used in statistical applications, cf.\ \citet{BigotCazelles2019} and \citet{Luise2018Differential}, for image recognition and machine learning, cf.\ \citet{Kolouri2017} and \citet{PeyreAude2018}, among many other applications. Extending Sinkhorn's algorithm to multistage stochastic programming has been proposed recently in \citet[Section~5.2.3, pp.~97--99]{Tran2020}, where a numerical example indicating computational advantages is also given. This paper resumes this idea and assesses the entropy relaxed nested distance from theoretical perspective. We address its approximating properties and derive its convex conjugate, the dual. As well, numerical tests included confirm the computational advantage regarding the simplicity of the implementation as well as significant gains in speed. \paragraph{Outline of the paper.} The following Section~\ref{sec:Preliminaries} introduces the notation and provides the definitions to discuss the nested distance. Additionally, the importance of the filtration and the complexity of the computation is shown. Section~\ref{sec:SinkhornDistance} introduces the Sinkhorn divergence and derive its dual. In Section~\ref{sec:EntropyRegularizedNestedDistance} we regularize the nested distance and show the equality between two different approaches. Results and comparisons are visualized and discussed in Section~\ref{sec:Experiments}. Section~\ref{sec:Summary} summarizes and concludes the paper. \section{Preliminaries}\label{sec:Preliminaries} This section recalls the definition of the nested distance and provides an example to illustrate the importance of the filtration. Throughout, we shall work on a probability space~\((\Xi, \mathcal F, P)\). \subsection{Wasserstein distance} The Wasserstein distance is a distance for probability measures. It is the building block for the process distance and its regularized version, which we address here, the Sinkhorn divergence. The Sinkhorn divergence is not a distance in itself. To point out the differences we highlight the defining elements. \begin{definition}[Distance of measures]\label{def:Distance} Let~$\mathcal P$ be a set of probability measures on $\Xi$. A function $d\colon\mathcal P\times\mathcal P\to[0,\infty)$ is called \emph{distance}, if it satisfies the following conditions: \begin{enumerate} \item\label{enu:Nonnegativity} Nonnegativity: for all $P_1$, $P_2\in\mathcal P$, \[ d(P_1,P_2)\geq 0; \] \item Symmetry: for all $P_1$, $P_2\in\mathcal P$, \[ d(P_1,P_2)= d(P_2,P_1);\] \item\label{enu:Triangle} Triangle Inequality: for all $P_1$, $P_2$ and $P_{3}\in\mathcal P$, \[ d(P_1,P_2)\leq d(P_1,P_3)+d(P_3,P_2);\] \item\label{enu:Strict} Strictness: if $d(P_1,P_2)=0$, then $P_1=P_2$. \end{enumerate} \end{definition} \citet{Rachev} presents a huge variety of probability metrics. Here, we focus on the Wasserstein distance, which allows a generalization for stochastic processes. For this we assume that the sample space~\(\Xi\) is equipped with a metric~\(d\) so that~\((\Xi,d)\) is Polish. \begin{definition}[Wasserstein distance] Let~$P$ and~$\tilde P$ be two probability measure on $\Xi$ endowed with a distance $d\colon\Xi\times\Xi\to\mathbb R$. The \emph{Wasserstein distance} of order $r\geq1$ is \[ d^r(P,\tilde P)\coloneqq\inf_\pi \iint_{\Xi\times\Xi}d(\xi,\tilde\xi)^r\,\pi(\mathrm d\xi,\mathrm d\tilde\xi), \] where the infimum is over all probability measures $\pi$ on $\Xi\times\Xi$ with marginals $P$ and $\tilde P$, respectively. \end{definition} \begin{remark}[Distance versus cost functions] The definition of the Wasserstein distance presented here starts with a distance~$d$ on $\Xi$ and the Wasserstein distance is a distance on $\mathcal P$ in the sense of Definition~\ref{def:Distance} above. However, in what follows \emph{any} cost function $c\colon \Xi\times\Xi\to\mathbb R$ could be considered instead of the distance~$d$ on $\Xi$ (of course,~$c$ has to be measurable and the integral has to exist). The result might not be a distance in the sense of Definition~\ref{def:Distance}. In what follows we will point to the differences. \end{remark} In a discrete framework, probability measures are of the form \(P=\sum\nolimits _{i=1}^np_i\,\delta_{\xi_i}\) with $p_i\geq0$ and $\sum\nolimits _{i=1}^np_i=1$ and the support $\{\xi_i\colon i= 1,2,\dots,n\}\subset\Xi$ is finite. The Wasserstein distance~$d^r$ of two discrete measures $P=\sum_{i=1}^np_i\,\delta_{\xi_i}$ and $\tilde P= \sum_{j=1}^{\tilde n}\tilde p_j\,\delta_{\tilde\xi_j}$ is the $r$-th root of the optimal value of \begin{align}\label{eq:Wasserstein} \text{minimize }_{\text{in }\pi\ } & \sum_{i=1}^n\sum_{j=1}^{\tilde n} \pi_{ij}\,d_{ij}^r\\ \text{subject to } & \sum_{j=1}^{\tilde n}\pi_{ij}=p_i,&& i=1,\dots,n, \\ & \sum_{i=1}^n\pi_{ij}=\tilde p_j, && j=1,\dots\tilde n \text{ and}\\ &\pi_{ij}\ge 0, \end{align} where $d_{ij}\coloneqq d(\xi_i,\tilde\xi_j)$ is an $n\times\tilde n$-matrix collecting all distances. The optimal measure in~\eqref{eq:Wasserstein} is denoted~$\pi^W$ and called an optimal transport plan. The convex, linear dual of~\eqref{eq:Wasserstein} is \begin{subequations} \begin{align}\label{eq:WassersteinDual} \text{maximize}_{\text{ in }\lambda\text{ and } \mu} & \sum_{i=1}^n p_i\,\lambda_i+\sum_{j=1}^{\tilde n} \tilde p_j\,\mu_j\\ \label{eq:WassersteinDualb} \text{subject to }& \lambda_i+\mu_j\le d_{ij}^r \ \text{ for all }i=1,\dots n \text{ and } j=1,\dots\tilde n. \end{align} \end{subequations} \begin{remark} The problem~\eqref{eq:Wasserstein} can be written as linear optimization problem \begin{align*} \text{minimize}_{\text{ in }x\ } & c^{\top}x\\ \text{subject to } & Ax=b,\\ & x\geq0, \end{align*} where $x=(\pi_{11},\pi_{21},\dots,\pi_{n\tilde n})^\top$, $c=(d_{11}, d_{21},\dots,d_{n\tilde n})^\top$, $b=(p_1,\dots,p_n,\tilde p_1,\dots,\tilde p_{\tilde n})^\top$ and~$A$ is the matrix \[ A=\begin{pmatrix}\one_{\tilde n}\otimes I_n\\ I_{\tilde n}\otimes\one_n \end{pmatrix}\] with $\one=(1,\dots,1)$. \end{remark} \subsection{The distance of stochastic processes} Let $(\Xi,\mathcal F,P)$ and $(\tilde\Xi,\tilde{\mathcal F},\tilde P)$ be two probability spaces. We now consider two stochastic processes with realizations $\xi$, $\tilde\xi\in \Xi$ and $\Xi\coloneqq \Xi_0 \times \Xi_1\times\dots\times \Xi_T$. There are many metrics $d$ such that $(\Xi,d)$ is a metric space. Without loss of generality we may set $\Xi_t=\mathbb R$ for all $t\in\{0,1,\dots,T\}$ and employ the $\ell^1$-distance, i.e., $d(\xi,\tilde\xi)= \sum_{t=0}^T|\xi_t-\tilde\xi_t|$. \begin{remark} The example depicted in Figure~\ref{fig:example} illustrates that a simple application of the Wasserstein distance does not capture the different information (knowledge) available at the intermediate stage. Indeed, let $\epsilon>0$. The distance matrix of the trajectories is \[ d=\begin{pmatrix}\epsilon & 2+\epsilon\\ 2 & 0 \end{pmatrix} \] and the optimal transport plan is \[ \pi=\frac12\begin{pmatrix}1 & 0\\ 0 & 1 \end{pmatrix}. \] It follows the Wasserstein distance according~\eqref{eq:Wasserstein} is $d=\sum_{i,j}d_{ij}\,\pi_{ij}=\nicefrac\epsilon2$. \begin{figure} \centering \pagestyle{empty} \tikzstyle{level 1}=[level distance=2.5cm, sibling distance=2cm] \tikzstyle{level 2}=[level distance=2.5cm, sibling distance=1cm] \tikzstyle{bag} = [text width=4em, text centered] \tikzstyle{end} = [circle, minimum width=0pt,fill, inner sep=0pt] \begin{minipage}[b]{0.5\linewidth} \begin{tikzpicture}[grow=right] \node[bag] {2} child { node[bag] {2} child { node[end, label=right: {1}] {} edge from parent node[below] {$1$} } edge from parent node[below] {$\frac1{2}$} } child { node[bag] {$2+\epsilon$} child { node[end, label=right: {3}] {} edge from parent node[above] {$1$} } edge from parent node[above] {$\frac1{2}$} }; \end{tikzpicture} \end{minipage \begin{minipage}[b]{0.5\linewidth} \centering \pagestyle{empty} \tikzstyle{level 1}=[level distance=2.5cm, sibling distance=2cm] \tikzstyle{level 2}=[level distance=2.5cm, sibling distance=2cm] \tikzstyle{bag} = [text width=4em, text centered] \tikzstyle{end} = [circle, minimum width=0pt,fill, inner sep=0pt] \begin{tikzpicture}[grow=right] \node[bag] {2} child { node[bag] {2} child { node[end, label=right: {1}] {} edge from parent node[below] {$\frac1{2}$} } child { node[end, label=right: {3}] {} edge from parent node[above] {$\frac1{2}$} } edge from parent node[below] {$1$} }; \end{tikzpicture} \end{minipage} \caption{\label{fig:example}Two processes illustrating two different flows of information, cf.\ \citet{Heitsch2006}, \citet{KovacevicPichler}} \end{figure} \end{remark} We conclude from the preceding remark that the Wasserstein distance is not suitable to distinguish stochastic processes with different flows of information. The reason is that this approach does not involve conditional probabilities at stages $t=0,1,\dots,T-1$, but only probabilities at the final stage $t=T$, where all the information from intermediate stages are ignored. The information at the previous stage is encoded by the $\sigma$\nobreakdash-algebra \[\mathcal F_t=\sigma\big(A_1\times\dots\times A_t\times \Xi_{t+1}\times\dots\times \Xi_T\colon A_{t^\prime}\subset\Xi_{t^\prime} \text{ measurable}\big)\] for $t=0,1,\dots,T$ ($\tilde{\mathcal F}_t$, resp.). The following generalization of the Wasserstein distance takes all conditional probabilities into account. \begin{definition}[The nested distance]\label{ndDefinition} The \emph{nested distance} of order $r\geq1$ of two filtered probability spaces $\mathbb P=(\Xi,(\mathcal F_t),P)$ and $\tilde{\mathbb P}=(\tilde\Xi, (\tilde{\mathcal F}_t), \tilde P)$, for which a distance $d\colon\Xi\times\tilde\Xi\to\mathbb R$ is defined, is the optimal value of the optimization problem \begin{align}\label{eq:NestedDistance} \text{minimize}_{\text{ in }\pi\ } & \left(\iint_{\Xi\times\tilde\Xi} d(\xi,\tilde\xi)^r\, \pi(\mathrm d\xi, \mathrm d\tilde\xi)\right)^{\nicefrac1r}\\ \text{subject to } & \pi(A\times\tilde\Xi\mid \mathcal F_t\otimes\tilde{\mathcal F}_t)=P(A\mid \mathcal F_t), & & A\in\mathcal F_t,\ t=1,\dots,T,\\ & \pi(\Xi\times B\mid \mathcal F_t\otimes\tilde{\mathcal F}_t)=\tilde P(B\mid \tilde{\mathcal F}_t), & & B\in\tilde{\mathcal F}_t,\ t=1,\dots,T, \end{align} where the infimum in~\eqref{eq:NestedDistance} is among all bivariate probability measures $\pi\in\mathcal P(\Xi\times\tilde\Xi)$ defined on $\mathcal F_T\otimes\tilde{\mathcal F}_T$. The optimal value of~\eqref{eq:Wasserstein}, the nested distance of order~$r$, is denoted by~$\nd^r(\mathbb P,\tilde{\mathbb P})$. \end{definition} For the discrete nested distance we use trees to model the whole space and filtration. We denote by $\mathcal N_t$ ($\tilde{\mathcal N}_t$, resp.)\ the set of all nodes at the stage $t$. Furthermore, a predecessor~$m$ of the node~$i$, not necessarily the immediate predecessor, is indicated by~$m\prec i$. The nested distance for trees is the $r$-th root of the optimal value of \begin{align}\label{eq:ndTree} \text{minimize }_{\text{in } \pi\ } & \sum_{i,j}\pi_{ij}\cdot d_{ij}^r\\ \text{subject to } & \sum_{j\succ j_t}\pi(i,j\mid i_t,j_t)=P(i\mid i_t), && i_t\prec i,j_t,\\ & \sum_{i\succ i_t}\pi(i,j\mid i_t,j_t)=\tilde P(j\mid j_t), && j_t\prec j,i_t,\\ & \pi_{ij}\geq0 \text{ and } \sum_{i,j}\pi_{ij}=1, \end{align} where $i\in\mathcal N_T$ and $j\in\tilde{\mathcal N}_T$ are the leaf nodes and $i_t\in\mathcal N_t$ as well as $j_t\in\tilde{\mathcal N}_t$ are nodes on the same stage $t$. As usual for discrete measures, the conditional probabilities $\pi(i,j\mid i_t,j_t)$ are given by \begin{equation}\label{eq:piCond} \pi(i,j\mid i_t,j_t)\coloneqq\frac{\pi_{ij}}{\sum_{i'\succ i_t,j'\succ j_t}\pi_{i^\prime j^\prime}}. \end{equation} \begin{remark} Employing the definition~\eqref{eq:piCond} for $\pi(i,j\mid i_t,j_t)$ reveals that the problem~\eqref{eq:ndTree} is indeed a \emph{linear} program in~$\pi$ (cf.~\eqref{eq:Wasserstein}). \end{remark} \subsection{Rapid, nested computation of the process distance} This subsection addresses an advanced approach for solving the linear program~\eqref{eq:ndTree}. We first recall the tower property, which allows an important simplification of the constraints in~\eqref{eq:NestedDistance}. \begin{lemma}\label{TowerProperty} To compute the nested distance it is enough to condition on the immediately following $\sigma$\nobreakdash-algebra: the conditions \[ \pi\big(A\times\Xi\mid \mathcal F_t\otimes\tilde{\mathcal F}_t\big)\ \text{ for all }\ A\in\mathcal F_T\] in~\eqref{eq:NestedDistance} may be replaced by \[ \pi\big(A\times\Xi\mid\mathcal F_t\otimes\tilde{\mathcal F}_t\big)\ \text{ for all }\ A\in\mathcal F_{t+1}.\] \end{lemma} \begin{proof} The proof is based on the tower property of the expectation and can be found in \citep[Lemma~2.43]{PflugPichlerBuch}. \end{proof} As a result of the tower property the full problem~\eqref{eq:ndTree} can be calculated faster in a recursive way and the matrix for the constraints has not to be stored. We employ this result in an algorithm blow. For further details we refer to \citet[Chapter~2.10.3]{PflugPichlerBuch}. The collection of all direct successors of node $i_t$ ($j_t$, resp.)\ is denoted by $i_t+$ ($j_t+$, resp.). \begin{algorithm}[t] \KwIn{for all combinations of leaf nodes $i\in\mathcal N_T$ and $j\in\tilde{\mathcal N}_T$ with predecessors $(i_0,i_1,\dots,i_{T-1},i)$ and $(j_0,j_1,\dots,j_{T-1},j)$ set $\nd_T^r(i,j):= d\left((\xi_0,\xi_{i_1},\dots,\xi_i),\ (\tilde\xi_0,\tilde\xi_{j_1},\dots,\tilde\xi_j)\right)^r$} \KwOut{the optimal transport plan at the leaf nodes $i\in\mathcal N_T$ and $j\in\tilde{\mathcal N}_T$ is $\pi(i,j)=\pi_1(i_1,j_1\mid i_0,j_0)\cdot\dots\cdot\pi_{T-1}(i,j\mid i_{T-1},j_{T-1})$.} \SetKwFor{Loop}{for}{do}{end} \Loop{$t=T-1$ down to $0$ and every combination of inner nodes $i'\in\mathcal N_t$ and $j'\in\tilde{\mathcal N}_t$}{ \text{solve the linear programs} \begin{align} \text{minimize}_{\text{ in }\pi\ } & \sum_{i'\in i_t+,\, j' \in j_t+} \pi(i',j'\mid i_t,j_t)\cdot \nd_{t+1}^r(i',j')\label{eq:20}\\ \text{subject to } & \sum_{j'\in j_t+} \pi(i',j'\mid i_t,j_t)=P(i'\mid i_t) , &i'\in i_t+,\\ &\sum_{i'\in i_t+} \pi(i',j'\mid i_t,j_t)=\tilde P(j'\mid j_t), &j'\in j_t+, \\ &\pi(i',j'\mid i_t,j_t)\ge 0 \end{align} and denote its optimal value by $\nd_t^r(i_t,j_t)$.} \caption{Nested computation of the nested distance $\nd^r(\mathbb{P},\tilde{\mathbb P})$ of two tree-processes~\(\mathbb P\) and~\(\tilde{\mathbb P}\)} \KwResult{The nested distance is $\nd^r(\mathbb P,\tilde{\mathbb P})\coloneqq \nd^r_0(0,0)$} \label{alg:ndTreeRecursive} \end{algorithm} \section{Sinkhorn divergence\label{sec:SinkhornDistance}} In what follows we consider the entropy-regularization of the Wasserstein distance~\eqref{eq:Wasserstein} and characterize its dual. Moreover, we recall Sinkhorn's algorithm, which allows and provides a considerably faster implementation. These results are combined then to accelerate the computation of the nested distance. \subsection{Entropy-regularized Wasserstein distance} Interior point methods add a logarithmic penalty to the objective to force the optimal solution of the modified problem into the strict interior. The Sinkhorn distance proceeds similarly. The regularizing term $H(x)\coloneqq-\sum_{i,j}x_{ij}\log x_{ij}$ is added to the cost function in problem~\eqref{eq:Wasserstein}. This has shown beneficiary in other problem settings as well. \begin{remark}\label{rem:phi} The mapping $\varphi(x)\coloneqq x\log x$ is convex and negative for $x\in(0,1)$ with continuous extensions $\varphi(0)=\varphi(1)=0$ so that $H\ge 0$, provided that all $x_{ij}\in[0,1]$. \end{remark} \begin{definition}[Sinkhorn divergence]\label{DefSinkhornDistance} The \emph{Sinkhorn divergence} is obtained by the optimization problem \begin{subequations} \begin{align}\label{eq:Sinkhorn} \text{minimize}_{\text{ in } \pi\ } & { \sum_{i,j}\pi_{ij}\, d_{ij}^r-\frac1\lambda H(\pi)}\\ \text{subject to } & \sum_j\pi_{ij}=p_i, & & i=1,\dots,n,\\ & \sum_i\pi_{ij}=\tilde p_j, & & j=1,\dots,\tilde n,\\ & \pi_{ij}>0 & & \text{ for all } i, j,\label{eq:Sinkhornb} \end{align} \end{subequations} where $d$ is a distance or a cost matrix and $\lambda>0$ is a regularization parameter. With $\pi^S$ being the optimal transport in~\eqref{eq:Sinkhorn}--\eqref{eq:Sinkhornb} we denote the Sinkhorn divergence by \begin{equation*} d_S^r\coloneqq\sum_{i,j}\pi_{ij}^S\, d_{ij}^r \end{equation*} and the Sinkhorn divergence including the entropy by \begin{equation*} de_S^r\coloneqq\sum_{i,j}\,\pi_{ij}^S\,d_{ij}^r-\frac1\lambda H\big(\pi^S\big). \end{equation*} \end{definition} We may mention here that we avoid the term Sinkhorn \emph{distance} since for all $\lambda>0$ the Sinkhorn divergence $d_S^r$ is strictly positive and $de_S^r$ can be negative for small $\lambda$ which violates the axioms of a distance given in Definition~\ref{def:Distance} above (particularly~\ref{enu:Nonnegativity},~\ref{enu:Triangle} and~\ref{enu:Strict}). Strict positivity of~$d_S^r$ can be forced by a correction term, the so-called Sinkhorn Loss (see \citet[Definition 2.3]{BigotCazelles2019}) or by employing the cost matrix $d\cdot\one_{p\neq\tilde p}$ instead. \begin{remark} The strict inequality constraint~\eqref{eq:Sinkhornb} is not a restriction. Indeed, the mapping $\varphi(x)$ defined in Remark~\ref{rem:phi} has derivative $\varphi'(0)=-\infty$ and thus it follows that every optimal measure satisfies the strict inequality~$\pi_{ij}>0$ for $\lambda>0$. \end{remark} We have the following inequalities. \begin{prop}[Comparison of Sinkhorn and Wasserstein]\label{prop:Inequality1} It holds that \begin{equation}\label{eq:16} de_S^r\leq d_W^r\leq d_S^r. \end{equation} \end{prop} \begin{proof} Recall that $\pi \log\pi\le0$ for all $\pi\le1$ and thus it holds that $\sum_{i,j}\pi_{ij}\,d_{ij}^r+\frac1\lambda\sum_{i,j}\pi_{ij}\log\pi_{ij}\leq\sum_{i,j}\pi_{ij}\,d_{ij}^r$ for all $\pi\in(0,1]^{n\times\tilde n}$. It follows that \[ \min_{\pi}\ \sum_{i,j}\pi_{ij}\,d_{ij}^r +\frac1\lambda\sum_{i,j}\pi_{ij}\log\pi_{ij} \leq\min_\pi\ \sum_{i,j}\pi_{ij}\,d_{ij}^r\] and thus the first inequality. The remaining inequality is clear by the definition of the Wasserstein distance. \end{proof} Both Sinkhorn divergences $d_S^r$ and $de_S^r$ approximate the Wasserstein distance $d_W^r$, and we have convergence for $\lambda\to\infty$ to $d_W^r$. The following proposition provides precise bounds. \begin{prop}\label{prop:SinkhornInequality} For every $\lambda>0$ we have \begin{equation}\label{eq:13} 0\le d_S^r-d_W^r\le \frac1\lambda \left( H(\pi^S)-H(\pi^W)\right) \end{equation} and \begin{equation}\label{eq:15} 0\le d_W^r - de_S^r \le \frac1\lambda H(\pi^S)\leq\frac1\lambda H(p\cdot\tilde p^{\top}) \end{equation} with $p=(p_1,\dots,p_n)$ and $\tilde p=(\tilde p_1,\dots,\tilde p_{\tilde n})$, respectively. \end{prop} \begin{proof} The first inequalities follow from~\eqref{eq:16} and from optimality of~$\pi^S$ in the inequality \begin{equation*} d_S^r-\frac1\lambda H(\pi^S)\le d_W^r-\frac1\lambda H(\pi^W). \end{equation*} The latter again with~\eqref{eq:16} and $d_S^r-de_S^r= \frac1\lambda H\big(\pi^S\big)$. Finally, by the log sum inequality, $H(\pi)\le H\big(p\cdot \tilde p^\top\big)$ for every measure $\pi$ with marginals $p$ and $\tilde p$. \end{proof} \begin{remark}\label{rem:3} As a consequence of the log sum inequality we obtain as well that $H(\pi^S)\le \log n+\log\tilde n$. The inequalities~\eqref{eq:13} and ~\eqref{eq:15} thus give strict upper bounds in comparing the Wasserstein distance and the Sinkhorn divergence. \end{remark} \paragraph{Alternative definitions.} There exist alternative definitions of the Sinkhorn divergence which we want to mention here. The first alternative definition involves the Kullback\textendash Leibler divergence $D_\textit{KL}(\pi\mid P\otimes\tilde P)$, which is defined as \[ D_\textit{KL}(\pi\mid P\otimes\tilde P)\coloneqq-\sum_{i,j}\pi_{ij}\log\frac{\pi_{ij}}{p_i\,\tilde p_j}=H(P)+H(\tilde P)-H(\pi),\] where the latter equality is justified provided that $\pi$ has marginal measures~$P$ and~$\tilde P$. The Sinkhorn divergence (in the alternative definition) is the $r$\nobreakdash-th root of the optimal value of \begin{subequations} \begin{align}\label{eq:KLDivergence} \text{minimize}_{\text{ in }\pi} & \sum_{i,j}\pi_{ij}\,d_{ij}^r\\ \text{subject to } & \sum_j\pi_{ij}=p_i, & & i=1,\dots,n,\\ & \sum_i\pi_{ij}=\tilde p_j, & & j=1,\dots,\tilde n,\\ & \pi_{ij}>0 &&\text{and}\\ & D_\textit{KL}(\pi\mid P\otimes\tilde P)\leq\alpha & & \text{for all }i,j, \label{eq:KL} \end{align} \end{subequations} where $\alpha\geq0$ is the regularization parameter. For each $\alpha$ in~\eqref{eq:KL} we have by the duality theory a corresponding $\lambda$ in~\eqref{eq:Sinkhorn} such that the optimal values coincide. Let $\alpha>0$ and $\pi^\textit{KL}$ be the solution to problem~\eqref{eq:KLDivergence}--\eqref{eq:KL} with Lagrange multipliers $\beta$ and $\gamma$. Then the optimal value of problem~\eqref{eq:KLDivergence} equals $d_S^r$ from~\eqref{eq:Sinkhorn} with \[ \lambda=-\frac{\log(\pi^\textit{KL}_{ij})+1}{d_{ij}+\beta_i+\gamma_j} \] for any $i\in\{1,\dots,n\}$ and $j\in\{1,\dots,\tilde n\}$. For further information and illustration we refer to \citet[Section~3]{Cuturi2013}. \medskip A further, potential definition employs a different entropy regularization is given by \[\tilde H(\pi)=-\sum_{i,j}\pi_{ij}\cdot(\log\pi_{ij}-1).\] \citet{Luise2018Differential} use this definition for Sinkhorn approximation for learning with Wasserstein distance and proof an exponential convergence. This definition leads to a similar matrix decomposition and iterative algorithm described in the following sections. \subsection{Dual representation of Sinkhorn} We shall derive Sinkhorn's algorithm and its extension to the nested distance via duality. To this end consider the Lagrangian function \begin{equation}\label{eq:Lagrange} L(\pi;\beta,\gamma)\coloneqq \sum_{i,j}\pi_{ij}\,d_{ij}+\frac1\lambda \sum_{i,j}\pi_{ij}\log\pi_{ij} +\beta^\top(p-\pi\cdot\one)+(\tilde p-\one^{\top}\cdot\pi)^\top\gamma \end{equation} of the problem~\eqref{DefSinkhornDistance}. The partial derivatives are \begin{equation}\label{eq:PartialDerivative} \frac{\partial L}{\partial\pi_{ij}}=\frac1\lambda \left(\log\pi_{ij}+1\right)+d_{ij}-\beta_i-\gamma_j=0, \end{equation} and it follows from~\eqref{eq:PartialDerivative} that the optimal measure has entries \begin{align}\label{eq:piRepresentation} \pi_{ij}^* & =\exp\left(-\lambda(d_{ij}-\beta_i-\gamma_j)-1\right)\\ & =\diag\Big(\exp(\lambda\,\beta-\nicefrac12)\Big)\cdot\exp(-\lambda\, d)\cdot\diag\Big(\exp(\lambda\,\gamma-\nicefrac12)\Big). \end{align} By inserting $\pi_{ij}^*$ in the Lagrangian function~$L$ we get the convex dual function \begin{align*} \MoveEqLeft[2] d(\beta,\gamma) \coloneqq\inf_{\pi}L(\pi;\beta,\gamma)=L(\pi^{*};\beta,\gamma)\\ & =\sum_{i,j}d_{ij}\cdot e^{-\lambda(d_{ij}-\beta_i-\gamma_j)-1}-\frac1\lambda \sum_{i,j}e^{-\lambda(d_{ij}-\beta_i-\gamma_j)-1}\cdot\big(\lambda(d_{ij}-\beta_i-\gamma_j)+1\big)\\ & \qquad+\sum_i\beta_i\left(p_i-\sum_je^{-\lambda(d_{ij}-\beta_i-\gamma_j)-1}\right)+\sum_j\gamma_j\left(\tilde p_j-\sum_ie^{-\lambda(d_{ij}-\beta_i-\gamma_j)-1}\right)\\ & =-\sum_{i,j}\left(\beta_i+\gamma_j+\frac1\lambda \right)e^{-\lambda(d_{ij}-\beta_i-\gamma_j)-1}+\sum_i\beta_ip_i+\sum_j\gamma_j\tilde p_j\\ & \qquad-\sum_i\beta_i\left(\sum_je^{-\lambda(d_{ij}-\beta_i-\gamma_j)-1}\right)-\sum_j\gamma_j\left(\sum_ie^{-\lambda(d_{ij}-\beta_i-\gamma_j)-1}\right)\\ & =\sum_i\beta_i\,p_i+\sum_j\gamma_j\,\tilde p_j-\frac1\lambda \sum_{i,j}e^{-\lambda(d_{ij}-\beta_i-\gamma_j)-1}. \end{align*} The dual problem thus is \begin{align*} \text{maximize}_{\text{ in }\beta, \gamma} & \sum_i\beta_i\,p_i+\sum_j\gamma_j\,\tilde p_j-\frac1\lambda \sum_{i,j}e^{-\lambda(d_{ij}-\beta_i-\gamma_j)-1}\\ \text{subject to } & \beta\in\mathbb R^n,\ \gamma\in\mathbb R^{\tilde n}. \end{align*} Due to $\sum_{i,j}e^{-\lambda(d_{ij}-\beta_i-\gamma_j)-1}=1$ we may write the latter problem as \begin{subequations} \begin{align}\label{eq:14} \text{maximize}_{\text{ in }\beta,\gamma\ } & \sum_i\beta_i\,p_i+\sum_j\gamma_j\,\tilde p_j\\ \text{subject to } & \sum_{i,j}e^{-\lambda(d_{ij}-\beta_i-\gamma_j)-1}=1\text{ and } \beta\in\mathbb R^n,\ \gamma\in\mathbb R^{\tilde n}.\label{eq:14b} \end{align} \end{subequations} \begin{remark} We deduce from~\eqref{eq:14b} that $-\lambda \left(d_{ij}- \beta_i- \gamma_j\right)- 1\leq0$, or \begin{equation}\label{eq:17} \beta_i+\gamma_j\le d_{ij}+\frac1\lambda \quad\text{ for all }i, j \end{equation} provided that~$\lambda>0$. It is thus apparent that~\eqref{eq:14}--\eqref{eq:14b} is a relaxation of problem~\eqref{eq:WassersteinDual}--\eqref{eq:WassersteinDualb} together with the constraint~\eqref{eq:17}. As well, observe that both problems coincide for $\lambda\to\infty$ in~\eqref{eq:14b}. \end{remark} \subsection{Sinkhorn's algorithm\label{SinkhornAlgorithm}} To derive Sinkhorn's algorithm we consider the Lagrangian function~\eqref{eq:Lagrange} again, but now for the remaining variables. Similar to $\pi^*$ in~\eqref{eq:piRepresentation}, the gradients are \begin{equation}\label{eq:derivitiveBeta} \frac{\partial L}{\partial\beta_i}=p_i- \sum_{j=1}^{\tilde n}\pi_{ij}= p_i-\sum_{j=1}^{\tilde n}e^{-\lambda(d_{ij}-\beta_i-\gamma_j)-1}=0 \end{equation} and \begin{equation}\label{eq:derivitiveGamma} \frac{\partial L}{\partial\gamma_j}= \tilde p_j-\sum_{i=1}^n\pi_{ij} =\tilde p_j-\sum_{i=1}^ne^{-\lambda(d_{ij}-\beta_i-\gamma_j)-1}=0 \end{equation} so that the equations \begin{equation*} \beta_i=\frac1\lambda \log\left(\frac{p_i}{\sum_{j=1}^{\tilde n}e^{-\lambda(d_{ij}-\gamma_j)-1}}\right) \quad\text{and}\quad \gamma_j=\frac1\lambda \log\left(\frac{\tilde p_j}{\sum_{i=1}^ne^{-\lambda(d_{ij}-\beta_i)-1}}\right) \end{equation*} follow. To avoid the logarithm introduce $\tilde \beta_i\coloneqq e^{\lambda\,\beta_i-\nicefrac12}$ and $\gamma_j\coloneqq e^{\lambda\,\gamma_j-\nicefrac12}$ and rewrite the latter equations as \begin{equation}\label{eq:Sinkhorn1} \tilde\beta_i= \frac{p_i}{\sum_{j=1}^{\tilde n}e^{-\lambda\,d_{ij}}\,\tilde \gamma_j} \quad\text{and}\quad \tilde\gamma_j= \frac{\tilde p_j}{\sum_{i=1}^n \tilde \beta_i\,e^{-\lambda\,d_{ij}}}, \end{equation} while the optimal transition plan~\eqref{eq:piRepresentation} is \[\pi_{ij}^*= \tilde\beta_i\cdot e^{-\lambda\,d_{ij}} \cdot \tilde \gamma_j.\] \begin{algorithm}[t] \KwIn{distance matrix $d^r\in\mathbb R_{\geq0}^{n\times\tilde n}$, probability vectors $p\in\mathbb R_{\geq0}^n$, $\tilde p\in\mathbb R_{\geq0}^{\tilde n}$, regularization parameter $\lambda>0$, stopping criterion and a starting value $\tilde\gamma=(\tilde\gamma_1,\dots,\tilde\gamma_{\tilde n})$} \KwOut{$\tilde\beta$, $\tilde\gamma$ for $\diag(\tilde\beta)\cdot e^{-\lambda\, d^r}\cdot \diag(\tilde\gamma)$} set \begin{equation}\label{eq:MatrixK} k_{ij}\coloneqq \exp\big(-\lambda\,d_{ij}^r\big). \end{equation} \While{stopping criterion is not satisfied}{ \For{$i=1$ \KwTo $n$}{ $\tilde\beta_i\leftarrow\frac{p_i}{\sum_{j=1}^{\tilde n}k_{ij}\,\tilde\gamma_j}$ } \For{$j=1$ \KwTo $\tilde n$}{ $\tilde\gamma_j\leftarrow\frac{\tilde p_j}{\sum_{i=1}^n\tilde\beta_i\,k_{ij}}$} } \KwResult{The matrix $\pi_{ij}^*=\tilde\beta_i \, e^{-\lambda\,d_{ij}^r}\,\tilde\gamma_j=\tilde\beta_i\,k_{ij}\,\tilde\gamma_j$ solves the relaxed Wasserstein problem~\eqref{eq:Sinkhorn}--\eqref{eq:Sinkhornb}.} \caption{Sinkhorn's iteration}\label{alg:SinkhornIteration} \end{algorithm} The simple starting point of Sinkhorn's iteration is that~\eqref{eq:Sinkhorn1} can be used to determine~$\tilde\beta$ and~$\tilde\gamma$ alternately. Indeed, from~\eqref{eq:derivitiveBeta} and~\eqref{eq:derivitiveGamma} we infer that~$\pi^*$ is a doubly stochastic matrix and Sinkhorn's theorem (cf.\ \citet{Sinkhorn1967a, Sinkhorn1967}) for the matrix decomposition ensures that iterating~\eqref{eq:Sinkhorn1} converges and the vectors $\tilde\beta$ and $\tilde\gamma$ are unique up to a scalar. Algorithm~\ref{alg:SinkhornIteration} summarizes the individual steps again. \begin{remark}[Central path] We want to emphasize that for changing the regularization parameter~$\lambda$ it is note necessary to recompute all powers in~\eqref{eq:MatrixK}. Indeed, increasing $\lambda$ to $2\cdot\lambda$, for example, corresponds to raising all entries in the matrix~\eqref{eq:MatrixK} to the power~$2$, etc. \end{remark} \begin{remark}[Softmax] The expression~\eqref{eq:Sinkhorn1} resembles to what is known as the \emph{Gibbs measure} and to the \emph{softmax} in data science. \end{remark} \begin{remark}[Historical remark] In the literature, this approach is also known as \emph{matrix scaling} (cf.\ \citet{RoteZachariasen}), RAS (cf.\ \citet{Bachem}) as well as Iterative Proportional Fitting (cf.\ \citet{Ruschendorf1995}). \citet{Kruithof1937} used the method for the first time in telephone forecasting. The importance of this iteration scheme for data science was probably observed in \citet[Algorithm~1]{Cuturi2013} for the first time. \end{remark} \section{Entropic transitions\label{sec:EntropyRegularizedNestedDistance}} This section extends the preceding sections and combines the Sinkhorn divergence and the nested distance by incorporating the regularized entropy $\frac1\lambda H(\pi)$ to the recursive nested distance Algorithm~\ref{alg:ndTreeRecursive} and investigate its properties and consequences. We characterize the nested Sinkhorn divergence first. The main result is used to exploit duality. \subsection{Nested Sinkhorn divergence} Let $\nde^{(t)}$ be the matrix of incremental divergences of sub-trees at stage~$t$. Analogously to~\eqref{eq:20} we consider the conditional version of the problem~\eqref{eq:Sinkhorn} and denote by $\beta_{i_tj_t}$ and $\gamma_{j_ti_t}$ the pair of optimal Lagrange parameters associated with the problem \begin{align}\label{program:SinkhornRecursive} \text{minimize}_{\text{ in} \pi} & \sum_{i'\in i_t+,j'\in j_t+}\pi(i',j'\mid i_t,j_t)\cdot\nde^{(t+1)}(i',j')\\ & \hspace{4cm}+\frac1\lambda\pi(i',j'\mid i_t,j_t)\cdot\log\pi(i',j'\mid i_t,j_t)\\ \text{subject to } & \sum_{j'\in j_t+}\pi(i',j'\mid i_t,j_t)=P(i'\mid i_t),\hspace{2cm}i'\in i_t+,\\ & \sum_{i'\in i_t+}\pi(i',j'\mid i_t,j_t)=\tilde P(j'\mid j_t),\hspace{2cm}j'\in j_t+,\\ & \pi(i',j'\mid i_t,j_t)>0, \end{align} where $\pi(i',j'|i_t,j_t)=\exp \left(-\lambda\big(\nde_{i_tj_t}^{(t+1)} -\beta_{i_tj_t}- \gamma_{j_ti_t}\big)-1\right)$. The optimal value is the new divergence $\nde^{(t)}(i_t,j_t)$. Computing the nested distance recursively from $t=T-1$ down to~$0$ we get \begin{align}\label{eq:dRecursiveSinkhorn} \pi_{ij} & =\pi_1(i_1,j_1\mid i_0,j_0)\cdot\ldots\cdot\pi_{T-1}(i,j\mid i_{T-1},j_{T-1})\\ & =e^{-\lambda(\nde_{i_0j_0}^{(1)}-\beta_{i_0j_0}-\gamma_{j_0i_0})-1}\cdot\ldots\cdot e^{-\lambda(\nde_{i_{T-1}j_{T-1}}^{(T)}-\beta_{i_{T-1}j_{T-1}}-\gamma_{j_{T-1}i_{T-1}})-1}\\ & =\exp\left(-T-\lambda\sum_{t=0}^{T-1}\nde_{i_tj_t}^{(t+1)}-\beta_{i_tj_t}-\gamma_{j_ti_t}\right), \end{align} where $i\in\mathcal N_T$ and $j\in\tilde{\mathcal N}_T$ are the leaf nodes with predecessors $(i_0,i_1,\dots,i_{T-1},i)$ and $(j_0,j_1,\dots,j_{T-1},j)$. As above introduce \[\tilde\beta_{i_tj_t}\coloneqq \exp{\big(\lambda\,\beta_{i_tj_j}-\nicefrac12\big)} \quad\text{and}\quad \tilde\gamma_{j_ti_t}\coloneqq\exp{\big(\lambda\,\gamma_{j_ti_t}-\nicefrac12\big)}.\] Combining the components it follows that \begin{align}\label{dRecurSum} \pi_{ij} & =\exp\left(-T-\lambda\sum_{t=0}^{T-1} \nde_{i_tj_t}^{(t+1)}-\beta_{i_tj_t}-\gamma_{j_ti_t}\right)\\ & =\prod_{t=0}^{T-1}\tilde\beta_{i_tj_t}\exp\left(-\lambda\, \nde_{i_tj_t}^{(t+1)}\right)\, \tilde\gamma_{j_ti_t}, \end{align} where the product is the entry-wise product (Hadamard product). The following theorem summarizes the relation of the nested distance with the Sinkhorn divergence. \begin{theorem}[Entropic relaxation of the nested distance]\label{thm:NestedSinkhorn} The recursive solution~\eqref{program:SinkhornRecursive} (\eqref{eq:dRecursiveSinkhorn}, resp.)\ coincides with the optimal transport plan given by \begin{align}\label{eq:SinkhornFull} \text{minimize}_{\text{ in }\pi} & \sum_{i,j}\pi_{ij}\cdot d_{ij}^r+\frac1\lambda\pi_{ij}\cdot\log\big(\pi_{ij}\big)\\ \text{subject to } & \sum_{j\succ j_t+}\pi(i,j\mid i_t,j_t)=P(i\mid i_t), & i_t\prec i,j_t,\\ & \sum_{i\succ i_t+}\pi(i,j\mid i_t,j_t)=\tilde P(j\mid j_t), & j_t\prec j,i_t,\\ & \pi_{ij}>0\,\,\text{and}\,\,\sum_{i,j}\pi_{ij}=1. \end{align} \end{theorem} \begin{proof} First define $\pi\coloneqq\prod_{t=1}^T\pi_t$, where~$\pi_t$ is the conditional transition probability, i.e., the solution at stage~$t$ and the matrices are multiplied element-wise (the Hadamard product) as in equation~\eqref{eq:dRecursiveSinkhorn} above. It follows that \begin{align}\label{eq:21} d^r\cdot\pi+\frac1\lambda\pi\log\pi & =d^r\cdot\prod_{t=1}^T\pi_t+\frac1\lambda\cdot \prod_{t=1}^T\pi_t\log\left(\prod_{t=1}^T\pi_{t}\right)\\ & =d^r\cdot\prod_{t=1}^T\pi_t+\frac1\lambda\cdot \prod_{t=1}^T\pi_t \cdot \sum_{t=1}^T\log\pi_t. \end{align} Observe that $\pi_t(A)=\mathbb E(1_A\mid\mathcal F_t\otimes\tilde{\mathcal F}_t)$ (cf.\ Lemma~\eqref{TowerProperty}). Denote the $r$\nobreakdash-distance of subtrees by~$\nde_T^r$. By linearity of the conditional expectation we have with~\eqref{eq:21} \[ \nde_{T-1} =\E\left[\nde_T^r+\frac1\lambda\log\pi_T\Big{|}\, \mathcal F_{T-1}\otimes\tilde{\mathcal F}_{T-1}\right]^{\nicefrac1r}\] and from calculation in backward recursive way \begin{align*} \MoveEqLeft[1] \nde_{T-2} =\E\left[\nde_{T-1}^r+\frac1\lambda\log\pi_{T-1}\Big{|}\, \mathcal F_{T-2}\otimes\tilde{\mathcal F}_{T-2}\right]^{\nicefrac1r}\\ & =\E\left[\E\left[\nde_T^r +\frac1\lambda\log\pi_T\Big{|}\mathcal F_{T-1}\otimes\tilde{\mathcal F}_{T-1}\right] +\frac1\lambda\log\pi_{T-1}\Big{|}\, \mathcal F_{T-2}\otimes\tilde{\mathcal F}_{T-2}\right]^{\nicefrac1r}\\ & =\E\left[\E\left[\nde_T^r +\frac1\lambda\log\pi_T +\frac1\lambda\log\pi_{T-1}\Big{|}\mathcal F_{T-1}\otimes\tilde{\mathcal F}_{T-1} \right]\Big{|}\mathcal F_{T-2}\otimes\tilde{\mathcal F}_{T-2}\right]^{\nicefrac1r}. \end{align*} Finally, it follows that \begin{align*} \MoveEqLeft[1]\nde_0 =\mathbb E\left[\nde_1^r+\frac1\lambda\log\pi_1\Big{|}\mathcal F_0\otimes\tilde{\mathcal F}_0\right]^{\nicefrac1r}\\ & =\E\left[\E\left[\dots\E\left[\nde_T^r+\frac1\lambda\log\pi_T\Big{|}\mathcal F_{T-1}\otimes\tilde{\mathcal F}_{T-1}\right]\dots\Big{|}\mathcal F_1\otimes\tilde{\mathcal F}_1\right] +\frac1\lambda\log\pi_1\Big{|}\mathcal F_0\otimes\tilde{\mathcal F}_0\right]^{\nicefrac1r}\\ & =\E\left[\E\left[\dots\E\left[\nde_T^r +\frac1\lambda\sum_{t=1}^T\log\pi_t\Big{|}\mathcal F_{T-1}\otimes\tilde{\mathcal F}_{T-1}\right]\dots\Big{|}\mathcal F_1\otimes\tilde{\mathcal F}_1\right]\Big{|}\mathcal F_0\otimes\tilde{\mathcal F}_0\right]^{\nicefrac1r}\\ & =\E\left[\nde_T^r +\frac1\lambda\sum_{t=1}^T\log\pi_t\Big{|}\mathcal F_0\otimes\tilde{\mathcal F}_0\right]^{\nicefrac1r}\\ & =\E\left[\nde_T^r +\frac1\lambda\sum_{t=1}^T\log\pi_t\right]^{\nicefrac1r}, \end{align*} the assertion~\eqref{eq:SinkhornFull} of the theorem. \end{proof} \begin{remark} The optimization problem in Theorem~\ref{thm:NestedSinkhorn} considers all constraints as the full nested problem~\eqref{eq:ndTree}, only the objective differs. For this reason the optimal solution of~\eqref{eq:SinkhornFull} is feasible for the problem~\eqref{eq:ndTree} and vice versa. Notice as well that the tower property can be used in a forward calculation. \end{remark} Similarly to Proposition~\ref{prop:SinkhornInequality} we have the following extension to the nested Sinkhorn divergence. \begin{corollary}\label{cor:Inequality} For the nested distance and the nested Sinkhorn divergence, the same inequalities as in Proposition~\ref{prop:SinkhornInequality} apply, i.e., \[ 0\le \boldsymbol d_S^r -\boldsymbol d_W ^r \le \frac1\lambda \left(H(\pi^S)-H(\pi^W)\right) \quad\text{and}\quad 0\le \boldsymbol d_W^r-\boldsymbol{de}_S^r\le\frac1\lambda H(\pi^S)\le\frac1\lambda H(p\cdot p^\top), \] where $\pi^S$ ($\pi^W$, resp.)\ is the optimal transport plan from~\eqref{eq:SinkhornFull} (\eqref{eq:ndTree}, resp.)\ with discrete, unconditional probabilities~$p$ and~$\tilde p$ at the final stage~$T$. \end{corollary} \begin{proof} The proof follows the lines of the proof of the Propositions~\ref{prop:Inequality1} and~\ref{prop:SinkhornInequality}. \end{proof} Moreover, we have the following general inequality that allows an error bound depending on the total~$T$ of stages. \begin{corollary} Let $m$ ($\tilde m$, resp.)\ be the maximum number of immediate successors in the process~$\mathbb{P}$ ($\tilde{\mathbb{P}}$, resp.), i.e., $m=\max\left\{ |i+|\colon i\in\mathcal N_t,\ t=1,\dots,T-1\right\} $. It holds that \begin{equation}\label{eq:28} \boldsymbol{de}_S^r-\boldsymbol d_W^r\leq\frac{\log m+\log\tilde m}\lambda\cdot T, \end{equation} where~$T$ is the total number of stages. \end{corollary} \begin{proof} Recall from Remark~\ref{rem:3} that $H(\pi^S)\leq\log(n\,\tilde n)= \log n+\log\tilde n$ for every conditional probability measures, where~$n$ and~$\tilde n$ are the number of immediate successors in both trees. The result follows with $n\le m^T$ ($\tilde n\le \tilde m^T$, resp.)\ and $\log n\le T\log m$ and the nested program~\eqref{program:SinkhornRecursive}. \end{proof} \subsection{Nested Sinkhorn duality} The nested distance is of importance in stochastic optimization because of its dual, which is characterized by the Kantorovich--Rubinstein theorem, cf.~\eqref{eq:WassersteinDual}--\eqref{eq:WassersteinDualb} above. The nested distance allows for a characterization by duality as well. Here we develop the duality for the nested Sinkhorn divergence. In line with Theorem~\ref{thm:NestedSinkhorn} we need to consider the problem \begin{subequations} \begin{align}\label{ndRegularized} \text{minimize}_{\text{ in }\pi} & \left(\iint \left( d(\xi,\tilde\xi)^r+\frac1\lambda\log\pi(\xi, \tilde \xi)\right) \pi(\mathrm d\xi,\mathrm d\tilde\xi)\right)^{\nicefrac1r}\\ \text{subject to } & \pi(A\times\tilde\Xi\mid \mathcal F_t\otimes\tilde{\mathcal F}_t)=P(A\mid \mathcal F_t), \qquad A\in\mathcal F_t,\ t=1,\dots,T, \label{ndRegularizedb}\\ & \pi(\Xi\times B\mid \mathcal F_t\otimes\tilde{\mathcal F}_t)=\tilde P(B\mid \tilde{\mathcal F}_t), \qquad B\in\tilde{\mathcal F}_t,\ t=1,\dots,T. \label{ndRegularizedc} \end{align} \end{subequations} However, we first reformulate the problem~\eqref{eq:14}--\eqref{eq:14b}. By translating the dual variables, $\hat\beta\coloneqq -\beta+\E \beta$ and $\hat\gamma\coloneqq -\gamma+\tilde{\E}\gamma$, and defining $M_0\coloneqq-\E\beta-\tilde\E\gamma$ we have the alternative representation \begin{align}\label{M0Sinkhorn} \text{maximize}_{\text{ in }M_0\ } & M_0\\ \text{subject to } & \E\hat\beta=0,\ \tilde\E\hat\gamma=0,\\ & \sum_{\xi,\tilde\xi}\exp\left(-\lambda\left(d(\xi,\tilde\xi)^r-\hat\beta(\xi)-\hat{\gamma}(\tilde\xi)-M_0\right)-1\right)=1,\\ & \hat\beta\in\mathbb R^n,\ \hat\gamma\in\mathbb R^{\tilde n}. \end{align} To establish the dual representation of the nested distance we introduce the projections \begin{align*} \proj_t\colon L^1(\mathcal F_T\otimes\tilde{\mathcal F}_T) & \to L^1(\mathcal F_t\otimes\tilde{\mathcal F}_T)\\ \hat{\beta}(\xi)\cdot\hat{\gamma}(\tilde\xi) & \mapsto\E(\hat{\beta}\mid \mathcal F_t)(\xi)\cdot\hat{\gamma}(\tilde\xi) \end{align*} and \begin{align*} \tilde{\proj}_t\colon L^1(\mathcal F_T\otimes\tilde{\mathcal F}_T) & \to L^1(\mathcal F_T\otimes\tilde{\mathcal F}_t)\\ \hat\beta(\xi)\cdot\hat{\gamma}(\tilde\xi) & \mapsto\hat{\beta}(\xi)\cdot\E(\hat{\gamma}\mid \tilde{\mathcal F}_t)(\tilde\xi). \end{align*} We recall the following characterization of the measurability constraints~\eqref{ndRegularizedb}--\eqref{ndRegularizedc} and refer to \citep[Proposition~2.48]{PflugPichlerBuch} for its proof. \begin{prop}\label{Prop:CharacProj} The measure $\pi$ satisfies the marginal condition \[ \pi(A\times\tilde\Xi\mid \mathcal F_t\otimes\tilde{\mathcal F}_t)=P(A\mid \mathcal F_t)\quad\text{for all }A\in\Xi \] if and only if \[ \E_{\pi}\beta=\E_{\pi}\proj_t\beta \quad\emph{for all}\quad \beta\lhd\mathcal F_T\otimes\tilde{\mathcal F}_T.\] Moreover, $\proj_t(\beta)=\E_{\pi}(\beta\mid \mathcal F_t\otimes\tilde{\mathcal F}_T)$ if $\pi$ has marginal $P$. \end{prop} \begin{theorem}\label{ND_MSink} The infimum or the nested distance including the entropy $\nde^r(\mathbb{P},\tilde{\mathbb P})$ of problem~\eqref{eq:SinkhornFull} equals the supremum of all numbers $M_0$ such that \[ e^{-\lambda(d(\xi,\tilde\xi)^r-M_T(\xi,\tilde\xi))-1}\in\mathcal P(\Xi\times\tilde\Xi), \qquad(\xi, \tilde\xi)\in \Xi\times\tilde\Xi, \] where $\mathcal P(\Xi\times\tilde\Xi)$ is a set of probability measures on $(\Xi\times\tilde\Xi)$ and $M_t$ is an $\mathbb R$-valued process on $\Xi\times\tilde\Xi$ of the form \begin{equation}\label{eq:Mt} M_t=M_0+\sum_{s=1}^t\hat\beta_s+\hat\gamma_s \end{equation} and the measurable functions $\hat{\beta}_t\lhd\mathcal F_t\otimes\mathcal{\tilde F}_{t-1}$ and $\hat{\gamma}_t\lhd\mathcal F_{t-1}\otimes\mathcal{\tilde F}_t$ satisfy $\proj_{t-1}(\hat{\beta}_t)=0$ and $\tilde{\proj}_{t-1}(\hat{\gamma}_t)=0$. \end{theorem} \begin{proof} With Proposition~\ref{Prop:CharacProj} rewrite the dual problem as \begin{align*} \MoveEqLeft[4]\inf_{\pi>0}\sup_{M_0,f_t,g_t}\E_{\pi}\left[d^r+\frac1\lambda\log\pi\right] +M_0\cdot(1-\E_{\pi}\one)+\\ & -\sum_{s=0}^{T-1}\big(\E_{\pi}f_{s+1}-\E_{\pi}\proj_s(f_{s+1})\big) -\sum_{s=0}^{T-1}\big(\E_{\pi}g_{s+1}-\E_{\pi}\tilde{\proj}_s(g_{s+1})\big), \end{align*} where the second line encodes the measurability constraints. By the minmax theorem (cf.\ \citet{Sion}) this is equivalent to \begin{align*} \sup_{M_0,f_t,g_t}M_0+\inf_{\pi>0}\E_{\pi}\Big[ & d^r+\frac1\lambda\log\pi-M_0\cdot\one\\ & -\sum_{s=0}^{T-1}(f_{s+1}-\proj_s(f_{s+1})) -\sum_{s=0}^{T-1}(g_{s+1}-\tilde{\proj}_s(g_{s+1}))\Big]. \end{align*} The integral exists and the minimum is obtained by a probability measure \[ \pi=\exp\left(-\lambda\left(d^r-\sum_{s=0}^{T-1}(f_{s+1}-\proj_s(f_{s+1}))-\sum_{s=0}^{T-1}(g_{s+1}-\tilde{\proj}_s(g_{s+1})-M_0\right)-1\right). \] Set $\hat\beta_s\coloneqq f_s-\proj_{s-1}(f_s)$ and $\hat\gamma_s\coloneqq g_s-\tilde{\proj}_{s-1}(g_s)$. Consequently, the problem reads \begin{align*} \text{maximize}_{\text{ in }M_0\ } & M_0\\ \text{subject to } & \exp\left[-\lambda\left(d^r-\sum_{s=1}^T\hat{\beta}_s-\sum_{s=1}^T\hat{\gamma}_s-M_0\right)-1\right]\in\mathcal P(\Xi\times\tilde\Xi)\\ & \proj_{t-1}(\hat\beta_t)=0,\tilde{\proj}_{t-1}(\hat\gamma_t)=0, \end{align*} and thus the assertion. \end{proof} The following corollary links the optimal probability measure and the stochastic process~\eqref{eq:Mt} for the optimal components $\hat\beta$ and $\hat\gamma$. \begin{corollary} The process $M_t$ in~\eqref{eq:Mt}, for which the supremum is attained, is a martingale with respect to the optimal measure~$\pi$. \end{corollary} \begin{proof} The proof of \citep[Theorem~2.49]{PflugPichlerBuch} applies with minor adaptions only. \end{proof} \section{Numerical results\label{sec:Experiments}} \todo[inline, size= normalsize]{Wasserstein: $d^r$, nested: $\boldsymbol d_W^r$, Sinkhorn: $d_S^r$, nested Sinkhorn: $\boldsymbol d_S^r$ (e: mit entropie)} \begin{figure}[ht] \centering \subfloat[Nested distance (blue) and Sinkhorn divergence (green, red) for regularization parameter $\lambda\in\{0.5,1,2,\dots,30\}$\label{fig:ComputationResultHeight3a}]{\includegraphics[trim=0 0 0 10, clip, width=0.45\textwidth]{ndHeight3} } \qquad\subfloat[computation time required for Algorithm~\ref{alg:ndTreeRecursive} (blue) and Algorithm~\ref{alg:SinkhornIteration} (green, red)\label{fig:ComputationResultHeight3b}]{\includegraphics[trim=0 0 0 10, clip, width=0.45\textwidth]{comtimeHeight3} }\caption{Results from computation of an arbitrary chosen processes given in Figure~\ref{fig:TreeComputation} with $r=1$ and $d(\xi_i,\tilde\xi_j)=|\xi_i-\tilde\xi_j|$.\label{fig:ComputationResultHeight3}} \end{figure} The nested Sinkhorn divergence $\boldsymbol d_S^r$ as well as $\boldsymbol {de}_S^r$ depend on the regularization parameter~$\lambda$. We discuss this dependency, the error, speed of convergence and numerical issues in comparison to the non-regularized nested distance $\nd_W^r$. We compare Algorithm~\ref{alg:ndTreeRecursive} and Algorithm~\ref{alg:SinkhornIteration} with respect to the nested distance $\nd_W^r$ and the nested Sinkhorn divergence with and without the entropy $\frac1\lambda H(\pi^S)$ as well as the required computational time for two finite valued stochastic scenario processes visualized in Figure~\ref{fig:TreeComputation}. \begin{figure}[ht] \begin{minipage}[b]{0.5\linewidth \centering \pagestyle{empty} \tikzstyle{level 1}=[level distance=2.5cm, sibling distance=1cm] \tikzstyle{level 2}=[level distance=1.5cm, sibling distance=6.3cm] \tikzstyle{level 3}=[level distance=1.5cm, sibling distance=3cm \tikzstyle{bag} = [text width=4em, text centered] \tikzstyle{end} = [circle, minimum width=0pt,fill, inner sep=0pt] \begin{tikzpicture}[grow=right] \node[bag] {10} child { node[bag] {10} child { node[bag] {8} child { node[end, label=right: {6}] {} edge from parent node[below] {$\frac{76}{100}\,\,$} } child { node[end, label=right: {9}] {} edge from parent node[above] {$\frac{24}{100}\,\,\,\,$} } edge from parent node[below] {$\frac{66}{100}\,\,\,\,$} } child { node[bag] {12} child { node[end, label=right: {10}] {} edge from parent node[below] {$\frac{46}{100}\,\,$} } child { node[end, label=right: {13}] {} edge from parent node[above] {$\frac{54}{100}\,\,\,\,$} } edge from parent node[above] {$\frac{34}{100}\,\,\,\,\,\,$} } edge from parent node[below] {$1$} }; \end{tikzpicture \end{minipage \begin{minipage}[b]{0.5\linewidth \centering \pagestyle{empty} \tikzstyle{level 1}=[level distance=1.5cm, sibling distance=5cm] \tikzstyle{level 2}=[level distance=1.5cm, sibling distance=2.5cm] \tikzstyle{level 3}=[level distance=1.5cm, sibling distance=1cm] \tikzstyle{bag} = [text width=4em, text centered] \tikzstyle{end} = [circle, minimum width=0pt,fill, inner sep=0pt] \begin{tikzpicture}[grow=right] \node[bag] {10} child { node[bag] {7} child { node[bag] {5} child { node[end, label=right: {4}] {} edge from parent node[below] {$\frac{7}{10}$} } child { node[end, label=right: {6}] {} edge from parent node[above] {$\frac{3}{10}$} } edge from parent node[below] {$\frac{9}{10}\,\,\,\,$} } child { node[bag] {8} child { node[end, label=right: {7}] {} edge from parent node[below] {$\frac{6}{10}$} } child { node[end, label=right: {9}] {} edge from parent node[above] {$\frac{4}{10}$} } edge from parent node[above] {$\frac1{10}\,\,\,\,$} } edge from parent node[below] {$\frac{7}{10}\,\,\,$} } child { node[bag] {13} child { node[bag] {11} child { node[end, label=right: {10}] {} edge from parent node[below] {$\frac{4}{10}$} } child { node[end, label=right: {12}] {} edge from parent node[above] {$\frac{6}{10}$} } edge from parent node[below] {$\frac{8}{10}\,\,\,\,$} } child { node[bag] {14} child { node[end, label=right: {13}] {} edge from parent node[below] {$\frac{4}{10}$} } child { node[end, label=right: {14}] {} edge from parent node[above] {$\frac1{10}$} } child { node[end, label=right: {15}] {} edge from parent node[above] {$\frac{5}{10}$} } edge from parent node[above] {$\frac2{10}\,\,\,\,$} } edge from parent node[below] {$\,\,\,\frac{3}{10}$} }; \end{tikzpicture \end{minipage}\caption{Two arbitrary chosen processes with height $T=3$.} \label{fig:TreeComputation} \end{figure} Figure~\ref{fig:ComputationResultHeight3} displays the results. We see that the regularized nested distance~$\nd_S^r$ (green) and~$\boldsymbol {de}_S^r$ (red) converge to the nested distance~$\nd_W^r$ for increasing $\lambda$. In contrast to $\nd_S^r$, the regularized nested distance including the entropy converges slower to $\nd_W^r$. The reason is that for larger $\lambda$ the weight of the entropy in the cost function in~\eqref{eq:Sinkhorn} decreases and the entropy of $\pi^S$ and $\pi^W$ coincide (cf.~\eqref{eq:28}). Computing the distances with Sinkhorn's algorithm in recursive way, in contrast to solving the linear problem for the Wasserstein distance, is about six times faster. In addition, the required time for the regularized nested distance with and without the entropy varies much less by contrast with the computational time for the nested distance. Furthermore, the differences between $\nd_W^r$ and $\nd_S^r$ and~$\nde_S^r$, respectively, is rapidly decreasing and insignificant for $\lambda>20$. Moreover, the time displayed in Figure~\ref{fig:ComputationResultHeight3b} does not depend on the regularization parameter~$\lambda$. We now fix $\lambda=20$ and vary the stages $T\in\{1,2,3,4,5\}$. The first finite tree has the branching structure $[1\ 2\ 3\ 2\ 3\ 4]$ and the second tree has a simpler structure $[1\ 2\ 2\ 1\ 3\ 2]$ (i.e., the first tree has 144 leaf nodes and the second tree 24). All states and probabilities in the trees are generated randomly. \begin{table}[ht] \centering \begin{tabular}{cccccccc} \toprule stages & \multicolumn{2}{c}{Wasserstein} & \multicolumn{3}{c}{Sinkhorn} & \multicolumn{1}{c}{difference} & \multicolumn{1}{c}{time}\tabularnewline \midrule T & $\nd_W^r$ & time & $\nd_S^r$ & $\nde_S^r$ & time & $\nd_W^r-\nde_S^r$ & acceleration\tabularnewline \midrule $1$ & 1.8 & 0.06\,s & 1.81 & 1.75 & 0.006\,s & 0.06 & 10$\times$\tabularnewline $2$ & 5.1 & 0.13\,s & 5.12 & 4.97 & 0.022\,s & 0.14 & 5.8$\times$\tabularnewline $3$ & 5.8 & 0.50\,s & 5.81 & 5.66 & 0.062\,s & 0.15 & 8.1$\times$\tabularnewline $4$ & 7.3 & 1.54\,s & 7.32 & 7.08 & 0.368\,s & 0.24 & 4.2$\times$\tabularnewline $5$ & 10.1 & 10.29\,s & 10.05 & 9.72 & 2.873\,s & 0.35 & 3.6$\times$\tabularnewline \bottomrule \end{tabular}\caption{Average distance and divergence with corresponding computational time in seconds on i5-3210M CPU. All states and probabilities are generated randomly. The regularization parameter is $\lambda=20$ and $r=1$.} \label{tab:WassersteinSinkhornComparison} \end{table} Table~\ref{tab:WassersteinSinkhornComparison} summarizes the results collected. We notice that the Sinkhorn algorithm is up to $10$~times faster compared with the usual Wasserstein distance, although the speed advantage decreases for larger trees. The Sinkhorn algorithm also leads to small errors which increase marginally for trees with more stages. Additionally, we tried to improve the speed by modifying the recursive algorithm. Instead of computing once from $T-1$ down to $0$ we computed from $T-1$ down to $0$ several times to achieve a convergence in the optimal transport plan $\pi^S$. This approach has no advantages. \section{Summary\label{sec:Summary}} Nested distance allows distinguishing trees by involving the information encoded in filtrations. In this paper we regularize the Wasserstein distance and introduce the Sinkhorn divergence to the nested distance. The tower property also applies for the regularization. We show that the nested divergence converges to the nested distance for increasing regularization parameter $\lambda\to\infty$. In conclusion, we can summarize that the Sinkhorn divergence offers a good trade-off between the regularization error and the speed advantage. Further work should focus on defining a (nested) distance for neuronal networks and extending the implementation of Sinkhorn divergence in the Julia package for faster tree generation and computation. \section{Acknowledgement} We are thankful to Beno\^{i}t Tran for pointing out further references, particularly on convergence, in his thesis \cite{Tran2020} supervised by Marianne Akian and Jean-Philippe Chancelier. \bibliographystyle{abbrvnat}
\section{Introduction} \label{sec1} The study of low-energy properties of mesons such as mass spectra and decay modes is important to understand the nonperturbative behaviors of QCD. Recently, there are abundant experimental data on the excited $\rho$ mesons, for example, the resonance $Y(2040)$ with $M=2034\pm13\pm9$~MeV and $\Gamma=234\pm30\pm25$~MeV was observed in the process of $e^+e^-\rightarrow\omega\pi^0$ by the BESIII Collaboration~\cite{Ablikim:2020das}. $Y(2040)$ could be the same state as $\rho(2000)$ which is omitted from the summary table of the latest version of Particle Data Group (PDG)~\cite{Zyla:2020zbs}, because they have similar masses and decay widths~\cite{Anisovich:2001vt, Anisovich:2001jf, Anisovich:2000ut, Anisovich:2002su}. In addition, many new experimental measurements with much higher precision for $\rho(1900)$~\cite{Aubert:2006jq,Aubert:2007ym, Solodov:2011dn,CMD-3:2018kql} and $\rho(2150)$~\cite{Lees:2012cj, Ablikim:2018iyx, BABAR:2019oes} are reported, especially recent measurements show that the decay width of $\rho(2150)$ is around $100$~MeV~\cite{Lees:2012cj, BABAR:2019oes, Ablikim:2018iyx} while a rather large width $200-400$~MeV was obtained in previous measurements~\cite{Clegg:1989mp, Biagini:1990ze, Aubert:2007ef, Anisovich:2002su}. Thus, one can investigate the possible quark-model assignments for those states using these accurate experimental data. In 1985, Godfrey and Isgur proposed the relativized quark model (GI model)~\cite{Godfrey:1985xj} which is widely used to investigate the mass spectrum of mesons, however, there appears a discrepancy between theoretical predictions and experimental values as more and more excited states were observed in the past decades. As discussed in Ref.~\cite{Li:2009zu}, the linear confining potential $br$ will be screened and softened by the vacuum polarization effects at large distance, thus the linear confining potential in a meson will be modified by the screening effects at large distance, which are induced by the quark-antiquark creation. In Refs.~\cite{Song:2015fha, Song:2015nia} the screening effects are introduced into the GI model, as known the modified GI (MGI) model, which gives a better description of the mass spectrum for excited meson states. In this work, we shall adopt the MGI model to estimate the mass spectrum of the excited $\rho$ mesons, based on which we give assignments for $\rho(1900)$, $Y(2040)$, and $\rho(2150)$. Furthermore, in order to check these assignments, we calculate the two-body OZI-allowed strong decays for $\rho(1900)$, $Y(2040)$, and $\rho(2150)$ within the $^3P_0$ model by employing the meson wave functions obtained from the MGI model. The organization of this paper is as follows. In Sec.~\ref{sec2a}, a brief review of theoretical works and experiments is presented for $\rho(1900)$, $Y(2040)$, and $\rho(2150)$. We introduce the MGI model and the $^3P_0$ model in Secs.~\ref{sec2} and ~\ref{sec3}, respectively. The numerical results of mass spectrum and strong decays are shown in Sec.~\ref{sec4}. In Sec.~\ref{sec5} we give a summary of our results. \section{Current status of excited $\rho$ mesons} \label{sec2a} \subsection{$\rho(1900)$}\label{rho1900} The meson $\rho(1900)$ with $M=1870\pm 10$~MeV and $\Gamma=10\pm 5$~MeV was first observed by the FENICE Collaboration in the process of $e^+ e^- \rightarrow N \bar{N}$~\cite{Antonelli:1996xn}, subsequently, a narrow dip structure, associated to the $\rho(1900)$ with $M=1910\pm 10$~MeV and $\Gamma=37\pm 13$~MeV, was also detected by the Fermilab E687 Collaboration through a study of the diffractive photoproduction of the $3 \pi^+ 3 \pi^-$ final state~\cite{Frabetti:2001ah,Frabetti:2003pw}. Recently, the existence of $\rho(1900)$ was further confirmed by the $BABAR$ Collaboration~\cite{Aubert:2006jq,Aubert:2007ym} and the CMD-3 Collaboration~\cite{Solodov:2011dn,CMD-3:2018kql}. The measurements from $BABAR$ indicate that the widths of $\rho(1900)$ are $\Gamma=130\pm30$~MeV in $e^+e^-\rightarrow3\pi^+3\pi^-\gamma$ and $\Gamma = 160\pm20$~MeV in $e^+e^-\rightarrow2(\pi^+\pi^-\pi^0)\gamma$~ \cite{Aubert:2006jq}. The discrepancy of the decay widths confuses our understanding of the $\rho(1900)$ nature. A large decay width was obtained as $\Gamma=151^{+73}_{-75}$~MeV \cite{Matsinos:2020cft} and $\Gamma=186.8\pm 39.8$~MeV~\cite{Surovtsev:2008zza} by analyzing the related data. Theoretically the assignment of $\rho(1900)$ as $\rho(3^3S_1)$ is supported by the study of Regge trajectories~\cite{Bugg:2012yt}, the $^3P_0$ model \cite{He:2013ttg}, and the effective Lagrangian approach \cite{ Wang:2020kte}. \subsection{ $Y(2040)/\rho(2000)$} \label{rho2k} A resonance with $J^{PC}=1^{--}$ was detected by analyzing the $p\bar{p}\rightarrow\pi^+\pi^-$ process at $M=1988$~MeV \cite{Hasan:1994he}, and it should be an excited $\rho$ meson marked as $\rho(2000)$ since the $P$ wave $\pi^+\pi^-$ can only have isospin $I=1$. Later, the Crystal Barrel Collaboration found a similar resonance in the processes of $p\bar{p}\rightarrow \pi^+ \pi^-$, $p\bar{p}\rightarrow\omega\eta\pi^0$, and $p\bar{p}\rightarrow\omega\pi^0$~\cite{Anisovich:2001vt, Anisovich:2001jf, Anisovich:2000ut, Anisovich:2002su}. However, $\rho(2000)$ is omitted from the summary table of PDG~\cite{Zyla:2020zbs}, and needs to be further studied experimentally and theoretically. Very recently, a resonance called $Y(2040)$ was observed by the BESIII Collaboration with a significance of more than $10 \sigma$~\cite{Ablikim:2020das}, and the similar structure was also observed in the processes $J/\psi \rightarrow K^+ K^- \pi^0$~\cite{Ablikim:2019tqd} and $e^+e^-\to \eta' \pi^+\pi^-$~\cite{Aubert:2007ef,Ablikim:2020wyk}. The resonance parameters of $Y(2040)$ are $M=2034\pm 13 \pm9 $~MeV and $\Gamma=234\pm30 \pm 25$~MeV~\cite{Ablikim:2020das}, respectively consistent with the $\rho(2000)$ mass and decay width within the uncertainties~\cite{Anisovich:2001vt, Anisovich:2001jf, Anisovich:2000ut, Anisovich:2002su}. Thus, $\rho(2000)$ and $Y(2040)$ are regarded as the same state in this work. Based on the measurements with large uncertainties of the Crystal Barrel Collaboration~\cite{Anisovich:2000ut}, $\rho(2000)$ was assigned as $\rho(2^3D_1)$ in Ref.~\cite{He:2013ttg} by studying its two-body OZI-allowed strong decay behaviors. Thus, those accumulated abundant data with better accuracy on the resonance parameters provide an ideal lab to restudy the possible assignments of $\rho(2000)/Y(2040)$. \subsection{ $\rho(2150)$} The $\rho(2150)$ was observed more than 30 years ago~\cite{Bisello:1981sh,Atkinson:1985yx,Clegg:1989mp}, later it was confirmed by the GAMS~\cite{Alde:1992wv,Alde:1994jm} and Crystal Barrel~\cite{Anisovich:1999xm,Anisovich:2002su, Anisovich:2000ut} Collaborations. In 2007, the $BABAR$ Collaboration observed $\rho(2150)$ with $M=2150\pm 40\pm50 $~MeV and $\Gamma=350\pm 40\pm50 $~MeV in the process $e^+e^-\to f_1(1285) \pi^+\pi^-\gamma$~\cite{Aubert:2007ef}. The early measurements of the $\rho(2150)$ width lie in the range of 200-400~MeV~\cite{Clegg:1989mp, Biagini:1990ze, Aubert:2007ef, Anisovich:2002su}, but the recent measurements indicate that the decay width of $\rho(2150)$ is around 100~MeV as shown in Table~\ref{tab:2150}, where we list the measured resonance parameters of $\rho(2150)$ since 2012. There are four sets of parameters for $\rho(2150)$ in Ref.~\cite{BABAR:2019oes}, in which the different resonance parameters are obtained by separately and simultaneously fitting to the BESIII~\cite{Ablikim:2018iyx} and $BABAR$ \cite{Lees:2012cj, Lees:2013gzt, Lees:2018vvb} datasets, respectively. The parameters at the bottom of Table~\ref{tab:2150} should be the most reliable among the four sets of parameters since this fit combines all decay modes in Refs.~\cite{Lees:2012cj, Lees:2013gzt, Lees:2018vvb, Ablikim:2018iyx}, and it is consistent with the latest results of the BESIII Collaboration\cite{Ablikim:2018iyx}. \begin{table} \begin{center} \caption{ \label{tab:2150} Mass and decay width of $\rho(2150)$ measured by experiments since 2012. } \begin{tabular}{cccc} \hline\hline Mass (MeV) & Width (MeV) &Year \\ \hline $2254\pm 22$ & $109\pm76$ \cite{Lees:2012cj} &2012\\ $2239.2\pm 7.1 \pm 11.3$ &$139.8\pm12.3 \pm 20.6$ \cite{Ablikim:2018iyx}&2019 \\ $2227 \pm 9 \pm 9 $ & $127 \pm 14 \pm 4$ \cite{BABAR:2019oes} &2020\\ $2201\pm 19$ & $70 \pm 38$ \cite{BABAR:2019oes} &2020\\ $2270 \pm 20 \pm 9$ & $ 116^{+90}_{-60}\pm 50 $ \cite{BABAR:2019oes} &2020 \\ $2232 \pm 8 \pm 9$ & $ 133\pm 14 \pm 4 $ \cite{BABAR:2019oes} &2020\\ \hline \hline \end{tabular} \end{center} \end{table} The $\rho(2150)$ is a good candidate of $\rho(4^3S_1)$ according to the analysis of mass spectrum~\cite{Biagini:1990ze,Masjuan:2013xta,Bugg:2012yt}, and the results from the effective Lagrangian approach also support this assignment~\cite{Wang:2020kte}. In Ref.~\cite{He:2013ttg} the authors studied the two-body strong decay behavior of $\rho(2150)$ by using simple harmonic oscillator (SHO) functions as the wave functions of mesons, and a good description of $\rho(2150)$ can be obtained by considering it as $\rho(4^3S_1)$, however, a large $\Gamma_{\rho(2150)}=230\pm50$~MeV~\cite{Anisovich:2002su} was adopted in the analysis. In this work we investigate the quark-model assignment for $\rho(2150)$ basing on more accurate measurements of the BESIII~\cite{Ablikim:2018iyx} and $BABAR$~\cite{BABAR:2019oes} Collaborations. \section{ Mass spectrum } \label{sec2} In this section, we will give a brief introduction of the GI model which was proposed by Godfrey and Isgur in 1985~\cite{Godfrey:1985xj}. The GI model plays an important role in studying the mass spectrum of mesons, especially for the low-lying states. For high excited states, it is necessary to introduce the screening effects to the GI model, because the linear confining potential $br$ will be screened and softened by the vacuum polarization effects at large distance, as discussed in Refs.~\cite{Li:2009zu,Chao:1992et, Ding:1993uy}, The MGI model turns out to be able to give a better description of the mass spectra for the higher radial and orbital excitations~\cite{Song:2015fha,Song:2015nia,Wang:2018rjg,Pang:2017dlw,Pang:2018gcn, Pang:2019ttv,Hao:2019fjg}. \subsection{The GI model} In GI model~\cite{Godfrey:1985xj}, the Hamiltonian of a meson includes the kinetic energy term and the effective potential term, \begin{equation}\label{hamtn} \tilde{H}=\sqrt{m_1^2+\mathbf{p}^2}+\sqrt{m_2^2+\mathbf{p}^2}+\tilde{V}_{\mathrm{eff}}(\mathbf{p,r}), \end{equation} with \begin{equation} \tilde{V}_{\mathrm{eff}}(\mathbf{p,r})=\tilde{H}^\mathrm{conf}+\tilde{H}^\mathrm{hyp}+\tilde{H}^\mathrm{so}, \end{equation} where $m_1$ and $m_2$ denote the masses of quark and antiquark, respectively, $\tilde{V}_{\mathrm{eff}}(\mathbf{p,r})$ is the effective potential between quark and antiquark. In the nonrelativistic limit, the effective potential can be simplified as \begin{equation} V_{\mathrm{eff}}(r)=H^{\mathrm{conf}}+H^{\mathrm{hyp}}+H^{\mathrm{so}}\label{1}, \end{equation} with \begin{align} H^{\mathrm{conf}}&=\Big[-\frac{3}{4}(c+br)+\frac{\alpha_s(r)}{r}\Big] \bm{F}_1\cdot\bm{F}_2 \nonumber\\ &=S(r)+G(r)\label{3},\\ \nonumber \\ H^{\mathrm{hyp}}&=-\frac{\alpha_s(r)}{m_{1}m_{2}}\Bigg[\frac{1}{r^3}\Big(\frac{3\bm{S}_1\cdot\bm r \bm{S}_2\cdot\bm r}{r^2} -\bm{S}_1\cdot\bm{S}_2\Big)\nonumber\\ &+\frac{8\pi}{3}\bm{S}_1\cdot\bm{S}_2\delta^3 (\bm r)\Bigg] \bm{F}_1\cdot\bm{F}_2 ,\\ \nonumber\\ H^{\mathrm{so}}&=H^{\mathrm{so(cm)}}+H^{\mathrm{so(tp)}}, \label{3.2} \end{align} where $\langle \bm{F}_1\cdot\bm{F}_2 \rangle =-4/3$ for a meson. The running coupling constant $\alpha_s(Q^2)$ depends on the energy scale $Q$ which is related to the relative momentum between quark and antiquark as $Q=|\vec{p}_1-\vec{p}_2|$. Since $\alpha_s(Q^2)$ is divergent at low $Q$ region, the authors of Ref.~\cite{Godfrey:1985xj} assume that $\alpha_s(Q^2)$ saturates as $\alpha_s(Q^2=0)=\alpha_s^{\mathrm{critital}}$, and $\alpha_s^{\mathrm{critital}}$ is a parameter which is determined by fitting to the mass spectrum. $\alpha_s(r)$ is obtained from $\alpha_s(Q^2)$ by using Fourier transform, where $r$ is the relative distance between quark and antiquark. $H^{\mathrm{conf}}$ reflects the spin-independent interaction, and it can be divided into two parts $S(r)$ and $G(r)$. The linear confining potential $S(r)=b r+c$ plays an important role at large $r$, and the Coulomb-type potential $G(r)=-4 \alpha_s(r)/(3r)$ is dominant at small $r$. $H^{\mathrm{hyp}}$ denotes the color-hyperfine interaction which can cause the mixing of different angular momenta, namely $ ^3L_J$ and $ ^3L_J^{\prime}$. $H^{\mathrm{so}}$ is the spin-orbit interaction, which contains the color-magnetic term $H^{\mathrm{so(cm)}}$ and the Thomas-precession term $H^{\mathrm{so(tp)}}$. The spin-orbit interaction will give rise to the mixing between spin singlet $ ^1L_J$ and spin triplet $ ^3L_J$ if $m_1 \neq m_2$, and the specific expression of $H^{\mathrm{so}}$ is given in Ref.~\cite{Godfrey:1985xj}. The GI model is a relativized quark model, and the relativistic effects are introduced by two main ways. First, in the quark-antiquark scattering, the interactions should depend on both quark momentum $\vec{p}_1$ and antiquark momentum $\vec{p}_2$, or a linear combination of them as $\vec{p}_1-\vec{p}_2$ and $\vec{p}_1+\vec{p}_2$, so they must be nonlocal interaction potentials as pointed out in Ref.~\cite{Godfrey:1985xj}. In order to take this effect into account, a smearing {function} $\rho_{12} \left(\mathbf{r}-\mathbf{r}^{\prime}\right)$ is used to transform the basic potentials $G(r)$ and $S(r)$ into the smeared ones $\tilde{G}(r)$ and $\tilde{S}(r)$, \begin{eqnarray}\label{sme} \tilde{f}(r)=\int d^3r'\rho_{12}(\mathbf{r}-\mathbf{r'})f(r'), \end{eqnarray} and the smearing function is defined as \begin{eqnarray} & \rho_{12}\left(\mathbf{r}-\mathbf{r'}\right)=\frac{\sigma_{12}^3}{\pi ^{3/2}}e^{-\sigma_{12}^2\left(\mathbf{r}-\mathbf{r'}\right)^2}, \nonumber \\ &\sigma_{12}^2=\sigma_0^2\Bigg[\frac{1}{2}+\frac{1}{2}\left(\frac{4m_1m_2}{(m_1+m_2)^2}\right)^4\Bigg]+s^2\left(\frac{2m_1m_2}{m_1+m_2}\right)^2. \label{si12} \end{eqnarray} For a heavy-heavy $Q\bar{Q}$ meson system, $\rho_{12}(\mathbf{r}-\mathbf{r'})$ will turn into delta function $\delta^3(\mathbf{r}-\mathbf{r'})$ as one increases the quark mass $m_Q$. In this case, one can obtain $\tilde{f}(r)=f(r)$, which indicates that the relativistic effects can be neglected for a heavy-heavy $Q\bar{Q}$ meson. However, the relativistic effects are important for heavy-light mesons and light mesons, so it is necessary to adopt a relativized quark model such as the GI model to study the excited $\rho$ mesons in this work. Second, the momentum-dependent factors are introduced to modify the effective potentials, \begin{eqnarray} \tilde{G}(r)&\to \left(1+\frac{p^2}{E_1E_2}\right)^{1/2}\tilde{G}(r)\left(1 +\frac{p^2}{E_1E_2}\right)^{1/2},\\ \nonumber\\ \frac{\tilde{V}_i(r)}{m_1m_2}&\to \left(\frac{m_1m_2}{E_1E_2}\right)^{1/2+\epsilon_i}\frac{\tilde{V}_i(r)}{m_1 m_2}\left(\frac{m_1 m_2}{E_1 E_2}\right)^{1/2+\epsilon_i}, \end{eqnarray} where $\tilde{G}(r)$ is the Coulomb-type potential, and $\tilde{V}_i(r)$ {represents} the contact, tensor, vector spin-orbit, and scalar spin-orbit terms as explained in Ref. \cite{Godfrey:1985xj}. In the nonrelativistic limit, those momentum-dependent factors will become unity. \iffalse \fi \subsection{The MGI model with screening effects} The following replacement is often employed to modify the linear confining potential $br$ in the quark model \cite{Chao:1992et, Ding:1993uy}, \begin{eqnarray} V(r)=br\rightarrow V^{\mathrm{scr}}(r)=\frac{b(1-e^{-\mu r})}{\mu}. \end{eqnarray} If $r$ is small enough, we can have $V^{\mathrm{scr}}(r)=V(r)$. Therefore, this replacement will not affect the low-lying meson states. The parameter $\mu$ is related to the strength of the screening effects, and one can roughly understand that the screening effects begin to work from $r \sim 1/\mu$. The value of $\mu$ can be determined by fitting to the experimental measurements. Furthermore, the smeared potential \cite{Song:2015fha,Song:2015nia} can be obtained by using Eq. (\ref{sme}), \begin{eqnarray} \tilde V^{\mathrm{scr}}(r)&=&\frac{b}{\mu r}\Bigg[e^{\frac{\mu^2}{4 \sigma^2}+\mu r}\Bigg(\frac{1}{\sqrt{\pi}}\int_0^{\frac{\mu+2r\sigma^2}{2\sigma}}e^{-x^2}dx-\frac{1}{2}\Bigg)\nonumber\\ &&\times\frac{\mu+2r\sigma^2}{2\sigma^2}+r-e^{\frac{\mu^2}{4\sigma^2}-\mu r}\frac{\mu-2r\sigma^2}{2\sigma^2}\nonumber\\ &&\times\Bigg(\frac{1}{\sqrt{\pi}}\int_0^{\frac{\mu-2r\sigma^2}{2\sigma}}e^{-x^2}dx-\frac{1}{2}\Bigg)\Bigg], \label{Eq:pot} \end{eqnarray} where $\sigma=\sigma_{12}$ defined in Eq.~(\ref{si12}). The MGI model is widely used in Refs. \cite{Song:2015fha,Song:2015nia,Wang:2018rjg,Pang:2017dlw,Pang:2018gcn, Pang:2019ttv,Hao:2019fjg}, and it gives a better description of the mass spectrum for both heavy-light mesons and light mesons. In this work, all the parameters involved in the MGI model are listed in Table~\ref{tab:parameter} followed Ref.~\cite{Pang:2018gcn}, where a systematic study is performed for the mass spectrum of the light mesons. Here, we need to emphasize that there exist differences of parameters between relativistic quark models and nonrelativistic ones. For example, the mass parameters of quarks are roughly consistent as $m_u=m_d \sim 0.2 $ GeV and $m_s \sim 0.4 $ GeV in relativistic quark models \cite{Godfrey:1985xj, Pang:2018gcn,Zeng:1994vj}, while $m_u=m_d \sim 0.3 $ GeV and $m_s \sim 0.6 $ GeV are often adopted by the nonrelativistic quark models \cite{Close:2005se,Zhong:2008kd}. The mass spectrum and wave functions of the mesons can be obtained by solving the Schr\"odinger equation with the Hamiltonian in Eq. (\ref{hamtn}). Furthermore, the meson wave functions are used as inputs to investigate the subsequent strong decays for mesons. \begin{table}[htpb] \begin{center} \caption{ \label{tab:parameter}Parameter values in MGI model \cite{Pang:2018gcn} } \begin{tabular}{cccc} \hline\hline Parameter & value & Parameter &value\\ \hline $m_u$~(GeV) &0.163 &$s$ &1.497 \\ $m_d$~(GeV) &0.163 &$\mu$~(GeV) &0.0635 \\ $m_s$~(GeV) &0.387&$\epsilon_{\rm c}$ &-0.138\\ $b$~(GeV$^2$) &0.221&$\epsilon_{\rm{sov}}$ &0.157\\ $c$~(GeV) &-0.240&$\epsilon_{\rm sos}$ &0.9726\\ $\sigma_0$~(GeV) &1.799&$\epsilon_{\rm t}$ &0.893\\ \hline\hline \end{tabular} \end{center} \end{table} \section{Two-body OZI-allowed strong decays } \label{sec3} In addition to the mass spectrum, the decay widths are crucial to identify the assignments for mesons. Here, we give a brief introduction of the $^3P_0$ model which is widely used in studying two-body OZI-allowed strong decays of mesons~\cite{Li:2008we,Li:2008et,Xue:2018jvi,Wang:2017pxm,Pan:2016bac,Lu:2016bbk,Song:2014mha,Wang:2016krl,Pang:2014laa}. The $^3P_0$ model was originally proposed by Micu \cite{Micu:1968mk} in 1968, and later it was further developed by Le Yaouanc $et$ $al.$ \cite{LeYaouanc:1972vsx}. Hitherto, $^3P_0$ model has been considered as an effective tool to study two-body strong decays of hadrons, namely, $A\rightarrow BC$. In the decay process, a flavor-singlet and color-singlet quark-antiquark pair with $J^{PC}=0^{++}$ is created from the vacuum first, then, the created antiquark (quark) combines with the quark (antiquark) in meson $A$ to form meson $B$ ($C$) as shown in the left diagram of Fig.~\ref{fig:feiman}, besides, another similar decay mode is depicted in the right diagram of Fig.~\ref{fig:feiman}. \begin{figure}[htpb] \includegraphics[scale=0.5]{3p0.eps} \vspace{0.0cm}\caption{ Two possible diagrams contributing to the process $A\rightarrow BC$ in the $^3P_0$ model.}\label{fig:feiman} \end{figure} The transition operator $T$ of the decay $A\rightarrow BC$ in the $^3P_0$ model is given by \cite{Blundell:1996as} \begin{eqnarray} T&=-3\gamma\sum\limits_m \langle 1m1-m|00\rangle\int d^3\boldsymbol{p}_3d^3\boldsymbol{p}_4\delta^3(\boldsymbol{p}_3+\boldsymbol{p}_4)\nonumber\\ \nonumber\\ &\times{\cal{Y}}^m_1\left(\frac{\boldsymbol{p}_3-\boldsymbol{p}_4}{2}\right )\chi^{34}_{1,-m}\phi^{34}_0\omega^{34}_0b^\dagger_3(\boldsymbol{p}_3)d^\dagger_4(\boldsymbol{p}_4), \end{eqnarray} where $\boldsymbol{p}_3(\boldsymbol{p}_4$) is the momentum of the created quark (antiquark). $\gamma$ is a dimensionless parameter which stands for the strength of the quark-antiquark $q_3\bar{q}_4$ pair created from the vacuum, and it is often determined by fitting to the experimental data. $\chi^{34}_{1,-m}$, $\phi^{34}_0$, and $\omega^{34}_0$ are spin, flavor, and color wave functions of the created quark-antiquark pair, respectively. The helicity amplitude ${\cal{M}}^{M_{J_A}M_{J_B}M_{J_C}}(\boldsymbol{P})$ of the decay process is defined with the help of the transition operator $T$, \begin{eqnarray} \begin{split} \langle BC|T|A\rangle &=\delta^3(\boldsymbol{P}_A-\boldsymbol{P}_B-\boldsymbol{P}_C){\cal{M}}^{M_{J_A}M_{J_B}M_{J_C}}(\boldsymbol{P}), \end{split} \end{eqnarray} where $|A\rangle$, $|B\rangle$, and $|C\rangle$ denote the mock meson states defined in Ref.~\cite{Hayne:1981zy}, and $\boldsymbol{P}$ is the momentum of meson $B$ in the center of mass frame. Furthermore, one can express the partial wave amplitude ${\cal{M}}^{LS}(\boldsymbol{P})$ with helicity amplitude for the decay $A\rightarrow BC$ \cite{Jacob:1959at}, \begin{align} {\cal{M}}^{LS}(\boldsymbol{P})&=\sum_{\renewcommand{\arraystretch}{.5}\begin{array}[t]{l} \scriptstyle M_{J_B},M_{J_C},\\\scriptstyle M_S,M_L \end{array}}\renewcommand{\arraystretch}{1}\!\! \langle LM_LSM_S|J_AM_{J_A}\rangle \nonumber\\ &\times\langle J_BM_{J_B}J_CM_{J_C}|SM_S\rangle\nonumber\\ &\times\int d\Omega\,\mbox{}Y^\ast_{LM_L}{\cal{M}}^{M_{J_A}M_{J_B}M_{J_C}} (\boldsymbol{P}).\label{pwave} \end{align} Finally, with the relativistic phase space, the total width $\Gamma(A\rightarrow BC)$ can be expressed in terms of the partial wave amplitude squared \cite{Blundell:1996as}, \begin{eqnarray} \Gamma(A\rightarrow BC)= \frac{\pi |\boldsymbol{P}|}{4M^2_A}\sum_{LS}|{\cal{M}}^{LS}(\boldsymbol{P})|^2, \label{width1} \end{eqnarray} where $|\boldsymbol{P}|=\frac{\sqrt{[M^2_A-(M_B+M_C)^2][M^2_A-(M_B-M_C)^2]}}{2M_A}$, $M_A$, $M_B$, and $M_C$ are the masses of the mesons $A$, $B$, and $C$, respectively. \section{Numerical RESULTS} \label{sec4} \subsection{Mass spectrum analysis} Here, we adopt both the MGI and GI models to calculate the mass spectrum for excited $\rho$ mesons. The parameters involved in the GI model are taken from Ref.~\cite{Godfrey:1985xj}. In Table~\ref{tab:mass}, the numerical results are shown together with recent experimental measurements. Here, we need to mention that, in 2008, the $BABAR$ Collaboration announced an enhancement around 1.57 GeV \cite{Aubert:2007ym} which is named as $\rho(1570)$ shown in Fig.~\ref{fig:zhiliang}, however, this state has not been confirmed by other experiments since 2008. Therefore, we will not discuss it in this work. The mass differences between the MGI model and the GI model become larger for higher excited $\rho$ mesons as shown in Fig.~\ref{fig:zhiliang}. For example, the mass differences are as large as $100$~MeV for $\rho(3^3S_1)$, $\rho(2^3D_1)$, and $\rho(4^3S_1)$. Comparing the MGI model predictions with the measured masses, one can regard $\rho(1900)$, $Y(2040)$, and $\rho(2150)$ as possible candidates of $\rho(3^3S_1)$, $\rho(2^3D_1)$, and $\rho(4^3S_1)$, respectively. \begin{table}[htpb] \begin{center} \caption{ \label{tab:mass}The predicted and measured masses of $\rho$ mesons.} \begin{tabular}{cccc} \hline\hline State & MGI (MeV) & GI (MeV) &Exp (MeV) \\ \hline $\rho(1^3S_1)$ &774 &771 &$775.26\pm0.25$~\cite{Zyla:2020zbs} \\ $\rho(2^3S_1)$ &1424 &1456&$1465\pm25$~\cite{Zyla:2020zbs} \\ $\rho(3^3S_1)$ &1906 &1998 &$1909\pm17\pm25$ \cite{Aubert:2007ym} \\ & & &$1880\pm30$\cite{Aubert:2006jq} \\ & & &$1860\pm20$ \cite{Aubert:2006jq} \\ $\rho(4^3S_1)$ &2259&2435 &$2239.2\pm 7.1 \pm 11.3$ \cite{Ablikim:2018iyx} \\ & & & $2232 \pm 8 \pm 9$ \cite{BABAR:2019oes} \\ & & & $2254\pm 22$ \cite{Lees:2012cj} \\ $\rho(5^3S_1)$ &2542 &2817 &$\cdots$\\ $\rho(1^3D_1)$&1646&1664 &$1720\pm20$~\cite{Zyla:2020zbs}\\ $\rho(2^3D_1)$&2048&2153 &$2034\pm13\pm9$ \cite{Ablikim:2020das}\\ & & & $2039 \pm 8 ^{+36}_{-18}$\cite{Ablikim:2019tqd} \\ & & &$1990 \pm 80$ \cite{Aubert:2007ef}\\ $\rho(3^3D_1)$ &2365 &2557 &$\cdots$\\ $\rho(4^3D_1)$ &2624 &2915 &$\cdots$\\ \hline\hline \end{tabular} \end{center} \end{table} \begin{figure}[htpb] \includegraphics[scale=0.4]{zhiliangpu.eps} \vspace{0.0cm} \caption{The theoretical and experimental masses of $\rho$ mesons, the black solid and red solid lines denote the predictions from the GI model and MGI model, respectively.}\label{fig:zhiliang} \end{figure} \subsection{Decay behavior analysis} It should be emphasized that the mass alone is insufficient to identify those assignments, and the decay behaviors need to be analyzed. In this work, we employ the $^3P_0$ model with the realistic meson wave functions obtained from the MGI model to evaluate the decay widths of $\rho(1900)$, $Y(2040)$, and $\rho(2150)$. In this case, only the parameter $\gamma$ is unknown in the $^3P_0$ model. Since $\rho(1900)$, $Y(2040)$, and $\rho(2150)$ are light mesons, we can assume they share the same $\gamma$ with other excited light mesons with $J^{PC}=1^{--}$. We obtain $\gamma= 6.57$ for $u\bar{u}/d\bar{d}$ pair creation by fitting to the total widths of $\rho(1700)$, $K^*(1680)$, $\omega(1650)$, $\rho(1450)$, $K^*(1410)$, $\phi(1680)$, and $\omega(1420)$ mesons. As for the $s\bar{s}$ pair creation in the decay process, the $\gamma$ value is multiplied by a factor $m_u/m_s$. \begin{table}[htpb] \begin{center} \caption{ \label{tab:2D}Decay widths of $Y(2040)$ as the $\rho(2^3D_1)$ (in MeV), the initial mass is set to be 2034~MeV and the masses of all the final states are taken from PDG~\cite{Zyla:2020zbs}.} \begin{tabular}{c|cc|cc} \hline\hline Channel & Mode &$\rho(2^3D_1)$ & Mode &$\rho(2^3D_1)$ \\ \hline $1^-\rightarrow 0^-0^-$ & $\pi\pi$ & 19.77 & $KK$ &0.32 \\ & $\pi\pi(1300)$ & 14.81 & $KK(1460)$ &0.30 \\ & $\pi\pi(1800)$ & 1.28 & & \\ \hline $1^-\rightarrow 0^-1^-$ &$\pi\omega$ &6.31 &$\rho\eta'$ &0.013 \\ &$\rho\eta$ &2.17 &$KK^*$ &0.015 \\ &$\omega(1420)\pi$ &6.68 &$\omega(1650)\pi$ &0.14 \\ &$KK^*(1410)$ &0.57 &$\rho(1450)\eta$ & 0.51 \\ \hline $1^-\rightarrow 1^-1^-$ &$\rho\rho$ &36.38 &$K^*K^*$ &0.13\\ \hline $1^-\rightarrow 0^-1^+$ &$a_{1}(1260)\pi$ &26.60 &$h_{1}(1170)\pi$ &35.20\\ &$KK_{1}(1400)$ &0.098 &$b_{1}(1235)\eta$ &6.23 \\ &$KK_{1}(1270)$ &0.19& & \\ \hline $1^-\rightarrow 0^-2^+$ &$a_{2}(1320)\pi$ &9.76 &$KK_{2}^*(1430)$ &0.027\\ \hline $1^-\rightarrow 0^- 2^-$ &$\pi\pi_{2}(1670)$ &39.15& & \\ \hline $1^-\rightarrow 0^- 3^-$ &$\pi\omega_{3}(1670)$ &0.19 & & \\ \hline $1^-\rightarrow 1^- 1^+$ &$b_{1}(1235)\rho$ &15.86 &$a_{1}(1260)\omega$ &5.20 \\ \hline Total width &\multicolumn{4}{c}{227.91}\\ \hline Experiment &\multicolumn{4}{c}{$234\pm30\pm25$~\cite{Ablikim:2020das}}\\ \hline\hline \end{tabular} \end{center} \end{table} The partial widths and total width of $Y(2040)$ as $\rho(2^3D_1)$ are listed in Table~\ref{tab:2D}. The total width is expected to be 227.91~MeV, in good agreement with the recent BESIII measurement of $\Gamma_{Y(2040)}=234\pm30\pm25$~MeV~\cite{Ablikim:2020das}. Besides, the predicted branching ratio is $\Gamma_{K^+ K^-}/ \Gamma \approx 0.14\% $ under the assignment of $\rho(2^3D_1)$, also consistent with the BESIII measurement $\Gamma_{K^+ K^-}/ \Gamma=0.1\%- 0.2 \%$~\cite{Ablikim:2019tqd}. The main decay modes are $\pi \pi$, $\pi \pi(1300)$, $\rho\rho$, $\pi a_1(1260)$, $a_2(1320)\pi$, $\pi\pi_2(1670)$, $b_1(1235) \rho$, and $\pi h_1(1170)$. The background of $\pi\pi$ is complicated, and it is difficult to identify new resonances. Apart from $\pi \pi$ and $a_2(1320)\pi$, there exists at least one broad state in other main channels, so it is hard to reconstruct the two-body processes involving a broad state experimentally. Therefore, $a_2(1320)\pi$ should be a good channel for investigating $Y(2040)$, and the decay width is 9.76 MeV which is comparable with the decay width 6.31 MeV of the observed mode $\pi \omega$. The dependence of the total width on the mass of the initial state is shown in Fig.~\ref{fig:decay2d}, and the pink error band indicates the decay width $\Gamma_{Y(2040)}=234\pm30\pm25$~MeV~\cite{Ablikim:2020das}. In the mass range of the experimental value $M_{Y(2040)}=2034\pm13\pm9$~MeV, the predicted total width is always in agreement with the measurement. Thus, we can have a nice description of $Y(2040)$ on the mass spectrum and decay behaviors under the assignment of $\rho(2^3D_1)$. \begin{figure}[htpb] \includegraphics[scale=0.75]{2d-a.eps} \vspace{-0.5cm} \caption{The dependence of the decay width on the mass of $Y(2040)$ as $\rho(2^3D_1)$, and the pink error band indicates the measured width for the $Y(2040)$ from the BESIII Collaboration~\cite{Ablikim:2020das}}\label{fig:decay2d} \end{figure} \begin{table}[htpb] \begin{center} \caption{ \label{tab:1900}Decay widths of $\rho(1900)$ and $\rho(2150)$ as $\rho(3^3S_1)$ and $\rho(4^3S_1)$ states (in MeV), the initial state masses are set to be 1880~MeV and 2232~MeV, respectively. The masses of all the final states are taken from PDG~\cite{Zyla:2020zbs}} \begin{tabular}{c|ccc} \hline\hline Channel & Mode &$\rho(1900)$ &$\rho(2150)$ \\ \hline $1^-\rightarrow 0^-0^-$ & $\pi\pi$ &10.89 &6.18 \\ & $\pi\pi(1300)$ &14.52 &15.96 \\ & $\pi\pi(1800)$ &$\cdots$ &10.07 \\ $ $ & $KK$ &0.34 &0.032\\ & $KK(1460)$ &$\cdots$ & 0.12 \\ \hline $1^-\rightarrow 0^-1^-$ &$\pi\omega$ &21.07 &5.41 \\ &$\rho\eta$ &4.63 &0.82 \\ &$\omega(1420)\pi$ &29.61 &18.92 \\ &$\omega(1650)\pi$ &0.017 & 0.15 \\ &$KK^*$ &0.27 & 0.0098\\ &$KK^*(1410)$ &$\cdots$ & 0.40\\ &$\rho\eta'$ &0.13 &0.11 \\ &$\rho(1450)\eta$ &$\cdots$ &0.59 \\ &$\rho\eta(1295)$ &$\cdots$ &0.19 \\ &$\pi(1300)\omega$ &$\cdots$ & 0.14\\ \hline $1^-\rightarrow 1^-1^-$ &$\rho\rho$ &0.011 &2.19 \\ &$K^*K^*$ &0.11 & 0.41\\ \hline $1^-\rightarrow 0^-1^+$ &$a_{1}(1260)\pi$ &10.16 & 7.73\\ &$h_{1}(1170)\pi$ &8.61 & 8.40 \\ &$KK_{1}(1400)$ &$\cdots$ &0.35 \\ &$KK_{1}(1270)$ &$0.94$ & 0.32 \\ &$b_{1}(1235)\eta$ &1.76 & 1.26\\ \hline $1^-\rightarrow 0^-2^+$ &$a_{2}(1320)\pi$ &22.36 & 14.71 \\ \hline $1^-\rightarrow 0^- 2^-$ &$\pi\pi_{2}(1670)$ &0.067 & 3.44 \\ \hline $1^-\rightarrow 0^- 3^-$ &$\pi\omega_{3}(1670)$ &0.0043 &2.24 \\ \hline $1^-\rightarrow 1^- 1^+$ &$b_{1}(1235)\rho$ &$\cdots$ &5.88\\ &$f_{1}(1285)\rho$ &$\cdots$ &4.49 \\ &$a_{1}(1260)\omega$ &$\cdots$ & 5.86\\ \hline $1^-\rightarrow 1^- 2^+$ &$f_{2}(1270)\rho$ &$\cdots$ &2.30 \\ &$a_{2}(1320)\omega$ &$\cdots$ &3.03 \\ \hline $1^-\rightarrow 0^- 4^+$ &$a_{4}(1970)\pi$ &$\cdots$ &0.0048\\ \hline \multicolumn{2}{c|}{Total width} &125.51 &121.72 \\ \hline \multicolumn{2}{c|}{Experiment} &$130\pm30$ \cite{Aubert:2006jq} &$ 133\pm 14 \pm 4 $~\cite{BABAR:2019oes}\\ \hline\hline \end{tabular} \end{center} \end{table} The decay widths of $\rho(1900)$ as $\rho(3^3S_1)$ are shown in Table~\ref{tab:1900}, and the main decay modes are $\pi\pi$, $\pi a_1(1260)$, $\pi a_2(1320)$, $\pi\pi(1300)$, $\omega(1420)\pi$, and $\pi\omega$. Considering the experimental conditions, $\pi a_2(1320)$ and $\pi\omega$ should be the best channels for investigating $\rho(1900)$. The predicted total width of $\rho(1900)$ as $\rho(3^3S_1)$ is 125.51~MeV which agrees with the $BABAR$ measurement of $\Gamma_{\rho(1900)}=130\pm30$~MeV~\cite{Aubert:2006jq} very well. As we discussed above, there exists a discrepancy for the $\rho(1900)$ width among different experiments. Therefore, further precise measurements for the $\rho(1900)$ width are necessary to pin down the $\rho(3^3S_1)$ assignment. In Fig.~\ref{fig:decay19}, we also show the dependence of the total width on the mass of $\rho(1900)$ as $\rho(3^3S_1)$, the pink error band indicates the uncertainties of the measured width. In the mass range of the experimental value $M_{\rho(1900)}=1880\pm30$~MeV~\cite{Aubert:2006jq}, the predicted total width is still in agreement with the $BABAR$ value $\Gamma_{\rho(1900)}=130\pm30$~MeV. \begin{figure}[htpb] \includegraphics[scale=0.75]{3s-a.eps} \vspace{0.0cm} \caption{The dependence of the decay width on the mass of $\rho(1900)$ as $\rho(3S)$, and the pink error band indicates the measured width for the $\rho(1900)$ from the $BABAR$ Collaboration~\cite{Aubert:2006jq}.}\label{fig:decay19} \end{figure} The decay widths of $\rho(2150)$ as $\rho(4^3S_1)$ are shown in Table~\ref{tab:1900}. The total width is predicted to be 121.72~MeV, which is in good agreement with the BESIII measurement of $139.8\pm12.3 \pm 20.6$~MeV~\cite{Ablikim:2018iyx} and the $BABAR$ measurement of $ 133\pm 14 \pm 4 $~MeV~\cite{BABAR:2019oes}. We can see that the main decay channels are $\pi\pi(1300)$, $\pi\pi(1800)$, $\pi\omega(1420)$, and $\pi a_2(1320)$, among them $\pi a_2(1320)$ should be the easiest one to be measured by experiment as we discussed for $Y(2040)$. In Fig.~\ref{fig:decay}, we show the dependence of the total width on the mass of $\rho(2150)$. In the mass range of the experimental value $M_{\rho(2150)}=2232 \pm 8 \pm 9$ ~MeV~\cite{BABAR:2019oes}, the predicted total width is still in agreement with the $BABAR$ value $ 133\pm 14 \pm 4 $ MeV. Therefore, $\rho(2150)$ is a very good candidate of $\rho(4^3S_1)$. \begin{figure}[htpb] \includegraphics[scale=0.75]{4s-a.eps} \vspace{0.0cm}\caption{The dependence of the decay width on the mass of $\rho(2150)$ as $\rho(4^3S_1)$, and the pink error band indicates the measured width for the $\rho(2150)$ from the $BABAR$ Collaboration~\cite{BABAR:2019oes}.}\label{fig:decay} \end{figure} We also predict the decay behavior for $\rho(3^3D_1)$ state with the initial mass $M=2365$~MeV obtained in the MGI model, as listed in Table~\ref{tab:3D}. The $\rho(3^3D_1)$ width is predicted to be $204.89$~MeV, and the main decay modes are $\rho\rho$, $\pi h_1(1170)$, $\pi \pi_2(1670)$, and $\pi a_1(1640)$. It should be stressed that the state $\rho(2270)$ with a mass of $2265\pm40$~MeV and a width of $325\pm 80$~MeV was reported by the Crystal Barrel Collaboration~\cite{Anisovich:2000ut,Anisovich:2002su} , but is not further confirmed by other experiments. In Ref.~\cite{He:2013ttg}, the $\rho(2270)$ was regarded as the candidate of $\rho(3^3D_1)$. Our predictions on the mass and width for the $\rho(3^3D_1)$ do not favor the assignment of $\rho(2270)$ as $\rho(3^3D_1)$. \begin{table}[htpb] \begin{center} \caption{ \label{tab:3D}The decay widths of $\rho(3^3D_1)$ (in MeV), the initial state mass is set to be 2365 MeV and the masses of all the final states are taken from PDG~\cite{Zyla:2020zbs}.} \begin{tabular}{c|cc|cc} \hline\hline Channel & Mode &$\rho(3^3D_1)$ & Mode &$\rho(3^3D_1)$ \\ \hline $1^-\rightarrow 0^-0^-$ & $\pi\pi$ & 12.59 & $KK$ &0.029 \\ & $\pi\pi(1300)$ & 14.34 & $KK(1460)$ &0.097 \\ & $\pi\pi(1800)$ &10.45 & & \\ \hline $1^-\rightarrow 0^-1^-$ &$\pi\omega$ &2.28 &$KK^*(1680)$ & 0.043 \\ &$\rho\eta$ &0.56 &$\rho(1700)\eta$ & 0.082 \\ &$\omega(1420)\pi$ &3.73 &$\rho\eta(1475)$ & 0.090 \\ &$\omega(1650)\pi$ &0.59 &$\omega\pi(1300)$ & 1.17 \\ &$KK^*$ &0.013 &$\rho\eta(1295)$ & 0.70 \\ &$KK^*(1410)$ &0.031 &$\rho(1450)\eta$ & 0.89 \\ &$\rho\eta'$ &0.0020 & & \\ \hline $1^-\rightarrow 1^-1^-$ &$\rho\rho$ &24.88 &$K^*K^*$ &0.039\\ &$\rho\rho(1450)$ &13.15 &$K^*K^*(1410)$ &0.073 \\ \hline $1^-\rightarrow 0^-1^+$ &$a_{1}(1260)\pi$ &13.08 &$b_{1}(1235)\eta'$ &0.25 \\ &$h_{1}(1170)\pi$ &17.54 &$\pi a_1(1640)$ &16.38 \\ &$KK_{1}(1400)$ &0.11 &$b_{1}(1235)\eta$ &2.94 \\ &$KK_{1}(1270)$ &0.051& & \\ \hline $1^-\rightarrow 0^-2^+$ &$a_{2}(1320)\pi$ &7.92 &$a_{2}(1700)\pi$ &4.98 \\ &$KK_{2}^*(1430)$ &0.0016& & \\ \hline $1^-\rightarrow 0^- 2^-$ &$\pi\pi_{2}(1670)$ &17.69 &$\pi\eta_{2}(1645)$ &11.51\\ &$KK_2(1770)$ &0.019 &$KK_2(1820)$ &0.0018\\ \hline $1^-\rightarrow 0^- 3^-$ &$\pi\omega_{3}(1670)$ &1.12 &$\eta\rho_{3}(1690)$ &0.11 \\ &$KK_{3}(1780)$ &0.0007 & & \\ \hline $1^-\rightarrow 1^- 1^+$ &$b_{1}(1235)\rho$ &3.35 &$K_1(1400)K^*$&0.077\\ &$a_{1}(1260)\omega$ &2.17 &$K_1(1270)K^*$&0.25\\ &$\rho f_1(1285)$&1.18 &$\rho f_1(1420)$&0.17\\ &$\rho h_1(1170)$&4.52& & \\ \hline $1^-\rightarrow 2^+ 1^-$ &$\rho f_2(1270)$&7.71&$K^*K_2^*(1430)$&0.022\\ &$\omega a_2(1320)$&5.33& & \\ \hline $1^-\rightarrow 0^- 4^+$ & $a_4(1970)\pi$&0.11& & \\ \hline $1^-\rightarrow 1^- 0^+$ &$a_0(1450)\omega$&0.46& & \\ \hline Total width &\multicolumn{4}{c}{204.89}\\ \hline\hline \end{tabular} \end{center} \end{table} \section{SUMMARY AND CONCLUSION} \label{sec5} In this work, we perform a systematic study on the mass spectrum and decay properties for $Y(2040)$, $\rho(1900)$, and $\rho(2150)$. The mass spectrum of the excited $\rho$ mesons is predicted within the MGI model where the screening effects are taken into account. Moreover, the decay behaviors are calculated in the $^3P_0$ model with the meson wave functions obtained from the MGI model. We draw the following conclusions by comparing the recent precise experimental measurements with our theoretical results. \begin{enumerate} \item The screening effects play an important role in studying the masses of $Y(2040)$, $\rho(1900)$, $\rho(2150)$, and $\rho(3^3D_1)$, and mass gaps around 100~MeV appear when we compare the MGI model predictions with the ones of the GI model. \item The newly observed state $Y(2040)$ should be the same state as $\rho(2000)$ which is omitted in the summary table of PDG~\cite{Zyla:2020zbs}, since they share the similar resonance parameters~\cite{Aubert:2007ef, Ablikim:2019tqd, Ablikim:2020das} . \item The $Y(2040)$, $\rho(1900)$, and $\rho(2150)$ can be interpreted as the $\rho(2^3D_1)$, $\rho(3^3S_1)$, and $\rho(4^3S_1)$ states, respectively. \end{enumerate} This work is helpful for us to reveal the inner structure of $Y(2040)$, $\rho(1900)$, and $\rho(2150)$, which is crucial to understand the $\rho$ meson family. In addition, we expect that more and more experimental measurements will be released in future, especially the decay width of $\rho(1900)$ needs to be measured precisely to pin down the $\rho(3^3S_1)$ assignment. Apart from the phenomenological models employed in this work, much progress has been made on mass spectrum and strong decays of the $\rho$ mesons by using lattice QCD in the past decade. For example, masses are estimated in Ref.~\cite{Dudek:2010wm} for a few excited $\rho$ mesons, and the authors of Ref.~\cite{Johnson:2020ilc} also compute the decay widths $\pi \rho$ and $\pi \omega$ for $\rho(1450)$ and $\rho(1700)$. We expect that more and more results will be released by lattice QCD in the near future, and the predictions of this work can be checked for the excited $\rho$ mesons. \section*{Acknowledgements} This work is partly supported by the National Natural Science Foundation of China under Grants No. 12005191, the Key Research Projects of Henan Higher Education Institutions under No. 20A140027, Training Plan for Young Key Teachers in Higher Schools in Henan Province (2020GGJS017), the Academic Improvement Project of Zhengzhou University, the Fundamental Research Cultivation Fund for Young Teachers of Zhengzhou University (JC202041042).
\section{\label{sec:level1}Introduction} Recently, quantum chemistry calculations have attracted attention as new application for quantum devices because of its potential use in medical areas. One of the main purposes of the quantum chemistry is to calculate the energy of the molecule Hamiltonian written by the second quantized form. The high accuracy of the energy of chemical materials is required at least $1.6\times10^{-3}$ hartree where $1\mbox{hartee}=e^{2}/4\pi\epsilon_{0}a_{0}=27.211$eV and $a_{0}=1\mbox{bohr}=0.529\times10^{-10}\mbox{m}$. This accuracy is called chemical accuracy. The energy with a chemical accuracy allows us to estimate the chemical reaction rate at a room temperature using the Eyring equation\cite{eyring1935activated} There are sophisticated techniques to map the molecule Hamiltonian with the second quantized form into a spin Hamiltonian. These techniques are important to implement the quantum chemistry calculations with the quantum devices composed of qubits, because the Hamiltonian to describe the molecules in the quantum devices should be written by the Pauli matrices. We can map the second-quantized many-body Hamiltonians onto those of qubits systems by Bravyi-Kitaev transformation\cite{bravyi2002fermionic, verstraete2005mapping, seeley2012bravyi, tranter2015b, xia2017electronic}. There is an improvement over the Jordan-Wigner transformation in the requirement for the number of the qubit operators per a fermionic operator. The Jordan-Wigner transformation maps one of $n$ fermionic operators to $O(n)$ qubits operators. On the other hand, Bravyi-Kitaev transformation maps one of $n$ fermionic operators to $O(log(n))$ qubits. The comparison of the gate number for the Bravyi-Kitaev tansformation and Jordan-Wigner transformation to get the ground state and the lowest energy with the Trotter decomposition is reported\cite{tranter2018comparison}. Also, Babbush \textit{et al}. represent the Hamiltonian using only 2-local interaction between spins\cite{babbush2014adiabatic}. In fault tolerant quantum computation, quantum algorithms have been proposed in quantum chemistry calculations\cite{takeshita2020increasing, mueck2015quantum, babbush2018low}. Molecular energies are obtained using phase-estimation algorithms\cite{aspuru2005simulated, whitfield2011simulation}. However, the fault tolerant quantum computer require many qubits with high fidelity gate operations beyond the capability of near-term quantum computer to use error-correction. So the algorithm for quantum chemistry is not experimentally implemented with a practically useful size yet. Recently, Noisy Intermediate-Scale Quantum(NISQ) computing is proposed \cite{arute2019quantum, zhang2020variational,endo2021hybrid}. One of the promising algorithms with NISQ is the variational quantum eigensolver(VQE) with the variational method\cite{peruzzo2014variational, mcclean2016theory}. The VQE gives the lowest eigenvalue of a Hamiltonian such as that of a chemical material. The VQE is a hybrid quantum-classical algorithm. Variational algorithm is also used to simulate quantum dynamics \cite{li2017efficient,chen2020demonstration}. The energy variance was used to know how close the quantum state is to the energy eigenstate in the NISQ algorithm \cite{kardashin2020certified}. Quantum annealing(QA) is also a promising way to implement the quantum chemistry calculations. The QA was traditionally used to solve the combinatorial optimization problem\cite{kadowaki1998quantum, matsuzaki2020direct, seki2012quantum}. We map the combinatorial optimization problem into the Ising Hamiltonian $H_{P}$, and we call this a problem Hamiltonian whose ground state corresponds to the solution of the combinatorial optimization problem. On the other hand, we use another Hamiltonian $H_{D}$ that represents transverse magnetic fields, which we call a driver Hamiltonian. In the QA, we prepare a ground state of $H_{D}$, and the total time-dependent Hamiltonian is changed from $H_{D}$ to $H_{P}$ within an annealing time $T$. As long as an adiabatic condition is satisfied, an adiabatic theorem guarantees that we can obtain the ground state of the problem Hamiltonian by the QA. Importantly, by replacing the $H_P$ with the molecule Hamiltonian, the QA can be used to estimate an energy of the ground state in quantum chemistry\cite{xia2017electronic, copenhaver2020using, mazzola2017quantum, genin2019quantum, streif2019solving}. In addition, the excited states search in quantum chemistry is discussed \cite{teplukhin2019calculation, seki2020excited}. D-wave systems, Inc\modyseki{.~}\cite{johnson2011quantum} have realized quantum annealing machines composed of thousands of the qubits. They use superconducting flux qubits to implement the quantum annealing. There are many experimental demonstrations of the QA by the device of the D-wave systems, Inc\modyseki{.~}\cite{kudo2018constrained, adachi2015application, hu2019quantum, kudo2020localization}. Especially, quantum chemistry calculations were demonstrated with the QA to estimate the ground state energy for a small size molecule \cite{genin2019quantum}. The potential problem to use the QA for practical quantum chemistry calculations is an intrinsic error during the QA. Non-adiabatic transitions induce a transition from the ground state to excited states. Also, decoherence due to the coupling with an environment causes unwanted decay of the quantum states during the QA. Due to these problems, it is not clear whether we can achieve the chemical accuracy in quantum chemistry calculations by the QA. So it is essential to achieve a higher accuracy to estimate the ground state energy in the QA. In this paper, we propose a way to estimate an energy of the target Hamiltonian with improved accuracy by combining quantum annealing with classical computation. We show that, if the population of the ground state is more than $1/2$ after the QA, an energy variance (that we can experimentally measure) provides us with an upper bound of the estimation error. We also show a way to check whether the population of the ground state is more than $1/2$ after the QA or not by using classical computation. We need to know a possible range of the energies of the ground state and first excited state before the QA by performing classical computation with some approximation (such as a mean field technique). We can calculate a certain threshold by using values from the pre-estimation, and if the energy estimated by the QA is smaller than the threshold, the population of the ground state is more than $1/2$ after the QA. Additionally, if the error bars (corresponding to the estimation error) given by the pre-estimation is larger than an energy variance measured from the QA, we can use the energy variance as the improved error bars for the energy estimation. The method are represented schematically in FIG\ref{fig:epsart}. The paper is structured as follow. In Sec. II, we review the QA. In Sec III, we derive a relationship between the energy estimation error and the energy variance in the QA for the ground state search, and also show a condition when the energy variance becomes an upper bound of the energy estimation error. In Sec IV, to check the performance of our scheme, we adopt our method to estimate a ground state energy of the hydrogen molecule. In Sec V, we summarize and discuss our results. \begin{figure}[ht] \includegraphics[width=80mm]{figure/Fig1.pdf \caption{A flow chart showing how to estimate the ground state energy of target Hamiltonian in our protocol. We need to pre-estimate the ground state energy by using a classical computer with some approximation, and need to know $\tilde{E}_{0}$, $\tilde{E}_{1}$, $\delta M_0$, and $\delta M_{1}$ where $\tilde{E}_{0}$ ($\tilde{E}_{1}$) is the approximated ground (first excited) state energy from pre-estimation and $\delta M_0$ ($\delta M_{1}$) is the bound of the error of the pre-estimation. In addtion, $E_0$($E_1$) denotes the true energy of the ground (first excited) state and $\braket{H}$ ($\braket{\Delta E^{2}}$) denotes the expectation (variance) of the Hamiltonian of the state after the QA. In our protocol, when $\braket{H}$ is smaller than $(\frac{\tilde{E}_0-\tilde{E}_0}{2}-\frac{\delta M_0 +\delta M_1}{2})$, the energy variance of the state after the QA can be an upper bound of the estimation error. } \label{fig:epsart} \end{figure} \section{Quantum annealing} Let us review the QA for the ground state search. We also regard the driving Hamiltonian as the transverse field. The total Hamiltonian for the QA is described as follows \begin{align} H(t)=\frac{t}{T}H_{P}+\Bigl(1-\frac{t}{T}\Bigr)H_{D} \end{align} where $T$ is the annealing time. First, we prepare the ground state of the transverse field $H_{D}=-\sum_{i=1}^{N}\hat{\sigma}_{i}^{x}$, $\ket{\Psi(0)}=\ket{+\cdots+}$ where the quantum state $\ket{+}$ expresses the eigenstate of $\sigma^{x}$ with the eigenvalue $+1$. Second, the driver Hamiltonian is adiabatically changed into the problem Hamiltonian. Finally, we obtain the ground state of the problem Hamiltonian if the dynamics is adiabatic, and so the measurements of an observable $H_{P}$ provides the ground state energy. Various noise deteriorates the accuracy of the QA. The main noise sources are environmental decoherence and non-adiabatic transitions. There is a trade-off between these two errors. We should implement the QA slowly to avoid the non-adiabatic transitions, while the slower dynamics tend to increase the error due to the decoherence. There are many attempts to suppress non-adiabatic transitions and decoherence. The use of non-stochastic Hamiltonians has been proposed to increase an energy gap during the QA for a specific model, which could contribute the suppression of the non-adiabatic transitions. Inhomogeneous driving Hamiltonian for a p-spin model is known to contribute to the speedup of the QA for specific cases \cite{susa2018exponential, susa2018quantum}. Direct estimation of the energy gap between the ground state and the first excited state using the quantum annealing was proposed, and this was shown to be more robust against non-adiabatic transitions than the conventional scheme \cite{matsuzaki2020direct}. Both theoretical and experimental studies have been made to suppress the decoherence during the QA. We can use error correction techniques \cite{pudenz2014error}, spin lock techniques \cite{chen2011experimental,nakahara2013lectures,matsuzaki2020quantum}, and decoherence free subspace \cite{matsuzaki2020quantum} for the suppresion of the decoherence. A method using non-adiabatic transition and quench for an efficient QA is also investigated \cite{crosson2014different, goto2020excited, hormozi2017nonstoquastic, muthukrishnan2016tunneling, brady2017necessary, somma2012quantum, das2008colloquium}. Despite the efforts of previous research, there are no universal ways to suppress both environmental decoherence and non-adiabatic transitions during the QA, and this fact makes it difficult to guarantee the accuracy of the results of the QA. \section{method} Here, we present our scheme to estimate a ground state energy with improved accuracy in a certain condition. \subsection{Bounds on the error of the energy} \label{sec:bounds_on_the_error} In practice, the quantum state become mixed states, because non-diagonal terms in the density matrix decay from the decoherence. After implementing the QA, we measure only Hamiltonian and energy variance. In this case, we can show that the non-diagonal terms in the energy basis does not affect the expectation values. So we can describe the quantum state after the QA either a pure state or a mixed state as long as the energy population is the same between them. For simplicity, we would use a pure state for the description. Suppose that we obtain a state of $\ket{\phi_{0}^{(\mbox{ann})}}$ after the QA. We rewrite this state as follows. \begin{align} \ket{\phi_{0}^{(\mbox{ann})}}=\sqrt{1-\epsilon^{2}}\ket{\phi_{0}}+\sum_{m\neq 0}\epsilon_{m}\ket{\phi_{m}}. \end{align} where $\ket{\phi_{0}}$ denotes the ground state, $\ket{\phi_{m}}$ $(m>0)$ denotes the $m$-th excited state, $\epsilon_{m}$ denotes the amplitude of the $m$-th excited state, and $\epsilon$ denotes the amplitude of all the states except the ground state. In other words, $\sqrt{1-\epsilon^{2}}$ denotes the amplitude of the ground state. Due to the normalization, we have a condition of $\epsilon^{2}=\sum_{m\neq 0}\epsilon_{m}^{2}$. Since we consider an expectation value of the Hamiltonian and the energy variance, the relative phase between the energy eigenstate does not affect our results. So we can assume $\epsilon_{m}$ to be real values without loss of generality throughout our paper. First, let us explain the estimation error and energy variance. The estimation error of the energy eigenvalue of the problem Hamiltonian is given by \begin{align} \bra{\phi_{0}^{(\mbox{ann})}}H_{P}\ket{\phi_{0}^{(\mbox{ann})}}-\bra{\phi_{0}}H_{P}\ket{\phi_{0}}=\sum_{m\neq 0}\epsilon_{m}^{2}(E_{m}-E_{0}) \end{align} where $H_{P}$ is the problem Hamiltonian and $E_{m}$ is the $m$-th energy eigenvalue of the problem Hamiltonian. On the other hand, the energy variance $\Delta E^{2}$ is given by \begin{align} \Delta E^{2}&=\bra{\phi_{0}^{(\mbox{ann})}}H_{P}^{2}\ket{\phi_{0}^{(\mbox{ann})}} - \bra{\phi_{0}^{(\mbox{ann})}}H_{P}\ket{\phi_{0}^{(\mbox{ann})}}^{2}\notag\\ &=\sum_{m\neq 0}\epsilon_{m}^{2}(E_{m}-E_{0})^{2}-\Bigl(\sum_{m\neq 0}\epsilon_{m}^{2}(E_{m}-E_{0})\Bigr)^{2}. \end{align} We subtract the energy dispersion $\Delta E^{2}$ from the error squared of the energy as follows. \begin{align} \Delta E^{2}&-\Bigl(\bra{\phi_{0}^{(\mbox{ann})}}H_{P}\ket{\phi_{0}^{(\mbox{ann})}}-\bra{\phi_{0}}H_{P}\ket{\phi_{0}}\Bigr)^{2}\notag\\ &=\sum_{m\neq 0}\epsilon_{m}^{2}(E_{m}-E_{0})^{2}-\Bigl(\sum_{m\neq 0}\epsilon_{m}^{2}(E_{m}-E_{0})\Bigr)^{2}\label{eq:diff_disparsion_square_error} \end{align} We derive the next theorem. \begin{theorem}\label{theorem1} If the amplitude of all the states except the ground state $\epsilon$ satisfies $\epsilon^{2}\leq\frac{1}{2}$, then \begin{align} \Delta E^{2}&-\Bigl(\bra{\phi_{0}^{(\mbox{ann})}}H_{P}\ket{\phi_{0}^{(\mbox{ann})}}-\bra{\phi_{0}}H_{P}\ket{\phi_{0}}\Bigr)^{2}\geq0. \end{align} \end{theorem} \begin{proof} we consider the relation between the energy variance and the estiamtion error of the energy eigenvalue. We remark that the following inequality is hold from the Cauchy–Schwarz inequality. \begin{align} \Bigl(\sum_{m\neq n}\epsilon_{m}^{2}&(E_{m}-E_{n})\Bigr)^{2} \notag\\ &\leq \Bigl(\sum_{m\neq n}\epsilon_{m}^{2}\Bigr)\Bigl(\sum_{m\neq n}\epsilon_{m}^{2}(E_{m}-E_{n})^{2}\Bigr).\label{eq:deform_cauchy_schwarz} \end{align} The lower bound of difference between the energy variance and the error of the square of energy (\ref{eq:diff_disparsion_square_error}) is given as follows. \begin{align} \Delta E^{2}&-\Bigl(\bra{\phi_{0}^{(\mbox{ann})}}H_{P}\ket{\phi_{0}^{(\mbox{ann})}}-\bra{\phi_{0}}H_{P}\ket{\phi_{0}}\Bigr)^{2}\notag\\ &=\sum_{m\neq 0}\epsilon_{m}^{2}(E_{m}-E_{0})^{2}-\Bigl(\sum_{m\neq 0}\epsilon_{m}^{2}(E_{m}-E_{0})\Bigr)^{2}\notag\\ &\geq\sum_{m\neq n}\epsilon_{m}^{2}(E_{m}-E_{n})^{2}-2\epsilon^{2}\sum_{m\neq n}\epsilon_{m}^{2}(E_{m}-E_{n})^{2}\notag\\ &=(1-2\epsilon^{2})\sum_{m\neq n}\epsilon_{m}^{2}(E_{m}-E_{n})^{2} \end{align} where we have applied the inequality (\ref{eq:deform_cauchy_schwarz}) to rewrite the inequality. Finally, from $\sum_{m\neq n}\epsilon_{m}^{2}(E_{m}-E_{n})^{2}\geq0$ in the equations above, this completes the proof. \end{proof} From the theorem\ref{theorem1}, we derive a condition for the energy variance to be an upper bound of the estimation error as follows. \begin{align} \epsilon^{2}\leq\frac{1}{2} \label{eq:condition}. \end{align} \subsection{Pre-estimation of the energy before the QA by performing classical computation}\label{sec:check_pop} In this subsection, we show a way to check $\frac{1}{2}\geq \epsilon^{2}$, i.e. the population of the ground state to be more than $1/2$. The main idea is to perform a pre-estimation of the energies of the ground state and first excited state. We could use a classical computer for such a pre-estimation by using a suitable approximation such as mean field technique or variational methods. If this pre-estimation is accurate enough, the condition of $\frac{1}{2}\geq \epsilon^{2}$ is satisfied, and so we can use the energy variance to obtain an upper bound of the error estimation, as we will explain later. Let $\tilde{E}_{n}$ denote the approximate value of obtained from the pre-estimation. There are many ways to calculate the ground energy and excited state energy of molcules in quantum chemistry with a classical computer. For example, variational trial function gives us an upperbound of the ground state energy. There is a way to estimate the lower boud of the ground state energy as shown \cite{temple1928theory}. Also,various ways to obtain an energy gap between the ground state energy and exited states is known\cite{loos2020quest, nakatsuji2005deepening, cai2000low, silva2008benchmarks}. The combination of these technique would provide the range of the ground state energy and first excited state energy. The estimation error of the approximate eigenvalue $\tilde{E}_{n}$ from the true eigenvalue $E_{n}$ is denoted by $\delta\tilde{E}_{n}$. Thus, we remark the equality \begin{align} \tilde{E}_{n}=E_{n}+\delta\tilde{E}_{n}\label{eq:tilde_energy}. \end{align} We assume that the estimation errors are bounded as follows. \begin{align} |\delta\tilde{E}_{0}|<\delta M_{0},\ \ |\delta\tilde{E}_{1}|<\delta M_{1}. \end{align} where $\delta M_{0}$ and $\delta M_{1}$ denotes error bars representing the accuracy of the pre-estimation. We can show that the sufficient condition of inequality $\frac{1}{2}\geq \epsilon^{2}$ is \begin{align} E_{0}^{(\mbox{ann})}\leq\frac{1}{2}(E_{0}+E_{1}).\label{eq:gs_condition} \end{align} Substituting the equality (\ref{eq:tilde_energy}) into the inequality (\ref{eq:gs_condition}), we obtain \begin{align} (E_{0}<)E_{0}^{(\mbox{ann})}<\frac{1}{2}(\tilde{E}_{0}+\tilde{E}_{1})-\frac{1}{2}(\delta\tilde{E}_{0}+\delta\tilde{E}_{1}) \label{eq:inequality_1} \end{align} We obtain a sufficient condition for the inequality (\ref{eq:inequality_1}) as follows. \begin{align} (E_{0}<)E_{0}^{(\mbox{ann})}<\frac{1}{2}(\tilde{E}_{0}+\tilde{E}_{1})-\frac{1}{2}(|\delta\tilde{E}_{0}|+|\delta\tilde{E}_{1}|)\label{eq:inequality_2} \end{align} From $|\delta\tilde{E}_{0}|<\delta M_{0}$ and $|\delta\tilde{E}_{1}|<\delta M_{1}$, a sufficient condition for the inequality (\ref{eq:inequality_2}) is \begin{align} (E_{0}<)E_{0}^{(\mbox{ann})}<\frac{1}{2}(\tilde{E}_{0}+\tilde{E}_{1})-\frac{1}{2}(\delta M_{0}+\delta M_{1}).\label{eq:condition2} \end{align} From the approximate energy eigenvalues by the pre-estiamtion ($\tilde{E}_{0}$ and $\tilde{E}_{1}$) and the upper bound of the estimation errors ($\delta M_{0}$ and $\delta M_{1}$), the inequality (\ref{eq:condition2}) is the sufficient condition of (\ref{eq:condition}). This means that, as long as (\ref{eq:condition2}) is satisfied, we can use the energy variance as the new error bar (corresponding to the upper-bound of the estimation error) of the energy estimation. Especially when the new error bar given by the energy variance is smaller than $\delta M_0$, the accuracy to estimate the ground state energy is better than that from just the pre-estimation. The condition (\ref{eq:condition2}) is not always satisfied. If there are significant effect of decoherence and/or non-adiabatic transitions, $E_{0}^{(\mbox{ann})}$ could be large so that the sufficient conditions would not be satisfied. Alternatively, if the estimation error $(\delta M_{0}+\delta M_{1})$ is large, again, it becomes harder to satisfy the sufficient condition. In these cases, we should try other approaches such as optimizing the quantum annealing schedule, fabricating new samples with lower decoherence, or more precise pre-estimation with a longer calculation time using a classical computer to make the condition (\ref{eq:condition2}) satisfied. \subsection{Measurement of the energy and variance of the Hamiltonian} We describe how to measure the energy and variance of the Hamiltonian in the QA. We assume that we can perform any single qubit measurements in the QA. The Hamiltonian is now written in the form of $H=\sum _j \hat{P}_j$ where $\hat{P}_j$ denotes the product of Pauri matrices (such as $\hat{\sigma}^{z}_{0}$, $\hat{\sigma}^{z}_{1}$, $\dotsc$, and $\hat{\sigma}^{x}_{0}\hat{\sigma}^{x}_{1}\hat{\sigma}^{y}_{2}\hat{\sigma}^{y}_{3}$). After the preparation of the ground state with the QA, we can implement single qubit measurements to obtain $\langle \hat{P}_1 \rangle $. This means that, by repeating the experiments (that are composed of the ground state preparation and single qubit measurements), we can measure $\langle \hat{P}_j \rangle $ for every $j$, and we obtain $\langle H\rangle $ by summing up them. Similarly, we can measure $\langle H^2\rangle $, and so we can also measure the variance of the energy. These techniques are used in the algorithm in NISQ devices\cite{cerezo2020variational, endo2020hybrid, cerezo2020variational, endo2020hybrid}. \section{Numerical Result} In this section, we perform the numerical simulations to estimate the error of the energy using our method. We consider the hydrogen molecule. The Hamiltonian of the hydrogen molecule can be described by the Pauli matrices. To consider the decoherence, we simulate the QA with the Lindblad master equation, and discuss the relation between decoherence rate and the accuracy of the energy estimation. In addition, we plot the improved error bars obtained from our methods. We introduce the Lindblad master equation. We consider the time dependent system Hamiltonian $H(t)$ under a noisy environment. The Lindblad master equation which we use in this paper is given by \begin{align} \frac{d\rho(t)}{dt}=-i[H(t), \rho(t)]+\sum_{n}\gamma[\sigma^{(k)}_{n}\rho(t)\sigma^{(k)}_{n}-\rho(t)] \end{align} where $\sigma^{(k)}_{j}(k=x,y,z)$ denotes the Pauli matrix acting at site $j$, $\gamma$ denotes a decoherence rate and $\rho(t)$ is a density matrix of the quantum state at time $t$. We solve the Lindblad master equation numerically with the QuTiP~\cite{johansson184nation, johansson2012qutip}. Throughout of this paper, we choose the decoherence type $\sigma^{z}_j$ as the Lindblad operator. This type of noise has been studied in a previous work to consider the effect of noise on the superconducting qubits \cite{puri2017quantum}. The Hamiltonian of hydrogen is given by \begin{align} H= &h_{0}I+h_{1}\hat{\sigma}^{z}_{0} +h_{2}\hat{\sigma}^{z}_{1} +h_{3}\hat{\sigma}^{z}_{2} +h_{4}\hat{\sigma}^{z}_{3}\notag\\ &+h_{5}\hat{\sigma}^{z}_{0}\hat{\sigma}^{z}_{1} +h_{6}\hat{\sigma}^{z}_{0}\hat{\sigma}^{z}_{2} +h_{7}\hat{\sigma}^{z}_{1}\hat{\sigma}^{z}_{2} +h_{8}\hat{\sigma}^{z}_{0}\hat{\sigma}^{z}_{3} +h_{9}\hat{\sigma}^{z}_{1}\hat{\sigma}^{z}_{3}\notag\\ &+h_{10}\hat{\sigma}^{z}_{2}\hat{\sigma}^{z}_{3} +h_{11}\hat{\sigma}^{y}_{0}\hat{\sigma}^{y}_{1}\hat{\sigma}^{x}_{2}\hat{\sigma}^{x}_{3} +h_{12}\hat{\sigma}^{x}_{0}\hat{\sigma}^{y}_{1}\hat{\sigma}^{y}_{2}\hat{\sigma}^{x}_{3}\notag\\ &+h_{13}\hat{\sigma}^{y}_{0}\hat{\sigma}^{x}_{1}\hat{\sigma}^{x}_{2}\hat{\sigma}^{y}_{3} +h_{14}\hat{\sigma}^{x}_{0}\hat{\sigma}^{x}_{1}\hat{\sigma}^{y}_{2}\hat{\sigma}^{y}_{3}\label{eq:hydrogen_hamiltonian} \end{align} where we used STO-3G basis and Jordan-Wigner transformation. The coefficients of the Hamiltonian (\ref{eq:hydrogen_hamiltonian}) $h_{0},\dotsc ,h_{14}$ depend on the interatomic distance. We consider the interatomic distance is $0.65$\AA. The coefficient in the Hamiltonian (\ref{eq:hydrogen_hamiltonian}) corresponding to the above interatomic distance is written in the TABLE \ref{tb:hydrogen_coefficient}, which is calculated by OpenFermion~\cite{mcardle2020quantum}. \begin{table}[htb] \begin{tabular}{|c||c|} \hline $h_{0}$ & $0.03775110394645716$ \\ $h_{1}$ & $0.18601648886230573$ \\ $h_{2}$ & $0.18601648886230576$ \\ $h_{3}$ & $-0.2694169314163209$ \\ $h_{4}$ & $-0.2694169314163209$ \\ $h_{5}$ & $0.1729761013074511$ \\ $h_{6}$ & $0.0440796129025518$ \\ $h_{7}$ & $-0.0440796129025518$ \\ $h_{8}$ & $-0.0440796129025518$ \\ $h_{9}$ & $0.0440796129025518$ \\ $h_{10}$ & $0.1258413655800634$ \\ $h_{11}$ & $0.1699209784826152$ \\ $h_{12}$ & $0.1699209784826152$ \\ $h_{13}$ & $0.1258413655800634$ \\ $h_{14}$ & $0.17866777775953416$ \\ \hline \end{tabular} \caption{The coefficient of the hydrogen molecule. The unit of these values is GHZ, as we describe in the main text.} \label{tb:hydrogen_coefficient} \end{table} The most promissing device for the quantum annealing is a superconducting qubit. We mainly consider the implementation of the superconducting qubits. The typical energy scale of the superconducting qubit is aroung GHz \cite{clarke2008superconducting}. So we adopt thie energy scale to describe the Hamiltonian. The relation between the measured energy and annealing time is shown in FIG\ref{fig:optimal_annealign_time}. We can choose the annealing time to minimize the energy of the problem Hamiltonian after the QA. Throughout of our paper, we choose such an optimized annealing time for the plots. Importantly, as the decoherence rate increases, the minimum energy after the optimization increases. This is because the decoherence could induce a transition from a ground stat to excited states. \begin{figure}[ht] \includegraphics[width=80mm]{figure/Fig2.pdf \caption{ Plots to show the relation between the annealing time and the ground state energy by quantum annealing. We consider the hydrogen molecule with interatomic distance $0.65$\AA. Vertical axis denote the energy, while the horizontal axis denote annealing time $T$ for the each decoherence rate $\gamma$. } \label{fig:optimal_annealign_time} \end{figure} ~~~ ~~~ \begin{figure}[htbp] \begin{center} \begin{minipage}{0.48\textwidth} \begin{center} \begin{minipage}{0.90\textwidth} \begin{center} \includegraphics[width=0.95\textwidth]{figure/Fig3-1.pdf}\\ (a) Threshold decoherence rate for our scheme to be applied \end{center} \end{minipage}\\ \begin{minipage}{0.90\textwidth} \begin{center} \includegraphics[width=0.95\textwidth]{figure/Fig3-2.pdf}\\ (b) The threhold decoherence rate for our scheme to be more precise than pre-estimatation \end{center} \end{minipage} \end{center} \end{minipage} \caption{(a)The threshold decoherence rate for our scheme to be applied. The holizontal axis denotes the estimation error when we perform pre-estimation by a classical computer. As long as the decoherence rate of the QA is below the threshold, we can apply our scheme, and so the energy variance can be an upper-bound of the estimation error of the QA. Here, we define that our scheme succeeds (fails) when we can (cannot) apply our scheme based on this prescription. If $(\delta M_{0}+\delta M_{1})/2$ becomes equal to or larger than $(E_{1}-E_{0})/2$, our protocol always fails regardless the values of the decoherence rate. (b)The threhold decoherence rate for our scheme to be more precise than pre-estimatation. The holizontal axis denotes the estimation error when we perform pre-estimation by a classical computer. As long as the decoherence rate of the QA is below the threshold, the energy variance is more precise upper-bound than pre-estimation error of the QA. Here, we define that our scheme succeeds (fails) when our scheme can (cannot) achieve better estimation than the pre-estimation on this prescription.% } \label{fig:accuracy_pre-estimate} \end{center} \end{figure} By applying the method discussed in the subsection \ref{sec:check_pop}, we numerically determine the conditions that satisfies $\frac{1}{2}\geq\epsilon^{2}$ with the pre-estimation when we estimate the ground state energy of the hydrogen molecules. In other words, we show the region where we can use the energy variance as the upper bound of the estimation error. Such a region is plotted in FIG\ref{fig:accuracy_pre-estimate} (a). As the decoherence rate increases, pre-estimation should be done more precisely to satisfy $\frac{1}{2}\geq\epsilon^{2}$. On the other hand, even when we can use the energy variance obtained from the QA as the new error bound (due to the satisfaction of the condition of $\frac{1}{2}\geq\epsilon^{2}$), the pre-estimation could be still better if the variance is too large. We plot the condition when the energy variance can be smaller than $\delta M_0$ while the condition of $\frac{1}{2}\geq\epsilon^{2}$ is satisfied, as shown FIG\ref{fig:accuracy_pre-estimate} (b). In the FIG\ref{fig:accuracy_estimate}, we plot the estimation of the ground state energy and the error bar obtained by the energy variance when we use our scheme in the QA. As the decoherence rate becomes smaller, the error bar (corresponding to the energy variance) becomes smaller. Also, we confirm that the variance is actually larger than the estimation error when the decoherence rate is larger. \begin{figure}[ht] \includegraphics[width=80mm]{figure/Fig4.pdf \caption{ The energy expectation value with the error bar in our scheme. The dashed line is the exact ground state energy. The solid line is the energy expectation value ($E_{0}^{(ann)}$) obtained from the QA. } \label{fig:accuracy_estimate} \end{figure} \section{Conclusion} In this paper, we propose a way to estimate an energy of the target Hamiltonian with improved accuracy by combining quantum annealing with classical computation. We show that, if the population of the ground state is more than $1/2$ after the QA, the error of the energy for the problem Hamiltonian is upper bounded by the square root of the energy variance. In order to check whether the population of the ground state is more than $1/2$ after the QA, we use classical computation for the pre-estimation of the energy of the ground state and first excited state. More precisely, we obtain the approximate energy of the problem Hamiltonian with possible error bars for the ground state and first excited state by performing classical computation with some approximation (such as mean field technique). From the values obtained by the pre-estimation, we can calculate a threshold, and if the energy of the state after the QA is smaller than the threshold, the population of the ground state is more than $1/2$ after the QA. In addition, if the energy variance of the QA is smaller than the error bar in the pre-estimation, we can use the energy variance as the improved error bar. Our methods are useful \textcolor{black}{to improve the accuracy} for quantum chemistry calculations especially when the QA with long-lived qubits is experimentally realized. \begin{acknowledgments} We thank a helpful discussion with Kenji Sugisaki. This work was supported by Leading Initiative for Excellent Young Researchers MEXT Japan and JST presto (Grant No. JPMJPR1919) Japan. This paper is partly based on results obtained from a project, JPNP16007, commissioned by the New Energy and Industrial Technology Development Organization (NEDO), Japan. \end{acknowledgments} ~~~ \nocite{*}
\section{Some basic facts on the kernel and associated functions} In this section, we obtain some properties of the functions $J(r)$, $\tilde J(r,\rho)$ and $J_*(l)$, which will play important roles for our analysis in later sections. \begin{lemma}\label{lemma2.2} For $x\in{\mathbb R}^N\setminus \{0\}$ and $\rho>0$, let \[ \mbox{$\Gamma_+(x,\rho)=\{y\in \partial B_\rho: y\cdot x\geq 0\}$ and $\Gamma_-(x,\rho)=\{y\in\partial B_\rho: y\cdot x\leq 0\}$.} \] Then for $r=|x|$, \begin{align*} \tilde J_+(r,\rho):=&\int_{\Gamma_+(x,\rho)} J(|x-y|) {\rm d} S_y\\ =&\omega_{N-1}2^{3-N}\frac{\rho}{r^{N-2}}\int_{|\rho-r|}^{\sqrt{\rho^2+r^2}} \Big(\left[(\rho+r)^2-\eta^2\right][\eta^2-(\rho-r)^2]\Big)^{\frac{N-3}2}\eta J(\eta) {\rm d} \eta, \end{align*} \begin{align*} \tilde J_-(r,\rho):=&\int_{\Gamma_-(x,\rho)} J(|x-y|) {\rm d} S_y\\ =&\omega_{N-1}2^{3-N}\frac{\rho}{r^{N-2}}\int^{\rho+r}_{\sqrt{\rho^2+r^2}} \Big(\left[(\rho+r)^2-\eta^2\right][\eta^2-(\rho-r)^2]\Big)^{\frac{N-3}2}\eta J(\eta) {\rm d} \eta, \end{align*} and \begin{align*} \tilde J(r,\rho)= \omega_{N-1}2^{3-N}\frac{\rho}{r^{N-2}}\int^{\rho+r}_{|\rho-r|} \Big(\left[(\rho+r)^2-\eta^2\right][\eta^2-(\rho-r)^2]\Big)^{\frac{N-3}2}\eta J(\eta) {\rm d} \eta. \end{align*} \end{lemma} \begin{proof} For any given $y\in\partial B_\rho$ and $x\in\partial B_r$ with $\rho, r>0$, let $\theta$ denote the angle between $y$ and $x$, namely $y\cdot x=\rho r\cos\theta$; then let $S_\theta$ denote the intersection of the hyperplane $H_\theta:=\{z\in{\mathbb R}^N: z\cdot x=\rho\cos\theta\}$ with the sphere $\partial B_\rho$, which clearly is an $N-2$ dimensional sphere of radius $\rho\sin\theta$. Then \[ J(|x-y|)\equiv J\left(\sqrt{\rho^2+r^2-2\rho r \cos \theta}\right) \mbox{ for } y\in S_\theta, \] and \begin{align*} \displaystyle\tilde J(r,\rho)&=\int_{\partial B_\rho}J(|x-y|)dS_y=\int_0^\pi J\left(\sqrt{\rho^2+r^2-2\rho r \cos \theta}\right)|S_\theta|\rho d\theta\\ =&\int_{0}^{\pi} J\left(\sqrt{\rho^2+r^2-2\rho r \cos \theta}\right) \omega_{N-1} (\rho\sin \theta)^{N-2}\rho{\rm d} \theta\\ =&\omega_{N-1}\int_{0}^{\pi} \rho^{N-1}(\sin \theta)^{N-2} J\left(\sqrt{(\rho-r)^2+2r\rho(1- \cos \theta )}\right) {\rm d} \theta\\ =&\omega_{N-1}\int_{0}^{\pi} \rho^{N-1}[2 \sin (\theta/2)\cos (\theta/2)]^{N-2} J\left(\sqrt{(\rho-r)^2+4r\rho\sin^2 (\theta/2)}\right) {\rm d} \theta\\ =&2^{N-1}\rho^{N-1}\omega_{N-1}\int_{0}^{1} \xi^{N-2} (1-\xi^2)^{(N-3)/2}J\left(\sqrt{(\rho-r)^2+4r\rho\, \xi^2}\right){\rm d} \xi, \end{align*} where we have used $\xi=\sin (\theta/2)$. The change of variable $\eta=\sqrt{(\rho-r)^2+4r\rho\, \xi^2}$ then gives \begin{align}\label{2.3a} \displaystyle\tilde J(r,\rho)=\omega_{N-1}2^{3-N}\frac{\rho}{r^{N-2}}\int^{\rho+r}_{|\rho-r|} \Big(\left[(\rho+r)^2-\eta^2\right][\eta^2-(\rho-r)^2]\Big)^{\frac{N-3}2}\eta J(\eta) {\rm d} \eta. \end{align} Analogously, by the definition of $\tilde J_+(r,\rho)$, we obtain \begin{align*} \displaystyle\tilde J_+(r,\rho)=&\omega_{N-1}\int_{0}^{\pi/2} (\rho\sin \theta)^{N-2}J\left(\sqrt{\rho^2+r^2-2\rho r \cos \theta}\right) \rho{\rm d} \theta\\ =&2^{N-1}\rho^{N-1}\omega_{N-1}\int_{0}^{\sqrt{2}/2} \xi^{N-2} (1-\xi^2)^{(N-3)/2}J\left(\sqrt{(\rho-r)^2+4r\rho \,\xi^2}\right){\rm d} \xi\\ =&\omega_{N-1}2^{3-N}\frac{\rho}{r^{N-2}}\int_{|\rho-r|}^{\sqrt{\rho^2+r^2}} \Big(\left[(\rho+r)^2-\eta^2\right][\eta^2-(\rho-r)^2]\Big)^{\frac{N-3}2}\eta J(\eta) {\rm d} \eta. \end{align*} Similarly, \begin{align*} \displaystyle\tilde J_-(r,\rho)=&\omega_{N-1}\int_{\pi/2}^{\pi} (\rho\sin \theta)^{N-2}J\left(\sqrt{\rho^2+r^2-2\rho r \cos \theta}\right) \rho{\rm d} \theta\\ =&2^{N-1}\rho^{N-1}\omega_{N-1}\int_{\sqrt{2}/2}^1 \xi^{N-2} (1-\xi^2)^{(N-3)/2}J\left(\sqrt{(\rho-r)^2+4r\rho \,\xi^2}\right){\rm d} \xi\\ =&\omega_{N-1}2^{3-N}\frac{\rho}{r^{N-2}}\int^{\rho+r}_{\sqrt{\rho^2+r^2}} \Big(\left[(\rho+r)^2-\eta^2\right][\eta^2-(\rho-r)^2]\Big)^{\frac{N-3}2}\eta J(\eta) {\rm d} \eta. \end{align*} \end{proof} Define \begin{equation}\label{2.3} \zeta_0(\eta)=\begin{cases} 0, & \eta<0,\\ 2\eta, &\eta\in [0,1],\\ 2, & \eta>1, \end{cases} \end{equation} and for $\epsilon>0$ and $l\in{\mathbb R}$, define \begin{equation}\label{2.5d} J_\epsilon(l):=\int_{{\mathbb R}^{N-1}} J(|(l, y')|)[1+\zeta_0(|(l, y')|-\epsilon^{-1})] {\rm d} y'. \end{equation} \begin{lemma}\label{lemma2.4} For any given small numbers $\delta>0$ and $\epsilon>0$, \begin{align*} \tilde J_+(r,\rho)\leq (1+\delta) J_\epsilon (r-\rho) \mbox{ for } \rho\in \left [\frac r 2, (1+\delta^2)r\right ],\ r\geq (\delta\epsilon)^{-1}, \end{align*} where $\tilde J_+$ is given by Lemma \ref{lemma2.2}. \end{lemma} \begin{proof} \textbf{Step 1:} Split of $J_\epsilon(r-\rho)$. Denote \begin{align*} G_\epsilon(|x|):=J(|x|)[1+\zeta_0(|x|-\epsilon^{-1})]\ \ \ \ {\rm for}\ x\in {\mathbb R}^N. \end{align*} Then \begin{align*} J_\epsilon(r-\rho)=&\int_{0}^{\yy} \omega_{N-1} \xi^{N-2}G_\epsilon(\sqrt{(r-\rho)^2+\xi^2}) {\rm d} \xi\\ =&\ \omega_{N-1}\int_{|\rho-r|}^{\yy} [\eta^2-(\rho-r)^2]^{(N-3)/2} \eta G_\epsilon(\eta){\rm d} \eta\\ =&\ \omega_{N-1}\int_{|\rho-r|}^{\yy} [\eta^2-(\rho-r)^2]^{(N-3)/2} \eta J(\eta){\rm d} \eta\\ &+\omega_{N-1}\int_{|\rho-r|}^{\yy} [\eta^2-(\rho-r)^2]^{(N-3)/2} \eta J(\eta)\zeta_0(\eta-\epsilon^{-1}){\rm d} \eta\\ =:&\ W_1+W_2. \end{align*} \textbf{Step 2:} Split of $\tilde J_+(r,\rho)$. By Lemma \ref{lemma2.2}, we have \begin{align*} &\tilde J_+(r,\rho)\\ =&\ \omega_{N-1}2^{3-N}\frac{\rho}{r^{N-2}}\int_{|\rho-r|}^{\sqrt{(r-\rho)^2+4\delta^2r\rho}} \Big(\left[(\rho+r)^2-\eta^2\right][\eta^2-(\rho-r)^2]\Big)^{\frac{N-3}2}\eta J(\eta) {\rm d} \eta \\ &+\omega_{N-1}2^{3-N}\frac{\rho}{r^{N-2}}\int^{\sqrt{r^2+\rho^2}}_{\sqrt{(r-\rho)^2+4\delta^2r\rho}} \Big(\left[(\rho+r)^2-\eta^2\right][\eta^2-(\rho-r)^2]\Big)^{\frac{N-3}2}\eta J(\eta) {\rm d} \eta \\ =: & \ Q_1+Q_2. \end{align*} \textbf{Step 3: } We prove $Q_1\leq (1+\delta)W_1$. For $|\rho-r|\leq \eta\leq \sqrt{(r-\rho)^2+4\delta^2r\rho}$, we have \begin{align*} \left[(\rho+r)^2-\eta^2\right]^{(N-3)/2}\leq \begin{cases} (4r\rho)^{(N-3)/2}, & N\geq 3,\\ [4r\rho (1-\delta^2)]^{-1/2}, & N=2. \end{cases} \end{align*} Hence by the definitions of $Q_1$ and $W_1$ we have, for $\rho\in [r/2, (1+\delta^2)r]$, \begin{align*} Q_1\leq&\omega_{N-1}2^{3-N} \frac\rho{r^{N-2}}\frac{(4r\rho)^{(N-3)/2}}{\sqrt{1-\delta^2}}\int_{|\rho-r|}^{\sqrt{(r-\rho)^2+4\delta^2r\rho}} [\eta^2-(\rho-r)^2]^{(N-3)/2}\eta J(\eta) {\rm d} \eta\\ =&\frac{w_{N-1}}{\sqrt{1-\delta^2}}\left(\frac\rho r\right)^{(N-1)/2}\int_{|\rho-r|}^{\sqrt{(r-\rho)^2+4\delta^2r\rho}} [\eta^2-(\rho-l)^2]^{(N-3)/2}\eta J(\eta) {\rm d} \eta\\ \leq &\frac {(1+\delta^2)^{(N-1)/2}}{\sqrt{1-\delta^2}}W_1\leq (1+\delta)W_1 \mbox{ sine $\delta>0$ is small}. \end{align*} \textbf{Step 4:} We show $Q_2\leq W_2$. \smallskip For $ \sqrt{(r-\rho)^2+4\delta^2r\rho}\leq \eta\leq \sqrt{r^2+\rho^2}$, we have \begin{align*} \left[(\rho+r)^2-\eta^2\right]^{(N-3)/2}\leq \begin{cases} (4r\rho)^{(N-3)/2}, & N\geq 3,\\ (2r\rho)^{-1/2}, & N=2. \end{cases} \end{align*} Hence by the definitions of $Q_2$ and $W_2$ we have, for $\rho\in [r/2, (1+\delta^2)r]$, \begin{align*} Q_2\leq&\omega_{N-1}2^{3-N} \frac\rho{r^{N-2}}{(4r\rho)^{(N-3)/2}}{\sqrt{2}}\int^{\sqrt{r^2+\rho^2}}_{\sqrt{(r-\rho)^2+4\delta^2r\rho}} [\eta^2-(\rho-r)^2]^{(N-3)/2}\eta J(\eta) {\rm d} \eta\\ =&\ {w_{N-1}}{\sqrt{2}}\left(\frac\rho r\right)^{(N-1)/2}\int^{\sqrt{r^2+\rho^2}}_{\sqrt{(r-\rho)^2+4\delta^2r\rho}} [\eta^2-(\rho-r)^2]^{(N-3)/2}\eta J(\eta) {\rm d} \eta\\ \leq &\ {w_{N-1}} 2\int^{\sqrt{r^2+\rho^2}}_{\max\{|\rho-r|,\sqrt{2}\delta r\}} [\eta^2-(\rho-r)^2]^{(N-3)/2}\eta J(\eta) {\rm d} \eta. \end{align*} On the other hand, \[ W_2\geq \omega_{N-1} 2\int_{\max\{|\rho-r|, \epsilon^{-1}+1\}}^{\yy} [\eta^2-(\rho-r)^2]^{(N-3)/2} \eta J(\eta){\rm d} \eta. \] Therefore, $Q_2\leq W_2$ provided that $\sqrt 2\delta r\geq \epsilon^{-1}+1$, namely $r\geq R:=\frac{\epsilon^{-1}+1}{\sqrt 2 \delta}\in (0, (\delta\epsilon)^{-1}]$. Thus \[ \tilde J_2(r,\rho)=Q_1+Q_2\leq (1+\delta)W_1+W_2\leq (1+\delta) J_\epsilon(r-\rho) \mbox{ for } \rho\in [r/2, (1+\delta^2)r],\; r\geq (\delta\epsilon)^{-1}. \] The proof is complete. \end{proof} \begin{proposition}\label{coro2.5} Suppose that $J$ has compact support, say ${\rm supp} (J)\subset [0,K_*]$ for some $K_*>0$, and $J_*$ is given by \eqref{J}. Then there exist constants $L_0>0$ and $C>0$ such that for $r\geq L_0$, \begin{align*} &| \tilde J(r,\rho)- J_*(r-\rho)|\leq Cr^{-1}&\mbox{ when }& \rho\in [r-K_*,r+K_*],\\ & \tilde J(r,\rho)=J_*(r-\rho)=0 &\mbox{ when }& \rho\not\in [r-K_*,r+K_*]. \end{align*} \end{proposition} \begin{proof} From Lemma \ref{lemma2.2} and Lemma \ref{lemma2.4}, we see \begin{align*} &\tilde J(r,\rho)= \omega_{N-1}2^{3-N}\frac{\rho}{r^{N-2}}\int^{\rho+r}_{|\rho-r|} \Big(\left[(\rho+r)^2-\eta^2\right][\eta^2-(\rho-r)^2]\Big)^{\frac{N-3}2}\eta J(\eta) {\rm d} \eta,\\ &J_*(r-\rho)=\omega_{N-1}\int_{|\rho-r|}^{\yy} [\eta^2-(\rho-r)^2]^{(N-3)/2} \eta J(\eta){\rm d} \eta. \end{align*} Hence, \begin{align*} \tilde J(r,\rho)=J_*(r-\rho)=0 \mbox{ when \ $ |r-\rho|> K_*$, namely when $\rho \not\in [r-K_*,r+K_*].$} \end{align*} On the other hand, for $r> K_*$ and $|r-\rho|\leq K_*$, \begin{align*} &| \tilde J(r,\rho)- J_*(r-\rho)|\\ \leq &\ \omega_{N-1}\int_{|\rho-r|}^{K_*} \left| \frac{2^{3-N}\rho}{r^{N-2}}(\rho+r)^2-\eta^2)^{\frac{N-3}{2}}-1 \right|[\eta^2-(\rho-r)^2]^{(N-3)/2}\eta J(\eta) {\rm d} \eta\\ \leq&\ \omega_{N-1} \|J\|_\infty M(r)\int_{|\rho-r|}^{K_*}[\eta^2-(\rho-r)^2]^{(N-3)/2}\eta d\eta, \end{align*} where \begin{align*} M(r):=&\ {\rm max} _{\{\rho\in [r-K_*, r+K_*], \eta\in [0, K_*]\}}\left| \frac{2^{3-N}\rho}{r^{N-2}}[(\rho+r)^2-\eta^2)^{\frac{N-3}{2}}-1 \right|\\ =&\ {\rm max}_{\{\rho\in [r-K_*, r+K_*], \eta\in [0, K_*]\}}\left|2^{3-N}\frac{\rho}r \left[\Big(1+\frac\rho r\Big)^2-\Big(\frac\eta r\Big)^2\right]^{\frac{N-3}2}-1\right|\\ =&\ {\rm max}_{\{\xi\in [-K_*, K_*], \eta\in [0, K_*]\}}\left|\left(1+\frac{\xi}r\right) \left[\Big(1+\frac\xi{2 r}\Big)^2-\Big(\frac\eta {2r}\Big)^2\right]^{\frac{N-3}2}-1\right|\\ =&\ O(r^{-1}) \mbox{ as } r\to\infty, \end{align*} and \begin{align*} \int_{|\rho-r|}^{K_*}[\eta^2-(\rho-r)^2]^{\frac{N-3}2}\eta d\eta\leq \begin{cases}\displaystyle \int_0^{K_*} \eta^{N-2} d\eta & \mbox{ if } N\geq 3,\\ \displaystyle \int_{|\rho-r|}^{K_*}\frac{\eta}{\sqrt{\eta+|\rho-r|}}\frac{1}{\sqrt{\eta-|\rho-r|}}d\eta\leq \int_0^{K_*}\frac{\sqrt{K_*}}{\sqrt{\xi}} d\xi & \mbox{ if } N=2. \end{cases} \end{align*} Therefore there exists $C>0$ such that \[ | \tilde J(r,\rho)- J_*(r-\rho)|\leq C r^{-1} \mbox{ for $|r-\rho|\leq K_*$ and all large $r$}. \] The proof is complete. \end{proof} \begin{lemma}\label{lemma2.6d} If {\rm \textbf{(J1)}} holds, then for any $\epsilon\in (0,1)$, \begin{align} \lim_{R\to\infty}\int_0^{(1-\epsilon)R} \int_{R}^{\yy} \tilde J_+(r,\rho) {\rm d} \rho {\rm d} r=0,\ \lim_{R\to\infty}\int_0^R \int_{R}^{\yy} \tilde J_-(r,\rho) {\rm d} \rho {\rm d} r=0. \end{align} \end{lemma} \begin{proof} For $R\geq r>0$, denote \[ x_r^1:=(r,0,..., 0)\in{\mathbb R}^N \mbox{ and } \Omega_R^+:=\{y=(y_1,..., y_N): y_1>0, |y|>R\}. \] Then \[ \int_R^\infty \tilde J_+(r,\rho)d\rho=\int_{\Omega_R^+}J(|x_r^1-y|dy. \] For small $\delta\in (0,\epsilon)$ define \begin{align*} Q_R^\delta:=\left\{z=(z_1,z_2,\cdots,z_N): z_1\leq (1-\delta)R,\ |z_i|\leq \Lambda R,\ 2\leq i\leq N\right\} \end{align*} with $\Lambda:=\sqrt{1-(1-\delta)^2}/\sqrt{N}$. Obviously, \begin{align*} \Omega_R^+\subset {\mathbb R}^N\setminus Q_R^\delta. \end{align*} Therefore \begin{align*} \int_R^\infty \tilde J_+(r,\rho)d\rho=\int_{\Omega_R^+}J(|x_r^1-y|dy\leq \int_{{\mathbb R}^N\setminus Q_R^\delta}J(|x_r^1-y|dy. \end{align*} The set ${\mathbb R}^N\setminus Q_R^\delta$ can be decomposed as follows: \begin{align*} {\mathbb R}^N\backslash Q_R^\delta= \cup_{i=1}^{N}S^{(i)} \end{align*} with overlapping sets \begin{align*} &S^{(1)}:=\left\{z=(z_1,z_2,\cdots,z_N): z_1>(1-\delta)R\ {\rm and}\ z_i\in {\mathbb R}\ {\rm for}\ 2\leq i\leq N\right\},\\ & S^{(j)}:=\left\{z=(z_1,z_2,\cdots,z_N): |z_j|>\Lambda R\ {\rm and}\ z_i\in {\mathbb R}\ {\rm for}\ i\neq j\right\},\ 2\leq j\leq N. \end{align*} Thus, making use of the definition of $J_*$, we deduce \begin{align*} \int_R^\infty \tilde J_+(r,\rho)d\rho\leq &\int_{{\mathbb R}^N\setminus Q_R^\delta}J(|x_r^1-y|dy \leq \sum_{j=1}^N \int_{S^{(j)}} J(|x_r^1-y|dy \\ =& \int_{(1-\delta)R}^{\yy} J_*(r-\rho) {\rm d} \rho +2(N-1)\int_{\Lambda R}^\infty J_*(\rho)d\rho\\ =& \int_{(1-\delta)R-r}^{\yy} J_*(\xi) {\rm d} \xi +2(N-1)\int_{\Lambda R}^\infty J_*(\rho)d\rho. \end{align*} It follows that \begin{align*} \int_0^{(1-\epsilon)R} \int_R^\infty \tilde J_+(r,\rho)d\rho dr\leq \int_0^{(1-\epsilon)R} \int_{(1-\delta)R-r}^{\yy} J_*(\xi) {\rm d} \xi dr +2(N-1)(1-\epsilon)R\int_{\Lambda R}^\infty J_*(\rho)d\rho \end{align*} We have, due to {\bf (J1)}, \begin{align*} \int_0^{(1-\epsilon)R}\int_{(1-\delta)R-r}^{\yy} J_*(\xi) {\rm d} \xi dr\leq & \int_{(\epsilon-\delta)R}^\infty [\xi-(\epsilon-\delta)R]J_*(\xi)d\xi\\ \leq & \int_{(\epsilon-\delta)R}^\infty \xi J_*(\xi)d\xi \to 0 \mbox{ as } R\to\infty, \end{align*} and \[ 2(N-1)(1-\epsilon)R\int_{\Lambda R}^\infty J_*(\rho)d\rho\leq 2(N-1)(1-\epsilon)\frac{1}\Lambda \int_{\Lambda R}^\infty \rho J_*(\rho)d\rho \to 0 \mbox{ as } R\to\infty. \] Hence \[ \int_0^{(1-\epsilon)R} \int_R^\infty \tilde J_+(r,\rho)d\rho dr \to 0 \mbox{ as } R\to\infty. \] Similarly, for $R\geq r>0$, \[ x_r^1:=(r,0,..., 0)\in{\mathbb R}^N \mbox{ and } \Omega_R^-:=\{y=(y_1,..., y_N): y_1<0, |y|>R\}, \] we have \[ \int_R^\infty \tilde J_-(r,\rho)d\rho=\int_{\Omega_R^-}J(|x_r^1-y|dy. \] Let \begin{align*} \tilde Q_R:=\left\{z=(z_1,z_2,\cdots,z_N): z_1\geq -\frac R{2\sqrt N}, |z_i|\leq \frac R{2\sqrt N},\ 2\leq i\leq N\right\}. \end{align*} Then \[ \Omega_R^-\subset{\mathbb R}^N\setminus \tilde Q_R=\cup_{j=1}^N\tilde S^{(j)}, \] with \begin{align*} &\tilde S^{(1)}:=\left\{z=(z_1,z_2,\cdots,z_N): z_1\leq -\frac R{2\sqrt N}, z_i\in{\mathbb R} \mbox{ for } i\not=1\right\},\\ &\tilde S^{(j)}:=\left\{z=(z_1,z_2,\cdots,z_N): |z_j|\geq \frac R{2\sqrt N} \mbox{ and } z_i\in{\mathbb R} \mbox{ for } i\not=j\right\}, \ 2\leq j\leq N. \end{align*} Therefore \begin{align*} \int_R^\infty \tilde J_-(r,\rho)d\rho& =\int_{\Omega_R^-}J(|x_r^1-y|dy\leq \sum_{j=1}^N \int_{\tilde S^{(j)}}J(|x_r^1-y|dy\\ &\leq \int_{-\infty}^{-\frac R{2\sqrt N}} J_*(r-\rho)d\rho+2(N-1)\int^{\infty}_{\frac R{2\sqrt N}}J_*(\rho)d\rho \\ &=\int_{\frac R{2\sqrt N}+r}^\infty J_*(\xi)d\xi+2(N-1)\int^{\infty}_{\frac R{2\sqrt N}}J_*(\rho)d\rho. \end{align*} It follows that \begin{align*} \int_0^R\int_R^\infty \tilde J_-(r,\rho)d\rho dr &\leq \int_0^R\int_{\frac R{2\sqrt N}+r}^\infty J_*(\xi)d\xi dr +2(N-1)R\int^{\infty}_{\frac R{2\sqrt N}}J_*(\rho)d\rho\\ &\leq \int_{\frac R{2\sqrt N}}^\infty \xi J_*(\xi)d\xi+4(N-1)\sqrt N\int^{\infty}_{\frac R{2\sqrt N}}\rho J_*(\rho)d\rho\to 0 \mbox{ as } R\to\infty. \end{align*} The proof is completed. \end{proof} \begin{lemma}\label{lemma2.7d} If {\rm \textbf{(J1)}} holds, then \begin{align*} \lim_{R\to\yy} \int_0^R \int_{R}^{\yy} \tilde J(r,\rho) {\rm d} \rho {\rm d} r=\int_{0}^{\yy} \eta J_*(\eta) {\rm d} \eta. \end{align*} \end{lemma} \begin{proof} We complete the proof in two steps. \textbf{Step 1}. We show that \begin{equation}\label{step1} \limsup_{R\to\yy} \int_0^R \int_{R}^{\yy} \tilde J(r,\rho) {\rm d} \rho {\rm d} r \leq \int_0^\infty \eta J_*(\eta)d\eta. \end{equation} By Lemma \ref{lemma2.6d}, for any small $\epsilon_1>0$, \begin{align*} \limsup_{R\to\yy} \int_0^R \int_{R}^{\yy} \tilde J(r,\rho) {\rm d} \rho {\rm d} r =\limsup_{R\to\yy} \int_{(1-\epsilon_1)R}^R \int_{R}^{\yy} \tilde J_+(r,\rho) {\rm d} \rho {\rm d} r, \end{align*} and \[ \limsup_{R\to\infty}\int_{(1-\epsilon_1)R}^R \int_{(1+\epsilon_1)R}^{\yy} \tilde J_+(r,\rho) {\rm d} \rho {\rm d} r\leq \lim_{\tilde R\to\infty}\int_0^{(1+\epsilon_1)^{-1}\tilde R}\int_{\tilde R}^\infty \tilde J_+(r,\rho) {\rm d} \rho {\rm d} r=0. \] Therefore \begin{equation}\label{ep1} \limsup_{R\to\yy} \int_0^R \int_{R}^{\yy} \tilde J(r,\rho) {\rm d} \rho {\rm d} r =\limsup_{R\to\yy} \int_{(1-\epsilon_1)R}^R \int_{R}^{(1+\epsilon_1)R} \tilde J_+(r,\rho) {\rm d} \rho {\rm d} r. \end{equation} By Lemma \ref{lemma2.4}, for any small $\delta>0$ and $\epsilon>0$, we have \begin{align}\label{2.11} \tilde J_+(r,\rho)\leq (1+\delta)J_{\epsilon}(r-\rho) \mbox{ for $\rho\in [r/2, (1+\delta^2)r]$ and $r\geq (\delta\epsilon)^{-1}$.} \end{align} Therefore, if $\epsilon_1>0$ is sufficiently small, then \eqref{2.11} holds when \[ (1-\epsilon_1)R\leq r\leq R\leq \rho\leq (1+\epsilon_1)R \mbox{ and } R= 2(\delta\epsilon)^{-1}. \] We thus obtain \[ \int_{(1-\epsilon_1)R}^R \int_{R}^{(1+\epsilon_1)R} \tilde J_+(r,\rho) {\rm d} \rho {\rm d} r \leq (1+\delta)\int_{(1-\epsilon_1)R}^R \int_{R}^{(1+\epsilon_1)R} J_\epsilon(r-\rho) {\rm d} \rho {\rm d} r. \] From \eqref{2.5d} we have \[ J_\epsilon(l)=J_*(l)+\xi^*_\epsilon(l) \mbox{ with } \xi^*_\epsilon(l):=\int_{{\mathbb R}^{N-1}} J(|(l, y')|)\zeta_0(|(l, y')|-\epsilon^{-1})] {\rm d} y'. \] Clearly \begin{align*} \int_{(1-\epsilon_1)R}^R \int_{R}^{(1+\epsilon_1)R} J_*(r-\rho) {\rm d} \rho {\rm d} r&= \int_{-\epsilon_1 R}^0\int_0^{\epsilon_1 R}J_*(r-\rho)d\rho dr\\ &\leq \int_{-\infty}^0\int_0^{\infty}J_*(r-\rho)d\rho dr=\int_0^\infty \eta J_*(\eta)d\eta. \end{align*} It follows that \[ \int_{(1-\epsilon_1)R}^R \int_{R}^{(1+\epsilon_1)R} \tilde J_+(r,\rho) {\rm d} \rho {\rm d} r \leq (1+\delta)\left[ \int_0^\infty \eta J_*(\eta)d\eta+\int_{(1-\epsilon_1)R}^R \int_{R}^{(1+\epsilon_1)R} \xi^*_\epsilon(r-\rho) {\rm d} \rho {\rm d} r\right]. \] Moreover, using $\epsilon^{-1}=\frac 12 \delta R$ and $\xi^*_\epsilon(s)\leq 2 J_*(s)$,\; $\xi^*_\epsilon(s)=0$ for $s\leq \epsilon^{-1}$, we obtain \begin{align*} &\int_{(1-\epsilon_1)R}^R \int_{R}^{(1+\epsilon_1)R} \xi^*_\epsilon(r-\rho) {\rm d} \rho {\rm d} r=\int_{-\epsilon_1R}^0 \int_{0}^{\epsilon_1R} \xi^*_\epsilon(r-\rho) {\rm d} \rho {\rm d} r\\ &\leq 2 \int_{-\epsilon_1R}^0 \int_{ \epsilon^{-1}}^{\epsilon_1R-r} J_*(s) {\rm d} s {\rm d} r\leq 2 \epsilon_1 R\int_{\frac 12\delta R}^{\infty}J_*(s) {\rm d} s\\ &\leq 4\epsilon_1\delta^{-1} \int_{\frac 12 \delta R}^{\infty}s J_*(s) {\rm d} s\to 0 \mbox{ as } R\to\infty. \end{align*} We thus obtain \[ \limsup_{R\to\infty}\int_{(1-\epsilon_1)R}^R \int_{R}^{(1+\epsilon_1)R} \tilde J_+(r,\rho) {\rm d} \rho {\rm d} r \leq (1+\delta)\int_0^\infty \eta J_*(\eta)d\eta. \] Since $\delta>0$ can be arbitrarily small, \eqref{step1} now follows from \eqref{ep1}. \textbf{Step 2}. We show that \begin{align*} \liminf_{R\to\yy}\int_0^R \int_{R}^{\yy} \tilde J(r,\rho) {\rm d} \rho {\rm d} r\geq \int_0^\infty \eta J_*(\eta)d\eta, \end{align*} which then finishes the proof of the lemma. From the definition of $\tilde J(r,\rho)$ and $J_*$, for $R\geq r>0$, \begin{align}\label{2.12} \int_{R}^{\yy} \tilde J(r,\rho) {\rm d} \rho \geq \int_{H_R} J(|x^1_r-y|) {\rm d} y =\int_{R}^{\yy} J_*(r-\rho) {\rm d} \rho, \end{align} where \begin{align*} x_r^1:=(r,0,..., 0)\in{\mathbb R}^N,\ H_R:=\{y=(y_1,y_2,\cdots,y_N): \ y_1>R,\ y_i\in {\mathbb R}\ {\rm for}\ 2\leq i\leq N \}. \end{align*} Therefore \begin{align*} \liminf_{R\to\yy}\int_0^R \int_{R}^{\yy} \tilde J(r,\rho) {\rm d} \rho {\rm d} r&\geq \lim_{R\to\infty}\int_{0}^{R}\int_{R}^{\yy} J_*(r-\rho) {\rm d} \rho{\rm d} r\\ &= \lim_{R\to\infty}\int_0^R\eta J_*(\eta)d\eta=\int_0^\infty\eta J_*(\eta)d\eta. \end{align*} The proof is now complete. \end{proof} \begin{theorem}\label{prop1} Assume {\rm \textbf{(J)}} holds. Then the following statements are equivalent: \begin{itemize} \item[{\rm (i)}] {\rm \textbf{(J1)}} holds, namely $\displaystyle \int_0^\infty r^NJ(r)dr<\infty$, \vspace{0.2cm} \item[{\rm (ii)}] $\displaystyle\int_{0}^{\yy} J_*(l) l{\rm d} l<\yy$. \item[{\rm (iii)}] $\limsup_{R\to\yy}\displaystyle\int_{0}^{R} \int_{R}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r<\yy$.\vspace{0.2cm} \item[{\rm (iv)}] $\limsup_{R\to\yy}\displaystyle\int_{0}^{R} \int_{R}^{+\yy}(r/R)^{N-1} \tilde J(r,\rho){\rm d} \rho{\rm d} r<\yy$. \end{itemize} Moreover, when {\rm \textbf{(J1)}} holds, we have \[ \int_{0}^{\yy} J_*(l) l{\rm d} l=\lim_{R\to\yy}\displaystyle\int_{0}^{R} \int_{R}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r=\lim_{R\to\yy}\displaystyle\int_{0}^{R} \int_{R}^{+\yy} (r/R)^{N-1}\tilde J(r,\rho){\rm d} \rho{\rm d} r. \] \end{theorem} \begin{proof} By \eqref{J-J_*} and Lemma \ref{lemma2.7d} we see that \begin{align*} &\textbf{(J1)}\ {\rm holds} \Longleftrightarrow \int_{0}^{\yy} J_*(l) l{\rm d} l<\yy, \nonumber\\ &\textbf{(J1)}\ {\rm holds} \Longrightarrow \lim_{R\to\yy}\displaystyle\int_{0}^{R} \int_{R}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r<\yy, \end{align*} and if {\rm \textbf{(J1)}} holds, then \begin{align}\label{2.13} \int_{0}^{\yy} J_*(l) l{\rm d} l =\lim_{R\to\yy}\displaystyle\int_{0}^{R} \int_{R}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r. \end{align} To finish the proof of Theorem \ref{prop1}, it remains to prove that \begin{align}\label{2.14} \textbf{(J1)}\ {\rm holds} \Longleftarrow \limsup_{R\to\yy}\displaystyle\int_{0}^{R} \int_{R}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r<\yy, \end{align} \begin{align}\label{2.15} &\textbf{(J1)}\ {\rm holds} \Longleftrightarrow \limsup_{R\to\yy} \displaystyle\int_{0}^{R} (r/R)^{N-1}\int_{R}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r<\yy, \end{align} and \begin{align}\label{2.16} \lim_{R\to\yy}\displaystyle\int_{0}^{R} (r/R)^{N-1}\int_{R}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r =\int_{0}^{\yy} J_*(l) l{\rm d} l \ \ {\rm if}\ \textbf{(J1)}\ {\rm holds}. \end{align} We now prove these in three steps. \textbf{Step 1}. We prove \eqref{2.14}. By \eqref{2.12} and change of order of integration, \begin{align*} \int_0^R \int_{R}^{\yy} \tilde J(r,\rho) {\rm d} \rho {\rm d} r\geq\int_{-R}^{0}\int_{0}^{\yy} J_*(r-\rho) {\rm d} \rho{\rm d} r\geq \int_0^R lJ_*(l)dl, \end{align*} which yields \begin{align*} \yy> \limsup_{R\to\yy}\int_0^R \int_{R}^{\yy} \tilde J(r,\rho) {\rm d} \rho {\rm d} r\geq \int_{0}^{\yy} lJ_*(l){\rm d} l. \end{align*} Hence, due to \eqref{J-J_*}, \eqref{2.14} holds. \textbf{Step 2}. We prove \eqref{2.15}. If {\rm \textbf{(J1)}} holds, then \begin{align}\label{2.17} \limsup_{R\to\yy}\displaystyle\int_{0}^{R} (r/R)^{N-1}\int_{R}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r\leq \limsup_{R\to\yy}\displaystyle\int_{0}^{R} \int_{R}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r<\yy. \end{align} On the other hand, if \begin{align*} \limsup_{R\to\yy}\displaystyle\int_{0}^{R} (r/R)^{N-1}\int_{R}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r<\yy, \end{align*} then by \eqref{2.12}, \begin{align*} \yy&>\limsup_{R\to\yy}\displaystyle\int_{R/2}^{R} (r/R)^{N-1}\int_{R}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r\geq \limsup_{R\to\yy}2^{-(N-1)}\displaystyle\int_{R/2}^{R}\int_{R}^{+\yy} J_*(r-\rho){\rm d} \rho{\rm d} r\\ &=\limsup_{R\to\yy}2^{-(N-1)}\displaystyle\int_{0}^{-R/2}\int_{0}^{+\yy} J_*(r-\rho){\rm d} \rho{\rm d} r\geq \limsup_{R\to\yy}2^{-(N-1)}\displaystyle\int_0^{R/2}lJ_*(l)dl. \end{align*} Hence \eqref{2.15} holds. \textbf{Step 3}. We finally prove \eqref{2.16}. For any given $\epsilon>0$, we have \begin{align*} \displaystyle\int_{0}^{R} (r/R)^{N-1}\int_{R}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r&\geq \int_{(1-\epsilon)R}^{R} (r/R)^{N-1}\int_{R}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r\\ \geq & (1-\epsilon)^{N-1}\displaystyle\int_{(1-\epsilon)R}^{R} \int_{R}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r. \end{align*} By \eqref{2.12}, \begin{align*} \displaystyle\int_{(1-\epsilon)R}^{R}\int_{R}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r&\geq \int_{(1-\epsilon)R}^{R}\int_{R}^{\yy} J_*(r-\rho) {\rm d} \rho{\rm d} r\\ &=\int_{-\epsilon R}^{0}\int_{0}^{\yy} J_*(r-\rho) {\rm d} \rho{\rm d} r \geq \int_0^{\epsilon R}l J_*(l)dl. \end{align*} Letting $R\to\yy$, we obtain \begin{align*} \liminf_{R\to\yy}\displaystyle\int_{0}^{R} (r/R)^{N-1}\int_{R}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r\geq&(1-\epsilon)^{N-1} \int_{0}^{\yy} lJ_*(l){\rm d} l. \end{align*} Then by the arbitrariness of $\epsilon>0$, we see \begin{align*} \liminf_{R\to\yy}\displaystyle\int_{0}^{R} (r/R)^{N-1}\int_{R}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r\geq& \int_{0}^{\yy} lJ_*(l){\rm d} l. \end{align*} Combining this with \eqref{2.13} and \eqref{2.17} gives \begin{align*} \liminf_{R\to\yy}\displaystyle\int_{0}^{R} (r/R)^{N-1}\int_{R}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r= \int_{0}^{\yy} lJ_*(l){\rm d} l. \end{align*} The proof is now complete. \end{proof} \section{Well-poseness and comparison principle} In this section we prove Theorem \ref{th1.1} and a comparison principle for \eqref{1.4}, where $J$ satisfies {\bf (J)} and $f$ satisfies \eqref{f}. \subsection{Well-posedness} With the preparations in Section 2, the existence and uniqueness of a global solution to \eqref{1.4} can be established by the approach in Section 2 of \cite{cdjfa} with minor modifications. We explain these in detail below. Define \[ \hat J(\xi, \eta):=\frac 12 \tilde J(|\xi|,|\eta|) \mbox{ for } \xi,\ \eta\in {\mathbb R}. \] From the properties of $\tilde J$ we easily see that $\hat J$ is continuous, \[ \hat J(\xi, 0)\equiv 0, \ \hat J(0,\eta)=\frac 12 \omega_N |\eta|^{N-1} J(0),\ \hat J(\xi,\eta)=\frac 12 \omega_N |\eta|^{N-1}[J(0)+o(1)] \mbox{ as } (\xi,\eta)\to (0,0), \] and by Lemma \ref{lemma2.2}, \[ \hat J(\xi,\xi)= \omega_{N-1}(2|\xi|)^{2-N}|\xi|\int_0^{2|\xi|}[4\xi^2-s^2]^{(N-3)/2}s^{N-2}J(s)ds>0 \mbox{ when } \xi\not=0. \] If we denote by $\hat u$ the even extension of $u$, namely \[ \hat u(t, \xi):=u(t, |\xi|) \ \mbox{ for } \xi\in{\mathbb R}, \] then \eqref{1.4} is equivalent to \begin{equation}\label{1.4e} \begin{cases} \displaystyle \hat u_t(t,\xi)=d \int_{-h(t)}^{h(t)} \hat J(\xi,\rho) \hat u(t,\rho){\rm d} \rho-d \hat u(t,\xi)+f(t,|\xi|, \hat u), & t>0,\; \xi \in (-h(t),h(t)),\\ u(t,\pm h(t))=0, & t>0,\\ \displaystyle [h^N(t)]'= N \mu \displaystyle\int_{-h(t)}^{h(t)} \int_{h(t)}^{+\yy} \hat J(\xi,\rho)|\xi|^{N-1} \hat u(t,\xi){\rm d} \rho{\rm d} \xi, & t>0,\\ h(0)=h_0,\ u(0,\xi)= u_0(|\xi|), & \xi\in [-h_0,h_0]. \end{cases} \end{equation} Problem \eqref{1.4e} is close in form to the one dimensional problem in \cite{cdjfa}, with the following main differences: \begin{itemize} \item[(i)] The kernel function $J(|x-y|)$ in \cite{cdjfa} is replaced by $\hat J(\xi,\eta)$, \item[(ii)] In the third equation, $h'(t)$ in \cite{cdjfa} is replaced by $[h^N(t)]'$, and the kernel function is now $\hat J(\xi,\eta)|\xi|^{N-1}$. \end{itemize} A close examination of the proof in \cite{cdjfa} for the existence and uniqueness results there shows that all the arguments carry over to \eqref{1.4e}, with only minor changes required. We indicate below the main steps and the changes needed. In place of Lemma 2.2 in \cite{cdjfa}, we have the following result. \begin{lemma}[Maximum principle]\label{lemma4.4} Let $T>0$, $d>0$, and $g, h\in C([0,T])$ satisfy $g(0)\leq h(0)$ and $g(t)<h(t)$ for $t\in (0, T]$. Denote $D_T:=\{(t,x): t\in (0, T],\; g(t)<x<h(t)\}$ and suppose that $\phi$, $\phi_t\in C(\overline D_T)$, $c\in L^\yy(D_T)$, and \begin{equation*} \begin{cases} \displaystyle \phi_t\geq d\int_{g(t)}^{h(t)}P(x,y)\phi(t,y) {\rm d} y+c(t,x)\phi, & (t,x)\in D_T,\; \\ \phi(t,g(t))\geq 0, & t\in\Sigma_{\rm min}^g,\\ \phi(t,h(t))\geq 0, & t \in\Sigma_{\rm max}^h, \\ \phi(0,x)\geq 0, &x\in [g(0),h(0)], \end{cases} \end{equation*} where \[\begin{cases} \Sigma_{\rm min}^g=\left\{ t\in(0,T]: \mbox{There exists $\epsilon>0$ such that $g(t)<g(s)$ for $s\in [t-\epsilon, t)$}\right\},\\ \Sigma_{\rm max}^h=\left\{ t\in(0,T]: \mbox{There exists $\epsilon>0$ such that $h(t)>h(s)$ for $s\in [t-\epsilon, t)$}\right\}, \end{cases} \] and the kernel function $P$ satisfies \begin{align*} P\in C( {\mathbb R}^2)\cap L^\infty({\mathbb R}^2),\ P\geq 0,\ P(x,x)>0 \mbox{ for almost all } x\in {\mathbb R}. \end{align*} Then $\phi\geq 0$ on $\overline D_T$, and if additionally $\phi(0,x)\not\equiv0$ in $[g(0),h(0)]$, then $\phi> 0$ in $D_T$. \end{lemma} \begin{proof} {\bf Case 1}: $g(0)<h(0)$. Noting that $P(x,x)>0$ for $x\in {\mathbb R}$, we can repeat the arguments in \cite[Lemma 3.1]{dn2020} to show the desired conclusion. {\bf Case 2}: $g(0)=h(0)$ and $\phi(0,g(0))>0$. By the continuity of $\phi$, there is $t_1>0$ such that \begin{align*} \phi(t,x)>0\ \mbox{ for } \ t\in [0,t_1],\ x\in [g(t),h(t)]. \end{align*} Then viewing $t_1$ as the initial time, we obtain the desired conclusion from Case 1. {\bf Case 3}: $g(0)=h(0)$ and $\phi(0,g(0))=0$. Let $\psi(t,x)=\phi(t,x)+\epsilon e^{At}$ for some positive constants $\epsilon$ and $A$. Then \begin{align*} &\displaystyle \psi_t(t,x)-d\int_{g(t)}^{h(t)}P(x,y)\psi(t,y) {\rm d} y-c(t,x)\psi\\ &=\displaystyle \phi_t(t,x)-d\int_{g(t)}^{h(t)}P(x,y)\phi(t,y) {\rm d} y -c(t,x)\phi\\ &\ \ \ \ \ +\epsilon Ae^{At}-d\epsilon e^{At}\int_{g(t)}^{h(t)}P(x,y){\rm d} y-c(t,x)\epsilon e^{At}\\ &\geq \Big(A-d[h(t)-g(t)]\|P\|_{L^\yy({\mathbb R}^2)}-c(t,x))\epsilon e^{At}>0\ \ {\rm for}\ (t,x)\in D_T, \end{align*} provided that $A\geq d\max_{t\in [0,T]}[h(t)-g(t)]\|P\|_{L^\yy({\mathbb R}^2)}+\|c\|_{L^\yy(D_T)}$. Since $\psi(0,g(0))=\psi(0,h(0))>0$, by the conclusion in Case 2, we see \begin{align*} \psi(t,x)> 0 \ \mbox{ for }\ \ (t,x)\in \overline D_T, \end{align*} which yields, by letting $\epsilon\to 0$, \begin{align*} \phi(t,x)\geq 0\ \mbox{ for }\ \ (t,x)\in \overline D_T. \end{align*} The proof is complete. \end{proof} The next result is the corresponding version of Lemma 2.3 in \cite{cdjfa}. \begin{lemma}\label{lem3.2} Suppose that {\rm \bf (J)} and \eqref{f} hold, $h_0>0$ and $u_0$ satisfies \eqref{u_0}. Then for any $T>0$ and $h\in\mathbb H_{h_0, T}:=\Big\{h\in C([0,T])~:~h(0)=h_0, \; \inf_{0\le t_1<t_2\le T}\frac{h(t_2)-h(t_1)}{t_2-t_1}>0\Big\}$, the following problem \begin{equation} \left\{ \begin{aligned} &v_t=d\int_{-h(t)}^{h(t)}\hat J(r,\rho)v(t,\rho)d\rho-dv+f(t,|r|,v), & &0<t< T,~r\in(-h(t),h(t)),\\ &v(t,\pm h(t))=0,& &0<t< T,\\ &v(0,r)=u_0(|r|),& &r\in[-h_0,h_0] \end{aligned} \right. \label{201} \end{equation} admits a unique solution, denoted by $V_{h}(t,r)$. Moreover $V_{h}$ satisfies \begin{equation} 0<V_{h}(t,r)\le \max\left\{\max_{-h_0\le r\le h_0}u_0(|r|), ~K_0\right\}~\mbox{ for } 0<t< T,~r\in(-h(t),h(t)), \label{v-bound} \end{equation} where $K_0$ is defined in assumption \eqref{f}. \end{lemma} \begin{proof} This is almost identical to the proof of Lemma 2.3 in \cite{cdjfa}; we omit the details. \end{proof} The following theorem shows that \eqref{1.4} is wellposed, which clearly implies Theorem \ref{th1.1}. \begin{theorem} Suppose that {\rm \bf (J)} and \eqref{f} hold. Then for any given $h_0>0$ and $u_0$ satisfying \eqref{u_0}, problem \eqref{1.4e} admits a unique solution $(u(t,r), h(t))$ defined for all $t>0$. Moreover, for any $T>0$, $ h\in\mathbb H_{h_0, T}$ and $u\in \mathbb{X}_{u_0, h}:=\Big\{\phi\in C(\overline\Omega_h)~:~\phi\ge0~\text{in} ~\Omega_h,~\phi(0,r)=u_0(|r|)~\text{for}~r\in [-h_0,h_0]\Big\}$, where $\Omega_h:=\left\{(t,r)\in\mathbb{R}^2: 0<t\leq T,~-h(t)<r<h(t)\right\}$. \label{thm2.3} \end{theorem} \begin{proof} By Lemma \ref{lem3.2}, for any $T>0$ and $h\in\mathbb H_{h_0,T}$, we can find a unique $V_{h}\in\mathbb{X}_{u_0,h}$ that solves (\ref{1.4e}), and it has the property \begin{equation}\label{M_0} 0<V_{h}(t,r)\le M_0:=\max\big\{\|u_0\|_\infty,~K_0\big\} \mbox{ for } (t,r)\in \Omega_{h}. \end{equation} Using such a $V_{h}(t,r)$, we define the mapping $\hat \Gamma$ by \begin{equation} \left\{ \begin{aligned} &\hat \Gamma(h):=(\tilde h)^{1/N} \ \mbox{ for } h\in \mathbb H_{h_0,T}, \mbox{ with }\\ &\tilde h(t):= h_0^N+N\mu\int_0^t\int_{-h(\tau)}^{h(\tau)}\int_{h(\tau) }^{+\infty}\hat J(\xi,\rho)|\xi|^{N-1}V_{h}(\tau,\rho)d\rho d\xi d\tau \ \ \mbox{ for $0<t\leq T$. } \end{aligned} \right. \label{2003} \end{equation} To prove this theorem, we will show that if $T$ is small enough, then $\hat\Gamma$ maps a suitable closed subset $\Sigma_T$ of $\mathbb{H}_{h_0,T}$ into itself, and is a contraction mapping. This clearly implies that $\hat \Gamma$ has a unique fixed point in $\Sigma_T$, which gives a solution $(V_{h}, h)$ of \eqref{1.4e} defined for $t\in (0, T]$. We will show that any solution $(u, h)$ of \eqref{1.4e} with $h\in \mathbb{H}_{h_0,T}$ must satisfy $h\in \Sigma_T$, and hence $h$ must coincide with the unique fixed point of $\hat\Gamma$ in $\Sigma_T$, which then implies that the solution $(u,h)$ of \eqref{1.4e} is unique. We will finally show that this unique solution defined locally in time can be extended uniquely for all $t>0$. This plan will be carried out in 4 steps, as in the proof of Theorem 2.1 in \cite{cdjfa}. \medskip \noindent {\bf Step 1:} {\it Properties of $ \tilde h(t)$ and a closed subset of $\mathbb{H}_{h_0,T}$.} Let $h\in\mathbb{H}_{h_0,T}$. The definition of $\tilde h(t)$ indicates that it belongs to $C^1([0, T])$ and for $0<t\le T$, \begin{equation} \tilde h'(t)= N\mu \int_{-h(t)}^{h(t)}\int_{h(t)}^{+\infty}\hat J(\xi,\rho )|\xi|^{N-1}V_{h}(t,\rho)d\rho d\xi. \label{2006} \end{equation} From this and the definition of $\tilde h$ we see that $\hat\Gamma(h)=(\tilde h)^{1/N}\in \mathbb{H}_{h_0,T}$, but in order to show $\hat \Gamma$ is a contraction mapping, we need to prove some further properties of $\tilde h$, and then choose a suitable closed subset of $\mathbb{H}_{h_0,T}$, which is invariant under $\hat \Gamma$, and on which $\hat \Gamma$ is a contraction mapping. Since $v=V_{h}$ solves (\ref{201}) we obtain by using \eqref{f} and \eqref{M_0} that \begin{equation} \left\{ \begin{aligned} &\left(V_{h}\right)_t(t,r)\ge-dV_{h}(t,r)-K(M_0)V_{h}(t,r), & &0<t\le T,~r\in(-h(t),h(t)),\\ &V_{h}(t,\pm h(t))=0,& &0<t\le T,\\ &V_{h}(0,r)=u_0(|r|),& &r\in[-h_0,h_0]. \end{aligned} \right. \label{2007} \end{equation} It follows that \begin{equation} \label{V>cu_0} V_{h}(t,r)\ge e^{-(d+K(M_0))t}u_0(|r|)\ge e^{-(d+K(M_0))T}u_0(|r|) \mbox{ for } r\in [-h_0, h_0],\; t\in (0, T]. \end{equation} By the properties of $\hat J$ there exist constants $\epsilon_0\in (0, h_0/4)$ and $\delta_0>0$ such that \begin{equation} \label{J>delta_0} \mbox{$\hat J(\xi,\rho)|\xi|^{N-1} \ge\delta_0$ if $|\xi-\rho|\le\epsilon_0$ and $\xi,\, \rho\in [h_0-\frac{\epsilon_0}2, h_0+\frac{\epsilon_0}2]$.} \end{equation} Using \eqref{2006} we easily see \[ 0< \tilde h'(t)\leq N\mu M_0 h(t)^N \mbox{ for } t\in [0, T]. \] Assume that $h$ has the extra property that \[\mbox{ $h(T)\leq h_0+\frac{\epsilon_0}{4}$.} \] Then \[ \tilde h(t)\leq h^N_0 +TN\mu M_0(h_0+\frac{\epsilon_0}{2})\leq \Big[h_0+\frac{\epsilon_0}{4}\Big]^N \mbox{ for } t\in [0, T], \] provided that $T>0$ is small enough, depending on $ (\mu, M_0, h_0, \epsilon_0)$. We fix such a $T$ and notice that \[ h(t)\in [h_0, h_0+ \frac{\epsilon_0}{4}] \mbox{ for } t\in [0, T]. \] Combining this with \eqref{V>cu_0} and \eqref{J>delta_0} we obtain, for such $T$ and $t\in (0, T]$, \begin{align*} \int_{-h(t)}^{h(t)}\int_{h(t)}^{+\infty}\hat J(\xi,\rho)|\xi|^{N-1}V_{h} (t,\rho)d\rho d\xi &\ge\int_{h(t)-\frac{\epsilon_0}{2}}^{h(t)}\int_{ h(t)}^{h(t)+\frac{\epsilon_0}{2}}\hat J(\xi,\rho)|\xi|^{N-1}V_{h} (t,\rho)d\rho d\xi \\ &\ge e^{-(d+K(M_0))T}\int_{h_0-\frac{\epsilon_0}{4}}^{h_0}\int_{ h_0+\frac{\epsilon_0}{4}}^{h_0+\frac{\epsilon_0}{2}}\hat J(\xi,\rho)|\xi|^{N-1} u_0(|\rho|)d\rho d\xi \\ &\ge\frac 14\epsilon_0\delta_0e^{-(d+K(M_0))T}\int_{h_0-\frac{ \epsilon_0}{4}}^{h_0}u_0(\rho)d\rho=:c_0>0, \end{align*} with $c_0$ depending only on $(J, u_0, f)$. Thus, for sufficiently small $T=T(\mu, M_0, h_0, \epsilon_0)>0$, \begin{equation*} \label{tilde-h'} \tilde h'(t)\geq N\mu c_0 \mbox{ for } t\in [0, T]. \end{equation*} Therefore \begin{equation} \label{hat-h'} \frac{d}{dt}\hat \Gamma(h)(t)=\frac 1N \tilde h^{\frac{1-N}N}(t)\tilde h'(t)\geq \tilde c_0:=\left(h_0+\frac\epsilon 2\right)^{1-N} \mu c_0 \mbox{ for } t\in [0, T]. \end{equation} We now define, for $s\in (0, T_0]:=(0, T(\mu, M_0, h_0, \epsilon_0)]$, \begin{align*} \Sigma_s:=&\Big\{\hat h\in \mathbb H_{h_0,s}: \sup_{0\leq t_1<t_2\leq s}\frac{\hat h(t_2)-\hat h(t_1)}{t_2-t_1}\geq \tilde c_0,\; \hat h(t)\leq h_0+\frac{\epsilon_0}{4} \mbox{ for } t\in [0, s]\Big\}. \end{align*} Our analysis above shows that \[ \hat \Gamma (\Sigma_s)\subset \Sigma_s \mbox{ for } s\in (0, T_0]. \] \medskip \noindent {\bf Step 2:} {\it $\hat\Gamma$ is a contraction mapping on $\Sigma_s$ for sufficiently small $s>0$.} Let $s\in (0, T_0]$, $h_1, h_2\in\Sigma_s$, and note that $\Sigma_s$ is a complete metric space under the metric $$ d\left(h_1,h_2)\right)=\|h_1-h_2\|_{C([0,s])}. $$ The analysis in Step 2 of the proof of Lemma 2.3 in \cite{cdjfa} can be repeated here to show that, for any $h_1, h_2\in \Sigma_s$, \begin{align*} ~\|\tilde h_1-\tilde h_2\|_{C([0,s])}\le~ Cs\|h_1-h_2\|_{C([0,s])} \mbox{ for some $C>0$ independent of $h_1$ and $h_2$.} \end{align*} Hence \begin{align*} \|\hat\Gamma(h_1)-\hat\Gamma(h_2)\|_{C([0,s])}&\le \frac 1{N h_0^{(N-1)/N}} \|\tilde h_1-\tilde h_2\|_{C([0,s])}\\ &\le \frac {Cs}{N h_0^{(N-1)/N}}\|h_1-h_2\|_{C([0,s])}\leq \frac 12 \|h_1-h_2\|_{C([0,s])}, \end{align*} provided that $s>0$ is sufficiently small, say $s \in (0, T^*]$. Therefore $\hat\Gamma$ is a contraction mapping on $\Sigma_s$ for such $s$. \medskip \noindent {\bf Step 3:} {\it Local existence and uniqueness.} By Step 2 and the Contraction Mapping Theorem we know that \eqref{1.4e} has a solution $(u, h)$ for $t\in (0, T^*]$. If we can show that $h\in \Sigma_{T^*}$ holds for any solution $(u,h)$ of \eqref{1.4e} defined over $t\in (0, T^*]$, then it is the unique fixed point of $\hat \Gamma$ in $\Sigma_{T^*}$ and the uniqueness of $(u,h)$ follows. So let $(u,h)$ be an arbitrary solution of \eqref{1.4e} defined for $t\in (0, T^*]$. Then \[ [h^N(t)]'=N\mu\int_{-h(t)}^{h(t)}\int_{h(t)}^{\infty}\hat J(\xi,\rho)|\xi|^{N-1} u(t,\xi){\rm d} \rho{\rm d} \xi \leq 2\mu M_0 h^N (t) \mbox{ for } t\in (0, T^*]. \] We thus obtain \begin{equation} \label{h-g} h^N(t)\leq h^N_0 e^{2\mu M_0 t} \mbox{ for } t\in (0, T^*]. \end{equation} Therefore if we shrink $T^*$ if necessary so that \[ h_0e^{\mu M_0 T^*/N}\leq h_0+\frac{\epsilon_0}{4}, \] then \[ h(t)\leq h_0+\frac{\epsilon_0}{4} \mbox{ for } t\in [0, T^*]. \] Moreover, the proof of \eqref{hat-h'} gives \[ h'(t)\geq \tilde c_0 \mbox{ for } t\in (0, T^*]. \] Thus indeed $h\in\Sigma_{T^*}$, as we wanted. This proves the local existence and uniqueness of the solution to \eqref{1.4e}. \medskip \noindent {\bf Step 4:} {\it Global existence and uniqueness.} This is identical to the corresponding proof in \cite{cdjfa}, and we omit the details here. \end{proof} \medskip \subsection{Comparison principle} We now use Lemma \ref{lemma4.4} to obtain a comparison principle which will be useful for our later analysis. \begin{lemma}[Comparison principle]\label{lemma3.4a} Suppose $(\mathbf{J})$ and \eqref{f} hold, and $(u,h)$ solves \eqref{1.4} for $t\in [0, T]$ with some $T>0$. For convenience we extend $ u$ by $ u(t,r)=0$ for $t\in[0, T]$ and $r> h(t)$. Let $r_*, h_*\in C([0,T])$ be nondecreasing functions satisfying $0\leq r_*(t)<h_*(t)$, and \begin{align*} \Omega_T:=\{(t,r): t\in (0,T], r \in(0,h_*(t))\},\ \Theta_T:=\{(t,r): t\in (0,T], r\in(r_*(t),h_*(t))\}. \end{align*} Suppose $v\in C(\overline\Omega_T)$ is nonnegative with $v_t\in C(\overline\Theta_T)$, and \[ \hat v(t,r):=\begin{cases}u(t,r) \mbox{ for } r\in [0, r_*(t)],\ t\in [0,T], \\ v(t,r) \mbox{ for } r\in (r_*(t), h_*(t)],\ t\in [0,T]. \end{cases} \] \begin{itemize} \item[{\rm (i)}] If $(v,r_*,h_*)$ satisfy $h_*(0)\geq h(0)$, \begin{equation}\label{3.8d} \begin{cases} v(0,r)\geq u(0,r), \ \ r\in [0,h_*(0)],\\ v(t,r)\geq u(t,r),\ \ \ t\in [0,T],\; r\in [0,r_*(t)] \end{cases} \end{equation} and \begin{equation*} \begin{cases} v_t\geq d \Big[\displaystyle\int_{0}^{h_*(t)}\tilde J(r,\rho)\hat v(t,\rho){\rm d} \rho-v(t,r)\Big]+f(t,r,v), &t\in (0,T],\; r\in {(r_*(t),h_*(t))},\\[2mm] v(t,h_*(t))\geq 0, & t\in (0,T],\\[2mm] \displaystyle h_*'(t)\geq \frac{\mu}{h_*^{N-1}(t)}\displaystyle\int_{0}^{h_*(t)}\int_{h_*(t)}^{+\yy} \tilde J(r,\rho) r^{N-1}v(t,r){\rm d} \rho{\rm d} r, & t\in [0,T], \end{cases} \end{equation*} then \begin{align*} h_*(t)\geq h(t),\ \ v(t,r)\geq u(t,r) \ \ \ \ \ {\rm for}\ t\in (0, T],\; r\in [0, h(t)]. \end{align*} \item[{\rm (ii)}] If $(v,r_*,h_*)$ satisfy $h_*(0)\leq h(0)$, \begin{align*}\begin{cases} v(0,r)\leq u(0,r), \ \ r\in [0,h(0)],\\ v(t,r)\leq u(t,r),\ \ \ t\in [0,T],\; r\in [0,r_*(t)] \end{cases} \end{align*} and \begin{equation*} \begin{cases} v_t\leq d \Big[\displaystyle\int_{0}^{h_*(t)}\tilde J(r,\rho) \hat v(t,\rho){\rm d} \rho-v(t,r)\Big]+f(t,r,v), &t\in (0,T],\; r\in {(r_*(t),h_*(t))},\\[2mm] v(t,h_*(t))\leq 0, & t\in (0,T],\\[2mm] \displaystyle h_*'(t)\leq \frac{\mu}{h_*^{N-1}(t)}\displaystyle\int_{0}^{h_*(t)} \int_{h_*(t)}^{+\yy} J(r,\rho)r^{N-1}v(t,r){\rm d} \rho{\rm d} r, & t\in [0,T], \end{cases} \end{equation*} then \begin{align*} h_*(t)\leq h(t),\ \ v(t,r)\leq u(t,r) \ \ {\rm for }\ t\in (0, T],\; r\in [0, h_*(t)]. \end{align*} \end{itemize} \end{lemma} \begin{proof} We just prove (i) since the proof of (ii) is similar. For small $\epsilon>0$, let $h_0^\epsilon:=(1-\epsilon)h_0$, $\mu_\epsilon:=(1-\epsilon)\mu$ and $u_0^\epsilon\in C([0,h_0])$ be a function satisfying $0\leq u_0^\epsilon(r)< u(0,r)$ for $r\in [0,h_0^\epsilon]$, $u_0^\epsilon(r)=0$ for $r \in [h_0^\epsilon,h_0]$ and $\lim_{\epsilon\to 0}u_0^\epsilon(\cdot)= u(0,\cdot)$ in $C([0,h_0])$. Denote by $(u_\epsilon,h_\epsilon)$ the unique solution of \eqref{1.4} with $h_0$ replaced by $h_0^\epsilon$, $\mu$ replaced by $\mu_\epsilon$ and $ u(0,\cdot)$ replaced by $u_0^\epsilon$. We next show that \begin{align}\label{3.9d} h_\epsilon(t)\leq h_*(t) \ \mbox{ for } \ t\in [0,T]. \end{align} Due to $h_\epsilon(0)=(1-\epsilon)h_0<h_0\leq h_*(0)$, \begin{align*} t_1:=\max\{t\in (0,T]:h_\epsilon(s)<h_*(t)\ {\rm for\ all}\ s\in [0,t]\} \end{align*} is well defined. If $t_1=T$, then \eqref{3.9d} immediately holds. On the other hand, if $t_1<T$, then \begin{align}\label{3.10d} h_\epsilon(t_1)=h_*(t_1), \ h_\epsilon'(t_1)\geq h_*'(t_1),\ h_\epsilon(t)<h_*(t)\ \mbox{ for } \ t\in [0,t_1), \end{align} and from $r_*(t)<h_*(t)$ for $t\in [0,T]$ there are two possible cases: \begin{itemize} \item[{\rm (a)}] $h_\epsilon(t)\in (r_*(t),h_*(t)]$ for $t\in [0,T]$, \item[{\rm (b)}] there exits $t_2\in [0,t_1)$ such that \begin{align*} r_*(t_2)=h_\epsilon(t_2) \ {\rm and}\ r_*(t)<h_\epsilon(t) \ \mbox{ for} \ t\in (t_2,t_1]. \end{align*} \end{itemize} We thus always have \begin{align*} r_*(t_2)\leq h_\epsilon(t_2)\ {\rm and}\ r_*(t)<h_\epsilon(t) \ \mbox{ for all } \ t\in (t_2,t_1] \mbox{ and some $t_2\in [0,t_1)$.} \end{align*} Note that for $t\in (t_2,t_1]$ and $r\in (r_*(t),h_\epsilon(t))\subset (r_*(t), h_*(t))$, \begin{align*} &v_t(t,r)\geq d \left[\int_{r_*(t)}^{ h_\epsilon(t)}\tilde J(r,\rho) v(t,\rho){\rm d} \rho-v(t,r)\right]+d\Lambda(t,r)+f(t,r,v),\\ &\displaystyle (u_\epsilon)_t(t,r)=d\left[\int_{r_*(t)}^{ h_\epsilon(t)} \tilde J(r,\rho) u_\epsilon(t,\rho){\rm d} \rho- u_\epsilon(t,r)\right] + d\Lambda(t,r)+f(t,r, u_\epsilon) \end{align*} with $\Lambda(t,r):=\displaystyle\int_{0}^{r_*(t)}\tilde J(t,\rho) u_\epsilon(t,\rho) {\rm d} \rho$. Hence for $w:=v- u_\epsilon$, we have \begin{align*} w_t(t,r)\geq d \left[\int_{r_*(t)}^{ h_\epsilon(t)}\tilde J(r,\rho) w(t,\rho){\rm d} \rho-w(t,r)\right]+c(t,r) w(t,r)\ \mbox{ for } t\in (t_2,t_1],\; r\in (r_*(t),h_\epsilon(t)) \end{align*} where \begin{equation*} c(t,r):= \begin{cases} 0,& v(t,r)= u_\epsilon(t,r),\\ \displaystyle \frac{f(t,r, v(t,r))-f(t,r, u_\epsilon (t,r))}{v(t,r)- u_\epsilon(t,r)}, &v(t,r)\neq u_\epsilon(t,r), \end{cases} \end{equation*} is a bounded function. Besides, by our assumptions, we have \begin{align*} &w(t_2,r)=w(0,r)=v(0,r)- u_\epsilon(0,r)\geq 0\ {\rm for}\ r\in [r_*(0),h_\epsilon(0)]&& {\rm if\ Case\ (a)\ holds }, \\ &w(t_2,r)=w(t_2,r_*(t_2))=v(t_1,r_*(t_2))\geq 0\ {\rm for}\ r\in [r_*(t_2),h_\epsilon(t_2)]=\{r_*(t_2)\}&& {\rm if\ Case\ (b)\ holds}, \end{align*} and \begin{align*} w(t,r_*(t))\geq 0, \ w(t,h_\epsilon(t))=v(t,h_\epsilon(t))- u_\epsilon(t,h_\epsilon(t))=v(t,h_\epsilon(t))\geq 0\ \mbox{ for }\ t\in [t_2,t_1]. \end{align*} Therefore, we can use Lemma \ref{lemma4.4} to conclude that \begin{align*} u_\epsilon(t,r)\leq v(t,r) \ \mbox{ for } \ t\in [t_2,t_1],\ r\in [r_*(t), h_\epsilon(t)]. \end{align*} This combined with \eqref{3.8d} gives \begin{align*} u_\epsilon (t,r)\leq v(t,r)\ \mbox{ for } \ t\geq [t_2,t_1],\ r\in [ 0, h_\epsilon (t)]. \end{align*} Thus \begin{align*} \displaystyle h_*'(t_1)&\geq \frac{\mu}{h_*^{N-1}(t_1)}\displaystyle\int_{0}^{h_* (t_1)} \int_{h_*(t_1)}^{+\yy} \tilde J(r,\rho)r^{N-1}v(t_1,r){\rm d} \rho{\rm d} r\\ &=\frac{\mu}{h_\epsilon^{N-1}(t_1)}\displaystyle\int_{0}^{ h_\epsilon(t_1)} \int_{ h_\epsilon(t_1)}^{+\yy} \tilde J(r,\rho)r^{N-1}v(t_1,r){\rm d} \rho{\rm d} r\\ &>\frac{\mu_\epsilon}{h_\epsilon^{N-1}(t_1)}\displaystyle\int_{0}^{ h_\epsilon(t_1)} \int_{ h_\epsilon(t_1)}^{+\yy} \tilde J(r,\rho)r^{N-1}u_\epsilon (t_1,r){\rm d} \rho{\rm d} r =h_\epsilon'(t_1), \end{align*} which contradicts with \eqref{3.10d}. Hence $t_1=T$, and \eqref{3.9d} holds. Since the unique solution of \eqref{1.4} depends continuously on the parameters in \eqref{1.4}, the desired result then follows by letting $\epsilon\to0$. \end{proof} \begin{remark}\label{rmk2.6} In Lemma \ref{lemma3.4a}, if $r_*(t)\equiv 0$, then the conclusions hold without requiring \[\begin{cases} v(t,r)\geq u(t,r) \mbox{ for $t\in [0, T],\ r\in [0, r_*(t)]=\{0\}$ in part $(i)$},\\ v(t,r)\leq u(t,r) \mbox{ for $t\in [0, T],\ r\in [0, r_*(t)]=\{0\}$ in part $(ii)$}. \end{cases} \] \end{remark} \begin{proof} When $r_*(t)\equiv 0$, $\Sigma_{\rm min}^{r_*}=\emptyset$, and the conclusion follows directly from the proof of Lemma \ref{lemma3.4a} when Lemma \ref{lemma4.4} is used for $w$ over $t\in [t_2, t_1]$ and $r\in [r_*(t), h_\epsilon(t)]$. \end{proof} \begin{remark}\label{rmk3.6} In Lemma \ref{lemma3.4a}, if $v_t(t,r)$ has jumping discontinuities over $r=\sigma_j(t)$ $(1\leq j\leq m)$, with $\sigma_1(t)<\sigma_2(t)<...<\sigma_m(t)$ continuous functions of $t$, and the inequalities involving $v_t(t,r)$ are satisfied away from these curves, then the conclusions remain valid. A reasoning for this can be found in Remark 2.4 of \cite{dn-speed} for a similar situation. This observation also applies to Lemma \ref{lemma4.4}. \end{remark} The rest of this paper will focus on \eqref{1.4} with a Fisher-KPP nonlinearity, namely $f=f(u)$ which satisfies {\bf (f)}. \section{Spreading-vanishing dichotomy} The purpose of this section is to prove Theorems \ref{th1.2} and \ref{th1.3}, which follows the approach of \cite{cdjfa} where the one space dimension case was treated. \subsection{Some preparations} Let $a, d$ be positive constants, $J(r)$ a kernel function satisfying ({\bf J}), and $\Omega\subset{\mathbb R}^N$ a bounded domain. We first consider the eigenvalue problem \begin{align}\label{7.1} d\int_{\Omega}J(|x-y|) \phi(y) {\rm d} y-d\phi(x)+a\phi(x)=\lambda \phi(x),\; x\in\Omega. \end{align} By \cite{bcv2016} and \cite{lcw2017}, problem \eqref{7.1} has a principal eigenvalue $\lambda_1(\Omega)$ equipped with a positive eigenfunction $\phi_\Omega$. \begin{proposition}\label{proposition3.1} Assume {\rm (\textbf{J})} holds. Then the following statements are true. \begin{itemize} \item[{\rm (a)}] $\lambda_1(\Omega_1)\leq \lambda_1(\Omega_2)$ if $\Omega_1\subset \Omega_2$. \item[{\rm (b)}] Denote $\lambda_1(L):=\lambda_1(B_L)$ with $B_L:=\{x\in{\mathbb R}^N: |x|<L\}$. Then \begin{itemize} \item[{\rm (i)}] $\lambda_1(L)$ is strictly increasing and continuous with respect to $L\in (0,\yy)$, \item[{\rm (ii)}] $\lim_{L\to\yy} \lambda_1(L)=a$, \item[{\rm (iii)}] $\lim_{L\to0} \lambda_1(L)=a-d$. \end{itemize} \end{itemize} \end{proposition} \begin{proof} The conclusions in (a) and part (i) of (b) follows similarly as \cite[Proposition 3.4]{cdjfa} part (i). It remains to prove (b)(ii) and (b)(iii). \smallskip (b)(ii). From the variational characterization of $\lambda_1(L)$ (see, e.g., \cite{bcv2016}), we have \begin{align}\label{7.2} \displaystyle\lambda_1(L)=\sup_{0\not\equiv\phi\in L^2(B_L)} \frac{\displaystyle d\int_{B_L}\int_{B_L} J(|x-y|)\phi(x)\phi(y){\rm d} y{\rm d} x}{\displaystyle\int_{B_L}\phi^2(x){\rm d} x}-d+a. \end{align} Since \begin{align*} \displaystyle \int_{B_L}\int_{B_L} J(|x-y|)\phi(x)\phi(y){\rm d} y{\rm d} x\leq& \int_{B_L}\int_{B_L} J(|x-y|)\frac{\phi^2(x)+\phi^2(y)}{2}{\rm d} y{\rm d} x\\ \leq& \int_{B_L}\phi^2(x){\rm d} x, \end{align*} we immediately get \begin{align*} \lambda_1(L)\leq d-d+a=a. \end{align*} For small $\epsilon>0$, it follows from $\int_{{\mathbb R}^N}J(|x|) {\rm d} x=1$ that there exists $L_\epsilon$ such that for $L\geq L_\epsilon$, \begin{align*} \int_{B_L} J(|x|) {\rm d} x\geq 1-\epsilon. \end{align*} It is clear that for $L\geq 2L_\epsilon$, \begin{align*} B_{L_\epsilon}(0)\subset B_L(x) \ \ \forall x\in B_{L-L_\epsilon}(0). \end{align*} Then using \eqref{7.2} with $\phi\equiv 1$, we deduce \begin{align*} \displaystyle\lambda_1(L)& \geq \displaystyle d\, |B_L|^{-1}\int_{B_L}\int_{B_L} J(|x-y|){\rm d} y{\rm d} x-d+a\\ &\geq \displaystyle d \, |B_L|^{-1} \int_{B_{L-L_\epsilon}}\int_{B_L(x)} J(|y|){\rm d} y{\rm d} x -d+a\\ &\geq \displaystyle d\, |B_L|^{-1} \int_{B_{L-L_\epsilon}}\int_{B_{L_\epsilon}(0)} J(|y|){\rm d} y{\rm d} x-d+a\\ &\geq d(1-\epsilon){|B_{L-L_\epsilon}|}{|B_L|^{-1}}-d+a\\ &=d(1-\epsilon)\frac{|L-L_\epsilon|^N}{L^N}-d+a\to -\epsilon d+a \ \ \ \ {\rm as }\ L\to\yy, \end{align*} which implies \begin{align*} \liminf_{L\to\yy}\lambda_1(L)\geq -\epsilon d+a. \end{align*} The arbitrariness of $\epsilon$ yields $\liminf_{L\to\yy}\lambda_1(L)\geq a$, which combined with $\lambda_1(L)\leq a$ gives \[ \lim_{L\to\yy}\lambda_1(L)= a.\] (b)(iii). Since the supremum in \eqref{7.2} is attained by $\phi_{B_L}$, we deduce \begin{align*} |\displaystyle\lambda_1(L)+d-a| &= \frac{\displaystyle d\int_{B_L}\int_{B_L} J(|x-y|)\phi_{B_L}(x)\phi_{B_L}(y){\rm d} y{\rm d} x}{\displaystyle\int_{B_L}\phi_{B_L}^2(x){\rm d} x}\\ &\leq d\|J\|_{L^\yy({\mathbb R})} \frac{\left(\displaystyle \int_{B_L}\phi_{B_L}(x){\rm d} x\right)^2}{\displaystyle\int_{B_L}\phi_{B_L}^2(x){\rm d} x}\leq d\|J\|_{L^\yy({\mathbb R})} \frac{|B_L|\displaystyle \int_{B_L}\phi_{B_L}^2(x){\rm d} x}{\displaystyle\int_{B_L}\phi_{B_L}^2(x){\rm d} x}\\ &= d\|J\|_{L^\yy({\mathbb R})}|B_L|\to0\ \ \ {\rm as}\ L\to 0. \end{align*} The proof is complete. \end{proof} \begin{corollary}\label{coro3.2} Assume {\rm(\textbf{J})} holds. Let $\lambda_1(L)$ be given by Proposition \ref{proposition3.1}. Then \begin{itemize} \item[{\rm (i)}] $\lambda_1(L)>0$ for all $L>0$ if $a\geq d$. \item[{\rm (ii)}] If $0<a< d$, then there exists $L_*>0$ such that $\lambda_1(L_*)=0$, $\lambda_1(L)<0$ for $0<L<L_*$ and $\lambda_1(L)>0$ for $L>L_*$. \end{itemize} \end{corollary} We next consider the fixed boundary problem \begin{equation}\label{fix1} \begin{cases} \displaystyle w_t=d \int_{\Omega}J(|x-y|)w(t,y){\rm d} y-dw(t,x)+f(w), & t>0,\; x\in \Omega,\\ w(0,x)=w_0(x)\geq,\not\equiv 0, & x\in \Omega. \end{cases} \end{equation} The following two results are well known (see, for example, \cite{bz2007}). \begin{lemma}\label{lemma3.4} Assume {\rm (\textbf{J})} holds, $f$ satisfies {\rm (\bf{f})}, and $w_i$, $\partial_t w_i\in C([0,\yy)\times \overline\Omega)$ for $i=1,2$. If \begin{equation*} \begin{cases} \displaystyle \partial_t w_1\leq d \int_{\Omega}J(|x-y|)w_1(t,y){\rm d} y-dw_1(t,x)+f(w_1), & t>0,\; x\in \Omega,\\[3mm] \displaystyle \partial_t w_2\geq d \int_{\Omega}J(|x-y|)w_2(t,y){\rm d} y-dw_2(t,x)+f(w_2), & t>0,\; x\in \Omega,\\ w_1(0,x)\leq w_2(0,x), & x\in \overline\Omega, \end{cases} \end{equation*} then $w_1(t,x)\leq w_1(t,x)$ for $(t,x)\in [0,\yy)\times \overline\Omega$. If additionally $w_1(0,x)\leq, \not\equiv w_2(0,x)$ for $x\in \overline\Omega$, then $w_1(t,x)< w_1(t,x)$ for $(t,x)\in (0,\yy)\times \Omega$. \end{lemma} \begin{proposition}\label{proposition3.3} Suppose {\rm (\textbf{J})} holds and $f$ satisfies {\rm (\bf{f})}. Then problem \eqref{fix1} admits a unique solution $w(t,x)$ defined for all $t>0$. Moreover, if $\lambda_1(\Omega)$ is the principal eigenvalue of \eqref{7.1} wit $a=f'(0)$, then the following statements hold. \begin{itemize} \item[{\rm (i)}] Problem \eqref{fix1} has a unique positive steady state $w^*\in C(\overline\Omega)$ if and only if $\lambda_1(\Omega)> 0$. \item[{\rm (ii)}] If $\lambda_1(\Omega)\leq 0$, then $w(t,x)$ converges to $0$ as $t\to\yy$ uniformly for $x\in \overline\Omega$. \item[{\rm (iii)}] If $\lambda_1(\Omega)>0$, then $w(t,x)$ converges to $w^*$ as $t\to\yy$ uniformly for $x\in \overline\Omega$. \end{itemize} \end{proposition} \begin{remark}\label{remar3.4} If $\Omega=B_L$ for some $L>0$, we then denote $w$ and $w^*$ by $w_L$ and $w_L^*$, respectively. Since $J$ is radially symmetric, we see that $w_L^*$ is radially symmetric in $ B_L$. \end{remark} \begin{lemma}\label{lemma3.6} Suppose {\rm (\textbf{J})} holds and $f$ satisfies {\rm (\bf{f})}. Then \begin{align*} \lim_{L\to\yy}w_L^*=u^*\ \ {\rm locally\ uniformly\ in}\ \mathbb{R^N}. \end{align*} \end{lemma} \begin{proof} To emphasize the dependence on $\Omega$, we rewrite $w^*(x)$ as $w^*(x; \Omega)$. {\bf Step 1}. We show that $w^*(x;\Omega_1)\leq w^*(x;\Omega_2)$ if $\overline B_{L_*}\subset \Omega_1\subset \Omega_2$, which then implies $ w_{L_1}^*\leq w_{L_2}^*$ for $L_*<L_1\leq L_2$, where $w_{L_i}^*$ is defined as in Remark \ref{remar3.4}. Let $C>0$ be a constant. Denote by $w_i$ the positive solution of \eqref{fix1} with $\Omega=\Omega_i$ and initial function $w_{i}(0,x)=C$ for $i=1,2$. Since \begin{align*} \int_{\Omega_2}J(x-y)w_{2}(t,y)dy\geq \int_{\Omega_1}J(x-y)w_{2}(t,y)dy, \end{align*} we see that the restriction of $w_{2}$ over $\Omega_1$ is an upper solution, and by Lemma \ref{lemma3.4}, $w_{1}(t,x)\leq w_{2}(t,x)$ for $t\geq 0$ and $x\in \Omega_1$. Then from Proposition \ref{proposition3.3} (iii), \begin{align*} w^*(x; \Omega_1)\leq w^*(x;\Omega_2)\ \ \ \ \ \ {\rm for}\ x\in \Omega_1. \end{align*} This completes Step 1. Due to the monotonicity of $w_L^*$ in $L$, we could define \begin{align*} {w}_\yy^*(x):=\lim_{L\to \yy} w_L^*(x). \end{align*} By the dominated convergence theorem, it is easy to see that $w_\yy^*$ satisfies \begin{align}\label{7.4} d \int_{{\mathbb R}^N}J(|x-y|)w_\yy^*(y){\rm d} y-dw_\yy^*(x)+f(w_\yy^*)=0 \mbox{ for } x\in{\mathbb R}^N. \end{align} {\bf Step 2}. We show that $w_\yy^*$ is a positive constant. It suffices to prove that $w_\yy^*(x_0)=w_\yy^*(0)$ for any given $x_0\in {\mathbb R}^N$. Denote $L_0:=|x_0|$. Then for $L\gg L_0$, \begin{align*} B_{L-L_0}\subset B_L(-x_0)\subset B_{L+L_0}, \end{align*} and from Step 1, \begin{align*} w^*_{L-L_0}(x)\leq w^*(x; B_L(-x_0))\leq w^*_{L+L_0}(x). \end{align*} We claim that $w^*(x; B_L(-x_0))=w^*_L(x+x_0)$. In fact, $\tilde w(x):= w^*(x-x_0; B_L(-x_0))$ for $x\in B_L$ also satisfies \begin{align}\label{7.5} d \int_{B_L}J(|x-y|)w(y){\rm d} y-dw(x)+f(w)=0,\ \ x\in B_L, \end{align} and then $\tilde w=w^*_L$ follows from the uniqueness of the positive solution to \eqref{7.5}, which implies $w^*(x; B_L(-x_0))=w^*_L(x+x_0)$. Hence \begin{align*} w^*_{L-L_0}(x)\leq w^*_L(x+x_0)\leq w^*_{L+L_0}(x). \end{align*} Letting $x=0$ and $L\to \yy$, we obtain \begin{align*} w_\yy^*(0)\leq w_\yy^*(x_0)\leq w_\yy^*(0), \end{align*} which gives $w_\yy^*(x_0)=w_\yy^*(0)$. {\bf Step 3.} Since $u^*$ is the only constant positive solution of \eqref{7.4}, the conclusion in Step 2 clearly implies $w_\yy^*=u^*$, and so $\lim_{L\to\yy} w_L(x)=u^*$. By Dini's theorem, the convergence is locally uniform in $x\in{\mathbb R}$. \end{proof} \subsection{Proof of Theorem \ref{th1.2} and Theorem \ref{th1.3}} Throughout this subsection, we assume that {\rm (\textbf{J})} holds and $f$ satisfies {\rm (\bf{f})}. Let $(u, h)$ be the unique solution of \eqref{1.4}. \begin{lemma}\label{lemma3.7} If $\lim_{t\to\yy} h(t)=h_{\yy}<\yy$, then \begin{align}\label{7.6} \lim_{t\to\yy}\|u\|_{C[-h(t),h(t)]}=0. \end{align} \end{lemma} \begin{proof} We first show that \begin{align*} \lambda_1({h_\yy})\leq 0, \end{align*} where $\lambda_1({h_\yy})$ is the principal eigenvalue of \eqref{7.1} with $\Omega=B_{h_\yy}$ and $a=f'(0)$. Suppose, on the contrary, $\lambda_1(h_\yy)>0$. By Proposition \ref{proposition3.1} and $\lim_{t\to\yy} h(t)=h_\yy$, for any small $\epsilon>0$, there exits a large constant $T=T_\epsilon>0$ such that for all $t\geq T$, \begin{align}\label{7.7a} h(t)\geq h_\yy-\epsilon\ {\rm and}\ \lambda_1({h(t)})>0. \end{align} Let $w_1(t,x)$ be the solution of \eqref{fix1} with $\Omega$ replaced by $B_{h(T)}$, and initial function $w_1(0,l)= u(T,x)$ for $x\in B_{h(T)}$. By the comparison principle in Lemma \ref{lemma3.4} we obtain \begin{align*} w_1(t,x)\leq u(t+T,x) \ \ \ \ {\rm for}\ (t,x)\in [0,\yy)\times B_{h(T)}, \end{align*} Recalling that $\lambda_1(h(T))>0$, we can use Proposition \ref{proposition3.3} to conclude that \begin{align*} w_1^*(x):=\lim_{t\to\yy} w_1(t,x)>0\ \ {\rm uniformly\ for\ } x\in \overline B_{h(T)}. \end{align*} Hence \begin{align*} \inf_{x\in B_{h(T)}} w_1^*(x)\leq \liminf_{t\to\yy} \inf_{x\in B_{h(T)}}u(t,x), \end{align*} and there exists $T_1\geq T$ such that for $t\geq T_1$, \begin{align}\label{7.7} 0<C_1:=\frac 12 \min_{x\in B_{h(T)}}w_1^*(x) \leq \frac 12 w_1^*(x)< u(t,x) \ \ \ \ \mbox{ for } x\in B_{h(T)}. \end{align} Due to $J(0)>0$, by choosing $ \epsilon$ small enough we may assume that \begin{align*} C_2:=\min_{r\in [0, 4\epsilon]}J(r)>0. \end{align*} We also have \begin{align*} h'(t)&= \frac{\mu} {|\partial B_{h(t)}|} \displaystyle \int_{B_{h(t)}} u(t,x)\left[\int_{{\mathbb R}^N\backslash B_{h(t)}}J(|x-y|){\rm d} y\right]{\rm d} x\\ &\geq \frac{\mu}{|\partial B_{h_\yy}|} \displaystyle \int_{B_{h(t)-\epsilon} \backslash B_{h(t)-2\epsilon}} u(t,x)\left[\int_{B_{h(t)+\epsilon}\backslash B_{h(t)}}J(|x-y|){\rm d} y\right]{\rm d} x. \end{align*} Denote $ \Omega_x(t):=[B_{h(t)+\epsilon}\backslash B_{h(t)}]\cap B_{4\epsilon}(x)$. It is clear that for $x\in B_{h(t)-\epsilon} \backslash B_{h(t)-2\epsilon}$ and $t\geq T$, \begin{align*} |\Omega_x(t)|\geq C_3>0 \end{align*} for some $C_3$ depending on $\epsilon$ but not on $x$ or $t$. Hence for $t\geq T_1$, \begin{equation}\begin{aligned}\label{7.8} h'(t)& \geq \frac{\mu}{|\partial B_{h_\yy}|}\displaystyle \int_{B_{h(t)-\epsilon} \backslash B_{h(t)-2\epsilon}} u(t,x)\left[\int_{\Omega_x(t)}J(|x-y|){\rm d} y\right]{\rm d} x\\ &\geq\frac{\mu}{|\partial B_{h_\yy}|} \displaystyle \int_{B_{h(t)-\epsilon} \backslash B_{h(t)-2\epsilon}} u(t,x)C_2C_3{\rm d} x\\ &\geq \frac{\mu}{|\partial B_{h_\yy}|} \displaystyle \mu |B_{h(t)-\epsilon} \backslash B_{h(t)-2\epsilon}| C_1C_2C_3\\ &\to \frac{\mu}{|\partial B_{h_\yy}|} \displaystyle \mu |B_{h_\infty-\epsilon} \backslash B_{h_\infty-2\epsilon}| C_1C_2C_3>0 \mbox{ as } t\to\infty. \end{aligned} \end{equation} However, \eqref{7.8} contradicts with the fact $h_\yy<\yy $. Therefore, $\lambda_1(h_\yy)\leq 0$. Let $w_2$ be the solution of \eqref{fix1} with $\Omega=B_{h_\yy}$ and $w_2(0,x)=u_0(x)$ for $x\in B_{h_\yy}$, where we extend the domain of $u_0(x)$ to $B_{h_\yy}$ by defining $u_0(x)=0$ for $x\in B_{h_\yy}\backslash B_{h_0}$. By Lemma \ref{lemma4.4} it is easily seen that \begin{align*} u(t,x)\leq w_2(t,x),\ \ \ \ t\geq 0,\; x\in B_{h(t)}. \end{align*} Because of $\lambda_1(h_\infty)\leq 0$, it follows from Proposition \ref{proposition3.3} that $\lim_{t\to\infty}w_2(t,x)=0$ uniformly for $x\in \overline B_{h_\yy}$, which implies \eqref{7.6}. \end{proof} \begin{lemma}\label{lemma3.8} If $\lambda_1(h_0)<0$ and $\mu$ is sufficiently small, then \begin{align}\label{7.10a} \lim_{t\to\yy}\|u\|_{C(\overline B_{h(t)})}=0. \end{align} \end{lemma} \begin{proof} By Lemma \ref{lemma3.7}, it suffices to show $h_\yy<\yy$. Since $\lambda_1(L)$ is continuous in $L$ by Proposition \ref{proposition3.3}, we obtain from $\lambda_1(h_0)<0$ that $\lambda_1(h_1)<0$ for some $h_1:=h_0+\epsilon$ with $\epsilon>0$ small. Let $\phi$ be a positive eigenfunction corresponding to $\lambda_1(h_1)<0$. Define \begin{align*} &\delta:=-\lambda_1(h_1)/2, \; C:= (h_1-h_0)/\mu,\; M:= \delta C|\partial B_{h_0}|\Big(\!\int_{B_{h_1}}\phi(x){\rm d} x\Big)^{-1},\\ &\overline h(t):=h_0+\mu C [1-e^{-\delta t}],\ \ \overline u(t,x):=Me^{-\delta t} \phi(x),\ \ \ \ t\geq 0,\; x\in B_{h_1}. \end{align*} Clearly, $\overline h(t)\in [h_0, h_1)$ for $t\geq 0$. By ({\bf f}\,) we have \[ f(\bar u)\leq f'(0) \bar u. \] We next use Remark \ref{rmk2.6} to show that \begin{align}\label{7.10} B_{h(t)}\subset B_{\bar h(t)}, \ \ \ t\geq 0 \end{align} for all small $\mu>0$, which then implies \begin{align*} h(t)\leq \bar h(t)\leq h_1<\yy. \end{align*} Using the equation satisfied by $\phi$, we see \begin{align*} &\displaystyle \bar u_t-d \int_{B_{\bar h(t)}}J(|x-y|)\bar u(t,y){\rm d} y+d\bar u(t,x)-f(\bar u)\\ =&Me^{-\delta t}\left[ -\delta \phi(x)-d \int_{B_{\bar h(t)}}J(|x-y|) \phi(y){\rm d} y+d \phi(x)\right]-f(\bar u)\\ \geq &Me^{-\delta t}[f'(0)-\lambda_1(h_1)-\delta]\phi(x)-f(\bar u)\\ =& \delta Me^{-\delta t}\phi(x)+f'(0)\bar u -f(\bar u) \geq 0\ \ \ \ \ \ \ {\rm for}\ t>0, \; x\in B_{\bar h(t)}. \end{align*} Since $h_0\leq \bar h(t)\leq h_1$ and $\displaystyle\int_{{\mathbb R}^N}J(|y|){\rm d} y=1$, we have, for $t>0$, \begin{align*} &\frac{\mu}{|\partial B_{ h(t)}|}\displaystyle \int_{B_{\bar h(t)}}\bar u(t,x)\left[\int_{{\mathbb R}^N\backslash B_{\bar h(t)}}J(|x-y|){\rm d} y\right]{\rm d} x\\ \leq& \frac{\mu}{|\partial B_{ h_0}|} \displaystyle \int_{B_{ h_1}}\bar u(t,x){\rm d} x =\frac{\mu Me^{-\delta t}} {|\partial B_{ h_0}|}\int_{B_{ h_1}} \phi(x){\rm d} x=\mu C \delta e^{-\delta t}=\bar h'(t). \end{align*} It is clear that \begin{align*} \bar u(t,x)>0 \ \mbox{ for } \ t>0,\; x\in \partial B_{\bar h(t)}. \end{align*} Moreover, we may choose $\mu>0$ small so that $M$ is large enough such that \begin{align*} u_0(x)\leq M\phi(x)= \bar u(0,x) \ \mbox{ for } \ x\in B_{h_0}, \end{align*} which would allow us to apply Remark \ref{rmk2.6} to obtain \eqref{7.10}. \end{proof} \begin{lemma}\label{lemma3.9} If $\lambda_1(h(t_0))\geq 0$ for some $t_0\geq 0$, then $h_\yy=+\yy$ and \begin{align}\label{7.12} \lim_{t\to\yy}u(t,r)=u^*\ \ \ \ {\rm locally\ uniformly\ in}\ {\mathbb R}_+, \end{align} where $\lambda_1(h(t_0))$ is the eigenvalue of \eqref{7.1} with $a=f'(0)$ and $\Omega=B_{h(t_0)}$. \end{lemma} \begin{proof} We first show that $h_\yy=\yy$. Otherwise, $h_\yy<\yy$ and by Lemma \ref{lemma3.7}, $\lambda_1(h_\yy)\leq 0$, which contradicts with $\lambda_1(h_\yy)>\lambda_1(h(t_0))\geq 0$. Thus $h_\yy=\yy$. It remains to verify \eqref{7.12}, which would follow if we can show \begin{align} &\limsup_{t\to\yy} \max_{r\in [0, h(t)]} u(t,x)\leq u^*,\label{7.13}\\ &\liminf_{t\to\yy} \inf_{r\in [0, R]} u(t,r)\geq u_* \ \ {\rm for\ any\ } R>0.\label{7.14} \end{align} Let $Z(t)$ is the unique solution of the ODE problem $Z'=f(Z)$ with $Z(0)=\|u_0\|_\infty$. By Remark \ref{rmk2.6} we have $u(t,r)\leq Z(t)$ for $t>0$ and $r\in [0, h(t)]$, and so \eqref{7.13} follows from $\lim_{t\to\yy} Z(t)=u^*$. By Lemma \ref{lemma3.6}, \begin{align*} \lim_{L\to\yy}w_L^*(r)=u^*\ \ \ \ {\rm locally\ uniformly\ in}\ \mathbb{R}_+. \end{align*} Therefore in order to show \eqref{7.14}, it suffices to show that for any given large constant $K>h(t_0)$, \begin{align}\label{7.15b} \liminf_{t\to\yy} \inf_{r\in [0, K]} u(t,r)\geq \inf_{r\in [0, K]}w_L^*(r)\ \ \ \ {\rm for\ any\ } L\geq K. \end{align} In fact, for such $L$ there is $t_L>0$ such that $L=h(t_L)$, and then from $\lambda_1(L)>\lambda_1(h(t_0))\geq 0$ and Proposition \ref{proposition3.3}, we have \begin{align*} \lim_{t\to\yy} w_L(t,r)= w_L^* \ \ {\rm uniformly\ for}\ r\in [0, K], \end{align*} where $w_L$ is the solution of \eqref{fix1} with initial function $w_L(0,r)=u(t_L,r)$ for $r\in [0, L]=[0, h(t_L)]$. By Lemma \ref{lemma3.4}, we obtain \begin{align*} u(t+t_L, r)\geq w_L(t,r) \ \mbox{ for } \ t\geq 0,\; r\in [0, K], \end{align*} which yields \eqref{7.15b}. \end{proof} \noindent {\bf Proof of Theorem \ref{th1.2}\,:} If $\lim_{t\to\yy}h(t)=h_\yy=\yy$, by Corollary \ref{coro3.2}, there is $t_0\geq 0$ such that $\lambda_1(h(t_0))>0$. By Lemma \ref{lemma3.9}, we see that spreading happens. If $h_\infty<\infty$, then \eqref{7.6} holds by Lemma \ref{lemma3.7}, which implies that vanishing happens. $\hfill \Box$ \noindent {\bf Proof of Theorem \ref{th1.3}\,:} (1) By Proposition \ref{proposition3.1}, $\lambda_1(h_0)> 0$ for any $h_0>0$, and the conclusion in part (1) follows directly from Lemma \ref{lemma3.9}. (2) From Corollary \ref{coro3.2}, $\lambda_1({h_0})\geq 0$ for $h_0\geq L_*$, and so we can use Lemma \ref{lemma3.9} to conclude that spreading happens. This proves (2)(i). Next we consider (2)(ii). Under the assumptions for this case, by Corollary \ref{coro3.2} we have $\lambda_1(h_0)<0$. From Lemma \ref{lemma3.8}, for any given admissible initial function $u_0$, vanishing happens for all small $\mu>0$, say $\mu\in (0, \underline\mu]$. To stress the dependence of the unique positive solution $(u, h)$ of \eqref{1.4} on $\mu$, we will denote it by $(u_\mu,h_\mu)$. We show next that there exists $\overline\mu>0$ such that spreading happens for $\mu\geq \overline\mu$. To this end, we first prove that there exists $\mu_0>0$ such that \bes\label{7.16b} h_{\mu_0}(t_0)> L_* \mbox{ for some } t_0>0. \ees If \eqref{7.16b} is not true, then \begin{align*} h_{\mu}(t)\leq L_*\ {\rm for\ all}\ t>0\ {\rm and}\ \mu>0. \end{align*} By Remark \ref{rmk2.6}, both $u_\mu$ and $h_\mu$ are nondecreasing in $\mu$. Hence $h_\yy(t):=\lim_{\mu\to \yy}h_\yy(t)$ is well-defined and $h_\yy(t)\leq L_*$. Besides, since for each $\mu>0$, $h_\mu(t)$ is nondecreasing in $t$, the function $h_\yy(t)$ is also nondecreasing in $t$. Define $\tilde h_\yy=\lim_{t\to\yy}h_\yy(t)$. Then from the monotonicity of $h_\mu(t)$ in $\mu$ and $t$, for small $\epsilon>0$ there are $t_1>0$ and $\mu_1>0$ such that \begin{align*} h_\mu(t)\in (\tilde h_\yy-\epsilon, \tilde h_\yy] \mbox{ for } \ t\geq t_1,\; \mu\geq \mu_1, \end{align*} and from the monotonicity of $u_\mu$ with respect to $\mu$, we obtain for all $\mu\geq \mu_1$, \begin{align*} 0<u_{\mu_1}(t,r)\leq u_{\mu}(t,r) \ \ \ \ \mbox{ for } t\geq t_1,\ r\in [0, \tilde h_\yy-2\epsilon]\subset [0, h_\mu(t_1)-\epsilon]\subset [0, h_{\mu_1}(t_1)]. \end{align*} Let \begin{align*} C_1:={\rm min}_{\{t\in [t_1,t_1+1],\; r\in[0, \tilde h_\yy-2\epsilon]\}}u_{\mu_1}(t,r)>0. \end{align*} Due to $J(0)>0$, if $\epsilon$ is sufficiently small, we have \begin{align*} C_2:=\min_{r\in [0,4\epsilon]}J(r)>0. \end{align*} Then for $\mu\geq \mu_1$, \begin{align*} h_\mu(t_1+1)-h_\mu(t_1)&=\displaystyle \int_{t_1}^{t_1+1}\frac{\mu}{|\partial B_{h(s)}|}\int_{B_{h(s)}} u(s,|x|)\left[\int_{{\mathbb R}^N\backslash B_{h(s)}}J(|x-y|){\rm d} y\right]{\rm d} x{\rm d} s\\ &\geq \frac{\mu}{|\partial B_{\tilde h_\yy}|} \int_{t_1}^{t_1+1}\int_{B_{\tilde h_\yy-2\epsilon} \backslash B_{\tilde h_\yy-3\epsilon}} u(s,x)\left[\int_{B_{\tilde h_\yy+\epsilon}\backslash B_{\tilde h_\yy}}J(|x-y|){\rm d} y\right]{\rm d} x{\rm d} s\\ &\geq \frac{ \mu C_1}{|\partial B_{\tilde h_\yy}|} \int_{B_{\tilde h_\yy-2\epsilon} \backslash B_{\tilde h_\yy-3\epsilon}} \left[\int_{B_{\tilde h_\yy+\epsilon}\backslash B_{\tilde h_\yy}}J(|x-y|){\rm d} y\right]{\rm d} x. \end{align*} It is clear that for $x\in B_{\tilde h_\yy-2\epsilon} \backslash B_{\tilde h_\yy-3\epsilon}$, there exists $C_3>0$ independent of $x$ such that \begin{align*} |\Omega_x|\geq C_3, \ \mbox{where $\Omega_x:=[ B_{\tilde h_\yy+\epsilon}\backslash B_{\tilde h_\yy}]\cap B_{4\epsilon}(x)$.} \end{align*} Hence \begin{align} h_\mu(t_1+1)-h_\mu(t_1)&\geq \frac{ \mu C_1}{|\partial B_{\tilde h_\yy}|} \int_{B_{\tilde h_\yy-2\epsilon} \backslash B_{\tilde h_\yy-3\epsilon}} C_2C_3{\rm d} x\to \yy\ {\rm as}\ \mu\to\yy. \end{align} which contradicts with the fact $h_\mu(t_1+1)-h_\mu(t_1)<\tilde h_\yy\leq L_*$. This proves \eqref{7.16b}. Making use of \eqref{7.16b} and Corollary \ref{coro3.2}, we see $\lambda_1(h_{\mu_0}(t_0))>0$, and then by Lemma \ref{lemma3.9} we see that spreading happens when $\mu=\mu_0$. Note that both $u_\mu$ and $h_\mu$ are nonincreasing in $\mu>0$. The above proved facts then indicate that vanishing happens for all small $\mu>0$ and spreading happens for all large $\mu>0$. Define \[ \mu_*:=\sup\{\mu^0>0: \mbox{ vanishing happens for } \mu\in (0, \mu^0]\}. \] Then we can follow the simple argument in the proof of \cite[Theorem 3.14] {cdjfa} to deduce that vanishing happens for $0<\mu\leq \mu_*$ and spreading happens for $\mu>\mu_*$. The proof is now complete. $\hfill \Box$ \section{Spreading speed } In this section, we prove Theorem \ref{th1.6}. The analysis is presented in three subsections. \subsection{Semi-wave } If $f$ satisfies ({\bf f}), then it is easily seen that for all small $\sigma>0$, say $\sigma\in (-\epsilon_0,\epsilon_0)$, \[ f_\sigma (u):=\sigma u+f(u) \] also satisfies ({\bf f}), with $u^*$ replaced by some uniquely determined $u^*_\sigma$. The conclusions below about semi-wave solutions will be used frequently in the rest of this paper. We will use the following assumptions. \begin{enumerate}[leftmargin=3.8em] \item[\textbf{(P):}] $P\in C(\mathbb R)\cap L^\infty(\mathbb R)$,\; $P$ is even and nonnegative,\ $P(0)>0$ and $d(\|P\|_{L^1}-1)\in (-\epsilon_0,\epsilon_0)$. \item[\textbf{(P1):}] $\displaystyle\int_{0}^{\yy} xP(x){\rm d} x<\yy$. \end{enumerate} \begin{proposition}\label{prop4.1} Let $d$ and $\mu$ be positive constants and $f$ be a function satisfying {\rm ({\bf f})}, with $\epsilon_0>0$ given as above. \begin{itemize} \item[{\rm (1)}] Assume $P$ satisfies {\rm \textbf{(P)}}. Then the following problem \begin{equation}\label{semi1} \begin{cases} \displaystyle d\int_{-\yy}^{0}P(x-y) \phi(y) {\rm d}y-d\phi+c\phi'(x)+f(\phi) =0,& x<0,\\[2mm] \displaystyle \phi(-\yy)=\hat u^*,\ \ \phi(0)={0}, \end{cases} \end{equation} with \begin{align}\label{semi2} c=\mu\int_{-\yy}^{0} \phi(x)\int_{0}^{\yy}P(x-y){\rm d} y{\rm d} x. \end{align} admits a unique solution $(c,\phi)$ with $\phi$ monotone if and only if {\rm \textbf{(P1)}} holds, where $\hat u^*$ is the unique positive root of the equation $\hat f(u):=d(\|P\|_{L^1}-1)u+f(u)=0$. \item[{\rm (2)}] Let $\{P_n\}_{n=1}^{\yy}$ be a sequence with each $P_n$ satisfying {\rm \textbf{(P)} }and {\rm \textbf{(P1)}}. Denote by $(c_n,\phi_n)$ the unique solution of \eqref{semi1}-\eqref{semi2} with $P=P_n$. Suppose $P_n(x)$ converges to a function $\widetilde P(x)$ satisfying {\rm \textbf{(P)}}, locally uniformly for $x\in {\mathbb R}$. \begin{itemize} \item[{\rm (i)}] If $\widetilde P(x)$ satisfies {\rm \textbf{(P1)}} {and there is $Q\in L^1({\mathbb R})$ satisfying $\displaystyle\int_{0}^\yy Q(x)x{\rm d} x<\yy$ such that $P_n\leq Q$}, then \begin{align*} \lim_{n\to\yy} \phi_n=\tilde\phi,\ \lim_{n\to \yy} c_n=\tilde c. \end{align*} where $(\tilde c,\tilde \phi)$ is the unique solution of \eqref{semi1}-\eqref{semi2} with $P$ replaced by $\widetilde P$. \item[{\rm (ii)}] If $\widetilde P$ does not satisfy {\rm \textbf{(P1)}}, then \begin{align*} \lim_{n\to\yy} c_n=\yy. \end{align*} \end{itemize} \end{itemize} \end{proposition} To prove Proposition \ref{prop4.1}, we will need \cite[Lemma 2.8]{dn-speed}, which we restate below. \begin{lemma}\label{lemma5.2} Let $(c_1,\phi_1,P_1)$ and $(c_2,\phi_2,P_2)$ be given as in Proposition \ref{prop4.1} {\rm (2)}. If $P_1\leq P_2$, then \begin{align*} c_1\leq c_2\ {\rm and}\ \phi_1\leq \phi_2. \end{align*} \end{lemma} \begin{proof}[{\bf Proof of Proposition \ref{prop4.1}:}] The conclusion in part (1) follows from \cite[Theorem 1.2]{dlz2019} once we rewrite the first equation in \eqref{semi1} as \[ \hat d\int_{-\yy}^{0}\hat P(x-y) \phi(y) {\rm d}y-\hat d\phi+c\phi'(x)+\hat f(\phi) =0, \] with $\hat d:=d\|P\|_{L^1},\; \hat P(x):=P(x)/\|P\|_{L^1}$ and $\hat f(u):=d(\|P\|_{L^1}-1)+f(u)$. To prove part (2), we first show \begin{align}\label{3.3d} \inf_{n\geq 1} c_n>0. \end{align} Fix $\epsilon>0$ sufficiently small and let $P_0$ be a continuous function satisfying \begin{align*} &P_0(x)=\max\{\widetilde P(x)-\epsilon^2, 0\}\ {\rm for}\ |x|\leq 1/\epsilon,\ \ \ \ P_0(x)=0\ {\rm for}\ |x|\geq 1/\epsilon+1,\\ &P_0(x)\leq \max\{\widetilde P(x)-\epsilon^2, 0\}\ {\rm for}\ x\in {\mathbb R}. \end{align*} Then \begin{align*} \|P_0\|_{L^1({\mathbb R})}\geq& \int_{-1/\epsilon}^{1/\epsilon} P_0(x) {\rm d} x\geq \int_{-1/\epsilon}^{1/\epsilon} \widetilde P(x) {\rm d} x-\int_{-1/\epsilon}^{1/\epsilon} \epsilon^2 {\rm d} x\\ =&\int^{1/\epsilon}_{-1/\epsilon} \widetilde P(x) {\rm d} x-2\epsilon \to \|\widetilde P\|_{L^1({\mathbb R})} \mbox{ as } \epsilon\to 0, \end{align*} and $\|P_0\|_{L^1({\mathbb R})}\leq \|\widetilde P\|_{L^1({\mathbb R})}$. Hence $P_0$ satisfies \textbf{(P)} for such $\epsilon$. Since $P_n$ converges to $\widetilde P$ locally uniformly for $x\in {\mathbb R}$, there is $n_\epsilon>0$ such that for $n\geq n_\epsilon$, \begin{align*} P_n\geq \max\{P-\epsilon^2,0\}\geq P_0 \ \mbox{ for} \ |x|\leq 1/\epsilon+1. \end{align*} Let $(\hat c,\hat \phi)$ be the solution of \eqref{semi1}-\eqref{semi2} with $P=P_0$. Then by Lemma \ref{lemma5.2}, we have \begin{align}\label{3.4d} c_n\geq \hat c,\ \phi_n\geq \hat \phi,\ \ \ \ \ n\geq n_\epsilon. \end{align} Thus \begin{align*} c_n\geq \min\{c_1,c_2,\cdots,c_{n_\epsilon}, \hat c\}>0, \end{align*} which proves \eqref{3.3d}. By \eqref{semi1} and \eqref{3.3d}, \begin{align*} \sup_{n\geq 1}\phi_n'(x)\leq&\frac{1}{(\inf_{n\geq 1}c_n)}\sup_{n\geq 1} \left(d[\|P_n\|_{L^\yy({\mathbb R})}+1]\phi_n(-\yy)+\max_{u\in [0,\phi_n(-\yy)]}f(u)\right)<\yy. \end{align*} Assume that \begin{align}\label{4.5a} K:=\sup_{n\geq 1} c_n<\yy. \end{align} Then by the Arzela-Ascoli Theorem and a strand argument including a diagonal process of choosing subsequences, there are $\phi_\yy\in C({\mathbb R}_-)$ and a subsequence of $\{\phi_n\}_{n\geq 1}$, still denoted by itself, such that $\phi_{n}$ converges to $ \phi_\yy$ locally uniformly in ${\mathbb R}_-$. Moreover, $ \phi_\yy(x)$ is nonincreasing in $x$. By \eqref{4.5a}, without loss of generality, we assume that $c_n\to c_\yy$ as $n\to\yy$. Then we claim that $(c_\yy,\phi_\yy)$ satisfies \begin{align}\label{3.6d} d \int_{-\yy}^{0}\widetilde P (x-y) \phi_\yy(y) {\rm d}y-d\phi_\yy(x)+c_\yy\phi_\yy'(x)+f(\phi_\yy(x))=0,\ \ \ \ x\in {\mathbb R}_-. \end{align} In fact, from \eqref{semi1}, \begin{align*} c_n\phi_{n}(x)-c_n\phi_{n}(0)=&- \int_{0}^{x} \left[d\int_{-\yy}^{0}{P_n} (\xi -y) \phi_{n}(y) {\rm d}y-d\phi_{n}(\xi)+f(\phi_{n}(\xi))\right] {\rm d}\xi. \end{align*} For given $x\in {\mathbb R}_-$, it then follows from the dominated convergence theorem that \begin{align*} c_\yy\phi_\yy(x)-c_\yy\phi_\yy(0)=&- \int_{0}^{x} \left[d\int_{-\yy}^{0}{\widetilde P} (\xi -y) \phi_\yy(y) {\rm d}y-d\phi_\yy(\xi)+f(\phi_\yy(\xi))\right] {\rm d}\xi, \end{align*} and hence \eqref{3.6d} holds by differentiating this equation. We claim that $\phi_\yy(-\yy)>0$ satisfies \begin{align}\label{3.7b} f(\phi_\yy(-\yy))+d(\|\widetilde P\|_{L^{1}({\mathbb R})}-1)\phi_\yy(-\yy)=0. \end{align} Due to the monotonicity and boundedness of $\phi_\yy(x)$, one could easily get \begin{align*} \lim_{x\to -\yy} \left[d \int_{-\yy}^{\yy}\widetilde P(x-y) \phi_\yy(y) {\rm d}y-d\|\widetilde P\|_{L^{1}({\mathbb R})}\phi_\yy(x)\right]=0, \end{align*} and so \begin{align*} \lim_{x\to -\yy} [c\phi_\yy'(x)+f(\phi_\yy(x))+d(\|\widetilde P\|_{L^{1}({\mathbb R})}-1)\phi_\yy(x)]=0. \end{align*} From again the monotonicity and boundedness of $\phi_\yy(x)$ in $x$, we deduce that $\lim_{x\to -\yy}\phi_\yy'(x)=\lim_{x\to-\yy}$ $ f(\phi_\yy(x))+d(\|\widetilde P\|_{L^{1}({\mathbb R})}-1)\phi_\yy(x)=0$. Recalling that $\phi_n\geq \hat \phi$ for $n\geq n_\epsilon$ and $\phi_n\to \phi_\yy$ as $n\to\yy$, we see that $\phi_\yy(-\yy)>0$. Hence, \eqref{3.7b} holds. (i) We now show that \begin{align*} c_\yy=\lim_{n\to \yy} c_n=\lim_{n\to \yy}\mu\int_{-\yy}^{0} \phi_n(x)\int_{0}^{\yy} P_n(x-y){\rm d} y{\rm d} x=\mu\int_{-\yy}^{0} \phi_\yy(x)\int_{0}^{\yy}\widetilde P(x-y){\rm d} y{\rm d} x. \end{align*} In fact, due to \begin{align*} &\int_{-\yy}^{0} \phi_n(x)\int_{0}^{\yy} P_n(x-y){\rm d} y{\rm d} x=\int_{0}^\yy P_n(y)\int_{-y}^0 \phi_n(x){\rm d} x{\rm d} y,\\ &\int_{-\yy}^{0} \phi_\yy(x)\int_{0}^{\yy}\widetilde P(x-y){\rm d} y{\rm d} x=\int_{0}^\yy \widetilde P(y)\int_{-y}^0 \phi_\yy(x){\rm d} x{\rm d} y, \end{align*} and $P_n\leq Q$, the desired identity follows from the dominated convergence theorem. Therefore, $(c_\yy, \phi_\yy)$ is a solution of \eqref{semi1} and \eqref{semi2} with $P=\widetilde P$. It then follows from the conclusion in part (1) that $(c_\yy,\phi_\yy)=(\tilde c,\tilde \phi)$. The above discussions also indicate that \begin{align*} \lim_{n\to\yy} c_n=\tilde c,\ \lim_{n\to\yy} \phi_n=\tilde \phi \mbox{ for the entire original sequence } (c_n,\phi_n). \end{align*} (ii) If $\widetilde P$ does not satisfy {\rm \textbf{(P1)}}, then for any constants $L>L_0>0$, we have \begin{align*} \lim_{n\to \yy}\int_{-L}^{0} \phi_n(x)\int_{0}^{L} P_n(x-y){\rm d} y{\rm d} x&=\int_{-L}^{0} \phi_\yy(x)\int_{0}^{L}\widetilde P(x-y){\rm d} y{\rm d} x\\ &\geq \int_{-L/2}^{-L_0/2}\phi_\infty(x)\int_{-x}^{L-x}\widetilde P(y)dydx\\ &\geq c_0 \int_{-L/2}^{-L_0/2} \int_{-x}^{L-x}\widetilde P(y)dydx\\ &\geq c_0 \int_{L_0/2}^{L/2}(y-\frac{L_0}2)\widetilde P(y)dy \to\infty \mbox{ as } L\to\infty, \end{align*} where $c_0:=\inf_{x\leq -L_0/2} \phi_\infty(x)>0$ due to $\phi_\infty\geq \hat\phi $. Hence, \begin{align*} \liminf_{n\to \yy} c_n&=\mu \liminf_{n\to \yy}\int_{-\yy}^{0} \phi_n(x)\int_{0}^{\yy} P_n(x-y){\rm d} y{\rm d} x\\ &\geq \mu \lim_{n\to \yy}\int_{-L}^{0} \phi_n(x)\int_{0}^{L} P_n(x-y){\rm d} y{\rm d} x\to\infty \mbox{ as } L\to\infty, \end{align*} which implies $\lim_{n\to\yy} c_n=\yy$. \end{proof} In the rest of this section, we make use of Proposition \ref{prop4.1} to determine the spreading speed of \eqref{1.4} according to the behaviour of the kernel function $J$. \subsection{Infinite speed} \begin{theorem}\label{thm5.3} Suppose that {\rm {\bf (J)}}, {\rm {\bf (f)}} and \eqref{u_0} hold, and spreading happens to the unique positive solution $(u, h)$ of \eqref{1.4}. If {\rm \textbf{(J1)}} is not satisfied, then \begin{align}\label{4.1d} \lim_{t\to\yy} \frac{h(t)}{t}=\yy. \end{align} \end{theorem} To prove this theorem we will use the following lemma. \begin{lemma}\label{lemma3.8a} If in Theorem \ref{thm5.3} the kernel function $J$ has compact support $($and so {\rm {\bf (J1)}} is satisfied$)$, then \begin{align}\label{3.16d} \liminf_{t\to\yy}\frac{h(t)}{t}\geq c_0, \end{align} where $c_0>0$ is given by Proposition \ref{prop1.4}. \end{lemma} \begin{proof} Suppose the supporting set of $J$ is contained in $B_{K_*}$. Let $\{\epsilon_n\}_{n=1}^\yy$ be a sequence satisfying $0<\epsilon_n\to 0$ as $n\to\yy$. Define \begin{align*} J_n(l):=\max\{J_*(l)-\xi_n(l),0\}, \end{align*} where $\xi_n$ is given by \begin{equation*} \xi_n(l):=\begin{cases} \epsilon_n,& |l|\leq K_*,\\ \epsilon_n(K_*+1-|l|), & K_*\leq |l|\leq K_*+1,\\ =0,& |l|\geq K_*+1. \end{cases} \end{equation*} Clearly $J_n$ has compact support and $J_n\to J_*$ locally uniformly in ${\mathbb R}$ and in $L^1({\mathbb R})$. For fixed $\epsilon_n$, by Proposition \ref{coro2.5} and the definition of $\xi_n$, there is $L_n\gg K_*$ such that \begin{align}\label{3.17d} J_n(l-\rho)\leq \tilde J(l,\rho) \mbox{ for } \rho>0,\ l\geq L_n, \end{align} and \begin{align}\label{3.18d} \left(1-\frac{K_*}{L_n}\right)^{N-1}>1-\epsilon_n \end{align} By Proposition \ref{prop4.1}, for all large $n$, problem \eqref{semi1}-\eqref{semi2} with $P=J_n$ admits a solution $(c_n,\phi_n)$ satisfying \begin{align*} \displaystyle\phi_n(-\yy)=:u_n^*< u^*, \ \lim_{n\to\yy} c_n=c_0, \end{align*} where we have used $c_n\leq c_{n+1}\leq c_0$, which implies that $\{c_n\}$ is bounded. For fixed large $n$ define \begin{align*} &\underline h(t):=c_n(1-2\epsilon_n) t+2L_n, &&\ \ \ t\geq 0,\\ &\underline u(t,r):=(1-\epsilon_n) \phi_n(r-\bar h(t)), &&\ \ \ t\geq 0,\; L_n\leq r\leq \bar h(t). \end{align*} We show that there is $t_1>0$ such that \begin{equation}\label{3.20d} \begin{cases} \displaystyle \underline u_t(t,r)\leq d \int_{0}^{\underline h(t)} \tilde J(r,\rho) \underline u(t,\rho){\rm d} \rho-d\underline u(t,r)+f(\rho,\underline u), & t>0,\; r\in (L_n,\underline h(t)),\\[3mm] \displaystyle \underline h'(t)\leq \frac{\mu}{\underline h^{N-1}(t)}\displaystyle\int_{0}^{\underline h(t)} r^{N-1}\underline u(t,r)\int_{\underline h(t)}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r, & t>0,\\ \underline u(t,r)\leq u(t+t_1,r), \; \underline u(t,\underline h(t))=0, & t>0,\; r\in [0,L_n],\\ \underline u(0,r)\leq \ u(t_1,r),\ h(t_1)>\underline h(0), & r\in [0,\underline h(0)]. \end{cases} \end{equation} Since spreading happens, there is $t_1>0$ such that $h(t)\geq 3L_n$ for $t\geq t_1$, and \begin{align*} u(t,r)\geq u_n^*,\ \ \ \ (t,r)\in [t_1,\yy)\times [0,3L_n]. \end{align*} Hence, \begin{align*} \underline u(t,r)\leq (1-\epsilon_n) u_n^*\leq u_n^*\leq u(t+t_1,r) \ \mbox{ for }\ (t,r)\in [0,\yy)\times [0,L_n]. \end{align*} and \begin{align*} \underline u(0,r)\leq (1-\epsilon_n) u_n^*\leq u_n^*\leq u(t_1,r ) \mbox{ for }\ r\in [0,\underline h(0)]. \end{align*} It is clear that $\underline u(t,\underline h(t))=0$. Hence, the last two inequalities of \eqref{3.20d} are satisfied. Next, we check the first two inequalities of \eqref{3.20d}. Making use of \eqref{3.17d}, \eqref{3.18d} and $\tilde J(r,\rho)=0$ for $|r-\rho|\geq K_*$, we have \begin{align*} &\frac{\mu}{\underline h^{N-1}(t)}\displaystyle\int_{0}^{\underline h(t)} r^{N-1}\underline u(t,r)\int_{\underline h(t)}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r\\ =&\frac{\mu}{\underline h^{N-1}(t)}\displaystyle\int_{\underline h(t)-K_*}^{\underline h(t)} r^{N-1}(1-\epsilon_n) \phi(r-\underline h(t))\int_{\underline h(t)}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r\\ \geq &\frac{\mu}{\underline h^{N-1}(t)}\displaystyle\int_{\underline h(t)-K_*}^{\underline h(t)} r^{N-1}(1-\epsilon_n) \phi(r-\underline h(t))\int_{\underline h(t)}^{+\yy} J_n(r-\rho){\rm d} \rho{\rm d} r\\ = &\frac{\mu}{\underline h^{N-1}(t)}\displaystyle\int_{-K_*}^{0} (r+\underline h(t))^{N-1}(1-\epsilon_n) \phi(r)\int_{0}^{+\yy} J_n(r-\rho){\rm d} \rho{\rm d} r\\ \geq &\left(1-\frac{K_*}{\underline h(t)}\right)^{N-1}\mu\displaystyle\int_{-K_*}^{0} (1-\epsilon_n) \phi(r)\int_{0}^{+\yy} J_n(r-\rho){\rm d} \rho{\rm d} r\\ = &\left(1-\frac{K_*}{\underline h(t)}\right)^{N-1}\mu\displaystyle\int_{-\yy}^{0} (1-\epsilon_n) \phi(r)\int_{0}^{+\yy} J_n(r-\rho){\rm d} \rho{\rm d} r\\ =&(1-\epsilon_n)\left(1-\frac{K_*}{\underline h(t)}\right)^{N-1} c_n\geq (1-\epsilon_n)\left(1-\frac{K_*}{L_n}\right)^{N-1} c_n\\ \geq &(1-\epsilon_n)^2c_n\geq (1-2\epsilon_n)c_n=\underline h'(t). \end{align*} From the equation satisfied by $\phi$, \eqref{3.17d} and \begin{align*} J_n(r-\rho)=0 \ \mbox{ for } \ r\in [L_n,\underline h(t)],\; \rho\leq 0, \end{align*} we deduce for $t>0$ and $r\in [L_n,\underline h(t)]$, \begin{align*} \underline u_t(t,r)&=-(1-\epsilon_n)c_n(1-2\epsilon_n)\phi_n'(r-\underline h(t))\leq -(1-\epsilon_n)c_n\phi_n'(r-\underline h(t))\\ &= (1-\epsilon_n) \left[d \int_{- \yy}^{\underline h(t)} J_n (r-\rho) \phi_n(\rho-\underline h(t)){\rm d} \rho -d \phi_n(r-\underline h(t))+ f(\phi_n(r-\underline h(t)))\right]\\ &=d \int_{0}^{\underline h(t)} J_{n} (r-\rho) \underline u(t,\rho){\rm d} \rho -d \underline u(t,r)+(1-\epsilon_n) f(\phi_n(r-\underline h(t)))\\ &\leq d \int_{0}^{\underline h(t)} J_{n} (r-\rho) \underline u(t,\rho){\rm d} \rho -d \underline u(t,r)+ f(\underline u(t,r))\\ &\leq d \int_{0}^{\underline h(t)} \tilde J (r,\rho) \underline u(t,\rho){\rm d} \rho -d \underline u(t,r)+ f(\underline u(t,r)). \end{align*} Hence \eqref{3.20d} holds. By Lemma \ref{lemma4.4} (2) with $r_*(t)=L_n$, we obtain \begin{align*} & h(t+t_1)\geq \underline h(t) \ \ \ \ \ \ \ \ \mbox{ for } t\geq 0,\\ & u(t+t_1,r)\geq \underline u(t,r)\ \ \ \mbox{ for } t\geq 0,\ r\in [ 0,\underline h(t)]. \end{align*} Hence \begin{align*} \liminf_{t\to\yy} \frac{h(t)}{t}\geq \liminf_{t\to\yy} \frac{\underline h(t-t_1)}{t}=c_n(1-2\epsilon_n), \end{align*} which gives \eqref{3.16d} by letting $n\to\infty$. \end{proof} \begin{proof}[{\bf Proof of Theorem \ref{thm5.3}}] Define \begin{align*} J_n(r):=\zeta\big(\frac{r}{n}\big) J(r),\ \ n=1,2,\cdots, \end{align*} where \begin{align*} \zeta(\xi)= \begin{cases} 0,&|\xi|\geq 2,\\ 2-|\xi|,&1\leq|\xi|\leq 2,\\ 1,&|\xi|\leq 1. \end{cases} \end{align*} Clearly, $J_n$ has compact support, is nondecreasing in $n$, $J_n\leq J$ and \begin{align}\label{4.2d} \lim\limits_{n\rightarrow\infty}J_n|x|)=J(|x|)\ \text{\ locally uniformly in\ } {\mathbb R}^N. \end{align} Similarly to $\tilde J$ and $J_*$, we define \begin{align*} &\tilde J^n(r,\rho)=\int_{\partial B_\rho} J_n(|x-y|) {\rm d} y\ \ {\rm with }\ |x|=r,\\ &J^n_*(l):=\int_{{\mathbb R}^{N-1}} J_n(|(l,x')|)dx'. \end{align*} For large $n$ and some $T>0$ to be determined, let $( u_n,h_n)$ be the solution of \eqref{1.4} with $\tilde J$ replaced by $\tilde J^n$ and \begin{align*} h_n(0)=h(T),\ u_n(0,r)= u(T,r) \mbox{ for } r\in [0,h(t)]. \end{align*} Due to $\tilde J^n\leq \tilde J$ and the comparison principle in Lemma \ref{lemma3.4a} (2) with $r_*(t)\equiv 0$, we have \begin{align*} h_n(t)\leq h(t+T),\ u_n(t,r)\leq u(t+T,r) \ \mbox{ for }\ t\in [0,\yy),\; r\in [0,h_n(t)]. \end{align*} By Theorem \ref{th1.2}, spreading happens for $(u_n,h_n)$ if $h_n(0)$ is greater than a constant $L_n$ determined by $J_n$. Since spreading happens for \eqref{1.4}, there is a constant $t_n>0$ such that $h(t)>L_n$ for all $t\geq t_n$. Choosing $T=t_n$, we then have \begin{align*} \lim_{t\to\yy} h_n(t)=\yy. \end{align*} Since $J_n$ has compact support, by Lemma \ref{lemma3.8a} we have \begin{align}\label{5.14} \liminf_{t\to\yy} \frac{h_n(t)}{t}\geq c_n. \end{align} where $c_n$, associated with a function $\phi_n$, is the unique solution of \eqref{semi1}-\eqref{semi2} with $P=J^n_*$. By the monotonicity of $J_n$ and \eqref{4.2d}, we see that $J_n^*$ is nondecreasing in $n$ and \begin{align*} \lim_{n\to\yy} J^n_*(l)=J_*(l)\ \ {\rm locally\ uniformly\ for}\ l\in {\mathbb R}. \end{align*} Therefore, in view of the assumption that {\bf (J1)} is not satisfied, we can use Proposition \ref{prop4.1} to conclude that \begin{align}\label{4.3d} \lim_{n\to\yy} c_n=\yy. \end{align} Since \begin{align*} \liminf_{t\to\yy} \frac{h(t)}{t}\geq \liminf_{t\to\yy} \frac{h_n(t-t_n)}{t}\geq c_n, \end{align*} we see that \eqref{4.1d} follows from \eqref{4.3d}. \end{proof} \subsection{Finite speed} In this subsection, we prove the following result. \begin{theorem}\label{thm5.5} Suppose that {\rm {\bf (J)}}, {\rm {\bf (f)}} and \eqref{u_0} hold, and spreading happens to the unique positive solution $(u, h)$ of \eqref{1.4}. If {\rm \textbf{(J1)}} is satisfied, then \begin{align}\label{4.1d} \lim_{t\to\yy} \frac{h(t)}{t}=c_0, \end{align} where $c_0$ is given by Proposition \ref{prop1.4}. \end{theorem} \begin{proof} We first show that \begin{align}\label{geq-c_0} \liminf_{t\to\yy}\frac{h(t)}{t}\geq c_0. \end{align} Note that we can obtain \eqref{5.14} by repeating the argument in the proof of Theorem \ref{thm5.3}. Since {\bf (J1)} holds, now we have, by Proposition \ref{prop4.1}, $\lim_{n\to\infty} c_n=c_0$, and so \eqref{geq-c_0} follows by letting $n\to\infty$ in \eqref{5.14}. To prove \eqref{4.1d}, it remains to show \begin{align}\label{leq-c_0} \limsup_{t\to\yy}\frac{h(t)}{t}\leq c_0. \end{align} Let $\{\epsilon_n\}$ be a sequence with $0<\epsilon_n\ll 1$ and $\epsilon_n\to 0$ as $n\to\yy$, and let the function $J_{\epsilon_n}$ be given by \eqref{2.5d} with $\epsilon=\epsilon_n$. Define \begin{align*} J_n:=(1+\sqrt{\epsilon_n})J_{\epsilon_n}. \end{align*} From the definition of $J_{\epsilon_n}$, it is clear that $J_n\leq 3(1+\sqrt{\epsilon_n})J_*\leq 4J_*$, and so each $J_n$ satisfies \textbf{(J1)}. By Proposition \ref{prop4.1}, the problem \eqref{semi1}-\eqref{semi2} with $P=J_n$ admits a unique solution $(c_n,\phi_n)$. Since $J_n$ converges to $J$ and $J\leq J_n\leq 4J_*$, we could apply Proposition \ref{prop4.1} to conclude \begin{equation}\label{4.5d} \begin{cases} \displaystyle\phi_n(-\yy)=:u_n^*>u^*,\\ c_n\geq c_0,\ \ \lim_{n\to\yy} c_n=c_0. \end{cases} \end{equation} For fixed $n\geq 1$, define \begin{align*}\begin{cases} \bar g(t):=c_n(1+2\epsilon_n) t+K,\ \bar h(t):=(1+\epsilon_n/2)\bar g(t), & t\geq 0,\\ \overline u(t,r):=(1+\epsilon_n) \phi_n(r-\bar h(t)), & t\geq 0,\;0\leq r\leq \bar h(t), \end{cases} \end{align*} where $K>0$ is a large constant to be determined. For convenience, we extend $u(t,r)$ to $[0,\yy)\times [0,\yy)$ by defining $ u(t,r)=0$ for $t\in [0,\yy)$ and $r\in (h(t),\yy)$. Next we show that for large fixed $n$, there are $K:=K_n$ and $T:=T_n>0$ such that $(\bar u,\bar h)$ satisfies \begin{equation}\label{4.6d} \begin{cases} \displaystyle \bar u_t(t,r)\geq d \int_{0}^{2\bar h(t)/3} \tilde J(r,\rho) u(t,\rho){\rm d} \rho+d \int_{2\bar h(t)/3}^{\bar h(t)} \tilde J(r,\rho) \bar u(t,\rho){\rm d} \rho\\ \ \ \ \ \ \ \ \ \ \ \ \ \ -d\bar u(t,r) +f(\bar u), & t>0,\; r\in (\bar g(t),\bar h(t)),\\[3mm] \displaystyle \bar h'(t)\geq \frac{\mu}{\bar h^{N-1}(t)} \displaystyle\int_{0}^{\bar h(t)} r^{N-1}\bar u(t,r)\int_{\bar h(t)}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r, & t>0,\\ \bar u(t,r)\geq u(t+T,r), \; \bar u(t,\bar h(t))=0, & t\geq 0,\; r\in [0,\bar g(t)],\\ \bar u(0,r)\geq u(T,r),\ \bar h(0)\geq h(T), & r\in [0,h(T)]. \end{cases} \end{equation} Let us note that, since $\bar g(t)>2\bar h(t)/3$, if we define \[ \hat u(t,r):=\begin{cases} u(t+T, r), & t>0,\ r\in [0, \bar g(t)],\\ \bar u(t,r), & t>0,\ r\in (\bar g(t), \bar h(t)], \end{cases} \] then the third inequality in \eqref{4.6d} implies \[ d \int_{0}^{2\bar h(t)/3} \tilde J(r,\rho) u(t,\rho){\rm d} \rho+d \int_{2\bar h(t)/3}^{\bar h(t)} \tilde J(r,\rho) \bar u(t,\rho){\rm d} \rho\geq d \int_{0}^{\bar h(t)} \tilde J(r,\rho) \hat u(t,\rho){\rm d} \rho. \] Therefore, when \eqref{4.6d} holds, we can apply Lemma \ref{lemma3.4a} to conclude that \begin{align}\label{4.9d} h(t+T)\leq \bar h(t) \mbox{ for all } t>0, \end{align} which yields \begin{align*} \limsup_{t\to\yy} \frac{h(t)}{t}\leq \limsup_{t\to\yy} \frac{\bar h(t-T)}{t}=(1+\epsilon_n/2)c_n(1+2\epsilon_n), \end{align*} and \eqref{leq-c_0} then follows by letting $n\to\infty$. Therefore, to complete the proof of the theorem, it suffices to prove \eqref{4.6d}, which is carried out in the following three steps. \textbf{Step 1}. We check the last two inequalities of \eqref{4.6d}. Since $\phi(-\yy)=u_n^* $, there is $K_0>0$ such that for any $K\geq K_0$, \begin{align*} (1+\epsilon_n) \phi_n(-K)\geq u_n^*. \end{align*} Hence for $K\geq \frac{4K_0}{\epsilon_n}$, we have for $t\in [0,\yy)$ and $r\in [0,[\bar g(t)+\bar h(t)]/2]$, \begin{align}\label{4.7d} \overline u(t,r)&=(1+\epsilon_n) \phi_n(r-\bar h(t))\geq (1+\epsilon_n) \phi\left(\frac{\bar g(t)+\bar h(t)}{2}-\bar h(t)\right)\nonumber\\ &=(1+\epsilon_n) \phi_n\left(-\frac{\epsilon_n}{4}\bar g(t)\right)\geq (1+\epsilon_n) \phi_n\left(-\frac{\epsilon_n}{4}K\right)\geq (1+\epsilon_n) \phi(-K_0)\\ &\geq u_n^*.\nonumber \end{align} It is easily seen that \begin{align*} \limsup_{t\to\yy} \max_{r\in [0,h(t)]} u(t,r)\leq {u}^*<u_n^*. \end{align*} Since $h(t)\to\yy$ as $t\to\yy$ by assumption, there is a $T>0$ such that \begin{align*} u(t+T,r)\leq u_n^*\ \mbox{ for } t\geq 0,\; r\in [0,h(t)]. \end{align*} By further enlarging $K$, we may assume that $K>h(T)$ and hence, from \eqref{4.7d} we see \begin{align*} &\bar u(0,r)\geq u_n^*\geq u(T,r)\ \mbox{ for } \ r\in [0,h(T)]. \end{align*} Clearly, $\bar u(t,\bar h(t))=0$. Therefore, the last two inequalities of \eqref{4.6d} hold. \textbf{Step 2}. We verify the first inequality of \eqref{4.6d}. From the equation satisfied by $\phi_n$, we deduce for $t>0$ and $r\in (\bar g(t),\bar h(t))$, \begin{align*} \bar u_t(t,r)&=-(1+\epsilon_n)c_n(1+2\epsilon_n)\phi_n'(r-\bar h(t))\geq -(1+\epsilon_n)c_n\phi_n'(r-\bar h(t))\\ &= (1+\epsilon_n) \left[d \int_{- \yy}^{\bar h(t)} J_n (r-\rho) \phi_n(\rho-\bar h(t)){\rm d} \rho -d \phi_n(r-\bar h(t))+ f(\phi_n(r-\bar h(t)))\right]\\ &= d \int_{-\yy}^{\bar h(t)} J_{n} (r-\rho) \bar u(t,\rho){\rm d} \rho -d \bar u(t,r)+(1+\epsilon_n) f(\phi_n(r-\bar h(t)))\\ &\geq d \int_{-\yy}^{\bar h(t)} J_{n} (r-\rho) \bar u(t,\rho){\rm d} \rho -d \bar u(t,r)+ f(\bar u(t,r)). \end{align*} In order to get the first inequality of \eqref{4.6d}, it remains to prove for $t>0$ and $r\in (\bar g(t),\bar h(t))$, \begin{align}\label{4.8d} \int_{-\yy}^{\bar h(t)} J_n (r-\rho) \bar u(t,\rho){\rm d} \rho-\int_{0}^{2\bar h(t)/3} \tilde J (r,\rho) u(t,\rho){\rm d} \rho- \int_{2\bar h(t)/3}^{\bar h(t)} \tilde J (r,\rho) \bar u(t,\rho){\rm d} \rho\geq 0. \end{align} A direct computation gives \begin{align*} &\int_{-\yy}^{\bar h(t)} J_n (r-\rho) \bar u(t,\rho){\rm d} \rho- \int_{2\bar h(t)/3}^{\bar h(t)} \tilde J (r,\rho) \bar u(t,\rho){\rm d} \rho-\int_0^{2\bar h(t)/3} \tilde J (r,\rho) u(t,\rho){\rm d} \rho\\ =&\int_{-\yy}^{\bar h(t)} J_n (r-\rho) \bar u(t,\rho){\rm d} \rho- \int_{2\bar h(t)/3}^{\bar h(t)} [ \tilde J_+ (r,\rho)+\tilde J_- (r,\rho)] \bar u(t,\rho){\rm d} \rho -\int_0^{2\bar h(t)/3} \tilde J (r,\rho) \tilde u(t,\rho){\rm d} \rho\\ =&\ Q_1+Q_2, \end{align*} with \begin{align*} Q_1:&=\int_{2\bar h(t)/3}^{\bar h(t)} [J_n (r-\rho)-\tilde J_+ (r,\rho) ] \bar u(t,\rho){\rm d} \rho\\ Q_2:&=\int_{-\yy}^{2\bar h(t)/3} J_n (r-\rho) \bar u(t,\rho){\rm d} \rho- \int_{0}^{2\bar h(t)/3} \tilde J (r,\rho) u(t,\rho){\rm d} \rho-\int_{2\bar h(t)/3}^{\bar h(t)} \tilde J_-(r,\rho) \bar u(t,\rho){\rm d} \rho. \end{align*} where $\tilde J_+$ and $\tilde J_-$ are defined as in Lemma \ref{lemma2.2}. For $r\in (\bar g(t),\bar h(t))$ and $\rho \in (2\bar h(t)/3,\bar h(t))$ we have $r\geq \bar g(t)\geq K$ and \begin{align*} \frac{\rho}{r}<\frac{\bar h(t)}{\bar g(t)}=1+\epsilon_n/2, \ \ \frac{\rho}{r}\geq \frac{2\bar h(t)/3}{\bar h(t)}=\frac{2}{3}>\frac{1}{2}, \end{align*} which allows us to apply Lemma \ref{lemma2.4} to conclude that \begin{align*} J_n (r-\rho)-\tilde J_+ (r,\rho)\geq 0 \mbox{ for } r\in (g(t),h(t)),\; \rho \in (2\bar h(t)/3,\bar h(t)), \end{align*} provided that $K$ is sufficiently large, say $K\geq L_{\epsilon_n}$; and so $Q_1\geq 0$. We now examine $Q_2$. Using the facts that $\bar u(t,\rho)$ is decreasing in $\rho\leq \bar h(t)$ and \begin{align*} (1+\epsilon_n)u_n^*\geq \bar u(t,\rho)\geq \bar u(t,2\bar h(t)/3) \geq u_n^*\geq u(t,\rho) \ \mbox{ for } \ 0\leq \rho\leq \frac{2\bar h(t)}{3}, \end{align*} we obtain \begin{align*} Q_2&\geq u_n^*\left[\int_{-\yy}^{2\bar h(t)/3} J_n (r-\rho) {\rm d} \rho- \int_{0}^{2\bar h(t)/3} \tilde J (r,\rho) {\rm d} \rho-(1+\epsilon_n)\int_{2\bar h(t)/3}^{\bar h(t)} \tilde J_-(r,\rho) {\rm d} \rho\right]\\ &= u_n^*\left[\int_{-\yy}^{2\bar h(t)/3} (1+\epsilon_n)J_{\epsilon_n} (r-\rho) {\rm d} \rho- \int_{0}^{2\bar h(t)/3} \tilde J (r,\rho) {\rm d} \rho- (1+\epsilon_n)\int_{2\bar h(t)/3}^{\bar h(t)} \tilde J_-(r,\rho) {\rm d} \rho\right]. \end{align*} From the definition of $J_{\epsilon_n}$, we have \begin{align*} J_{\epsilon_n}(l)=3J(l) \ \mbox{ when } |l|\geq 1+\epsilon_n^{-1}. \end{align*} Without loss of generality we may assume that $L_{\epsilon_n}\geq 1+\epsilon_n^{-1}$. Choosing $K\geq 4 L_{\epsilon_n}$, then for all large $n$ we obtain \begin{align*} r-3\bar h(t)/2>\left(1-\frac{2(1+\epsilon_n)}{3}\right)\bar g(t)>\frac{1}{6}\bar g(t)\geq \frac{K}{4}\geq L_{\epsilon_n} \ \ \forall\ r\in (\bar g(t),\bar h(t)),\ t\geq 0, \end{align*} and so, for such $r$ and $t$, \begin{align*} Q_2&\geq u_n^*\left[\int_{-\yy}^{2\bar h(t)/3} \frac{1}{2}J_{\epsilon_n}(r-\rho) {\rm d} \rho- \int_{0}^{2\bar h(t)/3} \tilde J (r,\rho) {\rm d} \rho\right]\\ &\ \ \ \ \ \ +u_n^*(1+\epsilon_n)\left[\int_{-\yy}^{2\bar h(t)/3} \frac{1}{2}J_{\epsilon_n}(r-\rho) {\rm d} \rho-\int_{2\bar h(t)/3}^{\bar h(t)} \tilde J_-(r,\rho) {\rm d} \rho\right]\\ &= u_n^*\left[\int_{\Omega_1} \frac 32 J(|x_1^r-y|) {\rm d} y- \int_{\Omega_2} J(|x_1^r-y|) {\rm d} y \right] \\ &\ \ \ \ \ \ +u_n^*(1+\epsilon_n)\left[\int_{\Omega_1} \frac 32J(|x_1^r-y|) {\rm d} y- \int_{\Omega_3} J(|x_1^r-y|) {\rm d} y \right] \end{align*} where $x_1^r:=(r,0,\cdots,0)$ and \begin{align*} &\Omega_1:=\{z=(z_1,z_2,\cdots,z_N):z_1<{2\bar h(t)}/{3}\},\ \Omega_2:=\{z: |z|<{2\bar h(t)}/{3}\},\\ &\Omega_3:=\{z=(z_1,z_2,\cdots,z_N): {2\bar h(t)}/{3}< |z|<\bar h(t),\ z_1<0\}. \end{align*} Clearly, $\Omega_2\subset \Omega_1$ and $\Omega_3\subset \Omega_1$. Hence $Q_2\geq 0$. Therefore, \eqref{4.8d} holds. \textbf{Step 3}. We verify the second inequality of \eqref{4.6d}. By Lemmas \ref{lemma2.6d} and \ref{lemma2.7d}, we have for fixed large $n$ and all large $K>0$, \begin{align*} &\frac{\mu}{\bar h^{N-1}(t)}\displaystyle\int_{0}^{\bar h(t)} r^{N-1}\bar u(t,r)\int_{\bar h(t)}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r\\ \leq &\ \mu\displaystyle\int_{0}^{\bar h(t)} \bar u(t,r)\int_{\bar h(t)}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r\\ = &\ \mu \int_{(1-\epsilon_n/4)\bar h(t)}^{\bar h(t) }\bar u(t,r) \int_{\bar h(t)}^{(1+\epsilon_n/8)\bar h(t)} \tilde J_+(r,\rho) {\rm d} \rho {\rm d} r+o_K(1), \end{align*} where $o_K(1)\to 0$ as $K\to\infty$. This, together with Lemma \ref{lemma2.4}, gives \begin{align*} & \frac{\mu}{\bar h^{N-1}(t)}\displaystyle\int_{0}^{\bar h(t)} r^{N-1}\bar u(t,r)\int_{\bar h(t)}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r\\ \leq &\ \mu \int_{(1-\epsilon_n/4)\bar h(t)}^{\bar h(t)} \bar u(t,r)\int_{\bar h(t)}^{(1+\epsilon_n/8)\bar h(t)} (1+\sqrt{\epsilon_n})J_{\epsilon_n}(r-\rho) {\rm d} \rho {\rm d} r+o_K(1)\\ =&\ \mu (1+\epsilon_n) \int_{(1-\epsilon_n/4)\bar h(t)}^{\bar h(t)} \phi_n(r-\bar h(t))\int_{\bar h(t)}^{(1+\epsilon/8)\bar h(t)} J_n(r-\rho) {\rm d} \rho {\rm d} r+o_K(1)\\ =&\ \mu (1+\epsilon_n) \int_{-\epsilon_n \bar h(t)/4}^{0} \phi_n(r)\int_{0}^{\epsilon_n\bar h(t)/8} J_n(r-\rho) {\rm d} \rho {\rm d} r+o_K(1)\\ \leq &\ \mu (1+\epsilon_n) \int_{-\yy}^{0} \phi_n(r)\int_{0}^{\yy} J_n(r-\rho) {\rm d} \rho {\rm d} r+o_K(1)\\ =&\ c_n(1+\epsilon_n)+o_K(1)\leq c_n(1+2\epsilon_n)= \bar h'(t), \end{align*} provided that $K$ is sufficiently large. This proves the second inequality of \eqref{4.6d}. \end{proof} Clearly Theorem \ref{th1.6} follows directly from Theorems \ref{thm5.3} and \ref{thm5.5}. \section{Logarithmic shift} In this section, we prove Theorem \ref{th1.7}. So throughout this section, we assume that the kernel function $J$ satisfies {\bf (J)} and has compact support contained in the ball $B_{K_*}$, the function $f$ satisfies {\bf (f)} and is $C^2$, the initial function satisfies \eqref{u_0}, and spreading happens for the unique positive solution $(u,h)$ of \eqref{1.4}. Hence by Theorem \ref{th1.6} we have $h(t)/t\to c_0$ as $t\to\infty$. We are going to show that $c_0t-h(t)\approx \ln t$ as $t\to\infty$. \subsection{Upper bound of $h(t)-c_0t$} \begin{lemma}\label{lemma3.10} There exists $C>0$ such that \begin{align}\label{3.20} h(t)-c_0t\leq -C\ln t \mbox{ for } t\gg 1, \end{align} where $c_0>0$ is given by Proposition \ref{prop1.4}. \end{lemma} \begin{proof} Let $(c_0,\phi_0)$ be the solution of the semi-wave problem given in Proposition \ref{prop1.4}. We define \begin{align*}\begin{cases} \bar h(t):=c_0 t+\delta(t), & t\geq 0,\\ \bar u(t,r):=(1+\epsilon(t)) \phi_0(r-\bar h(t)), & t\geq 0,\ 0\leq r\leq \bar h(t), \end{cases} \end{align*} with \begin{align*} \epsilon(t):=K_1(t+\theta)^{-1}, \ \ \ \delta(t) :=c_0\theta -K_2[\ln (t+\theta)-\ln \theta] \end{align*} for some positive constants $\theta$, $K_1$ and $K_2\in (0,1)$ to be determined. Clearly, for large $\theta>0$, \begin{align}\label{3.21} c_0(t+\theta) \geq \bar h(t)\geq \frac{c_0}{2}(t+\theta) \ \mbox{ for all } \ t\geq 0. \end{align} Next we choose suitable $\theta$, $K_1$, $K_2$ and $t_0>0$ such that $(\bar u,\bar h)$ satisfies \begin{equation}\label{3.22} \begin{cases} \displaystyle \bar u_t(t,r)\geq d \int_{0}^{\bar h(t)} \tilde J(r,\rho) \bar u(t,\rho){\rm d} \rho-d\bar u(t,r)+f(\bar u(t,r)), & t>0,\; r\in (\bar h(t)/2,\bar h(t)),\\[3mm] \displaystyle \bar h'(t)\geq \frac{\mu}{\bar h^{N-1}(t)}\displaystyle\int_{0}^{\bar h(t)} r^{N-1}\bar u(t,r)\int_{\bar h(t)}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r, & t>0,\\ \bar u(t,r)\geq u(t+t_0,r), \; \bar u(t,\bar h(t))=0, & t>0,\; r\in [0,\bar h(t)/2],\\ \bar u(0,r)\geq u(t_0,r),\ h(t_0)\leq \bar h(0), & r\in [0,h(t_0)]. \end{cases} \end{equation} If \eqref{3.22} is proved, then we can use Lemma \ref{lemma3.4a} to obtain \begin{align*}\begin{cases} h(t+t_0)\leq \bar h(t) & \mbox{ for } t\geq 0,\\ u(t+t_0,r)\leq \overline u(t,r)& \mbox{ for } t\geq 0,\ r\in [ 0,h(t+t_0)], \end{cases} \end{align*} which implies \eqref{3.20}. Therefore to prove the lemma, it suffices to show \eqref{3.22}. For clarity we break the proof of \eqref{3.22} into several steps. {\bf Step 1}. We choose $t_0=t_0(\theta)$ and $K_2$ such that the last two inequalities of \eqref{3.22} hold. For the ODE problem \begin{align*} v'=f(v),\ \ \ v(0)=u^*+\epsilon_1 \end{align*} with small $\epsilon_1>0$, from $f'(u^*)<0$, we see that \begin{align*} u^*<v(t)\leq u^*+\epsilon_1e^{\widetilde F t} \mbox{ for all } t\geq 0, \end{align*} with $\widetilde F=\max_{u\in [u^*,u^*+\epsilon_1]}f'(u)<0$. A simple comparison argument shows that there is $t_*>0$ such that $ u(t,r)\leq u^*+\epsilon_1$ for $t\geq t_*$ and $r\in [0, h(t)]$. Using comparison again we obtain \begin{align*} u(t+t_*,r)\leq v(t)\leq u^*+\epsilon_1e^{\widetilde F t}\ \mbox{ for all } t\geq 0,\ r\in [0, h(t)]. \end{align*} On the other hand, by \cite[Theorem 1.7 (iii)]{dn-speed}, there is $\beta>0$ and $C_1>0$ such that \begin{align*} u^*-\phi_0(r)<C_1e^{\beta \, r} \mbox{ for } r<0, \end{align*} and hence, by \eqref{3.21}, for $t\geq 0$ and $r\in [0,(\bar h(t)/2]$, \begin{align*} \bar u(t,r)& =(1+\epsilon(t)) \phi_0(r-\bar h(t))\geq (1+\epsilon(t)) \phi_0(-\bar h(t)/2)\\ &\geq (1+K_1 (t+\theta)^{-1})(u^*-C_1e^{ -\beta\bar h(t)/2})\\ &\geq (1+K_1 (t+\theta)^{-1})u^*-2C_1e^{ -\beta\bar h(t)/2}\\ &\geq(1+K_1 (t+\theta)^{-1})u^*-2C_1e^{ -\beta c_0(t+\theta)/4}\\ &\geq u^*+\epsilon_1 e^{\widetilde F (t+t_0-t_*)} \geq \tilde u(t+t_0,r) \end{align*} provided \begin{align}\label{3.23} 2C_1e^{ -\beta c_0(t+\theta)/4}+\epsilon_1e^{\widetilde F (t+t_0-t_*)}\leq K_1 (t+\theta)^{-1}u^* \mbox{ for all } t\geq 0, \end{align} which holds true when $\theta$ and $t_0$ are sufficiently large. We may at the same time also require \begin{align}\label{3.24} h(t_0)\leq \bar h(0)/2=c_0\theta/2. \end{align} So in particular we have \begin{align*} \bar u(0,r)\geq u(t_0,r) \mbox{ for } r \in [0,h(t_0)]. \end{align*} To be more precise, by Theorem \ref{th1.6}, there is $C_2>0$ such that $h(t)\leq 2c_0 t+C_2$ for all $t\geq 0$. Then \eqref{3.23} and \eqref{3.24} hold if \begin{align} t_0=\frac{c_0\theta-2C_2}{4c_0} \end{align} and $\theta$ is sufficient large. {\bf Step 2}. We check the second inequality of \eqref{3.22}. Using Lemma \ref{lemma2.2} and \eqref{1.10}, for $r+\rho> K_*$, we have \begin{equation}\label{3.26} \begin{cases} \displaystyle\tilde J(r,\rho)\leq \left(\frac{\rho}{r}\right)^{(N-1)/2}J_*(r-\rho),& N\geq 3,\\ \displaystyle \tilde J(r,\rho)\leq \left(\frac{\rho}{r}\right)^{1/2}\left[\frac{(\rho+r)^2-K_*^2}{4r\rho }\right]^{-1/2}J_*(r-\rho),& N=2. \end{cases} \end{equation} Using \eqref{3.26}, we deduce for $N\geq 3$, \begin{align*} &\frac{\mu}{\bar h^{N-1}(t)}\displaystyle\int_{0}^{\bar h(t)} r^{N-1}\bar u(t,r)\int_{\bar h(t)}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r\\ &=\frac{\mu}{\bar h^{N-1}(t)}\displaystyle\int_{0}^{\bar h(t)} (1+\epsilon(t)) r^{N-1}\phi_0(r-\bar h(t))\int_{\bar h}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r\\ &\leq \frac{\mu (1+\epsilon(t))}{\bar h^{N-1}(t)}\displaystyle\int_{0}^{\bar h(t)} r^{(N-1)/2}\phi_0(r-\bar h(t))\int_{\bar h(t)}^{+\yy} \rho^{(N-1)/2} J_*(r-\rho){\rm d} \rho{\rm d} r\\ &=\frac{\mu(1+\epsilon(t))}{\bar h^{N-1}(t)}\displaystyle\int_{-\bar h(t)}^{0} (r+\bar h(t))^{(N-1)/2}\phi_0(r)\int_{0}^{+\yy} (\rho+\bar h(t))^{(N-1)/2} J_*(r-\rho){\rm d} \rho{\rm d} r\\ &=\mu(1+\epsilon(t))\displaystyle\int_{-\bar h(t)}^{0} \int_{0}^{+\yy} \phi_0(r) J_*(r-\rho){\rm d} \rho{\rm d} r\\ &\ \ \ \ \ \ +\mu(1+\epsilon(t))\displaystyle\int_{-\bar h(t)}^{0} \int_{0}^{+\yy} \left[\Big(1+\frac r{\bar h(t)}\Big)^{(N-1)/2}\Big(1+\frac{\rho}{\bar h(t)}\Big)^{(N-1)/2}-1\right]\phi_0(r) J_*(r-\rho){\rm d} \rho{\rm d} r\\ &=:\mu(1+\epsilon(t))\left[\displaystyle\int_{-\bar h(t)}^{0}\int_{0}^{+\yy} \phi_0(r)J_*(r-\rho){\rm d} \rho{\rm d} r+A(N)\right]\\ &\leq (1+\epsilon(t))[c_0+\mu A(N)]. \end{align*} For $N=2$, we similarly obtain \begin{align*} &\frac{\mu}{\bar h^{N-1}(t)}\displaystyle\int_{0}^{\bar h(t)} l^{N-1}\bar u(t,r)\int_{\bar h(t)}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r\\ \leq&\ (1+\epsilon(t))\left[c_0+ \mu A(2)\right], \end{align*} with \begin{align*} A(2):=\!\!\displaystyle\int_{-\bar h(t)}^{0} \int_{0}^{+\yy}\!\! \left(\Big[1+\frac r{\bar h(t)}\Big]^{\frac 12}\Big[1+\frac \rho{\bar h(t)}\Big]^{\frac 12}\left[\frac{(\rho+r+2\bar h(t))^2-K_*^2}{4(r+\bar h(t))(\rho+\bar h(t)) }\right]^{-\frac 12}\!\!\!-\!1\!\right)\phi_0(r) J_*(r-\rho){\rm d} \rho{\rm d} r. \end{align*} {\bf Claim 1}. There exist constants $C_{i,j}\geq 0$, with $C_{0,1}=C_{1,0}>0$, such that for $x, y\in {\mathbb R}$ close to 0, \begin{align}\label{3.27} (1+x)^{(N-1)/2}(1+y)^{(N-1)/2}-1\leq \sum_{1\leq i+j\leq N-1}C_{i,j}x^iy^j. \end{align} If $N\geq 2$ is an odd integer, \eqref{3.27} follows by expanding the product in its left side. When $N\geq 2$ is an even integer, for $x\in {\mathbb R}$ and $y\in {\mathbb R}$ close to 0, we have \begin{align*} (1+x)^{(N-1)/2}(1+y)^{(N-1)/2}-1 &=(1+x)^{(N-2)/2}(1+y)^{(N-2)/2}(1+x)^{1/2}(1+y)^{1/2}-1\\ &\leq(1+x)^{(N-2)/2}(1+y)^{(N-2)/2}(1+x/2)(1+y/2) -1, \end{align*} since \[ (1+x)^{1/2}=1+\frac 12 x-\frac 18 (1+\xi)^{-3/2}x^2\leq 1+\frac 12 x \] for some $\xi$ satisfying $|\xi|\leq |x|$. Then \eqref{3.27} is obtained by expanding the last term of the earlier inequality. {\bf Claim 2}. For integer $N\geq 2$, there are constants $C_4$ and $C_5$ depending on $N$ such that \begin{align*} A(N)\leq \frac{C_4}{\bar h^{2}(t)}+\frac{C_5B}{\bar h(t)} \mbox{ for all large $\theta$ and $t\geq 0$}, \end{align*} where \begin{align*} B:=\displaystyle\int_{-K_*}^{0}\int_{0}^{K_*} (r+\rho) \phi_0(r) J_*(r-\rho){\rm d} \rho{\rm d} r. \end{align*} By our assumption, the supporting set of $J_*$ in contained in $ [-K_*,K_*]$, and so for $N\geq 3$ and large $\bar h(t)$, by \eqref{3.27} we have \begin{align*} A(N)\leq &\displaystyle\sum_{1\leq i+j\leq N-1}C_{i,j}\int_{-\bar h(t)}^{0} \frac{ r^{i}\rho^{j}}{\bar h^{i+j}(t)}\phi_0(r)\int_{0}^{+\yy} J_*(r-\rho){\rm d} \rho{\rm d} r\\ =&\displaystyle\sum_{1\leq i+j\leq N-1}C_{i,j}\int_{-K_*}^{0}\int_{0}^{K_*} \frac{ r^{i}\rho^{j}}{\bar h^{i+j}(t)}\phi_0(r) J_*(r-\rho){\rm d} \rho{\rm d} r\\ =&\displaystyle\sum_{2\leq i+j\leq N-1}C_{i,j}\int_{-K_*}^{0}\int_{0}^{K_*}\frac{ r^{i}\rho^{j}}{\bar h^{i+j}(t)}\phi_0(r)J_*(r-\rho){\rm d} \rho{\rm d} r\\ &+C_{0,1}\int_{-K_*}^{0}\int_{0}^{K_*} \frac{ r+\rho}{\bar h(t)}\phi_0(r)\int_{0}^{+\yy} J_*(r-\rho){\rm d} \rho{\rm d} r\\ \leq&\sum_{2\leq i+j\leq N-1}C_{i,j}\frac{K_*^{i+j+2}\|J_*\|_{L^\yy}u^*}{\bar h^{2}(t)}+C_{0,1}\displaystyle\int_{-K_*}^{0}\int_{0}^{K_*} \frac{(r+\rho) }{\bar h(t)}\phi_0(r) J_*(r-\rho){\rm d} \rho{\rm d} r\\ =:&\frac{C_4}{\bar h^{2}(t)}+\frac{C_5B}{\bar h(t)}. \end{align*} Next we consider $A(2)$. Clearly, for small $x\geq 0$, there is $\xi\in [0,x]$ such that \begin{align}\label{3.28} (1-x)^{-1/2}=1+\frac{1}{2} (1-\xi)^{-3/2}x \leq 1+\frac{1}{2} (1-1/2)^{-3/2}x= 1+\sqrt{2} x. \end{align} Using this and \eqref{3.27} we obtain, for large $\bar h(t)$, \begin{align*} A(2)=&\int_{-K_*}^{0}\int_{0}^{K_*} \left(\Big[1+\frac r{\bar h(t)}\Big]^{\frac 12}\Big[1+\frac \rho{\bar h(t)}\Big]^{\frac 12} \left[\frac{(\rho+r+2\bar h)^2-K_*^2}{4(r+\bar h)(\rho+\bar h) }\right]^{-1/2}-1\right)\phi_0(r)J_*(r-\rho){\rm d} \rho{\rm d} r\\ \leq&\displaystyle\int_{-K_*}^{0}\int_{0}^{K_*} \left(\Big[1+\frac r{\bar h(t)}\Big]^{\frac 12}\Big[1+\frac \rho{\bar h(t)}\Big]^{\frac 12}\left[1-\frac{K_*^2}{4(r+\bar h(t))(\rho+\bar h(t)) }\right]^{-1/2}-1\right) \phi_0(r) J_*(r-\rho){\rm d} \rho{\rm d} r\\ \leq&\displaystyle\int_{-K_*}^{0}\int_{0}^{K_*} \left(\Big[1+\frac r{2\bar h(t)}\Big]\Big[1+\frac \rho{2\bar h(t)}\Big] \left[1+\frac{\sqrt{2}K_*^2}{4(r+\bar h(t))(\rho+\bar h(t)) }\right]-1\right)\phi_0(r) J_*(r-\rho){\rm d} \rho{\rm d} r\\ =&\displaystyle\int_{-K_*}^{0}\int_{0}^{K_*} \left(\frac{r+\rho}{2\bar h(t)}+\frac{r\rho}{4\bar h^2(t)}\right)\phi_0(r)) J_*(r-\rho){\rm d} \rho{\rm d} r\\ &+\displaystyle\int_{-K_*}^{0}\int_{0}^{K_*} \Big[1+\frac r{2\bar h(t)}\Big]\Big[1+\frac\rho{2\bar h(t)}\Big]\frac{\sqrt{2}K_*^2}{4(r+\bar h(t))(\rho+\bar h(t)) }\phi_0(r) J_*(r-\rho){\rm d} \rho{\rm d} r\\ \leq&\ \frac{B}{2\bar h(t)}+\frac{K_*^{4}\|J_*\|_{L^\yy}u^*}{4\bar h^{2}(t)}+\displaystyle\int_{-K_*}^{0}\int_{0}^{K_*} \frac{\sqrt{2}K_*^2}{2(r+\bar h(t))(\rho+\bar h(t)) }\phi_0(r) J_*(r-\rho){\rm d} \rho{\rm d} r\\ \leq&\ \frac{B}{2\bar h(t)}+\frac{K_*^{4}\|J_*\|_{L^\yy}u^*}{4\bar h^{2}(t)}+\frac{\sqrt{2}K_*^{4}\|J_*\|_{L^\yy}u^*}{\bar h^{2}(t)}\\ =&\ \frac{(1+4\sqrt{2})K_*^{4}\|J_*\|_{L^\yy}u^*}{4\bar h^{2}(t)}+\frac{B}{2\bar h(t)}=:\frac{C_4}{\bar h^{2}(t)}+\frac{C_5B}{\bar h(t)}. \end{align*} Thus Claim 2 is proved. {\bf Claim 3}. $B<0$. Since $J_*$ is even, we have \begin{align*} B&=\displaystyle\int_{-K_*}^{0}\int_{0}^{K_*} (r+\rho) \phi_0(r) J_*(r-\rho){\rm d} \rho{\rm d} r\\ &=\int_0^{K_*}\int_0^{K_*}(\rho-r)\phi_0(-r)J_*(\rho+r)d\rho dr\\ &=\int_0^{K_*}\int_0^{r}(\rho-r)\phi_0(-r)J_*(\rho+r)d\rho dr+\int_0^{K_*}\int_r^{K_*}(\rho-r)\phi_0(-r)J_*(\rho+r)d\rho dr\\ &=\int_0^{K_*}\int_\rho^{K_*}(\rho-r)\phi_0(-r)J_*(\rho+r)dr d\rho +\int_0^{K_*}\int_r^{K_*}(\rho-r)\phi_0(-r)J_*(\rho+r)d\rho dr\\ &=\int_0^{K_*}\int_r^{K_*}(\rho-r)[\phi_0(-r)-\phi_0(-\rho)]J_*(\rho+r)d\rho dr<0, \end{align*} since $r\to\phi_0(-r)$ is strictly increasing. Claim 3 is thus proved. In view of $\bar h(t)\geq c_0\theta$, from Claims 2 and 3 we obtain \[ A(N)\leq \frac{ C_5 B}{2\bar h(t)} \mbox{ for all large $\theta$.} \] It follows that \begin{align*} \frac{\mu}{\bar h^{N-1}(t)}\displaystyle\int_{0}^{\bar h(t)} r^{N-1}\bar u(t,r)\int_{\bar h(t)}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r \leq(1+\epsilon(t))c_0+\frac{\mu C_5 B}{2\bar h(t)} \end{align*} provided that $\theta$ is chosen large enough. Then from $\bar h(t)\leq c_0(t+\theta)$, we obtain \begin{align*} &\frac{\mu}{\bar h^{N-1}(t)}\displaystyle\int_{0}^{\bar h(t)} r^{N-1}\bar u(t,r)\int_{\bar h(t)}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r \leq c_0+\frac{K_1c_0}{t+\theta}+\frac{\mu C_5 B}{2c_0(t+\theta)}\\ \leq&c_0-K_2(t+\theta)^{-1}=\bar h'(t) \end{align*} if $K_1$ and $K_2$ are small such that \begin{align*} K_1c_0+K_2\leq \frac{-\mu C_5 B}{2c_0}. \end{align*} {\bf Step 3}. We verify the first inequality of \eqref{3.22}, namely, for $t>0$ and $r\in (\overline h(t)/2,\overline h(t))$, \begin{align}\label{3.30} \bar u_t(t,r)\geq d \int_{0}^{\bar h(t)} \tilde J(r,\rho) \bar u(t,\rho){\rm d} \rho -d\bar u(t,x)+f(\bar u(t,r)). \end{align} We start with a claim. {\bf Claim 4.} There exist positive constants $C_6$ and $C_7$ such that for all large $\theta$ and $r\in (\bar h(t)/2,\bar h(t))$, $t>0$, \begin{equation}\begin{aligned}\label{3.31} \int_{0}^{\bar h(t)} \tilde J(r,\rho) \phi_0(\rho-\bar h(t)){\rm d} \rho\leq &\ \int_{0}^{\bar h(t)} J_*(r-\rho) \phi_0(\rho-\bar h(t)){\rm d} \rho \\ & + \frac{C_6}{r}\int_{-K_*}^{K_*} \rho J_*(\rho) \phi_0(\rho+r-\bar h(t)){\rm d} \rho+\frac{C_7}{r^2 }. \end{aligned} \end{equation} We prove \eqref{3.31} for the cases $N\geq 3$ and $N=2$ separately. Note that $r\geq \bar h(t)/2\geq c_0\theta/2$ is large for all large $\theta$. For $N\geq 3$, $r\in (\underline h(t)/2,\underline h(t))$ and $t>0$, by \eqref{3.26}, when $\theta$ is chosen sufficiently large, \begin{align*} &\int_{0}^{\bar h(t)} \tilde J(r,\rho) \phi_0(\rho-\bar h(t)){\rm d} \rho\leq \int_{0}^{\bar h(t)} \left(\frac{\rho}{r}\right)^{(N-1)/2} J_*(r-\rho) \phi_0(\rho-\bar h(t)){\rm d} \rho\\ =&\int_{0}^{\bar h(t)} J_*(r-\rho) \phi_0(\rho-\bar h(t)){\rm d} \rho+\int_{0}^{\bar h(t)} \left[\left(\frac{\rho}{r}\right)^{(N-1)/2}-1\right] J_*(r-\rho) \phi_0(\rho-\bar h(t)){\rm d} \rho\\ =&\int_{0}^{\bar h(t)} J_*(r-\rho) \phi_0(\rho-\bar h(t)){\rm d} \rho+\int_{-r}^{\bar h(t)-r} \left[\left(1+\frac{\rho}{r}\right)^{(N-1)/2}-1\right]J_*(\rho) \phi_0(\rho+r-\bar h(t)){\rm d} \rho\\ =&\int_{0}^{\bar h(t)} J_*(r-\rho) \phi_0(\rho-\bar h(t)){\rm d} \rho+\int_{-K_*}^{\min\{K_*,\bar h(t)-r\}} \left[\left(1+\frac{\rho}{r}\right)^{(N-1)/2}-1\right] J_*(\rho) \phi_0(\rho+r-\bar h(t)){\rm d} \rho\\ =&\int_{0}^{\bar h(t)} J_*(r-\rho) \phi_0(\rho-\bar h(t)){\rm d} \rho+\int_{-K_*}^{K_*} \left[\left(1+\frac{\rho}{r}\right)^{(N-1)/2}-1\right] J_*(\rho) \phi_0(\rho+r-\bar h(t)){\rm d} \rho, \end{align*} where we have assumed that $\phi$ is extended by $\phi(r)\equiv 0$ for $r>0$. By elementary calculus, there exist positive constants $D_1$ and $D_2$, depending on $N$, such that for all $x\in {\mathbb R}$ close to 0, \begin{align*} \left(1+x\right)^{(N-1)/2}-1\leq D_1 x+D_2 x^2. \end{align*} Hence, for all large $\theta$ we have \begin{align*} &\int_{-K_*}^{K_*} \left[\left(1+\frac{\rho}{r}\right)^{(N-1)/2}-1\right] J_*(\rho) \phi_0(\rho+r-\bar h(t)){\rm d} \rho\\ \leq& \ \frac{D_1}{r} \int_{-K_*}^{K_*} \rho J_*(\rho) \phi_0(\rho+r-\bar h(t)){\rm d} \rho+\frac{2D_2K_*^3\|J_*\|_{L^\yy}u^*}{r^2}. \end{align*} Therefore \eqref{3.31} holds when $N\geq 3$. When $N=2$, from \eqref{3.26}, we have for $r\in (\bar h(t)/2,\bar h(t))$, $t>0$ and large $\theta$, \begin{align*} &\int_{0}^{\bar h(t)} \tilde J(r,\rho) \phi_0(\rho-\bar h(t)){\rm d} \rho\leq \int_{0}^{\bar h(t)}\left(\frac{\rho}{r}\right)^{1/2}\left[\frac{(\rho+r)^2-K_*^2}{4r\rho }\right]^{-1/2} J_*(r-\rho) \phi_0(\rho-\bar h(t)){\rm d} \rho\\ =& \int_{\bar h(t)/2-K_*}^{\bar h(t)}\left(\frac{\rho}{r}\right)^{1/2}\left[\frac{(\rho+r)^2-K_*^2}{4r\rho }\right]^{-1/2} J_*(r-\rho) \phi_0(\rho-\bar h(t)){\rm d} \rho\\ \leq& \int_{\bar h(t)/2-K_*}^{\bar h(t)}\left(\frac{\rho}{r}\right)^{1/2}\left(1-\frac{K_*^2}{4r\rho }\right)^{-1/2} J_*(r-\rho) \phi_0(\rho-\bar h(t)){\rm d} \rho\\ =&\int_{0}^{\bar h(t)}J_*(r-\rho) \phi_0(\rho-\bar h(t)){\rm d} \rho+\int_{0}^{\bar h(t)}\left[\left(\frac{\rho}{r}\right)^{1/2}\left(1-\frac{K_*^2}{4r\rho }\right)^{-1/2}-1\right]J_*(r-\rho) \phi_0(\rho-\bar h(t)){\rm d} \rho\\ =&\int_{0}^{\bar h(t)}J_*(r-\rho) \phi_0(\rho-\bar h(t)){\rm d} \rho\\ &+\int_{-K_*}^{K_*} \left[\left(1+\frac{\rho}{r}\right)^{1/2}\left(1-\frac{K_*^2}{4r(\rho+r) }\right)^{-1/2}-1\right] J_*(\rho) \phi_0(\rho+r-\bar h(t)){\rm d} \rho. \end{align*} Thus, by \eqref{3.28}, for $r\in (\underline h(t)/2,\underline h(t))$, $t>0$ and large $\theta$, \begin{align*} &\int_{-K_*}^{K_*} \left[\left(1+\frac{\rho}{r}\right)^{1/2}\left(1-\frac{K_*^2}{4r(\rho+r) }\right)^{-1/2}-1\right] J_*(\rho) \phi_0(\rho+r-\bar h(t)){\rm d} \rho\\ \leq& \int_{-K_*}^{K_*} \left[\left(1+\frac{\rho}{2r}\right)\left(1+\frac{\sqrt{2}K_*^2}{4r(\rho+r) }\right)-1\right] J_*(\rho) \phi_0(\rho+r-\bar h(t)){\rm d} \rho\\ \leq&\int_{-K_*}^{K_*} \left[\left(1+\frac{\rho}{2r}\right)\left(1+\frac{\sqrt{2}K_*^2}{2r^2 }\right)-1\right] J_*(\rho) \phi_0(\rho+r-\bar h(t)){\rm d} \rho\\ =&\int_{-K_*}^{K_*} \left[\frac\rho {2r}+\frac{\sqrt{2}K_*^2}{2r^2 }\left(1+\frac{\rho}{2r}\right)\right] J_*(\rho) \phi_0(\rho+r-\bar h(t)){\rm d} \rho\\ \leq &\ \frac{1}{2r}\int_{-K_*}^{K_*} \rho J_*(\rho) \phi_0(\rho+r-\bar h(t)){\rm d} \rho+\frac{2\sqrt{2}K_*^3\|J_*\|_{L^\yy}u^*}{r^2 }, \end{align*} which gives \eqref{3.31} for $N=2$. Claim 4 is thus proved. With the above estimates, we are ready to prove \eqref{3.30}. By the definition of $\bar u$ and \eqref{3.31}, we have \begin{align*} \bar u_t(t,r)=&-(1+\epsilon(t))[c_0+\delta'(t)]\phi_0'(r-\bar h(t))+\epsilon'(t)\phi_0(r-\underline h(t)), \end{align*} and for $t>0$, $r\in (\bar h(t)/2,\bar h(t))$ and large $\theta$, \begin{align*} & -(1+\epsilon(t))c_0\phi'(r-\bar h(t))\\ = & (1+\epsilon(t)) \left[d \int_{-\yy}^{\bar h(t)} J_*(r-\rho) \phi_0(\rho-\bar h(t)){\rm d} \rho-d\phi(r-\bar h(t))+f(\phi_0(r-\bar h(t)))\right]\\ \geq & (1+\epsilon(t)) \bigg[d \int_{0}^{\bar h(t)} \tilde J(r,\rho) \phi_0(\rho-\bar h(t)){\rm d} \rho-d\phi_0(r-\bar h(t))+f(\phi_0(r-\bar h(t)))\\ &\ \ \ \ \ \ \ \ -\frac{C_6}{r}\int_{-K_*}^{K_*} \rho J_*(\rho) \phi_0(\rho+r-\bar h(t)){\rm d} \rho-\frac{C_7}{r^2 }\bigg]\\ = & \ d \int_{0}^{\bar h(t)} \tilde J(r,\rho) \bar u(t,\rho){\rm d} \rho-d\bar u(t,r)+(1+\epsilon(t))f(\phi_0(r-\bar h(t)))\\ &\ -(1+\epsilon(t))\left[\frac{C_6}{r}\int_{-K_*}^{K_*} \rho J_*(\rho) \phi_0(\rho+r-\bar h(t)){\rm d} \rho+\frac{C_7}{r^2 }\right]. \end{align*} Therefore \begin{align*} \bar u_t(t,r)\geq \ d \int_{0}^{\bar h(t)} \tilde J(r,\rho) \bar u(t,\rho){\rm d} \rho-d \bar u(t,r)+f(\bar u(t,r))+E, \end{align*} with \begin{align*} E:=&(1+\epsilon(t))f(\phi_0(r-\bar h(t)))-f(\bar u(t,r))-(1+\epsilon(t))\left[\frac{C_6}{r}\int_{-K_*}^{K_*} \rho J_*(\rho) \phi_0(\rho+r-\bar h(t)){\rm d} \rho+\frac{C_7}{r^2 }\right] \\ &-(1+\epsilon(t))\delta'(t)\phi_0'(r-\bar h(t))+\epsilon'(t)\phi_0(r-\underline h(t)). \end{align*} Clearly to complete the proof of \eqref{3.30}, it suffices to show the following claim. {\bf Claim 5}. For suitably chosen small $K_1$ and $K_2$, and large $\theta$, \begin{align*} E\geq 0 \mbox{ for } r\in (\underline h(t)/2,\underline h(t)),\ t>0. \end{align*} Define \begin{align*} G(u):=(1+\epsilon)f(u)- f((1+\epsilon)u). \end{align*} Then for $u\in [{0},{u}^*]$, there exists some $\tilde u\in [u,{u}^*]$ such that \begin{align*} G(u)=&G({u}^*)+ G'(\tilde u) (u-{u}^*)\\ =&-f((1+\epsilon){u}^*)+(1+\epsilon) f'(\tilde u) (u-{u}^*)-(1+\epsilon) f'((1+\epsilon)\tilde u) (u-{u}^*)\\ =&-f((1+\epsilon){u}^*)+(1+\epsilon)\bigg[ f'(\tilde u)- f'((1+\epsilon)\tilde u)\bigg] (u-{u}^*). \end{align*} Since $f\in C^2$, there exists $C_f>0$ such that \[ f'(\tilde u)- f'((1+\epsilon)\tilde u\geq - C_f\tilde u\epsilon\geq -C_f u^*\epsilon. \] Hence, \begin{align*} G(u)\geq& -f((1+\epsilon){u}^*)-(1+\epsilon)C_f u^*\epsilon |u-{u}^*|\\ \geq&-\epsilon f'(u^*) u^*+o(\epsilon)-2 C_f u^* ({u}^*-u)\epsilon. \end{align*} Therefore, in view of $f'(u^*)<0$ and $\phi_0(-\infty)=u^*$, there exists large $L>0$ such that for $\xi\leq -L$ and $\theta$ large (and hence $\epsilon(t)$ small), \begin{align}\label{3.33a} (1+\epsilon(t))f(\phi_0(\xi))- f((1+\epsilon(t))\phi_0(\xi))\geq \frac{- f'(u^*) u^*}{2}\epsilon(t)>0. \end{align} Since $\phi_0$ is decreasing and $J_*$ is even, for $r\in [\bar h(t)/2, \bar h(t)]$ and $t>0$, \begin{align}\label{6.13} \int_{-K_*}^{K_*} \rho J_*(\rho) \phi_0(\rho+r-\bar h(t)){\rm d} \rho=\int_0^{K_*}\rho J_*(\rho)[\phi_0(\rho+r-\bar h(t))-\phi_0(-\rho+r-\bar h(t))]d\rho<0. \end{align} Denote \begin{align*} &C_8:=\displaystyle\max_{r\leq 0}|\phi_0'(r)|,\\ &\tilde\phi_0(\rho):=\max_{\xi \in [-L, 0]}[\phi_0(\rho+\xi)-\phi_0(-\rho+\xi)]. \end{align*} Then $\tilde\phi_0(\rho)$ is continuous and $\tilde\phi_0(\rho)<\tilde\phi_0(0)=0$ for $\rho\in (0, K_*]$. Therefore \begin{align*} \int_{-K_*}^{K_*} \rho J_*(\rho) \phi_0(\rho+r-\bar h(t)){\rm d} \rho&=\int_0^{K_*}\rho J_*(\rho)[\phi_0(\rho+r-\bar h(t))-\phi_0(-\rho+r-\bar h(t))]d\rho\\ &\leq \int_0^{K_*}\rho J_*(\rho)\tilde \phi_0(\rho)d\rho=:-C_9<0 \mbox{ for } r\in [\bar h(t)-L, \bar h(t)]. \end{align*} We may now use $(1+\epsilon(t))f(\phi_0(r-\bar h(t)))\geq f(\bar u(t,r))$ and \eqref{3.21} to obtain, for $r \in [\bar h(t)-L,\bar h(t)]$, $t>0$ and large $\theta$, \begin{align*} E\geq &\ \frac{C_6C_9}{r}-\frac{2C_7}{r^2 }-2\delta'(t)C_8+u^*\epsilon'(t)\\ \geq &\ \frac{C_6C_9}{\bar h(t)}-\frac{4C_7}{\bar h^2(t) }-2K_2C_8(t+\theta)^{-1}-u^*K_1(t+\theta)^{-2}\\ \geq&\ \frac{C_6C_9}{c_0(t+\theta)}-\frac{16C_7}{c_0^2(t+\theta)^2 }-2K_2C_8(t+\theta)^{-1}-u^*K_1(t+\theta)^{-2}\\ =&\ \frac{1}{t+\theta}[C_6C_9/c_0-16C_7c_0^{-2}(t+\theta)^{-1} -2K_2C_8-u^*K_1(t+\theta)^{-1}]\geq 0 \end{align*} if $K_1$ and $K_2$ are small and $\theta$ is large. We next estimate $E$ for $r \in [\bar h(t)/2,\bar h(t)-L]$. For such $r$ and $t>0$, by \eqref{6.13} and \eqref{3.33a}, we obtain \begin{align*} E\geq& \ (1+\epsilon(t) )f(\phi_0(r-\bar h(t)))-f(\bar u(t,r))-\frac{4C_7}{\bar h^2(t) }-2K_2C_8(t+\theta)^{-1}-u^*K_1(t+\theta)^{-2}\\ \geq&\ \frac{- f'(u^*) u^*}{2} K_1(t+\theta)^{-1}-\frac{16C_7}{c_0^2(t+\theta)^2 }-2K_2C_8(t+\theta)^{-1}-u^*K_1(t+\theta)^{-2}\\ =&\ (t+\theta)^{-1}[- f'(u^*) u^*K_1/2-16C_7c_0^{-2}(t+\theta)^{-1} -2K_2C_8-u^*K_1(t+\theta)^{-1}]\geq 0 \end{align*} if $\theta$ is large and \begin{align*} K_1=\frac{8C_8K_2}{- f'(u^*) u^*}. \end{align*} This finishes the proof of Claim 5 and hence the lemma. \end{proof} \subsection{Lower bound of $h(t)-c_0t$} This subsection is devoted to the proof of the following lemma, which, combined with Lemma \ref{lemma3.10}, gives Theorem \ref{th1.7}. \begin{lemma}\label{lem-lb} There exists $\tilde C>0$ such that for $t\gg 0$, \begin{align}\label{3.36a} h(t)-c_0t \geq -\tilde C \ln t, \end{align} where $c_0>0$ is given by Proposition \ref{prop1.4}. \end{lemma} The proof of Lemma \ref{lem-lb} is rather involved, and requires some preliminary results, given in the following two lemmas. \begin{lemma}\label{lemma3.11} There exists $H_*>0$ large so that for $h\geq r\geq H_*$, the inequality \begin{equation}\begin{aligned}\label{3.32} &\int_{0}^{h} \tilde J(r,\rho) \psi(\rho){\rm d} \rho- \int_{0}^{ h} J_*(r-\rho) \psi(\rho){\rm d} \rho\\ &\geq \frac{N-1}r\int_{-K_*}^{\min\{h-r, K_*\}} \rho J_*(\rho) \psi(\rho+r){\rm d} \rho -\frac{NK_*^2\|\psi\|_{L^\infty}}{r^2} \end{aligned} \end{equation} holds for any nonnegative function $\psi\in C([0,h])$, where $N\geq 2$ is the dimension. \end{lemma} \begin{proof} By Lemma \ref{lemma2.2} and \eqref{1.10}, we easily deduce, for $r+\rho> K_*$, \begin{equation}\label{3.33} \begin{cases} \displaystyle \tilde J(r,\rho)\geq \left(\frac{\rho}{r}\right)^{(N-1)/2}\left[\frac{(\rho+r)^2-K_*^2}{4r\rho }\right]^{(N-3)/2}J_*(r-\rho),&N\geq 3,\\[2mm] \displaystyle \tilde J(r,\rho)\geq \left(\frac{\rho}{r}\right)^{1/2}J_*(r-\rho),&N=2. \end{cases} \end{equation} Therefore, for $N\geq 3$, \begin{align*} &\int_{0}^{ h} \tilde J(r,\rho) \psi(\rho){\rm d} \rho\geq \int_{0}^{ h} \left(\frac{\rho}{r}\right)^{(N-1)/2} \left[\frac{(\rho+r)^2-K_*^2}{4r\rho }\right]^{(N-3)/2} J_*(r-\rho) \psi(\rho){\rm d} \rho\\ =&\int_{0}^{ h} J_*(r-\rho) \psi(\rho){\rm d} \rho\\ &+\int_{0}^{ h} \left[\left(\frac{\rho}{r}\right)^{(N-1)/2} \left(\frac{(\rho+r)^2-K_*^2}{4l\rho }\right)^{(N-3)/2}-1\right] J_*(r-\rho) \psi(\rho){\rm d} \rho\\ =&\int_{0}^{ h} J_*(r-\rho) \psi(\rho){\rm d} \rho\\ &+\int_{-K_*}^{\min\{h-r, K_*\}} \left[\left(1+\frac{\rho}{r}\right)^{(N-1)/2} \left(\frac{(\rho+2r)^2-K_*^2}{4r(r+\rho) }\right)^{(N-3)/2}-1\right] J_*(\rho) \psi(\rho+r){\rm d} \rho. \end{align*} A simple calculation gives, for $N\geq 3$ and $x\in {\mathbb R}$ close to 0, \begin{align*} \left(1+x\right)^{(N-1)/2}=1+\frac{N-1}{2}x+\frac{(N-1)(N-3)}{8}(1+\xi)^{(N-5)/2}x^2\geq 1+\frac{N-1}{2}x \end{align*} for some $\xi$ lying between $0$ and $x$; and for $N\geq 3$ and small $x\geq 0$, \begin{align*} (1-x)^{(N-3)/2}= 1-\frac{N-3}{2}(1-\eta)^{(N-5)/2}x \geq 1-(N-3)x \end{align*} for some $\eta\in [0,x]$. Moreover, for $N\geq 3$, $r\gg 1$ and $\rho\in [-K_*, K_*]$, \begin{align*} \left[\frac{(\rho+2r)^2-K_*^2}{4r(r+\rho) }\right]^{(N-3)/2}\geq \left[1-\frac{K_*^2}{4r(r+\rho) }\right]^{(N-3)/2}. \end{align*} Therefore, for such $N, r$ and $\rho$, we have \begin{align*} &\left(1+\frac{\rho}{r}\right)^{(N-1)/2} \left[\frac{(\rho+2l)^2-K_*^2}{4r(r+\rho) }\right]^{(N-3)/2}-1\\ \geq& \left(1+\frac{N-1}{2} \frac{\rho}{r}\right)\left(1-\frac{(N-3)K_*^2}{4r(r+\rho) }\right)-1\\ =&\frac{N-1}{2} \frac{\rho}{r}-\left(1+\frac{N-1}{2} \frac{\rho}{r}\right)\frac{(N-3)K_*^2}{4r(r+\rho)}\\ \geq&\frac{N-1}{2} \frac{\rho}{r}-\frac{(N-3)K_*^2}{r^2}. \end{align*} It follows that, for $h\geq r\gg 1$, \begin{align*} &\int_{-K_*}^{\min\{h-r, K_*\}} \left(\left(1+\frac{\rho}{r}\right)^{(N-1)/2} \left[\frac{(\rho+2r)^2-K_*^2}{4r(r+\rho) }\right]^{(N-3)/2}-1\right) J_*(\rho) \psi(\rho+r){\rm d} \rho\\ \geq&\int_{-K_*}^{\min\{h-r, K_*\}} \left(\frac{N-1}{2} \frac{\rho}{r}-\frac{(N-3)K_*^2}{r^2}\right) J_*(\rho) \psi(\rho+r){\rm d} \rho\\ =&\ \frac{N-1}{2}\int_{-K_*}^{\min\{h-r, K_*\}} \frac{\rho}{r} J_*(\rho) \psi(\rho+r){\rm d} \rho-\frac{(N-3)K_*^2}{r^2}\int_{-K_*}^{\min\{h-r, K_*\}} J_*(\rho) \psi(\rho+r){\rm d} \rho,\\ \geq &\ \frac{N-1}{2r}\int_{-K_*}^{\min\{h-r, K_*\}} {\rho}J_*(\rho) \psi(\rho+r){\rm d} \rho-\frac{(N-3)K_*^2\|\psi\|_{L^\yy}}{r^2}, \end{align*} which implies \eqref{3.32} (for $N\geq 3$). When $N=2$, from \eqref{3.33} we obtain, for $h\geq r\gg 1$, \begin{align*} &\int_{0}^{ h} \tilde J(r,\rho) \psi(\rho){\rm d} \rho\geq \int_{0}^{ h}\left(\frac{\rho}{r}\right)^{1/2} J_*(r-\rho) \psi(\rho){\rm d} \rho\\ =&\int_{0}^{ h}J_*(r-\rho) \psi(\rho){\rm d} \rho+\int_{0}^{ h}\left[\left(\frac{\rho}{r}\right)^{1/2}-1\right]J_*(r-\rho) \psi(\rho){\rm d} \rho\\ =&\int_{0}^{ h}J_*(r-\rho) \psi(\rho){\rm d} \rho+\int_{-K_*}^{\min\{h-r, K_*\}} \left[\left(1+\frac{\rho}{r}\right)^{1/2}-1\right] J_*(\rho) \psi(\rho+r){\rm d} \rho. \end{align*} For $x\in {\mathbb R}$ close to 0, we have \begin{align*} (1+x)^{1/2}=1+\frac{1}{2}x-\frac{1}{8}(1+\xi)^{-3/2}x^2\geq 1+\frac{1}{2}x-\frac{x^2}{4} \end{align*} for some $\xi$ lying between $0$ and $x$. Therefore, for $h\geq r\gg 1$, \begin{align*} & \int_{-K_*}^{\min\{h-r, K_*\}} \left[\left(1+\frac{\rho}{r}\right)^{1/2}-1\right] J_*(\rho) \psi(\rho+r){\rm d} \rho\\ &\geq \int_{-K_*}^{\min\{h-r, K_*\}} \left[\frac{\rho}{2r}-\left(\frac{\rho}{2r}\right)^2\right] J_*(\rho) \psi(\rho+r){\rm d} \rho\\ &\geq\frac{1}{2r}\int_{-K_*}^{\min\{h-r, K_*\}} \rho J_*(\rho) \psi(\rho+r){\rm d} \rho -\frac{K_*^2\|\psi\|_{L^\yy}}{4r^2}. \end{align*} This finishes the proof of the Lemma. \end{proof} Let us note that by the assumption \textbf{(f)}, there is $D_*>0$ such that \begin{align}\label{3.36} f(u)\geq D_* \min\{u,u^*-u\} \mbox{ for } u\in [0,u^*]. \end{align} Our next lemma gives a crucial first estimate for the solution $u(t,r)$ of \eqref{1.4}. \begin{lemma}\label{lemma3.12} Suppose spreading happens to the solution $(u,h)$ of \eqref{1.4}. Then there exist positive constants $E_1$, $E_2$ and $\theta_1$ such that for any $\theta\geq \theta_1$, we can find $t_0>0$ depending on $\theta$, such that \begin{align*} u(t+t_0,r)\geq u^*-\frac{E_2}{t+\theta}\ \mbox{ for all } \ t\geq 0,\ r\in [0,E_1(t+\theta)]. \end{align*} \end{lemma} \begin{proof} Define, for some positive constants $E_1$, $\theta$ and $D_1\in (0, 2E_1\theta u^*)$ to be determined, \begin{align*} &\underline h(t):=2E_1(t+\theta) \mbox{ for } t\geq 0,\\ &\underline u(t,r):=\begin{cases} \displaystyle u^*-\frac{D_1}{\underline h(t)},& r\in [0,\underline h(t)/2],\ t\geq 0,\\[2mm] \displaystyle 2\left(u^*-\frac{D_1}{\underline h(t)}\right)\left(1-\frac{r}{\underline h(t)}\right),& r\in [\underline h(t)/2,\underline h(t)],\ t\geq 0. \end{cases} \end{align*} Clearly $\underline u(t,r)$ is continuous, nonnegative, and nonincreasing in $r$. We will show that $\underline u$ satisfies \begin{align}\label{3.35} \displaystyle \underline u_t(t,r)\leq d \int_{0}^{\underline h(t)} \tilde J(r,\rho) \underline u(t,\rho){\rm d} \rho-d\underline u(t,r)+f(\underline u(t,r))\ \mbox{ for } \ t>0,\; r\in (0,\underline h(t))\setminus \left\{\frac{\underline h(t)}2\right\}. \end{align} Clearly $\underline u(0,r)\leq u^*-\frac{D_1}{2E_1\theta}$. Since $ u(t,r)$ converges to $u^*$ locally uniformly for $r\in [0, \infty)$ as $t\to \yy$, and $\lim_{t\to \yy}h(t)/t=c_0$, if we choose $E_1$ small so that $2E_1<c_0$, then we can find $t_0>0$, depending on $E_1$ and $\theta$, such that \[\begin{cases} h(t_0+t)>2E_1(t+\theta)=\underline h(t) \mbox{ for all } t\geq 0,\\ u(t_0, r)\geq \underline u(0,r) \mbox{ for } r\in [0, \underline h(0)]. \end{cases} \] We also have $u(t,\underline h(t))>0=\underline u(t_0+t,\underline h(t))$ for all $t\geq 0$. Therefore, if \eqref{3.35} holds true, then we can use the comparison principle (and Remark \ref{rmk3.6}) over the region $\{(t,r): t\geq 0,\; r\in [0, \underline h(t)]\}$ to obtain \begin{align*} u(t_0+t,r)\geq \underline u(t,r) \ \mbox{ for } \ t\geq 0,\ r\in [0,\underline h(t)], \end{align*} and the desired estimate thus follows with $E_2:=\frac{D_1}{2E_1}$. Thus, to complete the proof of the lemma, it remains to prove \eqref{3.35}. We do so according to the following four cases: \begin{align*} &{\rm (i)}\ r\in \Big[0,\frac 12\underline h(t)-K_*\Big],\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {\rm (ii)}\ r\in \Big[ \frac 12\underline h(t)-K_*,\frac 12\underline h(t)+K_*\Big]\backslash \Big\{\frac 12\underline h(t)\Big\},\\ &{\rm (iii)}\ r\in \Big[\frac 12\underline h(t)+K_*, \underline h(t)-K_*\Big],\ \ \ \ {\rm (iv)}\ r\in [\underline h(t)-K_*,\underline h(t)]. \end{align*} \underline{Case (i)} For $r\in \Big[0,\frac 12\underline h(t)-K_*\Big]$ and $t>0$, since the supporting set of $J$ is contained in $B_{K_*}$, we easily see, with $\underline h(t)\geq 2E_1\theta\gg 1$, \begin{align*} \int_{0}^{\underline h(t)} \tilde J(r,\rho) {\rm d} \rho=\int_{0}^{+\yy} \tilde J(r,\rho) {\rm d} \rho=1, \end{align*} and so by \eqref{3.36}, for such $r$ and $t$, we obtain \begin{align*} d \int_{0}^{\underline h(t)} \tilde J(r,\rho) \underline u(t,\rho){\rm d} \rho-d\underline u(t,r)+f(\underline u(t,r))=f(\underline u(t,r))\geq \frac{D_1D_*}{\underline h(t)}. \end{align*} Clearly \begin{align*} \underline u_t(t,r)=& \frac{D_1 \underline h'(t)}{\underline h^2(t)}=\frac{D_1 }{2E_1(t+\theta)^2}\leq \frac{D_1D_*}{\underline h(t)} \mbox{ for } r \in \left[0,\frac 12\underline h(t)-K_*\right] \end{align*} provided $\theta$ is large enough. Thus \eqref{3.35} holds in this case if $\theta$ is chosen sufficiently large. \underline{Case (ii)} For $r\in \Big[ \frac 12\underline h(t)-K_*,\frac 12\underline h(t)\Big]$ and $t>0$, with $\underline h(t)\geq 2E_1\theta\gg1$, \begin{align*} &\int_{0}^{\underline h(t)} J_*(r-\rho) \underline u(t,\rho){\rm d} \rho-\underline u(t,r )=\int_{-K_*}^{K_*} J_*(\rho) \underline u(\rho+r){\rm d} \rho-\left(u^*-\frac{D_1}{\underline h(t)}\right)\\ =&\int_{-K_*}^{\underline h(t)/2-r} J_*(\rho) \underline u(t,\rho+r){\rm d} \rho+\int_{\underline h(t)/2-r}^{K_*} J_*(\rho) \underline u(t,\rho+l){\rm d} \rho-\int_{-K_*}^{K_*} J_*(\rho)\left(u^*-\frac{D_1}{\underline h(t)}\right)d\rho\\ =&\int_{\underline h(t)/2-r}^{K_*} J_*(\rho) \underline u(t, \rho+r){\rm d} \rho-\int^{K_*}_{\underline h(t)/2-r} J_*(\rho) \left(u^*-\frac{D_1}{\underline h(t)}\right){\rm d} \rho\\ =&\ \left(u^*-\frac{D_1}{\underline h(t)}\right)\int_{\underline h(t)/2-r}^{K_*} J_*(\rho) \left[2\left(1-\frac{\rho+r}{\underline h(t)}\right)-1\right]{\rm d} \rho\\ \geq &\left(u^*-\frac{D_1}{\underline h(t)}\right)\int_{\underline h(t)/2-r}^{K_*} J_*(\rho) \left[2\left(1-\frac{K_*+\underline h(t)/2}{\underline h(t)}\right)-1\right]{\rm d} \rho\\ \geq&\frac{-2K_* u^*}{\underline h(t)}. \end{align*} For $r\in \left[\frac 12 \underline h(t),\frac 12 \underline h(t)+K_*\right]$ and $t>0$, with $\underline h(t)\geq 2E_1\theta\gg1$, we have \begin{align*} \underline u(t,r)&=2\left(u^*-\frac{D_1}{\underline h(t)}\right)\left(1-\frac{r}{\underline h(t)}\right)\\ &=2\left(u^*-\frac{D_1}{\underline h(t)}\right)\left(1-\frac{r}{\underline h(t)}\right)\int_{-K_*}^{K_*} J_*(\rho) {\rm d} \rho-2\left(u^*-\frac{D_1}{\underline h(t)}\right)\int_{-K_*}^{K_*} J_*(\rho) \frac{\rho}{\underline h(t)}{\rm d} \rho\\ &=\int_{-K_*}^{K_*} J_*(\rho) 2\left(u^*-\frac{D_1}{\underline h(t)}\right)\left(1-\frac{\rho+r}{\underline h(t)}\right){\rm d} \rho. \end{align*} Therefore, \begin{align*} &\int_{0}^{\underline h(t)} J_*(r-\rho) \underline u(\rho){\rm d} \rho-\underline u(t,r)\\ =&\int_{-K_*}^{\underline h(t)/2-r}\!\!\! \!\! J_*(\rho) \underline u(\rho+r){\rm d} \rho+\!\!\!\int_{\underline h(t)/2-r}^{K_*} \!\!\! J_*(\rho) \underline u(\rho+r){\rm d} \rho-\!\!\!\int_{-K_*}^{K_*} \!\!\! J_*(\rho) 2\left(u^*-\frac{D_1}{\underline h(t)}\right)\!\!\left(1-\frac{r}{\underline h(t)}\right){\rm d} \rho \\ =&\int_{-K_*}^{\underline h(t)/2-r} J_*(\rho) \left[\left(u^*-\frac{D_1}{\underline h(t)}\right)-2\left(u^*-\frac{D_1}{\underline h(t)}\right)\left(1-\frac{\rho+r}{\underline h(t)}\right)\right]{\rm d} \rho\\ =&\ \left(u^*-\frac{D_1}{\underline h(t)}\right)\int_{-K_*}^{\underline h(t)/2-r} J_*(\rho) \left[1-2\left(1-\frac{\rho+r}{\underline h(t)}\right)\right]{\rm d} \rho\\ \geq&\ \frac{-2K_* u^*}{\underline h(t)}. \end{align*} We have now proved that for $r\in \left[\frac 12 \underline h(t)-K_*,\frac 12 \underline h(t)+K_*\right]$ and $t>0$, with $\underline h(t)\geq 2E_1\theta\gg1$, \[ \int_{0}^{\underline h(t)} J_*(r-\rho) \underline u(\rho){\rm d} \rho-\underline u(t,r)\geq \frac{-2K_* u^*}{\underline h(t)}, \] which combined with \eqref{3.32} gives \begin{align*} &d \int_{0}^{\underline h(t)} \tilde J(r,\rho) \underline u(t,\rho){\rm d} \rho-d\underline u(t,r)+f(\underline u(t,r))\\ &\geq d\left[ \int_{0}^{\underline h(t)} J_*(r-\rho) \underline u(\rho){\rm d} \rho-\underline u(t,r)\right]+f(\underline u(t,r))\\ & \ \ \ \ \ \ +d\left[\frac{N-1}r\int_{-K_*}^{\min\{h(t)-r, K_*\}} \rho J_*(\rho) \underline u(t, \rho+r){\rm d} \rho -\frac{NK_*^2\|\underline u\|_{L^\infty}}{r^2}\right]\\ &\geq -\frac{3K_* u^*}{\underline h(t)}d+f(\underline u(t,r))+d\frac{N-1}r\int_{-K_*}^{\min\{h(t)-r, K_*\}} \rho J_*(\rho) \underline u(t, \rho+r){\rm d} \rho. \end{align*} A simple computation gives, for $r\in \left[\frac 12 \underline h(t)-K_*,\frac 12 \underline h(t)+K_*\right]$ and $t>0$, with $\underline h(t)\geq 2E_1\theta\gg1$, \begin{align*} d\frac{N-1}{r}\int_{-K_*}^{\min\{\underline h(t)-r,K_*\}} \rho J_*(\rho) \underline u(t, \rho+r){\rm d} \rho\\ \geq d\frac{N-1}{r}(-K_*u^*)\geq -\frac{3d(N-1)K_*u^*}{\underline h(t)}. \end{align*} Moreover, since \begin{align*} \min\{u^*,u^*-\underline u(t,r)\}= u^*-\underline u(t,r)\geq u^*-\underline u(t, \underline h(t)/2-K_*)=D_1/\underline h(t), \end{align*} by \eqref{3.36} we obtain \[ f(\underline u(t,r))\geq D_*\min\{u^*,u^*-\underline u(t,r)\}\geq \frac{D_*D_1}{\underline h(t)}. \] Therefore, for $r\in \left[\frac 12 \underline h(t)-K_*,\frac 12 \underline h(t)+K_*\right]$ and $t>0$, with $\underline h(t)\geq 2E_1\theta\gg1$, \begin{align*} &d \int_{0}^{\underline h(t)} \tilde J(r,\rho) \underline u(t,\rho){\rm d} \rho-d\underline u(t,r)+f(\underline u(t,r))\\ &\geq -\frac{3K_* u^*}{\underline h(t)}d+ \frac{D_*D_1}{\underline h(t)}-\frac{3d(N-1)K_*u^*}{\underline h(t)}\\ &= \frac{D_*D_1-3dNK_*u^*}{\underline h(t)}. \end{align*} From the definition of $\underline u$ we obtain, for $r\in [\underline h(t)/2-K_*, \underline h(t)/2)$, \[ \underline u_t(t,r)=\frac{D_1\underline h'(t)}{\underline h^2(t)}=\frac{2D_1E_1}{\underline h^2(t)}, \] and for $r\in (\underline h(t)/2, \underline h(t)/2+K_*]$, \[ \underline u_t(t,r)=2\frac{D_1\underline h'(t)}{\underline h^2(t)}\left(1-\frac r{\underline h(t)}\right)+2\left(u^*-\frac{D_1}{\underline h(t)}\right)\frac{r \underline h'(t)}{\underline h^2(t)} \leq \frac{4D_1E_1}{\underline h^2(t)}+\frac{4u^*E_1}{\underline h(t)}. \] Thus it is easily seen that \eqref{3.35} holds for Case (ii) provided that $D_1\in (0, 2E_1\theta u^*)$ is chosen large enough so that \[ D_*D_1\geq 4dNK_*u^*+4u^*E_1, \] which is possible since $\theta\gg1$. \underline{Case (iii)} For $r\in [\underline h(t)/2+K_*,\underline h(t)-K_*]$, $t>0$, with $\underline h(t)\geq 2E_1\theta\gg1$, \begin{align*} &\int_{0}^{\underline h(t)} J_*(r-\rho) \underline u(t, \rho){\rm d} \rho-\underline u(t,r)=\int_{-K_*}^{K_*} J_*(\rho) \underline u(t,\rho+r){\rm d} \rho-\underline u(t,r)\\ &=\int_{-K_*}^{K_*} J_*(\rho) 2\left(u^*-\frac{D_1}{\underline h(t)}\right)\left(1-\frac{\rho+r}{\underline h(t)}\right){\rm d} \rho-2\left(u^*-\frac{D_1}{\underline h(t)}\right)\left(1-\frac{r}{\underline h(t)}\right)\\ =&\int_{-K_*}^{K_*} J_*(\rho) 2\left(u^*-\frac{D_1}{\underline h(t)}\right)\frac{\rho}{\underline h(t)}{\rm d} \rho=0, \end{align*} and \begin{align*} &\int_{-K_*}^{\min\{\underline h(t)-r,K_*\}} {\rho}J_*(\rho) \underline u(t, \rho+r){\rm d} \rho=\int_{-K_*}^{K_*} {\rho}J_*(\rho) 2\left(u^*-\frac{D_1}{\underline h(t)}\right)\left(1-\frac{\rho+r}{\underline h(t)}\right){\rm d} \rho\\ =&2\left(u^*-\frac{D_1}{\underline h(t)}\right)\left(1-\frac{r}{\underline h(t)}\right)\int_{-K_*}^{K_*} {\rho}J_*(\rho) {\rm d} \rho-\int_{-K_*}^{K_*} {\rho}J_*(\rho) 2\left(u^*-\frac{D_1}{\underline h(t)}\right)\frac{\rho}{\underline h(t)}{\rm d} \rho\\ =&-2\left(u^*-\frac{D_1}{\underline h(t)}\right)\int_{-K_*}^{K_*} \frac{\rho^2}{\underline h(t)}J_*(\rho) {\rm d} \rho\geq -\frac{2u^*K_*^2}{\underline h(t)}. \end{align*} Thus, by \eqref{3.32}, for such $r, t$ and $\theta$, \begin{align*} &d \int_{0}^{\underline h(t)} \tilde J(r,\rho) \underline u(t,\rho){\rm d} \rho-d\underline u(t, r)+f(\underline u(t,r)\\ \geq &-\frac{d(N-1)}{r}\frac{2u^*K_*^2}{\underline h(t)}-\frac{dNK_*^2\|\underline u\|_{L^\infty}}{r^2}+f(\underline u(t,r))\\ \geq& -\frac{16 dNu^*K_*^2}{\underline h^2(t)}+f(\underline u(t,r)). \end{align*} Since for such $r, t$ and $\theta$, \begin{align*} & \min\{\underline u(t,r)), (u^*-\underline u(t,r))\}\geq \min\{\underline u(t, \underline h(t)-K_*)), (u^*-\underline u(t, \underline h(t)/2))\}\\ =&\min\left\{2\left(u^*-\frac{D_1}{\underline h(t)}\right)\frac{K_*}{\underline h(t)}, \frac{D_1}{\underline h(t)}\right\}\geq \min\left\{\frac{u^*K_*}{\underline h(t)}, \frac{D_1}{\underline h(t)}\right\}=\frac{u^*K_*}{\underline h(t)} \end{align*} provided $D_1\geq u^*K_*$, by \eqref{3.36} we obtain \[ f(\underline u(t,r))\geq D_* \min\{\underline u(t,r)), (u^*-\underline u(t,r))\}\geq \frac{D_* u^*K_*}{\underline h(t)}. \] Therefore, for $r\in [\underline h(t)/2+K_*,\underline h(t)-K_*]$, $t>0$, with $\underline h(t)\geq 2E_1\theta\gg1$, \begin{align*} &d \int_{0}^{\underline h(t)} \tilde J(r,\rho) \underline u(t,\rho){\rm d} \rho-d\underline u(t, r)+f(\underline u(t,r)\\ \geq& -\frac{16 dNu^*K_*^2}{\underline h^2(t)}+\frac{D_* u^*K_*}{\underline h(t)}\geq \frac{D_* u^*K_*}{2\underline h(t)}. \end{align*} By simple calculation, we have, for $r\in [\underline h(t)/2+K_*,\underline h(t)-K_*]$, $t>0$, with $\underline h(t)\geq 2E_1\theta\gg1$, \begin{align*} \underline u_t(t,r) =&\ 2\frac{D_1 \underline h'(t)}{\underline h^2(t)}\left(1-\frac{r}{\underline h(t)}\right)+2\left(u^*-\frac{D_1}{\underline h(t)}\right)\frac{r \underline h'(t)}{\underline h^2(t)}\\ \leq&\ \frac{4E_1D_1 }{\underline h^2(t)}+\frac{3E_1u^*}{\underline h(t)}\leq \frac{4E_1u^*}{\underline h(t)}. \end{align*} Thus \eqref{3.35} holds for such $r, t$ and $\theta$ if $E_1\in (0, D_*K_*/8]$. \underline{Case (iv)} For $r\in [\underline h(t)-K_*,\underline h(t)]$, $t>0$, with $\underline h(t)\geq 2E_1\theta\gg1$, \begin{align*} &\int_{0}^{\underline h(t)} J_*(r-\rho) \underline u(t,\rho){\rm d} \rho-\underline u(t,r)=\int_{-K_*}^{\underline h(t)-r} J_*(\rho) \underline u(\rho+r){\rm d} \rho-\underline u(t,r)\\ &=\int_{-K_*}^{K_*} J_*(\rho) 2\left(u^*-\frac{D_1}{\underline h(t)}\right)\left(1-\frac{\rho+r}{\underline h(t)}\right){\rm d} \rho-2\left(u^*-\frac{D_1}{\underline h(t)}\right)\left(1-\frac{r}{\underline h(t)}\right)\\ &\ \ \ -\int_{\underline h(t)-r}^{K_*} J_*(\rho) 2\left(u^*-\frac{D_1}{\underline h(t)}\right)\left(1-\frac{\rho+r}{\underline h(t)}\right){\rm d} \rho\\ &=-2\left(u^*-\frac{D_1}{\underline h(t)}\right)\int_{\underline h(t)-r}^{K_*} J_*(\rho) \left(1-\frac{\rho+r}{\underline h(t)}\right){\rm d} \rho\\ &\geq -u^*\int_{\underline h(t)-r}^{K_*} J_*(\rho) \left(1-\frac{\rho+r}{\underline h(t)}\right){\rm d} \rho\geq 0, \end{align*} and \begin{align*} &\int_{-K_*}^{\min\{\underline h(t)-r,K_*\}} {\rho} J_*(\rho) \underline u(\rho+r){\rm d} \rho=\int_{-K_*}^{\underline h(t)-r} {\rho}J_*(\rho) 2\left(u^*-\frac{D_1}{\underline h(t)}\right)\left(1-\frac{\rho+r}{\underline h(t)}\right){\rm d} \rho\\ =&\left[\int_{-K_*}^{K_*} -\int_{\underline h(t)-r}^{K_*}\right] {\rho}J_*(\rho) 2\left(u^*-\frac{D_1}{\underline h(t)}\right)\left(1-\frac{\rho+r}{\underline h(t)}\right){\rm d} \rho\\ \geq&\int_{-K_*}^{K_*} {\rho}J_*(\rho) 2\left(u^*-\frac{D_1}{\underline h(t)}\right)\left(1-\frac{\rho+r}{\underline h(t)}\right){\rm d} \rho\\ =&\ 2\left(u^*-\frac{D_1}{\underline h(t)}\right)\left(1-\frac{r}{\underline h(t)}\right)\int_{-K_*}^{K_*} {\rho}J_*(\rho) {\rm d} \rho-\int_{-K_*}^{K_*} {\rho}J_*(\rho) 2\left(u^*-\frac{D_1}{\underline h(t)}\right)\frac{\rho}{\underline h(t)}{\rm d} \rho\\ =&-2\left(u^*-\frac{D_1}{\underline h(t)}\right)\int_{-K_*}^{K_*} \frac{\rho^2}{\underline h(t)}J_*(\rho) {\rm d} \rho\geq -\frac{2u^*K_*^2}{\underline h(t)}. \end{align*} Therefore, by \eqref{3.32}, for such $r$, $t$ and $\theta$, we obtain \begin{align*} &d \int_{0}^{\underline h(t)} \tilde J(r,\rho) \underline u(t,\rho){\rm d} \rho-d\underline u(t,r)+f(\underline u(t,r)\\ \geq &-du^*\int_{\underline h(t)-r}^{K_*} J_*(\rho) \left(1-\frac{\rho+r}{\underline h(t)}\right){\rm d} \rho-d\left[\frac{N-1}r\frac{2u^*K_*^2}{\underline h(t)}+\frac{NK_*^2\|\underline u\|_{L^\infty}}{r^2}\right]+f( \underline u(t,r))\\ \geq &-du^*\int_{\underline h(t)-r}^{K_*} J_*(\rho) \left(1-\frac{\rho+r}{\underline h(t)}\right){\rm d} \rho-\frac{4dNK_*^2u^*}{\underline h^2(t)}+f( \underline u(t,r)). \end{align*} Moreover, for such $r$, $t$ and $\theta$, \begin{align*} 1\gg \underline u(t,r)= 2\left(u^*-\frac{D_1}{\underline h(t)}\right)\left(1-\frac{r}{\underline h(t)}\right)\geq u^*\left(1-\frac{r}{\underline h(t)}\right), \end{align*} which implies, by \eqref{3.36} \[ f( \underline u(t,r))\geq D_*u^*\left(1-\frac{r}{\underline h(t)}\right). \] For $r\in [\underline h(t)-K_*,\underline h(t)-K_*/2]$, $t>0$ and $\theta\gg1$, we have \begin{align*} &-du^*\int_{\underline h(t)-r}^{K_*} J_*(\rho) \left(1-\frac{\rho+r}{\underline h(t)}\right){\rm d} \rho+D_*u^*\left(1-\frac{r}{\underline h(t)}\right)\\ \geq &D_*u^*\left(1-\frac{r}{\underline h(t)}\right)\geq \frac{D_*u^*K_*}{2\underline h(t)}, \end{align*} and for $r\in [\underline h(t)-K_*/2,\underline h(t)]$, $t>0$ and $\theta\gg1$, \begin{align*} &-du^*\int_{\underline h(t)-r}^{K_*} J_*(\rho) \left(1-\frac{\rho+r}{\underline h(t)}\right){\rm d} \rho+u^*\left(1-\frac{r}{\underline h(t)}\right)\\ \geq &-du^*\int_{\underline h(t)-r}^{K_*} J_*(\rho) \left(1-\frac{\rho+r}{\underline h(t)}\right){\rm d} \rho\geq -du^*\int_{ K^*/2}^{K_*} J_*(\rho) \left(1-\frac{\rho+r}{\underline h(t)}\right){\rm d} \rho\\ \geq& -du^*\int_{ 2K^*/3}^{K_*} J_*(\rho) \left(1-\frac{\rho+r}{\underline h(t)}\right){\rm d} \rho\geq \frac{dK_*u^*}{6\underline h(t)} \int_{ 2K^*/3}^{K_*} J_*(\rho) {\rm d} \rho, \end{align*} so we always have, for $r\in [\underline h(t)-K_*,\underline h(t)]$, $t>0$, with $\underline h(t)\geq 2E_1\theta\gg1$, \begin{align*} &d \int_{0}^{\underline h(t)} \tilde J(r,\rho) \underline u(t,\rho){\rm d} \rho-d\underline u(t,r)+f(\underline u(t,r)\\ &\geq \frac{D_2}{\underline h(t)}-\frac{4dNK_*^2u^*}{\underline h^2(t)}\geq \frac{D_2}{2\underline h(t)}, \end{align*} where \begin{align*} D_2:=\min\left\{\frac{D_*u^*K_*}{2}, \frac{dK_*u^*}{6} \int_{ 2K^*/3}^{K_*} J_*(\rho) {\rm d} \rho\right\}>0. \end{align*} Here we assume that $K_*>0$ is the minimal number such that the supporting set of $J_*$ is contained in $[-K_*, K_*]$. For such $r, t$ and $\theta$, from the calculation in Case (iii) we have \begin{align*} \underline u_t(t,r)\leq \frac{4E_1u^*}{\underline h(t)}, \end{align*} and so \eqref{3.35} holds if \begin{align*} 4E_1u^*\leq D_2/2. \end{align*} The proof is now complete. \end{proof} \begin{proof}[{\bf Proof of Lemma \ref{lem-lb}}] Let $(c_0,\phi_0)$ be the solution of the semi-wave problem in Proposition \ref{prop1.4}. Define \begin{align*}\begin{cases} \underline h(t):=c_0 t+\delta(t), & t\geq 0,\\ \underline u(t,r):=(1-\epsilon(t)) \phi_0(r-\underline h(t)), & t\geq 0,\ 0\leq r\leq \underline h(t), \end{cases} \end{align*} with \begin{align*} \epsilon(t):=K_1(t+\theta)^{-1}, \ \ \ \delta(t):=c_0\theta -K_2[\ln (t+\theta)-\ln \theta] \end{align*} for some positive constants $\theta\geq \theta_1$, $K_1\geq E_2/u^*$ and $K_2>0$ to be determined, where $\theta_1$ and $E_2$ are given by Lemma \ref{lemma3.12}. We assume that $\theta\gg 1$. Then it is clear that \begin{align}\label{3.38} c_0 (t+\theta)\geq \underline h(t)\geq c_0 (t+\theta)/2 \ \mbox{ for } \ t\geq 0. \end{align} In the following we choose suitable $\theta$, $K_1,\ K_2$ and $t_0>0$ such that $(\underline u,\underline h)$ satisfies \begin{equation}\label{3.39} \begin{cases} \displaystyle \underline u_t(t,r)\leq d \int_{0}^{\underline h(t)} \tilde J(r,\rho) \underline u(t,\rho){\rm d} \rho-d\underline u(t,r)+f(\underline u(t,r)), & t>0,\; r\in (\widetilde E\underline h(t),\underline h(t)),\\[2mm] \displaystyle \underline h'(t)\leq \frac{\mu}{\underline h^{N-1}(t)}\displaystyle\int_{0}^{\underline h(t)} r^{N-1}\underline u(t,r)\int_{\underline h(t)}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r, & t>0,\\ \underline u(t,r)\leq u(t+t_0,r), \; \underline u(t,\underline h(t))=0, & t>0,\; r\in [0,\widetilde E\underline h(t)],\\ \underline u(0,r)\leq u(t_0,r),\ \underline h(t)\leq h(t_0), & r\in [0,\underline h(0)], \end{cases} \end{equation} where $\widetilde E:=E_1/c_0$ with $E_1$ given by Lemma \ref{lemma3.12}. If \eqref{3.39} is proved, then we can apply Lemma \ref{lemma3.4a} to conclude that \[ h(t_0+t)\geq \underline h(t)=c_0t-K_2[\ln (t+\theta)-\ln \theta] \mbox{ for all } t>0, \] which implies \eqref{3.36a}. Therefore to complete the proof, it suffices to show \eqref{3.39}, which will be accomplished in three steps below. {\bf Step 1.} We prove the second inequality of \eqref{3.39}. Applying \eqref{3.33}, we deduce for $N\geq 3$, \begin{align*} &\frac{\mu}{\underline h^{N-1}(t)}\displaystyle\int_{0}^{\underline h(t)} r^{N-1}\underline u(t,r)\int_{\underline h(t)}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r\\ =&\ \frac{\mu}{\underline h^{N-1}(t)}\displaystyle\int_{0}^{\underline h(t)} (1-\epsilon(t)) r^{N-1}\phi_0(r-\underline h)\int_{\underline h(t)}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r\\ \geq &\ \frac{\mu (1-\epsilon(t))}{\underline h^{N-1}(t)}\displaystyle\int_{0}^{\underline h(t)}\!\!\!\int_{\underline h(t)}^{+\yy} (r\rho)^{(N-1)/2}\left[\frac{(\rho+r)^2-K_*^2}{4r\rho }\right]^{(N-3)/2} \!\!\!\phi_0(r-\underline h(t)) J_*(r-\rho){\rm d} \rho{\rm d} r\\ =&\ \mu (1-\epsilon(t))\left[\displaystyle\int_{-\underline h(t)}^{0} \int_{0}^{+\yy} \phi_0(r) J_*(r-\rho){\rm d} \rho{\rm d} r+ A(N)\right] \end{align*} with \begin{align*} A(N)\!:=\!\!\int_{-\underline h(t)}^{0}\!\int_{0}^{+\yy}\!\! \left(\left[\frac{(r\!+\!\underline h(t))(\rho\!+\!\underline h(t))}{\underline h^2(t)}\right]^{\frac{N-1}2}\!\left[\frac{(\rho+r+2\underline h(t))^2-K_*^2}{4(r+\underline h(t))(\rho+\underline h(t)) }\right]^{\frac{N-3}2}\!\!\!\!-\!1\!\right)\phi_0(r) J_*(r\!-\!\rho){\rm d} \rho{\rm d} r. \end{align*} For $N=2$, we similarly deduce \begin{align*} &\frac{\mu}{\underline h(t)}\displaystyle\int_{0}^{\underline h(t)} r^{N-1}\underline u(t,r)\int_{\underline h(t)}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r\\ \geq&\ \mu(1-\epsilon(t))\left[\int_{-\underline h(t)}^{0} \int_{0}^{+\yy} \phi_0(r) J_*(r-\rho){\rm d} \rho{\rm d} r+ A(2)\right] \end{align*} with \begin{align*} A(2):=\displaystyle\int_{-\underline h(t)}^{0} \int_{0}^{+\yy} \left(\frac{(r+\underline h(t))^{1/2}(\rho+\underline h(t))^{1/2}}{\underline h(t)}-1\right)\phi_0(r) J_*(r-\rho){\rm d} \rho{\rm d} r. \end{align*} {\bf Claim 1}. There are some constants $C_{i,j}\geq 0$ with $C_{1,0}= C_{0,1}>0$ such that for $N\geq 2$ and $x, y\in {\mathbb R}$ close to 0, \begin{align}\label{3.43} (1+x)^{(N-1)/2}(1+y)^{(N-1)/2}\geq 1+\sum_{1\leq i+j\leq N}C_{i,j}x^{i}y^{j}. \end{align} Clearly, \eqref{3.43} holds for odd integer $N\geq 2$. For even integer $N\geq 2$ and $x, y\in {\mathbb R}$ close to 0, \begin{align*} &(1+x)^{(N-1)/2}(1+y)^{(N-1)/2}-1\\ =&(1+x)^{(N-2)/2}(1+y)^{(N-2)/2}(1+x)^{1/2}(1+y)^{1/2}-1\\ \geq &(1+x)^{(N-2)/2}(1+y)^{(N-2)/2}(1+\frac x 2-\frac{x^2}4)(1+\frac y 2-\frac{y^2}4)-1\\ =&\sum_{1\leq i+j\leq N}C_{i,j}x^{i}y^{j} \mbox{ with } C_{0,1}=C_{1,0}>0, \end{align*} since for $z\in {\mathbb R}$ close to 0, \begin{align*} (1+z)^{1/2}=1+\frac{z}{2}-\frac{(1+\xi)^{-3/2}z^2}{8}\geq 1+\frac{z}{2}-\frac{z^2}4 \end{align*} with $\xi$ lying between 0 and $z$. The claim is proved. By the mean value theorem, we obtain for $N\geq 3$ and small $x\geq 0$, \begin{align}\label{3.44} (1-x)^{(N-3)/2}\geq 1-\frac{N-3}{2}(1-\xi)^{(N-5)/2}x \geq 1-Nx \end{align} for some $\xi\in [0,x]$. Therefore, for $r\in [-K_*, 0], \ t\geq 0,\ \rho\geq 0$ and $\theta\gg 1$, we have, when $N\geq 3$, \begin{align*} \left[\frac{(\rho+r+2\underline h(t))^2-K_*^2}{4(r+\underline h(t))(\rho+\underline h(t)) }\right]^{(N-3)/2}&\geq \left[1-\frac{K_*^2}{4(r+\underline h(t))(\rho+\underline h(t)) }\right]^{(N-3)/2}\\ &\geq 1-\frac{NK_*^2}{4(r+\underline h(t))(\rho+\underline h(t)) }, \end{align*} and \begin{align*} \left[\frac{(r\!+\!\underline h(t))(\rho\!+\!\underline h(t))}{\underline h^2(t)}\right]^{\frac{N-1}2}&=\left[\left(1+\frac r{\underline h(t)}\right)\left(1+\frac\rho{\underline h(t)}\right)\right]^{\frac{N-1}2}\\ &\geq 1+ \sum_{1\leq i+j\leq N}C_{i,j}\frac{r^i\rho^j}{\underline h^{i+j}(t)}. \end{align*} Since ${\rm spt}(J_*)\subset [-K_*,K_*]$, we deduce for $N\geq 3$ and $\theta\gg 1$, \begin{align*} A(N)\geq&\displaystyle\int_{-K_*}^{0}\!\int_{0}^{K_*} \!\! \left[\left(1+\!\!\!\sum_{1\leq i+j\leq N}\!\!C_{i,j}\frac{r^i\rho^j}{\underline h^{i+j}(t)}\right)\!\!\left(1-\frac{NK_*^2}{4(r+\underline h(t))(\rho\!+\!\underline h(t)) }\right)-1\right]\phi_0(r) J_*(r\!-\!\rho){\rm d} \rho{\rm d} r\\ =&\displaystyle\sum_{1\leq i+j\leq N}C_{i,j}\int_{-K_*}^{0}\int_{0}^{K_*} \frac{ r^{i}\rho^{j}}{\underline h^{i+j}(t)}\phi_0(r) J_*(r-\rho){\rm d} \rho{\rm d} r\\ &-\int_{-K_*}^{0}\int_{0}^{K_*} \left(1+\sum_{1\leq i+j\leq N}C_{i,j}\frac{r^i\rho^j}{\underline h^{i+j}(t)}\right)\frac{NK_*^2}{4(r+\underline h(t))(\rho+\underline h(t)) }\phi_0(r) J_*(r-\rho){\rm d} \rho{\rm d} r\\ \geq &\ C_{0,1}\displaystyle\int_{-K_*}^{0}\int_{0}^{K_*} \frac{(r+\rho) }{\underline h(t)}\phi_0(r) J_*(r-\rho){\rm d} \rho{\rm d} r -\sum_{2\leq i+j\leq N}|C_{i,j}|\frac{K_*^{i+j+2}\|J_*\|_{L^\yy}u^*}{\underline h^{i+j}(t)}-\frac{NK_*^4\|J_*\|_{L^\yy}u^*}{2\underline h^2(t) }\\ \geq &\ C_{0,1}\displaystyle\int_{-K_*}^{0}\int_{0}^{K_*} \frac{(r+\rho) }{\underline h(t)}\phi_0(r) J_*(r-\rho){\rm d} \rho{\rm d} r -\frac{\big(\sum_{2\leq i+j\leq N}C_{i,j}K_*^{i+j+2}+NK_*^4\big)\|J_*\|_{L^\yy}u^*}{\underline h^{2}(t)}\\ =:&\ \frac{\tilde B}{\underline h(t)}-\frac{D(N)}{\underline h^{2}(t)}; \end{align*} and when $N=2$, similarly \begin{align*} A(2)\geq &\displaystyle\sum_{1\leq i+j\leq 2}C_{i,j}\int_{-K_*}^{0}\int_{0}^{K_*} \frac{ r^{i}\rho^{j}}{\underline h^{i+j}(t)}\phi_0(r) J_*(r-\rho){\rm d} \rho{\rm d} r\\ \geq &C_{0,1}\displaystyle\int_{-K_*}^{0}\int_{0}^{K_*} \frac{(r+\rho) }{\underline h(t)}\phi_0(r) J_*(r-\rho){\rm d} \rho{\rm d} r -\sum_{i+j=2}C_{i,j}\frac{K_*^{i+j+2}\|J_*\|_{L^\yy}u^*}{\underline h^{2}(t)}\\ =:&\ \frac{\tilde B}{\underline h(t)} -\frac{D(2)}{\underline h^{2}(t)}. \end{align*} From the proof of Lemma \ref{lemma3.10} we see $\tilde B<0$. Since $\underline h(t)\geq c_0\theta/2\gg 1$, \begin{align*} \mu\int_{-\underline h(t)}^0\int_0^\infty \phi_0(r)J_*(r-\rho)d\rho dr&=\mu\int_{-K_*}^0\int_0^\infty \phi_0(r)J_*(r-\rho)d\rho dr\\ &=\mu\int_{-\infty}^0\int_0^\infty \phi_0(r)J_*(r-\rho)d\rho dr=c_0. \end{align*} Putting all these together, we obtain, for $N\geq 2$ and $\theta\gg1$, \begin{align*} &\frac{\mu}{\underline h^{N-1}(t)}\displaystyle\int_{0}^{\underline h(t)} r^{N-1}\underline u(t,r)\int_{\underline h(t)}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r\\ \geq &\ (1-\epsilon(t))\big[c_0+\mu A(N)\big]\geq (1-\epsilon(t))\Big[c_0+\frac{\mu\tilde B}{\underline h(t)}-\frac{\mu D(N)}{\underline h^{2}(t)}\Big] \\ \geq &\ (1-2\epsilon(t))c_0=c_0-2c_0K_1(t+\theta)^{-1}\\ \geq &\ c_0-K_2(t+\theta)^{-1}=\underline h'(t) \ \mbox{ provided that $2c_0K_1\leq K_2$.} \end{align*} This completes Step 1. {\bf Step 2.} We prove the first inequality of \eqref{3.39}, namely, for $t>0$ and $r\in (\widetilde E \underline h(t),\underline h(t))$, \begin{align}\label{4.28} \underline u_t(t,r)\geq &d \int_{0}^{\underline h(t)} \tilde J(r,\rho) \underline u(t,\rho){\rm d} \rho - d\underline u(t,r)+f(\underline u(t,r)). \end{align} By the definition of $\underline u$, we have \begin{align*} \underline u_t(t,r)=&-(1-\epsilon(t))[c_0+\delta'(t)]\phi_0'(r-\underline h(t))-\epsilon'(t)\phi_0(r-\underline h(t))\\ =& -(1-\epsilon(t))c_0\phi'_0(r-\underline h(t))-(1-\epsilon(t)) \delta'(t)\phi_0'(r-\underline h(t))-\epsilon'(t)\phi_0(r-\underline h(t)). \end{align*} For $t>0$, $r\in (\widetilde E \underline h(t),\underline h(t))$ and $\theta\gg1$, using Lemma \ref{lemma3.11} we obtain \begin{align*} & -(1-\epsilon(t))c_0\phi'(r-\underline h(t))\\ = & (1-\epsilon(t)) \left[d \int_{-\yy}^{\underline h(t)} J_*(r-\rho) \phi_0(\rho-\underline h(t)){\rm d} \rho-d\phi_0(r-\underline h(t))+f(\phi_0(r-\underline h(t)))\right]\\ \leq & (1-\epsilon(t)) \bigg[d \int_{0}^{\underline h(t)} \tilde J(r,\rho) \phi_0(\rho-\underline h(t)){\rm d} \rho-d\phi_0(r-\underline h(t))+f(\phi_0(r-\underline h(t)))\bigg]\\ &- (1-\epsilon(t))d\left[ \frac{N-1}r\int_{-K_*}^{\min\{h(t)-r, K_*\}} \rho J_*(\rho) \phi_0(\rho+r-\underline h(t)){\rm d} \rho -\frac{NK_*^2\|\phi_0\|_{L^\infty}}{r^2}\right]\\ \leq &\ d \int_{0}^{\underline h(t)} \tilde J(r,\rho) \underline u(t,\rho){\rm d} \rho-d\underline u(t,r)+(1-\epsilon(t))f(\phi_0(r-\underline h(t)))+\frac{2dNK_*u^*}{\widetilde E\underline h(t)} . \end{align*} Hence, for such $r,\ t$ and $\theta$, \begin{align*} \underline u_t(t,r)\leq d \int_{0}^{\underline h(t)} \tilde J(r,\rho) \underline u(t,\rho){\rm d} \rho-d \underline u(t,r)+f(\underline u(t,r))+B(r), \end{align*} with \begin{align*} B(r)=B(t,r)=:&(1-\epsilon(t))f(\phi_0(r-\underline h(t)))-f(\underline u(t,r))\\ &-(1-\epsilon(t))\delta'(t)\phi'_0(r-\underline h(t))-\epsilon'(t)\phi_0(r-\underline h(t))+\frac{2dNK_*u^*}{\widetilde E\underline h(t)}. \end{align*} To complete the proof, it remains to verify $B(r)\leq 0$, and we do so for $r\in [\underline h(t)-L,\underline h(t)]$ and $r\in [\tilde E\underline h(t), \underline h(t)-L]$, separately, where $L$ is a positive constant to be determined. For $r\in [\tilde E\underline h(t), \underline h(t)-L]$, by similar arguments to those leading to \eqref{3.33a}, we know that for large $L>0$ there exists $\widetilde C=\widetilde C(L)>0$ such that \begin{align*} (1-\epsilon(t))f(\phi_0(r-\underline h(t)))-f(\underline u(t,r))\leq -\widetilde C \epsilon(t) \mbox{ for all } t>0. \end{align*} Hence, for such $L$, due to $\delta'(t)\phi'_0(r-\underline h(t))\geq 0$ and \eqref{3.38}, we obtain, for $r\in [\tilde E\underline h(t), \underline h(t)-L]$ and $t>0$, \begin{align*} B(r)\leq& -\widetilde C\epsilon(t)-\epsilon'(t)\phi_0(r-\underline h(t))+\frac{2dNK_*u^*}{\widetilde E\underline h(t)}\\ \leq&- \widetilde C\frac{K_1 }{t+\theta}+\frac{K_1u^*}{(t+\theta)^2}+\frac{2dNK_*u^*}{\widetilde Ec_0(t+\theta)} \\ =&\ \frac{1 }{t+\theta}\left(-K_1\widetilde C +\frac{K_1u^*}{t+\theta}+\frac{2dNK_*u^*}{\widetilde Ec_0} \right)\leq 0 \end{align*} if $\theta$ is large and \begin{align*} K_1\widetilde C\geq \frac{3dNK_*u^*}{\widetilde Ec_0}. \end{align*} Denote $C_L=\inf_{\xi\in [-L,0]} [-\phi'_0(\xi)]>0$. For $r\in [\underline h(t)-L,\underline h(t)]$, $t>0$ and $\theta\gg 1$, using $1-\epsilon(t)\geq 1/2$, \eqref{3.38}, and {\bf (f)}, we deduce \begin{align*} B(r)\leq &-(1-\epsilon(t))\delta'(t)\phi'_0(r-\underline h(t))-\epsilon'(t)\phi_0(r-\underline h(t))+\frac{2dNK_*u^*}{\widetilde E\underline h(t)}\\ \leq& -\frac{1}{2}\frac{K_2C_L}{t+\theta}+\frac{K_1u^*}{(t+\theta)^2}+\frac{2dNK_*u^*}{\widetilde Ec_0(t+\theta)} \\ =&\ \frac{1}{t+\theta}\left[-\frac{K_2C_L}{2}+\frac{K_1u^*}{t+\theta}+\frac{2dNK_*u^*}{\widetilde Ec_0}\right]\leq 0 \end{align*} for large $\theta$ and \begin{align*} K_2C_L\geq \frac{5dNK_*u^*}{\widetilde Ec_0}. \end{align*} This concludes Step 2. {\bf Step 3}. We verify the last two inequalities of \eqref{3.39}. We now fixed $K_1$, $K_2$ and $\theta$ such that the conclusions in Step 1 and Step 2 hold. Then from Lemma \ref{lemma3.12}, $K_1\geq E_2/u^*$ and $\widetilde E\underline h(t)\leq \widetilde Ec_0(t+\theta)=E_1(t+\theta)$, we see that there is $t_0>0$ such that \begin{align*} \underline u(t,r)\leq \left(1-\frac{K_1}{t+\theta}\right) u^*\leq u^*-\frac{E_2}{t+\theta}\leq u(t+t_0,r)\ \mbox{ for } \ t>0,\; r\in [0,\widetilde E\underline h(t)]. \end{align*} Moreover, since spreading happens, by enlarging $t_0$ if necessary we may assume $\underline h(0)=c_0\theta \leq h(t_0)$ and \begin{align*} \underline u(0,r)\leq (1-\epsilon(0))u^*\leq u(t_0,r)\ \mbox{ for } r\in [0,\underline h(0)]. \end{align*} Evidently $\underline u(t,\underline h(t))\equiv 0$. Therefore the last two inequalities of \eqref{3.39} are satisfied for the above chosen $t_0$. The proof of the lemma is now complete. \end{proof} \section{Rate of accelerated spreading} In this section, we consider the case that {\bf (J1)} is not satisfied by the kernel function $J$ and hence accelerated spreading can happen. We will focus on the class of $J$ satisfying $J(r)\approx r^{-\beta}$ near $\infty$, namely, \begin{align}\label{5.1} C_1r^{-\beta}\leq J(r)\leq C_2r^{-\beta} \end{align} for some positive constants $C_1$, $C_2$, and all $r\gg 1$. For such $J$, clearly {\bf (J1)} holds if and only if $\beta>N+1$, and {\bf (J)} holds if and only if $\beta>N$. So we will consider the case $\beta\in (N, N+1]$, which is the exact range that accelerated spreading can happen for \eqref{1.4} with such a kernel function $J$. We will determine the rate of $h(t)$ as $t\to\infty$ and prove Theorem \ref{th1.8}. \subsection{Some further estimates on $J_*$ and $\tilde J$.} \begin{lemma}\label{lemma5.1a} Assume \eqref{5.1} holds with $\beta\in (N,N+1]$. Then for $h\gg1$, \begin{equation}\label{5.2} \int_{0}^{h}\int_{h}^{\yy}J_*(r-\rho) {\rm d} \rho{\rm d} r\approx \begin{cases} \ h^{N+1-\beta} & {\rm when}\ \beta\in (N,N+1),\\[2mm] \ \ln h& {\rm when}\ \beta=N+1. \end{cases} \end{equation} and \begin{equation}\label{5.3b} \int_{0}^{h}\int_{h}^{\yy}\tilde J(r,\rho) {\rm d} \rho{\rm d} r\approx \begin{cases} \ h^{N+1-\beta}& {\rm when}\ \beta\in (N,N+1),\\[2mm] \ \ln h& {\rm when}\ \beta=N+1. \end{cases} \end{equation} \end{lemma} \begin{proof} To prove \eqref{5.2}, we first calculate \begin{align*} \int_{0}^{h}\int_{h}^{\yy}J_*(r-\rho) {\rm d} \rho {\rm d} r=\int_{-h}^{0}\int_{-r}^{\yy}J_*(\rho) {\rm d} \rho {\rm d} r=\int_{0}^{h} J_*(\rho) \rho{\rm d} \rho+h\int_{h}^{\yy} J_*(\rho) {\rm d} \rho. \end{align*} Moreover, by \eqref{1.10}, for $\rho\geq 1$ and $\beta\in (N, N+1]$, \begin{equation}\label{7.3}\begin{aligned} J_*(\rho) & =\omega_{N-1}\int_{\rho}^{\yy} (r^2-\rho^2)^{(N-3)/2} rJ(r){\rm d} r\approx \omega_{N-1}\int_{\rho}^{\yy} (r^2-\rho^2)^{(N-3)/2} r^{1-\beta}{\rm d} r\\ &=\omega_{N-1}\rho^{N-\beta-1}\int_{1}^{\yy} (\xi^2-1)^{(N-3)/2} \xi^{1-\beta}{\rm d} \xi \approx \rho^{N-\beta-1}. \end{aligned} \end{equation} Hence, for $\beta\in (N,N+1)$, \begin{align*} \int_{0}^{h}\int_{h}^{\yy}J_*(r-\rho) {\rm d} \rho {\rm d} r = \int_{0}^{1} J_*(\rho) \rho{\rm d} \rho+\int_{1}^{h} J_*(\rho) \rho{\rm d} \rho+h\int_{h}^{\yy} J_*(\rho) {\rm d} \rho\approx h^{N-\beta+1}, \end{align*} and for $\beta=N+1$, \begin{align*} \int_{0}^{h}\int_{h}^{\yy}J_*(r-\rho) {\rm d} \rho {\rm d} r= \int_{0}^{1} J_*(\rho) \rho{\rm d} \rho+\int_{1}^{h} J_*(\rho) \rho{\rm d} \rho+h\int_{h}^{\yy} J_*(\rho) {\rm d} \rho\approx \ln h. \end{align*} This proves \eqref{5.2}. We next prove \eqref{5.3b}, which is more involved. We write \begin{align*} &\int_{0}^{h}\int_{h}^{\yy} \tilde J(r,\rho) {\rm d} \rho {\rm d} r\\ =&\int_{h/2}^{h}\int_{h}^{2h} \tilde J(r,\rho) {\rm d} \rho {\rm d} r+\int_{0}^{h/2}\int_{h}^{2h} \tilde J(r,\rho) {\rm d} \rho {\rm d} r+\int_{0}^{h}\int_{2h}^{\yy} \tilde J(r,\rho) {\rm d} \rho {\rm d} r\\ =:&\ I+II+III. \end{align*} {\bf Step 1}. Upper bound for $I$. {\bf Case 1}. $N\geq 3$. From \eqref{2.3a} and \eqref{5.1}, for $|\rho-r|\geq 1$, \begin{align*} \tilde J(r,\rho)&= \omega_{N-1}\int_{|\rho-r|}^{\rho+r} (\rho/r)^{(N-1)/2}\left[\frac{(\rho+r)^2-\eta^2}{4r\rho }\right]^{(N-3)/2}[\eta^2-(\rho-r)^2]^{(N-3)/2}\eta J(\eta) {\rm d} \eta\\ &\leq \omega_{N-1}\int_{|\rho-r|}^{\rho+r} (\rho/r)^{(N-1)/2}[\eta^2-(\rho-r)^2]^{(N-3)/2}\eta J(\eta) {\rm d} \eta\\ &\leq(\rho/r)^{(N-1)/2}C_2\omega_{N-1}\int_{|\rho-r|}^{\rho+r} [\eta^2-(\rho-r)^2]^{(N-3)/2}\eta^{1-\beta} {\rm d} \eta\\ &\leq(\rho/r)^{(N-1)/2}C_2\omega_{N-1}\int_{|\rho-r|}^{\rho+r} \eta^{N-\beta-2} {\rm d} \eta\\ &\leq C\left(\frac{\rho}r\right)^{(N-1)/2}|\rho-r|^{N-\beta-1} \end{align*} for some $C>0$ independent of $r$ and $\rho$. Therefore, \begin{align*} I=&\int_{h/2}^{h-1}\int_{h}^{2h} \tilde J(r,\rho) {\rm d} \rho {\rm d} r+\int_{h-1}^{h}\int_{h}^{2h} \tilde J(r,\rho) {\rm d} \rho {\rm d} r\\ \leq &\int_{h/2}^{h-1}\int_{h}^{2h} \tilde J(r,\rho) {\rm d} \rho {\rm d} r+1\leq C\int_{h/2}^{h-1}\int_{h}^{2h}(\rho/r)^{(N-1)/2}(\rho-r)^{N-\beta-1} {\rm d} \rho {\rm d} r+1\\ \leq&\ 4^{(N-1)/2}C \int_{h/2}^{h-1}\int_{h}^{2h}(\rho-r)^{N-\beta-1} {\rm d} \rho {\rm d} r+1\\ =&\ \frac{4^{(N-1)/2}C}{\beta-N} \int_{h/2}^{h-1}[(h-r)^{N-\beta}-(2h-r)^{N-\beta}] {\rm d} r+1\\ =&\ \frac{4^{(N-1)/2}C}{\beta-N} \int_{1}^{h/2}[\xi^{N-\beta}-(h+\xi)^{N-\beta}] {\rm d} \xi+1\\ \leq &\ \tilde C h^{N-\beta+1} \ \mbox{ for $h\gg 1$ and some $\tilde C>0$ independent of $h$.} \end{align*} {\bf Case 2}. $N= 2$. By \eqref{2.3a} and \eqref{5.1}, for $|\rho-r|\geq 1$, $\rho\geq h$ and $r\geq h/2$ with $h\gg1$, we have \begin{align*} \tilde J(r,\rho)=&\ \omega_{1}\int_{|\rho-r|}^{\rho+r} (\rho/r)^{1/2}\left[\frac{(\rho+r)^2-\eta^2}{4r\rho }\right]^{-1/2}[\eta^2-(\rho-r)^2]^{-1/2}\eta J(\eta) {\rm d} \eta\\ \leq&\ C_2\omega_{0}\int_{|\rho-r|}^{\rho+r} (\rho/r)^{1/2}\left[\frac{(\rho+r)^2-\eta^2}{4r\rho }\right]^{-1/2}[\eta^2-(\rho-r)^2]^{-1/2}\eta^{1-\beta} {\rm d} \eta\\ =&\ C_2\omega_{1}\left(\int_{|\rho-r|}^{\theta_1|\rho-r|}+\int_{\theta_1|\rho-r|}^{\theta_2(\rho+r)} +\int_{\theta_2(\rho+r)}^{\rho+r}\right ) (\rho/r)^{1/2}\left[\frac{(\rho+r)^2-\eta^2}{4r\rho }\right]^{-1/2}[\eta^2-(\rho-r)^2]^{-1/2}\eta^{1-\beta} {\rm d} \eta \end{align*} where the constants $\theta_2<1<\theta_1$ are chosen to be close to 1. Clearly, for such $\rho$ and $r$, \begin{align*} &\int_{|\rho-r|}^{\theta_1|\rho-r|} \left[\frac{(\rho+r)^2-\eta^2}{4r\rho }\right]^{-1/2}[\eta^2-(\rho-r)^2]^{-1/2}\eta^{1-\beta} {\rm d} \eta\\ \leq&\left[\frac{(\rho+r)^2-\theta_1^2(\rho-r)^2}{4r\rho }\right]^{-1/2}|\rho-r|^{1-\beta}\int_{|\rho-r|}^{\theta_1|\rho-r|} [\eta^2-(\rho-r)^2]^{-1/2} {\rm d} \eta\\ =&\left[\frac{(\rho+r)^2-\theta_1^2(\rho-r)^2}{4r\rho }\right]^{-1/2}|\rho-r|^{1-\beta}\int_{1}^{\theta_1} [\xi^2-1]^{-1/2} {\rm d} \xi, \end{align*} and \begin{align*} &\int_{\theta_1|\rho-r|}^{\theta_2(\rho+r)} \left[\frac{(\rho+r)^2-\eta^2}{4r\rho }\right]^{-1/2}[\eta^2-(\rho-r)^2]^{-1/2}\eta^{1-\beta} {\rm d} \eta\\ \leq&\ \left[(1-\theta_2^2)\frac{(\rho+r)^2}{4r\rho }\right]^{-1/2}\int_{\theta_1|\rho-r|}^{\theta_2(\rho+r)} [(1-1/\theta_1^2)\eta^2]^{-1/2}\eta^{1-\beta} {\rm d} \eta \\ =&\frac{(1-1/\theta_1^2)^{-1/2}}{\beta-1}\left[(1-\theta_2^2)\frac{(\rho+r)^2}{4r\rho }\right]^{-1/2}[\theta_1^{1-\beta}|\rho-r|^{1-\beta}-\theta_2^{1-\beta}(\rho+r)^{1-\beta}]\\ \leq&\ \tilde C_1 \left[\frac{(\rho+r)^2}{4r\rho }\right]^{-1/2}|\rho-r|^{1-\beta} \mbox{ for some $\tilde C_1>0$ independent of $r$ and $\rho$}, \end{align*} and \begin{align*} &\int_{\theta_2(\rho+r)}^{\rho+r} \left[\frac{(\rho+r)^2-\eta^2}{4r\rho }\right]^{-1/2}[\eta^2-(\rho-r)^2]^{-1/2}\eta^{1-\beta} {\rm d} \eta\\ \leq&\int_{\theta_2(\rho+r)}^{\rho+r} \left[\frac{(\rho+r)^2-\eta^2}{4r\rho }\right]^{-1/2}[(1-1/\theta_1^2)\eta^2]^{-1/2}\eta^{1-\beta} {\rm d} \eta\\ \leq&\ (1-1/\theta_1^2)^{-1/2}\theta_2^{-\beta}(\rho+r)^{-\beta}\int_{\theta_2(\rho+r)}^{\rho+r} \left[\frac{(\rho+r)^2-\eta^2}{4r\rho }\right]^{-1/2} {\rm d} \eta\\ =&\ (1-1/\theta_1^2)^{-1/2}\theta_2^{-\beta}(\rho+r)^{-\beta}(4r\rho)^{1/2}\int_{\theta_2}^{1}[1-\xi^2]^{-1/2} {\rm d} \xi\\ =&\ \tilde C_2(\rho+r)^{-\beta}(4r\rho)^{1/2} \mbox{ for some $\tilde C_2>0$ independent of $r$ and $\rho$}. \end{align*} Moreover, for $(r,\rho)\in [h/2,h-1]\times [h,2h]$ with $h\gg 1$, we have $\rho/r\leq 4$ and \begin{align*} \frac{\rho-r}{\rho+r}=1-\frac{2}{\rho/r+1}\leq \frac{3}{5}. \end{align*} Therefore \begin{align*} &\left[\frac{(\rho+r)^2-\theta_1^2(\rho-r)^2}{4l\rho }\right]^{-1/2}\leq \left[\frac{(1-9\theta_1^2/25)(\rho+r)^2}{4r\rho }\right]^{-1/2}\\ \leq& \left[\frac{(1-9\theta_1^2/25)\times 9h^2/4}{8h^2 }\right]^{-1/2}=\left[\frac{9(1-9\theta_1^2/25)}{32 }\right]^{-1/2}, \end{align*} and \begin{align*} \left[\frac{(\rho+r)^2}{4r\rho }\right]^{-1/2}\leq \left[\frac{9}{32 }\right]^{-1/2}. \end{align*} Thus our earlier inequalities yield, for $(r,\rho)\in [h/2,h-1]\times [h,2h]$ with $h\gg 1$, \begin{align*} \tilde J(r,\rho)\leq A_1(\rho-r)^{1-\beta}+A_2h^{1-\beta}, \end{align*} where $A_1$ and $A_2$ are positive constants independent of $r$ and $\rho$. We may now use similar calculation as in Case 1 to obtain \begin{align*} I=&\int_{h/2}^{h-1}\int_{h}^{2h} \tilde J(r,\rho) {\rm d} \rho {\rm d} r+\int_{h-1}^{h}\int_{h}^{2h} \tilde J(r,\rho) {\rm d} \rho {\rm d} r\\ \leq &\int_{h/2}^{h-1}\int_{h}^{2h} \tilde J(r,\rho) {\rm d} \rho {\rm d} r+1\leq \int_{h/2}^{h-1}\int_{h}^{2h}[A_1(\rho-r)^{1-\beta}+A_2h^{1-\beta}] {\rm d} \rho {\rm d} r+1\\ \leq&\ \tilde C_3 h^{3-\beta} =\tilde C_3 h^{N-\beta+1} \mbox{ for $h\gg 1$ and some $\tilde C_3>0$ independent of $h$}. \end{align*} {\bf Step 2}. Upper bound for $II$. Using of the definition of $ \tilde J$, we have \begin{align*} II=&\int_0^{h/2} \left[\int_{B_{2h}\backslash B_h} J(|x_r^1-y|) {\rm d} y\right] {\rm d} r, \end{align*} where \begin{align*} &x_r^1:=(r,0,\cdots,0)\in{\mathbb R}^N. \end{align*} Set \begin{align*} \Omega:=\left\{z=(z_1,z_2,\cdots,z_N): z_1\in [0,h/2], |z_i|\leq \Lambda h,\ 2\leq i\leq N\right\} \end{align*} with $\Lambda:=\frac{1}{2}\sqrt{\frac 3{N-1}}$. Then $\Omega\subset B_h$ because $(h/2)^2+(N-1)\Lambda ^2 h^2< h^2$. Define \begin{align*} &\Omega^{(1)}:=\left\{z=(z_1,z_2,\cdots,z_N): z_1\in (-\yy,0)\cup (h/2,\yy)\ {\rm and}\ z_i\in {\mathbb R}\ {\rm for}\ 2\leq i\leq N\right\},\\ & \Omega^{(j)}:=\left\{z=(z_1,z_2,\cdots,z_N): |z_j|>\Lambda h\ {\rm and}\ z_i\in {\mathbb R}\ {\rm for}\ i\neq j\right\},\ \ 2\leq j\leq N. \end{align*} Then \begin{align*} B_{2h}\backslash B_h\subset {\mathbb R}^N\backslash B_h\subset {\mathbb R}^N\backslash \Omega\subset \cup_{j=1}^{N} \Omega_2^{(j)}. \end{align*} and so \begin{align*} II \leq \sum_{j=1}^{N} \int_0^{h/2} \left[\int_{\Omega^{(j)}} J(|x_r^1-y|) {\rm d} y\right] {\rm d} r. \end{align*} By the definition of $J_*$, we deduce \begin{align*} &\int_0^{h/2} \int_{\Omega^{(1)}} J(|x_r^1-y|) {\rm d} y {\rm d} r\\ =&\int_{0}^{h/2} \int_{h/2}^{\yy} J_*(r-\rho) {\rm d} \rho {\rm d} r+\int_{0}^{h/2} \int_{-\yy}^{0} J_*(r-\rho) {\rm d} \rho {\rm d} r\\ =&\ 2\int_0^{h/2} \int_{h/2}^{\yy} J_*(r-\rho) {\rm d} \rho {\rm d} r, \end{align*} and for $2\leq j\leq N$, \begin{align*} \int_0^{h/2} \int_{\Omega^{(j)}} J(|x_r^1-y|) {\rm d} y {\rm d} r=h \int_{\Lambda h}^{\yy} J_*(r) {\rm d} r. \end{align*} Hence, \begin{align*} II\leq 2\int^{h/2}_{0} \int_{h/2}^{\yy} J_*(r-\rho) {\rm d} \rho {\rm d} r+(N-1)h \int_{\Lambda h}^{\yy} J_*(r) {\rm d} r. \end{align*} Making use of \eqref{5.2} and $J_*(r)\approx r^{N-\beta-1}$, we deduce for $\beta\in (N,N+1)$, \begin{align*} 2\int_0^{h/2} \int_{h/2}^{\yy} J_*(r-\rho) {\rm d} \rho {\rm d} r+(N-1)h \int_{\Lambda h}^{\yy} J_*(r) {\rm d} r \approx h^{N+1-\beta}, \end{align*} and for $\beta=N+1$, \begin{align*} 2\int_0^{h/2} \int_{h/2}^{\yy} J_*(r-\rho) {\rm d} \rho {\rm d} r+(N-1)h \int_{\Lambda h}^{\yy} J_*(r) {\rm d} r \approx \ln h. \end{align*} Therefore there exists $\tilde C_4>0$ such that for all large $h>0$, \[ II\leq \begin{cases} \tilde C_4 h^{N+1-\beta} & \mbox{ when } \beta\in (N, N+1),\\ \tilde C_4 \ln h & \mbox{ when } \beta =N+1. \end{cases} \] {\bf Step 3}. Upper bound of $III$. By similar analysis as in Step 2, we have, for $\beta\in (N,N+1]$ and $h\gg 1$, \begin{align*} III\leq &\ 2\int^{h}_{0} \int_{h}^{\yy} J_*(r-\rho) {\rm d} \rho {\rm d} r+2(N-1)h \int_{2 \Lambda h}^{\yy} J_*(r) {\rm d} r\\ \leq& \begin{cases} \tilde C_5 h^{N+1-\beta} & \mbox{ when } \beta\in (N, N+1),\\ \tilde C_5 \ln h & \mbox{ when } \beta=N+1, \end{cases} \end{align*} for some $\tilde C_5>0$ independent of $h$. {\bf Step 4}. Completion of the proof of \eqref{5.3b}. Combining the above estimates for $I, II$ and $III$, we obtain \[ \int_{0}^{h}\int_{h}^{\yy}\tilde J(r,\rho) {\rm d} \rho{\rm d} r\leq \begin{cases} \hat C h^{N+1-\beta} & \mbox{ when } \beta\in (N, N+1),\\ \hat C \ln h & \mbox{ when } \beta=N+1, \end{cases} \] for $h\gg 1$ and some $\hat C>0$ independent of $h$. To complete the proof of \eqref{5.3b}, it remains to obtain a similar lower bound for $\displaystyle\int_{0}^{h}\int_{h}^{\yy}\tilde J(r,\rho) {\rm d} \rho{\rm d} r$. In view of the definition of $ \tilde J$ and $J_*$, we have \begin{equation}\label{5.6a} \begin{aligned} \int_{0}^{h}\int_{h}^{\yy}\tilde J(r,\rho) {\rm d} \rho{\rm d} r =&\int_0^h \left[\int_{{\mathbb R}^N\backslash B_h} J(|x_r^1-y|) {\rm d} y\right] {\rm d} r \\ \geq &\int_0^h \left[\int_{\{y_1\geq h\}\cap{\mathbb R}^N} J(|x_r^1-y|) {\rm d} y\right] {\rm d} r=\int_{0}^{h} \int_{h}^{\yy} J_*(r-\rho) {\rm d} \rho {\rm d} r, \end{aligned} \end{equation} and the desired lower bound follows from \eqref{5.2}. The proof is complete. \end{proof} \subsection{Proof of Theorem \ref{th1.8}} \begin{lemma}\label{lemma5.2b} If spreading happens and \eqref{5.1} holds with $\beta\in (N,N+1]$, then there exits $C=C(\beta,N)>0$ such that for $t\gg 1$, \begin{equation}\label{5.3a} h(t)\leq \begin{cases} Ct^{1/(\beta-N)}&{\rm if}\ \beta\in (N,N+1),\\ Ct\ln t&{\rm if}\ \beta=N+1. \end{cases} \end{equation} \end{lemma} \begin{proof} Clearly, $\tilde u(t,r)\leq 2u^*$ for large $t>0$. By \eqref{1.4}, \begin{align*} h'(t)=\frac{\mu}{h^{N-1}(t)} \displaystyle\int_{0}^{h(t)} r^{N-1}\tilde u(t,r)\int_{h(t)}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r \leq 2u^* \mu\displaystyle\int_{0}^{h(t)}\int_{h(t)}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r, \end{align*} and so \eqref{5.3a} follows easily from Lemma \ref{lemma5.1a}. \end{proof} \begin{lemma}{\rm \cite[Lemma 5.3]{dn-speed}}\label{lemma5.3a} Let $L_1$ and $L_2$ with $0<L_1<L_2$ be two constants, and define \begin{align*} \psi(x)=\psi(x;L_1,L_2):=\min\left\{1,\frac{L_2-|x|}{L_1}\right\},\ \ \ \ x\in {\mathbb R}. \end{align*} If $J_1\in C({\mathbb R})\cap L^\infty({\mathbb R})$ satisfies \begin{align}\label{5.4a} J_1(x)=J_1(-x)\geq 0 ,\ J_1(0)>0,\ \int_{{\mathbb R}}J_1(x){\rm d} x=1, \end{align} then for any given small $\epsilon>0$, there exists $L_\epsilon\gg 1$ depending on $J_1$ and $\epsilon$ such that \begin{align*} \int_{0}^{L_2} J_1(x-y)\psi(y){\rm d} y\geq (1-\epsilon) \psi(x) \mbox{ for } x\in [L_\epsilon,L_2], \end{align*} provided that $L_1\geq L_\epsilon$ and $L_2-L_1\geq L_\epsilon$. \end{lemma} \begin{lemma}\label{lemma5.4} Let $L_1$, $L_2$ and $\psi$ be defined as in Lemma \ref{lemma5.3a}. If\, {\bf (J1)} holds, then for any small $\epsilon>0$, there are $L_\epsilon>0$, $D_1=D_1(\epsilon)>0$ and $D_2=D_2(\epsilon)>0$ such that for $L_1>L_\epsilon$ and $L_2-L_1>2L_\epsilon$, we have \begin{equation}\label{5.8b} \int_{0}^{L_2} \tilde J(r,\rho)\psi(\rho){\rm d} \rho\geq \begin{cases} (1-\epsilon) \psi(r),& r\in [0,(L_2-L_1)/2],\\[3mm] (1-\epsilon) \psi(r)-\frac{D_1}{L_1r}-\frac{D_2}{r^2},& r\in [(L_2-L_1)/2,L_2]. \end{cases} \end{equation} \end{lemma} \begin{proof} For fixed $K_*>1$, define \begin{equation*} \xi_{K_*}(x):=\begin{cases} 1,& |x|\leq K_*-1,\\ K_*-|x|, & K_*-1\leq |x|\leq K_*,\\ 0,& |x|\geq K_*, \end{cases} \end{equation*} and \begin{align*} P(x):=\xi_{K_*}(|x|)J(|x|),\ \ P_1(x):=\frac{P(x)}{\|P\|_{L^1}}\ \mbox{ for } \ \ x\in {\mathbb R}^N. \end{align*} Since $\|J\|_{L^1}=1$, for given small $\epsilon>0$, we can fix $K_*$ large so that \[ \|P\|_{L^1}=\int_{{\mathbb R}^N}P(|x|) {\rm d} x\geq \frac{1-\epsilon}{1-\epsilon/2}. \] Clearly $P$ and $P_1$ are compactly supported. Define \begin{align*} P_*(\rho):=\omega_{N-1}\int_{|\rho|}^{\yy} (\eta^2-\rho^2)^{(N-3)/2} \eta P_1(\eta){\rm d} \eta, \ \ \rho\in {\mathbb R}. \end{align*} Then by \eqref{1.10}, we know that \eqref{5.4a} holds with $J_1=P_*$. It then follows from Lemma \ref{lemma5.3a} that there exists $L_\epsilon\gg 1$ such that for all $L_1\geq L_\epsilon$ and $L_2-L_1\geq 2 L_\epsilon$, \begin{align}\label{5.9} \int_{0}^{L_2} P_*(r-\rho)\psi(\rho){\rm d} \rho\geq (1-\epsilon/2) \psi(r),\ \ \ r\in [L_\epsilon,L_2]. \end{align} Denote $A:=(L_2-L_1)/2$. We now prove \eqref{5.8b} for $r\in [0,A]$. Using the definition of $\tilde J$, we see that for $r\in [0,A]$, \begin{align*} &\int_{0}^{L_2} \tilde J(r,\rho)\psi(\rho){\rm d} \rho\geq \int_{0}^{L_2-L_1} \tilde J(r,\rho)\psi(\rho){\rm d} \rho=\int_{0}^{L_2-L_1} \tilde J(r,\rho){\rm d} \rho\\ =&\int_{B_{L_2-L_1}(x_r^1)} J(|x_r^1-y|){\rm d} y\geq \int_{B_{L_2-L_1-A}(0)} J(|y|){\rm d} y\geq 1-\epsilon=(1-\epsilon)\psi(r), \end{align*} where $x_r^1:=(r,0\cdots,0)$, $B_{L_2-L_1}(x_r^1)=\{y\in {\mathbb R}^N: |x_r^1-y|\leq L_2-L_1\}$, and we have used $L_2-L_1-A=( L_2-L_1)/2\gg 1$. We next show \eqref{5.8b} for $r\in [A,L_2]$. Define \begin{align*} \widetilde P(r,\rho):=\omega_{N-1}2^{3-N}\frac\rho{r^{N-2}}\int_{|\rho-r|}^{\rho+r} \left(\big[(\rho+r)^2-\eta^2\big]\big[\eta^2-(\rho-r)^2\big]\right)^{(N-3)/2}\eta P_1(\eta) {\rm d} \eta. \end{align*} For $r\in [A,L_2]$, since $ A\gg 1$, by Lemma \ref{lemma3.11}, there exist $B_1>0$ and $B_2>0$ such that \begin{align*} \int_{0}^{L_2} \widetilde P(r,\rho) \psi(\rho){\rm d} \rho\geq& \int_{0}^{ L_2} P_*(r-\rho) \psi(\rho){\rm d} \rho+\frac{B_1} r\int_{-K_*}^{\min\{L_2-r, K_*\}} \rho P_*(\rho) \psi(\rho+l){\rm d} \rho\nonumber -\frac{B_2}{r^2}\\ \geq& \int_{0}^{ L_2} P_*(r-\rho) \psi(\rho){\rm d} \rho+\frac{B_1} r \int_{-K_*}^{ K_*} \rho P_*(\rho) \psi(\rho+r){\rm d} \rho\nonumber -\frac{B_2}{r^2}, \end{align*} because $\psi(\rho+r)\leq 0$ for $\rho+r\geq L_2$. This combined with \eqref{5.9} yields, for $r\in [A,L_2]$, \begin{align*} \int_{0}^{L_2} \widetilde P(r,\rho) \psi(\rho){\rm d} \rho\geq (1-\epsilon/2) \psi(r)+\frac{B_1}r \int_{-K_*}^{ K_*} \rho P_*(\rho) \psi(\rho+r){\rm d} \rho -\frac{B_2}{r^2}. \end{align*} Recalling that $\widetilde P(r,\rho)\leq \frac{1}{\|P\|_{L^1}}\tilde J(r,\rho)$ and $\|P\|_{L^1}\geq (1-\epsilon)/(1-\epsilon/2)$, we deduce, for $ r\in [A, L_2]$, \begin{align*} \int_{0}^{L_2} \widetilde J(r,\rho) \psi(\rho){\rm d} \rho\geq (1-\epsilon) \psi(r)+\frac{\|P\|_{L^1}B_1} r \int_{-K_*}^{ K_*} \rho P_*(\rho) \psi(\rho+r){\rm d} \rho -\frac{\|P\|_{L^1}B_2}{r^2}. \end{align*} To completes the proof of \eqref{5.8b}, it remains to estimate $\int_{-K_*}^{ K_*} \rho P_*(\rho) \psi(\rho+r){\rm d} \rho$. Obviously, for $r\in [0,(L_2-L_1)-K_*]$, \begin{align*} \int_{-K_*}^{ K_*} \rho P_*(\rho) \psi(\rho+r){\rm d} \rho=\int_{-K_*}^{ K_*} \rho P_*(\rho) {\rm d} \rho=0, \end{align*} and for $r\in [(L_2-L_1)-K_*,(L_2-L_1)+K_*]$, \begin{align*} \int_{-K_*}^{ K_*} \rho P_*(\rho) \psi(\rho+r){\rm d} \rho=& \int_{-K_*}^{ (L_2-L_1)-r} \rho P_*(\rho) \psi(\rho+r){\rm d} \rho+\int_{ (L_2-L_1)-r}^{K_*} \rho P_*(\rho) \psi(\rho+r){\rm d} \rho\\ =&\int_{-K_*}^{ (L_2-L_1)-r} \rho P_*(\rho){\rm d} \rho+\int_{ (L_2-L_1)-r}^{K_*} \rho P_*(\rho) \frac{L_2-(\rho+r)}{L_1}{\rm d} \rho\\ =&\int_{ (L_2-L_1)-r}^{K_*} \rho P_*(\rho) \left[\frac{L_2-(\rho+r)}{L_1}-1\right]{\rm d} \rho\\ =&\int_{ (L_2-L_1)-r}^{K_*} \rho P_*(\rho) \frac{L_2-L_1-r}{L_1}{\rm d} \rho+\int_{ (L_2-L_1)-r}^{K_*} \rho P_*(\rho) \frac{-\rho}{L_1}{\rm d} \rho\\ \geq&\frac{-K_*|L_2-L_1-r|}{L_1}\int_{ (L_2-L_1)-r}^{K_*} P_*(\rho) {\rm d} \rho-\frac{K_*^2}{L_1}\int_{ (L_2-L_1)-r}^{K_*} P_*(\rho) {\rm d} \rho\\ \geq&\frac{-2K_*^2}{L_1}, \end{align*} and for $r\in [(L_2-L_1)+K_*, L_2]$ \begin{align*} \int_{-K_*}^{ K_*} \rho P_*(\rho) \psi(\rho+r){\rm d} \rho=&\int_{-K_*}^{ K_*} \rho P_*(\rho) \frac{L_2-(\rho+r)}{L_1}{\rm d} \rho\\ =&\int_{-K_*}^{ K_*} \rho P_*(\rho) \frac{-\rho}{L_1}{\rm d} \rho\geq \frac{-K_*^2}{L_1}. \end{align*} Thus \eqref{5.8b} holds with $D_1=2K_*^2\|P_1\|_{L^1}B_1$ and $D_2=\|P_1\|_{L^1}B_2$. \end{proof} \begin{lemma}\label{lemma5.5} If spreading happens and \eqref{5.1} holds with $\beta\in (N,N+1)$, then there exists $C>0$ such that \begin{align}\label{5.12a} h(t)\geq Ct^{1/(\beta-N)}\ \mbox{ for } t\gg 1. \end{align} \end{lemma} \begin{proof} Define \begin{align*} &\underline h(t):=(K_1t+\theta)^{1/(\beta-N)},\ \ t\geq 0,\\ & \underline u(t,r):=K_2\min\left\{1,2\frac{\underline h(t)-r}{\underline h(t)}\right\}, \ \ \ t\geq 0,\ r\in [0, \underline h(t)] \end{align*} with $\theta\gg 1$ and $K_1,\ K_2>0$ constants to be determined. {\bf Step 1.} We prove that by choosing $\theta\gg1$ and $K_1>0$ suitably small, \begin{align}\label{5.8a} &\underline h'(t)\leq \frac{\mu}{\underline h^{N-1}(t)}\displaystyle\int_{0}^{\underline h(t)} r^{N-1}\underline u(t,r)\int_{\underline h(t)}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r \ \mbox{ for }\ t> 0. \end{align} By similar argument leading to \eqref{5.6a}, and by \eqref{7.3}, we obtain \begin{align*} &\frac{\mu}{\underline h^{N-1}(t)}\displaystyle\int_{0}^{\underline h(t)} r^{N-1}\underline u(t,r)\int_{\underline h(t)}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r \geq \frac{\mu}{ \underline h^{N-1}(t)}\displaystyle\int_{\underline h(t)/2}^{\underline h(t)} r^{N-1}\underline u(t,r)\int_{\underline h(t)}^{+\yy} J_*(r-\rho){\rm d} \rho{\rm d} r\\ \geq&\ 2^{-(N-1)}\mu\displaystyle\int_{\underline h(t)/2}^{\underline h(t)} \frac{\underline h(t)-r}{\underline h(t)}\int_{\underline h(t)}^{+\yy} J_*(r-\rho){\rm d} \rho{\rm d} r =\frac{2^{-(N-1)}}{\underline h(t)}\mu\displaystyle\int_{-\underline h(t)/2}^{0} (-r)\int_{0}^{+\yy} J_*(r-\rho){\rm d} \rho{\rm d} r\\ =&\ \frac{2^{-(N-1)}}{\underline h(t)}\mu\displaystyle\int_{-\underline h(t)/2}^{0} (-r)\int_{-r}^{+\yy} J_*(\rho){\rm d} \rho{\rm d} r =\frac{2^{-(N-1)}}{\underline h(t)}\mu\displaystyle\left(\int_0^{\underline h(t)/2} \int_{0}^{\rho}+\int_{\underline h(t)/2}^{\yy} \int_{0}^{\underline h(t)/2}\right) J_*(\rho)r {\rm d} r{\rm d} \rho\\ \geq&\ \frac{2^{-(N-1)}}{\underline h(t)}\mu\displaystyle\int_0^{\underline h(t)/2} \int_{0}^{\rho} J_*(\rho)r {\rm d} r{\rm d} \rho\geq \frac{2^{-(N-1)}}{\underline h(t)}\mu\displaystyle\int_1^{\underline h(t)/2} J_*(\rho)\rho^2{\rm d} \rho\geq \mu A_1 \underline h^{N+1-\beta}(t) \end{align*} for some $A_1=A_1(N,\beta)>0$ since $\underline h(t)\geq \theta^{1/(\beta-N)}\gg 1$. Hence \begin{align*} \underline h'(t)&= \frac{K_1}{\beta-N}(K_1t+\theta)^{1/(\beta-N)-1}\leq \mu A_1 (K_1t+\theta)^{(1/(\beta-N)-1}= \mu A_1 \underline h^{N+1-\beta}(t)\\ &\leq \frac{\mu}{\underline h^{N-1}(t)}\displaystyle\int_{0}^{\underline h(t)} r^{N-1}\underline u(t,r)\int_{\underline h(t)}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r\ \ \mbox{ provided } \frac{K_1}{\beta-N}\leq \mu A_1. \end{align*} {\bf Step 2.} We show that by choosing $\theta\gg1$ and $K_1, K_2>0$ suitably small, for $t>0$, $r\in [0,\underline h(t))\backslash \{\underline h(t)/2\}$, \begin{align}\label{5.14a} \underline u_t(t,r)\leq d \int_{0}^{\underline h(t)} \tilde{J}(r, \rho) \underline u(t,\rho){\rm d} \rho -d\,\underline u(t,r)+f(\underline u(t,r)). \end{align} {\bf Claim}. For $r\in [\underline h(t)/4,\underline h(t)]$, there is $\xi=\xi(N,\beta)>0$ such that \begin{align}\label{5.15a} \int_{0}^{\underline h(t)} \tilde J(r,\rho) \underline u(t,\rho){\rm d} \rho\geq K_2\xi \underline h^{N-\beta}(t). \end{align} We first estimate $\tilde J(r,\rho)$. For $r\in [\underline h(t)/4,\underline h(t)]$ and $\rho\in [\underline h(t)/8,\underline h(t)]$, a simple calculation gives \begin{align*} |\rho-r|\leq \frac{7}{9}(\rho +r). \end{align*} Fix $1<\xi_1<\xi_2< 9/7$. Then from Lemma \ref{lemma2.2} and \eqref{5.1}, we deduce for $r\in [\underline h(t)/4,\underline h(t)]$, $\rho\in [\underline h(t)/8,\underline h(t)]$ and $|\rho-r|\geq 1$, \begin{align*} \tilde J(r,\rho)&= \omega_{N-1}\int_{|\rho-r|}^{\rho+r} (\rho/l)^{(N-1)/2}\left[\frac{(\rho+r)^2-\eta^2}{4r\rho }\right]^{(N-3)/2}[\eta^2-(\rho-r)^2]^{(N-3)/2}\eta J(\eta) {\rm d} \eta \\ &\geq \xi_3\int_{\xi_1|\rho-r|}^{\xi_2|\rho-r|} \left[\frac{(\rho+r)^2-\eta^2}{4r\rho }\right]^{(N-3)/2}[\eta^2-(\rho-r)^2]^{(N-3)/2}\eta^{1-\beta}{\rm d} \eta \ \ \mbox{for some $\xi_3>0$.} \end{align*} A simple calculation gives, for $r\in [\underline h(t)/4,\underline h(t)]$, $\rho\in [\underline h(t)/8,\underline h(t)]$, $\eta\in [\xi_1|\rho-r|, \xi_2|\rho-r|]$ and $N\geq 3$, \begin{align*} &\left[\frac{(\rho+r)^2-\eta ^2}{4r\rho }\right]^{(N-3)/2}\geq \left[\frac{(\rho+r)^2-\xi_2^2(\rho-r)^2}{4r\rho }\right]^{(N-3)/2}\\ \geq& \left[\frac{(\rho+r)^2(1-49\xi_2^2/81)}{4r\rho }\right]^{(N-3)/2}\geq (1-49\xi_2^2/81)^{(N-3)/2}, \end{align*} and for $N=2$ with such $\rho, r, \eta$, \begin{align*} \left[\frac{(\rho+r)^2-\eta^2}{4r\rho }\right]^{-1/2}\geq \left[\frac{(\rho+r)^2}{4r\rho }\right]^{-1/2}\geq 32^{-1/2}, \end{align*} while for such $\rho, r, \eta$ and $N\geq 2$, \begin{align*} [\eta^2-(\rho-r)^2]^{(N-3)/2}\geq \min\left\{(\xi_1^2-1)^{(N-3)/2},(\xi_2^2-1)^{(N-3)/2}\right\} |\rho-r|^{N-3}. \end{align*} Hence, \begin{equation}\begin{aligned}\label{5.16a} \tilde J(r,\rho) \geq &\ \xi_3\int_{\xi_1|\rho-r|}^{\xi_2|\rho-r|} \left[\frac{(\rho+r)^2-\eta^2}{4r\rho }\right]^{(N-3)/2}[\eta^2-(\rho-r)^2]^{(N-3)/2}\eta^{1-\beta}{\rm d} \eta\\ \geq&\ \xi_4|\rho-r|^{N-1-\beta}\ \mbox{ for some $\xi_4>0$.} \end{aligned} \end{equation} Now using \eqref{5.16a} and \begin{align*} \underline u(t,\rho)\geq K_2\frac{\underline h(t)-\rho}{\underline h(t)}, \end{align*} we obtain, for $r\in [h(t)/4,h(t)]$, \begin{align*} &\int_{0}^{\underline h(t)} \tilde {J}(r,\rho) \underline u(t,\rho){\rm d} \rho \geq \int_{\underline h(t)/8}^{r-1} \tilde {J}(r,\rho) \underline u(t,\rho){\rm d} \rho \geq \int_{\underline h(t)/8}^{r-1} \xi_4|\rho-r|^{N-1-\beta} \underline u(t,\rho){\rm d} \rho\\ =&\ \int_{\underline h(t)/8-r}^{-1} \xi_4|\rho|^{N-1-\beta} \underline u(t,\rho+r){\rm d} \rho \geq K_2\xi_4\int_{-\underline h(t)/8}^{-1} |\rho|^{N-1-\beta} \frac{\underline h(t)-(\rho+r)}{\underline h(t)}{\rm d} \rho\\ \geq&\ \frac{K_2\xi_4}{\underline h(t)}\int_{-\underline h(t)/8}^{-1} |\rho|^{N-\beta}{\rm d} \rho= \frac{K_2\xi_4}{\underline h(t)}\int_1^{\underline h(t)/8} \rho^{N-\beta}{\rm d} \rho\\ =&\ \frac{K_2\xi_4}{(N+1-\beta)\underline h(t)} [(\underline h(t)/8)^{N+1-\beta}-1] \geq \frac{K_2\xi_4}{2(N+1-\beta)\underline h(t)} (\underline h/8)^{N+1-\beta}, \end{align*} which gives \eqref{5.15a}. With the above estimates at hand, we are ready to prove \eqref{5.14a}. Due to $\underline u\leq K_2$ and $f'(0)>0$, we see that for small $K_2>0$, \begin{align*} f(\underline u(t,r))\geq \min_{v\in [0,K_2]}f'(v)\underline u(t,r)\geq \frac{3}4 f'(0) \underline u(t,r). \end{align*} Let $\epsilon\in (0, \frac 3{4d}f'(0))$ be a small constant. From Lemma \ref{lemma5.4}, for $L_1=\underline h(t)/2$ and $L_2=\underline h(t)$ with $\theta\gg 1$, \begin{equation*} \int_{0}^{L_2} \tilde J(r,\rho)\underline u(t,\rho){\rm d} \rho\geq \begin{cases} \displaystyle (1-\epsilon) \underline u(t,r),& r\in [0,\underline h(t)/4],\\[3mm] \displaystyle (1-\epsilon)\underline u(t,r)-\frac{2D_1}{\underline h(t)r}-\frac{D_2}{r^2},& r\in [\underline h(t)/4,\underline h(t)]. \end{cases} \end{equation*} Hence for $r\in [0,\underline h(t)/4]$, \begin{align*} d \int_{0}^{\underline h(t)} \tilde {J}(r,\rho) \underline u(t,\rho){\rm d} \rho -d\underline u(t,r)+f(\underline u(t,r))\geq -d\epsilon \underline u(t,r)+\frac{3}4f'(0) \underline u(t,r)\geq 0, \end{align*} and for $r\in [\underline h(t)/4,\underline h(t)]$, from \eqref{5.15a}, \begin{align*} &d \int_{0}^{\underline h(t)} \tilde {J}(r,\rho) \underline u(t,\rho){\rm d} \rho -d\underline u(t,r)+f(\underline u(t,r))\\ \geq&\ d \int_{0}^{\underline h(t)} \tilde {J}(r,\rho) \underline u(t,\rho){\rm d} \rho-[d-{3f'(0)}/{4}]\underline u(t,r)\\ =&\ \min\{{f'(0)}/{2},d \}\int_{0}^{\underline h(t)} \tilde {J}(r,\rho) \underline u(t,\rho){\rm d} \rho+\max\{d-{f'(0)}/{2},0\} \int_{0}^{\underline h(t)} \tilde {J}(r,\rho) \underline u(t,\rho){\rm d} \rho\\ &-[d-{3f'(0)}/{4}]\underline u(t,r)\\ \geq &\ \min\{{f'(0)}/{2},d \}K_2\xi \underline h^{N-\beta}(t) +\max\{d-{f'(0)}/{2},0\} \left[(1-\epsilon)\underline u(t,r)-\frac{2D_1}{\underline h(t) r}-\frac{D_2}{r^2}\right]\\ &-[d-{3f'(0)}/{4}]\underline u(t,r)\\ \geq &\ \min\{{f'(0)}/{2},d \}K_2\xi \underline h^{N-\beta}(t) -\max\{d-{f'(0)}/{2},0\} \left(\frac{2D_1}{\underline h(t) r}+\frac{D_2}{r^2}\right)\\ \geq&\ \min\{{f'(0)}/{2},d \}K_2\xi\underline h^{N-\beta}(t)-d\frac{8D_1+16D_2}{\underline h^2(t)}\geq \frac 12\min\{{f'(0)}/{2},d \}K_2\xi\underline h^{N-\beta}(t) \end{align*} since $\underline h(t)\geq \theta^{1/(\beta-N)}\gg 1$ (due to $\theta\gg 1$). In view of the definition of $\underline u$, we have for $t>0$, $r\in (0,\underline h(t))$, \begin{align*} &\underline u_t(t,r)=0, \ \ \ t>0,\ r\in (0,\underline h(t)/2),\\ &\underline u_t(t,r)=2K_2\frac{r\underline h'(t)}{\underline h^2(t)}\leq 2K_2 \frac{\underline h'(t)}{\underline h(t)}= \frac{2K_1K_2}{\beta-N}\underline h^{N-\beta}(t),\ \ t>0,\ r\in (\underline h(t)/2,\underline h(t)). \end{align*} Therefore, \eqref{5.14a} holds if $K_1$ is small such that \begin{align*} \frac{2K_1}{\beta-N}\leq \frac{\min\{{f'(0)}/{2},d \}\xi}{2}. \end{align*} {\bf Step 3.} Completion of the proof. Let $\theta$, $K_1$ and $K_2$ meet the above requirements. It is clear that \begin{align*} \underline u(t,\pm \underline h(t))=0\ \mbox{ for } \ t\geq 0. \end{align*} Since spreading happens, there exists a large $t_0>0$ such that \begin{align*} &[0,\underline h(0)]\subset [0,h(t_0)/2]\ \ {\rm and}\ \ u(0,r)\leq K_2\leq u(t_0,r)\ \mbox{ for } \ r\in [0,\underline h(0)]. \end{align*} It then follows from Lemma \ref{lemma3.4a} (and Remark \ref{rmk3.6}) that \begin{align*} &\underline h(t)\leq h(t+t_0), \ \ \ \ \ \ \ \ \ t\geq 0,\\ &\underline u(t,r)\leq u(t+t_0,r), \ \ \ \ t\geq 0,\ r\in [0,\underline h(t)], \end{align*} which implies \eqref{5.12a}. The proof is complete. \end{proof} \begin{lemma}\label{lemma4.5} If spreading happens and \eqref{5.1} holds with $\beta=N+1$, then there exists $C>0$ such that \begin{align}\label{5.17a} h(t)\geq Ct\ln t \ \ \mbox{\rm for } t\gg 1. \end{align} \end{lemma} \begin{proof} Fix $\alpha\in (0,1)$ and define \begin{align*} &\underline h(t):=K_1(t+\theta)\ln (t+\theta),\ \ t\geq 0,\\ & \underline u(t,r):=K_2\min\left\{1, \frac{\underline h(t)-r}{(t+\theta)^{\alpha}}\right\}, \ \ \ t\geq 0,\ r\in[0, \underline h(t)], \end{align*} where $\theta\gg 1$ and $K_1, K_2>0$ are constants to be determined. Note that $\theta\gg 1$ implies \[ (t+\theta)^\alpha\leq \frac{\underline h(t)}{K_1\theta^{1-\alpha}\ln \theta}=o(1)\underline h(t)\ \mbox{ uniformly for } t\geq 0. \] We first show that by choosing $\theta\gg 1$ and $K_1, K_2>0$ suitably, \begin{align}\label{5.18} &\underline h'(t)\leq \frac{\mu}{h^{N-1}(t)}\displaystyle\int_{0}^{\underline h(t)} r^{N-1}\underline u(t,r)\int_{\underline h(t)}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r\ \mbox{ for } \ t> 0. \end{align} By \eqref{5.6a}, \begin{align*} &\frac{\mu}{\underline h^{N-1}(t)}\displaystyle\int_{0}^{\underline h(t)} r^{N-1}\underline u(t,r)\int_{\underline h(t)}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r\\ &\geq \frac{\mu}{\underline h^{N-1}(t)}\displaystyle\int_{\underline h(t)/2}^{\underline h(t)-(t+\theta)^\alpha} r^{N-1}\underline u(t,r)\int_{\underline h(t)}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r \\ &\geq 2^{-(N-1)}K_2\mu\displaystyle\int_{\underline h(t)/2}^{\underline h(t)-(t+\theta)^\alpha} \int_{\underline h(t)}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r\\ & \geq 2^{-(N-1)}K_2\mu\displaystyle\int_{\underline h(t)/2}^{\underline h(t)-(t+\theta)^\alpha} \int_{\underline h(t)}^{+\yy} J_*(r-\rho){\rm d} \rho{\rm d} r =2^{-(N-1)}K_2\mu\displaystyle\int_{-\underline h(t)/2}^{-(t+\theta)^\alpha} \int_{-r}^{+\yy} J_*(\rho){\rm d} \rho{\rm d} r\\ &=2^{-(N-1)}K_2\mu\displaystyle\left(\int_{(t+\theta)^\alpha}^{\underline h(t)/2}\int_{(t+\theta)^\alpha}^\rho+\int_{\underline h(t)}^{\yy}\int_{(t+\theta)^\alpha}^{\underline h(t)}\right) J_*(\rho){\rm d} r {\rm d} \rho\\ &\geq 2^{-(N-1)}K_2\mu\displaystyle\int_{(t+\theta)^\alpha}^{\underline h(t)/2}\int_{(t+\theta)^\alpha}^\rho J_*(\rho){\rm d} r {\rm d} \rho=2^{-(N-1)}K_2\mu\displaystyle\int_{(t+\theta)^\alpha}^{\underline h(t)/2}[\rho-(t+\theta)^\alpha] J_*(\rho) {\rm d} \rho\\ &\geq2^{-N}K_2\mu\displaystyle\int_{2(t+\theta)^\alpha}^{\underline h(t)/2}\rho J_*(\rho) {\rm d} \rho. \end{align*} By \eqref{7.3} there is $A_1>0$ such that \begin{align*} &\displaystyle\int_{2(t+\theta)^\alpha}^{\underline h(t)/2}\rho J_*(\rho) {\rm d} \rho\geq A_1\displaystyle\int_{2(t+\theta)^\alpha}^{\underline h(t)/2} \rho^{-1} {\rm d} \rho =A_1[\ln \underline h(t)-2\ln 2-\alpha\ln (t+\theta)]\\ &=A_1[\ln (t+\theta)+\ln \ln (t+\theta)+\ln K_1-2\ln 2-\alpha\ln (t+\theta)]\\ &\geq A_1(1-\alpha) \ln (t+\theta)\ \ \ \mbox{due to $\theta\gg 1$.} \end{align*} Hence \begin{align*} &\frac{\mu}{\underline h^{N-1}(t)}\displaystyle\int_{0}^{\underline h(t)} r^{N-1}\underline u(t,r)\int_{\underline h(t)}^{+\yy} \tilde J(r,\rho){\rm d} \rho{\rm d} r\geq \ 2^{-N}K_2\mu A_1(1-\alpha) \ln (t+\theta)\\ &\geq\ K_1\ln (t+\theta)+K_1=\underline h'(t) \end{align*} provided \begin{align*} K_1\leq 2^{-N-1}K_2\mu A_1(1-\alpha).\ \ \end{align*} This proves \eqref{5.18}. Nest we show that by choosing $\theta\gg1,\; K_1, K_2>0$ suitably, for $t>0$ and $r\in (-\underline h(t),\underline h(t))\backslash \{\underline h(t)-(t+\theta)^\alpha\}$, \begin{align}\label{5.19a} \underline u_t(t,r)\leq d \int_{-\underline h(t)}^{\underline h(t)} \tilde {J}(r,\rho) \underline u(t,\rho){\rm d} \rho -d\, \underline u(t,r)+f(\underline u(t,r)). \end{align} From the definition of $\underline u$, for $t>0$, \begin{equation}\label{7.18} \underline u_t(t,r)=\begin{cases}\frac{K_1K_2(1-\alpha)\ln (t+\theta)+K_1K_2}{(t+\theta)^{\alpha}} +\frac{K_2\alpha r}{(t+\theta)^{1+\alpha}}& \mbox{ when } r\in (\underline h(t)-(t+\theta)^\alpha, \underline h(t)],\\ 0\ &\mbox{ when } \ r\in [0, \underline h(t)-(t+\theta)^\alpha). \end{cases} \end{equation} Using \eqref{5.16a} and \begin{align*} \underline u(t,\rho)\geq K_2\frac{\underline h(t)-\rho}{2(t+\theta)^\alpha} \mbox{ for } \rho\in [\underline h(t)-2(t+\theta)^\alpha, \underline h(t)], \end{align*} we deduce, for $r\in [\underline h(t)-(t+\theta)^\alpha,h(t)]$, \begin{align*} &\int_{0}^{\underline h(t)} \tilde {J}(r,\rho) \underline u(t,\rho){\rm d} \rho \geq \int_{\underline h(t)-2(t+\theta)^\alpha}^{r-1} \tilde {J}(r,\rho) \underline u(t,\rho){\rm d} \rho\\ \geq &\int_{\underline h(t)-2(t+\theta)^\alpha}^{r-1} \xi|\rho-r|^{N-1-\beta} \underline u(t,\rho){\rm d} \rho =\int_{\underline h-2(t+\theta)^\alpha-r}^{-1} \xi|\rho|^{N-1-\beta} \underline u(t,\rho+r){\rm d} \rho\\ \geq&\ K_2\xi/2\int_{-(t+\theta)^\alpha}^{-1} |\rho|^{N-1-\beta} \frac{\underline h(t)-(\rho+r)}{(t+\theta)^\alpha}{\rm d} \rh \geq K_2\xi/2\int_{-(t+\theta)^\alpha}^{-1} |\rho|^{N-1-\beta} \frac{-\rho}{(t+\theta)^\alpha}{\rm d} \rho\\ =&\ \frac{K_2\xi}{2(t+\theta)^\alpha}\int_{1}^{(t+\theta)^\alpha} \rho^{N-\beta} {\rm d} \rho = \frac{K_2\xi}{2(t+\theta)^\alpha}\int_1^{(t+\theta)^\alpha} \rho^{-1} {\rm d} \rho =\frac{K_2\xi\alpha \ln (t+\theta)}{2(t+\theta)^\alpha}, \end{align*} and for $r\in \left[\frac{\underline h(t)-(t+\theta)^\alpha}{2},\underline h(t)-(t+\theta)^\alpha\right]$, \begin{align*} &\int_{0}^{\underline h(t)} \tilde {J}(r,\rho) \underline u(t,\rho){\rm d} \rho \geq \int_{[\underline h(t)-(t+\theta)^\alpha]/4}^{r-1} \tilde {J}(r,\rho) \underline u(t,\rho){\rm d} \rho\\ \geq&\ K_2\int_{[\underline h(t)-(t+\theta)^\alpha]/4}^{r-1} \tilde {J}(r,\rho) {\rm d} \rho \geq K_2 \xi\int_{[\underline h(t)-(t+\theta)^\alpha]/4}^{r-1} |\rho-r|^{N-1-\beta} {\rm d} \rho\\ \geq&\ K_2 \xi\int_1^{[\underline h(t)-(t+\theta)^\alpha]/4} \rho^{N-1-\beta}{\rm d} \rho= K_2 \xi\int_1^{[\underline h(t)-(t+\theta)^\alpha]/4} \rho^{-2} {\rm d} \rho\\ =&\ K_2 \xi\bigg(1-4[\underline h(t)-(t+\theta)^\alpha]^{-1}\bigg)\geq K_2 \xi/2\geq \frac{K_2\xi\alpha \ln (t+\theta)}{2(t+\theta)^\alpha}\ \ \mbox{ since $\theta\gg 1$. } \end{align*} For small $\epsilon>0$, using Lemma \ref{lemma5.4} with $L_1=(t+\theta)^\alpha$, $L_2=\underline h(t)$ and $\theta\gg 1$, we have \begin{equation*} \int_{0}^{L_2} \tilde J(r,\rho)\underline u(t,\rho){\rm d} \rho\geq \begin{cases} \displaystyle (1-\epsilon) \underline u(t,r),& r\in [0, \frac{\underline h(t)-(t+\theta)^\alpha}{2}],\\[3mm] \displaystyle (1-\epsilon)\underline u(t,r)-\frac{2D_1}{\underline h(t)r}-\frac{D_2}{r^2},& r\in [\frac{\underline h(t)-(t+\theta)^\alpha}{2},\underline h(t)]. \end{cases} \end{equation*} Hence, similar to the argument in the proof of Lemma \ref{lemma5.5}, for $r\in [0,\frac{\underline h(t)-(t+\theta)^\alpha}{2}]$, \begin{align*} d \int_{0}^{\underline h(t)} \tilde {J}(r,\rho) \underline u(t,\rho){\rm d} \rho -d\underline u(t,r)+f(\underline u(t,r))\geq -d\epsilon \underline u(t,r)+\frac{3}4f'(0) \underline u(t,r)\geq 0, \end{align*} and for $r\in [\frac{\underline h(t)-(t+\theta)^\alpha}{2} ,\underline h(t)]$, \begin{align*} &d \int_{0}^{\underline h(t)} \tilde {J}(r,\rho) \underline u(t,\rho){\rm d} \rho -d\underline u(t,r)+f(\underline u(t,r))\\ \geq&\ d \int_{0}^{\underline h(t)} \tilde {J}(r,\rho) \underline u(t,\rho){\rm d} \rho-[d-{3f'(0)}/{4}]\underline u(t,r)\\ =&\ \min\{{f'(0)}/{2},d \}\int_{0}^{\underline h(t)} \tilde {J}(r,\rho) \underline u(t,\rho){\rm d} \rho+\max\{d-{f'(0)}/{2},0\} \int_{0}^{\underline h(t)} \tilde {J}(r,\rho) \underline u(t,\rho){\rm d} \rho\\ &-[d-{3f'(0)}/{4}]\underline u(t,r)\\ \geq &\ \min\{{f'(0)}/{2},d \}\frac{K_2\xi\alpha \ln (t+\theta)}{2(t+\theta)^\alpha} +\max\{d-{f'(0)}/{2},0\} \left[(1-\epsilon)\underline u(t,r)-\frac{2D_1}{\underline h(t) r}-\frac{D_2}{r^2}\right]\\ &-[d-{3f'(0)}/{4}]\underline u(t,r)\\ \geq &\ \min\{{f'(0)}/{2},d \}\frac{K_2\xi\alpha \ln (t+\theta)}{2(t+\theta)^\alpha} -\max\{d-{f'(0)}/{2},0\} \left(\frac{2D_1}{\underline h(t) r}+\frac{D_2}{r^2}\right)\\ \geq&\ \min\{{f'(0)}/{2},d \}\frac{K_2\xi\alpha \ln (t+\theta)}{2(t+\theta)^\alpha}-d\frac{8D_1+16D_2}{\underline h^2(t)}\geq \frac 12 \min\{{f'(0)}/{2},d \}\frac{K_2\xi\alpha \ln (t+\theta)}{2(t+\theta)^\alpha} \end{align*} since $\theta\gg 1$. From this and \eqref{7.18}, we see that \eqref{5.19a} holds. With the above inequalities \eqref{5.18} and \eqref{5.19a}, as in the proof of Lemma \ref{lemma5.5}, we can apply the comparison principle Lemma \ref{lemma3.4a} (and Remark \ref{rmk3.6}) to obtain \eqref{5.17a}. \end{proof} Theorem \ref{th1.8} clearly follows directly from Lemmas \ref{lemma5.2b}, \ref{lemma5.5} and \ref{lemma4.5}.
\section*{\nomname}} {\begin{multicols}{2}[\section*{\nomname}]} {}{} \xpatchcmd\thenomenclature {\chapter*{\nomname}} {\begin{multicols}{2}[\chapter*{\nomname}]} {}{} \xapptocmd\endthenomenclature{% \immediate\write\@mainaux{\global\nomlabelwidth\nomencl@width\relax}% \end{multicols} }{}{} \makeatother \setlength{\columnsep}{0.3cm} \setlength{\columnseprule}{0.2pt} \setcounter{tocdepth}{2} \begin{document} \begin{titlepage} \begin{center} {\bf \Large{Inhomogeneities in Boltzmann--SIR models}} \vspace{1.5cm} {\large A. Ciallella$^{1}$, M. Pulvirenti$^{2}$ and S. Simonella$^{3}$ } \vspace{0.5cm} {$1.$ \scshape {\small Dipartimento di Ingegneria Civile, Edile -- Architettura e Ambientale, and \\International Research Center M\&MOCS, Universit\'a dell'Aquila,\\ via Giovanni Gronchi 18, 67100, L'Aquila, Italy.} \smallskip $2.$ {\small Dipartimento di Matematica, Universit\`a di Roma La Sapienza\\ Piazzale Aldo Moro 5, 00185 Rome -- Italy, and \\ International Research Center M\&MOCS, Universit\`a dell'Aquila, \\ Piazzale Ernesto Pontieri 1, Monteluco di Roio, 67100 L'Aquila -- Italy.} \smallskip $3.$ {\small UMPA UMR 5669 CNRS, ENS de Lyon \\ 46 all\'{e}e d'Italie, 69364 Lyon Cedex 07 -- France}} \end{center} \vspace{1.5cm} \noindent {\bf Abstract.} We investigate, by means of numerical simulations, the qualitative properties of a Boltzmann equation for three species of particles introduced in previous work, capturing some features of epidemic spread. \thispagestyle{empty} \bigskip \bigskip \newpage \end{titlepage} \section{Introduction} \label{sec:1} \setcounter{equation}{0} \def3.\arabic{equation}{1.\arabic{equation}} In a recent contribution \cite{PS_SIR}, we presented a kinetic model for mixtures of three species of particles, or ``agents'', labelled $S$, $I$, $R$. This stays for susceptible, infected and recovered, as inspired from the basic SIR system in epidemiology. In this model, together with collisions and transport, a reaction $$ S+I \to I+I $$ takes place with constant rate $\beta\in(0,1]$, upon contact of a particle of type $S$ and a particle of type $I$. No other reactions occur, but particles of type $I$ decay as $I\to R$ with a constant rate $\gamma}\renewcommand{\delta}{\delta >0$. The one-particle distribution functions depend on time $t$, position $x$ and velocity $v$: \begin{eqnarray} & f_S=f_S(t,x,v)\nonumber\\ & f_I=f_I(t,x,v)\nonumber\\ & f_ R=f_R(t,x,v)\nonumber \\ &f:=f_S+f_I+f_R \nonumber \end{eqnarray} where $f$ is the total density. The microscopic model is further based on a few elementary features: \smallskip \noindent $*$ the interactions are binary, and localized; \smallskip \noindent $*$ the number of interactions per unit time is expected to be finite; \smallskip \noindent $*$ the qualitative behaviour is independent of the number of particles $N$, provided that this is large in a suitable scaling limit; \smallskip \noindent $*$ a statistical description is appropriate. \smallskip \noindent This leads to a Boltzmann equation which reads (in two dimensions): \begin{equation} \begin{cases} \left(\partial_t + v \cdot \nabla_x\right) f_S= Q(f_S,f_S) + Q(f_S,f_R)+(1-\beta)Q(f_S,f_I)-\beta Q_-(f_S,f_I) \\ \left(\partial_t + v \cdot \nabla_x\right) f_I = Q(f_I,f_I) + Q(f_I,f_R)+Q(f_I,f_S)+\beta Q_+(f_S,f_I)-\gamma}\renewcommand{\delta}{\delta f_I\\ \left(\partial_t + v \cdot \nabla_x\right) f_R = Q(f_R,f)+\gamma}\renewcommand{\delta}{\delta f_I\\ \end{cases} \label{eq:SIR_Boltzmann} \end{equation} where \begin{eqnarray} && Q= Q_+ - Q_- \;,\nonumber\\ && Q_+(f,g)(v) := \int_{\R^2} \int_{{\mathbb S}} B(\omega; v-v_*)f(v')g(v'_*) \, d\omega \, dv_*\;, \nonumber\\ && Q_-(f,g)(v) := f(v)\int_{\R^2} \int_{{\mathbb S}} B(\omega; v-v_*)g(v_*) \, d\omega \, dv_*\;, \nonumber \end{eqnarray} $B$ is a given interaction kernel (see the next section for specific choices) and typically \begin{equation} \begin{cases} v'=v-\omega (v-v_*)\cdot \omega\\ v'_*=v_*+ \omega (v-v_*)\cdot \omega \end{cases}\;\label{coll} \end{equation} are the outgoing velocities for a collision, preserving momentum and energy. In particular, $f$ is governed by the standard Boltzmann equation: \begin{equation} \label{trueB} \left(\partial_t + v \cdot \nabla_x\right) f = Q(f,f)\;. \end{equation} The formal link with the classical theory of epidemics is obtained for spatially homogeneous distributions (no dependence on $x$), looking at averaged fractions of agents $A(t):=\int f_A(t,v) dv $ in the species $A \in \{ S,I,R \}$. Performing the integral with respect to $v$ of Eq.s\,\eqref{eq:SIR_Boltzmann} and using that $\int Q_+=\int Q_-$, we find \begin{equation} \label{eq:SIR''} \begin{cases} \dot S = -\beta \,Q_- (f_S,f_I) \nonumber\\ \dot I = \beta\, Q_- (f_S,f_I) -\gamma}\renewcommand{\delta}{\delta I \nonumber\\ \dot R = \gamma}\renewcommand{\delta}{\delta I \nonumber\\ \end{cases}\;. \end{equation} Such a set of equations is not closed but, when dealing with ``Maxwellian molecules'' defined by the requirement that $ \int B\, d\omega =1$, one gets $Q_- (f_S,f_I) = S(t)I(t)$ and therefore \begin{equation} \label{eq:SIR} \begin{cases} \dot S = -\beta IS \\ \dot I = \beta IS -\gamma}\renewcommand{\delta}{\delta I \\ \dot R = \gamma}\renewcommand{\delta}{\delta I \\ \end{cases}\;; \end{equation} namely the simplest SIR model equations \cite{KMK}. The latter have been considerably used and extended, for almost a century; see e.g.\,\cite{BC-C01} for a recent overview of mathematical epidemiology, or \cite{Quart21} for a case in the huge amount of studies on the current COVID-19 pandemic. A stochastic $N$-particle system can be constructed, with distribution functions converging to the solution of \eqref{eq:SIR_Boltzmann} as $N \to \infty$ (\cite{PS_SIR}) and corresponding, numerically, to the DSMC (direct Simulation Monte Carlo) method. In the present paper, we adopt the Boltzmann-SIR equations \eqref{eq:SIR_Boltzmann} as toy model, and the underlying particle system as a tool to study the qualitative behaviour. This allows to reinterpret some features of SIR type models, in terms of spatial inhomogeneities. As in \cite{PS_SIR} we stress that we do not pretend the kinetic model to provide any realistic prediction in epidemiology, as of course real agents do not interact as elastically colliding particles in a rarefied gas. Realistic interactions are obviously difficult to be described in mathematical terms. Individual strategies might play a critical role and, in essence, the interactions might be not even necessarily binary (e.g.\,a single agent infecting many susceptible agents almost simultaneously). Motivated by the simple connection with \eqref{eq:SIR}, we are rather interested in capturing behaviour which has only little dependence on the details of the microscopic interaction. More precisely, we perform numerical simulations of system \eqref{eq:SIR_Boltzmann}, with the following plan. In Section \ref{sec:2}, we consider several kernels $B$ and verify that: (i) the macroscopic evolution for $(S(t),I(t),R(t))$ is rather insensitive to the choice of the cross-section; (ii) the evolution can be significantly sensitive to spatial non-uniformity of labels, even when $f$ has reached global equilibrium. In Section \ref{sec:3}, we perturb the model by external actions mimicking, roughly, meeting points with (airport, travel stations) or without (supermarket) injection of agents. We observe how the local concentration of densities enhances the transient of $I(t)$, and identify regimes for the external flows producing nontrivial asymptotic values, and possibly recurrent waves. \section{The free model} \label{sec:2} \setcounter{equation}{0} \def3.\arabic{equation}{2.\arabic{equation}} This section is devoted to the basic properties of Eq.\,\eqref{eq:SIR_Boltzmann}, referred to as ``free model'' (model without external actions), which we recall (in more compact form): \begin{equation} \begin{cases} \left(\partial_t + v \cdot \nabla_x\right) f_S= Q(f_S,f)-\beta Q_+(f_S,f_I) \\ \left(\partial_t + v \cdot \nabla_x\right) f_I = Q(f_I,f) +\beta Q_+(f_S,f_I)-\gamma}\renewcommand{\delta}{\delta f_I\\ \left(\partial_t + v \cdot \nabla_x\right) f_R = Q(f_R,f)+\gamma}\renewcommand{\delta}{\delta f_I.\\ \end{cases}\;. \nonumber\label{eq:SIR_BoltzmannC} \end{equation} We shall consider three different cross--sections, namely: \bigskip \noindent {\it 1) Hard spheres}, as for the mechanical system of $N$ billiard balls, from which the Boltzmann equation is obtained in the Boltzmann--Grad limit (see e.g.\,\cite {CIP}). The collision law is given by \eqref{coll} and the interaction kernel is \begin{equation} \label{B} B(\omega; v-v_*)=\omega \cdot(v-v_*) \,\,\,\, \chi (\omega \cdot(v-v_*) \geq 0)\;, \end{equation} where $\chi (E)$ is the characteristic function of the event $E$. \medskip \noindent {\it 2) Semidiscrete model}, which is again a hard--sphere type system, but with particle velocities of modulus $1$, i.e.\,$v \in {\mathbb S}$. The collision law is \begin{equation} \label{colls} \begin{cases} v'=v-2\omega \left(v\cdot \omega\right) \\ v'_*=v_*-2\omega \left(v_*\cdot \omega\right) \end{cases}\;.\nonumber \end{equation} That is, each particle is reflected against the line orthogonal to the versor $\omega$ joining the two centers. Energy is conserved but not momenta. $B$ is still given by \eqref{B}. \medskip \noindent {\it 3) Maxwellian molecules}. A popular simple model for the Boltzmann equation \cite{Bo88}, for which the collision law is given by \eqref{coll} while $B$ satisfies $$ \int d\omega\, B(\omega; v-v_*) =\text{const.}\,. $$ The right hand side is remarkably independent of the relative velocity $v-v_*$. \bigskip Since the full probability density satisfies \eqref{trueB}, in cases {\it 1} and {\it 3} if the mean--free path is small $$ f(x,v) \approx \frac 1{|{\Lambda}|} \,M(v) $$ after a brief transient, where $|{\Lambda}|$ is the measure of the domain ${\Lambda}$ and $M$ is a Maxwellian velocity distribution \begin{equation} \label{eq:maxwellian} M(v)= \,\, \frac {e^{- \frac {(v-u)^2} {2 \sigma^2 }}} { (2 \pi \sigma^2 )}\;,\quad v\in \R^2 \end{equation} with $u \in \R^2$ and $\sigma>0$ determined by the initial data. If the distribution of the labels $S$, $I$, $R$ is also independent of $x$, then $$ f_A(t,v) \approx \frac {A(t)} {|{\Lambda}|} \,M(v), \qquad A=S,I,R\;. $$ Even if the full system is at equilibrium, the dynamics of particle labels (state of the agents) may well be active and we find \begin{equation} \label{eq:SIR'} \begin{cases} \dot S = -\beta m IS \\ \dot I = \beta m IS -\gamma}\renewcommand{\delta}{\delta I \\ \dot R = \gamma}\renewcommand{\delta}{\delta I \\ \end{cases} \end{equation} where $$ m=c \int dv \int dv_* |v-v_*|^b M(v) M(v_*)\,,\qquad c >0 $$ with $b=1$ in case {\it 1}, $b=0$ in case {\it 3}. In case {\it 2} one has similar behaviour, but $M$ is replaced by the uniform distribution $$ f(x,v) \approx \frac 1{|{\Lambda}|} \frac{1}{|{\mathbb S}|}\; $$ Therefore the kinetic picture plays a role for a short transient only and, for a larger scale of time, it does not say more than the standard SIR model, if the distributions of labels are spatially homogeneous. We recall that \eqref{eq:SIR} is almost explicitly solvable. The asymptotic distribution is found by setting $$ R(t)=R_0 + \gamma}\renewcommand{\delta}{\delta \int_0^t I(\tau) d\tau $$ (showing $I(t) \to 0$ as $t \to \infty$) and $$ \frac {d S}{dR}= - \frac \beta \gamma}\renewcommand{\delta}{\delta S\;. $$ Setting $ \bar A=\lim_{t \to \infty} A(t)$, using $\bar R+ \bar S=1$ and assuming $R_0=R(0)=0$ (no recovered agents at time zero), one gets $ \bar S=S_0 e^{- \frac \beta \gamma}\renewcommand{\delta}{\delta \bar R}= S_0 e^{- \frac \beta \gamma}\renewcommand{\delta}{\delta } e^{ \frac \beta \gamma}\renewcommand{\delta}{\delta \bar S}, $ hence \begin{equation} \label{eq:asy-S} e^{ -\frac \beta \gamma}\renewcommand{\delta}{\delta \bar S} \frac \beta \gamma}\renewcommand{\delta}{\delta \bar S= (1-I_0) \frac \beta \gamma}\renewcommand{\delta}{\delta e^{- \frac \beta \gamma}\renewcommand{\delta}{\delta }\;. \nonumber \end{equation} Since $\max y e^{-y}=\frac 1 e$, given $\beta$ and $\gamma}\renewcommand{\delta}{\delta$ one can find non vanishing solutions for $\bar S$. In the numerical simulations of the Boltzmann-SIR model, the above asymptotic is determined, roughly, by a ``herd immunity'' situation which is reached when susceptible agents are surrounded by a sufficiently large fraction of recovered agents, shielding them from the infected population. Inspired by the fact that problems of interest are frequently non--homogeneous, we will focus now on profiles where particle labels are not uniformly distributed in space, so that the kinetic model is indeed more detailed than \eqref{eq:SIR'}. Consider, for instance, the case of an initial distribution of infected agents concentrated in a small region. Even when $f$ has reached global equilibrium, the system as a whole can still be far from uniform (in space) for quite a long time $$ f_A(t,x,v) \approx \frac{ A(t,x)}{|\Lambda|}\, M(v), \qquad A=S,I,R $$ and $(S(t),I(t),R(t))$ can be notably different from the solution of \eqref{eq:SIR'}. Such a behaviour will be discussed in the next subsection. \subsection{Description of the simulations}\label{ssec:simul_free} The numerical simulations are based on the DSMC method. The details of this method can be found for instance in Chapter 10 of \cite{CIP} or in \cite{RW05}. Here we just describe the setting. The system consists of $N$ point particles moving in a square $\Lambda$ with side length $L=10^3$ and periodic boundary conditions. An equally spaced grid partitions the domain into identical square cells of size $\delta\times\delta$ (a total of $\left(\frac{L}{\delta}\right)^2$ cells). $N$ is constant in time, no agent is introduced or removed from the system. Each particle moves with constant velocity up to the next collision instant. The mean free path, i.e.\,the average distance travelled by each agent between two consecutive collisions, will be denoted by $\lambda$, the mean free time by $\tau$. Time is discretized and the evolution of the system is divided into a free evolution step where all particles move freely for a discrete time unit $\bar{t}$, and a collision simulation step, where pairs of particles lying in the same cell are randomly chosen to perform a binary collision. For each simulation presented, we report the relevant parameters in the captions of the figures. We list now the choices that are common to all simulation runs. The particles are initially distributed uniformly in space, while velocities are distributed uniformly on ${\mathbb S}$. We assign to each particle a label, $S$, $I$, or $R$, that can be distributed in both uniform or non-uniform way, as specified in each case. As the energy of the system is fixed, in the case of hard spheres and Maxwellian molecules the velocity distribution quickly converges to a Maxwellian as \eqref{eq:maxwellian} with $u=0$ and $\sigma^2=1/2$. Hence $\tau\simeq\frac{\lambda}{\langle v \rangle}$ where the mean scalar velocity $\langle v \rangle$ can be explicitly calculated. The cells side is $\delta\simeq\frac{\lambda}{3}$ and the discrete time step is $\bar{t}\simeq\frac{\tau}{4}$. The number of agents $N$ is always such that, on average, at least $20$ particles lie in each cell. The prescribed rule for the dynamics, following \eqref{eq:SIR_Boltzmann}, is that a collision of an $I$ (infected) and an $S$ (susceptible) particle produces two $I$ particles with probability $\beta$, and that an $I$ particle becomes an $R$ (recovered) particle after an exponential time with rate $\gamma}\renewcommand{\delta}{\delta$. The fractions at time $0$ are assumed to be $I(0)=0.005$, $S(0)=1-I(0)=0.995$, $R(0)=0$. In the following, a few examples of numerical experiments of the system with different cross--sections are presented. The evolution of the fractions of the three populations $S$, $I$, and $R$ is plotted for the particle system, and compared with the solution of the SIR model Eq.\,\eqref{eq:SIR'}. We consider two different situations. In the first one, the initial distributions of agents are all uniform. In this setting, we want to test the consistency of the kinetic model with the SIR model, and check that results turn out to be independent of the choice of the cross--section. In the second case, the initial datum is such that all the infected agents are contained in a small disk of area $0.005\cdot L^2$. This is used to show that, even in a simple setting, the average description produced by the SIR model can lose quantitative and qualitative information related to spatial patterns. The case of Maxwellian molecules is reported in Fig.~\ref{f:001}. For uniform initial distributions, the correspondence between particle system (left panel, solid lines) and SIR (right panel) is clear. In the left panel, we show also the case of concentrated initial distribution of infected agents (dashed lines). In this run, the mean free path is sufficiently small ($\lambda\simeq\frac{L}{100}$) to produce an apparent difference. \begin{figure}[ht!] \begin{picture}(200,170)(30,150) \put(-20,-10){ \includegraphics[width=0.75\textwidth]{SIR_comp_h_c_F1.pdf} } \put(275,140){ \includegraphics[width=0.38\textwidth]{SIR_true_f1.pdf} } \put(450,260){ \includegraphics[width=0.06\textwidth]{legenda.png} } \end{picture} \caption Left panel: evolution of $S$, $I$, $R$ fractions for a particle system with Maxwellian molecule cross--section simulated via DSMC. The solid and dashed lines represent, respectively, the case of homogeneous and concentrated initial population of $I$ agents. Parameters: $N=1800000$, $\beta=1$, $\gamma}\renewcommand{\delta}{\delta=\frac{1}{20}$, $\lambda\simeq9.8$, $\tau\simeq11.05$. Right panel: numerical solution of \eqref{eq:SIR'} with $m=\frac{1}{\tau}$, and the same $\beta$ and $\gamma}\renewcommand{\delta}{\delta$ as in the left panel case. } \label{f:001} \end{figure} The case of hard sphere cross--section is reported in Fig.~\ref{f:002}. For uniform distributions (left panel, solid lines), we observe a small quantitative difference in the asymptotic fraction of the susceptible population (therefore of the recovered one) with respect to the solution of \eqref{eq:SIR'} (right panel). Indeed, the DSMC tends to select colliding particles with large velocities: infected agents travelling with high speed are likely to transmit the infection. This leads to a slightly wider diffusion of the $I$ population with respect to the system of ODEs \eqref{eq:SIR'} (in the experiment presented in Fig.~\ref{f:002}, $\bar{S}$ is estimated to be $0.318$ by the DSMC method while its actual value is $0.347$). Moreover, we see that for a mean free path that is larger compared to the size of the domain ($\lambda\simeq\frac{L}{20}$), starting from a concentrated initial datum does not change considerably the quantitative behaviour. Finally, the case of semidiscrete model cross-section is reported in Fig.~\ref{f:003}. We find excellent agreement between homogeneous particles system and SIR. \begin{figure}[pht!] \begin{picture}(200,170)(30,150) \put(-20,-10){ \includegraphics[width=0.75\textwidth]{SIR_comp_h_c_F2.pdf} } \put(275,140){ \includegraphics[width=0.38\textwidth]{SIR_true_f2.pdf} } \put(450,260){ \includegraphics[width=0.06\textwidth]{legenda.png} } \end{picture} \caption Left panel: evolution of $S$, $I$, $R$ fractions for a particle system with hard sphere cross--section simulated via DSMC. The solid and dashed lines represent, respectively, the case of homogeneous and concentrated initial population of $I$ agents. Parameters: $N=180000$, $\beta=0.75$, $\gamma}\renewcommand{\delta}{\delta=\frac{1}{120}$, $\lambda\simeq49.5$, $\tau\simeq55.85$. Right panel: numerical solution of \eqref{eq:SIR'} with $m=\frac{1}{\tau}$, and the same $\beta$ and $\gamma}\renewcommand{\delta}{\delta$ as in the left panel case. } \label{f:002} \end{figure} \begin{figure}[pht!] \begin{picture}(200,170)(30,150) \put(-20,-10){ \includegraphics[width=0.75\textwidth]{SIR_comp_h_c_F3.pdf} } \put(275,140){ \includegraphics[width=0.38\textwidth]{SIR_true_f3.pdf} } \put(450,260){ \includegraphics[width=0.06\textwidth]{legenda.png} } \end{picture} \caption Left panel: evolution of $S$, $I$, $R$ fractions for a particle system with semidiscrete cross--section simulated via DSMC. The solid and dashed lines represent, respectively, the case of homogeneous and concentrated initial population of $I$ agents. Parameters: $N=300000$, $\beta=0.5$, $\gamma}\renewcommand{\delta}{\delta=\frac{1}{75}$, $\lambda\simeq25.0$, $\tau\simeq25.0$. Right panel: numerical solution of \eqref{eq:SIR'} with $m=\frac{1}{\tau}$, and the same $\beta$ and $\gamma}\renewcommand{\delta}{\delta$ as in the left panel case. } \label{f:003} \end{figure} \newpage As expected, the larger asymptotic value of $S$ particles in the non-uniform cases is due to the time needed for the system to mix the populations, the difference being more important for $\lambda$ small. \section{Meeting points} \label{sec:3} \setcounter{equation}{0} \def3.\arabic{equation}{3.\arabic{equation}} In this section we study three types of perturbation of the Boltzmann-SIR model, favouring non-equilibrium regimes. Symbolically, we call them ``supermarket'', ``airport'', and ``diffuse jet''. \subsection{Supermarket} \label{ssec:super} Let $D \subset {\Lambda} $ be a box (the supermarket). In addition to the dynamics described by the free model, we assume that each particle jumps instantaneously in $D$ at an exponential time of rate $\gamma}\renewcommand{\delta}{\delta_1$. After the jump, the particle is uniformly distributed in $D$. Then it moves with unchanged velocity. The kinetic equations are: \begin{equation} \begin{cases} \left(\partial_t + v \cdot \nabla_x\right) f_S= Q(f_S,f)-\beta Q_+(f_S,f_I) -\gamma}\renewcommand{\delta}{\delta_1 (f_S -\frac {\chi_D} {|D|} g_S)\\ \left(\partial_t + v \cdot \nabla_x\right) f_I = Q(f_I,f) +\beta Q_+(f_S,f_I)-\gamma}\renewcommand{\delta}{\delta f_I -\gamma}\renewcommand{\delta}{\delta_1 (f_I -\frac {\chi_D} {|D|} g_I)\\ \left(\partial_t + v \cdot \nabla_x\right) f_R = Q(f_R,f)+\gamma}\renewcommand{\delta}{\delta f_I -\gamma}\renewcommand{\delta}{\delta_1 (f_R -\frac {\chi_D} {|D|} g_R)\\ \end{cases}\;. \label{eq:SIR_BoltzmannS} \end{equation} Here $\chi_D$ is the characteristic function of $D$ and $|D|$ its area; $g_A$ with $A=S,I,R$ is the velocity distribution of $A$ i.e.\,$g_A(v)=\int dx \,f_A(x,v)$. The equation for $f=\sum_A f_A$ is \begin{equation} \label{trueBS} \left(\partial_t + v \cdot \nabla_x\right) f= Q(f,f)-\gamma}\renewcommand{\delta}{\delta_1 (f -\frac {\chi_D} {|D|} g)\nonumber \end{equation} where $g$ is total velocity distribution $\int dx \, f$. The density ${\rho} = \int dv\, f$ satisfies $$ \left(\partial_t {\rho} + \text {div}_x(u{\rho}) \right)=-\gamma}\renewcommand{\delta}{\delta_1( {\rho}- \frac {\chi_D} {|D|}) $$ where ${\rho} u = \int dv\,v\, f$. As we are not able to characterize explicitly the stationary solutions to Eq.\,\eqref{eq:SIR_BoltzmannS}, we turn to numerical investigation. The local higher density (in $D$, and in a neighbourhood of it) makes more likely the increase of $I$ particles. Ultimately, this leads to an asymptotic behaviour with lower number of susceptible agents (with respect to the free model). Two parameters contribute to magnify the effect: the intensity of jumps $\gamma}\renewcommand{\delta}{\delta_1$ and the smallness of the box $|D|$, as reported in Fig~\ref{f:004}. Note that here a smaller $D$ produces a more significant effect on the difference in the asymptotics with respect to the different initial configurations. This is at variance with the free model, where uniform initial data provide a wider diffusion than a concentrated initial population $I$. \begin{figure}[ht!] \begin{picture}(200,170)(30,150) \put(-20,-10){ \includegraphics[width=0.70\textwidth]{SIR_comp_g1_F4hm.pdf} } \put(205,-10){ \includegraphics[width=0.70\textwidth]{SIR_comp_g1_F4cd.pdf} } \end{picture} \caption Evolution of $S$, $I$, $R$ fractions for a particle system with hard sphere cross--section simulated via DSMC, Eq.\,\eqref{eq:SIR_BoltzmannS}. Parameters: $N=180000$, $\beta=0.7$, $\gamma}\renewcommand{\delta}{\delta=\frac{1}{75}$, $\lambda\simeq33.5$, $\tau\simeq37.8$. Left panel: $|D|=\frac{1}{100}|\Lambda|$, homogeneous initial datum. Subscript $h$ refers to the free model (no jumps), subscript $i$ refers to assumed value $\gamma}\renewcommand{\delta}{\delta_1=(i\cdot 10^3)^{-1}$, $i=1,2,3$. Right panel: $|D|=\frac{6}{1000}|\Lambda|$, concentrated initial datum. } \label{f:004} \end{figure} \subsection{Airport} In addition to a density concentration, we consider now the action of an external flow. As before, agents $S$ and $R$ jump in $D$ with a rate $\gamma}\renewcommand{\delta}{\delta_1$ (infects are not allowed to fly). Then they disappear and are simultaneously replaced by an equal number of agents. The injected agents are either $S$ or $R$, with equal probability $(1-\a)/2$, or $I$ with probability $\a$. The extreme case is $\a=1$ (maximal flux of infects). The equations are\footnote An immediate generalization of Eq.\,\eqref{eq:SIR_BoltzmannA} is obtained by considering different fractions $\a_1$, $\a_2$ and $\a_3$ (with $\a_1+\a_2+\a_3=1$) in place of $\a$, $\frac{1-\a}{2}$ and $\frac{1-\a}{2}$. This does not change the qualitative behaviour. }: \begin{equation} \begin{cases} \left(\partial_t + v \cdot \nabla_x\right) f_S= Q(f_S,f)-\beta Q_+(f_S,f_I) -\gamma}\renewcommand{\delta}{\delta_1 (f_S - (1-\a) \frac {\chi_D} {2|D|} (g_S+g_R))\\ \left(\partial_t + v \cdot \nabla_x\right) f_I = Q(f_I,f) +\beta Q_+(f_S,f_I) -\gamma}\renewcommand{\delta}{\delta f_I + \gamma}\renewcommand{\delta}{\delta_1 \a \frac {\chi_D} {|D|} (g_S+g_R)\\ \left(\partial_t + v \cdot \nabla_x\right) f_R = Q(f_R,f)+\gamma}\renewcommand{\delta}{\delta f_I -\gamma}\renewcommand{\delta}{\delta_1 (f_R -(1-\a) \frac {\chi_D} {2|D|} (g_S+g_R))\\ \end{cases}\;. \label{eq:SIR_BoltzmannA} \end{equation} In this case, $f$ does not solve a closed equation. The evolution shows two time scales. In a first phase, it is qualitatively close to the free model. This is true until a herd immunity threshold, after which the injection of $I$ particles in $D$ crucially determines the long time behaviour. In the extreme case $\a=1$, no susceptible agent survives. In the opposite case $\alpha=0$ (no infected are ever introduced), if the jump rate is sufficiently intense, the infection may be never extinguished: the source of susceptible agents leads to a stationary configuration where all three populations are non--zero; see Fig.~\ref{f:005}, $\gamma}\renewcommand{\delta}{\delta_1=(i\cdot 10^3)^{-1}$, $i=2,4$. If instead the jump rate is low, the asymptotic values are $\bar{S}=\bar{R}=0.5$ when all the agents have jumped at least once after the extinction of $I$ (Fig.~\ref{f:005}, $\gamma}\renewcommand{\delta}{\delta_1=(6\cdot 10^3)^{-1}$). If, additionally, a small fraction of agents $I$ is injected, recurrent small waves arise; see Figures~\ref{f:006} and \ref{f:007}, corresponding respectively to cases with extinction and without extinction of $I$ (depending on $\a, \gamma}\renewcommand{\delta}{\delta_1$). \begin{figure}[ht!] \begin{picture}(200,170)(30,150) \put(-20,-10){ \includegraphics[width=0.70\textwidth]{SIR_comp_aer_F5sx.pdf} } \put(205,-10){ \includegraphics[width=0.70\textwidth]{SIR_comp_aer_F5rx.pdf} } \end{picture} \caption{Evolution of $S$, $I$, $R$ fractions for a particle system with hard sphere cross-section simulated via DSMC, Eq.\,\eqref{eq:SIR_BoltzmannA}. Parameters: $N=180000$, $\beta=0.9$, $\gamma}\renewcommand{\delta}{\delta=\frac{1}{100}$, $\lambda\simeq33.4$, $\tau\simeq37.7$, $|D|=\frac{1}{100}|\Lambda|$, $\a=0$, concentrated initial datum. Left panel: subscript $i$ refers to assumed value $\gamma}\renewcommand{\delta}{\delta_1=(i\cdot 10^3)^{-1}$, $i=2,4,6$. Right panel: free model ($\gamma}\renewcommand{\delta}{\delta_1=0$), same parameters. } \label{f:005} \end{figure} \begin{figure}[ht!] \begin{picture}(200,170)(30,150) \put(-20,-10){ \includegraphics[width=0.70\textwidth]{SIR_comp_aer_F6.pdf} } \put(205,-10){ \includegraphics[width=0.70\textwidth]{I_comp_aer_F6.pdf} } \end{picture} \caption{ Particle system with hard sphere cross-section simulated via DSMC, Eq.\,\eqref{eq:SIR_BoltzmannA}. Parameters: $N=180000$, $\beta=0.9$, $\gamma}\renewcommand{\delta}{\delta=\frac{1}{100}$, $\lambda\simeq33.4$, $\tau\simeq37.7$, $|D|=\frac{1}{100}|\Lambda|$, $\a=2\cdot 10^{-5}$, $\gamma}\renewcommand{\delta}{\delta_1=10^{-4}$, concentrated initial datum. Left panel: Evolution of $S$, $I$, $R$ fractions. Right panel: detail of the $I$ fraction. } \label{f:006} \end{figure} \begin{figure}[ht!] \begin{picture}(200,170)(30,150) \put(-20,-10){ \includegraphics[width=0.70\textwidth]{SIR_comp_aer_F7cd.pdf} } \put(205,-10){ \includegraphics[width=0.70\textwidth]{I_comp_aer_F7cd.pdf} } \end{picture} \caption{ Particle system with hard sphere cross--section simulated via DSMC, Eq.\,\eqref{eq:SIR_BoltzmannA}. Parameters: $N=180000$, $\beta=0.9$, $\gamma}\renewcommand{\delta}{\delta=\frac{1}{80}$, $\lambda\simeq33.4$, $\tau\simeq37.7$, $|D|=\frac{1}{100}|\Lambda|$, $\a=10^{-4}$, concentrated initial datum. Subscript $c$ refers to the free model ($\gamma}\renewcommand{\delta}{\delta_1=0$), subscript $i$ refers to assumed value $\gamma}\renewcommand{\delta}{\delta_1=(i\cdot 10^3)^{-1}$, $i=1,2,3,4$. Left panel: Evolution of $S$, $I$, $R$ fractions. Right panel: detail of the $I$ fraction. } \label{f:007} \end{figure} \newpage \subsection{Diffuse jets} Finally, we consider the effect of an external flow, as in the previous section, but without density localization. This corresponds to simple random diffuse replacement of non infected agents by infected agents with probability $\a$, and by susceptible and recovered agents with equal probability $\frac {1-\a}2$: \begin{equation} \begin{cases} \left(\partial_t + v \cdot \nabla_x\right) f_S= Q(f_S,f)-\beta Q_+(f_S,f_I) -\gamma}\renewcommand{\delta}{\delta_1 (f_S - \frac {(1-\a)}2 (f_S+f_R))\\ \left(\partial_t + v \cdot \nabla_x\right) f_I = Q(f_I,f) +\beta Q_+(f_S,f_I) -\gamma}\renewcommand{\delta}{\delta f_I + \gamma}\renewcommand{\delta}{\delta_1 \a (f_S+f_R)\\ \left(\partial_t + v \cdot \nabla_x\right) f_R = Q(f_R,f)+\gamma}\renewcommand{\delta}{\delta f_I -\gamma}\renewcommand{\delta}{\delta_1 (f_R - \frac {(1-\a)}2 (f_S+f_R))\\ \end{cases}\;. \label{eq:SIR_BoltzmannDA} \end{equation} In this case, one has a close system of equations for averaged fractions (holding in case of homogeneous solutions for Maxwellian molecules, or after thermalization), reminiscent of SIR-like models with more possible reactions: \begin{equation} \label{eq:SIR:jet} \begin{cases} \dot S = -\beta m IS + \gamma}\renewcommand{\delta}{\delta_1 \left(- \frac {1+\a}2 S + \frac {1-\a}2 R\right) \\ \dot I = \beta m IS -\gamma}\renewcommand{\delta}{\delta I+\gamma}\renewcommand{\delta}{\delta_1 \a (S+R) \\ \dot R = \gamma}\renewcommand{\delta}{\delta I + \gamma}\renewcommand{\delta}{\delta_1 \left(- \frac {1+\a}2 R + \frac {1-\a}2 S\right)\\ \end{cases}\;. \end{equation} For $m=\gamma}\renewcommand{\delta}{\delta_1=1$, it reduces to \begin{equation} \label{eq:SIR:jet'} \begin{cases} \dot S = -\beta IS+ \frac {R-S}2 - \frac {\a}2 (S+R) \\ \dot I = \beta IS -\gamma}\renewcommand{\delta}{\delta I+\a (S+R) \\ \dot R = \gamma}\renewcommand{\delta}{\delta I + \frac {S-R}2 - \frac {\a}2 (S+R)\\ \end{cases}\;, \nonumber \end{equation} where it is easier to recognize the competing terms effect. For $\a =1$ we have, again, extinction of the susceptible agents; for $\a \neq1$ non--trivial stationary solutions exist for the three populations. In the case $\a=0$, for $\gamma}\renewcommand{\delta}{\delta_1$ sufficiently small, the simulation of \eqref{eq:SIR_BoltzmannDA} displays an instant of total vanishing of the infection: $I(t)$ is equal to $0$ from this time on, and the asymptotic values are $\bar{S}=\bar{R}=\frac{1}{2}$. The ODE system \eqref{eq:SIR:jet}, instead, has solution $I(t)\neq 0$ for every time $t\geq0$. The asymptotic values are here close to the case $\a \neq 0$ very small and the values $\bar{S}$ and $\bar{R}$ are not $1/2$. In line with previous results in Section \ref{ssec:simul_free}, the qualitative behaviour is well captured by the ODE system \eqref{eq:SIR:jet}, as reported in Figure \ref{f:008}. After a mixing time, the system is totally homogeneous (the perturbation itself being homogeneous). We show in Fig.~\ref{f:008} some experiments exhibiting damped waves, comparing both homogeneous and concentrated initial data for the particle system (left panels) with the solution of \eqref{eq:SIR:jet} (right panels). \begin{figure}[pth!] \begin{picture}(200,370)(30,150) \put(-20,180){ \includegraphics[width=0.75\textwidth]{fig2000_diffuse.pdf} } \put(275,333){ \includegraphics[width=0.38\textwidth]{SIR_true_f8.pdf} } \put(450,450){ \includegraphics[width=0.06\textwidth]{legenda.png} } \put(-20,-10){ \includegraphics[width=0.75\textwidth]{fig4000_diffuse.pdf} } \put(275,143){ \includegraphics[width=0.38\textwidth]{SIR_true_f9.pdf} } \put(450,260){ \includegraphics[width=0.06\textwidth]{legenda.png} } \end{picture} \caption{Evolution of $S$, $I$, $R$ fractions. Top panels: $\gamma}\renewcommand{\delta}{\delta_1=\frac 1 {2000}$, bottom panels $\gamma}\renewcommand{\delta}{\delta_1=\frac 1 {4000}$. Left panel: particle system with hard spheres cross--section simulated via DSMC. The solid and dashed lines represent, respectively, the case of homogeneous and concentrated initial population of $I$ agents. Parameters: $N=200000$, $\beta=0.95$, $\gamma}\renewcommand{\delta}{\delta=\frac{1}{100}$, $\lambda\simeq29.9$, $\tau\simeq33.8$, $\a=2\cdot 10^{-4}$. Right panel: numerical solution of \eqref{eq:SIR:jet} for $m=\frac{1}{\tau}$, and the same $\beta$, $\gamma}\renewcommand{\delta}{\delta$, $\gamma}\renewcommand{\delta}{\delta_1$, $\a$ as the particle system. } \label{f:008} \end{figure} \newpage We conclude with a remark on the solution to \eqref{eq:SIR:jet}. The asymptotic fraction $\bar{S}$ is very weakly dependent on $\gamma}\renewcommand{\delta}{\delta_1$, provided that $\gamma}\renewcommand{\delta}{\delta_1$ has the same order of magnitude of $\beta\cdot m$ and $\gamma}\renewcommand{\delta}{\delta$, or smaller. Indeed, changing $\gamma}\renewcommand{\delta}{\delta_1$ influences how long the solution stays close to the solution to \eqref{eq:SIR'}, and it changes the asymptotic fractions $\bar{I}$ and $\bar{R}$ that sum $1-\bar{S}$, but it does not perturb significantly $\bar{S}$. We report on this in Table~\ref{t:001} and Fig.~\ref{f:009}. \begin{table}[h!] \centering \begin{tabular}{c|c|c|c} \hline\hline $(\gamma}\renewcommand{\delta}{\delta_1)^{-1}$ & $\bar{S}$ & $\bar{I}$ & $\bar{R}$ \\ \hline\hline 10 & 0.373059 &0.157384 &0.469556 \\ \hline 20 &0.385659& {0.101855}& {0.512484} \\ \hline 50 & 0.394638& 0.0508194 &0.554544 \\ \hline 100 & 0.397964& 0.0278859& 0.574149 \\ \hline 300 & 0.400297& 0.00996697 &0.589736 \\ \hline 1000 & 0.401138& 0.00306936& 0.595793 \\ \hline 5000 & 0.401429& 0.000619549 &0.597951 \\ \hline 10000 & 0.401466& 0.000310134 &0.598224\\ \hline\hline \end{tabular} \caption{Asymptotic values of $S$, $I$, $R$ as a function of $\gamma}\renewcommand{\delta}{\delta_1$, Eq.\,\eqref{eq:SIR:jet} with $\beta=\frac{3}{40}$, $\gamma}\renewcommand{\delta}{\delta=\frac{1}{30}$, $\a=0.01$. } \label{t:001} \end{table} \begin{figure}[pth!] \begin{picture}(200,542)(-10,10) \put(150,0){ \includegraphics[width=0.27\textwidth]{last_10000.pdf} } \put(320,0){ \includegraphics[width=0.27\textwidth]{last_10000_l.pdf} } \put(0,0){ \includegraphics[width=0.25\textwidth]{last_sir.pdf} } \put(0,125){ \includegraphics[width=0.25\textwidth]{last_sir.pdf} }\put(0,250){ \includegraphics[width=0.25\textwidth]{last_sir.pdf} }\put(0,375){ \includegraphics[width=0.25\textwidth]{last_sir.pdf} } \put(0,500){ \includegraphics[width=0.25\textwidth]{last_sir.pdf} } \put(150,125){ \includegraphics[width=0.27\textwidth]{last_5000.pdf} } \put(320,125){ \includegraphics[width=0.27\textwidth]{last_5000_l.pdf} } \put(150,250){ \includegraphics[width=0.27\textwidth]{last_1000.pdf} } \put(320,250){ \includegraphics[width=0.27\textwidth]{last_1000_l.pdf} } \put(150,375){ \includegraphics[width=0.27\textwidth]{last_300.pdf} } \put(320,375){ \includegraphics[width=0.27\textwidth]{last_300_l.pdf} } \put(150,500){ \includegraphics[width=0.27\textwidth]{last_20.pdf} } \put(320,500){ \includegraphics[width=0.27\textwidth]{last_20_l.pdf} } \put(-10,15){ e. } \put(-10,145){ d. } \put(-10,275){ c. } \put(-10,405){ b. } \put(-10,535){ a. } \end{picture} \caption{Evolution of $S$, $I$, $R$ for $\beta=\frac{3}{40}$, $\gamma}\renewcommand{\delta}{\delta=\frac{1}{30}$, $\a=0.01$. Rows: a. $\gamma}\renewcommand{\delta}{\delta_1=\frac{1}{20}$; b. $\gamma}\renewcommand{\delta}{\delta_1=\frac{1}{300}$; c. $\gamma}\renewcommand{\delta}{\delta_1=\frac{1}{1000}$; d. $\gamma}\renewcommand{\delta}{\delta_1=\frac{1}{5000}$; e. $\gamma}\renewcommand{\delta}{\delta_1=\frac{1}{10000}$. \\Left column: solutions to free SIR \eqref{eq:SIR'} for $t\in[0,500]$; \\Middle column: solutions to \eqref{eq:SIR_BoltzmannDA} for $t\in[0,500]$; \\Right column: solutions to \eqref{eq:SIR_BoltzmannDA} for $t\in[0,10000]$. } \label{f:009} \end{figure} \newpage
\section{Introduction} \subsection{Motivation and Problem} \label{subsec:motivation-and-problem} In tasks like question answering, text summarization, or entity disambiguation, it is essential to have background information about the involved entities. With entity linking tools like DBpedia Spotlight \cite{mendes2011dbpedia} or Falcon \cite{sakor2020falcon}, one can easily identify named entities in text and retrieve the respective entity in a background entity hub of the linking tool (e.g. in a wiki like Wikipedia or in a knowledge graph like DBpedia \cite{lehmann2015dbpedia}). This is, however, only possible if the entity in question is contained in the respective entity hub \cite{van2016evaluating}. The trend of entities added to publicly available knowledge graphs in recent years indicates that they are far from being complete. The number of entities in Wikidata \cite{vrandevcic2014wikidata}, for example, grew by 37\% in the time from October 2019 (61.7M) to October 2020 (84.5M). In the same time, the number of statements increased by 41\% from 770M to 1085M.\footnote{\url{https://tools.wmflabs.org/wikidata-todo/stats.php}} According to \cite{heist2020knowledge}, Wikidata describes the largest number of entities and comprises -- in terms of entities -- other open knowledge graphs to a large extent. Consequently, this problem applies to all public knowledge graphs, and particularly so for long-tail and emerging entities \cite{farber2016emerging}. Automatic information extraction approaches can help mitigating this problem if the approaches can make sure that the extracted information is of high quality. While the performance of open information extraction systems (i.e. systems that extract information from general web text) has improved in recent years \cite{liu2020extracting,stanovsky2018supervised,del2013clausie}, the quality of extracted information has not yet reached a level where an integration into knowledge graphs like DBpedia should be done without further filtering. \begin{figure}[t] \centering \includegraphics[width=.5\linewidth]{figures/www2020_running-example.png} \caption{Simplified view on the Wikipedia page of Gilby Clarke with a focus on its title, sections, and listings.} \label{fig:running-example} \Description{A simplified view on the Wikipedia page of Gilby Clarke is shown which contains only the page title, sections, and listings of the page. The focus is set on the section "Discography" with its subsections "Albums with Guns N' Roses", "Albums with Nancy Sinatra", and "Solo albums". Each of the subsections contain lists or tables with instances of albums.} \end{figure} The extraction of information from semi-structured data is in general less error-prone and already proved to yield high-quality results as, for example, DBpedia itself is extracted primarily from Wikipedia infoboxes; further approaches use the category system of Wikipedia \cite{suchanek2007yago,heist2019uncovering,xu2016learning} or its list pages \cite{paulheim2013extending,heist2020entity}. Many more approaches focus on tables (in Wikipedia or the web) as semi-structured data source to extract entities and relations (see \cite{zhang2020web} for a comprehensive survey). The focus of recent web table-based approaches like Zhang et al. \cite{zhang2020novel} is set on recognizing entities and relationships within a table. Considering Fig.~\ref{fig:running-example}, the table below the section \textit{Solo albums} may be used to discover the publication years of albums (relation extraction) or discover additional unknown albums that are listed in further rows below \textit{Rubber} and \textit{Swag} (entity and type detection). The focus of this paper is broader with respect to two dimensions: First, we extract information from any kind of structure where similar entities co-occur. In Fig.~\ref{fig:running-example}, we would consider both tables and lists (e.g. the list in the section \textit{Albums with Guns N' Roses}). We refer to these co-occurrence structures as listings. Second, we consider only the subject entities (SE) of listings. In our previous work we defined SE with respect to Wikipedia list pages as \textit{"the instances of the concept expressed by the list page"} \cite{heist2020entity}. Considering the \textit{List of Japanese speculative fiction writers}, its SE comprise all Japanese speculative fiction writers mentioned in listings of the page. While in \cite{heist2020entity} the concept of SE is made explicit by the list page, we deal with arbitrary listings in this paper. We thus assume the concept may not be explicit or it may be indicated as part of the page in which the listing appears (e.g. in the table header, or the page title). Therefore, to each entity in a listing appearing as instance to a common concept, we will further refer as subject entity. The purpose of this work is to exploit the relationship between the SE of a listing and the listing context. For Fig.~\ref{fig:running-example}, this means we extract that all SE on the page's listings are albums with the artist \textit{Gilby Clarke}, that \textit{The Spaghetti Incident?} is an album by \textit{Guns N' Roses}, and so on. To that end, we propose to learn these characteristics of a listing with respect to the types and contextual relations of its SE. In an ideal setting we know the SE of a listing and we are able to retrieve all information about them from a knowledge graph -- the characteristics of a listing are then simply the types and relations that are shared by all SE. But uncertainty is introduced by several factors: \begin{itemize} \item SE can only be determined heuristically. In previous work \cite{heist2020entity}, we achieved a precision of 90\% for the recognition of SE in Wikipedia listings. \item Cross-domain knowledge graphs are not complete. According to the open world assumption (OWA), the absence of a fact in a knowledge graph does not imply its incorrectness. \item Web tables have a median of 6 rows,\footnote{According to the WDC Web Table Corpus 2015: \url{http://webdatacommons.org/webtables/}.} and Wikipedia listings have a median of 8 rows. Consequently, many listings only have a small number of SE from which the characteristics can be inferred. \end{itemize} As a result, considering each listing in isolation either leads to a substantial loss of information (as listings with insufficient background information are disregarded) or to a high generalization error (as decisions are made based on insufficient background information). We observe that the context of a listing is often a strong indicator for its characteristics. In Fig.~\ref{fig:running-example}, the title of the top section \textit{Discography} indicates that its listings contain some kind of musical works, and the section title \textit{Albums with Guns N' Roses} provides more detailed information. Our second observation is that these patterns repeat when looking at a coherent data corpus. The Wikipedia page of \textit{Axl Rose},\footnote{\url{https://en.wikipedia.org/wiki/Axl_Rose}} for example, contains the same constellation of sections. Considering listing characteristics with respect to their context can thus yield in more general insights than considering every listing in isolation. For example, the musical works of many artists in Wikipedia are listed under the top section \textit{Discography}. Hence, we could learn the axioms \begin{equation}\label{eq:axiom-example-1} \exists topSection.\{\textrm{"Discography"}\} \sqsubseteq \mathtt{MusicalWork} \end{equation} and \begin{equation}\label{eq:axiom-example-2} \exists topSection.\{\textrm{"Discography"}\} \sqsubseteq \exists artist.\{\textrm{<}PageEntity\textrm{>}\} \end{equation} which are then applicable to any listing with the top section \textit{Discography} in Wikipedia. \subsection{Approach and Contributions} In this work, we frame the task of finding descriptive rules for listings based on their context as association rule mining problem \cite{agrawal1993mining}. We define rule metrics that take the inherent uncertainty into account and make sure that rules are frequent (rule support), correct (rule confidence), and consistent over all listings (rule consistency). Furthermore, we present an approach that executes the complete pipeline from identification of SE to the extraction of novel entities and assertions with Wikipedia as data corpus. To find a reasonable balance between correctness and coverage of the rules, we set the thresholds based on a heuristic that takes the distribution of named entity tags over entities as well as existing knowledge in a knowledge graph into account. Applying the approach, we show that we can enhance the knowledge graphs DBpedia with up to 2.9M entities and 8.3M assertions, and CaLiGraph\footnote{\url{http://caligraph.org}} with up to 3M entities and 30.4M assertions with an overall correctness of more than 90\%. To summarize, the contributions of this paper are as follows: \begin{itemize} \item We formulate the task of information extraction from co-occurring similar entities in listings and show how to derive descriptive rules for listing characteristics based on the listing context (Sec.~\ref{sec:ie-from-cooccurrences}). \item We present an approach that learns descriptive rules for listings in Wikipedia and is capable of extracting several millions of novel entities and assertions for Wikipedia-based knowledge graphs (Sec.~\ref{sec:exploiting-co-occurrences-in-Wikipedia}). \item In our evaluation we demonstrate the high quality of the extracted information and analyze the shortcomings of the approach (Sec.~\ref{sec:evaluation}). \end{itemize} The produced code is part of the CaLiGraph extraction framework and publicly available.\footnote{\url{https://github.com/nheist/CaLiGraph}} \section{Related Work} The work presented in this paper is a flavour of \emph{knowledge graph completion}, more precisely, of adding new entities to a knowledge graph \cite{paulheim2017knowledge}. We use rules based on page context to infer facts about co-occurring entities. In particular, we focus on co-occurrence of entities within document listings, where co-occurrence refers to proximity in page layout. Hence, in this section, we discuss related works w.r.t. knowledge graph completion from listings, exploitation of listing context, as well as rule learning for knowledge graphs. \subsection{Knowledge Graph Completion from Listings} \label{subsec:knowledge-graph-completion-from-listings} Knowledge graph completion using information in web tables has already been an active research area in the last several years. In 2016, Ritze et al. \cite{ritze2016profiling} profiled the potential of web tables in the WDC Web Table Corpus. Using the T2K Match framework, they match web tables to DBpedia and find that the best results for the extraction of new facts can be achieved using knowledge-based trust \cite{dong2015knowledge} (i.e., judging the quality of a set of extracted triples by their overlap with the knowledge base). Zhang et al. \cite{zhang2020novel} present an approach for detection of novel entities in tables. They first exploit lexical and semantic similarity for entity linking and column heading property matching. In a second step they use the output to detect novel entities in table columns. Oulabi and Bizer \cite{oulabi2019using} tackle the same problem for Wikipedia tables with a bootstrapping approach based on expert-defined rules. Macdonald and Barbosa \cite{macdonald2020neural} extract new facts from Wikipedia tables to extend the Freebase knowledge base. With an LSTM that uses contextual information of the table, they extract new facts for 28 relations. Lists have only very sparsely been used for knowledge graph completion. Paulheim and Ponzetto \cite{paulheim2013extending} frame the general potential of list pages as a source of knowledge in Wikipedia. They propose to use a combination of statistical and NLP methods to extract knowledge and show that, by applying them to a single list page, they are able to extract a thousand new statements. Compared to all previously mentioned approaches, we take an abstract view on listings by considering only their subject entities. This provides the advantage that rules can be learned from and applied to arbitrary listings. In addition to that, we do not only discover novel entities, but also discover relations between those entities and the page subject. In our previous work \cite{heist2020entity}, we have already presented an approach for the identification of novel entities and the extraction of facts in Wikipedia list pages. List pages are pages in Wikipedia that start with \textit{List of} and contain listings (i.e., tables or lists) of entities for a given topic (e.g. \textit{List of Japanese speculative fiction writers}). The approach is divided into two phases: In a first phase, a dataset of tagged entities from list pages is extracted. With distant supervision from CaLiGraph, a knowledge graph with a detailed type hierarchy derived from Wikipedia categories and list pages, a part of the mentioned entities is heuristically labeled as subject entities and non-subject entities. In a second phase, the dataset is enriched with positional, lexical, and statistical features extracted from the list pages. On the basis of this data, an XGBoost classifier is able to identify more than two million subject entities with an average precision of 90\%. As not all the information about the subject entities is contained in the knowledge graphs DBpedia and CaLiGraph, they can be enhanced with the missing information. In this work, we reuse the approach presented in \cite{heist2020entity} for identifying subject entities. Further, as it is the only approach that also works with arbitrary listings, we use it as a baseline in our experiments. As, in its current state, it only works for list pages in Wikipedia, we extend it to arbitrary pages with a simple frequency-based approach. \subsection{Exploiting the Context of Listings} As tables are the more actively researched type of listings, we focus here on the types of context used when working with tables. The most obvious source of context is found directly on the page where the table is located. This page context is, for example, used by InfoGather \cite{yakout2012infogather} to detect possible synonyms in table headers for means of table matching. Zhang \cite{zhang2014towards} distinguishes between "in-table" features like the table header, and "out-table" features like captions, page title, and text of surrounding paragraphs. With both kinds of features, they perform entity disambiguation against Freebase. The previously mentioned approach of Macdonald and Barbosa \cite{macdonald2020neural} focuses on tables in Wikipedia and hence uses specific context features like section titles, table headers and captions, and the text in the first paragraph of the table's section. Interestingly, they do not only discover relations between entities in the table, but also between a table entity and the page subject. MENTOR \cite{cannaviccio2018leveraging} leverages patterns occurring in headers of Wikipedia tables to consistently discover DBpedia relations. Lehmberg et al. \cite{lehmberg2017stitching} tackle the problem of small web tables with table stitching, i.e., they combine several small tables with a similar context (e.g., same page or domain and a matching schema) into one large table, making it easier to extract facts from it. Apart from page context, many approaches use the context of entities in tables to improve extraction results. Zhang et al. \cite{zhang2020generating} generate new sub-classes to a taxonomy for a set of entities. Therefore, they find the best-describing class using the context of the entities. In particular, they use the categories of the entities as well as the immediate context around the entities on the page. Another approach that uses entity categories as context is TableNet \cite{fetahu2019tablenet}. They leverage the context to find schematically similar or related tables for a given table in Wikipedia. In our experiments with Wikipedia, we use section headers as page context and types in the knowledge graph as entity context. However, the definition of context in our approach is kept very generic on purpose. By doing that, we are able to incorporate additional context sources like section text or entity categories to improve extraction results. This, however, also comes with an increase in rule complexity and, consequently, run time. \subsection{Rule-based Knowledge Graph Completion} Rule-based knowledge graph completion approaches typically generate rules either on instance-level (rules that add new facts for individual instances) or on schema-level (rules that add additional schematic constraints). AMIE+ \cite{galarraga2015fast} and AnyBURL \cite{meilicke2019anytime} are instance-level rule learners inspired by inductive logic programming (ILP). The former uses top-down, the latter bottom-up rule learning to generate rules in the fashion of $born(X,A) \land capital(A,Y) \implies citizen(X,Y)$. DL-Learner \cite{lehmann2009dl} is an ILP-based approach on schema-level which finds description logic patterns for a set of instances. A related approach uses statistical schema induction \cite{volker2011statistical} to derive additional schema constraints (e.g. range restrictions for predicates). The above mentioned approaches are merely \emph{link prediction} approaches, i.e. they predict new relations between entities already contained in the knowledge graph. The same holds for the omnipresent knowledge graph embedding approaches \cite{wang2017knowledge}. Such approaches are very productive when enough training data is available and they provide exact results especially when both positive and negative examples are given. In the setting of this paper, we are working with (more or less) noisy external data. With regard to instance- versus schema-level, our approach can be regarded as a hybrid approach that generates rules for sets of entities, which are in turn used to generate facts on an instance-level. In this respect, our approach is similar to C-DF \cite{xu2016learning} which uses Wikipedia categories as an external data source to derive the characteristics of categories. To that end, they derive lexical patterns from category names and contained entities. In this paper, we apply rule learning to co-occurring entities in Wikipedia. While existing approaches have only considered explicit co-occurrence, i.e., categories or list pages, we go beyond the state of the art by considering \emph{arbitrary} listings in Wikipedia, as the one shown in Fig.~\ref{fig:running-example}. \section{Information Extraction From Co-Occurrences} \label{sec:ie-from-cooccurrences} In this paper, we consider a data corpus $D$ from which co-occurring entities can be extracted (e.g., listings in Wikipedia or a collection of spreadsheets). Furthermore, we assume that a knowledge graph which contains a subset of those entities can be extended with information learned about the co-occurring entities. \subsection{Task Formulation} \label{subsec:task-formulation} The Knowledge Graph $\mathcal{K}$ is a set of assertions about its entities in the form of triples $\{(s,p,o)|s \in \mathcal{E}, p \in \mathcal{P}, o \in \mathcal{E} \cup \mathcal{T} \cup \mathcal{L}\}$ defined over sets of entities $\mathcal{E}$, predicates $\mathcal{P}$, types $\mathcal{T}$, and literals $\mathcal{L}$. We refer to statements about the types of an entity (i.e., $p = \textrm{rdf:type}, o \in \mathcal{T}$) as type assertions ($TA \subset K$), and to statements about relations between two entities (i.e., $o \in \mathcal{E}$) as relation assertions ($RA \subset K$). With $\mathcal{K}^* \supseteq \mathcal{K}$, we refer to the idealized complete version of $\mathcal{K}$. With regard to the OWA this means that a fact is incorrect if it is not contained in $\mathcal{K}^*$.\footnote{$\mathcal{K}^*$ is merely a theoretical construct, since a complete knowledge graph of all entities in the world cannot exist.} The data corpus $D$ contains a set of listings $\Phi$, where each listing $\phi \in \Phi$ contains a number of subject entities $SE_\phi$. Our task is to identify statements that hold for all subject entities $SE_\phi$ in a listing $\phi$. We distinguish taxonomic and relational information that is expressed in $\mathcal{K}$. The taxonomic information is a set of types that is shared by all SE of a listing: \begin{equation}\label{eq:types-of-listing} \mathcal{T}_\phi = \{t | t \in \mathcal{T}, \forall s \in SE_\phi : (s, \mathtt{rdf}\mathord{:}\mathtt{type}, t) \in \mathcal{K}^*\}, \end{equation} and the relational information is a set of relations to other entities which is shared by all SE of a listing:\footnote{Here, the entities in $SE_\phi$ may occur both in the subject as well as in the object position. But for a more concise notation, we use only (p,o)-tuples and introduce the set of inverse predicates $\mathcal{P}^{-1}$ to express that SE may also occur in object position. This is, however, only a notation and the inverse predicates do not have to exist in the schema.} \begin{eqnarray}\label{eq:rels-of-listing} \mathcal{R}_\phi = \{(p,o) | p \in \mathcal{P} \cup \mathcal{P}^{-1}, o \in \mathcal{E}, \forall s \in SE_\phi : (s,p,o) \in \mathcal{K}^*\}. \end{eqnarray} From these characteristics of listings, we can derive all the \emph{additional} type assertions \begin{equation}\label{eq:ta-plus} TA^+ = \bigcup_{\phi \in \Phi} \{(s, \mathtt{rdf}\mathord{:}\mathtt{type}, t)|s \in SE_\phi, t \in \mathcal{T}_\phi\} \setminus TA \end{equation} and \emph{additional} relation assertions \begin{equation}\label{eq:ra-plus} RA^+ = \bigcup_{\phi \in \Phi} \{(s,p,o)|s \in SE_\phi, (p,o) \in \mathcal{R}_\phi\} \setminus RA \end{equation} that are encoded in $\Phi$ and missing in $\mathcal{K}$. Furthermore, $TA^+$ and $RA^+$ can contain additional entities that are not yet contained in $\mathcal{K}$, as there is no restriction for subject entities of $\Phi$ to be part of $\mathcal{K}$. For the sake of readability, we will only describe the case of $\mathcal{R}_\phi$ for the remainder of this section as $\mathcal{T}_\phi$ is -- notation-wise -- a special case of $\mathcal{R}_\phi$ with $p = \mathtt{rdf}\textrm{:}\mathtt{type}$ and $o \in \mathcal{T}$. \subsection{Learning Descriptive Rules for Listings} \label{subsec:learning-descriptive-rules-for-listings} Due to the incompleteness of $\mathcal{K}$, it is not possible to derive the exact set of relations $\mathcal{R}_\phi$ for every listing in $\Phi$. Hence, our goal is to derive an approximate version $\mathcal{\hat{R}}_\phi$ by using $\phi$ and the knowledge about $SE_\phi$ in $\mathcal{K}$. Similar to the rule learner AMIE+ \cite{galarraga2015fast}, we use the partial completeness assumption (PCA) to generate negative evidence. The PCA implies that if $(s,p,o) \in \mathcal{K}$ then $\forall o' : (s,p,o') \in \mathcal{K}^* \implies (s,p,o') \in \mathcal{K}$. In order words, if $\mathcal{K}$ makes some assertions with a predicate $p$ for a subject $s$, then we assume that $\mathcal{K}$ contains every $p$-related information about $s$. Following from the PCA, we use the $count$ of entities with a specific predicate-object combination in a set of entities $E$ \begin{equation}\label{eq:relation-count} count(E,p,o) = |\{s|s \in E, \exists o : (s,p,o) \in \mathcal{K}\}| \end{equation} and the $count$ of entities having predicate $p$ with an arbitrary object \begin{equation}\label{eq:predicate-count} count(E,p) = |\{s|s \in E, \exists o' : (s,p,o') \in \mathcal{K}\}| \end{equation} to compute a maximum-likelihood-based frequency of a specific predicate-object combination occurring in $E$: \begin{equation}\label{eq:relation-frequency} freq(E,p,o) = \frac{count(E,p,o)}{count(E,p)}. \end{equation} From Eq.~\ref{eq:relation-frequency} we first derive a naive approximation of a listing's relations by including all relations with a frequency above a defined threshold $\tau_{freq}$: \begin{equation}\label{eq:freq-r-hat} \mathcal{\hat{R}}_\phi^{freq} = \{(p,o) | (p,o) \in \mathcal{R}, freq(SE_\phi,p,o) > \tau_{freq}\}. \end{equation} As argued in Sec.~\ref{subsec:motivation-and-problem}, we improve this naive frequency-based approximation by learning more general patterns that describe the characteristics of listings using their context. \textbf{Hypothesis 1.} The context $\zeta_\phi$ of a listing $\phi$ in $D$ contains such information about $\mathcal{R}_\phi$ that it can be used to find subsets of $\Phi$ with similar $\mathcal{R}$. \begin{table} \caption{Exemplary context ($\zeta$), type frequency ($T^F$), and relation frequency ($R^F$) vectors for a set of listings extracted from $D$. While $\zeta$ is extracted directly from $D$, $T^F$ and $R^F$ are retrieved via distant supervision from $\mathcal{K}$.} \label{tab:task-listings} \begin{tabular}{cccc} \toprule Listing & $\zeta$ & $T^F$ & $R^F$\\ \midrule $\phi_1$ & (1 0 1 ... 1) & (0.2 0.9 0.0 ... 0.1) & (0.9 0.1 0.0 ... 0.1)\\ $\phi_2$ & (0 1 1 ... 0) & (0.0 0.2 0.0 ... 0.9) & (0.0 0.0 0.0 ... 0.2)\\ $\phi_3$ & (0 0 0 ... 0) & (0.7 0.7 0.0 ... 0.0) & (0.0 0.0 0.0 ... 0.4)\\ \multicolumn{4}{c}{...}\\ $\phi_{n-1}$ & (1 0 0 ... 1) & (0.8 0.9 0.0 ... 0.0) & (0.0 0.9 0.0 ... 0.0)\\ $\phi_n$ & (1 0 0 ... 1) & (0.7 1.0 0.0 ... 0.3) & (0.0 0.0 0.8 ... 0.0)\\ \bottomrule \end{tabular} \end{table} Let Table~\ref{tab:task-listings} contain the information about all listings in $D$. A listing $\phi$ is defined by its context $\zeta_\phi$ (which can in theory contain any information about $\phi$, from the title of its section to an actual image of the listing), the type frequencies $(t_1, t_2,.., t_x) \in T^F_\phi$, and the relation frequencies $(r_1, r_2,.., r_y) \in R^F_\phi$. Listings $\phi_1$, $\phi_{n-1}$, and $\phi_n$ have overlapping context vectors. $t_2$ has a consistently high frequency over all three listings. It is thus a potential type characteristic for this kind of listing context. Furthermore, $r_1$ has a high frequency in $\phi_1$, $r_2$ in $\phi_{n-1}$, and $r_3$ in $\phi_n$ -- if the three relations share the same predicate, they may all express a similar relation to an entity in their context (e.g. to the subject of the page). In a concrete scenario, the context vector \textit{(1 0 0 ... 1)} might indicate that the listing is located on the page of a musician under the section \textit{Solo albums}. $t_2$ holds the frequency of the type \textit{Album} in this listing and $r_1$ to $r_3$ describe the frequencies of the relations (\textit{artist}, Gilby Clarke), (\textit{artist}, Axl Rose), and (\textit{artist}, Slash). We formulate the task of discovering frequent co-occurrences of context elements and taxonomic and relational patterns as an association rule mining task over all listings in $D$. Association rules, as introduced by Agrawal et al. \cite{agrawal1993mining}, are simple implication patterns originally developed for large and sparse datasets like transaction databases of supermarket chains. To discover items that are frequently bought together, rules of the form $X \implies Y$ are produced, with $X$ and $Y$ being itemsets. In the knowledge graph context, they have been used, e.g., for enriching the schema of a knowledge graph \cite{paulheim2012unsupervised,volker2011statistical}. For our scenario, we need a mapping from a context vector $\zeta \in Z$ to a predicate-object tuple. Hence, we define a rule $r$, its antecedent $r_a$, and its consequent $r_c$ as follows: \begin{equation}\label{eq:rule-definition} r: r_a \in Z \implies r_c \in (\mathcal{P} \cup \mathcal{P}^{-1})\times (\mathcal{T} \cup \mathcal{E} \cup \mathcal{X}). \end{equation} As a rule should be able to imply relations to entities that vary with the context of a listing (e.g. to \textit{Gilby Clarke} as the page's subject in Fig.~\ref{fig:running-example}), we introduce $\mathcal{X}$ as the set of placeholders for context entities (instead of \textit{Gilby Clarke}, the object of the rule's consequent would be <\texttt{PageEntity}>). We say a rule antecedent $r_a$ matches a listing context $\zeta_\phi$ (short: $r_a \simeq \zeta_\phi$) if the vector of $\zeta_\phi$ is 1 when the vector of $r_a$ is 1. In essence, $\zeta_\phi$ must comprise $r_a$. Accordingly, we need to find a set of rules $R$, so that for every listing $\phi$ the set of approximate listing relations \begin{equation}\label{eq:rule-t-hat} \mathcal{\hat{R}}_\phi^{rule} = \bigcup_{r \in R} \{r_c|r_a \simeq \zeta_\phi\} \end{equation} resembles the true relations $\mathcal{R}_\phi$ as closely as possible. Considering all the listings in Fig.~\ref{fig:running-example}, their $\mathcal{\hat{R}}_\phi^{rule}$ should, among others, contain the rules\footnote{Note that Eqs.~\ref{eq:axiom-example-1} and \ref{eq:axiom-example-2} are the axiom equivalents of Eqs.~\ref{eq:rule-example-1} and \ref{eq:rule-example-2}. For better readability, we use the description logics notation of Eqs.~\ref{eq:axiom-example-1} and \ref{eq:axiom-example-2} from here on.}$^,$\footnote{Instead of a binary vector, we use a more expressive notation for the listing context in our examples. The notations are trivially convertible by one-hot-encoding.} \begin{equation}\label{eq:rule-example-1} topSection(\textrm{"Discography"}) \implies (type,\mathtt{MusicalWork}) \end{equation} and \begin{equation}\label{eq:rule-example-2} topSection(\textrm{"Discography"}) \implies (artist,\textrm{<}PageEntity\textrm{>}). \end{equation} It is important to note that these rules can be derived from listings with differing context vectors. All listings only have to have in common that their top section has the title \textit{Discography} and that the contained entities are of the type \texttt{MusicalWork} with the page entity as artist. Still, the individual listings may, for example, occur in sections with different titles. \subsection{Quality Metrics for Rules} \label{subsec:quality-metrics-for-rules} In original association rule mining, two metrics are typically considered to judge the quality of a rule $X \implies Y$: the support of the rule antecedent (how often does $X$ occur in the dataset), and the confidence of the rule (how often does $X \cup Y$ occur in relation to $X$). Transferring the support metric to our task, we count the absolute frequency of a particular context occurring in $\Phi$. Let $\Phi_{r_a} = \{\phi|\phi \in \Phi, r_a \simeq \zeta_\phi\}$, then we define the support of the rule antecedent $r_a$ as \begin{equation}\label{eq:pattern-support} supp(r_a) = |\Phi_{r_a}|. \end{equation} Due to the incompleteness of $\mathcal{K}$, the values of $Y$ are in our case no definitive items but maximum-likelihood estimates of types and relations. With respect to these estimates, a good rule has to fulfill two criteria: it has to be correct (i.e. frequent with respect to all SE of the covered listings) and it has to be consistent (i.e. consistently correct over all the covered listings). We define the correctness, or confidence, of a rule as the frequency of the rule consequent over all SE of a rule's covered listings: \begin{equation}\label{eq:pattern-confidence} conf(r) = \frac{\sum_{\phi \in \Phi_{r_a}} count(SE_\phi,p_{r_c},o_{r_c})}{\sum_{\phi \in \Phi_{r_a}} count(SE_\phi,p_{r_c})}, \end{equation} and we define the consistency of a rule using the mean absolute deviation of an individual listing's confidence to the overall confidence of the rule: \begin{equation}\label{eq:pattern-consistency} cons(r) = 1 - \frac{\sum_{\phi \in \Phi_{r_a}} |freq(SE_\phi,p_{r_c},o_{r_c}) - conf(r)|}{supp(r_a)}. \end{equation} While a high confidence ensures that the overall assertions generated by the rule are correct, a high consistency ensures that few listings with many SE do not outvote the remaining covered listings. To select an appropriate set of rules $R$ from all the candidate rules $R^*$ in the search space, we have to pick reasonable thresholds for the minimum support ($\tau_{supp}$), the minimum confidence ($\tau_{conf}$), and the minimum consistency ($\tau_{cons}$). By applying these thresholds, we find our final set of descriptive rules $R$: \begin{equation}\label{eq:rule-selection} \{r | r \in R^*, supp(r_a) > \tau_{supp} \land conf(r) > \tau_{conf} \land cons(r) > \tau_{cons}\}. \end{equation} Typically, the choice of these thresholds is strongly influenced by the nature of the dataset $D$ and the extraction goal (correctness versus coverage). \section{Exploiting Co-Occurrences in Wikipedia} \label{sec:exploiting-co-occurrences-in-Wikipedia} Wikipedia is a rich source of listings, both in dedicated list pages as well as in sections of article pages. Hence, we use it as a data corpus for our experiments. In Sec.~\ref{sec:discussion-and-outlook}, we discuss other appropriate corpora for our approach. Due to its structured and encyclopedic nature, Wikipedia is a perfect application scenario for our approach. We can exploit the structure by building very expressive context vectors. Obviously, this positively influences the quality of extraction results. Still, the definition of the context vector is kept abstract on purpose to make the approach applicable to other kinds of web resource as well. However, an empirical evaluation of the practicability or performance of the approach for resources outside of the encyclopedic domain is out of scope of this paper. \subsection{Approach Overview} \begin{figure*}[ht] \centering \includegraphics[width=.98\textwidth]{figures/www2020_overview-figure.png} \caption{An overview of the approach with exemplary outputs of the individual phases.} \label{fig:approach-overview} \Description{An overview of the approach to extract type and relation assertions from Wikipedia listings. The approach starts with a knowledge graph and a Wikipedia dump and then runs the three phases Subject Entity Discovery, Descriptive Rule Mining, and Assertion Generation and Filtering.} \end{figure*} Fig.~\ref{fig:approach-overview} gives an overview of our extraction approach. The input of the approach is a dump of Wikipedia as well as an associated knowledge graph. In the \textit{Subject Entity Discovery} phase, listings and their context are extracted from the Wikipedia dump and subject entities are identified (Sec.~\ref{subsec:subject-entity-discovery}). Subsequently, the existing information in the knowledge graph is used to mine descriptive rules from the extracted listings (Sec.~\ref{subsec:descriptive-rule-mining}). Finally, the rules are applied to all the listings in Wikipedia in order to extract new type and relation assertions (Sec.~\ref{subsec:assertion-generation-and-filtering}). \subsection{Wikipedia as a Data Corpus} We pick Wikipedia as a data corpus for our experiments as it brings several advantages: \paragraph{Structure} Wikipedia is written in an entity-centric style with a focus on facts. Listings are often used to provide an overview of a set of entities that are related to the main entity. Due to the encyclopedic style and the peer-reviewing process, it has a consistent structure. Especially section titles are used consistently for specific topics. Wikipedia has its own markup language (Wiki markup), which allows a more consistent access to interesting page structures like listings and tables than plain HTML. \paragraph{Entity Links} If a Wikipedia article is mentioned in another article, it is typically linked in the Wiki markup (a so called \textit{blue link}). Furthermore, it is possible to link to an article that does not (yet) exist (a so called \textit{red link}). As Wikipedia articles can be trivially mapped to entities in Wikipedia-based knowledge graphs like DBpedia, since they create one entity per article, we can identify many named entities in listings and their context without the help of an entity linker. For our experiments, we use a Wikipedia dump of October 2016 which is, at the time of the experiments, the most recent dump that is compatible with both DBpedia and CaLiGraph. In this version, Wikipedia contains 6.9M articles, 2.4M of which contain listings with at least two rows.\footnote{Wiki markup is parsed with WikiTextParser: \url{https://github.com/5j9/wikitextparser}.} In total, there are 5.1M listings with a row count median of 8, mean of 21.9, and standard deviation of 76.8. Of these listings, 1.1M are tables, and 4.0M are lists. \subsection{Subject Entity Discovery} \label{subsec:subject-entity-discovery} \subsubsection{Entity Tagging} Apart from the already tagged entities via blue and red links, we have to make sure that any other named entity in listings and their context is identified as well. This is done in two steps: In a first step, we expand all the blue and red links in an article. If a piece of text is linked to another article, we make sure that every occurrence of that piece of text in the article is linked to the other article. This is necessary as by convention other articles are only linked at their first occurrence in the text.\footnote{\url{https://en.wikipedia.org/wiki/Wikipedia:Manual_of_Style/Linking\#Duplicate_and_repeat_links}} In a second step, we use a named entity tagger to identify additional named entities in listings. To that end, we use a state-of-the-art entity tagger from spaCy.\footnote{\url{https://spacy.io}} This tagger is trained on the OntoNotes5\footnote{\url{https://catalog.ldc.upenn.edu/LDC2013T19}} corpus, and thus not specifically trained to identify named entities in short text snippets like they occur in listings. Therefore, we specialize the tagger by providing it Wikipedia listings as additional training data with blue links as positive examples. In detail, the tagger is specialized as follows: \begin{itemize} \item We retrieve all listings in Wikipedia list pages as training data. \item We apply the plain spaCy entity tagger to the listings to get named entity tags for all mentioned entities. \item To make these tags more consistent, we use information from DBpedia about the tagged entities: We look at the distribution of named entity tags over entities with respect to their DBpedia types and take the majority vote. For example, if 80\% of entities with the DBpedia type \texttt{Person} are annotated with the tag \textit{PERSON}, we use \textit{PERSON} as label for all these entities. \item Using these consistent named entity tags for blue-link entities, we specialize the spaCy tagger. \end{itemize} \subsubsection{Subject Entity Classification} We apply the approach from \cite{heist2020entity} for the identification of subject entities in listings. In short, we use lexical, positional, and statistical features to classify entities as subject or non-subject entities (refer to Sec.~\ref{subsec:knowledge-graph-completion-from-listings} for more details). Despite being developed only for listings in list pages, the classifier is applicable to any kind of listing in Wikipedia. A disadvantage of this broader application is that the classifier is not trained in such a way that it ignores listings used for organisational or design purposes (e.g. summaries or timelines). These have to be filtered out in the subsequent stages. \subsubsection{Results} After expanding all the blue and red links on the pages, the dataset contains 5.1M listings with 60.1M entity mentions. 51.6M additional entity mentions are identified by the named entity tagger. Of all the entity mentions, we classify 25.8M as subject entities. Those occur in 2.5M listings of 1.3M pages. This results in a mean of 10.5 and median of 4 subject entities per listing with a standard deviation of 49.8. \subsection{Descriptive Rule Mining} \label{subsec:descriptive-rule-mining} \subsubsection{Describing Listings} The search space for rule candidates is defined by the listing context. Thus, we choose the context in such a way that it is expressive enough to be an appropriate indicator for $\mathcal{T}_\phi$ and $\mathcal{R}_\phi$, and concise enough to explore the complete search space without any additional heuristics. We exploit the fact that Wikipedia pages of a certain type (e.g., musicians) mostly follow naming conventions for the sections of their articles (e.g., albums and songs are listed under the top section \textit{Discography}). Further, we exploit that the objects of the SE's relations are usually either the entity of the page, or an entity mentioned in a section title. We call these typical places for objects the relation \textit{targets}. In Fig.~\ref{fig:running-example}, \textit{Gilby Clarke} is an example of a \textit{PageEntity} target, and \textit{Guns N' Roses} as well as \textit{Nancy Sinatra} are examples for \textit{SectionEntity} targets. As a result, we use the type of the page entity, the top section title, and the section title as listing context. Additionally, we use the type of entities that are mentioned in section titles. This enables the learning of more abstract rules, e.g., to distinguish between albums listed in a section describing a band: \begin{gather*} \exists pageEntityType.\{\mathtt{Person}\} \sqcap \exists topSection.\{\textrm{"Discography"}\}\\ \sqcap \exists sectionEntityType.\{\mathtt{Band}\} \sqsubseteq \mathtt{Album}, \end{gather*} and songs listed in a section describing an album: \begin{gather*} \exists pageEntityType.\{\mathtt{Person}\} \sqcap \exists topSection.\{\textrm{"Discography"}\}\\ \sqcap \exists sectionEntityType.\{\mathtt{Album}\} \sqsubseteq \mathtt{Song}. \end{gather*} \subsubsection{Threshold Selection}\label{subsubsec:threshold-selection} We want to pick the thresholds in such a way that we tolerate some errors and missing information in $\mathcal{K}$, but do not allow many over-generalized rules that create incorrect assertions. Our idea for a sensible threshold selection is based on two assumptions: \textbf{Assumption 1.} Being based on a maximum-likelihood estimation, rule confidence and consistency roughly order rules by the degree of prior knowledge we have about them. \textbf{Assumption 2.} Assertions generated by over-generalized rules contain substantially more random noise than assertions generated by good rules. Assumption~1 implies that the number of over-generalized rules increases with the decrease of confidence and consistency. As a consequence, assumption~2 implies that the amount of random noise increases with decrease of confidence and consistency. To measure the increase of noise in generated assertions, we implicitly rely on existing knowledge in $\mathcal{K}$ by using the named entity tags of subject entities as a proxy. This works as follows: For a subject entity $e$ that is contained in $\mathcal{K}$, we have its type information $\mathcal{T}_e$ from $\mathcal{K}$ and we have its named entity tag $\psi_e$ from our named entity tagger. Going over all SE of listings in $\Phi$, we compute the probability of an entity with type $t$ having the tag $\psi$ by counting how often they co-occur: \begin{equation}\label{eq:tag-probabilty} tagprob(t,\psi) = \frac{|\{e|\exists \phi \in \Phi : e \in SE_\phi \land t \in \mathcal{T}_e \land \psi = \psi_e\}|}{|\{e|\exists \phi \in \Phi : e \in SE_\phi \land t \in \mathcal{T}_e\}|}. \end{equation} For example, for the DBpedia type \texttt{Album}, we find the tag probabilities\\ \textit{WORK\_OF\_ART}: 0.49, \textit{ORG}: 0.14, \textit{PRODUCT}: 0.13, \textit{PERSON}: 0.07, showing that album titles are rather difficult to recognize. For the type \texttt{Person} and the tag \textit{PERSON}, on the other hand, we find a probability of 0.86. We can then compute the tag-based probability for a set of assertions $A$ by averaging over the tag probability that is produced by the individual assertions. To compute this metric, we compare the tag of the assertion's subject entity with some kind of type information about it. This type information is either the asserted type (in case of a type assertion), or the domain of the predicate\footnote{We use the domain of the predicate $p$ as defined in $\mathcal{K}$. In case of $p \in \mathcal{P}^{-1}$, we use the range of the original predicate.} (in case of a relation assertion): \begin{equation}\label{eq:tag-fit} tagfit(A) = \begin{cases} \frac{\sum_{(s,p,o) \in A} tagprob(o,\psi_s)}{|A|} & \text{if } p = \mathtt{rdf}\mathord{:}\mathtt{type}\\ \frac{\sum_{(s,p,o) \in A} tagprob(domain_p,\psi_s)}{|A|} & \text{otherwise.}\\ \end{cases} \end{equation} While we do not expect the named entity tags to be perfect, our approach is based on the idea that the tags are consistent to a large extent. By comparing the $tagfit$ of assertions produced by rules with varying levels of confidence and consistency, we expect to see a clear decline as soon as too many noisy assertions are added. \subsubsection{Results} \begin{figure*}[ht] \centering \begin{subfigure}{.25\textwidth} \centering \includegraphics[width=.95\linewidth]{figures/www2020_threshold-type-confidence.pdf} \caption{Type confidence} \label{fig:type-confidence} \end{subfigure}% \begin{subfigure}{.25\textwidth} \centering \includegraphics[width=.95\linewidth]{figures/www2020_threshold-type-consistency.pdf} \caption{Type consistency} \label{fig:type-consistency} \end{subfigure}% \begin{subfigure}{.25\textwidth} \centering \includegraphics[width=.95\linewidth]{figures/www2020_threshold-relation-confidence.pdf} \caption{Relation confidence} \label{fig:relation-confidence} \end{subfigure}% \begin{subfigure}{.25\textwidth} \centering \includegraphics[width=.95\linewidth]{figures/www2020_threshold-relation-consistency.pdf} \caption{Relation consistency} \label{fig:relation-consistency} \end{subfigure} \caption{$tagfit$ of assertions generated from rules in a specified confidence or consistency interval. Bars show scores for a given interval (e.g. \textit{(0.75,0.80]}), lines show cumulative scores (e.g. \textit{(0.75,1.00]}). Blue bars indicate the selected threshold.} \label{fig:thresholds} \Description{Exact and cumulative scores for assertions of rules in a specified confidence or consistency interval. A first strong decrease of the tagfit can be seen at 0.85 and 0.75 for type confidence and consistency, and at 0.8 and 0.85 for relation confidence and consistency.} \end{figure*} Fig.~\ref{fig:thresholds} shows the $tagfit$ for type and relation assertions generated with varying levels of rule confidence and consistency. Our selection of thresholds is indicated by blue bars, i.e. we set the thresholds to the points where the $tagfit$ has its steepest drop. The thresholds are picked conservatively to select only high-quality rules by selecting points before an accelerated decrease of cumulative $tagfit$. But more coverage-oriented selections are also possible. In Fig.~\ref{fig:relation-consistency}, for example, a threshold of \textit{0.75} is also a valid option. An analysis of rules with different levels of confidence and consistency has shown that a minimum support for types is not necessary. For relations, a support threshold of 2 is helpful to discard over-generalized rules. Further, we found that it is acceptable to pick the thresholds independently from each other, as the turning points for a given metric don't vary significantly when varying the remaining metrics. Applying these thresholds, we find an overall number of 5,294,921 type rules with 369,139 distinct contexts and 244,642 distinct types. Further, we find 3,028 relation rules with 2,602 distinct contexts and 516 distinct relations. 949 of the relation rules have the page entity as target, and 2,079 have a section entity as target. Among those rules are straightforward ones like \begin{gather*} \exists pageEntityType.\{\mathtt{Person}\} \sqcap \exists topSection.\{\textrm{"Acting filmography"}\}\\ \sqsubseteq \exists actor.\{\textrm{<}PageEntity\textrm{>}\}, \end{gather*} and more specific ones like \begin{gather*} \exists pageEntityType.\{\mathtt{Location}\} \sqcap \exists topSection.\{\textrm{"Media"}\}\\ \sqcap \exists section.\{\textrm{"Newspapers"}\} \sqsubseteq \mathtt{Periodical\_literature}. \end{gather*} \subsection{Assertion Generation and Filtering} \label{subsec:assertion-generation-and-filtering} \subsubsection{Assertion Generation} We apply the rules selected in the previous section to the complete dataset of listings to generate type and relation assertions. Subsequently, we remove any duplicate assertions and assertions that already exist in $\mathcal{K}$. \subsubsection{Tag-based Filtering} To get rid of errors introduced during the extraction process (e.g. due to incorrectly extracted subject entities or incorrect rules), we employ a final filtering step for the generated assertions: every assertion producing a $tagprob \leq \frac{1}{3}$ is discarded. The rationale behind the threshold is as follows: Types have typically one and sometimes two corresponding named entity tags (e.g. the tag \textit{PERSON} for the DBpedia type \texttt{Person}, or the tags \textit{ORG} and \textit{FAC} for the type \texttt{School}). As tag probabilities are relative frequencies, we make sure that, with a threshold of $\frac{1}{3}$, at most two tags are accepted for any given type. For the tag probabilities of type \texttt{Album} from Sec.~\ref{subsubsec:threshold-selection}, the only valid tag is \textit{WORK\_OF\_ART}. As a consequence, any assertions of the form $(s, rdf\textrm{:}type, \mathtt{Album})$ with $s$ having a tag other than \textit{WORK\_OF\_ART} are discarded. \subsubsection{Results} Tab.~\ref{tab:results-assertions} shows the number of generated type and relation assertions before and after the tag-based filtering. The number of inferred types are listed separately for DBpedia and CaLiGraph. For relations, we show two kinds: The entry \textit{Relations} lists the number of extracted assertions from rules. As DBpedia and CaLiGraph share the same set of predicates, these assertions are applicable to both graphs. Furthermore, as \textit{Relations (via CaLiGraph)}, we list the number of relations that can be inferred from the extracted CaLiGraph types via restrictions in the CaLiGraph ontology. CaLiGraph contains more than 300k of such restrictions that imply a relation based on a certain type. For example, the ontology contains the value restriction $$\mathtt{Pop\_rock\_song} \sqsubseteq \exists genre.\{\textrm{Pop music}\}.$$ As we extract the type \texttt{Pop\_rock\_song} for the Beach Boys song \textit{At My Window}, we infer the fact $(\textrm{At My Window}, genre, \textrm{Pop music})$. For CaLiGraph, we find assertions for 3.5M distinct subject entities with 3M of them not contained in the graph. For DBpedia, we find assertions for 3.1M distinct subject entities with 2.9M of them not contained. The unknown subject entities are, however, not disambiguated yet. Having only small text snippets in listings as information about these entities, a disambiguation with general-purpose disambiguation approaches \cite{zhu2018exploiting} is not practical. We thus leave this as an own research topic for future work. For an estimation of the actual number of novel entities, we rely on previous work \cite{heist2020entity}, where we analyzed the overlap for red links in list pages. In that paper, we estimate an overlap factor of 1.07 which would -- when applied to our scenario -- reduce the number of actual novel entities to roughly 2.8M for CaLiGraph and 2.7M for DBpedia. In relation to the current size of those graphs, this would be an increase of up to 38\% and 54\%, respectively \cite{heist2020knowledge}. \begin{table} \caption{Number of generated assertions after removing existing assertions (Raw), and after applying tag-based filtering (Filtered).} \label{tab:results-assertions} \begin{tabular}{lccc} \toprule \textbf{Assertion Type} & \textbf{Raw} & \textbf{Filtered}\\ \midrule Types (DBpedia) & 11,459,047 & \hphantom{0}7,721,039\\ Types (CaLiGraph) & 47,249,624 & 29,128,677\\ \midrule Relations & \hphantom{00,}732,820 & \hphantom{00,}542,018\\ Relations (via CaLiGraph) & \hphantom{0}1,381,075 & \hphantom{00,}796,910\\ \bottomrule \end{tabular} \end{table} \section{Evaluation} \label{sec:evaluation} \begin{table} \caption{Correctness of manually evaluated assertions.} \label{tab:assertion-evaluation-results} \begin{tabular}{lccc} \toprule \textbf{Assertion Type} & \textbf{\#Dataset} & \textbf{\#Samples} & \textbf{Correct [\%]}\\ \midrule \textit{Types (DBpedia)}&&\\ frequency-based & \hphantom{0}6,680,565 & \hphantom{0,}414 & 91.55 $\pm$ 2.68\\ rule-based & \hphantom{0}7,721,039 & \hphantom{0,}507 & 93.69 $\pm$ 2.12\\ \midrule \textit{Types (CaLiGraph)}&&\\ frequency-based & 26,676,191 & 2,000 & 89.40 $\pm$ 1.23\\ rule-based & 29,128,677 & 2,000 & 91.95 $\pm$ 1.19\\ \midrule \textit{Relations}&&\\ frequency-based & \hphantom{00,}392,673 & 1,000 & 93.80 $\pm$ 1.49\\ rule-based & \hphantom{00,}542,018 & 1,000 & 95.90 $\pm$ 1.23\\ \bottomrule \end{tabular} \end{table} In our performance evaluation, we judge the quality of generated assertions from our rule-based approach. As a baseline, we additionally evaluate assertions generated by the frequency-based approach (see Eq.~\ref{eq:freq-r-hat}). For the latter, we use a threshold comparable to our rule-based approach (i.e., we set $\tau_{freq}$ to $\tau_{conf}$ and disregard listings with less than three subject entities). \subsection{Evaluation Procedure} The evaluated assertions are created with a stratified random sampling strategy. The assertions are thus distributed proportionally over all page types (like \texttt{Person} or \texttt{Place}) and sampled randomly within these. The labeling of the assertions is performed by the authors with the procedure as follows: For a given assertion, first the page of the listing is inspected, then -- if necessary and available -- the page of the subject entity. If a decision cannot be made based on this information, a search engine is used to evaluate the assertion. Samples of the rule-based and frequency-based approaches are evaluated together and in random order to ensure objectivity. Tab.~\ref{tab:assertion-evaluation-results} shows the results of the performance evaluation. In total, we evaluated 2,000 examples per approach for types and 1,000 examples per approach for relations. The taxonomy of CaLiGraph comprises the one of DBpedia. Thus, we evaluated the full sample for CaLiGraph types and report the numbers for both graphs, which is the reason why the sample size for DBpedia is lower. For relations, we only evaluate the ones that are generated directly from rules and not the ones inferred from CaLiGraph types, as the correctness of the inferred relations directly depends on the correctness of CaLiGraph types. \subsection{Type and Relation Extraction} The evaluation results in Tab.~\ref{tab:assertion-evaluation-results} show that the information extracted from listings in Wikipedia is of an overall high quality. The rule-based approach yields a larger number of assertions with a higher correctness for both types and relations. For both approaches, the correctness of the extracted assertions is substantially higher for DBpedia. The reason for that lies in the differing granularity of knowledge graph taxonomies. DBpedia has 764 different types while CaLiGraph has 755,441 with most of them being more specific extensions of DBpedia types. For example, DBpedia might describe a person as \texttt{Athlete}, while CaLiGraph describes it as \texttt{Olympic\_field\_hockey\_player\_of\_South\_Korea}. The average depth of predicted types is 2.06 for the former and 3.32 for the latter. While the asserted types are very diverse (the most predicted type is \texttt{Agent} with 7.5\%), asserted relations are dominated by the predicate \textit{genus} with 69.8\% followed by \textit{isPartOf} (4.4\%) and \textit{artist} (3.2\%). This divergence cannot be explained with a different coverage: In DBpedia, 72\% of entities with type \texttt{Species} have a \textit{genus}, and 69\% of entities with type \texttt{MusicalWork} have an \textit{artist}. But we identify two other influencing factors: Wikipedia has very specific guidelines for editing species, especially with regard to standardization and formatting rules.\footnote{\url{https://species.wikimedia.org/wiki/Help:General_Wikispecies}} In addition to that, the \textit{genus} relation is functional and hence trivially fulfilling the PCA. As our approach is strongly relying on this assumption and it potentially inhibits the mining of practical rules for non-functional predicates (like, for example, for \textit{artist}), we plan on investigating this relationship further. The inferred relations from CaLiGraph types are not evaluated explicitly. However, based on the correctness of restrictions in CaLiGraph that is reported to be 95.6\% \cite{heist2019uncovering} and from the correctness of type assertions, we estimate the correctness of the resulting relation assertions to be around 85.5\% for the frequency-based and around 87.9\% for the rule-based approach. \subsection{Novel Entity Discovery} \label{subsubsec:novel-entity-discovery} For CaLiGraph, the frequency-based approach finds assertions for 2.5M distinct subject entities (2.1M of them novel). While the rule-based approach finds 9\% more assertions, its assertions are distributed over 40\% more entities (and over 43\% more novel entities). This demonstrates the capabilities of the rule-based approach to apply contextual patterns to environments where information about actual entities is sparse. Further, we analyzed the portion of evaluated samples that applies to novel entities and found that the correctness of these statements is slightly better (between 0.1\% and 0.6\%) than the overall correctness. Including CaLiGraph types, we find an average of 9.03 assertions per novel entity, with a median of 7. This is, again, due to the very fine-grained type system of CaLiGraph. For example, for the rapper \textit{Dizzle Don}, which is a novel entity, we find 8 types (from \texttt{Agent} over \texttt{Musician} to \texttt{American\_rapper}) and 4 relations: (\textit{occupation}, Singing), (\textit{occupation}, Rapping), (\textit{birthPlace}, United States), and (\textit{genre}, Hip hop music). \subsection{Error Analysis} With Tab.~\ref{tab:assertion-error-types}, we provide an analysis of error type frequencies for the rule-based approach on the basis of the evaluated sample. (1) is caused by the entity linker, mostly due to incorrect entity borders. For example, the tagger identifies only a part of an album title. (2) is caused by errors of the subject entity identification approach, e.g. when the approach identifies the wrong column of a table as the one that holds subject entities. (3) can have multiple reasons, but most often the applied rule is over-generalized (e.g. implying \texttt{Football\_player} when the listing is actually about athletes in general) or applied to the wrong listing (i.e., the context described by the rule is not expressive enough). Finally, (4) happens, for example, when a table holds the specifications of a camera as this cannot be expressed with the given set of predicates in DBpedia or CaLiGraph. Overall, most of the errors are produced by incorrectly applied rules. This is, however, unavoidable to a certain extent as knowledge graphs are not error-free and the data corpus is not perfect. A substantial portion of errors is also caused by incorrectly parsed or identified subject entities. Reducing these errors can also have a positive impact on the generated rules as correct information about entities is a requirement for correct rules. \begin{table} \caption{Error types partitioned by cause. The occurrence values are given as their relative frequency (per 100) in the samples evaluated in Tab.~\ref{tab:assertion-evaluation-results}.} \label{tab:assertion-error-types} \begin{tabular}{lcc} \toprule Error type&Type&Relation\\ \midrule \textbf{(1) Entity parsed incorrectly} & 2.6 & 0.2\\ \textbf{(2) Wrong subject entity identified} & 1.4 & 1.6\\ \textbf{(3) Rule applied incorrectly} & 3.7 & 2.3\\ \textbf{(4) Semantics of listing too complex} & 0.3 & 0.0\\ \bottomrule \end{tabular} \end{table} \section{Discussion and Outlook} \label{sec:discussion-and-outlook} In this work, we demonstrate the potential of exploiting co-occurring similar entities for information extraction, and especially for the discovery of novel entities. We show that it is possible to mine expressive descriptive rules for listings in Wikipedia which can be used to extract information about millions of novel entities. To improve our approach, we are investigating more sophisticated filtering approaches for the generated assertions to reduce the margin from raw to filtered assertions (see Tab.~\ref{tab:results-assertions}). Furthermore, we are experimenting with more expressive rules (e.g. by including additional context like substring patterns or section text) to improve our Wikipedia-based approach. At the moment, we extract entities from single pages. While entity disambiguation on single pages is quite simple (on a single Wikipedia page, it is unlikely that the same surface form refers to different entities), the disambiguation of entities across pages is a much more challenging problem. Here, entity matching across pages is required, which should, ideally, combine signals from the source pages as well as constraints from the underlying ontology. Furthermore, we work towards applying our approach to additional data corpora. Since the only language-dependent ingredient of our approach is the named entity tagging, and the entity tagger we use in our experiments has models for various languages,\footnote{\url{https://spacy.io/models}} our approach can also be extended to various language editions of Wikipedia. Besides Wikipedia, we want to apply the approach to wikis in the Fandom\footnote{\url{https://www.fandom.com/}} universe containing more than 380k wikis on various domains (among them many interesting wikis for our approach, like for example WikiLists\footnote{\url{https://list.fandom.com/wiki/Main_Page}}). For background knowledge, we plan to rely on existing knowledge graphs in this domain like DBkWik \cite{hertling2020dbkwik} or TiFi \cite{chu2019tifi}. In the longer term, we want to extend the applicability of the approach towards arbitrary web pages, using microdata and RDFa annotations \cite{meusel2014webdatacommons} as hooks for background knowledge. \bibliographystyle{ACM-Reference-Format}
\section{Introduction} Topological objects have been remaining at the focus of theoretical and experimental research for more than half a century. The existence of topologically stable configurations in ferromagnets with Dzyaloshinskii--Moriya interaction has been predicted by Bogdanov and Yablonskii \cite{Bogdanov1989}. Now these topological excitations, termed as skyrmions, are intensively explored in an emergent field of {\it skyrmionics}~\cite{Back2020}. Research on an interplay between magnetism and superconductivity in heterostructures has long history~\cite{Ryazanov2004,Lyuksyutov2005,Buzdin2005,Bergeret2005,Eschrig2015}. Recently superconductor--ferromagnet bilayers hosting skyrmions have attracted great theoretical interest. It was understood that skyrmions in proximity with a superconductor can not only induce Yu-Shiba-Rusinov-type bound states \cite{Pershoguba2016,Poyhonen2016} but can also host Majorana modes \cite{Chen2015,Yang2016,Gungordu2018,Mascot2019,Rex2019,Garnier2019,Rex2020}. It was found \cite{Yokoyama2015} that the presence of skyrmions affects strongly Josephson current via superconductor--ferromagnet--superconductor junction. It has been also shown \cite{Vadimov2018} that skyrmion configurations can be stabilized by a superconducting dot or antidot situated at the top of a ferromagnetic film. In ferromagnet--superconductor heterostructures superconducting vortices and skyrmions can form bound pairs either due to interplay of proximity effect and spin-orbit coupling \cite{Hals2016,Baumard2019} or due to their interaction via stray fields \cite{Dahir2019,Menezes2019,Dahir2020,Petrovic2021}. \begin{figure}[b] \centering \includegraphics[width=0.47\textwidth]{figure1.pdf} \caption{Sketch of a ferromagnet (green) -- superconductor (blue) heterostructure. There is also a thin insulating layer (black) which suppresses the proximity effect. The ferromagnetic layer hosts a N\'eel--type skyrmion. The magnetic profile of the skyrmion with the positive chirality is schematically shown. The superconducting layer hosts a vortex at some distance from the skyrmion's center. The vortex is shown schematically by blue lines, the yellow arrow points towards the direction of its magnetic flux. $d_F$ and $d_S$ denote the width of the ferromagnet and superconductor film, respectively (see text).} \label{fig:Figure1} \end{figure} In this paper we study the interaction between a N\'eel--type skyrmion and a superconducting vortex in a chiral ferromagnet--superconductor heterostructure, see Fig. \ref{fig:Figure1}. We assume that the proximity effect is suppressed by the presence of a thin insulating layer between ferromagnet and superconductor such that the interaction between a skyrmion and a vortex is due to stray fields only. At first, by solving Maxwell--London equation we determine the Meissner current induced by a N\'eel--type skyrmion in the superconductor. Contrary to the previous work \cite{Dahir2020}, we consider the case of ferromagnet and superconducting films of arbitrary widths. Analysis of the general expression, cf. Eq. \eqref{eq:supercurrent}, in the case of thin ferromagnetic and superconducting films yields that the supercurrent has a maximum at distance of the order of the skyrmion size from the center of the skyrmion. Secondly, for thin ferromagnetic and superconducting films we compute the interaction energy between a N\'eel--type skyrmion and a Pearl vortex due to stray fields. Contrary to previous results, see Refs. \cite{Dahir2019,Menezes2019,Dahir2020}, we find that in the case of a N\'eel--type skyrmion with the positive and negative chiralities it can be energetically favorable for a vortex to settle at some distance from the skyrmion's center. At third, we study the effect of the presence of superconducting vortex--anti-vortex pair on the skyrmion size in thin heterostructures. We find that a Pearl vortex leads to increase of a skyrmion radius. Under some conditions, the spontaneous generation of a vortex--anti-vortex pair in a superconducting film is possible in the presence of a skyrmion. The outline of the paper is as follows. In Sec. \ref{Sec:SuperCurrent} the solution of the Maxwell--London equation is presented, and the results for the supercurrent are given. The interaction energy between a N\'eel--type skyrmion and a Pearl vortex is computed and analyzed in Sec. \ref{Sec:Interaction}. In Sec. \ref{Sec:BackAction} the effect of a Pearl vortex on the skyrmion radius is estimated. We end the paper with summary and conclusions in Sec. \ref{Sec:DiscConc}. Some technical details of computations are presented in Appendix. \section{Supercurrent generated by a N\'eel--type skyrmion\label{Sec:SuperCurrent}} We start from calculation of the supercurrent in the chiral ferromagnet--supercondutor heterostructure which is generated by a N\'eel--type skyrmion (see Fig. \ref{fig:Figure1}). The width of the chiral ferromagnet (superconductor) film is $d_F$ ($d_S$). We assume the presence of a thin insulating layer between the chiral ferromagnet and the superconductor that allows us to neglect the proximity effect. The magnetization profile of a N\'eel--type skyrmion in the chiral ferromagnet film in the cylindrical coordinate system with the origin at the center of the skyrmion is given as follows \cite{Kawaguchi2016} \begin{equation} \bm{M}_{\rm Sk} = M_s \Bigl[ \bm{e_r} \eta \sin \theta (r) + \bm{e_z} \cos \theta (r) \Bigr ] . \label{eq1} \end{equation} Here $\eta = \pm 1$ denotes the chirality of the skyrmion, $\theta(r)$ stands for the skyrmion angle, $M_s$ is the saturation magnetization of the chiral ferromagnet film, and $\bm{e_r}$ and $\bm{e_z}$ are unit vectors along the radial direction and the $z$-axis (perpendicular to the interface), respectively. The spatial distribution of the vector potential $\bm{A}_{\rm Sk}$ is governed by the Maxwell--London equation: \begin{gather} \nabla \times \left( \nabla \times \bm{A}_{\rm Sk} \right) + \lambda_L^{-2}\Theta(-z)\Theta(z+d_S)\bm{A}_{\rm Sk} \notag \\ = 4 \pi \color{black} \Theta(z)\Theta(d_F-z) \color{black} \nabla \times \bm{M}_{\rm Sk} ,\label{eq2} \end{gather} where \color{black} $\Theta(x)$ denotes the Heaviside step function (with $\Theta(0)=1$) and \color{black} $\lambda_L$ stands for the London penetration depth. The Maxwell--London equation should be supplemented by the boundary conditions of continuity of \color{black} the normal component of $\bm{B}_{\rm Sk}=\nabla\times \bm{A}_{\rm Sk}$ and tangential component of $\bm{B}_{\rm Sk} - 4\pi \bm{M}_{\rm Sk}\Theta(z)\Theta(d_F-z)$ \cite{LL8}. \color{black} Since the right hand side of Eq. \eqref{eq2} is proportional to the unit vector $\bm{e_\varphi}$, the vector potential $\bm{A}_{\rm Sk}$ has only the azimuthal component $A_{{\rm Sk},\varphi}$ that depends on $r$ and $z$. \color{black} The component $A_{{\rm Sk},\varphi}$ is continuous at $z=-d_S, 0, d_F$; its derivative $\partial A_{{\rm Sk},\varphi}/\partial z$ is continuous at $z=-d_S$ and has the jumps at $z=0$ and $z=d_F$: $\partial A_{{\rm Sk},\varphi}/\partial z|_{z=-0}^{z=+0}=-4\pi M_{{\rm Sk},r}$ and $\partial A_{{\rm Sk},\varphi}/\partial z|_{z=d_F-0}^{z=d_F+0}=4\pi M_{{\rm Sk},r}$. \color{black} The solution for $A_{{\rm Sk},\varphi}(r,z)$ can be cast \color{black} as the sum of two terms, $A_{{\rm Sk},\varphi}(r,z) = A_{{\rm Sk},\varphi}^{(+)}(r,z)+\eta A_{{\rm Sk},\varphi}^{(-)}(r,z)$, where \color{black} \begin{gather} \color{black} A_{{\rm Sk},\varphi}^{(\sigma)}(r,z) = - \int\limits_0^\infty dq\, J_1(qr) \frac{G^{(\sigma)}(q)}{q} \hspace{3.5cm}{} \notag \\ \color{black} \times \begin{cases} \varkappa_2^{V,(\sigma)} e^{-qz}, & \quad z\geqslant d_F , \\ \frac{1+\sigma}{2}+ \varkappa_1^{F,(\sigma)} e^{qz} + \varkappa_2^{F,(\sigma)} e^{-qz}, & \quad d_F>z\geqslant 0, \\ \varkappa_1^{S,(\sigma)} e^{Qz} + \varkappa_2^{S,(\sigma)} e^{-Qz}, & \quad 0> z\geqslant -d_S , \\ \varkappa_1^{V,(\sigma)} e^{qz}, & \quad -d_S>z . \end{cases} \label{eq:sol:ASk} \end{gather} Here $J_n(z)$ stands for the Bessel function of the first kind. Also we introduced $Q=\sqrt{q^2+1/\lambda_L^{2}}$ and the functions \begin{equation} \color{black} \begin{split} G^{(+)}(q) & \color{black} = - 4\pi M_s \int\limits_0^\infty dr\, r J_1(qr) \theta^\prime(r) \sin\theta(r) , \\ G^{(-)}(q) & = - 4\pi M_s \int\limits_0^\infty dr\, r q J_1(qr) \sin\theta(r) . \end{split} \label{eq:funG} \end{equation} \color{black} Here and afterwards, we use the following notation $\theta^\prime(r)\equiv d\theta/dr$. \color{black} Using the continuity of the azimuthal component of the vector potential, $A_{{\rm Sk},\varphi}$, and \color{black} the boundary conditions for its \color{black} derivative, $\partial A_{{\rm Sk},\varphi}/\partial z$, at $z=-d_S, 0, d_F$, we obtain ($\sigma=\pm$), \color{black} \begin{gather} \varkappa_2^{V,(\sigma)} = \frac{\sigma }{2}(e^{q d_F}-1) - \frac{\sinh(Q d_S) \mathcal{X}}{q\lambda_L^{2}} , \, \varkappa_1^{V,(\sigma)} = 2 Q e^{q d_s} \mathcal{X} , \notag \\ \varkappa_1^{F,(\sigma)} = - \frac{1}{2}e^{-q d_F}, \,\, \varkappa_2^{F,(\sigma)}=- \frac{\sigma}{2} - \frac{\sinh(Q d_S) \mathcal{X}}{q\lambda_L^{2}} ,\notag \\ \varkappa_1^{S,(\sigma)} = (Q+q) e^{Q d_s} \mathcal{X}, \quad \varkappa_2^{S,(\sigma)} = (Q-q) e^{-Q d_s} \mathcal{X},\notag \\ \mathcal{X}=\frac{q (1-e^{-q d_F})}{(Q+q)^2e^{Q d_S}-(Q-q)^2e^{-Q d_S}} . \end{gather} \color{black} The current density in the superconducting film, i.e. at $-d_S\leqslant z\leqslant 0$, can be calculated by means of the London equation, $\bm{j} = - \bm{A}_{\rm Sk}/(4\pi \lambda_L^2)$. It is more convenient to trace the total supercurrent flowing in the superconducting film, $J_\varphi(r)=\int_{-d_S}^0 dz j_\varphi(r,z)$. Then, we retrieve $J_\varphi = J_\varphi^{(+)}+\eta J_\varphi^{(-)}$, where \begin{equation} J_\varphi^{(\pm)} = \int\limits_0^\infty dq \ \frac{J_1(qr)}{4\pi \lambda_L^2} \frac{G^{(\pm)}(q) (1-e^{-q d_F}) (1-e^{-Qd_S})}{Q[q+Q -(Q-q)e^{-Q d_S}]} , \label{eq:supercurrent} \end{equation} We mention that this expression is similar to the expression for the current induced by a domain wall \cite{Burmistrov2005}. In the limit of a thick superconductor, $d_S\gg \lambda_L, R$, Eq. \eqref{eq:supercurrent} transforms into the result of Ref. \cite{Dahir2020}. \color{black} Here $R$ stands for the characteristic spatial scale (radius) of a skyrmion. \color{black} Below we shall focus on the case of a thin chiral ferromagnet, $d_F\ll R$, and a thin superconducting film, $d_S \ll \lambda_L, R$. As we shall demonstrate in the next section, the asymptotic behavior of the supercurrent can be found for an arbitrary smooth skyrmion profile with $\theta(0)=\pi$ and $\theta(r\to \infty)\to 0$. Commonly used variational examples with such kind behavior are the exponential ansatz $\theta(r) = \bar{\theta}(r/R)$ where $\bar{\theta}(x)=\pi \exp(-x)$ and the 360-degree domain wall ansatz $\bar{\theta}(x) = 2 \arctan(\sinh(R/\delta)/\sinh(R x/\delta))$. Also we shall consider the linear ansatz with $\theta(r) = \pi(1-r/R)$ for $r<R$ and zero overwise. \begin{figure*}[t] \centerline{\includegraphics[width=\textwidth]{figure2.pdf}} \caption{The dependence of $J_\varphi^{(\pm)}$ and the total supercurrent $J_\varphi$ on the distance from the skyrmion center for the cases of positive (upper row) and negative (lower raw) chiralities. The parameters are $d_S/\lambda_L=0.01$, $d_F/\lambda_L=0.005$, and $R/\lambda_L=3$. The supercurrent is calculated for the exponential, domain wall (DW) and linear ansatz.} \label{fig:Figure3} \end{figure*} \subsection{The case of a smooth skyrmion profile} The behavior of the supercurrent with the distance from the center of the skyrmion is controlled by the functions $G^{(\pm)}(q)$, see Eq. \eqref{eq:funG}. It is convenient to introduce the dimensionless functions $g^{(\pm)}$, such that \color{black} $G^{(\pm)}(q) = 4\pi M_s R\ g^{(\pm)}(qR)$, where \color{black} \begin{equation} \begin{split} g^{(+)}(y) & =-\int\limits_0^\infty dx \ x J_1(y x) \bar\theta^\prime(x) \sin\bar\theta(x) , \\ g^{(-)}(y) & =- y \int\limits_0^\infty dx\ x J_1(y x) \sin\bar{\theta}(x) . \end{split} \label{eq:def:gq} \end{equation} Then in the case of a thin superconducting film, $d_S \ll \lambda_L, R$, and a thin chiral ferromagnet, $d_F\ll R$, Eq. \eqref{eq:supercurrent} can be drastically simplified, \begin{equation} J^{(\pm)}_\varphi(r) = M_s \frac{d_F}{R} \int\limits_0^\infty dy \ \frac{y g^{(\pm)}(y) J_1(y r/R) }{1+2 y\lambda/R} . \label{eq:supercurrent:thin} \end{equation} Here $\lambda=\lambda_L^2/d_S$ denotes the Pearl penetration length \cite{Pearl1964}. The asymptotic behavior of the function $g^{(+)}(y)$ is given as (see Appendix \ref{App1}), \begin{equation} g^{(+)}(y)= \begin{cases} \displaystyle 2 c_2 y , & \quad y\ll 1, \\ \displaystyle -9 \bar{\theta}^\prime(0)\bar{\theta}^{\prime\prime}(0)/(2 y^4) , & \quad y\gg 1 , \end{cases} \label{eq:g:asymp} \end{equation} where we introduced the numerical constants \begin{equation} c_k = -\frac{1}{4}\int\limits_0^\infty dx\, x^k \bar{\theta}^\prime(x) \sin\bar{\theta}(x), \quad k=-1,0,1, \dots \end{equation} For example, in the case of the exponential ansatz one finds $c_2\approx 0.51$. \color{black} The asymptotics of the function $g^{(-)}(y)$ can be written as (see Appendix \ref{App1}), \begin{equation} g^{(-)}(y)= \begin{cases} \displaystyle - b_2 y^2/2 , & \quad y\ll 1, \\ \displaystyle - 3 \bar{\theta}^{\prime \prime}(0) /(2 y^3) , & \quad y\gg 1 . \end{cases} \label{eq:g:asymp:-} \end{equation} \color{black} Here we introduced the numerical constants, \begin{equation} b_k = \int\limits_0^\infty dx\, x^k \sin \bar\theta(x), \quad k=-1,0,1, \dots \end{equation} We note that $b_2\approx 5.94$ in the case of the exponential ansatz. Let us first consider the case of the skyrmion size much smaller than the size of the vortex, $R\ll \lambda$. Evaluating the integral over $q$ in Eq. \eqref{eq:supercurrent:thin}, we obtain asymptotic behavior of the two components of the supercurrent (see Appendix \ref{App1}), \begin{equation} J_\varphi^{(+)} = \frac{M_s d_F}{\lambda} \begin{cases} c_{-1} r/R , & r\ll R ,\\ c_2 R^2/(2r^2), & R\ll r\ll \lambda, \\ 12 c_2 \lambda^2 R^2/r^4 , & \lambda \ll r , \end{cases} \label{eq:current:asym:thin} \end{equation} and \color{black} \begin{equation} J_\varphi^{(-)} = \frac{M_s d_F}{\lambda} \begin{cases} \bar{\theta}^\prime(0) r/(2R) , & r\ll R ,\\ b_2 R^3/(8\lambda r^2) , & R\ll r\ll \lambda, \\ 3 b_2 \lambda R^3/(2r^4) , & \lambda \ll r . \end{cases} \label{eq:current:asym:thin:-} \end{equation} \color{black} We note that for $\bar\theta(x) = \pi \exp(-x)$ one finds $c_{-1}\approx 1.17$. \color{black} The asymptotic expressions \eqref{eq:current:asym:thin} and \eqref{eq:current:asym:thin:-} suggest nonmonotonous spatial dependence of the both contributions $J_\varphi^{(\pm)}$ to the supercurrent with the extremum at the distance of order of the skyrmion radius $R$. As it is shown in Fig. \ref{fig:Figure3}, the value of $J_\varphi^{(+)}$ ($J_\varphi^{(-)}$) at the extremum is positive (negative) in the case of exponential and domain wall ansatz. Thus the total supercurrent seems to be sensitive to the skyrmion chirality. In the case of the exponential ansatz the sign of the extremal value of the supercurrent is opposite to the chirality. In the case of the domain wall ansatz the sign of the supercurrent at the extremum depends also on the ratio $R/\delta$. \color{black} In the case of large skyrmion and small Pearl length, $R\gg \lambda$, the part of the supercurrent, $J_\varphi^{(+)}$, which is related with the $z$-component of the skyrmion magnetization, can be found to the lowest order in $\lambda/R$ as (see Appendix \ref{App1}), \begin{equation} J_\varphi^{(+)} = - M_s \frac{d_F}{R}\bar\theta^\prime(r/R) \sin \bar\theta(r/R) . \label{eq:current:asym:thick:1} \end{equation} We note that $J_\varphi^{(+)}$ coincides with the current $(\nabla \times \bm{M}_{\rm Sk})_\varphi$ integrated over the width of the chiral ferromagnet. If the function $\bar\theta(x)$ decays at $x\to \infty$ faster than $1/x^{3}$, the expression \eqref{eq:current:asym:thick:1} determines $J_\varphi^{(+)}$ at $r\ll r_\lambda$ only. Then at distances $r\gg r_\lambda\gg R$ the asymptotic behavior of the supercurrent is given as (cf. Eq. \eqref{eq:current:asym:thin}), \begin{equation} J_\varphi^{(+)} = 12 c_2 M_s \frac{d_F \lambda R^2}{r^4} , \quad r_\lambda \ll r. \label{eq:current:asym:thick:2} \end{equation} The length scale $r_\lambda$ can be estimated from the condition $|\bar{\theta}(r_\lambda/R)|^2 \sim \lambda R^3/r_\lambda^4$. In the case of the exponential ansatz one finds $r_\lambda \sim R \ln (R/\lambda) \gg R$. \color{black} The asymptotic expressions for component $J_\varphi^{(-)}$ of the supercurrent read (see Appendix \ref{App1}), \begin{equation} J_\varphi^{(-)} = \frac{3 M_s d_F r}{4R^2} \begin{cases} \bar{\theta}^{\prime \prime}(0) \ln(r/R), & \quad r\ll R ,\\ 2b_2 R^5/r^5, &\quad r\gg R . \\ \end{cases} \label{eq:Jphi:-:R1} \end{equation} We mention that in the case of $R\gg \lambda$ the dependence of the supercurrent on the distance is qualitatively similar to the case of a skyrmion of a small radius $R\ll \lambda$. We emphasize that there is a change of the sign of the supercurrent at some distance from the center of the N\'eel--type skyrmion in some cases, see Fig. \ref{fig:Figure3}. Such change of sign can also occurs in the case of a thick superconductor--ferromagnet--superconductor structure \cite{Dahir2020}. \color{black} \subsection{The case of the linear ansatz} In the case of the linear ansatz the expression \eqref{eq:def:gq} for the function $g^{(+)}(y)$ should be modified in order to have continuous solution for $A_\varphi$ at $r=R$, \begin{gather} g^{(+)}(y) \to g_L^{(+)}(y) = y \int\limits_0^1 dx x J_0(y x) \left [\cos\left(\pi x\right) + \frac{4}{\pi^2}\right ] \notag \\ \equiv g^{(+)}+\delta g^{(+)} . \label{eq:G:linear} \end{gather} Here the function $g^{(+)}(y)$ is given by Eq. \eqref{eq:def:gq} and $\delta g^{(+)}(y) = -4 c_2J_1(y)$, where in the case of the linear ansatz, $c_2=1/4-1/\pi^2$. Therefore, the function $g^{(+)}_L(y)$ has the following asymptotic behavior, \begin{equation} g^{(+)}_L(y)= \begin{cases} \displaystyle\frac{\pi^2-6}{2 \pi^4} y^3 , & \quad y\ll 1, \\ \displaystyle\frac{\pi^2-4}{\pi^{2}} \frac{\sqrt{2}\cos(y+\pi/4)}{\sqrt{\pi y}} , & \quad y\gg 1. \end{cases} \label{eq:G:linear:as} \end{equation} We observe that the abrupt change of $\theta(r)$ at $r=R$ results in oscillating behavior of $g^{(+)}(y)$ at $y\gg 1$. With the help of Eqs.~\eqref{eq:supercurrent:thin} and \eqref{eq:G:linear:as}, we obtain the following results for the asymptotic behavior of the supercurrent in the case of $R\ll\lambda$ (see Appendix \ref{App1}), \begin{equation} J_\varphi^{(+)} = \frac{M_s d_F}{4\lambda} \begin{cases} (\pi \Si(\pi)-1+4/\pi^2) r/R, & r\ll R ,\\ 3(6-\pi^2) R^4/(\pi^4 r^4), & R\ll r\ll \lambda, \\ 180(6-\pi^2) R^4 \lambda^2/(\pi^4 r^6), & \lambda \ll r . \end{cases} \label{eq:supercurrent:thin:asym:linear} \end{equation} Here $\Si(z)$ stands for the sine integral. We note that in the case of the linear ansatz the $J_\varphi^{(+)}$ component of the supercurrent decays faster at $r\gg R$ than in the case of smooth skyrmion profile. This occurs due to the fact that the contribution to the current from $\delta g^{(+)}(y)$ cancels the leading contributions from $g^{(+)}(y)$. As in the case of a smooth skyrmion profile, Eq. \eqref{eq:supercurrent:thin:asym:linear} suggests nonmonotonous behavior of $J_\varphi^{(+)}$ with $r$. There should be the maximum and the minimum in the supercurrent at the distances of the order of the skyrmion size $R$. Contrary to the case of a smooth skyrmion profile, Eq. \eqref{eq:supercurrent:thin:asym:linear} describes asymptotic behavior of the smooth part of $J_\varphi^{(+)}$ only. On the top of the monotononic dependence there is also weak oscillating contribution to $J_\varphi^{(+)}$ with the typical length scale of the order of $R$ as shown in Fig. \ref{fig:Figure3}. This oscillating contribution is the consequence of the abrupt boundary of the skyrmion configuration. \color{black} The asymptotic behavior of $J_\varphi^{(-)}$ can be read from Eq. \eqref{eq:current:asym:thin:-}. It suggests the existence of the minimum and the maximum at the distance of the order of $R$. Similarly to $J_\varphi^{(+)}$, the contribution $J_\varphi^{(-)}$ has additional oscillations with the distance. \color{black} The dependence $J_\varphi^{(+)}(r)$ in the case of large skyrmion size, $R\gg \lambda$, is more intricate. This component of the supercurrent is given as the sum of the contribution discussed above for the case of the smooth skyrmion profile, cf. Eqs. \eqref{eq:current:asym:thick:1} and \eqref{eq:current:asym:thick:2}, and the contribution due to $\delta g^{(+)}(y)$. At short distance, $r\ll R$, we find (see Appendix \ref{App1}), \begin{equation} J_\varphi^{(+)} = \frac{\pi^2 M_s d_F r}{R^2} \left (1 - 3 \frac{\pi^2-4}{\pi^4} \frac{\lambda}{R}\right ) . \label{eq:Jphi:linear:large:SK:1} \end{equation} In the case of the long distance, $r\gg R$ the contribution to the supercurrent is given as \begin{equation} J_\varphi^{(+)} = - 45 \frac{\pi^2-6}{\pi^4} \frac{M_s d_F \lambda R^4}{r^6} . \end{equation} We note that in the case of the linear ansatz $J_\varphi^{(+)}$ is stronger suppressed at $r\gg R$ than in the case of a smooth skyrmion profile. The asymptotic behavior of $J_\varphi^{(-)}$ is given by the general expression \eqref{eq:Jphi:-:R1}. \section{Interaction energy between skyrmion and Pearl vortex\label{Sec:Interaction}} As above we focus on the case of a thin ($d_S\ll \lambda_L$) superconducting film with a superconducting vortex situated at the distance $a$ from the center of the N\'eel--type skyrmion (see Fig. \ref{fig:Figure1}). In order to compensate the magnetic flux carried by the vortex we assume that there exists anti-vortex located far away from the skyrmion--vortex pair. The free energy of this system, including the magnetic energy of the skyrmion can be written as \begin{equation} \mathcal{F} = \mathcal{F}_{\rm Sk} + \mathcal{F}_{\rm V} + \mathcal{F}_{\rm \overline{V}}+ \mathcal{F}_{\rm Sk-V}+ \mathcal{F}_{\rm Sk-\overline{V}}+\mathcal{F}_{\rm V-\overline{V}} . \label{eq:F:gen} \end{equation} Here $\mathcal{F}_{\rm Sk}$ denotes the magnetic free energy of the isolated chiral ferromagnet that leads to the appearance of the N\'eel--type skyrmion (see its explicit form in the next section). $\mathcal{F}_{\rm V}$ and $\mathcal{F}_{\rm \overline{V}}$ are the free energies of the isolated superconducting vortex and anti-vortex, respectively. The electromagnetic interaction between the skyrmion and the vortex is described by the following free energy, \begin{gather} \mathcal{F}_{\rm Sk-V} = \int \frac{dz d^2 \bm{r}}{4\pi} \Bigl [ \bm{B}_{\rm Sk} \bm{B}_{\rm V} + \lambda_L^2 (\nabla \times \bm{B}_{\rm Sk}) (\nabla \times \bm{B}_{\rm V})\notag \\ \times \Theta(-z)\Theta(z+d_S) - 4\pi \bm{M}_{\rm Sk} \bm{B}_{\rm V} \Theta(z)\Theta(d_F-z) \Bigr ] , \label{eq:F-Sk-V-0} \end{gather} where $\bm{B}_{\rm V}=\nabla\times \bm{A}_{\rm V}$ and $\bm{B}_{\rm Sk}=\nabla\times \bm{A}_{\rm Sk}$ are the magnetic fields generated by the vortex and the skyrmion, respectively. We note that the first two terms in the right hand side of the expression for $\mathcal{F}_{\rm Sk-V}$ compensate each other in virtue of Eq. \eqref{eq2}. Therefore, one can have an impression that the distribution of the supercurrent does not influence the interaction energy between the skyrmion and the vortex. In fact, $\mathcal{F}_{\rm Sk-V}$ is intimately related with the supercurrent, see below. In what follows, we shall neglect the free energies of the interaction of the anti-vortex with the skyrmion, $\mathcal{F}_{\rm Sk-\overline{V}}$, and with the vortex, $\mathcal{F}_{\rm V-\overline{V}}$. The magnetic field of a Pearl vortex in a thin film, $d_S\ll \lambda_L$, can be written in a standard form \cite{Abrikosov-book}, \begin{gather} {\bm B}_{\rm V} = \phi_0 \sgn(z) \nabla \int \frac{d^2\bm{q}}{(2\pi)^2} \frac{e^{-q |z| +i \bm{q}(\bm{r}-\bm{a})}}{q(1+2q\lambda)} . \end{gather} Here $\phi_0=h c/2e$ is the flux quantum, $\bm{a}$ is the coordinate vector of the vortex center with respect to the skyrmion center. Since $\mathcal{F}_{\rm Sk-V}$ should depend on the distance $a$ between the skyrmion and the vortex only, we can average the magnetic field ${\bm B}_{\rm V}$ over directions of the vector $\bm{a}$. This procedure implies that \begin{gather} \bm{B}_{\rm V} \to - \phi_0 \int\limits_0^\infty \frac{d q}{2\pi} \frac{q\ e^{-q |z|}}{1+2 q\lambda} J_0(qa) \Bigl [ \sgn(z) J_1(qr) \bm{e_r} \notag \\ + J_0(qr) \bm{e_z}\Bigr ] . \label{eq:vortex:field} \end{gather} \color{black} We emphasize that the magnetic field $\bm{B}_{\rm V}$ is directed along $-\bm{e}_z$ at the vortex center. The opposite case can be obtained by reversing the sign of the flux quantum $\phi_0 \to -\phi_0$ in expressions below. \color{black} The free energy of the Pearl vortex (as well as anti-vortex) in a thin superconducting film is given by \cite{Pearl1964} \begin{equation} \mathcal{F}_{\rm V} = \mathcal{F}_{\rm \overline{V}} = \frac{\phi_0^2}{16 \pi^2 \lambda} \ln \frac{\lambda}{\xi}, \end{equation} where the superconducting coherence length is assumed to be much shorter than the Pearl length, $\xi\ll\lambda$. Using Eqs.~\eqref{eq1} and \eqref{eq:vortex:field}, we express the interaction part of the free energy \eqref{eq:F-Sk-V-0} as \begin{gather} \mathcal{F}_{\rm Sk-V} = M_s\phi_0 d_F+M_s \phi_0 \int \limits_0^\infty dq \frac{1-e^{-q d_F}}{1+2 q \lambda} J_0(qa)\int\limits_0^\infty dr \, r \notag \\ \times \Bigl [ \eta J_1(qr)\sin\theta(r) +J_0(qr) \bigl (\cos\theta(r)-1\bigr ) \Bigr] . \label{eq:Int:Sk:V:0} \end{gather} We note that the first term in the right hand side of Eq. \eqref{eq:Int:Sk:V:0} corresponds to the homogeneous magnetization of the ferromagnetic film. \color{black} Using the relation $x J_0(x)=d(x J_1(x))/dx$ and the definition \eqref{eq:funG}, the above expression can be rewritten as \begin{gather} \mathcal{F}_{\rm Sk-V} = M_s\phi_0 d_F- \frac{\phi_0}{4\pi} \int \limits_0^\infty dq \frac{1-e^{-q d_F}}{q(1+2 q \lambda)} J_0(qa) \notag \\ \times \Bigl [G^{(+)}(q)+\eta G^{(-)}(q) \Bigr ]. \label{eq:Int:Sk:V} \end{gather} We emphasize that in agreement with general expectations \cite{Abrikosov-book}, the interaction part of the free energy can be expressed in terms of the supercurrent as, $\mathcal{F}_{\rm Sk-V}=M_s\phi_0 d_F - \phi_0\int d^2\bm{r} J_\varphi(r)/(2\pi|\bm{r}-\bm{a}|)$. This implies that the derivative of the free energy with respect to the vortex position yields the supercurrent \eqref{eq:supercurrent}, $J_\varphi(a) = \phi_0^{-1}(\partial \mathcal{F}_{\rm Sk-V}/\partial a)$, cf. Eqs. \eqref{eq:supercurrent} and \eqref{eq:Int:Sk:V}. \color{black} Consequently, when the sign of the current $J_\varphi(a)$ is positive (negative), the vortex placed at a distance $a$ tends to move towards (away from) the skyrmion center. Therefore, the equilibrium position of the vortex is determined by the zero of the total supercurrent. \color{black} We note that in the case of the linear ansatz the function $G^{(+)}$ in Eq. \eqref{eq:Int:Sk:V} should be modified in accordance with Eq. \eqref{eq:G:linear}. \color{black} Below we analyse the general expression \eqref{eq:Int:Sk:V} in the case of a thin ferromagnetic film, $d_F\ll R, \lambda$. \begin{figure*}[t] \centerline{ \includegraphics[width=\textwidth]{figure3.pdf} } \caption{The dependence of the normalized interaction free energy, $\mathcal{F}_{\rm Sk-V}$, on $a/R$ for the chirality $\eta = +1$ (left panel) and $\eta=-1$ (right panel). The ratio of the skyrmion radius and the Pearl length is unity, $\lambda/R = 1$ (see text).} \label{fig5} \end{figure*} \subsection{The case of a smooth skyrmion profile} In the case of a smooth skyrmion profile, and for $d_F\ll R, \lambda$, we find from Eq. \eqref{eq:Int:Sk:V}, \begin{gather} \frac{\mathcal{F}_{\rm Sk-V}}{M_s\phi_0 d_F}=1 + \int \limits_0^\infty dy \frac{J_0(y a/R)}{(1+2 y \lambda/R)} \int\limits_0^\infty dx \, x \Bigl [ \eta y +\bar\theta^\prime(x) \Bigr] \notag \\ \times J_1(y x) \sin\bar\theta(x) . \label{eq:Int:Sk:V:thin} \end{gather} As in the case of the supercurrent, we start from the case of a skyrmion of size $R\ll \lambda$. Neglecting unity with respect to $2 y \lambda/R$ in the denominator of the integrand in the right hand side of Eq. \eqref{eq:Int:Sk:V:thin}, we obtain the following asymptotic expression for the interaction free energy at short distances, $a\ll \lambda$, (see Appendix \ref{App2})\footnote{We mention that ${\mathcal{F}_{\rm Sk-V}}/{(M_s\phi_0 d_F)}$ at large distances, $a \gg R$, has a subleading term that depends on chirality, $-\eta b_2 R^3/(8 a\lambda^2)$. This term does not affect the behavior of $\mathcal{F}_{\rm Sk-V}$ with the distance $a$ for the smooth ansatz but becomes essential in the case of the linear ansatz, see Sec. \ref{Sec:lin:F:112}.} \begin{equation} \frac{\mathcal{F}_{\rm Sk-V}}{M_s\phi_0 d_F}=1 + \frac{R}{2\lambda} f_\eta\left (\frac{a}{R}\right ) , \label{eq:FSkV:asympt:1} \end{equation} where the function $f_\eta(z)$ has the following asymptotic behavior \begin{gather} f_\eta(z) = \begin{cases} \eta b_0 - 4 c_1 +\Bigl(2c_{-1}+\eta \bar\theta^\prime(0)\Bigr ) z^2/2, & \, z\ll 1 ,\\ - 2 c_2/z-c_4/(4z^3), & \, z\gg 1 . \end{cases} \label{eq:feta:def} \end{gather} At very long distances, $a\gg \lambda$, the free energy of interaction between the skyrmion and the vortex becomes (see Appendix \ref{App2}), \begin{equation} \frac{\mathcal{F}_{\rm Sk-V}}{M_s\phi_0 d_F}=1 - \frac{4 c_2 R^2 \lambda}{a^3} . \label{eq:FSK-V:long:1} \end{equation} We emphasize that at long distances, $a\gg R$, $\mathcal{F}_{\rm Sk-V}$ becomes insensitive to chirality of the N\'eel skyrmion. The coefficient $c_{-1}$ is typically positive whereas $\bar\theta^\prime(0)$ is negative, therefore the interaction free energy may decrease with increase of $a$ for $\eta=+1$. Since the ratio $\mathcal{F}_{\rm Sk-V}/(M_s\phi_0 d_F)$ tends to unity at $a\to \infty$ irrespective of the chirality, one can expect the existence of the minimum of $\mathcal{F}_{\rm Sk-V}$ at some non-zero value of the distance $a$. This situation is realized for the exponential ansatz. In the case of 360-degree domain wall ansatz with $\eta=+1$ the nontrivial minimum exists for $\delta/R \gtrsim 0.64$ only. Next we consider the opposite case of the skyrmion with the radius much larger than the size of the Pearl vortex, $R\gg\lambda$. The interaction free energy can be written as a series in powers of $\lambda/R$ (see Appendix \ref{App2}), \begin{equation} \frac{\mathcal{F}_{\rm Sk-V}}{M_s\phi_0 d_F} = 1 + h_{\eta,0}\left (\frac{a}{R}\right ) +\frac{\lambda}{R} h_{\eta,1}\left (\frac{a}{R}\right ) + \dots \label{eq:Fint:Thin} \end{equation} The function $h_{\eta,0}$ that determines the magnitude of the interaction free energy has the following asymptotic behavior (see Appendix \ref{App2}), \begin{equation} h_{\eta,0}(z) = \eta b_{-1}-2 + \left [ \frac{3}{4} \eta \bar\theta^{\prime\prime}(0) \ln z + \bar\theta^{\prime 2}(0)+\eta \beta_0 \right ] \frac{z^2}{2} , \label{eq:Fint:Thin:h1s} \end{equation} at $z\ll1$, and \begin{equation} h_{\eta,0}(z) = -\frac{\eta b_2}{2 z^3}, \qquad z\gg 1 . \label{eq:Fint:Thin:h1l} \end{equation} Here the parameter $\beta_0$ is given by the following lengthy expression, \begin{gather} \beta_0 = \frac{3}{2} \bar\theta^{\prime}(0) +\bar\theta^{\prime\prime}(0) \Bigl [\frac{7}{4} - \frac{3(1+2G)}{2\pi}-\frac{6}{\pi}\int\limits_0^1\frac{dx}{x^3}\Bigl (K(x^2) \notag \\ -\frac{\pi}{2}-\frac{\pi x^2}{8}\Bigr ) \Bigr ] + \frac{3}{2} \int\limits_1^\infty dx \frac{\sin\bar\theta(x)}{x^3} +\frac{3}{2}\int\limits_0^1 dx \Bigl [\frac{\sin\bar\theta(x)}{x^3} \notag \\ +\frac{\bar\theta^{\prime}(0)}{x^2} + \frac{\bar\theta^{\prime\prime}(0)}{2x}\Bigr ] , \label{eq:RlargeL:short} \end{gather} where $G\approx 0.916$ denotes the Catalan's constant and $K(x)$ stands for the complete elliptic integral of the first kind. The function $h_{\eta,1}(z)$ that determines the dependence on distance of the subleading contribution to $\mathcal{F}_{\rm Sk-V}$ has the following asymptotic behavior (see Appendix \ref{App2}), \begin{gather} h_{\eta,1}(z) = 4 \bigl (2c_{-1}+\eta \bar\theta^{\prime}(0)\bigr ) +3 \eta \bar\theta^{\prime\prime}(0) z - \Bigl [\frac{9}{4} \bar\theta^{\prime}(0)\bar\theta^{\prime\prime}(0) \ln z \notag \\ + \frac{4}{3}\eta \bigl (\bar\theta^{\prime 3}(0)-\bar\theta^{\prime\prime\prime}(0)\bigr ) -\beta_1 \Bigr ]z^2 , \quad z\ll 1 , \label{eq:Fint:Thin:h2s} \end{gather} and \begin{equation} h_{\eta,1}(z) = - \frac{4 c_2}{z^3}, \qquad z\gg 1 . \label{eq:Fint:Thin:h2l} \end{equation} Here the parameter $\beta_1$ is given as \begin{gather} \beta_1 = \frac{9}{2\pi}(1+2G) \bar\theta^{\prime}(0)\bar\theta^{\prime\prime}(0) - \frac{1}{2} \int\limits_{1}^\infty \frac{dx}{x^3} \partial_x \bigl(x \bar\theta^{\prime}(x) \sin \bar\theta(x)\bigr ) \notag \\ -\frac{1}{2} \int\limits_{0}^1 \frac{dx}{x^3}\partial_x \bigl(x \bar\theta^{\prime}(x) \sin \bar\theta(x) + \bar\theta^{\prime 2}(0)x^2+ \frac{3}{2} \bar\theta^{\prime}(0)\bar\theta^{\prime\prime}(0)x^3 \bigr ) \notag \\ +\frac{18}{\pi} \bar\theta^{\prime}(0)\bar\theta^{\prime\prime}(0) \int\limits_0^1 \frac{dx}{x^3} \Bigl [K(x^2)-\frac{\pi}{2}-\frac{\pi x^2}{8} \Bigr] \notag \\ +\bar\theta^{\prime 2}(0) -\frac{9}{2} \bar\theta^{\prime}(0)\bar\theta^{\prime\prime}(0) . \end{gather} We mention two discrepancies with the case of a skyrmion of a small radius. At first, the short distance behavior of the interaction free energy in the case of $R\gg \lambda$ is not parabolic generically, see Eq. \eqref{eq:Fint:Thin:h1s}. Secondly, the asymptotic behavior of $\mathcal{F}_{\rm Sk-V}$ at $a\gg R$ depends on the skyrmion's chirality. \begin{figure*}[t] \centering \includegraphics[width=\textwidth]{figure4.pdf} \caption{The dependence of the normalized interacting free energy, $\mathcal{F}_{\rm Sk-V}$, on $a/R$ for the linear ansatz for the skyrmion's profile. The plots are for two chiralities and for two values of ratio of the skyrmion radius and the Pearl length: $\lambda/R = 0.1$ (left panel) and $\lambda/R = 10$ (right panel). Black dot near $a \approx 1.2 R$ on the left panel marks the location of the global minimum of the interaction energy. For $\lambda/R = 10$ (right panel) the global minimum is resided at $a \approx 2.8 R$ (see text).} \label{figure:DWa} \end{figure*} Provided $\bar\theta^{\prime\prime}(0)>0$, the analytic results \eqref{eq:Fint:Thin:h1s}--\eqref{eq:Fint:Thin:h1l}, suggest the existence of the global minimum of $\mathcal{F}_{\rm Sk-V}$ at a certain non-zero distance $a$ in the case of positive skyrmion's chirality $\eta = +1$. For negative chirality, $\eta=-1$, the minimum of the interaction free energy is situated at $a=0$. Interestingly, the 360-degree domain wall ansatz is special since $\bar\theta^{\prime\prime}(0)= 0$. Thus, for the 360-degree domain wall ansatz the existence of the minimum in $\mathcal{F}_{\rm Sk-V}$ is controlled by the sign and \color{black} magnitude of $\beta_0$, see Eq.\eqref{eq:RlargeL:short} \color{black} . For $\delta \gtrsim 0.63 R$ ($\delta \lesssim 0.36 R$) the interaction free energy, $\mathcal{F}_{\rm Sk-V}$, has the minimum at nonzero value of $a$ for the case of positive (negative) chirality, $\eta=+1$ ($\eta=-1$). In Figs. \ref{fig5} we show the behavior of the interaction free energy as a function of $a/R$ for both chiralities, $\eta=\pm 1$ and for the skyrmion radius equal to the Pearl length. As one can see, for positive chirality, $\eta=+1$, the minimum of $\mathcal{F}_{\rm Sk-V}$ is reached at nonzero value of the distance $a$. \color{black} We mention that the sign of interacting free energy is determined by the sign of the magnetic flux of the superconducting vortex. If the direction of the magnetic flux at the center of the vortex is opposite to the direction of magnetization at the center of the skyrmion, i.e. magnetic flux is parallel to the vector $\bm{e_z}$, the interacting free energy above will reverse its sign. Then instead of the minimum at $a=0$ (at a finite value of $a$) the minimum will occur at $a=\infty$ (at $a=0$). \color{black} \subsection{The case of the linear ansatz\label{Sec:lin:F:112}} \color{black} As in the case of supercurrent, the interacting free energy for the linear ansatz for the skyrmion profile needs a separate treatment. The interaction energy can be written in the form similar to \eqref{eq:Int:Sk:V}, \begin{gather} \mathcal{F}_{\rm Sk-V, \it L} = M_s\phi_0 d_F- M_s\phi_0 R \int \limits_0^\infty dq \frac{1-e^{-q d_F}}{q(1+2 q \lambda)} J_0(qa) \notag \\ \times \Bigl [g^{(+)}_L(qR)+\eta g^{(-)}(qR) \Bigr ] . \label{} \end{gather} Here the functions $g^{(-)}$ and $g^{(+)}_L$ are defined in Eqs.~\eqref{eq:def:gq} and \eqref{eq:G:linear}, respectively. As it was described in Sec. \ref{Sec:SuperCurrent}, the function $g^{(+)}_L(y)$ is given by a sum of two terms: one identical to the case of the smooth profile $\theta(r)$, $g^{(+)}$, and the other one, $\delta g^{(+)}$, arising due to discontinuity of $\theta^\prime(r)$ at $r=R$, see Eq. \eqref{eq:G:linear}. Accordingly we can represent the free energy as a sum $\mathcal{F}_{\rm Sk-V, \it L} \equiv \mathcal{F}_{\rm Sk-V} + \delta \mathcal{F}_{\rm Sk-V}$. Here $\mathcal{F}_{\rm Sk-V}$ is given by Eq. \eqref{eq:Int:Sk:V:thin} with $\bar\theta(x) = \pi(1-x)$ for $x \leqslant 1$ and zero overwise. The second term for a thin ferromagnetic film, $d_F \ll R, \lambda$, is defined as \begin{equation} \delta \mathcal{F}_{\rm Sk-V} = - M_s \phi_0 d_F\int \limits_0^\infty dy \frac{J_0(ya/R)}{(1+2 y \lambda/R)} \delta g^{(+)}(y). \label{eq:DeltaF:int} \end{equation} We have studied the behavior of $\mathcal{F}_{\rm Sk-V}$ in the previous subsection, thus we can focus on examining solely the contribution from $\delta \mathcal{F}_{\rm Sk-V}$. Similar to the previous sections we begin with the case of a small skyrmion radius, $R \ll \lambda$. At short distances, $a \ll \lambda$, we present the free energy likewise Eq. \eqref{eq:FSkV:asympt:1}, \begin{equation} \frac{\delta \mathcal{F}_{\rm Sk-V}}{M_s\phi_0 d_F}= \frac{R}{2\lambda} \delta f_{\eta}\left (\frac{a}{R}\right ) , \end{equation} where $\delta f_{\eta}$ behaves as follows (see Appendix \ref{App2}) \begin{gather} \delta f_{\eta}(z) = 4 c_2 \begin{cases} 1- z^2/4, & \, z\ll 1 ,\\ 1/(2z) +1/(16 z^3), & \, z\gg 1 . \end{cases} \label{eq:asym:Deltaf} \end{gather} Collecting both contributions, $\mathcal{F}_{\rm Sk-V}$ and $\delta \mathcal{F}_{\rm Sk-V}$, together, we can determine the behavior of the free energy $\mathcal{F}_{\rm Sk-V, \it L} \equiv 1+(R/2\lambda) f_{\eta, L}(a/R)$. The function $f_{\eta, L}$ has the following asymptotic behavior at short distances, $z\ll 1$, \begin{equation} f_{\eta, L}(z) = \eta b_0-4(c_1-c_2) +[c_{-1}-c_2+\eta \bar\theta^\prime(0)/2] z^2, \label{eq:asym:Fint:L1} \end{equation} whereas at $z\gg 1$ it becomes \begin{equation} f_{\eta, L}(z) = (c_2-c_4)/(4z^3) . \label{eq:asym:Fint:L2} \end{equation} Therefore, at $R\ll r\ll\lambda$ the interacting free energy in the case of the linear ansatz can be written as \begin{equation} \frac{\mathcal{F}_{\rm Sk-V}}{M_s\phi_0 d_F}= 1+ \frac{(c_2-c_4)R^4}{8 \lambda a^3}- \frac{\eta b_2 R^3}{8a \lambda^2} . \label{eq:as:linear:123} \end{equation} Here, also, we add the term of the next order in $R/\lambda$ which depends on the skyrmion chirality (see \cite{Note1}). This term dominates the second term in the right hand side of Eq. \eqref{eq:as:linear:123} for $\sqrt{R\lambda}\ll r \ll \lambda$. Since for the linear ansatz $c_2-c_4=2(\pi^2-6)/\pi^4$, the second term proportional to $1/a^3$ matches with the corresponding asymptotic of the current $J_\varphi^{(+)}$, cf. Eq. \eqref{eq:supercurrent:thin:asym:linear}. \color{black} Due to strict localization of the skyrmion and stronger suppression of the supercurrent at distances, $a\gg \lambda$, we expect the interaction energy to decay faster as compared to the case of a smooth profile. Indeed, the expression \eqref{eq:DeltaF:int} yields (see Appendix \ref{App2}) \begin{equation} \frac{\delta \mathcal{F}_{\rm Sk-V}}{M_s\phi_0 d_F}= \frac{4c_2 R^2 \lambda}{a^3}, \qquad \lambda \ll a , \label{eq:asym:DeltaF:long} \end{equation} that cancels out contribution \eqref{eq:FSK-V:long:1}. Therefore, the interacting free energy at large separations $a$ becomes sensitive to the chirality of skyrmion opposed to the case of smooth profile, \begin{equation} \frac{\mathcal{F}_{\rm Sk-V}}{M_s\phi_0 d_F}=1 - \frac{\eta b_2 R^3 }{2 a^3} , \qquad \lambda \ll a. \label{eq:asym:Fint:L3} \end{equation} \color{black} Different asymptotic expressions, Eqs. \eqref{eq:asym:Fint:L1}, \eqref{eq:asym:Fint:L2}, \eqref{eq:as:linear:123}, and \eqref{eq:asym:Fint:L3}, suggest that the vortex resides at a distance $a \sim \sqrt{R \lambda}$ from the center of the skyrmion for $\eta = +1$ and at $a=0$ for $\eta = -1$. \color{black} In the opposite case of a large skyrmion radius, $R \gg \lambda$, the additional contribution $\delta \mathcal{F}_{\rm Sk-V}$ to the interacting free energy can be expanded in a series in powers of $\lambda/R$, much the same as Eq. \eqref{eq:Fint:Thin}, \begin{equation} \frac{\delta \mathcal{F}_{\rm Sk-V}}{M_s\phi_0 d_F} = \delta h_{\eta,0}\left (\frac{a}{R}\right ) +\frac{\lambda}{R} \delta h_{\eta,1}\left (\frac{a}{R}\right ) + \dots \label{eq:Fint:Thin:L} \end{equation} Asymptotic behavior of functions $\delta h_{\eta,0}(z)$, $\delta h_{\eta,1}(z)$ is investigated in Appendix \ref{App2}. Combining them with contributions from $h_{\eta,0}(z)$ and $h_{\eta,1}(z)$ (see Eqs. \eqref{eq:Fint:Thin:h1s}, \eqref{eq:Fint:Thin:h1l}, \eqref{eq:Fint:Thin:h2s}, and \eqref{eq:Fint:Thin:h2l}), we obtain \begin{equation} h_{\eta,0, L}(z) = \begin{cases} \eta b_{-1}-2 + 4c_2 + \left [\pi^2+\eta \beta_0 \right ] \frac{z^2}{2}, & z \ll 1, \\ -\eta b_2/(2 z^3), & z \gg 1 , \end{cases} \end{equation} and \begin{equation} h_{\eta,1,L}(z) = 8\left(c_{-1} - c_2 -\frac{\pi \eta}{2}\right ) + 6\left (\frac{2\pi^3\eta}{9}-c_2-\frac{\beta_1}{6}\right ) z^2, \end{equation} for $z\ll 1$, and \begin{equation} h_{\eta,1,L}(z) = 9 (c_2-c_4)/(2z^5) , \quad z\gg 1 . \label{eq:Fint:Thin:h2Linl} \end{equation} The above asymptotic expressions suggest that for the positive chirality, $\eta = +1$, the vortex have to be settled at a distance of order $R$ from the skyrmion's center, whereas for $\eta = -1$ the vortex is situated exactly at the center of the skyrmion, $a=0$. \color{black} We illustrate the dependence of the interacting free energy on the distance $a$ in the case of the linear ansatz in Fig. \ref{figure:DWa}. On the left panel of Fig. \ref{figure:DWa} one can see the minimum of $\mathcal{F}_{\rm Sk-V}$ (marked by the black dot) for the positive chirality and $\lambda/R=0.1$. For $\lambda/R=10$ (right panel of Fig. \ref{figure:DWa}) and positive chirality the shallow global minimum of $\mathcal{F}_{\rm Sk-V}$ (also indicated by the black dot) is located at $a \approx 2.8R$, which is consistent with our prediction, see Eq. \eqref{eq:as:linear:123}. \color{black} It should be noted that, in contrast to the case of a smooth ansatz, the transformation $\phi_0 {\to} -\phi_0$ interchanges the qualitative behavior in cases of positive and negative chirality. Namely, for $\eta = +1$ the free energy will have the minimum at $a = 0$ whereas for $\eta = -1$ the minimum of the free energy will be shifted from $a = 0$ to some nonzero $a$. \color{black} We note that in the case of the linear ansatz the existence of the minimum of the interaction free energy on a finite distance from the skyrmion's center has been noticed in Ref. \cite{Dahir2018}. \color{black} \section{The effect of the Pearl vortex on the skyrmion\label{Sec:BackAction}} The magnetic free energy of the chiral ferromagnetic film is given by \cite{Bogdanov1989} \begin{gather} \mathcal{F}_{\text{magn}}[\bm{m}] =d_F \int d^2 \bm{r} \bigg\{ A (\nabla \bm{m})^2 + K(1- m_z^2) + \notag \\ \hspace{1cm} + D \bigl [m_z \nabla \cdot \bm{m} - (\bm{m}\cdot \nabla) m_z \bigr ] \bigg\} . \label{eq:MagFe} \end{gather} Here $\bm{m}(\bm{r})$ denotes the unit vector of magnetization direction, $A>0$ stands for the exchange constant, $D$ is the Dzyaloshinskii--Moriya interaction, and $K>0$ denotes the perpendicular anisotropy constant. The magnetic free energy is normalized in such a way that $\mathcal{F}_{\text{magn}}$ is zero for the ferromagnetic state, $m_z=1$. \color{black} We note that we include the energy of the magnetic field $\bm{B}_{Sk}$ created by the skyrmion into the definition of the anisotropy constant $K$ (see Appendix \ref{App:DeMag}). \color{black} Substituting $\bm{m} = \bm{m}_{\rm Sk}=\bm{M}_{\rm Sk}/M_s$, see Eq. \eqref{eq1}, into Eq. \eqref{eq:MagFe}, we find \begin{gather} \mathcal{F}_{\rm Sk} \equiv \mathcal{F}_{\text{magn}}[\bm{m}_{\rm Sk}] = 2\pi d_F \int\limits_0^\infty dr \, r \Biggl\{ A \Bigl[\theta^{\prime 2}(r)+\frac{\sin^2\theta(r)}{r^2}\Bigr ] \notag \\+D\eta \Bigl [\theta^\prime(r) +\frac{\sin(2\theta(r))}{2r}\Bigr ] + K \sin^2\theta(r)\Biggr \} . \end{gather} Assuming a scaling form of the skyrmion profile, $\theta(r)=\bar\theta(r/R)$, we obtain \begin{equation} \mathcal{F}_{\rm Sk} = d_F \Bigl ( \alpha_A A - \alpha_D \eta D R + \alpha_K K R^2/2 \Bigr ) , \label{eq:Fsk:f} \end{equation} where \begin{align} \alpha_A & = 2\pi \int\limits_0^\infty dx\ x \Bigl[\bar\theta^{\prime 2}(x)+\frac{\sin^2\bar\theta(x)}{x^2}\Bigr ], \notag \\ \alpha_D & = - 2\pi \int\limits_0^\infty dx\ x \Bigl [\bar\theta^\prime(x) +\frac{\sin(2\bar\theta(x))}{2x}\Bigr ], \notag \\ \alpha_K &= 4\pi \int\limits_0^\infty dx\ x \sin^2\bar\theta(x) . \end{align} We note that $\alpha_{A,D,K}$ are positive constants in the case of the linear and exponential ansatz and are positive functions of the parameter $R/\delta$ in the case of the 360-degree domain wall ansatz. \color{black} It is worthwhile to mention that the free energy \eqref{eq:MagFe} does not account for the dipole--dipole interaction. However, since the dipole--dipole energy scales as the first power of the skyrmion radius $R$ (see e.g. \cite{Ezawa2010}), it can be taken into account by modification of the magnitude of the parameter $\alpha_D$. \color{black} Minimizing $\mathcal{F}_{\rm Sk}$ with respect to $R$, one can find the optimal radius of the skyrmion \begin{equation} R_0 = \alpha_D|D|/(\alpha_K K) \end{equation} and the chirality $\eta=\sgn D$. We note that the existence of a skyrmion in a chiral ferromagnetic film is possible under the following condition, \begin{equation} \alpha_A A < \alpha_K K R_0^2/2 . \label{eq:cond:SK:0} \end{equation} In order to simplify the presentation, we shall start our considerations from the cases of the linear and exponential ansatz. In the presence of vortex anti-vortex pair the skyrmion radius is obtained by minimization of $\mathcal{F}_{\rm Sk}+\mathcal{F}_{\rm Sk-V}$ with respect to $R$ and $a$. Let us start from the case of a skyrmion of small radius, $R_*\ll\lambda$. For the negative chirality the optimal distance between the skyrmion and the vortex is zero. Therefore, as it follows from Eqs. \eqref{eq:FSkV:asympt:1} and \eqref{eq:Fsk:f}, for $\eta=-1$ the interaction between skyrmion and vortex results in increase of the skyrmion radius, \begin{equation} R_* = R_0 + (2c_1+b_0/2) \ell_K^2/\lambda . \label{eq:R:11} \end{equation} Here $\ell_K=\sqrt{M_s\phi_0/(\alpha_K K)}$ is the length scale associated with the anisotropy energy. In the case of linear ansatz one needs to make the following substitution, $c_1\to c_1-c_2$ in Eq. \eqref{eq:R:11}, see Eq. \eqref{eq:asym:Fint:L1}. In the case of the positive chirality the optimal distance between the vortex and the skyrmion for the exponential ansatz is proportional to the skyrmion radius, $a_0=\zeta_0 R$, see Eq. \eqref{eq:FSkV:asympt:1}. Interestingly, we find that in the case of $\eta=+1$ the skyrmion radius is also enlarged due to interaction with the vortex, \begin{equation} R_* = R_0 - f_{+1}(\zeta_0) \ell_K^2/(2 \lambda) . \label{eq:R:12} \end{equation} We note that $f_{+1}(\zeta_0)<0$. \color{black} In the case of the linear ansatz with $\eta=+1$, using Eq. \eqref{eq:as:linear:123}, we can find the following result for the skyrmion radius, \begin{equation} R_*=R_0+ \frac{5 b_2^{3/2}}{24 (3(c_2-c_4))^{1/2}}\frac{\ell_K^2 R_*^{3/2}}{\lambda^{5/2}} . \label{eq:R:12b} \end{equation} Although, the above equation predicts ehnancement of the skyrmion radius due to interaction with the vortex, the numerical constant $5 b_2^{3/2}/[24 (3(c_2-c_4))^{1/2}]\approx 0.04$ such that the enhancement is extremely small. The results~\eqref{eq:R:11}--\eqref{eq:R:12b} are applicable for $\lambda\gg\max\{R_0,\ell_K\}$. In Table \ref{Tab} we present estimates of the change of the skyrmion radius due to interaction with the vortex for several ferromagnet structures. As one can see from the Table \ref{Tab}, the increase of the skyrmion radius $\delta R = R_*-R_0$ is typically small (of the order of a few per cent). Also we note that the estimate of $\delta R$ depends on the form of the skyrmion profile. We mention that the estimates of the bare skyrmion radius $R_0$ given in Table \ref{Tab} on the basis of values of the parameters $D$ and $K$ can significantly deviate from the values actually measured in the experiment. For example, for the [Ir$_1$Fe$_{0.5}$Co$_{0.5}$Pt$_1$]$^{10}$/MgO/Nb heterostructure the skyrmion radius of the order of 50 nm has been reported \cite{Petrovic2021}. This observation can indicate that in order to estimate $\delta R$ in a realistic structure one needs to find the actual skyrmion profile in the presence of the vortex--anti-vortex pair. \color{black} In order a vortex--anti-vortex pair can be spontaneously generated in the presence of a skyrmion the total free energy \eqref{eq:F:gen} should be negative. This implies the following inequality, \begin{equation} \alpha_A A - \frac{\alpha_K K R_*^2}{2}+\alpha_K K \ell^2_K + \frac{\phi_0^2}{8\pi^2 \lambda d_F} \ln \frac{\lambda}{\xi} < 0 . \label{eq:ineq:12} \end{equation} Since $R_*$ is larger than $R_0$ this inequality can be fulfilled provided the condition \eqref{eq:cond:SK:0} holds. We note that then the radius of the skyrmion should satisfy $\lambda\gg R_0\gg \ell_K$. In particular, the vortex--anti-vortex pair cannot be generated spontaneously in the absence of the Dzyaloshinskii--Moriya interaction, i.e. at $D=0$. Indeed, in the latter case $R_*\ll\ell_K$ and the left hand side of the inequality \eqref{eq:ineq:12} is positive. In fact, there is a minimal value of the Dzyaloshinskii--Moriya interaction at which the spontaneous generation of a vortex--anti-vortex pair is possible, \begin{gather} |D| > \left [\frac{2\alpha_K K}{\alpha_D^2} \left (\alpha_A A +\alpha_K K \ell^2_K + \frac{\phi_0^2 \ln (\lambda/\xi)}{8\pi^2 \lambda d_F} \right )\right ]^{1/2} \notag \\ + f_\eta(\zeta_0)\frac{\alpha_K K \ell_K^2}{2\alpha_D\lambda} . \end{gather} Now let us assume that the skyrmion radius is large, $R\gg \lambda$. Then, Eqs.~\eqref{eq:Fint:Thin} and \eqref{eq:Fsk:f} result in the following equation for the skyrmion radius modified by the interaction with the vortex, \begin{equation} \frac{R_*^3}{R_0^3} - \frac{R_*^2}{R_0^2} = h_{\eta,1}(\zeta_0) \frac{\lambda \ell_K^2 }{R_0^3} . \label{eq:rad:sk} \end{equation} For negative chirality, $\eta=-1$, the optimal distance between the skyrmion and the vortex is zero, $\zeta_0=0$. We note that $h_{-1,1}(0)=4 [2c_{-1}-\bar{\theta}^\prime(0)]>0$, see Eq.~\eqref{eq:Fint:Thin:h2s}. For positive chirality, $\eta=+1$, the interaction between skyrmion and vortex has the minimum at finite distance, $\zeta_0\neq 0$. However, as one can check (see Eq. \eqref{b9}), $h_{+1,1}(\zeta_0)>0$. Therefore, for both chiralities the skyrmion--vortex interaction leads to increase of the skyrmion radius, \begin{equation} R_* = R_0 \bigl (1+X^{-1/3}+X^{1/3}\bigr )/3, \label{eq:R*:2} \end{equation} where \begin{equation} X = 1 + \frac{27 u}{2} + 6\sqrt{3u + 81 u^2}, \quad u = h_{\eta,1}(\zeta_0)\frac{\lambda \ell_K^2}{4R_0^3} . \end{equation} We note that for $R_0\ll (\lambda \ell_K^2)^{1/3}$ and $\ell_K\gg \lambda$ the skyrmion radius is parametrically enhanced, $R_*\sim (\lambda \ell_K^2)^{1/3}\gg R_0$. For $R_0\gg (\lambda \ell_K^2)^{1/3}$, the radius of the skyrmion is only slightly increased, $R_*\sim R_0$. In this case Eq.~\eqref{eq:R*:2} holds under assumption $R_0\gg \lambda$. A spontaneous generation of the vortex--anti-vortex pair requires the negative total free energy \eqref{eq:F:gen}, \begin{gather} \alpha_A A - \frac{\alpha_K K R_*^2}{2}+\alpha_K K \ell^2_K \left [1+h_{\eta,0}(\zeta_0)+ 2 h_{\eta,1}(\zeta_0)\frac{\lambda}{R_*}\right ] \notag \\ + \frac{\phi_0^2}{8\pi^2 \lambda d_F} \ln \frac{\lambda}{\xi} < 0 . \end{gather} Since $R_* > R_0$ the above inequality can be satisfied provided the condition \eqref{eq:cond:SK:0} holds. However, it can occur only for sufficiently large bare skyrmion radius, $R_0\gg \lambda \gg \ell_K$. In the case $\ell_K\gg R_0\gg \lambda$ the skyrmion radius becomes $R_*\sim (\lambda \ell_K^2)^{1/3} \ll \ell_K$. Therefore, the negative term $-\alpha_K K R_*^2/2$ is much smaller than the positive term $\alpha_K K \ell_K^2$ and, consequently, spontaneous generation of vortex--anti-vortex pair is not possible. \begin{table*}[t] \caption{The parameters $M_s$,$A$,$K_u$, and $D$ for a number of thin chiral ferromagnet films. The estimates for the bare radius in zero external field ($R_0$), change of skyrmion radius ($\delta R \equiv R_* - R_0$) and an anisotropic scale ($\ell_K$) for the exponential ansatz are given. In order to obtain the estimate for change of radius $\delta R$ \color{black} we choose $\lambda=200$ nm.} \begin{tabular}{|l|c|c|c|c|c|c|c|} \hline & PtCoPt \cite{Metaxas2007,Sampaio2013} & IrCoPt \cite{MoreauLuchaire2016} & PtCoNiCo \cite{Ryu2014} & PdFeIr \cite{Romming2013,Romming2015} & [IrFeCoPt]$^{10}$ \cite{Petrovic2021} \\ \hline Saturation magnetization $M_s$ ($10^3$ A/m) & 580 & 956 & 600 & 1100 & 1450 \\ \hline Exchange constant $A$ ($10^{-12}$ J/m) & 15 & 10 & 20 & 2.0 & 13.9 \\ \hline Anisotropy constant $K_u$ ($10^6$ J/m$^3$) & 0.7 & 0.717 & 0.6 & 2.5 & 1.4\\ \hline DMI parameter $D$ ($10^{-3}$ J/m$^2$) & +3 & +1.6 & +3 & +3.9 & +2.1\\ \hline Bare radius $R_0$ ($10^{-9}$ m) & 4.1 & 2.1 & 4.8 & 1.5 & 1.4 \\ \hline Change of radius $\delta R$ ($10^{-9}$ m) & 0.06 & 0.09 & 0.07 & 0.03 & 0.07 \\ \hline Anisotropy scale $\ell_K$ ($10^{-9}$ m) & 10 & 13 & 10 & 7.5 & 12 \\ \hline \end{tabular} \label{Tab} \end{table*} In the case of the 360-degree domain wall ansatz Eqs. \eqref{eq:R:11}, \eqref{eq:R:12}, and \eqref{eq:rad:sk} remain valid. However, the value of $\zeta_0$ depends on the ratio $R_*/\delta$. The latter is determined from the minimum of the total free energy with respect to $\delta$. The corresponding analysis can be performed numerically. As one can check, the following inequalities hold $f_{\eta}(\zeta_0)<0$ and $h_{\eta,1}(\zeta_0)>0$. These inequalities imply that the skyrmion radius increases always in the presence of a vortex--anti-vortex pair. \color{black} \section{Summary and conclusions\label{Sec:DiscConc}} To summarize, we have studied an interaction of a N\'eel--type skyrmion and a vortex--anti-vortex pair due to stray fields in a chiral ferromagnet--superconductor heterostructure. We computed the supercurrent in a superconducting film induced by a skyrmion. For thin ferromagnet and superconductor films we found that the supercurrent has the maximum at the distance from the center of a skyrmion that is of the order of the skyrmion radius. It is worthwhile to mention that the supercurrent is sensitive to a profile of the skyrmion and its chirality. For example, in the case of smooth profiles (exponential and domain wall ansatzes), the supercurrent decays monotonously at large distances from the skyrmion center. For the case of a linear profile, there are decaying oscillations of the supercurrent at large distances due to discontinuity in $\theta^\prime(r)$ at $r=R$. Therefore, measurements of dependence of the supercurrent on distance can allow one to extract information on the profile of a skyrmion. We mention that the behavior of the supercurrent with a distance from the center of the skyrmion is qualitatively similar to the behavior of the supercurrent induced in a thin superconducting film by a Bloch domain wall in a ferromagnetic film \cite{Burmistrov2005}. The radius of the skyrmion plays the same role as the width of a domain wall. We have also computed the energy of interaction between a N\'eel--type skyrmion and a Pearl vortex. We found that the interaction with a Pearl vortex is sensitive to the skyrmion chirality. In the case of a skyrmion with negative chirality, typically, it is more energetically favourable for a vortex to be attracted to the skyrmion center. This occurs in the cases of linear and exponential skyrmion profiles and for a domain wall ansatz with $\delta\gtrsim 0.36 R$. In the case of positive skyrmion chirality a vortex is situated at a finite distance from the center of the skyrmion. This happens for linear and exponential profiles and in the case of domain wall ansatz with $\delta\gtrsim 0.63 R$. For the exponential and domain wall profiles the optimal distance becomes of the order of the skyrmion radius whereas for a linear ansatz the vortex is located at $\max\{R,\sqrt{R\lambda}\}$. It is worthwhile to mention that in the case of a Bloch--type skyrmion it is always energetically favorable for a vortex to settle at the center of the skyrmion \cite{Dahir2019}. Such a behavior is related with the absence of the radial component of magnetization in a Bloch--type skyrmion. Therefore, the Bloch--type skyrmion interacts with the $z$-component of the magnetic field of a Pearl vortex only. This leads to the absence of terms proportional to the chirality $\eta$ in Eqs. \eqref{eq:feta:def} and \eqref{eq:Fint:Thin:h1s}. As a result, the function $f_{\eta}(z)$ and $h_{\eta,0}(z)$ behave as increasing parabolas at $z\ll 1$. Such a behavior implies the minimum of the interaction free energy at zero distance between the center of the Bloch-type skyrmion and the Pearl vortex. The fact that it is energetically favourable for a Pearl vortex to take place at a finite distance from the center of a N\'eel-type skyrmion might have interesting implications for skyrmion lattices \cite{Balkind2019,Neto2021} and dynamics of skyrmions \cite{Menezes2019} in superconductor--ferromagnet heterostructures \cite{elsewhere}. We have investigated how a Pearl vortex affects a N\'eel-type skyrmion due to their mutual interaction. We found that a vortex--anti-vortex pair leads to an increase of the radius of the N\'eel--type skyrmion. We note that this result can be contrasted with the case of a Bloch--type skyrmion for which a vortex--anti-vortex pair can either increase or decrease the skyrmion radius \cite{Dahir2019}. It is also possible that a vortex--anti-vortex pair will be spontaneously generated in the presence of a N\'eel--type skyrmion provided the skyrmion radius and Pearl penetration length are large enough in comparison with the length associated with the anisotropy energy in a chiral ferromagnet, $\lambda, R_0 \gg \ell_K$. In the opposite case of small bare skyrmion radius, $R_0\ll \ell_K$, spontaneous generation of a vortex--anti-vortex pair is not possible. \color{black} Although, the relation, $\lambda, R_0 \gg \ell_K$, does not typically holds in chiral ferromagnets (see Table \ref{Tab}), recently, spontaneous generation of vortex--anti-vortex pairs in the [Ir$_1$Fe$_{0.5}$Co$_{0.5}$Pt$_1$]$^{10}$/MgO/Nb heterostructure with N\'eel--type skyrmions of large radius (about 50 nm) and \color{black} positive chirality \footnote{We draw a reader's attention to the fact that in Ref. \cite{Petrovic2021} the geometry of the heterostructure differs from the one considered in our work. In Ref. \cite{Petrovic2021} the ferromagnetic layers are above the superconducting film. Our results are applicable for the case of such a geometry provided the chirality sign is reversed} has been observed \cite{Petrovic2021}. \color{black} For $R_0\ll (\lambda \ell_K^2)^{1/3}\ll \ell_K$, we predict that a vortex--anti-vortex pair existing in a superconducting film can substantially increase the skyrmion radius: it becomes equal to $R_*\sim (\lambda \ell_K^2)^{1/3}\gg R_0$. The typical values of $R_0$, $\ell_K$, and $R_*$ are listed in Table \ref{Tab}. Abrupt increase of the skyrmion radius can be used as indication of appearance of vortex--anti-vortex pairs in superconducting films. It is an experimental challenge to detect enhancement of the skyrmion radius in a thin ferromagnet--superconductor heterostructure due to generation of vortex--anti-vortex pair in a superconducting film. \color{black} Our analysis of the skyrmion stability in the presence of a superconducting vortex was restricted to study of change of the skyrmion radius under assumption that the vortex does not affect the skyrmion profile. In fact, this is not necessary the case and one needs to find the skyrmion profile in the presence of the superconducting vortex from minimization of the total free energy $\mathcal{F}_{\rm Sk}+\mathcal{F}_{\rm Sk-V}$. In particular, we expect that the superconducting vortex can lead to an elongated skyrmion profile \cite{elsewhere}. \color{black} Finally, we mention that it would be interesting to generalize our results to the case \color{black} of skyrmions confined to nanodots \cite{Rohart2013} as well as to \color{black} more exotic magnetic excitations, e.g. antiskyrmions, bimerons, biskyrmions, skyrmioniums, etc. \cite{Tretiakov2021} \begin{acknowledgements} The authors are grateful to I. Eremin, Y. Fominov, M. Garst, and A. Petrovi\'c for useful comments. The authors are especially thankful to A. Melnikov for the pointing out the importance of the relation between the supercurrent and the interaction free energy. The work was funded in part by Russian Science Foundation under the grant No. 21-42-04410. \end{acknowledgements}
\section{Introduction} The idea of Primordial Black Holes (PBHs) can be traced back to 1960s, which was firstly investigated by Zel'dovich and Novikov~\cite{Zeldovich:1967}. Later, in 1971, Hawking pointed out that in the primordial universe, black holes (BHs) can be formed by the gravitational collapse of a highly overdense region of inhomogeneities~\cite{Hawking:1971ei}. Since then, the studies of PBHs have attracted a lot of attention mainly in two aspects. Firstly, since PBHs only interact via gravity, without introducing new physics beyond the standard model, they are natural candidates for dark matter (DM) which comprises 25$\%$ of the critical density (the earliest idea can be found in 1970~\cite{Chapline:1975ojl}). Most of the constraints on the fraction of PBHs in dark matter, come from the gravitational lensing and dynamical constraints. However, recent reanalysis opened a parameter window where PBHs with mass $10^{-16}-10^{-10}M_{\odot}$ can constitute all of the DM~\cite{Niikura:2017zjd,Katz:2018zrn,Smyth:2019whb,Montero-Camacho:2019jte}. This refreshes the interest of the investigation of PBHs as the origin of DM~\cite{Pi:2017gih,Cai:2018tuh}. Secondly, the detected binary black hole (BBH) mergers during the past O1, O2 and first half of O3 runs of the Laser Interferometer Gravitational-wave Observatory (LIGO)~\cite{Abbott:2016blz,Abbott:2016nmj,TheLIGOScientific:2016pea,Abbott:2017vtc,Abbott:2017oio,Abbott:2017gyy,LIGOScientific:2018mvr,Venumadhav:2019lyq,Abbott:2020niy} have shown two unexpected characteristics of binary black hole (BBH): the high masses (larger than 20 $M_\odot$) and low effective spin. The origin of these heavy BHs and the formation of such BBHs which merge within the age of the Universe are still in debate~\cite{Belczynski:2010tb,Dominik:2012kk,Dominik:2013tma,Dominik:2014yma,Belczynski:2016obo} (for a comprehensive summarization, see e.g.~\cite{TheLIGOScientific:2016htt,Miller:2016krr}). One of the possible explanations is that the mergers could be primordial in origin~\cite{Bird:2016dcv,Clesse:2016vqa,Sasaki:2016jop,Sasaki:2018dmp, Garcia-Bellido:2020pwq}. Up to now, most of works concentrate on predicting the PBH construction and its associated BBH mergers for (given) primordial curvature perturbations. However, in near future, we expect to detect much more BBH mergers. In this new era, the following (opposite) question will become more and more important: How can we reconstruct the features of primordial curvature perturbations such as power spectra and bispectra from the observations of BBH mergers? In fact, if (some of) these BBH mergers could be attributed to PBHs, we will be able to reconstruct the features of primordial curvature perturbations which would predict PBHs and then such PBHs are responsible for the detected BBH mergers. This reconstruction program is quite important because, over the past two decades, on cosmological scales (larger than Mpc scale), the observations of the cosmic microwave background (CMB) anisotropies and the large scale structure indicate an almost scale-invariant primordial curvature power spectrum with accurately measured amplitude and tilt~\cite{Spergel:2003cb,Aghanim:2018eyx,Akrami:2018odb}. However, on small scales (smaller than Mpc scale), we still lack the information of primordial curvature power spectrum though some upper bounds are obtained~\cite{Chluba:2019kpb,Jeong:2014gna,Nakama:2014vla,Inomata:2016uip,Allahverdi:2020bys}. This reconstruction program could directly determine the information of primordial curvature perturbations on small scales. As far as we know, no such attempt has yet been done albeit its importance. In this paper, we will organize such a reconstruction program. Our finding is that the reconstruction program must go through three distinct steps to successfully reconstruct the primordial power spectrum. In step (i), one needs to relate the feature of primordial curvature perturbations (such as power spectrum) to the (smoothed) density contrast (characterized by the mass variance for example). In step (ii), the PBH mass function needs to be related to the (smoothed) density contrast. In step (iii), the PBH mass function needs to be related to the (would-be) observed rates of BBH mergers associated with PBHs. In each step, there should be one-to-one correspondence for this reconstruction program to work. As we will explain in details later, each step suffers from its own theoretical uncertainties. They stem from i)very rare and highly non-linear nature of the PBH formation which defeats a first-principle calculation and forces us to employ some phenomenological modeling where some ambiguities come into play, and ii)our ignorance of the model of the early universe. As a result, it is inevitable to adopt some assumptions to achieve the reconstruction of the primordial power spectrum. In the next section, we will explain those assumptions one by one. For the technical assumption, we will also discuss how we should change the reconstruction procedure when the assumption is relaxed. This paper is organized as follows. In Section~\ref{assumptions}, we state the underlying four assumptions for the calculation and describe the motivations for these assumptions. In Section~\ref{principle}, we divide the reconstruction procedure into three steps. In Section~\ref{s1}, we relate the power spectrum of the Gaussian primordial curvature perturbations to the variance of the density perturbation smoothed by the top-hat window function. In Section \ref{s2}, we discuss the correspondence between the variance and the PBH mass function with the critical collapse phenomena being taken into account. In Section~\ref{s3}, by adopting the most updated formula of the merger rate, we finally show how to relate the PBH mass function to the (would-be) observed rates of BBH mergers associated with PBHs, assuming some of the observed binary BH merger events are attributed to PBH mergers, and show the PBH mass function can be reconstructed by putting these three steps together once the merger rate with sufficient mass resolution is determined. As an example, in Section~\ref{example}, we consider the simplest case where the effects of critical collapse and suppression factor are neglected and then find the one-to-one correspondence between the mass function and the merger rate in an analytic way. In Section~\ref{conclusion}, we draw the conclusion of this paper and give some discussions for further extension. In Appendix~\ref{appA}, for completeness, we make a general mathematical discussion on the one-to-one correspondence between the variance and the primordial power spectrum with an arbitrary window function. \section{Underlying assumptions}\label{assumptions} In this section, we state the following four assumptions that will be used in the next section: \begin{description} \item[(0)] In the future, some of the observed binary BH merger events are attributed to mergers of PBHs formed, and the merger rate distribution of the PBHs in the mass plane is observationally determined. \item[(1)] PBHs were formed out of rare high-$\sigma$ peaks of the primordial curvature perturbations in radiation dominated era. \item[(2)] The window function takes the {\it top-hat} form in $k$-space; \item[(3)] The primordial curvature perturbation follows {\it Gaussian} distribution and the effect of non-linearity between the curvature and the density perturbations is ignored; \end{description} \underline{About the assumption (0)}\\ The origin of the BHs detected by LIGO/Virgo experiments remains an open question. Broadly, there are two astrophysical channels of the BBH formation which could possibly explain the observed merger events (for instance, see \cite{Mapelli:2018uds}). One is the isolated binary formation channel in which the massive stars in a binary evolve into the BH binary after experiencing the common envelope phase through which the binary shrinks its orbit and ends up with a tightly bound system. The other is the dynamical formation channel in which the two BHs form a binary by dynamical encounters which occurs in dense environments such as globular clusters. Another intriguing possibility is the PBH scenario, which could explain not only the observed binary black hole (BBH) merger events, but also the fact that many observed BBHs have large mass and low spin \cite{Abbott:2020niy}. Given the large theoretical uncertainties in predicting the merger rate distribution of the individual astrophysical channels, it is a challenging task to determine how much the PBHs contribute to the observed merger rate distribution from the data (see \cite{Kocsis:2017yty, Liu:2018ess, Chen:2019irf, Garriga:2019vqu, Clesse:2020ghq, Hall:2020daa, Wong:2020yig} as recent works along this direction). In order to achieve this, we would ultimately need to reduce the theoretical uncertainties of the astrophysical channels and subtract the astrophysical contributions from the observationally determined merger rate distribution to identify the PBH signal. Whether the merger rate distribution obtained in such a way is consistent with the mergers of PBHs can be checked by using the consistency relation, which is briefly discussed in the last section in this paper (see \cite{Kocsis:2017yty,Liu:2018ess,Garriga:2019vqu} as relevant previous studies). Alternatively, the issue of discriminating from the astrophysical BHs can be circumvented if merger events at cosmological redshifts $z\gtrsim 20$ \cite{Nakamura:2016hna} or of sub-solar mass BHs are detected since astrophysical BHs are thought to be very rare at such high redshifts and heavier than the solar mass (see \cite{Authors:2019qbw} which conducted search for sub-solar PBH mergers.). In these cases, it would be straightforward to observationally determine the PBH merger rate distribution. In this paper, we simply adopt the assumption (0) and suppose that one could know the merger rate of BBH originating from the PBHs because the main purpose of this paper is to give the method of the reconstruction of primordial curvature perturbations from such merger rates. \\ \begin{comment} The PBH scenario provides to be one of the candidates which could explain not only the observed binary black hole (BBH) merger events, but also the the large mass and low spin of BBHs. \my{Of course, astrophysical BHs can contribute to the observed BBH merger events too. Unfortunately, we have not yet had a good criteria to distinguish the PBH origin from the astrophysical BH one observationally. Hence, in this paper, we simply adopt the assumption (0) and suppose that one could know the merger rate of BBH originating from the PBHs because the main purpose of this paper is to give the method of the reconstruction of primordial curvature perturbations from such merger rates.} \end{comment} \underline{About the assumption (1)}\\ Though various mechanism to produce PBHs such as cosmic topological defects~\cite{Hawking:1982ga,Crawford:1982yz,Hawking:1987bn,Moss:1994iq}, interacting dark matter clumps~\cite{Shandera:2018xkn} have been proposed so far, one of the most interesting possibilities is large curvature perturbations generated during inflationary expansion~\cite{Ivanov:1994pa,GarciaBellido:1996qt,Bullock:1996at,Ivanov:1997ia,Cai:2019jah,Palma:2020ejf,Cheong:2019vzl,Zhou:2020kkf,Chen:2020uhe}. In fact, through this mechanism of large curvature perturbations, a lot of works have been done to ``predict" PBHs, which might account for dark matter, MACHOs, (unidentified) cosmic rays, and so on. In these works, given a specific model of inflation, primordial curvature perturbations were predicted, and then, the formation of PBHs originating from their designed power spectra has been discussed. In principle, it is possible that early matter dominated era existed prior to the radiation dominated and PBHs were formed in such matter dominated era. Formation process of the PBHs in such era is very different from that in the radiation dominated era \cite{Khlopov:1980mg, Harada:2016mhb}. Given that the PBH formation in the radiation dominated era is the most standard possibility considered in the literature, we assume that PBHs originate from the primordial curvature perturbations in the radiation dominated era. \\ \underline{About the assumption (2)}\\ The assumption (2) is imposed in order to obtain the analytic relation between the primordial power spectrum and the variance (see~\eqref{relation-s-p}). Of course there is no physical principle to choose a certain form of the window function. It is evident that different form of window function will change the final result, but it has been shown in~\cite{Ando:2018qdb,Young:2019osy} that the effect of the choice of window function will cause the uncertainty in the amplitude of the power spectrum only up to $\mathcal{O}(10\%)$. Hence, we concentrate on the top-hat form as a typical example in the main text. A numerical strategy to reconstruct the primordial power spectrum for other types of the window function is also briefly discussed in the appendix.\\ \underline{About the assumption (3)}\\ The primordial curvature perturbation is non-Gaussian in general. In the standard single-field slow-roll inflation models, the non-Gaussianity is suppressed by the slow-roll parameters. For other classes of inflation models, the level of non-Gaussianity as well as the types of non-Gaussianity are model-dependent. If the primordial curvature perturbations are non-Gaussian, the PBH mass function and the PBH abundance depend not only on the power spectrum but also on higher-order statistics. In other words, the reconstruction of the power spectrum from the observations of the PBH mergers does not work unless we make specific assumptions on the higher-order statistics. The higher-order statistics will become important if the probability to realize the overdensity to form a PBH, which corresponds the tail of the probability density in realistic situation, differs significantly from the one given by the Gaussisan distribution. For instance, for the curvature perturbation with the local-type non-Gaussianity parametrized by the $f_{\rm NL}$ parameter, the non-Gaussianity will change the PBH abundance from the Gaussian case if $|f_{\rm NL}| \gtrsim \sigma^2/\delta_{\rm th}^3$, where $\sigma^2$ is the variance of the perturbation and $\delta_{\rm th}$ is the threshold for the PBH formation. Since there is no standard non-Gaussian shape which is well-motivated than the other non-Gaussian shapes, we assume that the curvature perturbation is Gaussian. Moreover, even if we assume the Gaussianity of the curvature perturbation, the non-linearity intrinsic to GR makes the density perturbation, which is relevant to the PBH formation, non-Gaussian. We also neglect the effect of this non-Gaussianity for simplicity, which is the assumption (3).~\footnote{The effect of non-Gaussianity can be found in literatures, for example, Ref~\cite{Bullock:1996at,Ivanov:1997ia,PinaAvelino:2005rm,Lyth:2012yp,Byrnes:2012yx,Shandera:2012ke,Young:2013oia,Franciolini:2018vbk,Cai:2018dig,Yoo:2019pma,Atal:2019erb,Ezquiaga:2019ftu,Young:2014oea,Young:2015cyn,DeLuca:2019qsy}}. \\ The assumption (0) is mandatory (almost by definition) for the reconstruction program to be achieved successfully. In this sense, this assumption is crucial in this paper. The assumption (2) is not essential to the reconstruction although this is practically convenient from the technical point of view. It is not clear if the violation of the assumption (1) and(or) the assumption (3) can spoil the reconstruction program. Answer may depend on the early universe model for the PBH formation and the type of non-Gaussianity of the primordial curvature perturbations that we employ. In that case, one needs to check the presence of the one-to-one correspondence in each step given below. Addressing this issue is beyond the scope of this paper. \\ \section{The principle of a reconstruction program of primordial curvature perturbations}\label{principle} Under the assumptions (0)--(3), we describe the principle of the reconstruction program. The logic chain of the reconstruction program is given as follows: \begin{align}\label{chain} \mathcal{P}_{\mathcal{R}}(k)\stackrel{\rm(i)}{\Longleftrightarrow}\sigma^2(R)\stackrel{\rm(ii)}{\Longleftrightarrow} f(m)\stackrel{\rm(iii)}{\Longleftrightarrow}\mathcal{R}(m_1, m_2, t)\,, \end{align} where $\mathcal{P}_{\mathcal{R}}(k)$ is the power spectrum of the primordial curvature perturbations, $\sigma^2(R)$ is the variance of the density perturbation smoothed over a comoving length scale $R$, $f(m)$ is the PBH mass function, and $\mathcal{R}(m_1, m_2, t)$ is the merger rate density of the PBH binaries with the masses $m_1$ and $m_2$ at the cosmic time $t$. Their detailed definitions will be given later. In what follows, we explain these three steps one by one. \\ \subsection{Step~(i)}\label{s1} In radiation dominated universe, an initially overdense region collapses to a BH right after the horizon reentry if the average amplitude of the density contrast of the overdense region evaluated at the time of the horizon reentry is larger than the threshold. In the literature, the density contrast $\Delta$ on the comoving slice is sometimes used as a useful quantity to measure the PBH formation \cite{Young:2014ana}. The density contrast smoothed over the comoving scale $R$ is defined by \begin{align} \Delta_R (t,{\bf x})=\int W({\bf y}-{\bf x};R) \Delta (t,{\bf y}) d{\bf y}. \end{align} Here $W({\bf y};R)$ is the window function. Notice that $\Delta$ evolves as $\propto a^2$ on super-Hubble scales. What is relevant to the formation of PBH with mass $M$ is the variance of $\Delta_R$, \begin{align}\label{sig} \sigma^2 (R)=\langle \Delta_R^2 (t_R,{\bf x}) \rangle =\int_0^\infty W^2(kR) \mathcal{P}_\Delta(t_R,k)~\mathrm{d}(\ln k), \end{align} where $R$ is determined as a function of $M$ by requiring that $M$ is the horizon mass evaluated at the time $t=t_R$ (i.e. $a(t_R) R=1/H(t_R)$) when the scale $R$ reenters the Hubble horizon, and $W(kR)$ is the Fourier transformation of the window function. In order to connect $\sigma^2 (R)$ to ${\cal P}_{\cal R}(k)$, we use the relation between the power spectrum for the density contrast $\mathcal{P}_\Delta$ and the one for the curvature perturbation during the radiation-dominated era given by $\mathcal{P}_{\mathcal{R}}$ as (see e.g., \cite{Green:2004wb}) \begin{align}\label{Prelate} \mathcal{P}_\Delta(t, k)=\frac{16}{81}\left(\frac{k}{aH}\right)^4\mathcal{P}_{\mathcal{R}}(k). \end{align} The right-hand side of this relation is the leading order in the Taylor expansion in the power of $k/(aH)$ and higher order terms are ignored. We use this relation in evaluating the right-hand side of Eq.~(\ref{sig}), which will be a good approximation since the unphysical contributions from the sub-Hubble modes are suppressed thanks to the window function. Then, we have \begin{align}\label{sig2} \sigma^2 (R)=\frac{16}{81} \int_0^\infty W^2(kR) {(kR)}^4 {\cal P}_{\cal R}(k)~\mathrm{d}(\ln k). \end{align} Based on the assumption (2), we adopted the top-hat form window function in $k$-space \begin{align}\label{hat} W(kR)=\left\{\begin{matrix} \displaystyle \quad 1\quad\,; & 0<k<1/R\,,&~\\ \\ \displaystyle \quad 0\quad; & \mathrm{otherwise}\,, \end{matrix} \right. \end{align} Taking the derivative of \eqref{sig2} with respect to $1/R$, we then obtain \begin{align}\label{relation-s-p} \frac{81}{16} R^4\frac{{\rm d}}{{\rm d}R} \left( \frac{\sigma^2 (R)}{R^4} \right) \bigg|_{1/R=k}=-k\mathcal{P}_{\cal R} (k). \end{align} This is the desired relation which enables us to directly reconstruct the power spectrum of the curvature perturbation $\mathcal{P}_{\mathcal{R}}(k)$ from (the derivative of) the variance $\sigma^2(R)$. This reconstruction method works in an ideal case where $\sigma^2 (R)$ is determined by observations as a continuous function of $R$. In realistic observations, however, $\sigma^2 (R)$ will be measured only for some discrete values of $R$ unless we adopt a specific fitting function for which free parameters entering the fitting function are fixed by observations. Furthermore, it is not clear how to extend the reconstruction method given above to other types of the window functions. Although the top-hat form in $k$-space is technically conveninent in the sense that it is straightforward to solve the integral equation (\ref{sig2}) for ${\cal P}_{\cal R}$, this window function may not be considered as the most natural one from the physical point of view given that the top-hat window function, when Fourier-transformed into the real space, is spatially extended beyond the Hubble horizon and thus includes contribution of the perturbations outside the Hubble horizon which should not affect the PBH formation. In the appendix, we discuss about how to reconstruct ${\cal P}_{\cal R}$ when $\sigma^2(R)$ is given only discretely for a fixed window function which is not necessarily a top-hat form in $k$-space. On the other hand, the variance $\sigma^2(R)$ can be uniquely determined from $\mathcal{P}_{\mathcal{R}}(k)$ by \eqref{sig2}. Therefore, the step (i) in \eqref{chain} is reversible. \\ \subsection{Step~(ii)}\label{s2} Our next task is to reconstruct the variance $\sigma^2 (R)$ from the PBH mass function $f(M)$. In this paper, the PBH mass function $f(M)$ is defined such that the quantity $f(M){\rm{d}}M$ represents the probability that a randomly chosen PBH is in the mass range $\left(M, M+{\rm{d}}M\right)$, \begin{align}\label{normf1} \int_0^\infty f(M) {\rm {d}}M = 1. \end{align} Computing the PBH mass function from the primordial perturbations has been a long-standing topic. Since the formation of PBHs is a very rare and highly non-linear phenomena, there is no first principle derivation of the PBH mass function \footnote{One may think the PBH mass function can be obtained by conducting the cosmological simulations which evolve the random primordial fluctuations initially defined on super-Hubble scales until all the interesting scales have reentered the Hubble horizon and by counting the number of the produced PBHs and measuring the mass distribution. However, since the PBH formation is very rare, the size of the simulation box must be extraordinarily large to contain enough number of PBHs at the end of simulation. This is impossible at the current computational resource.}. In the literature, semi-analytic formulations of the PBH mass function based on the numerical relativity computations of the PBH formation in the spherically symmetric system and its phenomenological extrapolation to the more general random configuration without spherical symmetry have been addressed and refined repeatedly. In this paper, we adopt the mass function given in \cite{Byrnes:2018clq,Wang:2019kaf} which connects the variance $\sigma^2 (R)$ with the PBH mass function $f(M)$ with the effect of the critical phenomena being included such that $M=KM_R\left(\Delta-\Delta_{\rm th}\right)^\gamma$. It is given by \begin{align} f(M) &=\frac{1}{f_{\rm PBH}M} \int_{-\infty}^\infty \frac{K}{\sqrt{2\pi} \gamma \sigma (R)} \left(\frac{M_{\rm eq}}{M_R}\right)^{\frac12} {\left( \frac{M}{KM_R} \right)}^{1+\frac{1}{\gamma}} \exp \left[ -\frac{1}{2\sigma^2 (R)} {\left( \Delta_{\rm th}+{\left( \frac{M}{KM_R} \right)}^{\frac{1}{\gamma}} \right)}^2 \right] \frac{{\rm d} M_R}{M_R}\,, \label{fm} \end{align} where $f_{\rm PBH}$ is the mass fraction of PBHs in dark matter, $M_{\rm eq}$ is the horizon mass at the matter-radiation equality epoch, and the integration variable $M_R$ is the horizon mass at $t=t_R$, \begin{equation}\label{massR} M_R=\frac{4\pi}{3} \rho (t_R) H^{-3}(t_R)=\frac{1}{2GH(t_R)}, \end{equation} by which $R$ is related to $M_R$. This integration arises since the overdense region with fixed $R$ can collapse to the PBH of any mass in the range $0< M \lesssim M_R$ when the critical phenomena is taken into account. $\gamma \approx 0.36$ is the critical exponent of the critical collapse, $\Delta_{\rm th}$ is the threshold of the PBH formation, which depends both on the perturbation profile and the adopted window function \cite{Young:2019osy}, and $K=3.3$ is a numerical constant. Eq.~(\ref{fm}) is a non-linear integral equation for $\sigma^2 (R)$ and it is impossible to find analytic solution. Furthermore, unfortunately, we were not able to find the numerical method to systematically reconstruct $\sigma^2 (R)$ for any given $f(M)$. This is a purely mathematical problem and providing a full solution to this problem is beyond the scope of this paper. Instead, here we sketch one ad hoc approach which may work sufficiently in some cases. To this end, we first notice from Eq.~(\ref{fm}) that, from the physical point of view, the mass function $f(M)$ is expected not to decay faster than $M^{1/\gamma}$ as $M$ is decreased. In order to see this, let us assume an extreme case where $\sigma^2 (R)=0$ for $R<R_*$. In this case, the range of integration in Eq.~(\ref{fm}) is effectively restricted to $M_R>M_{R_*}$. Thus, for $M \ll M_{R_*}$, Eq.~(\ref{fm}) becomes \begin{equation} f(M)\approx\frac{M^{\frac{1}{\gamma}}}{f_{\rm PBH}} \int_{\ln M_{R_*}}^\infty \frac{K}{\sqrt{2\pi} \gamma \sigma (R)} \left(\frac{M_{{\rm eq}}}{M_R}\right)^{\frac12} {\left( KM_R \right)}^{-1-\frac{1}{\gamma}} \exp \left( -\frac{\Delta_{\rm th}^2}{2\sigma^2 (R)} \right) {\rm d} \ln M_R. \label{fm2} \end{equation} The integrand is independent of $M$ and thus $f(M) \propto M^{\frac{1}{\gamma}}$ (For the case of the monochromatic power spectrum, this feature was derived in \cite{Niemeyer:1997mt} for the Gaussian perturbation and was shown to hold for the general non-Gaussian perturbation as well in \cite{Yokoyama:1998xd}). This tail $f(M) \propto M^{\frac{1}{\gamma}}$ reflects the fact that small-mass PBHs ($M\ll M_{R_*}$) are inevitably produced by the critical phenomena. In this sense, this gives the minimum amount of PBHs even in the absence of the primordial perturbations at the scale corresponding to $M (\ll M_{R_*})$. In reality, $\sigma^2 (R)$ will not be exactly zero for $R<R_*$, and such additional perturbations will produce extra PBHs to the ones mentioned above, which would only make $f(M)$ decrease slower than $M^{\frac{1}{\gamma}}$. Thus, $f(M)$ is not expected to decay faster than $M^{\frac{1}{\gamma}}$ as we decrease $M$. This consideration tells us that if the observed mass function turns out to decay faster than this limit, it strongly disfavors the scenario of the PBH origin, which itself provides one universal test of the PBH scenario. Since our main purpose in this subsection is the reconstruction of $\sigma^2 (R)$ from $f(M)$ under the assumption that the observed BHs have been robustly identified as PBHs and their mass function $f(M)$ has been well measured, we hereafter suppose that the observed $f(M)$ is consistent with this limit. If the observed $f(M)$ shows the scaling behavior $\propto M^{\frac{1}{\gamma}}$ in a certain mass range, then the above argument suggests that $\sigma^2 (R)$ in the corresponding range of $R$ is negligibly small compared to that for larger $R$. If, on the other hand, $f(M)$ is enhanced than the lower limit $M^{\frac{1}{\gamma}}$ for a wide mass range, it implies that such PBHs were produced by nearly scale-independent $\sigma^2 (R)$ in the same range since $f(M)$ is exponentially sensitive to $\sigma^2(R)$ (In any realistic situation, $\sigma^2 (R)$ must be much smaller than $\Delta_{\rm th}^2$ in order to avoid the overproduction of PBHs). Fig.~\ref{fig-integrand} shows the integrand of Eq.~(\ref{fm}) as a function of $\frac{KM_R}{M}$. We find that the integrand is sharply peaked at \begin{equation} \frac{KM_R}{M} \approx \left( \frac{2\Delta_{\rm th}}{(2+5\gamma) \sigma^2 (R)} \right)^\gamma. \label{peak} \end{equation} In the figure, the rapid fall-off on the left side is explained by the fact that the production of PBHs on super-Hubble scales does not occur, and the decay on the right side is due to the critical phenomena. Then, applying the method of the saddle point to Eq.~(\ref{fm}), we can approximately evaluate the integral as \begin{equation}\label{fmapp} f(M) \approx f_{\rm PBH}^{-1} {\left( \frac{K}{M} \right)}^{\frac{3}{2}} \left(\frac{M_{\rm eq}}{\Delta_{\rm th}}\right)^{\frac{1}{2}} {\left[ \left(1+\frac52\gamma\right) \frac{\sigma^2 (R)}{\Delta_{\rm th}} \right]}^{\frac{1}{2}+\frac{3}{2}\gamma} \exp \left( -\frac{\Delta_{\rm th}^2}{2\sigma^2 (R)} \right). \end{equation} If $\sigma^2 (R)$ does not vary significantly, this gives an approximate relation between $f(M)$ and $\sigma^2 (R)$ (The scale $R$ for a fixed $M$ is determined by Eq.~(\ref{peak})). At this level of approximation, it is clear that there is one-to-one correspondence between $f(M)$ and $\sigma^2 (R)$, and $\sigma^2 (R)$ can be uniquely reconstructed from $f(M)$. On the other hand, the non-critical collapse case corresponds to setting the constants $\gamma=0$ and $K\approx0.3$. In such case, starting from the first line of \eqref{fm}, the mass function can be expressed as \begin{align}\label{fmnon} f(M)\bigg|_{\rm non-critical}&=\frac{\sqrt{M_{\rm{eq}}}}{2f_{\rm PBH}}\left(\frac{K}{M}\right)^{\frac{3}{2}}~{\rm erfc}\left(\frac{\Delta_{\rm th}}{\sqrt{2}\sigma(R)}\right)\nonumber\\ &\approx\sqrt{\frac{M_{\rm eq}}{2\pi}}\frac{\sigma(R)}{f_{\rm PBH}\Delta_{\rm th}} {\left( \frac{K}{M} \right)}^{\frac{3}{2}} \exp \left( -\frac{\Delta_{\rm th}^2}{2\sigma^2 (R)} \right)\,, \end{align} where ${\rm erfc}(x)$ is the complementary error function defined by \begin{align}\label{errorori} \mathrm{erfc}\left(x\right)\equiv\frac{2}{\sqrt{\pi}}\int_x^\infty e^{-z^2}{\rm{d}}z\,, \end{align} and we used the asymptotic behavior of error function ${\rm erfc}(x)\approx(\sqrt{\pi}x)^{-1}\exp(-x^2)$ for $x\gg1$ in the second step. It should be noted that \eqref{fmapp} with $\gamma=0$ differs from \eqref{fmnon} by a $\sqrt{2\pi}\approx2.5$ pre-factor. This is because \eqref{fmapp} is obtained by the saddle point method which has assumed an approximate Gaussian peak. It may differ from the exact integrand by a factor, which is within $\mathcal{O}(1)$ when we make the comparison between \eqref{fmapp} and \eqref{fmnon}. Therefore, we conclude that $\sigma^2 (R)$ can be uniquely reconstructed from $f(M)$ at least within the approximations made above. \begin{figure}[t] \begin{center} \includegraphics[clip,width=10.0cm]{Integrand.pdf} \caption{Integrand of Eq.~(\ref{fm}) as a function of $\frac{KM_R}{M}$ when $\sigma^2(R)$ is independent of $R$. We use $\gamma=0.36, \Delta_{\rm th}=0.4, \sigma^2=0.01$. Normalization of the vertical axis is chosen arbitrarily and only relative height is meaningful.} \label{fig-integrand} \end{center} \end{figure} \subsection{Step~(iii)}\label{s3} Our final step is to reconstruct the mass function $f(M)$ from the merger rate density ${\cal R}(m_1, m_2, t)$ in the mass plane. It is known that PBHs can form binaries either in radiation dominated era or at low redshift (e.g. \cite{Sasaki:2018dmp}). In the former case, two neighboring PBHs which are accidentally closer than the mean distance between PBHs become gravitationally bounded and the tidal force from the surrounding PBHs gives the initial angular momentum of the PBH binary. In the latter case, two PBHs randomly moving inside the halo have a near miss at which they becomes gravitationally bounded due to the energy loss by GW radiation. If the fraction of PBHs in dark matter $f_{\rm PBH}$ is much smaller than unity, which we assume in this paper, the former channel dominates the merger rate over the latter one. The merger rate density in the former channel for the case of the extended PBH mass function has been studied in \cite{Raidal:2017mfl,Kocsis:2017yty, Raidal:2018bbj}. In this paper, we adopt the most updated one \cite{Raidal:2018bbj} given by \begin{align}\label{merger-rate} \mathcal{R}(m_1, m_2, t)=\frac{1.6\times 10^6}{{\rm Gpc}^3 {\rm yr}} f_{\rm PBH}^{\frac{53}{37}} {\left( \frac{t}{t_0} \right)}^{-\frac{34}{37}} {\left( \frac{m_t}{M_\odot} \right)}^{-\frac{32}{37}} {\left( \frac{m_t^2}{m_1m_2} \right)}^{\frac{34}{37}} S[f|f_{\rm PBH},m_t] m_1 m_2 f(m_1)f(m_2). \end{align} Here $m_t=m_1+m_2$ and $S$, which is the functional of $f(m)$, is the so-called suppression factor which accounts for the distruption of the PBH binaries in later Universe. Now, our problem is to obtain $f(m)$ out of $\mathcal{R}(m_1, m_2, t)$ which is supposed to have been determined by observations. If the dependence of the suppression factor on $m_t$ can be ignored, one can easily estimate the ratio of $f(m_1)$ and $f(m_2)$ as \begin{equation}\label{ratio} \frac{f(m_1)}{f(m_2)}={\left( \frac{m_2}{m_1} \right)}^{\frac{21}{37}} \sqrt{\frac{\mathcal{R}(m_1,m_1,t)}{\mathcal{R}(m_2, m_2, t)}}. \end{equation} The normalization condition \eqref{normf1} gives the overall factor of $f(m)$. Finally, $f_{\rm PBH}$ is obtained by substituting the obtained $f(m)$ into Eq.~(\ref{merger-rate}). If the dependence of the suppression factor on $m_t$ is non-negligible, obtaining $f(m)$ requires more procedures. From Eq.~(\ref{merger-rate}), we have \begin{align} \frac{f(m_1)f(m_2)}{f^2 \left( \frac{m_1+m_2}{2} \right)} ={\left( \frac{{\left( m_1+m_2 \right)}^2 }{4m_1 m_2} \right)}^{\frac{3}{37}} \frac{\mathcal{R}(m_1,m_2,t)}{\mathcal{R}(\frac{m_1+m_2}{2},\frac{m_1+m_2}{2},t)}. \label{ratio-2} \end{align} In the following, we mainly concentrate on the case where the dependence of the suppression factor on $m_t$ is non-negligible. We can construct $f(m)$ satisfying \eqref{ratio-2} in the following way. We first choose two masses $m_{1*}$ and $m_{2*}$. ($m_{1*} < m_{2*}$) arbitrarily and assign values given by hand to $f(m_{1*})$ and $f(m_{2*})$. Then, the above equation gives $f(\frac{m_{1*}+m_{2*}}{2})$. From the values of $f(m_{1*})$ and $f(\frac{m_{1*}+m_{2*}}{2})$, we can obtain $f(\frac{3m_{1*}+m_{2*}}{4})$. By repeating this procedure for $n$ times, we obtain the following recurrence relation \begin{align} &\frac{f(m_{1*})f(M_{n-1})}{f^2\left(M_n\right)}=\left(\frac{M_n^2}{m_{1*}M_{n-1}}\right)^{3/37}\frac{\mathcal{R}(m_{1*}, M_{n-1}, t)}{\mathcal{R}\left(M_n, M_n, t\right)}\,,\label{fmergern}\\ &M_n\equiv m_{1*}+\frac{\Delta m}{2^n}\,,\qquad \Delta m\equiv m_{2*}-m_{1*}\,,\qquad n=0,1,2,...\label{fmergern1} \end{align} where $M_0=m_{2*}$. From this relation, $f(M_n)$ can be further expressed as \begin{align}\label{fmdis} f(M_n)&=f(m_{1*})\left[\left(\frac{m_{2*}}{m_{1*}}\right)^{\frac{3}{37}}\frac{f(m_{2*})}{f(m_{1*})}\right]^{\frac{1}{2^n}}\left(\frac{m_{1*}}{M_n}\right)^{\frac{3}{37}}\prod_{i=1}^{n}\left[\frac{\mathcal{R}\left(M_{n-i+1}, M_{n-i+1}, t\right)}{\mathcal{R}(m_{1*}, M_{n-i}, t)}\right]^{\frac{1}{2^i}}\,. \end{align} \begin{figure}[t] \begin{center} \includegraphics[clip,width=10.0cm]{discrete.pdf} \caption{Illustration of the construction of the mass function $f(M_n)$. According to \eqref{fmergern1}, we divide the mass between $m_{1*}$ and $m_{2*}$ into $n$ pieces such as $M_1$, $M_2$, .... The corresponding mass functions, connected by the dashed blue lines, are then calculated by \eqref{fmdis}. For mass value $m\in(M_{i+1}, M_{i})$, we can set $f(m_1)=f(M_{i+1})$ and $f(m_2)=f(M_{i})$ in \eqref{ratio-2}, respectively, and repeat the above procedure to obtain the mass function for a more narrow mass range.} \label{fig-discrete} \end{center} \end{figure} As illustrated in Fig.~\ref{fig-discrete}, for mass value $m\in(M_{i+1}, M_{i})$, we can set $f(m_1)=f(M_{i+1})$ and $f(m_2)=f(M_{i})$ in \eqref{ratio-2}, respectively, and repeat the above procedure to obtain the mass function in a more narrow mass range. Therefore, provided with enough data of merger rate for different mass range, principally speaking, we can obtain the mass function in a sufficiently narrow mass range. In this case, the normalization condition \eqref{normf1} becomes the following form: \begin{align}\label{normaldiscrete} \sum_{n=0}^\infty f(M_n)\frac{\Delta m}{2^{n+1}}=1\,. \end{align} The value of $f(m)$ for $m$ outside $(m_{1*},m_{2*})$ can be obtained in a similar manner by plugging $m_1 \to 2m_{1*}-m_{2*} <m_{1*}, \frac{m_1+m_2}{2} \to m_{1*}, m_2 \to m_{2*}$ (or $m_1 \to m_{1*}, \frac{m_1+m_2}{2} \to m_{2*}, m_2 \to 2m_{2*}-m_{1*} > m_{2*}$) in Eq.~(\ref{ratio-2}). The solution $f(m)$ obtained in this way contains two free parameters (i.e. $f(m_{1*}), f(m_{2*})$) which corresponds to the invariance of Eq.~(\ref{ratio-2}) under $f(m) \to Ae^{Bm} f(m)$ ($A,B$:constant). One of the two parameters (we take it to be $A$) is fixed by the normalization condition (\ref{normaldiscrete}). Thus, the general solution of Eq.~(\ref{ratio-2}) can be expressed as $f(m)=c(B)f_0(m)e^{Bm}$, where $f_0(m)$ is a particular solution and $c(B)$ is the normalization constant. Substituting this solution to Eq.~(\ref{merger-rate}) will enable us to fix $f_{\rm PBH}$ and $B$ simultaneously since they enter differently in Eq.~(\ref{merger-rate}). \section{A simple example: neglecting the effect of critical collapse and suppression factor}\label{example} In this section, we consider the simplest case where the effects of the critical collapse and suppression factor are neglected. In such case, the primordial power spectrum can be analytically expressed in terms of the merger rate and other parameters, which we will show below. We start with the assumption (0) that the function of merger rate density $\mathcal{R}(m, m, t)$ has been obtained from observation data. We then use step (iii) to determine the mass function. Let us choose a fixed mass point $m_*$ and design a value for $f(m_*)$. Since the effect of the suppression factor is neglected, using \eqref{ratio}, the mass function can be written as \begin{align}\label{massfun1} f(m)=g(t)m^{-\frac{21}{37}}\sqrt{\mathcal{R}(m, m, t)}\,,\qquad g(t)\equiv f(m_*)m_*^{\frac{21}{37}}\left[\mathcal{R}(m_*, m_*, t)\right]^{-\frac{1}{2}}\,. \end{align} It should be noted that $f(m)$ is independent from $t$ because of the normalization condition \eqref{normf1}. Secondly, from step (ii), since the effect of critical collapse is neglected here, the variance can be expressed in terms of the mass function by inverting \eqref{fmnon}, \begin{align}\label{sigmafun1} \sigma(m(R))=\frac{\Delta_{\rm th}}{\sqrt{2}}\left[{\rm erfc}^{-1}\left(\frac{2f_{\rm PBH}\Omega_{\rm CDM}}{\left(M_{\rm eq}K^3\right)^{\frac12}}m^{\frac{3}{2}}f(m)\right)\right]^{-1}\,, \end{align} where ${\rm erfc}^{-1}(x)$ is the inverse function of the complementary error function defined by ${\rm erfc}\left[{\rm erfc}^{-1}(x)\right]=x$. We notice that in this simple case, the mass of PBH is approximated as the fraction of horizon mass such that $m=KM_R$. Hence, from \eqref{massR}, the mass of PBH is related to the horizon scale $k=1/R$ as~\cite{Green:2004wb} \begin{align}\label{mass1} m(k)=\left(\frac{k_{\rm eq}}{k}\right)^2M_{\rm eq}K\left(\frac{g_{*, \rm eq}}{g_*}\right)^{\frac13}\,, \end{align} where $g_*$ is the number of relativistic degrees of freedom which is expected to be of order $10^2$ in the early universe. At matter radiation equality, we have $g_{*, \rm eq}\approx3$ and $k_{\rm eq}= 0.01{\rm Mpc}^{-1}$. Inserting \eqref{massfun1} and \eqref{mass1} into \eqref{sigmafun1}, we obtain \begin{align}\label{sigmafun2} \sigma(m(k))=\frac{\Delta_{\rm th}}{\sqrt{2}}\left[{\rm erfc}^{-1}(A(m))\right]^{-1}\bigg|_{m=m(k)}\,,\qquad A(m)\equiv\frac{2f_{\rm PBH}\Omega_{\rm CDM}}{\left(M_{\rm eq}K^3\right)^{\frac12}}\left(g(t)m^{\frac{69}{74}}\sqrt{\mathcal{R}(m, m, t)}\right)\,. \end{align} Finally, we take step (i), i.e., insert \eqref{sigmafun2} into \eqref{relation-s-p}, then the primordial power spectrum can be obtained as \begin{align}\label{powersim} \mathcal{P}_{\cal R} (k)&=\frac{81}{16}\left(4\sigma^2+k\frac{{\rm d}\sigma^2}{{\rm d}k}\right)\nonumber\\ &=\frac{81}{8}\sigma^2\bigg[2-\sqrt{\pi}A(m)\left(\frac{69}{74}+\frac{m}{2\mathcal{R}(m, m, t)}\frac{{\partial}\mathcal{R}(m, m, t)}{{\partial}m}\right)\times\nonumber\\ &\qquad\times\left[{\rm erfc}^{-1}\left(A(m)\right)\right]^{\blue{-1}}\exp\left\{\left[{\rm erfc}^{-1}\left(A(m)\right)\right]^2\right\}\bigg]_{m=m(k)}\,, \end{align} where we have used the relation ${\rm d}\left[{\rm erfc}^{-1}(x)\right]/{\rm d}x=-(\sqrt{\pi}/2){\rm exp}\left(\left[{\rm erfc}^{-1}\left(x\right)\right]^{2}\right)$ in the last step. We notice that in such a simple case, once the parameters such as $f_{\rm PBH}$, $K$ and $\Delta_{\rm th}$ are known, the primordial powerspectrum is solely determined by the merger rate of the PBH binaries with the same mass. \section{Conclusion and discussion}\label{conclusion} In this paper, we have proposed the reconstruction method of primordial curvature perturbations on small scales through the merger rate of binary primordial black holes, which could form from large primordial curvature perturbation on small scales during radiation dominated era. This is motivated by the current observations of gravitational wave events by LIGO/VIRGO collaboration, which indicate high mass and low spin of the BBHs. These observations refresh the interest that PBHs may be one of the candidates of the corresponding BBHs. Adopting the scenario that PBHs originate from the primordial curvature perturbations on small scales, we discussed how to reconstruct the power spectrum of primordial curvature perturbations from observations of (possible) PBH merger events, based on the following assumptions : (0) In the future, some of the observed binary BH merger events are attributed to mergers of PBHs formed, and the merger rate distribution of the PBHs in the mass plane is observationally determined, (1) PBHs were formed out of rare high-$\sigma$ peaks of the primordial curvature perturbations in radiation dominated era, (2) The window function takes the {\it top-hat} form in $k$-space, (3) The primordial curvature perturbation follows {\it Gaussian} distribution and the effect of non-linearity between the curvature and the density perturbations is ignored. The reconstruction program is based on three steps. In the step (i), one could relate the primordial power spectrum $\mathcal{P}_{\cal R} (k)$ and the variance of the density perturbation $\sigma$ via \eqref{relation-s-p}. In the step (ii), we found the relation \eqref{fmapp} between the variance $\sigma$ and the PBH mass function $f(M)$ where the effect of the critical phenomena is included, given in \cite{Byrnes:2018clq,Wang:2019kaf}. In the step (iii), we presented the way to obtain the PBH mass function $f(M)$ from the merger rate ${\cal R}(m_1,m_2,t)$ of binary PBHs, adopting the theoretical expression of the merger rate given in \cite{Raidal:2018bbj}. By taking all steps, the power spectrum for the curvature perturbations can be uniquely determined by the PBH merger rate of binary black holes, provided with enough number of observed PBH merger events with various mass. It should be noted that the violation of the assumptions (1)–(3) might not necessarily invalidate our methodology of the reconstruction. For example, in the case of generic window function, the reconstruction of the primordial power spectrum from the variance is still possible as presented in the Appendix A. Although the reconstruction procedures in this case becomes more complicated than in the case of the top-hat window function, the methodology for step (i) still holds. In this sense, the principle of our methodology is quite general though, once one relaxes each assumption, one needs to check whether there is one-to-one correspondence in each step of the reconstruction program. On the other hand, there has been a long debate on which formalism should be used to calculate the PBH abundance and the mass function. Besides the formalism we have adopted in the paper, the peak theory formalism \cite{Bardeen:1985tr} is another one of the mostly used formalism which accounts the high-$\sigma$ peaks of the primordial perturbations for the PBH formation~\cite{Green:2004wb,Suyama:2019npc,Germani:2019zez,Yoo:2020dkz}. It remains to be addressed whether the reconstruction can be achieved in this case. Finally, it is interesting to notice that the merger rate of BBHs with a same mass is needed in the reconstruction procedure, and one with different mass can be used for the consistency check. Therefore, this reconstruction of the power spectrum could be also a test of the PBH scenarios. In fact, we can derive a consistency relation by using \eqref{merger-rate} as follows: \begin{align}\label{Rm1m2} \mathcal{R}(m_1, m_2, t)&=\left(\frac{m_1+m_2}{2\sqrt{m_1m_2}}\right)^{\frac{36}{37}}S[f|f_{\rm PBH},m_t]\sqrt{\frac{\mathcal{R}(m_1, m_1, t)\mathcal{R}(m_2, m_2, t)}{S[f|f_{\rm PBH},2m_1]S[f|f_{\rm PBH},2m_2]}}\,. \end{align} When the mass dependence of the suppression factor can be neglected, \eqref{Rm1m2} reduces to the consistency relation derived in Ref.~\cite{Kocsis:2017yty}. If the obtained mass function $f(m)$ determined only through $\mathcal{R}(m, m, t)$ cannot reproduce the merger rate for different masses adequately, that is, it does not satisfy the above consistency relation \eqref{Rm1m2}, it suggests us to include additional effects which are not included in \cite{Raidal:2018bbj}. Finally, even if we could include all of the relevant effects and the reconstruction program would not work, it might rule out the PBH scenarios. Thus, this reconstruction program is useful even to prove or to disprove the assumption (0). \section*{Acknowledgements} T. S. is supported by the MEXT Grant-in-Aid for Scientific Research on Innovative Areas No. 17H06359, and No. 19K03864. M. Y. is supported in part by JSPS Grant-in-Aid for Scientific Research Numbers 18K18764, and JSPS Bilateral Open Partnership Joint Research Projects. Y. Z. is supported by the Fundamental Research Funds for the Central Universities; the National Natural Science Foundation of China under Grants No. 12035011, No. 11975167, No. 11761161001, No. 11535004, and No. 11961141003; the National Key Research and Development Program of China under Grant No. 2018YFA0404403. This work was supported by Mitsubishi Foundation.
\section{Introduction} New use-cases have emerged in vertical industries with the launch of 5G technology. Applications such as logistics, assembly lines and automotive manufacturing have growing demands for cloud control AGVs. Traditional AGVs are programmed to execute a designated task autonomously. As the controllers are located on the AGV, path-planning and task-customization is painstaking. Therefore to facilitate more flexibility and agility, a cloud based controller is proposed for new generation of AGVs. The cloud control AGV enables on-demand task updating and path planning while simultaneously collaborating and coordinating with the other connected devices in a factory. The energy consumption of an AGV can also be reduced by selectively offloading the controller function in cloud \cite{tayade2017device,tayadeICC}. Extensive research on the coordinated AGV controller is performed in recent years \cite{aguirre2011remote,Kanjanawanishkul,multiplerobots,olmi2008coordination}. The communication technologies are enhanced to enable cloud based industrial use-cases in \cite{ pub11081, 8539695,9162929}. The paper \cite{Kanayama1990}, presents a continuous-time stable AGV control system with limited velocity and acceleration, however, in practice the AGV controller operates in discrete time. Therefore, to study the error performance of a cloud based AGV system, we discretize the continuous-time control system presented in \cite{Kanayama1990}. A key characteristic of a controller is to assure stability of a system. The stability of a system is evaluated from the system response. A system is considered stable if the response of system is either bounded or decreases to zero over time. The AGV control system is time-varying and non-linear, hence, the generic approach to evaluate the stability criterion of a LTI system is inapplicable \cite{nof2009springer,inbook}. Moreover, in a cloud control AGV system, the communication between a controller and an actuator occurs over an imperfect wireless channel. The wireless link may introduce a delay or loss of the information packets causing instability of the control system. The research in \cite{1310480NoisyChannel,1333206stochasticcontrol, AGVSCC, CodingRateShreya} investigates the impact of wireless network uncertainties on the control system. The authors in \cite{1310480NoisyChannel, 1333206stochasticcontrol} considered a basic LTI system, whereas many practical control systems are non-linear time-varying in nature. \cite{AGVSCC, CodingRateShreya} presents the impact of downlink channel outages on the stability of a non-linear time-varying system, it does not consider uplink channel outages. In this paper we evaluate the stability criterion of a non-linear, discrete, time-varying AGV system in presence of uplink channel outages. Furthermore, the authors in \cite{Kanayama1990} determine the control rule and optimal feedback parameters to maintain AGV's stability. In this paper, we analyse the impact of feedback control parameters on the error convergence of a cloud based AGV system. The error convergence of an AGV is analysed for two different scenarios; with no limitation on the AGV velocity and with maximum permissible AGV velocity. The objective of this paper is to evaluate the stability of a discrete non-linear, time-varying, in-homogeneous AGV control system taking into account uplink channel outages. An approach presented in \cite{nof2009springer} is followed to evaluate the stability of a non-linear time varying control system. In Section~\ref{sec:Ap0:1}, we describe the discretization process of a continuous-time AGV control system. The control rule and stability in presence of uplink channel outages is evaluated in Section~\ref{sec:Ap0:10} and Section~\ref{sec:Ap0:10} respectively. The results on error convergence rate with respect to feedback parameters are presented in Section~\ref{sec:Ap0:15}. The conclusions are discussed in Section~\ref{sec:conclusion}. \begin{figure*}[h!] \centering \includegraphics[width =0.9\textwidth]{figures/cloud_control_system_agv2.png} \caption{Discrete system of Cloud Controlled AGV} \label{fig:ch3:1} \end{figure*} \section{AGV control system} \label{sec:Ap0:1} An AGV follows an intended reference path $X_r =[x_r, y_r, \theta_r]$ where $(x_r,y_r)$ is the x-y coordinate and $\theta$ is the angle of orientation. The Fig.~\ref{fig:ch3:1}, shows the basic function blocks of the control system. The error detector evaluates the difference between the actual AGV position and the intended path. The controller generates translational $\nu$ and rotational velocity $\omega$ according to the evaluated position error. These velocities are the control inputs applied to an AGV actuator. The AGV attains a new position $X_c$ = [$x_c$, $y_c$, $\theta_c$] following the application of control inputs. The updated AGV position is feedback to the error detector. The error is sent to the controller and new control inputs are determined. The process continues until the reference path is completed by the AGV. The feedback mechanism direct the error to approach zero, as time goes to infinity. The paper \cite{Kanayama1990} present a continuous-time AGV control system. However, for a cloud controlled AGV, the control inputs and the AGV's position updates are received at discrete time instants over a wireless channel. In this section, a detailed functional description and the mathematical model for each block of a discrete AGV control ~\ref{fig:ch3:1} is presented. \paragraph{Error detector} The error detector evaluates the error $\epsilon(k)$ between the actual position $X_c$ of an AGV, to the reference position $X_r$ at $k^{th}$ time sample as \begin{align} \epsilon(k) &= \left(\begin{array}{c}x_e(k)\\y_e(k)\\\theta_e(k)\end{array}\right) \\ &= \left(\begin{array}{ccc}\cos\theta_c(k) & \sin\theta_c(k) & 0\\-\sin\theta_c(k) & \cos\theta_c(k) & 0\\0 & 0 & 1\end{array}\right) \left(X_r(k) - X_c(k)\right) \\ &= \mathbf{T_e}(k) \left(X_r(k) - X_c(k)\right), \label{eq:ch3.ieee.10} \end{align} where $\mathbf{T_e(k)}$ is the rotational matrix, $x_e$, $y_e$ is the error determined as a result of difference in x, y coordinate, and $\theta_e$ is the error in the orientation of an AGV. \paragraph{Controller} The controller calculates the control input $u(k)$ = [$\nu(k); \omega(k)$] according to the error $\epsilon(k)$ determined in \eqref{eq:ch3.ieee.10} as \begin{align} u(k) &= \left[\begin{array}{c}\nu(k)\\ \omega(k)\end{array}\right] \nonumber \\ &= \left[\begin{array}{c} \nu_r(k) \cos\theta_e(k) + K_x x_e(k)\\ \omega_r(k) + \nu_r(k) \left[ K_y y_e(k) + K_\theta \sin\theta_e(k) \right] \end{array}\right], \label{eq:ch3.ieee.15} \end{align} where $K_x\,[\unit{s^{-1}}]$, $K_y\,[\unit{m^{-1}}]$ and $K_\theta\,[\unit{m^{-1}}]$ are constants which impact the convergence rate of the control system. The stabilized control rule without uplink channel outages is derived in \cite{Kanayama1990}, in the section~\ref{sec:Ap0:6}, we evaluate a stable control rule with uplink channel outages. \paragraph{State evolution of an AGV} Following the application of the control inputs $\nu$ and $\omega$, an AGV attains a new position state. The position state evolution of an AGV is described in differential form as \begin{align} \dot{X_c}(t) &=\left(\begin{array}{c}\dot x_c(t)\\ \dot y_c(t)\\ \dot \theta_c(t)\end{array}\right) = \underbrace{\left(\begin{array}{cc} \cos\theta_c(t)& 0\\ \sin\theta_c(t) & 0 \\ 0 & 1\end{array}\right)}_{\mathbf{J}(t)} u(t) \\ \dot{X_c}(t) &= \mathbf{J}(t) u(t), \label{eq:AGV:320} \end{align} where $\dot{x}_c$ = $\nu_x$ = $\cos\theta_c(t) \cdot \nu(t)$ is the velocity component in x-direction. The actual position of an AGV is obtained by solving ~\eqref{eq:AGV:320}. As shown in the Fig.~\ref{fig:ch3:1}, controller at the cloud generates control input $u(k)$ at time $t_k = k \cdot T_s$ where $k = \left\lbrace 0, 1 \dots \right\rbrace$, represent the sample point and $T_s$ as the sampling time. These control inputs $u(k)$ are sent to the actuator of an AGV over a wireless channel. The discrete control inputs cannot be directly applied to the actuator of an AGV, as the AGV state evolution is a physical process and continuous in time ~\eqref{eq:AGV:320}. The state of an AGV will continuously evolve for the given control input. Therefore, the control inputs are converted into the continuous time by D/A converter. The D/A converter holds the control input $u(k)$ for the sampling time period $T_s$, before it is applied to an actuator. The position state $X_c$ of an AGV's actuator evolves continuously for the given control inputs $u(k)$, although the control inputs $u(k)$ are constant over a sampling time period $T_s$. Furthermore, the current position updates of an AGV are feedback to the controller. These discrete updates are obtained by sampling the position state at $ k^\text{th}$ time instant by A/D converter. \section{Discretization} \label{sec:Ap0:5} As the exchange of information between the AGV actuator and cloud controller is in discrete time, it is necessary to evaluate the behavior of the state variables $X_c(t)$ at these discontinuities. The actual position state $X_c$ of an AGV at time $t$, is obtained by solving the differential equation in ~\eqref{eq:AGV:320}. The control inputs are constant sampling time period $T_s$ = $t_\text{k+1}$-$t_\text{k}$, the state at any time $t$, such as $t_k < t < t_{k+1}$ can be evaluated by integrating the above equation over the time interval $\left[t_{k} \: t \right]$. \begin{equation} \int\limits^{t}_{t_{k}} \dot{X}_c(t) dt = \int\limits^{t}_{t_{k}} J(t) u(t) dt \end{equation} $u(t)$ is constant over the given sampling time period, hence, $u(t)$ = $u(t_k)$, is independent of dt. \begin{equation} X_c(t) = X_c(t_k) + \int\limits^{t}_{t_{k}} J(t) dt \cdot u(t_k) \end{equation} where $J(t)$ is a in-homogeneous non-linear system matrix, hence, the integration cannot be solved in a closed form. Therefore, to evaluate the approximate solution to the differential equation, we use piece-wise integration approach. Assuming that the sampling interval $T_s = t_{k+1} - t_k$, is small, $J(t)$ will be linear over this time interval. The equation transforms to \begin{eqnarray} X_c(t) = X_c(t_k) + \int\limits^{t}_{t_{k}} J(t) dt \cdot u(t_k) \\ X_c(t) = X_c(t_k) + (t-t_k) \cdot J(t_k) \cdot u(t_k) \end{eqnarray} The position state variable $X_c(t)$ for a sufficiently low sampling period, at time $t = t_{k+1}$ is determined as \begin{eqnarray} X_c(t_{k+1}) = X_c(t_k) + T_s \cdot J(t_k) \cdot u(t_k) \end{eqnarray} The time $t_k$ can be represented in terms of samples as \begin{equation} X_c(k+1) = X_c(k) + T_s \cdot J(k) \cdot u(k) \end{equation} \begin{align} \underbrace{\left[\begin{array}{c} x_c(k+1)\\ y_c(k+1)\\ \theta_c(k+1)\end{array}\right]}_{X_c(k+1)} &= \underbrace{\left[\begin{array}{c} x_c(k)\\ y_c(k)\\ \theta_c(k)\end{array}\right]}_{X_c(k)} + T_s \cdot \mathbf{J}(k) \underbrace{\left[ \begin{array}{c} \nu(k) \\ \omega(k)\end{array} \right]}_{u(k)} \end{align} where $u(k)$ is the control input at $k-\text{th}$ sample, and $\mathbf{J}(k)$ is \begin{align}\label{eq:ch3.ieee.19} \mathbf{J}(k) = \left(\begin{array}{cc} \cos\theta_c(k)& 0\\ \sin\theta_c(k) & 0 \\ 0 & 1\end{array}\right). \end{align} Here, $\theta_c(k)$ is the orientation of an AGV with respect to the x-axis at the $k^\text{th}$ sample. Therefore, the equation becomes \begin{equation} X_c(k+1) = X_c(k) + T_s \cdot \mathbf{J}(k) \cdot u(k). \label{eq:ch3.ieee.20} \end{equation} The solution in ~\eqref{eq:ch3.ieee.20} is the discrete approximate to evaluate the position state of an AGV at next time instant. The method followed is the Euler's method to solve nonlinear differential equations. The evaluated position state of an AGV is sent to the error detector to evaluate the error. \section{Impact of uplink channel outages} \label{sec:Ap0:6} \paragraph{Control rule} The control rule in ~\eqref{eq:ch3.ieee.15} does not consider the impact of wireless channel outages. In this section a control rule and stability criterion are determined with uplink channel outages. For the sake of brevity, downlink channel is assumed perfect. The position update $X_c(k)$ is transmitted over uplink channel at every $T_s$ seconds. In presence of an uplink channel outages, the position update $X_c(k)$ is not successfully received by an error detector at the cloud. The error is therefore calculated with the outdated AGV position $X_c(k-n_{ul})$, where $n_{ul}$ is the number of consecutive channel outages. The error with the outdated position update $X_c(k-n_{ul})$ is \begin{align}\label{eq:AGV:1000} \epsilon_{ul} &= \mathbf{T_e}(k-n_{ul}) \left(X_r(k) - X_c(k-n_{ul}) \right) \\ \left[\begin{array}{c}x_{e,ul}(k)\\y_{e,ul}(k)\\\theta_{e,ul}(k)\end{array}\right] &= \left(\begin{array}{ccc}\cos\theta_c(k-n_{ul}) & \sin\theta_c(k-n_{ul}) & 0\\-\sin\theta_c(k-n_{ul}) & \cos\theta_c(k-n_{ul}) & 0\\0 & 0 & 1\end{array}\right) \times \nonumber \\ & \left[X_r(k) - X_c(k-n_{ul})\right] \end{align} where $\mathbf{T_e(k)}$ is the rotational matrix and $\epsilon_{ul}$ is the error with uplink channel outages. The new control rule $u_{ul}$ is generated by substituting the error from ~\eqref{eq:AGV:1000} in ~\eqref{eq:ch3.ieee.15} as \begin{align} u_{ul}(k) &= \left[\begin{array}{c}\nu_{ul}(k)\\ \omega_{ul}(k)\end{array}\right] \nonumber \\ &= \left[\begin{array}{c} \nu_r(k) \cos\theta_{e,ul}(k) + K_x x_{e,ul}(k)\\ \omega_r(k) + \nu_r(k) \left[ K_y y_{e,ul}(k) + K_\theta \sin\theta_{e,ul}(k) \right] \end{array}\right] \end{align} These control inputs $u_{ul}(k)$ are applied to an AGV actuator therefore new position state at time $t_{k+1}$ is \begin{equation} \label{eq:Ap0:100} X_c(k+1) = X_c(k) + T_s \cdot \mathbf{J}(k) u_{ul}(k) \end{equation} \begin{figure*}[t!] \begin{align}\label{eq:AGV:365} \dot{\epsilon}(t) = \left(\begin{array}{c} (\omega_r(t) + \nu_r(t) \left[ K_y y_e(t) + K_\theta \sin\theta_e(t) \right])y_e(t) - \nu(t) + \nu_r(t)\cos\theta_e(t)\\ -(\omega_r(t) + \nu_r(t) \left[ K_y y_e(t) + K_\theta \sin\theta_e(t) \right]) x_e(t) + \nu_r(t)\sin\theta_e(t)\\ \omega_r(t) - \omega_r(t) + \nu_r(t) \left[ K_y y_e(t) + K_\theta \sin\theta_e(t) \right] \end{array}\right) \end{align} \end{figure*} \begin{figure*} \begin{equation}\label{eq:ch3.ieee.55} \resizebox{.9\hsize}{!}{$\mathbf{A}(k) = \left(\begin{array}{ccc} 1- T_s \cdot K_x \cdot \cos \left[\theta_c(k) \right] \cdot \cos\left[\theta_c(k-n_{ul})\right] & - T_s\cdot K_x \cdot \cos\left[\theta_c(k)\right] \cdot \sin\left[\theta_c(k-n_{ul}) \right] & - T_s \sin\left[\theta_c(k) \right] \nu_r(k-n_{ul}) \\ -T_s \cdot K_x \cdot \sin\left[\theta_c(k)\right] \cdot \cos\left[\theta_c(k-n_{ul}) \right] & 1-T_s\cdot K_x \cdot \sin \left[\theta_c(k)\right] \cdot \sin\left[\theta_c(k-n_{ul})\right] & T_s \cdot \cos \left[ \theta_c(k)\right] \nu_r (k-n_{ul}) \\ T_s \cdot k_y \sin\left[\theta_c(k-n_{ul})\right] \nu_r(k-n_{ul}) & - T_s \cdot k_y \cos\left[\theta_c(k-n_{ul})\right] \nu(k-n_{ul}) & 1-T_s\cdot k_\theta \nu_r(k-n_{ul})\end{array}\right)$} \end{equation} \end{figure*} \paragraph{Error dynamics and Stability} \label{sec:Ap0:10} The control rule in ~\eqref{eq:ch3.ieee.15} is derived such that it can maintain system stability in presence of an error. A system is stable around $\epsilon=0$, if the error $\epsilon$ $\to$ 0 or is bounded. Therefore, we analyse the error convergence by evaluating the error dynamics of an AGV control. The error dynamics of the continuous time system is evaluated by taking the time derivative of error as \begin{eqnarray}\label{eq:AGV:400} \dot{\epsilon}(t) = \left(\begin{array}{c} \omega(t)y_e(t) - \nu(t) + \nu_r(t)\cos\theta_e(t)\\ -\omega(t)x_e(t) + \nu_r(t)\sin\theta_e(t)\\ \omega_r(t) - \omega(t) \end{array}\right), \end{eqnarray} \cite{Kanayama1990}. Substituting the control inputs $\omega$ and $\nu$ from \eqref{eq:ch3.ieee.15}, \eqref{eq:AGV:365} is derived. The non-linear error dynamics in \eqref{eq:AGV:365} are linearized to the form of ~\eqref{eq:AGV:440}, by taking the Jacobian of differential equation at $\epsilon$ = 0, \begin{align} \label{eq:AGV:440} \dot{\epsilon}(t) = A(t) \epsilon(t) \end{align} The system is stable if all the real roots of characteristics equation for $A$ are negative as per the Routh-Hurwitz Criterion. The stability is already proved in \cite{Kanayama1990}. \paragraph{Stability with uplink outages} The error dynamics of a discrete time control system should be known to evaluate the stability criterion with uplink channel outages. The position state evolution with uplink channel outages is derived in ~\eqref{eq:Ap0:100}. An equilibrium is reach if the error $\epsilon_{ul}(k) = 0$, i.e\, $X_r(k+1)$ - $X_c(k+1)$ = 0. We linearize the state space system of ~\eqref{eq:Ap0:100} in the form $X_c(k+1) = \mathbf{A}(k) X_c(k) + \mathbf{B}(k) u_{ul}(k)$ by taking Jacobian of \eqref{eq:Ap0:100} and then substituting $X_r = X_c$. The control matrix $\mathbf{A}$ is evaluated in ~\eqref{eq:ch3.ieee.55}, by taking partial derivatives of \eqref{eq:Ap0:100} with respect to $x_c$, $y_c$ and $\theta_c$ respectively \cite{AGVSCC}. If $\{\lambda_1(k), \dots, \lambda_M(k)\}$ = Eig($\mathbf{A(k)}$) are the Eigenvalues of $\mathbf{A}$, a (LTI) system is stable if \begin{equation}\label{eq:ch3.ieee.56} \forall i,k: 0 < |\lambda_i(k)| < 1 \end{equation} \cite{Astrom:1990:CST:78995, nof2009springer}. To check the stability of a time varying system, the test for stability needs to be repeated for each time step $k$ as evaluated for downlink channel outages in \cite{AGVSCC, CodingRateShreya}. \begin{figure*}[h!] \begin{subfigure}{0.5\textwidth} \centering \includegraphics[width=0.7\linewidth]{Results/referencetrack.png} \caption{AGV reference track $X_r$} \label{fig:Ap0.Result.1} \end{subfigure} \hfill \begin{subfigure}{0.5\textwidth} \includegraphics[width=0.7\textwidth]{Results/referencevelocity1.png} \caption{Reference translational velocity $\nu_r$} \label{fig:Ap0.Result.2} \end{subfigure} \caption{Reference track and velocity} \end{figure*} \section{Simulation setup and Results}\label{sec:Ap0:15} \subsection{Simulation setup} An AGV traces a reference track $X_r$ shown in Fig.~\ref{fig:Ap0.Result.1}, in $T$ = \unit[100]{s}. The number of steps required to trace the complete track is $N_{timesteps}$ = $T/T_s$, where $T_s = \unit[5]{ms}$. The reference track and the reference velocity $\nu_r$ for each time step is shown in Fig.~\ref{fig:Ap0.Result.2}. In presence of non-zero error, the control inputs are generated according to ~\eqref{eq:ch3.ieee.15} and are applied to the AGV actuators so that the error $\epsilon(k)$ $\to$ 0, as $k \to N_{timesteps}$. The optimal selection of feedback parameters $K_x$,$K_y$ and $K_\theta$ is required to immediately reduce the error. The discrete AGV controller is implemented in Matlab. \begin{figure*}[t!] \begin{subfigure}{0.3\textwidth} \centering \includegraphics[width=1\textwidth]{Results/reftrack_kx.png} \caption{AGV's followed tracks: unlimited $\nu$} \label{fig:Ap0.Result.3} \end{subfigure} \begin{subfigure}{0.3\textwidth} \centering \includegraphics[width=1\textwidth]{Results/errory_kx.png} \caption{Error in y-direction $y_e$: unlimited $\nu$} \label{fig:Ap0.Result.4} \end{subfigure} \begin{subfigure}{0.3\textwidth} \includegraphics[width=1\textwidth]{Results/refvel_kx.png} \caption{Translational velocity: unlimited $\nu$} \label{fig:Ap0.Result.5} \end{subfigure} \begin{subfigure}{0.3\textwidth} \includegraphics[width=1\textwidth]{Results/Lreftrack_kx.png} \caption{AGV's followed tracks: limited $\nu$} \label{fig:Ap0.Result.6} \end{subfigure} \begin{subfigure}{0.3\textwidth} \includegraphics[width=1\textwidth]{Results/Lreferror_kx.png} \caption{Error in y-direction $y_e$: limited $\nu$} \label{fig:Ap0.Result.7} \end{subfigure} \begin{subfigure}{0.3\textwidth} \includegraphics[width=1\textwidth]{Results/Lrefvel_kx.png} \caption{Translational velocities: limited $\nu$} \label{fig:Ap0.Result.8} \end{subfigure} \caption{AGV tracks and error convergence} \end{figure*} \begin{table}[h!] \caption{Variable description} \label{tb:notation} \centering \begin{tabular}{|c||c|} \hline Variable & Description \\ \hline \hline $X_r$ & Reference position vector of an AGV \\ \hline $X_c$ & Actual position vector of an AGV \\ \hline $\nu$ & Translational velocity \\ \hline $\omega$ & Rotational velocity \\ \hline $\nu_r$ & Reference translational velocity \\ \hline $\omega_r$ & Reference rotational velocity \\ \hline $u$ & Control information vector \\ \hline $T_s$ & Sampling time \\ \hline $T$ & time to trace complete reference track \\\hline $N_{timesteps}$ & Total number of timesteps \\ \hline $k$ & Time step\\ \hline $\epsilon$ & Position error\\ \hline $x_e$ & Position error in x-direction\\ \hline $y_e$ & Position error in y-direction\\ \hline $\theta_e$ & Orientation error\\ \hline $n_{ul}$ & Consecutive uplink channel outages\\ \hline $\epsilon_{ul}$ & Error with uplink channel outages \\ \hline $u_{ul}$ & Control inputs with uplink channel outages \\ \hline \end{tabular} \end{table} \subsection{Impact of feedback control parameters on error convergence} To study the impact of feedback control parameters on the error convergence, an error in y-direction, $y_e$ = \unit[5]{m} is introduced. The controller generates $\nu$ and $\omega$ according to ~\eqref{eq:ch3.ieee.15}. The parameter $1/K_x$ is the time constant that directs the rate at which error decreases to 0. In the discrete control, the parameter $K_x$ determines the number of steps required to direct an AGV back on the reference track. \paragraph{No limitation on the translational velocity $\nu$ } The Fig.~\ref{fig:Ap0.Result.3}, shows the starting position of an AGV is $\unit[5]{m}$ away from the reference position in y-direction at time step $k=1$. The Fig.~\ref{fig:Ap0.Result.3}, shows the tracks followed by AGV when $K_x$ is increased from $\unit[5]{/ sec}$ to $\unit[250]{/sec}$. At lower $K_x$ more number of steps are required for an AGV to return to the reference track. As $K_x$ is increased to $\unit[25]{/ sec}$, the convergence rate increases. On further increasing the $K_x = \unit[250]{/sec}$, an AGV oscillate before returning to the reference track. The optimal response of an AGV is with no oscillation and higher rate of error convergence. The rate of convergence of y-directional error for varying $K_x$ is shown in Fig.\ref{fig:Ap0.Result.4}. Furthermore, Fig.~\ref{fig:Ap0.Result.5} shows the required velocity at every time step to reduce the error at the rate specified by $K_x$. The required $\nu = \unit[-25]{m/s}$, from time-step $k= 1$ to $k = 20$, with $K_x = \unit[5]{/sec}$ is very high for an AGV operating on shop floor. Application of such high velocities is not practically feasible, although the error converges in less number of timesteps. Therefore, we evaluate the behaviour of error convergence with limited $\nu$. \paragraph{Limitation on the translational velocity $\nu \leq \unit[6]{m/s}$ } The Fig.~\ref{fig:Ap0.Result.6}, Fig.~\ref{fig:Ap0.Result.7} and Fig.~\ref{fig:Ap0.Result.8}, shows the AGV tracks, error convergence and the translational velocity required to navigate an AGV back on the reference track by driving the AGV with maximum permissible velocity of $\unit[6]{m/s}$. Due to limitation on the AGV velocity, feedback parameter $K_x$ does not have a substantial impact on the error convergence. The error convergence with $K_x = \unit[25]{/sec}$ and $K_x = \unit[250]{/sec}$, shows similar behaviour of error over time. The response of translational velocity of an AGV is shown in Fig.~\ref{fig:Ap0.Result.8}. At lower $K_x$ the generated control inputs, i.e.\, the $\nu$, gradually approaches the reference velocity. It illustrates a case of over-damped response,where the AGV returns to the reference track gradually and requires more number of time-steps. On contrary, at higher $K_x = \unit[250]{/sec}$, $\nu$ shows under-damped response, it converges by oscillating around the reference velocity, which is not the optimal case. If the oscillations are higher, it takes more time to converge. An optimal case is of critical damping i.e.\, $\nu$ converges with less number of timesteps and without oscillation. The optimal convergence is realized at $K_x = \unit[25]{/sec}$. \section{Conclusions}\label{sec:conclusion} We consider a practical use-case of an edge cloud AGV control system. A discretization process of a stable continuous time AGV control system is presented. We evaluate the control rule, error dynamics and stability criterion of a discrete cloud control AGV in presence of uplink channel outages. The derived stability criterion shows that the stability of an AGV control is dependent upon the number of consecutive uplink outages and the Eigen values of control matrix $A$ \eqref{eq:ch3.ieee.55}. Furthermore, we evaluate optimal feedback control parameters that increases the rate of error convergence. The paper consider two scenarios to study the impact of feedback parameters on error convergence; with no limitation on AGV velocity and with limited AGV velocity to \unit[6]{m/s}. The result reveals that the optimal feedback parameter is chosen with critical damping, i.e.\, it shows no oscillation an higher rate of convergence. For cloud control AGV the critical damping is achieved at $K_x = \unit[25]{/sec}$. Moreover, the results reveal that the impact of feedback control parameters is higher in case of no-limitation on the AGV velocity. If the AGV velocity is limited, the rate of error convergence does not vary significantly with varying $K_x$. This effect is seen due to limitation on the control inputs i.e.\, AGV velocity applied to an AGV and the optimal feedback parameters is chosen from the response of the control inputs. The feedback parameter corresponding to fastest convergence of control inputs to the reference velocity with no oscillation is the optimal parameter. The paper investigate the impact of feedback parameter corresponding to an error in y-direction. In future, the research can be extended to evaluate the optimal feedback parameters for x-direction and the orientation of an AGV. The impact of uplink outages on the error convergence can also be investigated. \bibliographystyle{IEEEtran}
\section{\textbf{Introduction}} \label{intro} Recently, the set of simulation functions defined in \cit {Khojasteh} has been used for the solutions of many recent problems such as fixed-circle problem (resp. fixed-disc problem) and Rhoades' open problem on discontinuity (see \cite{Mlaiki 2019, Ozgur-simulation, Pant 2020}). On the other hand, simulation functions have been studied by various aspects in metric fixed-point theory (see for example \cite{Chanda 2019, Karapinar 2017, Khojasteh, Kostic 2019, Olgun 2016, Roldan, Roldan 2015}). For example, in \cite{Olgun 2016}, Olgun et al. gave a new class of Picard operators on complete metric spaces via simulation functions. Simulation functions have been used to study the best proximity points in metric spaces. For example, Kosti\'{c} et al. presented several best proximity point results involving simulation functions (for more details see \cit {Karapinar 2017, Kostic 2019} and the references therein). In \cite{Roldan}, the set of simulation functions has been enlarged by A. F. Rold\'{a}n-L\'{o}pez-de-Hierro et al. Every simulation function in the original Khojasteh et al.'s sense is also a simulation function in A. F. Rol \'{a}n-L\'{o}pez-de-Hierro et al.'s sense but the converse is not true (see \cite{Roldan} for more details). In this paper, we focus on the set of simulation functions in both sense and using their properties, we consider some recent problems in fixed-point theory. Recall that the function $\zeta :[0,\infty )\times \lbrack 0,\infty )\rightarrow \mathbb{R} $ is said to be a simulation function in the Khojasteh et al.'s sense, if the following hold: $(\zeta _{1})$ $\zeta (0,0)=0,$ $(\zeta _{2})$ $\zeta (t,s)<s-t$ for all $s,t>0$, $(\zeta _{3})$ If $\{t_{n}\}$, $\{s_{n}\}$ are sequences in $(0,\infty )$ such tha \begin{equation*} \underset{n\rightarrow \infty }{\lim }t_{n}=\underset{n\rightarrow \infty } \lim }s_{n}>0\text{,} \end{equation* the \begin{equation*} \underset{n\rightarrow \infty }{\lim \sup }\zeta (t_{n},s_{n})<0\text{.} \end{equation*} The set of all the simulation functions is denoted by $\mathcal{Z}$ (see \cite{Chanda 2019} and \cite{Khojasteh} for more details). In \cite{Roldan}, Rold\'{a}n-L\'{o}pez-de-Hierro et al. modified this definition of simulation functions and so enlarged the family of all simulation functions. To do this, only the condition $(\zeta _{3})$ was replaced by the following condition $(\zeta _{3})^{\ast }$ as follows: $(\zeta _{3})^{\ast }$ If $\{t_{n}\}$, $\{s_{n}\}$ are sequences in (0,\infty )$ such tha \begin{equation*} \underset{n\rightarrow \infty }{\lim }t_{n}=\underset{n\rightarrow \infty } \lim }s_{n}>0\text{ } \end{equation* and \begin{equation*} t_{n}<s_{n}\text{ for all }n\in \mathbb{N} \text{,} \end{equation* the \begin{equation*} \underset{n\rightarrow \infty }{\lim \sup }\zeta (t_{n},s_{n})<0\text{.} \end{equation*} Every simulation function in the Khojasteh et al.'s sense is also a simulation function in the Rold\'{a}n-L\'{o}pez-de-Hierro et al.'s sense, the converse is not true (for example see Example 3.3 in \cite{Roldan}). In applications of the simulation functions to the study of discontinuity problem and the geometric study of the non unique fixed points of self-mappings, the condition $(\zeta _{3})$ is not used. So, both definitions of the simulation functions and examples can be used to study such kind applications. Some examples of simulation functions $\zeta :[0,\infty )\times \lbrack 0,\infty )\rightarrow \mathbb{R} $ are $1)$ $\zeta (t,s)=\lambda s-t$, where $\lambda \in \lbrack 0,1)$, $2)$ $\zeta (t,s)=s-\varphi (s)-t$, where $\varphi :[0,\infty )\rightarrow \lbrack 0,\infty )$ is a continuous function such that $\varphi (t)=0$ if and only if $t=0$, $3)$ $\zeta (t,s)=s\phi (s)-t$, where $\phi :[0,\infty )\rightarrow \lbrack 0,1)$ is a mapping such that $\underset{t\rightarrow r^{+}}{\lim \sup \phi (t)}<1$ for all $r>0$, $4)$ $\zeta (t,s)=\eta (s)-t$, where $\varphi :[0,\infty )\rightarrow \lbrack 0,\infty )$ be an upper semi-continuous mapping such that $\eta (t)<t $ for all $t>0$ and $\eta (0)=0$, $5)$ $\zeta (t,s)=s-\int\limits_{0}^{t}\psi (t)dt$, where $\psi :[0,\infty )\rightarrow \lbrack 0,1)$ is a function such that $\int\limits_{0}^{t}\psi (t)dt$ exists and $\int\limits_{0}^{\varepsilon}\psi (u)du>\varepsilon $ for each $\varepsilon >0$. The main motivation of this paper is the study of the geometric properties of the fixed point set of a self-mapping in the non unique fixed point case. There are some examples of self-mappings where the fixed point set of the self-mapping contains a geometric figure such as a circle, a disc or an ellipse. For example, let us consider the metric space $\left( \mathbb{C} ,d\right) $ with the metric defined for the complex numbers z_{1}=x_{1}+iy_{1}$ and $z_{2}=x_{2}+iy_{2}$ as follows: \begin{equation*} d\left( z_{1},z_{2}\right) =\sqrt{\frac{\left( x_{1}-x_{2}\right) ^{2}}{9 +4\left( y_{1}-y_{2}\right) ^{2}}\text{,} \end{equation* where $d$ is the metric induced by the norm function $\left\Vert z\right\Vert =\left\Vert x+iy\right\Vert =$ $\sqrt{\frac{x^{2}}{9}+4y^{2}}$. Consider the circle $C_{0,1}$ and define the self-mapping $g$ on $\mathbb{C}$ by \begin{equation*} gz=\left\{ \begin{array}{ccc} z & ; & x\geq 0,y\geq 0\text{ or }x\leq 0,y\leq 0 \\ \frac{36z}{-35(z^{2}+\overline{z}^{2})+74z\overline{z}} & ; & x<0,y>0\text{ or }x>0,y< \end{array \right. \text{,} \end{equation* for each $z=x+iy\in \mathbb{C}$, where $\overline{z}=x-iy$ is the complex conjugate of $z$. Then, it is easy to verify that the fixed point set of $g$ contains the circle $C_{0,1}$, that is, $C_{0,1}$ is a fixed circle of $g$. We use the notion of \textquotedblleft inversion in an ellipse\textquotedblright\ to construct this self-mapping (see Proposition 1 given in \cite{Ramirez}). There are several papers for the cases a fixed circle and a fixed disc (see \cite{Aydi 2019, Mlaiki 2018, Mlaiki arxiv, Ozgur-malaysian, Ozgur-simulation, Pant Ozgur Tas 2019, Pant Ozgur Tas accepted, Tas-Ozgur-Mlaiki-2, Tas 2020} and the references therein). The fixed ellipse case is also considered in the recent studies \cite{Ercinar} and \cite{Joshi . In \cite{Ercinar}, the cases a fixed Apollonius circle, fixed hyperbola and fixed Cassini curve are considered extensively on metric and some generalized metric spaces. Therefore, the study of geometric properties of the fixed point set of a self-mapping seems to be an interesting problem in case where the fixed point is non unique. In this paper, we study on the geometric properties of the fixed point set of a self-mapping via simulation functions on metric (resp. $S$-metric and $b$-metric) spaces. The relationships among a metric, an $S$-metric and a $b$-metric are well known, so we refer the reader to \cite{Ozgur 2017}, \cite{Sedghi 2012} and \cit {Sedghi 2014} for more details. \section{\textbf{Simulation functions and the geometry of fixed points}} \label{sec:1} In this section, we study on geometric properties of the fixed point set Fix(f)=\left\{ x\in X:fx=x\right\} $ for a self-mapping $f$ of a metric (resp. $S$-metric, $b$-metric) space. The set of simulation functions has been used in \cite{Mlaiki 2019}, \cite{Ozgur-simulation} and \cite{Pant 2020} to obtain new results on the fixed-circle (resp. fixed-disc) problem. In \cite{Pant 2020}, together with some properties of simulation functions, the numbers $M(x,y)$ and $\rho $ defined b \begin{equation} M(x,y)=\max \left\{ \begin{array}{c} ad(x,fx)+(1-a)d(y,fy), \\ (1-a)d(x,fx)+ad(y,fy),\frac{d(x,fy)+d(y,fx)}{2 \end{array \right\} ,\text{ }0\leq a<1\text{,} \label{definition of M} \end{equation \begin{equation} \rho =\inf \left\{ d(x,fx):x\neq fx,x\in X\right\} \text{,} \label{number} \end{equation and an auxiliary function $\varphi \mathbb{R} ^{+}\rightarrow \mathbb{R} ^{+}$ satisfying $\varphi (t)<t$ for each $t>0$, were used to get new fixed-circle (resp. fixed-disc) results. Using these numbers and an auxiliary function, we present new results on the geometric study of the fixed point set of a self-mapping. \subsection{\textbf{Geometric study of fixed points on metric spaces}} Let $(X,d)$ be a metric space and $f:X\rightarrow X$ be a self-mapping. First, we recall that the circle $C_{x_{0},\rho }=\left\{ x\in X:d\left( x,x_{0}\right) =\rho \right\} $ (resp. the disc $D_{x_{0},\rho }=\left\{ x\in X:d\left( x,x_{0}\right) \leq \rho \right\} $) is a fixed circle (resp. a fixed disc) of $f$ if $fx=x$ for all $x\in C_{x_{0},\rho }$ (resp. for all $x\in D_{x_{0},\rho }$) (see \cite{Ozgur-malaysian}, \cite{Ozgur-simulation ). More generally, a geometric figure $\mathcal{F}$ (a circle, an ellipse, a hyperbola, a Cassini curve etc.) contained in the fixed point set $Fix\left( f\right) $ is called a\textit{\ fixed figure} (a fixed circle, a fixed ellipse, a fixed hyperbola, a fixed Cassini curve, etc.) of the self-mapping $f$. Let $E_{r}(x_{1},x_{2})$ be the ellipse defined as \begin{equation*} E_{r}(x_{1},x_{2})=\left\{ x\in X:d\left( x,x_{1}\right) +d\left( x,x_{2}\right) =r\right\} \text{.} \end{equation* Clearly, we have \begin{equation*} r=0\Rightarrow x_{1}=x_{2}\text{ and }E_{r}(x_{1},x_{2})=C_{x_{1},r}=\left\{ x_{1}\right\} . \end{equation*} Now, we use the set of simulation functions and the number $\rho $ to obtain some results for the case where the fixed point set $Fix(f)$ contains an ellipse or an ellipse with its interior. \begin{theorem} \label{thm21} Let $(X,d)$ be a metric space, $f:X\rightarrow X$ be a self-mapping, $\zeta \in \mathcal{Z}$ be a simulation function and the number $\rho $ be defined as in $($\ref{number}$)$. If there exist some points $x_{1},x_{2}\in X$ such that $(a)$ For all $x\in E_{\rho }(x_{1},x_{2})$, there exists $\delta (\rho )>0$ satisfyin \begin{equation*} \frac{\rho }{2}\leq M(x,x_{1})+M(x,x_{2})<\frac{\rho }{2}+\delta (\rho )\Longrightarrow d(fx,x_{1})+d(fx,x_{2})\leq \rho \text{,} \end{equation*} $(b)$ For all $x\in X$ \begin{equation*} d(fx,x)>0\Longrightarrow \zeta \left( d(fx,x),M(x,x_{1})\right) \geq 0\text{ and }\zeta \left( d(fx,x),M(x,x_{2})\right) \geq 0\text{,} \end{equation*} $(c)$ For all $x\in X$ \begin{equation*} d(fx,x)>0\Longrightarrow \zeta \left( d(fx,x),\frac d(x,x_{1})+d(fx,x_{1})+d(x,x_{2})+d(fx,x_{2})}{2}\right) \geq 0\text{,} \end{equation* then $fx_{1}=x_{1}$, $fx_{2}=x_{2}$ and $Fix(f)$ contains the ellipse E_{\rho }(x_{1},x_{2})$. \end{theorem} \begin{proof} We have \begin{equation*} M(x_{1},x_{1})=d(fx_{1},x_{1})\text{ and }M(x_{2},x_{2})=d(fx_{2},x_{2} \text{.} \end{equation* First, we show that $fx_{1}=x_{1}$ and $fx_{2}=x_{2}$. If $fx_{1}\neq x_{1}$ and $fx_{2}\neq x_{2}$ then $d(fx_{1},x_{1})>0$ and $d(fx_{2},x_{2})>0$. Using the condition $(\zeta _{2})$, we find \begin{eqnarray*} \zeta \left( d(fx_{1},x_{1}),M(x_{1},x_{1})\right) &=&\zeta \left( d(fx_{1},x_{1}),d(fx_{1},x_{1})\right) \\ &<&d(fx_{1},x_{1})-d(fx_{1},x_{1})=0 \end{eqnarray* an \begin{eqnarray*} \zeta \left( d(fx_{2},x_{2}),M(x_{2},x_{2})\right) &=&\zeta \left( d(fx_{2},x_{2}),d(fx_{2},x_{2})\right) \\ &<&d(fx_{2},x_{2})-d(fx_{2},x_{2})=0\text{,} \end{eqnarray* which are contradictions with the condition $(b)$. Hence it should be fx_{1}=x_{1}$ and $fx_{2}=x_{2}$. If $\rho =0$, then we have $E_{\rho }(x_{1},x_{2})=C_{x_{1},\rho }=\{x_{1}\}$ \ and $x_{1}=x_{2}$. Hence, the proof is completed. Now we assume $\rho \neq 0$. Let $x\in E_{\rho }(x_{1},x_{2})$ be any point such that $fx\neq x$. Then $d(x,fx)>0$ and we hav \begin{equation*} M(x,x_{1})=\max \left\{ ad(x,fx),(1-a)d(x,fx),\frac{d(x,x_{1})+d(x_{1},fx)}{ }\right\} \end{equation* and \begin{equation*} M(x,x_{2})=\max \left\{ ad(x,fx),(1-a)d(x,fx),\frac{d(x,x_{2})+d(x_{2},fx)}{ }\right\} \text{.} \end{equation* Using the condition $(a)$, we ge \begin{equation} \frac{\rho }{2}\leq M(x,x_{1})+M(x,x_{2})<\frac{\rho }{2}+\delta (\rho )\Longrightarrow d(fx,x_{1})+d(fx,x_{2})\leq \rho \text{.} \label{eqn21} \end{equation Now, using the inequality (\ref{eqn21}) and the conditions $(c)$, $(\zeta _{2})$, we obtai \begin{eqnarray*} 0 &\leq &\zeta \left( d(fx,x),\frac d(x,x_{1})+d(fx,x_{1})+d(fx,x_{2})+d(x,x_{2})}{2}\right) \\ &<&\frac{d(x,x_{1})+d(fx,x_{1})+d(fx,x_{2})+d(x,x_{2})}{2}-d(fx,x) \\ &=&\frac{d(x,x_{1})+d(x,x_{2})}{2}+\frac{d(fx,x_{1})+d(fx,x_{2})}{2}-d(fx,x) \\ &\leq &\frac{\rho }{2}+\frac{\rho }{2}-d(fx,x)=\rho -d(fx,x) \end{eqnarray* and henc \begin{equation*} d(fx,x)<\rho \text{.} \end{equation* This is a contradiction by the definition of the number $\rho $. Because of this contradiction, it should be $fx=x$. Consequently, we have $E_{\rho }(x_{1},x_{2})\subset Fix(f)$. \end{proof} \begin{remark} \label{remark21} If $x_{1}=x_{2}$ then we have $E_{\rho }(x_{1},x_{2})=C_{x_{1},\frac{\rho }{2}}$ and Theorem \ref{thm21} is reduced to a fixed-circle theorem as follows$:$ \end{remark} \begin{theorem} \label{thm22} Let $(X,d)$ be a metric space, $f:X\rightarrow X$ be a self-mapping, $\zeta \in \mathcal{Z}$ be a simulation function and the number $\rho $ be defined as in $($\ref{number}$)$. If there exists some point $x_{0}\in X$ such that $(a)$ For all $x\in C_{x_{0},\rho }$, there exists $\delta (\rho )>0$ satisfyin \begin{equation*} \frac{\rho }{4}\leq M(x,x_{0})<\frac{\rho }{4}+\delta (\rho )\Longrightarrow d(fx,x_{0})\leq \rho \text{,} \end{equation*} $(b)$ For all $x\in X$ \begin{equation*} d(fx,x)>0\Longrightarrow \zeta \left( d(fx,x),M(x,x_{0})\right) \geq 0\text{ } \end{equation* then $fx_{0}=x_{0}$ and the set $Fix(f)$ contains the circle $C_{x_{0},\rho } $. \end{theorem} \begin{proof} The proof follows by Theorem \ref{thm21} and Remark \ref{remark21}. \end{proof} \begin{example} \label{exm21} Let $X=\left\{ -3,-1,1,3,12,18\right\} $ with the metric d(x,y)=\left\vert x-y\right\vert $. Define the self-mapping $f:X\rightarrow X $ by \begin{equation*} fx=\left\{ \begin{array}{ccc} x+6 & , & x=12 \\ x & , & x\in \left\{ -3,-1,1,3,18\right\ \end{array \right. . \end{equation* Then the self-mapping $f$ satisfies the conditions of Theorem \ref{thm21} for the points $x_{1}=-1$ and $x_{2}=1$ and the simulation function $\zeta (t,s)=\frac{1}{2}s-t$. Indeed, we have \begin{equation*} \rho =\min \left\{ d(x,fx):x\in X,x\neq fx\right\} =6 \end{equation* and \begin{equation*} E_{6}(-1,1)=\left\{ -3,3\right\} . \end{equation* For all $x\in E_{6}(-1,1)$, there exists $\delta (\rho )=4>0$ satisfyin \begin{equation*} 3\leq M(x,-1)+M(3,1)<3+4\Longrightarrow d(fx,-1)+d(fx,1)=6\leq \rho \text{,} \end{equation* hence the condition $(a)$ is satisfied. For $x=12$, we have $d(x,fx)\neq 0$, $M(12,-1)=16,$ $M(12,1)=14$ and so, we obtain \begin{eqnarray*} \zeta \left( d(fx,x),M(x,x_{1})\right) &=&\zeta \left( 6,16\right) =\frac{1 }{2}-6 \\ &=&2>0 \end{eqnarray* and \begin{eqnarray*} \zeta \left( d(fx,x),M(x,x_{2})\right) &=&\zeta \left( 6,14\right) =\frac{1 }{2}-6 \\ &=&1>0. \end{eqnarray* This shows that the condition $(b)$ is also satisfied by $f$. Since we have $d(x,fx)>0$ for $x=12$, we fin \begin{eqnarray*} \zeta \left( d(fx,x),\frac{d(x,x_{1})+d(fx,x_{1})+d(fx,x_{2})+d(x,x_{2})}{2 \right) &=&\zeta \left( 6,30\right) \\ &=&\frac{30}{2}-6=9>0\text{,} \end{eqnarray* hence the condition $(c)$ is satisfied. Clearly, we have $Fix(f)=\left\{ -3,-1,1,3,18\right\} $ and the ellipse E_{6}(-1,1)=\left\{ -3,3\right\} $ is contained in the set $Fix(f)$. That is, the ellipse $E_{6}(-1,1)$ is a fixed ellipse of the self-mapping $f$. On the other hand, it is easy to check that the self-mapping $f$ satisfies the conditions of Theorem \ref{thm22} for the point $x_{0}=3$ and the simulation function $\zeta (t,s)=\frac{2}{3}s-t$. Clearly, the set $Fix(f)$ contains the circle $C_{3,6}=\left\{ -3\right\} $. \end{example} \begin{definition} \label{def21} Let $\zeta \in \mathcal{Z}$ be any simulation function. The self-mapping $f$ is said to be a $\mathcal{Z}_{E}$-contraction with respect to $\zeta $ if there exist $x_{1},x_{2}\in X$ such that the following condition holds for all $x\in X: \begin{equation*} d(fx,x)>0\Rightarrow \zeta \left( d(fx,x),d(fx,x_{1})+d(fx,x_{2})\right) \geq 0. \end{equation*} \end{definition} If $f$ is a $\mathcal{Z}_{E}$-contraction with respect to $\zeta $, then we hav \begin{equation} d(fx,x)<d(fx,x_{1})+d(fx,x_{2}), \label{eqn1} \end{equation for all $x\in X$ with $fx\neq x_{1}$ or $fx\neq x_{2}$. Indeed, if $fx=x$ then the inequality (\ref{eqn1}) is satisfied trivially. If $fx\neq x$ then d(fx,x)>0$ and by the definition of a $\mathcal{Z}_{E}$-contraction and the condition $(\zeta _{2})$, we obtai \begin{equation*} 0\leq \zeta \left( d(fx,x),d(fx,x_{1})+d(fx,x_{2})\right) <d(fx,x_{1})+d(fx,x_{2})-d(fx,x) \end{equation* and so Equation (\ref{eqn1}) is satisfied. Now we give the following theorem. \begin{theorem} \label{thm1} Let $f$ be a $\mathcal{Z}_{E}$-contraction with respect to \zeta $ with $x_{1},x_{2}\in X$ and consider the set \begin{equation*} \overline{E}_{\rho }(x_{1},x_{2})=\left\{ x\in X:d\left( x,x_{1}\right) +d\left( x,x_{2}\right) \leq \rho \right\} \text{.} \end{equation*} If the condition $0<d(fx,x_{1})+d(fx,x_{2})\leq \rho $ holds for all $x\in \overline{E}_{\rho }(x_{1},x_{2})-\left\{ x_{1},x_{2}\right\} $ then $Fix(f)$ contains the set $\overline{E}_{\rho }(x_{1},x_{2})$. \end{theorem} \begin{proof} If $\rho =0$, then we have $\overline{E}_{\rho }(x_{1},x_{2})=D_{x_{1},\rho }=\{x_{1}\}$ and this theorem coincides with Theorem 2.2 in \cit {Ozgur-simulation}. In this case, we have $fx_{1}=x_{1}$. Assume that $\rho \neq 0$. If $x_{1}=x_{2}$ then $\overline{E}_{\rho }(x_{1},x_{2})=D_{x_{1} \frac{\rho }{2}}$ and again this case is reduced to Theorem 2.2 in \cit {Ozgur-simulation}. Assume that $x_{1}\neq x_{2}$ and let $x\in \overline{E}_{\rho }(x_{1},x_{2}) $ be such that $fx\neq x$. By the definition of $\rho $, we have $0<\rho \leq d(x,fx)$ and using the condition $(\zeta _{2})$ we find \begin{eqnarray*} \zeta \left( d(fx,x),d(fx,x_{1})+d(fx,x_{2})\right) &<&d(fx,x_{1})+d(fx,x_{2})-d(fx,x) \\ &\leq &\rho -d(fx,x)\leq \rho -\rho =0\text{,} \end{eqnarray* a contradiction with the $\mathcal{Z}_{E}$-contractive property of $f$. This contradiction leads $fx=x$, so the set $Fix(f)$ contains the set $\overline{ }_{\rho }(x_{1},x_{2})$. \end{proof} \begin{example} \label{exm22} Let us consider the self-mapping $f$ defined in Example \re {exm21}. $f$ is an $\mathcal{Z}_{E}$-contraction with respect to $\zeta (t,s)=\frac{1}{2}s-t$ with the points $x_{1}=-1$ and $x_{2}=1$. Indeed, we get \begin{eqnarray*} \zeta \left( d(fx,x),d(fx,x_{1})+d(fx,x_{2})\right) &=&\zeta \left( 6,19+17\right) =\zeta \left( 6,36\right) \\ &=&\frac{36}{2}-6=12\geq 0\text{,} \end{eqnarray* for $x=12$ with $d(fx,x)>0$. Also we have \begin{equation*} 0<d(fx,-1)+d(fx,1)\leq 6\text{,} \end{equation* for all $x\in \overline{E}_{6}(-1,1)-\left\{ -1,1\right\} $. Therefore, $f$ satisfies the conditions of Theorem \ref{thm1}. Notice that the set $Fix(f)$ contains the set $\overline{E}_{6}(-1,1)=\left\{ -3,-1,1,3\right\} $. \end{example} Let $r\in \left[ 0,\infty \right) $. Now we give a fixed-circle theorem using the auxiliary function $\varphi _{r} \mathbb{R} ^{+}\cup \left\{ 0\right\} \rightarrow \mathbb{R} $ defined b \begin{equation} \varphi _{r}\left( u\right) =\left\{ \begin{array}{ccc} u-r & ; & u>0 \\ 0 & ; & u= \end{array \right. \text{,} \label{auxiliary function} \end{equation for all $u\in \mathbb{R} ^{+}\cup \left\{ 0\right\} $ (see \cite{Ozgur-Aip}). \begin{theorem} \label{thm23} Let $(X,d)$ be a metric space, $\zeta \in \mathcal{Z}$ be a simulation function and $C_{x_{0},r}$ be any circle on $X$. If there exists a self-mapping $f:X\rightarrow X$ satisfying $i)$ $d\left( x_{0},fx\right) =r$ for each $x\in C_{x_{0},r}$, $ii)$ $\zeta \left( r,d\left( fx,fy\right) \right) \geq 0$ for each $x,y\in C_{x_{0},r}$ with $x\neq y$, $iii)$ $\zeta \left( d\left( fx,fy\right) ,d\left( x,y\right) -\varphi _{r}\left( d\left( x,fx\right) \right) \right) \geq 0$ for each $x,y\in C_{x_{0},r}$, $iv)$ $f$ is one to one on the circle $C_{x_{0},r}$, \newline then the circle $C_{x_{0},r}$ is a fixed circle of $f$. \end{theorem} \begin{proof} Let $x\in C_{x_{0},r}$ be an arbitrary point. By the condition $(i)$, we have $d\left( x_{0},fx\right) =r$, that is, $fx\in C_{x_{0},r}$. Now we show that $fx=x$ for all $x\in C_{x_{0},r}$. Conversely, assume that $x\neq fx$ for any $x\in C_{x_{0},r}$. Then we have $d\left( x,fx\right) >0$ and using the conditions $(ii)$, $(iv)$ and $(\zeta _{2})$, we ge \begin{equation*} 0\leq \zeta \left( r,d\left( fx,f^{2}x\right) \right) <d\left( fx,f^{2}x\right) -r \end{equation* and s \begin{equation} r<d\left( fx,f^{2}x\right) . \label{eqn22} \end{equation Using the definition of the function $\varphi _{r}$ and the conditions (iii) $, $(iv)$ and $(\zeta _{2})$, we obtai \begin{eqnarray*} 0 &\leq &\zeta \left( d\left( fx,f^{2}x\right) ,d\left( x,fx\right) -\varphi _{r}\left( d\left( x,fx\right) \right) \right) =\zeta \left( d\left( fx,f^{2}x\right) ,d\left( x,fx\right) -\left( d\left( x,fx\right) -r\right) \right) \\ &=&\zeta \left( d\left( fx,f^{2}x\right) ,r\right) <r-d\left( fx,f^{2}x\right) \end{eqnarray* and henc \begin{equation*} d\left( fx,f^{2}x\right) <r\text{,} \end{equation* which is a contradiction with the inequality (\ref{eqn22}). Therefore it should be $fx=x$ for each $x\in C_{x_{0},r}$. Consequently, $C_{x_{0},r}$ is a fixed circle of $f$. \end{proof} \begin{remark} \label{rem21} If we consider the self-mapping $f$ defined in Example \re {exm21}, it is easy to verify that $f$ satisfies the conditions of Theorem \ref{thm21} and Theorem \ref{thm1} for the ellipse $E_{6}(-3,3)=\left\{ -3,-1,1,3\right\} $ with the simulation function $\zeta (t,s)=\frac{2}{3}s-t . This shows that the fixed ellipse is not unique for the number $\rho $ defined in $($\ref{number}$)$. On the other hand, the fixed point set Fix(f)=\left\{ -3,-1,1,3,18\right\} $ contains also the ellipses E_{4}(-3,1)=\left\{ -3,-1,1\right\} $ and $E_{4}(-1,3)=\left\{ -1,1,3\right\} $ other than the ellipses $E_{6}(-3,3)$ and $E_{6}(-1,1)$. We deduce that the number $\rho $ defined in $($\ref{number}$)$ can not produce all fixed ellipses $($resp. circles$)$ for a self-mapping $f$. \end{remark} This remark shows also that a fixed ellipse may not be unique. Now, we give a general result which ensure the uniqueness of a fixed geometric figure (for example, a circle, an Apollonius circle, an ellipse, a hyperbola, etc.) for a self-mapping of a metric space $(X,d)$. \begin{theorem} \label{thm24} $($The uniqueness theorem$)$ Let $(X,d)$ be a metric space, the number $M\left( x,y\right) $ be defined as in $($\ref{definition of M}$)$ and $f:X\rightarrow X$ be a self-mapping. Assume that the fixed point set Fix(f)$ contains a geometric figure $\mathcal{F}$. If there exists a simulation function $\zeta \in \mathcal{Z}$ \ such that the condition \begin{equation} \zeta \left( d\left( fx,fy\right) ,M\left( x,y\right) \right) \geq 0 \label{eqn23} \end{equation is satisfied by $f$ for all $x\in \mathcal{F}$ and $y\in X-\mathcal{F}$, then the figure $\mathcal{F}$ is the unique fixed figure of $f$. \end{theorem} \begin{proof} Assume that $\mathcal{F}^{\ast }$ is another fixed figure of $f$. Let $x\in \mathcal{F}$, $y\in \mathcal{F}^{\ast }$ with $x\neq y$ be arbitrary points. Using the inequality (\ref{eqn23}) and the condition $(\zeta _{2})$, we fin \begin{equation*} 0\leq \zeta \left( d\left( fx,fy\right) ,M\left( x,y\right) \right) =\zeta \left( d\left( x,y\right) ,d\left( x,y\right) \right) <d\left( x,y\right) -d\left( x,y\right) =0\text{,} \end{equation* a contradiction. Hence, it should be $x=y$ for all $x\in \mathcal{F}$, $y\in \mathcal{F}^{\ast }$. This shows the uniqueness of the fixed figure \mathcal{F}$ of $f$. \end{proof} Now we give a condition which excludes the identity map $I_{X}:X\rightarrow X $ defined by $I_{X}(x)=x$ for all $x\in X$ from the above results. \begin{theorem} \label{thm25} Let $(X,d)$ be a metric space, $f:X\rightarrow X$ be a\ self-mapping and $r\in \left[ 0,\infty \right) $ be a fixed number. If there exists a simulation function $\zeta \in \mathcal{Z}$ such that the condition \begin{equation*} d\left( x,fx\right) <\zeta \left( d\left( x,fx\right) ,\varphi _{r}\left( d\left( x,fx\right) \right) +r\right) \end{equation* is satisfied by $f$ for all $x\notin Fix(f)$ if and only if $f=I_{X}$. \end{theorem} \begin{proof} Let $x\in X$ be an arbitrary point with $x\notin Fix(f)$. Using (\re {auxiliary function}) and the condition $(\zeta _{2})$, we fin \begin{eqnarray*} d\left( x,fx\right) &\leq &\zeta \left( d\left( x,fx\right) ,\varphi _{r}\left( d\left( x,fx\right) \right) +r\right) =\zeta \left( d\left( x,fx\right) ,\left( d\left( x,fx\right) -r\right) +r\right) \\ &=&\zeta \left( d\left( x,fx\right) ,d\left( x,fx\right) \right) <d\left( x,fx\right) -d\left( x,fx\right) =0\text{,} \end{eqnarray* a contradiction. Hence, it should be $x\in Fix(f)$ for all $x\in X$, that is, $Fix(f)=X$. This shows that $f=I_{X}$. Clearly, the identity map $I_{X}$ satisfies the condition of the hypothesis for any simulation function $\zeta \in \mathcal{Z}$. \end{proof} \subsection{\textbf{Geometric study of fixed points on $S$-metric and $b -metric spaces}} At first, we recall the concept of an $S$-metric space. \begin{definition} \label{def31} \cite{Sedghi 2012} Let $X$ be nonempty set and $\mathcal{S :X^{3}\rightarrow \lbrack 0,\infty )$ be a function satisfying the following conditions \begin{enumerate} \item $\mathcal{S}(x,y,z)=0$ if and only if $x=y=z$, \item $\mathcal{S}(x,y,z)\leq \mathcal{S}(x,x,a)+\mathcal{S}(y,y,a)+\mathcal S}(z,z,a)$, \end{enumerate} for all $x,y,z,a\in X$. Then $S$ is called an $S$-metric on $X$ and the pair $(X,\mathcal{S})$ is called an $S$-metric space. \end{definition} Let $(X,d)$ be a metric space. It is known that the function $\mathcal{S _{d}:X^{3}\rightarrow \left[ 0,\infty \right) $ defined by \begin{equation*} \mathcal{S}_{d}\left( x,y,z\right) =d\left( x,z\right) +d\left( y,z\right) \end{equation* for all $x,y,z\in X$ is an $S$-metric on $X$ \cite{Hieu 2015}. The $S -metric $\mathcal{S}_{d}$ is called the $S$-metric generated by the metric d $ \cite{Ozgur 2017}. For example, let $X \mathbb{R} $ and the function $\mathcal{S}:X^{3}\rightarrow \lbrack 0,\infty )$ be defined b \begin{equation} \mathcal{S}(x,y,z)=\left\vert x-z\right\vert +\left\vert y-z\right\vert \text{,} \label{usual S metric} \end{equation for all $x,y,z\in \mathbb{R} $ \cite{Sedghi 2014}. Then $(X,\mathcal{S})$ is called the usual $S$-metric space. This $S$-metric is generated by the usual metric on \mathbb{R} $. The main motivation of this subsection is the existence of some examples of $S$-metrics which are not generated by any metric. For example, let $X \mathbb{R} $ and the function $\mathcal{S}:X^{3}\rightarrow \lbrack 0,\infty )$ be defined b \begin{equation} \mathcal{S}(x,y,z)=\left\vert x-z\right\vert +\left\vert x+z-2y\right\vert \text{,} \label{second S metric} \end{equation for all $x$, $y$ and $z\in \mathbb{R} $. Then, $\mathcal{S}$ is an $S$-metric on \mathbb{R} $, which is not generated by any metric, and the pair $\left( \mathbb{R} ,\mathcal{S}\right) $ is an $S$-metric space (see \cite{Ozgur 2017} for more details and examples). Let $(X,\mathcal{S})$ be an $S$-metric space and $f:X\rightarrow X$ be a self-mapping. In this subsection, we give new solutions to the fixed-circle problem (resp. fixed-disc problem and fixed ellipse problem) for self-mappings of an $S$-metric space (resp. a $b$-metric space). For the $S -metric case, we use the following number \begin{equation} \mu =\inf \left\{ \mathcal{S}(x,x,fx):x\neq fx,x\in X\right\} \text{,} \label{radius} \end{equation \begin{equation} M_{S}(x,y)=\max \left\{ \begin{array}{c} a\mathcal{S}(x,x,fx)+(1-a)\mathcal{S}(y,y,fy), \\ (1-a)\mathcal{S}(x,x,fx)+a\mathcal{S}(y,y,fy),\frac{\mathcal{S}(x,x,fy) \mathcal{S}(y,y,fx)}{4 \end{array \right\} ,\text{ }0\leq a<1 \label{the number Ms(x,y)} \end{equation and the following symmetry property given in \cite{Sedghi 2012} \begin{equation} \mathcal{S}\left( x,x,y\right) =\mathcal{S}\left( y,y,x\right) \text{,} \label{symmetry property} \end{equation for all $x,y\in X$ on an $S$-metric space $(X,\mathcal{S})$. Before stating our results, we recall the definitions of a circle, a disc and an ellipse on an $S$-metric space, respectively, as follows \begin{equation*} C_{x_{0},r}^{S}=\left\{ x\in X:\mathcal{S}(x,x,x_{0})=r\right\} \text{,} \end{equation* \begin{equation*} D_{x_{0},r}^{S}=\left\{ x\in X:\mathcal{S}(x,x,x_{0})\leq r\right\} \end{equation* an \begin{equation*} E_{r}^{S}(x_{1},x_{2})=\left\{ x\in X:\mathcal{S}(x,x,x_{1})+\mathcal{S (x,x,x_{2})=r\right\} \text{,} \end{equation* where $r\in \lbrack 0,\infty )$ \cite{Ozgur-Tas-circle-thesis}, \cite{Sedghi 2012}. For a self-mapping $f$ of an $S$-metric space, the definition of a fixed figure (circle, disc, ellipse, etc.) can be given similar to the case introduced in the previous section (see \cite{Ozgur-Tas-circle-thesis} and \cite{Mlaiki 2018} for the definitions of a fixed circle and a fixed disc). \begin{theorem} \label{thms1} Let $(X,\mathcal{S})$ be an $S$-metric space, $f:X\rightarrow X $ be a self-mapping, $\zeta \in \mathcal{Z}$ be a simulation function and the number $\mu $ be defined as in $($\ref{radius}$)$. If there exist some points $x_{1},x_{2}\in X$ such that $(a)$ For all $x\in E_{\rho }^{S}(x_{1},x_{2})$, there exists $\delta (\mu )>0$ satisfyin \begin{equation*} \frac{\mu }{2}\leq M_{S}(x,x_{1})+M_{S}(x,x_{2})<\frac{\mu }{2}+\delta (\mu )\Longrightarrow \mathcal{S}(fx,fx,x_{1})+\mathcal{S}(fx,fx,x_{2})\leq \mu \text{,} \end{equation*} $(b)$ For all $x\in X$ \begin{equation*} \mathcal{S}(fx,fx,x)>0\Longrightarrow \zeta \left( \mathcal{S (fx,fx,x),M_{S}(x,x_{1})\right) \geq 0\text{ and }\zeta \left( \mathcal{S (fx,fx,x),M_{S}(x,x_{2})\right) \geq 0\text{,} \end{equation*} $(c)$ For all $x\in X$ \begin{equation*} \mathcal{S}(fx,fx,x)>0\Longrightarrow \zeta \left( \mathcal{S}(fx,fx,x) \frac{\mathcal{S}(x,x,x_{1})+\mathcal{S}(fx,fx,x_{1})+\mathcal{S}(x,x,x_{2}) \mathcal{S}(fx,fx,x_{2})}{2}\right) \geq 0\text{,} \end{equation* then $fx_{1}=x_{1}$, $fx_{2}=x_{2}$ and $Fix(f)$ contains the ellipse E_{\mu }^{S}(x_{1},x_{2})$. \end{theorem} \begin{proof} We have \begin{equation*} M_{S}(x_{1},x_{1})=\mathcal{S}(x_{1},x_{1},fx_{1})\text{ and M_{S}(x_{2},x_{2})=\mathcal{S}(x_{2},x_{2},fx_{2})\text{.} \end{equation* First, we show that $fx_{1}=x_{1}$ and $fx_{2}=x_{2}$. If $fx_{1}\neq x_{1}$ and $fx_{2}\neq x_{2}$ then $\mathcal{S}(x_{1},x_{1},fx_{1})>0$ and \mathcal{S}(x_{2},x_{2},fx_{2})>0$. Using the symmetry condition (\re {symmetry property}) and the condition $(\zeta _{2})$, we obtain \begin{eqnarray*} \zeta \left( \mathcal{S}(fx_{1},fx_{1},x_{1}),M_{S}(x_{1},x_{1})\right) &=&\zeta \left( \mathcal{S}(fx_{1},fx_{1},x_{1}),\mathcal{S (x_{1},x_{1},fx_{1})\right) \\ &<&\mathcal{S}(fx_{1},fx_{1},x_{1})-\mathcal{S}(x_{1},x_{1},fx_{1})=0 \end{eqnarray* an \begin{eqnarray*} \zeta \left( \mathcal{S}(fx_{2},fx_{2},x_{2}),M_{S}(x_{2},x_{2})\right) &=&\zeta \left( \mathcal{S}(fx_{2},fx_{2},x_{2}),d(fx_{2},x_{2})\right) \\ &<&d(fx_{2},x_{2})-d(fx_{2},x_{2})=0\text{,} \end{eqnarray* which are contradictions by the condition $(b)$. Hence it should be fx_{1}=x_{1}$ and $fx_{2}=x_{2}$. If $\mu =0$, it is easy to check that $E_{\mu }^{S}(x_{1},x_{2})=C_{x_{1},\mu }^{S}=\{x_{1}\}$ \ and $x_{1}=x_{2}$. Hence, the proof is completed. Assume that $\mu \neq 0$. Let $x\in E_{\mu }^{S}(x_{1},x_{2})$ be any point such that $fx\neq x$. Then $\mathcal{S}(x,x,fx)>0$ and we hav \begin{equation*} M^{S}(x,x_{1})=\max \left\{ a\mathcal{S}(x,x,fx),(1-a)\mathcal{S}(x,x,fx) \frac{\mathcal{S}(x,x,fx_{1})+\mathcal{S}(x_{1},x_{1},fx)}{4}\right\} \end{equation* and \begin{equation*} M^{S}(x,x_{2})=\max \left\{ a\mathcal{S}(x,x,fx),(1-a)\mathcal{S}(x,x,fx) \frac{\mathcal{S}(x,x,fx_{2})+\mathcal{S}(x_{2},x_{2},fx)}{4}\right\} \text{ } \end{equation* Using the condition $(a)$, we ge \begin{equation} \frac{\mu }{2}\leq M^{S}(x,x_{1})+M^{S}(x,x_{2})<\frac{\mu }{2}+\delta (\mu )\Longrightarrow \mathcal{S}(fx,fx,x_{1})+\mathcal{S}(fx,fx,x_{2})\leq \mu \text{.} \label{eqn21s} \end{equation Now, using the inequality (\ref{eqn21s}), the conditions $(c)$, $(\zeta _{2}) $ and the symmetry condition (\ref{symmetry property}), we obtai \begin{eqnarray*} 0 &\leq &\zeta \left( \mathcal{S}(fx,fx,x),\frac{\mathcal{S}(x,x,x_{1}) \mathcal{S}(fx,fx,x_{1})+\mathcal{S}(x,x,x_{2})+\mathcal{S}(fx,fx,x_{2})}{2 \right) \\ &<&\frac{\mathcal{S}(x,x,x_{1})+\mathcal{S}(fx,fx,x_{1})+\mathcal{S (x,x,x_{2})+\mathcal{S}(fx,fx,x_{2})}{2}-\mathcal{S}(fx,fx,x) \\ &=&\frac{\mathcal{S}(x,x,x_{1})+\mathcal{S}(x,x,x_{2})}{2}+\frac{\mathcal{S (fx,fx,x_{1})+\mathcal{S}(fx,fx,x_{2})}{2}-\mathcal{S}(fx,fx,x) \\ &\leq &\frac{\mu }{2}+\frac{\mu }{2}-\mathcal{S}(fx,fx,x)=\mu -\mathcal{S (fx,fx,x) \end{eqnarray* and s \begin{equation*} \mathcal{S}(fx,fx,x)<\mu \text{,} \end{equation* which is a contradiction by the definition of the number $\mu $. This contradiction leads to $fx=x$. Consequently, we have $E_{\mu }^{S}(x_{1},x_{2})\subset Fix(f)$. \end{proof} If $x_{1}=x_{2}$ then we have $E_{\mu }^{S}(x_{1},x_{2})=C_{x_{1},\frac{\mu }{2}}$ and Theorem \ref{thms1} is reduced to a fixed-circle theorem as follows$:$ \begin{theorem} \label{thm4} Let $(X,\mathcal{S})$ be an $S$-metric space, $f:X\rightarrow X$ be a self-mapping and the number $\mu $ be defined as in $($\ref{radius}$)$. If there exist a simulation function $\zeta \in \mathcal{Z}$ and a point x_{0}\in X$ such that $(i)$ For all $x\in C_{x_{0},\mu }^{S}$, there exists a $\delta (\mu )>0$ satisfyin \begin{equation*} \frac{\mu }{4}\leq M_{S}(x,x_{0})<\frac{\mu }{4}+\delta (\mu )\Longrightarrow \mathcal{S}(fx,fx,x_{0})\leq \mu , \end{equation*} $(ii)$ For all $x\in X$ \begin{equation*} \mathcal{S}(fx,fx,x)>0\Longrightarrow \zeta (\mathcal{S}\left( fx,fx,x\right) ,M_{S}(x,x_{0}))\geq 0, \end{equation* then $x_{0}\in Fix\left( f\right) $ and the circle $C_{x_{0},\mu }^{S}$ is a fixed circle of $f$. \end{theorem} \begin{proof} If $fx_{0}\neq x_{0}$ then using the symmetry property (\ref{symmetry property}) and the condition $(\zeta _{2})$, we ge \begin{equation*} M_{S}(x_{0},x_{0})=\mathcal{S}\left( x_{0},x_{0},fx_{0}\right) =\mathcal{S \left( fx_{0},fx_{0},x_{0}\right) \end{equation* and \begin{eqnarray*} \zeta \left( \mathcal{S}\left( fx_{0},fx_{0},x_{0}\right) ,M_{S}(x_{0},x_{0})\right) &=&\zeta \left( \mathcal{S}\left( fx_{0},fx_{0},x_{0}\right) ,\mathcal{S}\left( fx_{0},fx_{0},x_{0}\right) \right) \\ &<&\mathcal{S}\left( fx_{0},fx_{0},x_{0}\right) -\mathcal{S}\left( fx_{0},fx_{0},x_{0}\right) =0\text{.} \end{eqnarray* This last inequality is a contradiction by $(ii)$. Therefore, it should be fx_{0}=x_{0}$. This shows that the circle $C_{x_{0},\mu }^{S}=\{x_{0}\}$ is a fixed circle of $f$ when $\mu =0$. Now, let $\mu >0$ and $x\in C_{x_{0},\mu }^{S}$ be any element. To show that $f$ fixes the circle C_{x_{0},\mu }^{S}$, we suppose that $fx\neq x$ for any $x\in C_{x_{0},\mu }^{S}$. Since $x_{0}\in Fix\left( f\right) $, we have \begin{eqnarray*} M_{S}(x,x_{0}) &=&\max \left\{ a\mathcal{S}(x,x,fx),(1-a)\mathcal{S}(x,x,fx) \frac{\mathcal{S}(x,x,fx_{0})+\mathcal{S}(x_{0},x_{0},fx)}{4}\right\} \\ &=&\max \left\{ a\mathcal{S}(x,x,fx),(1-a)\mathcal{S}(x,x,fx),\frac{\mu \mathcal{S}(x_{0},x_{0},fx)}{4}\right\} . \end{eqnarray* Using the conditions $(i)$, $(ii)$, $(\zeta _{2})$ and the symmetry property (\ref{symmetry property}), we fin \begin{eqnarray*} 0 &<&\zeta \left( \mathcal{S}\left( fx,fx,x\right) ,M_{S}(x,x_{0})\right) \\ &<&M_{S}(x,x_{0})-\mathcal{S}\left( fx,fx,x\right) <\mu -\mathcal{S}\left( fx,fx,x\right) \text{,} \end{eqnarray* a contradiction by the definition of the number $\mu $. Hence, we have $fx=x . Consequently, $f$ fixes the circle $C_{x_{0},\mu }^{S}$. \end{proof} \begin{corollary} \label{cor1} Let $(X,\mathcal{S})$ be an $S$-metric space, $f:X\rightarrow X$ be a self-mapping and the number $\mu $ be defined as in $($\ref{radius}$)$. If there exist a simulation function $\zeta \in \mathcal{Z}$ and a point x_{0}\in X$ such that $(i)$ For all $x\in D_{x_{0},\mu }^{S}$, there exists a $\delta (\mu )>0$ satisfyin \begin{equation*} \frac{\mu }{4}\leq M_{S}(x,x_{0})<\frac{r}{4}+\delta (\mu )\Longrightarrow \mathcal{S}(fx,fx,x_{0})\leq \mu , \end{equation*} $(ii)$ For all $x\in X$ \begin{equation*} \mathcal{S}(fx,fx,x)>0\Longrightarrow \zeta (\mathcal{S}\left( fx,fx,x\right) ,M_{S}(x,x_{0}))\geq 0, \end{equation* then the disc $D_{x_{0},\mu }^{S}$ is a fixed disc of $f$. \end{corollary} \begin{example} \label{exm23} Let $X=\left\{ -3,-1,1,3,12,18\right\} $ with the $S$-metric defined in $($\ref{second S metric}$)$ and consider the self-mapping $f$ defined in Example \ref{exm21} on this $S$-metric space $(X,\mathcal{S})$. It is easy to check that the self-mapping $f$ satisfies the conditions of Theorem \ref{thms1} with the points $x_{1}=-1$ and $x_{2}=1$, the simulation function $\zeta (t,s)=\frac{7}{8}s-t$ and any $a\in \left[ 0,1\right) $. We hav \begin{equation*} \mu =\inf \left\{ \mathcal{S}(x,x,fx):x\neq fx,x\in X\right\} =\mathcal{S (12,12,18)=12 \end{equation* and clearly the set $Fix(f)$ contains the ellipse $E_{12}^{S}(-1,1)=\left\{ -3,3\right\} $. On the other hand, the self-mapping $f$ does not satisfy the condition $(b)$ of Theorem \ref{thms1} for the ellipse $E_{12}^{S}(-3,3) \left\{ -3,-1,1,3\right\} $ for any simulation function $\zeta $ and any a\in \left[ 0,1\right) $. Indeed, we have \begin{eqnarray*} \zeta \left( \mathcal{S}(fx,fx,x),M_{S}(x,3)\right) &=&\zeta (\mathcal{S \left( 18,18,12\right) ,M_{S}(12,3)) \\ &=&\zeta (12,12))<0\text{,} \end{eqnarray* by the condition $(\zeta _{2})$ for the point $x=12$ with $\mathcal{S (18,18,12)>0$. This shows that the converse statement of Theorem \ref{thms1} is not true everwhen. The self-mapping $f$ satisfies the conditions of Theorem \ref{thm4} with the point $x_{0}=-3$ and the simulation function $\zeta (t,s)=\frac{5}{6}s-t$. The circle $C_{-3,12}^{S}=\left\{ 3\right\} $ is contained in the set Fix(f) $. On the other hand, the self-mapping $f$ does not satisfy the condition $(ii)$ of Theorem \ref{thm4} with the point $x_{0}=3$ for any simulation function $\zeta $ and any $a\in \left[ 0,1\right) $. Since we have \begin{eqnarray*} \zeta (\mathcal{S}\left( fx,fx,x\right) ,M_{S}(x,x_{0})) &=&\zeta (\mathcal{ }\left( 18,18,12\right) ,M_{S}(12,3)) \\ &=&\zeta (12,12))<0\text{,} \end{eqnarray* by the condition $(\zeta _{2})$ for the point $x=12$. But, the circle C_{3,12}^{S}=\left\{ -3\right\} $ is a fixed circle of $f$. This shows that the converse statement of Theorem \ref{thm4} is not true everwhen. \end{example} \begin{remark} $1)$ Example \ref{exm23} shows the importance of the studies on an $S -metric space. Notice that the ellipse $E_{12}(-1,1)$ and the circle C_{-3,12}$ are empty sets in the metric space $\left( X,d\right) $ in Example \ref{exm21} but, if we consider the $S$-metric $\mathcal{S (x,y,z)=\left\vert x-z\right\vert +\left\vert x+z-2y\right\vert $ on $X$ then the ellipse $E_{12}^{S}(-1,1)$ and the circle $C_{-3,12}^{S}$ are not empty sets and both of them are contained in the set $Fix(f)$. $2)$ Note that $S$-metric versions of Definition \ref{def21} and Theorem \re {thm1} can also be given for self-mappings on an $S$-metric space. \end{remark} Now we give a fixed-circle theorem using the auxiliary function $\varphi _{r} \mathbb{R} ^{+}\cup \left\{ 0\right\} \rightarrow \mathbb{R} $ defined in (\ref{auxiliary function}). \begin{theorem} \label{thm26} $(X,\mathcal{S})$ be an $S$-metric space, $\zeta \in \mathcal{ }$ be a simulation function and $C_{x_{0},r}^{S}$ be any circle on $X$ with r>0$. If there exists a self-mapping $f:X\rightarrow X$ satisfying $i)$ $\mathcal{S}(fx,fx,x_{0})=r$ for each $x\in C_{x_{0},r}^{S}$, $ii)$ $\zeta \left( r,\mathcal{S}\left( fx,fx,fy\right) \right) \geq 0$ for each $x,y\in C_{x_{0},r}^{S}$ with $x\neq y$, $iii)$ $\zeta \left( \mathcal{S}\left( fx,fx,fy\right) ,\mathcal{S}\left( x,x,y\right) -\varphi _{r}\left( \mathcal{S}\left( x,x,fx\right) \right) \right) \geq 0$ for each $x,y\in C_{x_{0},r}^{S}$, $iv)$ $f$ is one to one on the circle $C_{x_{0},r}^{S}$, then the circle $C_{x_{0},r}^{S}$ is a fixed circle of $f$. \end{theorem} \begin{proof} Let $x\in C_{x_{0},r}^{S}$ be an arbitrary point. By the condition $(i)$, we have $fx\in C_{x_{0},r}^{S}$. To show that $fx=x$ for all $x\in C_{x_{0},r}^{S}$, conversely, we assume that $x\neq fx$ for any $x\in C_{x_{0},r}^{S}$. Then we have $\mathcal{S}\left( x,x,fx\right) >0$. Using the conditions $(ii)$, $(iv)$ and $(\zeta _{2})$, we obtai \begin{equation*} 0\leq \zeta \left( r,\mathcal{S}\left( fx,fx,f^{2}x\right) \right) <\mathcal S}\left( fx,fx,f^{2}x\right) -r \end{equation* and henc \begin{equation} r<\mathcal{S}\left( fx,fx,f^{2}x\right) . \label{eqn24} \end{equation Using the definition of the function $\varphi _{r}$ and the conditions (iii) $, $(iv)$ and $(\zeta _{2})$, we ge \begin{eqnarray*} 0 &\leq &\zeta \left( \mathcal{S}\left( fx,fx,f^{2}x\right) ,\mathcal{S \left( x,x,fx\right) -\varphi _{r}\left( \mathcal{S}\left( x,x,fx\right) \right) \right) \\ &=&\zeta \left( \mathcal{S}\left( fx,fx,f^{2}x\right) ,\mathcal{S}\left( x,x,fx\right) -\left( \mathcal{S}\left( x,x,fx\right) -r\right) \right) \\ &=&\zeta \left( \mathcal{S}\left( fx,fx,f^{2}x\right) ,r\right) <r-\mathcal{ }\left( fx,fx,f^{2}x\right) \end{eqnarray* and henc \begin{equation*} \mathcal{S}\left( fx,fx,f^{2}x\right) <r\text{,} \end{equation* which is a contradiction with the inequality (\ref{eqn24}). Consequently, it should be $fx=x$ for each $x\in C_{x_{0},r}^{S}$, that is, $C_{x_{0},r}^{S}$ is a fixed circle of $f$. \end{proof} Now we give a general result which ensure the uniqueness of a geometric figure contained in the set $Fix(f)$ for a self-mapping of an $S$-metric space $(X,\mathcal{S})$. \begin{theorem} \label{thm27} $($The uniqueness theorem$)$ Let $(X,\mathcal{S})$ be an $S -metric space, the number $M_{S}\left( x,y\right) $ be defined as in $($\re {the number Ms(x,y)}$)$ and $f:X\rightarrow X$ be a self-mapping. Assume that the fixed point set $Fix(f)$ contains a geometric figure $\mathcal{F}$. If there exists a simulation function $\zeta \in \mathcal{Z}$ \ such that the condition \begin{equation} \zeta \left( \mathcal{S}\left( fx,fx,fy\right) ,M_{S}\left( x,y\right) \right) \geq 0 \label{eqn25} \end{equation is satisfied by $f$ for all $x\in \mathcal{F}$ and $y\in X-\mathcal{F}$, then the figure $\mathcal{F}$ is the unique fixed figure of $f$. \end{theorem} \begin{proof} On the contrary, we suppose that $\mathcal{F}^{\ast }$ is another fixed figure of the self-mapping $f$. Let $x\in \mathcal{F}$, $y\in \mathcal{F ^{\ast }$ with $x\neq y$ be arbitrary points. Using the inequality (\re {eqn25}) and the condition $(\zeta _{2})$, we ge \begin{equation*} 0\leq \zeta \left( \mathcal{S}\left( fx,fx,fy\right) ,M_{S}\left( x,y\right) \right) =\zeta \left( \mathcal{S}\left( x,x,y\right) ,\mathcal{S}\left( x,x,y\right) \right) <\mathcal{S}\left( x,x,y\right) -\mathcal{S}\left( x,x,y\right) =0\text{,} \end{equation* a contradiction. Hence, it should be $x=y$ for all $x\in \mathcal{F}$, $y\in \mathcal{F}^{\ast }$. This shows the uniqueness of the fixed figure \mathcal{F}$ of $f$. \end{proof} We give a condition which excludes the identity map $I_{X}:X\rightarrow X$ defined by $I_{X}(x)=x$ for all $x\in X$ from the above results. \begin{theorem} \label{thm28} Let $(X,\mathcal{S})$ be an $S$-metric space, $f:X\rightarrow X $ be a\ self-mapping and $r\in \left[ 0,\infty \right) $ be a fixed number. If there exists a simulation function $\zeta \in \mathcal{Z}$ \ such that the condition \begin{equation*} \mathcal{S}\left( x,x,fx\right) <\zeta \left( \mathcal{S}\left( x,x,fx\right) ,\varphi _{r}\left( \mathcal{S}\left( x,x,fx\right) \right) +r\right) \end{equation* is satisfied by $f$ for all $x\notin Fix(f)$ if and only if $f=I_{X}$. \end{theorem} \begin{proof} The proof is similar to the proof of Theorem \ref{thm25}. \end{proof} \begin{remark} $1)$ Let $(X,\mathcal{S})$ be an $S$-metric space. Suppose that the $S -metric\ $\mathcal{S}$ is generated by a metric $d$. Then, for $0\leq a<1$ we hav \begin{eqnarray*} M_{S}(x,x_{0}) &=&\max \left\{ \begin{array}{c} a\mathcal{S}(x,x,fx)+(1-a)\mathcal{S}(x_{0},x_{0},fx_{0}), \\ (1-a)\mathcal{S}(x,x,fx)+a\mathcal{S}(x_{0},x_{0},fx_{0}),\frac{\mathcal{S (x,x,fx_{0})+\mathcal{S}(x_{0},x_{0},fx)}{4 \end{array \right\} \\ &=&\max \left\{ \begin{array}{c} 2ad(x,fx)+2(1-a)d(x_{0},fx_{0}), \\ 2(1-a)d(x,fx)+2ad(x_{0},fx_{0}),\frac{d(x,fx_{0})+d(x_{0},fx)}{2 \end{array \right\} \end{eqnarray* and so \begin{equation*} M(x,x_{0})\leq M_{S}(x,x_{0})\text{.} \end{equation* Consequently, Theorem \ref{thm4} $($resp. Corollary \ref{cor1}$)$ is a generalization of Theorem $3.2$ $($resp. Corollary $3.2)$ given in \cit {Pant 2020}. $2)$ Similar definition of the notion of a fixed figure $($circle, disc, ellipse and so on$)$ can be given for a self-mapping of a $b$-metric space. $3)$ From \cite{Sedghi 2014}, we know that the function defined by \begin{equation*} d^{S}\left( x,y\right) =S\left( x,x,y\right) =2d\left( x,y\right) \text{,} \end{equation* for all $x,y\in X$, defines a $b$-metric on an $S$-metric space $(X,\mathcal S})$ with $b=\frac{3}{2}$. If we consider Theorem \ref{thm4} and Theorem \re {thm26} together with this fact, then we get the following fixed-circle $( resp. fixed-disc$)$ results on a $b$-metric space using the numbe \begin{equation} M_{d^{S}}(x,y)=\max \left\{ \begin{array}{c} ad^{S}(x,fx)+(1-a)d^{S}(y,fy), \\ (1-a)d^{S}(x,fx)+a(1-a)d^{S}(y,fy),\frac{d^{S}(x,fy)+d^{S}(y,fx)}{2 \end{array \right\} \text{, }0\leq a<1\text{.} \label{the number Mds(x,y)} \end{equation} \end{remark} \begin{theorem} \label{thm5} Let $(X,d^{S})$ be a $b$-metric space, $f:X\rightarrow X$ a self-mapping and $\mu $ be defined as \begin{equation} \mu =\inf \left\{ d^{S}(x,fx):x\neq fx,x\in X\right\} \text{.} \label{radius2} \end{equation If there exist a simulation function $\zeta \in \mathcal{Z}$ and a point x_{0}\in X$ such that $(i)$ For all $x\in C_{x_{0},\mu }^{d^{S}}$, there exists a $\delta (\mu )>0$ satisfyin \begin{equation*} \frac{\mu }{4}\leq M_{d^{S}}(x,x_{0})<\frac{\mu }{4}+\delta (\mu )\Longrightarrow d^{S}(fx,x_{0})\leq \mu \text{,} \end{equation* where \begin{equation*} C_{x_{0},\mu }^{d^{S}}=\left\{ x\in X:d^{S}(x,x_{0})=\mu \right\} \end{equation* an \begin{equation*} M_{d^{S}}(x,x_{0})=\max \left\{ \begin{array}{c} ad^{S}(x,fx)+(1-a)d^{S}(x_{0},fx_{0}), \\ (1-a)d^{S}(x,fx)+ad^{S}(x_{0},fx_{0}),\frac{d^{S}(x,fx_{0})+d^{S}(x_{0},fx)} 4 \end{array \right\} ,\text{ }0\leq a<1, \end{equation*} $(ii)$ For all $x\in X,$ \begin{equation*} d^{S}(fx,x)>0\Longrightarrow \zeta \left( d^{S}(fx,x),M_{d^{S}}(x,x_{0})\right) \geq 0, \end{equation* then $x_{0}\in Fix(f)$ and the circle $C_{x_{0},\mu }^{d^{S}}$ is a fixed circle of $f$. \end{theorem} \begin{corollary} \label{cor2} Let $(X,d^{S})$ be a $b$-metric space, $f:X\rightarrow X$ be a self-mapping and the number $\mu $ be defined as in $($\ref{radius2}$)$. If there exist a simulation function $\zeta \in \mathcal{Z}$ and a point x_{0}\in X$ such that $(i)$ For all $x\in D_{x_{0},\mu }^{d^{S}}$, there exists a $\delta (\mu )>0$ satisfyin \begin{equation*} \frac{\mu }{4}\leq M_{d^{S}}(x,x_{0})<\frac{\mu }{4}+\delta (\mu )\Longrightarrow d^{S}(fx,x_{0})\leq \mu \text{,} \end{equation* wher \begin{equation*} D_{x_{0},\mu }^{d^{S}}=\left\{ x\in X:d^{S}(x,x_{0})\leq \mu \right\} \text{ } \end{equation*} $(ii)$ For all $x\in X$ \begin{equation*} d^{S}(fx,x)>0\Longrightarrow \zeta \left( d^{S}(fx,x),M_{d^{S}}(x,x_{0})\right) \geq 0, \end{equation* then the disc $D_{x_{0},\mu }^{d^{S}}$ is a fixed disc of $f$. \end{corollary} \begin{theorem} \label{thm29} Let $(X,d^{S})$ be a $b$-metric space, $\zeta \in \mathcal{Z}$ be a simulation function and $C_{x_{0},r}^{d^{S}}$ be any circle on $X$ with $r>0$. If there exists a self-mapping $f:X\rightarrow X$ satisfying $i)$ $d^{S}(fx,x_{0})=r$ for each $x\in C_{x_{0},r}^{d^{S}}$, $ii)$ $\zeta \left( r,d^{S}(fx,fy\right) )\geq 0$ for each $x,y\in C_{x_{0},r}^{d^{S}}$ with $x\neq y$, $iii)$ $\zeta \left( d^{S}(fx,fy),d^{S}(x,y)-\varphi _{r}\left( d^{S}(x,fx\right) \right) )\geq 0$ for each $x,y\in C_{x_{0},r}^{d^{S}}$, $iv)$ $f$ is one to one on the circle $C_{x_{0},r}^{d^{S}}$, then the circle $C_{x_{0},r}^{d^{S}}$ is a fixed circle of $f$. \end{theorem} \begin{theorem} \label{thm30} Let $(X,d^{S})$ be a $b$-metric space, the number M_{d^{S}}(x,y)$ be defined as in $($\ref{the number Mds(x,y)}$)$ and f:X\rightarrow X$ be a self-mapping. Assume that the fixed point set $Fix(f)$ contains a geometric figure $\mathcal{F}$. If there exists a simulation function $\zeta \in \mathcal{Z}$ \ such that the condition \begin{equation*} \zeta \left( d^{S}(fx,fy),M_{d^{S}}\left( x,y\right) \right) \geq 0 \end{equation* is satisfied by $f$ for all $x\in \mathcal{F}$ and $y\in X-\mathcal{F}$, then the figure $\mathcal{F}$ is the unique fixed figure of $f$. \end{theorem} \begin{theorem} \label{thm31} Let $(X,d^{S})$ be a $b$-metric space, $f:X\rightarrow X$ be a\ self-mapping with the fixed point set $Fix(f)$ and $r\in \left[ 0,\infty \right) $ be a fixed number. If there exists a simulation function $\zeta \in \mathcal{Z}$ \ such that the condition \begin{equation*} d^{S}(x,fx)<\zeta \left( d^{S}(x,fx),\varphi _{r}\left( d^{S}(x,fx)\right) +r\right) \end{equation* is satisfied by $f$ for all $x\notin Fix(f)$ if and only if $f=I_{X}$. \end{theorem} \section{\textbf{Conclusions and Future Works}} In this paper, we have obtained new results on the study of geometric properties of the fixed point set of a self-mapping on a metric (resp. $S -metric,$\ b$-metric) space via the properties of the set of simulation functions. As a future work, the determination of new conditions which ensure a geometric figure to be fixed by a self-mapping can be considered using similar approaches. Further possible applications of our theoretic results can be done on the applied sciences using the geometric properties of fixed points. For example, in \cite{Li}, the existence of a fixed point for every recurrent neural network was shown using Brouwer's Fixed Point Theorem and a geometric approach was used to locate where the fixed points are (see \cite{Li} for more details). Therefore, theoretic fixed figure results are important in the study of neural networks.
\section{Introduction} \subsection{Context} When describing the interaction of light with a resonating particle, summing the natural resonant modes of the system is an intuitive and attractive approach. The modes are easily computed as they are eigenmode solutions to a source-free problem. They are intrinsic quantities of the system and give insights to understand the underlying physics. Once they are calculated, the response of the system to any given excitation can be computed at a low computational cost. A bounded, lossless system is Hermitian and admits a basis of orthonormal eigenmodes associated to real eigenvalues. But for a system that exhibits loss (by absorption or radiation), the classical spectral theorem cannot be used to diagonalise the non-Hermitian operator and the eigenvalues become complex \cite{lalanneReview, lalanne_modal_18, PhysRevA.4.1782}. Several authors have obtained modal expansions for non-Hermitian systems \cite{PhysRevApplied.11.044018, Ge:14, Kokkotas1999, Leung:96, Muljarov_2010, Pick:17, PhysRevB.90.075108, PhysRevA.89.023829, zworski1999resonances}. Their use in nanophotonics is quite recent and is studied by many research groups in the physics community (see the review paper \cite{lalanneReview} and references therein). Nevertheless, a number of theoretical and numerical issues arise \cite{Colom18}. Modes of non-Hermitian systems are not orthogonal, using classical inner products. In order to satisfy the outgoing boundary conditions, these generalised modes have complex frequencies with negative imaginary parts and, if they decay exponentially in time as $t \to \infty$, they grow far away from the resonating systems. This is known in the literature as Lamb's exponential catastrophe \cite{sirenko2007modeling}. Recently, frameworks for the computation and normalisation of these generalised modes have been established in different settings \cite{PhysRevA.90.013834, PhysRevA.92.053810, Stout_2017, PhysRevA.89.023829, PhysRevB.91.195422,stout2019eigenstate}. \subsection{Scope of the paper} In this paper we consider the scattering of a scalar wave by an obstacle with dispersive parameters (described by a \emph{Drude-Lorentz model}). This is a good model for the scattering of light by a dispersive obstacle in the \emph{transverse magnetic polarisation} (see \cite[remark 2.1]{moiola2019acoustic}). We work in a \emph{low-frequency regime} corresponding to relevant physical applications, such as the scattering of light in the visible/infrared domain by a metallic nanoparticle whose characteristic size is a few tens of nanometers. The goal of this paper is to obtain an \emph{approximation} of the \emph{low-frequency part} of the scattered field by a dispersive obstacle in the time domain as a \emph{finite sum} of modes oscillating at complex frequencies. The tools used are singular boundary integral equations and elementary functional analysis. In this paper we do not deal with the high frequency part of the field that is usually studied with micro-local analysis tools. \subsection{Previous work on plasmonic resonances and layer potentials} It has been shown in \cite{ammari2016surface, ammari2017mathematicalscalar, ammari2016plasmaxwell} that using boundary integral representation and layer potential analysis, one can define the resonant frequencies as solutions of a non-linear eigenvalue problem on the boundary of the particle. In a low-frequency regime, i.e. at frequencies corresponding to wavelengths that are orders of magnitude larger than the particle's size, asymptotic analysis techniques, as in \cite{ammari2017mathematicalscalar}, yield a hierarchy of boundary integral equations. The asymptotic small parameter is $\delta\omega c^{-1}$, where $\delta$ is the size of the particle, $\omega$ the frequency and $c$ the velocity. At leading order the well-known Neumann-Poincar\'e operator appears \cite{S1904}. Using the Plemelj symmetrisation principle and the spectral theory of compact self-adjoint operators, the latter can be diagonalised in the appropriate functional spaces \cite{khavinson2007poincare,nedelec2001acoustic}, which allows the scattered field to be decomposed in a basis of orthogonal modes in the static case \cite{ando2016analysis}. The properties of the eigenvalues of the Neumann-Poincar\'e operator have been extensively studied in the literature, see the review paper \cite{ando2020spectral} and references therein. For a smooth enough boundary, say $C^{1,\alpha}$ for some $\alpha>0$, the operator is compact and its eigenvalues are real numbers converging to zero. The eigenvalues of the Neumann-Poincar\'e operator in the two- and three-dimensional cases are intrinsically different. In two dimensions, the spectrum is symmetric with respect to the origin (except for the eigenvalue 1/2), so there are as many positive eigenvalues as negative. The decay rate of the eigenvalues depends strongly on the regularity of the boundary. For an analytic boundary, the eigenvalues have an exponential decay rate \cite{ando2018}. In three dimensions, very few surfaces are known to have negative eigenvalues \cite{ji19}. For a strictly convex $C^\infty$ domain, there are infinitely many positive eigenvalues and a finite number of negatives ones \cite{ando2020}. The eigenvalues rate of decay is much slower than in two dimensions: $\lambda_j=\mathcal{O}(j^{-1/2})$ as $j\rightarrow\infty$ \cite{miyanishi2020eigenvalues} and zero is not in the essential spectrum \cite{ando2020}. \subsection{Contributions and organisation of the paper} We begin by describing the problem geometry and we formulate the governing equations in section~\ref{sec:problem}. We introduce the layer potential and boundary integral formulation and recall the modal decomposition of the static ($\omega=0$) solution. In section \ref{sec:modal_decomp}, we prove that in three dimensions, for a strictly convex particle, the modal expansion can be truncated due to the super-polynomial decay of the expansion's coefficients. With a perturbation argument, we deduce from the static ($\omega = 0$) result a modal approximation in the dynamic case (for a small non-zero frequency). The perturbation analysis yields size and frequency dependent dynamic complex resonant frequencies. We show that all the resonant frequencies have a negative imaginary part and lie in a bounded region near the origin. Finally, in section~\ref{sec:time}, using only elementary complex analysis techniques, we give an approximation for the low-frequency part of the scattered field in the time domain as a finite sum of modes oscillating at complex resonant frequencies. We also show with a simple causality argument that the \emph{exponential catastrophe} is not problematic in practice. In section~\ref{sec:num} we implement this expansion in the two-dimensional setting and illustrate the validity of our approach with numerical simulations. \section{Problem geometry and formulation}\label{sec:problem} \subsection{Problem setting} We are interested in the scattering problem of an incident wave illuminating a plasmonic nanoparticle in $\mathbb{R}^d$, $d=2,3$. The homogeneous medium is characterised by electric permittivity $\varepsilon_m$ and magnetic permeability $\mu_m$. Let $D$ be a smooth bounded domain in $\mathbb{R}^d$, of class $C^\infty$, characterised by electric permittivity $\varepsilon_c$. We assume the particle to be non-magnetic, i.e., $\mu_c = \mu_m$. Let $D=z+\delta B$ where $B$ is the reference domain and contains the origin, and $D$ is located at $z\in\mathbb{R}^d$ and has a characteristic size $\delta \ll 1$. We define the wavenumbers $k_c=\omega\sqrt{\varepsilon_c\mu_c}$ and $k_m=\omega\sqrt{\varepsilon_m\mu_m}$. Let $\varepsilon=\varepsilon_c \chi(D)+\varepsilon_m \chi(\mathbb{R}^d \setminus \bar{D})$, where $\chi$ denotes the characteristic function. We denote by $c_0$ the speed of light in vacuum $c_0=1/\sqrt{\varepsilon_0\mu_0}$ and by $c$ the speed of light in the medium $c=1/\sqrt{\varepsilon_m\mu_m}$. Hereafter we use the Drude model \cite{ordal83} to express the electric permittivity of the particle: \begin{equation}\label{eq:drude} \varepsilon_c(\omega)=\varepsilon_0\left(1-\frac{\omega_p^2}{\omega^2+i\omega\mathrm{T}^{-1}}\right), \end{equation} where the positive constants $\omega_p$ and $\mathrm{T}^{-1}$ are the plasma frequency and the collision frequency or damping factor, respectively. \begin{cond}\label{cond:2d} In two dimensions, we assume the domain $D$ to be an algebraic domain of class $\mathcal{Q}$, i.e. a quadrature domain. An algebraic domain is a domain enclosed by a real algebraic curve, namely the zero level set of a bivariate polynomial. A quadrature domain is the conformal image of the unit disc by a rational function. \end{cond} \begin{remark} Algebraic domains are dense among all planar domains, so every smooth curve can be described as a sequence of algebraic curves \cite{putinar19}. \end{remark} \begin{cond}\label{cond:3d} In three dimensions, we assume the domain $D$ to be strictly convex: for any two points in $D$, the line segment joining them is contained in $D \setminus \partial D$. \end{cond} Throughout the rest of the paper, $D$ is assumed to satisfy conditions \ref{cond:2d} or \ref{cond:3d}. \subsection{Helmholtz equation for a subwavelength resonator} Given an incident wave $u^\text{in}$ solution to the Helmholtz equation, the scattering problem in the frequency domain can be modelled by \begin{equation}\label{eq:helmholtz} \nabla \cdot \frac{1}{\varepsilon(x)} \nabla u(x)+\omega^2\mu_m u(x) = 0, \qquad x \in \mathbb{R}^d, \end{equation} subject to the Sommerfeld radiation condition \begin{equation*} \left| \frac{\partial(u-u^\text{in})}{\partial |x|}-ik_m(u-u^\text{in})\right|=\mathcal{O}\left(|x|^{-(d+1)/2}\right), \qquad \mbox{as } |x|\rightarrow \infty, \end{equation*} uniformly in $x/|x|$, for $\Re{k_m}>0$. The transmission conditions are given by \begin{equation*} \begin{dcases} \left. u(x)\right|_+ = \left.u(x)\right|_-, & x \in \partial D,\\ \left.\frac{1}{\varepsilon_m}\frac{\partial u(x)}{\partial \nu}\right|_+ = \left.\frac{1}{\varepsilon_c} \frac{\partial u(x)}{\partial \nu}\right|_-,& x \in \partial D. \end{dcases} \end{equation*} Here, $\partial \cdot / \partial \nu$ denotes the normal derivative on $\partial D$, and the $+$ and $-$ subscripts indicate the limits from outside and inside $D$, respectively. \begin{definition} We denote the contrast $\lambda$ by \begin{equation*} \lambda(\omega)=\frac{\varepsilon_m+\varepsilon_c}{2(\varepsilon_m-\varepsilon_c)}. \end{equation*} \end{definition} \begin{definition}[Resonant frequency, mode] We say $\omega$ is a \emph{resonant frequency} if there is a non-trivial solution to equation \eqref{eq:helmholtz} with $u^\text{in}=0$. We call the solution a mode. A \emph{subwavelength resonance} occurs when a resonant frequency $\omega$ satisfies $\omega\delta c^{-1} <1$. \end{definition} \subsection{Layer potential formulation} Let $H^{1/2}(\partial D)$ be the usual Sobolev space and let $H^{-1/2}(\partial D)$ be its dual space with respect to the duality pairing $\left\langle \cdot,\cdot\right\rangle_{\frac{1}{2},-\frac{1}{2}}$. The field $u$ can be represented using the single layer potentials $\mathcal{S}^{k_c}_D$ and $\mathcal{S}^{k_m}_D$, introduced in definition~\ref{de:layerpotential}, as follows: \begin{equation} \label{eq:scalar_solution} u(x)=\begin{dcases} \mathcal{S}^{k_c}_D[\Phi](x), & x\in D,\\ u^\text{in}(x)+\mathcal{S}^{k_m}_D[\Psi](x), & x\in \mathbb{R}^d \setminus \overline{D}, \end{dcases} \end{equation} where the pair $(\Phi, \Psi) \in H^{-\frac{1}{2}}(\partial D)\times H^{-\frac{1}{2}}(\partial D)$ is the unique solution to \begin{equation}\label{eq:integraleqsystem} \begin{dcases} \mathcal{S}^{k_m}_D[\Psi](x)-\mathcal{S}^{k_c}_D[\Phi](x)=F_1,& x\in\partial D,\\ \frac{1}{\varepsilon_m}\left(\frac{1}{2}I+\mathcal{K}^{k_m,*}_D\right)[\Psi](x)+\frac{1}{\varepsilon_c}\left(\frac{1}{2}I-\mathcal{K}^{k_c,*}_D\right)[\Phi](x)=F_2, & x\in\partial D, \end{dcases} \end{equation} and \begin{equation*} F_1=-u^\text{in}(x), \qquad F_2=-\frac{1}{\varepsilon_m}\frac{\partial u^\text{in}(x)}{\partial \nu}, \qquad x \in \partial D, \end{equation*} where $\mathcal{K}^{k_m,*}_D$ is the Neumann-Poincar\'e operator defined in definition~\ref{de:layerpotential}. The trace relations for the single layer potential are given in lemma~\ref{lem:symmetrisation}. \subsection{Scaling and small-volume approximation} The goal of this section is to establish an equivalent formulation for \eqref{eq:integraleqsystem} in the form $\mathcal{A}^{\frac{\omega\delta}{c}}[\Psi]= F$ (proposition \ref{prop:scalar_psi}), in order to write an asymptotic expansion of the operator $\mathcal{A}^{\frac{\omega\delta}{c}}$ (lemma \ref{le:small_vol_A}) and a spectral decomposition for the limiting operator $\mathcal{A}^{0}$ (proposition \ref{prop:spectralA0}). The scaling is new in this context, but the asymptotic expansion and the spectral decomposition were first obtained in \cite{ammari2017mathematicalscalar}. We recall them here for the sake of completeness. The proofs are quite lengthy and technical, so they are included in the appendix. Recall that $z$ is the centre of the resonator and $\delta$ its radius. We introduce the scaling $x=z+\delta X$. For each function $\Xi$ defined on $\partial D$, we define a corresponding function on $\partial B$ by $\widetilde{\Xi}(X) := \Xi(z+\delta X)$, $X \in \partial B$. The scaling properties of the integral operators are given in appendix~\ref{sec:scaling}. The solution $\widetilde{u}$ becomes \begin{equation} \label{eq:single-layer} \widetilde{u}(X)=\begin{dcases} \delta\mathcal{S}^{k_c\delta}_B[\widetilde{\Phi}](X), & X\in B,\\ u^\text{in}(z+\delta X)+\delta\mathcal{S}^{k_m\delta}_B[\widetilde{\Psi}](X), & X\in \mathbb{R}^d \setminus \overline{B}, \end{dcases} \end{equation} where the single-layer potential $\mathcal{S}^{k\delta}_B$ and Neumann-Poincar\'e operator $\mathcal{K}^{k\delta,*}_B$ are defined by the fundamental solution $\Gamma^{k\delta}$. The density pair $(\widetilde{\Phi},\widetilde{\Psi}) \in H^{-\frac{1}{2}}(\partial B)\times H^{-\frac{1}{2}}(\partial B)$ is the unique solution to \begin{equation*} \begin{dcases} \mathcal{S}^{k_m\delta}_B[\widetilde{\Psi}](X)-\mathcal{S}^{k_c\delta}_B[\widetilde{\Phi}](X)=\frac{1}{\delta} \widetilde{F}_1, & X\in\partial B,\\ \frac{1}{\varepsilon_m}\left(\frac{1}{2}I+\mathcal{K}^{k_m\delta,*}_B\right)[\widetilde{\Psi}](X)+\frac{1}{\varepsilon_c}\left(\frac{1}{2}I-\mathcal{K}^{k_c\delta,*}_B\right)[\widetilde{\Phi}](X)=\widetilde{F}_2,& X\in\partial B, \end{dcases} \end{equation*} and \begin{equation*} \widetilde{F}_1=-u^\text{in}(z+\delta X), \qquad \widetilde{F}_2=-\frac{1}{\delta\varepsilon_m}\frac{\partial u^\text{in}(z+\delta X)}{\partial \nu_X}, \qquad X \in \partial B. \end{equation*} Since $\mathcal{S}_{B}^{k_c\delta}:H^{-1/2} (\partial B)\rightarrow H^{1/2}(\partial B)$ is invertible for $k_c\delta$ small enough (see lemmas~\ref{lem:invertibility3D} and~\ref{lem:invertibility2D}), the following proposition holds. \begin{proposition} \label{prop:scalar_psi} For $d=2,3$, the following equation holds for $\widetilde{\Psi}$: \begin{equation}\label{eq:scalarpsi} \mathcal{A}_B^{\omega\delta/c}[\widetilde{\Psi}]=\widetilde{F}, \end{equation} where \begin{eqnarray} \mathcal{A}_B^{\omega\delta/c}&=&\frac{1}{\varepsilon_m}\left(\frac{1}{2}I+\mathcal{K}^{k_m\delta,*}_B\right)+\frac{1}{\varepsilon_c}\left(\frac{1}{2}I-\mathcal{K}^{k_c\delta,*}_B\right)\left(\mathcal{S}^{k_c\delta}_B\right)^{-1}\mathcal{S}^{k_m\delta}_B, \notag \\ \label{eq:F_scalar} \widetilde{F}&=&\widetilde{F}_2+\frac{1}{\delta \varepsilon_c}\left(\frac{1}{2}I-\mathcal{K}^{k_c\delta,*}_B\right)\left(\mathcal{S}^{k_c\delta}_B\right)^{-1}[\widetilde{F}_1]. \end{eqnarray} \end{proposition} \begin{lemma}[small-volume expansion]\label{le:small_vol_A} As $\omega\delta c^{-1}\rightarrow 0$, $\mathcal{A}_B^{\omega\delta/c}$ admits the following asymptotic expansion: \begin{equation}\label{eq:A_B} \mathcal{A}_B^{\omega\delta/c}= \begin{dcases} \mathcal{A}_B^{0}+\left(\omega\delta c^{-1}\right)^2\log{\left(\omega\delta c^{-1}\right)}\mathcal{A}_{B,1}+\mathcal{O}\left(\left(\omega\delta c^{-1}\right)^2\right), & d=2, \\ \mathcal{A}_B^{0}+\left(\omega\delta c^{-1}\right)^2\mathcal{A}_{B,2}+\mathcal{O}\left(\left(\omega\delta c^{-1}\right)^3\right), & d=3, \end{dcases} \end{equation} where \begin{equation}\label{eq:A_0} \mathcal{A}_B^{0}=\left(\frac{1}{2\varepsilon_c}+\frac{1}{2\varepsilon_m}\right)I-\left(\frac{1}{\varepsilon_c}-\frac{1}{\varepsilon_m}\right)\mathcal{K}^*_B, \end{equation} \begin{equation*} \mathcal{A}_{B,1} =\frac{1}{\varepsilon_m} \mathcal{K}^{(1)}_{B,1}(I -\mathcal{P}_{\mathcal{H}^*_0}) + \left(\frac{1}{2}I - \mathcal{K}^*_B\right) \widetilde{\mathcal{S}}_B^{-1} \mathcal{S}_{B,1}^{(1)} \left(\frac{1}{\varepsilon_c}I - \frac{1}{\varepsilon_m } \mathcal{P}_{\mathcal{H}^*_0} \right), \end{equation*} and \begin{equation*} \mathcal{A}_{B,2}=\frac{\varepsilon_m-\varepsilon_c}{\varepsilon_m\varepsilon_c}\left(\frac{1}{2}I-\mathcal{K}^*_B\right)\mathcal{S}_B^{-1}\mathcal{S}_{B,2}, \end{equation*} where the operators $\mathcal{P}_{\mathcal{H}^*_0}, \; \widetilde{\mathcal{S}}_B, \; \mathcal{S}_{B,1}^{(1)}, \; \mathcal{S}_{B,2}$ and $\mathcal{K}^{(1)}_{B,1}$ are defined in appendix~\ref{subsec:exp_operators}. \end{lemma} \begin{proof} See appendix~\ref{subsec:A}. \end{proof} The operator $\mathcal{A}_B^{\omega\delta/c}$ is not self-adjoint in $L^2$ so it can not be diagonalised directly to solve \eqref{eq:scalarpsi}. However, in the static regime, the operator $\mathcal{A}_B^0$ can be expressed simply with $\mathcal{K}^*_B$, which can be symmetrised in the Hilbert space $\mathcal{H}^*(\partial B)$ (see appendix \ref{subsec:symm}). \begin{lemma}[spectral decomposition of $\mathcal{K}_B^*$]\label{lem:spectralK} $\mathcal{K}^*_B$ is self-adjoint with respect to the inner product $\left\langle \cdot,\cdot\right\rangle_{\mathcal{H}^*(\partial B)}$. Moreover, it is compact, so its spectrum is discrete. The spectral theorem yields the decomposition \[ \mathcal{K}^*_B=\sum_{j=0}^{+\infty} \lambda_j\left\langle \cdot,\widetilde{\phi}_j\right\rangle_{\mathcal{H}^*(\partial B)}\widetilde{\phi}_j, \] where $\{\lambda_j\}_{j\in\mathbb{N}}$ are the eigenvalues of $\mathcal{K}^*_B$ and $\{\widetilde{\phi}_j\}_{j\in\mathbb{N}}$ their associated normalised eigenvectors. \end{lemma} \begin{proposition}[spectral decomposition of $\mathcal{A}_B^0$] \label{prop:spectralA0}The operator $\mathcal{A}_B^0$ has the spectral decomposition \begin{equation*} \mathcal{A}_B^0=\sum_{j=0}^{+\infty} \tau_j\left\langle \cdot,\widetilde{\phi}_j\right\rangle_{\mathcal{H}^*(\partial B)}\widetilde{\phi}_j, \end{equation*} where $(\lambda_j,\widetilde{\phi}_j)_{j\in\mathbb{N}}$ are the eigenvalues and normalised eigenfunctions of $\mathcal{K}_B^*$ in $\mathcal{H}^*(\partial B)$ and \begin{equation*} \tau_j=\left(\frac{1}{\varepsilon_c}-\frac{1}{\varepsilon_m}\right)\left(\lambda(\omega)-\lambda_j\right). \end{equation*} \end{proposition} \begin{proof} Direct consequence of lemma \ref{lem:spectralK} and \eqref{eq:A_0}. \end{proof} \begin{corollary} The spectral approximation of the static ($\omega=0$) solution is given by \begin{equation*} \widetilde{u}(X)-\widetilde{u}^\text{in}(X) = \sum_{j=0}^{\infty}\frac{1}{\tau_j} \left\langle \widetilde{F},\widetilde{\phi}_j\right\rangle_{\mathcal{H}^*(\partial B)} \delta \mathcal{S}_B[\widetilde{\phi}_j](X), \qquad X \in \mathbb{R}^d \setminus \overline{B}, \end{equation*} where $\widetilde{F}$ is defined in proposition \ref{prop:scalar_psi}. \end{corollary} \section{Modal decomposition of the field} \label{sec:modal_decomp} In this section we want to apply perturbation theory tools to express the solutions of \eqref{eq:scalarpsi} in terms of the eigenvectors of $\mathcal{K}^*_B$ that appear in the spectral decomposition of the limiting problem in proposition \ref{prop:spectralA0}, and to replace $\tau_j$ by a perturbed value $\tau_j(\omega\delta c^{-1})$. Classical perturbation theory will give us a Taylor expansion for $\tau_j(\omega\delta c^{-1})$ in $\omega\delta c^{-1}$ for any $j\in \mathbb{N}$ but the remainders and validity range of these expansions will depend on the index $j$ of the considered eigenvalue. In order to get a meaningful expansion of the scattered field we need to work with a finite number of modes. \subsection{Modal expansion truncation} \label{subsec:truncate} In practice, there is no need to consider the whole spectral decomposition of the field. It has been empirically reported that only a few modes actually contribute to the scattered field. The number of modes to consider increases as the source gets closer to the particle. In this section we give a mathematical explanation of this phenomenon : the modes $\widetilde{\phi}_j$ are eigenmodes of a pseudo-differential operator of order $-1$, and are oscillating functions. As in classical Fourier analysis, the decay with $j$ of the coefficients $\langle \widetilde{F},\widetilde{\phi}_j\rangle_{\mathcal{H}^*(\partial B)}$ will be determined by the regularity of the function $\widetilde{F}$ and the number of modes to consider will depend on the spatial variations of $\widetilde{F}$ over $\partial B$. In an homogeneous medium the incoming field is smooth and therefore we can expect a fast decay of the coefficients. \subsubsection{The three-dimensional case} \begin{proposition} \label{prop:polyndecay}For $B$, a strictly convex domain in $\mathbb{R}^3$ with $C^\infty$-smooth boundary, and $\widetilde{F}\in H^J(\partial B)$ for some $J \in \mathbb{N}^*$ we have :\begin{equation} \left\langle \widetilde{F}, \widetilde{\phi}_j\right\rangle_{\mathcal{H}^*(\partial B)}=o(j^{-J/4}) \text{~as~} j\rightarrow +\infty. \end{equation} \end{proposition} The proof relies on a theorem from \cite{ando2020} which itself uses the computation of the principal symbol of the Neumann-Poincar\'e operator done in \cite{miyanishi2018weyl}: \begin{theorem}[from \cite{ando2020}, p. 7]\label{theo:kang} For $B$, a strictly convex domain in $\mathbb{R}^3$ with $C^\infty$-smooth boundary, $\mathcal{K}_B^*$ has a finite number of non-positive eigenvalues. We can modify $\mathcal{K}_B^*$ by adding a finite dimensional smoothing operator to have a positive definite elliptic pseudo-differential operator of order -1, which we denote by $\widetilde{\mathcal{K}}_B^*$. For each real number $s\in\mathbb{R}$ there exist constants $c_s,C_s\in\mathbb{R}^+$ such that \begin{equation}\label{eq:ineq} c_s||\widetilde{\phi}||_{H^{s-1/2}(\partial B)} \leq ||\widetilde{\mathcal{K}}_B^*[\widetilde{\phi}]||_{H^{s+1/2}(\partial B)}\leq C_s||\widetilde{\phi}||_{H^{s-1/2}(\partial B)} \end{equation} for all $\widetilde{\phi} \in H^{s-1/2}(\partial B)$. Moreover there exists $j_0\in \mathbb{N}$ such that \begin{equation*} \widetilde{\mathcal{K}}_B^*[\widetilde{\phi}_j]=\mathcal{K}_B^*[\widetilde{\phi}_j] \quad \text{and}\quad \lambda_j>0 \quad\text{for all }\quad j \geq j_0. \end{equation*} \end{theorem} \begin{corollary}The operator $\mathbf{K}^*_B: L^2(\partial B) \longrightarrow L^2(\partial B)$ defined by $\mathbf{K}^*_B:=\left(-\mathcal{S}_B\right)^{\frac{1}{2}} \mathcal{K}_B^* \left(-\mathcal{S}_B\right)^{-\frac{1}{2}}$ is self-adjoint and has the same eigenvalues as $\mathcal{K}^*_B$. Its eigenvectors are $\widetilde{\psi}_j=\left(-\mathcal{S}_B\right)^{\frac{1}{2}}[\widetilde{\phi}_j]$. It can be modified by adding a finite dimensional smoothing operator to have a positive definite elliptic pseudo-differential operator of order -1, which we denote by $\widetilde{\mathbf{K}}_B^*$. For each real number $s\in\mathbb{R}$ there exist constants $c_s,C_s\in\mathbb{R}^+$ such that \begin{equation}\label{eq:ineq2} c_s||\widetilde{\phi}||_{H^{s-1/2}(\partial B)} \leq ||\widetilde{\mathbf{K}}_B^*[\widetilde{\phi}]||_{H^{s+1/2}(\partial B)}\leq C_s||\widetilde{\phi}||_{H^{s-1/2}(\partial B)} \end{equation} for all $\widetilde{\phi} \in H^{s-1/2}(\partial B)$. Moreover there exists $j_0\in \mathbb{N}$ such that \begin{equation*} \widetilde{\mathbf{K}}_B^*[\widetilde{\psi}_j]=\mathbf{K}_B^*[\widetilde{\psi}_j] \quad \text{and}\quad \lambda_j>0 \quad\text{for all }\quad j \geq j_0. \end{equation*} \end{corollary} \begin{proof} $\mathbf{K}^*_B$ has the same principal symbol as $\mathcal{K}_B^*$ \cite[p. 8]{miyanishi2020eigenvalues}. \end{proof} We will also need the decay estimate of the eigenvalues of $\mathcal{K}_B^*$: \begin{theorem}[from \cite{miyanishi2020eigenvalues}]\label{theo:asymptVP} For $B$, a strictly convex domain in $\mathbb{R}^3$ with $C^\infty$-smooth boundary the eigenvalues of the Neumann-Poincar\'e operator satisfy: \begin{align*} \lambda_j \sim C_B j^{-1/2}, \end{align*} with $C_B$ a constant depending only on $B$: \begin{align*} C_B=\left(\frac{3 W(\partial B)-2\pi\chi(\partial B) }{128\pi}\right), \end{align*} where $W(\partial B)$ and $\chi(\partial B)$ denote, respectively, the Willmore energy and the Euler characteristic of the boundary surface $\partial B$. \end{theorem} \begin{proof}[Proof of proposition \ref{prop:polyndecay}] Consider $\widetilde{F}\in H^J(\partial B)$. Since $\widetilde{\mathbf{K}}^*_B$ is a positive definite elliptic self-adjoint pseudo-differential operator of order $-1$ we can write \cite[p. 290]{demailly1997complex}: \begin{align*} H^{s}(\partial B) = \widetilde{\mathbf{K}}_B^*\left(H^{s-1}(\partial B)\right) \oplus \text{Ker\,}\left(\widetilde{\mathbf{K}}^*_B\right), \end{align*} where $\text{Ker\,}(\widetilde{\mathbf{K}}_B)$ denotes the kernel of $\widetilde{\mathbf{K}}_B^*$. The symbol $\oplus$ is to be understood in the $L^2$ scalar product sense. Hence for $j\geq j_0$: \begin{align*} \left\langle \widetilde{F}, \widetilde{\phi}_j\right\rangle_{\mathcal{H}^*(\partial B)} =& - \left\langle \widetilde{F}, \mathcal{S}_B[ \widetilde{\phi}_j]\right\rangle_{L^2(\partial B)} \\ =&- \left\langle \widetilde{F}, \left(-\mathcal{S}_B\right)^{\frac{1}{2}}[ \widetilde{\psi}_j]\right\rangle_{L^2(\partial B)} \\ =&- \left\langle \left(-\mathcal{S}_B\right)^{\frac{1}{2}}[ \widetilde{F}],\widetilde{\psi}_j\right\rangle_{L^2(\partial B)}. \end{align*} where we used the fact that $\left(-\mathcal{S}_B\right)^{\frac{1}{2}}$ is self-adjoint in $L^2(\partial B)$. Since $ \left(-\mathcal{S}_B\right)^{\frac{1}{2}}[ \widetilde{F}] \in H^{J+\frac{1}{2}}(\partial B)$ we have $ \left(-\mathcal{S}_B\right)^{\frac{1}{2}}[ \widetilde{F}]=\widetilde{\mathbf{K}}_B^*[\widetilde{G}^{(1)}] + \widetilde{F}^{(1)}_{\mathrm{ker}}$ with $\widetilde{G}^{(1)}\in H^{J-\frac{1}{2}}(\partial B)$. Then \begin{align*} \left\langle \left(-\mathcal{S}_B\right)^{\frac{1}{2}}[ \widetilde{F}],\widetilde{\psi}_j\right\rangle_{L^2(\partial B)}=& \left\langle\widetilde{\mathbf{K}}_B^*[\widetilde{G}^{(1)}] + \widetilde{F}_{\mathrm{ker}}^{(1)} , \widetilde{\psi}_j\right\rangle_{L^2(\partial B)} \\ =& \lambda_j \left\langle \widetilde{G}^{(1)}, \widetilde{\psi}_j \right\rangle_{L^2(\partial B)} + \left\langle \widetilde{F}^{(1)}_{\mathrm{ker}} , \widetilde{\psi}_j\right\rangle_{L^2(\partial B)}. \end{align*} Since the eigenvectors of $\widetilde{\mathbf{K}}_B^*$ are orthogonal in $L^2(\partial B)$ we have: \begin{align*} \left\langle \widetilde{F}, \widetilde{\phi}_j\right\rangle_{\mathcal{H}^*(\partial B)} =- \lambda_j \left\langle \widetilde{G}^{(1)} ,\widetilde{\psi}_j\right\rangle_{L^2(\partial B)}. \end{align*} We can now write $\widetilde{G}^{(1)}= \widetilde{\mathbf{K}}_B^*[\widetilde{G}^{(2)}] + \widetilde{F}^{(2)}_{\mathrm{ker}}$ with $\widetilde{G}^{(2)}\in H^{J-\frac{3}{2}}(\partial B)$ and we have \begin{align*} \left\langle \widetilde{G}^{(1)} ,\widetilde{\psi}_j\right\rangle_{L^2(\partial B)} = \lambda_j \left\langle \widetilde{G}^{(2)} ,\widetilde{\psi}_j\right\rangle_{L^2(\partial B)}. \end{align*} Iterating this procedure $J-1$ times yields \begin{align*} \left\langle \widetilde{G}^{(1)} ,\widetilde{\psi}_j\right\rangle_{L^2(\partial B)} = \lambda_j^{J-1} \left\langle \widetilde{G}^{(J)} ,\widetilde{\psi}_j\right\rangle_{L^2(\partial B)}. \end{align*} Hence\begin{align}\label{eq:iterateimage} \left\langle \widetilde{F}, \widetilde{\phi}_j\right\rangle_{\mathcal{H}^*(\partial B)} = -\lambda_j^J \left\langle \widetilde{G}^{(J)} ,\widetilde{\psi}_j\right\rangle_{L^2(\partial B)}. \end{align} We need to control the $L^2$-norm of $\widetilde{G}^{(J)}$. We can rewrite the orthogonal decomposition as $\left(-\mathcal{S}_B\right)^{\frac{1}{2}}[\widetilde{F}] = \left(\widetilde{\mathbf{K}}_B^*\right)^J[\widetilde{G}^{(J)}]+ \widetilde{F}_{\mathrm{ker}}^{(1)}$. Composing by $\widetilde{\mathbf{K}}_B^*$ we get: \begin{align*} \widetilde{\mathbf{K}}_B^*\circ \left(-\mathcal{S}_B\right)^{\frac{1}{2}}[ \widetilde{F}] = \left(\widetilde{\mathbf{K}}_B^*\right)^{J+1}[\widetilde{G}^{(J)}]. \end{align*} Using the right-hand side of \eqref{eq:ineq2} with $s=J+\frac{1}{2}$ we get \begin{align*} \left\Vert \left(\widetilde{\mathbf{K}}_B^*\right)^{J+1}[\widetilde{G}^{(J)}] \right\Vert_{H^{J+1}(\partial B)} \leq C_{J+\frac{1}{2}} \left\Vert \left(-\mathcal{S}_B\right)^{\frac{1}{2}}[ \widetilde{F}]\right\Vert_{H^J(\partial B)}. \end{align*} Using $J+1$ times the left hand side of \eqref{eq:ineq2} with $s-\frac{1}{2}=0,1,\ldots,J$ yields \begin{align*} \left\Vert \widetilde{G}^{(J)}\right\Vert_{L^2(\partial B)} \leq & \left(\prod_{s=0}^{J} \frac{1}{c_{s+\frac{1}{2}}} \right)\left\Vert \left(\widetilde{\mathbf{K}}_B^*\right)^{J+1}[\widetilde{G}^{(J)}]\right\Vert_{H^{J+1}(\partial B)} \\ \leq & C_{J+\frac{1}{2}}\left(\prod_{s=0}^{J} \frac{1}{c_{s+\frac{1}{2}}} \right) \left\Vert \left(-\mathcal{S}_B\right)^{\frac{1}{2}}[ \widetilde{F}]\right\Vert_{H^{J}(\partial B)}. \end{align*} Using the Cauchy-Schwartz inequality in \eqref{eq:iterateimage} and the fact that $\Vert \widetilde{\psi}_j\Vert_{L^2(\partial B)}=1$ ($\mathcal{S}_B$ is an isometry): \begin{align*} \left\vert \left\langle \widetilde{F}, \widetilde{\phi}_j\right\rangle_{\mathcal{H}^*(\partial B)} \right\vert \leq C\lambda_j^J \Vert \widetilde{F} \Vert_{H^{J-\frac{1}{2}}(\partial B)}, \end{align*} where $C=C_{J+\frac{1}{2}}\left(\prod_{s=0}^{J} \frac{1}{c_{s+\frac{1}{2}}} \right)$ is independent of $j$. Using theorem \ref{theo:asymptVP} we can see that for $j$ large enough since $\lambda_j \sim C_B j^{-1/2}$ we have: \begin{align*} \left\vert \left\langle \widetilde{F}, \widetilde{\phi}_j\right\rangle_{\mathcal{H}^*(\partial B)} \right\vert \leq j^{-J/2}C (C_B)^J \Vert \widetilde{F} \Vert_{H^{J-\frac{1}{2}}(\partial B)}, \end{align*} and since $j^{-J/2} C (C_B)^J = o\left(j^{-J/4}\right)$ we get the result. \end{proof} \subsubsection{The two-dimensional case} In two dimensions, the picture is a slightly different. Indeed, zero is in the essential spectrum of $\mathcal{K}_D^*$. The eigenspace associated to zero has infinite dimension and there are infinitely many negative eigenvalues. As a result, $\mathcal{K}_D^*$ can not be modified into a positive operator by a finite dimensional operator. However, for a certain class of domains, it is possible to show that there is a finite number of plasmonic resonances. For example, it was shown in \cite{putinar19} that an algebraic domain of class $\mathcal{Q}$ has asymptotically a finite number of plasmonic resonances. The asymptotic parameter is the deformation from the unit circle. For a larger class of domains the decay of the coefficients $ \langle F, \widetilde{\phi}_j\rangle_{\mathcal{H}^*(\partial D)} $ can be checked numerically (see section \ref{sec:num}). \subsection{Modal decomposition} Since the incoming wave is solution of the homogeneous Helmholtz equation in the background medium, standard elliptic regularity theory gives us $u^\text{in}\in C^\infty (\mathbb{R}^d)$. Moreover, the particle $B$ is assumed to be $C^\infty$, so the source term in equation \eqref{eq:scalarpsi}, i.e. the function $\widetilde{F}$, is smooth on $\partial B$. Therefore using proposition \ref{prop:polyndecay} we have a super-polynomial decay of the coefficients $\langle\widetilde{F}, \widetilde{\phi}_j\rangle_{\mathcal{H}^*(\partial B)}$, and we can consider that only a finite number of modes are excited. The number $J$ of modes to consider depends on the incoming field. \begin{proposition} Assume that $\widetilde{F}= \sum_{j=1}^J \left\langle\widetilde{F}, \widetilde{\phi}_j\right\rangle_{\mathcal{H}^*(\partial B)} \widetilde{\phi}_j$ on $\partial B$ for some $J\in \mathbb{N}^*$. The spectral approximation of the scattered field as $\omega\delta c^{-1}\rightarrow 0$ is given by \begin{equation*} \widetilde{u}(X)-\widetilde{u}^\text{in}(X) = \sum_{j=0}^{J}\frac{1}{\tau_j(\omega)} \left\langle \widetilde{F},\widetilde{\phi}_j\right\rangle_{\mathcal{H}^*(\partial B)} \delta \mathcal{S}^{k_m\delta}_B[\widetilde{\phi}_j](X), \qquad X \in \mathbb{R}^d \setminus \overline{B}, \end{equation*} where \begin{equation*} \tau_j(\omega)= \begin{dcases} \tau_j+\left(\omega \delta c^{-1}\right)^2 \log{\left(\omega \delta c^{-1}\right)}\tau_{j,1}+\mathcal{O}\left(\left(\omega \delta c^{-1}\right)^2\right), & d=2, \\ \tau_j+\left(\omega \delta c^{-1}\right)^2\tau_{j,2}+\mathcal{O}\left(\left(\omega \delta c^{-1}\right)^3\right), & d=3, \end{dcases} \end{equation*} with \[ \tau_{j,1}= \left\langle \mathcal{A}_{B,1}\widetilde{\phi}_j,\widetilde{\phi}_j\right\rangle_{\mathcal{H}^*(\partial B)}, \qquad \tau_{j,2}= \left\langle \mathcal{A}_{B,2}\widetilde{\phi}_j,\widetilde{\phi}_j\right\rangle_{\mathcal{H}^*(\partial B)}, \] and $\widetilde{F}$ is defined in proposition \ref{prop:scalar_psi}. \end{proposition} \begin{proof} Note that $\{\widetilde{\phi}_j\}_{j\in\mathbb{N}}$ forms an orthonormal basis of $\mathcal{H}^*(\partial B)$. Writing $\left(\mathcal{A}_B^0+\mathcal{A}_B^{\omega\delta/c}-\mathcal{A}_B^0\right)[\widetilde{\Psi}]=\widetilde{F}$ and using the decomposition of $\widetilde{\Psi}$ in $\mathcal{H}^*(\partial B)$, $\widetilde{\Psi}=\sum_{j=0}^{+\infty} \left\langle \widetilde{\Psi},\widetilde{\phi}_j\right\rangle_{\mathcal{H}^*(\partial B)}\widetilde{\phi}_j$, yields the following: \begin{equation*} \left\langle\widetilde{\Psi},\widetilde{\phi}_j\right\rangle_{\mathcal{H}^*(\partial B)}= \left\{ \begin{aligned} & \frac{1}{\tau_j+\left\langle\left(\mathcal{A}_B^{\omega\delta/c} - \mathcal{A}_B^{0} \right)\widetilde{\phi}_j,\widetilde{\phi}_j\right\rangle_{\mathcal{H}^*(\partial B)}}\left\langle \widetilde{F},\widetilde{\phi}_j\right\rangle_{\mathcal{H}^*(\partial B)} \qquad & j\leq J \\ &0 \qquad & j>J. \end{aligned} \right. \end{equation*} Using \eqref{eq:scalar_solution} and \eqref{eq:A_B} concludes the proof. \end{proof} For each normalised eigenfunction of $\mathcal{K}^*_B$, we consider the corresponding function on $\partial D$, \begin{equation*} \phi_j(x):=\widetilde{\phi}_j\left(\frac{x-z}{\delta}\right). \end{equation*} Here $\{\phi_j\}_{j\in\mathbb{N}}$ are the rescaled non-normalised eigenfunctions of $\mathcal{K}_D^*$. Let us introduce \begin{equation*} \varphi_j:=\frac{\phi_j}{||\phi_j||_{\mathcal{H}^*(\partial D)}}. \end{equation*} Since $||\widetilde{\phi}_j||_{\mathcal{H}^*(\partial B)}=1$, we have (see appendix~\ref{sec:scaling}) \[ \varphi_j = \begin{cases} \delta^{-1} \phi_j, & d=2,\\ \delta^{-3/2}\phi_j, & d=3. \end{cases} \] Going back to the original unscaled problem: \begin{proposition} \label{prop:spec-decomp} As $\omega\delta c^{-1}\ll 1$, the spectral decomposition of the field is as follows \begin{align}\label{eq:spec-decomp} u(x) =\left\{\begin{aligned} & \sum_{j=0}^{J}\frac{1}{\tau_j(\omega)}\left\langle F,\varphi_j\right\rangle_{\mathcal{H}^*(\partial D)}\mathcal{S}^{k_m}_D[\varphi_j](x) + u^\text{in}(x), &\mbox{} x \in \mathbb{R}^d \setminus \overline{D},\\ & \sum_{j=0}^{J}\frac{1}{\tau_j(\omega)}\left\langle F,\varphi_j\right\rangle_{\mathcal{H}^*(\partial D)}\mathcal{S}^{k_c}_D[\varphi_j](x), &\mbox{} x \in D.\ \end{aligned}\right. \end{align} \end{proposition} \begin{proof} The scaling lemma~\ref{lem:scaling_1} gives $\mathcal{S}^{k_m\delta}_B[\widetilde{\phi}_j](X)=\delta^{-1}\mathcal{S}^{k_m}_D[\phi_j](x)$ for $d=2,3$. From lemma~\ref{lem:scaling_2}, we have $\langle \widetilde{F},\widetilde{\phi}_j \rangle_{\mathcal{H}^*(\partial B)}=\delta^{-3}\left\langle F,\phi_j \right\rangle_{\mathcal{H}^*(\partial D)}$ for $d=3$ and $\langle \widetilde{F},\widetilde{\phi}_j \rangle_{\mathcal{H}^*(\partial B)}=\delta^{-2}\left\langle F,\phi_j \right\rangle_{\mathcal{H}^*(\partial D)}$ for $d=2$. \end{proof} \section{Plasmonic resonances}\label{sec:res} \subsection{Size dependant resonant frequencies} In this section we calculate size and frequency dependent plasmonic resonances. Let $j\in \{0,..,J\}$. Recall that \begin{equation*} \tau_j(\omega)= \begin{dcases} \tau_j+\left(\omega \delta c^{-1}\right)^2 \log{\left(\omega \delta c^{-1}\right)}\tau_{j,1}+\mathcal{O}\left(\left(\omega \delta c^{-1}\right)^2\right), & d=2, \\ \tau_j+\left(\omega \delta c^{-1}\right)^2\tau_{j,2}+\mathcal{O}\left(\left(\omega \delta c^{-1}\right)^3\right), & d=3. \end{dcases} \end{equation*} \begin{definition} We say that $\omega$ is a static plasmonic resonance if $\left|\tau_j\right|=0$. \end{definition} \begin{definition} We say that $\omega$ is first-order corrected plasmonic resonance if $$\left| \tau_j+(\omega\delta c^{-1})^2\log{(\omega\delta c^{-1})}\tau_{j,1}\right| =0 $$ or $$\left| \tau_j+(\omega\delta c^{-1})^2\tau_{j,2}\right| =0,$$ with $d=2$ or $d=3$, respectively. \end{definition} \begin{remark} For $j=0$, we have $\tau_0=1/\varepsilon_m$, which is of size one by assumption. We exclude $j=0$ from the set of resonances. \end{remark} For $j\geq 1$ we have $\mathcal{P}_{\mathcal{H}_0^*}[\widetilde{\phi}_j]=\widetilde{\phi}_j$. Let us define \begin{equation*} \alpha_j:= \begin{dcases} \left\langle \left(\frac{1}{2}I-\mathcal{K}^*_B\right)\widetilde{\mathcal{S}}_B^{-1}\mathcal{S}_{B,1}^{(1)}[\widetilde{\phi}_j], \widetilde{\phi}_j \right\rangle_{\mathcal{H}^*(\partial B)} , & d=2, \\ \left\langle \left(\frac{1}{2}I-\mathcal{K}^*_B\right)\mathcal{S}_B^{-1}\mathcal{S}_{B,2}[\widetilde{\phi}_j], \widetilde{\phi}_j \right\rangle_{\mathcal{H}^*(\partial B)} , & d=3. \end{dcases} \end{equation*} Then, we can calculate \begin{equation*} \tau_j(\omega)= \begin{dcases} \frac{\varepsilon_m-\varepsilon_c}{\varepsilon_m\varepsilon_c}\left(\lambda(\omega)-\lambda_j+\left(\omega\delta c^{-1}\right)^2\log{\left(\omega\delta c^{-1}\right)}\alpha_j\right)+\mathcal{O}\left(\left(\omega \delta c^{-1}\right)^2\right), & d=2, \\ \frac{\varepsilon_m-\varepsilon_c}{\varepsilon_m\varepsilon_c}\left(\lambda(\omega)-\lambda_j+\left(\omega\delta c^{-1}\right)^2\alpha_j\right)+\mathcal{O}\left(\left(\omega \delta c^{-1}\right)^3\right), & d=3. \end{dcases} \end{equation*} \begin{lemma} We have $\alpha_j \in \mathbb{R}$ and \begin{equation*} \alpha_j:= \begin{dcases} \left(\lambda_j-\frac{1}{2} \right) \left\langle \mathcal{S}_{B,1}^{(1)} [\widetilde{\phi}_j], \widetilde{\phi}_j\right\rangle_{-1/2,1/2} , & d=2,\\ \left(\lambda_j-\frac{1}{2} \right) \left\langle \mathcal{S}_{B,2} [\widetilde{\phi}_j], \widetilde{\phi}_j\right\rangle_{-1/2,1/2}, & d=3. \end{dcases} \end{equation*} \end{lemma} In what follows we use the lower-case character $\omega$ for real frequencies and the upper-case character $\Omega$ for complex frequencies. \begin{proposition}\label{prop:reso_3D} Using the Drude model \eqref{eq:drude}, the three-dimensional first-order corrected plasmonic resonances $\Omega_j^\pm(\delta):=\pm\Omega'_j+i\Omega''_j$ all lie in the lower part of the complex plane and their modulus is bounded. In the case where we take the medium to be vacuum, i.e., $\varepsilon_m=\varepsilon_0$ we obtain explicitly for $|\lambda_j+1/2| > 10^{-2}$ (this occurs, for example, when $B$ is a ball \cite{photonic}): \begin{equation*} \Omega_j' = \sqrt{\frac{\omega_p^2(\lambda_j+1/2)}{1+(\omega_p\delta c^{-1})^2\alpha_j} - \frac{ \mathrm{T}^{-2}}{4\left[1+\left(\omega_p \delta c^{-1}\right)^2 \alpha_j\right]^2}}\quad \text{and }\quad \Omega_j'' = -\frac{\mathrm{T}^{-1}}{2\left[1+\left(\omega_p \delta c^{-1}\right)^2 \alpha_j\right]}. \end{equation*} Moreover, they are bounded \begin{equation*} |\Omega_j| \leq 2\max \left\{\frac{\mathrm{T}^{-1}}{\left|1+\left(\omega_p\delta c^{-1}\right)^2\alpha_j\right|},\frac{\omega_p\sqrt{\lambda_j+1/2}}{\sqrt{\left|1+\left(\omega_p\delta c^{-1}\right)^2\alpha_j\right|}}\right\}. \end{equation*} \end{proposition} \begin{proof} We have that $\tau_j\left(\Omega_j\right) = 0$ if and only if \[ \frac{\Omega_j^2+i\Omega_j \mathrm{T}^{-1}}{\omega_p^2} -\frac{1}{2} - \lambda_j + \frac{\Omega_j^2\delta^2}{c^2} \alpha_j=0, \] that is \[ \begin{cases} \displaystyle \frac{1}{\omega_p^2}\left(\Omega_j'^2-\Omega_j''^2\right) - \frac{1}{2} - \lambda_j + \left(\Omega_j'^2-\Omega_j''^2\right) \frac{\delta^2}{c^2} \alpha_j - \frac{1}{\omega_p^2\mathrm{T}}\Omega_j''^2=0, \\ \displaystyle \frac{2}{\omega_p^2}\Omega_j' \Omega_j'' + 2\Omega_j' \Omega_j''\frac{\delta^2 }{c^2} \alpha_j + \frac{1}{\omega_p^2 \mathrm{T}} \Omega_j' =0. \end{cases} \] Because $\delta\omega_p c^{-1} \ll 1$, we get the desired result. Lagrange improved upper-bound for roots of polynomials concludes the proof \cite{lagrange}. \end{proof} \begin{definition} \label{def:range_3d} In three dimensions, we define the resonance radius as \begin{equation*} \mathcal{R}(\delta):=\max_{j\in \{1,..,J\}}\max \left\{\frac{2\mathrm{T}^{-1}}{\left|1+\left(\omega_p\delta c^{-1}\right)^2\alpha_j\right|},\frac{2\omega_p\sqrt{\lambda_j+1/2}}{\left|1+\left(\omega_p\delta c^{-1}\right)^2\alpha_j\right|^{1/2}}\right\}. \end{equation*} \end{definition} \begin{remark} This resonance radius gives our method a range of validity. We compute resonant frequencies in a perturbative quasistatic regime. So by checking that \begin{align*} \mathcal{R}(\delta) \delta c^{-1} < \frac{1}{2}, \end{align*} we ensure that the largest plasmonic frequency lies in a region that is still considered as \emph{low-frequency} for a particle of size $\delta$. If we pick the size to be too large, namely such that $\mathcal{R}(\delta) \delta c^{-1}$ is bigger than one, it means that the method is not self-consistent, as the largest resonant frequency might not satisfy the $\omega \delta c^{-1} <1/2$. \end{remark} \begin{proposition}\label{prop:reso_2D} In vacuum, and using the Drude model \eqref{eq:drude}, the two-dimensional first-order corrected plasmonic resonances are the roots $\left(\Omega_j\right)_{1\leq j\leq J}\in \mathbb{C}$ of the following equation \begin{equation}\label{eq:2d_reso_shifted} \frac{\Omega_j^2+i\Omega_j \mathrm{T}^{-1}}{\omega_p^2} -\frac{1}{2} - \lambda_j +\left(\Omega_j\delta c^{-1}\right)^2 \log{\left(\Omega_j\delta c^{-1}\right)} \alpha_j=0. \end{equation} \end{proposition} \begin{remark} We can compute an approximation of the roots of \eqref{eq:2d_reso_shifted} by computing in the first place the static resonances $\left(\Omega_{s,j}\right)_{1\leq j\leq J}$. Solving $\tau_j=0$ yields \begin{equation*} \Omega^\pm_{s,j}=\pm \sqrt{\omega_p^2\left(\lambda_j+\frac{1}{2}\right) - \frac{1}{4T^2}} - \frac{i}{2T}. \end{equation*} Replacing the dynamic frequency in the logarithm by its static approximation, we transform \eqref{eq:2d_reso_shifted} into the quadratic equation \begin{equation*} \frac{\Omega_j^2+i\Omega_j \mathrm{T}^{-1}}{\omega_p^2} -\frac{1}{2} - \lambda_j +\left(\Omega_j\delta c^{-1}\right)^2 \log{\left(\Omega_{s,j}\delta c^{-1}\right)} \alpha_j=0. \end{equation*} We get \begin{equation} \Omega_j^\pm(\delta)=\frac{-i\mathrm{T}^{-1}\pm\sqrt{4\omega_p^2\left(\lambda_j+1/2\right)\left[1+\alpha_j\left(\omega_p\delta c^{-1}\right)^2\log{\left(\Omega^\pm_{s,j}\delta c^{-1}\right)}\right] }}{2\left[1+\alpha_j\left(\omega_p\delta c^{-1}\right)^2\log{\left(\Omega^\pm_{s,j}\delta c^{-1}\right)}\right]}. \label{eq:dynamic} \end{equation} \end{remark} \begin{definition} \label{def:range_2d} In two dimensions, we define the resonance radius as \begin{equation*} \mathcal{R}(\delta):=\max_{j\in \{1,..,J\}}\max \left\{\frac{2\mathrm{T}^{-1}}{\left|1+\alpha_j\left(\omega_p\delta c^{-1}\right)^2\log{\left(\Omega^\pm_{s,j}\delta c^{-1}\right)}\right|},\frac{2\omega_p\sqrt{\lambda_j+1/2}}{\left|1+\alpha_j\left(\omega_p\delta c^{-1}\right)^2\log{\left(\Omega^\pm_{s,j}\delta c^{-1}\right)}\right|^{1/2}}\right\}. \end{equation*} \end{definition} \subsection{Plasmonic quasi-normal modes}\label{sec:QNMdef} Quasi-normal modes are formally defined as solutions of the source-free wave equation \cite{lalanneReview}. Using the representation formula \eqref{eq:scalar_solution}, we can now define, as in the physics literature, plasmonic quasi-normal modes $(e_j^{\pm})_{j\in\mathbb{N}}$ that oscillate at complex frequencies $\Omega_j^{\pm}(\delta)$: \begin{align}\label{eq:defQNM} e_j^{\pm}(x)= \left\{\begin{aligned} & \mathcal{S}^{\Omega_j^{\pm}(\delta)c^{-1}}_D[\varphi_j](x), &\mbox{ } x\in \mathbb{R}^d\setminus \overline{D},\\ & \mathcal{S}^{\Omega_j^{\pm}(\delta)\sqrt{\varepsilon_c \mu_m}}_D[\varphi_j](x),&\mbox{ } x\in D. \end{aligned}\right. \end{align} These $(e_j^{\pm})_{j\in\mathbb{N}}$ solve the source-free Helmholtz equation and satisfy the radiation condition at infinity, but they diverge exponentially fast as $\vert x\vert \rightarrow \infty$. \begin{remark} In the physics literature (see \cite[equation (1.1)]{lalanneReview} for instance) one can often find representations of the scattered field in the form \begin{align*} u(x,\omega) = \sum_j \alpha_j(u^\text{in}, \omega) e_j^\pm(x), \end{align*} where $\alpha_j$ are \emph{excitation coefficients} depending on the source and independent of the space variable $x$. These representations are problematic for several reasons. The first one is that any representation of this type is not solution to the Helmholtz equation for $\omega \in \mathbb{C}$ as soon as there are two or more modes oscillating at different frequencies. The second problem is that in these representations, the scattered wave $u-u^\text{in}$ is not in $L^2(\mathbb{R}^d)$ and only compact subspaces of $\mathbb{R}^d$ can be considered. Then, a renormalisation process is necessary for the eigenmodes since they diverge exponentially. Even though the study of these modes \emph{individually} can give physical insight to a system (like for example by studying the mode volume quantity \cite{cognee2019mapping}), they cannot be used in frequency domain representation formulae to solve the scattering problem. \end{remark} \section{Time domain approximation of the scattered field}\label{sec:time} In the following section we show that even though they are irrelevant for frequency domain representation, quasi-normal modes can be used to approximate the field in the time domain. The idea is to get around costly time domain computations by pre-computing the modes of the system and then expressing the response of the system to any source in terms of the modes. In the physics literature (for example \cite[eq. (1.2)]{lalanneReview}) the field in the time domain is expressed under the form \begin{align}\label{eq:lalannetimedomain} u(x,t)= \Re\, \sum_j \beta_j(t) e_j^\pm(x). \end{align} The problem with this type of expansions is that if $\vert x \vert$ is big then $e_j^\pm(x)$ is exponentially large and the computation of $u(x,t)$ is not very stable if the modes are pre-computed. We will show in this section that it is possible to express the scattered field in the time domain in a similar expansion, but with non-diverging, pre-computable quantities similar to the quasi-normal modes. \subsection{The three-dimensional case} Here we state the main result of the paper, theorem \ref{theo:resonanceexpansion3}, and discuss the result. \subsubsection{The modal approximation} Let $\Gamma^{k_m}(\cdot,s)$, i.e., the Green's function for the Helmholtz equation introduced in definition~\ref{de:greenfuction}, be the incident wave $u^\text{in}$ in three dimensions. Given a wideband signal $\widehat{f}:t \mapsto \widehat{f}(t) \in C_0^{\infty}([0,C_1])$, for $C_1>0$, we want to express the time domain response of the electric field to an oscillating dipole placed at a source point $s$. This means that for a fixed $\delta$ we can pick an excitation signal such that most of the frequency content is in the \emph{low frequencies} but large enough to excite the plasmonic resonances. We can pick $\eta \ll 1$ and $\rho \geq \mathcal{R}(\delta)$ such that \begin{align*} \int_{\mathbb{R} \setminus[-\rho,\rho]} \vert f(\omega) \vert^2 \mathrm{d} \omega \leq \eta, \\ \frac{\rho \delta}{c} \leq 1, \end{align*} where $f:\omega\mapsto f(\omega)$ is the Fourier transform of $\widehat{f}$. In practice we take $\rho= \mathcal{R}(\delta)$. The incident field has the following form in the time domain: \begin{equation*} \widehat{u}^\text{in}(x,t)=\int_{\mathbb{R}} \Gamma^{\frac{\omega}{c}}(x,s) f(\omega)e^{-i\omega t} \mathrm{d}\omega=\frac{\widehat{f}(t-|x-s|/c)}{4\pi|x-s|}. \end{equation*} The goal of this section is to establish a resonance expansion for the low-frequency part of the scattered electric field in the time domain. Introduce, for $\rho>0$, the truncated inverse Fourier transform of the scattered field $u^{\text{sca}}$ given by \begin{equation*} P_\rho\left[u^\text{sca}\right](x,t):=\int_{-\rho}^{\rho} u^{\text{sca}}(x,\omega) e^{-i\omega t} \mathrm{d}\omega. \end{equation*} Recall that $z$ is the centre of the resonator and $\delta$ its radius. Let us define $$t_0^\pm(s,x):=\frac{1}{c}\left(|s-z|+|x-z|\pm 2\delta\right)\pm C_1,$$ the time it takes to the wideband signal to reach first the scatterer and then the observation point $x$. The term $\pm 2 \delta/c$ accounts for the maximal timespan spent inside the particle. Recall the spectral decomposition in the frequency domain (proposition \ref{prop:spec-decomp}) for $x \in \mathbb{R}^3\setminus \overline{D}$: \begin{equation*} u^\text{sca}(x,\omega)=\left(u-u^\text{in}\right)(x,\omega)=\sum_{j=1}^{J}\frac{1}{\tau_j(\omega)}\left\langle F,\varphi_j\right\rangle_{\mathcal{H}^*(\partial D)}\mathcal{S}^{\frac{\omega}{c}}_D[\varphi_j](x). \end{equation*} \begin{theorem}\label{theo:resonanceexpansion3} Let $N\in\mathbb{N}$. For $J\in\mathbb{N}$ large enough, the scattered field has the following form in the time domain for $x\in\mathbb{R}^3\setminus \overline{D}$: \begin{equation} P_{\rho}\left[u^\text{sca}\right](x,t)= \begin{dcases} \mathcal{O}\left(\delta^4 \rho^{-N}\right), &\mbox{ } t\leq t_0^-, \\ 2\pi i\sum_{j=1}^J C_{\Omega_j^\pm(\delta)} \langle F, \varphi_j \rangle_{\mathcal{H}^*(\partial D)} e_j^\pm(x) e^{-i\Omega_j^\pm(\delta) t}+\mathcal{O}\left(\frac{\delta^4}{t}\rho^{-N}\right), &\mbox{ }t\geq t_0^+. \end{dcases} \label{eq:resonanceexpansion3} \end{equation} The complex numbers $\Omega_j^\pm(\delta)$ are the resonant frequencies given by proposition~\ref{prop:reso_3D}. The fields $e_j$ are the classical quasi-normal modes defined in section \ref{sec:QNMdef}. $C_{\Omega_j^\pm(\delta)}$ is a constant depending only on $j$, the size $\delta$ and the model for $\varepsilon_c(\omega)$: \begin{align*} C_{\Omega_j^\pm(\delta)}:=\varepsilon_0 \frac{\left({\Omega^\pm_j(\delta)}^2 + i \Omega^\pm_j(\delta) T^{-1} -\omega_p^2\right) }{\left(1+\left(\omega_p\delta c^{-1}\right)^2 \alpha_j\right)\left(\Omega^\pm_j(\delta)-\Omega^\mp_j(\delta)\right)} . \end{align*} \end{theorem} \begin{remark} The resonant frequencies $\left\{\Omega_j^\pm(\delta)\right\}_{1\leq j\leq J}$ have negative imaginary parts, so theorem~\ref{theo:resonanceexpansion3} expresses the scattered field as the sum of decaying oscillating fields. The imaginary part of $\Omega_j^\pm(\delta)$ accounts for absorption losses in the particle as well as radiative losses. \end{remark} \begin{remark}[about the remainder $\rho$] Since for a particle of finite size $\delta$ our expansion only holds for a range of frequencies $\omega$ such that $\omega\delta c^{-1} <1 $, we cannot compute the full inverse Fourier transform and we have a remainder that depends on the maximum frequency that we can use. Nevertheless that maximum frequency $\rho$ behaves as $c/\delta$ and we can see that the remainder gets arbitrarily small for small particles. For a completely point-like particle one would get a zero remainder. \end{remark} \begin{remark}\label{rem:fourier} If we had access to the full inverse Fourier transform of the field, of course, since the inverse Fourier transform of a function which is analytic in the upper-half plane is \emph{causal} we would find that in the case $t\leq \left(|s-z|+|x-z|-2\delta\right)/c$, $\widehat{u}^{\text{sca}}(x,t)= 0$. Nevertheless, our method gives the resonant frequencies only in the \emph{low-frequency} regime. Therefore we only have an approximation for the \emph{low-frequency} part of the scattered field, which does not have a compact support in time. Nevertheless, as shown in the numerical section \ref{section:exactvsreference}, the low-frequency part of the scattered field is actually a good approximation for the scattered field. There does not seem to be any resonant frequencies for $\omega> \mathcal{R}(\delta)$. This is highly non-trivial and we do not have a mathematical justification for that. Physically though, it can be explained by looking at the Drude model and noting that when $\omega \rightarrow\infty$, $\varepsilon (\omega)\longrightarrow 1$. The metal does not really interact with light at high frequencies. \end{remark} \subsubsection{Alternative formulation with non-diverging causal quasi-normal modes} Even though $\vert e_j^\pm(x)\vert\longrightarrow \infty $ when $\vert x\vert \rightarrow \infty$, no terms diverge in \eqref{eq:resonanceexpansion3}. Indeed we can rewrite: \begin{align*} e_j^\pm(x) e^{-i\Omega_j^\pm(\delta) t} = & e_j^\pm(x)e^{-i\Omega_j^\pm(\delta) t_0^+} e^{-i\Omega_j^\pm(\delta) (t-t_0)}\\ =& e_j^\pm(x)e^{-i\Omega_j^\pm(\delta) \left(|s-z|+|x-z|+ 2\delta\right)c^{-1}+ C_1} e^{-i\Omega_j^\pm(\delta) (t-t_0^+)}\\ =& C_{u^\text{in}, \delta} e_j^\pm(x) e^{-i\Omega_j^\pm(\delta) |x-z|c^{-1}}e^{-i\Omega_j^\pm(\delta) (t-t_0^+)}, \end{align*} where $C_{u^\text{in}, \delta}$ depends only on the incoming field and the particle size. We can define the following \emph{causal plasmonic quasi-normal modes} $(E_j^\pm)_{j\in\mathbb{N}}$ at the complex frequency $\Omega_j^\pm(\delta)$: \begin{align}\label{eq:defQNMcausal} E_j^{\pm}(x)= \left\{\begin{aligned} & \mathcal{S}^{\Omega^\pm_j(\delta) c^{-1}}_D[\varphi_j](x)e^{-i\Omega_j^\pm(\delta) |x-z|c^{-1}}, &\mbox{ }x\in \mathbb{R}^d\setminus \overline{D},\\ & \mathcal{S}^{\Omega^\pm_j(\delta)\sqrt{\varepsilon_c \mu_m}}_D[\varphi_j](x), &\mbox{ } x\in D. \end{aligned}\right. \end{align} \begin{remark} When referring to $E_j^\pm$, the term \emph{mode} is inaccurate, as $E_j^\pm$ does not solve the Helmholtz equation. But since the $(E_j^\pm)_{j\in\mathbb{N}}$ are built from modes with a complex phase correction, we still call them modes in a loose sense of the term. \end{remark} Theorem \ref{theo:resonanceexpansion3} can be re-stated: \begin{theorem}[alternative causal expansion]\label{theo:resonanceexpansion3-alternate} \begin{equation} P_{\rho}\left[u^\text{sca}\right](x,t)= \begin{dcases} \mathcal{O}\left(\delta^4 \rho^{-N}\right), &\mbox{ } t\leq t_0^-, \\ 2\pi i\sum_{j=1}^J \beta_j^{\delta}(u^\text{in}) E_j^\pm(x) e^{-i\Omega_j^\pm(\delta) (t-t_0^+)}+\mathcal{O}\left(\frac{\delta^4}{t}\rho^{-N}\right), &\mbox{ }t\geq t_0^+, \end{dcases} \label{eq:resonanceexpansion3-alternate} \end{equation} where $ \beta_j^{\delta}(u^\text{in}) = C_{\Omega_j^\pm(\delta)} \langle F, \varphi_j \rangle_{\mathcal{H}^*(\partial D)}e^{-i\Omega_j^\pm(\delta) \left(|s-z|+ 2\delta\right)c^{-1}+ C_1}.$ \end{theorem} \begin{remark} Expansion \eqref{eq:resonanceexpansion3-alternate} has exactly the same form as the representation formula found in the physics literature (like equation \eqref{eq:lalannetimedomain}) but without any exponentially diverging quantities. The $E_j^\pm$ can be computed independently of the source, just like regular quasi-normal modes. \end{remark} \subsection{Proof of theorem \ref{theo:resonanceexpansion3}} Before we can prove theorem \ref{theo:resonanceexpansion3} we need the following lemma: \begin{lemma}\label{lem:lemma_F} As $\omega\delta c^{-1} \rightarrow 0$, $F$ defined in \eqref{eq:F_scalar} admits the following asymptotic expansion: \begin{equation} F(x) = \frac{1}{\delta}\left[\delta\left(\frac{1}{\varepsilon_c}-\frac{1}{\varepsilon_m}\right)\nu_x\cdot\nabla\Gamma^{k_m}(z-s)+\mathcal{O}\left(\left(\omega\delta c^{-1}\right)^2\right)\right], \quad x \in \partial D. \end{equation} \end{lemma} \begin{proof} See appendix~\ref{subsec:exp_f}. \end{proof} \begin{proof}[Proof of theorem \ref{theo:resonanceexpansion3}] We start by studying the time domain response of a single mode to a causal excitation at the source point $s$. According to proposition~\ref{prop:spec-decomp} we need to compute the contribution $\Xi_j$ of each mode, that is, \begin{equation*} \int_{-\rho}^{\rho}\Xi_j(x,\omega) e^{-i\omega t}\mathrm{d} \omega :=\int_{-\rho}^\rho\frac{1}{\lambda(\omega)-\lambda_j(\omega \delta)}\left\langle \nabla\Gamma^{\frac{\omega}{c}}(z ,s)\cdot \nu(\cdot) f(\omega),\varphi_j \right\rangle_{\mathcal{H}^*(\partial D)} \mathcal{S}_D^{\frac{\omega}{c}}\left[\varphi_j\right]e^{-i\omega t}\mathrm{d} \omega, \end{equation*} where $\lambda_j(\omega \delta) := \lambda_j - \left(\omega\delta c^{-1}\right)^2 \alpha_{j} +\mathcal{O}\left(\left(\omega\delta c^{-1}\right)^3\right)$. One can then write: \begin{multline*} \left\langle \nabla\Gamma^{\frac{\omega}{c}}(z ,s)\cdot \nu(\cdot) f(\omega),\varphi_j \right\rangle_{\mathcal{H}^*(\partial D)} \mathcal{S}_D^{\frac{\omega}{c}}\left[\varphi_j\right]= \\ f(\omega) \left(\frac{1}{|z-s|}-i\frac{\omega}{c}\right)\left(\lambda_j-\frac{1}{2}\right) \int_{\partial D\times \partial D} \frac{v\varphi_j(v)\varphi_j(y)}{16\pi^2|x-y||z-s|}e^{i\frac{\omega}{c}(|x-y|+|z-s|)}\mathrm{d} \sigma(v) \mathrm{d} \sigma(y), \end{multline*} where we used $\left\langle \nu,\varphi_j\right\rangle_{\mathcal{H}^*(\partial D)}=(1/2-\lambda_j)\left\langle x,\varphi_j\right\rangle_{\frac{1}{2},-\frac{1}{2}}$ \cite{ammari2017mathematicalscalar}. Since $\left\langle \nu,\varphi_0\right\rangle_{\mathcal{H}^*(\partial D)}=0$, the zeroth term vanishes in the summation. Now we want to apply the residue theorem to get an asymptotic expansion in the time domain. Note that: \begin{equation*} \int_{-\rho}^{\rho} \Xi_j(x,\omega) e^{-i\omega t} \mathrm{d}\omega= \oint_{\mathcal{C}^{\pm}} \Xi_j(x,\Omega) e^{-i\Omega t}\mathrm{d}\Omega -\int_{\mathcal{C}_\rho^{\pm}} \Xi_j(x,\Omega) e^{-i\Omega t} \mathrm{d}\Omega, \end{equation*} where the integration contour $\mathcal{C}_\rho^{\pm}$ is a semicircular arc of radius $\rho$ in the upper (+) or lower (-) half-plane, and $\mathcal{C}^{\pm}$ is the closed contour $\mathcal{C}^{\pm}=\mathcal{C}_\rho^{\pm}\cup[-\rho,\rho]$. The integral on the closed contour is the main contribution to the scattered field by the mode and can be computed using the residue theorem to get, for $\rho\geq \Re[\Omega_j^\pm(\delta)]$, \begin{align*} \oint_{\mathcal{C}^{+}} \Xi_j(x,\Omega) e^{-i\Omega t} \mathrm{d}\Omega&=0,\\ \oint_{\mathcal{C}^{-}} \Xi_j(x,\Omega) e^{-i\Omega t} \mathrm{d}\Omega&=2\pi i\text{Res}\left( \Xi_j(x,\Omega)e^{-i\Omega t},\Omega_j^\pm(\delta)\right). \end{align*} Since $\Omega_j^\pm(\delta)$ is a simple pole of $\omega \mapsto \dfrac{1}{\lambda(\omega)-\lambda_j(\omega \delta)}$ we can write: \begin{align*} \oint_{\mathcal{C}^{-}} \Xi_j(x,\Omega) e^{-i\Omega t} \mathrm{d}\Omega&=2\pi i\text{Res}\left(\Xi_j(x,\Omega),\Omega_j^\pm(\delta)\right)e^{-i\Omega_j^\pm(\delta)t}. \end{align*} To compute the integrals on the semi-circle, we introduce: \begin{equation*} B_j(y,v,\Omega)=\frac{\lambda_j-1/2}{\lambda(\omega)-\lambda_j(\delta\Omega)}\left(\frac{1}{|z-s|}-i\frac{\omega}{c}\right) \int_{\partial D\times \partial D} \frac{v\varphi_j(v)\varphi_j(y)}{16\pi^2|x-y||z-s|} \qquad (y,v) \in (\partial D)^2. \end{equation*} Note that $B_j(\cdot,\cdot,\Omega)$ behaves like a polynomial in $\Omega$ when $\vert \Omega\vert \rightarrow \infty$. Given the regularity of the input signal $\widehat{f} \in C_0^{\infty}([0,C_1])$, the Paley-Wiener theorem~\cite[p. 161]{Yosida1995FA} ensures decay properties of its Fourier transform at infinity. For all $N\in\mathbb{N}^*$ there exists a positive constant $C_N$ such that for all $\Omega \in \mathbb{C}$ \begin{equation*} |f(\Omega)|\leq C_N (1+|\Omega|)^{-N}e^{C_1 |\Im{(\Omega)}|}. \end{equation*} Let $T:=(\vert x-y\vert + \vert s-v\vert)/c$. We now re-write the integrals on the semi-circle \begin{align*} \int_{\mathcal{C}_\rho^{\pm}} \Xi_j(x,\Omega) e^{-i\Omega t} \mathrm{d}\Omega=\int_{\mathcal{C}_\rho^{\pm}}f(\Omega) \int_{\partial D\times \partial D} B_j(y,v,\Omega) e^{i \Omega \left(T -t\right)}\mathrm{d} \sigma(v)\mathrm{d} \sigma(y) \mathrm{d} \Omega. \end{align*} We have that $t_0^-+C_1 \leq T \leq t_0^+-C_1 $. Two cases arise. \paragraph{Case 1:} For $0<t<t_0^-$ , i.e., when the signal emitted at $s$ has not reached the observation point $x$, we choose the upper-half integration contour $\mathcal{C}^+$. Transforming into polar coordinates, $\Omega=\rho e^{i\theta}$ for $\theta \in [0,\pi]$, we get: \begin{align*} \left\vert e^{i \Omega \left(T -t\right)}\right\vert \leq e^{ -(t_0^--t+C_1)\Im(\Omega)} \qquad \forall (y,v)\in (\partial D)^2, \end{align*} and \begin{align*} \left|\int_{\mathcal{C}_\rho^{+}} \Xi_j(x,\Omega) e^{-i\Omega t} \mathrm{d} \Omega\right| & \leq \int_0^\pi \rho \left|f\left(\rho e^{i\theta}\right)\right|e^{-\rho (t_0^--t+C_1)\sin{\theta}}\int_{\partial D \times \partial D}\left\vert B_j\left(y,v,\rho e^{i\theta}\right) \right\vert\mathrm{d} \sigma(v) \mathrm{d} \sigma(y) \mathrm{d}\theta,\\ &\leq \rho C_N(1+\rho)^{-N}\delta^4 \max_{\theta\in [0,\pi]}{\left\Vert B_j\left(\cdot, \cdot, \rho e^{i\theta}\right) \right\Vert_{L^{\infty}(\partial D\times \partial D)}} \pi \frac{1-e^{-\rho(t^-_0-t)}}{\rho(t^-_0-t)}, \end{align*} where we used that for $\theta \in [0,\pi/2]$, we have $\sin{\theta} \geq 2\theta/\pi \geq 0$ and $-\cos{\theta}\leq-1+2\theta/\pi$. The usual way to go forward from here is to take the limit $\rho \rightarrow \infty$, and get that the limit of the integral on the semi-circle is zero. However, we work in the quasi-static approximation here, and our modal expansion is not uniformly valid for all frequencies. So we have to work with a fixed maximum frequency $\rho$.. Since $N$ can be taken arbitrarily large and that $B_j$ behaves like a polynomial in $\rho$ \emph{whose degree does not depend on $j$}, we get that, uniformly for $j\in [1,J]$: \begin{equation*} \left|\int_{\mathcal{C}_\rho^{+}} \Xi_j(x,\Omega) e^{-i\Omega t} \mathrm{d}\Omega\right| = \mathcal{O}\left(\frac{\delta^4}{t_0^--t} \rho^{N}\right). \end{equation*} Of course if one has to consider the full inverse Fourier transform of the scattered electromagnetic field, by causality, one should expect the limit to be zero. However, one would need high-frequency estimates of the electromagnetic field, as well as a modal decomposition that is uniformly valid for all frequencies. Since our modal expansion is only valid for a limited range of frequencies we get an error bound that is arbitrarily small if the particle is arbitrarily small, but not strictly zero. \paragraph{Case 2:} For $t>t_0^+$, we choose the lower-half integration contour $\mathcal{C}^-$. Transforming into polar coordinates, $\Omega=\rho e^{i\theta}$ for $\theta \in [\pi,2\pi]$, we get \begin{align*} \left\vert e^{i \Omega \left(T -t\right)}\right\vert \leq e^{ (t-t_0^+-C_1) \Im (\Omega)} \qquad \forall (y,v)\in (\partial D)^2, \end{align*} and \begin{align*} \left|\int_{\mathcal{C}_\rho^{-}} \Xi_j(x,\Omega) e^{-i\Omega t} \mathrm{d}\Omega\right| & \leq \int_\pi^{2\pi}\rho \left|f\left(\rho e^{i\theta}\right)\right|e^{\rho (t-t_0^+-C_1)\sin{\theta}}\int_{\partial D\times \partial D}\left\vert B_j\left(y,v,\rho e^{i \theta}\right) \right\vert\mathrm{d} \sigma(v) \mathrm{d} \sigma(y) \mathrm{d}\theta,\\ &\leq \rho C_N(1+\rho)^{-N} \delta^4 \max_{\theta\in [\pi,2\pi]}{\left\Vert B_j\left(\cdot, \cdot, \rho e^{i\theta}\right) \right\Vert_{L^{\infty}(\partial D\times \partial D)}}\pi \frac{1-e^{-\rho(t-t_0^+)}}{\rho(t-t_0^+)}. \end{align*} Exactly as in Case $1$, we cannot take the limit $\rho \rightarrow \infty$. Using the fact that $N$ can be taken arbitrarily large and that $B_j$ behaves like a polynomial in $\rho$ \emph{whose degree does not depend on $j$}, we get that, uniformly for $j\in [1,J]$: \begin{align*} \left|\int_{\mathcal{C}_\rho^{-}} \Xi_j(x,\Omega) e^{-i\Omega t} \mathrm{d}\Omega\right| = \mathcal{O}\left(\frac{\delta^4}{t} \rho^{-N}\right). \end{align*} The result of theorem~\ref{theo:resonanceexpansion3} is obtained by summing the contribution of all the modes considered. \end{proof} \begin{remark} The fact that we work with a finite number of modes is necessary for the perturbation theory of section \ref{sec:modal_decomp} but also in this section. Indeed, if we consider all the modes there is an accumulation point in the poles of the modal expansion of the field, and therefore we cannot apply the residue theorem. \end{remark} \subsection{The two-dimensional case} \label{subsec:time-domain-2D} In two dimensions, the Green's function does not have an explicit phase term, so we need to introduce another asymptotic parameter $\epsilon>0$ to be able to use the large argument asymptotics of the Hankel function. Our new truncated inverse Fourier transform of the scattered field $u^{\text{sca}}$ given by \begin{equation*} P_{\rho,\epsilon}\left[u^\text{sca}\right](x,t)=\int_{-\rho}^{-\epsilon} u^{\text{sca}}(x,\omega) e^{-i\omega t} \mathrm{d}\omega+\int_{\epsilon}^{\rho} u^{\text{sca}}(x,\omega) e^{-i\omega t} \mathrm{d}\omega. \end{equation*} This allows us to define a notion of \emph{far field}. A point $x$ is far from $D$ if $\epsilon\vert x-z\vert c^{-1}\gg 1$. We can now add two additional hypotheses: \begin{itemize} \item the source is far away from the particle (or equivalently, the incoming wave is a plane wave) \item the observation point is far away from the particle. \end{itemize} The incident field has the following form in the time domain: \begin{equation}\label{eq:u_in(t)} \widehat{u}^{\text{in}}(x,t)=\widehat{f}\left(t-\frac{d\cdot x}{c}\right). \end{equation} Besides these two assumptions and a difference in the order of the remainder, the result in two dimensions is essentially the same as in three dimensions. \begin{theorem}\label{theo:resonanceexpansion2} Let $N\in \mathbb{N}$. For $J$ large enough the scattered field has the following form in the time domain for $x$ far away from $D$: \begin{equation} P_{\rho,\epsilon}\left[u^\text{sca}\right](x,t)= \begin{dcases} \mathcal{O}\left(\delta \rho^{-N}\right), &\mbox{ } t\leq t_0^-, \\ 2\pi i\sum_{j=1}^J C_{\Omega_j^\pm(\delta)} \langle F, \varphi_j \rangle_{\mathcal{H}^*(\partial D)} e_j^\pm(x) e^{-i\Omega_j^\pm(\delta) t}+\mathcal{O}\left(\frac{\delta}{t}\rho^{-N}\right), &\mbox{ }t\geq t_0^+, \end{dcases} \label{eq:resonanceexpansion2} \end{equation} with $\Omega_j^\pm(\delta)$ being the plasmonic resonant frequencies of the particle given by proposition~\ref{prop:reso_2D}. $C_{\Omega_j^\pm(\delta)}$ is a constant depending only on $j$, the size $\delta$ and the model for $\varepsilon_c(\omega)$: \begin{align*} C_{\Omega_j^\pm(\delta)}:=\varepsilon_0 \frac{\left({\Omega^\pm_j(\delta)}^2 + i \Omega^\pm_j(\delta) T^{-1} -\omega_p^2\right) }{\left(1+\left(\omega_p\delta c^{-1}\right)^2 \log \left(\Omega^\pm_{s,j}\delta c^{-1}\right)\alpha_j\right)\left(\Omega^\pm_j(\delta)-\Omega^\mp_j(\delta)\right)} . \end{align*} \end{theorem} \begin{proof} The proof is quite similar to the three-dimensional case. It is included in appendix \ref{sec:appendixproof2D} for the sake of completeness. \end{proof} \section{Numerical simulations}\label{sec:num} The goal of this section is to illustrate the validity of our approach and to show that the approximation seems to be working with less restrictive hypotheses than the ones in theorem \ref{theo:resonanceexpansion2}: \begin{itemize} \item for more general shapes (non-convex or non-algebraic) \item closer to the particle (outside of the far field approximation). \end{itemize} For these simulations we build upon the codes for the layer potentials developed in~\cite{wangcode}. \subsection{Domains and physical parameters} Throughout this section, we consider the three domains sketched on Figure~\ref{fig:domains} to illustrate our results: \paragraph{Rounded diamond:} The rounded diamond (a) is defined by the parametric curve $\zeta(\theta)=2\left(e^{i\theta}+0.066e^{-3i\theta}\right)$, for $\theta\in[0,2\pi]$. It is an algebraic domain of class $\mathcal{Q}$ from \cite{putinar19}. This shape satisfies condition~\ref{cond:2d}, as well as the hypotheses of theorem~\ref{theo:resonanceexpansion2}. \paragraph{Narrow ellipse:} The ellipse (b) semi-axes are on the $X_1$- and $X_2$- axes and are of length $a=1$ and $b=5$, respectively. It is algebraic but not asymptotically a circle in the sense of \cite{putinar19}. \paragraph{Five-petal flower:} The flower (c) is defined by $\varrho=2+0.6\cos(5\theta)$ in polar coordinates. It has Cartesian equation \begin{equation*} 0.5\left(X_1^2+X_2^2\right)^3-1.5X_1\left(X_1^2+X_2^2\right)^2+6X_1^3\left(X_1^2+X_2^2\right)-4.8X_1^5\left(X_1^2+X_2^2\right)^3-\left(X_1^2+X_2^2\right)^{5/2}=0 \end{equation*} in the rescaled $(X_1,X_2)$ plane. So it is not algebraic (due to the non-integer power of the last term) and not convex. We have no theoretical results on the number of modes that radiate. \begin{figure}[H] \centering \includegraphics[trim={0.5cm 6.5cm 0.5cm 6cm},clip,width=15cm]{domains.pdf} \caption{Sketch of the three reference domains: the rounded diamond (a), the narrow ellipse (b) and the five-petal flower (c).} \label{fig:domains} \end{figure} All three domains $D=z+\delta B$ are centred at the origin $(z=0)$ for simplicity. We set the size of the nanoparticle to be $\delta=10^{-8}$m. The numerics are performed on the rescaled domain $B$ and the homogeneous medium is taken to be vacuum ($\varepsilon_m=\varepsilon_0$ and $\mu_m=\mu_0$). The physical parameter values are summarised in Table~\ref{tab:1}. \begin{table} \centering \begin{tabular}{|c|c|} \hline \textit{Symbol} & \textit{Magnitude} \\ \hline \hline $\omega_p$ & $2\cdot 10^{15}$ Hz \\ \hline $T$ & $10^{-14}$s \\ \hline $\varepsilon_0$ & $8.854187128 \cdot 10^{-12}$ Fm$^{-1}$ \\ \hline $\mu_0$ & $4\pi \cdot 10^{-7}$ Hm$^{-1}$ \\ \hline $\delta$ & $10^{-8}$ m \\ \hline d & $(1/\sqrt{2},1/\sqrt{2})$ \\ \hline z & $(0,0)$ \\ \hline \end{tabular} \caption{Physical constants and parameters values. } \label{tab:1} \end{table} \subsection{Modes contribution decay} It was shown in section \ref{subsec:truncate} that the scalar products $\langle\widetilde{F},\widetilde{\phi}_j\rangle_{\mathcal{H}^*(\partial B)}$ decay very rapidly when $d=3$. In a two-dimensional setting, the theoretical framework is not as clear, but we check numerically that the contribution the modes decrease quite fast with $j$. Recall that the weight of the $j^\text{th}$ mode is given by the scalar product $\langle\widetilde{F},\widetilde{\phi}_j\rangle_{\mathcal{H}^*(\partial B)}$, which, in a low-frequency regime, can be approximated as $\langle\nu\cdot \nabla u^\text{in},\widetilde{\phi}_j\rangle_{\mathcal{H}^*(\partial B)}$ (see lemma~\ref{lem:lemma_F_2D}). On panel (a) of Figure~\ref{fig:truncate_2D} we show on all examples that $\langle\nu\cdot \nabla u^\text{in},\widetilde{\phi}_j\rangle_{\mathcal{H}^*(\partial B)}$ decays as $j$ grows. We average over all possible directions $d$ of the incident field. Panel (b) of the same picture shows that the modes themselves, $\mathcal{S}^{\omega_p\delta c^{-1}}_B[\widetilde{\phi}_j](X)$, decrease as $j$ increases. We average here over all observation positions, $X$ belongs to a circle of radius $100$ centred at $z=0$. \begin{figure}[H] \centering \includegraphics[trim={0cm 4.5cm 0cm 8cm},clip,width=15cm]{decay_modes.pdf} \caption{We illustrate on a logarithmic scale the fast decay of the modal expansion terms by plotting the scalar products $\langle\nu\cdot \nabla u^\text{in},\widetilde{\phi}_j\rangle_{\mathcal{H}^*(\partial B)}$ on panel (a) and the modes $\mathcal{S}^{\omega_p\delta c^{-1}}_B[\widetilde{\phi}_j](X)$ on panel (b), against $j$, for $1\leq j\leq 30$, for the diamond, the ellipse and the flower.} \label{fig:truncate_2D} \end{figure} \subsection{Plasmonic resonances} We plot the first-order corrected plasmonic resonances with positive real parts on Figure~\ref{fig:reso_2D}. The resonance radius $\mathcal{R}(\delta)$ from definition~\ref{def:range_2d} is drawn as a red vertical line on the three subplots and is shown to encompass all the low-frequency resonances. \begin{figure}[H] \centering \includegraphics[trim={0cm 7cm 0cm 6.2cm},clip,width=15cm]{reso_three_domains.pdf} \caption{We plot, for the diamond (a), the ellipse (b) and the flower (c), the two-dimensional first-order corrected resonances with positive real parts from \eqref{eq:dynamic}: $\Omega^+_j (\delta)= \Omega_j' + i \Omega_j''$, for $j=1,..,20$. These resonances lie in the lower part of the complex plane and their real part is between $\omega_p/4$ and $\omega_p$ (and smaller than $\mathcal{R}(\delta)$). Their negative counterparts are symmetric with respect to the imaginary axis.} \label{fig:reso_2D} \end{figure} We can then verify a posteriori that our choice of size $\delta$ is consistent by checking that $\mathcal{R}(\delta)$ is still in the \emph{low-frequency} region, see table \ref{table:R(delta)}. \begin{table} \begin{center} \begin{tabular}{|c | c | c| } \hline $B$ & $\mathcal{R}(\delta)$ & $\mathcal{R}(\delta) \delta c^{-1}$ \\ \hline \hline Diamond & $3.0117e+15$ & $0.1005$ \\ \hline Ellipse & $3.6228e+15$ & $0.1208$ \\ \hline Flower & $3.3806e+15$ & $0.1128$ \\ \hline \end{tabular} \end{center} \caption{Validity check}\label{table:R(delta)} \end{table} \subsection{Validation of theorem~\ref{theo:resonanceexpansion2}} In this section, we validate the two-dimensional approximation of the scattered wave in the time domain given in theorem~\ref{theo:resonanceexpansion2} by plotting the asymptotic result against full numerical simulations. We sketch the simulation setting with the ellipse in Figure~\ref{fig:setting}(a). We define three observation points $A$, $B$ and $C$ on a circle of radius $150$ nm ($|X|=15$) and one observation point $D$ on a circle of radius $3000$ nm ($|X|=300$). They are characterised by their angle with respect to the x-axis: $\theta_A=0^\circ$, $\theta_B=\theta_D=45^\circ$, $\theta_C=90^\circ$. The nanoparticle is illuminated by a plane wave of the form $u^\text{in}(X)=e^{i k_m d\cdot \delta X} f(\omega)$ where $f$ is the Fourier transform of a bump function compactly supported in the interval $[0,C_1]$, with $C_1= 8$ fs. We plot the time domain incoming wave in Figure~\ref{fig:setting}(b). To ease the notations we drop the tilde subscript in the following and write $u(X)$ instead of $\widetilde{u}(X)$. \begin{figure} \centering \includegraphics[trim={0cm 3.9cm 0cm 5cm},clip,width=15cm]{setting.pdf} \caption{Not-to-scale sketch of the simulation setting for the ellipse on panel (a). The observation points $A$, $B$ and $C$ are placed on a circle of radius $150$ nm ($|X|=15$) centred at the origin, while observation point $D$ is placed in the far-field on a circle of radius $3000$ nm ($|X|=300$) at angle $\theta_D=45^\circ$. On panel (b) we plot the time domain incident wave $u^\text{in}(x,t)$ from \eqref{eq:u_in(t)} at $x=3000$ nm.} \label{fig:setting} \end{figure} \subsubsection{Reference solution} We call \emph{reference solution} the low-frequency part of the scattered field in the time domain. We first uniformly discretise our frequency domain $I_\omega$ in $L=10^4$ points, with \begin{align*} I(\omega):=& [-\rho \delta c^{-1}, -\epsilon \delta c^{-1}] \cup [\epsilon \delta c^{-1}, \rho \delta c^{-1}] \\ =& [-\omega_p \delta c^{-1}, -\omega_p \delta c^{-1}/4]\cup [\omega_p \delta c^{-1}/4,\omega_p \delta c^{-1}], \end{align*} by setting $\omega_{l}$ such that: $$ -\rho \delta c^{-1}=\omega'_{-L} < \omega'_{-L+1} < \ldots < \omega'_{-1}= -\epsilon \delta c^{-1}, \hspace{3mm} \epsilon \delta c^{-1} =\omega'_{1} < \ldots < \omega'_{L-1} < \omega'_{L}=\rho \delta c^{-1}, $$ with $\omega'_{l+1}-\omega'_{l}=(\rho-\epsilon)\delta c^{-1}/L$ for every $l \in [-L-1,-1]\cup [1,L-1]$. We compute the scattered field in the frequency domain using the representation formula \eqref{eq:scalar_solution}. The single layer potential is approximated using $N=2^8$ equally-spaced discretisation points along the boundary $\partial B$. We define the dimensionless frequency $\omega'=\omega \delta c^{-1}$. The reference solution is computed by taking the truncated inverse Fourier transform \begin{equation}\label{eq:reference_sol} P_{\rho,\epsilon}\left[\widehat{u}^\text{sca}\right](X, t) \approx \frac{(\rho - \epsilon)}{L} \sum_{l=1}^L \left(e^{-i\omega'_{-l}c \delta^{-1}t}u^\text{sca}\left(X,\omega'_{-l}c \delta^{-1}\right) + e^{-i\omega'_{l}c \delta^{-1}t}u^\text{sca}\left(X,\omega'_{l}c \delta^{-1}\right)\right). \end{equation} \subsubsection{Asymptotic solution} The expansion is obtained by summing the first $J=30$ modes. Using theorem \ref{theo:resonanceexpansion2}, the modal approximation of order $J$ becomes: \begin{equation}\label{eq:asymp_sol} \begin{aligned} U_J(X,t)=& 2 \pi i \sum_{j=1}^J\varepsilon_0 \left( \frac{\left({\Omega^+_j(\delta)}^2 + i \Omega^+_j(\delta) T^{-1} -\omega_p^2\right) \langle \widetilde{F}, \widetilde{\phi}_j \rangle_{\mathcal{H}^*(\partial B)}}{\left(1+\left(\omega_p\delta c^{-1}\right)^2 \log \left(\Omega^+_{s,j}\delta c^{-1}\right)\alpha_j\right)\left(\Omega^+_j(\delta)-\Omega^-_j(\delta)\right)} \delta \mathcal{S}^{\Omega^+_j(\delta)\delta c^{-1}}_B[\widetilde{\phi}_j](X) e^{-i\Omega^+_j(\delta)t} \right. \\ &\left. + \frac{\left({\Omega^-_j(\delta)}^2 + i \Omega^-_j(\delta) T^{-1} -\omega_p^2\right) \langle \widetilde{F}, \widetilde{\phi}_j \rangle_{\mathcal{H}^*(\partial B)}}{\left(1+\left(\omega_p\delta c^{-1}\right)^2 \log \left(\Omega^-_{s,j}\delta c^{-1}\right)\alpha_j\right)\left(\Omega^-_j(\delta)-\Omega^+_j(\delta)\right)} \delta \mathcal{S}^{\Omega^-_j(\delta)\delta c^{-1}}_B[\widetilde{\phi}_j](X) e^{-i\Omega^-_j(\delta)t}\right). \end{aligned} \end{equation} The simulation results are shown in figures~\ref{fig:diamond_final}, \ref{fig:ellipse_final}, \ref{fig:add_modes} and \ref{fig:flower_final}. To corroborate our pole expansion, we plot the real part of the reference solution \eqref{eq:reference_sol} against the real part of the asymptotic one \eqref{eq:asymp_sol} for the different domains and from different observation points. \subsubsection{Comparison in the far-field for the diamond} We begin with the diamond, since it is the shape that satisfies the hypotheses of theorem~\ref{theo:resonanceexpansion2}. Figure~\ref{fig:diamond_final} shows the field scattered by the diamond, measured in the far-field at position $X=D$. The reference solution is nicely approximated by the sum of four modes (4, 5, 6 and 7). \begin{figure}[H] \centering \includegraphics[trim={0cm 6.2cm 0cm 6.7cm},clip,width=15cm]{diamond_final-merged.pdf} \caption{The real part of the reference solution (blue line) from \eqref{eq:reference_sol} against the real part of the asymptotics (orange symbols) from \eqref{eq:asymp_sol} for the diamond, from observation point $X=D$. The four modes with the largest amplitude are shown on the right (order left to right, up to down).} \label{fig:diamond_final} \end{figure} \subsubsection{Extension to a nearer-field for the ellipse and flower} Figure~\ref{fig:ellipse_final} shows the field scattered by the ellipse, measured at position $X=A$ on panel (a) and $X=C$ on panel (b). In both cases the time domain scattered wave (blue line) is well approximated by the sum of decaying modes (orange symbols). Although we compute the first $30$ terms of the modal expansion, the actual number of modes which contribute significantly to approximate the reference solution is much smaller. Indeed, only $1$ mode is necessary to reconstruct more than $99\%$ of the signal in Figure~\ref{fig:ellipse_final}. \begin{figure}[H] \centering \includegraphics[trim={0cm 4.5cm 0cm 7.7cm},clip,width=15cm]{ellipse_final-merged.pdf} \caption{The real part of the reference solution (blue line) from \eqref{eq:reference_sol} against the real part of the asymptotics (orange symbols) from \eqref{eq:asymp_sol} for the ellipse, from observation point $X=A$ on panel (a) and $X=C$ on panel (b).} \label{fig:ellipse_final} \end{figure} When the observation point is at $X=B$, we illustrate in Figure~\ref{fig:add_modes} that two modes are needed to match the reference solution for the ellipse. Mode $1$, corresponding to a dipole which radiates most of the energy along the x-axis, is associated to the eigenvalue $\lambda_1=0.33$. Mode $2$ corresponds to the dipole which radiates most of the energy along the y-axis and is associated to the eigenvalue $\lambda_1=-0.33$. Mode $1$ oscillates slightly faster than mode $2$, resulting in the double oscillation visible on the lower plot. These numerical simulations are in line with \cite{ammari2018finedetails}. Even relatively close to the particle (the observation distance is about a tenth of the wavelength), only two modes radiate in the far-field. \begin{figure}[H] \centering \includegraphics[trim={0cm 0cm 0cm 0cm},clip,width=15cm]{add_modes-merged.pdf} \caption{The real part of the field scattered by the ellipse and observed at point $X=B$ is the superposition of two dipoles modes. The modes (upper panels) oscillate at different frequencies. On the lower panel, the reference solution from \eqref{eq:reference_sol} captures well the expansion from \eqref{eq:asymp_sol}.} \label{fig:add_modes} \end{figure} Figure~\ref{fig:flower_final} shows that even for the non-algebraic flower shape, the scattered wave (blue line) is well approximated by the sum of a small number of decaying modes (orange symbols). As anticipated by Figure~\ref{fig:truncate_2D}, the modes decay being faster for the ellipse than it is for the flower, a larger number of modes is needed for the latter. In Figure~\ref{fig:flower_final}, eight modes were needed to reconstruct more than $99\%$ of the reference solution (and five modes sufficed for $95\%$). \begin{figure}[H] \centering \includegraphics[trim={0cm 6cm 0cm 0cm},clip,width=15cm]{flower_final-merged.pdf} \caption{We plot the real part of the reference solution \eqref{eq:reference_sol} as a blue line against the real part of the asymptotic one \eqref{eq:asymp_sol} as orange symbols for the flower. The observation point is at $X=A$ (shown on the not-to-scale inset). The five modes with the largest amplitude are shown on the bottom (order left to right).} \label{fig:flower_final} \end{figure} \subsubsection{About the high frequencies}\label{section:exactvsreference} On figure \ref{fig:largefrequency} we show that the low-frequency part of the time domain solution is actually a good approximation of the full solution, as mentioned in remark \ref{rem:fourier}. It is completely non-trivial, as we have no information on the localisation of poles for the resolvent in the frequency domain outside the \emph{low-frequency} range. It seems that there are no more resonances in the high frequency range due to the dispersive nature of the material. This will be investigated in a future work. \begin{figure}[H] \centering \includegraphics[trim={0cm 11cm 0cm 3cm},clip,width=15cm]{reference_vs_exact-merged.pdf} \caption{Reference (low-frequency) solution (computed with $\rho=\mathcal{R}(\delta)$) against large-frequency solution (computed with $\rho=100\mathcal{R}(\delta)$).}\label{fig:largefrequency} \label{fig:ref_exact} \end{figure} \subsubsection{About the computational cost} We note that, because a small number of modes usually suffices to approximate the reference solution, the computation cost of the asymptotic solution is relatively cheap. The time needed to compute the reference solution and the asymptotic one are linear in $L(= 10^4)$ and $J(= 30)$, respectively. Thus, the time to compute the asymptotic solution is much smaller than the time to compute the reference solution, namely, hundred time smaller. Moreover, the modes can be pre-calculated and one can compute for a very low cost the response of the particle to any given illumination in the time domain. \section{Concluding remarks} In this paper, we have shown that it is possible to define quasi-normal modes (similar to the ones found in the physics literature) for \emph{small} plasmonic particles using the spectral decomposition of the Neumann-Poincar\'e operator and some perturbative spectral analysis. We have proved that, in a three-dimensional setting, only a few modes are necessary to represent the solutions of the scattering problem by a strictly convex plasmonic particle and that these types of representations can give a very good approximation of the field in the time domain. Our numerical simulations have corroborated the validity of this approach in the two-dimensional case. This theoretical and numerical framework can be adapted to handle more complex systems with multiple particles (see \cite{ammari2017mathematicalscalar}). This work needs to be extended to solutions of Maxwell's equations and to dielectric structures. This will be the subject of forthcoming papers. \section*{Acknowledgement} This work was supported by the Swiss National Science Foundation grant number 200021-172483. The authors thank Habib Ammari for helpful conversations. \section*{Data availability} The data supporting the findings of this study were generated through \textsc{matlab} and are available from the corresponding author on request. \pagebreak
\section{Introduction} \emph{Convolutional Neural Networks} (CNNs) consist of a set of layers of different types to sequentially pipe and transform data with. Early \emph{convolutional layers} detect edges or corners using \emph{filters}, \emph{pooling layers} reduce the resolution using an \emph{average} or \emph{max} function, allowing later layers to recombine smaller features into bigger ones. \cite{krizhevsky2009learning,krizhevsky2012imagenet} The weights of the filters can be found through back propagation and gradient descent \cite{lecun1998gradient,lecun1989backpropagation}. However the overall architecture of the CNN must be stated, and many hyperparameters initialised, these are set by hand using trial and error \cite{simard2003best,ioffe2015batch}. This can introduce a bias towards benchmark data sets such as MNIST, which may have little relevance to real world data sets. Manual tuning of deep architectures is complicated, non-intuitive and time consuming. A promising approach to find topologies automatically is \emph{Genetic Algorithms} (GAs), heuristic algorithms that can optimise within abstract high-parameter spaces with complex or unknown interdependencies \cite{back1996evolutionary,davis1991handbook}. GAs implement a simplified model of natural selection. A population of individuals is initialised, where each individual is represented by a \emph{genome}. Their \emph{fitness} is measured by an \emph{objective function} that maps each genome to a fitness. Fitness scores can be subjected to a \emph{penalty function} \cite{goldenberg1989genetic} that punishes undesired features or behaviour with selective pressure. Individuals of higher fitness are more likely to be selected for reproduction. \emph{Genetic operators} manipulate the genome stochastically: \emph{Mutation} is a small random change in the genome and \emph{cross-over} recombines the genome of two parents \cite{Mooney1995}. Reproduction, genetic operations and fitness evaluation are repeated until an exit condition occurs. CNNs can be configured through GAs by evolving network weights and topology together \cite{real2017large}. Children inherit the weights of their parents, mutations insert, alter or remove layers. CNNs are trained gradually during the course of evolution, allowing the objective fitness function to select individuals based on partially trained networks. The big drawback of this approach is that no cross-over is involved, reducing the potency of the algorithm by omitting an important operator of GAs. Introducing cross-over for weights is non-trivial and has not been achieved yet. Another approach is to evolve the topology alone, allowing cross-over. This method however requires retraining all weights for each topology configuration, before evaluation. To produce competitive results, algorithms can run for up to 35 GPU days \cite{sun2018automatically}. In this work, two novel approaches are presented. The first approach contrasts with previous work where complexity is penalised \cite{Kouvaris2017}, instead penalising evaluation wall time, allowing a more intuitive and direct effect. Additionally, a method is presented to utilise both partial training and cross-over by gradually training models through an epoch function. Both approaches maintained accuracy on the \mbox{CIFAR10} image classification data set \cite{krizhevsky2009learning}. \section{Method} Initially a base experiment is set up, following Sun \cite{sun2018automatically}, with minor differences to aid computational efficiency. \footnote{The code is available at \url{https://github.com/YStrauch/evolving-cnn-topologies-for-image-recognition}} The GA evolves a generational population of 20 individuals, each represented by a genome describing the topology of a CNN. Each individual is evaluated by training and testing on the respective \mbox{CIFAR10} partition. The initial genomes are generated by randomly concatenating skip or pooling layers with equal probability until a pooling layer would reduce the resolution to half a pixel, or the number of layers is greater than a max depth chosen randomly from $[10, 120]$. Skip layers contain two convolutional layers with quadratic filters of size 3, unit stride, and same padding. The number of filters of each convolutional layer is chosen randomly from the set $\{64, 128, 256\}$. Pooling layers use either a max or average function chosen randomly. A \emph{Multi-Layer Perceptron} (MLP) with no hidden layers followed by a softmax layer determines the output. Individuals are trained for 60 epochs in a batch size of 50 using stochastic gradient descent with a momentum of .9 and an initial learning rate of .1, which decays by a factor of .9 after 1, 26 and 43 epochs. CNNs are implemented using pytorch \cite{paszke2017automatic} and trained on 4 GTX1080 TI on the Iridis 5 HPC. Each GPU concurrently evaluates one individual at a time. In the baseline implementation, the fitness of an individual is equal to its accuracy on the test fold. If an architecture was previously evaluated its accuracy is retrieved from a cache. Individuals are selected for reproduction using tournament selection, \textit{i.e.} two distinct individuals are chosen randomly from the population, and the individual with higher fitness is selected. With a 90\% chance, this individual is crossed over with a second individual selected by another tournament selection. With a 20\% chance, the genome is mutated. Both genetic operators can be applied cumulatively, cross-over first. Selected individuals are added to a new generation of individuals until 20 individuals are found. If the best individual of the old generation is not in the new one, it replaces the weakest individual of the new generation (\emph{elitism}). The new generation replaces the old one. This process is repeated for 20 generations. The one-point cross-over slices the feature detection layer stack open and re-combines them cross-wise. The Softmax-MLP classifier is not part of cross-over and is always appended once. Mutation either inserts a skip layer with 70\% probability, or with each 10\% likelihood inserts a pool layer, removes a layer, or mutates a layer. Layers are inserted at a random position. Skip layers are mutated by re-randomising the number of filters; pool layers flip their kernel function between average and max. If cross-over or mutation would produce half pixels due to too many pooling layers, the operator is aborted and restarted from the beginning. \subsection{Regularisation} The primary aim is to reduce the wall time taken by the algorithm. During fitness evaluation, the time required from the beginning of training to the end of testing is measured. For every hour spent, fitness is decreased linearly by $C$. $C$ quantifies a trade-off between training time and accuracy, the bigger $C$, the higher the selective pressure towards faster individuals. This parameter was set at $C=0.05$ which allowed a reduction in training time without loss of predictive performance. \subsection{Partial Training} Evolution by natural selection does not need an absolute fitness score, but rather a relative measure to rank each generation. The core idea is that earlier generations are trained for shorter durations, meaning less time is spent on earlier unfit topologies. In contrast to a previous approach \cite{real2017large}, weights are not heritable, so partial training cannot be done implicitly. Instead, an epoch function is introduced defining how long individuals are to be trained. To allow a fair comparison, partially trained individuals are stored so that they can be retrieved at a later time for further training. The number of epochs each architecture is trained for is found using a linear function, dependent on the number of generations, ranging from a lower bound of 30 to an upper bound of 70, with rounding to the next integer. These bounds were chosen to make the algorithm spend less time on inferior and more time on better topologies. The learning rate decay points were scaled to come into effect after 1, 30 and 50 epochs. \section{Results} \begin{table}[tbh] \centering \begin{threeparttable} \resizebox{.95\linewidth}{!}{ \begin{tabular}{l|ccccc} \toprule Approach & Acc. & Gen. & Epochs & Batch & GPU \\ & \emph{(\%)} & & & Size & Days\\ \midrule Evolving & 95.22 & 20 & 350 & 1 & 35 \\ Topologies \tnote{a} & & & & &\\ \midrule Regularised \tnote{b} & 89.06 & 20 & 60 & 50 & 14 \\ \midrule Partial & 88.70 & 20 & 60 & 50 & 12 \\ Training \tnote{b} & & & & &\\ \midrule Base & 88.36 & 20 & 60 & 50 & 15 \\ Experiment \tnote{b} & & & & &\\ \midrule Evolving & 77.19 & 50 & 180 & 1 & 17 \\ Weights \tnote{c} & & & & &\\ \bottomrule \end{tabular} } \footnotesize \begin{tablenotes} \item[a] \cite{sun2018automatically} \item[b] This work \item[c] \cite{xie2017genetic} \end{tablenotes} \caption{Both performance improvements yielded better accuracies in less time than the base experiment. } \label{tab:exp:comparison1} \end{threeparttable} \end{table} \begin{figure}[!ht] \begin{subfigure}{.25\linewidth} \centering \includegraphics[width=.95\linewidth]{figures/architectures/architecture_base.pdf} \caption{} \label{fig:architectures:base} \end{subfigure}\hfill \begin{subfigure}{.25\linewidth} \centering \includegraphics[width=.95\linewidth]{figures/architectures/architecture_regularisation_fitness.pdf} \caption{} \label{fig:architectures:reg:fitness} \end{subfigure}\hfill \begin{subfigure}{.25\linewidth} \centering \includegraphics[width=.95\linewidth]{figures/architectures/architecture_regularisation_accuracy.pdf} \caption{} \label{fig:architectures:reg:accuracy} \end{subfigure}\hfill \begin{subfigure}{.25\linewidth} \centering \includegraphics[width=.95\linewidth]{figures/architectures/architecture_epochfn.pdf} \caption{} \label{fig:architectures:epochfn} \end{subfigure}\hfill \caption{(\subref{fig:architectures:base}) The best of the base experiment. (\subref{fig:architectures:reg:fitness}) Regularised topology with highest fitness has fewer filters, and an extra pool layer. (\subref{fig:architectures:reg:accuracy}) With regularisation the best has more filters in one convolutional layer and has put two pool layers together. (\subref{fig:architectures:epochfn}) With partial training the best has fewer filters in the early layer and more later. Unlike the others, it includes a max filter.} \label{fig:architectures} \end{figure} Table \ref{tab:exp:comparison1} compares two approaches from the literature with the base experiment and performance optimisations. The best architectures found by each approach are depicted in Figure \ref{fig:architectures}. The best CNN found in the base experiment (Fig. \ref{fig:architectures:base}) has lower accuracy than that reported by Sun, however as theirs is trained for nearly 9 times as many epochs and over double the GPU days, this is unsurprising. As methods are being compared, not time or resources available, it is this base experiment result that is used for accuracy and time comparison. \begin{figure}[thb] \centering \includegraphics[width=.55\linewidth]{figures/exp1layers.pdf} \caption{The population converges to have more skip layers in the first and more pooling layers in the second half of the genome. In generation 10 and 20, all individuals start with a skip layer. In generation 20, there is a pattern of alternating skip and pooling layers at depths 1-6.} \label{fig:exp1:layers} \end{figure} All the best topologies found have a stack of pooling layers in the end. Initially this was suspected to be due to the initialisation logic stopping when half pixels would occur, however analysis of the distribution of layers throughout evolution (Fig. \ref{fig:exp1:layers}) found an active drift towards this phenomenon. Remarkably, the population learned to alternate skip and pool layers, as shown in generation 20, Figure \ref{fig:exp1:layers}. The distribution curves meet three times between the first and fifth layer index. Alternating pool and skip layers is a pattern found in hand-crafted networks, \textit{e.g.} \cite{lecun1998gradient}, however the best topology found in this work arranges skip layers in pairs (see Fig. \ref{fig:architectures:base}). This is not a common design pattern used by humans. \subsection{Regularisation} The wall time of the regularised approach was 31 hours (8\%) shorter and yielded an accuracy that is slightly better than the base experiment. Convergence was compared (Fig. \ref{fig:exp5:stats}) and found to be similar overall. There is a constant, short delay on the X axis. As the first generation is more complex and less accurate, it seems likely that this is rooted in random chance within the initial genome generation, and is independent of regularisation. Networks are 1-2 layers shallower on average, with comparable accuracy, fitness evaluations are naturally lower due to regularisation. The algorithm was therefore successful in discovering deep networks that performed as well as shallower networks. The spread in fitness evaluations does not collapse, and converges reasonably, indicating a good population diversity. The regularised run favoured having fewer filters per skip layer. In contrast to the base experiment, the number of filters converged towards 128 instead of 256 filters. This indicates that having fewer filters increases training speed and maintains accuracy, at least for the few training epochs configured. \begin{figure}[thb] \begin{subfigure}[t]{.5\linewidth} \vspace{0pt} \includegraphics[width=\linewidth]{figures/exp5stats.pdf} \caption{} \label{fig:exp5:stats} \end{subfigure}\hfill% \begin{subfigure}[t]{.5\linewidth} \vspace{0pt} \begin{subfigure}[t]{\linewidth} \includegraphics[width=\linewidth]{figures/exp6stats.pdf} \end{subfigure}\hfill% \begin{subfigure}[b]{\linewidth} \vspace{15pt} \hfill \includegraphics[width=.6\linewidth]{figures/legend.pdf} \vspace{15pt} \end{subfigure} \caption{} \label{fig:exp6:stats} \end{subfigure} \caption{(\subref{fig:exp5:stats}) The regularised networks converge to less complexity with comparable accuracy. Fitness is naturally lower due to the regularisation. (\subref{fig:exp6:stats}) The partial trained accuracy converges more slowly in respect to generations, and catches up in generation 17. Reduced training will give lower fitness nearer the start.} \end{figure} The individual with highest fitness (Fig. \ref{fig:architectures:reg:fitness}) and the one with highest accuracy (Fig. \ref{fig:architectures:reg:accuracy}) are very similar. The only differences are that the faster (fitter) individual uses 128 instead of 256 filters in one skip layer, and the order of this layer and its successor. These tiny changes allowed the individual to evaluate with 15 minutes difference and only sacrificed 0.0064 accuracy. Such small changes add up significantly in the course of the GA and allowed it to evaluate 8\% faster than the base experiment without sacrificing accuracy of the end result, the highest accuracy found is slightly higher. \subsection{Partial Training} The GA ran 70 hours (19\%) faster than the base experiment. The best topology found (Fig. \ref{fig:architectures:epochfn}) has a slightly higher accuracy than the one found in the base experiment. Figure \ref{fig:exp6:stats} shows a bigger spread in accuracy than the previous experiment, as the population is more diverse. The population converges more slowly in terms of generations, however this does not mean that convergence was slower in terms of wall time; on the contrary it actually converged much faster. As expected, the speed-up (Fig. \ref{fig:exp6:timediff}) is inversely proportional to the number of training epochs with some noise. The first two generations were evaluated 18 hours faster while maintaining the mean fitness of the base experiment (shown in Fig. \ref{fig:exp6:stats}), demonstrating the efficacy of this idea. The same mean fitness as the base experiment was reached by generation 18, despite having saved more than 60 hours of computation (70 hours in total). Speed-up occurs even after generation 15 where the epoch function passes the baseline experiment of 60 epochs. \begin{figure}[thb] \centering \includegraphics[width=.6\linewidth]{figures/exp6timediff.pdf} \caption{The speed-up of partial training is higher in earlier generations. Only the last generation took longer.} \label{fig:exp6:timediff} \end{figure} \section{Discussion and Conclusion} Two methods to speed up convergence of genetic algorithms finding CNN topologies for image recognition are presented. Though results may vary depending on the hardware used, the advantage of using wall time is that selective pressure will drive the population to accommodate the performance of the underlying architecture. However, care should be taken not to mix different GPU types or individuals will be ranked unfairly. Also one has to keep in mind that individuals may be assigned a negative fitness score, which would complicate other genetic selection algorithms such as roulette selection. The second approach changed training epochs over the course of evolution to allow removal of weak configurations early on without excessive training. The linear function presented uses a lower and upper bound to simplify migration from the flat value used in the base experiment. Changing this function to a more dynamic approach, such as reacting to previous fitness evaluations to train longer if needed could allow adaptation to a variety of datasets. Both approaches are demonstrated to speed up architecture selection in this work. While they both introduce their own hyperparameters, the ability of these algorithms to tune numerous other parameters makes them very valuable, allowing the wider adoption of deep learning methods. Interestingly, combining both approaches neither results in a combined speed-up nor a comparable accuracy. A speed-up of only 0.6\% compared to partial training, and top accuracy of 79.47\% (10\% worse than the base experiment) indicate that the two methods conflict with or even oppose another. This requires further investigation. Further validation of the two approaches presented with their speed-ups, extensive repetition of the two experiments, and application to more data sets and use cases would be worthwhile. This work sets out two approaches new to this particular domain, and demonstrates their utility. \section{ Acknowledgments} The authors acknowledge the use of the IRIDIS High Performance Computing Facility.
\section{Introduction} Advective accretion flow around a black hole is likely to have two saddle-type sonic points. After the accretion flow with the appropriate injection parameters passes through the outer sonic points, the supersonic flow can be virtually stopped by the centrifugal force, forming a standing shock close to the black hole and again falling into the black hole supersonically. Apart from general researches on the shock wave, the study of the standing shock in the accretion disc flow under an astrophysical context was pioneered by \citet {b13}. He examined the transonic disc accretion onto a black hole with a fully relativistic treatment, assuming constant disc height and found multiple critical points as well as a transition through standing shock. \citet{b4} considered the hydrostatic equilibrium in the vertical direction and presented analytically the transonic solutions which include the standing shock in the rotating adiabatic flow under the pseudo-Newtonian potential of the black hole. Further studies of the standing shocks in the low angular momentum flows have been developed for parameter space research of the specific internal energy $\mathcal{E}$ and the specific angular momentum $\lambda$ responsible for the standing shock \citep{b10, b8, b27}, for 2D numerical simulations of the shocks by smoothed particle hydrodynamics (SPH) or Eulerian 2D hydrodynamics \citep{b24, b25, b26, b22, b18}, for astrophysical applications such as hard X-ray emission from the post-shock region, mass outflow rate and quasi-periodic oscillations (QPOs) phenomena \citep{b6, b7, b38, b30} and for effects of cooling, viscosity, and magnetic field on the standing shock \citep{b9, b21, b36, b1, b32}. However, there are only several 1D theoretical \citep{b14, b15, b16, b17} and 2D numerical studies \citep{b34, b33} of radiative standing shock, where the radiation influences on the shock structure of the pre-shock and the post-shock regions. In this paper, we examine further radiative shocks in the accretion flow by 2D radiation hydrodynamic simulations, especially focusing on the super-Eddington accreting flow, compare the results with theoretical structure of the radiative shock by \citet{b41} and \citet{b16}, and discuss the characteristic features of the radiative shock models in relevance to Ultraluminous X-ray sources (ULXs). In the next section, we present the model equations of our simulation setup, then numerical schemes, initial and boundary conditions are mentioned in section 3. In section 4, the results along with astrophysical significance are discussed then we summarize and discuss in the final section. \section{Model equations} We examine these shock problems in two-dimensional inviscid flow. A set of relevant equations of six partial differential equations of density, momentum, and thermal and radiation energy are solved. These equations include the heating and cooling of gas and radiation transport \citep{b20}. Using cylindrical coordinate ($r$, $z$, $\phi$), the basic equations are written in the following conservation form: \begin{equation} {\partial \rho\over\partial t} + \nabla\cdot\left(\rho\textbf{v}\right) = 0, \end{equation} \begin{equation} \begin{split} {\partial (\rho{v})\over\partial t} + \nabla\cdot\left(\rho v\textbf{v}\right) &= \rho\left[{{v_{\phi}}^2\over r} - {GM_{*}\over (\sqrt{r^2 + z^2}-r_{\rm g})^2} {r\over \sqrt{r^2+z^2}} \right] \\ &-{\partial p\over\partial r} + f_{r}, \end{split} \end{equation} \begin{equation} {\partial (\rho w)\over\partial t} + \nabla\cdot\left(\rho w\textbf{v}\right) = - {\rho GM_{*}\over (\sqrt{r^2 + z^2}-r_{\rm g})^2} {z\over \sqrt{r^2+z^2}} -{\partial p\over\partial z} + f_{z}, \end{equation} \begin{equation} {\partial (\rho r v_{\phi})\over\partial t} + \nabla\cdot\left(\rho r v_{\phi}\textbf{v}\right) = 0, \end{equation} \begin{equation} \frac{\partial{\rho\epsilon}}{\partial t} + \nabla\cdot \left(\rho\epsilon\textbf{v}\right) = -p \nabla \textbf{v} - \Lambda, \end{equation} \begin{equation} \frac{\partial E_{0}}{\partial t} +\nabla\cdot {\textbf{F}}_{0} + \nabla\cdot (\textbf{v}E_{0}+\textbf{v}\cdot P_{0}) = \Lambda - \rho{(\kappa+\sigma)\over c} \textbf{v}\cdot {\textbf{F}}_{0}, \end{equation} where $\rho$ is the mass density, $\textbf{v}= (v, w, v_{\phi})$ is the three fluid velocity components, $G$ is the gravitational constant, $M_{*}$ is the black hole mass, $p$ is the gas pressure, $\epsilon$ is the specific internal energy, $E_{0}$ is the radiation energy density per unit volume, $ {\textbf{P}}_{0}$ is the radiative stress tensor and $c$ is the speed of light. Here, subscript ``0" denotes the value in the comoving frame \citep{b19} and a pseudo-Newtonian potential \citep{b35} is adopted, where $r_{\rm g}$ is the Schwarzschild radius, given by $2GM_{*}/c^2$. The force density, ${\textbf{f}}_{\rm R} = (f_{r}, f_{z})$, exerted by the radiation field is given by \begin{equation} {\textbf{f}}_{\rm R} = \rho {(\kappa+\sigma) \over c} {\textbf{F}}_{0}, \end{equation} where $\kappa$ and $\sigma$ denote the absorption and scattering coefficient and ${\textbf{F}}_{0}$ is the radiative flux in the comoving frame. The quantity $\Lambda$ denotes the cooling and heating rates of the gas, \begin{equation} \Lambda = \rho c\kappa(S_{*} - E_{0}), \end{equation} where $S_{*}$ is the source function. For this source function, we assume local thermal equilibrium, $S_{*}=aT^{4}$, where $T$ is the gas temperature and $a$ is the radiation constant. For the equation of state, the gas pressure is given by the ideal gas law, $p = R_{\rm G}\rho T/\mu$, where $\mu$ is the mean molecular weight and $R_{\rm G}$ is the gas constant. To close the system of equations, we use the flux-limited diffusion approximation \citep{b23} for the radiative flux: \begin{equation} {\textbf{F}}_{0} = - {{\lambda_{\rm f} c}\over{\rho(\kappa + \sigma)}} \nabla {E}_{0}. \end{equation} and \begin{equation} {\textbf{P}}_{0} = E_{0}\cdot T_{\rm Edd}, \end{equation} where $\lambda_{\rm f}$ and $T_{\rm Edd}$ are the {\it flux-limiter} and the {\it Eddington Tensor}, respectively, for which we use the approximate formulas given in \citet{b20}. \section{Numerical methods} \subsection{Model parameters and numerical scheme} For the central black hole, we assume a Schwarzschild black hole with mass $M_{*}$ = 10$M_{\odot}$. First, we set model parameters of a specific internal energy $\mathcal{E}$ and a specific angular momentum $\lambda$ which are responsible for the standing shock. Then, given an outer radial boundary $R_{\rm out}$ and an input accretion rate $\dot M_{\rm input}$, we obtain flow variables of the density $\rho_{\rm out}$, the radial velocity $v_{\rm out}$ and the sound velocity $a_{\rm out}$ at the outer radial boundary from 1.5D transonic solutions \citep{b4}, under the vertical hydrostatic equilibrium assumption of the flow. For the given sound velocity $a_{\rm out}$, the gas temperature $T_{\rm out}$ is obtained from $a_{\rm out}^{2} ={\gamma R_{\rm G}T_{\rm out}} /\mu$ and $\gamma aT_{\rm out}^{4}/ {3{\rho}_{\rm out}}$ for gas-pressure dominant and radiation-pressure dominant cases, respectively, where $\gamma$ is the specific heat ratio. Accordingly, if the input gas is gas-pressure dominant, the temperature $T_{\rm out}$ is determined independent of input density $\rho_{\rm out}$. On the other hand, if the radiation pressure is dominant, the input gas temperature $T_{\rm out}$ and the radiation energy density $(E_{0})_{\rm out} (= a T_{\rm out}^{4})$ increases with increasing input density, assuming the local thermal equilibrium at the outer boundary. In 1.5D transonic equations, we have the specific energy $\mathcal{E}$ , that is, Bernoulli constant, given by \begin{equation}\label{eq:tot_E} \mathcal{E} = \frac {{v}_{\rm out}^{2}} {2} + \frac {a_{\rm out}^{2}} {\gamma - 1} + \frac {\lambda^{2}}{2r_{\rm out}^{2}} -\frac {1} {2(r_{\rm out}-1)}, \end{equation} where hereafter the velocities $v_{\rm out}$ and $a_{\rm out}$, $r$ and $\lambda$ are given by units of $c$, $r_{\rm g}$ and $r_{\rm g} c$, respectively. The specific heat ratio $\gamma$ of 1.6 is taken throughout this paper. We examine the standing shock in the flow with a fixed set of $\mathcal{E}$ and $\lambda$. As is mentioned above, when the gas pressure is dominant, $T_{\rm out}$ is specified by the fixed $\mathcal{E}$ and $\lambda$, but when the radiation-pressure is dominant, we need to specify furthermore the input density $\rho_{\rm out}$ to get the outer boundary temperature $T_{\rm out}$. In the flux-limited diffusion approximation, the radiative flux $F_0$ is given by the flux limiter $\lambda_{\rm f}$, the flux limiter $\lambda_{\rm f}$ depends on $E_0$, $\rho$ and $\kappa$, and achieves an extreme limit of 1/3 if the local density is sufficiently large, that is, the gas is fully optically thick. Then, the flux-limited diffusion approximation becomes the Eddington diffusion approximation. Thus the input density $\rho_{\rm out}$ is a parameter that evaluates the degree of optical thickness of the flow. We take the outer boundary $R_{\rm out}$ = 100. Referring to the hydrodynamical results in our previous paper \citep{b32}, we adopt $\lambda$= 1.5, $v_{\rm out}$= -0.072241 and $a_{\rm out}$= 0.037566 at the outer radial boundary. Then, giving the input density $\rho_{\rm out}$, we get other variables at the radial outer boundary. We examine six models of adiabatic case with $\rho_{\rm out} =2 $ (AD), optically thin case with $\rho_{\rm out}$ =2 (Thin1) and four optically thick cases with $\rho_{\rm out}$ = 20, 200, 2$\times 10^3$ and 2$\times 10^4$ (Thick2, Thick3, Thick4, and Thick5), respectively. Hereafter the density is shown in unit of ${\rho}_0 =10^{-8}$ g cm$^{-3}$. In model Thin1, the input gas is given to be optically thin but in models Thick2 to Thick5 the input accreting gas is optically thick. We should notice that model Thin1 has the same parameters as the adiabatic case AD but in the latter case, the radiation transport is not treated. The flow parameters and other input variables at the outer radial boundary are listed in Table 1, where $\mathcal{E}$= 2.328 $\times 10^{-5}$ and $\lambda$= 1.5 are used. \begin{table*} \centering \caption{Flow arameters of the radial velocity $v_{\rm out}$, the sound velocity $a_{\rm out}$, the input density $\rho_{\rm out}$, the temperature $T_{\rm out}$, the radiation energy density $(E_0)_{\rm out}$, the input accretion rate $\dot M_{\rm input}$ at the outer radial boundary $R_{\rm out}$= 100, where $\mathcal{E}$= 2.328$\times 10^{-5}$ and $\lambda$= 1.5 are used and $\rho_{0}$ is $10^{-8}$ g cm$^{-3}$.} . . \vspace{3mm} \begin{tabular}{@{}ccccccc} \hline &&&&&& \\ ${\rm model}$ & $v_{\rm out}$ & $a_{\rm out}$ & $\rho_{\rm out}$ & $T_{\rm out}$ & $(E_0)_{\rm out}$ & ${\dot M}_{\rm input}$ \\ & ($c$) & ($c$) & (${\rho}_0$) & ($ \rm K$) & (${\rho}_0 c^2$) & (${\dot M}_{\rm E}$) \\ \hline ${\rm AD}$ & -7.224E-2 & 3.757E-2 & 2 & 4.767E9 & --- & 12 \\ ${\rm Thin1}$ & '' & '' & 2 & 4.767E9 & 5.173E-5 & 12 \\ ${\rm Thick2}$ & '' & '' & 20 & 2.816E6 & 5.292E-2 & 120 \\ ${\rm Thick3}$ & '' & '' & 200 & 5.007E6 & 5.292E-1& 1.2E3\\ ${\rm Thick4}$ & '' & '' & 2E3 & 8.905E6 & 5.292 &1.2E4 \\ ${\rm Thick5}$ & '' & " & 2E4 & 1.583E7 & 5.292E1 & 1.2E5 \\ \hline \end{tabular} \end{table*} Here we introduce the Eddington critical accretion rate ${\dot M}_{\rm E} (=L_{\rm E}/c^2)$, where $L_{\rm E}$ is the Eddington luminosity given by, \begin{equation} L_{\rm E} = \frac{4\pi GM_*c}{\kappa_{\rm e}}, \end{equation} where ${\kappa}_{\rm e}$ is the electron scattering opacity. $L_{\rm E}$ and ${\dot M}_{\rm E}$ are 1.5 $\times 10^{39}$ erg s$^{-1}$ and 1.7$\times 10^{18}$, respectively, for the stellar-mass black hole with $M_* = 10 M_{\rm \odot}$. \begin{table*} \centering \caption{The shock location $R_{\rm s}$ on the equator, the total luminosity $L$, the luminosity $L_{\rm f}$ from the funnel region, the luminosity $L_{\rm rout}$ from the radial outer boundary, the total mass outflow rate ${\dot M}_{\rm out}$, the mass inflow rate ${\dot M}_{\rm edge}$ at the inner edge of the flow, and the mass outflow rate ${\dot M}_{\rm rout}$ through the outer radial boundary obtained in the simulations.} \vspace{3mm} \begin{tabular}{@{}cccccccc} \hline &&&&&&& \\ ${\rm model}$ & $R_{\rm s}$ & $L$& $L_{\rm f}/L$ & $L_{\rm rout}/L$ & ${\dot M}_{\rm out}$ & ${\dot M}_{\rm edge}$ & ${\dot M}_{\rm rout}/\dot M_{\rm out}$ \\ & ($r_{\rm g}$) & ($L_{\rm E}$) & -- & -- & (${\dot M}_{\rm input}$) & (${\dot M}_{\rm input}$) & -- \\ \hline ${\rm AD}$ & 50 & 0.02 & -- & -- & 0.25 & 0.7 & 0.98 \\ ${\rm Thin1}$ & 50 & 0.02 & 0.2 & 8E-3 & 0.21 & 0.8 & 0.97 \\ ${\rm Thick2}$ & 15 & 0.76 & 0.1 & 8E-4 & 0.04 & 0.9 & 0.95 \\ ${\rm Thick3}$ & 12 & 4.1 & 0.2 & 9E-4 & 0.02 & $\sim 1$ & 0.97 \\ ${\rm Thick4}$ & 9 & 8.1 & 0.79 & 7E-5 & 0.04 & $\sim 1$ & 0.77 \\ ${\rm Thick5}$ & 8 & 18.3 & 0.82 & 7E-5 & 0.04 & $\sim 1$ & 0.80 \\ \hline \end{tabular} \end{table*} \begin{figure} \begin{center} \includegraphics[width=86mm,height=60mm,angle=0]{fig1.eps} \label{fig1} \end{center} \caption{Time variations of luminosity $L$ (erg s$^{-1}$) for modeld AD (solid line) and Thin1 (dotted line).} \end{figure} \subsection{Initial conditions} The 1.5D transonic solutions of the accretion flow give the initial conditions, that is, density $\rho(r)$, radial velocity $v(r)$, sound speed $a(r)$, Mach number $M_{\rm a}(r)$, temperature $T(r)$ and disc thickness $h(r)$ within $ z \leq h(r)$ at a given radius $r$. In the region of $z \ge h(r)$, the variables are set appropriately. \subsection{Boundary Conditions} The outer radial boundary at $r=R_{\rm out}$ is divided into two parts. One is the disc outer boundary through which matter is entering from the outer flow. At the disc boundary ( $0 \leq z \leq h_{\rm out}$ at $r$ =$R_{\rm out}$), we impose continuous inflow of matter with constant variables given by the 1.5D solutions, where $h_{\rm out}$ is the disc height at the outer radial boundary. The other is the outer boundary region above the disc. Here we impose free-floating conditions and allow for the outflow of matter, whereas any inflow is prohibited. At the vertical outer boundary $z=Z_{\rm out}$ (=100), we also impose the free floating conditions. On the rotating axis, all variables are set to be symmetric relative to the axis. The inner boundary at $r = R_{\rm in}$ (=2) is treated as the absorbing boundary since it is below the last stable circular orbital radius 3$r_{\rm g}$. \begin{figure} \centering \subfloat[Profiles of temperature $T$ (K) and Mach number on the equator of the steady flow in model Thin. ]{ \label{fig2a} \includegraphics[width=86mm,height=66mm]{fig2a.eps} } \subfloat[2D contours of temperature in model Thin1, where the shock front is shown as the thick solid line elongated upward ($R_{\rm s} \sim 50$).]{ \label{fig2b} \includegraphics[width=86mm,height=66mm]{fig2b.eps} } \caption{} \label{fig2} \end{figure} \section{Numerical Results} The set of partial differential equations (1)-(6) is numerically solved by a finite-difference method under adequate initial and boundary conditions. The numerical schemes used are the same as those described previously \citep{b31}. The methods are based on an explicit-implicit finite difference scheme that is superior in numerical stability. The mesh points $N_{\rm r}$ and $N_{\rm z}$ in radial and vertical directions are taken to be 410 and 210, respectively, in all simulations. \subsection{Luminosity and shock location} The luminosity in model AD is given by, assuming that the gas is completely optically thin \begin{equation} L=\int \Lambda {\rm d} V, \end{equation} where only bremsstrahlung emission is considered under one temperature model and $L$ is integrated over all computational zones. On the other hand, the luminosity in models Thin1 to Thick5 is given by \begin{equation} L = \int \textbf{F}_0 d \textbf{S}, \end{equation} where $d \textbf{S}$ is the area element of the computational domain and the integral is taken over the surface area of the computational domain except for the region of the input accreting gas. The mass outflow rate $\dot M_{\rm out}$ is defined by the total rate of outflow through the outer boundaries ($z= Z_{\rm out}$) in the z-direction and ($r= R_{\rm out}$) in the r-direction. \begin{equation} \begin{split} \dot M_{\rm out} =& 4\pi\int_{0}^{R_{\rm out}} \rho (r, Z_{\rm out}) w(r, Z_{\rm out}) r dr \\ & + 4\pi \int_{h_{\rm out}}^{Z_{\rm out}} R_{\rm out}^2 \rho (R_{\rm out}, z) v(R_{\rm out}, z) dz. \end{split} \end{equation} \begin{figure} \centering \subfloat[Profiles of temperature $T$ (K) and Mach number of the gas on the equator in model Thick3. ]{ \label{fig3a} \includegraphics[width=86mm,height=66mm]{fig3a.eps} } \subfloat[2D contours of temperature in model Thick3, where the shock front is shown as the thick solid line elongated upward ($R_{\rm s} \sim 10$).]{ \label{fig3b} \includegraphics[width=86mm,height=66mm]{fig3b.eps} } \caption{} \label{fig3} \end{figure} The simulations are done until steady-state flow is obtained. Table 2 shows the shock location $R_{\rm s}$ on the equator, the total luminosity $L$, the funnel luminosity $L_{\rm f}$ from the funnel region, the edge-on luminosity $L_{\rm rout}$ through the radial outer boundary, the total mass flow rate ${\dot M}_{\rm out}$ from the outer boundaries, the mass inflow rate ${\dot M}_{\rm edge}$ at the inner edge of the flow and the mass outflow rate $\dot M_{\rm rout}$ through the radial outer boundary. Fig.~1 shows the luminosity curves for models AD and Thin1. The luminosity curve in the optically thin model Thin1 agrees well with that in the adiabatic model, where the final luminosity $L \sim 3 \times 10^{37}$ erg s$^{-1}$. This result confirms that the flux-limited diffusion approximation used here has a good accuracy even in optically thin gas. Fig.~2 (a) shows profiles of the temperature $T$ and the Mach number on the equator in model Thin1, which are almost same as those in model AD. The shock front is found as a sharp discontinuity at $r \sim 50$. Fig.~2 (b) shows 2D contours of temperature in model Thin1, where the shock front is shown as a thick solid line elongated upward ($R_{\rm s} \sim 50$). Contours of the flux-limitter $\lambda_{\rm f}$ in the model denote that the gas near the equator becomes optically thick as $\lambda_{\rm f} \sim 0.3$ in the post-shock region but is moderately optically thin as $\lambda_{\rm f} \sim 0.2$ in the upstream and fully optically thin in the funnel region. On the other hand, in the radiation-pressure dominant models, the increasing input densities $\rho_{\rm out}$ enhance the optical thickness of the gas. The shock locations in models Thick2 to Thick5 decrease as $R_{\rm s} \sim$ 15 to 8, respectively. The increasing density $\rho_{\rm out}$ leads to higher input temperature $T_{\rm out}$, higher temperatures in the accreting flow, and stronger radiation pressure forces, because $P_{\rm out} \propto T_{\rm out}^{4} \propto {\rho}_{\rm out} {a_{\rm out}}^2$, where $P$ is the total pressure. Therefore, to establish the pressure balance at the shock front, the shock in model with the higher input density must move down to inner location with a stronger gravitational force. \subsection{ Overall flow and shock structure} Fig.~3(a) shows the temperature $T$ and the Mach number on the equator of the steady flow in model Thick3. In this model, the gas is optically thick throughout the flow except for the funnel region. The luminosities in models Thick2 -- Thick5 are chaotically variable with small amplitudes of a few factor and the chaotic variation of the luminosity is attributed to the Kelvin-Helmholtz instability which occurs along the centrifugal barrier surface. The averaged luminosities are as high as $1.1 \times 10^{39}$ -- 2.7 $\times 10^{40}$ erg s$^{-1}$. Such powerful radiation will influence the pre-shock and post-shock structures. As far as 1D profiles of Fig.~3(a) are concerned, the shock front seems to be discontinuous similarly to the adiabatic model AD, and the large effects of the radiation on the shock structure seem not to be found there. However, Fig.~3(b) shows an oblique shock wave with a finite thickness which is elongated upward from $r \sim 10$ on the equator. The shock has a finite thickness of a few $r_{g}$ (several mesh points). Fig.~4 shows 2D contours of the density (a) and the temperature (b) in model Thick5. The overall flow consists of two regions; (1) the funnel region with an opening angle of $\sim 15^\circ$ between the rotational axis and the centrifugal barrier and (2) the gas accreting region between the centrifugal barrier and the equatorial plane. The centrifugal barrier is roughly defined by a balance between the centrifugal force and the gravitational force. The accreting region is separated into further two regions by the oblique shock wave. The finite shock thickness is due to the radiative effect. The figure shows the turbulent phenomana along the centrifugal barrier and the turbulent gas becomes optically thick in the funnel region with increasing input density. The turbulent motion is originated in the Kelvin-Helmholtz instability which can occur when there exists a velocity shear in a single continuous fluid or if there is a velocity difference across the interface between two fluids \citep{b30}. We confirm here the upward moving gas and the downward accreting gas across the centrifugal barrier above $z \ge 10$ in the funnel region. In these models with high mass accretion rates and luminosities, the accretion disc is optically and geometrically thick and it may be unfavourable for us to name the flow as ``accretion disc" because $h/r$ $\geq 1$ in the inner region of the flow, if we define the disc height to be a height at which the density drops to one-tenth of the central density on the equatorial plane. \begin{figure} \centering \subfloat[2D contours of density (g cm$^{-3}$) in model Thick5. The turbulent motion appears in the funnel region along the centrifugal barrier surface and the accreting region is separated into two region by the oblique shock front elongated upward at $r \sim 8$]{ \label{fig4a} \includegraphics[width=86mm,height=66mm]{fig4a.eps} } \subfloat[Same as Fig~4(a) but for temperature in model Thick5.]{ \label{fig4b} \includegraphics[width=86mm,height=66mm]{fig4b.eps} } \caption{} \label{fig4} \end{figure} \begin{figure} \begin{center} \includegraphics[width=76mm,height=66mm]{fig5.eps} \caption{ Profiles of temperature $T$(K) (solid line), density $\rho$ (g cm$^{-3}$) (doted line) and Mach number (dashed line) on the equatorial plane in model Thick5.} \label{fig5} \end{center} \end{figure} \begin{figure} \begin{center} \includegraphics[width=76mm,height=66mm]{fig6.eps} \label{fig6} \end{center} \caption{Comparison of total pressure and density in the precursor regions by simulations (solid lines) and analytical results (dashed lines), respectively, where the shock front location $R_{\rm s}$=8 and the upstream point in the calculation is taken as $r=78$ (see Fig.~5).} \end{figure} Fig.~5 shows the temperature $T$, the density $\rho$, and the Mach number on the equatorial plane in model Thick5, where a spike-like feature of the temperature across the shock front is found, differently from the discontinuous front in the optically thin models AD and Thin1. Under consideration of the radiation heat conduction and the supercritical shock wave, \citet{b41} estimates the optical thickness $\Delta \tau_{\rm s}$ of the shock region as, \begin{equation} \Delta \tau_{\rm s} = {4 \over {3\surd{3}}} \left[ \left({T_{-} \over T_{\rm c}}\right)^3 -1\right] , \end{equation} where $T_{-}$ and $T_{\rm c}$ are the temperature before the shock discontinuity and the critical temperature in the supercritical shock, respectively. From definition of $T_{\rm c}$ and numerical value $T_{-}$ in the simulations, we estimate $T_{-}/T_{\rm c} \sim $ 2.5 and then $\Delta \tau_{\rm s} \sim 10$. The shock thickness $\Delta R_{\rm s}$ is given by $\Delta R_{\rm s}$ = $l_{\rm r} \: \Delta \tau_{\rm s}$, where $l_{\rm r} = 1/{\kappa \rho}$ is the phton mean free path and we use the Kramers opacity for $\kappa$. Then we have $\Delta R_{\rm s} \sim 7 \times 10^6$ cm $\sim$ a few $r_{\rm g}$. The shock thickness agrees well with $\sim$ a few $r_{\rm g}$ obtained in the simulations of models Thick 3 to 5. In model Thick5, the gas is fully optically thick and radiation-pressure dominant in the pre-shock and post-shock regions. But, in the peak temperature region behind the shock front, the gas is moderately optically thick and the ratio of gas pressure to total pressure is $\sim$ 0.1. \citet{b16} examined non-relativistic radiative shocks in the disc accretion and solved analytically the structure of the radiative precursor region for both the gas and radiation-pressure dominated cases. Since our model Thin1 with gas-pressure dominant and optically thin matter shows almost the same result as the adiabatic case, the radiative effects on the shock are negligible. We compare the analytical structure of the precursor region in the pressure dominant flow with the results by the simulations for model Thick5. The structure equation for the radiative precursor in the radiation-pressure dominated case is given as \citep{b16}, \begin{equation} { 1 \over {\tau_{1} \beta_{1}} } \frac {\tilde{P}^2} {\tilde{\Sigma}^3} \frac {d \tilde{P} } {d x} = {1\over 2} {\gamma \over {\alpha_{1}}} M_{1}^2 ({1\over {\tilde{\Sigma}^2}}-1) + 4 ({\tilde{P}^2\over {\tilde{\Sigma}^2}} - 1), \end{equation} where \begin{equation} \tilde{\Sigma} = \frac {\tilde{P}^2 + ({\gamma\over {\alpha_{1}}} ){M_{1}}^2} {1 + ({\gamma \over {\alpha_{1}}} ) {M_{1}}^2}. \end{equation} Here $\tau_{1}$, $\beta_{1}$, $\alpha_{1}$ and $M_{1}$ are the parameters determined at the upstream region far from the shock, $\tilde{P}$ and $\tilde{\Sigma}$ are the total pressure and the surface density normalized in their values at the upstream region. With $\tau_{1}=4.3\times 10^{-3}$, $\beta_{1}=8.6\times 10^{-2}$, $\alpha_{1}= 2\times 10^2$, $M_{1}= 2.77$, and other variables at the upstream region in model Thick5, we get the analytical solutions of $\tilde{P}$, $\tilde{\rho}$, $\tilde{\Sigma}$, etc., solving the equation (17) by Runge-Kutta method. Fig.~6 shows the solutions of $\tilde{P}$ and $\tilde{\rho}$ in the precursor region of model Thick5 (solid lines) and the analytical solutions (dashed lines), respectively, where shock front location $R_{\rm s} = 8$ and the upstream point in the calculation is taken as $r = 78$. The analytical density is higher more than two orders of magnitude than the density in the simulation only near the shock front and that the pressure is underestimated compared with that in the simulations. Since $P \propto E_{\rm 0} \propto T^4$ in the optically thick and radiation-pressure dominant region, the simulation shows considerable heat up of the upstream region. The theoretical solutions are based on the assumption of the vertically hydrostatic equilibrium which requires the geometrically thin disc as $h/r \ll 1$. However, when the mass accretion is sufficiently large and the luminosity exceeds the Eddington luminosity, the accretion disc becomes geometrically thick. Our simulations in models Thick4 and 5 show $h/r \approx 1$ in the inner region of the flow. Then, the geometrically thick and hot disc leads to a lower density. However, there is no big difference between the theoretical and the simulations results for the present model. This may be due to the small Mach number $\sim 2$ used here. \subsection{Astrophysical relevance} In models Thick4 and 5, the mass outflow rates are a few percent of the input accretion rate but the absolute rates are as high as $\sim 10^{-5}$ -- $10^{-4}$ $ M_{\odot}$ yr$^{-1}$. About 80 percent of the mass outflow is lost from the outer radial boundary and the mass outflow rate from the funnel region is small as one thousandth of the total outflow rate but the absolute flow rate is rather high as $\sim 10^{-6} M_{\odot}$ yr$^{-1}$ compared with usual mass loss rate of normal stars. The high mass outflow rate may be observed over the wide wind region because the outflow from the radial outer boundary will develop as the wind. Besides, the radial velocities on the vertical outer boundary within the funnel region are small as $\sim$ 0.08 maximumly, which is smaller than the escape velocity $\sim 0.1$, and somewhere negative because of the turbulent motion. Then, the high velocity jets are not found here. As is found in Table 2, the luminosity $L_{\rm f}$ through the funnel region covers $\sim$ 80 percent of the total luminosity of 1.2 -- 2.7 $\times 10^{40}$ erg s$^{-1}$ in models Thick4 and 5. While the luminosity $L_{\rm r_{\rm out}}$ from the outer radial boundary is very small as $\sim 10^{-4}$ of the total luminosity. This means that the face-on luminosity is very high as $\sim 10^{40}$ erg s$^{-1}$ but the edge-on luminosity is small as $\sim 10^{36}$ erg s$^{-1}$. Fig.~7 shows the luminosity distribution $\Delta L(r)$ per area over 10 $r_{\rm g}$ on the vertical outer boundary surface in models Thin1, Thick4, and Thick5. It shows a strongly anisotropic distribution of radiation around the rotational axis in models Thick 4 and 5 but not in optically thin model Thin1. Why the luminosity from the funnel region is so high ? In the usual funnel region under the accretion disc flow, gas is very rarefied, optically thin and hot. Actually, in models AD, Thin1, and Thick2, the gas in the funnel region is optically thin and hot but partly optically thick in model Thick3. On the other hand, in models Thick4 and 5, the input densities are much higher. The Kelvin-Helmholtz instability occurring along the centrifugal barrier transports upward turbulent outflow gas from the base of the inner accretion disc. As a result, the gas in the upper-funnel region becomes dense and optically thick with the increasing input density. The existence of the radiative shock promotes such a process in the inner region because the shock is formed near to the event horizon. Thus, the optically thick and hot gas in the funnel region contributes largely to the total luminosity with an increasing mass accretion rate. The optically thick portion in the funnel region widens with the increasing input density and the ratio $L_{\rm f}/L$ of the funnel luminosity to the total luminosity in Table 2 shows such result. \begin{figure} \begin{center} \begin{tabular}{cc} \begin{minipage} {0.3\linewidth} \begin{center} \includegraphics[width=25mm,height=36mm]{fig7a.eps} \label{fig7a} \end{center} \end{minipage} \begin{minipage}{0.3\linewidth} \begin{center} \includegraphics[width=25mm,height=36mm]{fig7b.eps} \label{fig7b} \end{center} \end{minipage} \begin{minipage}{0.3\linewidth} \begin{center} \includegraphics[width=25mm,height=36mm]{fig7c.eps} \label{fig7c} \end{center} \end{minipage} \end{tabular} \caption{Radial distribution $\Delta L(r) $ (erg s$^{-1}$) of luminosity per area over 10$r_{\rm g}$ on the vertical outer boundary surface in models Thin1 (a), Thick4 (b) and Thick5 (c). Most of the radiation in models Thick4 and 5 is emitted from the optically thick funnel region within $r \le 35$ but optically thin model Thin1 never show strongly anisotropic distribution of the radiation. } \end{center} \end{figure} The very high luminosity from the narrow funnel region, the low edge-on luminosity, and the high mass outflow rate from the wind region are characteristic features of the optically thick models considered here. In these models, the gas is fully optically thick in the accretion flow and optically thick even in the funnel region except just near the rotational axis. For simplicity, assuming that the optically thick gas on the vertical outer boundary emits as a black body but only optically thin funnel region radiates the free-free emission, we get a rough spectrum $L_{\nu}$ given by \begin{equation} L_{\nu} = \int \pi B_{\nu}(T) d \textbf{S} + \int \epsilon_{\rm ff}(\nu) {\rm d} V \;\; {\rm erg}\; {\rm s}^{-1}\; {\rm HZ}^{-1}, \end{equation} where $B_{\nu}(T)$ is the Planck function, $\epsilon_{\rm ff}$ is the monochromatic free-free emission rate, and the area and volume integrals are done over the optically thick surface on the vertical outer boundary and the funnel region, respectively. Fig.~8 shows the spectra $L_{\nu}$ for models Thick4 and 5. The black body spectra with a single temperature of $T =5\times 10^{6}$ (dotted line) and $10^{7}$ (dashed line) K in model Thick4 and $T =10^{7}$ (dotted line) and $3\times 10^{7}$ (dashed line) in model Thick5 are also shown, respectively. The spectra in models Thick4 and 5 behave approximately as the black body radiation with a single temperature of $T=5\times 10^6$ -- $3\times 10^7$ K. \begin{figure} \centering \subfloat[Spectra $L_{\nu}$ erg s$^{-1}$ Hz$^{-1}$ for model Thick4 (solid line), where dotted and dashed lines denote black body radiations with a single temperature of $T = 5\times 10^6$ and $10^7$ K, respectively.]{ \label{fig8a} \includegraphics[width=76mm,height=56mm]{fig8a.eps} } \subfloat[Same as Fig.~8(a) but in model Thick5 (solid line) and black body radiation with a single temperature of $T = 5\times 10^6$ (dotted line) and $3\times 10^7$ K (dashed line). The free-free emission component from the funnel region is almost negligible here]{ \label{fig8b} \includegraphics[width=76mm,height=56mm]{fig8b.eps} } \caption{} \label{fig8} \end{figure} \section{Summary and Discussion} We studied radiative shocks in low angular momentum flow around super-Eddington accreting black holes. Adopting a typical set of flow parameters of the specific angular momentum $\lambda$, the radial velocity $v_{\rm out}$, the sound velocity $a_{\rm out}$, and the density $\rho_{\rm out}$ responsible for the standing shock, we obtained the results which are summarized below. (1) In the optically thick and radiation-pressure dominant models, the flows with input accretion rate of $1.2 \times 10^2$ to $1.2 \times 10^5$ Eddington critical accretion rates result in $\sim$ 1 -- 18 $L_{\rm E}$ ($ 10^{39} $ -- $ 3 \times 10^{40}$ erg $s^{-1}$) and the luminosities tend to be saturated towards $\sim 3 \times 10^{40}$ erg s$^{-1}$ with increasing accretion rates. The shock locations $R_{\rm s}$ on the equator decrease as $\sim$15 to 8 with the increasing accretion rate, compared with the large $R_{\rm s} \sim 50$ in the adiabatic model with the same parameters. This is because the increasing mass accretion rate leads to higher temperatures and stronger radiation pressure forces in the accreting gas and that, to establish the pressure balance at the shock front, the shock with the higher accretion rate must move down to the inward location with stronger gravitational force. (2) The shock wave is formed obliquely from the equator, and the oblique shock has a finite thickness of the shock front due to the radiative effect. The finite shock thickness $\Delta R_{\rm s}$ of a few $r_{\rm g}$ corresponds well to theoretical value by Zel'dovich and Raizer (1966). The shock structure in the precursor region agrees with the theoretical one by Fukue (2019c), except just near the shock front (3) In optically thick models Thick4 and 5, the mass outflow rates are high as $\sim 10^{-5}$ and $10^{-4} M_{\odot}$ yr$^{-1}$ and are mostly originated in the wide wind region. Most of the radiation $\sim 10^{40}$ erg $s^{-1}$ is emitted from the narrow funnel region along the rotational axis, that is, the radiation shows a strongly anisotropic distribution around the rotational axis. This is because the gas in the funnel region becomes optically thick and hot with increasing input accretion rate and emit radiation like the black body with temperatures of $5\times10^6$ -- $3\times 10^7$ K. While the edge-on luminosity is far small as $\sim 10^{36}$ erg $s^{-1}$. The present optically thick and radiation-pressure dominant shock models show some of the characteristic features of Ultraluminous X-ray sources (ULXs). ULXs are X-ray sources with X-ray luminosity above the Eddington limit for stellar-mass or below the Eddington limit for intermediate-mass black holes but not supermassive black holes \citep{b39, b40, b2}, although the recent discovery of coherent pulsations in ULXs support neutron stars as host \citep{b3}. A super-Eddington accretion model onto a stellar-mass black hole whose luminosity far exceeds the Eddington luminosity was proposed by \citet{b37}. The key features of the super-Eddington accretion are strong optically thick wind and collimated radiation. Such super-Eddington models were well reproduced by 2D radiation hydrodynamic and 2D radiation magneto-hydrodynamic simulations, which take account of viscous and magnetic dissipation, respectively \citep{b29, b28}. They found that the matter can fall onto the black hole with an accretion rate beyond the Eddington limit and the apparent luminosity can exceed the Eddington luminosity because of the photon trapping within the disc. As a result, the supercritical accretion flows show mildly anisotropic and collimated emission and a strong outflow from the disc due to radiation pressure force. The basic difference between their and our work is that we consider the inviscid, low angular momentum flow while they focus on the viscous, high angular momentum flow. The superaccretor SS 433 belongs to a typical class of ULXs. The apparent X-ray luminosity is about $\sim 10^{36}$ erg s$^{-1}$ but the intrinsic luminosity is considered to be probably $\geq 10^{39}$ erg $s^{-1}$ because we observe the source edge-on (Fabrika 2004, Fabrika, Vinokurov and Atapin 2018). In our models Thick4 and 5, the luminosities are very high as $\sim 10^{40}$ erg s$^{-1}$ and the radiation shows a strongly anisotropic distribution around the rotational axis. In addition, the edge-on luminosity through the outer radial boundary is very low as $\sim 10^{36}$ erg s$^{-1}$. The large mass outflow rates $\dot M_{\rm out} \sim 10^{-5}$ -- $10^{-4} M_{\odot}$ yr$^{-1}$ are originated in the wide wind region. However, the relativistically high velocity jets along the rotational axis are not found in the funnel region, as is detected in SS 433. This may be due to that the outer boundary used here is small as $R_{\rm out}$ = 100 and the outflow gas in the funnel region is not still sufficiently accelerated by powerful radiation pressure force. In SS 433 which consists of a close binary system, the mass transfer rate from the second companion and the wind mass outflow rate from the primary are observationally estimated to be $\sim 10^{-4}$ -- $10^{-3} M_{\odot}$ yr$^{-1}$ and $\sim 10^{-5}$ -- $10^{-4} M_{\odot}$ yr$^{-1}$, respectively \citep{b11}. Their values agree well to the input mass accretion rates and the mass outflow rates in models Thick4 and 5. In the close binary system with high luminosity, it is conceivable that the companion transports not only high mass outflow but also high angular momentum to the primary through critical Roche lobe, differently from small angular momentum by stellar wind in detached binary system. Then, one may wonder if the inviscid flow used in this paper is valid under such close binary system with the super-Eddington luminosity or not. This is justified as the viscous flow can achieve specific angular momentum of Keplerian value at the outer boundary while behaving as a sub-Keplerian, low angular momentum flow with shock in the inner region \citep{b21}. Actually they find the global accretion solution that the viscous Keplerian flow with the viscosity parameter $\alpha$ ($\le$ 0.15) at the outer boundary beyond distance of $5 \times 10^3 r_{\rm g}$ connects to the low angular momentum sub-Keplerian flow below the inner region of a few hundreds $r_{\rm g}$. Finally, the radiative shock models give a concrete shape to the superaccretor SS 433 and show a possible model for ULXs. Further studies of the radiative shock model with the super-Eddington luminosity should be developed to apply to ULXs with stellar-mass black holes. \section*{Acknowledgments} CBS is supported by the National Natural Science Foundation of China under grant no. 12073021. \section*{Data Availability} The data underlying this article will be shared on reasonable request to the corresponding author.
\section{Introduction} In the recent decade, GPU accelerators have been used to speed up non-graphical applications on multiple classes of devices -- from portable devices to supercomputers. Different models of GPU hardware vary significantly in terms of their architecture, even when manufactured by the same vendor. For example, there are eight generations of NVIDIA CUDA GPUs available, differing in the number of cores per multiprocessors, the presence of read/write L1 cache, the number of registers and more. Moreover, each generation contains a broad range of GPU models with different floating-point performance and memory bandwidth. As the hardware characteristics heavily influence the performance of a given GPU kernel, its code needs to be adapted for each GPU model to achieve optimal performance -- otherwise, performance portability is not ensured~\cite{kurzak2012autotuning, nugteren2015cltune, petrovic2020benchmark}. Furthermore, kernels' performance is also sensitive to input size, structure, or application settings, so a code optimized for a certain input characteristics may run sub-optimally when those change~\cite{gonzalo2017revisiting, nugteren2018clblast, strelak2019gpu}. Autotuning is a method which allows codes to be automatically adjusted to given hardware and input~\cite{balaprakash2018autotuning}. During GPU kernel development, programmers define \textit{tuning parameters} -- the properties of the code which influence application performance. Each tuning parameter can take one of a pre-defined set of discrete values. The cross product of tuning parameters (potentially pruned by \textit{a priori} known constraints) forms a \textit{tuning space}. One point in tuning space, which defines how the computational kernel is created and executed, is called a \textit{tuning configuration}. An autotuning framework searches the tuning space for a tuning configuration that minimizes a tuning objective, usually runtime or power consumption~\cite{balaprakash2018autotuning}. Autotuning spaces have several properties that make their efficient search difficult. These discrete optimization spaces with many dimensions are known to be non-convex, non-linear and with low locality~\cite{balaprakash2011can}. The time needed to perform a tuning space search can limit the practical usage of autotuning. This happens especially in two cases: (i) when the tuning space is vast, and most of its configurations perform poorly, thus the search takes long; (ii) when the performance depends significantly on input characteristics (e.\,g.{}, size), which often change, thus the search needs to happen often. Methods for searching tuning spaces view their objective as a function of tuning parameters. Multiple methods for tuning specific optimization exist~\cite{cummins2017end, connors2019automatically, yu2020efficient, muralidharan2016architecture}, some of them leveraging performance counters~\cite{wang2009mapping, singh2009prediction, cavazos2007rapidly, rahman2015maximizing, zhang2018auto}. Those methods are designed for fixed types of optimizations (i.\,e.{}, tuning parameters) and can tune those parameters for unseen applications on the seen hardware. It is possible because they use a model for concrete optimization, so the model can be constructed using a base of many applications implementing the same type of optimization. In contrast, generic tuning spaces can contain any optimization the programmer implements, so the model cannot be constructed this way. State-of-the-art methods for searching generic tuning spaces (i.\,e.{}, including any tuning parameters) are based on mathematical optimization~\cite{balaprakash2011can, vanwerkhoven2018kernel}, or they use a surrogate performance/power model built from a sample of the tuning space~\cite{jia2013starchart, price2015improving, falch2015machine, feng2017sampling}. Because the function relating tuning parameters with the tuning objective differs with hardware and input, those methods require the autotuning to be repeated from scratch when hardware or input changes. The essential contribution of this paper is the introduction of a novel generic tuning space search method that breaks the aforementioned relation. Once the tuning space is partially explored for some hardware and input, the portable model makes it possible to speed up tuning when input or hardware changes. Our method mimics the iterative optimization performed by developers. Developers use profilers to collect performance counters and identify bottlenecks (overloaded processor subsystems) on multiple levels of hardware hierarchy. They also understand how the properties of their code (i.\,e.{}, tuning parameters) are related to performance counters. They iteratively detect bottlenecks and modify the code to reduce stress on the bottlenecks until they reach sufficient code performance. Our method aims to do the same. It requires a training phase, wherein the model is trained to capture how tuning parameters influence performance counters (machine-learning based analogy to a developer's understanding of the relationship). During autotuning, the method iteratively profiles the code and acquires performance counters, analyzes bottlenecks and determines which performance counters should be changed to soften the bottlenecks using an expert system (analogy to a developer's work with a profiling tool). Then, it uses the model to determine which tuning configurations change performance counters in the required way. Finally, it selects the next tuning configuration to profile (analogy to a developer's modification of the code). \begin{figure}[t] \centering \includegraphics[width=.49\hsize]{time.pdf} \includegraphics[width=.49\hsize]{l2read.pdf} \includegraphics[width=.49\hsize]{tex.pdf} \includegraphics[width=.49\hsize]{fp32.pdf} \caption{Dependence between a tuning parameter and various properties of the kernel, shown on Coulomb summation~\cite{filipovic2017autotuning} running with large gridbox on GeForce GTX 750 and with small gridbox on GeForce GTX 1070. The x-axis shows a tuning parameter changing thread coarsening. The y-axis shows normalized values of selected properties: kernel runtime, L2 cache read transactions, texture cache read transactions and 32-bit floating-point operations.} \label{fig:dependence-ilustration} \end{figure} The strength of our method is its ability to build a model using a particular GPU and input, and use this model to speed up autotuning of a kernel running on a \textit{different GPU} or processing \textit{different input}. This is possible because the method builds the model of relations between tuning parameters and performance counters and searches for the performance gain based on the performance counters, instead of relating tuning parameters directly to the performance, as is done in~\cite{balaprakash2011can, vanwerkhoven2018kernel, jia2013starchart, price2015improving, falch2015machine, feng2017sampling}. We distinguish two types of performance counters: the counters measuring stress of a processor subsystem, called $\mli{PC_{stress}}$, and counters measuring amount of operations on a processor subsystem, called $\mli{PC_{ops}}$ (assignment of selected NVIDIA GPU performance counters between those sets is shown in Table~\ref{tab:pcs}). Compared to the performance itself, the tuning parameters affect performance counters $\mli{PC_{ops}}$ in a more straightforward and stable way. This is illustrated in Figure~\ref{fig:dependence-ilustration} for the Coulomb sum benchmark (described in the next section of this paper). In this example, the relation of the depicted tuning parameter to kernel runtime changes significantly with different input and hardware, whereas the relation between the tuning parameter and normalized values of performance counters $\mli{PC_{ops}}$ remains stable~\footnote{On the other hand, relations between a given tuning parameter and performance counters $\mli{PC_{stress}}$, such as the utilization of caches or floating-point units, differ significantly between GPUs and input sizes.}. As we show in this paper, the stability of the relation between tuning parameters and performance counters when changing hardware or input makes it possible to train and use models created from historical tuning data to speed up tuning space search with various benchmarks. The evaluation is performed on a benchmark set of five kernels taken from~\cite{nugteren2015cltune, petrovic2020benchmark}. The obtained result shows that measuring the performance counters and using a model created from historical tuning data can bias the search process towards faster convergence. The proposed profile-based searcher systematically outperforms random search using a model created on different GPU, different input, or smaller tuning space. The proposed searcher also outperforms Basin Hopping implemented in Kernel Tuner~\cite{vanwerkhoven2018kernel} and regression-tree model implemented in Starchart~\cite{jia2013starchart} in most cases. The paper makes the following major contributions: \begin{itemize} \item \textit{Using hardware performance counters to navigate search\-ing of tuning space.} The proposed profile-based searcher is agnostic to the type of tuning parameters included in the tuning space (both their number and the code properties they tune). To the best of our knowledge, this is the first generic autotuning searcher using performance counters to speed up tuning space searching convergence with arbitrary tuning parameters that are unknown at the time of the searcher design. \item \textit{Comprehensive evaluation of the proposed profile-ba\-sed searcher.} The proposed searcher is tested in multiple scenarios, including performance portability across various hardware, input, and tuning spaces, using five benchmarks and four GPU architectures. We have also compared our searcher to an op\-ti\-mi\-za\-ti\-on-ba\-sed searcher~\cite{vanwerkhoven2018kernel} and a model-based searcher~\cite{jia2013starchart}, showing that the proposed searcher converges faster to the near-optimal configuration in most cases. \item \textit{Integration of the searcher into a real-world tuning framework.} The proposed profile-based searcher is implemented within Kernel Tuning Toolkit (KTT)~\cite{petrovic2020benchmark}. Therefore, it is possible to measure the real speed of searching convergence. Moreover, the tuning framework with the searcher and experimental data~\cite{filipovic2021cuda} is freely available to the community~\footnote{\url{https://github.com/HiPerCoRe/KTT}}. \end{itemize} The rest of the paper is organized as follows. In Section~\ref{sect:example}, an example of manual tuning using performance counters is given. This example serves to illustrate the process which our framework intends to automate. The proposed search method is described in Section~\ref{sect:method}. Section~\ref{sect:eval} evaluates the proposed searcher and compares it to alternative approaches. The related work is described in Section~\ref{sect:related_work}. We conclude and outline the future work in Section~\ref{sect:conclusion}. \section{Example of Manual Tuning Space Search} \label{sect:example} In this section, we demonstrate a manual approach to tuning space search using hardware performance counters. This example aims to ease the understanding of the concepts behind our proposed automatic searcher described in the next section. \subsection{Direct Coulomb Summation} We use a simplified version of the 3D implementation of Direct Coulomb Summation introduced in~\cite{filipovic2017autotuning} as an example. With Direct Coulomb Summation, the electrostatic potential around a molecule is computed on a regular grid. For each grid point $V_i$, we compute: \begin{equation} V_i = \sum_{j=0}^{n}\frac{w_j}{4 \pi \epsilon_0 r_{ij}} \label{eq:coulomb} \end{equation} where $n$ is the number of atoms, $w_j$ is the charge of $j$-th atom, $r_{ij}$ is the Euclidean distance between atom $j$ and grid point $i$, and $\epsilon_0$ is vacuum permitivity. Listing~\ref{lst:coulomb} shows the source code of the simplified Direct Coulomb Summation kernel. The input of the kernel consists of \texttt{atomInfo}, containing atom coordinates and charges in a vector (\texttt{x}, \texttt{y}, \texttt{z} represent coordinates of the atom, \texttt{w} represents charge divided by $4 \pi \epsilon_0$), \texttt{numberOfAtoms} represents the number of atoms in \texttt{atomInfo}, \texttt{gridSpacing} is the size of a grid cell, \texttt{gridSize} is the number of grid cells in each dimension and \texttt{energyGrid} contains output potential energy grid. In our implementation, one GPU thread computes one or more grid points, determined by the value of \texttt{Z\_ITE\-RA\-TI\-ONS}, which is the only tuning parameter in this example. For each grid point, Equation~\ref{eq:coulomb} is computed. The code is expected to be compute-bound for two reasons: (i) for each atom's data loaded into the registers, we can compute values of multiple grid points, and (ii) all the threads within a warp load the same atom at the same time, so the code can benefit from good cache locality. \begin{scriptsize} \begin{lstlisting}[caption={Direct Coulomb Summation kernel},mathescape,escapeinside={(*}{*)}, label=lst:coulomb] __global__ void directCoulombSum( const float4* atomInfo, int numberOfAtoms, float gridSpacing, int gridSize, float* energyGrid) { // integer coordinates within grid int x = blockIdx.x*blockDim.x + threadIdx.x; int y = blockIdx.y*blockDim.y + threadIdx.y; int z = (blockIdx.z*blockDim.z + threadIdx.z) * Z_ITERATIONS; int slice = gridSize * gridSize; int out = slice*z + gridSize*y + x; // real coordinate within molecule space float fX = gridSpacing * xIndex; float fY = gridSpacing * yIndex; float fZ = gridSpacing * zIndex; // return value zeroizing float energyValue[Z_ITERATIONS]; for (int i = 0; i < Z_ITERATIONS; i++) energyValue[i] = 0.0f; // loop over all atoms for (int i = 0; i < numberOfAtoms; i++) { float dX = fX - atomInfo[i].x; float dY = fY - atomInfo[i].y; float dZ = fZ - atomInfo[i].z; float w = atomInfo[i].w; // loop over multiple grid points for (int j = 0; j < Z_ITERATIONS; j++) { float rd = rsqrt(dX * dX + dY * dY + dZ*dZ); energyValue[j] += w * rd; dZ += gridSpacing; } } // store result in global memory for (int i = 0; i < Z_ITERATIONS; i++) if (z + i < gridSize) energyGrid[out + slice*i] += energyValue[i]; } \end{lstlisting} \end{scriptsize} The code is autotuned by the KTT framework~\cite{petrovic2020benchmark}. KTT passes the tuning parameter via preprocessor macro \texttt{Z\_ITERATIONS}. For the sake of simplicity, we do not optimize thread block size in this example. When tuning the code, we will assign values from the set $\{1, 2, 4, 8, 16, 32\}$ to the tuning parameter. \subsection{Understanding the effect of the tuning parameter} Higher values of \texttt{Z\_ITERATIONS} improve data locality in registers: once atom coordinates and charge are read (lines 27-30), they are used multiple times in the loop beginning at line 32. Moreover, this parameter reduces invariant computation of $dX * dX + dY * dY$. However, a value of \texttt{Z\_ITERATIONS} that is too high reduces strong scaling (the kernel is executed by a lower amount of threads) and increases register consumption, which can lead to lower GPU occupancy or usage of slow local memory for register spilling. Knowing and understanding how tuning parameters relate to performance counters is part of a developer's expertise. When profiling the code, the developer can set the value of the tuning parameter by observing hardware performance counters. In this example, several counters are highly relevant (some of them shown in Figure~\ref{fig:dependence-ilustration}): \begin{itemize} \item utilization of floating point (FP) units: if high, \texttt{Z\_ITER\-ATIONS} should be set to a higher value (to reduce the number of FP operations by computing \texttt{dX * dX + dY * dY} fewer times); \item utilization of texture or L2 cache: if high (and not caused by register spilling), \texttt{Z\_ITERATIONS} should be set to a higher value (to improve cache locality); \item GPU occupancy: if low, \texttt{Z\_ITERATIONS} should be set to a lower value (to improve strong scaling); \item the amount of local memory: if high, \texttt{Z\_ITERATIONS} should be set to a lower value in case utilization of any part of the memory subsystem is also high (to decrease bandwidth introduced by register spills). \end{itemize} Knowing and understanding how performance counters relate to bottlenecks is also part of a developer's expertise. In this simple example, we only search a one-di\-men\-sion\-al tuning space. However, the rules mentioned here also apply with multiple tuning parameters: in such a case, the resulting kernel runtime and performance counter values are determined by a mixed effect of all tuning parameters, but \texttt{Z\_ITERATIONS} still affects performance counters in the same way. \subsection{Tuning space search} \label{sect:example_search} Let us test our kernel using GeForce GTX 1070 with a grid of $256 \times 256 \times 256$ points and 64 atoms. The kernel should be compute-bound; therefore, we expect to have high utilization of FP units when tuned. Lets' set \texttt{Z\_ITERATIONS} to 1. When profiled, the kernel runtime is 10,475\,\textmu s. Performance counters point to a clear bottleneck in the texture cache (utilization level 9 out of 10), whereas FP instruction units are not highly loaded (utilization level 3 out of 10). Therefore, we raise the value of \texttt{Z\_ITERATIONS} to 32 to improve register locality. Now, the performance improves significantly: the kernel is executed in 1,531\,\textmu s. The performance counters show the following: texture cache utilization dropped from 9 to 3, FP utilization is 8, reported GPU occupancy is 0.6 (out of 1.0). We can try to increase occupancy to reduce pipeline and memory latencies. We set \texttt{Z\_ITERATIONS} to 8 and get a slightly better runtime of 1,497\,\textmu s. The GPU occupancy is now 0.98, FP utilization is 0.9 and texture cache utilization is 9. The texture cache utilization can be lowered by setting \texttt{Z\_ITERATIONS} to 16; however, this change does not lead to performance improvement; therefore, we can consider the kernel to be tuned. Now, consider a change of the input data: using the same GPU, we will compute a grid of $25 \times 25 \times 25$ points and 4096 atoms. The previously tuned implementation, setting \texttt{Z\_ITERATIONS} to 8, yields a runtime of 394\,\textmu s. Occupancy of this implementation is 0.11. Some speedup can be reached by increasing occupancy, so we need to explore values lower than 8 for \texttt{Z\_ITERATIONS}. When set to 4, the runtime is improved to 260\,\textmu s. Occupancy is improved to 0.17, and we can already see the bottleneck on texture cache (utilization level 8), which suggests we should not decrease \texttt{Z\_ITERATIONS} further. When we try to set \texttt{Z\_ITERATIONS} to 2, the runtime increases to 428\,\textmu s. Although occupancy is improved to 0.32, the implementation is limited by the texture cache, which now reports utilization level 9. Therefore, we consider tuning to be finished, considering 4 to be the best value for \texttt{Z\_ITERATIONS}. \subsection{Take-away from the example} In this section, we showed how tuning is performed rationally by an expert programmer, who understands the relation between tuning parameters and performance counters, as well as the relation between performance counters and bottlenecks. The programmer profiles the tuned code and analyzes the observed bottlenecks. Then, they determine the direction of change of the tuning parameter based on an expected effect on performance counters. In the next section, we describe how to automatize the entire process. \section{Proposed search method} \label{sect:method} In this section, we describe the basic idea and assumptions of the proposed profile-based search method, and then we focus on the details of our current implementation. \subsection{On profiling counters} \label{sect:pcs} The tuning parameters (TPs) are tuned in order to optimize the code by balancing the usage of different processor subsystems. They change the properties of the code, thus lowering the stress on one processor subsystem and increasing the stress on another one\footnote{If any code transformation releases the stress on some processor subsystem and does not increase the stress on another one, it does not need to be autotuned because it never degrades the performance.}. For example, thread coarsening tuning mentioned in the previous section decreases the number of arithmetic operations and memory footprint (decreases the stress on floating-point units and memory subsystem), whereas it increases register consumption and decreases parallelism (increases stress on the latency-hiding mechanism and strong scaling). Another example would be employing the shared memory for a variable, which decreases the amount of global memory accesses but increases shared memory accesses (decreasing stress on L2 cache and global memory while increasing stress on shared memory). The profiling counters (PCs) capture the workload of different hardware subsystems. Although each vendor implements their own PCs, we can distinguish two fundamentally different categories of PCs: (i) the counters measuring the stress on a processor subsystem, called $\mli{PC_{stress}}$, and (ii) the counters measuring the number of operations performed, or the amount of resources used on the subsystem, called $\mli{PC_{ops}}$. For example, $\mli{PC_{stress}}$ can contain PCs measuring the relative utilization of floating-point units or global memory bandwidth, whereas $\mli{PC_{ops}}$ can contain the number of floating-point instructions or memory instructions. The value of a profiling counter $\mli{pc} \in \mli{PC}$ depends, in general, on all values of tuning parameters in $\mli{TP}$, the input $i \in I$ and the GPU hardware $\mli{gpu} \in \mli{GPU}$. We can formalize this relation by defining the function $f$: \begin{equation} f: \mli{TP} \times I \times {GPU} \rightarrow \mli{PC} \end{equation} For simplicity, we assume that the compiler version or switches stay the same. The dependence of the function $f$ on $I$ and $\mli{GPU}$ differs when we distinguish between $\mli{PC_{ops}}$ and $\mli{PC_{stress}}$. The value of $\mli{PC_{stress}}$ is strongly dependent on the GPU model and input: for example, when a GPU with a higher flop-to-word ratio is used, the utilization of floating-point units can be lower as the profiled kernel becomes memory-bound. On the other hand, the amount of floating-point instructions, measured by a profiling counter of type $\mli{PC_{ops}}$, depends on the GPU model weakly (it can be affected by the GPU instruction set, but not greatly). Therefore, we can define function $g$: \begin{equation} g: \mli{TP} \times I \rightarrow \mli{PC} \end{equation} as an approximation of $f$ independent on GPU hardware: \begin{equation} \forall \mli{tp} \in \mli{TP} \ \forall i \in I \ \forall \mli{gpu} \in \mli{GPU}: g(\mli{tp}, i) \approx f(\mli{tp}, i, \mli{gpu}). \end{equation} Moreover, the partial derivative of the function $g$ w.r.t. input is not changed significantly: \begin{equation} \forall \mli{tp} \in \mli{TP}: \frac{\partial g}{\partial i}(\mli{tp}, i_1) \approx \frac{\partial g}{\partial i}(\mli{tp}, i_2) \end{equation} considering inputs $i_1$ and $i_2$ of different sizes. In other words, when some tuning parameter changes the number of operations performed on a particular processor subsystem, it does it independently on the input size. For example, thread coarsening decreases the number of floating-point operations in some ratio, although the actual amount of floating-point operations is determined by the input size. Approximating $f$ by $g$ suffers some imprecision in $\mli{PC_{ops}}$ related to cache and memory subsystem. Since different GPU architectures have different cache sizes, the threshold of cache capacity-misses differs across GPU architectures. Therefore, TP controlling cache blocking will start to increase the amount of operations on different cache levels at a different value of TP. However, this imprecision should only be observed within a small range of TP values, which causes the cache footprint to be close to the GPU cache capacity. This effect can be seen in our example shown in Figure~\ref{fig:dependence-ilustration}, where the amount of floating-point instructions and texture cache transactions is similar on both experiments shown in the Figure~\ref{fig:dependence-ilustration}, whereas the L2 cache workload is changed by the tuning parameter more significantly when solving a larger gridbox on GTX 1070. This observation on the relationship between TPs, input size, hardware model, and PCs is essential for the proposed searcher. The searcher can use a model of the stable relationship between TPs and $\mli{PC_{ops}}$ created on any GPU and input, and navigate tuning space searching according to the actually measured $\mli{PC_{stress}}$ and $\mli{PC_{ops}}$. \subsection{Basic idea} \label{sect:basic_idea} Our search method aims to mimic the process of the developer when optimizing performance. Similarly to the developer, the method profiles the tuned code, analyzes observed bottlenecks and decides how to change the tuning parameters to suppress them. We capture the developer's expertise regarding how TPs relate to PCs in a \textit{model}, and we capture how performance counters relate to bottlenecks in an \textit{expert system}. The model describes the relation between TPs and $\mli{PC_{ops}}$, which remains stable with respect to GPU hardware and input changes, so the model does not need to be re-trained. We can view the model as a component that allows the searcher to understand how changing the tuning parameters decreases or increases the stress on a processor subsystem (but cannot predict how stressed the subsystem would be: this is measured by $\mli{PC_{stress}}$ during tuning). When any tuning configuration is executed, performance counters from both $\mli{PC_{ops}}$ and $\mli{PC_{stress}}$ are measured. The expert system then identifies bottlenecks: it deduces which subsystems are overloaded with the current combination of tuning configuration, input and GPU. As the model knows the relation between TPs and $\mli{PC_{ops}}$, the searcher can select a tuning configuration which decreases the stress on the overloaded subsystems (by decreasing the number of operations on those subsystems measured by $\mli{PC_{ops}}$). This workflow can be seen in our example manual search, described in Section~\ref{sect:example_search} -- the developer measured the actual utilization of texture cache, floating-point units, and GPU occupancy (measured by counters from $\mli{PC_{stress}}$). Then, they changed thread coarsening in order to decrease the amount of texture memory operations, floating-point operations, or to increase parallelism (measured by counters from $\mli{PC_{ops}}$). Summarizing, we formulate three assumptions, which can be empirically tested: \begin{enumerate} \item it is possible to determine the computational bottlenecks from the values of performance counters (both $\mli{PC_{stress}}$ and $\mli{PC_{ops}}$); \item it is possible to determine which $\mli{PC_{ops}}$ need to be changed to suppress the bottlenecks; \item the relation between TP and $\mli{PC_{ops}}$ is sufficiently portable across different GPUs and problem inputs. \end{enumerate} The first and second assumptions are based on knowledge of how performance counters work. If something seriously hinders the performance, performance counters should be able to reflect that in some manner (the first assumption). When the bottleneck is known, it is possible to determine which $\mli{PC_{ops}}$ reflects it and therefore, which type of operations should be reduced to improve the performance. We aim to mirror this process by creating an expert system for bottleneck analysis using available documentation and our expertise -- details are in Section~\ref{sect:bottlenecks}. We evaluate these two assumptions experimentally in Section~\ref{eval:pc_biasing}. The third assumption has been discussed in Section~\ref{sect:pcs}. We further evaluate the third assumption experimentally in Section~\ref{eval:hw_portability} and Section~\ref{eval:input_portability}. Overall, if all of our assumptions are true, it is possible to mimic the process of a developer's performance optimization during autotuning using the following steps: \begin{itemize} \item start with a certain tuning configuration; \item measure PCs of the tuned kernel, e.\,g.{}, the amount of local memory used; \item determine the bottlenecks using the expert system, e.\,g.{}, the bandwidth on multiple levels of the memory hierarchy is high; \item determine the desired change in PCs (denoted as $\Delta \mli{PC}$ from now on), with the expert system, e.\,g.{}, lower the amount of local memory used; \item evaluate which tuning configurations change PCs in the desired way using the model, e.\,g.{}, those which have lower \texttt{Z\_ITERATIONS} than the profiled configuration \item select the next tuning configuration. \end{itemize} We replace the selection of the next tuning configuration, usually done by the developer, with a step of random search biased by a score determining the likelihood of changing PCs in the required direction To sum up, we move from given values of TPs (defining a tuning configuration) through PCs (performance counters) to bottlenecks, and then from bottlenecks through $\Delta \mli{PC}$ (changes to performance counters) back to the new set of TP (new tuning configuration). \subsection{The architecture} \begin{figure}[t] \centering \includegraphics[width=.99\hsize]{system-arch.png} \caption{Schematic view of the searcher workflow. The boxes show program components, cylinders show data objects.} \label{fig:searcher} \end{figure} The architecture of the whole tuning workflow is depicted in Figure~\ref{fig:searcher}. It consists of two phases: one for training beforehand and one for the actual search during autotuning. During the training phase, two components are used. KTT is responsible for executing tuning and gathering PCs on a sample or a complete tuning space. Then, a model is built from the tuning data using any of the methods described in Section~\ref{sect:models}. Both components are problem- and GPU-independent. The raw tuning data are problem-, GPU- and input-dependent. The model is still problem-dependent (different problems can have completely different TP), but, according to the third hypothesis, it is independent on GPU model and input. During the autotuning for GPU and input of our interest, KTT is used to collect $\mli{PC_{stress}}$ and $\mli{PC_{ops}}$. Then, the component called \textit{bottleneck analysis} analyzes $\mli{PC_{stress}}$ to determine bottlenecks. It also uses $\mli{PC_{ops}}$ to distinguish the source of the bottleneck more precisely (e.\,g.{}, if global memory bandwidth is the bottleneck, it uses the number of memory transactions to recognize how much the bottleneck is caused by memory reads or stores). The \textit{$\Delta \mli{PC}$ computation} component determines the required change of $\mli{PC_{ops}}$. The bottleneck analysis and $\Delta \mli{PC}$ computation components are GPU-dependent, because performance counters have been changed or extended several times as GPUs have evolved. Therefore, those components contain explicit support for different sets of performance counters. It is important to note that the bottleneck component analyzes the bottlenecks of the GPU architecture which is used for autotuning, whereas changes of $\mli{PC_{ops}}$ are computed for the GPU architecture the model was built on during the training phase. Therefore, we can use one model to steer autotuning on multiple architectures\footnote{An alternative implementation would be to translate $\mli{PC_{ops}}$ used in the model for the GPU architecture used with autotuning.}. When the required changes of $\mli{PC_{ops}}$ are determined, the component called \textit{configurations scoring} computes the scores of the tuning configurations. It uses the model to predict $\mli{PC_{ops}}$ according to TP and set higher scores to configurations which are predicted to change $\mli{PC_{ops}}$ in the required way. With the scores set, the \textit{searching step} component performs a step by selecting the next configuration for KTT to benchmark and profile. \subsection{Modelling relation between tuning parameters and performance counters} \label{sect:models} In this section, we describe the models for how TPs relate to PCs. These models are created during the training phase (see the left part of Figure~\ref{fig:searcher}), i.\,e.{}, before autotuning. The training phase is broken into two components. \textit{KTT autotuning} samples the entire or partial tuning space, and it stores the resulting TPs, PCs, and runtimes. Those data are then processed by the \textit{model creation} component, which uses a ML method to create a model of relations between TPs and $\mli{PC_{ops}}$. During autotuning, we use the model to evaluate which tuning configurations change PCs in the desired way (i.\,e.{}, from $\Delta \mli{PC}$ to TPs), as described in detail in section~\ref{sect:scoring}. \subsubsection{Least-square regression non-linear models} We model the relation between TPs and PCs through non-linear regression models. As an input, we take the whole or a part of the tuning space that has been evaluated and profiled -- for each tuning configuration, performance counters are measured. We split the tuning space into subspaces determined by the values of binary tuning parameters (e.\,g.{}, in a tuning space with three binary parameters, we split into $2^3 = 8$ subspaces). For each subspace, we select datapoints for training in a deliberate way -- for each non-binary parameter, we choose two or three values to keep the total number of value combinations relatively low, but to make the sampling of the subspace rather even despite constraints. The model for each profiling counter includes the main effects of each non-binary tuning parameter, their interactions (even those of a high order) and their influences of quadratic nature. We applied the least-square regression method to compute the coefficients. Therefore, as an output, we end up with several models for each profiling counter, where the values of binary tuning parameters determine the applicability of the model. The predictions themselves can be computed using the values of non-binary tuning parameters. For example, consider adding a parameter controlling the use of constant memory for atoms in the example described in Section~\ref{sect:example}. Such a parameter is binary (one if constant memory is used and zero if it is not). Therefore, two models are created to capture relations between PCs and \texttt{Z\_ITERATIONS} for using and not using constant memory. \subsubsection{Decision tree} Decision tree builds regression or classification models in the form of a tree structure. It breaks down a dataset into smaller and smaller subsets while at the same time an associated decision tree is incrementally developed. The final result is a tree with decision nodes and leaf nodes. A decision node has two or more branches, each representing values for the attribute tested (TPs in our case). Leaf node represents a decision on the numerical target (values of PCs). The topmost decision node in a tree corresponds to the best predictor called the root node. Decision trees can handle both categorical and numerical data. The core algorithm for building decision trees called ID3~\cite{quinlan1986induction} employs a top-down, greedy search through the space of possible branches with no backtracking. The ID3 algorithm can be used to construct a decision tree for regression by replacing Information Gain with Standard Deviation Reduction. The decision of making strategic splits affects a tree’s accuracy heavily. The decision criteria are different for classification and regression trees. Regression trees usually use mean squared error (MSE) to decide to split a node into two or more sub-nodes. We generate a set of candidate trees. The randomly selected 50\% of the explored tuning space is used for training, and the rest is used for testing. We also alter parent nodes of the trees. We compute MAE (Mean Absolute Error) and RMSE (Root Mean Square Error) for those trees, and select the one with the lowest MAE -- in case of a tie, we select the one with lower RMSE). The selected tree is then used to predict PCs for unknown configurations. \begin{table*} \centering \tiny \begin{tabular}{|l|l|l|l|} \hline Counter (prior Volta) & Counter (Volta and newer) & Abbr. & Type \\ \hline dram\_read\_transactions & dram\_\_sectors\_read.sum & DRAM\_RT & Ops.\\ dram\_write\_transactions & dram\_\_sectors\_write.sum & DRAM\_WT & Ops.\\ l2\_read\_transactions & lts\_\_t\_sectors\_op\_read.sum & L2\_RT & Ops.\\ l2\_write\_transactions & lts\_\_t\_sectors\_op\_write.sum & L2\_WT & Ops.\\ tex\_cache\_transactions & l1tex\_\_t\_requests\_pipe\_lsu\_mem\_global\_op\_ld.sum & TEX\_RWT & Ops.\\ local\_memory\_overhead & l1tex\_\_t\_sectors\_pipe\_lsu\_mem\_local\_op\_st.sum & LOC\_O & Ops.\\ shared\_load\_transactions & l1tex\_\_data\_pipe\_lsu\_wavefronts\_mem\_shared\_op\_ld.sum & SHR\_LT & Ops.\\ shared\_store\_transactions & l1tex\_\_data\_pipe\_lsu\_wavefronts\_mem\_shared\_op\_st.sum & SHR\_WT & Ops.\\ inst\_fp\_32 & smsp\_\_sass\_thread\_inst\_executed\_op\_fp32\_pred\_on.sum & INST\_F32 & Ops.\\ inst\_fp\_64 & smsp\_\_sass\_thread\_inst\_executed\_op\_fp64\_pred\_on.sum & INST\_F64 & Ops.\\ inst\_integer & smsp\_\_sass\_thread\_inst\_executed\_op\_integer\_pred\_on.sum & INST\_INT & Ops.\\ inst\_misc & smsp\_\_sass\_thread\_inst\_executed\_op\_misc\_pred\_on.sum & INST\_MISC & Ops.\\ inst\_compute\_ld\_st & smsp\_\_sass\_thread\_inst\_executed\_op\_memory\_pred\_on.sum & INST\_LDST & Ops.\\ inst\_control & smsp\_\_sass\_thread\_inst\_executed\_op\_control\_pred\_on.sum & INST\_CONT & Ops.\\ inst\_bit\_convert & smsp\_\_sass\_thread\_inst\_executed\_op\_conversion\_pred\_on.sum & INST\_BCONV & Ops.\\ inst\_executed & smsp\_\_inst\_executed.sum & INST\_EXE & Ops.\\ issue\_slot\_utilization & smsp\_\_issue\_active.avg.pct\_of\_peak\_sustained\_active & INST\_ISSUE\_U & Ops.\\ dram\_utilization & dram\_\_throughput.avg.pct\_of\_peak\_sustained\_elapsed $: 10$ & DRAM\_U & Stress\\ l2\_utilization & lts\_\_t\_sectors.avg.pct\_of\_peak\_sustained\_elapsed & L2\_U & Stress \\ tex\_utilization & l1tex\_\_t\_requests\_pipe\_lsu\_mem\_global\_op\_ld.avg.pct\_of\_peak\_sustained\_active $:10$ & TEX\_U & Stress \\ shared\_utilization & l1tex\_\_data\_pipe\_lsu\_wavefronts\_mem\_shared.avg.pct\_of\_peak\_sustained\_elapsed $:10$ & SHR\_U & Stress\\ sm\_efficiency & smsp\_\_cycles\_active.avg.pct\_of\_peak\_sustained\_elapsed & SM\_E & Stress\\ warp\_execution\_efficiency & smsp\_\_thread\_inst\_executed\_per\_inst\_executed.ratio $\cdot 100 : 32$ & WARP\_E & Stress\\ warp\_nonpred\_execution\_efficiency & smsp\_\_thread\_inst\_executed\_per\_inst\_executed.pct & WARP\_NP\_E & Stress\\ \hline \end{tabular} \caption{List of performance couters and their abbreviations for GPUs. For counters implemented for Volta generation and newer, the conversion ratio (if any) is written next to the counter.} \label{tab:pcs} \end{table*} \subsection{Bottleneck detection and reaction} \label{sect:bottlenecks} In this section, we describe how we get from PCs to bottlenecks and from bottlenecks to $\Delta \mli{PC}$. This part is performed by expert systems which read performance counters, analytically determine bottlenecks, and create a vector of required changes of $\mli{PC_{ops}}$. The components described in this section do two steps -- the first component takes performance counters measured on an actually executed kernel and computes bottlenecks. The second component takes bottlenecks and computes changes in performance counters for the architecture of the model. Therefore, the components have to know the PCs of the currently executed kernel, the architecture of the GPU where the kernel was executed, and the architecture of the GPU the model was created for. Since the performance counters changed completely for Volta generation and newer, the components are implemented for multiple sets of counters. The implementation is limited by our understanding of NVIDIA GPU's performance counters, and we believe there is still room for improvement if the counters were documented in greater detail, or if the entire expert system was replaced by a machine learning model. We have developed the expert system using NVIDIA CUPTI documentation for CUDA 10.0. To improve our understanding of the counters' values, we have also used some benchmarks available in KTT. However, to avoid overfitting the expert system to our benchmarks, we have only used three benchmarks for its development (Coulomb sum, n-body and Matrix transposition), while the rest of the benchmarks have been used for evaluation of our searcher after it was developed. \subsubsection{Bottleneck analysis} The bottleneck analysis uses a set of performance counters described in Table~\ref{tab:pcs}. We use abbreviations of those counters in the following text and formulas. The table also shows the equivalency of old (i.\,e.{}, on GPUs prior to Volta) and new (i.\,e.{}, on Volta and newer) counters; applied adjustments or rescalings (e.\,g.{}, the old version of counters measures rank in $<0,10>$, whereas the new version measures percentage in $<0, 100>$); and classification of counters into $\mli{PC_{stress}}$ or $\mli{PC_{ops}}$. Note that the equivalence of new and old performance counters is not completely documented, so we compute it according to our understanding of what counters measure. Also note that we have assigned INST\_ISSUE\_U into $\mli{PC_{ops}}$, because it quantifies the ratio of instruction cycles which cannot be used to issue instructions (for instance, due to synchronizations). Bottlenecks are represented by a vector $B = [\mli{b_{DRAM\_read}},\\ \mli{b_{DRAM\_write}}, \cdots ]$, where $\forall b_x \in B, b_x \in <0, 1>$. A zero value of the bottleneck means that the component is not stressed, while the value 1 represents the component being on the theoretical peak of its performance. Bottlenecks are divided into several categories, representing stress on various memory types, instructions and utilization of GPU parallelism. The memory subsystems bottleneck analysis is computed in the same way for global memory, shared memory and L2 cache. The utilization of the memory, reported by performance counter DRAM\_U, is scaled into $<0, 1>$ and weighted by the ratio of read and write transactions. Equation~\ref{eq:global-read} shows the computation of the bottleneck for global memory read, Equation~\ref{eq:global-write} shows the computation of the bottleneck for global memory write. For shared memory and L2 cache, the computation is analogous, using SHR\_LT, SHR\_WT, SHR\_U and L2\_RT, L2\_WT, L2\_U, respectively. \begin{equation} \footnotesize \mli{b_{DRAM\_read}} = \frac{\mli{DRAM\_RT}}{\mli{DRAM\_RT} + \mli{DRAM\_WT}} \cdot \frac{\mli{DRAM\_U}}{10} \label{eq:global-read} \end{equation} \begin{equation} \footnotesize \mli{b_{DRAM\_write}} = \frac{\mli{DRAM\_WT}}{\mli{DRAM\_RT} + \mli{DRAM\_WT}} \cdot \frac{\mli{DRAM\_U}}{10} \label{eq:global-write} \end{equation} To compute the utilization of texture (data) cache, we only scale the counter TEX\_U to interval $<0, 1>$, as the cache is read-only and therefore there are no write transactions. The situation is more complicated with local memory. To the best of our knowledge, the LOC\_O performance counter gives us a relative number of local memory data transfers. Therefore, even high local memory overhead does not imply the local memory is a real bottleneck if no memory subsystem is overloaded. Consequently, we weight local memory overhead by the maximal utilization of memories in the way: global, L2 and texture, see Equation~\ref{eq:local}. \begin{equation} \footnotesize \mli{b_{local}} = \frac{\mli{LOC\_O}}{100} \cdot \max(\frac{\mli{DRAM\_U}}{10}, \frac{\mli{L2\_U}}{10}, \frac{\mli{TEX\_U}}{10}) \label{eq:local} \end{equation} Special performance counters measure the utilization of instructions. However, we found those counters not to be very reliable, or we do not fully understand what they measure (for example, the matrix transposition example, which uses no floating point computations, reports high utilization of FP32 units in some configurations). Therefore, we derive the utilization from the overall amount of instructions. First, we compute the $\mli{ins_{fitted}}$ value using Equation~\ref{eq:inst_fitted}, which computes the number of instructions (INST\_EXE computes at the warp level; therefore, it has to be multiplied by 32), corrected by the efficiency of instruction execution (i.\,e.{}, how many threads in the warp perform useful work). \begin{equation} \footnotesize \mli{ins_{fitted}} = 32 \cdot \mli{INST\_EXE} \cdot \frac{100}{\mli{WARP\_E}} \cdot \frac{100}{\mli{WARP\_NP\_E}} \label{eq:inst_fitted} \end{equation} Then, we compute the utilization of the issue slot. For GPUs prior to Volta, we use $\mli{ins_{util}} = \frac{\mli{INST\_ISSUE\_U}}{100}$. For Volta and newer, as those GPUs allow us to issue integer and floating-point instructions separately, we compute $\mli{ins_{util}} = \min(1, \frac{\mli{INST\_ISSUE\_U}}{50})$. Therefore, the component considers full utilization of one instruction path as perfect utilization and cannot optimize toward better utilization of dual-issue in the current implementation. The utilization of FP32 units is computed using Equation~\ref{eq:fp32}. An analogous computation is performed for INST\_F64, INST\_INT, INST\_MISC, INST\_LDST, INST\_CONT and INST\_BCONV. \begin{equation} \footnotesize \mli{b_{fp32}} = \frac{\mli{INST\_F32}}{\mli{ins_{fitted}}} \cdot \mli{ins_{util}} \label{eq:fp32} \end{equation} Finally, the bottleneck formed by the insufficient instruction issue utilization is computed. First, we compute maximal utilization across all types of instructions: \begin{equation} \footnotesize \mli{util_{max}} = \max(\frac{\mli{INST\_F32}}{\mli{ins_{fitted}}}, \frac{\mli{INST\_F64}}{\mli{ins_{fitted}}}, \dots) \label{eq:maxutil} \end{equation} Then, the bottleneck of instruction issue is computed using Equation~\ref{eq:issue}. \begin{equation} \footnotesize \mli{b_{issue}} = \mli{util_{max}} \cdot \frac{100 - \mli{INST\_ISSUE\_U}}{100} \label{eq:issue} \end{equation} Insufficient parallelism is computed as \begin{equation} \footnotesize \mli{b_{sm}} = \frac{100 - \mli{SM\_E}}{100}. \end{equation} An additional bottleneck of insufficient parallelism is computed from the number of CUDA threads and the number of CUDA cores, as shown in Equation~\ref{eq:paral}. It is an empirical computation, requiring five threads per CUDA core to set the parallelism bottleneck to zero. However, we have found it useful to add this bottleneck alongside $\mli{b_{sm}}$, as it captures the cases where all SMs are occupied, but the actual occupancy is low due to small number of threads running per SM. \begin{equation} \footnotesize \mli{b_{paral}} = max(0, (\mli{cores} \cdot 5 - \mli{threads}) / (\mli{cores} \cdot 5)) \label{eq:paral} \end{equation} \subsubsection{$\Delta \mli{PC}$ computation} \label{sect:reaction} When the bottleneck vector is computed, it is passed to the component responsible for computing required changes to PCs. The required changes are represented as the vector $\mli{\Delta PC_{ops}} = [\mli{\Delta pc_{DRAM\_RT}},\- \mli{\Delta pc_{DRAM\_WT}},\- \dots]$, where $\forall \mli{\Delta pc_x} \in \mli{\Delta PC_{ops}}, \mli{\Delta pc_x} \in <-1, 1>$. The $\mli{\Delta PC_{ops}}$ vector contains the required changes to the performance counters $\mli{PC_{ops}}$. A negative value means that the counter value should be decreased, while a positive value means that the counter should be increased -- zero means no change is required. There is one additional parameter for $\mli{\Delta PC_{ops}}$ computation: $\mli{inst\_reaction}$. It determines the threshold of in\-struc\-tion-re\-lat\-ed bottleneck values, which triggers the changes of $\mli{PC_{ops}}$. The motivation behind the introduction of $\mli{inst\_re}\-\mli{action}$ parameter is as follows. The instructions have very low latency (compared to the memory subsystem). Therefore, they do not form a serious bottleneck unless there is high stress on the component performing the instructions. In case of no significant bottleneck for the kernel, the low bottlenecks related to instructions are ignored, and the memory is optimized, which should decrease latency and introduce a new bottleneck, either instruction- or memory-related. In our implementation, the $\mli{inst\_reaction}$ is set to 0.7. If user sets that the instruction-bound problem is optimized, $\mli{inst\_reaction}$ is set to 0.5, which slightly improves results for compute-bound problems as the reaction on appearing instructions-related bottleneck is faster. The changes of PCs related to the memory subsystems are computed straightforwardly: their value is set as the inverse value of the corresponding bottleneck, for example, $\mli{\Delta pc_{DRAM\_RT}} = - \mli{b_{DRAM\_read}}$. The instruction-related PCs are set only if the corresponding bottleneck value exceeds $inst\_reaction$, as shown in Equation~\ref{eq:fp32_reaction}. An analogous computation is performed for all instruction-related bottlenecks including $\mli{b_{issue}}$. \begin{equation} \begin{split} \footnotesize \mli{b_{fp32}} \leq \mli{inst\_reaction} &: \scriptstyle \mli{\Delta pc_{INST\_F32}} = 0 \\ \footnotesize \mli{b_{fp32}} > \mli{inst\_reaction} &: \scriptstyle \mli{\Delta pc_{INST\_F32}} = - \frac{(\mli{b_{fp32}} - \mli{inst\_reaction})}{1 - \mli{inst\_reaction}} \label{eq:fp32_reaction} \end{split} \end{equation} The parallelism-related bottlenecks are applied straightforwardly, without inverting the bottleneck value: $\mli{\Delta pc_{SM\_E}} = \mli{b_{sm}}$ and $\mli{\Delta pc_{global}} = \mli{b_{paral}}$. Note that $\mli{\Delta pc_{global}}$ is not a true hardware performance counter, but represents the number of threads reported by KTT, which is added to the set of performance counters. \subsection{Configurations scoring} \label{sect:scoring} Let $\mli{c_{profile}}$ be the configuration which has been empirically profiled during autotuning. Let $\mli{\Delta PC}$ be the required changes of PCs to soften bottlenecks (see Section~\ref{sect:reaction}) of the configuration $\mli{c_{profile}}$. To score an unexplored tuning configuration $\mli{c_{candidate}}$, we need to estimate whether the configuration $\mli{c_{candidate}}$ changes PCs (compared to $\mli{c_{profile}}$) in a direction defined by $\mli{\Delta PC_{ops}}$. Since autotuning can be executed on a different GPU and different input, we cannot directly compare estimated PCs of $\mli{c_{candidate}}$ to measured PCs of $\mli{c_{profile}}$. Instead, we use a model described in Section~\ref{sect:models} to estimate PCs of both configurations: let $\mli{PC}(\mli{c_{profile}})$ be PCs of $\mli{c_{profile}}$ estimated by the model and $\mli{PC}(\mli{c_{candidate}})$ be PCs of $\mli{c_{candidate}}$ estimated by the model. The score $s$ of the configuration $\mli{c_{candidate}}$ is computed using Equation~\ref{eq:score}. \begin{equation} \footnotesize s = \sum_{p \in \mli{PC_{used}}} \mli{\Delta pc}_p \frac{\mli{pc}_p(\mli{c_{profile}}) - \mli{pc}_p(\mli{c_{candidate}})}{\mli{pc}_p(\mli{c_{profile}}) + \mli{pc}_p(\mli{c_{candidate}})} \label{eq:score} \end{equation} where $\mli{PC_{used}}$ is the set of profiling counters with non-zero predictions for profiled and candidate configurations: $\mli{PC_{used}} = \forall p \in \mli{\Delta PC} : \mli{pc}_p(\mli{c_{profile}}) \neq 0 \wedge \mli{pc}_p(\mli{c_{candidate}}) \neq 0$ and where $\mli{pc_p}$ means performance counter $p$. We compute all scores $s_0 \dots s_n$ for configurations of our interest. Then, the score values are further processed. The lowest and highest score are stored in $s_{min}$ and $s_{max}$, respectively. The score for each configuration is normalized into interval $<0.0001, 256>$ as follows: \begin{equation} \begin{split} \footnotesize s > 0 &: \scriptstyle \mli{s_{norm}} = (1 + \frac{s}{\mli{s_{max}}})^8 \\ \footnotesize s > \gamma \wedge s \leq 0 &: \scriptstyle \mli{s_{norm}} = \max(0.0001, (1 - \frac{s}{\mli{s_{min}}})^8) \\ \footnotesize s \leq \gamma &: \scriptstyle \mli{s_{norm}} = 0.0001 \\ \label{eq:score_normalization} \end{split} \end{equation} The normalized score is used to bias the probability of selecting that configuration. Equation~\ref{eq:score_normalization} ensures strong preference of high scores (positive scores are amplified into $<1, 256>$ by normalization). However, it also allows for the selection of negative scores, albeit with very low probability. If the score before normalization is below cutoff threshold $\gamma$ (defined as $-0.25$ in our implementation), the normalized score is set to 0.0001. Negative scores greater than $\gamma$ are scaled similarly to the positive scores. Setting non-zero probability for negative scores is important in situations where all unexplored configurations seem worse than $\mli{c_{profile}}$, which either indicates that the tuning has reached the optimum, or that it got stuck in a local optimum due to inaccuracy in the model or in the expert system decision. \subsection{Searching step} Our current implementation uses weighted random search, where the random selection is biased towards configurations which should soften bottlenecks found within the last profiled configuration. It is the most straightforward approach, which allows for direct comparison to (unweighted) random search. However, we believe that more sophisticated searching methods could be implemented in the future. The complete workflow of the search is described by Algorithm~\ref{alg:tuning}. The algorithm takes several variables as input: $\mli{TS}$ is a tuning space (i.\,e.{}, an array containing all tuning configurations), $M$ is a model of the relation between TPs and PCs, $n$ is the number of steps performed without collecting performance counters and $i$ is the number of iterations for collecting performance counters (i.\,e.{}, the number of empirical tests is $i(n + 1)$). Note that CUDA kernels are executed faster when no performance counters are collected. Therefore, executing runs without collecting performance counters helps to find a fast kernel more quickly, although with the cost of performing more empirical search steps. The default value of $n$ is set to 5 in our implementation. Algorithm~\ref{alg:tuning} uses the following components. In Line~\ref{ln:ktt}, the empirical evaluation of kernel $\mli{c_{profile}}$ is performed and its runtime and PCs are stored into $t$, $\mli{PC_{stress}}$ and $\mli{PC_{ops}}$. Then, bottlenecks are determined and stored in $b$ in line~\ref{ln:bottlenecks}. After bottleneck detection, the searcher computes a reaction to the bottlenecks in line~\ref{ln:changes}. The reaction is stored in the form of the required change of performance counters $\mli{\Delta PC_{ops}}$. In the current implementation, the algorithm scores all tuning configurations according to the required change of performance counters: it uses model $M$ to determine if a tuning configuration changes performance counters in a direction required by $\mli{\Delta PC_{ops}}$, see line~\ref{ln:model}~\footnote{In the case of huge tuning spaces, a restricted set of tuning configurations could be scored, e.\,g.{}, only the neighbourhood of the currently explored configuration $\mli{c_{profile}}$.}. With the scored tuning space, the algorithm selects $n$ kernels to benchmark without gathering performance counters. In the loop starting at line~\ref{ln:nonprofile}, the algorithm selects a configuration with a probability weighted by the score obtained in line~\ref{ln:model}. Then, the benchmarking of the selected configuration is performed. The fastest observed configuration is used for the next profiling run (performed in line~\ref{ln:ktt}). \begin{algorithm} \KwIn{$TS, M, n, i$} $\mli{c_{profile}} \leftarrow$ random $c \in \mli{TS}$ \\ \For{$j = 0; j \le i; j++$} { $t, \mli{PC_{stress}}, \mli{PC_{ops}} \leftarrow$ empiricaly measure runtime and PCs of $\mli{c_{profile}}$ \label{ln:ktt} \\ $b \leftarrow$ bottlenecks obtained from $\mli{PC_{stress}}$ and $\mli{PC_{ops}}$\label{ln:bottlenecks} \\ $\mli{\Delta PC_{ops}} \leftarrow $ changes in PCs required to weaken bottlenecks $b$ \label{ln:changes} \\ $S \leftarrow {0}^{\mli{size}(\mli{TS})}$ \\ \For{$k = 0; k < \mli{size}(\mli{TS}); k++$} { \If {$\mli{TS_k}$ was not evaluated} { $S_k \leftarrow$ compute score of $\mli{TS_k}$, using $M$ and $\mli{\Delta PC_{ops}}$ \label{ln:model} \\ } \Else { $S_k \leftarrow 0$ } } $t \leftarrow \infty$\\ \For{$k = 0; k \le n; k++$} { \label{ln:nonprofile} $r \leftarrow$ random number: $r \leq 0 \wedge r < \sum_{l=0}^{\mli{size}(\mli{TS})}S_l$ \\ select $l$ such that $\sum_{i=0}^{l-1}S_i \geq r \wedge \sum_{i=0}^{l}S_i < r)$ \\ $t' \leftarrow$ empirically measure runtime of $\mli{TS_l}$ \\ \If {$t' \leq t$} { $\mli{c_{profile}} \leftarrow \mli{TS_l}$ \\ $t \leftarrow t'$\\ } $S_l \leftarrow 0$ \\ } } \caption{Searching tuning space with performance counters.} \label{alg:tuning} \end{algorithm} \subsection{Implementation} The main part of the proposed profile-based searcher is implemented in Python in its current version. As KTT is implemented in C++, there is a simple stub searcher code in KTT, which communicates with the main part of the searcher via files and sockets. The reason for Python implementation is easier experimenting with the searcher code as well as a broad range of easy-to-use machine learning algorithms. Nevertheless, such implementation has also a disadvantage in code performance. It is possible to rewrite the searcher code into C++ in the future. The searcher consists of two parts: an application building the model and a plugin into KTT, which implements the proposed searcher method. The searcher is available in \texttt{profile-searcher} directory in KTT\footnote{GIT tag \texttt{v1.3-profile-searcher}}. \subsection{Limitations of the current implementation} \label{sect:limits} Although the proposed profile-based searcher is fully capable of searching the tuning space, biasing the search towards faster implementations, there are still many open research topics which can lead to the improvement of the searcher. \subsubsection{Using local search method} Currently, our implementation biases a simple random searcher. Although a random searcher is very robust, it is a global search method, which cannot speed up its convergence by following the gradient of the optimized function. Our searcher allows us to estimate which configurations should improve performance. This estimation could be used as an estimation of the gradient of the performance function, and thus a gradient-based searching method could be used. As shown in~\cite{vanwerkhoven2018kernel}, local searching methods can be successful, especially in combination with a global searching method, which allows them to overcome local optima. \subsubsection{Improving model of TPs-PCs relations} Currently, the relations of TPs to PCs are always modelled for the GPU where the model was constructed. Although it is sufficient to steer the tuning space search, it cannot precisely model the effect of cache capacity misses. We believe that it is possible to create a model which can correct cache-related PCs according to detected caching capabilities of the GPU used for autotuning. \subsubsection{Improving bottleneck analysis and reaction} Our current expert system for bottleneck analysis and computation of the required changes of PCs works with a subset of PCs which are available on GPUs. For example, PCs related to execution stall reasons are not used at all. Although it is not easy to construct an expert system which would interpret all PCs, it could be possible to replace the expert system with a machine learning model which could overcome our limited understanding of PCs interpretation. To construct the model, we can use multiple benchmarks and GPUs available. Moreover, each benchmark consists of a high number of tuning configurations; therefore, it is not too difficult to generate a high volume of training and testing data. The runtime of kernel profiling is determined by the type and amount of gathered hardware performance counters. Together with improving bottleneck analysis and reaction system, we could test if some counters are mostly redundant and reduce their amount, similarly to~\cite{alcaraz2019hardware}. \section{Evaluation} \label{sect:eval} In this section, we evaluate our proposed profile-based searcher. First, we describe the methodology of the benchmarks and the testbed setup. Then, we evaluate how random step biasing influences the searcher performance when using a model created for the same setup, for a different GPU or for a different input. We also evaluate the convergence time of the proposed method. Finally, we compare our method with model-based tuning using Starchart~\cite{jia2013starchart} and with optimization-based tuning using Kernel Tuner~\cite{vanwerkhoven2018kernel}. \subsection{Methodology} We have performed two types of evaluation: \begin{itemize} \item measuring the number of empirical tests of kernels (i.\,e.{}, searcher steps); \item measuring tuning convergence in time. \end{itemize} The empirical test means that the kernel is compiled and executed in the selected tuning configuration. The number of empirical tests allows us to directly compare the efficiency of the proposed profile-based search method: how many empirical tests it needs to perform in order to converge to a certain efficiency of the kernel. On the other hand, the GPU kernel runs slower when being profiled as it gathers PCs. Therefore, even reducing the number of empirical tests does not ensure faster tuning convergence of the proposed searcher. Therefore, we have also tested tuning convergence speed. In our evaluations, we often aim to find a well-performing configuration. We define a well-performing configuration as a configuration which creates a kernel with runtime within $1.1\times$ of the best kernel runtime (found by exhaustive search). Since the tuning space search is a stochastic process, it has to be repeated many times to get results which are free from random fluctuations. As it would be incredibly demanding to actually run and profile kernels during autotuning, we have created a program bypassing that -- instead of running kernels many times, it performs an exhaustive exploration of the entire tuning space and saves the tuning results (kernel runtimes and PCs). Then we can perform autotuning space search faster, i.\,e.{} simply load the kernel runtimes and PCs from files and provide them to the searcher instead of actually running the kernel and profiling it. This allows us to repeat tuning $1000\times$ for any combination of benchmark, hardware used to create the model, and hardware used for autotuning. We only used this simulated autotuning to evaluate the number of searcher steps. While we were evaluating tuning convergence time, we always performed empirical testing, i.\,e.{}, we actually ran and profiled the kernels and measured the time. Therefore, we executed those tests $100\times$ due to much higher time demands. \subsection{Testbed Setup} \begin{table} \centering \footnotesize \begin{tabular}{|l|r|r|} \hline Benchmark & dimensions & configurations \\ \hline Convolution & 10 & 3,928 \\ Coulomb 3D & 7 & 210 \\ GEMM & 10 & 5,788 \\ GEMM full & 14 & 205,216 \\ Transpose & 8 & 1,784 \\ N-body & 7 & 3,134 \\ \hline \end{tabular} \caption{A list of the benchmarks and the size and dimensionality (i.\,e.{}, the number of tuning parameters) of their tuning spaces.} \label{tab:benchmarks-spaces} \end{table} To test the searcher proposed in this paper, we used benchmarks listed in Table~\ref{tab:benchmarks-spaces}. Those benchmarks have been introduced in~\cite{petrovic2020benchmark}, where more details about their implementation and optimizations are discussed. We have rewritten these benchmarks into CUDA to allow their profiling on NVIDIA GPUs. We removed the values of some tuning parameters as they are not supported on CUDA (large built-in vector variables, explicit cache prefetching), or are not implemented in CUDA KTT backend (working with constant memory). However, our benchmarks are still able to reach near-peak performance on GPUs, similarly to~\cite{petrovic2020benchmark}\footnote{The highest performance degradation compared to the richer OpenCL tuning spaces was 5\% in Coulomb sum benchmark running on GeForce GTX 680. At most, 3\% performance degradation was observed in the remaining combinations of benchmarks and GPUs.}. Therefore, we consider their tuning spaces sufficient for evaluation of the tuning space searcher. We have also implemented two versions of tuning space for GEMM -- the reduced space is taken from CLBlast~\cite{nugteren2018clblast} (denoted as GEMM) and the full space is taken from CLTune~\cite{nugteren2015cltune} (denoted as GEMM full). This smaller size of GEMM space allows us to explore the entire tuning space in reasonable time, thus it is more practical for most of the experiments. Note that expert programmers have designed the tuning spaces to be reasonably small (without obviously slow configurations, e.\,g.{}, resulting in sub-warp block sizes)~\cite{petrovic2020benchmark}. Such search spaces should not include a vast amount of poorly-performing tuning configurations and therefore should not discriminate simple search methods, such as random search. \begin{table}[ht] \centering \footnotesize \begin{tabular}{|l|l|l|} \hline Device & Architecture & Released \\ \hline GeForce GTX 680 & Kepler & 2012 \\ GeForce GTX 750 & Maxwell & 2014 \\ GeForce GTX 1070 & Pascal & 2016 \\ GeForce RTX 2080 & Turing & 2018 \\ \hline \end{tabular} \caption{GPU devices used in our benchmarks.} \label{tab:hw} \end{table} The benchmarks have been executed using four GPUs of different architectures, listed in Table~\ref{tab:hw}. All benchmarks have been executed with Kernel Tuning Toolkit 1.3 equipped with the profile-based searcher\footnote{\url{https://github.com/HiPerCoRe/KTT/tree/v1.3-profile-searcher}}. \subsection{Speedup allowed by the performance counters biasing} \label{eval:pc_biasing} In the first experiment, we have measured the improvement given by biasing random search according to the required changes of PCs, computed by bottleneck analysis and reaction subsystems. In other words, we experimentally evaluated the first two assumptions mentioned in Section~\ref{sect:basic_idea}. To do so, we needed to eliminate any effect of the model imprecision. Therefore, we have performed exhaustive exploration of PCs of the benchmarks' complete tuning spaces and then, during autotuning, we read the previously measured PCs of tuning configurations instead of predicting them with the model. \begin{table}[ht] \centering \footnotesize \begin{tabular}{|l|l|l|l|l|} \hline & GTX 680 & GTX 750 & GTX 1070 & RTX 2080 \\ \hline Coulomb sum & $19$ & $21$ & $34$ & $16$ \\ Matrix trans. & $192$ & $24$ & $10$ & $47$ \\ GEMM & $146$ & $248$ & $450$ & $260$ \\ n-body & $27$ & $10$ & $37$ & $39$ \\ Convolution & $327$ & $702$ & $349$ & $568$ \\ \hline \end{tabular} \caption{Average number of empirical tests required for random search to find a well-performing configuration.} \label{tab:random_iters} \end{table} \begin{table}[ht] \centering \footnotesize \begin{tabular}{|l|l|l|l|l|} \hline & GTX 680 & GTX 750 & GTX 1070 & RTX 2080 \\ \hline Coulomb sum & $3.8\times$ & $5.25\times$ & $5.67\times$ & $3.2\times$ \\ Matrix trans. & $3.62\times$ & $2.0\times$ & $1.43\times$ & $1.12\times$ \\ GEMM & $5.41\times$ & $7.75\times$ & $8.88\times$ & $10.83\times$ \\ n-body & $1.93\times$ & $2.5\times$ & $2.85\times$ & $3.25\times$ \\ Convolution & $8.18\times$ & $10.32\times$ & $15.86\times$ & $14.56\times$ \\ \hline \end{tabular} \caption{Improvement (in terms of the number of empirical tests) of proposed searcher over random search. The PCs from the same architecture are used.} \label{tab:pc_bias} \end{table} The average number of empirical tests required by random search to find a well-performing configuration is shown in Table~\ref{tab:random_iters}. The resulting improvement of the proposed searcher over random search is shown in Table~\ref{tab:pc_bias}. The table shows improvement in terms of the average number of empirical search steps required to find a well-performing configuration. The average is obtained from 1,000 runs of the searcher. As we can see in Table~\ref{tab:pc_bias}, the proposed searcher improves the number of empirical tests in all cases. The most significant improvement can be seen with the GEMM and Convolution benchmarks. Their tuning spaces are more complicated to search (see Table~\ref{tab:random_iters}), so the improvement given by the biased random selection is more visible. \subsection{Portability across hardware} \label{eval:hw_portability} In this section, we have evaluated the portability of the model. We created the model on specific hardware and input and used it to bias tuning space search on different hardware\footnote{In this case, we could not read PCs from a different GPU or input directly, as the executable configurations generally differ for different GPUs or inputs. Therefore, we have also had to use the predictive model.}. Therefore, we have experimentally tested the third assumption given in Section~\ref{sect:basic_idea}. The model was created using decision trees described in Section~\ref{sect:models}. Similarly to the experiment above, we have measured the improvement over the random search in terms of the number of iterations (i.\,e.{}, empirical tests) required to reach a well-performing configuration. The results were averaged over 1,000 executions. \begin{table}[ht] \centering \footnotesize \caption{Improvement (in terms of the number of empirical tests) of proposed searcher over random search. Rows show GPUs used for benchmark execution, columns show GPUs used to create the model of TPs and PCs relations.} \subcaption*{Coulomb sum benchmark} \begin{tabular}{|l|l|l|l|l|} \hline & GTX 680 & GTX 750 & GTX 1070 & RTX 2080 \\ \hline GTX 680 & $3.8\times$ & $4.75\times$ & $3.8\times$ & $3.8\times$ \\ GTX 750 & $4.2\times$ & $5.25\times$ & $5.25\times$ & $4.2\times$ \\ GTX 1070 & $4.86\times$ & $5.67\times$ & $4.86\times$ & $4.86\times$ \\ RTX 2080 & $4.0\times$ & $4.0\times$ & $4.0\times$ & $3.2\times$ \\ \hline \end{tabular} \newline \subcaption*{Matrix transposition benchmark} \begin{tabular}{|l|l|l|l|l|} \hline & GTX 680 & GTX 750 & GTX 1070 & RTX 2080 \\ \hline GTX 680 & $3.76\times$ & $5.05\times$ & $4.36\times$ & $2.95\times$ \\ GTX 750 & $1.85\times$ & $2.0\times$ & $1.85\times$ & $0.86\times$ \\ GTX 1070 & $1.67\times$ & $1.43\times$ & $1.43\times$ & $1.11\times$ \\ RTX 2080 & $2.14\times$ & $2.76\times$ & $2.47\times$ & $1.34\times$ \\ \hline \end{tabular} \newline \subcaption*{GEMM benchmark} \begin{tabular}{|l|l|l|l|l|} \hline & GTX 680 & GTX 750 & GTX 1070 & RTX 2080 \\ \hline GTX 680 & $5.21\times$ & $2.39\times$ & $2.35\times$ & $0.26\times$ \\ GTX 750 & $3.94\times$ & $7.52\times$ & $7.75\times$ & $8.86\times$ \\ GTX 1070 & $4.12\times$ & $8.61\times$ & $8.61\times$ & $9.47\times$ \\ RTX 2080 & $4.19\times$ & $18.57\times$ & $15.29\times$ & $9.63\times$ \\ \hline \end{tabular} \newline \subcaption*{n-body benchmark} \begin{tabular}{|l|l|l|l|l|} \hline & GTX 680 & GTX 750 & GTX 1070 & RTX 2080 \\ \hline GTX 680 & $1.93\times$ & $0.9\times$ & $1.17\times$ & $0.27\times$ \\ GTX 750 & $2.0\times$ & $2.5\times$ & $2.5\times$ & $2.0\times$ \\ GTX 1070 & $3.08\times$ & $2.64\times$ & $2.85\times$ & $1.85\times$ \\ RTX 2080 & $3.9\times$ & $4.33\times$ & $5.57\times$ & $3.25\times$ \\ \hline \end{tabular} \newline \subcaption*{Convolution benchmark} \begin{tabular}{|l|l|l|l|l|} \hline & GTX 680 & GTX 750 & GTX 1070 & RTX 2080 \\ \hline GTX 680 & $9.91\times$ & $8.61\times$ & $7.79\times$ & $12.11\times$ \\ GTX 750 & $14.93\times$ & $14.33\times$ & $11.7\times$ & $18.0\times$ \\ GTX 1070 & $0.63\times$ & $12.46\times$ & $16.61\times$ & $7.76\times$ \\ RTX 2080 & $14.56\times$ & $19.59\times$ & $21.04\times$ & $11.83\times$ \\ \hline \end{tabular} \label{mutitab:hw_port} \end{table} The performance portability results of Coulomb sum, Matrix transposition, GEMM, n-body and Convolution benchmarks are given in Table~\ref{mutitab:hw_port}. The table shows the speedup of the proposed searcher for all combinations of a GPU used to build the model and a GPU used for autotuning. It can be seen that the model portability is good in most of the examples. In some cases, using a model built on a different GPU is even better than using the model created on the same GPU that was used for autotuning (e.\,g.{}, GEMM benchmark executed on RTX 2080 converges faster with the model created from GTX 1070 data). However, we consider this to be a somewhat random artefact where inaccuracies in the model compensate for inaccuracies in the expert system biasing the search. Note that the decision tree predictions have been used instead of the exact reading of PCs even in cases when the same GPU was used for both model building and autotuning. Therefore, the values on diagonals of tables within Table~\ref{mutitab:hw_port} do not copy values from Table~\ref{tab:pc_bias}. For example, the GEMM benchmark, when executed on RTX 2080, gets a speedup of $10.83\times$ with the exact PCs from RTX 2080, whereas the decision tree model from the same GPU limits its speedup to $9.63\times$. \subsection{Portability across inputs} \label{eval:input_portability} \begin{table}[ht] \centering \footnotesize \begin{tabular}{|l|l|l|l|l|} \hline & $2048 \times 2048$ & $128 \times 128$ & $16 \times 4096$ & $4096 \times 16$ \\ \hline $2048 \times 2048$ & $8.61\times$ & $6.04\times$ & $6.45\times$ & $4.98\times$ \\ $128 \times 128$ & $2.92\times$ & $3.17\times$ & $2.71\times$ & $1.72\times$ \\ $16 \times 4096$ & $3.23\times$ & $3.09\times$ & $3.22\times$ & $2.73\times$ \\ $4096 \times 16$ & $1.5\times$ & $1.93\times$ & $1.93\times$ & $1.93\times$ \\ \hline \end{tabular} \caption{Improvement (in terms of the number of empirical tests) of proposed searcher over random search with the GEMM benchmark. Rows show the sizes used for benchmark execution, columns show the sizes used to create the model of TP and PC relations.} \label{tab:input_port_gemm} \end{table} We further investigated the performance portability for the case of varying input. In our example, we used the GEMM benchmark with significantly varying input matrices: \begin{itemize} \item multiplication of square matrices of size $2048 \times 2048$: this is a typical example of matrix multiplication, which is compute-bound on GPUs; \item multiplication of square matrices of size $128 \times 128$: in this case, small matrices do not allow us to utilize the entire GPU easily: the code is rather latency- or strong-scaling bound; \item multiplication of highly rectangular matrices (a matrix of size $4096 \times 4096$ multiplied by a matrix of size $16 \times 4096$ and a matrix of size $4096 \times 16$ multiplied by a matrix of size $4096 \times 4096$): in this case, matrix multiplication is memory-bound (because of low arithmetic intensity). \end{itemize} We performed the experiment on GTX 1070 with decision tree-based model, which was also built on GTX 1070, but on different inputs. The results of the experiment are shown in Table~\ref{tab:input_port_gemm}. As can be seen, using a different input size typically slightly decreases the speedup. However, the reduction of the number of empirical tests is still significant: for example, autotuning of the compute-bound multiplication of large matrices can be improved more than $6\times$ even if using a model trained on the memory-bound GEMM instance. The improvement with small or highly-rectangular matrices is lower because searching their tuning spaces requires a lower number of searcher steps. \subsection{Real-time tuning} \label{sect:realtime} In this section, we compare the convergence of the proposed profile-based searcher with the convergence of random search in time. Our motivation for this comparison is that random search can converge faster despite requiring more empirical tests because random search has two advantages over the profile-based searcher: it does not collect performance counters (collecting performance counters hinders the kernel execution speed), and it has minimal computational overhead (no model is evaluated). On the other hand, the proposed searcher navigates the search towards faster implementations; therefore, omits evaluation of very slow configurations. Whereas the collection of performance counters is slow especially with slow-running kernels (the kernel runtime dominates over the time of kernel compilation, data copying and selection of new configuration to test), the overhead of the searcher is more significant with vast tuning spaces. \subsubsection{Experiment setup} To test the convergence time of the searchers, we have used a machine equipped with NVIDIA GeForce RTX 2080, Intel Core i7-8700, 32\,GB RAM, Ubuntu 18.04.3, NVIDIA driver 418.39 and CUDA 10.1. Each benchmark has been executed a hundred times. The model has been created using data obtained with GeForce GTX 1070. Therefore, our test simulates a situation when the user acquires a brand new GPU and has autotuning data from an older GPU. We have performed autotuning with persistent data on GPU and no comparison to the reference computation. Such a setting is typical for dynamic autotuning. It improves the results of the random searcher, as there is no overhead of data movement and comparison, which could hide the slower execution of kernels while gathering performance counters. On the other hand, we have selected the size of the kernels' inputs such that the GPU is fully occupied, but the kernels are not running longer than necessary (we consider 1-10 milliseconds as a suitable kernel runtime for our experiments). This choice, on the other hand, improves the results of the proposed searcher, because profiled kernels do not run for too long. In two experiments, we switch on the comparison to the reference kernel and use larger kernel input to demonstrate the described effects. In this evaluation, we show the searcher's convergence as a graph of the average kernel runtime at each second of autotuning. When a long-running kernel is selected in the first iteration of the search, the benchmark has no finished kernel for several seconds after its execution (this is especially the case when gathering performance counters). We decided to draw the graph from the time when all 100 experiments have at least one finished kernel and therefore its time is known. Such a solution prevents the results of the proposed searcher from being artificially improved, e.\,g.{}, by only plotting the runtime of the finished (and thus fast) kernels during the first seconds of measurements. \subsubsection{Results} The GEMM and Convolution benchmarks are the most difficult cases to autotune (see Table~\ref{tab:random_iters}). Therefore, improving the speed of convergence is more important for those benchmarks. The GEMM benchmark was run using square matrices of size $2048 \times 2048$, the Convolution benchmark using a 2D array of size $4096 \times 4096$. The comparison of their convergence can be seen in Figure~\ref{fig:gemm_convergence} and Figure~\ref{fig:conv_convergence}, respectively. In both cases, the proposed searcher brings significant convergence speedup. \begin{figure}[t] \centering \includegraphics[width=.85\hsize]{new-gemm.pdf} \caption{Convergence of GEMM, $2048 \times 2048 \times 2048$, GTX 2080, model from GTX 1070. The solid line shows the average, the transparent area shows the standard deviation.} \label{fig:gemm_convergence} \end{figure} \begin{figure}[t] \centering \includegraphics[width=.85\hsize]{new-conv.pdf} \caption{Convergence of Convolution, $4096 \times 4096$, GTX 2080, model from GTX 1070. The solid line shows the average, the transparent area shows the standard deviation.} \label{fig:conv_convergence} \end{figure} The Matrix transposition benchmark was tested with matrix size $8192 \times 8192$. Although the proposed searcher requires fewer empirical tests, the convergence in time is not significantly faster comparing to the random searcher -- see Figure~\ref{fig:mtran_convergence}. We also tested another scenario: the tuning was set to check results against the reference implementation, which is common during offline tuning. In such a case, the matrices are copied into host memory and checked against the reference, which adds a constant overhead for each empirical test. In this case, the overhead of gathering performance counters is less visible, and the proposed searcher converges significantly faster (Figure~\ref{fig:mtran_convergence}). \begin{figure}[t] \centering \includegraphics[width=.49\hsize]{new-mtran-rapid.pdf} \includegraphics[width=.49\hsize]{new-mtran-check.pdf} \caption{Convergence of Matrix transposition, $8192 \times 8192$, GTX 2080, model from GTX 1070. Left: tuning configured to not check kernel results. Right: tuning configured to check kernel results. The solid line shows the average, the transparent area shows the standard deviation.} \label{fig:mtran_convergence} \end{figure} The n-body benchmark was tested with 16,384 bodies. Although the overall number of searcher iterations is not high even for the random search, the proposed searcher converges significantly faster -- see Figure~\ref{fig:nbody_convergence}. We also tested a situation with tuning executed on a much bigger problem instance of 131,072 bodies (note that n-body is in $\mathcal{O}(n^2)$, where $n$ is the number of bodies). In such a setup, kernels run much longer and profiling overhead included in the proposed searcher makes it slower than random searcher (see Figure~\ref{fig:nbody_convergence}). \begin{figure}[t] \centering \includegraphics[width=.49\hsize]{new-nbody-small.pdf} \includegraphics[width=.49\hsize]{new-nbody-big.pdf} \caption{Convergence of n-body on GTX 2080, model from GTX 1070. Left: tuning with 16,384 bodies. Right: tuning with 131,072 bodies. The solid line shows the average, the transparent area shows the standard deviation.} \label{fig:nbody_convergence} \end{figure} The Coulomb sum benchmark uses a grid of $256 \times 256 \times 256$ cells and $256$ atoms. It converges very quickly, even with the random searcher. Figure~\ref{fig:coulomb_convergence} shows that the proposed searcher needs some time for initial profiling. Then, it converges very quickly, whereas random searcher matches its performance after 20 seconds of tuning. However, both searchers converge close to the optimum in less than 5 seconds. Therefore, the choice of the searcher is not important here. \begin{figure}[t] \centering \includegraphics[width=.85\hsize]{new-coulomb.pdf} \caption{Convergence of Coulomb Sum, grid $256 \times 256 \times 256$, 256 atoms, GTX 2080, model from GTX 1070. The solid line shows the average, the transparent area shows the standard deviation.} \label{fig:coulomb_convergence} \end{figure} The setup of this experiment also allows us to benchmark the GEMM full benchmark. As we have not performed exhaustive search of GEMM full, the model was created from the tuning space of the GEMM benchmark, measured on GeForce GTX 1070. Note that the GEMM benchmark does not cover the tuning space of the GEMM full benchmark completely -- it lacks four tuning parameters and uses less then 3\% of GEMM full configurations. However, Figure~\ref{fig:gemm_full_convergence} shows that the proposed searcher converges much faster than random searcher with the GEMM full benchmark: the proposed searcher requires 61 seconds to match the same results as the random searcher reaches after 300 seconds. This result can be further improved by optimizing the implementation of the proposed searcher: with the GEMM full tuning space, it requires significant time to score tuning configurations, resulting in $3\times$ longer time per empirical test. \begin{figure}[t] \centering \includegraphics[width=.85\hsize]{new-gemm-full.pdf} \caption{Convergence of GEMM full, $2048 \times 2048 \times 2048$, GTX 2080, model from GEMM on GTX 1070. The solid line shows the average, the transparent area shows the standard deviation.} \label{fig:gemm_full_convergence} \end{figure} \subsection{Comparison to Basin Hopping} So far, we have compared our proposed profile-based searcher to random search. However, the Basin Hopping optimization has recently been shown to perform better than many other optimization methods~\cite{vanwerkhoven2018kernel}. Therefore, we also compare our searcher (with the settings described in Section~\ref{sect:realtime}) to the Basin Hopping searcher implemented in Kernel Tuner~\cite{vanwerkhoven2018kernel}. \subsubsection{Experiment setup} We used the same machine as for KTT (see Section~\ref{sect:realtime}) to test Kernel Tuner. We have re-implemented KTT examples for Kernel Tuner and autotuned them with Basin Hopping optimization in default settings~\footnote{We are aware that the parameters of the Basin Hopping method can be tuned towards improving search convergence speed. However, the optimal values of those parameters are not known \textit{a priori}, so they cannot be tuned before autotuning for new hardware or input is finished. Therefore, we kept the default settings for a fair comparison.}. During the testing of Kernel Tuner, we have observed that it works slower than KTT, even when the random searcher is used. We suppose that the source of its slower speed is twofold. First, Kernel Tuner is implemented in Python, whereas KTT is a C++ native application. Second, Kernel Tuner executes each kernel three times to get a better timing precision. Although KTT only executes each kernel once, it gives more consistent results: when executed multiple times, the KTT timing is more stable than performance times reported by Kernel Tuner. We suppose this is caused by the overhead of the python-based Kernel Tuner implementation. We also found that the measurement of Kernel Tuner systematically reports slightly higher kernel runtimes compared to KTT. Therefore, we have normalized performance times to be comparable: we have done an exhaustive search of the tuning space and multiplied the times reported by Kernel Tuner by the ratio of the best time measured by KTT and the best time measured by Kernel Tuner. Therefore, both tuning systems converge at the same kernel times in our figures. As the comparison of timing is affected by the slower execution of Kernel Tuner, we have also compared the number of searcher steps here. The number of steps allows us to deduce how well Basin Hopping navigates the tuning space compared to random search and the proposed search based on performance counters, without the handicap of slower Kernel Tuner execution. \subsubsection{Results} \begin{figure}[t] \centering \includegraphics[width=.49\hsize]{new-coulomb-kt-time.pdf} \includegraphics[width=.49\hsize]{new-coulomb-kt-iters.pdf} \caption{Convergence of the Coulomb sum benchmark using KTT and Kernel Tuner. Left: convergence speed in time. Right: comparison of iterations (empirical tests). The solid line shows the average, transparent area shows the standard deviation.} \label{fig:gemm_coulomb} \end{figure} Figure~\ref{fig:gemm_coulomb} shows a comparison of the proposed searcher implemented in KTT and Basin Hopping implemented in Kernel Tuner with Coulomb sum benchmark. Comparing convergence times, the proposed searcher converges faster during the first 10 seconds. After 10 seconds, it is slightly outperformed by Basin Hopping. When we compare the number of empirical tests, the proposed searcher behaves similarly to Basin Hopping. \begin{figure}[t] \centering \includegraphics[width=.49\hsize]{new-gemm-kt-time.pdf} \includegraphics[width=.49\hsize]{new-gemm-kt-iters.pdf} \caption{Convergence of the GEMM benchmark using KTT and Kernel Tuner. Left: convergence speed in time. Right: comparison of iterations (empirical tests). The solid line shows the average, the transparent area shows the standard deviation.} \label{fig:gemm_kt} \end{figure} The GEMM benchmark is compared in Figure~\ref{fig:gemm_kt}. It can be seen that the Basin Hopping optimization implemented in Kernel Tuner converges more slowly than random searcher during the first 70 seconds and then it outperforms random search slightly. However, the reason for such a result of Basin Hopping is related to the slower execution in Kernel Tuner. When we compare the number of empirical tests, Basin Hopping converges to the optimum much faster than random searcher after the first 200 iterations. The proposed profile-based searcher uses significantly fewer empirical tests than both Random and Basin Hopping and outperforms them in both the number of empirical tests and the convergence time. \begin{figure}[t] \centering \includegraphics[width=.49\hsize]{new-mtran-kt-time-rapid.pdf} \includegraphics[width=.49\hsize]{new-mtran-kt-iters-rapid.pdf} \caption{Convergence of the Matrix transposition benchmark using KTT and Kernel Tuner. Left: convergence speed in time. Right: comparison of iterations (empirical tests). The solid line shows the average, transparent area shows the standard deviation.} \label{fig:mtran_kt} \end{figure} With the Matrix transposition benchmark, the slowdown of Kernel Tuner is more visible, see Figure~\ref{fig:mtran_kt}. Kernel Tuner requires about 16 seconds to start tuning, probably because of complicated constraints pruning the tuning space. After initialization, it converges quickly, but cannot outperform random or proposed searcher. When we compare the number of empirical tests, Basin Hopping again converges near the optimum much faster than the random searcher. However, the proposed profile-based searcher uses significantly fewer empirical tests. \begin{figure}[t] \centering \includegraphics[width=.49\hsize]{new-nbody-kt-time.pdf} \includegraphics[width=.49\hsize]{new-nbody-kt-iters.pdf} \caption{Convergence of the n-body benchmark using KTT and Kernel Tuner. Left: convergence speed in time. Right: comparison of iterations (empirical tests). The solid line shows the average, transparent area shows the standard deviation.} \label{fig:nbody_kt} \end{figure} With the n-body benchmark, the Basin Hopping method does not converge well, see Figure~\ref{fig:nbody_kt}. Comparing both convergence time and number of empirical tests, it performs worse than random searcher and the proposed searcher. \begin{figure}[t] \centering \includegraphics[width=.49\hsize]{new-conv-kt-time.pdf} \includegraphics[width=.49\hsize]{new-conv-kt-iters.pdf} \caption{Convergence of the Convolution benchmark using KTT and Kernel Tuner. Left: convergence speed in time. Right: comparison of iterations (empirical tests). The solid line shows the average, transparent area shows the standard deviation.} \label{fig:conv_kt} \end{figure} Similarly to n-body, the Basin Hopping method converges slowly in the Convolution benchmark, see Figure~\ref{fig:nbody_kt}. Comparing the number of empirical tests, it works similarly to the random searcher. However, it converges much slower when real-time tuning is measured. Both the Matrix transposition and Convolution benchmarks reduce tuning space significantly using pre-defined constraints. When tuning space (created as the cross product of pre-defined tuning parameter values) is pruned by constraints, only 1.55\% of configurations remain with Matrix transposition, and 0.025\% of configurations remain with Convolution. We speculate that this may cause a significant delay at the start of tuning (16 seconds with Matrix transposition and 45 seconds with Convolution). In contrast, 41.7\% of configurations remain after constraint application with Coulomb sum, 33.3\% with n-body and 22.1\% with GEMM. Although this issue could be solved by optimizing the Kernel Tuner code, the comparison of empirical tests still shows Basin Hopping needs more empirical tests than the proposed searcher. \subsection{Comparison to regression trees} \label{sect:starchart} To compare our approach to regression trees, we employed Starchart~\cite{jia2013starchart}, which trains regression trees to predict the outcome variable (usually performance or consumed power) based on the values of tuning parameters. With the trained tree, one can predict the outcome for the entire space and find the configurations with the best predicted outcomes. \subsubsection{Experiment setup} In their evaluation, Starchart authors started the training with 20 datapoints and added more iteratively until prediction accuracy, measured as the median relative prediction error, got below 15\%, or a maximum of 200 training datapoints was reached. Prediction accuracy was evaluated on 200 validation datapoints. Both training and validation datapoints were selected by uniform random sampling. It is worth noting that the tuning spaces used to evaluate Starchart in~\cite{jia2013starchart} were often very large as they contained entire ranges of values instead of only a few meaningful ones, e.\,g.{}, 32-1024 instead of just 32, 64, 128, 256, 512 and 1024 as block sizes. We evaluate the accuracy of the approach as follows: \begin{itemize} \item we randomly select 200 tuning configurations as a testing set; \item we perform training by measuring additional tuning configurations until median relative prediction error gets below 15\%; \item we measure how many configurations, sorted by best predicted kernel time, need to be examined to find one that is actually good. \end{itemize} In the last step of the protocol, we take the whole tuning space, calculate the predictions and sort them from the best to the worst. In this order, we go one by one and examine whether the configuration is actually well-performing, i.\,e.{}, within 110\% of the best kernel time. We have evaluated five benchmarks (coulomb, gemm-reduced, conv, mtran, nbody) using GeForce RTX 2080. Because Starchart is not a tuning toolkit, we cannot directly compare tuning speed in time. Therefore, we compare the number of empirical tests here. \subsubsection{Results} \begin{table} \caption{Results of autotuning using Starchart compared to the random searcher, using GeForce GTX 1070 and GeForce RTX 2080. All columns show the number of empirical tuning steps. The \textit{model build} column shows steps required for model training and testing, \textit{tuning} shows steps required for tuning before a well-performing configuration is found, and \textit{random} shows the number of steps required by random searcher (taken from Table~\ref{tab:random_iters}).} \small \centering \subcaption*{GeForce GTX 1070} \hspace{0.4cm}\begin{tabular}{|l|l|l|l|l|} \hline & model build & tuning & random \\ \hline Coulomb sum & 233 & 26 & 33\\ Matrix trans. & 378 & 14 & 9\\ GEMM & 400 & 636 & 449\\ n-body & 397 & 21 & 36\\ Convolution & 321 & 278 & 348\\ \hline \end{tabular} \newline \centering \subcaption*{GeForce RTX 2080} \begin{tabular}{|l|l|l|l|l|} \hline & model build & tuning & random \\ \hline Coulomb sum & 234 & 7 & 15\\ Matrix trans. & 397 & 50 & 46\\ GEMM & 391 & 413 & 259\\ n-body & 369 & 9 & 38\\ Convolution & 259 & 9 & 567\\ \hline \end{tabular} \label{tab:pc_starchart10702080} \end{table} We performed the comparison of Starchart and random searcher for GeForce GTX 1070 and for GeForce RTX 2080 in Table~\ref{tab:pc_starchart10702080}. The tables show the number of tuning steps required to build a model and to perform a search until a well-performing configuration is found. The values for random searcher are taken from Table~\ref{tab:random_iters}. As can be seen, including the model build phase, Starchart performs worse than the random searcher, excepting the Convolution benchmark on GeForce RTX 2080. We believe that a well-designed tuning space, which does not contain a vast amount of poorly-performing tuning configurations, cannot be easily tuned with surrogate models created as part of the tuning process itself. \begin{table}[ht] \centering \small \begin{tabular}{|l|l|l|} \hline & SC@1070 & proposed@1070 \\ \hline Coulomb sum & 3 & 5 \\ Matrix trans. & 42 & 18 \\ GEMM & 564 & 16 \\ n-body & 17 & 6 \\ Convolution & 9 & 26 \\ \hline \end{tabular} \caption{Results of autotuning using Starchart compared to the proposed searcher, using GeForce RTX 2080 and models trained on GeForce GTX 1070. Both columns show the number of empirical tuning steps.} \label{tab:pc_starchart_portability} \end{table} Although Starchart is not designed to ensure model portability (i.\,e.{}, using the model trained on a different GPU), we have performed a test when a regression tree from a different GPU is used. The idea behind this experiment is that if performance portability is good for some of the well-performing configurations (i.\,e.{}, there are configurations which perform well on both GPUs), the regression tree trained on a different GPU can be used successfully. We build the regression tree on GeForce GTX 1070 and use it to navigate searching on GeForce RTX 2080. We have compared the Starchart results to our searcher using a model from GeForce GTX 1070 to navigate tuning on GeForce RTX 2080. The comparison is given in Table~\ref{tab:pc_starchart_portability}. In this scenario, Starchart can compete with the proposed searcher in case the regression tree can describe the tuning space well, and some of the well-performing configurations of the GPU used for model build are also well-performing on the GPU used for autotuning. However, our model does not have such a restriction. The proposed searcher also seems to be more robust: there are no long tuning times as with the Starchart and GEMM example (on both GeForce GTX 1070 and RTX 2080) and Convolution (on GeForce GTX 1070). \section{Related Work} \label{sect:related_work} Tuning space search methods can be divided into three categories: (i) model-free methods, which are viewing tuning space search as a mathematical optimization problem and empirically search for the best configuration; (ii) model-based methods, which use a performance or power model to select the best configuration from the tuning space directly; (iii) hybrid methods, which combine empirical search with a model. In this section, we compare our approach with the state-of-the-art methods in tuning space search, and also with methods using historical profiling data and performance counters for code optimization. \subsection{Model-free methods} The model-free methods based on optimization are used in the majority of code optimization parameter autotuning frameworks~\cite{ansel2014opentuner, gerndt2015automatic, nugteren2015cltune, rasch2018atf, vanwerkhoven2018kernel}. As tuning spaces are not continuous, contain boolean tuning variables and are non-linear and non-convex, searching tuning spaces is challenging. Therefore, in some experiments, the random search seems more reliable than more sophisticated search methods~\cite{seymour2008comparison, nugteren2015cltune}. On the other hand, some authors show improvement over random search. In~\cite{balaprakash2011can}, the Nelder-Mead method has been successfully adapted to non-continuous tuning spaces. More recently, it has been shown that the combination of global and local search has the potential to outperform random search~\cite{vanwerkhoven2018kernel} systematically. The difference between model-free optimization-based searching and our method is that optimization has to be executed from scratch when hardware or a performance-relevant input parameter changes, whereas our method uses a model portable across different GPUs and inputs. In this paper, we compare the results of our searcher to~\cite{vanwerkhoven2018kernel}. We confirmed result from~\cite{vanwerkhoven2018kernel} showing that Basin Hopping coupled with local search is superior to random search. We also show that our searcher outperforms Basin Hopping in both number of empirical tests and convergence time. \subsection{Model-based methods} The model-based methods need to use a model which can be evaluated faster than empirical testing. Therefore, simulators such as GPGPU-Sim~\cite{bakhoda2009analyzing} are not practical for this purpose. Multiple models for analysis and performance prediction of CUDA or OpenCL code have been developed~\cite{hong2009analytical, baghsorkhi2010adaptive, zhang2011quantitative, sim2012performance, huang2014gpumech, li2015transit}. However, the construction of those models often needs manual effort, which makes them impractical for autotuning. Moreover, independent studies reveal high inaccuracies in their ability to predict performance on some problems~\cite{volkov2016understanding, madougou2016landscape}, so it is questionable whether they can be used to select good tuning configurations from a vast tuning space. On the other hand, the model-based tools seem to have promising results if only one tuning parameter is searched. For example, it has been shown that a model can replace empirical tuning to select a well-performing work-group size (thread block in CUDA terminology)~\cite{cummins2017end, connors2019automatically, yu2020efficient}, thread-coarsening factor~\cite{cummins2017end} or code variant~\cite{muralidharan2016architecture}. In our work, we focus on the optimization of many tuning parameters together. \subsection{Hybrid methods} Hybrid methods introduce a surrogate model which is not intended to find the best tuning configuration directly, but rather to prune or bias empirical searching. In~\cite{falch2015machine}, a machine learning model is built from a sample of tuning space, and only the tuning configurations with the best predicted performance are empirically tested. The authors show that their method can outperform the random search. Regression trees have been used to speed up autotuning in multiple studies~\cite{feng2017sampling, jia2013starchart, price2015improving}. The regression trees are built from a representative sample of the tuning space, and their precision can be improved during search~\cite{feng2017sampling}. All the papers evaluate their approach using rather vast tuning spaces, e.\,g.{}, testing all integer thread block sizes in the interval $<1, 1024>$, instead of using more rational sizes $2^n, n \in <5, 10>$. Therefore, the regression trees can be built from a tiny fraction of the tuning space. With rationally constructed tuning spaces, such as those presented in~\cite{nugteren2015cltune, petrovic2020benchmark}, a large portion of tuning space has to be used for tree construction, as we show experimentally in Section~\ref{sect:starchart}. As the models have to be re-trained when hardware or performance-relevant input characteristics change, they are not practical when a large portion of tuning space is needed for training. In contrast, our approach allows for the use of a model trained on different hardware or input. \subsection{Methods using historical data} Only a few works use historical autotuning data (e.\,g.{}, obtained on different hardware) to improve autotuning convergence speed. In~\cite{muralidharan2016architecture}, authors predict the best code variant of a kernel for unseen GPU by using data obtained on a set of explored GPUs. The difference in our work is that we focus on searching a multi-dimensional tuning space, and only one GPU is sufficient for empirical exploration with our model. The historical data observed on one CPU architecture are used to bias a multi-dimensional search on a different CPU architecture in~\cite{roy2016exploiting}. Their approach works well if the fast implementations on both architectures are correlated. Our approach does not require such a correlation. A model which automatically selects a tuning configuration for a specific application input is presented in~\cite{tillet2017input}. It is trained on different inputs and then generalizes how to select the right tuning configuration for the used input. Compared to our model, it does not need to repeat empirical search when the input changes. On the other hand, our model does not need to be trained on multiple inputs and GPUs. In our previous work~\cite{olha2020exploiting}, we used data measured on one hardware to prune dimensions on different hardware. While this approach works well for speeding up exhaustive search, it brings no advantage when coupled with a searcher based on mathematical optimization. \subsection{Methods using performance counters} The typical usage of hardware performance counters is to profile a kernel for manual inspection of bottlenecks. However, there are several works which use performance counters to navigate optimization automatically. In~\cite{konstantinidis2015practical, wu2015gpgpu}, performance counters are used to approximate the performance and scaling of a known implementation on unseen GPUs. In contrast, our work focuses on navigating tuning space search, i.\,e.{}, changing the implementation to maximize its performance. In~\cite{muralidharan2016architecture}, authors use performance counters to detect relevant features for their code variant selection model. Their model is trained on multiple code variants (alternative functionally equivalent implementations) and multiple GPUs. It predicts the fastest code variant on unseen GPU. They optimize one-dimensional tuning space and require multiple GPU architectures for training, whereas our approach allows searching many-dimensional tuning spaces after training on one GPU. CPU performance counters have been used to select a well-performing combination of the number of OpenMP threads and scheduling strategy~\cite{wang2009mapping}, power-efficient process scheduling~\cite{singh2009prediction}, a well-performing combination of compiler optimization switches~\cite{cavazos2007rapidly}, a well-performing combination of activated or deactivated prefetchers~\cite{rahman2015maximizing}, and well-performing settings of stream configuration on Xeon Phi~\cite{zhang2018auto}. The main difference between the approach presented in this paper is that we can tune any user-defined optimization (transformation of the source code), whereas~\cite{wang2009mapping, singh2009prediction, cavazos2007rapidly, rahman2015maximizing, zhang2018auto} are developed to perform a specific type of optimization (e.\,g.{}, setting OpenMP scheduling strategy and number of threads). With fixed optimizations, end-to-end learning is possible: the input of the machine-learning algorithm is a vector of tuning parameters' values, performance counters, and runtimes obtained from multiple applications, each running at different processors with various inputs. The output can be predicted runtime, or the predicted values of the best tuning parameters. Our method allows each tuned application to use original tuning parameters, so such a training set cannot be constructed. Therefore, we combine the machine learning model (created for each tuned application separately) with the expert system, navigating tuning space search according to predicted $PC_{ops}$ instead of predicted runtimes or best tuning parameters' values. \section{Conclusion and future work} \label{sect:conclusion} In this paper, we have introduced a novel tuning space searcher, which uses hardware performance counters to speed up the searching process. The proposed profile-based searcher builds a model of relations between tuning parameters and performance counters using any GPU and input, and uses this model to navigate searching on an unseen GPU or input. We have experimentally shown that the performance counters can significantly reduce the number of empirical tests that have to be performed in autotuning. We have also shown that the real-time convergence of the proposed searcher is typically superior to random searcher or state-of-the-art optimization-based Basin Hopping searcher implemented in Kernel Tuner~\cite{vanwerkhoven2018kernel}. The proposed searcher is implemented in Kernel Tuning Toolkit~\cite{petrovic2020benchmark}, and therefore it can be used for both offline and dynamic autotuning. Although the searcher was designed for CUDA-enabled GPUs, we believe that a similar searcher can be developed for GPUs of different vendors or even different processor architectures, such as CPUs. In future work, we plan to improve the searcher performance. As discussed in Section~\ref{sect:limits}, some components of the proposed profile-based searcher can be replaced by a more sophisticated implementation. We plan to experiment with (potentially gradient-based) local search methods, predict performance counters for the hardware used for autotuning and replace the system for bottleneck analysis and reaction with a machine-learning model. Apart from improving the proposed searcher, we plan to investigate other possibilities to leverage hardware performance counters. First, we plan to extend our system to predict how well-tuned the actual configuration of a kernel is. Such a prediction allows us to stop the tuning at the right time, as well as predict how much performance can be gained by autotuning (which is especially important during dynamic autotuning, when the tuning time is limited). Second, we plan to use the vast amount of tuning data for studying the behavior and efficiency of different HW architectures and code optimization strategies. The source code of Kernel Tuning Toolkit, the proposed profile-based searcher, and profiled data conducted for this study are available to the community. Therefore, it is easy to replicate results from this study, test the searcher with different benchmarks, or modify or extend our searcher implementation. \section*{Acknowledgements} \small The work was supported from European Regional Development Fund-Project "CERIT Scientific Cloud" (No. CZ.02.1.01\-/0.0/0.0/16\_013/0001802). Computational resources were supplied by the project "e-Infrastruktura CZ" (e-INFRA LM2018140) provided within the program Projects of Large Research, Development and Innovations Infrastructures. \bibliographystyle{plain}
\section{Introduction} According to a Kaspersky~\cite{kaspersky_ics_2017} report, businesses spent an average of 380 million USD in 2017 to recover and deal with the consequences of Industrial Control Systems (ICS) incidents, and this value is still increasing. Gartner's 2019 report predicts that the financial impact of attacks on Cyberphysical Systems will exceed 50 billion USD in 2023. The United States Department of Homeland Security estimates that the vast majority of security incidents can be attributed to defects in software design and code~\cite{DHS_90_Percent}. To deliver secure software-based products and services, we must consider security while producing software. To become certified and able to conduct business in the critical infrastructure sector, companies must comply with several standards. Among these standards, IT Security standards such as the ISO 27k~\cite{2013_27001} and IEC 62.443~\cite{2018_62443_4_1} mandate, among others, the establishment of a secure software development lifecycle (S-SDLC). The S-SDLC includes the usage of secure coding guidelines (SCG) and the checking of code quality (ISO 25k~\cite{ISO250xx}) against these guidelines. Secure coding, secure software development, and secure coding guidelines are no easy subjects. Some of the vastly known and adopted SCG include Carnegie Mellon's Software Engineering Institute C, C++, and Java secure coding guidelines standars~\cite{CERT-SEI} (also known as SEI-CERT), the Motor Industry Software Reliability Association standard (MISRA)~\cite{MISRA_C:2012,MISRA_C_A1:2012}, and the Open Web Application Security Project Top 10 (OWASP standard)~\cite{owaspT10}. However, SCG do not exist for all existing programming languages. In addition to SCG, to address the importance of secure code and the need to develop secure products, several companies united to form the SAFEcode~\cite{SAFECode}. This alliance promotes secure coding and industrial secure coding best practices. Automatic tools such as Static Application Security Testing (SAST)~\cite{rodriguez2019software} can be used to automate and improve code quality. These tools scan the code basis for existing vulnerabilities, which must be fixed by software developers. However, previous research shows that their reliability is not good enough~\cite{oyetoyan2018myths}, in particular they exhibit a large amount of false positives and false negatives. Also, these tools cannot automatically fix the code -- software developers must do this. In this work, we focus on the human factor, i.e. the software developer. We justify this focus since it is the software developer who writes the code, who interprets the output of SAST tools, and who will ultimately be the person that introduces software weaknesses into the code basis. It will be the software developer as well that will have to correct the vulnerabilities in code. This study is embedded in our investigation on the usage of serious games as a means to raise secure coding awareness of software developers in the industry \cite{gasiba_re19,Gasiba2020_Perliminary_Survey,Gasiba2020f,Gasiba2020_CyberICPS,Gasiba2020_CyberICPS_Journal,Gasiba2020c,Gasiba2019_Raising,Gasiba2020d,Gasiba2021_BSI}. Our primary motivation to conduct the present work is to motivate awareness training by answering the question "is secure coding education in the industry needed?". Our study focuses particularly on the education of secure coding guidelines. We approach this question by looking at the perspective of software developers' compliance to secure coding guidelines. Due to a lack of previous work exploring the relationship between secure coding guidelines and software developers' intention to comply with them, we have developed a survey to address this issue. Our previous publication details the overall research method underlying this survey and is available in~\cite{Gasiba2020_Perliminary_Survey}. However, this previous publication focuses on the survey creation and only presents limited results from the survey pilot, i.e. it does not present any results of a large-scale deployment of the survey. This work at hands closes this gap and presents an extensive analysis of a large-scale deployment. We base our results on 194 answers from participants working in different industries, collected over a period of seven months. Our analysis of these results addresses the following research questions: \begin{itemize}[leftmargin=+.435in] \item[ {\bf RQ1:} ] Which factors lead industrial software developers to comply with or ignore secure coding guidelines? \item[ {\bf RQ2:} ] To what degree are software developers aware of secure coding guidelines? \item[ {\bf RQ3:} ] To what extent is secure coding education in the industry needed? \end{itemize} Through the large-scale survey, our contribution to scientific knowledge comprises: \begin{enumerate} \item openly available data from a large-scale survey, for other researchers to explore, \item the presentation and interpretation of results from the analysis of the survey, and \item a list of actionable items for practitioners and industrial cybersecurity educators. \end{enumerate} This paper is organized as follows. Section~\ref{sec:related_work}, briefly discusses previous and related work. Section~\ref{sec:survey} gives a very brief overview of the survey and its theoretical constructs. In section~\ref{sec:results}, we present a comprehensive overview of the most important results from the analysis of the survey, derive actionable items, and discuss the threats to the validity. This section, which constitutes the core of the paper, provides herein our main contribution. Finally, section~\ref{sec:conclusion} concludes this paper with an overview of the study, and an outline of further work. \section{Related Work} \label{sec:related_work} Based on a large-scale study by Patel et al.~\cite{gitlab_2019}, Bruce Schneier, a well-known security researcher, has stated that less than 50\% of software developers can spot security vulnerabilities in software~\cite{Schneier2020}. Also, an estimation by the United States Department of Homeland Security, about 90\% of the {\it reported security incidents result from exploits against defects in the design or code of software}~\cite{DHS_90_Percent}. Adding to these facts, software is becoming more complex and larger: a recent study by Sourcegraph~\cite{2020_Big_Code}, with more than 500 software developers, shows that more than 80\% of software developers are nowadays dealing with 20 times more code than ten years before. An additional motivating factor for our work is Fisher et al.~\cite{fischer2017stack}, which shows that typical online platforms that software developers use to clarify development questions can be considered harmful. The reason for not being a good source of information is that the answers present in these platforms are not curated in secure coding correctness. Their work indicates that severe problems can arise if software developers use these references and are not aware of secure coding practices. Furthermore, Acar et al.~\cite{Acar2017} extensively analysed existing online resources that software developers can access to search about secure programming issues. They discovered that these platforms provide low-quality information in terms of cybersecurity. In particular, they found outdated information, wrong information, and no concrete examples or exercises. While many studies focus on several different aspects of secure software development, very few empirical results exist on why software developers do not comply with secure coding practices. In particular, to the best of our knowledge, we have found no previous study addressing the aspects that lead industrial software developers to comply or not comply with secure coding guidelines in their daily work. In a recent study Assal et al. \cite{Assal2019} analyzed how software developers are influenced and influence the secure coding processes. They concluded that software developers are \textit{not the weakest link}, and are very motivated towards software security. However, they did not cover the reasons why this is so. In 2011, Xie et al.~\cite{Xie2011} interviewed 15 senior professional software developers in the industry with an average of 12 years of experience. Their study shows a disconnect between software security concepts and the knowledge that the participants have in their jobs. However, this study also does not focus on compliance to secure coding guidelines. To address this issue, we have formally developed a survey \cite{Gasiba2020_Perliminary_Survey} to investigate software developers' compliance to secure coding guidelines. This survey is based on the adaptation of four distinct theories to the software developer context: IT Security Policy Compliance theory (PC), IT Security Neutralization theory (NT), Security-Related Stress theory (SRS), and IT Security Awareness (AW). The work from Bulgurcu et al. \cite{bulgurcu2010information} and Moody et al. \cite{moody2018toward}) synthesizes the current research on IT security policy compliance. Their work details the possible reasons that serve as factors for individuals to comply with IT security policies. Their constructs include, among others, the intention to comply and the knowledge of the policies. Neutralization Theory is is discussed in \cite{siponen2010neutralization}, by Siponen et al., who address the possible reasons why subjects might find reasons to disregard IT security policies. Their constructs include, among others, the metaphor of the ledger, denial of injury, denial of responsibility, and appeal to higher loyalties. D'Arcy et al. in \cite{d2014understanding}, discuss Security-Related Stress theory which uses coping theory to explore stress as a cause of deliberate IT security policy violations. Their constructs include, among others, the lack of understanding, higher workload, and constant changes. Finally, Hänsch et al. provide a literature review on IT-security awareness \cite{2014_Benenson_Defining_Security_Awareness}. Their conceptualization of IT Security Awareness comprises three distinct constructs: Perception, Protection, and Behavior. Perception relates to knowing existing threats, Protection relates to knowing existing mechanisms, and Behavior relates to actual behavior. Finally, in this work, we use the recent results from WhiteSource~\cite{WhiteSource2019}, which present the top three vulnerabilities of the C, C++, Java, and Python programming languages. \section{Survey on Secure Coding Guidelines} \label{sec:survey} To investigate the possible reasons why vulnerabilities end up in final products, we have created a survey, described in \cite{Gasiba2020_Perliminary_Survey}, that focuses on industrial software developers. This survey is based on the four established theories: policy compliance (PC, \cite{bulgurcu2010information,moody2018toward}), neutralization theory (NT, \cite{siponen2010neutralization}), security-related stress (SRS, \cite{d2014understanding}), and awareness (AW, \cite{2018_Graziotin_Happy_Developers}). Furthermore, the survey contains additional questions based on the industry experience by the first author. These questions are grouped by company background (CBG) and participant background knowledge (BGK). \Cref{tab:survey:questions} shows the questions present in the survey, along with the different theories and constructs in which it is based. The questionnaire comprises the following four sections: 1) demographic data, 2) secure coding awareness, 3) secure coding compliance, and 4) deterrents to compliance. The first part of the questionnaire includes general demographic questions on work experience, previous training on secure coding, the primary programming language used at work, used secure coding processes in the company, and software development method. The second section of the questionnaire deals with awareness for secure coding. This part is individualized according to the primary programming language selected in the first section. In this section, the participant is asked four questions related to high-impact vulnerabilities, according to~\cite{WhiteSource2019}. These vulnerabilities are presented by the corresponding CWE~\cite{WWW_CWE_2019} description and number, The four questions in this group correspond to Per1, Prot1, Be1 and BgK45, as shown in Table~\ref{tab:survey:questions}. The answers to these (and only these) questions are based on a 3-point Likert scale: Yes, Uncertain and No. The third section of the questionnaire presents questions to measure the intent to comply to secure coding guidelines. These are the questions marked with PC in Table~\ref{tab:survey:questions}. Finally, the fourth section contains questions about the factors that influence compliance with secure coding guidelines. These questions are based on neutralization theory and security-related stress, which are marked with NT and SRS in Table~\ref{tab:survey:questions}, respectively. The answers to the questions are based on a 5-point Likert scale, which include the following: strongly disagree (SD), disagree (D), neutral (N), agree (A) and strongly agree (SA). The following mapping is used in our results: SD$\leftrightarrow$1, D$\leftrightarrow$2, N$\leftrightarrow$3, S$\leftrightarrow$4, SA$\leftrightarrow$5. In the previous publication, we presented the rationale and details on how the survey was scientifically constructed. However, the preliminary results from the survey pilot available in this previous work only included a minimal subset of the survey questions, leading to very limited conclusions. For more details on the survey' questions and the design of the survey, we refer the reader to \cite{Gasiba2020_Perliminary_Survey}. \begin{spacing}{.9} \begin{table*}[http] \scriptsize \centering \caption{Survey Questions, Theories and Constructs} \label{tab:survey:questions} \resizebox{1.0\textwidth}{!}{ \renewcommand{\arraystretch}{1.0} \begin{tabular}{|p{0.7cm}|p{0.5cm}|p{1.1cm}|p{11.7cm}|} \hline \textbf{Theory} & \textbf{Ref.} & \textbf{Construct} & \textbf{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Survey Question} \\ \hline \hline \multirow{8}{*}{CBG} & \multirow{8}{*}{~~\textemdash} & \textit{CBg1} & In your company compliance to secure code guidelines is being checked in projects you work in \\ \cline{3-4} & & \textit{CBg2} & You know the secure software development lifecycle in your company \\ \cline{3-4} & & \textit{CBg3} & To which extent do you work with the $\rule{1cm}{0.15mm}$ secure coding standard? \\ \cline{3-4} & & \textit{CBg4} & Could you explain why you use secure coding guidelines when writing code for the product you currently develop? \\ \cline{3-4} & & \textit{CBg5} & Could you tell us why you do not use secure coding guidelines? \\ \cline{3-4} & & \textit{CBg6} & Why is compliance to secure coding guidelines not actively being checked in the projects you work in? \\ \cline{3-4} & & \textit{CBg7} & How is the compliance to secure coding guidelines checked in your current project? \\ \cline{3-4} & & \textit{CBg8} & In your company you use a well established secure software development life-cycle \\ \hline \multirow{5}{*}{BGK} & \multirow{5}{*}{~~\textemdash}& \textit{BgK1} & Compliance to secure coding guidelines is an important part of the development of company's products \\ \cline{3-4} & & \textit{BgK2} & Which of the following secure coding standards and best practices do you know? \\ \cline{3-4} & & \textit{BgK3} & You are aware of negative consequences resulting from exploiting vulnerabilities in the products you work for \\ \cline{3-4} & & \textit{BgK4} & What other weaknesses do you pay attention to in developing software for the product you currently work for? \\ \cline{3-4} & & \textit{BgK5*} & You know about this weakness \\ \cline{1-4} \multirow{12}{*}{PC}& \multirow{6}{*}{~\cite{bulgurcu2010information}}& ISPA & You know that your company has a policy that mandates the usage of secure coding guidelines in software development \\ \cline{3-4} & & ITC & You intend to always comply with secure coding guidelines \\ \cline{3-4} & & GISA & You are aware of the existing security threats to the products of your company \\ \cline{3-4} & & SE-C1 & In your opinion, to write secure code, you have the necessary skills \\ \cline{3-4} & & SE-C2 & In your opinion, to write secure code, you have the necessary knowledge \\ \cline{3-4} & & SE-C3 & In your opinion, to write secure code, you have the necessary competency \\ \cline{2-4} & \multirow{2}{*}{~\cite{moody2018toward}}& FacCond5 & Support is available if you experience difficulties in complying with secure coding guidelines \\ \cline{3-4} & & RespCost4 & Secure coding guidelines make the task of writing software more difficult \\ \cline{2-4} & \multirow{4}{*}{~~\textemdash}& \textit{PC-Conf} & Complying to SCG makes you feel more confident about the security of the code that you write \\ \cline{3-4} & & \textit{PC-NT} & In your opinion, to write secure code, you have the necessary time \\ \cline{3-4} & & \textit{PC-NR} & In your opinion, to write secure code, you have the necessary resources \\ \cline{3-4} & & \textit{PC-NF} & In your opinion, to write secure code, you have the necessary freedom \\ \hline \multirow{11}{*}{NT} & \multirow{9}{*}{~\cite{siponen2010neutralization}} & N-DON3 & It is OK to disregard secure coding guidelines when this means that you deliver your work-packages faster \\ \cline{3-4} & & N-ATHL1 & It is OK to disregard secure coding guidelines when you would otherwise not get your job done \\ \cline{3-4} & & N-DOI1 & It is OK to disregard secure coding guidelines when this would result in no harm to the customer \\ \cline{3-4} & & N-DOI2 & It is OK to disregard secure coding guidelines if no damage is done to the company you work for \\ \cline{3-4} & & N-DOR3 & It is OK to disregard secure coding guidelines if you do not understand them \\ \cline{3-4} & & N-COC1 & It is not as wrong to ignore secure coding guidelines that are not reasonable \\ \cline{3-4} & & N-COC2 & It is not as wrong to ignore secure coding guidelines that require too much time to comply with \\ \cline{3-4} & & N-MOTL1 & You feel that your general adherence to secure coding guidelines compensates for occasionally ignoring them \\ \cline{2-4} & \multirow{3}{*}{~~\textemdash} & \textit{NT-MArc} & It is OK to disregard secure coding practices when this would lead to major architectural changes \\ \cline{3-4} & & \textit{NT-CH} & It is OK to disregard secure coding guidelines when this means that it makes your company's customers happy \\ \cline{3-4} & & \textit{NT-SC} & It is OK to disregard secure coding guidelines if the software is not safety critical \\ \cline{1-4} \multirow{6}{*}{SRS} & \multirow{6}{*}{~\cite{d2014understanding}}& CX2 & You find that new employees often know more about secure coding than you do \\ \cline{3-4} & & CX4 & You often find it difficult to understand your organization’s security coding guidelines \\ \cline{3-4} & & OL1 & Complying to secure coding guidelines forces you to do more work than you can handle \\ \cline{3-4} & & OL4 & You are forced to change your work habits to adapt to your organization’s secure coding guidelines \\ \cline{3-4} & & UC1 & There are constant changes in secure coding guidelines your organization \\ \cline{3-4} & & UC4 & There are constant changes in security-related technologies in your organization \\ \hline \multirow{3}{*}{AW} & \multirow{3}{*}{~\cite{2014_Benenson_Defining_Security_Awareness}} & \textit{Per1*} & You can recognize code that contains this weakness \\ \cline{3-4} & & \textit{Be1*} & You know how to write code that does not contain this weakness \\ \cline{3-4} & & \textit{Prot1*} & You understand the possible consequences that can result from exploiting this weakness \\ \hline \end{tabular}} {\\\hspace{\textwidth} {\scriptsize {\bf RQ.}: Research Question, {\bf CBG}: Company Background, {\bf BGK}: Participant Background Knowledge, {\bf PC}: Policy Compliance Theory, {\bf NT}: Neutralization Theory,~~~~~~~~~~~~~~~~~~~\\ {\bf SRS}: Security-Related-Stress Theory, {\bf AW}: Awareness, Note: constructs marked with * are specific for different programming languages}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~} \end{table*} \end{spacing} \subsection{A Large Scale Survey} A large scale deployment of the survey was performed between March and September of 2020, resulting in a total running time of seven months. The survey was announced through several different channels, in particular: \begin{enumerate} \item {\bf Professional Contacts}: Linked-In, direct contacts by the authors at several different companies, Münchener Sicherheitsnetzwerk (Munich Security Network Forum) \item {\bf Social Media}: Twitter, Facebook, Reddit \item {\bf Other}: University contacts, survey exchange platform (SurveySwap), advertisement in university website \end{enumerate} The survey was constructed using the open-source survey platform LimeSurvey~\cite{LimeSurvey} Version 3.17.0+190402 and deployed in Amazon Web Services. At the beginning of the survey, it was clearly stated: the purpose of the research, contact details, and the mandatory requirement that the participant must be a software developer from the industry. Over the seven months, the survey was accessed 363 times resulting in 196 complete answers. Two answers were rejected due to irregularities found in the collected data. The full set of captured data is available under the following link~\cite{gasiba_zenodo_entire_survey}. All the data was anonymously collected; however, a cookie was activated to prevent participants from submitting twice their answers. \Cref{fig:survey:demographics:industry} shows the different background industries captured by this data set. The demographics in terms of participants' programming languages are the following: C++ 50 (26\%), Java 38 (20\%), Python 37 (19\%), Other 36 (18\%), C 33 (17\%). The survey was anonymous, and geographical, education and gender aspects were not captured. \begin{figure}[http] \centering \caption{Survey demographics in terms of industry} \label{fig:survey:demographics:industry} \includegraphics[width=0.95\columnwidth]{demographics_industry_sector.pdf} \end{figure} \vspace{-20pt} In the next section, an extensive discussion of the results of the survey data analysis will be presented. \section{Results} \label{sec:results} This section presents the survey results, categorized by the different theories in which it is based: CBG, BGK, PC, NT, SRS, and AW. The section concludes with the main practical take-aways from the analysis and discusses the threats to the results' validity. \subsection{Company Background} \Cref{tab:CBg1_CBg2_CBg8_BgK1_BgK3} shows the results for the company background constructs CBg1, CBg2, and CBg8. From these results, we observe that, in general, {\it compliance to secure coding guidelines is not being checked in the industry}, and that software developers are not sure about the secure software development life-cycle (S-SDLC) used in their company. This observation is corroborated by the CBg8 results. \begin{table}[http] \centering \caption{Company Background (CBG) and Background Knowledge(BGK)} \label{tab:CBg1_CBg2_CBg8_BgK1_BgK3} \includegraphics[width=\columnwidth]{CBG_BGK.pdf} \end{table} \Cref{tab:CBg4_CBg5_CBg6} shows the results for CBg4, CBg5, and CBg6. Here we observe that about 50\% of the participants (out of the 23 that mentioned security being or not a requirement) claim that in their industry, implementation of security during product development is a requirement, while the other half state that this is not the case. In terms of factors why SCG are not used (CBg5), we found the following important factors: 1) lack of awareness (focus on products and not on security, and limited knowledge), 2) relying on SAST tools, 3) because the participants had no previous experience with issues, and 4) limited or lack of management commitment, and resources devoted to security. The main factor not to check compliance to SCG (CBg6) is the fact that SCG is not used, and the industry focuses on products, not on security. Another important factor was the (perceived) lack of automatic tools to assist in the compliance checks and especially the lack of awareness. \begin{table*}[http] \centering \caption{Results for Company Background: CBg4, CBg5, and CBg6} \label{tab:CBg4_CBg5_CBg6} \includegraphics[width=0.97\textwidth]{CBg4_CBg5_CBg6.pdf} \end{table*} \Cref{fig:CBg3} shows the results of CBg3: to which extent are standard secure coding guidelines used in the industry. For all the secure coding standards that the survey has covered, all the results show that they are not really used in practice. \begin{figure}[http] \centering \caption{CBg3: To which extent use secure coding standard} \label{fig:CBg3} \includegraphics[width=\columnwidth]{use_standard.pdf} \end{figure} For the participants who answered that SCG are checked in their company, \cref{fig:CBg7} shows how they are being checked. This figure shows that 70.7\% check SCG during code review, 62,2\% using automated tools, and 46.3\% by a manual process. This figure also shows that 15.8\% of the checks are done using automated tools exclusively, 12.2\% using code review exclusively, and 10.9\% through a manual process. Employing two different methods (Automated Tools and Code Review) lead to 25.6\% of the results. About 18.3\% claim that the three methods are used simultaneously. \begin{figure}[http] \centering \caption{CBg7: How are secure coding guidelines checked?} \label{fig:CBg7} \includegraphics[width=.9\columnwidth]{SCG_Checking.pdf} \end{figure} \subsection{Participant Background Knowledge} \Cref{tab:CBg1_CBg2_CBg8_BgK1_BgK3} shows that compliance to secure coding guidelines (BgK1) is not considered an essential part of the development of products, with an average agreement of 2.36. However, the survey participants have indicated to be aware (3.87 average agreement) of the negative consequences of exploiting software vulnerabilities (BgK3). We attribute this observation to the large amount of advertisement, e.g., social media, on these negative consequences. \begin{figure}[http] \centering \caption{BgK2: Knowledge of SCG standard} \label{fig:BgK2} \includegraphics[width=\columnwidth]{know_standard.pdf} \end{figure} \Cref{fig:BgK2} shows the extent to which survey participants know the different secure coding standards. The blue bars represent the "percentage of the total survey population that knows the given SCG standard". The red bars show the "percentage of the population that should know the standard, given their chosen programming language". For the SEI-CERT standard, this corresponds to the population who answered C or C++ as a programming language. For the MISRA and C11 Annex J the results correspond to C programmers. The OWASP and BSI standards capture Java, Python and programmers of Other languages. \begin{table*}[http] \centering \caption{Results on PC, NT and SRS vs Industry, Programming Language and Work Experience} \label{tab:PC_NT_SRS} \includegraphics[width=.98\textwidth]{PC_NT_SRS.pdf} \end{table*} General knowledge about SCG is low (below 65.3\%). Comparing the blue to the red bars, these results show that the different standards are known to a larger percent of general population participants than those in the population that {\it should know the standard} -- this is an issue. It means that the population that should be more aware of these SCG standards is not aware of them. In particular, from the C and C++ software developers, only 28.9\% know the SEI-CERT standard, 38.6\% know the MISRA standard, and 16.9\% know the Annex J of the C11 standard. For developers using Python and Java, 40\% know the OWASP standard, and 5.3\% know the BSI 5.21 standard. This last result is not surprising, since the BSI standard is local to Germany only, and the survey was deployed on a global scale. \subsection{Policy Compliance, Neutralization Theory, and Security-Related Stress} \Cref{tab:PC_NT_SRS} shows the overall results for each theory (policy compliance, neutralization theory, and security-related-stress) for each theory construct, grouped by industry, programming language, and by work experience. The minimum and maximum values are highlighted in this table, with the colors red and green, respectively. For a given group, the minimum and maximum in a column (i.e., per theory construct) is highlighted by a thicker border, while the minimum and maximum in a row is highlighted with a background color (red and green respectively). In terms of policy compliance, we observe that the highest amount of agreement across all twelve constructs is obtained for the C programming language, while the highest amount of disagreement is obtained for other programming languages and participants with less than three years of industry experience. We attribute the latter observation to the fact that newer employees need to accommodate to the job and might, therefore, not be yet fully integrated into the daily working life. The construct that was rated with the lowest agreement across all the different groups is PC-NT (i.e. lack of time), This result is to be expected due to the need to fulfill project deadlines in an industrial environment. In terms of neutralization theory, the construct N-DON3 sees the largest amount of disagreement, i.e., software developers do not think that secure coding guidelines should be ignored to deliver work-packages faster. However, there is a general agreement across all groups (industry, programming languages, and work experience) that ignoring unreasonable secure coding guidelines is acceptable. This result is surprising since, according to the first author's experience, it is not the software developers' job to question the secure coding guidelines but comply with their policies when developing software. Another surprising factor is that participants in the telecommunications industry find fewer reasons not to comply with secure coding guidelines. According to the first author's experience, this might be because engineers working in this industry are used to developing software under tight constraints (e.g., real-time) and follow established coding guidelines to achieve this goal. However, the IT security and finance department find more reasons not to comply with secure coding guidelines than other industries. This fact is also surprising, especially for the IT security industry. We think that, since the developers working in this industry face security topics daily, they might be more inclined to bend the established rules. Another surprising factor is that, compared to the other programming languages, Python developers tend to find more reasons not to comply with secure coding guidelines. We attribute this observation to the fact that Python is a prototyping language, where software developers might be more used to writing "quick and dirty" code, other than in the other cases. Also, surprisingly, is the fact that software developers using programming languages other than C, C++, Java, or Python find fewer reasons not to comply with secure coding guidelines. In terms of work experience, senior employees (more than ten years experience) tend to follow the established rules, while employees working for three to five years in the industry find more reasons to discard SCG. Another result from this table is that, across all the groups, software developers also tend to ignore SCG that they do not understand. Finally, in terms of security-related-stress, there is a general agreement on the construct UC4, i.e., the participants to the survey have observed constant changes in security-related technologies. This observation might be related to the large and growing amount of different software development frameworks and changing (agile) software development methodology. However, there is also a general disagreement on UC1, i.e., that secure coding guidelines are not continually changing. We find this last observation positive since constantly changing secure coding guidelines can lead to unnecessary stress at work. \subsection{Awareness} For each of the programming languages, the participants were asked to answer Yes, Unsure, and No on how they agree with each of the awareness constructs (Per1, Prot1, Be1), and also on BgK5. Additionally, each of these questions was asked in relation to a top-3 CWEs (Common Weakness Enumeration) that affects the programming language, according to the study by WhiteSource~\cite{WhiteSource2019}. \Cref{fig:Awareness} shows the survey results for these constructs, for each programming language and each CWE. We note that each of the CWE is related to one or more secure coding guideline~\cite{Gasiba2020c}. In this table, an "unsure" answer was considered a negative aspect, therefore combined with "no" results. The survey participants report high levels of awareness for BgK5 (knowing the vulnerability), and for the construct Prot1 (understanding the consequences of exploiting vulnerabilities). However, for Per1 (ability to recognize vulnerable code) and Be1 (knowing how to write secure code), the levels of awareness are low (less than 51\%). The first result is in line with the study by Patel et al.~\cite{gitlab_2019}, however, the second result is new in this study. For the construct Per1, we also observe that the programming languages "Other", Python and C are especially at risk since the awareness level is low for their ranked vulnerabilities. Considering all the constructs together, we observe an overestimation (60\% vs 40\%) of the participants' awareness level, since real-world data shows that the number of incidents is increasing. We attribute this to {\it optimism bias}~\cite{thaler2009nudge}, which is a well-known effect in risk perception that occurs when someone overestimates or underestimates risk while remaining ignorant about their poor assessment~\cite{lechner2019security}. Our results indicate an overestimation bias, which is corroborated with the industry's experience from the first author. \begin{table*}[http] \centering \caption{Awareness Results vs Programming Language} \label{fig:Awareness} \includegraphics[width=\textwidth]{awareness.pdf} \end{table*} Since the participants were only asked to rank the top-3 CWE, in BgK4 we asked the participants to optionally name additional weaknesses that they pay attention to while developing software. The participants' answers were coded to separate the correctly identified weaknesses from the vulnerabilities and general issues not related to secure coding. \Cref{tab:BgK4} shows the result of the codification of the answers given by the participants. \begin{table*}[http] \centering \caption{BgK4: Additional knowledge on coding weaknesses} \label{tab:BgK4} \includegraphics[width=\textwidth]{Additional_Vulnerabilities_BgK4.pdf} \end{table*} From all the additional survey answers, 63.2\% are software weaknesses, 33.3\% are general coding issues, and 3.5\% of the answers are from unsure participants. Python has the highest amount of correctly identified weaknesses and, surprisingly, C++ the least amount. The reason for the last observation might be due to the complexity of the C++ language. In terms of correctly identified issues, Authentication and Authorization, Information leakage, Memory Issues, Weak Cryptography, and Buffer Overflow are in the top-5. Surprisingly, the survey participants have considered general bugs, performance issues, and security breaches as secure coding weaknesses. Denial-of-service is generally not considered a coding issue but a deployment issue (solved with e.g., load balancing). However, it was also considered a software vulnerability, ranking in the top-5 of the general issues category. Surprisingly, also considered as secure coding issues have been: infrastructure issues, safety aspects, and code smells, personal identifiable information, and lack of testing. In particular, code smells, which are {\it symptoms of poor design and implementation choices that may hinder code comprehensibility and maintainability}~\cite{palomba2018diffuseness}, have been shown to be generally dissociated from security vulnerabilities~\cite{elkhail2019relating}. The consideration of these factors as secure coding weaknesses leads us to notice the lack of awareness of secure coding guidelines. \subsection{Actionable Items for Industrial Practitioners} In the following, we present the main actionable items (AI) we infer from the current work, i.e. from the analysis of the survey results but also from our experiences surrounding this topic in industrial application. These actionable items should be taken into consideration by practitioners. We split them into two main categories: general issues and secure coding guidelines. The AIs under the general issues category are not directly related to secure coding guidelines and include: \begin{enumerate} \item {\bf Need to involve management}: without management understanding and approval, it is not possible to establish secure coding practices in a company \item {\bf Need to improve knowledge on company's internal S-SDLC and secure coding policies}: the survey has shown that software developers are not always aware of the company's internal policies and about the S-SDLC; therefore, specialized internal campaigns should be started to raise awareness of these issues \item {\bf Raise awareness of the difference between secure coding and other aspects, e.g. safety and performance}: the survey has shown that software developers tend to confuse these topics. When training software developers, the difference between these aspects should be made clear, as also possible opposing recommendations \item {\bf Consider security in the requirements phase}: it is no surprise that security should be considered early in the software development phases; rarely will customers "ask for security"; however, they will expect secure products. Therefore, company policies should be adapted to cover security from early stages, and software developers should be aware of the necessary steps to take (e.g., threat and risk analysis, secure architecture, security requirements). \end{enumerate} Furthermore, software developers must be made aware of the difference between security weakness and security vulnerability. In particular, security weaknesses are coding errors that might lead to a vulnerability, while (according to ENISA~\cite{ENISA_Glossary}, definition G52), a security vulnerability is the existence of a security weakness that can lead to a security breach. In terms of secure coding guidelines, we conclude the following key AIs for practitioners: \begin{enumerate} \item {\bf Include SCG as an integral part of S-SDLC}: SCG should be lived as a process and should be second nature to software developers; daily practice and usage has the potential to have long-lasting and beneficial effects. \item {\bf Build a secure coding community}: promote secure coding practices inside the company. Some possible ways to implement this it to join larger communities which also promote secure coding practices, e.g., SAFEcode~\cite{2018_SAFEcode}, have monthly or weekly presentations or discussions on a secure coding topic, promote and use secure coding gamification (e.g., best secure coder of the month). \item {\bf Define a responsible person}: have a point-of-contact for secure coding issues; the job of this person includes making sure that software developers are trained, and motivated. \item {\bf Implement awareness training on SCG}: a substantial amount of software developers needs training on SCG; as such, awareness training events should be promoted and held regularly. \item {\bf Implement hands-on awareness training}: motivated by the observed optimism bias, and also experience from the industry, we think that an effective way to raise awareness is to challenge the knowledge of software developers on secure coding topics; while desired training methods was not captured through the survey, our experience has shown that after being challenged on these topics, many developers tend to re-evaluate their knowledge and seek more information. A good way to achieve this is by the usage of Capture-the-Flag events, which are specially designed to raise awareness of secure coding for software developers in the industry; these exercises should mainly focus on the defensive perspective but also cover offensive aspects; furthermore, these exercises should provide a good motivation on why certain SCG exist -- this way, software developers can develop a better knowledge of SCG and understanding on why they should comply to them. \item {\bf Implement SCG quality gates}: secure code is also high-quality code; practitioners should consider adding the requirement of checking secure coding guidelines to typical project quality gates; some ways this can be achieved include using specialized tools that are configured to check secure coding guidelines, keeping track of code reviews including review of secure coding guidelines, and status monitoring of software security testing results. \item {\bf Do not use SAST as a replacement for SCG}: some participants to the survey have mentioned the usage of SAST tools as a replacement for a formal training or consideration of secure coding guidelines; we consider this an important hidden danger -- previous studies~\cite{aloraini2019empirical,li2020vulnerabilities} have reported on the poor quality of SAST tools; therefore, we conclude that the human factor cannot be taken out of the loop and SAST tools should only be used in a supportive role. \item {\bf Monitor the quality of SAST tools}: since the quality of the output of these tools might be poor, strategies to address their quality needs to be considered; in particular, the secure coding champion needs to implement a process to verify the quality of the tools being deployed and to replace them when outdated; additionally, if possible, it should be considered to use several tools in parallel, in order to compare the different results. \item {\bf Training on SCG should focus on concepts, not specific cases or instances}: the results of the survey indicate constant changes in security technologies; this might be related to the vast amount of existing frameworks and booming IT security field; these changes can cause unnecessary stress to software developers; as such, when dealing with secure coding guidelines, software developers should be trained on concepts and not so much on particular instances of SCG, in particular, software developers should understand the underlying reason for the SCG and not just assume the rule without further consideration. \item {\bf Keep up-to-date with the latest technology}: software developers should be informed about the latest security technologies, when necessary, especially when starting new projects; this should be done taking into consideration that too much information can cause stress, while too little information can mean that important news are missed; for this reason, we propose that the secure coding champion should constantly monitor new technologies and decide on their importance and introduction on running projects. \item {\bf Adapt SCG, only when necessary}: similar to keeping up-to-date with the latest technology, secure coding guidelines should be updated regularly; however, without interfering with ongoing projects; updates of SCG should be timed together with other SCG awareness campaigns, e.g., awareness training. \end{enumerate} \subsection{Threats to Validity} In this work, we present the analysis of a large scale anonymous survey on the usage of secure coding guidelines in the industry, including a total number of 194 participants distributed across the globe. Since the survey took place in an online format, and the collected data is anonymized, it is impossible to control the respondents' true background. However, we have counter-acted this possible bias in two different ways: by making sure that the channels where the survey was announced included a rich set of industrial software developers and that this requirement was clearly stated at the start of the survey (in particular with the following sentence in the beginning of the survey: "this survey is for software developers working in the industry"). Geographical background was not captured, which might impact our conclusions. Additionally, the different industry sectors are not equally represented, which might introduce bias to our conclusions. Our conclusions result from an interpretation of the data in light of the first author's own experience in the industry. However, these results have been discussed with three additional security experts, whereby the conclusions hereby presented have been confirmed by all. We observe that the survey results display optimism bias. To counterbalance this effect, we focus our results, not on absolute values, but on a relative comparison between different values. Finally, the results on knowledge of the BSI standard might have a strong bias, since this is a local standard to Germany, and geographic results are not available. \subsection{Impact of this work} The results presented in this work provide an impact both in the academic community but also in the industry. It is not always easy to obtain a large volume of survey data from participants from the industry. In this work, we have collected the survey answers from over 190 industrial software developers. This means that we can assume that our results have a strong supportive basis. Also, the survey that was administered to the participants underwent an extensive design cycle, to make sure that it is based on well established scientific theories. As a result of the analysis of the survey data, fifteen key take-away messages were derived, which serve both as guidance for future scientific work but also as valuable information for industry practitioners. Our work not only addresses the awareness of software developers on the topic of secure coding guidelines, but it also raises awareness in the scientific community on this difficult topic. Additionally, we provide the raw survey data, as a means to contribute to further research on the topic. \section{Conclusions} \label{sec:conclusion} Cybersecurity is becoming ever more important nowadays. Ignoring cybersecurity can lead to severe financial penalties or even loss of certification, together with loss of business or even loss of life, in critical infrastructures. However, the last years have seen an increase in cybersecurity incidents. According to an estimate by the United States Department of Homeland Security, the root cause of about 90\% of security incidents can be traced back to software design and coding weaknesses. Secure coding guidelines exist to make software secure -- compliance to them increases the security and quality of code. Additionally, Static Application Security Test tools also exist to reduce software vulnerabilities; however, previous studies have shown that these tools exhibit many false positives and false negatives. These facts lead us to the following questions: 1) how aware are software developers of secure coding guidelines, 2) is secure coding education in the industry needed, and which factors lead software developers to comply or ignore secure coding guidelines. In this work, we address these questions through a large-scale survey on software developers in the industry. The survey design, which is a complicated endeavor by itself, is addressed in a separate publication, while this focuses on the analysis of the results and practical aspects and advice for practitioners and cybersecurity educators in the industry. Our measurement of policy compliance is based on three established theories: policy compliance theory by Bulgurcu et al. and Moody et al.; neutralization theory by Siponen et al.; and security-related stress theory by D'Arcy et al. Our measurement of awareness is based on the three dimensions, as defined by Hänsch et al.: perception, protection, and behavior. Our results indicate that a large amount of software developers are not aware of secure coding guidelines. Previous studies argue that increasing awareness leads to increased compliance. Therefore, we conclude that a method to address this lack of awareness is through education on secure coding. Based on our results and experience, we also infer a set of fifteen actionable items for practitioners and industrial cybersecurity educators. A further contribution herein is the raw survey results, which we make openly available for further research. In future work, we would like to practice the derived actionable items and investigate novel methodologies for secure coding education of industrial software developers. We want to use these actionable items to improve our ongoing action-design research in the industry. \section*{Supporting Data} The raw data collected in the survey is openly available in Zenodo~\cite{gasiba_zenodo_entire_survey}. The raw survey data is provided in Comma Separated Values (CSV) format. Researchers are encouraged to make use of this data for further work. \section*{Acknowledgements} The authors would like to thank the participants of the survey for their constribution. Also, the authors would like to thank Kristian Beckers and Thomas Diefenbach for their helpful, insightful, and constructive comments and discussions. This work is financed by portuguese national funds through FCT - Fundação para a Ciência e Tecnologia, I.P., under the project FCT UIDB/04466/2020. Furthermore, the third author thanks the Instituto Universitário de Lisboa and ISTAR-IUL, for their support. \bibliographystyle{IEEEtran}
\section{Introduction} With the smooth development of various dark-matter (DM) detection experiments in the past decades, DM research has gradually become a hot topic. Massive Weakly Interacting Particles (WIMPs) are considered the most promising DM candidates because they can naturally predict the abundance measured by the Planck experiment in~\cite{Ade:2015xua, Aghanim:2018eyx}. This phenomenon is called the WIMP Miracle in the literature~\cite{Jungman1995Supersymmetric,Bertone:2004pz}. One distinctive feature of the candidates is that the spin-independent (SI) cross-section of their scattering with nucleons is approximately $10^{-45} {\rm cm^2}$ since they are usually supposed to couple to the Standard Model (SM) particles through weak interactions~\cite{Baum:2017enm}. Nevertheless, the DM direct detection experiments give a different answer; that is, so far, the XENON-1T and PandaX-II experiments have restricted the cross-section below the order of $10^{-46} {\rm cm^2}$~\cite{Aprile:2018dbl,Wang:2020coa,Cui:2017nnn}, which implies that the interaction between DM and nucleons is at most feeble~\cite{Cao:2018rix}. This fact reveals a general conclusion that simple WIMP theories face significant experimental challenges. In popular supersymmetric theories, the lightest neutralino, $\tilde{\chi}_1^0$, as the lightest supersymmetric particle (LSP), is a stable WIMP in theories' natural parameter space and usually acts as a DM candidate. It affects both the signal of supersymmetric particles at colliders and the evolution of the universe, so it has been the focus of DM physics over the past several decades~\cite{Jungman1995Supersymmetric}. With the increasing sensitivity of DM direct detection experiments, this candidate is becoming increasingly more difficult to be consistent with both the detection experiments and the abundance naturally~\cite{Cao:2018rix}. Taking the Minimal Supersymmetric Standard Model (MSSM) as an example, the neutralino with $m_{\tilde{\chi}_1^0} \lesssim 1~{\rm TeV}$ must be Bino-dominated in its component to produce correct relic abundance. In this case, the SI and spin-dependent (SD) cross-sections rely on Higgsino mass in different ways. If the Higgsinos are moderately light, at least one of them would be considerable in size~\cite{Cao:2019qng}. As a result, the Higgsinos must be heavier than approximately 300 GeV after considering current XENON-1T experimental constraints on the cross-sections and approximately 600 GeV supposing no DM signal detected in the future LZ experiments~\cite{Cao:2019qng}. Additionally, a global fit of the MSSM to various experimental data known in 2017 preferred the Higgsinos to be heavier than approximately $350~{\rm GeV}$ at a $95\%$ confidence level~\cite{Bagnaschi:2017tru}. This conclusion should be significantly improved since both DM detection experiments and the LHC search for supersymmetry have progressed rapidly in recent years. These facts reveal that the theory already has undergone a relatively significant fine-tuning to predict $Z$ boson mass. With further development of DM detection experiments, the tuning will become even more significant. The dilemma of the MSSM inspired our study of the Next-to-Minimal Supersymmetric Standard Model (NMSSM)~\cite{Ellwanger:2009dp}, which extends the MSSM by one gauge-singlet superfield and is another popular realization of supersymmetry, and to consider a Singlino-dominated neutralino as a DM candidate. The theory introduces the inputs $\lambda$ and $\kappa$ to parameterize singlet-doublet Higgs interactions and singlet Higgs self-interactions. Thus, the couplings between the DM and nucleus depend on the Higgsino composition of the DM, which, for fixed DM mass, is determined by the dimensionless parameter $\lambda$ and the Higgsino mass $\mu_{tot}$ (see discussions in this paper). When $\lambda \gtrsim 0.3$ and $\mu_{tot} \lesssim 500~{\rm GeV}$, the scattering cross-sections of the DM and nucleus tend to be too large to be consistent with the XENON-1T constraints under the premise of the correct DM abundance~\cite{Cao:2016cnv}. This situation remains valid for any DM mass when the constraints from the LHC search for supersymmetry are included~\cite{Cao:2018rix,cao:2021new-work}, and it has a great impact on DM abundance~\cite{Cao:2019qng}. For example, the annihilations $\tilde{\chi}_1^0 \tilde{\chi}_1^0 \to t \bar{t}, h A_s, h_s A_s$ were believed to play crucial roles in determining the abundance~\cite{Baum:2017enm,Cao:2015loa}, where $t$, $h$, $h_s$, and $A_s$ denote the top quark, SM-like Higgs boson, and singlet-dominated CP-even and CP-odd Higgs bosons, respectively. After considering the XENON-1T constraints, none of them, however, can be fully responsible for the correct abundance. Instead, DM prefered to co-annihilate with the Higgsinos to obtain the density, which corresponds to a correlated parameter space of $2 |\kappa| \simeq \lambda$ with $\lambda \lesssim 0.1$~\cite{Cao:2018rix,cao:2021new-work}. It is worth adding that, with the improvement of the experimental sensitivity in detecting DM, the small upper bound of $\lambda$ will be further reduced. It is noted that the above conclusions about the Singlino-dominated DM are established in the NMSSM with a $Z_3$ symmetry. In such a framework, to ensure that the neutralino is the LSP, $|\kappa|$ must be less than $\lambda/2$~\cite{Ellwanger:2009dp}. Consequently, it should be small after considering the DM experiments' substantial limitation on $\lambda$. This conclusion, however, does not hold in the general NMSSM (GNMSSM) due to the emergence of $Z_3$-violating terms. Specifically, the ratio of Singlino and Higgsino masses is no longer $2 |\kappa|/\lambda$, so $|\kappa|$ may be much larger than $\lambda$ to predict the Singlino-dominated neutralino as the LSP. The Singlino-Higgsino complex system has four independent parameters, which may take $\lambda$, $\mu_{tot}$, $m_{\tilde{\chi}_1^0}$, and $\kappa$. This characteristic contrasts with that of the $Z_3$-NMSSM, which only contains three input parameters, i.e., $\lambda$, $\mu_{tot}$, and any one of $m_{\tilde{\chi}_1^0}$ and $\kappa$. An important application of these differences is that the singlet-dominated particles may form a secluded DM sector~\cite{Pospelov:2007mp}, which has the following salient features. \begin{itemize} \item Since the parameter $\kappa$ determines the interactions among the singlet-dominated particles, the Singlino-dominated DM can achieve the correct abundance by the process $\tilde{\chi}_1^0 \tilde{\chi}_1^0 \to h_s A_s$ through adjusting the value of $\kappa$. \item When the parameter $\lambda$ is small, the secluded sector communicates with the SM sector only through the weak singlet-doublet Higgs mixing. In this case, the interaction between the DM and nucleus is naturally feeble. \end{itemize} It is emphasized that $\lambda$ and $\kappa$ may play different roles in the DM physics of the GNMSSM. Similar to the $Z_3$-NMSSM, the parameters $\lambda$, $\mu_{tot}$, and $m_{\tilde{\chi}_1^0}$ mainly affect the coupling between the DM and nucleons, so they have been strongly restricted by DM direct detection (DD) experiments. In contrast, the singlet fields' self-interactions can be entirely responsible for the DM density, where the parameter $\kappa$ plays a crucial role. Owing to this characteristic, the GNMSSM has a broad parameter space consistent with the current DM experimental results. This fact has been neglected in the literature. Considering the dilemma of the $Z_3$-NMSSM in DM physics, the DM physics of the GNMSSM are scrutinized herein. Our results are quite different from those of previous studies on Singlino-dominated DM, which worked in the framework of the $Z_3$-NMSSM ~\cite{Das:2012rr,Ellwanger:2014hia,Ellwanger:2016sur,Ellwanger:2018zxt,Xiang:2016ndq,Cao:2016cnv, Cao:2018rix,Cao:2019qng,cao:2021new-work,Abdallah:2019znp,Guchait:2020wqn}. The rest of this paper is organized as follows. First, the key features of the GNMSSM are introduced in Section II. In particular, an economic GNMSSM realization is considered. The research strategy and numerical results are described in Section III to show the characteristics of DM physics. Finally, conclusions are drawn in Section IV. \section{\label{theory-section}Theoretical preliminaries} In this section, the GNMSSM's basics are reviewed. The Singlino-dominated DM's properties will be elucidated in detail by analytic formulae for the case of massive-charge Higgs and gauginos. \subsection{\label{Section-Model}General NMSSM } The GNMSSM augments the MSSM by a gauge singlet superfield $\hat{S}$ that does not carry any leptonic or baryonic number. Thus, its Higgs sector contains $\hat{S}$ and two $SU(2)_L$ doublet superfields, $\hat{H}_u=(\hat{H}_u^+,\hat{H}_u^0)$ and $\hat{H}_d=(\hat{H}_d^0,\hat{H}_d^-)$. The general form of its superpotential is~\cite{ Ellwanger:2009dp} \begin{eqnarray} W_{\rm GNMSSM}&=& W_{\rm Yukawa} + \lambda \hat{S} \hat{H_u} \cdot \hat{H_d}+\frac{1}{3} \kappa \hat{S}^3+ \mu \hat{H_u} \cdot \hat{H_d} + \frac{1}{2} \nu \hat{S}^2+\xi \hat{S}, \end{eqnarray} where $W_{\rm Yukawa}$ is the Yukawa term for quarks and leptons, and $\lambda$ and $\kappa$ are dimensionless coefficients of the trilinear terms invariant under the $Z_3$ symmetry. The terms characterized by the bilinear mass parameters $\mu$ and $\nu$ and the singlet tadpole parameter $\xi$ break the $Z_3$ symmetry. Without the loss of generality, one can eliminate the linear term in $\hat{S}$ by displacing the field by a specific constant $c$, i.e., $\hat{S} = \hat{S}^\prime + c$, so that only the bilinear mass terms in $\hat{S}^\prime$ remain to violate the symmetry. As suggested by the studies in~\cite{Lee10090905,Lee11023595,GGRoss11081284,GGRoss12051509}, the $\mu$ and $\nu$'s natural smallness could stem from the breaking of an underlying discrete R symmetry, $Z^R_4$ or $Z^R_8$, at a low-energy scale. Additionally, it is noticeable that a non-minimal coupling $\chi$ of a Higgs bilinear to gravity was introduced to implement a superconformal symmetry in the GNMSSM~\cite{SFerrara10040712,SFerrara10082942}, and this coupling could drive inflation in the early universe~\cite{MEinhorn09122718}. In this case, the extra $\mu$-term is connected with $\chi$ via gravitino mass $m_{3/2}$, i.e., $\mu=\frac{3}{2}m_{3/2}\chi$. It is the only $\rm Z_3$-breaking term in superpotential due to the superconformal symmetry breaking at the Planck scale~\cite{Hollik:2018yek}. In this study, partly motivated by the inflation-inspired model\footnote{It must be emphasized here that, contrary to studies in the inflation-inspired model~\cite{Hollik:2018yek,Hollik:2020plc}, we concern ourselves with the $\mu$ extension's generality irrespective of its origin, and therefore the inflation explanation and its corresponding gravitino DM scenario are not discussed.} and mainly for simplifying our analysis, a specific GNMSSM is investigated in which all dimensional parameters in the superpotential are zero except $\mu$, labeled as $\mu$-extended NMSSM ($\rm \mu NMSSM$) hereafter. The superpotential and corresponding soft supersymmetry-breaking Lagrangian are reduced to the following forms: \begin{eqnarray} W_{\rm \mu NMSSM} &=& W_{\rm Yukawa} + (\lambda \hat{S}+\mu) \hat{H_u} \cdot \hat{H_d}+\frac{1}{3} \kappa \hat{S}^3, \nonumber \\ -\mathcal{L}_{soft} & = &\Bigg[A_{\lambda}\lambda S H_u \cdot H_d + \frac{1}{3} A_{\kappa} \kappa S^3+B_\mu \mu H_u\cdot H_d +h.c.\Bigg] \nonumber \\ & & + m^2_{H_u}|H_u|^2 + m^2_{H_d}|H_d|^2 + m^2_{s}|S|^2, \end{eqnarray} where $H_u$, $H_d$, and $S$ denote the Higgs superfields' scalar components. Throughout this work, the $B_{\mu}$ term is set to be zero since it plays a minor role in this study and the supersymmetry-breaking mass parameters, $m^2_{H_u}$, $m^2_{H_d}$, and $m^2_{s}$, are fixed by solving the conditional equations to minimize the scalar potential. The Higgs sector is then described by parameters $\lambda$, $\kappa$, $A_\lambda$, $A_\kappa$, $\mu$, and the Higgs fields' vacuum expectation values (vevs) $\left\langle H_u^0 \right\rangle = v_u/\sqrt{2}$, $\left\langle H_d^0 \right\rangle = v_d/\sqrt{2}$, and $\left\langle S \right\rangle = v_s/\sqrt{2}$ with $v = \sqrt{v_u^2+v_d^2}\simeq 246~\mathrm{GeV}$. The ratio of the vevs $\tan{\beta} \equiv v_u/v_d$ and $\mu_{eff} \equiv \lambda v_s/\sqrt{2}$ are chosen as input parameters. Concerning the Higgs sector, it is convenient to work with the field combinations $H_{\rm SM} \equiv \sin \beta Re[H_u^0] + \cos \beta Re [H_d^0]$, $H_{\rm NSM} \equiv \cos \beta Re [H_u^0] - \sin \beta Re [H_d^0]$, and $A_{\rm NSM} \equiv \cos \beta Im [H_u^0] - \sin \beta Im [H_d^0]$~\cite{miller2004,Cao:2012fz}, where $H_{\rm SM}$ represents the Higgs field in the SM with the vev $v/\sqrt{2}$, $H_{\rm NSM}$ denotes the other CP-even doublet Higgs field with a vanishing vev, and $A_{\rm NSM}$ corresponds to the CP-odd Higgs boson in the MSSM. In the bases ($H_{\rm NSM}$, $H_{\rm SM}$, $Re [S]$), the elements of the CP-even Higgs fields' squared mass matrix are formulated as~\cite{Hollik:2020plc} \begin{eqnarray} {\cal M}^2_{S, 11}&=& \frac{2 \mu_{eff} (\lambda A_\lambda + \kappa \mu_{eff})}{\lambda \sin 2 \beta} + \frac{1}{2} (2 m_Z^2- \lambda^2v^2)\sin^22\beta, \nonumber \\ {\cal M}^2_{S, 12}&=&-\frac{1}{4}(2 m_Z^2-\lambda^2v^2)\sin4\beta, \nonumber \\ {\cal M}^2_{S, 13}&=&-\frac{1}{\sqrt{2}} ( \lambda A_\lambda + 2 \kappa \mu_{eff}) v \cos 2 \beta, \nonumber \\ {\cal M}^2_{S, 22}&=&m_Z^2\cos^22\beta+ \frac{1}{2} \lambda^2v^2\sin^22\beta,\nonumber \\ {\cal M}^2_{S, 23}&=& \frac{v}{\sqrt{2}} \left[2 \lambda \mu_{eff} + 2 \lambda \mu - (\lambda A_\lambda + 2 \kappa \mu_{eff}) \sin2\beta \right], \nonumber \\ {\cal M}^2_{S, 33}&=& \frac{\lambda A_\lambda \sin 2 \beta}{4 \mu_{eff}} \lambda v^2 + \frac{\mu_{eff}}{\lambda} (\kappa A_\kappa + \frac{4 \kappa^2 \mu_{eff}}{\lambda} ) - \frac{\lambda \mu}{2 \mu_{eff}} \lambda v^2, \label{Mass-CP-even-Higgs} \end{eqnarray} and in the bases ($A_{\rm NSM}$, $Im [S]$), those for CP-odd Higgs fields are given by \begin{eqnarray} {\cal M}^2_{P,11}&=& \frac{2 \mu_{eff} (\lambda A_\lambda + \kappa \mu_{eff})}{\lambda \sin 2 \beta}, \nonumber \\ {\cal M}^2_{P,22}&=& \frac{(\lambda A_\lambda + 4 \kappa \mu_{eff}) \sin 2 \beta }{4 \mu_{eff}} \lambda v^2 - \frac{3 \mu_{eff}}{\lambda} \kappa A_\kappa - \frac{\lambda \mu}{2 \mu_{eff}} \lambda v^2, \nonumber \\ {\cal M}^2_{P,12}&=& \frac{v}{\sqrt{2}} ( \lambda A_\lambda - 2 \kappa \mu_{eff}). \label{Mass-CP-odd-Higgs} \end{eqnarray} Three CP-even Higgs mass eigenstates $h_i=\{h,H,h_{\rm s}\}$ and two CP-odd Higgs mass eigenstates $a_i=\{A_H, A_{\rm s}\}$ are then obtained by \begin{eqnarray} h_i & = & V_{h_i}^{\rm NSM} H_{\rm NSM}+V_{h_i}^{\rm SM} H_{\rm SM}+V_{h_i}^{\rm S} Re[S], \nonumber \\ a_i & = & U_{a_i}^{\rm NSM} A_{\rm NSM}+ U_{a_i}^{\rm S} Im [S], \end{eqnarray} where $V$ and $U$ are unitary matrices used to diagonalize $\mathcal{M}^2_S$ and $\mathcal{M}^2_P$, respectively. The model also predicts a pair of charged Higgs bosons, $H^\pm = \cos \beta H_u^\pm + \sin \beta H_d^\pm$, and their masses take the following simple form: \begin{eqnarray} m^2_{H_{\pm}} = \frac{2\mu_{\rm eff}}{\sin 2 \beta} \left(\frac{\kappa}{\lambda}\mu_{\rm eff} + A_{\lambda}\right) + m^2_W -\lambda^2 v^2. \end{eqnarray} In this study, the following properties of the Higgs bosons are utilized: \begin{itemize} \item $h$ corresponds to the scalar discovered at the LHC. The LHC Higgs data have restricted $\sqrt{\left (V_h^{\rm NSM} \right )^2 + \left ( V_h^{\rm S} \right )^2} \lesssim 0.1$ and $|V_h^{\rm SM}| \sim 1$. Furthermore, from theoretical points of view, its mass may be significantly affected by the interaction $\lambda\,\hat{s}\,\hat{H}_u \cdot \, \hat{H}_d$, the singlet-doublet Higgs mixing as well as the radiative correction from top/stop loops~\cite{Hall:2011aa,Ellwanger:2011aa,Cao:2012fz}. \item $H$ and $A_H$ are $H_{\rm NSM}$- and $A_{\rm NSM}$-dominated states. They are approximately degenerate in mass with the charged Higgs bosons if they are significantly heavier than $v$. The LHC search for extra Higgs bosons, the measured property of $h$, and the indirect constraints from $B$-physics prefer $m_{H}, m_{A_H} \gtrsim 200~{\rm GeV}$~\cite{Baum:2019uzg} when the alignment condition is satisfied~\cite{Carena:2013ooa,Carena:2015moc}. It is worth noting that, although $H$ of several hundreds of GeV may play a significant role in the DM-nucleon scattering discussed below in specific situations~\cite{Huang:2014xua}, its contribution to the scattering is usually far below current DD experimental sensitivities\footnote{The $H$-mediated contribution to the scattering is proportional to $\tan^2 \beta/m_H^4$, and its typical size is $10^{-49}~{\rm cm^2}$ for $\tan \beta \leq 5$ (see, e.g., Figure 6 in~\cite{Baum:2017enm}). With the increase of $\tan \beta$, the lower bound of $m_H$ increases rapidly to satisfy the constraints from the LHC search for extra Higgs bosons (see, e.g., Figure 2 in~\cite{Aad:2020zxo} for the MSSM results.). Therefore, the contribution is difficult to reach $10^{-47}~{\rm cm^2}$.}. Thus, only the case where $H$ and $A_H$ are above $1~{\rm TeV}$ is considered in this paper to simplify the analysis of DM phenomenology. This case is a theoretical hypothesis, and it can be realized by simply setting $A_\lambda$ a significant value, e.g., $A_\lambda = 2~{\rm TeV}$ in the following numerical study. It does not change essentially the conclusions of this paper. \item $h_s$ and $A_s$ are mainly composed of the singlet field. They may be moderately light (e.g., several tens of GeV) without conflicting with any collider constraints. As will be shown below, they play important roles in DM physics. \item In the case of massive charged Higgs bosons, the following approximations hold~\cite{Baum:2017enm}: \begin{eqnarray} m_{h_s}^2 & \simeq & {\cal M}^2_{S, 33} - \frac{{\cal M}^4_{S, 13}}{{\cal M}^2_{S, 11} - {\cal M}^2_{S, 33}}, \quad m_{A_s}^2 \simeq {\cal M}^2_{P, 22} - \frac{{\cal M}^4_{P, 12}}{{\cal M}^2_{P, 11} - {\cal M}^2_{P, 22}}, \\ \frac{V_{h}^{\rm S}}{V_h^{\rm SM}} & \simeq & \frac{{\cal M}^2_{S, 23}}{m_h^2 - {\cal M}^2_{S, 33}}, \quad V_{h}^{\rm NSM} \sim 0, \quad V_h^{\rm SM} \simeq \sqrt{1 + \left ( \frac{V_{h}^{\rm S}}{V_h^{\rm SM}} \right )^2} \sim 1, \nonumber \\ \frac{V_{h_s}^{\rm SM}}{V_{h_s}^{\rm S}} & \simeq & \frac{{\cal M}^2_{S, 23}}{m_{h_s}^2 - m_h^2}, \quad V_{h_s}^{\rm NSM} \sim 0, \quad V_{h_s}^{\rm S} \simeq \sqrt{1 + \left ( \frac{V_{h_s}^{\rm SM}}{V_{h_s}^{\rm S}} \right )^2 } \sim 1, \quad U_{A_s}^{\rm S} \simeq 1. \nonumber \end{eqnarray} \end{itemize} It is emphasized that the mass matrices $\mathcal{M}^2_S$ and $\mathcal{M}^2_P$ differ from their corresponding ones in the $Z_3$-NMSSM by additional $\mu$-induced contributions. These contributions are sometimes vital in this study, e.g., a positively considerable $\mu$ can significantly reduce the mass of $h_s$ and $A_s$ so that they may act as the annihilation product of moderately light DM. The neutralino sector comprises a Bino field $\tilde{B}^0$, a Wino field $\tilde{W}^0$, Higgsino fields $\tilde{H}_{d}^0$ and $\tilde{H}_u^0$, and a Singlino field $\tilde{S}^0$. In the bases $\psi^0 = (-i \tilde{B}^0, - i \tilde{W}^0, \tilde{H}_{d}^0, \tilde{H}_{u}^0, \tilde{S}^0)$, the symmetric neutralino mass matrix is given by~\cite{Ellwanger:2009dp} \begin{equation} {\cal M} = \left( \begin{array}{ccccc} M_1 & 0 & -m_Z \sin \theta_W \cos \beta & m_Z \sin \theta_W \sin \beta & 0 \\ & M_2 & m_Z \cos \theta_W \cos \beta & - m_Z \cos \theta_W \sin \beta &0 \\ & & 0 & -\mu_{tot} & - \frac{1}{\sqrt{2}} \lambda v \sin \beta \\ & & & 0 & -\frac{1}{\sqrt{2}} \lambda v \cos \beta \\ & & & & \frac{2 \kappa}{\lambda} \mu_{eff} \end{array} \right), \label{eq:MN} \end{equation} where $M_1$ and $M_2$ are gaugino soft breaking masses and $\mu_{tot} \equiv \mu_{eff} + \mu$. It can be diagonalized by a rotation matrix $N$, and, subsequently, the mass eigenstates labeled in mass-ascending order are \begin{eqnarray} \tilde{\chi}_i^0 = N_{i1} \psi^0_1 + N_{i2} \psi^0_2 + N_{i3} \psi^0_3 + N_{i4} \psi^0_4 + N_{i5} \psi^0_5. \end{eqnarray} Evidently, $N_{i3}$ and $N_{i4}$ characterize the $\tilde{H}_d^0$ and $\tilde{H}_u^0$ components in $\tilde{\chi}_i^0$, and $N_{i5}$ denotes the Singlino component. We add that the Higgsino mass and Singlino mass in the GNMSSM are determined by $\mu_{tot}$ and $\mu_{eff}$, respectively. As a result, $|2 \kappa/\lambda|$ may be much larger than 1 in obtaining Singlino-dominated DM, which is the starting point of this work. In addition, there is one more input parameter to describe the Singlino-Higgsino mixing system than in the case of the $Z_3$-NMSSM. These characteristics distinguish the GNMSSM from the $Z_3$-NMSSM, which, as introduced previously, has important implications in DM physics. In the case of very massive gauginos and $|m_{\tilde{\chi}_1^0}^2 - \mu_{tot}^2 | \gg \lambda^2 v^2$, the following approximations for the Singlino-dominated $\tilde{\chi}_1^0$~\cite{Cheung:2014lqa,Badziak:2015exr,Badziak_2017} are obtained: \begin{eqnarray} \frac{2 \kappa}{\lambda} \mu_{eff} & \simeq & m_{\tilde{\chi}_1^0} - \frac{1}{2} \frac{\lambda^2 v^2 ( m_{\tilde{\chi}_1^0} - \mu_{tot} \sin 2 \beta )}{m_{\tilde{\chi}_1^0}^2 - \mu_{tot}^2}, \quad N_{11} \sim 0, \quad N_{12} \sim 0, \label{Neutralino-Mixing} \\ \frac{N_{13}}{N_{15}} &= & \frac{\lambda v}{\sqrt{2} \mu_{\rm tot}} \frac{(m_{\tilde{\chi}_1^0}/\mu_{\rm tot})\sin\beta-\cos\beta} {1-\left(m_{\tilde{\chi}_1^0}/\mu_{\rm tot}\right)^2}, \quad \quad \frac{N_{14}}{N_{15}} = \frac{\lambda v}{\sqrt{2} \mu_{\rm tot}} \frac{(m_{\tilde{\chi}_1^0}/\mu_{\rm tot})\cos\beta-\sin\beta} {1-\left(m_{\tilde{\chi}_1^0}/\mu_{\rm tot}\right)^2}, \nonumber \\ N_{15}^2 & \simeq & \left(1+ \frac{N^2_{13}}{N^2_{15}}+\frac{N^2_{14}}{N^2_{15}}\right)^{-1} \nonumber \\ &= & \frac{\left[1-(m_{\tilde{\chi}_1^0}/\mu_{\rm tot})^2\right]^2}{\left[(m_{\tilde{\chi}_1^0}/\mu_{\rm tot})^2 -2(m_{\tilde{\chi}_1^0}/\mu_{\rm tot})\sin2\beta+1 \right]\left(\frac{\lambda v}{\sqrt{2}\mu_{\rm tot}}\right)^2 +\left[1-(m_{\tilde{\chi}_1^0}/\mu_{\rm tot})^2\right]^2}. \nonumber \end{eqnarray} These approximations imply the relation \begin{eqnarray} \frac{Z_h}{Z_s} &= & \left(\frac{\lambda v}{\sqrt{2} \mu_{\rm tot}}\right)^{\!\!2} \frac{\left(m_{\tilde{\chi}_1^0}/\mu_{\rm tot}\right)^2-2{(m_{\tilde{\chi}_1^0}}/{\mu_{\rm tot}})\sin2\beta+1} {\left[1-\left({m_{\tilde{\chi}_1^0}}/{\mu_{\rm tot}}\right)^2\right]^2}, \end{eqnarray} where $Z_h \equiv N_{13}^2+N_{14}^2$ and $Z_s \equiv N_{15}^2$ represent the Higgsino and Singlino fractions in $\tilde{\chi}_1^0$, respectively, and $Z_s > 0.5$ for the Singlino-dominated $\tilde{\chi}_1^0$. They also show that, for fixed $\tan \beta$, the Higgsino compositions in $\tilde{\chi}_1^0$ depend only on $\lambda$, $\mu_{tot}$, and $m_{\tilde{\chi}_1^0}$. In studying the $\tilde{\chi}_1^0$'s properties, it is usually convenient to take the three parameters and $\kappa$ as theoretical inputs. In this work, the following interactions are crucial: \begin{eqnarray} C_{\tilde {\chi}^0_1 \tilde {\chi}^0_1 h_i } & = & V_{h_i}^{\rm SM} C_{\tilde {\chi}^0_1 \tilde {\chi}^0_1 H_{\rm SM} }+V_{h_i}^{\rm NSM} C_{\tilde {\chi}^0_1 \tilde {\chi}^0_1 H_{\rm NSM} }+V_{h_i}^{\rm S} C_{\tilde {\chi}^0_1 \tilde {\chi}^0_1 Re[S] } \nonumber \\ & \simeq & \sqrt{2}\lambda \left[ V_{h_i}^{\rm SM} N_{15}\left(N_{13}\sin\beta+N_{14}\cos\beta\right) +V_{h_i}^{\rm NSM}N_{15}\left(N_{13}\cos\beta- N_{14}\sin\beta\right)\right] \nonumber \\ & & + \sqrt{2} V_{h_i}^{\rm S} \left(\lambda{N_{13}}{N_{14}}-\kappa N_{15}^2\right)\,, \label{C-hichi01chi01_S} \\ C_{\tilde {\chi}^0_1 \tilde {\chi}^0_1 a_i } & = & U_{a_i}^{\rm NSM}C_{\tilde {\chi}^0_1 \tilde {\chi}^0_1 A_{\rm NSM} }+ U_{a_i}^{\rm S}C_{\tilde {\chi}^0_1 \tilde {\chi}^0_1 Im[S] } \nonumber \\ & \simeq & - \sqrt{2} U_{a_i}^{\rm NSM}\lambda N_{15} ( N_{13}\cos\beta + N_{14}\sin\beta) + \sqrt{2} U_{a_i}^{\rm S} (\lambda N_{13}N_{14} - \kappa N_{15}^2), \label{C-aichi01chi01_S} \\ C_{\tilde {\chi}^0_1 \tilde {\chi}^0_1 Z } & = & \frac{m_Z}{v} ( N_{13}^2 - N_{14}^2), \quad \quad C_{\tilde {\chi}^0_1 \tilde {\chi}^0_1 G^0 } \simeq - \sqrt{2} \lambda N_{15} (N_{13} \sin \beta - N_{14}\cos \beta ), \label{C-Zchi01chi01} \\ C_{h_i A_s A_s} &\simeq& \lambda v\, V_{h_i}^{\rm SM} (\lambda + \kappa \sin2\beta) + \lambda \kappa v V_{h_i}^{\rm NSM} \cos2\beta + \sqrt{2} V_{h_i}^{S}( \sqrt{2} \kappa^2 v_s -\kappa A_\kappa). \label{eq:hiasas} \end{eqnarray} These expressions indicate that \begin{eqnarray} & & C_{ \tilde{\chi}_1^0 \tilde{\chi}_1^0 h_s} \sim - \sqrt{2}\kappa, \quad C_{\tilde{\chi}_1^0 \tilde{\chi}_1^0 A_s } \sim - \sqrt{2}\kappa, \quad C_{h_s A_s A_s} \sim \sqrt{2} ( \sqrt{2} \kappa^2 v_s -\kappa A_\kappa), \label{Coupling-size} \\ & & C_{h A_s A_s} \sim \lambda v (\lambda + \kappa \sin2\beta), \quad C_{H A_s A_s} \sim \lambda \kappa v, \quad |C_{h_s A_s A_s}| \gg |C_{h A_s A_s}|, |C_{H A_s A_s}|. \nonumber \end{eqnarray} and the other interactions are suppressed. \subsection{DM Relic Density } In the GNMSSM, Singlino-dominated DM could achieve the measured abundance by the processes $\tilde{\chi}_1^0 \tilde{\chi}_1^0 \to h_s A_s, t \bar{t}$, or its co-annihilation with one or more slightly heavier states, such as the next-to-lightest neutralino $\tilde{\chi}_2^0$, the lightest chargino $\tilde{\chi}_1^\pm$, or sleptons. Under a non-relativistic approximation, the thermally averaged cross-section of DM pair annihilation can be expanded as~\cite{Jungman1995Supersymmetric,griest1991three} \begin{equation} \label{thermalcs} \left\langle \sigma_Av \right\rangle = a + b\left\langle v^2 \right\rangle + \mathcal{O}(\left\langle v^4 \right\rangle) \approx a + 6 \frac{b}{x} \end{equation} where $a$ and $b$ correspond to the s- and p-wave contributions of the process, respectively, and $x\equiv m_{\tilde{\chi}_1^0}/T$ with $T$ denoting the temperature in the early Universe. After integrating the density function from $x_F=m/T_F$ at freeze-out temperature to infinity, the present relic density can be expressed as~\cite{Baum:2017enm} \begin{eqnarray}\label{density} \Omega h^2 = 0.12\left(\frac{80}{g_*}\right)^{1/2}\left(\frac{x_F}{25}\right) \left( \frac{2.3\times 10^{-26} \mathrm{cm^3/s}}{\langle \sigma v\rangle_{x_F}}\right)\;, \label{density} \end{eqnarray} where $g_*\sim 80$ is the number of effectively relativistic degrees of freedom, and $x_F\sim 25$ is obtained by solving the freeze-out equation in~\cite{griest1991three}. The key features of these annihilations are shown in the following. 1. $\tilde{\chi}_1^0 \tilde{\chi}_1^0 \to h_s A_s$ This process proceeds through the $s$-channel exchange of $Z$ and CP-odd Higgs bosons, and the $t$-channel exchange of neutralinos. Consequently, $\langle \sigma v \rangle_{x_F}^{h_s A_s} $ is given by~\cite{Baum:2017enm,griest1991three} \begin{eqnarray} \label{eq:sigvPhiPhi} \left\langle \sigma v \right\rangle_{x_F}^{h_s A_s} \simeq && \frac{1}{64 \pi m_{\tilde{\chi}_1^0}^2} \left\{ \left[1-\frac{\left(m_{h_s} + m_{A_s}\right)^2}{4 m_{\tilde{\chi}_1^0}^2}\right] \left[1-\frac{\left(m_{h_s} - m_{A_s}\right)^2}{4 m_{\tilde{\chi}_1^0}^2}\right] \right\}^{1/2} | {\cal{A}}_s + {\cal{A}}_t |^2, \nonumber \end{eqnarray} where the $s$- and $t$-channel contributions are approximated by \begin{eqnarray} {\cal{A}}_s &\simeq & \frac{-2 m_{\tilde{\chi}_1^0} C_{\tilde {\chi}^0_1 \tilde {\chi}^0_1 A_s } C_{h_s A_s A_s}}{m_{A_s}^2 - 4 m_{\tilde{\chi}_1^0}^2}, \nonumber \\ {\cal{A}}_t &\simeq & - 2 C_{\tilde{\chi}_1^0\tilde{\chi}_1^0 h_s} \, C_{\tilde{\chi}_1^0\tilde{\chi}_1^0 A_s} \left[ 1 + \frac{ 2 m_{A_s}^2}{ 4 m_{\tilde{\chi}_1^0}^2 - \left(m_{h_s}^2 + m_{A_s}^2\right) } \right], \end{eqnarray} respectively, if there are no resonant contributions. With the formulae from Eqs.(\ref{C-hichi01chi01_S})--(\ref{Coupling-size}), one can learn that, once the involved particles' masses are fixed, the density is mainly determined by the parameter $\kappa$. The authors of Ref.~\cite{Baum:2017enm} estimated the value of $\kappa$ to predict the density, and concluded that \begin{eqnarray} |\kappa| \sim 0.15 \times \left ( \frac{m_{\tilde{\chi}_1^0}}{300~{\rm GeV}} \right )^{1/2} \end{eqnarray} in the case of $|{\cal{A}}_t| \gg |{\cal{A}}_s|$. 2. $\tilde{\chi}_1^0 \tilde{\chi}_1^0 \to t \bar{t}$ This annihilation is mediated by the s-channel exchange of $Z$ and Higgs bosons. Owing to the largeness of top quark mass, its amplitude is mainly contributed by the longitudinal polarization of the $Z$ boson when the mediators of the Higgs bosons are far off-shell. As a result, $\langle \sigma v \rangle_{x_F}^{t \bar{t}}$ is approximated by~\cite{Baum:2017enm} \begin{eqnarray} \label{eq:gxxGforOmega} \langle \sigma v \rangle_{x_F}^{t\bar{t}} \sim 2 \times 10^{-26}\,\frac{{\rm cm}^3}{{\rm s}} \left( \frac{\left|C_{\tilde{\chi}_1^0 \tilde{\chi}_1^0 G^0}\right|}{0.1} \right)^2 \left( \frac{m_{\tilde{\chi}_1^0} }{300\,{\rm GeV}}\right)^{-2}, \end{eqnarray} where \begin{eqnarray} \label{eq:xsxsG} C_{\tilde{\chi}_1^0 \tilde{\chi}_1^0 G^0} &\simeq & - \sqrt{2} \lambda N_{15} \left( N_{13} s_\beta - N_{14} c_\beta \right) \simeq \frac{\lambda^2 v}{\mu_{tot}} \frac{Z_s(m_{\tilde{\chi}_1^0}/\mu_{tot})\cos2\beta}{1-(m_{\tilde{\chi}_1^0}/\mu_{tot})^2}. \end{eqnarray} These formulae reflect that a moderately large $\lambda$ is needed to account for the density. As will be shown below, this situation usually leads to sizable DM-nucleon scattering rates. 3. Co-annihilation with Higgsino-dominated electroweakinos This annihilation affects the abundance when the mass splitting between $\tilde{\chi}_1^0$ and the Higgsino-dominated electroweakinos is less than approximately $10\%$~\cite{griest1991three,Coannihilation}. In this case, $\sigma$ in Eq.(\ref{density}) should be replaced by $\sigma_{eff}$ given by \begin{eqnarray} \sigma_{eff} &&= \sum^N_{a,b}\sigma_{ab}\frac{g_ag_b}{g^2_{eff}}(1+\Delta_a)^{3/2}(1+\Delta_b)^{3/2}\times exp[-x(\Delta_a+\Delta_b)]. \label{Co-annihilation experession} \end{eqnarray} In this formula, $\sigma_{ab}$ is the cross-section of the annihilation $a b \to X Y$ with $a, b = \tilde{\chi}_1^0, \tilde{\chi}_2^0, \tilde{\chi}_1^\pm, \cdots$ and $X, Y$ denoting any possible final states, $\Delta_i \equiv (m_i - m_{\tilde{\chi}_1^0})/m_{\tilde{\chi}_1^0}$ ($i=a, b$) represents the mass splitting between $\tilde{\chi}_1^0$ and the initial state $i$, and $x \equiv m_{\tilde{\chi}_1^0}/T$. $g_i$ denotes the internal degrees of freedom for the initial state $i$, which is 2 for a Majorana fermion and 4 for a Dirac fermion, and $g_{eff}$ is defined by \begin{eqnarray} g_{eff} \equiv \sum^N_{a} g_a(1+\Delta_a)^{3/2}exp(-x\Delta_a). \end{eqnarray} It is evident that $\sigma_{eff}$ decreases monotonously as the co-annihilating particles depart from $\tilde{\chi}_1^0$ in mass. Finally, the annihilations $\tilde{\chi}_1^0 \tilde{\chi}_1^0 \to h A_s, h_s h_s$ are briefly discussed. The former process proceeds in a similar way as $\tilde{\chi}_1^0 \tilde{\chi}_1^0 \to h_s A_s$. From the expressions of $ C_{\tilde{\chi}_1^0 \tilde{\chi}_1^0 h}$ and $C_{h A_s A_s}$ and the fact that $C_{\tilde{\chi}_1^0 \tilde{\chi}_1^0 h_s} \gg C_{\tilde{\chi}_1^0 \tilde{\chi}_1^0 h}$ and $C_{h_s A_s A_s} \gg C_{h A_s A_s}$ in most cases, one can conclude that the abundance is significantly affected only when $\lambda$ and $V_h^S$ are tremendously large. This condition, however, has been tightly limited by the XENON-1T and LHC experiments. Process $\tilde{\chi}_1^0 \tilde{\chi}_1^0 \to h_s h_s$ proceeds by the s-channel exchange of the CP-even Higgs bosons and the t-channel exchange of the neutralinos. It is a p-wave process~\cite{Griest:1989zh}, so its effect on the abundance becomes crucial only when $\kappa$ is large and $\tilde{\chi}_1^0 \tilde{\chi}_1^0 \to h_s A_s$ is phase-space-suppressed. This situation happens only in some corners of the theory's parameter space. \subsection{DM-nucleon scattering cross-sections} In the limit of very massive squarks, the SD scattering of $\tilde{\chi}_1^0$ with nucleons is mediated by a $Z$ boson. The scattering cross-section is then given by~\cite{Badziak:2015exr,Badziak_2017} \begin{eqnarray} \label{eq:sigSD} \sigma_{\tilde{\chi}_1^0-N}^{\rm SD} & \simeq & C_N \times \left(\frac{N_{13}^2-N_{14}^2}{0.1}\right)^2, \end{eqnarray} where $C_p \simeq 4 \times 10^{-4}\rm~pb$ for protons and $C_n \simeq 3.1 \times 10^{-4}\rm~pb$ for neutrons, and \begin{eqnarray} \label{eq:N13N14diff} N_{13}^2-N_{14}^2 = \big( \frac{\lambda v}{\sqrt{2}\mu_{tot}} \big)^2 \, \frac{Z_s\cos2\beta} {1-(m_{\tilde{\chi}_1^0}/\mu_{tot})^2}, \end{eqnarray} from the formulae in Eq.(\ref{Neutralino-Mixing}). These expressions indicate that the SD cross-section is proportional to $(\lambda v/\mu_{tot})^4$ and it increases as $m_{\tilde{\chi}_1^0}$ approaches from below to $\mu_{tot}$. The SI scattering is mainly contributed by the $t$-channel exchange of the CP-even Higgs bosons. Correspondingly, the cross-section is given by~\cite{badziak2016blind,pierce2013neutralino} \begin{eqnarray} \label{SI-N} \sigma^{SI}_{\tilde {\chi}^0_1-{N}} = \frac{4 \mu_r^2}{\pi} |f^{(N)}|^2 , \label{SI-cross} \end{eqnarray} where $N=p, n$ denotes proton and neutron, respectively, and $\mu_r$ is the reduced mass of $\tilde{\chi}_1^0$ and nucleon given by $\mu_r \equiv m_N m_{\tilde {\chi}^0_1} /(m_N+m_{\tilde {\chi}^0_1})$. The effective couplings $f^{(N)}$ are \begin{eqnarray} \label{SI-fN} f^{(N)} = \sum_{h_i=\{h,H,h_{\rm s}\}} \!f^{(N)}_{h_i} = \sum_{h_i=\{h,H,h_{\rm s}\}}\! \frac{C_{ \tilde {\chi}^0_1 \tilde {\chi}^0_1 h_i} C_{N N h_i }}{2m^2_{h_i} }, \end{eqnarray} where $C_{ N N h_i}$ represents the $h_i$-nucleon coupling, which is given by \begin{eqnarray} \label{C-hNN_S} C_{NN h_i} = -\frac{m_N}{v} \left[ F^{(N)}_d \left( V_{h_i}^{\rm SM}- \tan\beta V_{h_i}^{\rm NSM}\right)+F^{(N)}_u \left(V_{h_i}^{\rm SM}+\frac{1}{\tan\beta} V_{h_i}^{\rm NSM} \right) \right]\,, \end{eqnarray} with $F^{(N)}_d \equiv f^{(N)}_d+f^{(N)}_s+\frac{2}{27}f^{(N)}_G$ and $F^{(N)}_u \equiv f^{(N)}_u+\frac{4}{27}f^{(N)}_G$. The nucleon form factors $f^{(N)}_q =m_N^{-1}\left<N|m_qq\bar{q}|N\right>$ for $q=u,d,s$ represent the normalized light quark contribution to nucleon mass, and $f^{(N)}_G=1-\sum_{q=u,d,s}f^{(N)}_q$ denotes other heavy quarks' mass fraction in the nucleon~\cite{Drees1993,Drees1992}. For the default settings of the package micrOMEGAs about $f_q^{N}$~\cite{Belanger_2009,Alarcon:2011zs,Alarcon:2012nr}, $F_u^{p} \simeq F_u^n \simeq 0.15$ and $F_d^{p} \simeq F_d^n \simeq 0.13$. Consequently, one can conclude that $\sigma^{SI}_{\tilde {\chi}^0_1-p} \simeq \sigma^{SI}_{\tilde {\chi}^0_1-n}$. In the case of very massive charged Higgs bosons, $V_h^{\rm NSM} \sim 0$, $V_{h_s}^{\rm NSM} \sim 0$, and the $H$-mediated contribution can be safely neglected since it is further suppressed by a factor $1/m_H^4$. Consequently, the SI cross-section is given by~\cite{cao:2021new-work} \begin{eqnarray} \sigma^{\rm SI}_{\tilde{\chi}_1^0-N} & \simeq & 5 \times 10^{-45}\,{\rm cm^2}~\left(\frac{\cal{A}}{0.1}\right)^2, \end{eqnarray} where \begin{eqnarray} {\cal{A}} = \left( \frac{125 \rm GeV}{m_{h}}\right)^2 V_h^{\rm SM} C_{ \tilde {\chi}^0_1 \tilde {\chi}^0_1 h} + \left( \frac{125 \rm GeV}{m_{h_s}} \right)^2 V_{h_s}^{\rm SM} C_{ \tilde {\chi}^0_1 \tilde {\chi}^0_1 h_{s}}~. \end{eqnarray} Furthermore, using the formulae from Eqs.(\ref{Neutralino-Mixing})--(\ref{eq:hiasas}), one may conclude that \begin{eqnarray} C_{\tilde {\chi}^0_1 \tilde {\chi}^0_1 h} & \simeq & \frac{\mu_{tot}}{ v}\,\big( \frac{\lambda v}{\mu_{tot}} \big)^2\, \frac { Z_s V_{h}^{\rm SM}(m_{\tilde{\chi}_1^0}/\mu_{tot} -\sin 2 \beta)}{1-(m_{\tilde{\chi}_1^0}/\mu_{tot})^2} + \frac{\lambda}{2 \sqrt{2}} \big( \frac{\lambda v}{\mu_{tot}} \big)^2 \frac{Z_s V_{h}^{\rm S} \sin2\beta}{\big[ 1-(m_{\tilde{\chi}_1^0}/\mu_{tot})^2 \big]}\nonumber \\ & & -\sqrt{2}\kappa Z_s V_h^{\rm S} \left[1+ \big( \frac{\lambda v}{\sqrt{2}\mu_{tot}} \big)^2\frac{1}{1-(m_{\tilde{\chi}_1^0}/\mu_{tot})^2} \frac{\mu_{eff}}{\mu_{tot}} \right], \label{C_xsxshsm} \\ C_{\tilde {\chi}^0_1 \tilde {\chi}^0_1 h_{s}} & \simeq & \frac{\mu_{tot}}{ v}\,\big( \frac{\lambda v}{\mu_{tot}} \big)^2\, \frac { Z_s V_{h_{s}}^{\rm SM}(m_{\tilde{\chi}_1^0}/\mu_{tot} -\sin 2 \beta)}{1-(m_{\tilde{\chi}_1^0}/\mu_{tot})^2} + \frac{\lambda}{2 \sqrt{2}} \big( \frac{\lambda v}{\mu_{tot}} \big)^2 \frac{Z_s V_{h_{s}}^{\rm S} \sin2\beta}{\big[ 1-(m_{\tilde{\chi}_1^0}/\mu_{tot})^2 \big]}\nonumber \\ & & -\sqrt{2}\kappa Z_s V_{h_{s}}^{\rm S} \left[1+ \big( \frac{\lambda v}{\sqrt{2} \mu_{tot}} \big)^2\frac{1}{1-(m_{\tilde{\chi}_1^0}/\mu_{tot})^2} \frac{\mu_{eff}}{\mu_{tot}} \right]. \label{C_xsxshs} \end{eqnarray} These formulae indicate that, if the LHC-discovered scalar is pure SM-like, i.e., $V_h^{\rm SM}=1$, $V_h^{\rm S}=0$, and $V_{h_s}^{\rm SM}=0$, the expression of ${\cal{A}}$ is simplified as \begin{eqnarray} {\cal{A}} = \left( \frac{125 \rm GeV}{m_{h}}\right)^2 \frac{\mu_{tot}}{v}\,\big( \frac{\lambda v}{\mu_{tot}} \big)^2\, \frac { Z_s (m_{\tilde{\chi}_1^0}/\mu_{tot} -\sin 2 \beta)}{1-(m_{\tilde{\chi}_1^0}/\mu_{tot})^2}. \end{eqnarray} To suppress the SI cross-section, either $\lambda$ is small or $m_{\tilde{\chi}_1^0}/\mu_{\rm tot} \simeq \sin2\beta$, which is called the blind-spot condition of the NMSSM~\cite{Badziak:2015exr, badziak2016blind}. However, if $h_s$ contains a sizable SM Higgs field component, e.g., $V_{h_s}^{\rm SM} > 0.1$, the $h_s$-mediated contribution may be crucial when $h_s$ is much lighter than $h$. This may drastically cancel the $h$-mediated contribution. In either case, the SI cross-section is usually dominated by the $h$-mediated contribution, and it is sensitive to the parameters $\lambda$ and $\mu_{tot}$. Note that this feature still holds when the $H$-mediated contribution is not negligibly small. Therefore, the DM direct detection experiments can tightly limit these two parameters. Finally, it is noticeable that $\kappa$ may also affect the cross-section significantly, but it occurs only when $\kappa \gg \lambda$ and $V_h^{\rm S}$ is sizable. This situation is different from that of the SD cross-section, which is insensitive to $\kappa$ in all cases. \section{Numerical Results} In this section, the characteristics of the Singlino-dominated DM are demonstrated by numerical results. A likelihood function is constructed for the nest sampling algorithm adopted in this work to guide sophisticated scans over the $\mu$NMSSM's parameter space~\cite{Feroz:2008xx,Feroz:2013hea}. The scanned samples are studied by statistical quantities such as the posterior probability density function (PDF) in Bayesian statistics and the profile likelihood (PL) in frequency statistics. The former reflects the preference of the obtained samples to the input parameters, and the latter, however, represents the theory's capability to explain experimental data. These statistical quantities have been introduced concisely in~\cite{Fowlie:2016hew} and are applied to scrutinize the phenomenology of the NMSSM's seesaw extensions~\cite{Cao:2019qng,cao2019bayesian,Cao:2019aam}. \subsection{Research Strategy} \begin{table} \centering \begin{tabular}{|c|c|c|c|c|c|} \hline Parameter & Value & Parameter & Value & Parameter & Value \\ \hline $A_{\lambda}$ & $2 \mathrm{TeV}$ & $m_{\tilde{q}}$ & $2 \mathrm{TeV}$ & $m_{\tilde{l}}$ & $2 \mathrm{TeV}$ \\ $M_{1}$ & $3 \mathrm{TeV}$ & $M_{2}$ & $3 \mathrm{TeV}$ & $M_{3}$ & $3 \mathrm{TeV}$ \\ \hline \end{tabular} \caption{Setting of different fields' soft-breaking parameters. $A_\lambda$, $m_{\tilde{q}}$, $m_{\tilde{l}}$, and $M_i$ (i=1,2,3) are for Higgs, squarks, sleptons, and different gaugino fields, respectively. \label{tab:tab1}} \end{table} The following likelihood function is taken: \begin{eqnarray} \mathcal{L}= \mathcal{L}_{\Omega h^2} \times \mathcal{L}_{DD} \times \mathcal{L}_{IDD} \times \mathcal{L}_{Higgs} \times \mathcal{L}_{B} \label{Likelihood} \end{eqnarray} where $\mathcal{L}_{\Omega h^2} $ is a Gaussian likelihood function for the measured DM abundance, $\mathcal{L}_{DD}$ encodes the upper bounds on the SI and SD cross-sections from the XENON-1T experiments~\cite{Aprile:2018dbl,Aprile:2019dbj}, and $\mathcal{L}_{IDD}$ incorporates the DM indirect search information of the Fermi-LAT experiment~\cite{Ackermann:2015zua,FermiLat}. $\mathcal{L}_{Higgs}$ includes a fit of the $h$'s property to corresponding data of the LHC by the code \textsf{HiggsSignal-2.2.3}~\cite{HiggsSignal}. It also includes the constraints from the direct search for extra Higgs bosons at the LEP, Tevatron, and LHC, which are implemented by the code \textsf{HiggsBounds-5.3.2}~\cite{HiggsBounds}. Finally, $\mathcal{L}_{B}$ takes a Gaussian form to describe the measured branching ratios of $B \to X_s \gamma$ and $B^0_s \to \mu^+ \mu^-$~\cite{Tanabashi:2018oca}. The concrete expression of $\mathcal{L}$ was given in our previous works~\cite{cao2019bayesian,Cao:2019aam}. The following parameter space is scanned: \begin{eqnarray} && 0<\lambda \leq 0.70,\quad |\kappa| \leq 0.70, \quad 1 \leq {\rm tan} \beta \leq 60, \quad |A_t| \leq 5~{\rm TeV}, \label{scan_range} \\ && 0 < \mu_{eff} \leq 500 ~{\rm GeV}, \quad 100~{\rm GeV} \leq |\mu_{tot}| \leq 500 ~{\rm GeV}, \quad |A_{\kappa}| \leq 1000 ~{\rm GeV}, \nonumber \end{eqnarray} by assuming the input parameters are flat distributed. Upper bounds are imposed on $\lambda$ and $\kappa$ to keep the theory perturbative up to the Grand Unification scale. $\mu_{eff}$, $\mu_{tot}$, and $A_\kappa$ are restricted within relatively narrow ranges to naturally break the electroweak symmetry, and the parameter $A_t$ is varied to include the critical radiative correction of the top-stop loops to Higgs mass. In addition, a lower bound is set on $|\mu_{tot}|$ by the LEP search for electroweakinos~\cite{Tanabashi:2018oca}. For the other less crucial parameters, their values are fixed as in Table~\ref{tab:tab1}. The package \textsf{SARAH-4.14.3}~\cite{Staub08060538,Staub12070906,Staub13097223,Staub2015exploring} was utilized to build the $\mu$NMSSM's model file, and the codes \textsf{SPheno-4.0.3}~\cite{Porod:2003um,Porod_2012} and \textsf{FlavorKit}~\cite{Porod:2014xia} were used to generate the particle spectrum and calculate low-energy flavor observables, respectively. The Singlino-dominated neutralino is assumed to be the sole DM candidate in the Universe and the observables in DM physics are computed with the package \textsf{MicrOMEGAs 5.0.4}~\cite{Belanger:2001fz,Belanger:2005kh,Belanger:2006is,belanger2010micromegas,Belanger:2013oya,barducci2017collider}. We consider $h \equiv h_1$ and $h \equiv h_2$ scenarios, where $h_1$ and $h_2$ denote the lightest and the next-to-lightest Higgs bosons. Details of each obtained sample are reported for further analysis. For example, all processes that affect the abundance are listed and their fractions to the total DM annihilation cross-section at the freeze-out temperature are presented. This information helps identify the dominant contribution to the abundance. \begin{table}[] \begin{center} \begin{tabular}{|c|c|c|c|c|} \hline & \multicolumn{2}{c|}{$h \equiv h_1$ scenario} & \multicolumn{2}{c|}{$h \equiv h_2$ scenario} \\ \hline Parameters & 1 $ \sigma$ & 2 $ \sigma$ & 1 $\sigma$ & 2 $\sigma$ \\ \hline $\lambda$ & 0.04 $\sim$ 0.24 & 0.02 $\sim$ 0.41 & 0.05 $\sim$ 0.18 & 0.03 $\sim$ 0.31 \\ \hline $\kappa$ & -0.25 $\sim$ 0.31 & -0.31 $\sim$ 0.41 & -0.17 $\sim$ 0.22 & -0.30 $\sim$ 0.30 \\ \hline $\tan{\beta}$ & 5.9 $\sim$ 23.3 & 4.7 $\sim$ 49.3 & 5.7 $\sim$ 12.1 & 5.1 $\sim$ 20.2 \\ \hline $\mu$ & 245 $\sim$ 420 & 163 $\sim$ 467 & 150 $\sim$ 319 & 51 $\sim$ 408 \\ \hline $\mu_{eff}$ & 29 $\sim$ 118 & 14 $\sim$ 253 & 33 $\sim$ 148 & 18 $\sim$ 298 \\ \hline $\mu_{tot}$ & 325 $\sim$ 475 & 255 $\sim$ 495 & 225 $\sim$ 425 & 136 $\sim$ 475 \\ \hline $A_{\kappa}$ & -375 $\sim$ 128 & -576 $\sim$ 397 & -652 $\sim$ 339 & -776 $\sim$ 534 \\ \hline $A_t$ & 3148 $\sim$ 4248 & 2849 $\sim$ 4448 & 2651 $\sim$ 4150 & -3845 $\sim$ 4550 \\ \hline $m_{\tilde{\chi}_1^0}$ & 240 $\sim $ 407 & 182 $\sim $ 466 & 181 $\sim$ 346 & 118 $ \sim $ 404 \\ \hline \end{tabular} \caption{One-dimensional 1$\sigma$ and 2$\sigma$ credible regions for input parameters in $h \equiv h_1$ and $h \equiv h_2$ scenarios, where $h$, $h_1$, and $h_2$ denote the SM-like Higgs boson and the lightest and next-to-lightest CP-even Higgs boson, respectively. Dimensional parameters are in units of {\rm GeV}.}\label{tab:tab2} \end{center} \end{table} \begin{table}[] \begin{center} \begin{tabular}{|c|c|c|c|} \hline \multicolumn{4}{|c|}{$h \equiv h_1$ scenario: lnZ = -65.79 $\pm$ 0.046 } \\ \hline $ \rm \quad \tilde{\chi}_1^0 \tilde{\chi}_1^0 \; \to \; h_s \; A_s$ & $\rm \quad \tilde{\chi}_1^0 \tilde{\chi}_1^0 \; \to \; t \; \bar{t}$ & $\rm \quad \; \, \tilde{\chi}_1^0 \tilde{\chi}_1^0 \; \to \; h_s \; h_s$ & Co-annihilation \\ \hline $88\%$ & $8\%$ & $3\%$ & $0.7\%$ \\ \hline \multicolumn{4}{|c|}{$h \equiv h_2$ scenario: lnZ = -68.23 $\pm$ 0.051} \\ \hline $ \rm \quad \tilde{\chi}_1^0 \tilde{\chi}_1^0 \; \to \; h_s \; A_s$ & $\rm \quad \tilde{\chi}_1^0 \tilde{\chi}_1^0 \; \to \; t \; \bar{t}$ & Co-annihilation & $h$-funnel \\ \hline $76\%$ & $12\%$ & $11.6\%$ & $0.3\%$ \\ \hline \end{tabular} \caption{Dominant annihilation channels and their normalized posterior probabilities for $h \equiv h_1$ and $h \equiv h_2$ scenarios. In obtaining the values in this table, each sample's most critical channel for the abundance was identified and sequentially used to classify the samples. The posterior probability densities of the same type of samples were then summed. }\label{tab:tab3} \end{center} \end{table} \subsection{Posterior probability density} In Bayesian statistics, the one-dimensional marginal posterior PDF $P(\theta)$ with $\theta$ being an input parameter is defined by integrating the posterior PDF over the other input parameters. This decides the one-dimensional $1\sigma$ ($2\sigma$) credible region by requiring that the region's posterior probability accounts for $68\%$ ($95\%$) of the total probability~\cite{Fowlie:2016hew}. In this study, each sample's posterior probability density is calculated by the nest sampling algorithm and the $1\sigma$ and $2 \sigma$ credible regions for the input parameters are determined. The results are presented in Table~\ref{tab:tab2}. Compared with the scanned region, one can learn that some parameters' favored range is reduced significantly. For example, $\lambda$ and $|\kappa|$ prefer the range $\lambda \lesssim 0.4 $ and $|\kappa| \lesssim 0.3 $ because, as mentioned above, it is more easily consistent with various DM measurements. In Table~\ref{tab:tab3}, dominant annihilation channels for the obtained samples and their posterior probability are listed. This table shows that $\tilde{\chi}_1^0 \tilde{\chi}_1^0 \to h_s A_s$ is the dominant channel for most cases, and $\tilde{\chi}_1^0 \tilde{\chi}_1^0 \to t \bar{t}$ is another popular channel. In contrast, the co-annihilation is vital only in rare cases in the $h\equiv h_1$ scenario. The characteristics of these channels were introduced in the preceding section. In the following, only several new features after elaborated analysis of the samples are listed. \begin{itemize} \item Any of $\tilde{\chi}_1^0 \tilde{\chi}_1^0 \to h_s A_s$, the co-annihilation, and the $h$-funnel can be fully responsible for the DM abundance. Compared with the first mechanism for the abundance, the latter two need a stricter condition, i.e., $|m_{\tilde{\chi}_1^0}| \simeq |\mu_{tot}|$ and $m_{\tilde{\chi}_1^0} \simeq m_h/2$, respectively. Therefore, their Bayesian evidence is relatively small\footnote{Bayesian evidence is usually defined by $Z(D|M) \equiv \int{P(D|O(M,\Theta)) P(\Theta|M) \prod d \Theta_i}$, where $P(\Theta|M)$ is the prior PDF of input parameters $\Theta = (\Theta_1,\Theta_2,\cdots)$ in model $M$ and $P(D|O(M, \Theta))\equiv \mathcal{L}(\Theta)$ is the likelihood function for observables $O$, which considers both theoretical predictions, $O(M, \Theta)$, and experimental data, $D$. Computationally, the evidence represents an average likelihood in the surveyed parameter space. It depends on the priors of the model's parameters. For different scenarios in a theory, the larger $Z$ is, the more readily it is for the corresponding scenario to agree with the data. The details of Bayesian evidence and its applications were presented in, e.g.,~\cite{Bayes}.}. \item Owing to the tight constraints of the XENON-1T experiments on $\lambda$, $\tilde{\chi}_1^0 \tilde{\chi}_1^0 \to t \bar{t}$ contributes to the total annihilation cross-section at the freeze-out temperature by less than $50\%$. This fact implies that, although $\tilde{\chi}_1^0 \tilde{\chi}_1^0 \to t \bar{t}$ is the most considerable contribution in some cases, it must be aided by other processes to achieve the correct abundance. \item Owing to its p-wave nature, $\tilde{\chi}_1^0 \tilde{\chi}_1^0 \to h_s h_s$ contributes to the abundance by, at most, $40\%$. This situation is quite similar to that of $\tilde{\chi}_1^0 \tilde{\chi}_1^0 \to t \bar{t}$. Furthermore, since $\tilde{\chi}_1^0 \tilde{\chi}_1^0 \to h_s h_s$ dominates over $\tilde{\chi}_1^0 \tilde{\chi}_1^0 \to h_s A_s$ only when the strict conditions of $ m_{\tilde{\chi}_1^0} > m_{h_s}$, $2 |m_{\tilde{\chi}_1^0}| \lesssim (m_{h_s} + m_{A_s})$ and $|\kappa| \gtrsim 0.3$ are satisfied, its evidence tends to be small. \end{itemize} The next object of focus is the Bayesian evidence for different scenarios. Our calculation shows that $\ln Z = - 65.79 \pm 0.046$ for the $h \equiv h_1$ scenario and $\ln Z = - 68.21 \pm 0.051$ for the $h \equiv h_2$ scenario. Since Jeffreys' scale defined by $ \delta \ln Z \equiv \ln (Z_{h_1}/ Z_{h_2})$~\cite{Jeffreys} is $2.42$, it is concluded that the considered experiments prefer the $h \equiv h_1 $ scenario slightly to the $h \equiv h_2$ scenario~\footnote{Given two scenarios to be compared together, Jeffreys' scale provides a calibrated spectrum of significance for the relative strength of the scenarios~\cite{Jeffreys}. For the application of the Jeffreys' scale in particle physics, see, for e.g.,~\cite{Feroz:2008wr}. }. One reason for this conclusion is that the latter scenario needs tuning of its parameter space to explain the $125{\rm GeV}$ Higgs data~\cite{Cao:2012fz}. Also compared in the present paper is the Bayesian evidence of the $\mu \neq 0$ and $\mu = 0$ cases (note that the $\mu = 0$ case corresponds to the $Z_3$-NMSSM), and it is found that the Jeffrey's-scale result is $8.05$. This result implies that the experiments strongly favor the $\mu \neq 0$ case because it is readily consistent with the DM experiments. Realizing that the evidence relies on the prior probability assumptions, it is recalculated by assuming that $\lambda$ and $\kappa$ are log-distributed and the other input parameters are flat-distributed. It is found that Jeffrey's scale changes only slightly after recalculation. Finally, the experimentally favored parameter space of the $\mu$NMSSM is compared with that of the $Z_3$-NMSSM, which was obtained in our recent work~\cite{cao:2021new-work}. It is found that they are quite different. The reason is, as mentioned before, that the additional parameter $\mu$ contributes to the Higgs and neutralino mass matrices, and, consequently, the DM physics differs significantly. \begin{figure*}[!t] \centering \resizebox{0.98\textwidth}{!}{ \includegraphics{Fig1-a.png} \includegraphics{Fig1-b.png} } \caption{Two-dimensional profile likelihood of function $\mathcal{L}_{\rm DM}$ in Eq.~(\ref{PL-DM}) for $h \equiv h_1$ scenario, which is projected onto $|\kappa| - \lambda$ and $|\mu_{tot}|- m_{\tilde{\chi}_1^0}$ planes of $\mu$NMSSM. Since $\chi^2_{\rm Best} \simeq 0$ for the best point (marked with a star symbol in figure), the boundaries for $1 \sigma$ (red solid line) and $2\sigma$ (white solid line) confidence intervals correspond to $\chi^2 \simeq 2.3$ and $\chi^2 \simeq 6.18$, respectively. Dotted-dashed line represents relation $2{\kappa}=\lambda$. Points around $m_{\tilde{\chi}_1^0} \simeq |\mu_{tot}|$ on right-hand panel obtained correct abundance by co-annihilation. This figure shows $\mu$NMSSM's parameter region that can well explain DM experiments. \label{Fig1}} \end{figure*} \begin{figure*}[t] \centering \resizebox{0.98\textwidth}{!}{ \includegraphics{Fig2-a.png} \includegraphics{Fig2-b.png} } \caption{Same as Figure~\ref{Fig1}, but for profile likelihood projected onto $\sigma_{\tilde{\chi}_1^0-p}^{\rm SI} - m_{\tilde{\chi}_1^0}$ and $\sigma_{\tilde{\chi}_1^0-n}^{\rm SD} - m_{\tilde{\chi}_1^0}$ plane. Red curve denotes latest XENON-1T's bound on SI and SD cross-section. \label{Fig2}} \end{figure*} \subsection{Profile likelihood of DM physics} The object of focus in this subsection is the theory's capability to explain the DM experiments. DM's two-dimensional (2D) PL is defined as \begin{eqnarray} \mathcal{L}_{\rm DM} (\Theta_A,\Theta_B)=\mathop{\max}_{\Theta_1,\cdots,\Theta_{A-1},\Theta_{A+1},\cdots, \Theta_{B-1}, \Theta_{B+1},\cdots} \left \{ \mathcal{L}_{\Omega h^2} \times \mathcal{L}_{DD} \times \mathcal{L}_{IDD} \right \} (\Theta), \label{PL-DM} \end{eqnarray} where $\Theta = (\Theta_1\equiv \lambda,\Theta_2 \equiv \kappa,\cdots)$ are the input parameters of $\mathcal{L}_{i}$ ($i = \Omega h^2, \cdots$), and the maximization is realized by varying the parameters other than $\Theta_A$ and $\Theta_B$. The $1\sigma$ ($2 \sigma$) confidence interval on the $\Theta_A - \Theta_B$ plane is determined by the criteria of $(\delta \chi^2 \equiv \chi^2 - \chi^2_{Best}) \leq 2.3$ ($\delta \chi^2 \leq 6.18$), where $\chi^2 \equiv -2 \ln {\mathcal{L}_{\rm DM}}(\Theta_A,\Theta_B)$ and $\chi^2_{Best}$ denotes the best point's $\chi^2$. Two subtleties about $\mathcal{L}_{\rm DM}(\Theta_A, \Theta_B)$ must be clarified. One is that it is completely different from the PL of the total likelihood function $\mathcal{L}$ in Eq.~(\ref{Likelihood}). Specifically, the $\chi^2$ of $\mathcal{L}$ is extremely dominated by the Higgs data fit, which contains 102 measurements in the code \textsf{HiggsSignal-2.2.3}~\cite{HiggsSignal}. Thus, studying the distribution of $\mathcal{L}(\Theta_A, \Theta_B)$ is roughly equivalent to performing a Higgs data fit on the $\Theta_A - \Theta_B$ plane, which has nothing to do with DM physics. The other subtlety is that some of the scanned samples may be in serious conflict with the Higgs data or B-physics measurements, although they coincide well with the DM experiments. Since $\mathcal{L}$ strongly disfavors these samples, they should be neglected. Therefore, only the following samples are considered in studying $\mathcal{L}_{\rm DM} (\Theta_A,\Theta_B)$. \begin{itemize} \item Its $p$ value in the Higgs data fit is larger than $0.05$, which implies that it coincides with the data at $95\%$ confidence level. \item It is consistent with the extra Higgs search results implemented in the code \textsf{HiggsBounds-5.3.2}. \item It accounts for the measurement of $Br(B \to X_s \gamma)$ and $Br(B_s^0 \to \mu^+ \mu^-)$ at $2 \sigma$ level~\cite{Tanabashi:2018oca}. \end{itemize} \begin{figure*}[t] \centering \resizebox{0.98\textwidth}{!}{ \includegraphics{Fig3-a.png} \includegraphics{Fig3-b.png} } \caption{Same as Figure~\ref{Fig1}, but for $h \equiv h_2$ scenario. \label{Fig3}} \end{figure*} \begin{figure*}[t] \centering \resizebox{0.98\textwidth}{!}{ \includegraphics{Fig4-a.png} \includegraphics{Fig4-b.png} } \caption{Same as Figure~\ref{Fig2}, but for $h \equiv h_2$ scenario. \label{Fig4}} \end{figure*} Using the refined samples, different 2D PL maps are shown in Figures \ref{Fig1} to \ref{Fig4}. Figure~\ref{Fig1} plots the credible interval (CI) on $|\kappa| - \lambda$ and $|\mu_{tot}|- m_{\tilde{\chi}_1^0}$ plane for the $h \equiv h_1$ scenario. This plot indicates that the theory can explain the DM experiments quite well when $ \lambda \lesssim 0.5$, $0.05 \lesssim |\kappa| \lesssim 0.5$, $m_{\tilde{\chi}_1^0} \gtrsim 140 ~{\rm GeV}$, and $|\mu_{tot}| \gtrsim 160~{\rm GeV}$. The best point locates at approximately $\lambda = 0.05$, $\kappa = 0.28$, $m_{\tilde{\chi}_1^0} = 350~{\rm GeV}$, and $\mu_{tot} = 450~{\rm GeV}$. Additionally, $2 |\kappa|/\lambda $ can be much larger than 1 to keep $\tilde{\chi}_1^0$ Singlino-dominated, which is one distinct feature of the $\mu$NMSSM. Figure~\ref{Fig2} shows the $1\sigma$ and $2\sigma$ CIs on the $\sigma_{\tilde{\chi}_1^0-p}^{\rm SI} - m_{\tilde{\chi}_1^0}$ and $\sigma_{\tilde{\chi}_1^0-n}^{\rm SD} - m_{\tilde{\chi}_1^0}$ planes. This plot indicates that the SI and SD cross-sections can be as low as $10^{-51}~{\rm cm^2}$ and $10^{-46}~{\rm cm^2}$, respectively, over a broad mass range of $\tilde{\chi}_1^0$. This conclusion comes from the fact that $\lambda$ can be small and the ratio $m_{\tilde{\chi}_1^0}/\mu_{tot}$ in Eqs.(\ref{C_xsxshsm})-(\ref{C_xsxshsm}) can be much less than 1. Figures~\ref{Fig3} and ~\ref{Fig4} are similar to Figures~\ref{Fig1} and ~\ref{Fig2}, except for the $h \equiv h_2$ scenario. Compared with the $h \equiv h_1$ scenario, this scenario has the following different characteristics. \begin{itemize} \item The CI on $|\kappa| - \lambda$ plane shrinks significantly. \item $m_{\tilde{\chi}_1^0}$ as low as $100~{\rm GeV}$ can explain the experiments. \item The best point locates at approximately $\kappa = 0.2$ and $m_{\tilde{\chi}_1^0} = 250~{\rm GeV}$. \end{itemize} In addition to the fact that the parameter space of the $h \equiv h_2$ scenario is relatively narrow to fit well with the Higgs data~\cite{Cao:2012fz}, another reason for the difference is that, since $h_s = h_1 $ is light, a moderately light $\tilde{\chi}_1^0$ can make the annihilation $\tilde{\chi}_1^0 \tilde{\chi}_1^0 \to h_s A_s$ occur. A detailed explanation of the PL figure, including how to plot it and understand it correctly, was presented in our previous works~\cite{Cao:2019qng,Cao:2019aam}. For the sake of brevity, it is not repeated here. Besides, the fact that the marginal posterior PDF and the PL differ significantly in their definitions is worth noting. Therefore, they are complementary to each other in describing the results of the present work. \subsection{Constraints from LHC search for electroweakinos} \begin{figure*}[t] \centering \resizebox{0.5\textwidth}{!}{ \includegraphics{Fig5.pdf} } \caption{Constraint from latest ATLAS analysis of di-lepton signal at 13-TeV LHC, which is shown on $|\mu_{tot} | -m_{\tilde{\chi}_1^0}$ plane. Analysis is concentrated on compressed mass spectra~\cite{Aad:2019qnd} and excludes the yellow-shaded region at $95\%$ confidence level when $\lambda = 0.01$ and $\tan \beta = 10$ are fixed. \label{Fig5}} \end{figure*} \begin{table}[] \resizebox{1\textwidth}{!} { \begin{tabular}{|c|c|c|c|c|} \hline & \multicolumn{3}{c|}{$\rm h \equiv h_1 $ Scenario} & $\rm h \equiv h_2 $ Scenario \\ \hline & Point $\rm \uppercase\expandafter{\romannumeral1}$ & Point $\rm \uppercase\expandafter{\romannumeral2}$ & Point $\rm \uppercase\expandafter{\romannumeral3}$ & Point $\rm \uppercase\expandafter{\romannumeral4}$ \\ \hline $\lambda$ & 0.026 & 0.227 & 0.038 & 0.077 \\ $\kappa$ & 0.236 & 0.328 & -0.212 & 0.199 \\ $\tan{\beta}$ & 9.750 & 6.698 & 9.454 & 8.092 \\ $\mu~(\rm GeV)$ & 322.6 & 243.8 & 226.7 & 291.3 \\ $\mu_{\rm tot}~(\rm GeV)$ & 335.0 & 331.9 & 248.0 & 338.2 \\ $A_{\kappa}~(\rm GeV)$ & -310.5 & -238.1 & 21.58 & -415.8 \\ $A_t~(\rm GeV)$ & 4244 & 4112 & 2999 & 2959 \\ \hline $m_{h_1}~(\rm GeV)$ & 125.2 & 125.2 & 125.1 & 93.67 \\ $m_{h_2}~(\rm GeV)$ & 134.8 & 203.9 & 233.3 & 125.2 \\ $m_{h_3}~(\rm GeV)$ & 835.3 & 1273 & 794.6 & 1053 \\ $m_{A_s}~(\rm GeV)$ & 326.9 & 310.6 & 86.62 & 388.4 \\ $m_{\tilde{\chi}_1^0}~(\rm GeV)$ & 228.6 & 249.2 & 236.7 & 255.4 \\ $m_{\tilde{\chi}_2^0}~(\rm GeV)$ & 343.5 & 343.2 & 254.5 & 386.7 \\ $m_{\tilde{\chi}_3^0}~(\rm GeV)$ & 345.4 & 345.5 & 258.0 & 348.7 \\ $m_{\tilde{\chi}_1^{\pm}}~(\rm GeV)$ & 344.6 & 340.7 & 255.7 & 387.8 \\ \hline $V_{h}^{\rm NSM}, V_{h}^{\rm SM}, V_{h}^{\rm S}$ & -0.20, -0.94, 0.30 & -0.30, -0.95, -0.06 & -0.21, -0.98, 0.02 & 0.01, 0.99, 0.17 \\ $V_{h_s}^{\rm NSM}, V_{h_s}^{\rm SM}, V_{h_s}^{\rm S}$ & -0.05, -0.29, -0.96 & -0.05, 0.08, -0.99 & -0.02, -0.01, -0.99 & 0.01, -0.17, 0.99 \\ $N_{13}, N_{14}, N_{15}$ & 0.01, -0.02, 0.99 & 0.14, -0.21, 0.97 & -0.17, -0.18, -0.97 & 0.04, -0.07, 0.99 \\ $N_{23}, N_{24}, N_{25}$ & -0.71, 0.71, 0.02 & 0.71, 0.71, 0.05 & -0.71, 0.71, 0.05 & -0.71, 0.70, 0.08 \\ $N_{33}, N_{34}, N_{35}$ & 0.71, 0.71, 0.01 & -0.69, 0.68, 0.25 & -0.69, -0.69, -0.25 & 0.71, 0.71, 0.02 \\ \hline $\Omega h^2$ & 0.125 & 0.125 & 0.131 & 0.124 \\ $\sigma^{SI}_{\tilde{\chi}_1^0 - p}(\rm cm^2)$ & $2.83 \times 10^{-48}$ & $2.59 \times 10^{-47}$ & $1.01 \times 10^{-47}$ & $6.36 \times 10^{-48}$ \\ $\sigma^{SD}_{\tilde{\chi}_1^0 - n}(\rm cm^2)$ & $2.47 \times 10^{-46}$ & $1.95 \times 10^{-41}$ & $5.49 \times 10^{-43}$ & $2.50 \times 10^{-44}$ \\ Annihilation processes & \begin{tabular}[c]{@{}c@{}}$\quad$\\ $\;\;\; 71\% \rm \;\; \tilde{\chi}_1^0 \tilde{\chi}_1^0 \; \to \; h_s \; A_s$ \\ $\;\;\; 20\% \rm \;\; \tilde{\chi}_1^0 \tilde{\chi}_1^0 \; \to \; h \;\;\, A_s $\\ $\;\; 7.4\% \rm \;\; \tilde{\chi}_1^0 \tilde{\chi}_1^0 \; \to \; h_s \; h_s$\\ $ 1.3\% \rm \; \; \tilde{\chi}_1^0 \tilde{\chi}_1^0 \; \to \; h \; h_s$\\ ......\end{tabular} & \begin{tabular}[c]{@{}c@{}}$\quad$\\ $34\% \rm \quad \tilde{\chi}_1^0 \tilde{\chi}_1^0 \; \to \; t \; \bar{t}$ \\ $\quad 33\% \rm \quad \tilde{\chi}_1^0 \tilde{\chi}_1^0 \; \to \; h_s \; A_s $\\ $\quad 27\% \rm \quad \tilde{\chi}_1^0 \tilde{\chi}_1^0 \; \to \; h_s \; h_s$\\ $\;\; 1.4\% \rm \quad \tilde{\chi}_1^0 \tilde{\chi}_1^0 \; \to \; h \; A_s$\\ $\qquad \ 1.1\% \rm \quad \tilde{\chi}_1^0 \tilde{\chi}_1^0 \; \to \; W^+ \; W^-$\\ ......\end{tabular} & \begin{tabular}[c]{@{}c@{}}$\quad$\\ $5.4\% \rm \quad \tilde{\chi}_2^0 \tilde{\chi}_1^\pm \; \to \; d \; \bar{u}$ \\ $5.4\% \rm \quad \tilde{\chi}_2^0 \tilde{\chi}_1^\pm \; \to \; s \; \bar{c} $\\ $4.0\% \rm \quad \tilde{\chi}_2^0 \tilde{\chi}_1^\pm \; \to \; b \; \bar{t}$\\ $4.0\% \rm \quad \tilde{\chi}_1^0 \tilde{\chi}_1^\pm \; \to \; s \; \bar{c}$\\ $4.0\% \rm \quad \tilde{\chi}_1^0 \tilde{\chi}_1^\pm \, \to \; d \; \bar{u} $\\ ......\end{tabular} & \multicolumn{1}{l|}{\begin{tabular}[c]{@{}l@{}}$96\% \rm \quad \tilde{\chi}_1^0 \tilde{\chi}_1^0 \; \to \; h_s \; A_s$ \\ $3.4\% \rm \;\;\; \tilde{\chi}_1^0 \tilde{\chi}_1^0 \; \to \; h_s \; h_s$\end{tabular}} \\ $\tilde{\chi}_2^0$ Decay channels & $100\%\rm \quad \tilde{\chi}_2^0 \; \to \; \tilde{\chi}_1^0 \; Z$ & $100\% \rm \quad \tilde{\chi}_2^0 \; \to \; \tilde{\chi}_1^0 \; Z$ & \begin{tabular}[l]{@{}l@{}}$\quad$\\ $16\%\rm \quad \tilde{\chi}_2^0 \; \to \; \tilde{\chi}_1^0 \; d \; \bar{d} \;(\, d=d,\; s \,)$\\ $12\%\rm \quad \tilde{\chi}_2^0 \; \to \; \tilde{\chi}_1^0 \; u \; \bar{u} (\; u=u,\; c \;)$\\ $10\% \rm \quad \tilde{\chi}_2^0 \; \to \; \tilde{\chi}_1^0 \; b \; \bar{b} $\\ $7.4\% \rm \quad \tilde{\chi}_2^0 \; \to \; \tilde{\chi}_1^0 \; \nu \; \bar{\nu}\; (\, \nu= \nu_e,\;\nu_{\mu}, \; \nu_{\tau}\,)$\\ $3.7\% \rm \quad \tilde{\chi}_2^0 \; \to \; \tilde{\chi}_1^0 \; l \; \bar{l} (\; l=e,\; \mu \;)$\\ $3.5\% \rm \quad \tilde{\chi}_2^0 \; \to \; \tilde{\chi}_1^0 \; \tau \; \bar{\tau} \;$\\ $\quad$\end{tabular} & \begin{tabular}[c]{@{}c@{}}$57\% \rm \quad \tilde{\chi}_2^0 \; \to \; \tilde{\chi}_1^0 \; Z$\\ $43\% \rm \quad \tilde{\chi}_2^0 \; \to \; \tilde{\chi}_1^0 \; h_s$\end{tabular} \\ \multicolumn{1}{|c|}{$\tilde{\chi}_3^0$ Decay channels} & $100\%\rm \quad \tilde{\chi}_3^0 \; \to \; \tilde{\chi}_1^0 \; Z$ & $100\%\rm \quad \tilde{\chi}_3^0 \; \to \; \tilde{\chi}_1^0 \; Z$ & \begin{tabular}[c]{@{}l@{}}$\quad$\\ $11\% \rm \quad\; \tilde{\chi}_3^0 \; \to \; \tilde{\chi}_1^0 \; d \; \bar{d}\;(\, d=d,\; s \,)$\\ $8.3\% \rm \quad \tilde{\chi}_3^0 \; \to \; \tilde{\chi}_1^0 \; u \; \bar{u}$\\ $7.9\% \rm \quad \tilde{\chi}_3^0 \; \to \; \tilde{\chi}_1^0 \; c \; \bar{c}$\\ $6.8\% \rm \quad \tilde{\chi}_3^0 \; \to \; \tilde{\chi}_1^0 \; b \; \bar{b}$\\ $5.6\% \rm \quad \tilde{\chi}_3^0 \; \to \; \tilde{\chi}_3^0 \; b \; \bar{b} $\\ $5.0\% \quad \tilde{\chi}_3^0 \; \to \; \tilde{\chi}_1^0 \; \nu \; \bar{\nu}\; (\, \nu= \nu_e,\;\nu_{\mu}, \; \nu_{\tau}\,)$\\ \qquad\qquad\qquad......\end{tabular} & \begin{tabular}[c]{@{}c@{}}$99.7\%\rm \quad \tilde{\chi}_3^0 \; \to \; \tilde{\chi}_1^0 \; Z$\\ $0.3\%\rm \quad \tilde{\chi}_3^0 \; \to \; \tilde{\chi}_1^0 \; h_s$\end{tabular} \\ \multicolumn{1}{|c|}{$\tilde{\chi}_1^{\pm}$ Decay channels} & $~100\% \rm \quad \tilde{\chi}_1^\pm \; \to \; \tilde{\chi}_1^0 \; W^\pm$ & $~100\% \rm \quad \tilde{\chi}_1^\pm \; \to \; \tilde{\chi}_1^0 \; W^\pm$ & \begin{tabular}[c]{@{}l@{}}$\quad$\\ $~33\% \rm \quad \tilde{\chi}_2^\pm \; \to \; \tilde{\chi}_1^0 \; u \; \bar{d} (\, u \; \bar{d}=u\; \bar{d}, \; c\;\bar{ s} \,)$\\ $~11\% \rm \quad \tilde{\chi}_1^\pm \; \to \; \tilde{\chi}_1^0 \; \nu \; \bar{l}\; (\,\nu \; \bar{l}=\nu_e \; \bar{e} , \; \nu_{\nu}\; \bar{\mu}, \;\nu_{\tau} \; \bar{\tau} \,)$\\ $\quad$\end{tabular} & $~100\% \rm \quad \tilde{\chi}_1^\pm \; \to \; \tilde{\chi}_1^0 \; W^\pm$ \\ \hline \end{tabular} } \caption{Detailed information of four benchmark points that agree well with all considered experiments. Number before each annihilation process represents its fraction in contributing to total DM annihilation cross-section at freeze-out temperature. Number before each decay denotes its branching ratio. }\label{tab:tab4} \end{table} In the GNMSSM, the natural electroweak symmetry breaking tends to a Higgsino mass of several hundreds of GeV. In this case, the LHC will produce Higgsino pair events copiously, and the Higgsino’s property is strongly restricted by searching for multi-lepton signals. Up to now, experimental analyses in this aspect usually considered Wino pair production and provided the Wino mass bound as a function of $m_{\tilde{\chi}_1^0}$ in the simplified model. Recently, the ATLAS collaboration analyzed $139 {\rm fb^{-1}}$ proton-proton collision data collected at the LHC with $\sqrt{s} = 13 {\rm TeV}$ and concluded that the LHC had already explored the region with the Wino mass up to approximately $700 {\rm GeV}$ and $m_{\tilde{\chi}_1^0}$ up to $300 {\rm GeV}$~\cite{Aad:2019vnb,Aad:2019vvi,ATLAS:2020ckz}. These analyses were applied to the Higgsino pair production process in the present study by elaborate Monte Carlo simulations and it was found that they can effectively limit the Higgsino’s property when $m_{\tilde{\chi}_1^0} \lesssim 100~{\rm GeV}$\footnote{A similar conclusion was obtained as shown in Figure 3 of~\cite{Cao:2019qng}, where the results on the upper panel of Figure 8 in~\cite{Sirunyan:2018ubx} are re-interpreted in terms of the Higgsino pair production process. The latter result was obtained by a combined analysis of the multi-lepton signal by the CMS collaboration. Its exclusion capability on the Wino mass versus DM mass plane is roughly identical to that of the analyses in~\cite{Aad:2019vnb,Aad:2019vvi,ATLAS:2020ckz}. }. As a specific application, the $h$-funnel region in the $h \equiv h_2$ scenario has been excluded by the analyses. This result is consistent with our previous observation in~\cite{Cao:2018rix} that the area has been ruled out by CMS’s search for the multi-lepton signal at the 13-TeV LHC with $35.9 {\rm fb^{-1}}$ data~\cite{Sirunyan:2018ubx}. Above discussion reveals that the analyses in~\cite{Aad:2019vnb,Aad:2019vvi,ATLAS:2020ckz,Sirunyan:2018ubx} have little restriction on the theory since $\tilde{\chi}_1^0$ in the GNMSSM is preferred heavier than 100 GeV. This fact motivates us to consider an experimental analysis that can detect high-DM-mass region~\cite{Aad:2019qnd}. The analysis aims to explore compressed mass spectra and utilizes the $139 {\rm fb^{-1}}$ data of the LHC. Events with missing transverse momentum and two same-flavor, oppositely charged, low-transverse-momentum leptons are selected, and are further categorized by the presence of hadronic activity from initial-state radiation. The analysis was reproduced in the present work by using the simulation tools MadGraph5\[email protected]~\cite{mad-1,mad-2} to generate the parton-level events of the processes $ p p \to \tilde{\chi}_2^0 \tilde{\chi}_3^0 (j), \tilde{\chi}_2^0 \tilde{\chi}_1^\pm (j), \tilde{\chi}_3^0 \tilde{\chi}_1^\pm (j)$, and $\tilde{\chi}_1^\pm \tilde{\chi}_1^\mp (j)$; Pythia-8.2~\cite{pythia} for parton fragmentation and hadronization; Delphes-3.4.2~\cite{delphes} for fast simulation of the performance of the ATLAS detector; and CheckMATE-2.0.26~\cite{cmate-1,cmate-2,cmate-3} to implement the analysis' cut selections. The validation of the method is provided in our recent work~\cite{cao:2021new-work}. In Figure~\ref{Fig5}, the excluded region is shown on the $|\mu_{tot} | -m_{\tilde{\chi}_1^0}$ plane. $\lambda = 0.01$, $\tan \beta = 10$, and $M_1 = M_2 = 3~{\rm TeV}$ are fixed, and the procedure depicted in~\cite{cao2019bayesian} is followed to plot the figure. The result indicates that the analysis can explore $m_{\tilde{\chi}_1^0}$ up to $230~{\rm GeV}$ and significantly impact the co-annihilation mechanism. In addition, it is noticeable that the excluded region in the present work is broader than that on the upper panel of Figure~14 in~\cite{Aad:2019qnd}. This is because $\tilde{\chi}_1^0$ is Singlino-dominated in this work, instead of Higgsino-dominated in~\cite{Aad:2019qnd}, so more processes contribute to the signal. To fully demonstrate the Singlino-dominated DM scenario's characteristics, the details of four benchmark points are provided in Table~\ref{tab:tab4}. The first three points belong to the $h \equiv h_1$ scenario and the last one is from the $h \equiv h_2$ scenario. They all predict $m_{\tilde{\chi}_1^0} \gtrsim 230 {\rm GeV}$ and thus are difficult to detect at the LHC. In addition to the characteristics listed in the table, the following features merit emphasizing. \begin{itemize} \item If the mass splitting between $\tilde{\chi}_{i}^0$ ($i=2,3$) and $\tilde{\chi}_1^0$ is larger than any of the neutral Higgs boson masses, $\tilde{\chi}_{i}^0$ will decay with sizable branching ratios into the Higgs bosons. Otherwise, it will decay into a real or virtual $Z$ boson. \item Although the process $\tilde{\chi}_1^0 \tilde{\chi}_1^0 \to h_s A_s$ is mainly responsible for the abundance in most cases, its role diminishes when $m_{h_s} + m_{A_s} $ approaches $2 m_{\tilde{\chi}_1^0}$ from below. This situation is demonstrated by Points 1 and 2. \item Since $V_h^S = 0.3$ is sizable, $\tilde{\chi}_1^0 \tilde{\chi}_1^0 \to h A_s$ for Point 1 also plays a crucial role in determining the abundance. \item Since $\lambda = 0.227$ is sizable, $\sigma^{\rm SI}_{\tilde{\chi}_1^0-p}$ and $\sigma^{\rm SD}_{\tilde{\chi}_1^0-n}$ for Point 2 are relatively large. \item Since $m_{\tilde{\chi}_1^0}/\mu_{tot} = 0.95$ approaches 1, $\sigma^{\rm SI}_{\tilde{\chi}_1^0-p}$ and $\sigma^{\rm SD}_{\tilde{\chi}_1^0-n}$ for Point 3 are relatively large even though $\lambda$ is small. \item Point 4 predicts a significant cancellation between the $h$- and $h_s$-mediated contributions to $\sigma^{\rm SI}_{\tilde{\chi}_1^0-p}$. \end{itemize} \section{Conclusions} Motivated by the increasingly tight limitation of the direct detection experiments on traditional neutralino DM in the natural MSSM and $Z_3$-NMSSM, the $Z_3$-NMSSM is extended in the present work by adding a $\mu \hat{H}_u \cdot \hat{H}_d $ term in its superpotential, and whether the Singlino-dominated neutralino can act as a feasible DM candidate is studied. Different from the $Z_3$-NMSSM, the extended theory describes the neutralino's property by four independent parameters: $\lambda$, $\mu_{tot}$, $m_{\tilde{\chi}_1^0}$, and $\kappa$. The first three parameters strongly influence the DM-nucleon scattering rate, while $\kappa$ usually only slightly affects the scattering. This characteristic implies that singlet-dominated particles may form a secluded DM sector. Under such a theoretical structure, the Singlino-dominated neutralino achieves the correct abundance by annihilating into a pair of singlet-dominated Higgs bosons by adjusting $\kappa$'s value. Its scattering with nucleons is suppressed when $\lambda v/\mu_{tot}$ is small. Our speculations are verified by numerical results. Specifically, a likelihood function containing the current experimental and theoretical situations of DM physics, Higgs physics, and B physics was constructed, which was then utilized to guide sophisticated scans of the theory's parameter space by the nest sampling algorithm. The scanned samples were analyzed by several statistical quantities, such as the marginal posterior PDF and profile likelihood, to reveal the underlying physics. The results show that, in the theory's natural space for electroweak symmetry breaking, the DM obtains the correct abundance by $\tilde{\chi}_1^0 \tilde{\chi}_1^0 \to h_s A_s$ in most cases, and the SI and SD cross-sections may be as low as $10^{-51} {\rm cm^2}$ and $10^{-46} {\rm cm^2}$, respectively. Furthermore, the LHC search for electroweakinos restricts the theory very weakly. It is emphasized herein that the $Z_3$-NMSSM differs significantly from the extended theory in at least three aspects. First, $m_{\tilde{\chi}_1^0}$ and $\kappa$ are no longer independent once one takes $\lambda$ and $\mu_{tot}$ as inputs to study the DM's property. Second, $|\kappa|$ must be less than $\lambda/2$ to keep the lightest neutralino Singlino-dominated. Its magnitude should be small after considering the tight constraints from the direct detection experiments. Third, due to the absence of the $\mu$-induced contributions to the Higgs squared mass, the singlet-dominated Higgs particles tend to be more massive. Combined with these facts, the DM cannot obtain the correct abundance by $\tilde{\chi}_1^0 \tilde{\chi}_1^0 \to h_s A_s$. Instead, it must co-annihilate with the Higgsinos to keep consistent with the DM experimental results, which corresponds to the correlated parameter space $ \lambda \simeq 2 |\kappa| $ with $\lambda \lesssim 0.1$. The Bayesian evidence of the two theories was compared and it was found that their Jeffrey's-scale value is 8.05. This result implies that the considered experiments strongly prefer the extended theory. Since it resurrects the $Z_3$-NMSSM's broad parameter space that has been experimentally excluded, the extended theory is attractive and worthy of a careful study. \section*{Acknowledgements} We thank Di Zhang for useful discussions about the LHC search for supersymmetry. This work is supported by the National Natural Science Foundation of China (NNSFC) under Grant Nos. 11575053 and 12075076. \providecommand{\href}[2]{#2}\begingroup\raggedright
\section{Introduction} Soft condensed matters comprising bubbles, emulsions, or powder particles are generally referred to as ``soft athermal particle systems". Soft athermal particles are characterized by their (quasi-) elastic interactions, and thermal motion is negligible since they are large in size. When their density increases quasistatically, a transition from the liquid state, where the stress is zero, to the amorphous solid state, where the stress is finite, occurs. This transition is called the jamming transition~\cite{Andrea1998,OHern2003}. In the vicinity of the jamming transition point, various physical quantities, namely, the stress, the interparticle contact number, and the viscosity, behave critically~\cite{Durian1995,VanHecke2010,Kawasaki2015Phys.Rev.E,Olsson2019Phys.Rev.Lett.,Ikeda2020Phys.Rev.Lett.,Saitoh2020b}. The jamming transition is similar to the glass transition observed in thermal particle systems such as atomic, molecular, and colloidal systems; recently, however, they have been revealed to be distinct~\cite{,Ikeda2012,Ikeda2013}. The rheology of athermal particles with shear flow also exhibits critical behaviors caused by the jamming transition. In particular, a scaling function for the flow curve regarding the volume fraction and shear rate has been proposed~\cite{Olsson2007Phys.Rev.Lett.}, and the validity of the scaling has been widely discussed to date~\cite{Kawasaki2015Phys.Rev.E,Vagberg2016,Bonn2017Rev.Mod.Phys.,Saitoh2020}. First, the jamming transition can be strictly defined in the athermal quasistatic limit; thus, under a finite-rate shear, the existence of a jamming transition is not obvious. Most conventional jamming transition studies are concerned with the criticality of macroscopic mean quantities, whereas with the finite-rate shear, physical quantities such as the shear stress continuously increase with increasing volume fraction, and no remarkable singularity is observed~\cite{Heussinger2009Phys.Rev.Lett.,Vagberg2014,Vagberg2016,Vescovi2016a,Nagasawa2019}. In the statistical mechanics of thermal equilibrium systems, a naive phase transition picture is often captured by the fluctuation of physical quantities. In previous studies on the jamming transition, little discussion on the fluctuation has been made, although it is potentially significant. Accordingly, this work focuses on the fluctuation of the physical quantities and clarifies the jamming transition behavior under a finite shear rate. {In this work, we investigate the stress response of soft athermal particles using molecular dynamics simulations with a finite-rate shear flow. We measure the volume fraction dependence of the shear stress under a constant shear rate, and then, near the jamming transition point, which is characterized by the athermal quasistatic (AQS) limit, we find that the fluctuation of the stress exhibits a peak. We also find that the peak height diverges and the peak position converges to the jamming transition point when we decrease the shear rate towards the AQS limit, which is reminiscent of the Widom line near the critical point in an equilibrium phase transition. Despite this similarity, the mechanism of these fluctuations in dense athermal particles is still not apparent due to their strong nonequilibriumness. Hence, to clarify the mechanism, we investigate the time evolution of the stress when the stress fluctuation is enhanced, and we reveal that under a wide range of finite rates, the system transiently acquires rigidity intermittently. We furthermore obtain the Widom line from the contact number fluctuations, which converge to the jamming transition point in the AQS limit, yet its trace is not identical to that of the stress fluctuation. These findings deepen our understanding of the jamming transition under a finite-rate shear and provide us with extensible knowledge for various phase transition phenomena under an external field. This paper is constructed as follows. First, we introduce the numerical simulation method. Next, we discuss the average shear stress and its fluctuation. Then, we examine the stress-strain curve and contact number fluctuations. Afterward, we draw the Widom lines obtained from the stress and contact number fluctuations. Finally, we summarize the results and give our perspectives.} \section{Numerical methods} We employ molecular dynamics (MD) simulations of soft athermal particles in three dimensions. To avoid crystallization of the system, we prepare a 50:50 binary mixture of $N$ particles, where different kinds of particles have the same mass $m$ and different diameters, $d$ and $1.4 d$~\cite{OHern2003}. The force between the particles, $i$ and $j$, in contact is modeled by a ``linear spring-dashpot"~\cite{Luding2005},\ i.e.,\ $\bm{f}_{ij}=(k\xi_{ij}-\eta \dot{\xi}_{ij})\bm{n}_{ij}$, with the stiffness $k$ and viscosity coefficient $\eta$. The force is parallel to the normal unit vector $\bm{n}_{ij}=\bm{r}_{ij}/|\bm{r}_{ij}|$, where $\bm{r}_{ij}\equiv\bm{r}_i-\bm{r}_j$, with the particle positions, $\bm{r}_i$ and $\bm{r}_j$ denoting the relative positions. In addition, $\xi_{ij}=R_i+R_j-|\bm{r}_{ij}|>0$ is the overlap between the particles, and $\dot{\xi}_{ij}$ is its time derivative, where $R_i$ ($R_j$) is the radius of particle $i$ ($j$). The stiffness and viscosity coefficient determine the time scale as $t_0\equiv\eta/k$ and are adjusted such that the \emph{normal restitution coefficient} of the particles is exactly zero,\ i.e., $e=\text{exp}(-\pi/\sqrt{2mk/\eta^2-1})=0$~\cite{Luding2005}. We randomly distribute the $N$ particles in an $L\times L\times L$ cubic periodic box and relax the system to a mechanically stable state~\cite{Bitzek2006}. Then, we apply simple shear deformations to the system under the Lees-Edwards boundary conditions~\cite{Lees1972}. In each time step, we apply affine deformation to the system by replacing every particle position $(x_i,y_i,z_i)$ with $\bm{r}_i=(x_i+\Delta\gamma y_i,y_i,z_i)$ ($i=1,\dots,N$) and then numerically integrate the equations of motion, $m\ddot{\bm{r}}_i=\sum_j\bm{f}_{ij}$, with a small time increment $\Delta t$~{\cite{Saitoh2016b,Saitoh2017}}. Here, $\Delta\gamma$ is the strain increment; hence, the shear rate is defined as $\dot{\gamma}\equiv\Delta\gamma/\Delta t$. In our MD simulations, we control the volume fraction of the particles $\varphi$ and the shear rate $\dot{\gamma}$. To control the shear rate, we change both $\Delta\gamma$ and $\Delta t$ within the constraints\ $\Delta \gamma\le 10^{-6}$ and $\Delta t \le 0.1 t_0$. In addition, we measure the mechanical responses of the system to simple shear deformations by the shear stress \begin{equation} \sigma = -\frac{1}{L^3}\sum_{i,j}f_{ijx}^\mathrm{el}r_{ijy}~. \label{eq:sigma} \end{equation} Here, $f_{ijx}^\mathrm{el}=k\xi_{ij}n_{ijx}$ is the $x$-component of the elastic force, and $r_{ijy}$ is the $y$-component of the relative position $\bm{r}_{ij}$ between the particles $i$ and $j$, which are in contact. For each $\varphi$ and $\dot{\gamma}$, we compute the mean value $\langle\sigma\rangle$ and fluctuations of the shear stress in a steady state, where the applied strain is in the range $1<\gamma<5$. We also take ensemble averages of $\langle\sigma\rangle$ and $\chi_\sigma$ (the definitions of which are given in Sec.~\ref{sec:chi}) over at least $20$ different initial configurations. \section{Results} \begin{figure} \includegraphics[width=\linewidth]{fluctuations_phi_samples_potential.pdf} \caption{\label{fig:stress_fluc} Simulation results of (a) the average stress $\langle\sigma\rangle$ and (b) the susceptibility $\chi_\sigma$ as functions of the volume fraction $\varphi$. Different markers are used to distinguish the different shear rate $\dot{\gamma}$ values, as shown in the legend in (b). The dotted lines depict the location of the jamming point $\varphi_{\rm J}$. } \end{figure} \subsection{Average shear stress}\label{sec:stress_ave} We first present the dependence of the average shear stress $\langle \sigma\rangle$ on the volume fraction $\varphi$ and the shear rate $\dot{\gamma}$ in Fig.~\ref{fig:stress_fluc}a. Specifically, the values of $\langle\sigma\rangle$ under different combinations of the parameters as functions of $\varphi$ are shown. In the low $\varphi$ regime, $\langle\sigma\rangle$ plateaus for all $\dot{\gamma}$. We can also tell that $\sigma_{\rm low}$ scales linearly with $\dot{\gamma}$. {This Newtonian-like shear rate dependence is considered the consequence of the effective overdamped dynamics due to the zero restitution coefficient.} In the high $\varphi$ regime, $\langle \sigma\rangle$ increases with increasing $\varphi$. In particular, when $\varphi$ is high enough and the system exhibits a clear yielding behavior, the $\dot{\gamma}$ dependence of $\langle\sigma\rangle$ follows the famous Herschel-Bulkley law~\cite{Herschel1926}: $\langle\sigma\rangle\sim \sigma_{\rm Y}+\dot{\gamma}^n$ (see Appendix \ref{ap:HB} for the flow curve when $\varphi=0.65$~\cite{Kobayashi1980,Heussinger2009Phys.Rev.Lett.,Lin2014b,Saitoh2019a,Oyama2020a}). Between these two qualitatively different volume fraction regimes, we observe a steep growth in $\langle\sigma\rangle$. As intuitively expected, this sharp increase in $\langle\sigma\rangle$ is observed in the vicinity of the jamming point ({$\varphi_{\rm J}\approx 0.6461$}; see Appendix \ref{ap:phij} for the determination of $\varphi_{\rm J}$ under shear~\cite{Kawasaki2015Phys.Rev.E,Kawasaki2020}). However, the stress growth is most prominent at a volume fraction that is clearly smaller than $\varphi_{\rm J}$ {at finite $\dot{\gamma}$.} Furthermore, as $\dot{\gamma}$ increases, the growth becomes less steep, and the onset volume fraction of the stress growth shifts towards the low $\varphi$ side. \subsection{Susceptibility of the shear stress}\label{sec:chi} We next focus on the fluctuation of the shear stress. In particular, we quantify the enhancement of the collectivity in the fluctuations that accompanies the rapid increase in $\langle\sigma\rangle$ by the susceptibility $\chi_\sigma$, defined as: \begin{align} \chi_{\sigma}\equiv N(\langle \sigma^2\rangle - \langle\sigma\rangle^2)/(\langle \sigma_{\rm local}^2\rangle-\langle\sigma_{\rm local}\rangle^2), \label{eq:chi} \end{align} {where $\langle \sigma_{\rm local}\rangle$ is the time- and particle-averaged value of the particle-based local stress $\sigma_i\equiv-\frac{N}{2V}\sum_{j\in{\rm contact}}f_{ijx}^{\rm el}(t)r_{ijy}(t)$ and $\sum_{j\in{\rm contact}}$ is the sum over the neighbors ($\langle\sigma_{\rm local}^2\rangle$ is the corresponding second-order moment)\footnote{ The only difference between the definitions of $\langle\sigma^2\rangle$ and $\langle\sigma_{\rm local}^2\rangle$ is the order in which the averages are taken over particles and time.}.} With this definition, the average of $\sigma_i$ over the particles is identical to the macroscopic value $\sigma$, $\sigma=\frac{1}{N}\sum_i^N\sigma_i$. This susceptibility $\chi_{\sigma}$ quantifies the degree of collectivity in the stress fluctuations: $\chi_\sigma$ is expected to diverge with increasing system size $N$ when the whole system behaves collectively, as in a system located near a critical point. In Fig.~\ref{fig:stress_fluc}b, we plot the measurement results of $\chi_\sigma$ as a function of the volume fraction $\varphi$. In the low $\varphi$ regime, $\chi_\sigma$ increases with increasing $\dot{\gamma}$. However, interestingly, for low rates ($\dot{\gamma}\le 10^{-5}$), $\chi_\sigma$ hardly depends on $\dot{\gamma}$. This behavior is in contrast to that of $\langle\sigma\rangle$, which depends linearly on $\dot{\gamma}$ for all shear rates $\dot{\gamma}$ in the low $\varphi$ regime. Regarding the volume fraction dependence in this regime, $\chi_\sigma$ grows weakly with increasing volume fraction. {In the high $\varphi$ regime, the opposite trend is observed: $\chi_\sigma$ becomes smaller when either $\dot{\gamma}$ or $\varphi$ increases.} Still, the $\dot{\gamma}$ dependence disappears for low values of $\dot{\gamma}$ (in this case, $\dot{\gamma}\le 10^{-6}$), in accordance with the behavior in the low $\varphi$ regime. At an intermediate value of $\varphi$ between these two regimes, $\chi_\sigma$ exhibits a clear peak. As the shear rate $\dot{\gamma}$ increases, the {height of the peak decreases,} and the position shifts towards the low $\varphi$ direction. Note that if we further increase the shear rate to $\dot{\gamma}=10^{-2}$, we no longer observe a peak, at least in the range of the volume fraction that we have investigated, i.e., $0.62\le \varphi\le0.65$. In accordance with the convergence of $\chi_\sigma$ both in the high and low $\varphi$ regimes, the height and position of the peak become almost constant for $\dot{\gamma}\le 10^{-6}$. This total convergence of the susceptibility $\chi_\sigma$ in the low rate regime over all values of $\varphi$ suggests that the length scale that governs the stress fluctuation spans the whole system in this regime. We discuss the possible candidates for this length scale in Sec.~\ref{sec:contact}, although we leave the precise identification for a future study. Hereafter, we call the height and position of this peak $\chi_\sigma^{\rm max}(\dot{\gamma})$ and $\varphi_{\chi_\sigma^{\rm max}}(\dot{\gamma})$, respectively (we omit the explicit notation for the $\dot{\gamma}$ dependence below). \begin{figure} \includegraphics[width=\linewidth]{s_s_log.pdf} \caption{\label{fig:s_s_log} Stress-strain curves for {various combinations} of the shear rate $\dot{\gamma}$ and the volume fraction $\varphi$. The vertical axis follows a log-scale. Results for (a) $\dot{\gamma}=10^{-6}$, (b) $\dot{\gamma}=10^{-5}$, and (c) $\dot{\gamma}=10^{-4}$ are shown. In all panels, the results for three volume fractions are compared: $\varphi=0.62$ (black), $\varphi=0.65$ (light gray), and $\varphi=\varphi_{\chi_\sigma^{\rm max}}$ (dark gray). } \end{figure} \subsection{Stress-strain curves}\label{sec:s_s} To further obtain an intuitive understanding of the parameter dependence of the susceptibility $\chi_\sigma$, we plot typical stress-strain curves for the systems under {various} combinations of the volume fraction $\varphi$ and the shear rate $\dot{\gamma}$ ($\dot{\gamma}=10^{-6},10^{-5}$ and $10^{-4}$) in Fig.~\ref{fig:s_s_log}. For the whole parameter space investigated here, the average stress $\langle\sigma\rangle$ becomes larger with both increasing $\varphi$ and increasing $\dot{\gamma}$, as presented in Fig.~\ref{fig:stress_fluc}a. {However, the dependence on $\dot{\gamma}$ changes significantly depending on $\varphi$: while the order of $\langle\sigma\rangle$ remains the same regardless of the value of $\dot{\gamma}$ at a high volume fraction ($\varphi=0.65>\varphi_{\chi_\sigma^{\rm max}}$, Fig.~\ref{fig:s_s_log} light gray curves)\footnote{Note that since $\langle\sigma\rangle$ obeys the Herschel-Bulkley law at this high volume fraction ($\varphi=0.65$), the order of the stress becomes larger if we apply a much faster shear.},} it scales linearly with $\dot{\gamma}$ at a low volume fraction ($\varphi=0.62<\varphi_{\chi_\sigma^{\rm max}}$, Fig.~\ref{fig:s_s_log} black curves). {However, the shapes of the stress-strain curves in these different regimes are similar in that the fluctuations are suppressed.} {By contrast, the shape of the stress-strain curves dramatically changes in the vicinity of $\varphi_{\chi_\sigma^{\rm max}}$ under a slow shear rate ($\dot{\gamma}=10^{-6}$; Fig.~\ref{fig:s_s}a dark gray curve):} we observe spiky peaks, with the height of the baseline being on the order of the stress at low $\varphi$ (see Appendix \ref{ap:s_s} for normal plots of the stress-strain curves where the spiky shapes are more appreciable). The heights of the spikes are larger than the baseline by at most two orders of magnitude and barely reach the curve for $\varphi=0.65$. Importantly, the probability distribution of $\sigma$, $P(\sigma)$, exhibits a power-law-like shape for $\varphi=\varphi_{\chi_\sigma^{\rm max}}$ and $\dot{\gamma}=10^{-6}, 10^{-5}$, indicating that this susceptibility peak reflects the criticality expected for $\dot{\gamma}\to 0$ {(see Appendix \ref{ap:s_s})}. As the shear rate increases, the spikes become less sharp and less frequent ($\dot{\gamma}=10^{-5}$; Fig.~\ref{fig:s_s}b dark gray curve), and finally, the whole stress-strain curve becomes almost detached from that for a low $\varphi$ at $\dot{\gamma}=10^{-4}$ (Fig.~\ref{fig:s_s}c). Since the magnitudes of the stress at the baseline and the peak top are comparable to those for low and high volume fractions respectively, we consider that these spikes are formed because the system goes back and forth between fluid-like low-stress states and solid-like large-stress states. {That is, the whole system collectively changes its ``state" during the time evolution, as indicated by the susceptibility peak.} We mention that similar repetitive transitions between fluid-like and solid-like states have also been observed under the AQS shear ($\dot{\gamma}=0$)~\cite{Heussinger2009Phys.Rev.Lett.}. Notably, under a high shear rate ($\dot{\gamma}=10^{-4}$), $P(\sigma)$ exhibits a clear unimodal shape without power-law tails at either end {(see Appendix \ref{ap:s_s})}. This observation suggests that the increase in $\sigma$ becomes more similar to a cross-over rather than a phase transition because of the effect of the strong external field (see Sec.~\ref{sec:Ising} for the qualitative similarity between our system and the conventional critical phenomena). \section{Discussion} In this section, we discuss the similarity between our system and the conventional critical phenomenon: the ferromagnetic transition in the Ising model under an external field. Based on this analogy, we can tell that the shear stress $\sigma$ can be viewed as a natural ``conjugate" variable to the strength of the external field (namely, the shear rate $\dot{\gamma}$). However, $\sigma$ changes its value by orders of magnitude depending on $\dot{\gamma}$ even in the ``disordered", low-stress phase. In this sense, it is qualitatively different from conventional standard order parameters that are normalized to be between zero and one in most cases. Therefore, we further conduct the same analysis for an alternative candidate for an order parameter, i.e., the interparticle contact number $z$. \subsection{Correspondence to conventional criticality in equilibrium systems}\label{sec:Ising} To further explore the parameter dependence of the shear stress $\sigma$ and its fluctuations, we rely on an analogy with a well-understood phase transition. Here, in particular, we discuss an analogy with one of the most famous examples: the Ising model under a magnetic field {(see Appendix \ref{ap:ising} for a brief recapitulation of the mean-field solution)}. As shown in Figs.~\ref{fig:stress_fluc}(a,b), the average and the susceptibility of the stress exhibit qualitative similarities with the magnetization and the susceptibility in the Ising model (Appendix \ref{ap:ising}): {the inverse temperature $\beta$, which is the control parameter of the criticality in the Ising model, corresponds to the volume fraction $\varphi$ in our system. Similarly, the external magnetic field $h$ and the magnetization $m$ correspond to the shear rate $\dot {\gamma}$ and the mean stress $\langle \sigma \rangle$, respectively.} Moreover, in both systems, as the external field ($h$ or $\dot{\gamma}$) increases, the change in the order parameter ($m$ or $\langle\sigma\rangle$) becomes less steep, and the whole plot shifts towards the less-ordered side. Regarding the susceptibility ($\chi$ or $\chi_\sigma$), we observe peaks at a value of the control parameter ($\beta$ or $\varphi$) that is shifted from the critical point when an external field is present. The height of these peaks decreases with increasing external field, and the position shifts towards the small-order side. {We emphasize that the counterpart of the magnetic field in our system is not the strain $\gamma$ but the shear rate $\dot {\gamma}$, which is the conjugate of the stress in effective energy dissipation. Hence, the free energy of the Ising model corresponds to the dissipation function in our system and is consistent with the empirical knowledge that the dissipation system takes precedence over the dynamics of the minimum energy dissipation~\cite{Unger2004,Torok2007}.} In this sense, the shear stress $\sigma$ can be viewed as a natural conjugate variable to the external field and thus as an order parameter. However, since $\sigma$ is dependent not only on the existence of contacts but also on the degree of overlapping of each contact, it changes its value by orders of magnitude depending on $\dot{\gamma}$ even in the ``disordered", dilute state. In the next section, we instead measure the average and susceptibility of the interparticle contact number, the values of which are expected to exhibit less $\dot{\gamma}$ dependence. \subsection{Contact number}\label{sec:contact} The interparticle contact number $z$ characterizes the jamming transition most directly in terms of the microscopic structures~{\cite{VanHecke2010}}. For the jamming transition in quiescent systems without external fields, $z$ changes discontinuously from zero to approximately $z_{\rm C}$ at the critical point $\varphi_{\rm J}$, above which physical quantities such as the pressure or the shear modulus change in a power-law manner, as in the case of the conventional second-order phase transitions~{\cite{OHern2003}}. According to Maxwell's condition, $z_{\rm C}=2d$ holds for frictionless soft athermal spheres, where $d$ is the spatial dimension of the system. Here, we plot the average and the susceptibility of the interparticle contact number $z$ (we do not exclude rattlers to compute $z$) under a finite-rate shear as functions of $\varphi$ in Fig.~\ref{fig:contact_nematic}. For the definition of the susceptibility $\chi_z$, we employ a definition similar to Eq.~\ref{eq:chi}. The dependence of the average contact number $\langle z\rangle$ on the volume fraction $\varphi$ is qualitatively very similar to that of the average stress $\langle\sigma\rangle$: it is almost constant in the low $\varphi$ regime and then shows sudden growth around $\varphi_{\rm J}$, after which the growth rate decreases in the high $\varphi$ regime. However, the dependence on $\dot{\gamma}$ is significantly different from that of $\langle\sigma\rangle$: in the low $\varphi$ regime, the plateau disappears for high $\dot{\gamma}$, and the shear rate dependence is not linear. Furthermore, the values of $\langle z\rangle$ at the highest $\varphi$ hardly depend on $\dot{\gamma}$. The susceptibility of the contact number $\chi_z$ behaves qualitatively very similarly to that of $\chi_\sigma$: it exhibits a clear peak near the jamming point $\varphi_{\rm J}$, and the peak height and position change in the same way as $\chi_\sigma$ when $\dot{\gamma}$ increases. One major difference from $\chi_\sigma$ is that the peak position and height of $\chi_z$ obviously change even in the low rate limit $\dot{\gamma}\le 10^{-6}$, where $\chi_\sigma$ becomes constant. {This qualitative difference intriguingly suggests that the characteristic lengths that govern $\sigma$ and $z$ ($\xi_\sigma$ and $\xi_z$, respectively) are different. Let us enumerate several candidates from previous studies. For example, it is known that the correlation length of the deviation from the continuum description diverges at the jamming point~\cite{Ellenbroek2006,Ellenbroek2009,Lerner2014,Mizuno2016}. This length scale, often referred to as $l_c$, is a candidate for $\xi_z$. On the other hand, the isotropic as-quenched state has recently been shown to be qualitatively different from the sheared nonequilibrium steady state in terms of the stability against perturbation, even in the AQS limit ($\dot{\gamma}=0$)~\cite{Karmakar2010a,Oyama2020}. This knowledge implies that $l_c$ and $\xi_z$ can be different in nature, since $l_c$ is measured in the absence of an external field ($\gamma=0$), while $\xi_z$ should be measured in the steady state $\gamma>{\cal O}(1)$. As an example of a correlation length measured in a dynamic situation, Refs.~\cite{Saitoh2016b,Saitoh2016c,Saitoh2020} reported that the correlation length of the nonaffine velocities of particles diverges in the limit of $\varphi\to\varphi_{\rm J}$ and $\dot{\gamma}\to 0$ in two-dimensional packings of soft frictionless disks. However, this correlation length has been shown to remain finite even in the same limit in three dimensions~\cite{Oyama2019}. Instead, in ref.~\cite{Oyama2019}, the authors introduced the correlation length of the vortex clusters, which diverges in that limit. As another example of a dynamical correlation length, the one associated to the yielding criticality is also known to diverge in the limit of $\dot{\gamma}\to 0$~\cite{Lin2014b,Oyama2020a}. However, this length scale can be well defined only in the high $\varphi$ regime, where the Herschel-Bulkley law is valid and cannot describe the total convergence of $\chi_\sigma$ over the whole $\varphi$ regime. As discussed here, multiple candidates exist, with the possibility that none of them is the desired one. Although identifying the governing length scale by comparing all these candidates is an important issue, we leave it as a future problem.} Finally, we present the ridges obtained by connecting the peaks of the susceptibilities under different values of $\dot{\gamma}$ in Fig.~\ref{fig:phase_diagram}. In this plot, we compare the results for $\chi_\sigma$ and $\chi_z$. These ridges can be regarded as the dissipative-system counterpart of the Widom lines by definition. Both Widom lines seem to converge to $\varphi_{\rm J}$ in the limit of $\dot{\gamma}\to 0$, as expected. Moreover, these two lines follow different paths, as is the case for the conventional equilibrium systems, e.g., the Widom lines around the liquid-gas critical point. \begin{figure} \includegraphics[width=\linewidth]{fluctuations_phi_samples_potential_z.pdf} \caption{\label{fig:contact_nematic} { (a) Average $\langle z\rangle$ and (b) susceptibility $\chi_z$ of the interparticle contact number as functions of the volume fraction $\varphi$. Different markers represent different shear rates, as shown in the legend in Fig.~\ref{fig:stress_fluc}(b). The dotted lines depict the location of the jamming point $\varphi_{\rm J}$. } } \end{figure} \begin{figure} \includegraphics[width=\linewidth]{phase_diagram_c.pdf} \caption{\label{fig:phase_diagram} {Widom lines, or a plot of the locations of the susceptibility peaks $\varphi_{\chi_\alpha^{\rm max}}$ on a $\varphi-\dot{\gamma}$ plane, where $\alpha\in\{\sigma, z\}$. Different symbols represent different definitions of the susceptibility, as shown in the legend. The dotted line shows the location of the jamming point $\varphi_{\rm J}\approx 0.6461$ estimated at $\dot{\gamma}=0$ (see Appendix \ref{ap:phij}). Error bars indicate the range of $\varphi$ for which the values of $\chi_\alpha$ are greater than 90\% of $\chi_\alpha^{\rm max}$.} } \end{figure} \section{Summary and overview} In this work, we conducted MD simulations for dense packings of soft athermal spheres under a finite-rate shear and investigated the dependence of the statistics of the shear stress on the shear rate and the volume fraction. The average stress changes largely in the vicinity of the jamming point; moreover, the onset volume fraction for the stress growth becomes smaller when the shear rate increases. {Interestingly, this sudden stress growth is accompanied by the formation of a peak of the susceptibility.} {To further understand this susceptibility peak, we investigated the time evolution of the stress. We found that the stress-strain curve exhibits spiky peaks at the volume fraction where the susceptibility peak is observed. These peaks are formed since the system can temporally gain solidity with the aid of the external shear, while it is fluidic otherwise. } We furthermore measured the average and susceptibility of the interparticle contact number as an example of a normalized order parameter in our system. The results for $\chi_z$ are qualitatively consistent with those for $\chi_\sigma$, although the length scales that govern these two fluctuations seem different. We furthermore visualized the Widom lines in our system, or the ridges of the susceptibility peaks for both the stress and contact number. As the equilibrium phase diagram shows, two Widom lines follow different paths, although both seem converge to a critical point in the limit $\dot{\gamma}\to 0$. As a future direction, an investigation of whether modification of the physical dimension~\cite{Radjai2002,Saitoh2016c,Oyama2019}, the damping coefficient~\cite{Andreotti2012,Kawasaki2014a,Vagberg2017}, or the local dissipation mechanisms (e.g., introduction of the tangential friction~\cite{Otsuki2009a,Otsuki2011}) leads to any qualitative changes should be carried out. \begin{acknowledgments} We thank Atsushi Ikeda, Kota Mitsumoto, and Yusuke Hara for the fruitful discussions. This work was financially supported by JSPS KAKENHI Grant Numbers 18H01188, 18K13464, 19K03767, 20H05157, 20H00128, 20H01868, 20J00802, and 20K14436. \end{acknowledgments} \begin{appendix} \section{Flow curve for a dense system}\label{ap:HB} In Fig.~\ref{fig:flow_curve}, we plot the average shear stress $\langle\sigma\rangle$ in the system as a function of the shear rate $\dot{\gamma}$ with $\varphi=0.65$. To roughly estimate the yield stress $\sigma_{\rm Y}$, we also conduct an AQS simulation. In the AQS simulation, instead of integrating the equation of motion, we minimize the potential energy of the system~\cite{Kobayashi1980,Heussinger2009Phys.Rev.Lett.,Saitoh2019a}. We employ the FIRE algorithm~\cite{Bitzek2006} and terminate the iteration when the maximum magnitude of the force exerted on one particle meets $f_{\rm max}<10^{-9}$. The strain increment is $\Delta\gamma=5\times 10^{-5}$~\cite{Heussinger2009Phys.Rev.Lett.}. Fig.~\ref{fig:flow_curve} shows that the average stress converges to the AQS value at very slow shear rates ($\dot{\gamma}\le 10^{-6}$). In other words, these shear rates can be considered as in the so-called \emph{quasistatic regime}. We regard the average stress under the AQS shear as the yield stress and further fit the numerical results to the Herschel-Bulkley law, $\langle\sigma\rangle\sim \sigma_{\rm Y}+\dot{\gamma}^n$. This simple estimation provides $n\sim 0.62$, and the obtained curve captures the numerical data very well. Note, however, that we must take into account the finite size effects to accurately evaluate the Herschel-Bulkley parameters, namely, the yield stress and the critical exponent~\cite{Lin2014b,Oyama2020a}. \begin{figure} \includegraphics[width=\linewidth]{HB.pdf} \caption{\label{fig:flow_curve} The dependence of the average stress $\langle\sigma\rangle$ on the shear rate $\dot{\gamma}$ at $\varphi=0.65$. The markers represent the results of the MD simulation, and the dashed line is the fitting to the Herschel-Bulkley law. The Herschel-Bulkley exponent here is $n\sim 0.62$. The dotted line depicts the value of $\langle\sigma\rangle$ measured under the AQS shear. } \end{figure} \section{Determination of the jamming point}\label{ap:phij} We determine the precise location of the jamming point $\varphi_{\rm J}$ following ref.~\cite{Kawasaki2020}, the protocol of which we briefly explain here. We first prepare a random particle configuration in a fixed volume system with a linear dimension $L$. Then, we minimize the total potential energy of the system to obtain a mechanically equilibrated configuration, with the pressure $p$ being controlled such that $p\approx 0$. We furthermore apply shear in an AQS manner until the system reaches a steady state ($\gamma=1$) with a strain increment $\Delta\gamma=10^{-3}$. The volume fraction at the steady state ($\gamma>0.5$) can be used as a well-defined jamming point~\cite{Kawasaki2020}. {With this protocol, the value of the jamming point does not depend on the initial configuration.} Because achieving numerically the exact mechanically equilibrated configuration with zero pressure is almost impossible, we set the target pressure $P=10^{-5}$. Following this protocol and averaging over the values in the steady state ($\gamma\ge 0.5$), we locate the jamming point as {$\varphi_{\rm J}\approx 0.6461$ (Fig.~\ref{fig:jamming_point})}. This value of $\varphi_{\rm J}$ is consistent with the one estimated by directly fitting the diverging trend of the viscosity~\cite{Kawasaki2015Phys.Rev.E}. We stress that the data in Fig.~\ref{fig:jamming_point} is the average over 60 samples. \begin{figure} \includegraphics[width=\linewidth]{phij.pdf} \caption{\label{fig:jamming_point} Average over 60 samples. Dashed line represents the estimated value of $\varphi_{\rm J}=0.6461$ (see the text regarding how to locate it). } \end{figure} \section{Stress-strain curves in a normal plot}\label{ap:s_s} In this section, we present a normal plot of the stress-strain curves for various combinations of parameters in Fig.~\ref{fig:s_s} (the ones used for Fig.~2 in the main text are employed). In the plots for $\varphi=\varphi_{\chi_\sigma^{\rm max}}$, we observe sharp spikes, especially for a slow shear rate. In Fig.~\ref{fig:pdf_s}, we plot the probability distribution function (PDF) of the shear stress $\sigma$ for the same combinations of parameters. At a low volume fraction $\varphi=0.62$, the PDF is almost Dirac's delta function for all shear rates (the width is very narrow). At a high volume fraction $\varphi=0.65$, the PDF is unimodal, with a large width for all shear rates. At $\varphi=\varphi_{\chi_\sigma^{\rm max}}$, however, we observe shear rate dependence. Although the PDF exhibits a power-law-like shape for slow shear rates ($\dot{\gamma}\le 10^{-5}$), it becomes rather regular unimodal shape for a high shear rate ($\dot{\gamma}=10^{-4}$). \begin{figure*} \includegraphics[width=\linewidth]{s_s.pdf} \caption{\label{fig:s_s} Stress-strain curves for systems with different combinations of the shear rate $\dot{\gamma}$ and the volume fraction $\varphi$. {Results for (top row) $\varphi=0.65>\varphi_{\chi_\sigma^{\rm max}}$}, (middle row) $\varphi=\varphi_{\chi_\sigma^{\rm max}}$, and (bottom row) $\varphi=0.62<\varphi_{\chi_\sigma^{\rm max}}$ are shown. From left to right, the shear rate increases as follows: $\dot{\gamma}=10^{-6}, 10^{-5}$ and $10^{-4}$. } \end{figure*} \begin{figure} \includegraphics[width=\linewidth]{pdf_s.pdf} \caption{\label{fig:pdf_s} PDFs of the shear stress $\sigma$ for different shear rates $\dot{\gamma}=10^{-6}, 10^{-5}$ and $10^{-4}$. Different symbols indicate different volume fractions $\varphi$, as shown in the legend. } \end{figure} \section{Ising model}\label{ap:ising} In this section, we recapitulate the famous self-consistent equation for the magnetization of the Ising model under an external magnetic field, which is derived with a mean-field approximation. Assume we have a $d$-dimensional Ising-type spin system on a regular lattice whose Hamiltonian ${\cal H}$ is written as: \begin{align} {\cal H}=-J\sum_{\langle ij\rangle}S_iS_j-h\sum_{i=1}^N S_i, \end{align} where $S_i\in\{1,-1\}$ is the spin variable at the site $i$, $h$ stands for the strength of the external field, and $J$ represents the coupling constant. Then, with a mean-field approximation, we can derive a self-consistent equation for the spin $\frac{1}{2}$ magnetization $m$ as: \begin{align} m=\text{tanh}(\beta Jz_cm+\beta h),\label{eq:SC} \end{align} where $z_c=2d$ is the spin coordination number. If we employ $d=3$ and $J=1$, the critical inverse temperature $\beta_c$ is obtained as $\beta_c=1/Jz \approx 0.167$. We plot the values of the magnetization $m$ and the susceptibility $\chi=dm/dh$ as functions of $\beta$ for various values of $h$ in Fig.~\ref{fig:ising_solution}. \begin{figure} \includegraphics[width=\linewidth]{ising.pdf} \caption{\label{fig:ising_solution} (a) Magnetization $h$ and (b) susceptibility $\chi$ obtained from the self-consistent Eq.~\ref{eq:SC} as functions of the inverse temperature $\beta$. Different colors represent different values of $h$, as shown in the legend. } \end{figure} \end{appendix}
\section{Introduction}\label{sec:introduction} Multi-armed bandits (MABs) refer to a class of sequential decision problems~\cite{thompson1933likelihood, robbins1952some} where an agent attempts to maximize rewards received by repeatedly choosing one out of a set of actions, each with unknown and stochastic rewards. MAB strategies aim to balance the need for exploration against the benefits of exploiting the actions believed to be the most rewarding. Specifically, this paper focuses on the problem of defining MAB strategies that target scenarios with a very short {\em horizon}, i.e., those in which the agent gets to choose an action a very small number of times. Short horizon bandits arise in many real-world situations. For example, consider the problem of player modeling~\cite{yannakakis2013, drachen2009player,valls2015exploring}, where software systems aim to model or classify players to provide them with individualized experiences. In our previous work~\cite{gray2020player}, we demonstrated that MAB strategies can be useful in automatically determining the best options to present a user, based on that user's traits, as the MAB strategy observes the user's reactions to the different options. However, if MAB strategies are to be useful for player modeling, they need to adapt to users quickly within a small number of iterations. This is in contrast to standard analyses of MAB strategies, which are typically studied in the limit, where the number of iterations is very large. To address this gap, in this paper we study MAB strategies that attempt to converge very quickly. To do so, we study three different ideas: (1) integrating linear regression models into the {\em oracle} of the MAB to more accurately predict future rewards given past information; (2) forced exploration patterns that focus on pure exploration initially before engaging in the bandit strategy; and finally (3) we compare different MAB strategy families, including a new variant of the UCB strategy~\cite{Auer2002} we call {\em UCBT} that can automatically adjust its exploration constant based on observations rather than requiring it to be externally tuned. Our empirical results show that all three ideas can help significantly in the short horizon scenario and that although our best performing strategies are variants of $\epsilon$-greedy and $\epsilon$-decreasing incorporating ideas (1) and (2), UCBT compares favorably to UCB when the exploration constant is not properly tuned. The remainder of this paper is structured as follows. First, we present some related research on MAB strategies that face similar challenges and constraints. After that, we introduce the motivating scenario and simulator we use to compare our approaches. Then, we present our approach toward addressing the short-horizon MAB problem. Finally, we examine the results of MAB performance in a simulator designed to mimic human walking behavior patterns to further observe the potential for regression-based MABs. \section{Background and Related Work}\label{sec:related-work} A multiarmed bandit (MAB) problem~\cite{lai1985asymptotically} is a sequential decision problem in which an agent needs to select one of $k$ actions (called {\em arms}) sequentially over the course of $h$ time steps (or {\em horizon}). At each time step, the agent receives a reward based on the arm chosen. Neither the reward distributions nor the expected values of the arm rewards $\rho$ are known beforehand. The goal of the agent is to maximize the obtained (cumulative) reward. Thus, at each iteration, the agent must choose between {\em exploiting} (selecting the arms that have so far performed the best) or {\em exploring} (selecting other arms to gather additional data about them). In the most common instantiation of the MAB problem, known as the {\em stochastic bandit problem}, each of the arms available to the agent holds a static, unknown, underlying reward distribution from which a reward is randomly drawn~\cite{kuleshov2000}. MAB strategies usually assess the expected reward of each arm based on past iterations via some estimation process (which we will call an {\em oracle}). In the case of stochastic bandits, typical strategies estimate descriptive statistics of observed rewards such as mean $\mu$ and standard deviation $\sigma$. These values provide the basis for predictions in popular MAB approaches such as the $\epsilon$-based (e.g., {\em $\epsilon$-greedy}, {\em $\epsilon$-decreasing}) and {\em Upper Confidence Bound} (UCB) families of strategies~\cite{lattimore2018bandit}. Two lines of work on MAB strategies are relevant to the work we present in this paper: (1) MAB strategies for domains with contextual or non-stationary rewards, and (2) MAB strategies for domains with very short horizons, briefly described below. In this standard stochastic bandit formulation, rewards are assumed to depend exclusively on the selected arm. In other words, the problem is {\em stateless} and arm choices in previous iterations do not affect rewards obtained in the current iteration. However, as elaborated in Section~\ref{sec:simulation-environments}, the domain we use in this paper does not strictly satisfy this property; we focus on social exergames, where the goal is to maximize the number of steps of the players. This metric appears to correlate with several other factors, such as the day of the week, activity levels of previous days, and others. In particular, three variations of the MAB problem that are particularly relevant to model this are {\em contextual bandits}~\cite{langford2007epoch}, {\em non-stationary bandits}~\cite{kocsis2006discounted}, and {\em restless bandits}~\cite{whittle1988restless}. In contextual bandits, the stochastic reward function is assumed to depend on an external {\em context vector}, which is observed by the agent before having to choose an arm. Non-stationary and restless bandits model the scenario where the stochastic reward functions of all the arms change over time. For example, {\em Discounted UCB}~\cite{kocsis2006discounted} adds a discount factor for observations far in the past, and Besbes et al.~\cite{besbes2019optimal} propose the use of a ``dynamic oracle'' that observes the way rewards change over the horizon and considers that variation when selecting arms. Concerning domains with very short horizons, although some isolated pieces of work exist, the problem has not received much attention in the literature. A recent approach by Tomkins et al.~\cite{tomkins2020rapidly} considers very short horizons when using bandits to select personalized policies for users. To address the problem, they exploit knowledge of rewards from trials with other users. This ``intelligent pooling'' strategy assesses how similar or dissimilar two users are to determine how much one user's observed rewards should be applied to the others. Although this is a promising approach, we do not employ such technique in this paper because we do not assume access to data from other users. \section{Simulation Environments}\label{sec:simulation-environments} The main challenge addressed in this paper (short-horizon MABs) is motivated by deploying MABs in domains where an MAB strategy needs to select with low frequency (e.g., once a day) a scenario or intervention for a human player, hoping to have a specific desired effect on the player. For example, consider exergames~\cite{zhu2018towards, gray2018}, where the goal is to motivate players to do more exercise. In these domains, we cannot expect a human to play the game for thousands or even hundreds of days. Therefore, if the MAB strategy is to be effective, it must learn to personalize the experience for the player within a very short time. Motivated by this problem and focusing on a domain where we want to maximize the number of steps walked by a player, we designed two simulation environments to evaluate the effectiveness of our approaches. Because we are using simulators to evaluate the different MAB strategies of our study, it is essential that the simulators reflect some of the important features that would be encountered when dealing with the real-world domain. The remainder of this section describes the design and rationale for these simulators. \subsection{Human Step Behavior Modeling} In both simulation environments, the task of the agent is to maximize the daily steps of the {\em virtual players} in an exergame or health study. The only thing that can be manipulated by the agent is the selection among three variants of the {\em intervention} that the player will see each day. The task is formulated as an MAB problem in which the agent will sequentially select from $k=3$ arms $A_{1,...,3}$ one choice for each player to maximize the reward $\rho_t$ (i.e., daily steps) observed each day $t$ over the course of the study's {\em horizon} $h$. To generate a realistic reward from the virtual players in our simulators, we used data from a Mechanical Turk experiment conducted in 2016 by Furberg et al.~\cite{furberg2016} that collected participants' daily steps measured by a Fitbit. After removing outliers (values less than 100, $n=20$), we graph the data ($n=1665$) as a histogram in Figure~\ref{fig:mech-turk-original}. After confirming the data to be not normally distributed, we fit a Gamma distribution based on literature regarding human walking patterns and other intermittent behaviors~\cite{orendurff2008, guo2011}. The probability density function for $\Gamma(k=2.8,\theta=3100)$ is included in Figure~\ref{fig:mech-turk-original}. \subsection{Stationary Step Simulator}\label{sec:simulator1} In our first simulator, which we call the {\em stationary step simulator}, we generate daily steps for each virtual player by drawing randomly from this Gamma distribution. However, we note that the nature of human walking behavior is not fully replicated by this approach, even if we are able to generate data that matches this distribution in aggregate. Therefore, we pursue a higher degree of fidelity in our second simulator, discussed below. \begin{figure}[t!] \includegraphics[width=\columnwidth]{img/mechturkoriginal.png} \centering \caption{Histogram of daily step recordings collected from participants in a Mechanical Turk experiment~\cite{furberg2016} ($n=1665$) overlayed with the probability density function for $\Gamma(k=2.8,\theta=3100)$.} \label{fig:mech-turk-original} \end{figure} \subsection{Pattern Step Simulator}\label{sec:simulator2} Many human activities are habitual, bound to routine, and exhibit cyclical patterns~\cite{kielhofner2002model}. For example, if presuming a societal convention of planning routine activities within a 7-day week, it's reasonable to expect that an individual's walking patterns on the first day of that week would correlate with their walking patterns on the first day of other weeks. Thus, in our second simulator, which we call the {\em pattern step simulator}, we aim to exhibit this correlative and cyclical nature of daily step behavior while maintaining adherence to the overall expected distribution. Specifically, to estimate the degree to which prior days' steps might predict the current day's steps, we constructed a regression model from the sequential step data using the seven days prior to a given step count as the features of the regression: \begin{equation}\label{eq:s-t-calculation} S_t = C + \sum_{i=1}^{7}\beta_iS_{t-i} \end{equation} An Ordinary Least Squares (OLS) regression revealed the coefficients $\beta$ for these features, with which we employed backward elimination to construct a minimal model, sequentially removing the features that showed the least statistical significance until only those with $p<0.05$ remained. All features survived this process with $p<0.001$ except $S_{t-5}$, the number of steps five days prior to the current day. The resulting coefficients are presented in Table~\ref{tab:ols-regression-weights}. To prime the steps for the first seven days, we simply pull from a Gamma distribution with $k=2.8$ and $\theta=3100$ as with the stationary step simulator. After that (i.e., when $t > 7$), the step count is generated as follows: \begin{equation}\label{eq:pattern-s-t-calculation} S_t = C + \sum_{i=1}^{7}\beta_iS_{t-i} + g,\quad g\sim\Gamma(k, \theta) \end{equation} \noindent where $\beta$ is the set of coefficients listed in the Mechanical Turk column of Table~\ref{tab:ols-regression-weights}, $\beta_5=0$, $C=-3000$, $k=1.1$, and $\theta=3500$. If $S_t$ is negative, it is discarded and a new value is sampled. To verify the accuracy of the simulator, results of an experiment of 500k daily steps is presented in Figure~\ref{fig:mech-turk-gamma}, where a histogram of the resulting probability density overlays a histogram of the original Mechanical Turk data. Additionally, we performed the same regression procedure with backward elimination on this data to verify that it resulted in a model with precisely the same significant features and similar coefficients. The results can be seen in the third column of Table~\ref{tab:ols-regression-weights}, verifying that the trends in our generated data match those observed in the real-world data. We thus have a step simulator that both 1) reflects the observed real human step distribution and 2) maintains relative correlations observed in the real human daily step data. Let us now formulate the MAB problem used for evaluating our approach. \begin{figure}[t!] \includegraphics[width=\columnwidth]{img/mechturkgamma.png} \centering \caption{Histogram (red) of daily step recordings collected from participants in a Mechanical Turk experiment~\cite{furberg2016} ($n=1665$) overlayed with a histogram (blue) of the steps generated by the pattern step simulator ($n=500k$).} \label{fig:mech-turk-gamma} \end{figure} \begin{table}[t!] \caption{Significant linear regression coefficients ($p < 0.001$) for step data resulting from Mechanical Turk~\cite{furberg2016} ($n=1665$) and Step Simulator ($n=500k$) experiments. $S_{t-5}$ intentionally omitted. } \begin{center} \begin{tabular}{|c|c|c|} \hline &\multicolumn{2}{|c|}{\textbf{OLS Regression Coefficients $\beta$}} \\ \cline{2-3} \textbf{Feature} & {\bf {\em Mechanical Turk} }&{\bf {\em Step Simulator}} \\ \hline $S_{t-1}$ & 0.2599 & 0.2540 \\ $S_{t-2}$ & 0.0984 & 0.0952 \\ $S_{t-3}$ & 0.0851 & 0.0827 \\ $S_{t-4}$ & 0.1337 & 0.1274 \\ $S_{t-6}$ & 0.1300 & 0.1281 \\ $S_{t-7}$ & 0.1833 & 0.1826 \\ \hline \end{tabular} \label{tab:ols-regression-weights} \end{center} \end{table} \subsection{MAB Arms} The step value $S_t$ generated for a simulated user on a given day $t$ is influenced by the arm selected by the MAB strategy. Specifically, each arm is defined by an {\em adjustment range} $[l,h]$. When the MAB strategy selects an arm, an {\em adjustment value} $r$ is uniformly sampled from the interval $[l,h]$, and the observed reward $\rho_t$ is calculated as follows: \begin{equation}\label{eq:resulting-steps} \rho_t = S_t * (1 + r) \end{equation} The intuition is that these adjustment values would represent the degree to which a selected intervention could influence the number of steps the player would walk. Specifically, positive adjustment values indicate that the player would walk more steps as a consequence of the intervention, and negative values indicate the opposite. In this scenario, we devised a bandit that would select from three potential interventions, and the adjustment ranges for each of these three arms (A, B, and C) are shown on the third column of Table~\ref{tab:mab-arms}. \begin{table}[t!] \caption{ MAB Arms } \begin{center} \begin{tabular}{|c|c|c|} \hline {\bf Arm Name} & {\bf Oracle Value $O_a$} & {\bf Adjustment Range} \\ \hline A & -.2 & [-0.2, 0.0] \\ B & -.1 & [-0.1, 0.1] \\ C & 0 & [0.0, 0.2] \\ \hline \end{tabular} \label{tab:mab-arms} \end{center} \end{table} \section{Approach}\label{sec:approach} To address the short horizon problem that arises in our motivating domain, we explored three ideas: (1) improving the oracle used by the MAB strategies, (2) employing fixed exploration patterns, and (3) exploring the efficacy of a collection of MAB strategy families, including a new adaptive variant of UCB which we call {\em UCBT}. We describe these three ideas below. \subsection{Regression Oracle}\label{sec:approach-regression-oracle} A typical MAB strategy, such as $\epsilon$-greedy, will remember the rewards received for each pull of each arm and estimate the expected reward of a given arm by calculating the mean of those previously observed rewards. We call this calculation procedure the {\em oracle} used by the strategy to predict the expected reward of a given arm at the current time step. The policy for such a strategy only needs to compare the expected values for the rewards of all arms to determine which it should pull to receive the greatest reward. Other strategies like UCB1 additionally incorporate an estimation of the confidence interval to choose which arm to pull at each time step. However, we note that these types of oracles make two assumptions inherent to the standard MAB problem formulation: (1) they assume reward distributions are stationary, and (2) they assume reward distributions of different arms are unrelated. Both of these assumptions are violated in our motivating domain (and in any domain involving repeatedly interacting with the same human subject). Standard approaches for non-stationary rewards (see Section~\ref{sec:related-work}) such as weighted averages with decaying weight for past observations would not be useful in our short horizon setting; they would not be sample-efficient enough, nor would they leverage the type of patterns observed in human walking behavior. To address this, we propose replacing the standard oracle used in MAB strategies with a {\em regression oracle} that makes a prediction based on not only the past observed rewards for a given arm, but on all past observed rewards. We implement this regression oracle by collating the previously observed rewards into a linear regression model, one that is capable of potentially capturing some of the temporal patterns we anticipate to be present in the generated step data. We expect this model to provide more accurate predictions of the expected values of arm rewards than simple means of past observations. Specifically, at a given time step $t$ our regression model takes an input vector $\hat{x}_{t,a} = (\rho_{t-1},... , \rho_{t-m}, O_a)$, containing the observed rewards for the past $m$ iterations ($m = 7$ in our experiments), and $O_a$, which indicates the arm $a$ for which we desire to generate a prediction (values of $O_{a}$ for each of the 3 arms in our experiments are shown in Table~\ref{tab:mab-parameter-values}). The model is trained to predict $\rho_{t,a}$, the expected reward we would obtain when pulling arm $a$ at time $t$. Each time an arm is pulled and a reward observed, an OLS regression is performed on all the past observations to determine an updated set of regression coefficients $\beta$. The next time ($t$) an arm must be selected, a predicted reward value $\hat{\rho}_{t,a}$ is calculated for each arm $a$ as follows: \begin{equation}\label{eq:regression-prediction} \hat{\rho}_{t,a} =\sum_{i=1}^{m}\beta_i\hat{x}_{t,a,i} \end{equation} Notice that this is a strict generalization over calculating the mean; if there are no temporal correlations that can be exploited, the $\beta$ parameters corresponding to the reward for the past $m$ time steps will converge to either: (a) 0, and the coefficient for the $O_a$ parameter will converge to the mean reward for arm $a$ divided by $O_a$, or (b) a uniform distribution, and the coefficient of the $O_a$ term will be used to distinguish the reward of each arm. However, if temporal patterns or correlation among arms do exist, this oracle will be able to exploit them. More elaborate regression models could be devised, but given that we are focusing on the short horizon scenario and we cannot expect the model to be trained with more than a few dozen data points, simple linear regression is justified. Also, we note that this formalization is very reminiscent of a contextual bandit, where we could consider the rewards observed over the past $m$ steps as the context vector. Moreover, we are also aware that because the observed rewards in the previous time steps depend on the arm being pulled, we are violating one of the basic assumptions of the MAB problem formulation--namely, that the bandit should be stateless, and previous arm selections should not affect future rewards. Our problem therefore resembles more a reinforcement learning setting than a bandit setting. However, we choose to approach it with MAB strategies due to the focus on short horizon; introducing the notion of state would imply more parameters to estimate in the model and would thereby decrease sample efficiency. \subsection{Exploration Patterns}\label{sec:approach-exploration-patterns} Most bandit strategies, such as $\epsilon$-greedy, rely on stochastic exploration of the arms. However, in short horizon settings, stochastic exploration might not be appropriate, and alternative strategies that perform heavier exploration at the beginning have been proposed. In order to determine the behavior of different exploration patterns, we compared a range of MAB strategies in both step simulators: \newcounter{mablist} \begin{enumerate} \item UCB~\cite{Auer2002}: selects the arm with the highest potential reward based on confidence intervals around the average of past rewards. \item $\epsilon$-greedy: selects the ``best'' performing arm except when (with probability $\epsilon$) it {\em explores} by choosing a random arm. \item $\epsilon$-decreasing: similar to $\epsilon$-greedy, except with exploration probability $1/t^\epsilon$. \setcounter{mablist}{\value{enumi}} \end{enumerate} Additionally, for each of the strategies we explored the idea of {\em forced exploration} periods in which the MAB strategy is not permitted to engage its policy until each arm has been explored a specified number of times. During the forced exploration period, all arms are pulled an equal number of times, but the order in which they are pulled remains random. It is worth noting that we did not include the $\epsilon$-first strategy, as we view $\epsilon$-first to be simply $\epsilon$-greedy with forced exploration, a modification that could be similarly applied to any MAB strategy. Moreover, although this is only strictly necessary for UCB strategies, in our experiments all strategies (UCB, $\epsilon$-greedy, and $\epsilon$-decreasing) still undergo a forced exploration period of one pull per arm (in random order) to establish an estimate for the mean reward for each arm. Thus, in our experiments, when we label a strategy with {\em forced exploration}, we refer to a forced exploration period of four pulls per arm before engaging the strategy's policy, whereas {\em no forced exploration} refers to forced exploration of just one initial pull per arm. \begin{table}[t!] \caption{Parameters for strategies in both simulation environments.} \begin{center} \begin{tabular}{|c|c|c|} \hline {\bf Strategy} & {\bf Stationary Step Simulator} & {\bf Pattern Step Simulator} \\ \hline UCB1 & $C=2500$ & $C=1600$ \\ $\epsilon$-greedy & $\epsilon=0.11$ & $\epsilon=0.03$ \\ $\epsilon$-decreasing & $\epsilon=0.7$ & $\epsilon=1.0$ \\ \hline \end{tabular} \label{tab:mab-parameter-values} \end{center} \end{table} \subsection{UCBT Strategy}\label{sec:approach-ucbt} The UCB1 algorithm leverages the Chernoff-Hoeffding bounds~\cite{Auer2002} to provide an estimate of the upper confidence bound for a reward distribution derived from the observed rewards and a variance factor based on the number of observations. For reward distributions not confined to $[0, 1]$, often an additional {\em exploration factor} $C$ is also included to empower the variance factor to influence the oracle's valuation to a degree appropriate for the scale of rewards: \begin{equation}\label{eq:ucb1-calculation} UCB1_a = \bar{x}_a + C\sqrt{\frac{2\ln{t}}{{n_a}}} \end{equation} \noindent where $\bar{x}_a$ is the mean of the rewards observed so far for arm $a$, $n_a$ is the number of times arm $a$ has so far been selected, and $t$ is the current time step. UCB1 is a popular strategy but may hold disadvantages in some applications. For instance, not every scenario can normalize rewards to $[0, 1]$, such as when rewards have no upper limit. In these cases, the $C$ factor must be specially tuned to the scenario in order for the strategy to work effectively. However, some applications do not provide a means for pre-sampling and tuning this factor, in which case UCB1 may underperform. In our scenario, rewards are unbounded, and thus to address this problem, we designed an alternative strategy {\em UCBT} that considers traditional statistical confidence bounds using sample variance. Because the variance factor calculation includes this consideration for the scale of rewards, the additional exploration factor $C$ is no longer required. UCBT does presume normality in the underlying reward distribution and therefore constructs a confidence interval using Student's $T$ distribution. The critical value $t^*$ used in our experiments was drawn from a $T$-distribution lookup table with a 1-sided critical region and 99\% confidence. We used a factor from a standard normal distribution ($t^*=2.326$) when degrees of freedom exceeded 200. Specifically, on pull $t$, UCBT selects the arm $a$ for which the following yields the greatest value: \begin{equation}\label{eq:ucbt-calculation} UCBT_a = \bar{x}_a + t^* \frac{s_a}{\sqrt{n_a}} \end{equation} \noindent where $s_a$ is the sample standard deviation of the rewards so far observed for arm $a$. We must note that UCBT will not function properly when all observations are identical (i.e., sample variance is zero). Also, prior to engaging its policy, UCBT requires each arm to be selected two times in order to establish an estimate for confidence interval for each arm; this results in what is effectively a forced exploration period of two pulls per arm. The next section presents experimental results to evaluate each of the three ideas considered in this paper to address the short horizon bandit problem in our target domain. \section{Experimental Evaluation}\label{sec:results} To evaluate our ideas, we compared six different bandit strategies: UCB1, UCBT, $\epsilon$-greedy, $\epsilon$-decreasing, $\epsilon$-greedy with regression oracle ($\epsilon$-greedy regression) and $\epsilon$-decreasing with regression oracle ($\epsilon$-decreasing regression). For each of the strategies above that required tuning a parameter, we ran a series of experiments (each running 10 million times with a horizon $h=70$) over potential values for their respective parameters (i.e., $C$ or $\epsilon$) to find the value at which the strategy performed the best against our simulations. Table~\ref{tab:mab-parameter-values} contains the values we used in our experiments. We conducted several experiments in which all six MAB strategies were evaluated, and we discuss the performance of the MAB strategies in the following contexts: (1) in the stationary step simulator, (2) in the pattern step simulator, (3) with a four-period forced exploration phase in both simulators, and (4) in an evaluation of UCB1 vs. UCBT. All experiments were conducted with a horizon of $h = 70$ (i.e., 10 weeks if assuming daily interaction with a player), which is a significantly shorter horizon than what is usually considered in the bandit literature. For each strategy and experiment, we recorded the rewards observed at each of the 70 time steps of the experiment, and we report the average of 1 million runs. \subsection{Results in the Stationary Step Simulator}\label{sec:results-distribution-simulation} \begin{figure}[t!] \includegraphics[width=\columnwidth]{img/gammaonly-combined.png} \centering \caption{Average reward over time for different MAB strategies without forced exploration (above) and with forced exploration (below) in the stationary step simulator.} \label{fig:gammaonly-combined} \end{figure} \begin{table}[t!] \caption{Average rewards in stationary step simulator ($h=70$)} \begin{center} \begin{tabular}{|c|c|c|c|c|} \hline & \multicolumn{2}{|c|}{\bf No Forced Exploration} & \multicolumn{2}{|c|}{\bf Forced Exploration} \\ \cline{2-5} & Overall & Last 7 Days & Overall & Last 7 Days \\ \hline UCB1 & 8989.7 & 9114.5 & 8982.8 & 9129.6 \\ UCBT & 8949.8 & 9096.0 & 8946.6 & 9097.8 \\ $\epsilon$-greedy & 8919.6 & 9001.9 & 8947.0 & 9064.1 \\ $\epsilon$-decr. & 8930.1 & 9022.0 & 8956.7 & 9083.2 \\ $\epsilon$-greedy reg. & {\bf 9087.4} & {\bf 9216.4} & 9034.7 & 9207.8 \\ $\epsilon$-decr. reg. & 9003.7 & 9141.3 & {\bf 9036.7} & {\bf 9213.8} \\ \hline \end{tabular} \label{tab:results-distribution} \end{center} \end{table} The reward distribution in the stationary step simulator is fixed, and the steps generated one day do not hold any correlations to steps from previous days. Average rewards across all steps from $t = 1$ to $t = 70$ for each MAB strategy (without forced exploration) can be found in the left columns of Table~\ref{tab:results-distribution}, and average reward over time is shown in the upper graph in Figure~\ref{fig:gammaonly-combined}. \begin{table}[t!] \caption{Average rewards in Pattern Step Simulation ($h=70$)} \begin{center} \begin{tabular}{|c|c|c|c|c|} \hline & \multicolumn{2}{|c|}{\bf No Forced Exploration} & \multicolumn{2}{|c|}{\bf Forced Exploration} \\ \cline{2-5} & Overall & Last 7 Days & Overall & Last 7 Days \\ \hline UCB1 & 8538.3 & 8586.0 & 8542.2 & 8616.6 \\ UCBT & 8506.4 & 8597.2 & 8500.0 & 8594.6 \\ $\epsilon$-greedy & 8525.6 & 8560.4 & 8532.8 & 8602.7 \\ $\epsilon$-decr. & 8531.4 & 8577.4 & 8531.6 & 8612.0 \\ $\epsilon$-greedy reg. & {\bf 8648.7} & {\bf 8713.6} & 8606.8 & 8712.0 \\ $\epsilon$-decr. reg. & 8607.6 & 8695.9 & {\bf 8609.4} & {\bf 8724.1} \\ \hline \end{tabular} \label{tab:results-pattern} \end{center} \end{table} \begin{figure}[t!] \includegraphics[width=\columnwidth]{img/realsteps-combined.png} \centering \caption{Average reward over time for different MAB strategies without forced exploration (above) and with forced exploration (below) in the pattern step simulator.} \label{fig:realsteps-combined} \end{figure} The first thing we observe is that even in the stationary step simulator where there are no temporal correlations among steps, the strategies with the regression oracle still outperformed the other four strategies. In strategies that do not use the regression oracle, the expected rewards of each arm are calculated independently from each other. However, in the case of the regression oracle variants, rewards observed for {\em all} previous iterations (including those for other arms) are used for estimating expected reward. Since in our scenario the rewards of different arms are correlated (i.e., they all correspond to the number of daily steps for the same player), this enables the regression oracle to estimate the expected reward of each arm earlier and more accurately. \subsection{Results in the Pattern Step Simulator}\label{sec:results-pattern-step-simulation} As discussed above, the pattern step simulator attempts to structure a temporal correlation among daily steps that reflects the relationships observed in real human walking behavior. Average rewards across all steps without forced exploration in this simulator are shown in the left columns of Table~\ref{tab:results-pattern}, and average reward over time is shown in the upper graph of Figure~\ref{fig:realsteps-combined}. In the experiment without forced exploration, the regression oracle strategies struggle in the early steps as the regression models begin to populate with observations. However, these two strategies very quickly overtake the other four strategies once enough data has been collected. Interestingly, notice that this happens as early as step 10, indicating that the regression oracle requires very little data to start making a difference. We also observe that the more clustered rewards of the pattern step simulator allow the strategies to converge in performance to a greater degree than the higher variance rewards of the stationary step simulator. Most important, these experiments strongly support our expectations regarding the regression oracle's advantage when working with data containing temporal patterns. \subsection{Forced Exploration Results}\label{sec:results-forced} These same experiments were repeated with a forced exploration period of four pulls per arm, the results of which are presented in the right-hand side of Tables~\ref{tab:results-distribution} and~\ref{tab:results-pattern} for the stationary and pattern step simulators respectively. The lower graphs in Figures~\ref{fig:gammaonly-combined} and~\ref{fig:realsteps-combined} show the average rewards observed by the MAB strategies over time. Results show that the relative order in performance among the six MAB strategies does not change (with the exception of $\epsilon$-decreasing regression slightly outperforming $\epsilon$-greedy regression). The use of forced exploration endures a cost of lower rewards during the forced steps with the expectation of higher rewards afterward to reclaim that cost. Looking at the Last 7 Days columns in Tables~\ref{tab:results-distribution} and~\ref{tab:results-pattern}, comparisons can be made for any of the MAB strategies regarding performance with and without forced exploration. As it can be seen, forced exploration strategies generally obtain a higher reward in the last time steps than strategies without forced exploration. However, because of the lower reward early on, the average reward across the whole experiment is generally lower or even. Therefore, we conclude that if the target horizon in a given application domain is very short (even shorter than our horizon of 70), forced exploration may not provide advantage in our domain, but it may still be advantageous in scenarios with (short) horizons longer than 70. \subsection{Results of UCBT Exploration}\label{sec:results-ucbt} In the results presented in the previous sections, it may appear that our new strategy UCBT is outperformed by UCB1. However, those results correspond to UCB1 using $C = 1600$, which was the parameter value that performed the best in our pre-experiments. However, if $C$ is not correctly tuned, UCB1 can significantly underperform. Figure~\ref{fig:ucb-comparison} displays the results of UCBT versus UCB1 with different values for $C$. We show results both for a well tuned value ($C=1600$) as well as a poorly tuned value ($C=10000$). UCBT is scenario-agnostic and does not require any parameters or preparatory tuning. As the results demonstrate, UCB1 with an appropriate $C$ parameter excels in the early pulls and throughout the experiment, while the UCB1 strategy with the inappropriate $C$ parameter struggles. The UCBT strategy has a slower start due to the two-period forced exploration required to construct variance metrics for each arm; however, UCBT quickly catches up to match the performance of the optimal UCB1 in a relatively short horizon test. Thus, we believe UCBT is an promising strategy for real scenarios where it is not possible to tune the $C$ parameter beforehand. An example might be when we deploy our MAB strategies with real human players and find that some exhibit step distributions significantly different from those used to generate the simulators in this paper, where each would require different values for $C$. \begin{figure}[t!] \includegraphics[width=\columnwidth]{img/ucbcomparison.png} \centering \caption{Comparison among three UCB variants in the stationary step simulator. The UCBT strategy (which requires no parameter tuning) approaches the performance of the UCB1 strategy with a well-tuned C parameter and outperforms the UCB1 strategy with a poorly tuned C parameter.} \label{fig:ucb-comparison} \end{figure} \section{Discussion}\label{sec:discussion} One of the main contributions of this paper is the idea of using a {\em regression oracle} in multi-armed bandit strategies. The key idea is that rather than calculating the expectation over all the previous pulls of an arm to estimate the expected reward for that arm, we build a linear regression model that takes into account all the data obtained from the problem (including pulls from other arms). We argue that in real-world bandits, where each arm might represent a possible action in a given game or a potential intervention for a human subject, often the different arms are correlated: the subject for which we are choosing an action may present general characteristics that consistently influence rewards independent of the selected arm. Therefore, by using all the available information, we are able to learn these general trends and converge to an accurate estimation of the expected reward of an arm faster than when considering only the rewards of each arm independently. Of course, linear regression is just one among the many possible regression techniques that could be used. As part of our future work, we would like to analyze regression oracles in different stochastic bandit problem scenarios to better understand the potential benefits. For example, in the case where there are no temporal trends in the reward function but arm reward functions are still correlated, we hypothesize that a regression oracle will still provide the benefit of estimating the expected reward of an arm faster than traditional methods. If this is true, we should be able to replicate its effect with a simpler oracle that considers the deviation of new rewards from the mean of all rewards so far observed. This is a hypothesis we would like to test in the future, as it could result in new bandit strategies that perform better than existing ones in short horizon situations. Notice that in the long horizon setting, we should see no benefits from a regression oracle unless there are temporal trends in the reward function. In the limit, the bandit strategy's reward estimates should converge to the real rewards, regardless of whether it uses data from arms together or independently. Therefore, our strategies should have the same theoretical properties as existing strategies in the limit (e.g., linear cumulative regret for $\epsilon$-greedy or logarithmic for $\epsilon$-decreasing). We would therefore like to emphasize again that the main contribution of our work is in improving the behavior of bandit strategies in very short horizon scenarios, which have been understudied in the literature, but are more realistic when applying bandits to problems involving humans. Concerning our new strategy UCBT, this paper only showed empirical results without any theoretical bound on regret growth. Our intuition is that UCBT should still have logarithmic cumulative regret growth like UCB1, but building a proof is still part of our ongoing work. As our experiments demonstrate, however, UCBT showed superior performance than a poorly tuned UCB1. When compared to a well tuned UCB1 strategy, UCBT struggles initially, though it appears to quickly catch up in our short horizon scenario. This is interesting for two reasons. First, it means that UCBT might be more appropriate when we need to deploy an MAB strategy to a real-world problem for which we do not have sample data beforehand and cannot tune $C$ in advance. Second, UCBT might be useful beyond just standard bandit problems. For example, when algorithms such as MCTS~\cite{browne2012survey} are applied to games where rewards are not clearly bounded, the challenge of finding a $C$ that works well for all nodes in the MCTS tree might invite UCBT as an interesting alternative. We plan to study these possibilities and thoroughly analyze UCBT's theoretical properties in our future work. Finally, we would like to reiterate that although the scenario where a bandit interacts repeatedly with the same human is often modeled as an MAB problem (as we do in this paper), it violates some of the basic assumptions of the MAB problem formulation. In particular, when an arm represents an intervention, it will by design influence the subject and thereby alter the reward function for future iterations. Strictly speaking, this is closer to reinforcement learning (as there is state) than bandits (which are stateless). However, as we have shown, it is still possible in practice to use MAB strategies in these problems with good performance. \section{Conclusion}\label{sec:conclusion} This paper focused on the problem of short-horizon multi-armed bandits, where we can only expect to have a small number of iterations to interact with the environment. These short-horizon problems are common in real-world situations, such as when using bandits to interact with human players in games (for example, for player modeling~\cite{gray2020player}), but they have been understudied in the literature. We presented three key ideas: regression oracles, a comparison of different exploration strategies with forced exploration in the short horizon setting, and a new variant of the UCB1 strategy called UCBT. Our results show that regression oracles do not only help in the case where there are temporal patterns in the reward function, but also in the absence of such patterns when reward functions of different arms are still related. Our UCBT strategy was found to approach the performance of UCB1, but without any parameter that required tuning ahead of time. Regression oracles applied to standard $\epsilon$-greedy or $\epsilon$-decreasing strategies were found to be the best strategies among those we experimented with in the short horizon setting. As part of our future work, we would like to extend the idea of regression bandits to apply them to UCB-style strategies, where the confidence term would be replaced by an estimation of the confidence bound of the linear regression estimator. We would also like to analyze the theoretical properties of both UCBT and the inclusion of a regression oracle in $\epsilon$-greedy strategies. Finally, in our current work, we have been deploying these ideas for player modeling in the context of exergames~\cite{gray2020player}. \bibliographystyle{IEEEtran}
\section*{\label{intro}Introduction} An important collective phenomenon observed in groups of biological cells is the process of cell sorting, where cells of different types spontaneously spatially segregate into separate compartments. These distinct compartments not only play an integral role during an organism’s formative stages~\cite{Trinkaus1955a,Waites2017b,Unbekandt2010,Montero2005,Klopper2010}, but are also crucial for the upkeep of normal functioning of organs~\cite{Rubsam2017,Cochet-Escartin2017a} and for containment of the spread of diseased/infected tissues~\cite{Friedl2004,Foty2005,Pawlizak2015,Song2016}. Broadly speaking, cell sorting mechanisms can be classified into two generic categories- (a) biochemical/morphogen gradients~\cite{Turing1990,Streichan2018} and (b) differences in mechanical properties of individual cells. These mechanical properties can include cell-cell adhesivity~\cite{Steinberg1963a,STEINBERG2007281}, acto-myosin contractility~\cite{Harris1976b,Brodland2002a,Mertz2012a,Maitre2012b}, a mechano-chemical coupling between both cell-cell adhesivity and acto-myosin contractility~\cite{Amack2012a,Manning2010c,Engl2014}, or an explicit interfacial tension between unlike cells, often called heterotypic interfacial tension (HIT)~\cite{Graner1992,Barton2017,Canty2017a,Sussman2018b}. Much of the computational and theoretical work on cell sorting has focused on particle mixture simulations. In such mixtures, the mechanism for sorting relies heavily on active fluctuations~\cite{PhysRevE.85.031907,Merks2005,Sun2013,Jiang1998,Palsson2008}. However, an essential feature of cell sorting that is observed in experimental co-cultures is that the interface is much sharper than what is expected from a particulate mixture~\cite{Landsberg2009a,Manning2010b,Dahmann2011,Nnetu2012a,Monier2011,Calzolari2014}. While such a straight and sharp interface is difficult to obtain merely by diffusive morphogens, heterotypic interfacial tensions in confluent tissues, where there are no gaps between cells, can generate a sharp interface easily~\cite{Kesavan2020,Sussman2018b,Sahu2020b}. In such cases, the fact that a confluent monolayer must tessellate space, which is captured in vertex or Voronoi models for tissues, results in forces that are discontinuous functions of cell displacements. It is precisely this non-analytic behaviour resulting from topological interactions between cells that drives sharpening in two dimensions. And yet, the tissue remains fluid-like such that the sharp interface is also easily deformable. Such sharp but deformable interfaces are not observed in particle-based models with metric interactions between cells. While confluent monolayers, with a single layer of cells, are biologically relevant, fully three-dimensional confluent tissues, such as stratified epithelia or early vertebrate embryos, are even more ubiquitous. Therefore, it is important to determine if/how the topological nature of the interactions between the cells also drive sharp but deformable interfaces in three dimensions. Prior work on topological models for cell sorting in three dimensions focused on cells coalescing into small clusters via a Rayleigh-Plateau instability as well as regions of mixed cell types untangling to facilitate compartmentalization in the absence of fluctuations~\cite{PhysRevLett.101.148105}. In this manuscript we instead focus on quantifying the dynamics and cell geometries in the presence of fluctuations, and identifying the topological mechanisms driving cell sorting in three dimensions. One goal is to study the dynamics of cell sorting in confluent fluid-like tissues by implementing HIT in the presence of fluctuating forces in 3D. Indeed, we demonstrate that HIT is an efficient sorting mechanism and that, unsurprisingly, the magnitude of HIT governs the timescale for segregation in 3D. Unfortunately, it is rather difficult to test this prediction in experiments, as it is quite difficult to measure the magnitude of HIT. In laser ablation experiments on monolayers, cuts are made to ablate a cell-cell junction with the help of a pulsed laser. The resultant relaxation dynamics can help determine line tensions~\cite{Sugimura2016}. However, ablating interfaces and recording retractions along arbitrary interfaces is very difficult in 3D, and has not been yet used to estimate HIT in 3D. Indirect measures using few-cell assays, such as double pipette aspiration experiments, suggest that HIT can create robust cell sorting in 3D tissues~\cite{Rubsam2017,Tsai2019,Maitre2012b}. However, using isolated cells for measuring effective tension may not provide a complete picture as a confluent neighborhood can significantly change a cell's mechanics~\cite{Canty2017a,Sussman2018b}. Recent work has shown that geometrical properties of interfacial cells in a confluent neighborhood can be directly affected by increased interfacial contractility and tension~\cite{Okuda2015,Sussman2018b,Yang2009}. Therefore, a second goal is to explore the idea that cellular geometry can perhaps be used as a simpler and more direct readout of HIT in 3D mixtures, as geometric features have recently become more accessible in experiments due to advances in tissue segmentation techniques. In addition to developing tools for measuring HIT, a third goal of this work is to identify the mechanisms driving cell sorting in 3D. For a fluid-like particulate mixture, the mechanism is simple, as the minimum energy state is a configuration that minimizes the shared surface area. In the presence of large enough fluctuations the system can find a simple geometry that achieves this goal via complete spatial segregation with a strong gradient at the interface~\cite{CanongiaLopes2002,Majumder2011,Chremos2014}. In confluent tissues, however, there are cell-scale geometric constraints that may compete with macroscopic interfacial dynamics. Specifically, in vertex models for isotropic confluent tissues~\cite{Nagai2001, Farhadifar2007a,Teleman2007,Staple2010a,Manning2010b,Hilgenfeldt2008, Chiou2012,Bi2015c,Fletcher2014,Merkel2018}, cells attempt to attain a preferred cell shape index, which is dimensionless ratio of perimeter P and area A i.e. $ s_0^{2D} = P/\sqrt{A}$ in 2D~\cite{Bi2015c,Bi2016b}, and of surface area S and volume V i.e. $s_0^{3D} = S/V^{2/3}$ in 3D~\cite{Merkel2018}. If the cells are able to attain their preferred cell shape, which generally happens in isotropic tissues for elongated shapes with $s_0^{2D} >~ 3.81 $ and $s_0^{3D} >~ 5.41 $, then the tissue is fluid-like, while if they are unable to attain that shape the tissue is solid-like. Moreover, as discussed above, 2D results suggest specific features of the 2D cell-scale geometry help pin cells at a heterotypic interface, although it is not trivial to generalize the arguments to 3D. Therefore, we study whether these cell-scale constraints, which vary with tissue rheology, impact cell sorting in 3D. We develop simple toy models to demonstrate that a competition between the bulk cell shape preference and geometric pinning of cell shapes at the heterotypic interface drive both cell sorting and the formation of specialized geometric features at the HIT interface. Finally, we confirm the predictions made by the toy models with full numerical simulations. \section*{Model} To understand the interfacial mechanics between two cell types, we use the recently developed 3D Voronoi model~\cite{Merkel2018}. A system with periodic boundaries is created using a Voronoi tessellation of the cell centers of $N$ cells. Individual cells have preferred volumes $V_0$ and surface area $S_0$. The combination of volume incompressibility and surface area regulation due to adhesion and contractility generate a preferred cell shape index $s_0=S_0/ V_0^{2/3}$. For example, a regular BCC unit cell (truncated octahedron), has a dimensionless shape index of $s_0\sim 5.31$~\cite{Lucarini2009}. Here we set $V_0$ to 1. Half of the cells are tagged differently, creating a mixture of two cell types- $\beta=1$ or $\beta=2$, which are otherwise identical except there is heterotypic interface between cells of different type. Of course, in experimental systems there are likely mechanical differences between different cell types in addition to HIT. Here we ignore those differences to study effects driven by HIT, as our previous work in 2D suggests that sorting driven by innate mechanical differences is significantly weaker than HIT\cite{Sahu2020a}. In addition to the original monodisperse energy functional, we impose an additional surface tension along the heterotypic interface. Therefore cells minimize their mechanical energy using the following dimensionless energy functional: \begin{equation} \label{eq:HST_3} e = \sum_i{\bigg[k_v(v_i-1)^2+(s_i-s_0)^2\bigg]} + \sum_{\langle i,j\rangle}(1-\delta_{\alpha\beta})\sigma a_{ij}\text{,} \end{equation} where $v_i$ denotes the $i$th cell volume and $s_i$ denotes its surface area, non-dimensionalized by $V_0$. The unit of length is defined such that the average cell volume $\langle V_i\rangle$ is 1. Additionally, $k_s=K_{V}/K_{S}$ sets the ratio between volume and area stiffnesses, and is also set to unity. The second summation imposes an additional surface tension between heterotypic cells, where the sum is over all facets with area $a_{ij}$ shared between cells $i$ and $j$ of types $\alpha$ and $\beta$ respectively. The surface tension $\sigma$, for simplicity, is assumed to be the same for all facets. It is non-dimensionalized by $K_S V_0^2$ which is unity for our system. Biological cells can establish heterotypic tension by co-regulating the acto-myosin network and adhesion molecules~\cite{Amack2012a}. A biologically relevant estimate of the heterotypic to homotypic tension ratio, based on examination of the contact angles at cell vertices in ectoderm-mesoderm co-cultures in Xenopus~\cite{Canty2017a}, indicates $\sigma\sim2$ in natural units of the system. For systems with fluctuations, we analyse the dynamics of over-damped self-propelled particles with a high angular noise, which effectively leads to Brownian dynamics at the timescales relevant to us. The timescales are reported in units of the self-diffusivity timescale $\tau_s^0$, details of which are provided in Supplemental section \ref{3dspp}. While there are other possible dynamical rules, recent work on 2D mixtures has shown that the properties of an interface between two cells types with HIT between them is rather robust to the specifics of the dynamical rules~\cite{Sussman2018b}. For analyzing behavior in the absence of fluctuations, we use a conjugate gradient minimizer. See Supplemental section \ref{3dspp} for more details. \section*{Results} {\it Demixing parameter:} To test if HIT leads to significant segregation in 3D tissues, in a manner similar to that of 2D mixtures~\cite{Sahu2020a}, we first focus on a fluid-like parameter regime~\cite{Merkel2018} where cells undergo diffusive motion ($s_0>5.41$). For a fixed shape index $s_0=5.5$, we start from an initially mixed configuration Fig~\ref{fig:dp_3}(a) with a system size of $N=512$ cells. We let the system evolve long enough so each cell on average explores a distance equivalent to the simulation box length. Let us now understand the role of HIT on the bulk demixing. For a fixed $\sigma=1$, a final configuration for such a mixture is shown in Fig~\ref{fig:dp_3}(b). It is clearly segregated as compared to the initial snapshot. Some fraction of ensembles are able to create a planar interface as well. To quantify this demixing, we study the demixing parameter DP~\cite{Sahu2020a}, which measures the average neighborhood composition of every cell. Defining $N_s$ as the number of homotypic (similar cell type) neighbors and $N_t$ as the total number of neighbors, \begin{equation} \label{eq:dp_3} DP=\big \langle DP_i \big \rangle = \bigg \langle 2\bigg(\frac{N_s}{N_t} - \frac{1}{2} \bigg) \bigg \rangle, \end{equation} where the brackets denote averaging over all cells in the tissue. In a completely mixed state, $DP=0$, whereas in a completely sorted mixture, $DP=1$, in the limit of infinite system size. However, as large system sizes can be time-consuming, we compute the maximum attainable value of demixing ($DP_{max}$) for a particular system size by looking at minimal surface configurations as shown in Fig.~\ref{fig:dp_max}. Hence we plot the demixing parameter relative to this maximum value in Fig~\ref{fig:dp_3}. The value of demixing is zero at the beginning as both the cell types are seeded at random positions, but it soon attains a high value, very close to $DP_{max}$. In the presence of HIT, the value of demixing increases quickly, indicating that it can efficiently create robust segregation \textemdash very similar to a liquid-liquid particulate mixture and 2D confluent mixtures. \begin{figure}[htp] \centering \includegraphics[width=\columnwidth]{DP_panel.jpg} \caption{\textbf{ Sorting in fluid-like binary tissue with HIT}: Initial(a) and final(b) snapshots of a $s_0=5.5$ mixture with high tension of $\sigma=1$ and system size of $N=512$. Both cell types denoted by red and blue polyhedra. (c) Quantification of segregation: demixing parameter DP versus simulation time in units of self-diffusivity timescale $\tau_s^0$ for increasing tension $\sigma=0.001,0.003,0.010,0.032$ (pink to blue). } \label{fig:dp_3} \end{figure} In the presence of fluctuations, we find that HIT efficiently leads to significant segregation in mixed 3D tissues. We also observe that with higher values of tension, the initial phase of the sorting process becomes faster as shown in Fig.~\ref{fig:dp_3}. This confirms that heterotypic surface tension is very effective at compartmentalization in 3D, as expected. {\it Geometric features:} While biological cells are capable of upregulating tension cables along heterotypic interfaces via biochemical pathways, it is very difficult to directly measure this tension within a 3D tissue. Can features of individual cells at the interface help us quantify such tensions? In this section, we focus again on fluid-like systems with $s_0=5.5$. A visual inspection of the segregated mixture shown in Fig~\ref{fig:dp_3}(b) indicates that the interfacial cells may be more elongated and nematically ordered as compared to the cells in the interior. This observation hints at a direct relationship between the applied tension and the surrounding cellular geometry. To delve deeper into the ways in which the surrounding cells deform, we set up a maximally segregated mixture. Here, both compartments are placed side by side, similar to previous work by Sussman \textit{et al}~\cite{Sussman2018b}. We then study the cellular geometry as a function of the applied interfacial tension. Shape elongation along with the prominent stacking of cells (alignment of the polyhedral long axes in Fig.~\ref{fig:bilayer_panel}(a)) can be observed here as well. We next quantify such geometric effects. The first quantity is the steady-state cell shape index $s$. This helps us quantify whether or not the otherwise homogeneous cells remain homogeneous after HIT is established. We measure the shape of both interfacial cells- cells that directly touch the boundary ($s_{boundary}$), and the interior cells ($s_{bulk}$). This further helps isolate the shape changes in the immediate neighborhood of the interface. Individual cells have a final volume $V_i$ and surface area $S_i$. Hence, $s_{boundary}$ is defined as: \begin{equation} \label{eq:s_3} s_{boundary}= \bigg \langle \frac{S}{V^{2/3}}\bigg \rangle_{boundary}, \end{equation} and $s_{bulk}$ is similarly averaged over the interior cells. In the absence of HIT ($\sigma=0$), both shapes have the same value of $s_0=5.5$. Both the shape indices are shown as a function of increasing tension in Fig.~\ref{fig:bilayer_panel}(b). For small values of tension, the shapes indices are very similar at the beginning, but they gradually saturate at a higher value of disparity. In other words, with a higher interfacial tension, the neighboring cells become more elongated, whereas the interior cells become more compact/round. To study the alignment between cells, we next measure the orientation of interfacial polyhedra. We define orientation vector of a cell as the major axis of its moment of inertia tensor. We then plot the angular distribution of the angle made by each vector with respect to the normal to the interface ($\theta$), which in this bilayer arrangement is simply the z axis. For a homogeneous system with no HIT, the angles are very close to the random distribution density function in 3D, which is proportional to $\sin \theta$. But with a slight increase in tension, the cells polarize and orient themselves perpendicular to the interface, as shown in Fig.~\ref{fig:bilayer_panel}(c). Lastly, we study polygonal faces that make up the heterotypic interface by plotting the facet area distribution with respect to increasing tension. This is in analogy to the measurement of edge lengths in 2D work~\cite{Sussman2018b}. With no HIT, the distribution is roughly uniform up to a characteristic length scale, whereas, with increasing tension it becomes bimodal, as shown in Fig.~\ref{fig:bilayer_panel}(d). This means that the facets are either large or vanishingly small at high tensions. With the help of smaller facets, the interfacial vertices come very close to having a vertex coordination higher than the normal tetrahedral coordination, similar to the 4-fold vertices observed along 2D tension cables. The average area of a facet, $<a>$, also increased with increasing tension as shown in Fig.~\ref{fig:facet_max}. This quantitatively confirms that HIT indeed affects the geometry of the surrounding cells, inducing shape changes and nematic-like ordering in an otherwise homogeneous collection of cells. Since some similar geometric features have been observed in 2D models for confluent tissues~\cite{Sussman2018b}, we hypothesize that the origin of these signatures in 3D might be based on topological interactions between the cells which have been implicated in 2D. \begin{figure}[htp] \centering \includegraphics[width=0.9\columnwidth]{bilayer_panel.jpg} \caption{\textbf{Cellular geometry changes around the high-tension interface}: (a) Snapshot of the bilayer arrangement of sorted compartments for a high value of HIT, $\sigma=20$. Only the blue cell type is emphasized here, colored by major axis length. Greenish-blue is for elongated and purple for rounder cells. The white rods denote the long axis of the polyhedron. (Caption continued on next page.)} \label{fig:bilayer_panel} \end{figure} \addtocounter{figure}{-1} \begin{figure} [t!] \caption{(Continued from previous page.) (b) Acquired cell shape index (s), plotted with respect to tension ($\sigma$), is higher for interfacial cells (solid green curve) as compared to the cells in bulk (dashed blue curve). (c) Rose plot for the distribution of orientation angle of interfacial cells is shown for increasing tension ($\sigma$). The control distribution ($\sigma$=0) is superimposed on a faint black curve that represents the density for uniform distribution i.e $\sin \theta$. (d) The probability distribution $P(a)$ of heterotypic facet area $a$ is shown for increasing tension $\sigma=0.32,1.00,2.00$ (magenta to blue). For these data, N=512 and $s_0 = 5.5$. } \end{figure} In order to determine the mechanism driving these geometric changes, we first focus on the specific geometry of an interfacial cell and ask: what does it take for the system to attain this precise geometry? A typical interfacial neighborhood is shown in Fig.~\ref{fig:interface_zoom}(a). A right prism can be defined as a polyhedron with flat top and bottom facets, and perpendicularly aligned lateral facets. The cells here seem to closely resemble the geometry of a one-sided right prism, with the flat side at the interface. The unique shape can be attained in a Voronoi tessellation only by fulfilling two conditions : (a) cell heights are arranged in a plane, and (b) interfacial pairs align their centers so the distance between centers in the XY plane is minimized. One way to quantify this alignment is to measure it as the registration- $R$ between the cell centers. We define it as- \begin{equation} \label{eq:R} R= 1-\frac{d}{l_0} , \end{equation} where $l_0$ is the typical lengthscale and $d$ is the distance between centers along the interfacial plane as depicted in Fig.~\ref{fig:interface_zoom}(a). The value of $l_0$ is set to unity as $V_0^{1/3}=1$ in our systems. When cell centers are completely registered its value attains a maximum value of unity. We quantify both of the aforementioned criteria and find them both fulfilled for higher values of tension, as shown in Fig.~\ref{fig:interface_zoom}(b-c). Moreover, the insets to each figure show that the cell geometries approach the right-prism condition monotonically as a function of increasing HIT. \begin{figure}[htp] \centering \includegraphics[width=0.95\columnwidth]{interface_panel_vert_zm.jpg} \caption{\textbf{Interfacial cells are prism-like}: (a) A simulation snapshot highlighting the cells at both sides of the interface. Cell types are tagged in blue and red and made translucent to make their centers (white solid spheres) visible. To characterize the high alignment between the heterotypic cell centers we use cell-cell registration $R$ defined in the main text in terms of the distance $d$ between the centers along the interface (highlighted in red) and the characteristic cell length $l_0$ (denoted by the black scale bar). (b) Distribution $pdf(z)$ of the heights of cell centers $z$ for blue interface cells is plotted for increasing tension $\sigma=0.03,0.10,0.31,1.00$ (magenta to blue). The dashed black line depicts a system with no HIT. The inset shows the standard deviation $\Delta z $ with as a function of the HIT $\sigma$. (c) Distribution of registries pdf($R$) between heterotypic cells is plotted for increasing tension. The inset shows the averaged registry with respect to tension. The lowest value of tension has the same average distance as no tension at all. The circle radii corresponds to the deviation from the mean values. } \label{fig:interface_zoom} \end{figure} From work in 2D we understand that perturbations perpendicular to the surface of the interface are very costly~\cite{Sussman2018b}, but cell-cell registration requires perturbations to the cell center that are parallel to the interface. In the SM we extend the 2D calculation to study the effects of parallel perturbations by changing the cell-cell registration. In the 2D toy model, we find that parallel perturbation incurs exactly the same energy penalty as a perpendicular perturbation up to linear order. Similar to the perpendicular perturbation, the parallel perturbation along the heterotypic interface requires the system to form new, high tension edges which are energetically very costly. Therefore, the cell centers are laterally pinned. In \ref{3Dcalc} we explore if de-registration in 3D systems creates a similar effect. We find that in an idealized hexagonal tissue, such a perturbation creates several new HIT facets, suggesting that a similar mechanism is operating in 3D. {\it Mechanisms:} To better understand the pinning mechanism in 3D, we next develop two ordered toy models in 3D and study the response in the limit of zero fluctuations. Although the data shown so far, and work by some of us in 2D~\cite{Sussman2018b}, focused exclusively on the fluid-like regime with $s_0^{2D} > 3.81$ and $s_0^{3D} > 5.41$, we are also interested in how tissues close to the fluid-solid transition balance interfacial and bulk effects. Therefore, our first toy model is initialized in a BCC lattice, as a ground state for the shape $s_0\sim5.31$. We fix $s_0=5.31$ to this ground state value, which we expect to be solid-like. This is similar to our recent work on ordered hexagonal monolayers~\cite{Sahu2020b}, but here we are investigating a different form of local perturbation in 3D. In this work, we study the response of the system to a change in the registry $R$. In these ordered systems, we now use the lattice spacing as the lengthscale $l_0$ in the definition for registry in Eq.~\ref{eq:R}. We enable a string of polyhedra to slide past the string below (shown in Fig.~\ref{fig:bcc_panel}(a) insets), with an extra surface tension along the shared interfacial strip between both the sets of polyhedra. We compute the shared surface area and total energy of the system. We also find the global minima for different values of tension. We find that the shared surface area is minimized for increased registration values (shown in Fig.~\ref{fig:bcc_panel}(a)). While this suggests that perhaps complete registration is an energetically preferred state in some regimes, surprisingly, that is true only after a threshold value of tension. This can be seen by plotting the change in total energy with respect to increasing registration. One can observe two kinds of minima in the system \textemdash parabolic and `cuspy'~\cite{Sussman2018b}. While the former is common in particle-based models, with a spring-like potential locally around the minima, the later has a discontinuity in its slope due to topological pinning, which is expected from a 2D calculation as discussed in \ref{2Dcalc}. Physically, this means that the system experiences a steep linear rise in energy due to the formation of a new interfacial edge along the high tension cable, resulting in discontinuous pinning forces that are independent of the magnitude of perturbation, as shown in Fig.~\ref{fig:bcc_extra}(b). The parabolic minima, on the other hand, have a continuous an linear restoring force, the slope proportional to the stiffness of the parabola. We plot the registration of energy minima as a function of interfacial tension in Fig.~\ref{fig:bcc_panel}(c). \begin{figure}[htp] \centering \includegraphics[width=\columnwidth]{BCC_panelVert.jpg} \caption{\textbf{Global minimum becomes registered for higher tension}:(a) Shared surface area (shaded in dark for all snapshots) is computed as a function of the registration between the different cell types. The string of blue cells is allowed to move past the string of stationary pink cells. Snapshots for no, half and complete registration is shown for encircled points. (b) The change in the total energy of this system is plotted with respect to registry, for different values of tension ranging from 1 (pink) to 4 (blue) in increments of 0.25. (c) The ground-state registration is plotted for increasing tension. The solid curve represents the global minima. The dashed curves represent the local minima, parabolic in blue and cuspy in black. The inset zooms about the critical tension at which the transitions occurs between both types of minima. For all panels $s_0$ is set to $5.31$, the ground state for the BCC lattice.} \label{fig:bcc_panel} \end{figure} We observe two different branches corresponding to the two types of minima discussed before. For very low tension, shape preference dominates (as shown in Fig.~\ref{fig:bcc_extra2}(a)) and the system stays in BCC configuration. For moderate values of tension the system stays in the parabolic branch, but continuously transitions to non-zero registry. Just below the critical value of $\sigma_c\sim 3$, both the shape and interfacial energies become comparable (Fig.~\ref{fig:bcc_extra2}(b)) and at $\sigma_c$ the system discontinuously transitions to the tension-dominated- cuspy branch. The registration value also jumps to $R=1$. This branch originates at $\sigma\sim2$. Both kinds of minima become more stable as the tension increases. Stability is parameterized by the curvature or stiffness for parabolic minima in Fig.~\ref{fig:bcc_extra}(a) and by the linear slope or restoring force for the cuspy minima in Fig.~\ref{fig:bcc_extra}(c). In summary, for the solid-like toy model, we find that the physical mechanism that drives registration at high tension values is very similar to that of 2D systems. However, the story changes at lower values of tension where shape frustration begins to play a dominant role. This leads to minima that are partially-registered and exhibit a spring-like response to small perturbations, i.e. states are no longer topologically pinned. In 2D studies focused exclusively on fluid-like tissues~\cite{Sussman2018b}, only the cusp-like states were observed. This leads us to hypothesize that perhaps we observe a transition between normal, parabolic restoring forces to non-analytic cusp-y restoring forces in tissues that are more solid-like. Perhaps in more fluid-like systems the interfacial costs always dominate over the cost of cell shapes in the bulk, whereas in more solid-like systems the bulk effects dominate when the interfacial tension is low. To test this hypothesis, we develop a second toy model that is also ordered but not constrained to a string. Instead it is free to move along the 2D interface to change its registration. With this flexibility, we can explore the energetics of more elongated cell shapes like that of a uniform hexagonal prism ($s_0\sim5.72$). The interfacial cells can therefore be much more elonagated and fluid-like as compared to the minimal-perimeter-cells in a BCC lattice that have shape values as small as $s_0\sim5.31$. The interfacial layers are placed in HCP format as shown in Fig.~\ref{fig:hcp_trial}(b). There are buffer cells placed above and below the interface in a disordered fashion and are allowed to relax during the course of the perturbation. Analogous to the the previous analysis, we compute the shared surface area and change in the energy profile with respect to registration, but this time for a wide range of cell shapes across the fluid-solid transition. We find that similar to the BCC toy model, the shared surface area decreases with registration as shown in Fig.~\ref{fig:hcp_extra}(a). For cell shapes near the rigidity transition, shape frustration plays a dominant role in the system's energy (Fig.~\ref{fig:hcp_extra}(b)). However, it becomes negligible for more fluid-like cell shapes as shown in Fig.~\ref{fig:hcp_trial}. This suggests that in fully disordered fluid-like systems, interfacial tension dominates shape preferences in determining interface geometry and response. \begin{figure}[htp] \centering \includegraphics[width=\columnwidth]{HCP_Registry.jpg} \caption{\textbf{Shape frustration is less dominant for more fluid-like cell shapes}: (a,b) Snapshots for both the models are shown where both cell types are depicted in blue and red. Cell centers are depicted by solid spheres of respective cell color. (c) The ground-state registration for HCP toy model (filled hexagrams) is plotted with respect to tension, for increasing values of cell shape $s_0=5.4,5.5,5.6,5.7$ from orange to green. For comparison, the registration in BCC model (solid circles) is also shown here in red. } \label{fig:hcp_trial} \end{figure} Finally, we verify the toy model predictions by first studying the geometry of disordered mechanically stable states in planar segregated HIT simulations, for different values of HIT and preferred cell shape. We let the system come to a steady state in the presence of fluctuations that can help the system find lower and lower energy metastable minima in the complex potential energy landscape. Fig~\ref{fig:phaseDiag} shows the registration as a function of interfacial tension and target cell shape index $s_0$. The data demonstrate that just as in the toy models, the average registration rises rapidly to unity -- its maximum value -- when the interfacial tension increases above a threshold value. Moreover, for solid-like shapes the onset occurs at a higher threshold tension of order unity, while for fluid-like tissues the onset occurs when HIT is more than an order of magnitude lower than the typical tensions between homotypic cells. In the supplement, we also confirm that the highly registered states are associated with cusp-like restoring forces, highlighted in Fig.~\ref{fig:SI_bulk}. \begin{figure}[h!] \centering \includegraphics[width=\columnwidth]{color.jpg} \caption{\textbf{Transition to complete registration shifts for fluid-like cell shape in a disordered 3D simulation}: A heat-map for the average steady-state registration is shown as function of cell shape $s_0$ and interfacial tension $\sigma$. Yellow denotes complete registration and blue denotes partial registry. The registry between heterotypic cell-pairs is averaged over 200 different initializations. } \label{fig:phaseDiag} \end{figure} \section*{Discussion and Conclusions} By studying a computational Voronoi model for confluent tissues in the presence of fluctuations, we show that three-dimensional binary mixtures, with heterotypic interfacial tension (HIT), sort robustly. This supports the claim that HIT is an important mechanism driving sharp compartmentalization during early embryonic development~\cite{Kesavan2020,Canty2017a}, and that it may be important for tissue segregation in other situations. In addition to these collective dynamics, HIT also drives individual cells towards a prism-like geometry at the interface. We find that the onset of these geometric signatures depends on a balance between the the magnitude of interfacial tension and constraints introduced by the the preferred cell shape that also govern the bulk tissue rheology. To understand the onset of these geometric signatures, we use cell-cell registration at the interface as a probe of the stability of these prism-like structures. We construct two simple toy models and study their energetics with respect to registry. In solid-like tissues, we find that for an interfacial tension $\sigma>\sigma_c$, the ground state is completely registered, which gives rise to a prismatic geometry. These states are topologically pinned, due to cusp-like pinning forces, previously observed in 2D mixtures with HIT. But for tensions $\sigma<\sigma_c$, interfacial energy is dominated by shape frustration and hence the ground state is less well-registered. The linear response of these minima is spring-like and not cuspy. Our data suggests that $\sigma_c$ decreases significantly as the tissue becomes more fluid-like. This has important implications for development and tissue segregation, as it suggests that as tissues are tuned to be more solid-like, topological pinning at heterotypic interfaces is greatly reduced, thereby reducing the sharpness possible at compartment boundaries. In other words, it suggests the somewhat counterintuitive design principle for confluent systems that fluid-like rheologies lead to sharper interfaces. We have also shown that a change in the magnitude of the interfacial tension can have a pronounced effect on the neighboring cellular geometry, by elongating interfacial cells into prism-like polyhedra oriented perpendicular to the interface. The observable facet areas also become larger. With the advancement of 3D segmentation techniques~\cite{Khan2014,Stegmaier2016,Browet2016,Fernandez-de-Manuel2017,Morales-Navarrete2019}, one can use these signatures as a toolkit to probe interfacial tensions in a 3D tissue, so that cells themselves can tell us about relative magnitudes of tissue surface tension nearby. One example case where this might be useful is in detecting the invasiveness of a carcinoma tumour. Our simple model would predict that if interfacial cell centers in the tumor are registered to those of the surrounding healthy tissue, then the interface has a higher surface tension and therefore it may be more unlikely for cells to exit the tumor and invade their surroundings. It would be interesting to see if there are any vestiges of this prediction that occur in pre-cancerous situations in real-world systems, such as Ductal carcinoma in situ (DCIS). Another example is that of a stratified epithelium, where one can also study the interaction between two nearby tissue types, such as the basal and suprabasal layers, and look for geometric signatures across the interface. A prism-like geometry would strongly suggest the presence of an interfacial tension between these two tissue types. The prism-like geometry of cells can be visually detected using the En Face imaging technique\cite{Yokouchi2016,Rubsam2017}. As some current segmentation algorithms can also make predictions about 3D shape from random 2D cross-sections, these geometric signatures could potentially be characterized along the cross-sections~\cite{Sharp2019}. In general 3D tissue have complex interfacial geometries. Hence, one of the future avenues of this work would be to study the dependence on the curvature of the interface. Additional work should also focus on teasing apart how topological pinning affects dynamics in more general scenarios. For example, a natural extension of our general framework is to study two different cell shapes mixed together. After all, in realistic situations cells of two different tissue types likely also differ in preferred cell shape. In 2D, some of us have determined that unique extrusion behaviour can emerge due to differential pinning of cells~\cite{Sahu2020a}, and something similar could occur in 3D. Topological pinning might be affecting the cell sorting dynamics as well. Presumably, less pinning can lead to seamless coarsening of nearby droplets, while more pinning can hinder the coalescence, and alter the sorting process. This would also be an interesting avenue for future study. While our work demonstrates that changes to individual cellular geometries are a necessary consequence of HIT and tissue-scale segregation, these changes to cellular geometry could also be used as a signal to facilitate downstream patterning near interfaces. For example, the elongation of cells near a high-tension interface might trigger oriented cell divisions along the long-axis of these cells. We speculate that perhaps biology can make use of this subtle feedback for processes like targeted cellular proliferation during early phases of embryonic development. \subsubsection*{Acknowledgement} We thank Paula Sanematsu, Matthias Merkel, Daniel Sussman and Cristina Marchetti for helpful discussions, and M. Merkel for developing and sharing the original version of the 3D Voronoi code. This work was primarily funded by NSF-PoLS-1607416 and NSF-PoLS-2014192. PS and MLM acknowledge additional support from Simons Grant No. 454947. \bibliographystyle{unsrtnat}
\section{Introduction}\label{sec:INTRODUCTION} Supervised Machine Learning (ML), especially embodied by Convolutional Neural Networks (CNNs), has become state of the art for automatic interpretation of various data. However, the applicability and acceptance of such approaches are greatly hindered by the lack of labeled datasets for both training and evaluation (and, consequently, for the verification of their quality). For that purpose, large datasets of labeled 2D imagery were established, for example the \textit{ImageNet} dataset \citep{Deng2009}. As such an extensive annotation process cannot be accomplished by a single person or group, crowdsourcing was employed. Whereas 2D imagery can be very well interpreted by non-experts (i.e., crowdworkers), labeling 3D data is much more demanding. Although first investigations were conducted on employing crowdworkers for 3D data annotation \citep{Dai2017,Herfort2018,Walter2020,Koelle2020}, these approaches typically try to avoid deriving a full pointwise annotation. This is achieved either by working on object level or by focusing only on necessary points by exploiting active learning techniques. However, at least for evaluating ML models for semantic segmentation, full annotations are beneficial, which are typically acquired by experts. In case of 3D data, existing datasets can be categorized into three different domains (comprehensive literature reviews are given by \cite{Griffiths2019} and \cite{Xie2020}): indoor data, outdoor terrestrial data, outdoor airborne data. \\ \begin{figure}[htbp] \begin{center} \includegraphics[width=0.65\columnwidth,trim=0 10 120 10, clip]{figures/test_sites/Splitsneu.jpg} \caption{Partition of the H3D(PC) dataset into training (\textit{class colors}; see Table~\ref{tab:classes}), validation (\textit{yellow box)} and test set (\textit{grey}). Data splits of H3D(Mesh) are identical but organized in tiles (\textit{individually colored according to data splits in transparent manner}). As can be seen, H3D(Mesh) exceeds H3D(PC) in terms of covered area. } \label{fig:Splits} \end{center} \end{figure} \textbf{i) Indoor data.} Indoor 3D data typically depicts various scenes in living space or working environments, often captured by RGB-D sensors such as \textit{Microsoft Kinect} \citep{Silberman2012,Song2015}. Generally, even non-experts are familiar with such scenes, which is why the annotation process can be outsourced to crowdworkers, for instance via \textit{Amazon Mechanical Turk} \citep{Buhrmester2011}. This is realized by providing (pre-segmented) data embedded in easy to handle tools as described in \cite{Dai2017} and \cite{Silberman2012}. For better interpretability, often multi-modality is realized in the sense that acquired point clouds are meshed to obtain a well-defined closed surface representation \citep{Hua2016}. \textbf{ii) Outdoor terrestrial data.} Capturing outdoor terrestrial data has become most popular in the context of autonomous driving. Cars destined for self-driving are equipped with a great variety of different sensors such as cameras, laser scanners, and odometers. Often only the combination of these sensors allows a comprehensive understanding of the complete scene, which is studied extensively on the basis of the well-known KITTI dataset \citep{Geiger2012}. Although Mobile Laser Scanning (MLS) point clouds of typical urban scenes are often provided as stand-alone products \citep{Roynard2017, Munoz2009, Hackel2017}, the concurrent availability of LiDAR data and imagery in the form of meshes is often pursued \citep{Riemenschneider2014}. \cite{Caesar2020} provide a unique multi-modal dataset for autonomous driving applications by the combination of both cameras and ranging sensors (i.e., LiDAR \& RADAR) for 3D object detection. \textbf{iii) Outdoor airborne data.} Datasets of this category are often referred to as (large-scale) geospatial data and deviate from the previous ones due to a significantly increased distance between target and sensor, which is attached to an airborne platform (mostly small aircraft). So far, publicly available datasets provide labeled point clouds obtained from a single sensor, either a camera \citep{Hu2020} or a LiDAR sensor \citep{Varney2020}. One prominent example of the latter case is the Vaihingen 3D (V3D) dataset acquired by \cite{Cramer2010}, which served as the basis for the ISPRS 3D Semantic Labeling benchmark \citep{Niemeyer2014}. Additionally, some national mapping agencies publish large-scale annotated LiDAR point clouds as open data, which typically realize a rather coarse class catalog and a point density of up to about \unit[40]{pts/$\text{m}^2$} \citep{ANH3,FinlandNS}. For obtaining higher LiDAR point densities, the carrier of the sensor can be replaced by a helicopter platform allowing the generation of data with point densities of up to about \unit[350]{pts/$\text{m}^2$} \citep{Zolanvari2019}. Due to the high point density and the resulting depiction of fine structures, the authors opt for expanding the corresponding class catalog. \\ The Hessigheim 3D (H3D) dataset presented in this paper belongs to the third group but differs from other datasets because it is the first ultra-high resolution, fully annotated 3D dataset acquired from a LiDAR system and cameras integrated on the same Unmanned Aerial Vehicle (UAV) platform. This results in a unique multi-modal scene description by a LiDAR point cloud H3D(PC) and a textured 3D mesh H3D(Mesh). Hence, properties unique for these two acquisition methods can be efficiently combined, which offers new possibilities for high-accuracy georeferencing \citep{Glira2019} and semantic segmentation \citep{Laupheimer2020}. We consider H3D to be the logical successor of V3D, which was already captured in 2008 and therefore no longer represents the state of the art. As H3D was acquired from a UAV platform by the usage of state-of-the-art sensors, a point density that is about a hundred times higher compared to V3D can be achieved, allowing the expansion of the class catalog of V3D. The rest of this paper focuses on presenting H3D as a new benchmark dataset. This includes a detailed presentation of data acquisition, the registration process, and a discussion of the unique characteristics of H3D (Sections~\ref{sec:datacapt}-\ref{sec:Mesh}). Sections~\ref{sec:catalog} and~\ref{sec:GT} are dedicated to present the class catalog and the annotation process for H3D(PC) and H3D(Mesh). As we aim at generating a benchmark for semantic segmentation, Section~\ref{sec:splits} describes the general structure of H3D, i.e., the partitioning into disjoint subsets for training, validation, and testing. As labels of the test set are not disclosed to the public, labels are to be predicted by participants (Section~\ref{sec:task}) and transmitted to the authors for evaluation (Section~\ref{sec:metrics}). We present first results based on two state-of-the-art approaches for semantic segmentation to kick off the benchmark process and to give first baseline results (Section~\ref{sec:baselines}) before concluding with a summary in Section~\ref{sec:conclusion}. \section{The H3D Dataset}\label{sec:The H3D Dataset} The H3D dataset was originally captured in a joint project of the University of Stuttgart and the German Federal Institute of Hydrology (BfG) for detecting ground subsidence in the sub-mm accuracy range. For this monitoring application, the area of interest, which is the village of Hessigheim, Germany (see Figure~\ref{fig:Splits}), was surveyed at multiple epochs in March 2018, November 2018, and March 2019. Although all those datasets will be made publicly available, this paper only covers the first epoch (i.e., March 2018) as only this dataset has been labeled so far. Concerning later epochs, the data publication shall follow in the course of 2021. \subsection{Capturing H3D}\label{sec:datacapt} In all three epochs, our sensor setup was constituted of a \textit{RIEGL VUX-1LR} scanner and two oblique \textit{Sony Alpha 6000} cameras integrated on a \textit{RIEGL Ricopter} platform (see Figure~\ref{fig:Ricopter}). Considering a height above ground of \unit[50]{m}, we achieved a laser footprint of less than \unit[3]{cm} and a ground sampling distance of \unit[2-3]{cm} for the cameras. Using this setup, we obtain two distinct data representations: i) H3D(PC) and ii) H3D(Mesh) (see Section~\ref{sec:PC} and Section~\ref{sec:Mesh} respectively). \begin{figure}[htbp] \begin{center} \includegraphics[width=0.8\columnwidth,trim=0 0 0 55, clip]{figures/test_sites/Ricopter.jpg} \caption{\textit{Ricopter} platform equipped with \textit{Riegl VUX-1LR} scanner and two oblique \textit{Sony Alpha 6000} cameras used for capturing H3D.} \label{fig:Ricopter} \end{center} \end{figure} \subsection{H3D(PC)}\label{sec:PC} H3D was acquired by a total of $11$ longitudinal (i.e., north-south) strips and several diagonal strips (see Figure~\ref{fig:Density}). Scanner parameters (Pulse Repetition Rate and the mirror's rotation rate) and flying parameters (flying altitude and speed) were set for receiving a point distance of about \unit[5]{cm} both in and across flight direction. Hence, we obtain about \unit[400]{pts/m$^2$} for one single LiDAR strip and about \unit[800]{pts/m$^2$} for the complete point cloud due to strip overlap. As additional strips were flown for further block stabilization, in some areas significantly higher point densities are achieved (see Figure~\ref{fig:Density}). Compared to conventional Airborne Laser Scanning (ALS) flight campaigns applying manned platforms (see Figure~\ref{fig:oldvsnew} \textit{top}), this high-resolution point cloud allows a more comprehensive 3D scene analysis in comparison to existing datasets. For accurate co-registration of acquired strips with respect to available control planes (\cite{Haala2020}), trajectories were corrected by the bias model offered by the \textit{OPALS} software \citep{Pfeifer2014}. In this context, for each strip a constant offset for each trajectory parameter ($\Delta X$, $\Delta Y$, $\Delta Z$, $\Delta \omega$, $\Delta \varphi$, $\Delta \kappa$) was estimated. \begin{figure*}[htbp] \begin{center} \includegraphics[width=0.55\columnwidth,trim=0 0 0 0, clip]{figures/test_sites/Density.jpg} \hspace{0.5cm} \raisebox{0.5\height}{\includegraphics[width=0.18\columnwidth,trim=0 0 0 0, clip]{figures/test_sites/Density_legend.pdf}} \caption{Achieved point density of H3D(PC). Different point densities are due to diagonal strips for further block stabilization beneficial for adjustment of LiDAR strips. Flight trajectories of LiDAR strips are shown in \textit{black}.} \label{fig:Density} \end{center} \end{figure*} \begin{figure}[htbp] \begin{center} \includegraphics[width=0.93\columnwidth,trim=20 20 20 20, clip]{figures/test_sites/H3D_LGL_EYEDOME.jpg}\\ \vspace{0.2cm} \includegraphics[width=0.93\columnwidth,trim=20 20 20 20, clip]{figures/test_sites/H3D_EYEDOME.jpg} \caption{The same subset of the village of Hessigheim captured by a conventional ALS campaign carried out by the the state mapping agency of Baden-Wuerttemberg in 2016 (\textit{top}) and as it is depicted in H3D(PC) (\textit{bottom}).} \label{fig:oldvsnew} \end{center} \end{figure} Apart from the XYZ coordinates of each point, LiDAR inherent features such as the echo number, number of echos, and reflectance were measured. While up to \unit[6]{echos} were recorded per pulse emitted, the majority of subsequent echos (echo number~$> 1$) are second and third echos (see \textit{yellow} and \textit{green} color in Figure~\ref{fig:attributes} (a)). Instead of the intensity of received echos, we provide reflectance values\footnote[1]{\url{http://www.riegl.com/uploads/tx_pxpriegldownloads/Whitepaper_LASextrabytes_implementation_in-RIEGLSoftware_2017-12-04.pdf}}, which can be interpreted as range corrected intensity. Please note that these values were not corrected for differences in reflectance due to different inclination angles of the laser beam with the illuminated object surface. Reflectance values range from about \unit[-30]{dB} for objects of diffuse reflection properties such as vegetation or asphalt (\textit{dark blue} respectively \textit{light green} points in Figure~\ref{fig:attributes} (b)) and up to about \unit[20]{dB} for objects of directed reflection such as roof or fa\c{c}ade elements (\textit{red} points in Figure~\ref{fig:attributes} (b)). \begin{figure}[htbp] \begin{center} \subfigure[H3D(PC) - Number of echos]{\includegraphics[width=0.49\columnwidth,trim=10 10 10 10, clip]{figures/test_sites/RN.jpg}}~ \subfigure[H3D(PC) - Reflectance]{\includegraphics[width=0.49\columnwidth,trim=10 10 10 10, clip]{figures/test_sites/Refl.jpg}}~ \\ \subfigure[H3D(PC) - RGB as derived from H3D(Mesh)]{\includegraphics[width=0.49\columnwidth,trim=10 10 10 10, clip]{figures/test_sites/RGB.jpg}}~ \subfigure[H3D(PC) - Class labels]{\includegraphics[width=0.49\columnwidth,trim=10 10 10 10, clip]{figures/test_sites/Class.jpg}}~ \\ \subfigure[H3D(Mesh) - RGB]{\includegraphics[width=0.49\columnwidth,trim=10 10 10 10, clip]{figures/test_sites/Meshcolor.jpg}}~ \subfigure[H3D(Mesh) - Class labels transferred from H3D(PC)]{\includegraphics[width=0.49\columnwidth,trim=10 10 10 10, clip]{figures/test_sites/Meshlabel.jpg}}~ \caption{Available attributes of both modalities of H3D.} \label{fig:attributes} \end{center} \end{figure} Point cloud colorization was done in a two-step process. We first derived the mesh as outlined in Section~\ref{sec:Mesh}. Afterwards, we extracted an individual RGB tuple for each LiDAR point from the mesh texture by nearest neighbor transfer. The nearest neighbor interpolation in 3D space is a simple approximation of an occlusion-aware projection of 3D LiDAR points to image space (result is visualized in Figure~\ref{fig:attributes} (c)). Additionally, we provide a class label for every point (classes and the annotation will be discussed in Sections~\ref{sec:catalog} and~\ref{sec:GT}). Both plain \textit{ASCII} files and \textit{Las} files are used for data exchange. \subsection{H3D(Mesh)}\label{sec:Mesh} We generated the 3D mesh with software \textit{SURE} \citep{Rothermel2012}. For the geometric reconstruction of the scene, both LiDAR data and imagery were used to benefit from their complementary properties \citep{Mandlburger2017}. The fusion of both data sources results in a more complete mesh compared to a mesh derived from images only. For instance, urban canyons are difficult to reconstruct from imagery (due to required visibility in at least two images) but their reconstruction works smoothly for LiDAR data (where one received echo is already sufficient). Furthermore, the oblique images serve for texturing the generated 3D mesh, which allows a realistic representation of vertical faces (e.g., fa\c{c}ades in Figure~\ref{fig:attributes}). The mesh data is provided in a tiled manner. Each tile is given in both textured and labeled mode. For the textured form, each tile consists of i)~an \textit{obj} file describing the geometry and referring to (ii)~the \textit{mtl} file encoding material properties which links to the (iii)~texture atlas that provides textural information (\textit{jpgs}). Their labeled counterparts consist of an \textit{obj} file (containing the same geometry as the respective textured version) and a \textit{mtl} which encodes the class properties (i.e., the color-coding). Therefore, the labeled \textit{obj} files do not require texture atlases since they are pseudo-textured by the class labels. Additionally, we provide Centers of Gravity (CoGs) for each face along with the transferred labels as CoG point cloud. The CoG cloud is available as a plain \textit{ASCII} file enabling simple data handling and data exchange. \subsection{Class Catalog}\label{sec:catalog} For H3D(PC) and H3D(Mesh), we employ the same fine-grained class catalog, which is based on V3D but is refined due to H3D's higher point density (and due to the purpose of the Hessigheim project, which is monitoring the shipping lock depicted in Figure~\ref{fig:Splits}). This allows to differentiate more details than in V3D. Hence, we added classes \textit{Urban Furniture}, \textit{Soil/Gravel}, \textit{Vertical Surface} (e.g., found at the shipping lock in Figure~\ref{fig:attributes}) and \textit{Chimney} (see Table~\ref{tab:classes}). \begin{table}[htpb] \begin{center} \begin{tabular}{cl} \toprule class ID & class name\\ \midrule 0 & {\cellcolor{LowVeg}}\textcolor[rgb]{0,0,0}{Low Vegetation}\\ 1 & {\cellcolor{ISurf}}\textcolor[rgb]{0,0,0}{Impervious Surface}\\ 2 & {\cellcolor{Vehicle}}\textcolor[rgb]{1,1,1}{Vehicle}\\ 3 & {\cellcolor{UFurn}}\textcolor[rgb]{1,1,1}{Urban Furniture}\\ 4 & {\cellcolor{Roof}}\textcolor[rgb]{0,0,0}{Roof}\\ 5 & {\cellcolor{Facade}}\textcolor[rgb]{0,0,0}{Fa\c{c}ade}\\ 6 & {\cellcolor{Shrub}}\textcolor[rgb]{1,1,1}{Shrub}\\ 7 & {\cellcolor{Tree}}\textcolor[rgb]{1,1,1}{Tree}\\ 8 & {\cellcolor{Soil}}\textcolor[rgb]{1,1,1}{Soil/Gravel}\\ 9 & {\cellcolor{VertSurf}}\textcolor[rgb]{0,0,0}{Vertical Surface}\\ 10 & {\cellcolor{Chimney}}\textcolor[rgb]{1,1,1}{Chimney}\\ \bottomrule \end{tabular} \caption{Class catalog of H3D for epoch March 2018.} \label{tab:classes} \end{center} \end{table} \subsection{Generating Ground Truth Data for H3D}\label{sec:GT} As previously mentioned, the main objective of H3D is to provide labeled multi-temporal and multi-modal datasets for training and evaluation of ML systems for the task of semantic point cloud segmentation. For labeling H3D(PC) (see Section~\ref{sec:PC}), we established a manual process carried out by student assistants, resulting in an annotation as depicted in Figure~\ref{fig:attributes} (d). This classification was generated by extracting point cloud segments with uniform class affiliation (i.e., the point cloud was manually segmented into many small subsets of homogeneous class membership). Segments of each class were afterwards merged to form the semantic segmentation. The whole process was carried out with the help of \textit{CloudCompare} \citep{CloudCompare}. Quality control was accomplished in a two-stage procedure. First, the student assistants checked each other's labels, and finally, the authors verified the results as last instance. Despite the comprehensive quality check, we are aware of the fact that manual annotations are error-prone and label noise cannot be avoided. For the 3D mesh, we automatically transfer labels from the manually annotated point cloud by a geometry-driven approach that associates the representation entities, i.e., points and faces \citep{Laupheimer2020}. Therefore, the mesh inherits the class catalog (see Table~\ref{tab:classes}) of the point cloud. In comparison to the point cloud representation, the mesh is more efficient because only a small number of faces is required to represent flat surfaces. For this reason, the number of faces is significantly smaller than the number of LiDAR points (see Table~\ref{tab:occurences}). Consequently, several points are commonly linked to the same face. Hence, the per-face label is determined by majority vote of the respective LiDAR points. However, due to structural discrepancies, some faces remain unlabeled because no points can be associated with them (e.g., absence of LiDAR points or geometric reconstruction errors). These faces are marked by the pseudo class label~$-1$. Unlabeled faces cover about \unit[40]{\%} of the entire mesh surface. As can be seen from Figure~\ref{fig:Splits}, the majority of the unlabeled area (\unit[99.7]{\%}) belongs to parts where the mesh exceeds the labeled point cloud (due to the tiled mesh structure). For the overlap of LiDAR and mesh (i.e., the relevant data), \unit[84]{\%} of the surface carries an annotation. \begin{sidewaystable} \begin{adjustbox}{scale=0.76,center} \begin{tabular}{llllccccccccccc} \toprule & & & &\multicolumn{11}{c}{Classes}\\ \cmidrule{5-15} Modality & Split & total & & \textit{Low Veg.} & \textit{I. Surf} & \textit{Vehicle} & \textit{U. Furn.} & \textit{Roof} & \textit{Fa\c{c}ade} & \textit{Shrub} & \textit{Tree} & \textit{Soil} & \textit{V. Surf.} & \textit{Chimney}\\ \midrule \multirow{4}{*}{H3D(PC)} & \multirow{2}{*}{Train} & \multirow{2}{*}{\unit[59445106]{Pts}} & abs. & 21375614 & 10419635 & 258032 & 1159205 & 6279431 & 1198227 & 1077141 & 8086818 & 8590706 & 974976 & 25321\\ & & & rel. [\%] & 35.96 & 17.53 & 0.43 & 1.95 & 10.56 & 2.02 & 1.81 & 13.60 & 14.45 & 1.64 & 0.04\\ & \multirow{2}{*}{Validation} & \multirow{2}{*}{\unit[14464248]{Pts}} & abs. & 3738743 & 3212988 & 183263 & 455389 & 3052150 & 551996 & 341579 & 2218551 & 592510 & 101243 & 15836\\ & & & rel. [\%] & 25.85 & 22.21 & 1.27 & 3.15 & 21.10 & 3.82 & 2.36 & 15.34 & 4.10 & 0.70 & 0.11\\ \midrule \multirow{8}{*}{H3D(Mesh)} & \multirow{4}{*}{Train} & \multirow{2}{*}{\unit[923663]{Faces}} & abs. & 1333755 & 692922 & 44803 & 220790 & 455718 & 258606 & 184263 & 1258053 & 498072 & 2143730 & 5326 \\ & & & rel. [\%]& 25.81 & 13.41 & 0.87 & 4.27 & 8.82 & 5.01 & 3.57 & 24.35 & 9.64 & 4.15 & 0.10 \\ & & \multirow{2}{*}{\unit[136836.45]{m$^2$}} & abs. & 22146.7 & 12502.6 & 660.0 & 2990.7 & 7346.3 & 4123.1 & 2186.9 & 16935.5 & 9754.2 & 3797.2 & 59.4 \\ & & & rel. [\%]& 26.84 & 15.15 & 0.80 & 3.63 & 8.90 & 5.0 & 2.65 & 20.53 & 11.82 & 4.60 & 0.07 \\ & \multirow{4}{*}{Validation} & \multirow{2}{*}{\unit[2577554]{Faces}} & abs. & 266940 & 236243 & 28836 & 90050 & 245665 & 135410 & 59385 & 322881 & 39142 & 25936 & 3812\\ & & & rel. [\%]& 18.36 & 16.24 & 1.98 & 6.19 & 16.89 & 9.31 & 4.08 & 22.20 & 2.69 & 1.78 & 0.26\\ & & \multirow{2}{*}{\unit[37928.05]{m$^2$}} & abs. & 4443.6 & 4203.6 & 439.9 & 1276.1 & 4016.1 & 2223.7 & 829.8 & 4694.4 & 674.4 & 472.5 & 41.1 \\ & & & rel. [\%]& 19.06 & 18.03 & 1.89 & 5.47 & 17.23 & 9.54 & 3.60 & 20.13 & 2.89 & 2.03 & 0.18 \\ \bottomrule \end{tabular} \end{adjustbox} \caption{Class frequencies in the training and validation sets both for H3D(PC) and H3D(Mesh). For H3D(Mesh) we further present the class distribution in terms of covered area. Unlabeled faces are not considered for these statistics.} \label{tab:occurences} \end{sidewaystable} \subsection{Data Splits}\label{sec:splits} The datasets of all epochs are split into a distinct training, validation, and test area (see Figure~\ref{fig:Splits}). The splits are identical in both modalities and chosen in accordance with the mesh tiling. Since H3D is designed as a benchmark, labels of the test set are not disclosed to the participants of the benchmark. Whereas labels of the training and validation sets can be used by participants as desired, we recommend utilizing the pre-defined splits. Detailed statistics of class frequencies in the training and validation sets can be found in Table~\ref{tab:occurences} for both modalities (points vs. faces/CoGs) and are visualized in Figure~\ref{fig:class_distribution}. For the mesh, we additionally provide the area each class covers, measured by the area of faces assigned to the corresponding class. \begin{figure}[htbp] \begin{center} \includegraphics[width=0.86\columnwidth,trim=165 220 180 0, clip]{figures/test_sites/class_distribution-eps-converted-to.pdf} \caption{Class distributions of the training set $T$ and the validation set $V$ both for H3D(PC) and H3D(Mesh). For the mesh, the relative class distribution is given in terms of i) the face count and ii) the area $A$ of faces. Unlabeled faces are not considered in this figure.} \label{fig:class_distribution} \end{center} \end{figure} In case of the point cloud, the relative number of points for classes covering large areas (such as \textit{Low Vegetation}, \textit{Impervious Surface}, \textit{Tree} and \textit{Roof}) is naturally the highest. Regarding class \textit{Tree}, the number of points is further increased since multiple echos were received for one laser beam. The most underrepresented classes are \textit{Vehicle} and \textit{Chimney}. Although the relative class frequencies for the mesh are similar, we can observe that there are fewer instances of classes corresponding to the ground (\textit{Low Vegetation}, \textit{Impervious Surface} and \textit{Soil/Gravel}), which is due to large face elements used for representing such planar surfaces. On the other hand, the relative number of instances of class \textit{Tree} is increased, because vegetation surfaces are characterized by a high roughness and, thus are typically approximated by a large number of surface elements (i.e., faces.) \subsection{Benchmark Challenge}\label{sec:task} In contrast to V3D, the H3D benchmark challenge is twofold in terms of data representation. For both H3D(PC) and H3D(Mesh), we offer participants to use the training and validation dataset for developing ML approaches for supervised classification and then to apply those to the test dataset. Predicted labels are to be returned to the authors for evaluation (see Section~\ref{sec:metrics}). For the mesh, the predictions are to be returned to the authors as labeled CoG cloud (the respective plain \textit{ASCII} file of CoGs is provided by the authors). The authors will match the predicted per-face labels with the corresponding faces of the \textit{obj} files. Simply put, the CoG cloud is utilized as an efficient link to the underlying mesh structure to keep the memory footprint of submitted data low. The evaluation itself will be done on the mesh (\textit{obj} files). \subsection{Evaluation Metrics}\label{sec:metrics} Semantic segmentation results submitted by participants of the benchmark are evaluated by the H3D team by means of the derived confusion matrices. In order to obtain performance metrics for individual classes, the number of True Positives~($TP$), the number of False Positives~($FP$), and the number of False Negatives~($FN$) are determined for each class~$c$. These numbers are used for determining Precision~($P$) and Recall~($R$) (Equation~\ref{equ:1}~\&~\ref{equ:2}). Additionally, we derive a F1-score as the harmonic mean of $P$ and $R$ for each class (Equation~\ref{equ:3}) \citep{Goutte2005}. \begin{equation}\label{equ:1} \begin{aligned} P_c = \frac{TP_c}{TP_c+FP_c} \end{aligned} \end{equation} \begin{equation}\label{equ:2} \begin{aligned} R_c = \frac{TP_c}{TP_c+FN_c} \end{aligned} \end{equation} \begin{equation}\label{equ:3} \begin{aligned} \text{F}1_c = \frac{2 \cdot P_c \cdot R_c}{P_c+R_c} \end{aligned} \end{equation} To describe the total performance of a classifier, we combine individual class scores by computing i) the Overall Accuracy (\mbox{$OA=\sum_c TP_c/N$}, with $N$ being the total number of labeled instances) and ii) the mean F1-score (macro-F1). These measures are determined both for H3D(PC) and H3D(Mesh). In case of the latter, the evaluation is based on the covered area of correctly / incorrectly classified faces (as provided as CoG cloud by the participants). \section{Baselines}\label{sec:baselines} We initialize the H3D benchmark challenge by providing two baseline solutions for semantic segmentation of H3D. On one hand, we apply a conventional Random Forest (RF) classifier \citep{Breiman2001} relying on hand-crafted features (see Section~\ref{sec:RF}) and on the other hand, we use a Sparse Convolutional Network (SCN) as end-to-end learning approach (see Section~\ref{sec:SCN}). \subsection{Random Forest}\label{sec:RF} For semantic segmentation of the point cloud, we compute geometric features as proposed in \cite{Weinmann2015} and in \cite{Chehata2009} by estimating the structural tensor for a local neighborhood of each point. After extracting the Eigenvalues of that tensor, we can determine the characteristics of the respective point distribution by forming different ratios of Eigenvalues \citep{Weinmann2015}. As computing Eigenvalues and Eigenvectors eventually means to fit a plane to the local point set, we can further enhance our feature vector by taking into account the orientation of these planes. Furthermore, we consider height-based features by determining the height above ground (i.e., above the Digital Terrain Model (DTM) level; DTM is derived by \textit{SCOP++} \citep{Pfeifer2001}) for each LiDAR point. In addition to purely geometric features, LiDAR-inherent features such as echo ratio and intensity of the received echo are also used for the semantic segmentation. In order to establish a multi-scale approach and to analyze features on different levels of abstraction, we follow the recommendation of \cite{Weinmann2018a} and compute each feature for spherical neighborhoods of radii $r=1,2,3$ and \unit[5]{m}. To account for the high density of H3D, we expand the feature vector of each point by additionally deriving all geometric features for radii $r=0.125$, $0.25$, $0.5$ and \unit[0.75]{m}. To obtain mesh features, we follow the approach of \cite{Tutzauer2019} and encode each face by its CoG. In this way, we can on one hand compute all aforementioned geometric features for our CoG cloud. On the other hand, we preserve features of the mesh geometry by assigning mesh-inherent features such as face area, face density, and normal orientation to the respective faces. Furthermore, we transfer LiDAR-specific features to the mesh representation by the approach presented in \cite{Laupheimer2020}. For both the point cloud and the mesh, we additionally incorporate radiometric features. For this purpose, RGB tuples are converted to HSV color space and used together with Gaussian smoothed color values for the aforementioned spatial neighborhoods. Since a multitude of HSV tuples is encoded in each face, we additionally calculate the HSV variance for each face. Based on these features, a RF model is trained for H3D(PC) and H3D(Mesh). Prediction results for the test set can be found in Table~\ref{tab:baseline} (see discussion of results in Section~\ref{sec:discussion}). The RF models are parametrized by $100$ binary decision trees with a maximum depth of $18$. \cite{Niemeyer2014} have shown that pure pointwise results of the RF classifier can be further refined by a Markov Random Field (MRF). Therefore, we enhance our RF by an a posteriori probability-aware MRF-like smoothing (a posteriori probability is used as unary potential; points within \unit[0.5]{m} radius are considered for the regularization term). \begin{table*}[htbp] \begin{adjustbox}{max width=\textwidth} \begin{tabular}{llccccccccccccc} \toprule & &\multicolumn{11}{c}{F1-scores [\%]}\\ \cmidrule{3-13} Modality & Method & \textit{Low Veg.} & \textit{I. Surf} & \textit{Vehicle} & \textit{U. Furn.} & \textit{Roof} & \textit{Fa\c{c}ade} & \textit{Shrub} & \textit{Tree} & \textit{Soil} & \textit{V. Surf.} & \textit{Chimney} & mF1 [\%] & OA [\%]\\ \midrule \multirow{2}{*}{H3D(PC)} & RF & 90.36 & 88.55 & 66.89 & 51.55 & 96.06 & 78.47 & 67.25 & 95.91 & 47.91 & 59.73 & 80.65 & 74.85 & 87.43 \\ & SCN & 92.31 & 88.14 & 63.51 & 57.17 & 96.86 & 83.19 & 68.59 & 96.98 & 44.81 & 78.20 & 73.61 & 76.67 & 88.42 \\ \midrule \multirow{2}{*}{H3D(Mesh)} & RF & 89.35 & 89.06 & 61.38 & 57.65 & 93.29 & 82.16& 69.27 & 96.09 & 48.85 & 62.58 & 76.43 & 75.10 & 86.53 \\ & SCN & 89.82 & 83.66 & 61.05 & 52.24 & 87.09 & 81.01 & 59.75 & 95.06 & 51.00 & 56.61 & 70.22 & 71.59 & 83.73 \\ \bottomrule \end{tabular} \end{adjustbox} \caption{Baseline results of semantic segmentation for both H3D(PC) and H3D(Mesh). For the mesh, we report the performance metrics weighted by the covered surface.} \label{tab:baseline} \end{table*} \subsection{Sparse Convolutional Network}\label{sec:SCN} As deep learning has become a de-facto standard in most fields of pattern recognition, we also include a neural network in our baselines. In particular, we employ a 3D CNN in U-Net form with submanifold sparse convolutional layers \citep{Graham2018} to account for the typical spatial distribution of ALS point clouds. The network's general layout and training regime is described in \cite{SchmohlSoergel2019a}. It consists of $3$ downsampling levels and $21$ convolutional layers in total. The input data (point cloud or mesh) is discretized to sparse 3D voxel grids of \unit[25]{cm} side length and contains just the raw attributes (i.e., no features are computed as for the RF). In case of the point cloud, these are the measured point attributes (i.e., echo number, number of echos, reflectance \& RGB values) as described in Section~\ref{sec:PC}. For the mesh, voxels are derived from the CoG point cloud and attributed with the texture information (RGB) only. We tested also a configuration with additional normal information, since this is the most basic native mesh feature besides RGB. However, the achieved performance is slightly worse ($-0.6$ and $-2.34$ percent points for OA and mF1-score respectively). For evaluation, the inferred voxel labels are transferred back to the enclosed points or faces. Results are also reported in Table~\ref{tab:baseline}. \subsection{Discussion of Baseline Results}\label{sec:discussion} Within this chapter, we analyze the performance of our two baseline classifiers (see~Section\ref{sec:discussionPC} and~Section{sec:discussionMesh} respectively) for both H3D(PC) and H3D(Mesh) in order to develop a better understanding of challenges of H3D and to kick-off the benchmark competition. \subsubsection{H3D(PC)}\label{sec:discussionPC} \begin{figure}[htbp] \begin{center} \subfigure[Labels predicted by RF]{\includegraphics[width=0.49\columnwidth,trim=10 10 10 10, clip]{figures/test_sites/ifp2021-RF_view1.jpg}}~ \subfigure[Labels predicted by SCN]{\includegraphics[width=0.49\columnwidth,trim=10 10 10 10, clip]{figures/test_sites/ifp2021-SCNN_view1.jpg}}~ \\ \subfigure[Labels predicted by RF - close up]{\includegraphics[width=0.49\columnwidth,trim=10 10 10 10, clip]{figures/test_sites/ifp2021-RF_view2.jpg}}~ \subfigure[Labels predicted by SCN - close up]{\includegraphics[width=0.49\columnwidth,trim=10 10 10 10, clip]{figures/test_sites/ifp2021-SCNN_view2.jpg}}~ \\ \subfigure[Normalized confusion matrix for the RF classifier]{\includegraphics[width=0.49\columnwidth,trim=0 0 0 22, clip]{figures/test_sites/ifp2021-RF_cm.jpg}}~ \subfigure[Normalized confusion matrix for the SCN classifier]{\includegraphics[width=0.49\columnwidth,trim=0 0 10 22, clip]{figures/test_sites/ifp2021-SCNN_cm.jpg}}~ \\ \caption{Results of semantic segmentation on the test set of H3D(PC) for both our RF (\textit{left}) and our SCN classifier (\textit{right}).} \label{fig:predPC} \end{center} \end{figure} Generally, we can observe from Table~\ref{tab:baseline} that the RF and the SCN classifiers perform similarly well, with the SCN slightly better in terms of the OA and the mean F1-score. We want to stress that reached accuracies already exceed the best result of the V3D challenge (OA of \unit[85.2]{\%} by \cite{Zhao2018}), which underlines the superiority of high-resolution data. Both baseline solutions (RF \& SCN) achieve similar results for the ground classes \textit{Low Vegetation} and \textit{Impervious Surface}. However, performance for class \textit{Soil/Gravel} is rather poor in both cases for there is often confusion with other ground classes (see Figure~\ref{fig:predPC}). Since points of all ground classes incorporate similar geometric properties (e.g., similar normals and smooth surfaces), distinguishing these classes is only possible with the help of radiometric features such as reflectance or color information (see Figure~\ref{fig:attributes}). Whereas this performs well for \textit{Low Vegetation} vs. \textit{Impervious Surface}, segmenting points of \textit{Soil/Gravel} is rather demanding due to similar radiometric properties to \textit{Low Vegetation} (similar to bare soil) and \textit{Impervious Surface} (similar to debris and gravel). Similar radiometric and geometric properties are also the reason for the confusion of \textit{Shrub} with \textit{Tree} (greenish color in both cases and rough surfaces). Nevertheless, the extraction of tree points succeeds quite well, probably due to the distinctive multi-echo ability of the employed sensor (see Figure~\ref{fig:attributes} (a)). Regarding buildings, roofs can be extracted successfully, but the detection of fa\c{c}ades seems to be more demanding for both classifiers (see Table~\ref{tab:baseline}). This may be caused by the presence of fa\c{c}ade furniture (such as balconies with handrails and outdoor furniture differing from smooth fa\c{c}ades), which is similar to urban furniture. The confusion matrices in Figure~\ref{fig:predPC} further indicate that points of class \textit{Urban Furniture} are spread across many other classes. This is due to the great variety of objects belonging to this class, since essentially it serves as quasi-class \textit{Other}. Performance evaluation of classifiers for such fine-grained elements of fa\c{c}ade furniture and urban furniture could hardly be evaluated in the past due to the mostly insufficient representation of these fine structures resulting from the poor resolution of former datasets. Therefore this is a unique feature of H3D. In this context, a significant amount of misclassification can be observed for cars, which are predicted as \textit{Urban Furniture}. This can be explained by a great variety of colors in both classes and some special cases, such as the car-like shapes of covered wood piles often found in gardens (see the results in Figure~\ref{fig:predPC} (c) and (d) and their associated confusion matrices in (e) and (f)). The classes \textit{Vertical Surface} and \textit{Chimney} newly introduced compared to V3D, seem to be demanding as well. In this context, it is worth mentioning that whereas the RF classifier confuses fa\c{c}ades with other vertical surfaces as anticipated, this is not the case for the SCN, where only a small number of vertical surface points are allocated in class \textit{Fa\c{c}ade}. This may be due to the larger receptive field of \unit[20]{m} for the lowest SCN filters compared to the maximum neighborhood radius for feature computation of \unit[5]{m} in case of the RF. For chimneys, on the other hand, the RF classifier performs better probably due to the discretization of the SCN approach, so that the RF might capture such small structures more precisely for its pointwise working principle. To conclude, our baseline solutions indicate, that the depiction of detailed structures and the consequently expanded class catalog of H3D (compared to V3D) poses new challenges for the development of methods for semantic segmentation. Particularly, this applies to entities belonging to newly introduced classes but also for the interaction of those with representatives of common object classes (e.g., \textit{Vertical Surface} vs. \textit{Fa\c{c}ade}). \subsubsection{H3D(Mesh)}\label{sec:discussionMesh} \begin{figure}[htbp] \begin{center} \subfigure[Labels predicted by RF]{\includegraphics[width=0.49\columnwidth,trim=10 10 10 10, clip]{figures/test_sites/ifp2021_RF_viewport1.jpg}}~ \subfigure[Labels predicted by SCN]{\includegraphics[width=0.49\columnwidth,trim=10 10 10 10, clip]{figures/test_sites/ifp2021_SSCN_viewport1.jpg}}~ \\ \subfigure[Labels predicted by RF - close up]{\includegraphics[width=0.49\columnwidth,trim=10 10 10 10, clip]{figures/test_sites/ifp2021_RF_viewport2.jpg}}~ \subfigure[Labels predicted by SCN - close up]{\includegraphics[width=0.49\columnwidth,trim=10 10 10 10, clip]{figures/test_sites/ifp2021_SSCN_viewport2.jpg}}~ \\ \subfigure[Normalized confusion matrix for the RF classifier (weighted by face area)]{\includegraphics[width=0.49\columnwidth,trim=0 0 0 22, clip]{figures/test_sites/ifp2021_RF_cm_weighted.jpg}}~ \subfigure[Normalized confusion matrix for the SCN classifier (weighted by face area)]{\includegraphics[width=0.49\columnwidth,trim=0 0 10 22, clip]{figures/test_sites/ifp2021_SSCN_cm_weighted.jpg}}~ \\ \caption{Results of semantic segmentation on the test set of H3D(Mesh) for both our RF (\textit{left}) and our SCN classifier (\textit{right}).} \label{fig:predMesh} \end{center} \end{figure} In addition to results for H3D(PC), Table~\ref{tab:baseline} also reports per-class F1-scores, mF1, and OA for our baseline classifiers RF and SCN on H3D(Mesh). The respective confusion matrices are depicted in Figure~\ref{fig:predMesh} (e) and (f). Due to the non-uniformity of meshes, we evaluate the considered metrics concerning the covered surface for each entity. Each face contributes to the performance metrics depending on its surface area. By these means, a large face has more impact compared to a small face. This contrasts with point cloud evaluation where all points share the same weight. However, we observed that the weighted performance metrics scarcely differ from their unweighted counterparts, which indicates that the majority of large faces is correctly predicted. Moreover, their similarity hints at the constitution of the mesh. The automatically generated mesh differs from an ideal mesh in such sense that the non-uniformity of faces is kept small in order to uphold details in the reconstructed mesh. Loosely speaking, a large number of faces roughly share the same face area. Nonetheless, flat surfaces are represented by few large faces, whereas rough surfaces (e.g., vegetational classes) use many small faces (covering roughly the same area). Therefore, the effect of the surface-driven evaluation is best visible for classes that consist of flat surfaces. For instance, \unit[42]{\%} of faces predicted as vertical surfaces are fa\c{c}ades in reality (for SCN). Regarding covered area, this makes already \unit[46]{\%} of mispredicted facades. Generally, the feature-driven RF outperforms the data-driven SCN in terms of OA and mF1 by $2.8$ and $3.5$ percent points respectively. We assume that voxelization and the small set of input features mainly cause the slight inferiority of the SCN. Whereas the RF uses the underlying mesh geometry encoded in the variety of hand-crafted features (see Section~\ref{sec:RF}), SCN first voxelizes the textured data and learns features merely on the voxel representation. Furthermore, by utilizing transferred LiDAR features, RF implicitly leverages the fine-grained point cloud geometry that does not suffer from mesh reconstruction errors. Generally, fine-grained structures such as urban furniture and shrubs are demanding objects for meshing algorithms. Hence, the transferred LiDAR features enhance the geometric information and help to correctly classify non-correctly reconstructed structures. For these reasons, we deduce that the end-to-end learning approach cannot fully compete with the feature-driven RF in this case. The results further indicate that feature engineering and multi-modal feature transfer are valid alternatives to state-of-the-art end-to-end learning approaches. Apart from their varying overall performance, the confusion matrices of RF and SCN show similar strengths and weaknesses. Considering per-class F1-scores, we note similar performances for classes \textit{Low Vegetation}, \textit{Vehicle}, \textit{Fa\c{c}ade} and \textit{Tree}. Both classifiers struggle with class \textit{Urban Furniture} due to its large intra-class variance (see discussion in Section~\ref{sec:discussionPC}). For instance, cars are often classified as \textit{Urban Furniture} by mistake. However, due to the utilized superior geometric information, the RF copes better with the variance resulting in an F1-score that is $5.4$ percent points better compared to SCN. For class \textit{Shrub}, the RF is 9.5 percent points better. In case of the SCN, the majority of predictions of class \textit{Shrub} truly belongs to \textit{Urban Furniture}. As can be seen for the shipping lock in Figure~\ref{fig:predMesh} (b), SCN confuses \textit{Impervious Surface} with \textit{Roof} and hence performs worse than the RF on these classes. The geometric similarity of ground classes in the mesh representation (\textit{Impervious Surface}, \textit{Low Vegetation}, and \textit{Soil Gravel}) makes it demanding to correctly separate them. Therefore, the color information is decisive for the correct prediction. Both classifiers predict other ground classes for \textit{Gravel/Soil}. \textit{Soil/Gravel} is the only class where SCN outperforms the RF. This indicates that SCN mostly learns geometric features. Most probably, the Gaussian smoothed features cause misprediction of chimneys as \textit{Roof} for RF. In case of SCN, \textit{Chimney} has a high recall but at cost of good precision. On the contrary, RF has a significantly worse recall but very high precision resulting in a better F1-score. The distinction of vertical surfaces and fa\c{c}ades is demanding for both classifiers due to their small inter-class variance. \section{Conclusion} \label{sec:conclusion} In this paper, we presented a new benchmark on semantic segmentation of high-resolution 3D~point~clouds and textured meshes as acquired and derived from UAV LiDAR and Multi-View-Stereo: Hessigheim~3D~(H3D). We have introduced the multi-modal data corresponding to the first epoch of H3D (March 2018), comprising H3D(PC) and H3D(Mesh). Follow-on epochs (November 2018 \& March 2019) will cover an extended area and offer an even more detailed class catalog. Apart from discussing the data acquisition and processing, we applied different classifiers to H3D(PC) and H3D(Mesh) as a baseline for the benchmark. The results indicate great potential for testing ML approaches on H3D due to its large sets of labeled data. Eventually, we hope H3D to become a second established ISPRS benchmark dataset in company with V3D. \section*{Acknowledgements}\label{ACKNOWLEDGEMENTS} The H3D dataset has been captured in the context of an ongoing research project funded by the German Federal Institute of Hydrology (BfG). We would like to thank the University of Innsbruck for carrying out the flight missions. Our gratitude goes to Markus Englich for providing and maintaining H3D's IT infrastructure. We appreciate the funding of H3D as an ISPRS scientific initiative 2021 and the financial support of EuroSDR. The authors would like to show their gratitude to the State Office for Spatial Information and Land Development Baden-Wuerttemberg for providing the ALS point clouds of the village of Hessigheim.
\section{Introduction} Time series Monte Carlo simulations are widely used for multiple industrial applications such as investment decisions \citep{kelliher2000using}, stochastic control \citep{pham2009continuous} or weather forecasts \citep{mullen1994monte}. They are notably considered in the financial sector, for market stress tests \citep{sorge2004stress}, risk management and deep hedging \citep{buehler2019deep, fecamp2019risk}, or for measuring risk indicators such as Value at Risks \citep{jorion2000value} among others. Providing Monte Carlo simulations representative of the time series of interest is a difficult and mostly manual task, which requires underlying modeling assumptions about the time dependence of the variables. Hence, it is difficult to update these models when a new type of data is observed, such as negative interest rates, negative electricity prices or unusual weather conditions. This naturally calls for the development of reliable model-free data generators for time series. Generative methods such as Variational Auto Encoders (VAE) \citep{kingma2013auto} or Generative Adversarial Networks (GAN) \citep{goodfellow2014generative} provide state-of-the-art accuracy for the generation of realistic images \citep{xu2018dp} or text \citep{zhang2017adversarial}. The development of similar generative methods for time series is very promising \citep{lyu2018improving,chen2018model}. However, due to the complex and possibly non-stationary underlying temporal structure of the initial time series, these generative methods, especially GANs, are very difficult to apply as such \citep{yoon2019time}. Efficient generation of time series requires a proper learning of time-marginals as well as a faithfully representation of the underlying time structure. In this paper, we embed time series into a discretized Euler approximations of Itô processes, which are characterized by their deterministic drift and volatility parameters. The three proposed generators rely on deep learning approximation of both drift and volatility functions. This representation benefits from a theoretically grounded temporal dynamic and provides a meaningful structure that avoids complex neural network architectures. Moreover, the considered Euler models allow tractable, at least controllable, generator outputs, which can be difficult with deep embedding such as \citep{yoon2019time}. This feature is a key component in industrial applications, especially for decision-making-process.\\ By combining deep Euler representation with Wasserstein distance \citep{villani2008optimal}, we introduce the Euler Wasserstein GAN (EWGAN), inspired by \citep{arjovsky2017wasserstein}. Our second GAN-based-model, called Euler Dual Discriminator (EDGAN) is an adaptation of the DVDGAN presented in \citep{clark2019efficient}. A spatial discriminator focuses on the accuracy of time-marginal distributions, while a temporal one focuses on the full sequence of generated time-series. Both methods compute the Wasserstein-1 distance and compete with the state-of-the-art algorithms Time Series GAN (TSGAN) \citep{yoon2019time} and COTGAN \citep{xu2020cotgan} on both synthetic and real datasets. Nevertheless, all these GAN approaches still have difficulties to capture a proper temporal dynamics of the time series. We remedy to this problem by considering a loss function based on the conditional distributions $\mathcal{L}(X_{.+\Delta t}\,|\,X_{.})$ of the generated time series. We introduce a Conditional Euler Generator (CEGEN) which optimizes a distance between the transition probability distributions at each time step. On the (large) class of Itô processes, we prove that minimizing this metric provides an accurate estimation of both the drift and volatility parameters. A numerical study compares the three approaches to state-of-the-art GANs on synthetic and real datasets and shows the performances of our generators. We verify that our generators can learn to replicate Monte Carlo simulations of classical stochastic processes. Synthetic models give access to more reliable metrics (including theoretical), and allow to make connections between model-based Monte Carlo and model-free methods. EWGAN and EDGAN show a similar accuracy than TSGAN or COTGAN and capture more efficiently the time structure dynamics in dimension up to 20. The best performing model, CEGEN, is able to recover the underlying correlation (or independence) structure of time series, even in high dimensions. Moreover, we highlight the robustness of CEGEN, when combined with a transfer learning procedure when too few data are available. By properly mixing Monte Carlo generated and sparse real data during training, we CEGEN can take advantage of the synthetic simulations to improve its accuracy on generated samples. \textbf{Main Contributions:} \begin{itemize} \item A theoretically grounded time series generator CEGEN combining an Euler structure with a dedicated loss on conditional distributions is proposed. \item Relying on a similar Euler structure, we also introduce two alternative GAN-like time series generators inspired by \citep{arjovsky2017wasserstein} and \citep{clark2019efficient}. They exhibit close performance to the state-of-the-art TSGAN \citep{yoon2019time} and COTGAN \citep{xu2020cotgan} on marginal metrics, but capture more accurately the dynamic structure of Ito-based time series. \item A thorough numerical study on synthetic and various real world datasets demonstrate the robustness of our generators. Euler models succeed in correctly learning the underlying drifts and volatility structures of synthetic and outperforms the other considered methods on real datasets (accurate correlation structure up to dimension 20...). A transfer learning application when sparse data is available is provided \end{itemize} \section{Related works} The bootstrap method proposed by \citep{efron1982jackknife} is one of the first purely data-driven attempt to generate time series. Data samples are simply taken randomly with replacement. The scope of this technique is limited as it does not generate additional synthetic data but is based on historical ones. On the opposite, model-free approaches such as GAN allow to learn empirical distribution from data and thus to generate new samples. However, initial GAN proposals focused on the generation of non temporally ordered outputs. GAN's architecture improvement for the time series case is an intensive area of research. For example, WaveGAN \citep{donahue2018adversarial} uses the causal architecture of WaveNet \citep{oord2016wavenet} for unsupervised synthesis of raw-waveform audio. Alternatively, several works consider recurrent neural networks to generate data sequentially and keep memory of the previous time series states \citep{mogren2016c, esteban2017real}. Time Series GAN (TSGAN) \citep{yoon2019time} introduces a state-of-the-art method for time series generation which stands out by its specific learning process. At each time step, an embedding network projects time series samples onto a latent space on which a GAN operates. TSGAN manages to get the correct marginal distributions and temporal correlation on classical processes and is used as a baseline in this paper. This method lacks of theoretical foundations ensuring a reliable quality of generated samples. As the usage of generating model-free method grows rapidly, their application to sensitive fields (e.g. finance) must be considered cautiously and requires theoretical and empirical guarantees on the behavior of these generators. For this purpose, an active line of research looks towards reliable embedding of time series, such as signature \citep{fermanian2019embedding, buehler2019deep} or Fourier representation \citep{steinerberger2018wasserstein}.\\ Most recent applications on video generation focus on specific GAN architectures to capture the spatial-temporal dynamics. For example, MoCoGAN \citep{tulyakov2018mocogan} and DVD GAN \citep{clark2019efficient} combines two discriminators, one for the temporal dynamic and another one on each static frame. Specialized generator structures have also been designed, TGAN \citep{saito2017temporal} proposed to generate a dynamic latent space and VGAN \citep{vondrick2016generating} combines two generators, one for marginals and another one for temporal dependencies. Following the idea of applying optimal transport to GANs \citep{arjovsky2017wasserstein,genevay2018learning}, COTGAN \citep{xu2020cotgan} uses causal optimal transport for video sequence generation. To do so, the discriminant penalizes not-causal optimal transport plans, ensuring that the generator minimizes an adapted Wasserstein distance for time series. This approach benefits of solid theoretical foundations but still lacks of reliable empirical success for noisy time series generation. \medbreak \section{Problem formulation}\label{sec:problem} We aspire to design a time series generator which combines accurate estimation of time-marginal distributions while properly capturing temporal dynamics. The generator we propose is designed to be simple enough to be tractable (in the sense that outputs could be controlled) and theoretically grounded. To do so, we feed our algorithms with training time series data and seek to learn an empirical probability distribution that best approximates the data one. This task can be tricky, depending on the sequences lengths, the dimension, and the shape of the data distribution. Although the idea of a model-free approach is attractive, we restrict ourselves to the context of Itô processes. This class of processes encompasses a wide range of time series and yet allows us to develop tractable models based on theory. In addition to providing a robust theoretical framework and controls on the processes generation, Itô processes allow to measure the accuracy of our generators on synthetic samples via closed form expressions or Monte Carlo simulators. In comparison to the classical literature \citep{wiese2020quant, buehler2020data}, we do not assume the time series $X$ to be stationary and allow ourselves to consider not-stationary sequences. \paragraph{Itô process} We are given i.i.d. samples of a time series, considered as a random vector $X=(X_{t_i})_{i=1\ldots N}$ on $\mathbb{R}^{ d \times N}$, starting from a point $X_0\in\mathbb{R}^{d}$ and observed on a time grid $\mathcal{T} := \{0=t_0 < t_1< ... < t_N=T\}$. For the sake of simplicity, in the following, we assume a regular time grid with mesh size $\Delta t$. The discrete time samples are supposed to be drawn from a continuous time underlying process $X$ having the following Itô dynamics: \begin{eqnarray}\label{eq:Ito} dX_t &=& b_X(t,X_t) d t + \sigma_X (t,X_t) dW_t\, \end{eqnarray} where $b_X:\mathbb{R}\times \mathbb{R}^d\rightarrow \mathbb{R}^d$ is the drift term, $\sigma_X:\mathbb{R}\times \mathbb{R}^d\rightarrow \mathcal{M}_{d\times d}$ the volatility term and $W$ is a $d$-dimensional Brownian motion. The parameters $b_X$ and $\sigma_X$ are supposed to satisfy the usual Lipschitz conditions \citep{ikeda2014stochastic} ensuring existence and uniqueness of the solution of Eq.\eqref{eq:Ito}. \paragraph{Deep Euler representation}\label{sec:deep} Samples of $X=(X_{t_i})_{i=1\ldots N}$ are drawn from the continuous time Itô process with dynamics \eqref{eq:Ito}, and can approximately be viewed as samples drawn from the Euler discretization scheme of \eqref{eq:Ito} given by \begin{eqnarray} X_{t_i+\Delta t} = X_{t_i} + b_X(t_i, X_{t_i}) \Delta t \sigma_X (t_i, X_{t_i}) \Delta W_{t_i}, \label{eq:eulerX} \end{eqnarray} where $(\Delta W_{t_i})_i$ is a collection of i.i.d. $\mathcal{N}(0, \Delta t I_d)$ random variables. We rely on this approximation and introduce the following deep Euler representation of the time series. Starting at $t_0=0$, from $Y^{\theta}_0 = X_0$ we generate time series by the following scheme: \begin{eqnarray} Y^\theta_{t_i+\Delta t} &=& Y^\theta_{t_i} + b^\theta_Y (t_i,Y^\theta_{t_i}) \Delta t + \sigma^\theta_Y(t_i,Y^\theta_{t_i}) Z_{t_i}\,, \label{eq:eulerY} \end{eqnarray} where $Z_{t_i}$ are $\mathcal{N}(0, \Delta t I_d)$ i.i.d. random variables and the functions $ b_Y^\theta$ and $ \sigma^\theta_Y$ are $\theta$-parametrized functions approximated by neural networks. Our objective is to learn $ b_Y^\theta$ and $ \sigma^\theta_Y$, so that the distribution of the processes $Y^\theta$ and $X$ are close. \paragraph{Evaluation}\label{sec:eval} During the learning phase, neither $b_X$ nor $\sigma_X$ are given as inputs to any of the proposed models. However, the proposed formulation allows to compare \textit{a posteriori} $b_X$ and $\sigma_X$, when they are known, to the estimated $ b_Y^\theta$ and $ \sigma^\theta_Y$. This provides a reliable metric on the generation accuracy.\\ Moreover, this setup provides a convenient way to control the drift $b^\theta_Y$ and volatility $\sigma^\theta_Y$ functions. This task is delicate with deep embedding proposals. As already mentioned, it is highly challenging for generators of temporally ordered data to create samples accurate on time-marginal distributions as well as temporal dynamic metrics. In order to remedy to this weakness, we introduce below an innovative loss function based on a distance between conditional distributions at each time step. \section{Euler Generators} Euler Generators proposed in this paper are composed of two main elements: a network generating the drift and volatility terms of an Itô process and a distance between distributions to be minimized. The Itô structure facilitates the time series construction, while the distributional distance focuses on the law accuracy of the generated sequences. Both GAN-based and Deep Conditional methods described hereafter share this design. \subsection{Euler Generative Adversarial Networks}\label{sec:gangens} We propose two adaptations of GANs to time series that are based on the deep Euler representation presented in Eq.\eqref{eq:eulerY}. The Wasserstein GAN \citep{arjovsky2017wasserstein} seems to get rid of stability problems encountered in learning (mainly mode collapse) by adapting to the geometry of the underlying space. Our two GAN-based models are built on this proposal and both minimize (differentiable) Wasserstein-1 ($\mathcal{W}_1$) distance. The Rubinstein-Kantorovich duality allows to rewrite the $\mathcal{W}_1$ distance between two random variables $Z_1$ and $Z_2$ in the following way\footnote{$||f||_L$ denotes the smallest Lipschitz constant of $f$.}: \begin{eqnarray}\label{eq:wasserstein1} \mathcal{W}_1(\mathcal{L}(Z_1),\mathcal{L}(Z_2)) = \sup_{||f||_L\leq 1} \mathbb{E}_{Z_1\sim \mathcal{L}(Z_1)} \left[f(Z_1)\right] - \mathbb{E}_{Z_2 \sim \mathcal{L}(Z_2)}\left[f(Z_2)\right]. \end{eqnarray} \paragraph{Euler Wasserstein GAN (EWGAN)} This model considers a Wasserstein GAN, where the generator relies on the Deep Euler representation \eqref{eq:eulerY} and optimizes the corresponding parameter $\theta$. The discriminator $d_\varphi$ parametrized by $\varphi$ tries to find the optimal $1$-Lipschitz function allowing to compute $\mathcal{W}_1(\mathcal{L}(X),\mathcal{L}(Y^\theta))$ using the Rubinstein-Kantorovich duality in \eqref{eq:wasserstein1}. The $1$-Lipschitz property of $d_\varphi$ is guaranteed using the gradient penalty trick mentioned in \citep{gulrajani2017improved}. The pseudocode of EWGAN is given in Alg.\ref{alg:ewgan} and details are provided in Appendix \ref{sec:hyperparameters}. Overall, EWGAN minimizes the $\mathcal{W}_1$ distance between the distributions of the original $X=(X_t)_{t_in\mathcal{T}}$ and the generated one $Y^\theta=(Y^\theta_t)_{t_in\mathcal{T}}$: \begin{eqnarray}\label{eq:EWGAN} \inf_\theta \mathcal{W}_1(\mathcal{L}(X),\mathcal{L}(Y^\theta)) = \inf_\theta \sup_{\varphi} \mathbb{E}_{X\sim \mathcal{L}(X)} \left[d_{\varphi}(X)\right] - \mathbb{E}_{Y^\theta \sim \mathcal{L}(Y^\theta)}\left[d_{\varphi}(Y^\theta)\right]. \end{eqnarray} \paragraph{Euler Dual Discriminator (EDGAN)} Our second GAN-based-model, called EDGAN, is an adaptation of the Dual Video Discriminator (DVD) GAN \citep{clark2019adversarial}. DVD GAN uses attention networks and two discriminators in order to generate high fidelity videos. While the spatial discriminator focuses on time marginals and critics images in high resolution, the temporal one considers the full sequence of images in low resolution. We adapt these ideas to our context by considering in EDGAN, a similar dual discriminator architecture while the generator creates samples using the Deep Euler representation in \eqref{eq:eulerY}. Our temporal discriminator follows a similar behavior as the one of EWGAN and focuses on $\mathcal{W}_1(\mathcal{L}(X),\mathcal{L}(Y^\theta))$. In the same time, our marginal discriminator focuses the computation of the $W_1$ distance between marginal distributions $\mathcal{W}_1(\mathcal{L}(X_t),\mathcal{L}(Y^\theta_t))$, for each $t\in\mathcal{T}$. The details and pseudocode of EWGAN are given in Alg.\ref{alg:edgan} and provided in Appendix \ref{sec:hyperparameters}. \subsection{Conditional Loss Method}\label{sec:deepconditionalmethod} \subsubsection{A loss function based on conditional distributions}\label{sec:road} The difficulty arising when trying to design a loss function for a time series generator comes from the need to get the correct balance between the marginal distribution fitness and the good representation of the temporal structure. On the one hand, we cannot only focus on marginals because having $\mathcal{L}(X_{t_i}) \sim \mathcal{L}(Y^\theta_{t_i})$ for all $t_i\in \mathcal{T}$ does not imply that $b_X = b_{Y^\theta}$ nor that $\sigma_X =\sigma_{Y^\theta}$ (see the counterexample in Appendix \ref{sec:counterexample}). On the other hand, instead of working on marginals, one can wonder if considering time series realization as samples of a vector defined on $\mathbb{R}^{n+1}$ provides better results. Unfortunately, and as mentioned in \citep{yoon2019time}, learning the joint distribution $\mathcal{L}(X_{t_0}, \ldots, X_{t_n})$ may not be sufficient to guarantee that the network captures the temporal dynamics, even with memory-based networks. An empirical example of unsatisfactory generation based on joint law is illustrated in Figure in Appendix \ref{fig:sinkhorn}, the generated trajectories are smooth. In the case of time series, one should simply refrain from applying a loss based only on marginal or joint distributions. To provide a reliable solution to this issue, we propose to focus on the transition probabilities at each time step by conditioning on the previous state. Moreover, by doing so, we are able to produce theoretical results on Itô coefficient estimation accuracy. \subsubsection{CEGEN Algorithm}\label{sec:cegen} Contrarily to the previous GAN-based generators, CEGEN does not require a discriminator network. The idea consists in considering a loss function that compares the conditional distributions $\mathcal{L}(Y^\theta_{t_{i+1}}\,|\,Y^\theta_{t_{i}})$ with $\mathcal{L}(X_{t_{i+1}}\,|\,X_{t_{i}})$, for each time step $t_{i}\in\mathcal{T}$. The latter conditional distributions are Gaussian when considering Euler-discretized Itô processes. We consider the following metric: \begin{eqnarray} \mathcal{W}_2^2(\mathcal{L}(X), \mathcal{L}(Y))= \| \mathbb{E}[X] - \mathbb{E}[Y] \|_2^2 + \mathcal{B}^2(Var(X), Var(Y)) \label{eq:newwasserstein} \end{eqnarray} where $\mathcal{B}$ is the Bures metrics \citep{bhatia2019bures,malago2018wasserstein} defined by $\mathcal{B}^2(A, B) {=} Tr(A) + Tr(B) - 2 Tr(A^\frac{1}{2}BA^\frac{1}{2})^{1/2}$, for positive definite matrices $A$ and $B$. If $X$ and $Y$ are gaussian, $W_2$ is the definition of the Wasserstein-2 distance \citep{gelbrich1990formula}. This metric \eqref{eq:newwasserstein} captures meaningful geometric features between distributions, and $\mathcal{W}_2$ transportation plan is very sensitive to the outliers thus increases the distribution estimation accuracy. The Bures formulation \eqref{eq:newwasserstein} allows us to compute exactly the Wasserstein-2 distance, instead of regularized ones \citep{genevay2018learning, cuturi2013sinkhorn}.\\ Moreover, we want to have a theoretically grounded methodology and the Bures metric allows us to provide guarantees that minimizing the conditional loss implies accurate estimation for the drift and diffusion coefficients. We see that whenever the conditional distributions of the form $\mathcal{L}(X_{t_{i+1}}\,|\,X_{t_{i}}=z)$ and $\mathcal{L}(Y_{t_{i+1}}\,|\,Y_{t_{i}}=z)$ coincide in ${\mathcal{W}}_2$, the drift and diffusion parameters coincide as well (see Prop. \ref{prop:conditioning} in Appendix). This is encouraging but in general conditioning from the very same point is complicated. Proposition \ref{prop:inegalite} extends this property when the previous states belong to a small ball around $z$. To build up our generator, we create at each time $t_i$ a partition $(I_{k})_{k\le N_k}$ of the union of supports of $X_{t_{i}}$ and $Y^{\theta}_{t_{i}}$. For a given batch of samples, $\mathcal{L}(X_{t_{i+1}}\,|\,X_{t_{i}}\in I_k)$ is approximated by extracting the elements $X_{t_{i+1}}$ such that $X_{t_{i}}\in I_k$. $\mathcal{L}(Y_{t_{i+1}}\,|\,Y_{t_{i}}\in I_k)$ is approximated in the same way. The ${\mathcal{W}}_2^2$ metric between the two conditional distributions are then summed up over all $K$ subdivisions and over all time steps: \begin{eqnarray}\label{Conditional_Loss} l(X, Y^\theta) = \sum_{i=0}^{N-1} \sum_{k=1}^{N_k} &{\mathcal{W}}^2_2(\mathcal{L}(X_{t_{i+1}}| X_{t_i} \in I_k), \mathcal{L}(Y^\theta_{t_{i+1}}| Y^\theta_{t_i} \in I_k))\nonumber \end{eqnarray} The pseudocode of CEGEN is given in Alg.\ref{alg:cgen} and details are provided in Appendix \ref{sec:hyperparameters}. Observe that our framework boils down to computing ${\mathcal{W}}_2$ metric between empirical distributions. Bures metrics is computed using the Newton-Schulz method \citep{muzellec2018generalizing}, which is a differentiable way to get covariance matrice square roots. \begin{algorithm}[h] \caption{Algorithm CEGEN.} \label{alg:cgen} \footnotesize \begin{algorithmic} \STATE {\bfseries Input:} $\mathcal{D}$ samples of $X$, $m$ batch size, $K$ Nb of subdivisions, $\gamma$ learning rate\\ \STATE {\bfseries Initialize:} $\theta$ (randomly picked) \WHILE{Not converged} \FOR{$t_i=0...T$} \STATE Sample $m$ observations $(x_{t_i +1})$ from of ${X_{t_i+1}}$ \STATE Sample $z \sim \mathcal{N}(0,I_D \Delta t)$ \STATE $y_{t_i +1} \leftarrow y_{t_i} + g^b_\theta(t_i,y_{t_i}) \Delta t + g^\Sigma_\theta(t_i,y_{t_i}) z$ \STATE $I_K\leftarrow K$ subdivisions of Supp$(X_{t_i})\cup$ Supp$(Y_{t_i})$ \FOR{$k=0...K$} \STATE $\ell_{t_i+1, k}\leftarrow {\mathcal{W}}^2_2(\mathcal{L}(x_{t_i+1}| x_{t_i} \in I_k), \mathcal{L}(y_{t_i+1}| y_{t_{i}} \in I_k))$ \ENDFOR \ENDFOR \STATE $\theta = \theta - \gamma \nabla_{\theta} \sum_{t_i=1}^{T-1} \sum_{k=1}^{K} \ell_{k,t_i+1}$ \ENDWHILE \STATE {\bfseries Output: $y$} \end{algorithmic} \end{algorithm} \subsubsection{Theoretical guarantee}\label{sec:prop} In order to theoretically ground the choice of a loss function between conditional distributions based on ${\mathcal{W}}_2$, we need to quantify how reducing the ${\mathcal{W}}_2$ loss (Eq. \ref{eq:newwasserstein}) implies proximity between drift and volatility parameters. An analysis on the topic is provided in Appendix \ref{Appx A}. The following result is allowed by the specific expression of the loss (\ref{eq:newwasserstein}) implemented in CEGEN. \begin{prop} \label{prop:inegalite} Assume that $\sigma^2_X(t_i, .)$, $\sigma^2_{Y^\theta}(t_i, .)$ are strictly positive and, together with $b_X(t_i, .)$ and $ b_{Y^\theta}(t_i, .)$, $K$-Lipschitz in their second coordinate. For $t_i\in\mathcal{T}$, let $(I_k)_k$ be a regular partition covering Supp$(X_{t_i})\cup$ Supp$(Y_{t_i})$ with mesh size $\Delta x$. Let $\varepsilon>0$.\\ If ${\mathcal{W}}^2_2\left(\mathcal{L}(X_{t_{i+1}}|X_{t_i}\in I_k), \mathcal{L}(Y^\theta_{t_{i+1}}| Y^\theta_{t_i}\in I_k)\right)\leq \varepsilon^2$ for any $k$, then, for $z$ in the partition \begin{eqnarray*} \|b_X(t_i, z) - b_{Y^\theta}(t_i, z) \|_2 &\leq& \frac{\varepsilon + \Delta x}{\Delta t} + 2K\Delta x. \end{eqnarray*} Furthermore if $d=1$, \begin{eqnarray*} \| \sigma_X(t_i,z)- \sigma_{Y^\theta}(t_i, z)\|_2 &\leq& \varepsilon/\sqrt{\Delta t}\nonumber + 2K\Delta x. \end{eqnarray*} and, when $d>1$ and $Tr(\sigma^2_X(t_i, z)) = Tr(\sigma^2_{Y^\theta}(t_i, z)) = \alpha$, we have \begin{eqnarray*} \|\sigma_X(t_i, z) - \sigma_{Y^\theta}(t_i, z)\|_2 &\leq& \sqrt{\frac{2\alpha}{\Delta t }}\varepsilon + 2K\Delta x. \end{eqnarray*} \end{prop} As described in \ref{sec:proofconditionalwasserstein}, the previous result is proved using useful inequalities between Hellinger and Bures distances. The $\alpha$ coefficient comes from the need of using density matrices, in practice one can easily normalize covariance matrices by their traces. Proposition \ref{prop:inegalite} implies that by conditioning over sufficiently small intervals, a low ${\mathcal{W}_2}$ loss between transition distributions guarantees a good diffusion and drift representation. \section{Numerical Study}\label{sec:numerical} We now turn to the numerical evaluation of EWGAN, EDGAN and CEGEN in comparison to the state-of-the-art TSGAN and COTGAN, on various synthetic and real time series. Neural network architectures and hyper-parameters are described in Appendix \ref{sec:hyperparameters}. \subsection{Datasets} Two kinds of datasets are used: synthetic and real time series dataset. In single dimension, we use Black\&Scholes (BS) model ($d X_t =r X_t dt + \sigma X_t dW_t$) and an Ornstein-Uhlenbeck (OU) model ($d X_t = \theta(\mu-X_t) dt + \sigma dW_t$). For these two stochastic models, our empirical references are drawn from Monte Carlo (MC) simulators. The simulations are performed on a regular time grid of $30$ dates, the maturity is $0.25$ (1 simulation per day for 3 months) and $X_0 = 0.2$. BS model (resp. OU) has coefficients of $r=0.8$, $\sigma=0.3$ (resp. $\sigma=0.1, \mu=0.6$ and $\theta=7$). In higher dimensions, we proceed with the same methodology but with multivariate correlated BS time series ($d$ = 4, 10, 20). The real datasets include various nature of time series and are detailed in Appendix \ref{sec:data}. \subsection{Evaluation metrics} \label{sec:evaluation} We consider several metrics to evaluate the accuracy of the generators. For all metrics the lower, the better. \paragraph{(1) Marginal metrics.} These metrics quantify the quality at each time step of the marginal distributions induced by the generated samples in comparison to the empirical ones. This includes Fréchet Inception Distance (FID) \citep{heusel2017gans} as well as classical statistics (mean, 95\% and 5\% percentiles, maximum and minimum denoted respectively Avg, q95, q05, Max, Min). We systematically compute the mean squared error (MSE) over time of these statistics between the real and generated samples. This helps measuring whether a generator manages to get an accurate overall envelope of the processes. \paragraph{(2) Temporal dynamics.} This metric aims at quantifying how the generator is able to capture the underlying time structure of the signal. For this purpose, we compute the difference between the quadratic variations of both reference and generated time series. The quadratic variation (QVar) of an Itô process $X$ is given by $[X]_t=\int_0^t\sigma^2_X(s,X_s) ds$. Thus the temporal metric ensures that the diffusion $\sigma_X$ is well estimated too. We compute $[X]_t$ in the discrete case with $\sum_{i} |X_{t_{i+1}}-X_{t_{i}}|^2$. \paragraph{(3) Correlation structure.} The metric denoted \textit{Corr} in the following is the term-by-term MSE between empirical correlation from reference samples on one side and from generated samples on the other side. It evaluates the ability of a generator to capture the multi-dimensional structure of the signal. \paragraph{(4) Underlying process parameters.} A by-product output of Euler-based generators are the estimated drift $ b^\theta_Y(.)$ and diffusion $ \sigma^\theta_Y(.)$ coefficients of the generator. When using synthetic data, we can compare the true underlying processes parameters to the estimated ones. In the BS case, the drift and volatility coefficients are estimated by the empirical average of $( b ^\theta_Y(t, Y^\theta_t)/Y^\theta_t)_{t\in\mathcal{T}}$ and $( \sigma ^\theta_Y(t, Y^\theta_t)/Y^\theta_t)_{t\in\mathcal{T}}$. In the OU case, $\sigma^\theta_Y$ is estimated in a similar manner, while $\theta$ and $\mu$ are estimated by regressing $ b^\theta_Y$ on $(t,Y^\theta_t)$. These statistics cannot be computed in the same way with TSGAN due to its specific deep embedding, nor COTGAN. \textbf{(5) Discriminative and predictive scores.} We use two distinct scores, as proposed in \citep{yoon2019time}. First, we train a classification model (a 2-layer LSTM) to distinguish real sequences from the generated ones. The accuracy of the classifier provides the discriminative score. Second, the predictive score is obtained by training a sequence-prediction model (a 2-layer LSTM) on generated time series to predict the next time step value over each input sequence. Performance is measured in terms of MAE. \FloatBarrier \subsection{One-dimensional simulated process (Exp. A)}\label{sec:onedim} \begin{table} \centering \begin{tabular}{cccc} \hline \footnotesize & CEGEN& EWGAN& EDGAN \\ \hline\hline \multicolumn{4}{c}{\textbf{Black-Scholes}}\\ $\hat{r}$ (0.8)& \textbf{0.739}& 0.581& 0.996\\ $\hat{\sigma}$ (0.3)& 0.324& \textbf{0.314}& 0.379\\ \hline \multicolumn{4}{c}{\textbf{Ornstein-Uhlenbeck}}\\ ${\theta}$ (7.0)& \textbf{7.05}& 4.36& 4.68\\ $\hat{\mu}$ (0.6) & \textbf{0.60}& 0.75& 0.72\\ $\hat{\sigma}$ (0.1)& \textbf{0.11}& 0.16& 0.02\\ \hline \end{tabular} \caption{\textbf{Exp. A. }Model parameter estimations for drift and volatility function.} \label{tab:estimateddrfitandsigma} \end{table} We start with a unidimensional time series by comparing the five generators in the OU case. Figure \ref{fig:ousamples} illustrates how crucial is the balance between the estimation of the marginal distributions and the temporal structure. On the one hand, the trend and marginal distributions of the time series generated by both GANs seem close to the empirical benchmark. However, the temporal dynamics between two time steps is not respected as confirmed by the QVar metric in Table \ref{tab:envelope} (in Appendix). On the other hand, CEGEN model manages to capture the overall envelope and is able to fit the dynamics of time series as the QVar metrics highlights in Table \ref{tab:envelope}. Table \ref{tab:estimateddrfitandsigma} reports the reference drift and volatility coefficients with those obtained by the three Euler-based generators. We can see a good estimation of the CEGEN method and to a lesser extent of the EWGAN method while EDGAN fails to estimate the parameters correctly. Euler structure alone does not manage to recover the right parameter values. To conclude this section, it appears that regarding the overall dynamics and the marginals, CEGEN is a reliable generator of time series. The question we address in the next section is how CEGEN scales to higher dimensions. \begin{figure}[H] \centering \includegraphics[width=.25\linewidth]{images/ouh_cotgan.png} \includegraphics[width=.25\linewidth]{images/ouh_timegan.png} \includegraphics[width=.25\linewidth]{images/ouh_eugene.png} \caption{\textbf{Exp. A.} Example of Ornstein-Uhlenbeck samples (in blue) with COTGAN, TSGAN and CEGEN generations (orange).} \label{fig:ousamples} \end{figure} \FloatBarrier \subsection{Scaling the dimension (Exp. B)}\label{sec:multidim} \begin{table}[H] \centering \resizebox{0.6\textwidth}{!}{ \begin{tabular}{c ccccc} \hline Dim& CEGEN& EWGAN& EDGAN& TSGAN& COTGAN\\ \hline\hline 4 & \textbf{.007}&.015&.053&.177&.031\\ 10 & \textbf{.011}&.055&.022&.259&.035\\ 20 & \textbf{.006}&.034&.014&.481&.019\\ \hline \end{tabular} } \caption{\textbf{Exp. B} \small MSE between reference and generator empirical correlation matrices on Black-Scholes.} \label{tab:correlation} \end{table} Table \ref{tab:correlation} reports the discrepancies between reference empirical correlation and generated time series correlation for dimension $d=4,10,20$. We can see that in dimension up to 20, CEGEN obtains a significant improvement compared to all the GANs. Figure \ref{fig:scorescaleplot} illustrates how well the CEGEN generator outperforms the other generators with respect to the FID and QVar metrics in the higher dimensions. This is confirmed by statistics on volatility and drift, as well as by envelope statistics described in Table \ref{tab:envelopedimensions} in Appendix. Figure \ref{fig:egenbures20samp} shows that the 20 processes envelopes are well respected by CEGEN. These good global performances encourage us to focus on the conditional generator in the following transfer learning section. \begin{figure}[h] \centering \includegraphics[width=0.4\linewidth]{images/fid.png} \includegraphics[width=0.4\linewidth]{images/qvar.png} \caption{\textbf{Exp. B. } \textbf{Left:} Average of Fréchet Inception Distance between distributions at each time step. \textbf{Right:} MSE between quadratic variations. (Log scale).} \label{fig:scorescaleplot} \end{figure} \FloatBarrier \subsection{Transfer learning for small dataset (Exp. C)}\label{sec:transferfrugal} Deep generators may need more data than available to be trained effectively. As is done in transfer learning \citep{torrey2010transfer}, we propose to start the training with a reasonably wrong model and to finish up the training with the few real data samples. This situation is tested on synthetic data and allows us to track the drift and volatility parameters evolution during the training phase. The reference data are assumed to come from samples simulated from an OU process, while the wrong but reasonable Monte Carlo samples come from a misspecified OU model. The original (resp. misspecified) parameters are $\sigma=0.15$, $\mu=0.6$, $\theta=2.0$ (resp. $\sigma_{MC}=0.1$, $\mu_{MC}=0.8$, $\theta_{MC}=3.0$) and original data sequences include only 60 sequences of 30 dates (5 years of monthly measures). The CEGEN with transfer is compared with a CEGEN only trained with the few available real sequences. Figure \ref{fig:adpatparam} provides the coefficient evolution of both generators during the training process. The transfer iteration time is represented by the red vertical line. Firstly trained with miscalibrated OU model, the transfer learning approach is able to retrieve the parameters when fed with few samples of the target model. The generator only trained with few real samples is unable to estimate correctly the $\theta$ and $\sigma$ coefficients, but exhibits a better estimation of $\mu$. The CEGEN benefiting from the transfer learning takes advantage of the initial training phase and provides an overall better estimation. \begin{figure} \centering \includegraphics[width=0.32\linewidth]{images/cegen_adpat0.png} \includegraphics[width=0.32\linewidth]{images/cegen_adpat1.png} \includegraphics[width=0.32\linewidth]{images/cegen_adpat2.png} \caption{\textbf{Exp. C. } \small Evolution of parameter estimations during training when a transfer occurs at iteration 1000 (red lines). The dashed green lines correspond to the theoretical target value of the real model. The orange lines indicates coefficient estimation of CEGEN only trained on few data and blue lines CEGEN which is first trained on misspecified model then with few real data.} \label{fig:adpatparam} \end{figure} This framework is a way to update an existing model with the help of incoming real data. In this situation, the training would start with samples simulated from the consistent model and end with real world inputs. \subsection{Experiments on real-world datasets (Exp. D)}\label{sec:realworld} Finally, we test the CEGEN algorithm on various real data with heterogeneous time series. In Table \ref{tab:realdata}, we compare CEGEN performances with the help of FID, QVar and Corr. Our model outperforms GANs or are close in term of FID and QVar for each real times series, and captures well the correlation structure of the majority of the signals. However, some QVar from TSGAN or COTGAN are lower than CEGEN despite their generated trajectories are significantly smoother than real data. To better evaluate the fidelity of the generation we need to consider \textit{post-hoc} metrics. Table \ref{tab:dispredscores} reports discriminative and predictive scores for all models (except EWGAN where scores can be found in Appendix), the lower the better. Our generator almost consistently generates higher-quality time series in comparison to the benchmark. On Electric Load data, COTGAN is better able to capture seasonality of the times series, but generates too smooth trajectories. In the opposite CEGEN proposes more faithful times series in term of noise, but struggles to fool the classifier. \begin{table}[h!] \centering \begin{tabular}{l | ccc | ccc} \hline Data&\multicolumn{3}{c|}{CEGEN}&\multicolumn{3}{c}{EDGAN}\\ & FID & QVar & Corr & FID & QVar & Corr\\\hline\hline Spot prices (d=2) & 1.38e-04&2.09e+00&\textbf{2.10e-02} & 3.11e-03&2.18e+00&4.12e-02\\ Stocks (d=6) & \textbf{1.04e-04}&2.10e+01&2.33e-03 & 7.93e-03&2.43e+01&9.78e-03\\ Electric Load (d=12) &6.47e-03&4.30e+00&\textbf{1.27e-03} & 4.62e-02&1.27e+00&1.56e-03\\ Jena climate (d=15) &\textbf{1.10e-03}&\textbf{7.18e+00}&\textbf{1.75e-02} & 4.39e-02&7.73e+00&1.46e-01\\ \hline \hline Data&\multicolumn{3}{c|}{TSGAN}&\multicolumn{3}{c}{COTGAN}\\ & FID & QVar & Corr & FID & QVar & Corr\\\hline\hline Spot prices (d=2) & 2.12e-04&\textbf{9.00e-02}&4.45e-02 & \textbf{1.09e-04}&8.25e-01&4.15e-02 \\ Stocks (d=6) & 3.46e-03&2.19e+01&2.76e-01 & 1.49e-04&\textbf{1.86e+01}&\textbf{1.62e-03} \\ Electric Load (d=12) & \textbf{5.12e-03}&\textbf{9.18e-01}&1.87e-03 & 4.10e-01&3.45e+00&6.27e-01\\ Jena climate (d=15) & 4.07e-03&8.49e+01&1.89e-02 & 4.48e-03&7.90e+00&2.34e-02 \\ \hline \end{tabular} \caption{\textbf{Exp. D. } Accuracy evaluations for generations on real world time series (the lower, the better).} \label{tab:realdata} \end{table} \begin{table}[h!] \centering \footnotesize \begin{tabular}{l | cc | cc | cc|cc} \hline &\multicolumn{2}{c|}{CEGEN}&\multicolumn{2}{c|}{EDGAN}&\multicolumn{2}{c|}{TSGAN}&\multicolumn{2}{c}{COTGAN}\\ Data & Disc & Pred & Disc & Pred & Disc & Pred & Disc & Pred\\ \hline\hline Spot prices (d=2) &\textbf{.014}&\textbf{.049} &.137&\textbf{.049} &.066&.055 & .033&\textbf{.049} \\ Stocks (d=6) &\textbf{.079}&\textbf{.040} &.429&.041 & .159&.041 & .116&.041\\ Electric Load (d=12) & {.433}&{.028} & .495&.046& {.407}&.032 & \textbf{.277}&\textbf{.022} \\ Jena climate (d=15) & \textbf{.140}&\textbf{.032} & .483&.035& .179&\textbf{.032} & .227&.042 \\ \hline \end{tabular} \caption{\textbf{Exp. D. } Discriminative and Predictive scores on real time series (the lower, the better).} \label{tab:dispredscores} \end{table} \FloatBarrier \section*{Conclusion} We introduced three generative methods for times series, relying on a Deep Euler representation and Wasserstein distances. Two generative method EWGAN and EDGAN demonstrate an accuracy similar to state-of-the-art GAN generators and show better performance for capturing temporal dynamic metrics of the time series. The third method CEGEN is based on a loss metric computed on the conditional distributions of the time series. We prove that minimizing this loss ensures a proper estimation of the drift and volatility coefficients of underlying Itô processes. Our experiments on synthetic and real-world datasets demonstrate that CEGEN outperforms the other generators marginal and temporal dynamics metrics. CEGEN is able to capture correlation structures in high dimensions and is robust when combined with transfer learning on sparse datasets. Transfer learning tests show how this type of method can rely on a proven simulation model without replacing it completely. In further work, we plan to consider more specialized neural networks architectures for time series, extend our results to more general Lévy processes, which may include jumps, and consider not Gaussian noise. \section*{Broader impact} Generative methods for time series may be involved in industries using stochastic control and stochastic simulation methods making them of particular interest for the financial industry, for utilities and energy companies. When applied within a decision-making process, generative methods has to be used carefully as a failure during learning phase may lead to damageable consequences. In this situation, the outputs of the generators should not be left free, as this could lead to erratic optimal controls. Contrarily to the existing approaches which applies GANs and embedding to generate any kind of time series, we impose an Euler structure and we restrain ourselves within the (sufficiently) large class of Itô processes. One of the proposed algorithms manages to get good behavior for synthetic as well as for real data. Moreover, mathematical proofs gives an error estimate of the underlying process parameters for a given loss level.
\section{Introduction} \epigraph{ {So they cut him to pieces, wrote a thesis\\ A cranium of deceit, he's prone to lie and cheat;\\ It's no wonder -- a blunder from down under\\ Duckbill, watermole, duckmole!}} {\textup{Mr. Bungle}, Platypus~~~~~~~~~~~} \section{Introduction} This paper works as an overview of a series of concepts, results and techniques that have been yielding new insights in the analysis (and synthesis) of logics in recent years. The power of these methods is illustrated by establishing various uncommon properties of a very simple non-deterministic Boolean connective that we name \emph{platypus}. There are two crucial ingredients to be explored. On one hand, we depart from the traditional approach in logic of using (deterministic) semantics based on logical matrices, as proposed long ago by {\L}ukasiewicz and followers, and adopt a generalization of the standard logic matrix semantics proposed in the beginning of this century by Avron and his collaborators \cite{avlev05}, which allows the interpretation of the connectives to be based in multi-functions instead of simply functions. The central idea is that in a non-deterministic matrix (Nmatrix) a connective can non-deterministically pick from a set of possible values instead of its value being completely determined by the input values. This allows us to mix conjunction ($\land$) and disjunction ($\lor$) into a single connective ($\pl$) such that for each input it may choose from the values output by conjunction and disjunction with that same input, enlarging the Boolean world beyond truth-functionality. This is reminiscent of the \emph platypus} whose appearance mixes bird and mammal traits and has generously lent its name to $\pl$. Introducing the possibility of non-determinism has very powerful consequences. The most immediate advantage is that Nmatrices can finitely characterize logics that are not characterizable by (deterministic) matrices \cite{Avron,finval}. As we shall see, this is also true for the logic of $\pl$. The extra expressivity offered by non-determinism has also proven extremely valuable in obtaining recent compositional results in logic. Namely, in producing simple modular semantics for combined logics \cite{wollic}. In particular yielding finiteness-preserving semantics of strengthenings of a given logic with a set of axioms \cite{CaMaAXS}, covering a myriad of examples in the literature and explaining the emergency of structures like twist-structures \cite Oditwist,Umtwist} or swap-like structures \cite{coniglioswap}. Further, non-determinism can also be used to give simple infectious semantics to a range of syntax-based relevant companions of a given many-valued logic \cite{ISMVL}. On the other hand, we consider the symmetrical multiple-premises{/}multiple-conclusions notion of logic introduced by Scott \cite{Scott}, and also Shoesmith and Smiley \cite{ShoesmithSmiley}, in the 1970s. This bilateralist view \cite{CCALJM}, generalizes the asymmetrical multiple-premises{/}single-conclusion approach of most modern logic, introduced as a mathematical object by Tarski and his followers. The gain in symmetry of expressive-power supports the effective development of analytic calculi for logics that could not even be finitely axiomatized before \cite{ShoesmithSmiley,synt,wollic19}. The internalization of case analysis in the derivation mechanism, yields nice proof-theoretical properties impossible in the single-conclusion setting. These advantages have been mostly neglected in logic itself, but have been well-appreciated, for instance, in providing constructive proofs in algebra \cite{RINALDI2018226}. A key aspect of multiple-conclusion consequence is that it can be used to study the single-conclusion fragments of logics. The logic of $\pl$ also allows us to illustrate such advantages. Although it is not single-conclusion finitely axiomatizable, using the results in \cite{synt} we were not only able to axiomatize it in an automated way, but also guarantee that the obtained axiomatization is analytic, a crucial property from the proof-theoretical point of view. In \cite{synt} we also have shown how to get purely symbolic decision and proof-search procedures from analytical axiomatizations. From the compositionality point of view there are clear advantages in considering such calculi, involving no additional meta-language as in the (less pure) usual alternatives: sequent calculi, labeled tableaux or natural deduction. This internal view of logic is also directly associated with the fundamental notion of logic as a consequence operation. Notably, merging calculi for given logics precisely captures the mechanism for combining logics known as fibring \cite{GabFib99,acs:css:ccal:98a}, yielding the least logic on the joint language that extends them. Such perspective allows us to better isolate, study and tame the origins of interactions in combined logics. We detail the structure of the paper highlighting the most relevant results in each section. In Section~\ref{sec:birth} we introduce the platypus connective: first as a multi-function and show that together with any basis for the clone of all Boolean functions it forms a basis for the clone of all Boolean multi-functions (Prop.~\ref{decomp}); then, as a non-deterministic logical connective characterized by a finite Nmatrix and show that this would not be possible using a finite matrix (Thm.~\ref{nofinmat}). In Section~\ref{sec:ax} we explore the divide between single- and multiple-conclusion settings in terms of axiomatizability. We show that platypus' logic is not finitely axiomatizable by a finite set of single-conclusion rules (Thm.~\ref{notfinax}) and provide an analytical axiomatization using two multiple-conclusion rules (Thm.~\ref{finax}). In Section~\ref{sec:comp} we show that deciding the single-conclusion fragment of platypus' logic is in {\bf P} whilst seen as a multiple-conclusion logic it is {\bf coNP}-complete (Thm.\ref{complexity}). We wrap up in with Section~\ref{sec:final}, where we summarize the obtained results and open some doors for future work. \section{The birth of platypus}\label{sec:birth} The study of classical propositional logic is deeply connected to the study of Boolean functions, that is, maps $f:\mathbf{2}^n\to \mathbf{2}$ with $\mathbf{2}=\{0,1\}$. The pioneering work on the clones of Boolean functions by Post \cite{Post41} provides a complete analysis of the semantical expressivity of every fragment of classical logic. What happens if we consider functions that may output multiple values? \subsection{From functions to multi-functions} Multi-functions associate to each given input possibly more than one value. An $n$-ary Boolean multi-function\footnote{In this paper exclude the possibility of a multi-function outputting the empty set however there are situations where this option is desirable as we mention in the end of Section~\ref{sec:ax}.} is a map $f:\mathbf{2}^n\to \wp(\mathbf{2})\setminus \emptyset=\{\{0\},\{1\},\{0,1\}\}$. Of course, if for every input $\vec{x}\in \mathbf{2}^n$ we have that $f(\vec{x})$ is a singleton, then $f$ is also a (Boolean) function. Observe that there are $2^{2^n}$ $n$-ary Boolean functions and $3^{2^n}$ $n$-ary Boolean multi-functions. Hence, there are $81$ binary Boolean multi-functions, $16$ of them are Boolean functions, we will give particular attention to one of the $65$ that are not functions. The main actor in this paper, \emph{platypus}, can be seen as a binary Boolean multi-function given by $\pl(x,y)=\{x\land y,x\lor y\}$. Multi-functions can be easily represented as tables just like functions, check $\pl$ in tabular form in Example~\ref{ex:semantics}. The multi-function $\pl$ was considered in \cite{Avron} in order to approximate the behaviour of a faulty AND gate, which responds correctly if the inputs are similar, and unpredictably otherwise. In this same sense $\pl$ can also be seen as a faulty OR gate. \smallskip A \emph{clone} is a set of functions, over some fixed set, closed by composition and containing every projection function ($\pi^n_i(x_1,\ldots,x_n)=x_i$ for every $n\in \nats$ and $1\leq i\leq n$). A set of functions \emph{generates} (or is a \emph{basis} for) a clone if this clone is exactly the smallest that contains that given set. This concept can be generalized to multi-functions once we fix a notion of composition. % A natural possibility would be to see multi-functions as particular cases of relations. In that case, we have that, when composing given $n$-ary $f$ and $g_i$ for $1\leq i\leq n$, for each input, the \emph{possible values} output by the $g_i$'s are accumulated through the composition, yielding that $ f\circ(g_1,\ldots,g_n)(\vec{x}_1,\ldots,\vec{x}_n)=f(g_1(\vec{x}_1),\ldots,g_n(\vec{x}_n))= \bigcup\{f(\vec{y}):\vec{y}\in\!\! \prod\limits_{1\leq i\leq n}g_i(\vec{x}_i)\} $$ As an alternative we may require that two terms representing the same formula must have the same value when being fed to the outer function and obtain $$f(g_1(\vec{x}_1),\ldots,g_n(\vec{x}_n))= \bigcup\{f(\vec{y}):\vec{y}\in\!\! \prod\limits_{1\leq i\leq n}g_i(\vec{x}_i),y_i=y_j \text{ if }g_i(\vec{x}_i)=g_j(\vec{x}_j)\}$$ Note that whenever $g_i$ for $1\leq i\leq n$ are functions both notions coincide. However, if $g(0)=g(1)=\{0,1\}$, $f(0,0)=f(1,1)=\{0\}$ and $f(0,1)=f(1,0)=\{1\}$ then the composition yields $f(g(x),g(x))=\{0,1\}$ with the first (more liberal) option and simply $f(g(x),g(x))=\{0\}$ with the second. The first interesting property of platypus is that, together with any basis for the clone of all Boolean functions, it forms a basis for the clone of all Boolean multi-functions. Moreover, this is the case regardless of the notion of composition between the two we mentioned above. \begin{proposition}\label{decomp} Given any Boolean multi-function $f$, there are Boolean functions $g_0$ and $g_1$ such that $f=\pl(g_0,g_1)$. \end{proposition} \begin{proof} For each input $\vec{x}\in \mathbf{2}^n$ we have that either $f(\vec{x})=\{0\}$, $f(\vec{x})=\{1\}$ or $f(\vec{x})=\{0,1\}$. Easily, the result follows by letting for $i=0,1$ $$g_i(\vec{x})= \begin{cases} \{i\} &\text{ if }f(\vec{x})=\{0,1\}\\ f(\vec{x}) &\text{otherwise}\\ \end{cases} $$ As $g_0$ and $g_1$ are functions the result of the composition is the same with both notions of composition we considered above. \end{proof} This decomposition is not unique and the following equalities hold: $$\pl(x,y)=\pl(y,x)=\pl(\pi_1^2(x,y),\pi_2^2(x,y))=\pl(x\land y,x\lor y)=\{x\land y,x\lor y\}=\{x,y\}.$$ Furthermore, if we consider the presentation of $\pl$ given by the last equality, and extend $\pl$ to act over a finite set $I$ as $x\pl_I y=\{x,y\}$ and we add it to a basis for the clone of all functions over $I$, we obtain a basis for the clone of all multi-functions over $I$. That is, we can extend Proposition~\ref{decomp} to the statement that for every multi-function $f$ over a fixed set $I$ of size $n$, we have that there are functions over $I$, $g_1,\ldots g_{n}$ such that $f=\pl(g_1, \pl(g_2, \pl(\ldots ,\pl(g_{n-1},g_n))))$. One might argue that a good alternative name\footnote{I thank Carlos Caleiro for suggesting \emph{platypus} and thus steering me away from using such boring alternatives.} for $\pl_I$ could be (non-deterministic) \emph{union} or \emph{choice} (over $I$). \subsection{Platypus as a non-deterministic Boolean matrix} For the sake of readability, we start by quickly revisiting some of the basic concepts needed, for more details see \cite{ShoesmithSmiley,Woj,Humb,font}. A propositional signature is an indexed family $\Sigma=\{\Sigma^{(k)}:k\in \nats\}$ where $\Sigma^{(k)}$ are the k-ary connectives. Given a set $X$, we denote by $L_\Sigma(X)$ the set of formulas written with connectives in $\Sigma$ from the elements of $X$. We consider fixed a (denumerable) set of propositional variables $P$. The propositional language associated to $\Sigma$ is $L_\Sigma(P)$. Along the paper, whilst considering languages over signatures named $\Sigma_x$ we shall denote $L_{\Sigma_x} (P)$ simply by $L_x$. Fixed a propositional language $L$, a (Scottian) \emph{logic} is a $\der\subseteq \wp(L)\times \wp(L)$ satisfying: \begin{itemize} \item[(\bf{O})] $\Gamma\der \Delta$ if $\Gamma\cap \Delta\neq \emptyset$ (\emph{overlap}) \item[(\bf{D})] $\Gamma\cup \Gamma' \der \Delta\cup \Delta'$ if $\Gamma\der \Delta$ (\emph{dilution}) \item[(\bf{C})] $\Gamma\der \Delta$ if $\Gamma\cup\Omega\der \overline{\Omega}\cup\Delta'$ for every partition $\tuple{\Omega,\overline{\Omega}}$ of $L$ (\emph{cut}) \item[(\bf{S})] $\Gamma^\sigma\der \Delta^\sigma$ for any substitution $\sigma:P\to L$ if $\Gamma\der \Delta$ (\emph{substitution invariance}) \end{itemize} We say that $\der$ is \emph{finitary} whenever $\Gamma\der \Delta$ implies $\Gamma'\der \Delta'$ for finite $\Gamma'\subseteq \Gamma$ and $\Delta'\subseteq \Delta$. % It is well known that this is a generalization of the notion of Tarskian logic. Indeed, given a Scottian logic $\der$, its single conclusion fragment $\vdash_\der{=}\der{\cap} (\wp (L) \times L)$ is a Tarskian consequence relation satisfying: \begin{itemize} \item[(\bf{R})] $\Gamma\vdash \varphi$ if $\varphi\in \Gamma$ (\emph{reflexivity}), \item[(\bf{M})] $\Gamma\cup \Gamma' \vdash \varphi$ if $\Gamma\vdash \varphi$ (\emph{monotonicity}), \item[(\bf{T})] $\Gamma\vdash \varphi$ if $\Delta\vdash \varphi $ and $\Gamma\vdash \psi$ for every $\psi\in \Delta$ \emph{transitivity}) \item[(\bf{S}) $\Gamma^\sigma\vdash \varphi^\sigma$ for any substitution $\sigma:P\to L$ if $\Gamma\vdash \varphi$ (\emph{substitution invariance}) \end{itemize} Furthermore, $\vdash$ is \emph{finitary} whenever $\Gamma\vdash \varphi$ then $\Gamma'\vdash \varphi$ for some finite $\Gamma'\subseteq \Gamma$. We say that $\der$ is a multiple-conclusion companion of $\vdash_\der$. Each Tarskian consequence relation $\vdash$ has potentially infinite multiple-conclusion companions. The smallest among these, denoted by $\der_\vdash$, is defined as $\Gamma\der_\vdash \Delta$ if and only if there is $\varphi\in \Delta$ such that $\Gamma\vdash \varphi$. For example, $\vdash$ may be finitary but have non finitary companions, but surely $\der_\vdash$ is finitary. In an abstract sense any companion of $\vdash$ can be used to study $\vdash$, however there are advantages in considering companions that are particularly well behaved. As we shall see, although $\der_\vdash$ is a faithful representation of $\vdash$ in the multiple-conclusion setting, there are nicer ones that can be considered. \smallskip On an orthogonal direction, we will work also with a generalized notion of logical matrix. Along with multi-functions comes an ingenious extension of the standard notion of matrix semantics introduced in \cite{avlev05}. A $\Sigma$-\emph{Nmatrix} is a tuple $\Mt=\tuple{V,\cdot_\Mt,D}$ where $V$ is the set of \emph{truth-values} and $D\subseteq V$ the set of \emph{designated} values. Further, for each ${\copyright}\in \Sigma^{(n)}$, $\cdot_\Mt$ yields ${\copyright}_\Mt:V\to \wp(V)\setminus \emptyset$, \emph{interpreting} ${\copyright}$ as a multi-function over $V$ instead of a function as in the case of matrices. When complex formulas are interpreted over Nmatrices, the value is not completely determined by the values of the subformulas, instead, the multi-functions giving the interpretation of each connective are read non-deterministically, allowing the valuation to choose for each formula a different possible value. An $\Mt$-\emph{valuation} $v$ is a function $v:L_\Sigma(P)\to V$ satisfying $v({\copyright}(\varphi_1,\ldots,\varphi_k))\in {\copyright}_\Mt(v(\varphi_1),\ldots,v(\varphi_k))$ for any $k$-place connective ${\copyright}\in \Sigma$. Just like in the usual matrix semantics, the logic characterized by an $\Sigma$-Nmatrix $\Mt$, $\der_\Mt$, is defined by $\Gamma\der_\Mt \Delta$ whenever $v(\Gamma)\subseteq D$ implies $v(\Delta)\cap D\neq \emptyset$ for every $\Mt$-valuation $v$. As intended, the set of formulas in the left is read conjunctively and the one in the right disjunctively. We denote simply by $\vdash_\Mt$ (instead of $\vdash_{\der_\Mt}$) the single-conclusion fragment of $\der_\Mt$, corresponding to the Taskian consequence relation defined by $\Mt$. The usual logical matrix semantics is recovered when one considers an Nmatrix for which every connective is interepreted as a function. Furthermore, Nmatrix semantics preserves various fundamental properties of matrix semantics. Every partial valuation defined over a set closed for subformulas can be extended to a full valuation (\emph{analyticity}). Furthermore, for finite Nmatrix $\Mt$, $\der_\Mt$ and $\vdash_\Mt$ are \emph{finitary}, and deciding $\der_\Mt$ and $\vdash_\Mt$ is in {\bf coNP} (see \cite{Avron,synt,wollic19}). \smallskip \begin{example}\label{ex:semantics}\em For $\mathsf{conn}\subseteq \{\land,\lor,\pl\}$, let $\Sigma_\mathsf{conn}$ contain exactly the binary connectives in $\mathsf{conn}$, and $\BMt_\mathsf{conn}=\tuple{{\bf 2},\cdot,\{1\}}$ be the $\Sigma_\mathsf{conn}$-Nmatrix where for each ${\copyright}\in \mathsf{conn}$ its interpretation multi-function is described in tabular form as \begin{center} \begin{tabular}{c | c c c } $\land$ & $0$ & $1$ \\ \hline $0$& $ 0 $ & $ 0 $ \\ $1$ &$0$ & $1$ \end{tabular}\quad $\hookrightarrow$ \begin{tabular}{c | c c c } $\pl$ & $0$ & $1$ \\ \hline $0$& $ 0 $ & $ 0,1 $ \\ $1$ &$0,1$ & $1$ \end{tabular}\quad $\hookleftarrow$ \begin{tabular}{c | c c c } $\vee$ & $0$ & $1$ \\ \hline $0$& $ 0 $ & $ 1 $ \\ $1$ &$1$ & $1$ \end{tabular} \end{center} For ease of notation we do not distinguish between the connective and its interpretation, and write $\der_\mathsf{conn}$ instead of $\der_{\BMt_\mathsf{conn}}$, and $\BMt_{\pll}$ and $\BMt_{\land\lor\pl}$ instead of $\BMt_{\{\pll\}}$ and $\BMt_{\{\land,\lor,\pll\}}$. \hfill$\triangle$ \end{example} Whenever $\pl\notin \mathsf{conn}$ we have that $\BMt_\mathsf{conn}$ is the well known Boolean matrix characterizing classical logic in the corresponding signature. For now, let us look closer at platypus' logic $\der_{\pll}{=}\der_{\BMt_{\pll}}$ and its single-conclusion fragment $\vdash_{\pll}{=}\vdash_{\der_{\pll}}{=}\vdash_{\BMt_{\pll}}$. As the inclusion arrows indicate, the interpretation of $\land$ and $\lor$ are contained in the interpretation of $\pl$. Meaning that if we use the tables of $\land$ or $\lor$ to interpret $\pl$ we obtain a strict subset of valuations. Yielding, $$\der_{\pll}\subseteq t_{\pll}(\der_\land) \cap t_{\pll}(\der_\lor)$$ where $t_{\pll}$ swaps every occurrence of $\land$ and $\lor$ by $\pl$. This fact has an interesting immediate consequence: $\der_{\pll}$ inherits the property of being a right-inclusion logic from $\land$, and of being a left-inclusion logic from $\lor$. We say that a logic\footnote{This notion is usually presented over Tarskian consequence relations. In such setting, due to the asymmetry in the very notion of logic, the two notions are not symmetric. We will not enter in details here but just state that for \emph{positive} logics $\der$ where $L_\Sigma(P)\not\der \emptyset$ we have that $\der$ is left-(right-)inclusion logic iff $\vdash_\der$ is. We point to \cite{Bonzio2018_leftinclusion,ISMVL} for more details. } $\der$ is of \emph{left-inclusion} (\emph{right-inclusion}) whenever $\Gamma\der \Delta$ implies there are $\Gamma'\subseteq \Gamma$ and $\Delta'\subseteq \Delta$ such that $\var(\Gamma)\subseteq \var(\Delta)$ ($\var(\Gamma)\supseteq \var(\Delta)$) where $\var(\varphi)$ denotes the set of variables occurring in $\varphi$. \begin{proposition}\em If $\Gamma\der_{\pll} \Delta$ then $\var(\Gamma')=\var(\Delta')$ for some % $\Gamma'\subseteq \Gamma$, $\Delta'\subseteq \Delta$. \end{proposition} \begin{proof} It follows immediately from the previous observation and the fact that $\var(t_{\pll}(\Gamma))=\var(\varphi)$ for every $\varphi\in L_\land\cup L_\lor$. \end{proof} \smallskip It is well know that every logic $\der$ is characterized by some family of matrices. For example, by the family of matrices $\Mt$ satisfying $\der {\subseteq} \der_\Mt$. Or even by of subset of these, the Lindenbaum bundle of $\der$ formed by $\Mt_\Gamma{=}\tuple{L_\Sigma(P),\cdot,\Gamma}$ for $\Gamma\subseteq L_\Sigma(P)$ satisfying $\Gamma \not\der \overline{\Gamma}$ with $\overline{\Gamma} {=} L_\Sigma(P)\setminus \Gamma$ (see \cite{ShoesmithSmiley,font,CCALJM}). The same is true of course in the single-conclusion context. % However can $\der_{\pll}$ or $\vdash_{\pll}$ be characterized by a single matrix? How could such semantics look like? \begin{proposition}\em There is a (deterministic) $\Sigma_{\pll}$-matrix $\Mt$ such that $\der_{\pll}=\der_\Mt$. \end{proposition} % \begin{proof} From \cite{ShoesmithSmiley}[Thm. 15.2] we know that a logic $\der$ is definable by a single matrix if and only if it permits \emph{cancellation}. That is, if $\bigcup_k{X_k}\der \bigcup_k{Y_k}$ and $\var(X_i\cup Y_i)\cap \var(X_i\cup Y_j)$ for $i\neq j$, then there is $i$ such that $X_i\der Y_j$. It is easy to see that $\der_\BMt$ permits cancellation. Given $\BMt$-valuations $v_i$ such that $v_i(X_i)=\{1\}$ and $v_i(Y_i)=\{0\}$, we consider the partial valuation defined over $Z=\bigcup_k L_{\Sigma_{\pll}}(\var(X_k\cup Y_k))$ making $v(\varphi)=v_k(\varphi)$ for $\varphi\in L_{\Sigma_{\pll}}(\var(X_k\cup Y_k)$. As $Z$ is closed under taking subformulas it can be extended to a full $\BMt$-valuation $v$ showing that $\bigcup_k{X_k}\not\der_\BMt \bigcup_k{Y_k}$. \end{proof} Therefore, $\der_{\pll}$, and hence also $\vdash_{\pll}$, can be characterized by a single matrix, however, as we will see, it cannot be a finite one. Given $\varphi\in L_{\pll}$ let $\mathsf{nf}(\varphi)$ be the smallest subformula $\psi$ of $\varphi$ such that $\varphi\in L_{\pll}(\{\psi\})$. That is, $\mathsf{nf}((p\pl p)\pl p)=\mathsf{nf}(p\pl p)=\mathsf{nf}(p)=p$ and $\mathsf{nf}((p\pl q)\pl(p\pl q))=\mathsf{nf}(p\pl q)=p\pl q$. Let also \begin{align*} \pl^{0}(\varphi)&=\varphi\\ \pl^{n+1}(\varphi)&=(\pl^n (\varphi)) \pl \varphi \end{align*} It is straightforward to see that for every formula $\varphi$, $\varphi\dashv\vdash_{\pll} \mathsf{nf}(\varphi)$. In particular $\varphi\dashv\vdash_{\pll} p=\mathsf{nf}(\varphi)$ for every $\varphi\in L_{\pll}(\{p\})$. Every pair of formulas written in one variable are equivalent, however when two variables are present the situation dramatically changes and allows us to show the following result. \begin{theorem}\label{nofinmat}\em There is no finite matrix $\Mt$ such that $\vdash_\BMt=\vdash_\Mt$ or $\der_\BMt=\der_\Mt$. \end{theorem} \begin{proof} For each natural $n$, let $\varphi_n=(\pl^n p) \pl q$. Any $\BMt$-valuation such that $v(\pl^n p)=1$ for every $n\in \nats$, $v(q)=0$, $v((\pl^i p) \pl q)=1$ and $v((\pl^j p) \pl q)=0$ for $i\neq j\in \nats$, showing that $\varphi_i\not\vdash_\BMt \varphi_j$. Hence, $\dashv\vdash_\BMt$ splits $L_{\Sigma_{\pll}}(\{p,q\})$ in an infinite number of equivalence classes. Hence, $\vdash_\BMt$ is not locally tabular and hence by \cite{finval} the first part of the result stands. The second part follows immediately as any $\Mt$ such satisfying $\der_\BMt{=}\der_\Mt$ satisfies also $\vdash_\BMt{=}\vdash_\Mt$. \end{proof} It is easy to see that $p \der_{\pll} p\pl p$ and $p \pl p \der_{\pll} p$ but $(p\pl p)\pl q \not\der_{\pll} p\pl q$ as is shown in the previous proposition. Hence, $\der_{\pll}$ is not self-extensional as it lacks substitution by equivalents. \subsection{Abbreviations over Nmatrices} As we have been seeing, and will be ever more clear along the remaining of this paper, $\pl$ behaves in many different ways from its deterministic Boolean cousins. In fact, non-determinism opens the door to various unexpected phenomena. A notable difference regards considering connectives defined by abbreviation. As in the deterministic case, given an $\Sigma$-Nmatrix each formula $\varphi\in L_{\Sigma}(P)$ (in $n$ variables), defines an $n$-ary multi-function $$\varphi_\Mt(x_1,\ldots,x_n)=\{v(\varphi(p_1,\ldots,p_n)):v \text{ is } \Mt\text{-valuation}, v(p_i)=x_i\text{ for }1\leq i\leq n \}$$ Note that $\varphi_\Mt$ does not correspond to the composition of the interpretation of the connectives (as multi-functions) forming $\varphi$ using any of the notions we mentioned in the previous subsection. Although it is closer to the second, it is still more restrictive. Given $f$ defined by $\varphi$ and $g_i$ by $\psi_i$, their composition is given by $f\circ(g_1,\ldots,g_n)=\varphi(\psi_1,\ldots,\psi_n)_\Mt$. Whenever composing $f(g_1(h(x)),g_2(h(x)))$ we must guarantee that the values fed to $f$, must come from values of $g_1(h(x))$ and $g_2(h(x))$ for the same values of $h(x)$. Nonetheless, Prop.~\ref{decomp} still applies to this notion of composition of (expressible) multi-functions. Another particularity of definitions by abbreviation in the context of Nmatrices is that whenever two formulas determine the same function (instead of a multi-function) we have that they are logically interchangeable in every context. However when some input may output more than a value this is not necessarily the case. For example, $\pl$ is given by a symmetric table, and indeed $\pl(x,y)$ and $\pl(y,x)$ define the same multi-function, we have that $p\pl q\not\der_{\pll} q\pl p$. This means that when working with Nmatrices we have to be careful about what we expect from a connective defined by abbreviation. Clearly, it may lose any connection with the connectives used to define it, as the possibility of independent choices offered by the non-determinism may brake relation between them in the resulting logic. This is a question that must be taken into acount by any approach to the logics of Nmatrices using clones of multi-functions. \smallskip \section{Axiomatizability}\label{sec:ax} Both Tarskian and Scottian logics are associated with very natural notions of axiomatizability according to their type. A set of sound rules $R \subseteq {\vdash}$ \emph{axiomatizes} (or is a \emph{basis} for) $\vdash$ whenever $\vdash$ is the closure of $R$ under ({\bf R})({\bf M})({\bf T})({\bf S}) in which case we write $\vdash_R{=}\vdash$. Analogously, set \emph{sound} rules $R \subseteq {\der}$ \emph{axiomatizes} (or is a \emph{basis} for) $\der$ whenever $\der$ is the closure of $R$ under ({\bf O})({\bf D})({\bf C})({\bf S}), and in that case we write $\der_R{=}\der$. These definitions fare well on the compositional front, as given two logics of compatible type axiomatized by sets of rules $R_1$ and $R_2$ (of according type) their \emph{fibring}, the smallest logic (of the same type) in the combined language that contains both, is axiomatized by $R_1\cup R_2$. Crucially, in both cases the abstract properties defining each type of calculi correspond to the machinery of Hilbert-style calculi where derived consequences using a set of rules $R$ are exactly the ones that hold in the logic axiomatized by $R$. In the single-conclusion case, derivations are sequences where the application of a rule produces a new formula, and in the multiple-conclusion case the proofs take an arboreal shape since the application of the rules produces set of formulas, each corresponding to a child of the node where it was applied\footnote{Rules with empty set of conclusion discontinue the branch of the node where it is applied. We have that $\Gamma\der_R \Delta$ whenever there is a $R$-derivation departing from $\Gamma$ where the leaf of each non discontinued branch must be a formula in $\Delta$.}. The second notion strictly generalizes the first as derivations using only single-conclusion rules coincide in both settings. If $R$ is a set of single conclusion rules $\der_R=\der_{\vdash_R}$. For a formal definitions and illustrate examples of such derivations we point to \cite{ShoesmithSmiley,synt,wollic19}. \subsection Single-conclusion rules only} Rautenberg has shown in \cite{Raut} that every fragment of classical logic is finitely axiomatizable (using single-conclusion rules). \begin{example}\label{ex:axiomatizationssc}\em Consider the following well known axiomatizations for the logics of the deterministic reducts of $\BMt_{\land\lor\pl}$. For $\pl \notin \mathsf{conn}$ we have that $\vdash_{R_\mathsf{conn}}{=}\vdash_{\mathsf{conn}}$ with % \begin{align*} R^{\mathsf{sc}}_{\land}&= \{\frac{p\land q}{p}\ _{r^\land_1}\,,\, \frac{p\land q}{ q}\ _{r^\land_2}\,,\, \frac{p \,,\, q}{p\land q}\ _{r^\land_3}\} \\ % R^{\mathsf{sc}}_\lor&=\{\frac{p}{\;p\ou q\;} \,,\, \frac{\;p\ou p\;}{p} \,,\, \frac{\;p\ou q\;}{q\ou p} \,,\, \frac{\;p\ou (q \ou r)\;}{(p \ou q)\ou r}\}\\ R^{\mathsf{sc}}_{\land\lor}&=R^{\mathsf{sc}}_\land\cup R^{\mathsf{sc}}_\lor \cup \{ \frac{\;p\ou q\;\;\;p\ou r\;}{\;p\ou (q\e r)\;},\frac{\;p\ou (q\e r)\;}{\;p\ou q\;},\frac{\;p\ou (q\e r)\;}{\;p\ou r\;}\} \end{align*} % % % We have shown in \cite{soco} that the rules mixing $\land$ and $\lor$ are fundamental in the single-conclusion setting to capture the interaction between these connectives, contrasting with what happens in the multiple-conclusion setting, as we shall see latter on in this section. \text{}\hfill$\triangle$ \end{example} How about $\vdash_{\pll}$? Can Rautenberg's result be extended to Boolean Nmatrices? The next theorem shows that the answer is negative, but first a proposition giving an useful recursive characterization of $\vdash_{\pll}$. \begin{proposition}\label{prop:scpl}\em $\Gamma\vdash_{\pll} \varphi$ if and only if $\varphi\in L_{\pll}(\mathsf{nf}(\Gamma))$. \end{proposition} \begin{proof} From right to left, let $v$ be an $\Mt_{\pll}$-valuation such that $v(\Gamma)=\{1\}$. As $\psi\vdash_{\pll} \mathsf{nf}(\psi)$ for every $\psi\in\Gamma$ we get that $v(\mathsf{nf}(\Gamma))=\{1\}$, and from $ {p, q}\vdash_{\pll}{p\pl q}$ we get that $v(\psi)=1$ for $\psi\in L_{\pll}(\mathsf{nf}(\Gamma))$. From left to right, we show that if $\varphi\notin L_{\pll}(\mathsf{nf}(\Gamma))$ then there is a $\BMt_{\pll}$-valuation such that $v(\Gamma)=\{1\}$ and $v(\varphi)=0$. By induction on the structure of $\varphi$. If $\varphi=p\in P$ then $v$ such that $v(\psi)=0$ iff $\psi=p$ does the job, as every formula $\Gamma$ must contain some variable different from $p$. If $\varphi=\varphi_1\pl \varphi_2$ then there must be $i\in \{1,2\}$ such that $\varphi_i\notin L_{\pll}(\Gamma)$. By induction hypothesis there is $v$ such that $v(\Gamma)=1$ and $v(\varphi_i)=0$. Hence, we can define some $v'$ that coincides with $v$ on the set of subformulas of $\Gamma$, and makes $v'(\varphi_1\pl \varphi_2)=0$. \end{proof} For $n\in \nats$, let \begin{align*} R_n&=\Bigl\{\frac{\varphi}{p}:\varphi\in L_\pl(\{p\}), \npl(\varphi)\leq n\Bigr\}\\ R_\omega&=\bigcup_{i<\omega} R_i\\ R^\mathsf{sc}_{\pll}&=\Bigl\{\frac{p\, , \, q}{p\pl q}\Bigr\}\cup R_\omega \end{align*} where $\npl(\varphi)$ is the number of occurrences of $\pl$ in $\varphi$. \begin{theorem}\label{notfinax}\em $\vdash_{\pll}$ is axiomatized by $R^\mathsf{sc}_{\pll}$ and it is not finitely axiomatizable. \end{theorem} \begin{proof} That $\vdash_{\pll}{=}\vdash_{R^\mathsf{sc}_{\pll}}$ follows easily from Prop.~\ref{prop:scpl} by observing that the rules in $R_\omega$ are enough to produce $\mathsf{nf}(\Gamma)$ from $\Gamma$ and $\frac{p\, , \, q}{p\pl q}$ is enough to generate every formula in $L_{\pll}(\mathsf{nf}(\Gamma))$ from $\mathsf{nf}(\Gamma)$. To see that $\vdash_{\pll}$ is not finitely axiomatizable, it is enough to show that $\vdash_{\pll}$ is the limit of an infinite strictly increasing sequence $\vdash_n$ (see \cite[Thm.2.2.8]{Woj}). Consider the logic $\vdash^n$ axiomatized by $\{\frac{p\, , \, q}{p \pl q}\}\cup R_n$ for each $n\in \nats$. Clearly, $\vdash_n {\subseteq}\vdash_{n+1} {\subseteq} \vdash_{\pll}$ for each $n$ and $\vdash_{\pll}$ is the limit of this sequence. It remains to show that $\vdash_n{\subsetneq} \vdash_{n+1}$. Let $\Mt_n=\tuple{\{a_0,\ldots,a_n,1\},\cdot_n,\{1\}}$ with % \begin{align*} \pl_n(1,x)&=\pl_n(x,1)=\{1,x\}\\ \pl_n(a_0,a_n)&=\pl_n(a_n,a_0)=\{1,a_0\}\\ \pl_n(a_i,a_j)&=\bigl\{a_{max(0,min(i,j)-1)}\}: \{i,j\}\neq \{0,n\}\bigr\} \end{align*} It is easy to check that $p\,,\,q\vdash_{\Mt_n} p\pl q$ and $\pl^{k}(p)\vdash_{\Mt_n}p$ for $k\leq n$. To show that $\pl^{n+1}(p)\not\vdash_{\Mt_n}p$, consider an $\Mt_n$-valuation $v$ such that $v(p)=a_n$, $v(p\pl p)=a_{n-1}$, \ldots, $v(\pl^n(p))=a_{0}$ and $v(\pl^{n+1}(p))=v(\pl^{n}(p)\pl p)=1$. \end{proof} \subsection{Allowing multiple-conclusion rules} The fact that for certain finite Nmatrices $\Mt$, $\vdash_\Mt$ is non-finitely axiomatizable using single-conclusion rules is nothing that non-determinism can be blamed for. In \cite{wronski74}, Wr\'onski shown that $\vdash_\CMt$ for the (deterministic) $\Sigma_\bullet$-matrix $\CMt=\{\{0,1,2\},\cdot_\CMt,\{2\}\}$ where $\Sigma_\bullet$ contains a single binary connective $\bullet$ and \begin{center} \begin{tabular}{c | c c c} $\bullet_{\CMt}$ & $0$ & $1$ & $2$ \\ \hline $0$ & $1$ & $2$ & $2$ \\ $1$ &$2$ & $2$ & $2$\\ $2$ &$1$ & $2$ & $2$ \end{tabular} \end{center} is not finitely (single-conclusion) axiomatizable. However, $\der_\CMt$ is axiomatized multiple-conclusion by the following $6$ rules \cite{synt}: $$\frac{ }{\;(p\bullet q)\bullet (p\bullet q)\; }\qquad \frac{q}{\;p\bullet q\;}\qquad \frac{q\bullet q}{\;q\,,\,p\bullet q\;}$$ $$\frac{p\bullet p}{\;p\,,\,p\bullet q\;}\qquad \frac{\;p\;,\;p\bullet q\;}{\,q\bullet q}\qquad \frac{\;p\bullet q\;}{\;p\bullet p\;,\;q\bullet q\;}$$ The first advantage of working in the multiple-conclusion setting is that every finite (deterministic) matrix is finitely axiomatizable \cite[Thm.19.12]{ShoesmithSmiley}, whereas in the single-conclusion this fails already for matrices of size $3$. In \cite{synt} we shown that this result could be extended to every finite Nmatrix provided it is \emph{monadic}, a reasonable expressiveness requirement. An Nmatrix is $\Mt=\tuple{V,\cdot_\Mt,D}$ is \emph{monadic} if there is a set of formulas in one variable $S\subseteq L_{\Sigma}(\{p\})$ \emph{separating} $\Mt$, that is, such that for each every pair of distinct elements of $\Mt$ there is $\varphi\in S$ such that $\varphi_\Mt(x)\subseteq D$ and $\varphi_\Mt(y)\subseteq V\setminus D$, or $\varphi_\Mt(x)\subseteq V\setminus D$ and $\varphi_\Mt(y)\subseteq D$. In the $3$-valued matrix $\CMt$ this requirement is met with $S=\{p,p\bullet p\}$ which allowed us to produce the axiomatization above. \smallskip Moreover, it is easy to check that for any signature $\Sigma$ and Boolean Nmatrix $\Mt=\tuple{{\bf 2},\cdot_\Mt,\{1\}}$ we have that the set $S=\{p\}$ separates $\Mt$. In this (Boolean) case, the general strategy to axiomatize $\der_\Mt$ introduced in \cite{synt} boils down to collecting the rules $R_{{\copyright},\vec{x}}$ for each ${\copyright}\in \Sigma^{(n)}$ and $\vec{x}\in {\bf 2}^n$ where ${\copyright}_\Mt(\vec{x})\neq\{0,1\}$: \begin{itemize} \item[] if ${\copyright}_\Mt(\vec{x})=\{0\}$ make % $$R_{{\copyright},\vec{x}}=\frac{\{p_i:x_i=1\}\cup \{{\copyright}(p_1,\ldots,p_k)\}}{\{p_i:x_i=0\}}$$ \item[] if ${\copyright}_\Mt(\vec{x})=\{1\}$ make $$R_{{\copyright},\vec{x}}=\frac{\{p_i:x_i=1\}}{\{p_i:x_i=0\}\cup \{{\copyright}(p_1,\ldots,p_k)\}}$$ \end{itemize} Note that this axiomatization is completely modular on the connectives being considered. Furthermore, it is modular in the entries of the table defining each connective, a single rule is collected for each entry where ${\copyright}_\Mt(\vec{x})$ is a singleton. Yielding the following axiomatization of $\der_{\pll}$. \begin{theorem}\label{finax}\em $\der_{R_{\pll}}\,=\,\der_{\pll}$ with $$R_{\pll}\,=\,\Bigl\{ \frac{p\, , \, q}{p\pl q}\ _{r^\mathsf{sc}_{\pll}} \,,\, \frac{p\pl q}{p\, , \, q}\ _{r^\mathsf{mc}_{\pll}}\Bigr\} $$ \end{theorem} As a corollary we obtain that $\pl$ is the mysterious connective introduced in \cite[Exercise 4.31.5]{Humb}, by observing that a multiple-conclusion rule $\frac{\Gamma}{\Delta}$ is equivalent to the metarule $\frac{\bigl\{\Gamma'\vdash A: A\in \Gamma\bigr\}\bigcup\bigl\{\Gamma_i,B_i\vdash C: B_i\in \Delta\bigr\}}{\Gamma'\,,\,\bigcup_i\Gamma_i\vdash C}$. } This recipe can be applied to the deterministic case too, yielding $\der_\land=\der_{R^\mathsf{sc}_\land}$ (so $\der_\land=\der_{\vdash_\land}$) and $\der_\lor=\der_{R^\mathsf{mc}_\lor}$ with $R^\mathsf{mc}_\lor=\bigl\{\frac{p}{p\lor q},\frac{q}{p\lor q},\frac{p\lor q}{p\,,\,q}\bigr\}$. Using the modularity on the connectives immediately we obtain that, for $\mathsf{conn}\in \{\land\pl,\lor\pl,{\land\!\lor\!\pl}\}$ we have $\der_{\mathsf{conn}}=\der_{R^\mathsf{mc}_{\mathsf{conn}}}$ with $R^\mathsf{mc}_{\land\pl}=R^\mathsf{sc}_{\land}\cup R^\mathsf{mc}_{\pll}$, $R^\mathsf{mc}_{\lor\pl}=R^\mathsf{mc}_{\lor}\cup R^\mathsf{mc}_{\pll}$ and $R^\mathsf{mc}_{\land\lor\pl}=R^\mathsf{sc}_{\land}\cup R^\mathsf{mc}_{\lor}\cup R^\mathsf{mc}_{\pll}$. \begin{example}\label{ex:derivations}\em The following three multiple-conclusion derivations illustrate how multiple-conclusion derivations can be useful even if the set of conclusions is a singleton. \begin{minipage}{.23\textwidth} \begin{center} $p\der_{\pll} \pl^3(p)$\\[.1cm] \frame{\begin{tikzpicture} \tikzset{level distance=55pt} \tikzset{sibling distance=7pt} \Tree[.$p$ \edge node[auto=right] {$_{r^\mathsf{sc}_{\pll}}$}; [.$p\pl p$ \edge node[auto=right] {$_{r^\mathsf{sc}_{\pll}}$}; [.$\pl^3(p)$ ]] ] \end{tikzpicture}} \end{center} \end{minipage}\quad \begin{minipage}{.28\textwidth} \begin{center} $\pl^3(p)\der_{\pll} p$\\[.1cm] \frame{\begin{tikzpicture} \tikzset{level distance=55pt} \tikzset{sibling distance=7pt} \Tree[.$(p\pl p)\pl p$ \edge node[auto=right] {$_{r^\mathsf{mc}_{\pll}}$}; [.$p\pl p$ \edge node[auto=right] {$_{r^\mathsf{mc}_{\pll}}$}; [.$p$ ] [.$p$ ]] [.$p$ ] ] \end{tikzpicture}} \end{center} \end{minipage} \begin{minipage}{.4\textwidth} \begin{center} $(p\land q)\pl (q\land p)\der_{\land\pl} p\land q$\\[.1cm] \frame{\begin{tikzpicture} \tikzset{level distance=30pt} \tikzset{sibling distance=5pt} \Tree[.$(p\land q)\pl (q\land p)$ \edge node[auto=right] {$_{r^\mathsf{mc}_{\pll}}$}; $p\land q$ [.$q\land p$ \edge node[auto=right] {$_{r^\land_1}$}; [.$p$ \edge node[auto=right] {$_{r^\land_2}$}; [.$q$ \edge node[auto=right] {$_{r^\land_3}$}; [.$p\land q$ ] ] ] ] ] \end{tikzpicture}} \end{center} \end{minipage}\\ The first derivation examplifies how formulas in $L_{\pll}(\{p\})$ can be derived from $p$, using the rule $r^\mathsf{sc}_{\pll}$ shared by $R^\mathsf{sc}_{\pll}$ and $R^\mathsf{mc}_{\pll}$. In the second we show how in this more expressive setting we can recover the infinite rules in $R_\omega$ needed to axiomatize $\vdash_{\pll}$. In the second we show a valid rule in $\BMt_{\land\pl}$ that will be useful later on. % \hfill$\triangle$ \end{example} Note that there are Nmatrices that are finitely axiomatizable using only single-conclusion rules. For example, the above strategy applied to the Boolean $\Sigma_\to$-Nmatrix $\BMt_\to$ where $\Sigma_\to$ contains a single binary connective $\to$ interpreted by the table % \begin{center} \begin{tabular}{c | c c c } $\to$ & $0$ & $1$ \\ \hline $0$& $ 0 $ & $ 0,1 $ \\ $1$ &$0,1$ & $1$ \end{tabular} \end{center} yields the single rule of \emph{modus ponens} $R_{\mathsf{mp}}=\{\frac{p\,,\,p\to q}{q}\}$. Implying that $\der_\Mt=\der_{R_{\mathsf{mp}}}$ is the smallest companion of $\vdash_R$, $\der_{\vdash_R}$. Note that $\vdash_{\BMt_\to}$ is also not characterizable by finite matrix \cite{finval,synt}. There is still another advantage in considering multiple-conclusion rules. The result in \cite{synt} extends the result in \cite{ShoesmithSmiley} in yet another way, a big novelty on Hilbert-style calculi (that avoid the inclusion of meta-language in the derivation mechanism). The obtained calculi are analytical, in the sense that $\Gamma\der_R \Delta$ if and only if there is a $R$-derivation where only subformulas of $\Gamma$ and $\Delta$ appear. This allows for effective purely symbolic decision procedures for the logic and proof-search mechanism, see \cite{synt,wollic19}. \subsection{Compositionality: single- vs multiple-conclusion} As we mentioned above there are great advantages on the compositionality front in avoiding any meta-language. The smallest (single- or multiple- conclusion) logic that contains two (single- or multiple- conclusion) logics is axiomatized by joining axiomatizations of both logics. This allows us to control the desired interactions. Such compositional mechanisms also enlighten us regarding the divide single-/multiple- conclusion. In \cite{soco}, by taking profit from the complete characterization of the Boolean clones (of functions) given by Post \cite{Post41}, we have shown that fragments of classical logic seen as a single-conclusion logics cannot in general be axiomatized by joining the single-conclusion axiomatizations of each of the connectives in that fragment. This sharply contrasts with what happens in multiple-conclusion, as is evident by the general recipe for axiomatizing Boolean Nmatrices presented above. The fact is that the single-conclusion fragment of the fibring of two multiple-conclusion logics differs from the fibring of their single-conclusion fragments. As shown in Example~\ref{ex:derivations} $(p\land q)\pl (q\land p)\der_{R^\mathsf{mc}_{\land\pl}} p\land q$, however by observing the rules in $R^\mathsf{sc}_{\pll}\cup R^\mathsf{sc}_\land$ one can sense that $(p\land q)\pl (q\land p)\not\vdash_{R^\mathsf{sc}_{\pll}\cup R^\mathsf{sc}_\land} p\land q$. How can we prove it? Recent work (some still unpublished) on fibring semantics shines a new light on this phenomena. We will now give a glimpse over it. We say that an Nmatrix $\Mt=\tuple{V,\cdot_\Mt,D}$ is \emph{saturated} whenever for every $\vdash_\Mt$-theory $\Gamma$ there is a $\Mt$-valuation $v$ such that that designates $v(\psi)\in D$ iff $\psi\in\Gamma$. Equivalently, $\Mt$ is saturated iff $\Gamma\not\vdash_\Mt \psi$ for every $\psi\in\Delta$ then $\Gamma\not\der_\Mt \Delta$. Given two Nmatrices $\Mt_1=\tuple{V_1,\cdot_1,D_1}$ and $\Mt_2=\tuple{V_2,\cdot_2,D_2}$ over disjoint signatures let $\Mt_1\star \Mt_2=\tuple{V_{12},\cdot_{12},D_{12}}$ where $V_{12}=(D_1\times D_2)\cup (V_1\setminus D_1\times V_2\setminus D_2)$, $D_{12}=D_1\cup D_2$ and $${\copyright}_{12}(\vec{x})=\{(y_1,y_2)\in V_{12}: y_i\in{\copyright}_i \text{ if }{\copyright}\in \Sigma_i\}.$$ In \cite{wollic} we have show that given two Nmatrices $\Mt_1=\tuple{V_1,\cdot_1,D_1}$ and $\Mt_2=\tuple{V_2,\cdot_2,D_2}$ over disjoint signatures their fibring is simply characterized by $\Mt_1\star \Mt_2$ whenever $\Mt_1$ and $\Mt_2$ are \emph{saturated}. For every $\Mt=\tuple{V,\cdot_\Mt,D}$ let $\Mt^\omega=\tuple{V^\omega,\cdot_\omega,D^\omega}$ where $\cdot_\omega$ interprets each connective component wise. As for any Nmatrix $\Mt$ we have that $\vdash_\Mt=\vdash_{\Mt^\omega}$ and $\Mt^\omega$ is always saturated we obtain a general semantics for joining single-conclusion rules: if $\vdash_{\Mt_i}=\vdash_{R_i}$ for $i\in \{1,2\}$ then $\vdash_{R_1\cup R_2}=\vdash_{\Mt_1^\omega\star \Mt_2^\omega}$. We know that $\BMt_\land$ is saturated, hence $\vdash_{R^\mathsf{sc}_{\pll}\cup R^\mathsf{sc}_\land}=\vdash_{\BMt_{\pll}^\omega\star \BMt_\land}$. It is not hard to show that $\BMt^\omega_{\pll}\star \BMt_\lor$ is isomorphic\footnote{Using ${\bf 2}^\omega\approx \wp(\nats)\approx \{(\nats,1)\}\cup \{(0,X):X\subsetneq \nats\}$.} to $\tuple{\wp(\nats),\widetilde{\cdot},\{\nats\}}$ where $$X\widetilde{\pl} Y=\{Z\in \wp(\nats):X\cap Y\subseteq Z\subseteq \nats\setminus(X\cup Y)\}$$ $$X\tilde{\land} Y= \begin{cases} \{\nats\}& \text{ if }X=Y=\nats\\ \wp(\nats)\setminus\{\nats\}& \text{ otherwise.}\\ \end{cases} $$ Now we can finally show that indeed $(p\land q)\pl (q\land p)\not\vdash_{R^\mathsf{sc}_{\pll}\cup R^\mathsf{sc}_\land} p\land q$. Clearly defining $v(p)=v(q)=v(p\land q)=v(q\land p)=\emptyset$ and $v((p\land q)\pl (q\land p))=\nats$ makes $v$ a partial $\BMt_{\pll}^\omega\star \BMt_\land$-valuation defined over a set closed for subformulas and hence the result follows. As a consequence we get that $\BMt_{\pll}$ cannot be saturated. Furthermore there is no finite saturated Nmatrix characterizing $\vdash_{\pll}$. \begin{proposition}\em There is no finite saturated Nmatrix $\Mt$ such that $\vdash_\Mt{=}\vdash_{\pll}$. \end{proposition} % \begin{proof} Let $\Gamma_n=\{p_i\pl p_j: 0\leq i\neq j \leq n\}$ and $\Delta_n=\{p_i:0\leq i \leq n\}$. We show that given $\Mt=\tuple{V,\cdot_\Mt,D}$ such that $V\setminus D$ has atmost $n$ elements and $\vdash_{\pll} {\subseteq} \vdash_\Mt$ then $\Gamma_n\der_\Mt \Delta_n$. Given $\Mt$-valuation $v$ either if $v(p_i)\in D$ for some $0\leq i < n$ or $v(p_i)=v(p_j)\in V\setminus D$ for some $i\neq j$. If the second case holds then since $p\pl p\der_{\pll} p$ we must have that $v(p_i\pl p_j)\notin V$. Hence, if $v(\Gamma_n)\subseteq D$ then $v(\Delta_n)\cap D\neq \emptyset$. As $\{p_i\pl p_j: 0\leq i \neq j\leq n\}\not\vdash_\Mt p_i$ for $0\leq i \leq n$ we conclude that $\Mt$ is not saturated. \end{proof} It is easy to see that given two Boolean Nmatrices over disjoint signatures their strict product corresponds to joining the operations in a single Nmatrix. If instead we consider the two $\Sigma_{\pll}$-Nmatrices $\BMt^\mathsf{in}_{\pll}=\tuple{\mathbf{2},\cdot_\mathsf{in},\{1\}}$ and $\BMt^\mathsf{el}_{\pll}=\tuple{\mathbf{2},\cdot_\mathsf{el},\{1\}}$ where \begin{center} \begin{tabular}{c | c c c } $\pl_\mathsf{in}$ & $0$ & $1$ \\ \hline $0$& $ 0,1 $ & $ 0,1 $ \\ $1$ &$0,1$ & $1$ \end{tabular}\qquad \begin{tabular}{c | c c c } $\pl_\mathsf{el}$ & $0$ & $1$ \\ \hline $0$& $ 0 $ & $ 0,1 $ \\ $1$ &$0,1$ & $0,1$ \end{tabular} \end{center} and ignore the restriction on the definition of strict product above demanding that the signatures are disjoint, we obtain that $\BMt_{\pll}$ is isomorphic to $\BMt^\mathsf{in}_{\pll}\star \BMt^\mathsf{el}_{\pll}$ where $(0,0)$ and $(1,1)$ are renamed $0$ and $1$, respectively. If we apply the axiomatization strategy introduced in the last subsection we obtain that $\der_{\BMt^\mathsf{in}_{\pll}}$ is axiomatized by the single rule $r^\mathsf{sc}_{\pll}$ and $\der_{\BMt^\mathsf{in}_{\pll}}$ is axiomatized by the single rule $r^\mathsf{mc}_{\pll}$. Hence, platypus' logic is the multiple-conclusion fibring of the two logics axiomatized by each of the rules that axiomatize $\der_\pl$, and $\BMt_{\pll}$ is the strict product of the semantics characterizing each of these rules. In general the strict product of two Nmatrices may end up with some entries with zero values, corresponding to entries where each of the Nmatrices output incompatible values. There is a generalization of Nmatrices called PNmatrices where partiality is also allowed. We are working on a general description of fibred semantics that takes PNmatrices as semantical units. \section{Complexity}\label{sec:comp} In this section we show how moving to the richer multiple-conclusion setting may be essencial to capture an otherwise hidden behaviour of a certain connective. Can the problem of deciding the single-conclusion logic and some of its multiple-conclusion companion differ in complexity? It would not be hard to cook an artificial example where this is the case, however the logic of $\pl$ readily does the job. \begin{theorem}\em \label{complexity} Deciding $\vdash_{\pll}$ is in $ {\bf P}$ and deciding $\der_{\pll}$ is {\bf coNP}-complete. \end{theorem} \begin{proof} The first part follows easily from Proposition~\ref{prop:scpl}: $\mathsf{nf}(\Gamma)$ can be built from $\Gamma$ in polynomial time and its size at most as big as $\Gamma$. Deciding $\varphi\in L_{\pll}(\mathsf{nf}(\Gamma))$ can be done in polynomial time in the sum of the sizes of $\mathsf{nf}(\Gamma)$ and $\varphi$. For the second part we will give a polynomial reduction one of the standard problems known to be {\bf NP}-complete to the problem of deciding $\not\der_{\pll}$. Given an instance of $3$-sat, $\mathcal{I}=\{x^i_1\ou x^i_2\ou x^i_3:1\leq i\leq k\}$ where $x^i_j$ are literals, that is $x^i_j=p^i_j$ or $x^i_j=\neg p^i_j$, let: % \begin{align*} \Gamma_\mathcal{I}&=\{q_{x^i_1}\pl (q_{x^i_2}\pl q_{x^i_3}):1\leq i\leq k\}\\ \Gamma_\mathsf{neg}&=\{q_{p}\pl q_{\neg p}:p\in \var(\mathcal{I})\}\\ \Delta_\mathsf{neg}&=\{q_{\neg p}\pl q_{p}:p\in \var(\mathcal{I})\} \end{align*} The set $\Gamma_\mathcal{I}\cup \Gamma_\mathsf{neg}\cup \Delta_\mathsf{neg}$ can be produced in polynomial time from $\mathcal{I}$ and it is only polynomially larger than it. % Given a valuation $v$ over $\BMt$ such that $v(\Gamma_\mathcal{I})=\{1\}$ means that for each $i$ at least one of $q_{x^i_1}, q_{x^i_2},q_{x^i_3}$ must have value $1$. Futhermore, if $v(\Gamma_\mathsf{neg})=\{1\}$ and $v(\Delta_\mathsf{neg})=\{0\}$ means for every variable $p$ appearing in $\mathcal{I}$ either $q_{\neg p}$ or $q_{p}$ has value $1$ but not both. Hence, $\mathcal{I}$ is satisfiable if and only if $\Gamma_\mathcal{I},\Gamma_\mathsf{neg}\not\der_{\pll}\Delta_\mathsf{neg}$. % % \end{proof} Is this possible for some fragment of classical logic? The answer is \emph{no}. Let $\BMt$ be a Boolean $\Sigma$-matrix where $\Sigma$ contain some arbitrary set of Boolean connectives. From the complete characterization of the complexity of deciding the single-conclusion fragments of classical logic in \cite{BEYERSDORFF20091071} we know that $\vdash_\BMt$ is not {\bf coNP}-complete if and only if the connectives in $\Sigma$ are expressible using the constant functions $0$ and $1$, and only one of the following three binary connectives $\{\land,\lor,\oplus\}$. Deciding $\vdash_\BMt$ for all these non {\bf coNP}-complete cases is in {\bf P}. Since $\vdash_\BMt$ is a fragment of $\der_\BMt$ and deciding the latter is always in {\bf coNP}, we have that if $\vdash_\BMt$ is {\bf coNP}-complete then $\der_\BMt$ is also. The complexity of $\der_{01\land}=\der_{\vdash_{01\land}}$ is in {\bf P} hence if the connectives in $\Sigma$ are expressible using $0$, $1$ and $\land$ then $\der_{\BMt}$ is also in {\bf P}. Furthermore, we have that $\Gamma\der_\BMt \{\delta_1,\ldots,\delta_k\}$ is equivalent to $\Gamma\vdash_\BMt \delta_1\lor \ldots \lor \delta_k$ wherever $\lor$ is expressible by the connectives in $\Sigma$, and to $\Gamma, \neg\delta_2,\ldots,\neg\delta_k\vdash_\BMt \delta_1$ wherever $\neg$ is expressible by the connectives in $\Sigma$. Easily we have that $\neg x=p\oplus 1$. Hence, in all remaining cases deciding $\der_\BMt$ is polynomially reducible to either $\vdash_{01\lor}$ or $\vdash_{01\oplus}$ and are therefore also in {\bf P}. In \cite{BEYERSDORFF20091071} some (sub-polynomial) nuances between deciding the single-premise fragments of $\vdash_\BMt$ are also studied. Most likely, such variations are also present in the divide $\vdash_\BMt$ and $\der_\BMt$ but we leave such analysis for another occasion. \section{Conclusion} \label{sec:final} We have shown how incorporating non-determinism in semantics and moving towards a symmetrical view on logic, by considering multiple-conclusion consequence relations, significantly widens the range of available tools. In particular, it allows for a compositional, bottom up, approach to the analysis of logics. Despite the recent advances there is still a long way to go to reach the depth and sophistication of what is known in the particular field of modal logics. We look to it as source of case studies and inspiration on where to go. We intend to improve on \cite{wollic} and provide a completely general and modular semantics for combined logics by taking as semantical units PNmatrices, covering, of course, what is known for fusion of modal logics. We expect to take profit from such knowledge, and develop techniques as in \cite{CaMaAXS}, to provide insights on the semantics of strengthening of logics with sets of axioms depending on their syntactical structure, akin to what is known regarding Sahlqvist formulas. The use of the extra expressivity of (P)Nmatrix semantics to capture relevant behaviours in many practical engineering or scientific contexts is still in its infancy. Nmatrices have been used already to give effective semantics to a big range of important non-classical logics \cite{Baaz2013,av2,coniglioswap,ISMVL}. These structures can for example be used to deal with paraconsistent behaviour \cite{taming}, to model how a processor deals with information from multiple-sources \cite{Avron}, or for reasoning about computation errors \cite{DBLP:journals/sLogica/AvronK09}. The fact that $\pl$ can be seen as a defective $\land$ or $\lor$ might indicate that (P)Nmatrices can be of value when reasoning about unreliable logic circuits \cite{ASJRCSPM14,ASJRCSPM17}. Also, recently a natural interpretation of quantum states as valuations over Nmatrices was introduced \cite{quantum}. There is still another front opened by considering multi-functions. Acknowledging the importance of the study of function clones for logic, suggests that the development of the theory of multi-function clones might be an interesting path to follow. The fact that there are various possible notions of composition, relating to the differences between tree-automata, term-automata and dag-automata \cite{tata2007,Siva-Dran-Rusi05b}, complicates the question. However the connections with such well established and studied structures looks promising. We finish with a table summarizing some of the results obtained in this paper, illustrating the differences between the logic of $\pl$ and the classical fragments with $\land$ and $\lor$. We can see that certain properties of $\land$ and $\lor$ are preserved (being inclusion logics for instance). However, others are not. Finite-valuedness in terms of matrices and finite axiomatizability using single-conclusion rules are lost. In terms of complexity, deciding the Tarskian logic defined by $\pl$ is in the same complexity of each $\land$ and $\lor$ separately. However deciding its Scottian logic meets the maximum possible complexity of deciding a logic given by a finite Nmatrix, coinciding with the complexity of deciding any fragment of classical logic expressing both $\land$ and $\lor$. Lastly, it seems interesting to explore the relation of $\pl$, and the process that gave rise to it, with the notion of meet-combination of logics introduced by Sernadas et al. in \cite{10.1093/logcom/exr035}. \begin{center} \begin{tabular}{c | c | c | c | c | c } {\small Logic} & {\small Fin. Ax.} & {\small Fin. matrix} & {\small Complexity} & {\small Left-inclusion} & {\small Right-inclusion} \\ \hline $\vdash_\land$& Y & Y & {\bf P} & N& Y\\ $\vdash_\lor$& Y & Y & {\bf P} & Y& N\\ $\vdash_{\pll}$& N & N & {\bf P} & Y& Y\\ $\vdash_{\land\lor}$& Y & Y & {\bf coNP} & N& N\\ $\der_\land$& Y & Y & {\bf P} & N& Y\\ $\der_\lor$& Y & Y & {\bf P} & N& Y\\ $\der_{\pll}$& Y & N & {\bf coNP} & Y& Y\\ $\der_{\land\lor}$& Y & Y & {\bf coNP} & N& N\\ \hline \end{tabular} \end{center} \bibliographystyle{plain}
\section{Introduction} \label{sec1} The theory of rectangularly dualizable graphs plays an important role in floorplanning, particularly at large scale such as VLSI circuit design. It provides us information at early stage to decide whether a given plane graph can be realized by a rectangular floorplan (RFP). There exists a geometric duality relationship between plane graphs and rectangular floorplans (RFPs) which can be described as follows: An RFP is a partition of a rectangle $\mathcal{R}$ into $n$ rectangles $R_1, R_2, \dots, R_n$ such that no four of them meet at a point. A graph $\mathcal{G}_2$ is a dual of a plane graph $\mathcal{G}_1$ if the vertices of $\mathcal{G}_1$ correspond to the regions of $\mathcal{G}_1$ and for every pair of adjacent vertices of $\mathcal{G}_1$, the corresponding regions in $\mathcal{G}_2$ are adjacent. A plane graph is called a {\it rectangular graph} if each of its edges can be oriented either horizontally or vertically, each of its interior regions is a four-sided region and all interior regions can be fitted in a rectangular enclosure. Only planar graphs can be dualized. If dual of a plane graph is a {\it rectangular graph}, then the plane graph is a {\it rectangularly dualizable graphs} (RDG). Thus an RFP can be seen as an embedding of the dual of a planar graph and it can formally be described as a {\it rectangular dual graph} of an RDG, i.e., for the dual of a RDG to be an RFP, we need to assign horizontal and vertical orientations to its edges. For a better clarification, consider a planar graph $\mathcal{G}$ shown in Fig. \ref{fig:f1}a. We form its extended graph (Fig. \ref{fig:f1}b.) by inserting cycle of length 4 at the exterior of $\mathcal{G}$ and then connecting the vertices of the cycle to the exterior vertices of $\mathcal{G}$. Then it is dualized in Fig. \ref{fig:f1}c. After assigning horizontal or vertical orientation to each of its edges, an embedding as shown in Fig. \ref{fig:f1}d. is obtained. In fact, it is an RFP. Thus $\mathcal{G}$ is rectangularly dualized to an RFP. This transformation is known as the rectangular dualization method which is well-studied in the literature. \begin{figure}[H] \centering \includegraphics[width=0.98\linewidth]{F1} \caption{Rectangular dualization: (a) plane graph, (b) extended plane graph, (c) rectangular dual graph and (d) rectangular floorplan } \label{fig:f1} \end{figure} \subsection{\textbf{RDG application}} A VLSI system structure is described by a graph where vertices correspond to component modules and edges correspond to required interconnections. For a given graph structure of a VLSI circuit, floorplanning is concerned with allocating space to component modules and their interconnections \cite{Heller82}. An embedding method given by Heller \cite{Heller82} enforces interconnection by abutment. Modules are designed in such a way that their connectors exactly match with their neighbors. Adapting this methodology, interconnections are coped with a {\it clever} design. \par Due to the advancement of VLSI technology, it is extremely large. On the other hand, an RDG can handle atmost $3n-7$ interconnections \cite{Shekhawat18}, where $n$ is the number of modules. Consequent to this, its graph may not necessarily be planar and hence in modern VLSI system, component modules and interconnections can not be treated as independent entities. In such a situation, not all interconnections can be enforced by abutment. Linking the remaining interconnections with nonadjacent modules utilize additional routing space. For practicality of solution, a graph described by a VLSI circuit can be embedded in such a way that most of the interconnections can be made by abutment and the remaining interconnections linking with nonadjacent modules use additional routing space. For example, in Fig. \ref{fig:f2}d, $R_7$ and $R_9$, $R_2$ and $R_6$ are interconnected through shaded areas $R_{10}$ and $R_{11}$ respectively. These routing areas are anticipated by introducing crossover vertices\footnote{These vertices are introduced at the intersection of edges if it exists in order to embed a graph as a plane graph.} at a common point of intersection of edges. The use of an RDG in floorplanning of a VLSI system can be illustrated by the following example. Consider a graph described by a VLSI system as shown in Fig. \ref{fig:f2}a. Note that input-output connections between VLSI system and outside world is represented by arrow heads. Although this graph is not planar, it is planarized by adding cross over vertices as shown in Fig. \ref{fig:f2}b. In order to satisfy the necessary adjacency requirements, new edges (red edges) have been added in Fig. \ref{fig:f2}c. After these modifications, it is possible to construct an RFP as shown in Fig. \ref{fig:f2}d where a component rectangle $R_i$ is dualized to a vertex $v_i$. \begin{figure}[H] \centering \includegraphics[width=0.9\linewidth]{F2} \caption{\rm Constructing an RFP corresponding to a plane graph described by a VLSI system.} \label{fig:f2} \end{figure} \subsection{\textbf{Previous Study}} Investigations in the literature shows that the rectangular dualization theory \cite{Kozminski85,Bhasker87,Rinsma87,Lai90} of planar graphs is not much emphasized. It is known that every plane graph can be dualized, but not rectangularly dualized \cite{Kozminski85,Bhasker87,Rinsma87,Lai90}. Kozminski and Kinnen \cite{Kozminski85} derived a necessary and sufficient condition for a plane triangulated graph to be an RDG and implemented it in quadratic time \cite{kozminski1984algorithm}. Later, Bhasker and Sahni \cite{Bhasker87} improved this complexity to linear time implementing the rectangular dualization theory given by Kozminski and Kinnen \cite{Kozminski85}. Rinsma \cite{Rinsma87} showed through a counter example that it is not always possible for a vertex-weighted outer planar graph having 4 vertices of degree 2 to be an RDG. Besides this property, there are infinite outer planar graphs that are not rectangularly dualized. In fact, an outer planar graph having more than four critical shortcuts can not be rectangularly dualized. This can be contradicted by our proposed Theorem \ref{thm52} in Section \ref{sec5}. Since the graph structure of a VLSI system is never outer planar due to its large size, this theory can not be preferable for VLSI circuit's design. The theory of rectangularly dualizable outer planar graphs plays a limited role in building architecture also. Lai and Leinward \cite{Lai90} showed that solving an RFP problem of a planar graph is equivalent to a matching problem of a bipartite graph derived from the given graph. This theory relies on the assigned regions to vertices of a graph. But this theory is not easy to implement, i.e., how can we check the assignments of regions to vertices in an arbitrary given plane graph? In fact, this theory is not implementable until a method for checking assignments of regions to vertices in an EPTG (extended planar triangulated graph) is known. \par For practical use to VLSI field, many constructive algorithms \cite{Bhasker88,Lai88,Kozminski88,Tang90,He93,Yeap95,Kant97,Dasgupta98,Dasgupta01,Eppstein12} based on the graph dualization theory were developed. \par Counting of RFPs has been remained a great issue in combinatorics \cite{Nakano01,Shen03,Yao03,Ackerman06,Reading12,Dawei14,Yamanaka17} because it produces a large solution space. To find a good condition solution in such large solution space is very hard and time consuming. Also, in these approaches, attention is given to blocks-packing in the minimal rectangular area. The other major concerns such as interconnection wire length is lagged behind. \par With the renewed interest in floorplanning, floorplans are constructed using rectilinear modules (concave module) \cite{Yeap93,He99,Chiang05,Zhang11,Alam13} also. Since a concave rectilinear module is made up of more than one rectangle, its design complexity is higher than a rectangular module (convex). Constructing a floorplan using concave rectilinear modules may decrease the quality of the floorplan. \subsection{\textbf{Gap in the existing work}} Motivated by the following points, we here find a necessary and sufficient condition for a given plane graph to be an RDG. \begin{enumerate} \item[i.] Kozminski and Kinnen \cite{Kozminski85} found the following necessary and sufficient for a separable connected graph to be an RDG. \begin{theorem} \label{thm11} {\rm \cite[Theorem 3]{Kozminski85} Suppose that $\mathcal{G}$ is a separable connected plane graph with each of its interior faces triangular. $\mathcal{G}$ is an RDG if and only if \begin{enumerate} \item $\mathcal{G}$ has no separating triangle, \item block neighborhood graph (BNG) is a path, \item each maximal blocks\footnote{A maximal block of a graph $\mathcal{G}$ is a biconnected subgraph of $\mathcal{G}$ which is not contained in any other block.} corresponding to the endpoints of the BNG contains at most 2 critical corner implying paths, \item no other maximal block contains a critical corner implying path. \end{enumerate}} \end{theorem} The proof of this theorem is not rigor, but an outline. Furthermore, we present a counter example showing that it does not work properly for all separable connected graphs (see Fig. \ref{fig:f3}). \begin{figure}[H] \centering \includegraphics[width=0.5\linewidth]{F3} \caption{ \rm A counter example contradicting Theorem \ref{thm11}.} \label{fig:f3} \end{figure} Although the given graph $\mathcal{G}$ in Fig. \ref{fig:f3} satisfies all the conditions given in Theorem \ref{thm11}, it is not an RDG. Using the existing algorithm \cite{Bhasker88}, one can find an RFP for each of its blocks. Then, an RFP for $\mathcal{G}$ can be obtained by gluing them in a rectangular area which is not possible because of the adjacency relation of cut vertices $v_4$ and $v_6$. Corresponding to a cut vertex, there always associate a through rectangle\footnote{A through rectangle shares two sides to the exterior, but they are opposite sides.}\cite{rinsma1988existence} in an RFP for $\mathcal{G}$. But in Fig. \ref{fig:f3}, the cut-vertices are adjacent. Hence, it is not possible to maintain rectangular enclosure while keeping $R_4$ and $R_6$ as through rectangles. \item[ii.] Except Theorem \ref{thm11}, there does not exist a theorem to check the existence of an RFP for separable connected planar graphs in the literature. \item[iii.] Lai and Leinward \cite{Lai90} derived the following necessary and sufficient condition for an extended plane triangulated graph (EPTG) to be an RDG: \begin{theorem} {\rm \cite[Theorem 3]{Lai90} An EPTG is an RDG if and only if each of its triangular regions can be assigned to one of its corner vertices such that each vertex $v_i$ has exactly $d(v_i)-4$ triangular region assigned to it.} \end{theorem} This theory is not implementable until a method for checking assignments of regions to vertices in an EPTG is known. \item[iv.] As discussed above Rinsma's work \cite{Rinsma87} does not fully cover the class of all rectangularly dualizable outer planar graphs. \end{enumerate} \subsection{\textbf{ Results }} In this paper, we find a necessary and sufficient condition for a given plane graph to be an RDG. We show that the unbounded region of an RFP can be realized by an unbounded rectangle in the extended Euclidean plane. Equivalently, we can say that an RFP can be seen as a quadrangulation of the Euclidean plane for which we find a stereographic projection of an RDG. A brief description of our contribution is as follows: In Section \ref{sec2}, we discuss existing facts about RDGs. Section \ref{sec3} describes the extended RDG construction process. In Section \ref{sec4}, we find stenographic projection of the dual of an RDG in order to extract some result pertaining to the exterior (unbounded) region of the dual. In Section \ref{sec5}, we derive a necessary and sufficient condition for an EPTG to be an RDG. Finally, we conclude our contribution and discuss future scope in Section \ref{sec6}. \par A list of notations used in this paper can be seen in Table 1. \begin{table}[H] \centering \begin{tabular}{|p{2cm}|p{9.6cm}|} \hline Symbol & Description \\ \hline RFP & rectangular floorplan \\ \hline RDG & rectangularly dualizable graph \\ \hline PTG & plane triangulated graph \\ \hline EPTG & extended plane triangulated graph \\ \hline $\mathcal{G}$ & a simple connected planar triangulated graph \\ \hline $\mathcal{G}^*$ & Extended plane triangulated graph \\ \hline $v_i$ &$i^{\text{th}}$ vertex of a graph \\ \hline $d(v_i)$ & degree of $v_i$\\ \hline $(v_i,v_j)$ & an edge incident to vertices $v_i$ and $v_j$\\ \hline $R_i$ & $i^{\text{th}}$ rectangle (region) of an RFP (RDG) corresponding to $v_i$ \\ \hline \end{tabular}\\ \caption{\rm List of Notations} \end{table} \section{Preliminaries} \label{sec2} In this section, we survey several facts about RFPs that would be helpful to prove our results. \par A graph is called planar if it can be drawn in the Euclidean plane without crossing its edges except endpoints. A plane graph is a planar graph with a fixed planar drawing. It splits the Euclidean plane into connected regions called faces; the unbounded region is the exterior face (the outermost face) and all other faces are interior faces. The vertices lying on the exterior face are exterior vertices and all other vertices are interior vertices. A graph is said to be $k-$connected if it has at least $k$ vertices and the removal of fever than $k$ vertices does not disconnect the graph. If a connected graph has a cut vertex, then it is called a separable graph, otherwise it is called a nonseparable graph. Since floorplans are concerned with connectivity, we only consider nonseparable (biconnected) and separable connected graphs in this paper. A plane graph is called plane triangulated graph (PTG) if it has triangular faces. A TPG may or may not have exterior face triangular. In this paper, an PTG represents a plane graph with interior triangular faces. \begin{definition} \label{def21} {\rm A graph is said to be {\it rectangular graph } if each of its edges can be oriented horizontally or vertically such that it encloses a rectangular area. If the dual graph of a planar graph is a rectangular graph, then the graph is said to be a {\it rectangularly dualizable graphs} (RDG). In other words, a planar graph is rectangular dualizable (RDG) if its dual can be realized as a rectangular floorplan (RFP). An RFP is a partition of a rectangle $\mathcal{R}$ into $n$ rectangles $R_1, R_2,\dots, R_n$ provided that no four of them meet at a point.} \end{definition} \begin{definition} \label{def23} { \rm \cite{Kozminski85} The block neighborhood graph (BNG) of a plane graph $\mathcal{G}$ is a graph where vertices are represented by biconnected components of $\mathcal{G}$ such that there is an edge between two vertices if and only if the two biconnected components they represent, have a vertex in common.} \end{definition} \begin{definition} \label{def24} {\rm \cite{Kozminski85} A shortcut in a plane block $\mathcal{G}$ is an edge that is incident to two vertices on the outermost cycle $C$ of $\mathcal{G}$ and is not a part of $C$. A corner implying path (CIP) in $\mathcal{G}$ is a $v_1-v_k$ path on the outermost cycle of $\mathcal{G}$ such that it does not contain any vertices of a shortcut other than $v_1$ and $v_k$ and the shortcut $(v_1,v_k)$ is called a critical shortcut.} \end{definition} For a better understanding to Definition \ref{def24}, consider a graph shown in Fig. \ref{fig:f4}. Edges $(v_1,v_3)$, $(v_4,v_9)$ and $(v_6,v_8)$ are shortcuts. Paths $v_1v_2v_3v_4$ and $v_6v_7v_8$ are CIPs while path $v_9v_1v_2v_3v_4$ is is not a CIP since it contains the endpoints of other shortcut $(v_1,v_3)$ and hence $(v_9,v_4)$ is not a critical shortcut. Both shortcuts $(v_1,v_3)$ and $(v_6,v_8)$ are of length 2. \begin{figure}[H] \centering \includegraphics[width=0.7\linewidth]{F4} \caption{\rm (a) Presence of CIPs $v_1v_2v_3$ and (b) a separating triangle $v_4v_6v_7v_4$.} \label{fig:f4} \end{figure} {\rm A component rectangle in an RFP is called a corner rectangle \cite{rinsma1988existence} if its two adjacent sides are adjacent to the exterior while a through rectangle shares its two opposite sides to the exterior. A component rectangle in an RFP is called an end rectangle if its three sides are adjacent to the exterior.} \begin{definition} \label{def26} {\rm A {\it separating cycle} is a cycle in a plane graph $\mathcal{G}$ that encloses vertices inside as well as outside. If a separating cycle is of length 3, it is called a {\it separating triangle} or a complex triangle. We say a separating triangle in a plane graph is {\it critical separating triangle} if it does not contain any other separating triangle in its interior.} \end{definition} For instance, in Fig. \ref{fig:f4}b, the cycle $v_4v_6v_7v_4$ is a separating triangle while the cycle $v_4v_8v_7v_4$ is a critical separating triangle. \begin{theorem} \label{thm22} {\rm \cite[Theorem 3]{Kozminski85} A nonseperable plane graph $\mathcal{G}$ with triangular interior faces except exterior one is an RDG if and only if it has atmost 4 CIPs and has no separating triangle.} \end{theorem} \begin{theorem} \label{thm23} {\rm \cite{west1996introduction} A graph $\mathcal{G}$ is 4-connected if and only if there exist atleast 4 vertex-disjoint path between any two vertices of $\mathcal{G}$.} \end{theorem} \section{Extended RDG Construction} \label{sec3} In a graph described by a VLSI system, vertices and edges correspond to component modules and required interconnections respectively. Communication with units outside the given system are modeled by edges having one end incident to a vertex at the infinity (denoted by $v_{\infty}$, see Fig. \ref{fig:f5}). The vertex $v_\infty$ of an RDG corresponds to the unbounded region of its rectangular dual (RFP). \par Only planar graphs can be dualized. Whenever the graph structure is not planar, it can be made planar by adding crossover vertices until the resultant graph is planar. Such vertices are inserted at crossings of edges in order to split the edges of a nonplanar graph. In general, maximum interconnections by abutment and minimum through channels is used as an objective function. Without loss of generality, we consider simple connected planar graphs in this paper. \par In a floorplan, meeting $k$-component rectangles at a point is called $k$-joints. Since an RFP has three joints or four joints only, its dual has triangular or quadrangle regions only. Abiding by common design practice, we consider RFPs with three joints only. In fact, a quadrangle region can be partitioned into two triangular regions. In such cases, some extra adjacency requests allow unrelated components in the RDG to connect, but these connections are not used for interconnection. \par Furthermore, a rectangular graph needs to be fitted in a rectangular enclosure while connecting to the outside world. Vertices that correspond to regions next to the enclosure are called enclosure vertices \cite{Lai88} and those vertices correspond to corner regions are called corner enclosure vertices. In figure \ref{fig:f5}, vertices $v_7,v_6,v_5,v_4,v_3,v_2,v_1$ are enclosure vertices and $v_7,v_5,v_3,v_1$ are corner enclosure vertices. Since the enclosure has 4 sides, out of these enclosure vertices, the enclosure corner vertices correspond to corner rectangles or end rectangles of an RFP where a corner rectangle shares its two sides to the unbounded (exterior) region and end rectangle shares three sides to the exterior. Therefore, we need to consider atmost 4 extra edges between the selected enclosure corner vertices and $v_\infty$. These atmost 4 extra edges are known as {\it construction edges} \cite{Lai90}. A PTG where enclosure vertices are connected to $v_\infty$ together with 4 additional construction edges is called an EPTG (extended planar triangulated graph). An EPTG is depicted in Fig. \ref{fig:f5} by red edges. It is interesting to note that the regions including unbounded region are triangulated in EPTG so that every region including unbounded region of the dual of RDG is quadrangle. This permits the enclosure to be rectangular. A detailed description of unbounded quadrangle region of the dual can be seen in Section \ref{sec4}. Since there is one to one corresponding between the edges of a plane graph and its dual, an enclosure corner vertex has parallel edges to $v_\infty$. In this paper, we consider a simple connected plane triangulated graph, i.e., there is no loops or parallel edges. However, some minor changes ( parallel edges between enclosure corner vertices and $v_\infty$ only) in the EPTG is done in order to choose four construction edges. \begin{figure}[H] \centering \includegraphics[width=0.5\linewidth]{F5} \caption{\rm Construction of an extended RDG (red edges) and its corresponding RDG (dark edges).} \label{fig:f5} \end{figure} \section{RDG Stereographic Projection} \label{sec4} In this section, we describe stereographic projection of a rectangular graph. \par A small difference between a rectangular dual graph and an RFP is that RFP is an edge-oriented graph such that each of its edges is either horizontally or vertically aligned together with rectangular enclosure whereas the edges of a rectangular dual graph may not be oriented either horizontally or vertically, but they can always be oriented horizontally or vertically. Thus, for transforming a rectangular dual graph into be an RFP, we need to know the orientations of the edges. Once it is known, a rectangular dual graph can be converted into an RFP by orienting edges aligned along horizontal or vertical axis of the Euclidean plane. Thus, an RFP can be seen an embedding of a rectangular dual graph. Further it is interesting to note that an RFP is always a rectangular dual graph, but converse it not true. \par Let $\mathcal{D}$ be the rectangular dual graph of an RDG $\mathcal{G}$. Note that a connected plane graph is a single piece made up of continuous curves (called edges) joining their ends to pairs of the specified points (called vertices) in the Euclidean plane. Consider a sphere $S$ centered at $(0,0,1/2)$ having radius $1/2$, and a fixed plane embedding $\mathcal{D}^*$ of $\mathcal{D}$ in the Euclidean plane passing through $z=0$ ($xy$-plane). Let $(0,0,1)$ be the north pole $N$ and $p$ be a point of an edge of $\mathcal{D}^*$. Draw a line segment joining the points $N$ and $p$. Let $t$ be a point where it intersects the surface of $S$. Thus we see that the point $p$ is mapped to the point $t$. In this way, the image of each of its points is a curved line on the surface of $S$ and hence each edge of $\mathcal{D}^*$ is mapped to a curved line on the surface of $S$. This results an embedding of $\mathcal{D}^*$ on the surface of a sphere. Now, it is important to identify why the edge of $\mathcal{D}^*$ is mapped to the edges on the surface of $S$? In fact, a connected graph is carried to a connected graph by a continuous map. Thus being the mapping continuous, the image of $\mathcal{D}^*$ is again a plane graph on the surface of $S$ with its exterior bounded. Note that the unbounded region is now mapped into a bounded region on $S$ passing through $N$. This process is known as stereographic projection and sphere is known as Riemann sphere. But $\mathcal{D}^*$ is a rectangular dual graph. Its exterior is a four sided rectangular enclosure. This results the unbounded region of $\mathcal{D}^*$ corresponds to a four sided bounded region of the corresponding plane graph embedded on the surface of $S$. Consequently, when we assign horizontal or vertical orientations to the edges of $\mathcal{D}^*$ to transform into an RFP, the unbounded region of $\mathcal{D}^*$ corresponds to an unbounded rectangle (region) $R_\infty$ passing through $\infty$. Thus we see that the exterior of an RFP is a rectangle $R_\infty$ passing through $\infty$. Note that $R_\infty$ is not a part of an RFP, but is a rectangle that shares its two adjacent sides to each of its enclosure corner rectangles. Recall that a rectangle is a four-sided region with 4 right interior angles formed by its sides. Although in case of $R_\infty$, these interior angles can be realized to be $90^{\circ}$ by looking at it from a point at $\infty$, otherwise we realize every interior angle to be $270^{\circ}$. The role of the point at $\infty$ is played by $N$ and hence an alternative way is to realize right angle between two sides of the four-sided region passing through $N$ in the stereographic projection of the rectangular dual graph is the angle between the intersection of their tangents to the sides of this region. This discussion realizes us that an RFP is quadrangulation of the Euclidean plane. \section{RDG Existence Theory} \label{sec5} In this section, we describe the theory of RDGs. \begin{theorem}\label{thm51} {\rm A necessary and sufficient condition for an EPTG $\mathcal{G}^*$ to be an RDG is that it is 4-connected and has atmost 4 critical separating triangles passing through $v_\infty$.} \end{theorem} \begin{proof} \textbf{Necessary Condition.} Assume that $\mathcal{G}^*$ is an RDG. Then it has a rectangular dual graph $\mathcal{D}$. Let $v_i$ be a vertex of $\mathcal{G}^*$ dual to some interior region $R_i$ of $\mathcal{D}$. Since every region of $\mathcal{D}$ is four-sided, atleast 4 regions are required to fully enclose an interior region of $\mathcal{D}$. This implies that $R_i$ is surrounded by atleast 4 regions of $\mathcal{D}$ and hence $v_i$ is adjacent to atleast 4 vertices of $\mathcal{G}^*$, i.e., $d(v_i) \geq 4$. Let $v_e$ be a vertex of $\mathcal{G}^*$ dual to an enclosure (exterior) region $R_e$ of $\mathcal{D}$. There arise two possibilities: \begin{itemize} \item $R_e$ surrounds exactly its two sides with $R_\infty$ if it is an enclosure corner region, \item $R_e$ surrounds exactly its one side with $R_\infty$ if it is not an enclosure corner region. \end{itemize} In the first case, $R_\infty$ surrounds the two sides of $R_e$. There are two edges between $v_\infty$ and $v_e$ where $v_\infty$ corresponds to $R_\infty$. The remaining two sides of $R_e$ are surrounded by atleast two interior regions other than $R_\infty$. This implies that $d(v_e) \geq 4$. In the second case, only one side of $R_e$ is surrounded by $R_\infty$ and the remaining sides are surrounded by atleast three interior regions. This implies that $d(v_e) \geq 4$. Since $v_e$ and $v_i$ are arbitrary vertices of $\mathcal{G}^*$, $\mathcal{G}^*$ is 4-connected. This proves the first condition. \par As discussed in Section \ref{sec4}, $\mathcal{R}_\infty$ surrounds exactly its two adjacent sides to each of the enclosure corner regions of $\mathcal{D}$ and exactly one side to the remaining exterior regions of $\mathcal{D}$. Let $v_c$ be a vertex of $\mathcal{G}^*$ dual to an enclosure corner region of $\mathcal{D}$. We have already shown that $\mathcal{G}^*$ is 4-connected, i.e., $d(v_c)\geq 4$, $\forall v_c \in \mathcal{G}^*$. If $d(v_c)= 4$, then two adjacent sides of $R_c$ are surrounded by $R_\infty$ whereas the remaining two sides of $R_c$ are surrounded by two regions $R_a$ and $R_b$. Clearly, $R_a$ and $R_b$ are the enclosure regions. Since $\mathcal{G}^*$ is an EPTG, every region of $\mathcal{G}^*$ is triangular. This implies that $R_a$ and $R_b$ are adjacent. Consequently, there is a separating triangle passing through $v_\infty$ and vertices that are dual to $R_a$ and $R_b$. Clearly, it encloses exactly one vertex $v_c$. This implies that there is no separating triangle inside this separating triangle and hence it is a critical separating triangle. This situation is depicted in Fig. \ref{fig:f6}a. If $d(v_c)> 4$, there are atleast three interior regions that surround $R_c$. Vertices that are dual to these interior regions together with $v_\infty$ is a cycle of length atleast 4. Only possibility for the existence of a critical separating triangle passing through $v_\infty$ and enclosing $v_c$ is depicted in Fig. \ref{fig:f6}b. Now it is evident that there is atmost one critical separating triangle passing through $v_\infty$ corresponding to each enclosure corner region. Since a rectangular graph has atmost four enclosure corner regions, there can be atmost 4 critical separating triangles passing through $v_\infty$. This proves the second condition. \begin{figure}[H] \centering \includegraphics[width=0.7\linewidth]{F6} \caption{\rm Two possibilities of a critical separating triangle enclosing an enclosure corner vertex.} \label{fig:f6} \end{figure} \textbf{Sufficient Condition.} Assume that the given conditions hold. We prove the result by applying the induction method on the vertices of $\mathcal{G}^*$. Recall that an EPTG contains atleast two vertices. Let $n$ be the number of vertices of $\mathcal{G}^*$. If $n=2$, then it is a graph consisting of a single edge and hence it is an RDG. Let us assume that $n>2$ and the result holds for $n-1$ vertices, i.e., every $(n-1)$-vertex EPTG satisfying the given conditions is an RDG. In order to complete induction, we need to prove that $n$-vertex EPTG $\mathcal{H}$ satisfying the given conditions is an RDG. Since there can be atmost four critical separating triangles in $\mathcal{H}$, there arise two possibilities: (1) there are exactly three edges between $v_\infty$ and atleast one of the enclosure vertices, (2) there are exactly two edges between $v_\infty$ and each enclosure corner vertex. Let $v_i$ be an enclosure corner vertex of $\mathcal{H}$ and $A =\{ v_1, v_2,\dots, v_t\}$ be the set of vertices adjacent to $v_i$. \par Consider the first case, i.e., there exist edges $(v_i,v_\infty)$, $(v_i,v_p)$, $(v_i,v_q)$ where vertices $v_p$ and $v_q$ are incident to $v_\infty$ as shown in Fig. \ref{fig:f7}a. Construct a new EPTG $\mathcal{H}_1$ by deleting $v_i$ together with the incident edges and introducing new edges $(v_\infty,v_1)$, $(v_\infty,v_2) \dots (v_\infty,v_t)$ (see Fig. \ref{fig:f7}b). We prove that $\mathcal{H}_1$ satisfies the given conditions stated in the theorem. \par Consider two vertices $v_a$ and $v_b$ of $\mathcal{H}$ such that $i \neq a,b$. As $\mathcal{H}$ is 4-connected, by Menger's theorem, there exist four vertex-disjoint paths between $v_a$ and $v_b$. Choose each path of the shortest possible length. If none of these paths uses the edges $(v_i,v_p)$ and $(v_i,v_q)$, then the same path would exist in $\mathcal{H}_1$ with the edge $(v_\infty,v_k)$, $(1 \leq k\leq t)$ substituted in the place of $(v_k,v_i)\cup (v_i,v_\infty)$ if they occur in the path. Otherwise suppose that one of the four paths passes through $(v_i,v_p)$. Being the shortest possible path, it can not pass through $v_\infty$ or $v_k$, $(1 \leq k\leq t)$. Consequently, it must use the edge $(v_i,v_q)$. If a path passes through $v_\infty$, it would pass through $v_p$ or $v_q$, contradicting to the facts that path is the shortest. Thus vertex $v_\infty$ is not used by any of the four paths. Now by substituting the part $(v_i,v_p)\cup (v_i,v_q)$ of the path in $\mathcal{H}$ by $(v_p,v_\infty)\cup (v_\infty,v_q)$ in $\mathcal{H}_1$, we can obtain 4 vertex-disjoint paths in $\mathcal{H}_1$ also. Then by Menger's theorem, $\mathcal{H}_1$ is 4-connected. \par Next we claim that the number of critical separating triangles in $\mathcal{H}_1$ can not be more than the number of critical separating triangles in $\mathcal{H}$. As discussed in the necessary part that there is atmost one critical separating triangle enclosing an enclosure corner vertex and $\mathcal{H}$ has three enclosure corner vertices, there are atmost three critical separating triangles in $\mathcal{H}$. Then the only possibility of occurring a separating triangle in $\mathcal{H}_1$ is as follows. If an enclosure vertex $v_l$ is incident to both $v_p$, $v_k$ where $v_k \in A$, then there exists a separating triangle in $\mathcal{H}_1$ passing through $v_k$, $v_p$ and $v_l$. Similarly, there can be another separating triangle in $\mathcal{H}_1$ passing through $v_t$, $v_q$ and $v_s\in A$. thus there can be atmost two new separating triangles in $\mathcal{H}_1$. If there exists a critical separating triangle $T_c$ containing $v_i$ in $\mathcal{H}$, then there are three possibilities: (1) there no longer remains $T_c$ in $\mathcal{H}_1$, (2) $T_c$ is contained in one of the new created separating triangles in $\mathcal{H}_1$, and (3) One of the new created separating triangle is contained in $T_c$. All these possibilities show that there can not be more than four critical separating triangles in $\mathcal{H}_1$. This shows that $\mathcal{H}_1$ has atmost 4 critical separating triangles. Thus, $\mathcal{H}_1$ has $n-1$ vertices satisfying the given conditions. By induction hypothesis, $\mathcal{H}_1$ is an RDG and hence admits an RFP. This RFP can be transformed to another RFP by adjoining a region $R_i$ (corresponding to $v_i$) as shown in Fig. \ref{fig:f7}c. Then the resultant RFP corresponds to $\mathcal{H}$. Hence $\mathcal{H}$ is an RDG. \par Consider the second case. In this case, $\mathcal{H}$ appears as shown in Fig. \ref{fig:f8}a with atleast four more vertices $v_1,v_2,v_3$ and $v_4$. Consider the four enclosure corner vertices $v_1$, $v_2$, $v_3$ and $v_4$ as shown in Fig. \ref{fig:f8}a. Now we show that there is a separating cycle $C$ passing through $v_i$, $v_\infty$ and an enclosure vertex $v_d$ but not passing through $v_3$ or $v_4$ such that the removal of vertices of $C$ from $\mathcal{H}$ disconnects it into two connected pieces, each containing atleast one vertex. \par If there is an edge $(v_1,v_3)$ in $\mathcal{H}$, there is a separating cycle passing through $v_1,v_3$ and $v_\infty$. In this case, $\mathcal{H}$ is separated into two parts, one of which contains atleast $v_2$ and another contains atleast $v_4$. \begin{figure}[H] \centering \includegraphics[width=0.9\linewidth]{F7} \caption{\rm (a) Sketch of the graph $\mathcal{H}$ when there are three edges between $v_\infty$ and enclosure vertex $v_i$, (b) sketch of the graph $\mathcal{H}_1$ when there are exactly two edges between each enclosure corner vertex and $v_\infty$, and (c) the construction of an rectangular dual for $\mathcal{H}$.} \label{fig:f7} \end{figure} If there is no edge $(v_1,v_3)$ in $\mathcal{H}$. All vertices adjacent to $v_3$ lie on a path $y_1y_2\dots y_k$ where $y_1$ and $y_k$ are the enclosure vertices. Let $y_kx_1x_2\dots v_2$ be a path of the enclosure vertices starting from $y_k$ and ending with $v_2$. Then $C=ty_1y_2\dots y_kx_1x_2\dots v_2$ is a separating cycle which separates $\mathcal{H}$ into two parts, one of which atleast contains $v_1$ and another contains atleast $v_3$. \begin{figure}[H] \centering \includegraphics[width=0.9\linewidth]{F8} \caption{\rm (a) A separating cycle shown by red edges and (b) the appearance of $\mathcal{H}_u$.} \label{fig:f8} \end{figure} Once a separating cycle exists, there also exists the shortest separating cycle $C_s=v_\infty z_1z_2\dots z_mz_{m+1}$. This situation is depicted in \ref{fig:f8}b. Without loss of generality, suppose $C_s$ separates $v_1$ and $v_3$. Construct an EPTG $\mathcal{H}_u$ from the subgraph contained in the interior of $C$ by adding a vertex $v_\infty$ and edges between $v_\infty$ and enclosure vertices of this subgraph. The new edges in this construction are $(v'_\infty, z_1)$, $(v'_\infty, z_2)$, \dots $(v'_\infty, z_{m+1})$. Now we show that $\mathcal{H}_u$ satisfies the given conditions. Only possibility for creating a separating triangle is a triangle $z_iz_{i+1}v_\infty$ for $1 \leq i \leq n$. If there would exist an edge $(z_i,z_{i+1})$ in $\mathcal{H}_u$, then it contradicts that $C_s$ is the shortest separating cycle. Therefore, any cycle in $\mathcal{H}_u$ is of length atleast 4 and consequently, $\mathcal{H}_u$ is 4-connected and can not have more than 4 separating triangles. By induction hypothesis, $\mathcal{H}_u$ is an RDG. Similarly, we can show that the EPTG $\mathcal{H}_b$ constructed from the the remaining part of $\mathcal{H}$ is an RDG. Then the corresponding RFP can be placed one above the other and can be merged after applying homeomorphic transformation so as to preserve orthogonal directions of the edges such that the resultant floorplan is an RFP of $\mathcal{H}$ as shown in Fig. \ref{fig:f9}. This completes the induction process and hence completes the proof. \end{proof} \begin{figure}[H] \centering \includegraphics[width=0.7\linewidth]{F9} \caption{\rm (a) Merging two RDGs of $\mathcal{H}_u$ and $\mathcal{H}_b$ into an RDG for $\mathcal{H}$} \label{fig:f9} \end{figure} Now we turn our attention to derive a necessary and sufficient condition for a PTG to be an RDG. A plane graph can be either nonseparable graph (block) or a separable connected graph. A disconnected graph is also a separable graph. However, we are not considering this case since RFP are concerned with connectivity. \begin{theorem}\label{thm52} {\rm A necessary and sufficient condition for a nonseparable PTG $\mathcal{G}$ to an RDG is that it is 4-connected and has atmost 4 critical shortcuts.} \end{theorem} \begin{proof} \textbf{Necessary Condition.} Assume that $\mathcal{G}$ is an RDG. Then it admits an RFP $\mathcal{F}$. Let $v_i$ be an interior vertex of $\mathcal{G}$ dual to a rectangular region $R_i$ of $\mathcal{F}$. Recall that there require atleast 4 component rectangular regions to surround a rectangular region in an RFP. Therefore, there exist atleast 4 rectangular regions in $\mathcal{F}$ enclosing $R_i$. Then $v_i$ is adjacent to atleast 4 vertices, i.e., $d(v_i) \geq 4$. Since $v_i$ is an arbitrary interior vertex of $\mathcal{G}$, $\mathcal{G}$ is 4-connected. \par To the contrary, if there exist 5 critical shortcuts in $\mathcal{G}$, the corresponding EPTG $\mathcal{G}^*$ would contain 5 critical separating triangles, each passing through exactly one critical shortcut. This is a contradiction to Theorem \ref{thm51}. This shows that $\mathcal{G}$ can not have more than 4 critical shortcuts. \par \textbf{Sufficient Condition.} Assume that the given conditions hold. Choose 4 enclosure corner vertices, each on the path joining the endpoints of the critical shortcut lying on its outermost cycle but not as the endpoints of these paths. If the number of critical shortcuts are less than 4, choose the remaining enclosure corner vertices randomly among enclosure vertices. Join each of these 4 vertices to $v_\infty$ by two parallel edges and join each of the remaining $n-4$ enclosure vertices to $v_\infty$ by a single edge. This constructs an EPTG $\mathcal{G}^*$ satisfying all the conditions given in Theorem \ref{thm51}. Hence $\mathcal{G}$ is an RDG. This completes the proof. \end{proof} \begin{theorem}\label{thm53} {\rm A necessary and sufficient condition for a separable connected PTG $\mathcal{G}$ to be an RDG is that: \begin{enumerate}[i.] \item each of its blocks is 4-connected, \item BNG is a path, \item both endpoints of an exterior edge of each of its blocks are not cut vertices, \item each maximal blocks corresponding to the endpoints of the BNG contains at most 2 critical shortcuts, not passing through cut vertices, \item Other remaining maximal blocks do not contain a critical shortcut, not passing through a cut vertex. \end{enumerate} } \end{theorem} \begin{proof} \textbf{Necessary Condition.} Assume that $\mathcal{G}$ is an RDG. The proof of the first condition is a direct consequence followed by Theorem \ref{thm51}. The BNG of $\mathcal{G}$ has the following possibilities: \begin{enumerate}[i.] \item it can be path, \item it can be a cycle of length $\geq 3$, \item it can be a tree. \end{enumerate} To the contrary, suppose that the BNG is a cycle of length atleast $3$. This implies that atleast three blocks share some cut vertex $v_c$ of $\mathcal{G}$. The construction of an EPTG $\mathcal{G}^*$ create more than 4 critical separating triangles, each passing through $v_c$, $v_\infty$, and a vertex adjacent to $v_c$ that belongs to the outermost cycle of each block. This situation can be depicted in Fig. \ref{fig:f10}a. Then by Theorem \ref{thm51}, $\mathcal{G}$ no longer is an RDG. A similar argument can be applied when it is a tree. This situation can be depicted in Fig. \ref{fig:f11}a. Thus, the BNG is left with one possibility, i.e., the BNG is a path. \par To the contrary, suppose that both the endpoints of an exterior edge $(v_i,v_j)$ of a block are cut vertices, then there are more than 4 critical separating triangles passing through $v_i$, $v_j$ and $v_\infty$ in $\mathcal{G}^*$, which is a contradiction to Theorem \ref{thm51}. Hence both the endpoints of an exterior edge of a block can not be cut vertices simultaneously. \par Let $M_i$ be a maximal block corresponding to the endpoints of the BNG. Since $\mathcal{G}$ is an RDG, each of its block is an RDG. Suppose that $M_i$ is an RDG. Then it admits an RFP $\mathcal{F}_i$. It can be easily noted that out of 4 corner rectangular regions of $\mathcal{F}_i$, only two can be the corner rectangular regions of $\mathcal{F}$. Then there can be atmost two critical separating triangles in $\mathcal{G}^*$ and hence there can be atmost two critical shortcuts in each $M_i$. This implies that the second condition holds. Also, any other maximal block of the BNG can not share critical separating triangles since any corner rectangular region in $\mathcal{F}$ is an RFP. This implies that no other maximal block has a critical separating triangle in $\mathcal{G}^*$ and hence there is no critical shortcut in the remaining maximal blocks. \begin{figure}[H] \centering \includegraphics[width=0.7\linewidth]{F10} \caption{\rm (a) A separable connected graph constituted by three blocks A, B and C, and (b) its BNG. Here only the outermost cycles of the blocks are shown. } \label{fig:f10} \end{figure} \textbf{Sufficient Condition.} Assume that the given conditions hold. The first condition shows that $\mathcal{G}^*$ is 4-connected. The remaining conditions show that there are atmost four critical separating triangles in $\mathcal{G}^*$. By Theorem \ref{thm51}, $\mathcal{G}$ is an RDG. Hence the proof. \end{proof} \begin{figure}[H] \centering \includegraphics[width=0.7\linewidth]{F11} \caption{\rm A separable connected graph constituted by three blocks A, B, C and D, and (b) its BNG. Here only the outermost cycles of the blocks are shown.} \label{fig:f11} \end{figure} \section{Concluding remarks and future task} \label{sec6} We developed graph theoretic characterization of RFPs. We reported that the existing RDG theory may fail in some cases. Hence, we proposed a new RDG theory which is easily implementable and it simplifies the floorplan construction process of the VLSI circuits as well architectural buildings. \par In future, it would be interesting to transform a nonRDG into an RDG by removing those edges which violates the RDG property and then adding new edges (maintaining RDG property) in such a way that the distances of endpoints of the deleted edges can be minimized. This idea would be useful in reducing the interconnection wire-lengths as well as in complex buildings, it gives the shortest possible paths for those pairs of rooms which is impossible to directly connect. \bibliographystyle{elsarticle-num} \section{} \label{} \section{} \label{} \section{} \label{}
\section{Introduction}\label{section:introduction} The trace reconstruction problem seeks to recover an unknown string $\boldx\in\{0,1\}^n$, given multiple independent noisy samples or traces of $\boldx$. In this paper, a noisy sample is obtained by passing $\boldx$ through a deletion channel, which randomly and independently deletes each bit of $\boldx$ with probability $q$. We are interested in how many samples are needed to recover $\boldx$ with high probability. The trace reconstruction problem was introduced in \cite{Batu} and proposed earlier in \cite{Lev} under an adversarial setting. It has been receiving increased attention recently due to its application in DNA sequencing \cite{BPRS} and DNA storage under nanopore sequencing \cite{Microsoft,Yazdi}. Also, there are many significant results on trace reconstruction and its variants and generalizations, such as coding for trace reconstruction \cite{Ryan} and population recovery \cite{Ban}. For average case trace reconstruction, where the reconstruction error probability is averaged over all choices of $\boldx\in\{0,1\}^n$, the state of the art upper and lower bounds on the number of samples are $\exp(O(\log^{\frac{1}{3}}(n)))$ \cite{Holden} and $\Omega(\frac{\log^{\frac{5}{2}}(n)}{(\log\log n)^7})$ \cite{Chasel} respectively. Despite the progress for average cases, the trace reconstruction problem proved to be highly nontrivial in worst cases, where the reconstruction error probability goes to zero for arbitrary choice of $\boldx$. For small deletion probabilities, the work in \cite{Rocco} showed that polynomial number of samples suffice when $q\le n^{-(\frac{1}{3}+\epsilon)}$ for some $\epsilon>0$, improving the result in \cite{Batu} for $q\le n^{-(\frac{1}{2}+\epsilon)}$ and some $\epsilon >0$. When the deletion probability becomes constant, there is still an exponential gap between the upper and lower bounds on the number of samples needed. The first achievable sample size for constant deletion probability $q$ is $\exp(\tilde{O}(n^\frac{1}{2}))$ \cite{Mitzenmacher}, which was improved to $\exp(\Theta(n^\frac{1}{3}))$ in independent and simultaneous works \cite{De} and \cite{Peres}. Both \cite{De} and \cite{Peres} studied mean-based algorithms, which use single bit statistics in traces, for reconstruction. They showed that $\exp(O(n^\frac{1}{3}))$ is the best sample size achieved by mean-based algorithms. A novel approach in \cite{De} and \cite{Peres} is to relate single-bit statistics to complex polynomial analysis, and borrow results from \cite{BE97} on complex analysis. This approach was further developed in \cite{Chaseu}, where multi-bit statistics were considered. The current best upper bound on the sample size is $\exp(\tilde{O}(n^\frac{1}{5}))$ \cite{Chaseu}, while the best lower bound $\Omega(\frac{n^{\frac{3}{2}}}{\log^7n})$ \cite{Chasel} is orders of magnitude away from the upper bound. While the general trace reconstruction problem is hard to solve, in this paper, we focus on a variant of the trace reconstruction problem with an edit distance constraint. Specifically, the goal is to recover the string $\boldx$ by using its noisy samples and additional information of a given string $\boldy$, which is known to be within a bounded distance from $\boldx$. The edit distance between two strings is commonly defined as the minimum number of deletions, insertions, or substitutions that transform one string into another. In this paper, we consider only deletion/insertion for convenience, as a substitution is an insertion followed by a deletion. We say that a string $\boldx$ is within edit distance $k$ to a string $\boldy$, denoted as $\boldx\in\cB_k(\boldy)$, if $\boldx$ can be obtained from $\boldy$ after at most $k$ deletions and $k$ insertions. Note that the general trace reconstruction problem considers cases where $k=n$. The setting considered in this paper arises in many practical scenarios in genome sequencing, where one needs to recover an individual genome sequence of a species, given a reference genome sequence that represents the species \cite{Wiki}. Normally, the genome sequences of a species share some similarity and most of them can be considered to be within a bounded edit distance from the reference genome. One example is the Human Genome Project, where a human reference genome is provided to study the difference between individual genomes. Complementary to the problem we consider, the work in \cite{Racz} studied approximate trace reconstruction, which aims to find an estimate within a given edit distance to the true string. Note that such an estimate, together with an algorithm to distinguish two strings within edit distance $k$, establishes a solution to the general trace reconstruction problem. As indicated in \cite{De,Sudan,Mitzenmacher,Mazumdar,Peres}, the problem of worst case trace reconstruction is essentially equivalent to a hypothesis testing problem of distinguishing any two strings using noisy samples. More specifically, the sample complexity needed for trace reconstruction is at most $poly(n)$ times the sample complexity needed to distinguish arbitrary two strings. The same equivalence holds in our setting as well, where a reference string $\boldy$ is known and close to $\boldx$ in edit distance. Hence, for convenience, we consider the problem in the form of distinguishing any two strings $\boldx\in\{0,1\}^n$ and $\boldy\in\{0,1\}^n$ when $\boldx$ is within edit distance $k$ to $\boldy$. One special case of the problem is to distinguish two strings within Hamming distance $k$, which was addressed in \cite{Mazumdar} and $n^{O(k)}$ sample complexity was achieved. Recently, an independent work \cite{Sudan} studied the limitations of mean-based algorithms (see \cite{De} and \cite{Peres}) in distinguishing two strings with bounded edit distance. It was shown that mean-based algorithms need at least $n^{O(\log n)}$ traces to distinguish two strings with edit distance of even $4$. The paper \cite{Sudan} also showed that $n^{O(k^2)}$ suffices to distinguish two strings $\boldx\in\{0,1\}^n$ and $\boldy\in\{0,1\}^n$ with special block structures, if $\boldx\in\cB_k(\boldy)$. Yet, as pointed out in \cite{Racz}, it is an open problem whether $n^{O(k)}$ samples suffice to recover a string that is within edit distance $k$ to a known string. The main contribution of this paper is an affirmative answer to this question. We show that distinguishing two sequences within edit distance $k$ needs at most $n^{O(k)}$ samples. The result is stated in the following. \begin{theorem}\label{theorem:main} Let $\boldx\in\{0,1\}^n$ and $\boldy\in\{0,1\}^n$ be two strings satisfying $\boldx\in\cB_k(\boldy)$. Then strings $\boldx$ and $\boldy$ can be distinguished with high probability, given $n^{O(k)}$ independent noisy samples, each obtained by passing $\boldx$ through a deletion channel with deletion probability $q<1$. \end{theorem} \begin{remark} Theorem \ref{theorem:main} holds for any string $\boldy$ that can be obtained from $\boldx$ after at most $k$ deletions or insertions. The length of $\boldy$ is not necessarily $n$. Yet by definition of the trace reconstruction problem, we focus on length $n$ strings $\boldx$ and $\boldy$. \end{remark} The approach we take follows a similar method to that in \cite{Chaseu,De,Sudan,Peres}, in the sense that we derive bounds on multi-bit statistics through complex analysis of a special class of polynomials. Yet, the complex analysis in this paper differs from those in \cite{Chaseu,De,Sudan,Peres} in the following two ways. Firstly, we make use of the fact that the polynomial is related to a number theoretic problem called the Prouhet-Tarry-Escott problem \cite{Borwein}, which is also noted in \cite{Sudan}. This allows us to link the problem to our previous result on deletion codes \cite{SB20}, where we showed that two constrained strings can be distinguished using weighted sums of powers, which is similar in form to the Prouhet-Tarry-Escott problem. Secondly, to find the maximum value of the polynomial, we let the complex variable take values on a small circle around the point $1$, while the work in \cite{Chaseu,De,Sudan,Peres} analyze the complex polynomial on a unit circle. By doing this, we are able to improve the $n^{O(k^2)}$ bound in \cite{Sudan} to $n^{O(k)}$. The rest of the paper is organized as follows. In Section \ref{section:preliminaries} we provide an introduction to the techniques and the lemmas needed to prove Theorem \ref{theorem:main}. In Section \ref{section:proofoftheorem1}, the proof of Theorem \ref{theorem:main} is given. Section \ref{section:proofoflemma6} presents the proof of a critical lemma on complex analysis. Section \ref{section:conclusion} concludes the paper. \section{Proof Techniques and Lemmas}\label{section:preliminaries} In this section we present a brief introduction to the techniques and key lemmas needed in proving Theorem 1. For strings $\boldx\in\{0,1\}^n$ and $\boldy\in\{0,1\}^n$, let $\tilde{X}=(\tilde{X}_1,\ldots,\tilde{X}_n)$ and $\tilde{Y}=(\tilde{Y}_1,\ldots,\tilde{Y}_n)$ denote the sample obtained by passing $\boldx$ and $\boldy$ through the deletion channel respectively. We have $\tilde{X}_i=\emptyset$ or $\tilde{Y}_j=\emptyset$ if $i$ or $j$ is larger than the length of $\tilde{X}$ or $\tilde{Y}$, respectively. Note that $\tilde{X}$ and $\tilde{Y}$ are sequences of random variables that describe the probability distributions of the samples. The techniques we use were originated in \cite{De,Peres}, which presented the following identity \begin{align}\label{equation:singlebit} \mathbb{E}_{\tilde{X}}\Big[\sum^n_{i=1}\tilde{X}_i(\frac{z-q}{1-q})^i\Big]&=(1-q)\sum^n_{i=1}x_iz^i\nonumber\\ &\triangleq f^s_{\boldx}(z), \end{align} for a sequence $\boldx$ and a complex number $z$. The identity \eqref{equation:singlebit} links the analysis of single bit statistics $\{E_{\tilde{X}}[\tilde{X}_i]\}^n_{i=1}$ to that of complex polynomials. As a result, a lower bound on the maximal difference between single bit statistics $\max_{1\le i\le n}|E_{\tilde{X}}[\tilde{X}_i]-E_{\tilde{Y}}[\tilde{Y}_i]|$ can be obtained through analyzing the maximal value of the polynomial $f^{s}_{\boldx}(z)-f^{s}_{\boldy}(z)$ on a unit disk, a problem referred to as Littlewood type problems and studied in \cite{BE97,BE}. Generalizing the approach in \cite{De,Peres}, the papers \cite{Chaseu} and \cite{Chen} presented multi-bit statistics counterparts of \eqref{equation:singlebit}. In this paper, we consider the version from \cite{Chaseu}, stated in the following lemma. \begin{lemma}\label{lemma:multibitgeneral} \cite{Chaseu} For integer $\ell\ge 1$, complex numbers $z_1,\ldots,z_\ell$, and sequences $\boldx\in \{0,1\}^n$ and $\boldw\in \{0,1\}^\ell$, we have \begin{align}\label{equation:multibitgeneral} &\mathbb{E}_{\tilde{X}}\Big{[}(1-q)^{-\ell}\sum_{1\le i_1<\ldots<i_{\ell}\le n}\1_{\tilde{X}_{i_j}=w_j,\forall j\in[\ell]}\nonumber\\ &~~~~~~~~~~~~~~~~~~~~~~~\cdot(\frac{z_1-q}{1-q})^{i_1}\prod^{\ell}_{j=2}(\frac{z_j-q}{1-q})^{i_j-i_{j-1}-1}\Big{]}\nonumber\\ =&\sum_{1\le j_1<\ldots<j_{\ell}\le n}\1_{x_{j_h}=w_h,\forall h\in[\ell]}z^{j_1}_1\prod^\ell_{h=1}z^{j_h-j_{h-1}-1}_j\nonumber\\ \triangleq& f_{\boldx,\boldw}(z_1,\ldots,z_\ell), \end{align} where $[\ell]=\{1,\ldots,\ell\}$ and $i:i+\ell-1=\{i,\ldots,i+\ell-1\}$. For any statement $E$, the variable $\1_E=1$ iff $E$ holds true. \end{lemma} By taking $z_2=\ldots=z_\ell=0$ in \eqref{equation:multibitgeneral}, we obtain \begin{align}\label{equation:multibit} f_{\boldx,\boldw}(z,0,\ldots,0)=\sum^{n-\ell+1}_{i=1}\1_{\boldx_{i:i+\ell-1}=\boldw}z^i. \end{align} Similar to the arguments in \cite{Chaseu}, we prove Theorem \ref{theorem:main} by analyzing the polynomial $f_{\boldx,\boldw}(z,0,\ldots,0)-f_{\boldy,\boldw}(z,0,\ldots,0)$ associated with the multi-bit statistics in \eqref{equation:multibit}. Note that the polynomial $f_{\boldx,\boldw}(z,0,\ldots,0)-f_{\boldy,\boldw}(z,0,\ldots,0)$ is single variate. The way in which the polynomial is analyzed in this paper deviates from that in \cite{Chaseu}. While the paper \cite{Chaseu} taylored the complex analysis arguments in \cite{BE} to obtain improved bounds, in this paper, we exploit number theoretic properties of two strings $\boldx$ and $\boldy$ within edit distance $k$. In our previous paper \cite{SB20}, we showed implicitly that the weighted sums of powers $\sum^n_{i=1}i^jx_i$, $j\in\{0,\ldots,O(k)\}$ can be used to distinguish two constrained strings $\boldx$ and $\boldy$ within edit distance $k$. The following lemma makes this statement explicit. Let $\mathcal{R}_{n,k}$ denote the set of length $n$ strings such that any two $1$ entries in each string are separated by a $0$ run of length at least $k-1$. \begin{lemma}\label{lemma:parity} For distinct strings~$\boldx,\boldy\in \mathcal{R}_{n,6k}$, if~$\boldx\in\cB_{6k}(\boldy)$, then there exists an integer $m\in [12k+1]$ such that $\sum^n_{i=1}i^mx_i\ne \sum^n_{i=1}i^my_i$. \end{lemma} \begin{proof} Suppose on the contrary, we have that $\sum^n_{i=1}i^mx_i= \sum^n_{i=1}i^my_i$ for all $m\in[12k+1]$. Then, we have that \begin{align}\label{equation:sumofpowers} \sum^n_{i=1}\Big(\sum^i_{j=1}j^{m'}\Big)x_i= \sum^n_{i=1}\Big(\sum^i_{j=1}j^{m'}\Big)y_i \end{align} for all $m'\in\{0,\ldots,12k\}$. This is because $\sum^i_{j=1}j^{m'}$ is a weighted sum of $i^1,\ldots,i^{m'+1}$ for any $m'\in\{0,\ldots,12k+1\}$ (Faulhaber's formula). Next, we borrow a result from \cite{SB20}. \begin{proposition}\label{proposition:parity}\cite{SB20} For sequences~$\boldx,\boldy\in \mathcal{R}_{n,3k}$, if~$\boldy\in \mathcal{B}_{3k}(\boldx)$ and~$ \sum^n_{i=1}(\sum^i_{j=1}j^m)x_i= \sum^n_{i=1}(\sum^i_{j=1}j^m)y_i$ for $m\in \{0,\ldots,6k\}$, then~$\boldx=\boldy$. \end{proposition} Note that $\cB_{5k}(\boldx)\subseteq \cB_{6k}(\boldx)$. Since \eqref{equation:sumofpowers} holds, we apply Proposition \ref{proposition:parity} with $k=2k$ and conclude that $\boldx=\boldy$, which contradicts the fact that $\boldx$ and $\boldy$ are distinct. \end{proof} Interestingly, the following result from \cite{Borwein} connects the sums of powers of two sets of integers that appear in Lemma \ref{lemma:parity} to the number of roots of a polynomial at $1$. It allows us to combine the number theoretic result with further complex analysis, which will be given in Lemma \ref{lemma:complexanalysis}. The lemma can be proved by checking the $i$-th, $i\in[m]$, derivative of the polynomial $\sum^s_{i=1}z^{\alpha_i}- \sum^t_{i=1}z^{\beta_i}$ at point $z=1$. \begin{lemma}\label{proposition:divide}\cite{Borwein} Let $\{\alpha_1,\ldots,\alpha_s\}$ and $\{\beta_1,\ldots,\beta_s\}$ be two sets of integers. The following are equivalent: \begin{enumerate} \item[](a) $\sum^s_{i=1}\alpha^j_i= \sum^s_{i=1}\beta^j_i$ for $j\in [m-1]$. \item[](b) $(z-1)^m \textup{ divides } \sum^s_{i=1}z^{\alpha_i}- \sum^s_{i=1}z^{\beta_i}$. \end{enumerate} \end{lemma} \begin{remark} The problem of finding two sets of integers $\{\alpha_1,\ldots,\alpha_s\}$ and $\{\beta_1,\ldots,\beta_s\}$ satisfying the statement (a) is called the Prouhet-Tarry-Escott problem \cite{Borwein}. This connection between the Prouhet-Tarry-Escott problem and the analysis of polynomials was also used in \cite{Sudan} and implicitly in \cite{KR97}. \end{remark} Lemma \ref{lemma:parity} requires that the strings $\boldx$ and $\boldy$ are within $\cR(n,6k)$, which does not hold in general. Following the same trick as in \cite{Chaseu} and \cite{SB20}, we define an indicator vector as follows. For any sequences $\boldx\in\{0,1\}^n$ and $\boldw\in\{0,1\}^\ell$, define the length $n$ vector \begin{align*} \1_{\boldw}(\boldx)_i &\triangleq \begin{cases} 1, &\text{if~$\boldx_{i:i+\ell-1}=\boldw$,}\\ 0,&\text{else.}\\ \end{cases} \end{align*} for $i\in[n]$. Note that $\1_{\boldw}(\boldx)_i=0$ for $i\in\{n-\ell+2,\ldots,n\}$. It can be seen that the polynomial $f_{\boldx,\boldw}(z,0,\ldots,0)$ related to multi-bit statistics is exactly the polynomial $f^s_{\1_{\boldw}(\boldx)}(z)$ related to single-bit statistics. To apply Lemma \ref{lemma:parity}, we need to find a $\boldw$ such that $\1_{\boldw}(\boldx)\in\cR(n,6k)$. The same as what the paper \cite{Chaseu} did, we find such a $\boldw$ by using the following lemma from \cite{Robson}. A string $\boldw\in\{0,1\}^\ell$ is said to have period $a$, if and only if $w_i=w_{i+a}$ for $i\in [\ell-a]$. Moreover, a string $\boldw\in\{0,1\}^\ell$ is said to be non-periodic, iff $\boldw$ does not have period $a$ for $a\in[\lceil \frac{\ell}{2}\rceil-1]$. \begin{lemma}\label{lemma:period} For any sequences~$\boldw\in\{0,1\}^{2p-1}$, either~$(\boldw,0)$ or~$(\boldw,1)$ is non-periodic, where $(\boldw,0)$ and $(\boldw,1)$ is the string obtained by appending $0$ and $1$ to $\boldw$, respectively. \end{lemma} Lemma \ref{lemma:period} can be proved by definition of period. The claim that $\1_{\boldw}(\boldx)\in\cR(n,p)$ follows from Lemma \ref{lemma:period} and will be proved in Lemma \ref{lemma:distancek}. In addition, the edit distance between $\1_{\boldw}(\boldx)$ and $\1_{\boldw}(\boldy)$ needs to be bounded to apply Lemma \ref{lemma:parity}. This is proved in the following lemma. \begin{lemma}\label{lemma:distancek} Let~$\boldw\in\{0,1\}^{2p}$ be a non-periodic string. For two strings~$\boldx$ and~$\boldy\in\cB_{k}(\boldx)$, we have that \begin{enumerate} \item[(a)] $\1_{\boldw}(\boldx)\in \mathcal{R}_{n,p}$. \item[(b)] $\1_{\boldw}(\boldy)\in \mathcal{R}_{n,p}$. \item[(c)] $\1_{\boldw}(\boldx)\in\cB_{5k}(\1_{\boldw}(\boldy))$. \end{enumerate} \end{lemma} \begin{proof} The statements (a) and (b) follow from the definition of vectors $\1_{\boldw}(\boldx)$ and $\1_{\boldw}(\boldy)$ and the fact that $\boldw$ is non-periodic. Suppose there are two $1$ entries $\1_{\boldw}(\boldx)_i$ and $\1_{\boldw}(\boldx)_{i+a}$ in $\1_{\boldw}(\boldx)$ that are separated by less than $p-1$ $0$'s, i.e., $a\le p-1$. Then by definition of $\1_{\boldw}(\boldx)$, we have that $\boldx_{i:i+2p-1}=\boldw$ and that $\boldx_{i+a:i+a+2p-1}=\boldw$. This implies that $w_{j}=x_{i+a+j-1}=w_{j+a}$ for $j\in[2p -a]$. Hence, the string $\boldw$ has period $a\le p-1$, contradicting to the fact that $\boldw$ is non-periodic. Hence, we have that $\1_{\boldw}(\boldx)\in \mathcal{R}_{n,p}$, and similarly that $\1_{\boldw}(\boldy)\in \mathcal{R}_{n,p}$ We now prove statement (c). To this end, we first show that a deletion in $\boldx$ results in at most three deletions and two insertions in $\1_{\boldw}(\boldx)$. Since $\boldw$ has length $2p$ and $\1_{\boldw}(\boldx)\in \mathcal{R}_{n,p}$ as shown in (a), a deletion in $\boldx$ results in at most two deletions and two insertions of $1$ entries in $\1_{\boldw}(\boldx)$, respectively. Otherwise, suppose that a deletion in $\boldx$ deletes three $1$ entries $\1_{\boldw}(\boldx)_{i_1}$, $\1_{\boldw}(\boldx)_{i_2}$, and $\1_{\boldw}(\boldx)_{i_3}$ in $\1_{\boldw}(\boldx)$, then we have that $i_3-i_1\ge 2p$ because (a) holds. This is impossible since $\boldw\in\{0,1\}^{2p}$ and the deletion in $\boldx$ can not affect the two occurrences $\boldx_{i_1:i_1+2p-1}$ and $\boldx_{i_3:i_3+2p-1}$ of $\boldw$ in $\boldx$ simultaneously. Hence a deletion causes at most two deletions of $1$ entries in $\1_{\boldw}(\boldx)$ and similarly, the same holds for insertions. Moreover, at most one $0$ entry is deleted in $\1_{\boldw}(\boldx)$ because of the deletion in $\boldx$. Hence, a deletion in $\boldx$ causes at most three deletions and two insertions in total in $\1_{\boldw}(\boldx)$, and $k$ deletions in $\boldx$ results in at most $3k$ deletions and $2k$ insertions in $\1_{\boldw}(\boldx)$. The same holds for $\boldy$ and $\1_{\boldw}(\boldy)$. Since $\boldx\in \cB_{k}(\boldy)$, we conclude that $\1_{\boldw}(\boldy)$ can be obtained from $\1_{\boldw}(\boldx)$ by at most $5k$ deletions and $5k$ insertions, and hence, $\1_{\boldw}(\boldx)\in \cB_{5k}(\1_{\boldw}(\boldy))$. \end{proof} With Lemma \ref{lemma:parity} and Lemma \ref{lemma:distancek} established, we present a lower bound on the maximal value of polynomial $f_{\boldx,\boldw}(z,0,\ldots,0)-f_{\boldy,\boldw}(z,0,\ldots,0)$ for $z$ close to $1$. Note that it is important that $z$ is located near the point $1$ on the complex plane because of the scaling factor $(\frac{z-q}{1-q})^i$ in the multi-bit statistics in Eq. \eqref{equation:multibit}. To meet this requirement on $z$, existing works \cite{Chaseu,De,Sudan,Peres} restrict $z$ to lie on short subarcs of a unit circle around $1$, a case also considered in \cite{BE97} in the context of complex analysis. In this paper, we choose $z$ from a small circle around $1$. It turns out that this choice of $z$ achieves a lower bound $\frac{1}{n^{O(k)}}$ on $f_{\boldx,\boldw}(z,0,\ldots,0)-f_{\boldy,\boldw}(z,0,\ldots,0)$, which improves the bound $\frac{1}{n^{O(k^2)}}$ established in \cite{Sudan}. The details will be given in the following lemma, which is a critical result in this paper. Its proof will be given in Section \ref{section:proofoflemma6}. \begin{lemma}\label{lemma:complexanalysis} For integer $\ell\ge 1$ and strings~$\boldx,\boldy\in\{0,1\}^n$ and $\boldw\in\{0,1\}^\ell$, if $\sum^{n}_{i=1}\1_{\boldw}(\boldx)_ii^m\ne \sum^{n}_{i=1}\1_{\boldw}(\boldy)_ii^m$ for some non-negative integer $m$, then there exists a complex number $z$, such that $|\frac{z-q}{1-q}|^n\le 2$ and \begin{align}\label{equation:complexanalysis} \sum^{n}_{i=1}\1_{\boldw}(\boldx)_iz^i -\sum^{n}_{i=1}\1_{\boldw}(\boldy)_iz^i\ge \frac{1}{n^{2m}(2m+2)}. \end{align} for sufficiently large $n$. \end{lemma} Finally, we use the lower bound in Lemma \ref{lemma:complexanalysis} for single variate polynomial $f_{\boldx,\boldw}(z,0,\ldots,0)-f_{\boldy,\boldw}(z,0,\ldots,0)$ to obtain a lower bound for the multi-variate polynomial $f_{\boldx,\boldw}(z_1,\ldots,z_\ell)-f_{\boldy,\boldw}(z_1,\ldots,z_\ell)$, where $z_1,\ldots,z_\ell$ are close to $1$. This lower bound guarantees a gap between the multi-bit statistics of $\tilde{X}$ and $\tilde{Y}$, which makes $\boldx$ and $\boldy$ distinguishable by Hoeffding's inequality (See Section \ref{section:proofoftheorem1}). The proof follows similar steps to the ones in \cite{Chaseu}. \begin{lemma}\label{lemma:complexanalysisgeneral} For integer $\ell\ge 1$ and strings~$\boldx,\boldy\in\{0,1\}^n$ and $\boldw\in\{0,1\}^\ell$, if $\sum^{n}_{i=1}\1_{\boldw}(\boldx)_ii^m\ne \sum^{n}_{i=1}\1_{\boldw}(\boldy)_ii^m$ for some non-negative integer $m$, then there exist complex numbers $z_1,\ldots,z_\ell$, such that $|\frac{z_i-q}{1-q}|^n\le 2$ for $j\in[\ell]$ and \begin{align}\label{equation:complexanalysisgeneral} f_{\boldx,\boldw}(z_1,\ldots,z_\ell)-f_{\boldy,\boldw}(z_1,\ldots,z_\ell)\ge \frac{1}{n^{O(m)}}. \end{align} for sufficiently large $n$. \end{lemma} \begin{proof} According to Lemma \ref{lemma:complexanalysis}, there exists a complex number $z^*$ satisfying $|\frac{z^*-q}{1-q}|^n\le 2$ and \eqref{equation:complexanalysis}. Let $z_1=z^*$ and $z_2=\ldots=z_\ell=z$. Then the polynomial $f(z^*,z)\triangleq f_{\boldx,\boldw}(z^*,z,\ldots,z)-f_{\boldy,\boldw}(z^*,z,\ldots,z)$ is a function of $z$. By \eqref{equation:multibit} and \eqref{equation:complexanalysis} we have that $f(z^*,0)\ge \frac{1}{n^{2m}(2m+2)}$. The following result from \cite{BE} relates $f(z^*,0)$ to the maximal value of $f(z^*,z)$ for $z$ close to $1$. \begin{proposition}\label{proposition:5.1}\cite{BE} Let $f(z)$ be an analytic function satisfying $f(z)\le \frac{1}{1-|z|}$ for $|z|<1$. There are positive real constants $c_1$ and $c_2$ such that \begin{align*} |f(0)|^{\frac{c_1}{a}}\le \exp(\frac{c_2}{a})\max_{z\in [1-a,1]}|f(z)| \end{align*} for real number $a\in (0,1]$ \end{proposition} According to Proposition \ref{proposition:5.1}, we have that \begin{align}\label{equation:max} &\max_{z\in [\max\{2q-1,0\},1]}|f(z^*,z)|\\ \ge& \exp(-\frac{c_2}{1-\max\{2q-1,0\}})|f(z^*,0)|^{\frac{c_1}{1-\max\{2q-1,0\}}}\\ \ge&O(\frac{1}{n^{O(m)}}) \end{align} Let $z_1=z^*$ and $z_2=\ldots=z_\ell$ be the number $z$ maximizing the term $|f(z^*,z)|$ in \eqref{equation:max}. Then by Lemma \ref{lemma:complexanalysis} we have that $|\frac{z_1-q}{1-q}|^n\le 2$ for sufficiently large $n$ and $|\frac{z_i-q}{1-q}|^n\le 1$ for $i\in\{2,\ldots,\ell\}$. Hence, the proof is done. \end{proof} \section{Proof of Theorem 1}\label{section:proofoftheorem1} In this section we prove Theorem 1 based on the results from Lemma \ref{lemma:multibitgeneral} to Lemma \ref{lemma:distancek} and Lemma \ref{lemma:complexanalysisgeneral}. Let $t_0$ be the smallest index such that $x_i\ne y_i$. If $t_0 <12k$, we have the following result from \cite{Zhai}, which was also used in \cite{Chaseu}. \begin{proposition}\label{proposition:elllessthank} For sequences~$\boldx,\boldy\in\{0,1\}^n$, let $t_0$ be the smallest index such that $x_{t_0}\ne y_{t_0}$, i.e., $x_i=y_i$ for $i\in [t_0-1]$. Then, with high probability $\boldx$ and $\boldy$ can be distinguished using $\exp(O(t_0^{\frac{1}{3}}))$ samples. \end{proposition} According to Proposition \ref{proposition:elllessthank}, sequences $\boldx$ and $\boldy$ can be distinguished with high probability using $\exp(O(t_0^{\frac{1}{3}}))<n^{O(k)}$ samples. Hence, it suffices to consider cases when $t_0\ge 12k$. Let $\boldw'=\boldx_{t_0-12k+1:t_0-1}$. By Lemma \ref{lemma:period}, either $(\boldw',0)$ or $(\boldw',1)$ is non-periodic. Without loss of generality, assume that $\boldw=(\boldw',0)\in\{0,1\}^{12k}$ is non-periodic. Then, similar to the arguments in \cite{Chaseu,De,Sudan,Mazumdar,Peres}, the core part of the proof is to show that the difference of multi-bit statistics $\mathbb{E}_{\tilde{X}}[\1_{\tilde{X}_{i_j}=w_j,\forall j\in[12k]}]$ and $\mathbb{E}_{\tilde{Y}}[\1_{\tilde{Y}_{i_j}=w_j,\forall j\in[12k]}]$, is at least $\frac{1}{n^{O(k)}}$ for some integers $1\le i_1<\ldots<i_{12k}\le n$, i.e., \begin{align}\label{equation:totalvariance} \max_{1\le i_1<\ldots<i_{12k}\le n}\Big|&\mathbb{E}_{\tilde{X}}\big[\1_{\tilde{X}_{i_j}=w_j,\forall j\in[12k]}]\nonumber\\ -&\mathbb{E}_{\tilde{Y}}[\1_{\tilde{Y}_{i_j}=w_j,\forall j\in[12k]}\big]\Big|\ge \frac{1}{n^{O(k)}}. \end{align} Let \begin{align*} (i^*_1,\ldots,i^*_{12k})=\text{argmax}_{1\le i_1<\ldots<i_{12k}\le n}&|\mathbb{E}_{\tilde{X}}[\1_{\tilde{X}_{i_j}=w_j,\forall j\in[12k]}]\\ -&\mathbb{E}_{\tilde{Y}}[\1_{\tilde{Y}_{i_j}=w_j,\forall j\in[12k]}]|, \end{align*} which can be determined once $\boldx$ and $\boldy$ are given. Suppose that $\boldx$ is passed through the deletion channel $N$ times, generating $N$ independent samples $\{\tilde{T}^t\}^N_{t=1}$. Then, by using similar Hoeffding's inequality (or the Chernoff bound) arguments as in \cite{Peres}, we can show that with high probability, the empirical distribution $\frac{\sum^N_{t=1}\1_{\tilde{T}^t_{i^*_j}=w_j,\forall j\in[12k]}}{N}$ is closer to $E\big[\1_{\tilde{X}_{i^*_j}=w_j,\forall j\in[12k]}\big]$ than to $E\big[\1_{\tilde{Y}_{i^*_j}=w_j,\forall j\in[12k]}\big]$, if \begin{align*} N&\ge O\left(\frac{1}{|\mathbb{E}_{\tilde{X}}[\1_{\tilde{X}_{i^*_j}=w_j,\forall j\in[12k]}]-\mathbb{E}_{\tilde{Y}}[\1_{\tilde{Y}_{i^*_j}=w_j,\forall j\in[12k]}]|^2}\right)\\ &=n^{O(k)}. \end{align*} Hence $\boldx$ and $\boldy$ can be distinguished using $n^{O(k)}$ samples. Therefore, it suffices to show \eqref{equation:totalvariance} in the rest of the proof. Since $\boldw$ is non-periodic and $\boldx\in\cB_k(\boldy)$, Lemma \ref{lemma:distancek} implies that $\1_{\boldw}(\boldx),\1_{\boldw}(\boldy)\in\cR(n,6k)$ and that $\1_{\boldw}(\boldx)\in \cB_{5k}(\1_{\boldw}(\boldy))$. In addition, either $\boldx_{t_0-12k+1:t_0}=\boldw$ or $\boldy_{t_0-12k+1:t_0}=\boldw$ holds by definition of $\boldw$ and $t_0$. Therefore, we have that $\1_{\boldw}(\boldx)_{t_0-12k+1}\ne \1_{\boldw}(\boldy)_{t_0-12k+1}$, and thus that $\1_{\boldw}(\boldx)\ne \1_{\boldw}(\boldy)$. Hence, we apply Lemma \ref{lemma:parity} and obtain an integer $m\in [12k+1]$ such that $\sum^{n}_{i=1}\1_{\boldw}(\boldx)_ii^m\ne \sum^{n}_{i=1}\1_{\boldw}(\boldx)_ii^m.$ Then, according to Lemma \ref{lemma:complexanalysisgeneral}, there exist complex numbers $z_1,\ldots,z_{12k}$, such that $|\frac{z_j-q}{1-q}|^n\le 2$ for $j\in[12k]$ and \eqref{equation:complexanalysisgeneral} holds for sufficiently large $n$. Lemma \ref{lemma:multibitgeneral} and Eq. \eqref{equation:complexanalysisgeneral} imply that \begin{align*} \sum_{1\le i_1<\ldots<i_{12k}\le n}\Big|&\mathbb{E}_{\tilde{X}}\big[\1_{\tilde{X}_{i_j}=w_j,\forall j\in[12k]}\big]-\mathbb{E}_{\tilde{Y}}\big[\1_{\tilde{Y}_{i_j}=w_j,\forall j\in[12k]}\big]\Big|\\ &(1-q)^{-12k} (\frac{z_1-q}{1-q})^{i_1}\prod^{12k}_{j=2}(\frac{z_j-q}{1-q})^{i_j-i_{j-1}-1}\\ &\ge \frac{1}{n^{O(k)}}, \end{align*} and thus that \begin{align*} &\max_{1\le i_1<\ldots<i_{12k}\le n}\Big|\mathbb{E}_{\tilde{X}}\big[\1_{\tilde{X}_{i_j}=w_j,\forall j\in[12k]}\big]-\mathbb{E}_{\tilde{Y}}\big[\1_{\tilde{Y}_{i_j}=w_j,\forall j\in[12k]}\big]\Big|\\ &\ge \frac{1}{n^{O(k)}}\cdot (1-q)^{12k}\cdot\frac{1}{\binom{n}{12k}}\cdot \prod^{12k}_{j=1}\min\big\{1,|\frac{1-q}{z_j-q}|^n\big\}\\ &=\frac{1}{n^{O(k)}}. \end{align*} Therefore, \eqref{equation:totalvariance} holds and the proof is done. \section{Proof of Lemma \ref{lemma:complexanalysis}}\label{section:proofoflemma6} Without loss of generality, assume that $m$ is the smallest non-negative integer satisfying $\sum^{n}_{i=1}\1_{\boldw}(\boldx)_ii^m\ne \sum^{n}_{i=1}\1_{\boldw}(\boldx)_ii^m$. Let \begin{align} f(z)=\sum^{n}_{i=1}\1_{\boldw}(\boldx)_iz^i -\sum^{n}_{i=1}\1_{\boldw}(\boldx)_iz^i \end{align} be a complex polynomial. The coefficients of $f(z)$ are within the set $\{-1,0,1\}$. According to Lemma \ref{proposition:divide}, we have that $f(z)=(z-1)^mq(x)$, where $q(z)=\sum^{n_1}_{i=0}c_iz^i$ is a complex polynomial with integer coefficients and $(z-1)$ does not divide $q(z)$, i.e., $q(1)\ne 0$. The following result was presented in \cite{BE}. It gives an upper bound on the norm of coefficients of $q(z)$. \begin{proposition}\label{proposition:BE} \cite{BE} If a complex degree $n$ polynomial $f(z)$ has all coefficients with norm not greater than $1$, and can be factorized by \begin{align*} f(z)=(z-1)^mq(z)=(z-1)^m(c_{n_1}z^{n_1}+\ldots+c_0), \end{align*} then, we have that $\sum^{n_1}_{i=1}|c_{i}|\le (n+1)(\frac{en}{m})^{m}$. \end{proposition} We are now ready to prove Lemma \ref{lemma:complexanalysis}. Let $D\triangleq 2m+2$ and $z_j=\exp(\frac{2j\pi i}{D})$, $j\in[D]$ be a sequence of $D$ complex numbers equally distributed on a unit circle. We first show that there exists a number $j\in[D]$ satisfying \begin{align*} q(1+\frac{z_j}{n^2})\ge \frac{1}{n^{O(m)}}. \end{align*} Note that \begin{align*} \Big|\sum^D_{j=1}q(1+\frac{z_j}{n^2})\Big|=&\Big|\sum^{n_1}_{r=0}c_{r}\big[\sum^{D}_{j=1}(1+\frac{\exp(\frac{2j\pi i}{D})}{n^2})^r\big]\Big|\\ =&\Big|\sum^{n_1}_{r=0}c_{r}\sum^{r}_{s=0}\binom{r}{s}\sum^{D}_{j=1}\frac{\exp(\frac{2js\pi i}{D})}{n^{2s}}\Big|\\ \overset{(a)}{=}&\Big|\sum^{n_1}_{r=0}c_r\sum^{r}_{s=0}\binom{r}{s}\frac{D\1_{D\text{ divides }s}}{n^{2s}}\Big|\\ =&\Big|\sum^{n_1}_{r=0}c_r(D+\sum^{r}_{s=1}\binom{r}{s}\frac{D\1_{D\text{ divides }s}}{n^{2s}})\Big|\\ =&\Big|Dq(1)+\sum^{n_1}_{r=0}\sum^{r}_{s=1}c_r\binom{r}{s}\frac{D\1_{D\text{ divides }s}}{n^{2s}}\Big|\\ \ge& D|q(1)|-\sum^{n_1}_{s=1}(\sum^{n_1}_{r=s}|c_r|)\binom{n}{s}\frac{D\1_{D\text{ divides }s}}{n^{2s}}\\ \overset{(b)}{\ge} & D- (n+1)(\frac{en}{m})^{m}\sum^{n_1}_{s=1}\frac{D\1_{D\text{ divides }s}}{n^{s}}\\ \ge&D -D(n+1)(\frac{en}{m})^{m}\frac{1}{n^{D}}\sum^{\infty}_{t=0}\frac{1}{n^{Dt}}\\ \ge& D -D(n+1)(\frac{en}{m})^{m}\frac{2}{n^{D}}\\ \overset{D\triangleq 2m+2}{=} & D-D(n+1)(\frac{e}{mn})^m\frac{2}{n^2} \\ =&D-o(\frac{1}{n})\\ \ge &1 \end{align*} for sufficiently large $n$, where (a) follows from the identity \begin{align*} \sum^{D}_{j=1}\exp(\frac{2js\pi i}{D})= \frac{\exp(\frac{2sD\pi i}{D})-1}{\exp(\frac{2s\pi i}{D})-1}=D\1_{D\text{ divides }s} \end{align*} and (b) follows from Proposition \ref{proposition:BE} and the facts that $q(1)$ is a nonzero integer and that $\binom{n}{s}\le n^s$. Therefore, there exists an integer $j$ such that \begin{align*} |q(1+\frac{z_j}{n^2})|\ge \frac{1}{D}, \end{align*} and thus that \begin{align*} |f(1+\frac{z_j}{n^2})|=&\frac{|q(1+\frac{z_j}{n^2})|}{n^{2m}}\\ \ge & \frac{1}{n^{2m}(2m+2)}. \end{align*} Moreover, we have that \begin{align*} |\frac{1+\frac{z_j}{n^2}-q}{1-q}|^n=&\left(1+\frac{1}{n^4(1-q)^2}+2\frac{cos(\frac{2j\pi }{D})}{n^2(1-q )}\right)^\frac{n}{2}\\ \le &2 \end{align*} for sufficiently large $n$. Hence, $z=1+\frac{z_j}{n^2}$ satisfies the conditions in Lemma \ref{lemma:complexanalysis}. \section{Conclusion}\label{section:conclusion} In this paper we studied the trace reconstruction problem when the string to be recovered is within bounded edit distance to a known string. Our result implies that when the edit distance is constant, the number of traces needed is polynomial. The problem of whether a polynomial number of samples suffices for the general trace reconstruction is open. However, it will be interesting to see if the methods in this paper can be extended to obtain more general results. \bibliographystyle{IEEEtran}
\section{Introduction} The work reported in this paper has three underlying aims. First, and foremost, on a higher-level reading, this paper is an acclamation of the modularization power enabled by \emph{non-deterministic matrices (Nmatrices)}, as proposed and developed by Arnon Avron, along with his coauthors and students over the past 15 years~\cite{avlev05,avron2005,avronnegations,avron2007,AvronBK07,Avron,Avron2012atLICS,avroncutfree2013,rexpansions}, and used by many others~\cite{wollic,wollic19,taming,Baaz2013,soco,synt,coniglioswap} when seeking for a clear semantic rendering of logics resulting from strengthening a given base logic. Secondly, in the technical developments we propose, this paper can be seen as an application of the ideas behind \emph{rexpansions}~\cite{rexpansions} of Nmatrices, in the form of a generalization of the systematic method put forth in~\cite{taming} for obtaining modularly a suitable semantics for a given logic strengthened with additional axioms (and new unary connectives). Expectedly, the method may yield in general a \emph{partial non-deterministic matrix (PNmatrix)}~\cite{Baaz2013}, partiality being a feature that adds to the conciseness of Nmatrices but which is known to contend with \emph{analyticity}. Last but not least, this paper is an opportunity for putting into practice the techniques developed in~\cite{synt,wollic19} for obtaining an analytic multiple-conclusion calculus for the logic defined by any finite PNmatrix (under a reasonable expressiveness proviso). This is in contrast with comparable results for sequent-like calculi~\cite{Baaz2013,taming}, for which partiality seems to devoid them of a usable (even if generalized) subformula property capable of guaranteeing analyticity (and elimination of non-analytic cuts).\smallskip The paper is organized as follows. In Section~\ref{sec2}, we recall (or suitably adapt) the necessary notions about logics, their syntax and semantics. Section~\ref{sec3} presents two methods for using rexpansions in order to obtain semantic characterizations of the strenghtening with additional (schema) axioms $\Ax$ of the logic of a given PNmatrix $\Mt$. The first method, presented in Subsection~\ref{sec31}, is completely general but unfortunately produces an infinite PNmatrix even when a finite one would be available. In order to overcome this drawback, in Subsection~\ref{sec32}, we present another more economic method, generalizing~\cite{taming}, which, under suitable requirements, always provides a finite PNmatrix when starting from finite $\Mt$ and $\Ax$. Section~\ref{sec4} is devoted to illustrating the application of the method of Subsection~\ref{sec32} to some meaningful examples. Then, in Section~\ref{sec5}, we show that (under minimal expressiveness requirements on $\Mt$) the results of~\cite{synt,wollic19} can be used to provide analytic multiple-conclusion calculi to the strengthened logics by exploring the semantics obtained by our method, and provide illustrative examples. We close the paper in Section~\ref{sec6}, with some concluding remarks and topics for future work. \section{Preliminaries}\label{sec2} For the sake of self-containment, and in order to fix notation and terminology, we start by recalling (or suitably adapting, or generalizing) a number of useful notions and results. Instead of going through this material sequentially, the reader could as well jump this section for the moment and refer back here whenever necessary.\smallskip A propositional \emph{signature} $\Sigma$ is a family $\{\Sigma^{(k)}\}_{k\in \nats}$ of sets, where each $\Sigma^{(k)}$ contains the \emph{$k$-place connectives} of $\Sigma$. To simplify notation, we express the fact that ${\copyright}\in\Sigma^{(k)}$ for some $k\in\nats$ by simply writing ${\copyright}\in\Sigma$, and we write $\Sigma'\cup\Sigma$ or $\Sigma'\subseteq\Sigma$ to denote the union or the inclusion, respectively, if $\Sigma'$ is also a signature. Given a signature $\Sigma$, the language $L_{\Sigma}(P)$ is the carrier of the absolutely free $\Sigma$-algebra generated over a given denumerable set of sentential variables $P$. Elements of $L_{\Sigma}(P)$ are called \emph{formulas}. Given a formula $A\in L_{\Sigma}(P)$, we denote by $\var(A)$ (resp.\ $\sub(A)$) the set of variables (resp.\ subformulas) of~$A$, defined as usual; the extension of $\var$ and $\sub$, and other similar functions, from formulas to sets thereof is defined as expected. A \emph{substitution} is a member $\sigma\in L_\Sigma(P)^P$, that is, a function $\sigma:P\to L_\Sigma(P)$, uniquely extendable into an endomorphism $\cdot^\sigma:L_\Sigma(P)\to L_\Sigma(P)$. Given $\Gamma\subseteq L_{\Sigma}(P)$, we denote by~$\Gamma^\sigma$ the set $\{A^\sigma:A\in\Gamma\}$. For $A\in L_\Sigma(P)$, define $A^{\inst}=\{A^\sigma:\sigma\in L_\Sigma(P)^P\}$ and $\Gamma^{\inst}=\bigcup\limits_{A\in\Gamma} A^{\inst}$. Given formulas $A,A_1,\dots,A_n\in L_\Sigma(P)$ with $\var(A)\subseteq\{p_1,\dots,p_n\}$, we write $A(A_1,\dots,A_n)$ to denote the formula $A^\sigma$ where $\sigma(p_i)=A_i$ for $1\leq i\leq n$.\smallskip Given a signature $\Sigma$, a \emph{$\Sigma$-PNmatrix (partial non-deterministic matrix)} is a structure $\Mt=\tuple{V,D,\cdot_\Mt}$ such that $V$ is a set (of \emph{truth-values}), $D\subseteq V$ is the set of \emph{designated} values, and ${\copyright}_\Mt:V^k\to \wp(V)$ is a function (\emph{truth-table}) for each $k\in\nats$ and each $k$-place connective ${\copyright}\in\Sigma$. When ${\copyright}_\Mt(x_1,\dots,x_k)\neq\emptyset$ for all $x_1,\dots,x_k\in V$ we say that the truth-table of ${\copyright}$ in $\Mt$ is \emph{total}. When ${\copyright}_\Mt(x_1,\dots,x_k)$ has at most one element for all $x_1,\dots,x_k\in V$ we say that the truth-table of ${\copyright}$ in $\Mt$ is \emph{deterministic}. Of course, deterministic does not imply total. Given $\Sigma'\subseteq\Sigma$, we say that $\Mt$ is \emph{$\Sigma'$-total} if the truth-tables in $\Mt$ of the connectives ${\copyright}\in\Sigma'$ are all total. Analogously, we say that $\Mt$ is \emph{$\Sigma'$-deterministic} if the truth-tables in $\Mt$ of the connectives ${\copyright}\in\Sigma'$ are all deterministic. When the $\Sigma$-PNmatrix $\Mt$ is $\Sigma$-total, or just total, it is simply called a \emph{$\Sigma$-Nmatrix, or Nmatrix (non-deterministic matrix)}. When a $\Sigma$-Nmatrix $\Mt$ is $\Sigma$-deterministic, or just deterministic, it is simply called a \emph{$\Sigma$-matrix}, or a logical matrix. For the sake of completing the picture, when a $\Sigma$-PNmatrix $\Mt$ is deterministic we call it a \emph{$\Sigma$-Pmatrix}, or Pmatrix. Granted a $\Sigma$-PNmatrix $\Mt=\tuple{V,D,\cdot_\Mt}$, a \emph{$\Mt$-valuation} is a function $v:L_\Sigma(P)\to V$ such that $v({\copyright}(A_1,\dots,A_k))\in{\copyright}_\Mt(v(A_1),\dots,v(A_k))$ for every $k\in\nats$, every $k$-place connective ${\copyright}\in\Sigma$, and every $A_1,\dots,A_k\in L_\Sigma(P)$. We denote the set of all $\Mt$-valuations by $\textrm{Val}_\Mt$. Given a formula $A\in L_\Sigma(\{p_1,\dots,p_n\})$, we extend the usual notation for connectives and use $A_\Mt:V^n\to\wp(V)$ to denote the function defined by $A_\Mt(x_1,\dots,x_n)=\{v(A):v\in\textrm{Val}_\Mt\textrm{ with }v(p_i)=x_i\textrm{ for }1\leq i\leq n\}$ for every $x_1,\dots,x_n\in V$. As is well known, if $\Mt=\tuple{V,D,\cdot_\Mt}$ is a matrix then every function $f:Q\to V$ with $Q\subseteq P$ can be extended to a $\Mt$-valuation (in an essentially unique way for all formulas $A$ with $\var(A)\subseteq Q$). As a consequence, $A_\Mt(x_1,\dots,x_n)$ is a singleton when $\Mt$ is a matrix, or more generally when there is $\Sigma'\subseteq\Sigma$ such that $A\in L_{\Sigma'}(P)$ and $\Mt$ is $\Sigma'$-deterministic and $\Sigma'$-total. If $\Mt$ is only known to be $\Sigma'$-deterministic, we can at least guarantee that $A_\Mt(x_1,\dots,x_n)$ has at most one element. When $\Mt$ is a Nmatrix, however, $A_\Mt(x_1,\dots,x_n)$ can be a large (non-empty) set. Still, we know from~\cite{Avron} that a function $f:\Gamma\to V$ with $\Gamma\subseteq L_\Sigma(P)$ can be extended to a $\Mt$-valuation provided that $\sub(\Gamma)\subseteq\Gamma$ and that $f({\copyright}(A_1,\dots,A_k))\in{\copyright}_\Mt(f(A_1),\dots,f(A_n))$ whenever ${\copyright}(A_1,\dots,A_k)\in\Gamma$. In case $\Mt$ is a PNmatrix, in general, one does not even have such a guarantee~\cite{Baaz2013}, unless $f(\Gamma)\in\mathcal{T}_{\Mt}=\bigcup_{v\in \textrm{Val}_\Mt}\wp(v(L_\Sigma(P)))$. In other words, given $X\subseteq V$, we have $X\in\mathcal{T}_\Mt$ if the values in $X$ are all together compatible in some valuation of $\Mt$. Of course, $A_\Mt(x_1,\dots,x_n)\neq\emptyset$ if $\{x_1,\dots,x_n\}\in\mathcal{T}_\Mt$.\smallskip A set of valuations $\mathcal{V}\subseteq\textrm{Val}_\Mt$ characterizes a generalized (multiple conclusion) consequence relation $\der_\mathcal{V}{\subseteq}\wp(L_\Sigma(P))\times\wp(L_\Sigma(P))$ defined by $\Gamma\der_\mathcal{V}\Delta$ when for every $v\in \mathcal{V}$ if $v(\Gamma)\subseteq D$ then $v(\Delta)\cap D\neq\emptyset$. Of course, it also defines the more usual (single conclusion) consequence relation $\vdash_\mathcal{V}{\subseteq}\wp(L_\Sigma(P))\times L_\Sigma(P)$ such that $\Gamma\vdash_\mathcal{V} A$ when $\Gamma\der_\mathcal{V} \{A\}$. In both cases, $\der_\mathcal{V}$ and $\vdash_\mathcal{V}$ are \emph{substitution invariant}, and respectively a Scott~\cite{scott} and Shoesmith and Smiley~\cite{ShoesmithSmiley} consequence relation, or else a Tarskian consequence relation, when $\mathcal{V}$ is closed for substitutions, that is, if $v\in \mathcal{V}$ and $\sigma\in L_\Sigma(P)^P$ then $v\circ (\,\cdot^\sigma)\in \mathcal{V}$. We simply write $\der_\Mt$ or $\vdash_\Mt$, instead of $\der_{\textrm{Val}_\Mt}$ or $\vdash_{\textrm{Val}_\Mt}$, respectively, and say that the consequences are characterized by $\Mt$. With respect to given consequence relations $\der$ or $\vdash$, we say that $\Mt$ is \emph{sound} if $\der{\subseteq}\der_\Mt$ or $\vdash{\subseteq}\vdash_\Mt$, and we say that $\Mt$ is \emph{complete} if $\der_\Mt{\subseteq}\der$ or $\vdash_\Mt{\subseteq}\vdash$.\smallskip A \emph{refinement} of a $\Sigma$-PNmatrix $\Mt=\tuple{V,D,\cdot_\Mt}$ is any $\Sigma$-PNmatrix $\Mt'=\tuple{V',D',\cdot_{\Mt'}}$ with $V'\subseteq V$, $D'=D{\cap} V'$, and ${\copyright}_{\Mt'}(x_1,\dots,x_k)\subseteq{\copyright}_{\Mt}(x_1,\dots,x_k)$ for every $k\in\nats$, every $k$-place connective ${\copyright}\in\Sigma$, and every $x_1,\dots,x_k\in V'$. It is clear, almost by definition, that $\textrm{Val}_{\Mt'}\subseteq\textrm{Val}_\Mt$. When it is always the case that ${\copyright}_{\Mt'}(x_1,\dots,x_k)={\copyright}_{\Mt}(x_1,\dots,x_k)\cap V'$ then the refinement is called \emph{simple} and $\Mt'$ is denoted by $\Mt_{V'}$. Clearly, $v\in\textrm{Val}_\Mt$ implies that $v\in\textrm{Val}_{\Mt_{V'}}$ with $V'=v(L_\Sigma(P))$, and also that $\Mt_{V'}$ is a non-empty total refinement of $\Mt$. This observation justifies the equivalent definition of $\mathcal{T}_\Mt$ put forth in~\cite{wollic19}. $\mathcal{E}:V\to\wp(U)$ is an \emph{expansion function} if $\mathcal{E}(x)\neq\emptyset$ for every $x\in V$, and $\mathcal{E}(x)\cap\mathcal{E}(x')=\emptyset$ if $x'\in V$ is distinct from $x$. Given $X\subseteq V$, we abuse notation and use $\mathcal{E}(X)$ to denote $\bigcup_{x\in X}\mathcal{E}(x)$. One associates to $\mathcal{E}$ its \emph{contraction} $\widetilde{\mathcal{E}}:\mathcal{E}(V)\to V$ such that, for each $y\in \mathcal{E}(V)$, $\widetilde{\mathcal{E}}(y)\in V$ is the unique such that $y\in\mathcal{E}(\widetilde{\mathcal{E}}(y))$. The \emph{$\mathcal{E}$-expansion} of a $\Sigma$-PNmatrix $\Mt=\tuple{V,D,\cdot_\Mt}$ is the $\Sigma$-PNmatrix $\mathcal{E}(\Mt)=\tuple{\mathcal{E}(V),\mathcal{E}(D),\cdot_{\mathcal{E}(\Mt)}}$ such that ${\copyright}_{\mathcal{E}(\Mt)}(y_1,\dots,y_k)=\mathcal{E}({\copyright}_{\Mt}(\widetilde{\mathcal{E}}(y_1),\dots,\widetilde{\mathcal{E}}(y_k)))$ for every $k\in\nats$, every $k$-place connective ${\copyright}\in\Sigma$, and every $y_1,\dots,y_k\in \mathcal{E}(V)$. By construction, it is clear that $\widetilde{\mathcal{E}}$ preserves and reflects designated values, i.e., $\widetilde{\mathcal{E}}(y)\in D$ if and only if $y\in \mathcal{E}(D)$. Further, given a function $f:L_\Sigma(P)\to\mathcal{E}(V)$, $f\in\textrm{Val}_{\mathcal{E}(\Mt)}$ if and only if $\widetilde{\mathcal{E}}\circ f\in\textrm{Val}_\Mt$. A \emph{rexpansion} of a $\Sigma$-PNmatrix $\Mt=\tuple{V,D,\cdot_\Mt}$ is a refinement of some $\mathcal{E}$-expansion of $\Mt$. When $\Mt^\dag=\tuple{V^\dag,D^\dag,\cdot_{\Mt^\dag}}$ is a rexpansion of $\Mt$, we still have that if $v^\dag\in\textrm{Val}_{\Mt^\dag}$ then $\widetilde{\mathcal{E}}\circ v^\dag\in\textrm{Val}_{\Mt}$. {Consequently, we have that $\widetilde{\mathcal{E}}(A_{\Mt^\dag}(x_1,\dots,x_n))\subseteq A_{\Mt}(\widetilde{\mathcal{E}}(x_1),\dots,\widetilde{\mathcal{E}}(x_n))$, for every $A\in L_\Sigma(\{p_1,\dots,p_n\})$ and $x_1,\dots,x_n\in V^\dag$.} It is easy to see that the refinement relation, the expansion relation, and thus also the rexpansion relation, are all transitive.\smallskip We end this section with a very simple but useful lemma. \begin{lemma}\label{easylemma} Let $\Sigma'\subseteq\Sigma$ and $\Mt=\tuple{V,D,\cdot_\Mt}$ be a $\Sigma'$-deterministic $\Sigma$-PNmatrix. If $\Mt^\dag=\tuple{V^\dag,D^\dag,\cdot_{\Mt^\dag}}$ is a rexpansion of $\Mt$, $A\in L_{\Sigma'}(\{p_1,\dots,p_n\})$, and $y,z\in A_{\Mt^\dag}(x_1,\dots,x_n)$ then $y\in D^\dag$ if and only if $z\in D^\dag$. \end{lemma} \begin{proof} Assume that $\Mt^\dag$ is a refinement of the expansion of $\Mt$ with $\mathcal{E}$. If $y,z\in A_{\Mt^\dag}(x_1,\dots,x_n)$ then $\widetilde{\mathcal{E}}(y),\widetilde{\mathcal{E}}(z)\in \widetilde{\mathcal{E}}(A_{\Mt^\dag}(x_1,\dots,x_n))\subseteq A_\Mt(\widetilde{\mathcal{E}}(x_1),\dots,\widetilde{\mathcal{E}}(x_n))$. Since $\Mt$ is $\Sigma'$-deterministic and $A\in L_{\Sigma'}(P)$ it follows that $A_\Mt(\widetilde{\mathcal{E}}(x_1),\dots,\widetilde{\mathcal{E}}(x_n))$ has at most one element, and thus $\widetilde{\mathcal{E}}(y)=\widetilde{\mathcal{E}}(z)$. Therefore, $y\in D^\dag$ iff $\widetilde{\mathcal{E}}(y)\in D$ iff $\widetilde{\mathcal{E}}(z)\in D$ iff $z\in D^\dag$. \end{proof} \section{Adding axioms}\label{sec3} Given a signature $\Sigma$, a Tarskian consequence relation $\vdash$ over $\Sigma$, and $\Ax\subseteq L_\Sigma(P)$, the \emph{strengthening of ${\vdash}$ with (schema) axioms $\Ax$} is the consequence relation $\vdash^{\Ax}$ defined by $\Gamma\vdash^{\Ax}A$ if and only if $\Gamma\cup\Ax^{\inst}\vdash A$.\\ Our aim is to provide an adequate (and usable) semantics for $\vdash^{\Ax}$, given a semantic characterization of $\vdash$, a task that is well within the general effort of characterizing combined logics~\cite{ccal:wcarnielli:jfr:css:04,deccomp,wollic}. The following simple result, whose (simple) proof we omit, is a corollary of Lemma~2.7 of~\cite{soco}. \begin{proposition}\label{proofbyvals} Let $\Mt=\tuple{V,D,\cdot_\Mt}$ be a $\Sigma$-PNmatrix and $\Ax\subseteq L_\Sigma(P)$. The consequence relation $\vdash^{\Ax}_\Mt$ is characterized by $\textrm{Val}_\Mt^\Ax=\{v\in\textrm{Val}_\Mt:v(\Ax^{\inst})\subseteq D\}$. \end{proposition} Our aim in the forthcoming subsections is to design some systematic way of using the ideas behind rexpansions for transforming $\Mt$ into a PNmatrix whose valuations somehow coincide with $\textrm{Val}_\Mt^\Ax$. \subsection{A general construction}\label{sec31} As a first attempt, we employ a general technique from the theory of combining logics~\cite{ccal:wcarnielli:jfr:css:04,deccomp,wollic}. The overall idea, when starting from a given PNmatrix and a set of strengthening axioms, is to pair each formula of the logic with its possible values but guaranteeing that instances of axioms can only be paired with designated values. \begin{theorem}\label{flat} Let $\Mt=\tuple{V,D,\cdot_\Mt}$ be a $\Sigma$-PNmatrix and $\Ax\subseteq L_\Sigma(P)$.\\ The consequence $\vdash_\Mt^\Ax$ is characterized by the rexpansion $\Mt^\flat_\Ax=\tuple{V^\flat_\Ax,D^\flat_\Ax,\cdot_{\Mt^\flat_\Ax}}$ of $\Mt$ defined by: \begin{itemize} \item $V^\flat_\Ax=\{(x,A)\in V\times L_\Sigma(P):\textrm{ if }A\in\Ax^{\inst}\textrm{ then }x\in D\}$, \item $D^\flat_\Ax=D\times L_{\Sigma}(P)$, \item for each $k\in\nats$ and ${\copyright}\in\Sigma^{(k)}$, $${\copyright}_{\Mt^\flat_\Ax}((x_1,A_1),\ldots,(x_k,A_k))=$$ $$\{(x,{\copyright}(A_1,\dots,A_k))\in V^\flat_\Ax:x\in {\copyright}_\Mt(x_1,\dots,x_n)\}.$$ \end{itemize} \end{theorem} \proof{We prove, in turn, that $\Mt^\flat_\Ax$ is a rexpansion of $\Mt$, and then the soundness and completeness of $\Mt^\flat_\Ax$ with respect to $\vdash_\Mt^\Ax$. \begin{description} \item[Rexpansion.] It is easy to see that the PNmatrix $\Mt^\flat_\Ax$ is a refinement of the expansion of $\Mt$ with $\mathcal{E}(x)=\{x\}\times L_\Sigma(P)$. $\widetilde{\mathcal{E}}:V^\flat_\Ax\to V$ is such that $\widetilde{\mathcal{E}}(x,A)=x$, and clearly preserves and reflects designated values. Using Proposition~\ref{proofbyvals}, it suffices to show that $\{\widetilde{\mathcal{E}}\circ v^\flat:v^\flat\in\textrm{Val}_{\Mt^\flat_\Ax}\}=\textrm{Val}_\Mt^\Ax$. \end{description} \noindent Note that if $v^\flat\in\textrm{Val}_{\Mt^\flat_\Ax}$ and $v^\flat(A)=(x,B)$ then $B\in A^{\inst}$. Namely, we have $B=A^\sigma$ where $\sigma\in L_\Sigma(P)^P$ is such that $\sigma(p)=C$ if $v^\flat(p)=(y,C)$. \begin{description} \item[Soundness.] Since $\Mt^\flat_\Ax$ is a rexpansion of $\Mt$ with $\mathcal{E}$, we know that if $v^\flat\in\textrm{Val}_{\Mt^\flat_\Ax}$ then $\widetilde{\mathcal{E}}\circ v^\flat\in\textrm{Val}_\Mt$. Further, if $A\in\Ax^{\inst}$ and $v^\flat(A)=(x,B)$ then $B\in (\Ax^{\inst})^{\inst}=\Ax^{\inst}$ and $\widetilde{\mathcal{E}}(v^\flat(A))=x\in D$. We conclude that $\{\widetilde{\mathcal{E}}\circ v^\flat:v^\flat\in\textrm{Val}_{\Mt^\flat_\Ax}\}\subseteq\textrm{Val}_\Mt^\Ax$ and thus that $\vdash_\Mt^\Ax\subseteq\vdash_{\Mt^\flat_\Ax}$. \item[Completeness.] Reciprocally, if $v\in\textrm{Val}_\Mt$ and $v(\Ax^{\inst})\subseteq D$ then $v=\widetilde{\mathcal{E}}\circ v^\flat$ with $v^\flat(A)=(v(A),A)$ for each $A\in L_\Sigma(P)$. Since $v\in\textrm{Val}_\Mt$, the fact that $v(\Ax^{\inst})\subseteq D$ guarantees that $v^\flat\in\textrm{Val}_{\Mt^\flat_\Ax}$. We conclude that $\textrm{Val}_\Mt^\Ax\subseteq \{\widetilde{\mathcal{E}}\circ v^\flat:v^\flat\in\textrm{Val}_{\Mt^\flat_\Ax}\}$ and thus that $\vdash_{\Mt^\flat_\Ax}{\subseteq}\vdash_\Mt^\Ax$. \qed \end{description} } In the definition of $\Mt^\flat_\Ax$, if ${\copyright}_\Mt(x_1,\dots,x_k)\cap D=\emptyset$ and moreover one has ${\copyright}(A_1,\dots,A_k)\in\Ax^{\inst}$ then ${\copyright}_{\Mt^\flat_\Ax}((x_1,A_1),\ldots,(x_k,A_k))=\emptyset$, which in general explains why the resulting PNmatrix may fail to be total. Still, $\Mt^\flat_\Ax$ is deterministic (actually a Pmatrix) when $\Mt$ is a (P)matrix. These two observations mean that the construction actually uses partiality in a most relevant way, but not non-determinism, which is simply imported from the starting PNmatrix. Note also that the construction, though fully illustrative of the power of rexpansions (generalized to PNmatrices) to accomodate new axioms, has other drawbacks. In fact, $\Mt^\flat_\Ax$ is always infinite, even if starting from a finite $\Mt$. Further, the structure of $\Mt^\flat_\Ax$ is quite syntactic, as it incorporates an obvious pattern-matching mechanism for recognizing instances of axioms into the received structure of $\Mt$.\\ In general, it is not possible to do much better, as it may happen that $\vdash_\Mt^\Ax$ cannot be characterized by a finite PNmatrix. For instance, as noted in~\cite{rexpansions}, Avron and coauthors show in~\cite{avron2007} that the logic resulting from strengthening the Nmatrix characterizing the basic paraconsistent logic $\mathcal{BK}$ of~\cite{Avron2012atLICS} with the axiom $\neg(p_1\e\neg p_1)\to\circ p_1$ yields a logic that cannot be characterized by a finite Nmatrix. Thus, in order to improve on our result, it can be useful to look for suitable ways of controlling the shape of the axioms considered, as many other examples are known to have finite characterizations~\cite{avron2005,avron2007,Avron2012atLICS,taming,rexpansions,carcon}.\smallskip On the other hand, the construction of Theorem~\ref{flat} unveils a very interesting property of PNmatrices: every axiomatic extension of the logic of a finite (or denumerable) PNmatrix can be characterized by a denumerable PNmatrix. Just by itself, the result entails that \emph{intuitionistic propositional logic ($\mathcal{IPL}$)} can be given by a single denumerable PNmatrix, sharply contrasting with the known fact that a characteristic matrix for $\mathcal{IPL}$ needs to be non-denumerable (see~\cite{godel,wronski74,Woj}). % \begin{example}\em Fix a suitable signature containing the two-place connective $\to$, and use the method above for strengthening with the usual axioms $\Int$ of intuitionistic logic the consequence relation characterized by the Nmatrix $\MPt=\tuple{\{0,1\},\{1\},\cdot_\MPt}$ where ${\copyright}_\MPt(x_1,\dots,x_k)=\{0,1\}$ for every $k$-place ${\copyright}\in\Sigma$ such that ${{\copyright}}\,{\neq}\to$, and $\to_\MPt$ has the truth-table below\footnote{For simplicity, in this and other examples, we omit the usual brackets of set notation when describing the truth-tables.}. \begin{center} \begin{tabular}{c | c c c } ${\to_\MPt}$ & $0$ & $1$ \\ \hline $0$& $ 0,1 $ & $ 0,1 $ \\ $1$ &$0$ & $ 0,1 $ \end{tabular} \end{center} It is easy to see that $\vdash_{\MPt}$ is precisely the consequence determined by the single rule $\frac{\;p\quad p\to q\;}{q}$ of \emph{modus ponens}, and so $\vdash_{\MPt^\flat_\Int}$ is precisely $\mathcal{IPL}$.\hfill $\triangle$ \end{example} This idea applies also to \emph{propositional normal (global) modal logic} $\mathcal{K}$. \begin{example}\em For simplicity, take a signature containing only the $1$-place modality $\square$, and the $2$-place connective $\to$. The logic determined by the rules of \emph{modus ponens} and \emph{necessitation}, i.e., $\frac{p}{\;\square\,p\;}$, is easily seen to be characterized by the Nmatrix $\MPt_\square=\tuple{\{0,1\},\{1\},\cdot_{\MPt_\square}}$ given by the truth-tables below. \begin{center} \begin{tabular}{c | c c c } ${\to_{\MPt_\square}}$ & $0$ & $1$ \\ \hline $0$& $ 0,1 $ & $ 0,1 $ \\ $1$ &$0$ & $ 0,1 $ \end{tabular} \qquad\qquad \begin{tabular}{c | c } & ${\square_{\MPt_\square}}$ \\ \hline $0$& $ 0,1 $ \\ $1$ &$ 1 $ \end{tabular} \end{center} Collecting in $\Norm$ the usual axioms of classical implication plus the \emph{normalization axiom} $\square(p\to q)\to(\square p\to \square q)$ and applying Theorem~\ref{flat}, we get a denumerable PNmatrix $(\MPt_\square)^\flat_\Norm$ characterizing $\mathcal{K}$. \hfill $\triangle$ \end{example} These cases suggest another possible obstacle to improving our result, namely when the received PNmatrix is not-deterministic and actually mixes designated with undesignated values in some entry of its truth-tables. When the basis is deterministic (enough) many examples are known to be finitely characterizable. \subsection{A better (less general) construction}\label{sec32} In order to improve on the construction presented in the previous subsection, we will borrow full inspiration from the construction in~\cite{taming}, and try to push the boundaries of the scope of application of the underlying ideas. Let $\Sigma$ be a signature, fix $\Sigma^d\subseteq\Sigma$ and set $\mathcal{U}\subseteq (\Sigma\setminus\Sigma^d)^{(1)}$ to be the set of all 1-place connectives not in $\Sigma^d$. We shall consider the set $\mathcal{U}^*$ of all finite strings of elements of $\mathcal{U}$ (the Kleene closure of $\mathcal{U}$). We shall use $\varepsilon$ to denote the \emph{empty string}, and $uw\in\mathcal{U}^*$ to denote the \emph{concatenation} of strings $u,w\in\mathcal{U}^*$. We use $\prfx(w)$ to denote the set of all \emph{prefixes} of string $w$, including $\varepsilon$. Given $w\in\mathcal{U}^*$ and $A\in L_\Sigma(P)$ we will use $wA$ to denote the formula defined inductively by $\varepsilon A=A$, and $\bullet wA=\bullet(wA)$ if $\bullet\in\mathcal{U}$.\\ \begin{definition}\label{simpleaxiom} Let ${\copyright}\in\Sigma$ be a $k$-place connective. \emph{$\Sigma^d$-simple formulas based on ${\copyright}$} are formulas $B\in L_\Sigma(\{p_1,\dots,p_k\})$ such that $B=A^\sigma$ for some \emph{structure formula} $A\in L_{\Sigma^d}(\{q_1,\dots,q_n,r_1,\dots,r_m\})$ and some substitution $\sigma$ for which: \begin{itemize} \item $\sigma(q_i)=w_ip_j$ with $w_i\in\mathcal{U}^*$ and $1\leq j\leq k$, for each $1\leq i\leq n$, and \item $\sigma(r_l)=u_l{\copyright}(p_1,\dots,p_k)$ with $u_l\in\mathcal{U}^*$, for each $1\leq l\leq m$. \end{itemize} \noindent For ease of notation, we will simply write $$A(\dots w_ip_j \dots u_l{\copyright}(p_1,\dots,p_k)\dots)$$ \noindent for a generic $\Sigma^d$-simple formula based on ${\copyright}$.\smallskip The \emph{look-ahead} set induced by $B$ is $\Theta_{B}=(\cup_{i=1}^n\prfx(w_i))\cup(\cup_{l=1}^m \prfx(u_l))$.\smallskip We call $\Sigma^d$-simple formula to any formula which is $\Sigma^d$-simple based on some\footnote{ Since not all the variables $q_1,\dots,q_n,r_1,\dots,r_m$ need to occur in $A$, it may well happen that the subformula ${\copyright}(p_1,\dots,p_k)$ ends up not appearing in the $\Sigma^d$-simple formula $B$ based on ${\copyright}$. For this reason, such a $\Sigma^d$-simple formula can also be based on any available $k'$-place connective distinct from ${\copyright}$, as long as $k'\geq k$ (more precisely, $k'$ needs to be at least as big as the number of distinct variables $p_j$ occurring in $B$).} connective of $\Sigma$. The \emph{look-ahead} set induced by a set $\Gamma$ of $\Sigma^d$-simple formulas is\footnote{Note that, in our definition, $\Theta_\Gamma$ is not simply the union of the look-ahead sets of each formula in $\Gamma$. We not only want $\Theta_\Gamma$ to be closed for taking prefixes, but we want $\varepsilon\in\Theta_\Gamma$ even if $\Gamma=\emptyset$ (a rather pathological case). } $\Theta_\Gamma=\{\varepsilon\}\cup(\cup_{B\in\Gamma}\Theta_B)$.\hfill $\triangle$ \end{definition} $\Sigma^d$-simple formulas will be the allowed shapes of our (schema) axioms. Comparing with~\cite{taming}, our setup is strictly more general in that it allows for an arbitrary base signature $\Sigma$. If we set $\Sigma^d$ to consist of the usual 2-place connectives of positive logic $\e,\ou,\to$, and let $\Sigma=\Sigma^d\cup\mathcal{U}$ where $\mathcal{U}$ collects a number of additional 1-place connectives (e.g., $\neg,\circ$), we recover the setup of~\cite{taming}. For instance, axiom $B=\circ\neg(p_1\e p_2)\to(\neg\circ p_1\ou \neg\circ p_2)$ is $\Sigma^d$-simple in this setting, as can be seen by taking $A=r_1\to(q_1\ou q_2)$, ${\copyright}=\e$, and $\sigma(q_1)=w_1p_1=\neg\circ p_1$, $\sigma(q_2)=w_2p_2=\neg\circ p_2$, thus with $w_1=w_2=\neg\circ$, and $\sigma(r_1)=u_1(p_1\e p_2)=\circ\neg(p_1\e p_2)$, thus with $u_1=\circ\neg$. Easily, all axioms covered in~\cite{taming} are $\Sigma^d$-simple. However, $p_1\e\neg p_1$ or $p_1\to(\neg p_1\to \neg p_2)$ fall outside the scope of~\cite{taming}, but are still $\Sigma^d$-simple (based on any of the $2$-place connectives, as the $r_l$ variables are not necessary). Axioms like $\neg(p_1\e\neg p_1)\to\circ p_1$ are not $\Sigma^d$-simple, due to the interleaved nesting of $\neg$ and $\e$, and fall outside the scope of both methods.\smallskip Having set up our syntactic restriction on the set of allowed axioms, we will still need to match them with appropriate semantic restrictions. Before we do it, we need to shape up another crucial idea from~\cite{taming}: when strengthening with a set of axioms $\Ax$, the truth-values of the intended PNmatrix will correspond to suitable functions $f:\Theta_\Ax\to V$ where $V$ is the set of truth-values of the given PNmatrix; when the value of a formula $A$ is $f$ this does not only settle its face value to $f(\varepsilon)$ but also gives as look-ahead information the value $f(w)$ for the value of formulas $wA$ with $w\in\Theta_\Ax $. \begin{definition}\label{fofv} Let $\Mt=\tuple{V,D,\cdot_\Mt}$ be a $\Sigma$-PNmatrix and $\Ax$ a set of $\Sigma^d$-simple formulas. For each $v\in\textrm{Val}_\Mt$ and $A\in L_\Sigma(P)$, we define $f^A_v\in V^{\Theta_\Ax}$ by letting $f^A_v(w)=v(wA)$ for each $w\in\Theta_\Ax$.\hfill $\triangle$ \end{definition} It is worth noting that, by definition, $f^A_v(uw)=f^{{w\!A}}_v(u)$ whenever $uw\in\Theta_\Ax$.\\ We can finally put forth our improved construction, taking $\Sigma^d$-simple axioms. In order to make it work it will suffice to require that the given PNmatrix is $\Sigma^d$-deterministic (not necessarily $\Sigma^d$-total). The more general condition, though, will be to require that the PNmatrix is a rexpansion of a $\Sigma^d$-deterministic PNmatrix, as the crucial necessary property is granted by Lemma~\ref{easylemma}. \begin{theorem}\label{theconstruction} Let $\Mt=\tuple{V,D,\cdot_\Mt}$ be a $\Sigma$-PNmatrix and $\Ax\subseteq L_\Sigma(P)$. If there exists $\Sigma^d\subseteq\Sigma$ such that $\Mt$ is a rexpansion of some $\Sigma^d$-deterministic PNmatrix, and the formulas in $\Ax$ are all $\Sigma^d$-simple, then the consequence $\vdash_\Mt^\Ax$ is characterized by the rexpansion $\Mt^\sharp_\Ax=\tuple{V^\sharp_\Ax,D^\sharp_\Ax,\cdot_{\Mt^\sharp_\Ax}}$ of $\Mt$ defined by: \begin{itemize} \item $V^\sharp_\Ax=\bigcup\limits_{v\in\textrm{Val}_{\Mt}^\Ax}\{f^A_v:A\in L_\Sigma(P)\}$, \item $D^\sharp_\Ax=\{f\in V^\sharp_\Ax:f(\varepsilon)\in D\}$, \item for each $k\in\nats$ and ${\copyright}\in\Sigma^{(k)}$, $${\copyright}_{\Mt^\sharp_\Ax}(f_1,\dots,f_k)=$$ $$\bigcup\limits_{v\in\textrm{Val}_{\Mt}^\Ax}\{f^{{\copyright}(A_1,\dots,A_k)}_v:A_i\in L_\Sigma(P)\textrm{ with }f^{A_i}_v=f_i \textrm{ for } 1\leq i\leq k\}.$$ \end{itemize} \end{theorem} \proof{We prove that $\Mt^\sharp_\Ax$ is a rexpansion of $\Mt$, and then its soundness and completeness with respect to $\vdash_\Mt^\Ax$. \begin{description} \item[Rexpansion.] It is simple to check that the PNmatrix $\Mt^\sharp_\Ax$ is a refinement of the expansion of $\Mt$ with $\mathcal{E}(x)=\{f\in V^{\Theta_\Ax}:f(\varepsilon)=x\}$. Just note that one has $f_v^{{\copyright}(A_1,\dots,A_k)}(\varepsilon)=v({\copyright}(A_1,\dots,A_k))\in{\copyright}_\Mt(v(A_1),\dots,v(A_k))={\copyright}_\Mt(f_v^{A_1}(\varepsilon),\dots,f_v^{A_k}(\varepsilon))$ whenever it is the case that $v\in\textrm{Val}_\Mt$, $k\in\nats$, ${\copyright}\in\Sigma^{(k)}$ and $A_1,\dots,A_k\in L_\Sigma(P)$. $\widetilde{\mathcal{E}}:V^\sharp_\Ax\to V$ is such that $\widetilde{\mathcal{E}}(f)=f(\varepsilon)$, and clearly preserves and reflects designated values. As before, using Proposition~\ref{proofbyvals}, it suffices to show that $\{\widetilde{\mathcal{E}}\circ v^\sharp:v^\sharp\in\textrm{Val}_{\Mt^\sharp_\Ax}\}=\textrm{Val}_\Mt^\Ax$. \end{description} \noindent For a 1-place connective $\bullet\in\mathcal{U}$ and $u\in\mathcal{U}^*$ such that $u\bullet\in\Theta_\Ax$, given a valuation $v^\sharp\in\textrm{Val}_{\Mt^\sharp_\Ax}$, we have that $v^\sharp(\bullet A)(u)=v^\sharp(A)(u\bullet)$, simply because $v^\sharp(\bullet A)\in\bullet_{\Mt^\sharp_\Ax}(v^\sharp(A))$ and by definition of $\bullet_{\Mt^\sharp_\Ax}$ there must exist $v\in\textrm{Val}_\Mt^\Ax$ such that $v^\sharp(\bullet A)=f_v^{\bullet B}$ and $v^\sharp(A)=f_v^{B}$. It easily follows, by induction, that if $w\in\mathcal{U}^*$ is such that $uw\in\Theta_\Ax$ then also $v^\sharp(wA)(u)=v^\sharp(A)(uw)$. \begin{description} \item[Soundness.] Since $\Mt^\sharp_\Ax$ is a rexpansion of $\Mt$ with $\mathcal{E}$, if $v^\sharp\in\textrm{Val}_{\Mt^\sharp_\Ax}$ then $\widetilde{\mathcal{E}}\circ v^\sharp\in\textrm{Val}_\Mt$. Hence, when $B=A(\dots w_i A_j \dots u_n {\copyright}(A_1,\dots,A_k)\dots)\in\Ax^{\inst}$ then setting $y=v^\sharp(B)(\varepsilon)$ we have $$y\in A_\Mt(\dots v^\sharp(w_i A_j)(\varepsilon) \dots v^\sharp(u_n {\copyright}(A_1,\dots,A_k))(\varepsilon)\dots)=$$ $$A_\Mt(\dots v^\sharp(A_j)(w_i) \dots v^\sharp({\copyright}(A_1,\dots,A_k))(u_n)\dots).$$ By definition of ${\copyright}_{\Mt^\sharp_\Ax}$, we know there exist $v\in\textrm{Val}_\Mt^\Ax$ and $B_1,\dots,B_k\in L_\Sigma(P)$ such that $v^\sharp({\copyright}(A_1,\dots,A_k))=f_v^{{\copyright}(B_1,\dots,B_k)}$ and $v^\sharp(A_j)=f_v^{B_j}$ for $1\leq j\leq k$. Thus, we have $$y\in A_\Mt(\dots f_v^{B_j}(w_i) \dots f_v^{{\copyright}(B_1,\dots,B_k)}(u_n)\dots)=$$ $$A_\Mt(\dots v(w_i B_j) \dots v(u_n {{\copyright}(B_1,\dots,B_k)})\dots).$$ Clearly, setting $z=v(A(\dots w_i B_j \dots u_n {\copyright}(B_1,\dots,B_k)\dots))$ we also have $$z\in A_\Mt(\dots v(w_i B_j) \dots v(u_n {{\copyright}(B_1,\dots,B_k)})\dots).$$ Using Lemma~\ref{easylemma}, since $A\in L_{\Sigma^d}(P)$ and $\Mt$ is a rexpansion of a $\Sigma^d$-deterministic PNmatrix, we conclude that $y\in D$ iff $z\in D$. Now, it is also the case that $A(\dots w_i B_j \dots u_n {\copyright}(B_1,\dots,B_k)\dots)\in\Ax^{\inst}$ and we know that $v\in\textrm{Val}_\Mt^\Ax$, so we conclude that $z\in D$. Therefore, $y\in D$ and $v^\sharp(B)\in D^\sharp_\Ax$. We conclude $\{\widetilde{\mathcal{E}}\circ v^\sharp:v^\sharp\in\textrm{Val}_{\Mt^\sharp_\Ax}\}\subseteq\textrm{Val}_\Mt^\Ax$ and $\vdash_\Mt^\Ax\subseteq\vdash_{\Mt^\sharp_\Ax}$. \item[Completeness.] Reciprocally, if $v\in\textrm{Val}_\Mt^\Ax$ then $v=\widetilde{\mathcal{E}}\circ v^\sharp$ with $v^\sharp(A)=f^A_v$ for each $A\in L_\Sigma(P)$. It is immediate, by definition of ${\copyright}_{\Mt^\sharp_\Ax}$, that $f_v^{{\copyright}(A_1,\dots,A_k)}\in {\copyright}_{\Mt^\sharp_\Ax}(f_v^{A_1},\dots,f_v^{A_k})$ for every $k$-place connective ${\copyright}\in\Sigma$ and formulas $A_1,\dots,A_k\in L_\Sigma(P)$. We conclude that $v^\sharp\in\textrm{Val}_{\Mt^\sharp_\Ax}$. Therefore, we have $\textrm{Val}_\Mt^\Ax\subseteq \{\widetilde{\mathcal{E}}\circ v^\flat:v^\flat\in\textrm{Val}_{\Mt^\flat_\Ax}\}$ and $\vdash_{\Mt^\flat_\Ax}\subseteq\vdash_\Mt^\Ax$.\qed \end{description}} As intended, we have pushed the boundaries of the method in~\cite{taming} as much as we could. Beyond the arbitrariness of the signature, and the more permissive syntactic restrictions on the axioms, we also allow a more general PNmatrix to start with. Instead of demanding it to be the two-valued Boolean matrix on the $\Sigma^d$-connectives, we simply require that it be a rexpansion of any Pmatrix. This has the advantage of applying to a large range of non-classical base logics, but also of making the method incremental, allowing us to add axioms one by one and not necessarily all at once. Further, in our method, the interpretation of the connectives not in $\Sigma^d$ is completely unrestricted, which constrasts with~\cite{taming}, where the remaining (1-place) connectives are implicitly forced to be fully non-deterministic. This additional degree of freedom allowed by our method applies not only to the connectives in $\mathcal{U}$, but also to any other connectives not appearing in the structure formulas of the axioms. \section{Worked examples}\label{sec4} In order to show the workings and scope of the method we have put forth in Subsection~\ref{sec32}, we shall now consider a few meaningful illustrative examples. \begin{example}\label{pnegpq} \em Suppose that we want to add to the logic of classical implication a negation connective satisfying the \emph{explosion} axiom $p_1\to(\neg p_1\to p_2)$. We consider the signature $\Sigma$ with a single 2-place connective $\to$, and a single 1-place connective $\neg$, and we start from the two-valued (P)Nmatrix $\BMt=\tuple{\{0,1\},\{1\},\cdot_\BMt}$ given by the truth-tables below. \begin{center} \begin{tabular}{c | c c c } ${\to_\BMt}$ & $0$ & $1$ \\ \hline $0$& $ 1 $ & $ 1 $ \\ $1$ &$0$ & $ 1 $ \end{tabular} \qquad\qquad \begin{tabular}{c | c } & ${\neg_\BMt}$ \\ \hline $0$& $ 0,1 $ \\ $1$ &$ 0,1 $ \end{tabular} \end{center} Clearly, $\to_\BMt$ corresponds to the usual matrix truth-table of classical implication. The truth-table of $\neg_\BMt$ is fully non-deterministic. Setting $\Sigma^d$ to contain only $\to$, and $\mathcal{U}=\{\neg\}$ it is clear that $\BMt$ is $\Sigma^d$-deterministic and that the axiom is $\Sigma^d$-simple. With $\Exp=\{p_1\to(\neg p_1\to p_2)\}$, we have that $\Theta_\Exp=\{\varepsilon,\neg\}$. From Theorem~\ref{theconstruction}, the strengthening of $\vdash_\BMt$ with $\Exp$ is characterized by the PNmatrix $\BMt^\sharp_\Exp=\tuple{\{00,01,10,11\},\{10,11\},\cdot_{\BMt^\sharp_\Exp}}$ where: \begin{center} \begin{tabular}{c | c c c c} ${\to_{\BMt^\sharp_\Exp}}$ & $00$ & $01$ & $10$ & $11$ \\[2mm] \hline $00$& $ 10 $ & $ 10 $& $ 10 $ & $ \emptyset $ \\ $01$ &$10$ & $ 10 $& $ 10 $ & $ \emptyset $ \\ $10$& $ 00,01 $ & $ 00,01 $& $ 10 $ & $ \emptyset $ \\ $11$ &$\emptyset$ & $ \emptyset $& $ \emptyset $ & $ 11 $ \end{tabular} \qquad\qquad \begin{tabular}{c | c } & ${\neg_{\BMt^\sharp_\Exp}}$ \\[2mm] \hline $00$& $ 00,01 $ \\ $01$ &$ 10 $ \\ $10$& $ 00,01 $ \\ $11$ &$ 11 $ \end{tabular} \end{center} Note that, for ease of notation, we are denoting a function $f\in V^\sharp_{\Exp}$ simply by the string $f(\varepsilon)f(\neg)$. For instance, the value $01$ corresponds to the function such that $f(\varepsilon)=0$ and $f(\neg)=1$. In this example, all four possibilities correspond to truth-values of the resulting PNmatrix. The reader may refer to Example~\ref{clun} below, for a situation where this does not happen.\smallskip For illustration purposes, let us clarify why $\neg_{\BMt^\sharp_\Exp}(10)=\{00,01\}$. Easily, if $xy\in\neg_{\BMt^\sharp_\Exp}(10)$ it is clear that $x=0$ as this is the value of the $\neg$ look-ahead provided by the value $10$. The fact that $y$ can be either $0$ or $1$ boils down to noting that $\neg_\BMt(0)=\{0,1\}$, none of these choices being incompatible with satisfying the axiom. Namely, $10=f^{p_1}_v$ and $00=f^{\neg p_1}_v$ for any $\BMt$-valuation $v$ with $v(p_1)=1$ and $v(\neg p_1)=v(\neg\neg p_1)=0$ and classical for other formulas, whereas $10=f^{p_1}_v$ and $01=f^{\neg p_1}_v$ would result from any fully classical $\BMt$-valuation with $v(p_1)=1$, both valuations clearly in $\textrm{Val}_{\BMt}^\Exp$. Another interesting case is $\neg_{\BMt^\sharp_\Exp}(01)=\{10\}$. Easily, the $1$ on the left of $10$ is explained by the $1$ on the right of $01$. Once again, $\neg_\BMt(1)=\{0,1\}$. However, we must exclude $11$ because $01=f^A_v$ and $11=f^{\neg A}_v$ would jointly imply that $v(\neg A\to(\neg\neg A\to A))=0$ and therefore $v\notin\textrm{Val}_{\BMt}^\Exp$. Similar justifications can be given, for instance, to explain why $11 \to_{\BMt^\sharp_\Exp}00=\emptyset$. The PNmatrix $\BMt^\sharp_\Exp$ obtained is slightly more complex than one could expect. Note, however, that the value $11$ is isolated from the others in the sense that a valuation that assigns $11$ to some formula must assign $11$ to all formulas. Concretely, $\BMt^\sharp_\Exp$ has two maximal total refinements: the three-valued Nmatrix $(\BMt^\sharp_\Exp)_{\{00,01,10\}}$ one would expect, plus the trivial one-valued matrix $(\BMt^\sharp_\Exp)_{\{11\}}$ (whose only trivial valuation is irrelevant for the definition of $\vdash_\BMt^\Exp$). \hfill$\triangle$ \end{example} Let us now consider a slight variation on this theme. \begin{example}\label{pnegpnegq}\em To see the contrast with the previous example, suppose now that we want to add to the logic of classical implication a negation connective satisfying the weaker \emph{partial explosion} axiom $p_1\to(\neg p_1\to \neg p_2)$. This is a case that is out of the scope of the method in~\cite{taming}. The setting up we need to consider is the same used in Example~\ref{pnegpq}: the same $\Sigma$, $\Sigma^d$ and $\mathcal{U}$, and the same starting PNmatrix $\BMt$. Setting now $\Exp_\neg=\{p_1\to(\neg p_1\to \neg p_2)\}$, we still have that $\Theta_{\Exp_\neg}=\{\varepsilon,\neg\}$. From Theorem~\ref{theconstruction}, the strengthening of $\vdash_\BMt$ with $\Exp_\neg$ is now characterized by the PNmatrix $\BMt^\sharp_{\Exp_\neg}=\tuple{\{00,01,10,11\},\{10,11\},\cdot_{\BMt^\sharp_{\Exp_\neg}}}$ where, using the same notation convention used in Example~\ref{pnegpq}, we have: \begin{center} \begin{tabular}{c | c c c c} ${\to_{\BMt^\sharp_{\Exp_\neg}}}$ & $00$ & $01$ & $10$ & $11$ \\[2mm] \hline $00$& $ 10 $ & $ 10 $& $ 10 $ & $ \emptyset $ \\ $01$ &$10$ & $ 10,11 $& $ 10 $ & $ 11 $ \\ $10$& $ 00,01 $ & $ 00,01 $& $ 10 $ & $ \emptyset $ \\ $11$ &$\emptyset$ & $ 01 $& $ \emptyset $ & $ 11 $ \end{tabular} \qquad\qquad \begin{tabular}{c | c } & ${\neg_{\BMt^\sharp_{\Exp_\neg}}}$ \\[2mm] \hline $00$& $ 00,01 $ \\ $01$ &$ 10,11 $ \\ $10$& $ 00,01 $ \\ $11$ &$ 11 $ \end{tabular} \end{center} The PNmatrix $\BMt^\sharp_{\Exp_\neg}$ is more interesting than before. Note that it also has two maximal total refinements: the three-valued Nmatrix $(\BMt^\sharp_{\Exp_\neg})_{\{00,01,10\}}$ (which is precisely the same as the one obtained in Example~\ref{pnegpq}), plus the two-valued matrix $(\BMt^\sharp_{\Exp_\neg})_{\{01,11\}}$ (whose implication is classical but whose negation is always designated). \hfill$\triangle$ \end{example} Next, we will analyze a number of examples that appear scattered in the literature, and show how our method can be systematically used in all of them. We start by revisiting an example from~\cite{avronnegations}, paradigmatic of many similar examples considered by Avron and coauthors. \begin{example}\label{clun} \em Let us consider strengthening the logic $\mathcal{CL}u\mathcal{N}$ from~\cite{batens1,batens2} with the \emph{double negation elimination} axiom $\neg\neg p_1\to p_1$. Actually, for the sake of simplicity, we shall consider only the $\{\neg,\to\}$-fragment of the logic. Let $\Sigma_d$ contain a single 2-place connective $\to$, $\mathcal{U}$ contain a 1-place connective $\neg$. The (fragment of the) logic $\mathcal{CL}u\mathcal{N}$ is characterized by the Nmatrix $\Mt=\tuple{\{0,1\},\{1\},\cdot_\Mt}$ with: \begin{center} \begin{tabular}{c | c c c } ${\to_\Mt}$ & $0$ & $1$ \\ \hline $0$& $ 1 $ & $ 1 $ \\ $1$ &$0$ & $ 1 $ \end{tabular} \qquad\qquad \begin{tabular}{c | c } & ${\neg_\Mt}$ \\ \hline $0$& $ 1 $ \\ $1$ &$ 0,1 $ \end{tabular} \end{center} It is clear that $\Mt$ is $\Sigma_d$-deterministic and that the axiom is $\Sigma^d$-simple. If we let $\mathsf{DNe}=\{\neg\neg p_1\to p_1\}$, we have that $\Theta_{\mathsf{DNe}}=\{\varepsilon,\neg,\neg\neg\}$. From Theorem~\ref{theconstruction}, the strengthening of $\vdash_\Mt$ with $\mathsf{DNe}$, which is well known to coincide with the logic $\mathcal{C}_{\min}$ of \cite{limits,taxonomy}, is characterized by the four-valued Nmatrix $\Mt^\sharp_{\mathsf{DNe}}=\tuple{\{010,101,110,111\},\{101,110,111\},\cdot_{\Mt^\sharp_{\mathsf{DNe}}}}$ where: \begin{center} \begingroup \renewcommand{\arraystretch}{1.2} \begin{tabular}{c | c c c c} ${\to_{\Mt^\sharp_{\mathsf{DNe}}}}$ & $010$ & $101$ & $110$ & $111$ \\[2mm] \hline $010$& $ D^\sharp_{\mathsf{DNe}} $ & $ D^\sharp_{\mathsf{DNe}} $& $ D^\sharp_{\mathsf{DNe}} $ & $ D^\sharp_{\mathsf{DNe}} $ \\ $101$ &$010$ & $ D^\sharp_{\mathsf{DNe}}$& $ D^\sharp_{\mathsf{DNe}} $ & $ D^\sharp_{\mathsf{DNe}} $ \\ $110$& $ 010 $ & $D^\sharp_{\mathsf{DNe}}$& $ D^\sharp_{\mathsf{DNe}} $ & $ D^\sharp_{\mathsf{DNe}} $ \\ $111$ &$010$ & $D^\sharp_{\mathsf{DNe}} $& $D^\sharp_{\mathsf{DNe}} $ & $ D^\sharp_{\mathsf{DNe}} $ \end{tabular} \qquad\qquad \begin{tabular}{c | c } & ${\neg_{\Mt^\sharp_{\mathsf{DNe}}}}$ \\[2mm] \hline $010$& $ 101 $ \\ $101$ &$ 010 $ \\ $110$& $ 101 $ \\ $111$ &$ 110,111 $ \end{tabular} \endgroup \end{center} Above, for ease of notation, we are denoting a function $f\in V^\sharp_{{\mathsf{DNe}}}$ simply by the string $f(\varepsilon)f(\neg)f(\neg\neg)$. As this is a new feature in our row of examples, it is worth explaining why only four of the eight possible such functions appear as truth-values of the resulting Nmatrix. Namely, $000,001,100$ are all unattainable as $f_v^A$ in the Nmatrix $\Mt$ since $\neg_{\Mt^\sharp_{\mathsf{DNe}}}(0)=1$. The remaining string $011$ is excluded for more interesting reasons, as any $\Mt$-valuation $v$ with $001=f_v^A$ makes $v(\neg\neg A\to A)=0$ and thus $v\notin\textrm{Val}_{\Mt}^{\mathsf{DNe}}$.\smallskip This example shows that our method, though very general, may not be as tight as possible. It is a mandatory topic for further research to best understand how to equate the equivalence between this Nmatrix and the three-valued Nmatrix from~\cite{avronnegations}.\smallskip If we want to strengthen the resulting logic, $\mathcal{C}_{\min}$, with the \emph{double negation introduction} axiom $p_1\to \neg\neg p_1$, we can readily apply Theorem~\ref{theconstruction} to $\Mt^\sharp_{\mathsf{DNe}}$ and $\mathsf{DNi}=\{ p_1\to \neg\neg p_1\}$, obtaining (up to renaming of the truth-values) the three-valued Nmatrix $\mathbb{N}=(\Mt^\sharp_{\mathsf{DNe}})^\sharp_{\mathsf{DNi}}=\tuple{\{01,10,11\},\{10,11\},\cdot_{\mathbb{N}}}$ where: \begin{center} \begin{tabular}{c | c c c c} ${\to_{\mathbb{N}}}$ & $01$ & $10$ & $11$ \\ \hline $01$& $10,11 $ & $10,11 $& $ 10,11$ \\ $10$ &$01$ & $ 10,11$& $ 10,11 $ \\ $11$ &$01$ & $10,11 $& $ 10,11 $ \end{tabular} \qquad\qquad \begin{tabular}{c | c } & ${\neg_{\mathbb{N}}}$ \\ \hline $01$& $ 10 $ \\ $10$ &$ 01$ \\ $11$ &$ 11 $ \end{tabular} \end{center} Note that, by construction, the Nmatrix $\mathbb{N}$ has three values $g:\Theta_{\mathsf{DNi}}\to V^\sharp_{\mathsf{DNe}}$ which, given that $\Theta_{\mathsf{DNi}}=\{\varepsilon,\neg,\neg\neg\}$, can be written in string notation as $g(\varepsilon)g(\neg)g(\neg\neg)$, corresponding to the strings $010101010,101010101,111111111$. Clearly, each of them can be named simply by their first two symbols. It is interesting to further note that this Nmatrix is isomorphic to $\Mt^\sharp_{\mathsf{DNe}\cup\mathsf{DNi}}$. This is a particularly happy case as, in general, adding axioms incrementally, instead of all at once (as in~\cite{taming}), will yield an equivalent PNmatrix but not necessarily the same, often with more truth-values.\hfill$\triangle$ \end{example} We now consider a more elaborate example in the family of paraconsistent logics, as also tackled by Avron and coauthors, which is developed in detail in~\cite{taming}. \begin{example}\label{agata}\em As in Example 5.1 of~\cite{taming}, we want to characterize the logic obtained by adding two additional 1-place connectives $\neg,\circ$ to positive classical logic, subject to the set of axioms $\Ax$ containing: $$p_1\ou \neg p_1$$ $$p_1\to(\neg p_1\to(\circ p_1 \to p_2))$$ $$\circ p_1\ou (p_1 \e \neg p_1)$$ $$\circ p_1\to\circ(p_1\e p_2)$$ $$(\neg p_1\ou \neg p_2)\to\neg(p_1\e p_2)$$ Let $\Sigma_d$ contain the three 2-place connectives $\e,\ou,\to$, and $\mathcal{U}$ contain the two 1-place connectives $\neg, \circ$ and consider the Nmatrix $\CMt=\tuple{\{0,1\},\{1\},\cdot_\CMt}$ with: \begin{center} \begin{tabular}{c | c c c } ${\e_\CMt}$ & $0$ & $1$ \\ \hline $0$& $ 0 $ & $ 0 $ \\ $1$ &$0$ & $ 1 $ \end{tabular}\qquad \begin{tabular}{c | c c c } ${\ou_\CMt}$ & $0$ & $1$ \\ \hline $0$& $ 0$ & $ 1 $ \\ $1$ &$1$ & $ 1 $ \end{tabular}\qquad \begin{tabular}{c | c c c } ${\to_\CMt}$ & $0$ & $1$ \\ \hline $0$& $ 1 $ & $ 1 $ \\ $1$ &$0$ & $ 1 $ \end{tabular} \qquad \begin{tabular}{c | c | c} & ${\neg_\CMt}$ & ${\circ_\CMt}$ \\ \hline $0$& $ 0,1 $&$ 0,1 $ \\ $1$ &$ 0,1 $&$ 0,1 $ \end{tabular} \end{center} It is clear that $\CMt$ is $\Sigma_d$-deterministic and that the axioms are all $\Sigma^d$-simple. Further, we get $\Theta_{\Ax}=\{\varepsilon,\neg,\circ\}$. From Theorem~\ref{theconstruction}, the strengthening $\vdash^\Ax_\CMt$ is characterized by the PNmatrix $\CMt^\sharp_{\Ax}=\tuple{\{011,101,110,111\},\{101,110,111\},\cdot_{\CMt^\sharp_{\Ax}}}$ where: \begin{center} \begin{tabular}{c | c c c c} ${\e_{\CMt^\sharp_\Ax}}$ & $011$ & $101$ & $110$ & $111$ \\[2mm] \hline $011$& $011$ & $011$& $011$ & $ \emptyset $ \\ $101$ &$011$ & $101$ & $\emptyset$ & $ \emptyset $ \\ $110$& $ 011 $ & $\emptyset$ & $110$ & $ \emptyset$ \\ $111$ &$\emptyset$ & $\emptyset $& $\emptyset $ & $ 111 $ \end{tabular} \qquad \begin{tabular}{c | c c c c} ${\ou_{\CMt^\sharp_\Ax}}$ & $011$ & $101$ & $110$ & $111$ \\[2mm] \hline $011$& $011$ & $101$& $110$ & $ \emptyset $ \\ $101$ &$101$ & $101$ & $\emptyset$ & $ \emptyset $ \\ $110$& $110 $ & $\emptyset$ & $110$ & $ \emptyset$ \\ $111$ &$\emptyset$ & $\emptyset $& $\emptyset $ & $ 111 $ \end{tabular} \end{center} \begin{center} \begin{tabular}{c | c c c c} ${\to_{\CMt^\sharp_\Ax}}$ & $011$ & $101$ & $110$ & $111$ \\[2mm] \hline $011$& $101,110$ & $101$& $110$ & $ \emptyset $ \\ $101$ &$011$ & $101$ & $\emptyset$ & $ \emptyset $ \\ $110$& $ 011 $ & $\emptyset$ & $110$ & $ \emptyset$ \\ $111$ &$\emptyset$ & $\emptyset $& $\emptyset $ & $ 111 $ \end{tabular} \qquad \begin{tabular}{c | c | c} & ${\neg_{\CMt^\sharp_\Ax}}$ & ${\circ_{\CMt^\sharp_\Ax}}$ \\[2mm] \hline $011$& $ 101,110 $ & $ 101,110 $\\ $101$ &$ 011 $ & $ 101$\\ $110$& $ 110 $ & $ 011 $\\ $111$ &$ 111 $ & $ 111 $ \end{tabular} \end{center} For ease of notation, once again, we are denoting a function $f\in V^\sharp_{\Ax}$ simply by the string $f(\varepsilon)f(\neg)f(\circ)$. Notably, the PNmatrix $\CMt^\sharp_\Ax$ is slightly different from the PNmatrix obtained using the method in~\cite{taming}. Still, it is easy to see that $\CMt^\sharp_\Ax$ has two maximal total refinements: the three-valued PNmatrix $(\CMt^\sharp_{\Ax})_{\{011,101,110\}}$ (which is an equivalent refinement of the PNmatrix in~\cite{taming} maximizing the partiality), plus the trivial one-valued matrix $(\CMt^\sharp_{\Ax})_{\{111\}}$. \hfill$\triangle$ \end{example} Our next example deals with Nelson-like logics and twist-structures. \begin{example} \label{nelson}\em The addition of a paraconsistent Nelson-like~\cite{nelson,vakarelovnelson,odintsovBook} \emph{strong negation} $\sim$ to a given intermediate logic (as in~\cite{Kracht1998OnEO}) can be easily captured by our construction. Let $\Sigma_d$ be a signature containing binary connectives $\e,\ou,\to$, and $\mathcal{U}$ contain the 1-place connective $\sim$, and consider an Nmatrix $\Mt=\tuple{V,\{1\},\cdot_\Mt}$ whose $\{\e,\ou,\to\}$-reduct of $\Mt$, dubbed $\mathbb{N}$, is an \emph{implicative lattice} \cite{odintsovBook}, and such that $\sim_\Mt(x)=V$ for every $x\in V$, and let $\Ax$ contain: $$\sim\sim p_1\to p_1\qquad\qquad p_1\to\,\sim\sim p_1$$ $$\sim(p_1\ou p_2)\to(\sim p_1\e\sim p_2)\qquad\qquad(\sim p_1\,\e\sim p_2)\to\,\sim(p_1\ou p_2)$$ $$\sim(p_1\e p_2)\to(\sim p_1\ou\sim p_2)\qquad\qquad (\sim p_1\ou\sim p_2)\to\, \sim(p_1\e p_2)$$ $$\sim(p_1\to p_2)\to(p_1\e\sim p_2)\qquad\qquad (p_1\e\sim p_2)\to \,\sim(p_1\to p_2)$$ \vspace*{2mm} Clearly, the axioms in $\Ax$ are $\Sigma_d$-simple and $\Theta_\Ax=\{\varepsilon,\sim,\sim\sim\}$. From Theorem~\ref{theconstruction}, $\vdash^\Ax_\Mt$ is characterized by the matrix $\Mt^\sharp_{\Ax}=\tuple{V^\sharp_\Ax,D^\sharp_\Ax,\cdot_{\Mt^\sharp_{\Ax}}}$ isomorphic to the well known full twist-structure $\mathbb{N}^{\bowtie}$ over $\mathbb{N}$ (see~\cite{odintsovBook}). Namely, we have $V^\sharp_\Ax=\{f\in V^{\{\varepsilon,\sim,\sim\sim\}}: f(\varepsilon)=f(\sim\sim)\}$. For simplicity, we can represent each such function $f\in V^\sharp_\Ax$ simply by the pair $(f(\varepsilon),f(\sim))$. Hence, we have: \begin{itemize} \item $V^\sharp_\Ax=V\times V$ and $D^\sharp_\Ax=\{1\}\times V$, \item $(x_1,y_1)\e_{\Mt^\sharp_\Ax}(x_1,y_1)=(x_1\e_\Mt x_2,y_1\ou_\Mt y_2)$, \item $(x_1,y_1)\ou_{\Mt^\sharp_\Ax}(x_1,y_1)=(x_1\ou_\Mt x_2,y_1\e_\Mt y_2)$, \item $(x_1,y_1)\to_{\Mt^\sharp_\Ax}(x_2,y_2)=(x_1\to_\Mt x_2,x_1\e_\Mt y_2)$, and \item $\sim_{\Mt^\sharp_\Ax}({x,y})=(y,x)$. \end{itemize} When we take $\mathbb{N}$ to be the two-valued Boolean matrix, and using now $xy$ instead of $(x,y)$, we obtain, $\Mt^\sharp_{\Ax}=\tuple{\{00,01,10,11\},\{10,11\},\cdot_{\Mt^\sharp_{\Ax}}}$ where: \begin{center} \begin{tabular}{c | c c c c} ${\e_{\Mt^\sharp_\Ax}}$ & $00$ & $01$ & $10$ & $11$ \\[2mm] \hline $00$& $ 00 $ & $ 01 $& $ 00 $ & $ 01 $ \\ $01$ &$01$ & $ 01 $& $ 01 $ & $01$ \\ $10$& $00$ & $ 01$& $ 10 $ & $ 11 $ \\ $11$ &$01$ & $ 01 $& $ 11 $ & $ 11 $ \end{tabular} \quad \begin{tabular}{c | c c c c} ${\ou_{\Mt^\sharp_\Ax}}$ & $00$ & $01$ & $10$ & $11$ \\[2mm] \hline $00$& $ 00 $ & $ 00 $& $ 10 $ & $ 10 $ \\ $01$ &$00$ & $01 $& $ 10 $ & $ 11 $ \\ $10$& $ 10 $ & $ 10 $& $ 10 $ & $ 10 $ \\ $11$ &$10$ & $11 $& $ 10 $ & $ 11 $ \end{tabular} \end{center} \begin{center} \begin{tabular}{c | c c c c} ${\to_{\Mt^\sharp_\Ax}}$ & $00$ & $01$ & $10$ & $11$ \\[2mm] \hline $00$& $ 10 $ & $ 10 $& $ 10 $ & $ 10 $ \\ $01$ &$10$ & $ 10 $& $ 10 $ & $ 10$ \\ $10$& $ 00 $ & $ 01 $& $ 10 $ & $11$ \\ $11$ &$00$ & $01$& $10$ & $11$ \end{tabular}\qquad\quad \begin{tabular}{c | c } & ${\sim_{\Mt^\sharp_\Ax}}$ \\[2mm] \hline $00$& $ 00 $ \\ $01$ &$ 10 $ \\ $10$& $ 01 $ \\ $11$ &$ 11 $ \end{tabular} \end{center} Note this semantics coincides precisely with the semantic extension of Belnap's four-valued logic~\cite{Belnap19774val,Belnapcomputerthink} with \emph{true implication} of Avron~\cite{AvronValue4Values}. If we further impose the axiom $$\sim p_1\to(p_1\to p_2)$$ we obtain corresponding explosive versions of Nelson's construction. Making $\Ax'=\Ax\cup\{\sim p_1\to(p_1\to p_2)\}$, the resulting twist-structure is now a refinement resulting from isolating the truth-value $(1,1)$, i.e., such that for $\ast\in\{\e,\ou,\to\}$ we have $(1,1)\ast_{\Mt^\sharp_\Ax}(x,y)=(x,y)\ast_{\Mt^\sharp_\Ax}(1,1)=\emptyset$ if $(x,y)\neq(1,1)$. Concretely, if we take $\mathbb{N}$ to be the two-valued Boolean matrix, again, we obtain the Pmatrix $\Mt^\sharp_{\Ax'}=\tuple{\{00,01,10,11\},\{10,11\},\cdot_{\Mt^\sharp_{\Ax'}}}$ where: \begin{center} \begin{tabular}{c | c c c c} ${\e_{\Mt^\sharp_{\Ax'}}}$ & $00$ & $01$ & $10$ & $11$ \\[2mm] \hline $00$& $ 00 $ & $ 01 $& $ 00 $ & $\emptyset $ \\ $01$ &$01$ & $ 01 $& $ 01 $ & $\emptyset$ \\ $10$& $00$ & $ 01$& $ 10 $ & $ \emptyset $ \\ $11$ &$\emptyset$ & $ \emptyset $& $ \emptyset $ & $ 11 $ \end{tabular} \quad \begin{tabular}{c | c c c c} ${\ou_{\Mt^\sharp_{\Ax'}}}$ & $00$ & $01$ & $10$ & $11$ \\[2mm] \hline $00$& $ 00 $ & $ 00 $& $ 10 $ & $ \emptyset $ \\ $01$ &$00$ & $01 $& $ 10 $ & $\emptyset $ \\ $10$& $ 10 $ & $ 10 $& $ 10 $ & $\emptyset $ \\ $11$ &$\emptyset$ & $\emptyset$& $\emptyset $ & $ 11 $ \end{tabular} \end{center} \begin{center} \begin{tabular}{c | c c c c} ${\to_{\Mt^\sharp_{\Ax'}}}$ & $00$ & $01$ & $10$ & $11$ \\[2mm] \hline $00$& $ 10 $ & $ 10 $& $ 10 $ & $\emptyset$ \\ $01$ &$10$ & $ 10 $& $ 10 $ & $ \emptyset$ \\ $10$& $ 00 $ & $ 01 $& $ 10 $ & $\emptyset$ \\ $11$ &$\emptyset$ & $\emptyset$& $\emptyset$ & $11$ \end{tabular}\quad\qquad \begin{tabular}{c | c } & ${\neg_{\Mt^\sharp_{\Ax'}}}$ \\[2mm] \hline $00$& $ 00 $ \\ $01$ &$ 10 $ \\ $10$& $ 01 $ \\ $11$ &$ 11 $ \end{tabular} \end{center} Easily, $\Mt^\sharp_{\Ax'}$ has two maximal total refinements: the three-valued matrix $(\Mt^\sharp_{\Ax'})_{\{00,01,10\}}$, plus the trivial one-valued matrix $(\Mt^\sharp_{\Ax'})_{\{11\}}$. Expectedly, we have that $(\Mt^\sharp_{\Ax'})_{\{00,01,10\}}$ is precisely the matrix characterizing the three-valued logic of Vakarelov~\cite{vakarelovnelson,Kracht1998OnEO} (which coincides with $\vdash^{\Ax'}_\Mt$, and is known to be translationally equivalent to \L ukasiewicz's three-valued logic). \hfill$\triangle$ \end{example} Next, we will show, by means of an example, that our method subsumes the idea of \emph{swap-structure semantics} put forth in~\cite{carcon,coniglioswap}. \begin{example}\label{swap}\em As in~\cite{coniglioswap}, we consider obtaining a semantic characterization of the non-normal modal logic $\mathcal{T}$ of Kearns~\cite{kearns}, which coincides with the logic $\mathcal{S}_a+$ of Ivlev~\cite{Ivlev}. This can be done by using our method to characterize the logic obtained by a 1-place connective $\square$ to the $\{\neg,\to\}$-fragment of classical logic, further demanding the $\Tm$ axioms of~\cite{coniglioswap}, namely: $$\square(p_1\to p_2)\to (\square p_1 \to \square p_2)$$ $$ \square(p_1\to p_2)\to (\square \neg p_2 \to \square \neg p_1)$$ $$ \neg\square\neg(p_1\to p_2)\to (\square p_1 \to \neg\square\neg p_2)$$ $$ \square \neg p_1 \to \square (p_1\to p_2)$$ $$ \square p_2 \to \square (p_1\to p_2)$$ $$ \square \neg (p_1\to p_2) \to \square \neg p_2$$ $$ \square \neg (p_1\to p_2) \to \square p_1$$ $$ \square p_1\to p_1$$ $$ \square p_1 \to \square \neg \neg p_1$$ $$\square\neg \neg p_1\to \square p_1 $$ Let $\Sigma_d$ contain $\to$, and $\mathcal{U}=\{\neg,\square\}$. Take the Nmatrix $\DMt=\tuple{\{0,1\},\{1\},\cdot_\DMt}$ with: \begin{center} \begin{tabular}{c | c c c } ${\to_\DMt}$ & $0$ & $1$ \\ \hline $0$& $ 1 $ & $ 1 $ \\ $1$ &$0$ & $ 1 $ \end{tabular} \qquad\qquad \begin{tabular}{c | c |c } & ${\neg_\DMt}$& ${\square_\DMt}$ \\ \hline $0$& $ 1 $& $0,1$ \\ $1$ &$ 0 $ & $0,1$ \end{tabular} \end{center} Clearly the axioms in $\Tm$ are $\Sigma_d$-simple. Furthermore, now, we have that $\Theta_\Tm=\{\varepsilon\}\cup\prfx(\{\square,\square\neg,\neg\square\neg,\square\neg\neg\})=\{\varepsilon,\neg,\neg\square,\neg\square\neg,\square,\square\neg,\square\neg\neg\}$. Note that for any $f\in V^\sharp_\Tm$ and $\neg w\in \Theta_\Tm$ we have $f(\neg w)=1-f(w)$. Note also that due to the last two axioms of $\Tm$, it follows that $f(\square\neg\neg)=f(\square)$ for any $f\in V^\sharp_\Tm$. Hence, we can represent each $f$ simply by the string $f(\varepsilon)f(\square)f(\square \neg)$. Further, note that the antepenultimate axiom $ \square p_1\to p_1$ guarantees both that $f(\square)\leq f(\varepsilon)$ and $f(\square \neg)\leq f(\neg)=1-f(\varepsilon)$. Now, applying Theorem~\ref{theconstruction}, we conclude that the strengthening $\vdash^\Tm_\DMt$ is characterized by the four-valued Nmatrix given by $\DMt^\sharp_{\Tm}=\tuple{\{000,001,100,110\},\{100,110\},\cdot_{\DMt^\sharp_{\Tm}}}$ where: \begin{center} \begin{tabular}{c | c c c c} ${\to_{\DMt^\sharp_{\Tm}}}$ & $000$ & $001$ & $100$ & $110$ \\[2mm] \hline $000$& $100,110$ & $100$& $100,110$ & $110$ \\ $001$ &$110$ & $110$ & $110$ & $110$ \\ $100$& $000$ & $000$ & $100,110$ & $110$ \\ $110$ &$000$ & $001 $& $100$ &$110$ \end{tabular} \qquad \begin{tabular}{c | c | c} & ${\neg_{\DMt^\sharp_\Tm}}$ & ${\square_{\DMt^\sharp_\Tm}}$ \\[2mm] \hline $000$& $ 100 $ & $000,001$\\ $001$ &$ 110 $ & $000,001$\\ $100$& $ 000 $ & $000,001$\\ $110$ &$ 001 $ & $ 100,110$ \end{tabular} \end{center} It is straightforward to check that this Nmatrix is isomorphic to the Kearns and Ivlev semantics~\cite{kearns,Ivlev}, also recovered in~\cite{coniglioswap}, by renaming the truth-values $000,001,100,110$ by $f,F,t,T$, respectively.\hfill$\triangle$ \end{example} We finish this section with another example, starting from a non-classical base, namely, {\L}ukasiewicz's five-valued logic. \begin{example}\label{L53}\em We start from {\L}ukasiewicz's logic $\mathcal{L}_5$ and strengthen it by axiom $((p_1\to \neg p_1)\to p_1)\to p_1$ in order to obtain {\L}ukasiewicz's three-valued logic $\mathcal{L}_3$ (see, for instance,~\cite{Woj,gott}). In this case, no new connectives are added. Let $\Sigma_d$ contain the 2-place connective $\to$, and also the 1-place connective $\neg$, and let $\mathcal{U}=\emptyset$. Let also $\Ax=\{((p_1\to \neg p_1)\to p_1)\to p_1\}$. Consider the five-valued matrix $\mathbb{L}_5=\tuple{\{0,\frac{1}{4},\frac{1}{2},\frac{3}{4},1\},\{1\},\cdot_{\mathbb{L}_5}}$ with: \begin{center} \begingroup \renewcommand{\arraystretch}{1.2} \begin{tabular}{c | c c c c c} ${\to_{\mathbb{L}_5}}$ & $0$&$\frac{1}{4}$&$\frac{1}{2}$&$\frac{3}{4}$&$1$ \\[1mm] \hline $0$ & $1$& $1$& $1$& $1$& $1$ \\ $\frac{1}{4}$ & $\frac{3}{4}$&$1$&$1$&$1$&$1$ \\ $\frac{1}{2}$& $\frac{1}{2}$&$\frac{3}{4}$&$1$&$1$&$1$ \\ $\frac{3}{4}$& $\frac{1}{4}$&$\frac{1}{2}$&$\frac{3}{4}$&$1$&$1$ \\ $1$ & $0$&$\frac{1}{4}$&$\frac{1}{2}$&$\frac{3}{4}$&$1$ \end{tabular}\qquad\quad \begin{tabular}{c | c } & ${\neg_{\mathbb{L}_5}}$ \\[1mm] \hline $0$ & $1$\\ $\frac{1}{4}$ & $\frac{3}{4}$ \\ $\frac{1}{2}$& $\frac{1}{2}$ \\ $\frac{3}{4}$& $\frac{1}{4}$ \\ $1$ & $0$ \end{tabular} \endgroup \end{center} Clearly the axiom is $\Sigma_d$-simple and $\Theta_\Ax=\{\varepsilon\}$. Hence we represent any $f\in V^\sharp_\Ax$ simply by $f(\varepsilon)$. From Theorem~\ref{theconstruction}, the strengthening $\vdash^\Ax_{\mathbb{L}_5}$ is characterized by the well-known three-valued matrix $({\mathbb{L}_5})^\sharp_{\Ax}=\mathbb{L}_3=\tuple{\{0,\frac{1}{2},1\},\{1\},\cdot_{\mathbb{L}_3}}$ where: \begin{center} \begin{tabular}{c | c c c c c} ${\to_{\mathbb{L}_3}}$ & $0$&$\frac{1}{2}$&$1$ \\[1mm] \hline $0$ & $1$& $1$& $1$ \\ $\frac{1}{2}$& $\frac{1}{2}$& $1$&$1$ \\ $1$ & $0$&$\frac{1}{2}$&$1$ \end{tabular}\qquad\quad \begin{tabular}{c | c } & ${\neg_{\mathbb{L}_3}}$ \\[1mm] \hline $0$ & $1$\\ $\frac{1}{2}$& $\frac{1}{2}$ \\ $1$ & $0$ \end{tabular} \end{center} \hfill$\triangle$ \end{example} Examples~\ref{pnegpq},~\ref{agata},~\ref{swap} are also covered by the method in~\cite{taming}. The two-valued based case of Example~\ref{nelson} could also be obtained using~\cite{taming}, but not the general case we deal with, over an arbitrary implicative lattice. Example~\ref{clun}, the way it is formulated, is outside the scope of~\cite{taming}, not only because it starts from a Nmatrix where negation is not fully non-deterministic, but also because we are adding one axiom and then another. Examples~\ref{pnegpnegq},~\ref{L53} are also not covered by~\cite{taming}. Namely, Example~\ref{pnegpnegq} uses an axiom which does not respect their syntactic criteria, and Example~\ref{L53} uses a five-valued non-classical matrix. \section{Analytic multiple-conclusion calculi}\label{sec5} In the work of Arnon Avron on Nmatrices and rexpansions, obtaining a concise semantics for a logic (typically in the form of a Nmatrix) is not an end in itself but a means for obtaining (sequent-like) analytic calculi for that logic~\cite{AvronBK07,Avron2012atLICS,avroncutfree2013}. In other works (e.g.,~\cite{taming,Baaz2013}), the semantics (typically in the form of a PNmatrix) is not a basis for obtaining a calculus but it is still instrumental in proving its analyticity (when the PNmatrix is total). In this paper, so far, we have not worried about proof-theoretic aspects. Therefore, this is a good point for applying to our previous construction the techniques developed in~\cite{synt,wollic19} for obtaining analytic multiple-conclusion calculi for logics defined by finite PNmatrices, under a reasonable expressiveness proviso. This contrasts with the above mentioned results for sequent-like calculi~\cite{avroncutfree2013,Baaz2013,taming}, for which partiality seems to devoid them of a usable (even if generalized) subformula property capable of guaranteeing analyticity (and elimination of non-analytic cuts).\smallskip In what follows, we will consider so-called \emph{multiple-conclusion calculi}, a simple generalization of Hilbert-style calculi with (schematic) inference rules of the form $\frac{\;\Gamma\;}{\Delta}$ where $\Gamma$ (\emph{premises} read conjunctively, as usual) and $\Delta$ (\emph{conclusions} read disjunctively) are sets of formulas. Such calculi were studied by Shoesmith and Smiley in~\cite{ShoesmithSmiley}, and have very interesting properties. A set $R$ of such multiple-conclusion rules induces a consequence relation $\der_R$ by means of an adequate notion of proof, simply defined as a tree-like version of Hilbert-style proofs. We shall show some illustrative examples later, but refer the reader to~\cite{ShoesmithSmiley,synt,wollic} for details. As usual, we say that $R$ constitutes a calculus for a consequence relation $\der$ if $\der_R{=}\der$. A set $\mathcal{S}\subseteq L_\Sigma(\{p\})$ induces a simple notion of a generalized subformula: $A$ is a \emph{$\mathcal{S}$-subformula of $B$} if $A\in\sub_{\mathcal{S}}(B)=\sub(B)\cup\{S(B'):S\in\mathcal{S},B'\in\sub(B)\}$. We say that \emph{$R$ is an $\mathcal{S}$-analytic calculus} if whenever $\Gamma\der_R\Delta$ then there exists a proof of $\Delta$ from $\Gamma$ using only formulas in $\sub_{\mathcal{S}}(\Gamma\cup\Delta)$. For finite $\mathcal{S}$, we have shown in~\cite{synt,wollic} that $\mathcal{S}$-analyticity implies that deciding $\der_R$ is in $\mathsf{coNP}$, and that proof-search can be implemented in $\mathsf{EXPTIME}$.\smallskip Producing analytic calculi for logics characterized by finite PNmatrices is possible, as long as the syntax of the logic is sufficiently expressive (a notion intimately connected with the methods in~\cite{ShoesmithSmiley,AvronBK07,avroncutfree2013,dyadic,taming}). Fix a $\Sigma$-PNmatrix $\Mt=\tuple{V,D,\cdot_\Mt}$. A pair of non-empty sets of elements $\emptyset\neq X,Y\subseteq V$ are \emph{separated}, $X\# Y$, if $X\subseteq D$ and $Y\subseteq V\setminus{D}$, or vice versa. A formula $S$ with $\var(S)\subseteq\{p\}$ with $S_\Mt(z)\neq\emptyset$ for every $z\in V$, and such that $S_\Mt(x)\# S_\Mt(y)$ is said to \emph{separate} $x$ and $y$, and called a \emph{(monadic) separator}. The PNmatrix $\Mt$ is said to be \emph{monadic} if there is a separator for every pair of distinct truth-values.\smallskip Granted a monadic PNmatrix $\Mt=\tuple{V,D,\cdot_\Mt}$ and some set $\mathcal{S}=\{S^{xy}:x,y\in V, x\neq y\}$ of monadic separators for $\Mt$ such that each $S^{xy}$ separates $x$ and $y$, a \emph{discriminator} for $\Mt$ is the $V$-indexed family $\widetilde{\mathcal{S}}=\{\widetilde{\mathcal{S}}_x\}_{x\in V}$, with each $\widetilde{\mathcal{S}}_x=\{S^{xy}:y\in V\setminus\{x\}\}$. Each $\widetilde{\mathcal{S}}_x$ is naturally partitioned into % $ \Omega_x=\{S\in \widetilde{\mathcal{S}}_x:S_\Mt(x)\subseteq D\} \text{ and } \mho_x=\{S\in \widetilde{\mathcal{S}}_x:S_\Mt(x)\subseteq V\setminus D\}. $ This partition is easily seen to characterize precisely each of the truth-values of $\Mt$.\smallskip Given $X\subseteq V$, we denote by $\Omega^*_X$ any of the possible sets built by choosing one element from each $\Omega_x$ for $x\in X$, that is, $\Omega^*_X\subseteq\bigcup_{x\in X}\Omega_x$ is such that $\Omega^*_X\cap\Omega_x\neq \emptyset$ for each $x\in X$. Analogously, we let $\mho^*_X$ denote any of the possible sets built by choosing one element from each $\mho_x$ for $x\in X$, that is, $\mho^*_X\subseteq\bigcup_{x\in X}\mho_x$ is such that $\mho^*_X\cap\mho_x\neq \emptyset$ for each $x\in X$. The following result is taken from~\cite{wollic19}. \begin{theorem}\label{analyticity} Let $\Mt=\tuple{V,D,\cdot_\Mt}$ be a monadic PNmatrix with discriminator $\widetilde{\mathcal{S}}$. Then, $R_\Mt^{\widetilde{\mathcal{S}}}=R_{\exists}\cup R_{\mathsf{D}}\cup R_\Sigma \cup {R_{\mathcal{T}}}$ is an $\mathcal{S}$-analytic calculus for $\der_\Mt$, where: \begin{itemize} \item $R_{\exists}$ contains, for each $X\subseteq V$ and each possible $\mho^*_{X}$ and $\Omega^*_{V\setminus X}$, the rule $$\frac{\;\mho^*_{X}(p)\;}{\Omega^*_{V\setminus X}(p)}$$ \item $R_{\mathsf{D}}$ contains, for each $x\in V$, the rule $$\frac{\Omega_x(p)}{\;p,\mho_x(p)\;}\mbox{ if } x\in D \quad\mbox{ or }\quad \frac{\;\Omega_x(p),p\;}{\mho_x(p)}\mbox{ if } x\notin D$$ \item $R_\Sigma=\bigcup_{{\copyright}\in\Sigma}R_{\copyright}$ where, for ${\copyright}\in \Sigma^{(k)}$, $R_{\copyright}$ contains, for each $x_1,\ldots,x_k\in V$ and $y\notin {\copyright}_\Mt(x_1,\ldots,x_k)$, the rule $$ \frac{\;\bigcup\limits_{1\leq i\leq k}\Omega_{x_i}(p_i)\,,\, \Omega_y({\copyright}(p_1\dots,p_k))\;}{\bigcup\limits_{1\leq i\leq k}\mho_{x_i}(p_i)\,,\,\mho_y({\copyright}(p_1\dots,p_k))}$$ \item $R_{\mathcal{T}}$ contains, for each $X\subseteq V$ with $X\notin \mathcal{T}_\Mt$, the rule $$\frac{\bigcup\limits_{x_i\in X}\Omega_{x_i}(p_i)}{\bigcup\limits_{x_i\in X}\mho_{x_i}(p_i)}.$$ \end{itemize} \end{theorem} It is worth understanding the role of each of the rules proposed, as they fully capture the behaviour of $\Mt$. Namely, $R_\exists$ allows one to exclude combinations of separators that do not correspond to truth-values. Actually, in examples where the separators $S$ are such that, in all cases, $S_\Mt(z)\subseteq D$ or $S_\Mt(z)\subseteq V\setminus{D}$, one can always in practice set up the discriminator in a way that makes all $R_\exists$ rules trivial, in the sense that they will necessarily have a formula that appears both as a premise and as a conclusion. Rules in $R_{\mathsf{D}}$ distinguish those combinations of separators that characterize designated values from those that characterize undesignated values. Again, in practice, whenever $\Mt$ has both designated and undesignated values and $S(p)=p$ is used to separate them, all $R_{\mathsf{D}}$ rules are also trivial. The most operational rules are perhaps $R_\Sigma$, as they completely determine the interpretation of connectives in $\Mt$. The rules in $R=R_\exists\cup R_{\mathsf{D}}\cup R_\Sigma$ already guarantee that $\der_R{=}\der_\Mt$, but not necessarily analyticity. The rules in $R_{\mathcal{T}}$ are crucial in proving analyticity (they are already derivable from the previous rules, but with seemingly non-analytic proofs). Indeed, rules in $R_{\mathcal{T}}$ guarantee that one deals with combinations of separators that correspond to values taken within a total refinement of $\Mt$. \\ In order to be able to apply this general result to obtain analytic calculi for the logics characterized by the PNmatrices produced by the method we have devised in Subsection~\ref{sec32}, we need to make sure that the PNmatrices are monadic. Of course, not every PNmatrix is monadic, but we can easily show that our construction preserves monadicity. \begin{proposition}\label{monadic} Let $\Mt=\tuple{V,D,\cdot_\Mt}$ be a $\Sigma$-PNmatrix and $\Ax\subseteq L_\Sigma(P)$ that fulfill the conditions of Theorem~\ref{theconstruction}. If $\Mt$ is monadic then $\Mt^\sharp_\Ax$ is also monadic. \end{proposition} \proof{Let $f_{v_1}^{A_1},f_{v_2}^{A_2}\in V^\sharp_\Ax$ with $f_{v_1}^{A_1}\neq f_{v_2}^{A_2}$. This means that there exists $w\in\Theta_\Ax$ such that $x_1=f_{v_1}^{A_1}(w)\neq f_{v_2}^{A_2}(w)=x_2$. Given that $\Mt$ is monadic, we know that there exists $S\in L_\Sigma(\{p\})$ which separates $x_1$ from $x_2$ in $\Mt$, that is, $S_\Mt(x_1)\#S_\Mt(x_2)$. We show that $R(p)=S(w\,p)$ separates $f_{v_1}^{A_1}$ from $f_{v_2}^{A_2}$ in $\Mt^\sharp_\Ax$. Given $f_v^B\in V^\sharp_\Ax$ we know (from the completeness part of the proof of Theorem~\ref{theconstruction}) that $v^\sharp(C)=f_v^C$ for each $C\in L_\Sigma(P)$ defines a valuation $v^\sharp\in \textrm{Val}_{V^\sharp_\Ax}$. Easily, then, $v^\sharp(R(B))\in R_{\Mt^\sharp_\Ax}(v^\sharp(B))=R_{\Mt^\sharp_\Ax}(f_v^B)$, and therefore $R_{\Mt^\sharp_\Ax}(f_v^B)\neq\emptyset$. In order to show that $R_{\Mt^\sharp_\Ax}(f_{v_1}^{A_1})\# R_{\Mt^\sharp_\Ax}(f_{v_2}^{A_2})$ we just need to show that $R_{\Mt^\sharp_\Ax}(f_{v_1}^{A_1})(\varepsilon)\subseteq S_\Mt(x_1)\# S_\Mt(x_2)\supseteq R_{\Mt^\sharp_\Ax}(f_{v_2}^{A_2})(\varepsilon)$, and use the fact that in a rexpansion designated values are preserved and reflected. Take $i\in\{1,2\}$ and any valuation $v^\sharp\in \textrm{Val}_{\Mt^\sharp_\Ax}$ with $v^\sharp(p)=f_{v_i}^{A_i}$. We have that $v^\sharp(R(p))=v^\sharp(S(w\,p))\in S_{\Mt^\sharp_\Ax}(v^\sharp(w\,p))$. Thus, it follows that $v^\sharp(R(p))(\varepsilon)\in S_{\Mt^\sharp_\Ax}(v^\sharp(w\,p))(\varepsilon)\subseteq S_\Mt(v^\sharp(w\,p)(\varepsilon))=S_\Mt(v^\sharp(p)(w))=S_\Mt(f_{v_i}^{A_i}(w))=S_\Mt(x_i)$. \qed} Note that this result encompasses the \emph{sufficient expressiveness} preservation result of~\cite{taming}, as the two-valued Boolean matrix is trivially separable using just $S(p)=p$.\smallskip We now illustrate the powerful result of Theorem~\ref{analyticity} by producing suitably analytic calculi for the resulting logics in each of the examples of Section~\ref{sec4}. In some cases, we also take the opportunity to illustrate the (obvious) notion of proof in multiple-conclusion calculi. In each of the examples, rules $R_\exists$ and $R_\mathsf{D}$ are omitted, as they are all trivial, as discussed before. We refer the reader to~\cite{synt,wollic19} for further details. \begin{bla1}\em In Example~\ref{pnegpq} we have obtained a four-valued PNmatrix characterizing the strengthening of the logic of classical implication with the additional axiom $p_1\to(\neg p_1\to p_2)$. Easily, ${\mathcal S}=\{p,\neg p\}$ is a corresponding set of monadic separators, which yields the discriminator $\widetilde{\mathcal{S}}$ with $\widetilde{\mathcal{S}}_x={\mathcal S}$ for each truth-value $x$. This gives rise to the following partitions. \begin{center} \begin{tabular}{c|c|c} $x$ & $\Omega_x$ & $\mho_x$ \\ \hline $00$ & $\emptyset$ & $\{p,\neg p\}$ \\ $01$ & $\{\neg p\}$ & $\{ p\}$ \\ $10$ & $\{p\}$ & $\{\neg p\}$ \\ $11$ & $\{p,\neg p\}$ & $\emptyset$ \end{tabular} \end{center} Using Theorem~\ref{analyticity}, the following rules constitute an ${\mathcal S}$-analytic calculus $R$ for the logic. $$\frac{}{p\,,\,p\to q}\ _{r_1}\qquad\quad \frac{p\,,\,p\to q}{q}\ _{r_{2}}\qquad\quad \frac{q}{p\to q}\ _{r_{3} \qquad\quad\frac{p \,,\, \neg p}{ q }\ _{r_{\Exp}}$$ After simplifications, the rules $r_{1}$--$r_{3}$ correspond to $R_\to$, and $r_{\Exp}$ to $R_{\mathcal{T}}$ with $X=\{00,11\}$, $X=\{01,11\}$, and $X=\{10,11\}$. For illustration, we next depict an analytic proof of $\der_R p_1\to(\neg p_1\to p_2)$. Note that rules with multiple conclusions give rise to branching in the proof-tree, which makes it necessary for the target formula $p_1\to(\neg p_1\to p_2)$ to appear in all the branches.\\ \begin{center} \scalebox{.85}{ \frame{\begin{tikzpicture} \tikzset{level distance=49pt} \tikzset{sibling distance=5pt} \Tree[. $\emptyset$ \edge node[auto=right] {$_{r_1}$}; [.$p_1$ \edge node[auto=right] {$_{r_1}$}; [.$\neg p_1$ \edge node[auto=right] {$_{r_{\Exp}}$}; $p_1\to(\neg p_1\to p_2)$ ] [.$\neg p_1\to p_2$ \edge node[auto=right] {$_{r_3}$}; $p_1\to(\neg p_1\to p_2)$ ] ] [.$p_1\to(\neg p_1\to p_2)$ ] ] \end{tikzpicture}} } \end{center} \hfill$\triangle$ \end{bla1} \begin{bla2}\em In Example~\ref{pnegpnegq} we have obtained a four-valued PNmatrix characterizing the strengthening of the logic of classical implication with the additional axiom $p_1\to(\neg p_1\to \neg p_2)$. Easily, one can reuse the set of monadic separators, and the discriminator, from the previous example. Using Theorem~\ref{analyticity}, an ${\mathcal S}$-analytic calculus $R$ for the logic can be obtained by replacing the rule $r_{\Exp}$ of Example~\ref{pnegpq} with the rule below. $$\qquad\qquad\qquad\frac{p \,,\, \neg p}{ \neg q }\ _{r_{\Exp_\neg}}\qquad \qquad \qquad $$ Expectedly, rule $r_{\Exp_\neg}$ corresponds to $R_{\mathcal{T}}$ with $X=\{00,11\}$, and $X=\{10,11\}$. \hfill$\triangle$ \end{bla2} \begin{bla3}\em In Example~\ref{clun} we have obtained a four-valued Nmatrix characterizing $\mathcal{C}_{\min}$, the strengthening of the logic $\mathcal{CL}u\mathcal{N}$ with the additional axiom $\neg\neg p_1\to p_1$. Easily, ${\mathcal S}=\{p,\neg p,\neg\neg p\}$ is a corresponding set of monadic separators, which allows for the discriminator $\widetilde{\mathcal{S}}$ with $\widetilde{\mathcal{S}}_{010}=\{p\}$, $\widetilde{\mathcal{S}}_{101}=\{p,\neg p\}$, and $\widetilde{\mathcal{S}}_{110}=\widetilde{\mathcal{S}}_{111}=\{p,\neg p,\neg \neg p\}$, giving rise to the following partitions. \begin{center} \begin{tabular}{c|c|c} $x$ & $\Omega_x$ & $\mho_x$ \\ \hline $010$ & $\emptyset$ & $\{p\}$ \\ $101$ & $\{p\}$ & $\{\neg p\}$ \\ $110$ & $\{p,\neg p\}$ & $\{\neg\neg p\}$ \\ $111$ & $\{p,\neg p,\neg\neg p\}$ & $\emptyset$ \end{tabular} \end{center} Using Theorem~\ref{analyticity}, the following rules constitute an ${\mathcal S}$-analytic calculus $R$ for $\mathcal{C}_{\min}$. $$\frac{}{p\,,\,p\to q}\ _{r_1}\qquad \frac{p\,,\,p\to q}{q}\ _{r_{2}}\qquad \frac{q}{p\to q}\ _{r_{3}}\qquad\frac{ }{p \,,\, \neg p}\ _{r_4}\qquad\frac{ \neg \neg p}{p}\ _{r_5}$$ After simplifications, the rules $r_{1}$--$r_{3}$ correspond to $R_\to$, and $r_4,r_5$ to $R_\neg$.\smallskip We then obtained a three-valued Nmatrix characterizing the strengthening of $\mathcal{C}_{\min}$ with the axiom $ p_1\to\neg\neg p_1$. Easily, ${\mathcal S}'=\{p,\neg p\}$ is a corresponding set of monadic separators, which allows for the discriminator $\widetilde{\mathcal{S}'}$ with $\widetilde{\mathcal{S}'}_{01}=\{p\}$, and $\widetilde{\mathcal{S}}_{10}=\widetilde{\mathcal{S}}_{11}=\{p,\neg p\}$, giving rise to the following partitions. \begin{center} \begin{tabular}{c|c|c} $x$ & $\Omega_x$ & $\mho_x$ \\ \hline $01$ & $\emptyset$ & $\{p\}$ \\ $10$ & $\{p\}$ & $\{\neg p\}$ \\ $11$ & $\{p,\neg p\}$ & $\emptyset$ \end{tabular} \end{center} Using Theorem~\ref{analyticity}, an ${\mathcal S}'$-analytic calculus $R'$ for the logic can be obtained by joining to the calculus $R$ obtained above the new $ R_{\neg}$ rule: $$\frac{ p}{ \neg \neg p}$$ \hfill$\triangle$ \end{bla3} \begin{bla4}\em In Example~\ref{agata} we have obtained a four-valued PNmatrix characterizing the strengthening of positive classical logic with axioms $$p_1\ou \neg p_1$$ $$p_1\to(\neg p_1\to(\circ p_1 \to p_2))$$ $$\circ p_1\ou (p_1 \e \neg p_1)$$ $$\circ p_1\to\circ(p_1\e p_2)$$ $$(\neg p_1\ou \neg p_2)\to\neg(p_1\e p_2)$$ It is easy to see that ${\mathcal S}=\{p,\neg p,\circ p\}$ is a corresponding set of monadic separators, which allows for the discriminator $\widetilde{\mathcal{S}}$ with $\widetilde{\mathcal{S}}_{011}=\{p\}$, $\widetilde{\mathcal{S}}_{101}=\{p,\neg p\}$, and $\widetilde{\mathcal{S}}_{110}=\widetilde{\mathcal{S}}_{111}=\{p,\neg p,\circ p\}$. This gives rise to the following partitions. \begin{center} \begin{tabular}{c|c|c} $x$ & $\Omega_x$ & $\mho_x$ \\ \hline $011$ & $\emptyset$ & $\{p\}$ \\ $101$ & $\{p\}$ & $\{\neg p\}$ \\ $110$ & $\{p,\neg p\}$ & $\{\circ p\}$ \\ $111$ & $\{p,\neg p,\circ p\}$ & $\emptyset$ \end{tabular} \end{center} Using Theorem~\ref{analyticity}, the following rules constitute an ${\mathcal S}$-analytic calculus $R$ for the logic. $$\frac{p\,,\, q}{\;p\e q\;}\ _{r_1}\quad \frac{\;p\e q\;}{p}\ _{r_2}\quad \frac{\;p\e q\;}{q}\ _{r_3} \quad \frac{\neg p}{\;\neg(p\e q)\;}\ _{r_4} $$ $$\frac{p}{\;p\ou q\;}\ _{r_5}\quad \frac{q}{\;p\ou q\;}\ _{r_6}\quad \frac{\;p\ou q\;}{\;p\,,\, q\;}\ _{r_{7}}\quad\frac{\;p\,,\, p\to q\;}{q}\ _{r_{8}}\quad \frac{q}{\;p\to q\;}\ _{r_{9}}\quad \frac{}{\;p\,,\, p\to q\;}\ _{r_{10}} $$ $$\frac{}{\;p\,,\,\neg p\;}\ _{r_{11}}\quad\frac{}{\;p\,,\, \circ p\;}\ _{r_{12}}\quad \frac{p}{\;\neg p\,,\, \circ p\;}\ _{r_{13}} \quad\frac{\;p\,,\, q\,,\,\neg q\;}{\neg p}\ _{r_{14}}\quad \frac{\;p\,,\,\neg p\,,\, \circ p\;}{q}\ _{r_{15}}$$ After simplifications, the rules $r_{1}$--$r_{4}$ correspond to $R_\e$, $r_{5}$--$r_{7}$ to $R_\ou$, $r_{8}$--$r_{10}$ to $R_\to$, $r_{11}$ to $R_\neg$, $r_{12}$ and $r_{13}$ to $R_\circ$. Finally, $r_{14}$ and $r_{15}$ result from $R_{\mathcal{T}}$, with $X=\{101,110\}$ and $X=\{111,011\}$, respectively. Sample proofs, namely for some of the axioms, with a very similar calculus can be found in~\cite{wollic19}. \hfill$\triangle$ \end{bla4} \begin{bla5}\em In Example~\ref{nelson} we have obtained a four-valued twist-structure characterizing the addition of a paraconsistent Nelson-like strong negation to positive classical logic. Easily, ${\mathcal S}=\{p,{\sim{p}}\}$ is a corresponding set of monadic separators, yielding the discriminator $\widetilde{\mathcal{S}}$ with $\widetilde{\mathcal{S}}_x=\mathcal{S}$ for each truth-value $x$. This gives rise to the following partitions. \begin{center} \begin{tabular}{c|c|c} $x$ & $\Omega_x$ & $\mho_x$ \\ \hline $00$ & $\emptyset$ & $\{p,\sim p\}$ \\ $01$ & $\{\sim p\}$ & $\{ p\}$ \\ $10$ & $\{p\}$ & $\{\sim p\}$ \\ $11$ & $\{p,\sim p\}$ & $\emptyset$ \end{tabular} \end{center} Using Theorem~\ref{analyticity}, the following rules constitute an ${\mathcal S}$-analytic calculus $R$ for the logic. { $$ \frac{\;p\e q\;}{p}\ _{r_1}\quad \frac{\;p\e q\;}{q}\ _{r_2} \quad \frac{p\,,\, q}{\;p\e q\;}\ _{r_3} \qquad \frac{ \sim p }{\sim (p\e q)}\ _{r_4} \qquad \frac{ \sim q }{\sim (p\e q)}\ _{r_5}\quad \frac{\sim (p\e q)}{ \sim p\,,\, \sim q }\ _{r_6} $$ % $$ \frac{p}{\;p\ou q\;}\ _{r_7}\quad \frac{q}{\;p\ou q\;}\ _{r_8}\quad \frac{\;p\ou q\;}{\;p\,,\, q\;}\ _{r_{9}} \quad \frac{\sim (p\ou q)}{ \sim q }\ _{r_{10}} \quad \frac{\sim (p\ou q)}{ \sim q }\ _{r_{11}}\quad \frac{ \sim p\,,\, \sim q }{\sim (p\ou q)}\ _{r_{12}}$$ % $$\quad\frac{\;p\,,\, p\to q\;}{q}\ _{r_{13}}\quad \frac{q}{\;p\to q\;}\ _{r_{14}}\quad \frac{}{\;p\,,\, p\to q\;}\ _{r_{15}}$$ % $$ \frac{\sim (p\to q)}{p }\ _{r_{16}}\quad \frac{\sim (p\to q)}{\sim q }\ _{r_{17}}\quad \frac{p \,,\, \sim q }{\sim (p\to q)}\ _{r_{18}} $$ % % $$ \frac{ p }{\sim \sim p}\ _{r_{19}}\qquad \frac{ \sim \sim p }{ p}\ _{r_{20}} $$ } After simplifications, the rules $r_{1}$--$r_{6}$ correspond to $R_\e$, $r_{7}$--$r_{12}$ to $R_\ou$, $r_{13}$--$r_{18}$ to $R_\to$, $r_{19}$ and $r_{18}$ to $R_\sim$. A strengthening with an additional (explosion) axiom $\sim p_1\to(p_1\to p_2)$ was then shown to be characterized by a four-valued Pmatrix. It is straightforward to see that one can reuse the set of monadic separators, and the discriminator, from above. Using Theorem~\ref{analyticity}, an ${\mathcal S}$-analytic calculus $R'$ for the logic can be obtained by simply adding to $R$ the new $R_{\mathcal{T}}$ rule $$\frac{p\,,\sim p}{q}$$ obtained by considering $X=\{11,00\}$, $X=\{11,01\}$, and $X=\{11,10\}$. \hfill$\triangle$ \end{bla5} \begin{bla6}\em In Example~\ref{swap} we obtained a four-valued Nmatrix characterizing the non-normal modal logic of Kearns and Ivlev~\cite{kearns,Ivlev}. It is not difficult to check (namely, using Proposition~\ref{monadic}) that ${\mathcal S}=\{p,\square p, \square\neg p\}$ is a set of monadic separators for the Nmatrix. This allows for the discriminator $\widetilde{\mathcal{S}}$ with $\widetilde{\mathcal{S}}_{000}=\widetilde{\mathcal{S}}_{001}=\{p,\square\neg p\}$, and $\widetilde{\mathcal{S}}_{100}=\widetilde{\mathcal{S}}_{110}=\{p,\square p\}$, which gives rise to the following partitions. \begin{center} \begin{tabular}{c|c|c} $x$ & $\Omega_x$ & $\mho_x$ \\ \hline $000$ & $\emptyset$ & $\{p,\square\neg p\}$ \\ $001$ & $\{\square\neg p\}$ & $\{ p\}$ \\ $100$ & $\{p\}$ & $\{\square p\}$ \\ $110$ & $\{p,\square p\}$ & $\emptyset$ \end{tabular} \end{center} Using Theorem~\ref{analyticity}, we get an ${\mathcal S}$-analytic calculus $R$ for the logic. { $$\frac{}{p\,,\,p\to q}\ _{r_1}\qquad\quad \frac{p\,,\,p\to q}{q}\ _{r_{2}}\qquad \frac{q}{p\to q}\ _{r_{3}}\qquad \frac{p\,,\, \neg p}{}\ _{r_4} \qquad \frac{}{p\,,\, \neg p}\ _{r_5} $$ % $$\frac{\square(p\to q) \,,\, \square p}{\square q}\ _{k} \qquad \frac{\square(p\to q) \,,\, \square \neg q}{\square\neg p}\ _{k_1} \qquad \frac{\square p \,,\, \square\neg q}{\square\neg(p\to q)}\ _{k_2} $$ % $$ \frac{\square\neg p}{\square(p\to q)} \ _{m_1}\qquad \frac{\square q}{\square(p\to q)} \ _{m_2}\qquad \frac{\square\neg (p\to q)}{\square \neg q} \ _{m_3}\qquad \frac{\square\neg (p\to q)}{\square p} \ _{m_4} $$ % $$ \frac{\square p}{p} \ _{T}\qquad \frac{\square p}{\square \neg \neg p} \ _{dn_1} \qquad \frac{\square \neg \neg p}{\square p} \ _{dn_2} $$ } After simplifications, the rules $r_{1}$--$r_{3}$, $k$, $k_1$--$k_2$, $m_1$--$m_4$ correspond to $R_\to$, $r_{4}$--$r_{5}$ and $dn_1$--$dn_2$ to $R_\neg$, and $T$ to $R_\square$. It is interesting to note that rules $r_{1}$--$r_{5}$ characterize classical logic, and the remaining rules are in a one-to-one correspondence with the axioms considered (see~\cite{coniglioswap}). The only less obvious case is the rule $k_2$. For this reason we present below an analytic proof of the corresponding axiom $K_2=\neg\square\neg(p\to q)\to(\square p\to\neg\square\neg q)$, i.e., $\der_R K_2$. Note that $K_2$ is obtained in all the branches of the proof-tree, except for the leftmost one, which is discontinued due to rule $r_4$ (as signaled by the use of $\ast$). \begin{center} \scalebox{.85}{ \frame{\begin{tikzpicture} \tikzset{level distance=49pt} \tikzset{sibling distance=5pt} \Tree[. $\emptyset$ \edge node[auto=right] {$_{r_1}$}; [.$\neg\square\neg (p\to q)$ \edge node[auto=right] {$_{r_1}$}; [.$\square p$ \edge node[auto=right] {$_{r_5}$}; [.$\square \neg q$ \edge node[auto=right] {$_{k_2}$}; [.$\square\neg (p\to q)$ \edge node[auto=right] {$_{r_4}$}; $\ast$ ] ] [.$\neg \square \neg q$ \edge node[auto=right] {$_{r_3}$}; [.$\square p\to\neg \square\neg q$ \edge node[auto=right] {$_{r_3}$}; $K_2$ ] ] ] [.$\square p\to\neg \square\neg q$ \edge node[auto=right] {$_{r_3}$}; $K_2$ ] ] [.$K_2$ ] ] \end{tikzpicture}} } \end{center} \hfill$\triangle$ \end{bla6} \begin{bla7}\em In Example~\ref{L53} we have obtained the usual three-valued {\L}ukasiewicz's matrix (by strengthening the five-valued {\L}ukasiewicz logic with an additional axiom). Easily, ${\mathcal S}=\{p,\neg p\}$ is a set of monadic separators, yielding the discriminator $\widetilde{\mathcal{S}}$ with $\widetilde{\mathcal{S}}_{0}=\widetilde{\mathcal{S}}_{\frac{1}{2}}=\{p,\neg p\}$, and $\widetilde{\mathcal{S}}_{1}=\{p\}$, which gives rise to the following partitions. \begin{center} \begin{tabular}{c|c|c} $x$ & $\Omega_x$ & $\mho_x$ \\ \hline $0$ & $\{\neg p\}$ & $\{p\}$ \\ $\frac{1}{2}$ & $\emptyset$ & $\{p,\neg p\}$ \\ $1$ & $\{p\}$ & $\emptyset$ \end{tabular} \end{center} Using Theorem~\ref{analyticity}, the following rules constitute an ${\mathcal S}$-analytic calculus $R$ for $\mathcal{L}_3$. $$ \frac{p\,,\, \neg p}{}\ _{r_1} \qquad\frac{p}{ \neg \neg p}\ _{r_2} \qquad \quad \frac{ \neg \neg p}{p}\ _{r_3} $$ $$\frac{}{p\,,\,p\to q\,,\,\neg q}\ _{r_4}\qquad\quad \frac{p\,,\,p\to q}{q}\ _{r_{5}}\qquad \frac{q}{p\to q}\ _{r_{6}}$$ $$ \frac{ \neg p}{p\to q}\ _{r_7} \qquad \quad \frac{\neg q \,,\, p\to q }{\neg p }\ _{r_8} $$ $$ \frac{ \neg (p\to q)}{p}\ _{r_9} \qquad \quad \frac{ \neg (p\to q)}{\neg q}\ _{r_{10}} \qquad \quad \frac{p\,,\,\neg q}{ \neg (p\to q)}\ _{r_{11}} $$ After simplifications, the rules $r_{1}$--$r_{3}$ correspond to $R_\neg$, and $r_{4}$--$r_{11}$ to $R_\to$. For illustration, we depict an analytic proof of the added axiom $A=((p \to \neg p) \to p) \to p)$, i.e., $\der_R A$.\\ \begin{center} \scalebox{.85}{ \frame{\begin{tikzpicture} \tikzset{level distance=49pt} \tikzset{sibling distance=5pt} \Tree[. $\emptyset$ \edge node[auto=right] {$_{r_4}$}; [.$(p\to \neg p)\to p$ \edge node[auto=right] {$_{r_4}$}; [.$p$ \edge node[auto=right] {$_{r_6}$}; $A$ ] [.$p\to \neg p$ \edge node[auto=right] {$_{r_5}$}; [.$p$ \edge node[auto=right] {$_{r_6}$}; $A$ ] ] [.$\neg \neg p$ \edge node[auto=right] {$_{r_3}$}; [.$p$ \edge node[auto=right] {$_{r_6}$}; $A$ ] ] ] [.$A$ ] [.$\neg p$ \edge node[auto=right] {$_{r_{6}}$}; [.$p\to \neg p$ \edge node[auto=right] {$_{r_{11}}$}; [.$\neg((p\to \neg p)\to p)$ \edge node[auto=right] {$_{r_7}$}; $A$ ] ] ] ] \end{tikzpicture}} } \end{center} \hfill$\triangle$ \end{bla7} \section{Concluding remarks}\label{sec6} In this paper we have shown that rexpansions of (P)(N)matrices are a universal tool for explaining the strengthening of logics with additional axioms. This does not come as a surprise, as non-determinism and partiality are well known for enabling a plethora of compositionality results in logic. Our general method in Theorem~\ref{flat} is not effective, but it still brings about some interesting phenomena, such as the possibility of building a denumerable semantics for intuitionistic propositional logic (where the precise roles of non-determinism and partiality need further clarification). More practical, though, is our less general method in Theorem~\ref{theconstruction} as, despite the necessary restrictions on its scope, it brings about an effective method for producing finite semantic characterizations whenever starting from a finite basis. Our results cover a myriad of examples in the literature, namely those motivated by the study of logics of formal inconsistency, which played an important role in the work of Arnon Avron. Besides, our effective method, while more general and incremental, is fully inspired by the fundamental ideas in~\cite{taming}. It is also worth noting that our results apply not just to the Tarskian notion of consequence relation, but also to the multiple-conclusion case. An obvious topic for further work is to provide a usable tool implementing these methods. Other opportunities for further research, aimed at generalizing the results presented, would be to find more general syntactic conditions on the set of allowed axioms. For instance, the number of sentential variables occurring in an axiom seems to be easy to flexibilize by artificially extending the logic with big-arity connectives. Beyond axioms, one could think even further away, and consider strengthening logics with fully-fledged inference rules. In any case, such extensions will expectedly need more sophisticated techniques than the simple idea behind \emph{look-aheads}. These results reinforce the need to better understand the conditions under which two (P)(N)matrices characterize the same logic. This is by no means a trivial question, but we believe that the notion of rexpansion can be a useful tool in that direction.\smallskip If not for its own sake, this line of research aimed at providing effective semantic characterizations for combined logics is quite well justified by another recurring goal of many of the papers that inspired us: ultimately obtaining suitably analytic calculi for the resulting logics. \bibliographystyle{plain}
\section{Introduction} Lexical inference (LI) denotes the task of deciding whether or not an entailment relation holds between two lexical items. It is therefore related to the detection of other lexical relations like hyponymy between nouns \citep{hearst-1992-automatic}, e.g., \entails{dog}{animal}, or troponymy between verbs \citep{fellbaum90}, e.g., \entails{to traipse}{to walk}. Lexical inference in context (LIiC) adds the problem of disambiguating the pair of lexical items in a given context before reasoning about the inference question. This type of LI is particularly interesting for entailments between verbs and verbal expressions because their meaning -- and therefore their implications -- can drastically change with different arguments. Consider, e.g., \entails{run}{lead} in a \type{person} / \type{company} context (``Bezos runs Amazon'') vs.\ \entails{run}{execute} in a \type{computer} / \type{software} context (``My mac runs macOS''). LIiC is thus also closely related to the task of natural language inference (NLI) -- also called recognizing textual entailment \citep{dagan13} -- and can be seen as a focused variant of it. Besides the important use case of evaluating NLI systems, this kind of predicate entailment has also been shown useful for question answering \citep{schoenmackers-etal-2010-learning}, event coreference \citep{shwartz-etal-2017-acquiring,meged20}, and link prediction in knowledge graphs \citep{hosseini-etal-2019-duality}. Despite its NLI nature, previous systems for LIiC have primarily been models of lexical similarity \citep{levy-dagan-2016-annotating} or models based on verb argument inclusion \citep{hosseini-etal-2019-duality}. The reason is probably that supervised NLI models need large amounts of training data, which is unavailable for LIiC, and that systems trained on available large-scale NLI benchmarks \citep[e.g.,][]{williams-etal-2018-broad} have been reported to insufficiently cover lexical phenomena \citep{glockner-etal-2018-breaking,schmitt-schutze-2019-sherliic}. Recently, transfer learning has become ubiquitous in NLP; Transformer \citep{vaswani17} language models (LMs) pretrained on large amounts of textual data \citep{devlin19,liu19} form the basis of a lot of current state-of-the-art models. Besides zero- and few-shot capabilities \citep{radford19,brown20}, pretrained LMs have also been found to acquire factual and relational knowledge during pretraining \citep{petroni-etal-2019-language,bouraoui20}. The entailment relation certainly stands out among previously explored semantic relations -- such as the relation between a country and its capital -- because it is very rarely stated explicitly and often involves reasoning about both the meaning of verbs and additional knowledge \citep{schmitt-schutze-2019-sherliic}. It is unclear whether implicit clues during pretraining are enough to learn about LIiC and what the best way is to harness any such implicit knowledge. Regarding these questions, we make the following contributions: \begin{enumerate*}[label=(\arabic*)] \item This work is the first to explore the use of pretrained LMs for the LIiC task. \item We formulate three approaches and evaluate them using the publicly available pretrained RoBERTa LM \citep{liu19,huggingface}: \begin{enumerate*}[label=(\roman*)] \item a few-shot NLI classifier, \item a relation induction approach based on handcrafted patterns expressing the semantics of lexical inference, and \item a variant of (ii) with patterns that were automatically extracted from a corpus. \end{enumerate*} \item We introduce the concept of antipatterns, patterns that express non-entailment, and evaluate their usefulness for LIiC. \item In our experiments on two established LIiC benchmarks, Levy/Holt's dataset \citep{levy-dagan-2016-annotating,holt18} and SherLIiC \citep{schmitt-schutze-2019-sherliic}, all our approaches consistently outperform previous work, thus setting a new state of the art for LIiC. \item In contrast to previous work on relation induction \citep{bouraoui20}, automatically retrieved patterns do not outperform handcrafted ones for LIiC. A qualitative analysis of patterns and errors identifies possible reasons for this finding. \end{enumerate*} \section{Related Work} \para{Lexical inference} There has been a lot of work on lexical inference for nouns, notably hypernymy detection, resulting in a variety of benchmarks \citep{kotlerman10,kiela-etal-2015-exploiting} and methods \citep{shwartz-etal-2015-learning,vulic-mrksic-2018-specialising}. Although there has been work on predicate entailment before \citep{lin01,lewis-steedman-2013-combined}, \citet{levy-dagan-2016-annotating} were the first to create a general benchmark for evaluating entailment between verbs. In their evaluation, neither resource-based approaches \citep{pavlick-etal-2015-ppdb,berant-etal-2011-global} nor vector space models \citep{levy-goldberg-2014-dependency} achieved satisfying results. \citet{holt18} later published a re-annotated version, which was readily adopted by later work. \citet{hosseini-etal-2018-learning} put global constraints on top of directed local similarity scores \citep{weeds-weir-2003-general,lin-1998-automatic-retrieval,szpektor-dagan-2008-learning} based on distributional features of the predicates. \citet{hosseini-etal-2019-duality} replaced these scores by transition probabilities in a bipartite graph where edge weights are computed by a link prediction model. When \citet{schmitt-schutze-2019-sherliic} created the SherLIiC benchmark, they also mainly focused on resource- and vector-based models for evaluation. Their best model combines general-purpose word2vec representations \citep{mikolov13} with a vector representation of the arguments that co-occur with a predicate. All these works \begin{enumerate*}[label=(\roman*)] \item base the probability of entailment validity on the similarity of the verbs and \item compute this similarity via (expected) co-occurrence of verbs and their arguments. \end{enumerate*} Our work differs in that our models solely reason about the sentence surface in an end-to-end NLI task without access to previously observed argument pairs. This is possible because our models have learned about these surface forms during pretraining. \para{Patterns and entailment} Pattern-based approaches have long been known for hypernymy detection \citep{hearst-1992-automatic}. Recent work combined them with vector space models \citep{mirkin-etal-2006-integrating,roller-erk-2016-relations,roller-etal-2018-hearst}. While there are effective patterns, such as \textit{$X$ is a $Y$}, that are indicative for entailment between nouns, there is little work on comparable patterns for verbs. \citet{schwartz-etal-2015-symmetric} mine symmetric patterns for lexical similarity and achieve good results for verbs. Entailment, however, is not symmetric. \citet{chklovski-pantel-2004-verbocean} handcrafted 35 patterns to distinguish 6 semantic relations for pairs of distributionally similar verbs. Some of their classes like strength (\textit{taint :: poison}) or antonymy (\textit{ban :: allow}) can be indicators of entailment and non-entailment but are, in general, much more narrowly defined than the patterns we use in our approach. Another difference to our work is that verb pairs are scored based on co-occurrence counts on the web, while we employ an LM, which does not depend on a valid entailment pair actually appearing together in a document. \para{Patterns and language models} \citet{amrami-goldberg-2018-word} were the first to manipulate LM predictions with a simple pattern to enhance the quality of substitute words in a given context for word sense induction. \citet{petroni-etal-2019-language} found that large pretrained LMs can be queried for factual knowledge, when presented with appropriate pattern-generated cloze-style sentences. This zero-shot factual knowledge has later been shown to be quite fragile \citep{kassner-schutze-2020-negated}. So we rather focus on approaches that fine-tune an LM on at least a few samples. \citet{forbes19} train a binary classifier on top of a fine-tuned BERT \citep{devlin19} to predict the truth value of handwritten statements about objects and their properties. While their experiments investigate BERT's physical common sense reasoning, we focus on the different phenomenon of entailment between two actions expressed by verbs in context. \citet{schick20a} used handcrafted patterns and LMs for few-shot text classification. Based on manually defined label-token correspondences, the predicted classification label is determined by the token an LM estimates as most probable at a masked position in the cloze-style pattern. We differentiate entailment and non-entailment via compatibility scores for patterns and antipatterns and not via different predicted tokens. Addressing relation induction, \citet{bouraoui20} propose an automatic way of finding, given a relation, LM patterns that are likely to express it. They train a binary classifier per relation on the sentences generated by these patterns. While some of the relations they consider are related to verbal entailment (e.g., \textit{cook activity-goal eat}), most of them concern common sense (e.g., \textit{library location-activity reading}) or encyclopedic knowledge (e.g., \textit{Paris capital-of France}). We adapt their method for the automatic retrieval of promising patterns for LIiC, but find that handcrafted patterns that capture the generality of the entailment relation still have an advantage over automatic patterns for LIiC. Another important novelty we introduce is the use of antipatterns. While \citet{bouraoui20} have to use negative samples for training their classifiers, they only consider patterns that exemplify the desired relation. In contrast, we also use antipatterns that exemplify what the entailment relation is \textbf{not}. We believe that antipatterns are particularly useful for entailment detection because they can help identify other kinds of semantic relations that often pose a challenge to vector space models \citep{levy-dagan-2016-annotating,schmitt-schutze-2019-sherliic}. \section{Proposed Approaches} \subsection{NLI classifier} Building an NLI classifier on top of a pretrained LM usually means taking an aggregate sequence representation of the concatenated premise and hypothesis as input features of a neural network classifier \citep{devlin-etal-2019-bert}. For RoBERTa \citep{liu19}, this representation is the final hidden state of a special $\spectok{s}$ token that is prepended to the input sentences, which in turn are separated by a separator token $\spectok{/s}$. Let $\Lambda$ be the function that maps such an input $x = x_1 \spectok{/s} x_2$ to the aggregate representation $\Lambda(x) \in \mathds{R}} % {{\rm I\!R}^d$. Following \citep{devlin-etal-2019-bert,liu19}, we then feed these features to a 2-layer feed-forward neural network with tanh activation: \begin{align} \label{eq:nli_prob} \begin{split} h(x) &= \mathrm{tanh}(\mathrm{drop}(\Lambda(x)) W_1 + b_1)\\ P_{\textsc{nli}}(y \mid x) &= \sigma(\mathrm{drop}(h(x)) W_2 + b_2) \end{split} \end{align} where $\mathrm{drop}$ applies dropout with a probability of $0.1$, $\sigma$ is the softmax function, and $W_1 \in \mathds{R}} % {{\rm I\!R}^{d\times d}, W_2 \in \mathds{R}} % {{\rm I\!R}^{d\times 2}, b_1\in\mathds{R}} % {{\rm I\!R}^d, b_2\in\mathds{R}} % {{\rm I\!R}^2$ are learnable parameters. Note that $W_1$ and $b_1$ are still part of the LM's pretrained parameters; so we only train $W_2$ and $b_2$ from scratch.\footnote{We follow the official implementation; cf.\ Jacob Devlin's comment on issue 43 in the BERT GitHub repository, \url{https://github.com/google-research/bert/issues/43}, (accessed 19 January 2021).} The actual classification decision uses a threshold $\vartheta$: \begin{equation*} D_{\textsc{nli}}^\vartheta(x_1, x_2) = \begin{cases} 1, & \text{if $P_{\textsc{nli}}(y=1\,|\,x_1, x_2) > \vartheta$}\\ 0, & \text{otherwise} \end{cases} \end{equation*} The traditional choice for the threshold is $\vartheta = 0.5$ because that means $D_{\textsc{nli}}^\vartheta(x_1, x_2) = 1$ iff $P_{\textsc{nli}}(y=1 \mid x_1, x_2) > P_{\textsc{nli}}(y=0 \mid x_1, x_2)$. We nevertheless keep $\vartheta$ as a hyperparameter to be tuned on held-out development data. We train the \textsc{nli} approach by minimizing the negative log-likelihood $\mathcal{L}_{\textsc{nli}}$ of the training data $\mathcal{T}$: \begin{equation*} \mathcal{L}_{\textsc{nli}}(\mathcal{T}) = \sum_{(x_1, x_2, y)\in\mathcal{T}} -\log(P_{\textsc{nli}}(y \mid x_1, x_2)) \end{equation*} \subsection{Pattern-based classifier} This approach puts the input sentences $x_1, x_2$ together in a pattern-based textual context and trains a classifier to distinguish between felicitous and infelicitous utterances.\footnote{\citet{bouraoui20} called this natural vs.\ unusual.} In contrast to previous approaches \citep{forbes19,bouraoui20}, we also consider antipatterns that exemplify what kind of semantic relatedness we are not interested in, and combine probabilities for patterns and antipatterns in the final classification. \para{Finding suitable patterns} A simple handcrafted pattern to check for the validity of an inference $x_1\Rightarrow x_2$ is ``$x_2$ \textit{because} $x_1$.''. An analoguos antipattern is ``\textit{It is not sure that} $x_2$ \textit{just because} $x_1$.''. Based on similar considerations, we manually design 5 patterns and 5 antipatterns (see \cref{tab:pattern_comparison}). We will refer to the approach using these handcrafted patterns as \textsc{manpat}. \citet{bouraoui20} argue that text produced by simple, handcrafted patterns is artificial and therefore suboptimal for LMs pretrained on naturally occurring text. To adapt their setup to verbal expressions used in LIiC, we identify suitable patterns (antipatterns) by searching a large text corpus\footnote{We use the Wikipedia dump from Jan 15th 2011.} for sentences that contain both elements of valid (invalid) entailment pairs. In a second step, we score each of these patterns (antipatterns) according to the number of valid (invalid) entailment pairs $x_1, x_2$ that can be found by querying an LM for the $k$ most probable completions when $x_1$ or $x_2$ is inserted in the pattern and its counterpart is masked. For example, consider the entailment pair \entails{rule}{control} and the pattern ``\textit{Catchers \textbf{prem} the field; they \textbf{hypo} the plays and tell everyone where to be.}'' extracted from a description of softball. Predicting \textit{rule} from ``\textit{Catchers $\spectok{mask}$ the field; they control the plays and tell everyone where to be.}'' and predicting \textit{control} from ``\textit{Catchers rule the field; they $\spectok{mask}$ the plays and tell everyone where to be.}'' would result in one point each. Approaches called \textsc{autpat}\textsubscript{$n$} use the $n$ patterns with the most points obtained in that manner. See \cref{sec:experiments} for more details on our experimental setup. \para{Pattern-based predictions} The probability $P_{\textsc{fel}}(z \mid x)$ of sentence $x$ to be felicitous ($z\!=\!1$) or infelicitous ($z\!=\!0$) is estimated like $P_{\textsc{nli}}$ in \cref{eq:nli_prob}, except that $x$ is not the concatenation of two sentences but a single pattern-generated utterance. Given a set of patterns $\Phi$ and a set of antipatterns $\apat$, the score $s$ to judge an input $x_1, x_2$ is the difference between the maximum probability $m_{\mathrm{pos}}$ that any pattern forms a felicitous statement and the maximum probability $m_{\mathrm{neg}}$ that any antipattern forms a felicitous statement: \begin{align*} m_{\mathrm{pos}} = \max_{\varphi\in\Phi} P_{\textsc{fel}}(z = 1 \mid \varphi(x_1, x_2)) \\ m_{\mathrm{neg}} = \max_{\psi\in\apat} P_{\textsc{fel}}(z = 1 \mid \psi(x_1, x_2)) \\ s(x_1, x_2) = m_{\mathrm{pos}} - m_{\mathrm{neg}} \end{align*} As in \textsc{nli}, the final decision uses a threshold $\vartheta$: \begin{equation*} D_{\textsc{pat}}^\vartheta(x_1, x_2) = \begin{cases} 1, & \text{if $s(x_1, x_2) > \vartheta$}\\ 0, & \text{otherwise} \end{cases} \end{equation*} This corresponds to requiring that $m_{\mathrm{pos}}$ be higher than $m_{\mathrm{neg}}$ by a margin $\vartheta$, i.e., $D_{\textsc{pat}}^\vartheta(x_1, x_2) = 1$ iff $m_{\mathrm{pos}} > m_{\mathrm{neg}} + \vartheta$. As \citet{bouraoui20} did not use antipatterns, they defined $m_{\mathrm{neg}}$ as the maximum probability for any pattern to form an infelicitous statement. To estimate the usefulness of antipatterns, we evaluate both possibilities, marking systems that use both patterns and antipatterns with ${\Phi\apat}$ and those that only use patterns with ${\Phi}$. The use of a threshold is another novel component, i.e., \citet{bouraoui20} virtually set $\vartheta=0$. We discuss the influence of $\vartheta$ in \cref{sec:results}. We train all pattern-based approaches by minimizing the negative log-likelihood $\mathcal{L}_{\textsc{pat}}$ that patterns $\Phi$ produce felicitous statements for valid entailments ($y=1$) and infelicitous statements for invalid entailments ($y=0$) from the training data $\mathcal{T}$, and vice versa for antipatterns $\Psi$: \begin{align*} \begin{split} &\mathcal{L}_{\textsc{pat}}(\mathcal{T}, \Phi, \apat) =\\ &\quad \sum_{(x_1, x_2, y)\in\mathcal{T}} \mathcal{L}_{\Phi}(x_1, x_2, y) + \mathcal{L}_{\apat}(x_1, x_2, 1-y) \end{split} \end{align*} with \begin{align*} \begin{split} &\mathcal{L}_{\Omega}(x_1, x_2, y) =\\ &\quad -\frac{1}{\abs{\Omega}}\sum_{\omega\in \Omega}\log(P_{\textsc{fel}}(z = y \mid \omega(x_1, x_2))) \end{split} \end{align*} \section{Experiments} \label{sec:experiments} \begin{table} \centering \begin{tabular}{llrr} \toprule && Levy/Holt & SherLIiC \\ \midrule \multicolumn{1}{l|}{\multirow{2}{*}{\dev{1}}}&train & 4,388 & 797 \\ \multicolumn{1}{l|}{}&\dev{2} & 1,098 & 201 \\ \midrule \multicolumn{2}{c}{test} & 12,921 & 2,990 \\ \bottomrule \end{tabular} \caption{Data split sizes as used in our experiments.} \label{tab:data} \end{table} We evaluate on two benchmarks: \begin{enumerate*}[label=(\roman*)] \item Levy/Holt's dataset \citep{levy-dagan-2016-annotating,holt18} and \item SherLIiC \citep{schmitt-schutze-2019-sherliic}. \end{enumerate*} For both filtering and classification, we employ RoBERTa-base \citep{liu19}. For classification only, we also report results for RoBERTa-large. \begin{figure*}[ht] \centering \begin{subfigure}[b]{\linewidth} \centering \includegraphics[height=14em]{levy-holt_cropped.pdf} \caption{Levy/Holt \dev{2} RoBERTa-base} \label{fig:val_perf_levy_holt} \end{subfigure} \begin{subfigure}[b]{\linewidth} \centering \includegraphics[height=14em]{sherliic_cropped.pdf} \caption{SherLIiC \dev{2} RoBERTa-base} \label{fig:val_perf_sherliic} \end{subfigure} \caption{Validation performance distribution of different datasets across different hyperparameter runs (left) and expected validation performance per number of tested hyperparameter configurations as proposed by \citet{dodge-etal-2019-show} (right). Performance is measured as the area under the precision-recall curve for precision values${}\geq 0.5$. The Boxes represent 75\%{} of the respective data points; a black line indicates the median, whiskers extend to the maximum value.} \label{fig:violin_val_perf} \end{figure*} \subsection{Data processing} For both datasets, previous work has established a dev/test split. For Levy/Holt, it was defined in \citep{hosseini-etal-2018-learning}; for SherLIiC, we use the original one from \citep{schmitt-schutze-2019-sherliic}. For comparison with previous work, we keep the test portion as is and split the dev portion further into 80\%{} for training and 20\%{} for development. We call the new, smaller dev sets \dev{2} and the original dev sets \dev{1}. See \cref{tab:data} for data split sizes. \para{Levy/Holt.} An instance in Levy/Holt has two sentences, each consisting of two shared noun phrases (the arguments) and a verbal expression, in which the two sentences differ. As the verbal expressions can contain auxiliaries or negation, they often consist of multiple tokens. Originally, one argument is replaced with a WordNet \citep{miller95} type in one of the sentences to make the entailment more general during annotation, but we use a version of the dataset provided by \citet{hosseini-etal-2019-duality} where both sentences have concretely instantiated arguments. For example, consider \cref{tab:error_analysis} (c). \emph{Athena} was masked as the WordNet synset \emph{deity} during benchmark annotation but we use the original sentences as shown in \cref{tab:error_analysis} for all classifiers without further modification. For the automatic pattern search in \textsc{autpat}, we look for sentences that mention verbatim the two verbal expressions of any instance from \dev{1}. For the ranking, we take the last token of a verbal expression as representative for the whole. This has the advantage that we can query the LM with a single $\spectok{mask}$ token and compare a single token to the $k=100$ most probable predictions. We take the last token because it usually is the main verb. \para{SherLIiC.} For classification, we use SherLIiC's automatically generated sentences that were used for annotation during benchmark creation. The arguments in SherLIiC are entity types from Freebase \citep{bollacker08}. As such, they can be replaced by any Freebase entity with matching type. For example, consider \cref{tab:error_analysis} (a); the arguments \emph{Germany} and \emph{Côte d'Ivoire} were originally masked as \emph{location[A]} and \emph{location[B]} during annotation, but annotators also saw three randomly chosen instantiations for both \emph{A} (\emph{Germany / Syria / USA}) and \emph{B} (\emph{Côte d'Ivoire / UK / Italy}) for context. From the three examples provided in SherLIiC for each argument, we choose the first one to form sentences with concretely instantiated arguments. For the automatic pattern search in \textsc{autpat}, we make use of the greater flexibility offered by the lemmatized representations in SherLIiC. As we are interested in statements that can be made in any way in a text, we search for sentences that mention the two predicates of a SherLIiC \dev{1} instance in any inflected form. For the ranking, we again consider the predicate representative for the whole verbal expression. We thus use the predicate lemma and otherwise proceed as described above. \subsection{Training details} We train all our classifiers for 5 epochs with Adam \citep{kingma15} and a mini-batch size of 10 (resp.\ 2) for RoBERTa-base (resp. -large). We randomly sample 500 configurations for the remaining hyperparameters (see \cref{app:hparam}). For a fair comparison, we evaluate all our approaches with the same configurations. \begin{table}[t] \centering \small \begin{tabular}{l@{\, }lrrrr} \toprule && \textsc{auc} & P & R & F1 \\ \midrule \multicolumn{6}{l}{{\tiny baselines}}\\ \multicolumn{2}{l}{\citet{hosseini-etal-2018-learning}} & 16.5 & -- & -- & -- \\ \multicolumn{2}{l}{\citet{hosseini-etal-2019-duality}} & \textbf{18.7} & -- & -- & -- \\ \midrule \multicolumn{6}{l}{{\tiny RoBERTa-base}}\\ \textsc{nli} & {\tiny ($\vartheta=\phantom{-}0.0052$)} & 72.6 & 68.7 & \textbf{75.3} & 71.9 \\ $\textsc{manpat}^{\Phi\apat}$ & {\tiny ($\vartheta = -0.0909$)} & \textbf{76.9} & \textbf{78.7} & 66.4 & \textbf{72.0} \\ $\textsc{manpat}^{\Phi}$ & {\tiny ($\vartheta = \phantom{-}0.5793$)} & 71.2 & 74.4 & 61.2 & 67.1 \\ $\textsc{autpat}_{5}^{\Phi\apat}$ & {\tiny ($\vartheta=-0.1428$)} & 63.7 & 71.0 & 58.8 & 64.3 \\ $\textsc{autpat}_{5}^{\Phi}$ & {\tiny ($\vartheta = -0.0592$)} & 65.4 & 68.0 & 63.3 & 65.5 \\ \midrule \multicolumn{6}{l}{{\tiny RoBERTa-large}}\\ \textsc{nli} & {\tiny ($\vartheta=\phantom{-}0.0016$)} & 75.5 & 73.5 & 73.7 & 73.6\\ $\textsc{manpat}^{\Phi\apat}$ & {\tiny ($\vartheta=\phantom{-}0.1156$)} & \textbf{83.9} & \textbf{84.8} & 70.1 & \textbf{76.7} \\ $\textsc{manpat}^{\Phi}$ & {\tiny ($\vartheta=-0.8457$)} & 77.8 & 67.9 & \textbf{81.5} & 74.1 \\ $\textsc{autpat}_{5}^{\Phi\apat}$ & {\tiny ($\vartheta=-0.0021$)} & 70.4 & 75.7 & 60.7 & 67.4 \\ $\textsc{autpat}_{5}^{\Phi}$ & {\tiny ($\vartheta=-0.9197$)} & 66.5 & 61.8 & 74.4 & 67.5 \\ \bottomrule \end{tabular} \caption{Levy/Holt test. \textsc{auc} denotes the area under the precision-recall curve for precision${}\geq0.5$. All results in \%{}. Bold means best result per column and block.} \label{tab:levyholt} \end{table} \begin{table}[t] \centering \small \begin{tabular}{l@{\, }lrrrr} \toprule && \textsc{auc} & P & R & F\textsubscript{1} \\ \midrule \multicolumn{6}{l}{\tiny baselines}\\ \multicolumn{2}{l}{Lemma} & -- & \textbf{90.7} & 8.9 & 16.1 \\ \multicolumn{2}{l}{w2v+untyped\_{}rel} & -- & 52.8 & 69.5 & 60.0 \\ \multicolumn{2}{l}{w2v+tsg\_rel\_emb} & -- & 51.8 & \textbf{72.7} & \textbf{60.5} \\ \midrule \multicolumn{6}{l}{\tiny RoBERTa-base}\\ \textsc{nli} & {\tiny ($\vartheta = \phantom{-}0.3878$)} & 65.8 & \textbf{67.0} & 66.1 & 66.5 \\ $\textsc{manpat}^{\Phi\apat}$ & {\tiny ($\vartheta = -0.3324$)} & 66.4 & 60.9 & 78.8 & 68.7 \\ $\textsc{manpat}^\Phi$ & {\tiny ($\vartheta = -0.4812$)} & \textbf{69.2} & 62.0 & \textbf{81.2} & \textbf{70.3} \\ $\textsc{autpat}_{5}^{\Phi\apat}$ & {\tiny ($\vartheta = -0.4694$)} & 67.4 & 61.8 & 75.6 & 68.0 \\ $\textsc{autpat}_{5}^{\Phi}$ & {\tiny ($\vartheta = -0.7042$)} & 67.3 & 56.6 & 82.6 & 67.2 \\ \midrule $\textsc{autcur}_{5}^{\Phi}$ & {\tiny ($\vartheta = -0.7524$)} & \textbf{69.5} & 56.3 & \textbf{89.6} & \textbf{69.2} \\ $\textsc{autarg}_{5}^{\Phi}$ & {\tiny ($\vartheta = -0.7461$)} & 65.2 & \textbf{61.9} & 75.6 & 68.1 \\ \midrule \multicolumn{6}{l}{\tiny RoBERTa-large}\\ \textsc{nli} & {\tiny ($\vartheta = \phantom{-}0.0025$)} & 68.3 & 60.5 & \textbf{85.5} & 70.9 \\ $\textsc{manpat}^{\Phi\apat}$ & {\tiny ($\vartheta = -0.0956$)} & \textbf{74.4} & \textbf{66.0} & 80.8 & \textbf{72.6} \\ $\textsc{manpat}^{\Phi}$ & {\tiny ($\vartheta = -0.6641$)} & 64.6 & 58.1 & 79.0 & 67.0 \\ $\textsc{autpat}_{5}^{\Phi\apat}$ & {\tiny ($\vartheta = -0.9889$)} & 68.6 & 61.9 & 75.5 & 68.0 \\ $\textsc{autpat}_{5}^{\Phi}$ & {\tiny ($\vartheta = -0.5355$)} &56.8 & 61.5 & 66.1 & 63.7 \\ \bottomrule \end{tabular} \caption{SherLIiC test. Baseline results from \citep{schmitt-schutze-2019-sherliic}. Table format: see \cref{tab:levyholt}.} \label{tab:sherliic} \end{table} \begin{table*}[t] \centering \small \begin{tabularx}{\linewidth}{cXll} \toprule \multicolumn{2}{l}{\textit{Automatically retrieved patterns (with SherLIiC \dev{1})}} & {prem} & {hypo} \\ \midrule rank 1 & In North America, where the "atypical" forms of community-\textbf{hypo} pneumonia are & acquired & acquired \\ & becoming more common, macrolides (such as azithromycin), and doxycycline have displaced amoxicillin as first-line outpatient treatment for community-\textbf{prem} pneumonia. && \\ rank 5 & This area now consists of \ldots{} the Yukon Territory (\textbf{prem} 1898) \ldots{} and Nunavut & created & created in \\ & (\textbf{hypo} 1999). & & \\ rank 12 & For example, \ldots{} 訪問 "\textbf{prem}" is composed of 訪 "to visit" and 問 "to \textbf{hypo}". & interview & ask \\ \midrule \multicolumn{2}{l}{\textit{Handcrafted patterns}} \\ \midrule (a) & \textsc{pargl} \textbf{prem} \textsc{pargr}, which means that \textsc{hargl} \textbf{hypo} \textsc{hargr}. \\ (b) & It is not the case that \textsc{hargl} \textbf{hypo} \textsc{hargr}, let alone that \textsc{pargl} \textbf{prem} \textsc{pargr}. \\ (c) & \textsc{hargl} \textbf{hypo} \textsc{hargr} because \textsc{pargl} \textbf{prem} \textsc{pargr}. \\ (d) & \textsc{pargl} \textbf{prem-negated} \textsc{pargr} because \textsc{hargl} \textbf{hypo-negated} \textsc{hargr}. \\ (e) & \textsc{hargl} \textbf{hypo-negated} \textsc{hargr}, which means that \textsc{pargl} \textbf{prem-negated} \textsc{pargr}. \\ \bottomrule \end{tabularx} \caption{Examples of automatically retrieved and ranked \textsc{autpat} patterns (top) and handcrafted \textsc{manpat} patterns (bottom). {prem}/{hypo} = original fillers as found in the corpus. \textsc{pargl}/\textsc{hargl} = placeholder for left argument of premise/hypothesis; \textsc{pargr}/\textsc{hargr} = right argument.} \label{tab:pattern_comparison} \end{table*} \section{Results and Discussion} \label{sec:results} \subsection{Hyperparameter robustness} Following previous work \citep{hosseini-etal-2018-learning,hosseini-etal-2019-duality}, we use the area under the precision-recall curve (\textsc{auc}) restricted to precision values${}\geq 0.5$ as criterion for model selection. \cref{fig:violin_val_perf} (left) shows the distribution of \dev{2} performance for 500 randomly sampled runs with RoBERTa-base. Most hyperparameters perform poorly, suggesting that hyperparameter search is crucial. For Levy/Holt, \textsc{nli} is strong whereas for SherLIiC handcrafted $\textsc{manpat}^{\Phi}$ patterns have a clearer advantage. For SherLIiC, the combination of automatically generated patterns and antipatterns $\textsc{autpat}_{5}^{\Phi\apat}$ exhibits the highest median performance and the second-highest upper quartile, making it together with $\textsc{manpat}^{\Phi}$ the most robust to different hyperparameters, although its top performance is lower compared to the others. For all methods, only very few hyperparameter sets achieve top performances. For both datasets, however, a well-performing configuration is found after fewer than 100 sampled runs (\cref{fig:violin_val_perf}, right). Considering that $\textsc{autpat}$ requires an LM to rank thousands of patterns, these results suggest that, for LIiC, available GPU hours should be spent on automatic hyperparameter rather than pattern search. With its manually written patterns, \textsc{manpat} does not need additional GPU hours for pattern search and still, on average, performs better. \subsection{Best hyperparameter configurations} For the best found configuration for each method, we not only report \textsc{auc}, which provides a general picture of a scoring method's precision-recall trade-off, but also the concrete precision, recall, and F1 for the actual classification after applying a threshold $\vartheta$. For this we tune $\vartheta$ on \dev{2} for optimal F1. \Cref{tab:levyholt,tab:sherliic} show the results. On both datasets, our methods outperform all previous work (sometimes by a large margin), thus establishing a new state of the art. For SherLIiC+RoBERTa-base, the strong but simple \textsc{nli} system is consistently outperformed by all pattern-based approaches, showing that well-chosen patterns and antipatterns can be helpful for LIiC. For SherLIiC+RoBERTa-large and also generally on Levy/Holt's dataset, \textsc{nli} is more competitive, but the combination of handcrafted patterns and antipatterns $\textsc{manpat}^{\Phi\apat}$ still performs better in these cases. The use of antipatterns does not consistently lead to better performance for all combinations of dataset, LM variant (base vs.\ large), and pattern set (\textsc{manpat} vs.\ \textsc{autpat}). They do, however, consistently bring gains for some combinations, e.g., \textsc{manpat} on Levy/Holt and \textsc{autpat} on SherLIiC. Moreover, antipatterns are essential for achieving top performance, i.e., the new state of the art, on both datasets. Most of the threshold values $\vartheta$ (tuned on \dev{2}) are far from their traditional values, $0.5$ for \textsc{nli} and $0.0$ for patterns. \textsc{nli} classifiers' probability estimates are often too confident, resulting in values close to $0$ and $1$. To ``correct'' cases where a very small value is assigned to a valid entailment, optimal thresholds are often close to $0$ instead of $0.5$. Analogously, most pattern-based approaches opt for a negative $\vartheta$, which means that instead of requiring a margin between $m_{\mathrm{pos}}$ and $m_{\mathrm{neg}}$ (boosting precision), they make more positive predictions and boost recall. Low recall is a key problem in LIiC (cf.\ \citet{levy-dagan-2016-annotating}). Tuning a threshold increases the models' flexibility in this aspect. \begin{table}[t] \centering \small \begin{tabular}{lrrrr} \toprule &\multicolumn{2}{c}{$\Phi\apat$}&\multicolumn{2}{c}{$\Phi$}\\ \cmidrule(lr){2-3}\cmidrule(lr){4-5} $n$ & \textsc{auc} & F1 & \textsc{auc} & F1\\ \midrule 5 & 67.4 & 68.0 & 67.3 & 67.2 \\ 15 & \textbf{70.0} & \textbf{68.7} & \textbf{73.1} & \textbf{69.4} \\ 25 & 63.5 & 67.3 & 69.0 & 68.7 \\ 50 & 66.3 & 65.6 & 67.4 & 67.6 \\ \bottomrule \end{tabular} \caption{RoBERTa-base+$\textsc{autpat}_{n}$ results on SherLIiC test for different $n$ values. Hyperparameters were tuned for the corresponding $\textsc{autpat}_{5}$ method on \dev{2}.} \label{tab:autpat_n_sherliic} \end{table} \section{Analysis} \subsection{Number of patterns} \label{sec:autpat_k} \cref{sec:results} shows that automatic patterns do not beat handcrafted patterns for LIiC. However, automatic patterns have one major advantage: in contrast to manual patterns, their number can be easily increased. We therefore investigate the impact of the hyperparameter $n$ for $\textsc{autpat}_{n}$. \cref{tab:autpat_n_sherliic} shows that too many patterns is as bad as too few. $\textsc{autpat}_{15}$ is the sweetspot: on SherLIiC, it outperforms all other RoBERTa-base methods on \textsc{auc} and closely approaches the otherwise best method $\textsc{manpat}^{\Phi}$ on F1. \subsection{Pattern analysis} \label{sec:pattern_analysis} Handcrafted patterns mostly outperform automatic ones (\cref{sec:results}). A larger number $n$ of patterns only has a small effect (\cref{sec:autpat_k}). We therefore take a closer look at automatic and manual patterns. \cref{tab:pattern_comparison} shows all handcrafted and a sample of highly ranked automatic patterns. It is striking how specific the automatically retrieved contexts are; especially for the highest ranks (exemplified by ranks 1 and 5) only a narrow set of verbs seems plausible from a human perspective. It is only at rank 12 that we find a more general context and it arguably even displays some semantic reasoning. There certainly are verbs that are not compatible with the meaning of \textit{visit}, but this context allows for a wide range of plausible verbs and even mentions composition of meaning. The handcrafted patterns, in contrast, all capture some general aspect of entailment, which might be the reason they generalize better. Moreover, they also have placeholder slots for the verb arguments, which could be an advantage as these represent a verb's original context. Only accepting corpus sentences in which the verbs occur with the same arguments as in the dataset is too restrictive. We therefore conduct the following experiment: We manually go through the 100 highest-ranked automatically created patterns and identify 5 contexts that could accommodate arguments without changing the overall sentence structure. We also try to pick patterns that are different enough from each other to avoid redundancy. As a baseline, the method $\textsc{autcur}_{5}^{\Phi}$ uses these manually curated patterns as is. We then rewrite the patterns such that they include placeholders for verb arguments, e.g., ``\textit{The original aim of de Garis' work was to \textbf{prem} the field of "brain building" (a term of his invention) and to "\textbf{hypo} a trillion dollar industry within 20 years".}'' becomes ``\textit{The original aim of their work was that "\textsc{pargl} \textbf{prem} \textsc{pargr}" and that "\textsc{hargl} \textbf{hypo} \textsc{hargr} within 20 years".}'' with \textsc{pargl} / \textsc{pargr} (\textsc{hargl} / \textsc{hargr}) the placeholder for the left / right argument of the premise (hypothesis). See \cref{tab:pattern_rewriting} in the appendix for the complete list. $\textsc{autarg}_{5}^{\Phi}$ is based on these rewritten patterns. We try the same 500 hyperparameter configurations as for the other RoBERTa-base approaches and include results for the best configuration (chosen on \dev{2}) in \cref{tab:sherliic}. We find that manually curating automatically ranked patterns helps performance. $\textsc{autcur}_{5}^{\Phi}$ outperforms $\textsc{autpat}_{5}^{\Phi}$ on \textsc{auc} and F1, reducing the gap to handcrafted patterns (i.e., $\textsc{manpat}^{\Phi}$). This is probably due to the variety we enforced when handpicking the patterns. Surprisingly, adding arguments decreases performance. Possibly, our modifications make the patterns less fluent or the arguments that are filled into the placeholders during training and evaluation do not fit well into the contexts, which still are rather specific. \begin{table}[t] \centering \small \begin{tabularx}{\linewidth}{lX} \toprule (a) & \textit{Germany is occupying Côte d'Ivoire} \\ & $\Rightarrow$ \textit{Germany is remaining in Côte d'Ivoire} \\ Sh & \predictions{1}{\wrong{0}}{\correct{1}}{\wrong{0}}{\correct{1}}{\correct{1}} \\ \midrule (b) & \textit{Ford awarded him the medal} \\ & $\Rightarrow$ \textit{Ford was awarded a medal} \\ L/H & \predictions{0}{\wrong{1}}{\correct{0}}{\correct{0}}{\wrong{1}}{\wrong{1}} \\ \midrule (c) & \textit{Athena was worshiped in Athens} \\ & $\Rightarrow$ \textit{Athena was the goddess of Athens} \\ L/H & \predictions{0}{\correct{0}}{\correct{0}}{\wrong{1}}{\wrong{1}}{\wrong{1}} \\ \midrule (d) & \textit{Pyrrhus was beaten by the romans} \\ & $\Rightarrow$ \textit{Pyrrhus fought the romans} \\ L/H & \predictions{1}{\correct{1}}{\wrong{0}}{\wrong{0}}{\wrong{0}}{\correct{1}} \\ \midrule\midrule (e) & \textit{England national rugby union team is playing against Denver Broncos} \\ & $\Rightarrow$ \textit{England national rugby union team is beating Denver Broncos} \\ Sh & \predictions{0}{\wrong{1}}{\wrong{1}}{\wrong{1}}{\wrong{1}}{\wrong{1}} \\ \midrule (f) & \textit{Polk negotiated with Britain} \\ & $\Rightarrow$ \textit{Polk made peace with Britain} \\ L/H & \predictions{0}{\wrong{1}}{\wrong{1}}{\wrong{1}}{\wrong{1}}{\wrong{1}} \\ \bottomrule \end{tabularx} \caption{Qualitative error analysis of the RoBERTa-base models from \cref{tab:levyholt,tab:sherliic} on the \dev{2} split of SherLIiC (Sh) and Levy/Holt (L/H). Pattern-based predictions are listed in the format $\Phi\apat$ / $\Phi$. Correct predictions are green; errors are underlined and red.} \label{tab:error_analysis} \end{table} \subsection{Error analysis} \label{sec:error_analysis} \Cref{tab:error_analysis} displays a selection of the \dev{2} sets of our two benchmarks along with the predictions of all our approaches. The first four examples indicate how \textsc{nli} differs from pattern approaches. Example (a) involves the common sense knowledge that occupying a territory implies remaining there. This might be learned from patterns more easily as these patterns might resemble contexts -- seen during pretraining -- that describe how long a military force remained during an occupation. Putting the inference candidate (b) into a pattern-generated context avoids being fooled by the high similarity of the two sentences. Only the handcrafted patterns can make sense of the important details in this construction. In contrast, (c) and (d) are difficult for our pattern approaches whereas \textsc{nli} gets them right. We hypothesize that the problem stems from linking the two sentences into one. An entailment pattern ideally represents a derivation of the hypothesis from the premise. One may wrongly conclude that (c) \textit{Athena was the goddess of Athens only because she was worshiped there}, by neglecting the possibility that there are others that are equally worshiped. In the same way, (d) is unlikely to be found in an argumentative text. While it is clear that there can be no beating without a fight, one would hardly argue that \textit{Pyrrhus fought the romans because they beat him}. This particular reasoning calls for additional explanations like \textit{Pyrrhus must have fought the romans because I know that they beat him}. This analysis serves as inspiration for further improvements of entailment patterns. The last two examples (e) and (f) are difficult for all approaches. It seems to be a particular challenge to identify open situations like a sports match or a negotiation where multiple outcomes are possible and distinguish them from cases where one particular outcome is inevitable. \section{Conclusion} We proposed and evaluated three approaches to the task of lexical inference in context (LIiC) based on pretrained language models (LMs). In particular, we found that putting an inference candidate into a pattern-generated context mostly increases performance compared to a standard sequence classification approach. Concrete performance, however, also depends on the particular dataset, used LM (variant), and pattern set. We introduced the concept of antipatterns, which express the negative class of a binary classification, and found that they often lead to performance gains for LIiC. We set a new state of the art for LIiC and conducted an extensive analysis of our approaches. Notably, we found that automatically created patterns can perform nearly as well as handcrafted ones if we either use the right number $n$ of patterns or manually identify the right subset of them. Promising directions for future work are the investigation of alternative automatic pattern generation methods or a better modeling of the remaining challenges we described in our error analysis (\cref{sec:error_analysis}). \section*{Acknowledgments} We gratefully acknowledge a Ph.D. scholarship awarded to the first author by the German Academic Scholarship Foundation (Studienstiftung des deutschen Volkes). This work was supported by the BMBF as part of the project MLWin (01IS18050). \section{Hyperparameters} \label{app:hparam} We train all our classifiers for 5 epochs with the Adam optimizer \citep{kingma15} and a mini-batch size of 10 or 2 instances for RoBERTa-base and -large, respectively. For \textsc{autpat}\textsubscript{$n$} approaches with $n > 5$, we distribute the available patterns and antipatterns into chunks of size 5 for training to save memory. During evaluation, the predictions are based on the all patterns and antipatterns. We randomly sample 500 configurations for the remaining hyperparameters, i.e., initial learning rate $\mathrm{lr}$, weight decay $\lambda$ (L2 regularization), and the number of batches $c$ the gradient is accumulated before each optimization step, which virtually increases the batch size by a factor of $c$. The hyperparameters are sampled from the following intervals: $\mathrm{lr}\in\interval{10^{-8}}{5\cdot 10^{-2}}$, $\lambda\in\interval{10^{-5}}{10^{-1}}$, $c\in\eset{1, 2, \dots, 10}$. $\mathrm{lr}$ and $\lambda$ are sampled uniformly in log-space. For a fair comparison, we use the same 500 random configurations for all of our approaches. As usual for Transformer models, we apply a learning rate schedule: $\mathrm{lr}$ decreases linearly such that it reaches $0$ at the end of the last epoch. We do not employ warm-up. The best configurations can be seen in \cref{tab:hparam_levyholt_base,tab:hparam_levyholt_large} for Levy/Holt's dataset and \cref{tab:hparam_sherliic_base,tab:hparam_sherliic_large} for SherLIiC. \section{Results on development sets} \label{sec:more_results} See \cref{tab:dev_sherliic,tab:dev_levyholt}. \section{Varying $n$ in training and evaluation} \label{sec:varying_n} Another approach to make use of different values of $n$ is to vary $n$ from training to evaluation. \Cref{fig:autpat_n_sherliic} is a visualization of the performance impact of this procedure. The base point for the visualization (in white) is the \textsc{auc} performance of $\textsc{autpat}_{5}^{\Phi}$. We see that training with $n=50$ almost always leads to a performance drop (marked in blue) w.r.t.\ this number. It seems generally to be catastrophic to evaluate a model with patterns that were not seen during training, indicating that there is no generalization from seen patterns to unseen patterns even if they were chosen by the same method and can thus be expected to be -- at least to some extent -- similar. In general, this evaluation suggests that modifying $n$ after the training always leads to a drop in performance. \section{Transfer between Datasets} \Cref{tab:transfer} shows results on the question how well a model trained on one dataset performs on the other. For this, we assume that the target dataset is not available at all, i.e., we do not use it at all -- neither for finding patterns in \textsc{autpat} nor for tuning the threshold $\vartheta$. We thus use the standard $\vartheta$ values, i.e., $0.5$ for \textsc{nli} and $0.0$ for the pattern-based methods. \begin{figure}[h!] \centering \includegraphics[width=\linewidth]{num_k_plot_cropped.pdf} \caption{RoBERTa-base+$\textsc{autpat}_{k}^{\Phi}$ performance on SherLIiC test for different $k$ values during training and evaluation. Same hyperparameters used for all models (as in \cref{tab:autpat_n_sherliic}). Blue marks drops, red marks gains in performance w.r.t.\ $\textsc{autpat}_{5}^{\Phi}$.} \label{fig:autpat_n_sherliic} \end{figure} \begin{table}[h!] \begin{subtable}{\linewidth} \centering \small \begin{tabular}{lrrrr} \toprule & \textsc{auc} & P & R & F\textsubscript{1} \\ \midrule \multicolumn{5}{l}{\tiny RoBERTa-base}\\ \textsc{nli} & 38.4 & 52.7 & 57.1 & \textbf{54.8} \\ $\textsc{manpat}^{\Phi\apat}$ & \textbf{46.1} & \textbf{64.0} & 45.4 & 53.1 \\ $\textsc{manpat}^\Phi$ & 32.4 & 32.4 & \textbf{94.5} & 48.2 \\ $\textsc{autpat}_{5}^{\Phi\apat}$ & 18.7 & 40.5 & 35.0 & 37.6 \\ $\textsc{autpat}_{5}^{\Phi}$ & 21.3 & 28.3 & 62.3 & 38.9 \\ \midrule \multicolumn{5}{l}{\tiny RoBERTa-large}\\ \textsc{nli} & 37.8 & 31.0 & 96.4 & 46.9 \\ $\textsc{manpat}^{\Phi\apat}$ & \textbf{70.4} & 39.6 & 95.3 & \textbf{56.0} \\ $\textsc{manpat}^{\Phi}$ & 38.9 & 25.6 & \textbf{98.3} & 40.6 \\ $\textsc{autpat}_{5}^{\Phi\apat}$ & 33.6 & \textbf{61.6} & 36.0 & 45.5 \\ $\textsc{autpat}_{5}^{\Phi}$ & 9.3 & 30.7 & 76.6 & 43.8 \\ \bottomrule \end{tabular} \caption{SherLIiC train $\rightarrow$ Levy/Holt test.} \label{tab:transfer1} \end{subtable} \begin{subtable}{\linewidth} \centering \small \begin{tabular}{lrrrr} \toprule & \textsc{auc} & P & R & F\textsubscript{1} \\ \midrule \multicolumn{5}{l}{\tiny RoBERTa-base}\\ \textsc{nli} & 63.3 & 62.8 & \textbf{68.4} & \textbf{65.5} \\ $\textsc{manpat}^{\Phi\apat}$ & \textbf{69.1} & \textbf{80.5} & 42.1 & 55.3 \\ $\textsc{manpat}^\Phi$ & 68.4 & 80.1 & 24.2 & 37.2 \\ $\textsc{autpat}_{5}^{\Phi\apat}$ & 60.3 & 71.5 & 54.5 & 61.9 \\ $\textsc{autpat}_{5}^{\Phi}$ & 58.9 & 68.6 & 55.7 & 61.5 \\ \midrule \multicolumn{5}{l}{\tiny RoBERTa-large}\\ \textsc{nli} & 65.6 & 73.8 & 53.0 & 61.7 \\ $\textsc{manpat}^{\Phi\apat}$ & 69.6 & 84.7 & 35.7 & 50.3 \\ $\textsc{manpat}^{\Phi}$ & \textbf{72.2} & \textbf{89.3} & 30.3 & 45.2 \\ $\textsc{autpat}_{5}^{\Phi\apat}$ & 62.1 & 68.1 & \textbf{57.3} & \textbf{62.3} \\ $\textsc{autpat}_{5}^{\Phi}$ & 63.8 & 75.8 & 44.2 & 55.8 \\ \bottomrule \end{tabular} \caption{Levy/Holt train $\rightarrow$ SherLIiC test.} \label{tab:transfer2} \end{subtable} \caption{Transfer learning. Table format: see \cref{tab:levyholt}.} \label{tab:transfer} \end{table} \begin{table*} \centering \begin{tabular}{lrrrrr} \toprule & \textsc{nli} & $\textsc{manpat}^{\Phi\apat}$ & $\textsc{manpat}^{\Phi}$ & $\textsc{autpat}_{5}^{\Phi\apat}$ & $\textsc{autpat}_{5}^{\Phi}$ \\ \midrule $\mathrm{lr}$ & $2.72\cdot 10^{-5}$ & $2.47\cdot 10^{-5}$ & $6.68\cdot 10^{-6}$ & $3.82\cdot 10^{-5}$ & $2.11\cdot 10^{-5}$ \\ $\lambda$ & $1.43\cdot 10^{-3}$ & $2.98\cdot 10^{-4}$ & $1.07\cdot 10^{-5}$ & $4.02\cdot 10^{-5}$ & $1.65\cdot 10^{-5}$ \\ $c$ & $1$ & $2$ & $1$ & $2$ & $3$ \\ \bottomrule \end{tabular} \caption{Levy/Holt; RoBERTa-base.} \label{tab:hparam_levyholt_base} \end{table*} \begin{table*} \centering \begin{tabular}{lrrrrrrr} \toprule & \textsc{nli} & $\textsc{manpat}^{\Phi\apat}$ & $\textsc{manpat}^{\Phi}$ & $\textsc{autpat}_5^{\Phi\apat}$ & $\textsc{autpat}_5^{\Phi}$ & $\textsc{autcur}_5^{\Phi}$ & $\textsc{autarg}_5^{\Phi}$ \\ \midrule $\mathrm{lr}$ & $6.34\cdot 10^{-6}$ & $3.87\cdot 10^{-5}$ & $2.28\cdot 10^{-5}$ & $3.92\cdot 10^{-5}$ & $2.53 \cdot 10^{-5}$ & $1.28\cdot 10^{-5}$ & $2.47\cdot 10^{-5}$ \\ $\lambda$ & $1.35\cdot 10^{-3}$ & $1.43\cdot 10^{-5}$ & $6.52\cdot 10^{-2}$ & $2.18\cdot 10^{-4}$ & $1.02\cdot 10^{-5}$ & $8.23\cdot 10^{-3}$ & $2.98\cdot 10^{-4}$ \\ $c$ & $1$ & $4$ & $2$ & $1$ & $1$ & $1$ & $2$ \\ \bottomrule \end{tabular} \caption{SherLIiC; RoBERTa-base.} \label{tab:hparam_sherliic_base} \end{table*} \begin{table*} \centering \begin{tabular}{lrrrrr} \toprule & \textsc{nli} & $\textsc{manpat}^{\Phi\apat}$ & $\textsc{manpat}^{\Phi}$ & $\textsc{autpat}_5^{\Phi\apat}$ & $\textsc{autpat}_5^{\Phi}$ \\ \midrule $\mathrm{lr}$ & $6.68\cdot 10^{-6}$ & $4.55\cdot 10^{-6}$ & $4.92\cdot 10^{-6}$ & $6.68\cdot 10^{-6}$ & $8.13\cdot 10^{-6}$ \\ $\lambda$ & $1.07\cdot 10^{-5}$ & $3.90 \cdot 10^{-4}$ & $3.61\cdot 10^{-4}$ & $1.07\cdot 10^{-5}$ & $6.05\cdot 10^{-2}$ \\ $c$ & $1$ & $2$ & $3$ & $1$ & $2$ \\ \bottomrule \end{tabular} \caption{Levy/Holt; RoBERTa-large.} \label{tab:hparam_levyholt_large} \end{table*} \begin{table*} \centering \begin{tabular}{lrrrrr} \toprule & \textsc{nli} & $\textsc{manpat}^{\Phi\apat}$ & $\textsc{manpat}^{\Phi}$ & $\textsc{autpat}_5^{\Phi\apat}$ & $\textsc{autpat}_5^{\Phi}$ \\ \midrule $\mathrm{lr}$ & $6.68\cdot 10^{-6}$ & $1.29\cdot 10^{-5}$ & $9.14\cdot 10^{-6}$ & $6.34\cdot 10^{-6}$ & $4.55\cdot 10^{-6}$ \\ $\lambda$ & $1.07\cdot 10^{-5}$ & $2.49\cdot 10^{-4}$ & $6.09\cdot 10^{-5}$ & $1.35\cdot 10^{-3}$ & $3.90\cdot 10^{-4}$ \\ $c$ & $1$ & $3$ & $4$ & $1$ & $2$ \\ \bottomrule \end{tabular} \caption{SherLIiC; RoBERTa-large.} \label{tab:hparam_sherliic_large} \end{table*} \begin{table*} \centering \small \begin{tabular}{l@{\, }lrrrrrrrrrrrr} \toprule && \multicolumn{4}{c}{\dev{1}} & \multicolumn{4}{c}{\dev{2}} & \multicolumn{4}{c}{test}\\ \cmidrule(lr){3-6}\cmidrule(lr){7-10}\cmidrule(lr){11-14} && AUC & P & R & F1 & AUC & P & R & F1 & AUC & P & R & F1 \\ \midrule {\tiny baselines}\\ \multicolumn{2}{l}{\citet{hosseini-etal-2018-learning}} & -- & -- & -- & -- & -- & -- & -- & -- & 16.5 & -- & -- & -- \\ \multicolumn{2}{l}{\citet{hosseini-etal-2019-duality}} & -- & -- & -- & -- & -- & -- & -- & -- & \textbf{18.7} & -- & -- & -- \\ \midrule \multicolumn{14}{l}{{\tiny RoBERTa-base}}\\ \textsc{nli} & {\tiny ($\vartheta = \phantom{-}0.0052$)} & 94.9 & 87.4 & 91.1 & 89.2 & 88.8 & 78.1 & \textbf{90.3} & 83.8 & 72.6 & 68.7 & \textbf{75.3} & 71.9 \\ $\textsc{manpat}^{\Phi\apat}$ & {\tiny ($\vartheta = -0.0909$)} & \textbf{96.5} & \textbf{87.7} & \textbf{96.2} & \textbf{91.8} & \textbf{89.4} & \textbf{81.4} & 88.5 & \textbf{84.8} & \textbf{76.9} & \textbf{78.7} & 66.4 & \textbf{72.0} \\ $\textsc{manpat}^{\Phi}$ & {\tiny ($\vartheta = \phantom{-}0.5793$)} & 91.8 & 80.2 & 90.1 & 84.9 & 84.7 & 77.5 & 81.1 & 79.3 & 71.2 & 74.4 & 61.2 & 67.1 \\ $\textsc{autpat}_{5}^{\Phi\apat}$ & {\tiny ($\vartheta = -0.1428$)} & 95.0 & 83.4 & 95.6 & 89.1 & 87.7 & 79.2 & 85.7 & 82.3 & 63.7 & 71.0 & 58.8 & 64.3 \\ $\textsc{autpat}_{5}^{\Phi}$ & {\tiny ($\vartheta = -0.0592$)} & 87.4 & 78.0 & 90.0 & 83.6 & 83.3 & 76.3 & 81.6 & 78.8 & 65.4 & 68.0 & 63.3 & 65.5 \\ \midrule \multicolumn{14}{l}{{\tiny RoBERTa-large}}\\ \textsc{nli} & {\tiny ($\vartheta=\phantom{-}0.0016$)} & 96.9 & 90.1 & 97.1 & \textbf{93.5} & 87.7 & 82.6 & 87.6 & \textbf{85.0} & 75.5 & 73.5 & 73.7 & 73.6 \\ $\textsc{manpat}^{\Phi\apat}$ & {\tiny ($\vartheta = \phantom{-}0.1156$)} & \textbf{97.1} & \textbf{91.4} & 95.4 & 93.4 & \textbf{88.9} & \textbf{84.0} & 84.8 & 84.4 & \textbf{83.9} & \textbf{84.8} & 70.1 & \textbf{76.7} \\ $\textsc{manpat}^{\Phi}$ & {\tiny ($\vartheta = -0.8457$)} & 92.2 & 76.1 & \textbf{97.3} & 85.4 & 84.4 & 72.5 & \textbf{91.2} & 80.8 & 77.8 & 67.9 & \textbf{81.5} & 74.1 \\ $\textsc{autpat}_{5}^{\Phi\apat}$ & {\tiny ($\vartheta = -0.0021$)} & 95.0 & 86.0 & 91.9 & 88.8 & 84.7 & 78.9 & 81.1 & 80.0 & 70.4 & 75.7 & 60.7 & 67.4 \\ $\textsc{autpat}_{5}^{\Phi}$ & {\tiny ($\vartheta = -0.9197$)} & 92.4 & 75.5 & 95.3 & 84.2 & 83.5 & 70.6 & 88.5 & 78.5 & 66.5 & 61.8 & 74.4 & 67.5 \\ \bottomrule \end{tabular} \caption{Full results on the Levy/Holt dataset. The dev and test sets as created by \citet{hosseini-etal-2018-learning} are called \dev{1} and test. The portion of \dev{1} that serves as our validation set is called \dev{2}. AUC denotes the area under the precision-recall curve for precision values${}\geq0.5$. All results in \%{}.} \label{tab:dev_levyholt} \end{table*} \begin{table*} \centering \small \begin{tabular}{l@{\, }lrrrrrrrrrrrr} \toprule && \multicolumn{4}{c}{\dev{1}} & \multicolumn{4}{c}{\dev{2}} & \multicolumn{4}{c}{test}\\ \cmidrule(lr){3-6}\cmidrule(lr){7-10}\cmidrule(lr){11-14} && \textsc{auc} & P & R & F\textsubscript{1} & \textsc{auc} & P & R & F\textsubscript{1} & \textsc{auc} & P & R & F\textsubscript{1} \\ \midrule \multicolumn{14}{l}{\tiny baselines}\\ \multicolumn{2}{l}{Lemma} & -- & \textbf{90.0} & 10.9 & 19.4 & -- & -- & -- & -- & -- & \textbf{90.7} & 8.9 & 16.1 \\ \multicolumn{2}{l}{w2v+untyped\_{}rel} & -- & 56.5 & 74.0 & 64.1 & -- & -- & -- & -- & -- & 52.8 & 69.5 & 60.0 \\ \multicolumn{2}{l}{w2v+tsg\_rel\_emb} & -- & 56.6 & \textbf{77.6} & \textbf{65.5} & -- & -- & -- & -- & -- & 51.8 & \textbf{72.7} & \textbf{60.5} \\ \midrule \multicolumn{14}{l}{\tiny RoBERTa-base}\\ \textsc{nli} & {\tiny ($\vartheta = \phantom{-}0.3878$)} & 81.3 & \textbf{79.1} & 80.1 & 79.6 & 81.5 & \textbf{84.2} & 70.6 & \textbf{76.8} & 65.8 & \textbf{67.0} & 66.1 & 66.5 \\ $\textsc{manpat}^{\Phi\apat}$ & {\tiny ($\vartheta = -0.3324$)} & 76.2 & 68.6 & 85.8 & 76.2 & \textbf{82.4} & 70.0 & \textbf{82.4} & 75.7 & 66.4 & 60.9 & 78.8 & 68.7 \\ $\textsc{manpat}^\Phi$ & {\tiny ($\vartheta = -0.4812$)} & \textbf{88.4} & 75.5 & \textbf{93.1} & \textbf{83.4} & 84.1 & 73.0 & 79.4 & 76.1 & \textbf{69.2} & 62.0 & \textbf{81.2} & \textbf{70.3} \\ $\textsc{autpat}_{5}^{\Phi\apat}$ & {\tiny ($\vartheta = -0.4694$)} & 87.0 & 77.8 & 88.8 & 82.9 & 71.2 & 68.4 & 76.5 & 72.2 & 67.4 & 61.8 & 75.6 & 68.0 \\ $\textsc{autpat}_{5}^{\Phi}$ & {\tiny ($\vartheta = -0.7042$)} & 86.8 & 64.1 & 91.8 & 75.5 & 74.0 & 65.5 & 83.8 & 73.6 & 67.3 & 56.6 & 82.6 & 67.2 \\ $\textsc{autcur}_{5}^{\Phi}$ & {\tiny ($\vartheta = -0.7524$)} & 82.6 & 61.7 & 92.8 & 74.1 & 75.6 & 60.6 & 88.2 & 71.9 & 69.5 & 56.3 & 89.6 & 69.2 \\ $\textsc{autarg}_{5}^{\Phi}$ & {\tiny ($\vartheta = -0.7461$)} & 77.4 & 69.3 & 84.0 & 76.0 & 73.6 & 68.9 & 75.0 & 71.8 & 65.2 & 61.9 & 75.6 & 68.1 \\ \midrule $\textsc{autpat}_{15}^{\Phi\apat}$ & {\tiny ($\vartheta = -0.5263$)} & 95.3 & 87.0 & 93.1 & 89.9 & 73.0 & 65.4 & 75.0 & 69.9 & 70.0 & 60.4 & 79.7 & 68.7 \\ $\textsc{autpat}_{15}^{\Phi}$ & {\tiny ($\vartheta = -0.6422$)} & \textbf{95.4} & 85.3 & 94.6 & 89.7 & \textbf{75.8} & 69.2 & \textbf{79.4} & \textbf{74.0} & \textbf{73.1} & \textbf{63.0} & 77.4 & \textbf{69.4} \\ $\textsc{autpat}_{25}^{\Phi\apat}$ & {\tiny ($\vartheta = -0.0014$)} & 95.0 & \textbf{92.0} & 93.7 & \textbf{92.8} & 66.1 & \textbf{70.0} & 72.1 & 71.0 & 63.5 & 62.1 & 73.4 & 67.3 \\ $\textsc{autpat}_{25}^{\Phi}$ & {\tiny ($\vartheta = -0.6496$)} & 88.1 & 72.3 & 90.0 & 80.2 & 73.0 & 67.5 & 79.4 & 73.0 & 69.0 & 60.5 & \textbf{79.4} & 68.7 \\ $\textsc{autpat}_{50}^{\Phi\apat}$ & {\tiny ($\vartheta = -0.9163$)} & 93.2 & 72.8 & 92.8 & 81.5 & 67.1 & 63.0 & 75.0 & 68.5 & 66.3 & 54.3 & \textbf{82.8} & 65.6 \\ $\textsc{autpat}_{50}^{\Phi}$ & {\tiny ($\vartheta = -0.9500$)} & 94.2 & 79.1 & \textbf{94.9} & 86.3 & 69.3 & 66.3 & 77.9 & 71.6 & 67.4 & 57.3 & 82.5 & 67.6 \\ \midrule \multicolumn{14}{l}{\tiny RoBERTa-large}\\ \textsc{nli} & {\tiny ($\vartheta = \phantom{-}0.0025$)} & \textbf{92.3} & \textbf{79.7} & \textbf{93.7} & \textbf{86.1} & 75.7 & 66.7 & \textbf{82.4} & 73.7 & 68.3 & 60.5 & \textbf{85.5} & 70.9 \\ $\textsc{manpat}^{\Phi\apat}$ & {\tiny ($\vartheta = -0.0956$)} & 89.3 & 77.3 & 88.5 & 82.5 & \textbf{80.8} & \textbf{74.7} & 77.9 & \textbf{76.3} & \textbf{74.4} & \textbf{66.0} & 80.8 & \textbf{72.6} \\ $\textsc{manpat}^{\Phi}$ & {\tiny ($\vartheta = -0.6641$)} & 78.0 & 67.4 & 84.9 & 75.1 & 72.2 & 67.1 & 77.9 & 72.1 & 64.6 & 58.1 & 79.0 & 67.0 \\ $\textsc{autpat}_{5}^{\Phi\apat}$ & {\tiny ($\vartheta = -0.9889$)} & 86.5 & 73.8 & 86.7 & 79.7 & 73.6 & 70.4 & 73.5 & 71.9 & 68.6 & 61.9 & 75.5 & 68.0 \\ $\textsc{autpat}_{5}^{\Phi}$ & {\tiny ($\vartheta = -0.5355$)} & 71.6 & 64.3 & 71.9 & 67.9 & 64.5 & 71.4 & 66.2 & 68.7 & 56.8 & 61.5 & 66.1 & 63.7 \\ \bottomrule \end{tabular} \caption{Full results on SherLIiC. The original dev and test sets are called \dev{1} and test. The portion of \dev{1} that serves as our validation set is called \dev{2}. \textsc{auc} denotes the area under the precision-recall curve for precision values${}\geq0.5$. Baseline results from \citep{schmitt-schutze-2019-sherliic}. All results in \%{}.} \label{tab:dev_sherliic} \end{table*} \begin{table*} \centering \small \begin{tabularx}{\linewidth}{lXcX} \toprule (1) &The original aim of de Garis' work was to \textbf{prem} the field of "brain building" (a term of his invention) and to "\textbf{hypo} a trillion dollar industry within 20 years". &$\to$& The original aim of their work was that "\textsc{pargl} \textbf{prem} \textsc{pargr}" and that "\textsc{hargl} \textbf{hypo} \textsc{hargr} within 20 years". \\ (2) &Critic Roger Ebert stated that Gellar and co-star Ryan Phillippe "\textbf{prem} a convincing emotional charge" and that Gellar is "effective as a bright girl who knows exactly how to \textbf{hypo} her act as a tramp". &$\to$& Critic Roger Ebert stated that \textsc{pargl} and co-star Ryan Phillippe "\textbf{prem} \textsc{pargr}" and that \textsc{hargl} is "effective as a bright girl who knows exactly how she \textbf{hypo} \textsc{hargr} as a tramp".\\ (3) &Well-known professional competitions in the past have included the World Professional Championships (\textbf{hypo} Landover, Maryland), the Challenge Of Champions, the Canadian Professional Championships and the World Professional Championships (\textbf{prem} in Jaca, Spain). &$\to$& Well-known professional competitions in the past have included \textsc{hargl} (\textbf{hypo} \textsc{hargr}), the Challenge Of Champions, the Canadian Professional Championships and \textsc{pargl} (\textbf{prem} \textsc{pargr}).\\ (4) &They also had sharpshooter Steve Kerr, whom they \textbf{hypo} via free agency before the 1993–94 season, Myers, and centers Luc Longley (\textbf{prem} via trade in 1994 from the Minnesota Timberwolves) and Bill Wennington. &$\to$& \textsc{hargl} also had sharpshooter \textsc{hargr}, whom they \textbf{hypo} via free agency before the 1993–94 season, Myers, and centers \textsc{pargr} (whom \textsc{pargl} \textbf{prem} via trade in 1994 from the Minnesota Timberwolves) and Bill Wennington.\\ (5) &Because the 6x86 was more efficient on an instructions-per-cycle basis than Intel's Pentium, and because Cyrix sometimes \textbf{hypo} a faster bus speed than either Intel or AMD, Cyrix and competitor AMD co-\textbf{prem} the controversial PR system in an effort to compare its products more favorably with Intel's. \dots &$\to$& Because the 6x86 was more efficient on an instructions-per-cycle basis than Intel's Pentium, and because \textsc{hargl} sometimes \textbf{hypo} \textsc{hargr}, \textsc{pargl} and competitor AMD co-\textbf{prem} \textsc{pargr} in an effort to compare its products more favorably with Intel's. \dots \\ \bottomrule \end{tabularx} \caption{Five manually selected patterns from the 100 highest-ranked automatically extracted patterns from SherLIiC \dev{1} (used in $\textsc{autcur}^{\Phi}_{5}$) and their rewritten counterparts (used in $\textsc{autarg}^{\Phi}_{5}$). \textsc{pargl} (\textsc{hargl}) stands for the left argument of the premise (hypothesis); \textsc{pargr} (\textsc{hargr}) for the right one.} \label{tab:pattern_rewriting} \end{table*}
\section{Introduction} The study of superheavy elements (SHEs) is a multidisciplinary research area which provides a roadmap to investigate and understand several properties related to physics and chemistry \cite{turler-13,matthias-15,pershina-15, peter-15,eliav-15,giuliani-19}. There is however a lack of experimental data on atomic properties of SHEs due to various challenges, such as low production rate, short half-lives of elements and the lack of the state of the art one-atom-at-a-time experimental facility, associated with atomic experiments \cite {turler-13,schadel-14,hoffman-06}. Moreover, the properties of SHEs can not be predicted based on lighter homologs, as they often differ due to relativistic effects in SHEs {\bf \cite{eliav-15}}. In such cases, the theoretical investigations of physical and chemical properties provide an important insight to the properties of SHEs. Moreover, the benchmark data on these properties from accurate theoretical predications is important for future experiments. Calculating accurate properties of SHEs is, however, a difficult task. The reason for this could be attributed to the competing nature of the relativistic and correlation effects in these systems. For a reliable prediction of the properties of SHEs both of these effects should be incorporated at the highest level of accuracy. In addition, large basis sets should be used to obtain the converged properties results. The electric dipole polarizability, $\alpha$, of an atom or ion is a key parameter which used to probe several fundamental as well as technologically relevant properties in atoms and ions \cite{khriplovich-91,griffith-09, udem-02,lewenstein-94,anderson-95,karshenboim-10}. The $\alpha$ for SHEs Cn and Og has been calculated in previous works, Refs. \cite{seth-97,nash-05,dzuba-16,pershina-08a} and \cite{nash-05,dzuba-16, pershina-08b,jerabek-18}, respectively. Though most of these results are using the CCSD(T), there is a large variation in the reported values for both Cn and Og. For example, the value of $\alpha$ reported in CCSD(T) calculation \cite{jerabek-18} is $\approx$ 25\% larger than the similar calculation \cite{pershina-08b}. The reason for this can, perhaps, be attributed to the complex nature of the electron correlation and relativistic effects in these systems. The other point to be mentioned here is that, the basis used in these calculations are not large. Moreover, the inclusion of the contributions from the Breit interaction and QED corrections is crucial to obtain the accurate and reliable values of $\alpha$ for SHEs. In this work, we employ a fully relativistic coupled cluster (RCC) theory based method to calculate the electric dipole polarizability and the electron correlation energy of superheavy elements Cn, Nh$^+$ and Og. RCC is one of the most powerful many-body theories for atomic structure calculations as it accounts for the electron correlation to all-orders of residual Coulomb interaction. We have used this to calculate the many-electron wavefunction and the electron correlation energy. The effect of external electric field, in the case of $\alpha$, is accounted using the perturbed relativistic coupled-cluster (PRCC) theory \cite{chattopadhyay-12b,chattopadhyay-13b,chattopadhyay-14, chattopadhyay-15,ravi-20}. One of the key merits of PRCC in the properties calculation is that it does not employ the sum-over-state \cite{safronova-99,derevianko-99} approach to incorporate the effects of a perturbation. The summation over all the possible intermediate states is subsumed in the perturbed cluster operators. The leading order relativistic effects are accounted using the four component Dirac-Coulomb-Breit no-virtual-pair Hamiltonian \cite{sucher-80}. And, the effects of Breit, QED and triples excitations in coupled-cluster are computed using the implementations in our previous works \cite{chattopadhyay-12b, chattopadhyay-13b, chattopadhyay-14, chattopadhyay-15}. To assess the trend of various electron correlation effects from lighter to SHEs, we also calculate the correlation energy and the contributions from the Breit and QED corrections to $\alpha$ for three lighter homologs in each SHEs: Zn, Cd and Hg in group-12; Ga$^+$, In$^+$ and Tl$^+$ in group-13; and Kr, Xe, and Rn in group-18. In this work, however, we do not report the values of $\alpha$ for these lighter homologs as these have been already reported in our previous works \cite{chattopadhyay-15,ravi-20,chattopadhyay-12b}. Here, our main focus is to get deeper insight of various correlation effects as a function $Z$ in each of these SHEs. More precisely, we aimed to: accurately calculate the value of $\alpha$ and correlation energy of SHEs Cn, Nh$^+$ and Og using RCC and test the convergence of results with very large basis; study the electron correlation in $\alpha$ for SHEs and assess the trend from lighter to SHEs; and examine in detail the contributions from the Breit and QED corrections to $\alpha$ for SHEs elements and get a deeper insight to the trend of contributions from lighter homologs to SHEs. The remaining part of the paper is organized into five sections. In Sec. II we provide a brief description of the method used in the polarizability calculation. In Sec. III we provide the calculational details such as the single-electron basis and computational challenges associated with polarizability calculation of SHEs. In Sec. IV we analyze and discuss the results from our calculations. The theoretical uncertainty in our calculation is discussed in Sec. V. Unless stated otherwise, all the results and equations presented in this paper are in atomic units ( $\hbar=m_e=e=1/4\pi\epsilon_0=1$) \section{Method of Calculation} The ground state wavefunction of an N-electron atom or ion in relativistic coupled-cluster (RCC) theory is \begin{equation} |\Psi_0\rangle = e^{ T^{(0)}}|\Phi_0\rangle, \label{psi0} \end{equation} where $|\Phi_0\rangle$ is the Dirac-Fock reference wavefunction and $T^{(0)}$ is the closed-shell coupled-cluster (CC) excitation operator. It is an eigenfunction of the Dirac-Coulomb-Breit no-virtual-pair Hamiltonian \begin{eqnarray} H^{\rm DCB} & = & \sum_{i=1}^N \left [c\bm{\alpha}_i \cdot \mathbf{p}_i + (\beta_i -1)c^2 - V_{N}(r_i) \right ] \nonumber \\ & & + \sum_{i<j}\left [ \frac{1}{r_{ij}} + g^{\rm B}(r_{ij}) \right ], \label{ham_dcb} \end{eqnarray} where $\bm{\alpha}$ and $\beta$ are the Dirac matrices. The negative-energy continuum states of the Hamiltonian are projected out by using the kinetically balanced finite GTO basis sets \cite{mohanty-91,stanton-84}, and selecting only the positive energy states from the finite size basis set \cite{grant-10,grant-06}. The last two terms, $1/r_{ij} $ and $g^{\rm B}(r_{ij})$, are the Coulomb and Breit interactions, respectively. The operators $T^{(0)}$ in Eq. (\ref{psi0}) are the solutions of the coupled nonlinear equations \begin{widetext} \begin{subequations} \begin{eqnarray} \langle\Phi^p_a| H_{\rm N} + \left [ H_N, T^{(0)} \right ] + \frac{1}{2!} \left [\left [ H_N, T^{(0)}\right], T^{(0)}\right] + \frac{1}{3!} \left [\left [ \left [ H_N, T^{(0)}\right ], T^{(0)}\right ], T^{(0)} \right ] |\Phi_0\rangle &=& 0, \;\;\;\;\;\;\;\;\; \\ \langle\Phi^{pq}_{ab}| H_{\rm N} + \frac{1}{2!} \left [\left [ H_N, T^{(0)}\right], T^{(0)}\right] + \frac{1}{3!} \left [\left [ \left [ H_N, T^{(0)}\right ], T^{(0)}\right ], T^{(0)} \right] + \frac{1}{4!} \left [\left [\left [\left [ H_N, T^{(0)}\right], T^{(0)}\right], T^{(0)}\right], T^{(0)} \right] |\Phi_0\rangle &=& 0. \end{eqnarray} \label{cceq_t0} \end{subequations} \end{widetext} Here, the states $|\Phi^p_a\rangle$ and $|\Phi^{pq}_{ab}\rangle$ are the singly- and doubly-excited determinants obtained by replacing {\em one} and {\em two} electrons from the core orbitals in $|\Phi_0\rangle$ with virtual orbitals, respectively. And, $H_{\rm N} = H^{\rm DCB} - \langle \Phi_0|H^{\rm DCB}|\Phi_0\rangle$ is the normal-ordered Hamiltonian. In the presence of an external electric field, $\mathbf{E}_{\rm ext}$, the ground state wavefunction $|\Psi_0\rangle$ is modified due to interaction between induced electric dipole moment $\mathbf{D}$ of the atom and $\mathbf{E}_{\rm ext}$. We call the modified wavefunction as the perturbed wavefunction, which in PRCC is defined as \begin{equation} |\widetilde{\Psi}_0\rangle = e^{T^{(0)}}\left [ 1 + \lambda \mathbf{T}^{(1)}\cdot \mathbf{E}_{\rm ext} \right ] |\Phi_0\rangle, \label{psi0-ptrb} \end{equation} where $\mathbf{T}^{(1)}$ is the perturbed CC operator, and $\lambda$ is a perturbation parameter. The wavefunction $|\widetilde{\Psi}_0\rangle$ is an eigenstate of the modified Hamiltonian $H_{\rm Tot} = H^{\rm DCB} - \lambda \mathbf{D}\cdot\mathbf{E}_{\rm ext}$. The perturbed CC operators $\mathbf{T}^{(1)}$ in Eq. (\ref{psi0-ptrb}) are the solutions of the linearized PRCC equations \cite{chattopadhyay-12a,chattopadhyay-12b,chattopadhyay-13a, chattopadhyay-13b, chattopadhyay-15, ravi-20} \begin{subequations} \begin{eqnarray} \langle\Phi^p_a| H_{\rm N} + \left [ H_N, {\mathbf T}^{(1)}\right] |\Phi_0\rangle &=& \langle\Phi^p_a|\left [ {\mathbf D}, T^{(0)}\right] |\Phi_0\rangle, \\ \langle\Phi^{pq}_{ab}| H_{\rm N} + \left [ H_N, {\mathbf T^{(1)}} \right ] |\Phi_0\rangle &=& \langle\Phi^{pq}_{ab}| \left [ {\mathbf D}, T^{(0)} \right ] |\Phi_0\rangle. \end{eqnarray} \label{cceq_t1} \end{subequations} The single and double excitations in the couple-cluster theory capture most of the correlation effects and hence, the operators $T^{(0)}$ and ${\mathbf T}^{(1)}$ are approximated as $T^{(0)} = T_{1}^{(0)} + T_{2}^{(0)}$ and ${\mathbf T}^{(1)} = {\mathbf T}_{1}^{(1)} + {\mathbf T}_{2}^{(1)}$, respectively. This is referred to as the coupled-cluster single and double (CCSD) approximation \cite{purvis-82}. In the present work we, however, also incorporate the triple excitations perturbatively \cite{chattopadhyay-15}. The perturbed wavefunction from Eq. (\ref{psi0-ptrb}) is used to calculate the ground state polarizability. In PRCC \begin{equation} \alpha = -\frac{\langle \widetilde \Psi_0|{\mathbf D}|\widetilde \Psi_0\rangle} {\langle \widetilde \Psi_0|\widetilde \Psi_0\rangle}. \end{equation} Using the expression of $|\widetilde \Psi_0\rangle$ from Eq. (\ref{psi0-ptrb}) we can write \begin{equation} \alpha = -\frac{\langle \Phi_0|\mathbf{T}^{(1)\dagger}\bar{\mathbf{D}} + \bar{\mathbf{D}}\mathbf{T}^{(1)}|\Phi_0\rangle}{\langle\Psi_0|\Psi_0\rangle}, \label{dbar} \end{equation} where $\bar{\mathbf{D}} = e^{{T}^{(0)\dagger}}\mathbf{D} e^{T^{(0)}}$, and in the denominator $\langle \Psi_0| \Psi_0\rangle$ is the normalization factor. Considering the computational complexity, we truncate $\bar{\mathbf{D}}$ and the normalization factor to second order in the cluster operators $T^{(0)}$ . From our previous study \cite{mani-10}, using an iteration scheme we found that the terms with third and higher orders contribute very less to the properties. \section{Calculational Detail} \subsection{Single-electron basis} In the RCC and PRCC calculations, it is crucial to use an orbital basis set which provides a good description of the single-electron wave functions and energies. In the present work, we use Gaussian-type orbitals (GTOs) \cite{mohanty-91} as the basis. We optimize the orbitals as well as the self-consistent-field energies of GTOs to match the GRASP2K \cite{jonsson-13} results. In the Table \ref{basis}, we provide the values of the exponents $\alpha_0$ and $\beta$ \cite{mohanty-91} of the occupied orbital symmetries for Cn, Nh$^+$ and Og. For further improvement, we incorporate the effects of Breit interaction, vacuum polarization and the self-energy corrections. This is crucial to obtain the value of the dipole polarizability of SHEs accurately, where the relativistic effects are larger due to higher $Z$. The effects of finite charge distribution of the nucleus are incorporated using a two-parameter finite size Fermi density distribution. In the Appendix, we compare the orbital energies of Cn (Table \ref{ene-cn}), Nh$^+$ (Table \ref{ene-nh}) and Og (\ref{ene-og}) with GRASP2K \cite{jonsson-13} and B-spline \cite{zatsarinny-16} data. As seen from the tables, the GTOs orbital energies are in excellent agreement with the numerical values from GRASP2K. The largest differences are $3.4\times10^{-4}$, $4.8\times10^{-4}$ and $9.2\times10^{-4}$ hartree in the case of $4f_{5/2}$, $1s_{1/2}$ and $2p_{1/2}$ orbitals of Cn, Nh$^+$ and Og, respectively. The corrections from the vacuum polarization, $\Delta\epsilon_{\rm Ue}$, and the self-energy, $\Delta\epsilon_{\rm SE}$, to the orbital energies are provided in the Table \ref{delta-en}. Our results match well with the previous calculation \cite{karol-18b} for Cn and Og. \begin{table*} \caption{The $\alpha_0$ and $\beta$ parameters of the even tempered GTO basis used in our calculations.} \label{basis} \begin{ruledtabular} \begin{tabular}{ccccccccc} Atom & \multicolumn{2}{c}{$s$} & \multicolumn{2}{c}{$p$} & \multicolumn{2}{c}{$d$} & \multicolumn{2}{c}{$f$} \\ \cline{2-3} \cline{4-5} \cline{6-7} \cline{8-9} & $\alpha_{0}$ & $\beta$ & $\alpha_{0}$ & $\beta$ & $\alpha_{0}$ & $\beta$ & $\alpha_{0}$ & $\beta$ \\ \hline ${\rm Cn}$ &\, 0.00545 &\, 1.870 &\,0.00475 &\, 1.952 &\, 0.00105 &\, 1.970 &\, 0.00380 &\,1.965 \\ ${\rm Og}$ &\, 0.00410 &\, 1.910 &\,0.00396 &\, 1.963 &\, 0.00305 &\, 1.925 &\, 0.00271 &\,1.830 \\ ${\rm Nh^+}$ &\, 0.05200 &\, 1.912 &\,0.03650 &\, 1.655 &\, 0.05550&\, 1.945 &\, 0.00455 &\,1.945 \\ \end{tabular} \end{ruledtabular} \end{table*} \begin{figure*} \includegraphics[height=17cm, angle=-90]{cluster-amp.eps} \caption{(a) Number of cluster amplitudes, (b) number of 4-particle Slater integrals and (c) memory required to store 4-particle Slater integrals, as a function of $Z$ for group-12 elements.} \label{cc_amp} \end{figure*} \subsection{Computational challenges with SHEs} The calculation of $\alpha$ for SHEs is a computationally challenging task. This is due to the large number of core electrons and the need for larger basis size to obtain converged properties results. The latter pose three main hurdles in the calculations. First, the number of cluster amplitudes is very large, and solving the cluster equations require long compute times. To give an example, as shown in Fig. \ref{cc_amp}, in the case of Cn using a converge basis of 200 orbitals leads to more than 31 millions cluster amplitudes. This is about 2.3 times larger than the lighter atom Rn. Second, convergence of $\alpha$ with basis size is slow. This is in stark contrast to the convergence trends of $\alpha$ for lighter atoms and ions reported in our previous works \citep{chattopadhyay-14, chattopadhyay-15, ravi-20}. For the lighter atoms and ions convergence is achieved with a basis of 160 or less orbitals. However, for SHEs convergence of $\alpha$ requires $\approx$ 200 orbitals. And third, storing the two-electron integrals for efficient computation require of large memory. For instance, the number of {\em 4-particles} two-electron integrals in the case of Cn is more than 427 millions. This is about 1.3 times larger than the case of Rn. Moreover, in general parallelization, solving the cluster equations require storing the same set of integrals are stored across all nodes. This leads to replication of data across compute nodes and puts severe restrictions on basis size in the PRCC calculations. To mitigate this problem, we have implemented a {\em memory-parallel-storage} algorithm \cite{mani-17} which avoids the storage replication of the integrals across different nodes. This allows efficient memory usage and use large orbital basis in the PRCC computations. The inclusion of perturbative triples to the computation of $\alpha$ enhances the computational complexity further. This is due to the evaluation of numerous additional polarizability diagrams arising from the perturbative triples. To illustrate the compute time, the computation of $\alpha$ for Cn using a basis of 200 orbitals without triples takes 120 hrs with 144 threads. Whereas, with partial triples included, it requires 280 hrs with 200 threads. Thus the runtime more than doubled. \section{Results and Discussion} \subsection{Convergence of $\alpha$ and correlation energy} Since the GTO basis are mathematically incomplete \cite{grant-06}, it is essential to check the convergence of polarizability and correlation energy with basis size. The convergence trends of $\alpha$ and electron correlation energy are shown in the Fig. \ref{fig_conv}. In these calculations we have used the Dirac-Coulomb Hamiltonian as it is computationally less expensive than using the DCB Hamiltonian. To determine the converged basis set we start with a moderate basis size and add orbitals in each symmetry systematically. This is continued till the change in $\alpha$ and correlation energy is $\leqslant 10^{-3}$ in their respective units. For example, as discernible from the Table \ref{con-alpha} in Appendix, the change in $\alpha$ for Cn is $4.0\times10^{-3}$ a.u. when the basis set is augmented from 191 to 200. So, to optimize the compute time, we consider the basis set with 191 orbitals as the optimal one for $\alpha$. Once the optimal basis set is chosen, for further computations we incorporate the Breit interaction and QED corrections. As discernible from the Figs. \ref{fig_conv}(a) and (b), one key observation is, the correlation energies converge with much larger bases than $\alpha$. For example, for Cn, the converged second-order energy is obtained with the basis size of 439 ($31s27p26d24f22g21h21i21j21k21l$) orbitals. A similar trend is also observed for other two SHEs and all lighter homologs considered in this work. \begin{figure*} \includegraphics[height=17cm, angle=-90]{convergence.eps} \caption{ Convergence of second-order correlation energy (panel (a)), the RCC energy (panel (b)) and $\alpha$ (panel (c)) as function of the basis size.} \label{fig_conv} \end{figure*} \subsection{Correlation energy} The electron correlation energy in RCC is expressed as \begin{equation} \Delta E = \langle\Phi_0|\bar{H}_{\rm N}|\Phi_0\rangle, \end{equation} where ${\bar H}_{\rm N}, = e^{-T^{(0)}} H_{\rm N} e^{T^{(0)}},$ is the similarity transformed Hamiltonian. In Table \ref{corr-ene}, we list $\Delta E$ for SHEs and three lighter elements in each group. Since the correlation energies converge with very large basis sizes, it is therefore not practical to use such a large basis in the RCC calculations due to several computational limitations. Some of the limitations are as mentioned in the previous section. To mitigate this, and to account for correlation energy from the virtuals not included in the RCC calculations, we resort to the second-order MBPT method. The RCC results for $\Delta E$ listed in Table \ref{corr-ene} are calculated using the expression \begin{equation} \Delta E_{\rm RCC} \approx \Delta E^{\rm nconv}_{\rm RCC} + \left(\Delta E^{\rm conv, 2}_{\rm MBPT} - \Delta E^{\rm nconv, 2}_{\rm MBPT} \right), \end{equation} where $\Delta E^{\rm nconv}_{\rm RCC}$ is the correlation energy computed using RCC with orbitals up to $j$-symmetry. And, $\Delta E^{\rm nconv, 2}_{\rm MBPT}$ and $\Delta E^{\rm conv, 2}_{\rm MBPT}$ are the second-order energies calculated using RCC basis and a converged basis which includes orbitals up to $l$-symmetry, respectively. \begin{table}[h!] \caption{Electron correlation and total energies in atomic units for group-12, group-13 and group-18 elements. Listed RCC energies also include the contributions from the Breit and QED corrections.} \label{corr-ene} \begin{center} \begin{ruledtabular} \begin{tabular}{ccccccc} &\multicolumn{2}{c}{Basis} & \multicolumn{2}{c}{$\Delta E_{\rm DC}$} & $E_{\rm total}$ & $\Delta E_{\rm Others}$ \\ \hline & MBPT & RCC & MBPT & RCC & & \\ \hline \multicolumn{7}{c}{Group-12} \\ \hline Zn & $336$ & $206$ & $-1.6769$ & $-1.5690$ & $-1796.1812$ &$-1.6975^a$, \\ & & & & & & $-1.6611^d$ \\ & & & & & & $-1.6206^f$ \\ Cd & $461$ & $223$ & $-2.7278$ & $-2.6216$ & $-5595.9393$ &$-2.7253^b$, \\ & & & & & & $-2.6540^d$ \\ & & & & & & $-2.6500^f$ \\ Hg & $413$ & $227$ & $-5.4681$ & $-5.1164$ & $-19653.9388$&$-5.4508^b$, \\ & & & & & & $-5.2895^d$ \\ & & & & & & $-5.1760^f$ \\ Cn & $439$ & $289$ & $-8.4393$ & $-7.7981$ & $-47335.9752$ & \\ \multicolumn{7}{c}{Group-13} \\ \hline Ga$^+$ & $411$ & $227$ & $-1.669$ & $-1.58077$ & $-1943.9435$ & \\ \\ In$^+$ & $447$ & $235$ & $-2.744$ & $-2.64147$ & $-5882.8838$ & \\ \\ Tl$^+$ & $409$ & $220$ & $-5.499$ & $-5.15772$ & $-20279.7851$ & \\ \\ Nh$^+$ & $453$ & $304$ & $-8.4743$ & $7.8439$ & $-48517.6211$ & \\ \multicolumn{7}{c}{Group-18} \\ \hline Kr & $413$ & $255$ & $-1.8532$ & $-1.7900$ & $-2790.3898$ &$-1.8907^c$, \\ & & & & & & $-1.8468^d$ \\ & & & & & & $-1.8466^e$ \\ & & & & & & $-1.8496^f$ \\ Xe & $419$ & $255$ & $-3.0314$ & $-2.9075$ & $-7448.6635$ &$-3.0877^c$,\\ & & & & & & $-2.9587^d$ \\ & & & & & & $-2.9979^e$ \\ & & & & & & $-3.0002^f$ \\ Rn & $372$ & $245$ & $-5.6195$ & $-5.2945$ &$-23601.3243$&$-5.7738^c$,\\ & & & & & & $-5.5874^d$ \\ & & & & & & $-5.5250^f$ \\ Og & $492$ & $313$ & $-8.9109$ & $-8.3047$ & $-54815.0764$ & \end{tabular} \end{ruledtabular} \end{center} \begin{tabbing} $^{\rm a}$Ref.\cite{flores-93a}[MP2], \\ $^{\rm b}$Ref.\cite{flores-94}[MP2], \\ $^{\rm c}$Ref.\cite{flores-93b}[MP2], \\ $^{\rm d}$Ref.\cite{ishikawa-94}[MP2], \\ $^{\rm e}$Ref.\cite{mani-09}[RCC], \\ $^{\rm f}$Ref.\cite{mccarthy-11}[RCC], \\ \end{tabbing} \end{table} For all the elements listed in Table \ref{corr-ene}, we observe an important trend in the correlation energy. The RCC energy is smaller in magnitude than the second-order energy. A similar trend is also observed in the previous work \cite{mccarthy-11}. From our calculations we find that the reason for this is the cancellations from the higher order corrections embedded in RCC. As discernible from the Fig. \ref{fig_corr}(a) for group-12 elements as an example, contributions from the third and fifth order corrections are positive. And, as a result, correlation energy oscillates initially before converging to the RCC value. This can be observed from the Fig. \ref{fig_corr}(b) where we have shown the cumulative contribution. Comparing our results with previous calculations, to the best of our knowledge, there are no results for SHEs. For lighter elements, our RCC energy agrees well with the previous RCC results \cite{mccarthy-11,mani-09}. The small difference in the energies, however, could be attributed to the corrections from the Breit and QED included in the present work and the difference in the basis employed. For second-order energies, there are four results from the previous calculations \cite{flores-93a,flores-94,flores-93b,ishikawa-94}. And, our results match very well with them for all the elements. \begin{figure*} \includegraphics[height=17cm, angle=-90]{corr-energy_new.eps} \caption{(a) Third, fourth, fifth and sixth-order correlation energies, (b) cumulative correlation energy and (c) contribution to correlation energy from orbitals of different symmetries. $\Delta E^{(\infty)}$ in panel (b) represents the infinite-order correlation energy and is equivalent to RCC energy.} \label{fig_corr} \end{figure*} Examining the contributions from different symmetries of virtual orbitals, we find that all three SHEs show a similar trend. This is not surprising as all three are closed-shell systems. As discernible from the histograms in Fig. \ref{fig_corr}, contribution to correlation energy increases initially as a function of orbital symmetry and then decreases. The first two dominant changes, $\approx$ 35\% and 26\% of the total correlation energy, are from the $g$ and $f$ orbitals. The next two are from the $d$ and $h$-symmetries, they contribute $\approx$ 12\% each to all the SHEs. The contribution from the virtuals with $l$-symmetry is about 0.8\%. This non negligible contribution from $l$-symmetry orbitals indicates that the inclusion of the orbitals from higher symmetries are important to obtained the accurate energies for SHEs. \subsection{Polarizability} The values of $\alpha$ with different methods subsumed in the PRCC theory are listed in the Table \ref{final-alpha}. The Dirac-Fock (DF) contribution is computed using Eq. (\ref{dbar}) with $\mathbf{T}^{(1)}$ and $\bar{\mathbf{D}}$ replaced by the bare dipole operator $\mathbf{D}$, and is expected to have the dominant contribution. The PRCC values are the converged values from Table \ref{con-alpha}, calculated using the DC Hamiltonian with basis up to $h$ symmetry. The values listed as {\em Estimated} include the estimated contribution from the orbitals of $i$, $j$ and $k$ symmetries. For this, we use a basis set of moderate size from the Table \ref{con-alpha} and then, augment it with orbitals from $i$, $j$ and $k$ symmetries to calculate percentage contribution, this is added to the PRCC value. To the best of our knowledge, there are no experimental data on $\alpha$ for SHEs considered in the present work. However, to understand the trend of electron correlation effects, we compare our results with the previous theoretical results. One important and crucial difference between the previous studies and the present work is the absence of QED corrections in the previous works. Though the Breit interaction is included in the previous work \cite{seth-97} for Cn, the contribution is not given explicitly. These corrections are, however, important to obtain the accurate and reliable values of $\alpha$ for SHEs. From our calculations, we find that the combine Breit+QED contributions are $\approx$ 0.5$\%$, 0.4\% and 0.6\%, respectively, for Cn, Nh$^+$ and Og. Considering the important prospects associated with accurate data on $\alpha$ for SHEs, these are significant contributions and can not be neglected. \begin{table} \caption{Final value of $\alpha$ (a. u.) from PRCC calculation compared with other theoretical data in the literature.} \label{final-alpha} \begin{ruledtabular} \begin{tabular}{clcc} Element & \multicolumn{2}{c}{\textrm{Present work}} & {\textrm{Other cal.}}\\ \hline & {\textrm{Method}}& $\alpha$ & \\ \hline Cn & DF & $35.234$ & $25.82^{\rm a}$, $28.68^{\rm b}$, \\ & PRCC & $26.944$ & $27.40^{\rm d}$, $28\pm4^{\rm c}$ \\ & PRCC(T)& $27.457$ & \\ & PRCC(T)+Breit & $27.537$ & \\ & PRCC(T)+Breit+QED & $27.588$ \\ & Estimated & $27.442$ & \\ & Recommended &$27.44(88)$ & \\ \hline Nh$^+$ & DF & $23.182$ \\ & PRCC & $17.056$ \\ & PRCC(T)& $17.063$ \\ & PRCC(T)+Breit & $17.100$ \\ & PRCC(T)+Breit+QED & $17.135$ \\ & Estimated & $17.123$ & \\ & Recommended & $17.12(55)$ & \\ \hline Og & DF & $56.197$ & $52.43^{\rm b}$, $46.33^{\rm e}$, \\ & PRCC & $55.941$ & $57.98^{\rm f}$, $57\pm3^{\rm c}$ \\ & PRCC(T)& $56.203$ & \\ & PRCC(T)+Breit & $56.250$ & \\ & PRCC(T)+Breit+QED & $56.545$ & \\ & Estimated & $56.536$ & \\ & Recommended & $56.54(181)$ & \\ \end{tabular} \end{ruledtabular} \begin{tabbing} $^{\rm a}$Ref.\cite{seth-97}[CCSD(T)], \\ $^{\rm b}$Ref.\cite{nash-05}[CCSD(T)], \\ $^{\rm c}$Ref.\cite{dzuba-16}[RRPA], \\ $^{\rm d}$Ref.\cite{pershina-08a}[DC-CCSD(T)], \\ $^{\rm e}$Ref.\cite{pershina-08b}[R, DC-CCSD(T)], \\ $^{\rm f}$Ref.\cite{jerabek-18}[R, Dirac$+$Gaunt, CCSD(T)], \\ \end{tabbing} \end{table} \begin{table} \caption{Contributions to $\alpha$ (in a.u.) from different terms in PRCC theory.} \label{termwise} \begin{center} \begin{ruledtabular} \begin{tabular}{lccr} Terms + h.c. & \multicolumn{1}{r}{$\rm{Cn}$} & \multicolumn{1}{r}{$\rm{Nh^+}$} & \multicolumn{1}{r}{$\rm{Og}$} \\ \hline $\mathbf{T}_1^{(1)\dagger}\mathbf{D} $ & $34.5267$ & $21.3767$ & $68.9516$ \\ $\mathbf{T}_1{^{(1)\dagger}}\mathbf{D}T_2^{(0)} $ & $-3.0095$ & $-1.7444$ & $-4.0179$ \\ $\mathbf{T}_2{^{(1)\dagger}}\mathbf{D}T_2^{(0)} $ & $ 1.7485$ & $ 0.7622$ & $ 3.1900$ \\ $\mathbf{T}_1{^{(1)\dagger}}\mathbf{D}T_1^{(0)} $ & $-0.0389$ & $-0.0809$ & $-1.5258$ \\ $\mathbf{T}_2{^{(1)\dagger}}\mathbf{D}T_1^{(0)} $ & $-0.1087$ & $-0.0247$ & $ 0.2319$ \\ Normalization & $ 1.2292$ & $ 1.1898$ & $ 1.1946$ \\ Total & $26.9435$ & $17.0524$ & $55.9432$ \\ \end{tabular} \end{ruledtabular} \end{center} \end{table} For Cn three of the previous studies, similar to the present work, are using CCSD(T). There are, however, important differences in terms of the basis used in these calculations. And, this could account for the difference in the values of $\alpha$ reported in these works. In Ref. \cite{seth-97}, a relativistic basis with $11s 8p 8d 4f$ orbitals optimized using pseudopotential Hartree-Fock energy is used and reports the smallest value 25.82. The other CCSD(T) result 27.40 from the Ref. \cite{pershina-08a} is using a relatively larger basis of $26s24p18d13f5g2h$. In terms of methodology and basis, Ref. \cite{pershina-08a} is the closest to the present work. Our recommended value $27.44(88)$ is close this. The other CCSD(T) result of 28.68 is from the Ref. \cite{nash-05}, which is obtained using an uncontracted Cartesian basis. The is the highest theoretical value reported in the literature. The other value $28\pm4$ is obtained using the RRPA \cite{dzuba-16}. And, this is close to our result. This is is to be expected as both RRPA and PRCC account core-polarization, which is the dominant contribution to $\alpha$ after the DF. For the triples contribution to $\alpha$, there is no clear trend in the previous RCC results. In Ref. \cite{seth-97} and \cite{pershina-08a} the contribution from triples reported to as $-0.08$ and $-0.07$\% of the CCSD value, respectively, and decrease the value of $\alpha$. However, a positive contribution of $\approx$ 0.25\% is reported in Ref. \cite{nash-05}. In the present work, we obtain a positive contribution of $\approx$ 1.9\%, which increases the value of $\alpha$ further. For Nh$^+$, there are no previous theoretical results. The present work reports the first theoretical result of $\alpha$, using PRCC theory. As we observed from the Table \ref{final-alpha}, though it has the same electronic structure as Cn, the value of $\alpha$ is smaller. This is attributed to the relativistic contraction of $7s_{1/2}$ orbital due to increased nuclear potential. Like the case of Cn, the inclusion of partial triples increases the value of $\alpha$ further. For Og, there are three previous results based on calculations using CCSD(T). Though the same methods are used, there is a large difference in the values of $\alpha$ reported in these works. For instance, the CCSD(T) value 57.98 reported in Ref. \cite{jerabek-18} is $\approx$ 25\% larger than the result in Ref. \cite{pershina-08b}. The reason for this could be attributed to the different types of basis used. In Ref. \cite{pershina-08b} the computations used the Faegri basis with $26s24p18d13f5g2h$ orbitals, however, in Ref. \cite{jerabek-18} an uncontracted relativistic quadrupole-zeta basis is used. The other CCSD(T) result 52.43 from Ref. \cite{nash-05} lies between the other two results. Our recommended value $56.54(181)$ is closer to the RRPA value $57(3)$ from Ref. \cite{dzuba-16} and CCSD(T) value, 57.98, from Ref. \cite{jerabek-18}. As mentioned in the case of Cn, this is due to core-polarization effect accounted to all orders in both CCSD and RRPA. The obtained contribution from partial triples 0.47\% is consistent with the contribution 0.66\% reported in Ref. \cite{pershina-08b}. \section{Electron correlation, Breit and QED corrections} In this section we analyze and present the trends of electron correlation effects from the residual Coulomb interaction, Breit interaction and QED corrections to $\alpha$ as function of $Z$. \subsection{Residual Coulomb interaction} \begin{table} \caption{Five leading contribution to $\{ \bf{ T_1^{(1)\dagger} D} + H.c.\}$ (in a.u.) for $\alpha$ from core orbitals. This includes the DF and core-polarization contributions.} \label{t1d} \begin{center} \begin{ruledtabular} \begin{tabular}{ccc} $\rm{Cn}$ & $\rm{Nh^+}$ & $\rm{Og}$ \\ \hline $17.468(7s_{1/2})$ & $11.440(7s_{1/2})$ & $65.874(7p_{3/2})$ \\ $12.374(6d_{5/2})$ & $ 6.534(6d_{5/2})$ & $ 2.392(7p_{1/2})$ \\ $ 4.776(6d_{3/2})$ & $ 3.308(6d_{3/2})$ & $ 0.562(6d_{5/2})$ \\ $ 0.052(6p_{3/2})$ & $ 0.224(6p_{3/2})$ & $ 0.264(6d_{3/2})$ \\ $ 0.015(5f_{7/2})$ & $ 0.002(5f_{7/2})$ & $ 0.042(7s_{1/2})$ \\ \end{tabular} \end{ruledtabular} \end{center} \end{table} \begin{table} \caption{Five leading contributions to NLO term $\{\bf{ T_1^{(1)\dagger}D \ T_2^{(0)} + H.c.} \}$ (in a.u.) for $\alpha$ from core-core orbital pairs. This includes the pair-correlation contributions.} \label{t1dt2} \begin{center} \begin{ruledtabular} \begin{tabular}{cc} $\rm{Cn}$ & $\rm{Nh^+}$ \\ \hline $-0.618(7s_{1/2},6d_{5/2})$&$-0.420(7s_{1/2},6d_{5/2})$ \\ $-0.479(7s_{1/2},7s_{1/2})$&$-0.243(7s_{1/2},7s_{1/2})$ \\ $-0.405(6d_{5/2},6d_{5/2})$&$-0.235(7s_{1/2},6d_{3/2})$ \\ $-0.337(6d_{5/2},7s_{1/2})$&$-0.204(6d_{5/2},6d_{5/2})$ \\ $-0.327(7s_{1/2},6d_{3/2})$&$-0.171(6d_{5/2},7s_{1/2})$ \\ $\rm{Og}$ \\ $-2.805(7p_{3/2},7p_{3/2})$ \\ $-0.446(7p_{3/2},7p_{1/2})$ \\ $-0.365(7p_{3/2},6d_{5/2})$ \\ $-0.167(7p_{3/2},6d_{3/2})$ \\ $-0.114(7p_{1/2},7p_{3/2})$ \\ \end{tabular} \end{ruledtabular} \end{center} \end{table} \begin{figure*} \includegraphics[height=17cm, angle=-90]{dirac-fock_histogram.eps} \caption{In percentage, the { \em relative-DF-contribution } for group-12, group-13 and group-18 elements.} \label{fig_rdfc} \end{figure*} To assess the correlation effects from residual Coulomb interaction we define {\em relative-DF-contribution} (RDFC) as $$ {\rm RDFC} = \frac{\alpha_{\rm PRCC} - \alpha_{\rm DF}}{\alpha_{\rm DF}}, $$ and plot this for each of the groups in Fig. \ref{fig_rdfc} for all the four elements. As observed from the figure, we obtain similar trends for the group-12 and group-13 elements. For these groups, the RDFC is positive initially and then changes to negative. The reason for this is the drastic change in the nature of the core polarization contribution as function of Z, due to different screening of nuclear potential. The core polarization contribution is positive for first two elements and negative for the last two. This negative contribution reduces the PRCC value to lower than the DF value. A similar trend is also reported in the previous works \cite{seth-97,nash-05,pershina-08a} where the DF value for Cn is higher than the CCSD value. For the group-18 elements, the RDFC shows a slightly different trend. Except for Kr, it is negative for all the remaining elements. In addition, the magnitude decreases from Xe to Og. This could be attributed to the negative and decreasing core polarization contributions from Xe to Og. Our higher DF value, 56.20, for Og is consistent with the previous results in Refs. \cite{nash-05,pershina-08b} in which the reported DF values of 54.46 and 50.01, respectively, are larger than the CCSD values. The difference in the DF values could be due to the different basis used in these calculations, which also led to the different $\alpha$ values. \begin{figure*} \includegraphics[height=17cm, angle=-90]{core-polarization.eps} \caption{Five largest percentage contribution from core orbitals to LO term $\{\mathbf{T}_1^{(1)\dagger}\mathbf{D} + {\rm h.c.}\}$.} \label{fig_t1d} \end{figure*} \begin{figure*} \includegraphics[height=17cm, angle=-90]{contri_core-virt.eps} \caption{In percentage, five dominant dipolar mixing of cores with virtuals.} \label{fig_t1d2} \end{figure*} \begin{figure*} \includegraphics[height=17cm, angle=-90]{pair-correlation.eps} \caption{Five largest percentage contribution from core-core orbital pairs to NLO term.} \label{fig_t1dt2} \end{figure*} To gain further insights on the electron correlations effects subsumed in the PRCC theory, we examine the contributions from different terms. And, these are listed in the Table \ref{termwise}. As seen from the table, for all the SHEs, the LO contribution is from the term $\{\mathbf{T}_1^{(1)\dagger}\mathbf{D} + {\rm h.c.}\}$. This is to be expected, as it subsumes the contributions from DF and RPA. The contributions are larger than PRCC by $\approx$ 28\%, 25\% and 23\% for Cn, Nh$^+$ and Og, respectively. The contribution from the NLO term $\{\mathbf{T}_1{^{(1)\dagger}}\mathbf{D}T_2^{(0)}\}$ is small and opposite in phase to the LO term. It accounts for $\approx$ -11\%, -10\% and -7\% of the PRCC value for Cn, Nh$^+$ and Og, respectively. The next to NLO (NNLO) term is $\mathbf{T}_2{^{(1)\dagger}}\mathbf{D}T_2^{(0)}$ and contributes $\approx$ 6\%, 4\% and 6\% of the PRCC value. The contributions from the other terms are small, and the reason is the smaller magnitude of the $T_1^{(0)}$ CC operators. To examine in more detail, we assess the contributions from the core-polarization and pair-correlation effects. For the core-polarization, we identify five dominant contributions to the LO term and these are listed in the Table \ref{t1d}. Since the Cn and Nh$^+$ have the same ground state electronic configuration, both show similar correlation trends. For both, the most dominant contribution is from the valence orbital $7s_{1/2}$ and this is due to its larger radial extent. As shown in the Fig. \ref{fig_t1d}, the contribution from $7s_{1/2}$ is $\approx$ 50\% and 53\% of the LO value for Cn and Nh$^+$, respectively. For Cn, we find that more than 60\% of the $7s_{1/2}$ contribution arise from $\mathbf{T}_1{^{(1)}}$ involving the $8p_{1/2}$, $10p_{3/2}$ and $9p_{3/2}$ orbitals. Whereas for Nh$^+$, the $7p_{1/2}$ and $7p_{3/2}$ together contribute more than 87\% of the total contribution. The next two important contributions are from the core orbitals $6d_{5/2}$ and $6d_{3/2}$. The contribution from the former is almost double of the latter. In particular, for the Cn and Nh$^+$ the contributions from $6d_{5/2}$ is 35\% and 30\%, respectively. Whereas, the contribution from $6d_{3/2}$ is $\approx$ 14\% and 15\%, respectively. The larger contribution from $6d_{5/2}$ could be attributed to the strong dipolar mixing with $10p_{3/2}$ and $9p_{3/2}$ for Cn, and $7p_{3/2}$ and $11f_{7/2}$ for Nh$^+$ (see the Fig. \ref{fig_t1d2}). For Og, compare to Cn and Nh$^+$, we observe a different trend of core-polarization effect. More than 95\% of the contribution from the LO term arises from valence orbital $7p_{3/2}$. The other valence and core orbitals contribute less than 5\% and $7p_{1/2}$ contributes only $\approx$ 3\% of the LO term. The reason for this could be the larger radial extent of the $7p_{3/2}$ orbital as $7p_{1/2}$ orbital contracts due to relativistic effects. The five dominant contributions arise from the dipolar mixing of $7p_{3/2}$ with $10d_{5/2}$, $9d_{5/2}$, $10s_{1/2}$, $9s_{1/2}$ and $11s_{1/2}$ orbitals. These orbitals together contribute $\approx$ 73\% of the total contribution (see the Fig. \ref{fig_t1d2}). To assess the contribution from pair-correlation effects we consider the NLO term and identify the dominant contributions to it. These are listed in the Table \ref{t1dt2} in terms of the pairs of core orbitals and these correspond to the $T_2^{(0)}$ with dominant contributions. This is an appropriate approach as the most dominant term involving doubly excited cluster operator is the NLO term. For better illustration the percentage contribution to those listed in Table \ref{t1dt2} are plotted in the Fig. \ref{fig_t1dt2}. For both Cn and Nh$^+$, the first two dominant contributions are from the $(7s_{1/2},6d_{5/2})$ and $(7s_{1/2},7s_{1/2})$ core-orbital pairs. In percentage, these are $\approx$ -20\% and -16\% for Cn, whereas $\approx$ -24\% and -14\% for Nh$^+$. Though the next three contributions are from the same core-orbital pairs, $(6d_{5/2},6d_{5/2})$, $(6d_{5/2},7s_{1/2})$ and $(7s_{1/2},6d_{3/2})$, in both the elements, there are differences in terms of the order in which they contribute. Like in the core-polarization effect, we observe a different trend for Og. About 70\% of the total contribution is from only the $(7p_{3/2},7p_{3/2})$ orbital pair. \subsection{Breit and QED corrections} \begin{table} \caption{Contributions to $\alpha$ from Breit interaction, vacuum polarization and the self-energy corrections in atomic units.} \label{breit_qed} \begin{center} \begin{ruledtabular} \begin{tabular}{llccc} Elements & $Z$ & Breit int. & Self-ene. & Vacuum-pol.\\ \hline \multicolumn{3}{r}{Group-12} \\ \hline Zn & $30$ & $-0.0928$ & $0.0221$ & $-0.0038$ \\ Cd & $48$ & $-0.0953$ & $0.0648$ & $-0.0159$ \\ Hg & $80$ & $ 0.0519$ & $0.0933$ & $-0.0358$ \\ Cn & $112$ & $ 0.0802$ & $0.1072$ & $-0.0557$ \\ \multicolumn{3}{r}{Group-13} \\ \hline Ga$^+$ & $31$ & $-0.3006$ & $0.0090$ & $-0.0018$ \\ In$^+$ & $49$ & $-0.3647$ & $0.0249$ & $-0.0070$ \\ Tl$^+$ & $81$ & $-0.1283$ & $0.0526$ & $-0.0274$ \\ Nh$^+$ & $113$ & $ 0.0366$ & $0.0794$ & $-0.0440$ \\ \multicolumn{3}{r}{Group-18} \\ \hline Kr & $36$ & $0.0179$ & $0.0011$ & $0.0009$ \\ Xe & $54$ & $0.0213$ & $0.0042$ & $0.0031$ \\ Rn & $86$ & $0.0226$ & $0.0239$ & $0.0181$ \\ Og & $118$ & $0.0472$ & $0.1162$ & $0.1769$ \\ \end{tabular} \end{ruledtabular} \end{center} \end{table} \begin{figure*} \includegraphics[height=17cm, angle=-90]{breit.eps} \caption{Percentage contribution from Breit interaction to group-12, group-13 and group-18 elements.} \label{fig_breit} \end{figure*} \begin{figure*} \includegraphics[height=17cm, angle=-90]{vacuum-pol.eps} \caption{Percentage contribution from vacuum polarization to group-12, group-13 and group-18 elements.} \label{fig_vacu} \end{figure*} \begin{figure*} \includegraphics[height=17cm, angle=-90]{self-energy.eps} \caption{Percentage contribution from self-energy correction to group-12, group-13 and group-18 elements.} \label{fig_self} \end{figure*} To analyze the trend of correlation effects arising from the Breit interaction, vacuum polarization and the self-energy corrections as function of $Z$, we separate the contributions from these interactions. And, these are listed in the Table \ref{breit_qed}. In addition, for comparison and to show the trends in the group, the percentage contributions from the corresponding groups in the periodic table of the SHEs are shown in Figs. \ref{fig_breit}, \ref{fig_vacu} and \ref{fig_self}, respectively. For the Breit interaction, as we see from the Fig. \ref{fig_breit}, except for the Cn and Og, we observe a trend of decreasing contributions with increasing $Z$ within the groups. One common trend we observe in the contributions to SHEs is that, all are in the same phase as PRCC, and hence increase the value of $\alpha$. For lighter elements, however, we get a mixed phase for contributions. For the corrections from the vacuum polarization and self energy, from the Figs. \ref{fig_vacu} and \ref{fig_self} we see that, the contribution from both the vacuum polarization and self energy increases with $Z$ for all the three groups. This is as expected. For the vacuum polarization, the effect is larger due to higher nuclear charge $Z$. And, for the self energy, the correction depends on the energy of the orbital, which again depends on the nuclear charge. In terms of the phase of the contributions from vacuum polarization, these are in opposite to PRCC value for all the elements of group-12 and group-13, and hence lowers the value of $\alpha$. For group-18, however, we observe the contributions of the same phase as PRCC. In terms of magnitude, the contributions are $\approx$ 0.21$\%$, 0.26$\%$ and 0.31$\%$ of the PRCC value for Cn, Nh$^+$ and Og, respectively. For the self energy, one prominent feature of the contributions we observe is that it is positive for all elements in all the three groups, and therefore increase the value of $\alpha$. The contributions in the case of Cn, Nh$^+$ and Og are $\approx$ 0.4\%, 0.5\% and 0.2\% of the PRCC value, respectively. \subsection{Theoretical uncertainty} In this section we discuss the theoretical uncertainty associated with our results for $\alpha$. For this, we have identified four different sources which can contribute. The first source of uncertainty is the truncation of the basis set in our calculations. The recommended values of $\alpha$ in Table \ref{final-alpha} are obtained from the sum of the converged value with basis up to $h$-symmetry (see the convergence Table \ref{con-alpha}) and the estimated contribution from $i$, $j$ and $k$-symmetries. The combine contribution from $i$, $j$ and $k$-symmetries are $\approx$ 0.5\%, 0.07\% and 0.02\%, respectively, for Cn, Nh$^+$ and Og. Though the contributions from the virtuals beyond $k$-symmetry is expected to be much lower, we select the highest contribution of 0.5\% from the case of Cn and attribute this as an upper bound to this source of uncertainty. The second source is the truncation of the dressed operator $\bar{\mathbf{D}}$ in Eq. (\ref{dbar}) to second order in $T^{(0)}$. In our previous work \cite{mani-10}, we concluded that the contribution from the remaining higher order terms is less than 0.1\%. So, from this source of uncertainty we consider 0.1\% as an upper bound. The third source is the partial inclusion of triple excitations in PRCC theory. The partial triples contribute $\approx$ 1.9\%, 0.04\%, 0.5\% of the PRCC value for Cn, Nh$^+$ and Og, respectively. Since the perturbative triples account for the dominant contribution, we choose the highest contribution of $1.9$\% from Cn and take it as an upper bound. And, the last source of theoretical uncertainty is associated with the frequency-dependent Breit interaction which is not included in the present work. To estimate an upper bound to from source we use our previous work \cite{chattopadhyay-14} where using GRASP2K calculations we estimated an upper bound of $0.13$\% for Ra. Using this with the Breit contributions, we derive $\approx$ 0.62\%, 0.45\% and 0.18\% as the contributions to Cn, Nh$^+$ and Og, respectively. Among these, we select the highest contribution of 0.62\% from the case of Cn and attribute this as an upper bound. There could be other sources of theoretical uncertainty, such as the higher order coupled perturbation of vacuum polarization and self-energy terms, quadruply and higher excited cluster operators, etc. These, however, have much lower contributions and their combined uncertainty could be below 0.1\%. Finally, combining the upper bounds of all four sources of uncertainties, we estimate a theoretical uncertainty of 3.2\% in the recommended values of $\alpha$. \section{Conclusion} We have employed a fully relativistic coupled-cluster theory to compute the ground state electric dipole polarizability and electron correlation energy of SHEs Cn, Nh$^+$ and Og. In addition, to understand the trend of electron correlation as function of $Z$, we have calculated the correlation energies of three lighter homologs for each SHEs. To improve the accuracy of our results, contributions from the Breit interaction, QED corrections and partial triple excitations are also included. Moreover, in all calculations, very large bases up to $l$-symmetry are used to check the convergence of the results. Our recommended values of $\alpha$ for SHEs lie between the previous results, more closer to the values from CCSD(T) \cite{pershina-08a,jerabek-18} and RPA \cite{dzuba-16} calculations. From our calculations we find that the dominant contribution to $\alpha$ comes from the valence electrons, viz, $7s_{1/2}$ for both Cn and Nh$^+$, and $7p_{3/2}$ for Og. While $7s_{1/2}$ contributes more than 50\% of the total value for Cn and Nh$^+$, the contribution from $7p_{3/2}$ orbital to Og is more than 95\%. This could be attributed to the larger radial extent of these orbitals. From the analysis of electron correlation effects, we find that, for all three groups, the core polarization contribution decreases as function of Z for the lighter homologs. For SHEs, however, we observed an increased contribution, of the order of the first element considered in each group. For the corrections from the Breit interaction, except for Cn and Og, a trend of decreasing contributions as function of Z is observed. On contrary, for Uehling potential and the self-energy corrections, we observed a trend of increasing contributions from lighter homologs to SHEs. The largest contributions from the Uehling potential are $\approx 0.2$\%, $0.3$\% and $0.3$\% of PRCC value for Cn, Nh$^+$ and Og, respectively. And, the same from the self-energy corrections are $\approx 0.4$\%, $0.2$\% and $0.1$\%, respectively. The combined Breit+QED corrections to $\alpha$ are observed to be $\approx 0.5$\%, $0.4$\% and $0.6$\% for Cn, Nh$^+$ and Og, respectively. Considering the importance of accurate properties results of SHEs, these are significant contributions, and can not be neglected. We report the first result on the electron correlation energy for SHEs Cn, Nh$^+$ and Og using RCC. From our detailed analysis on correlation energy, we find that the second-order MBPT calculations overestimate the electron correlation energy for all superheavy elements and lighter homologs considered in this work. \begin{acknowledgments} We would like to thank Chandan Kumar Vishwakarma for useful discussions. One of the authors, BKM, acknowledges the funding support from the SERB (ECR/2016/001454). The results presented in the paper are based on the computations using the High Performance Computing cluster, Padum, at the Indian Institute of Technology Delhi, New Delhi. \end{acknowledgments} \newpage
\section{Introduction}\label{sec:intro} In this article we present a model-independent and fully automated approach to the statistical analysis of simulation models and, especially, agent-based models (ABMs). Leveraging a tool-box of efficient algorithms to inspect simulations and perform model-based counter-factual analysis, our approach (i) is easy-to-use by the modeller, (ii) improves reproducibility of the results, (iii) distributes simulations across the cores of a machine or across computer networks, (iv) automatically chooses a sufficient number of simulations and simulation steps to reach a user-specified statistical confidence, and (v) automatically runs a variety of statistical tests that are often overlooked by practitioners. In particular, the proposed approach allows one to distinguish the \textit{transient dynamics} of the model from its \textit{steady state behaviour} (if any), to estimate properties of the model in both ``phases'', to check whether the ergodicity assumption is reasonabl , and to equip the results with statistical guarantees, allowing for robust comparison of model behaviours' across computational experiments. In the last two decades, the use of Agent-Based Models (ABMs) has spread across several fields -- including ecology \citep{grimm2013}, health care \citep{eff12}, sociology \citep{macy2002}, geography \citep{brown2005}, medicine \citep{An2009}, research in bioterrorism \citep{carley2006}, and military tactics \citep{ila97}. In economics, ABMs contributed to the understanding of a variety of micro and macro phenomena \citep{tesfatsion2006handbook}. They provided an alternative environment for policy-testing in the aftermath of the last financial crisis, when more traditional approaches (e.g., dynamic stochastic general equilibrium models and computable general equilibrium models) failed \citep{Fagiolo_Roventini_2012,fagiolo2017macroeconomic}. Moreover, they were recently used for macroeconomic forecasting with promising results \citep{gatti2020rising}. The key advantage of ABMs is the flexibility they allow in modelling realistic micro-level behaviours (e.g., bounded rationality, routines, stochastic decision processes) and agents' interactions (e.g., imitation, network effects, spatial influence), which give rise to aggregate dynamics that are qualitatively different from those at the individual level (emergent properties). This advantage comes at the cost of model complexity, which typically prevents analytical treatment and forces the modeller to rely on numerical simulations. Typically, little attention has been devoted to simulation protocols. Yet decisions about (i) how many steps to run, (ii) how many steps to ``cut'' up front as transient (aka, the warm-up period), and (iii) how many runs to perform under each parameter configuration, deeply influence an analysis and the reliability of its results. For example, statements like ``\emph{the results have been averaged over $n$ simulations}'' or ``\emph{we run a Monte Carlo exercise of size $n$}'', without a proper justification for the choice of $n$, are rather ubiquitous \citep[see e.g.][]{beygelzimer2012,kets2014,caiani2016agent,lamperti2018_fsc,lamperti2019public,dosi2019endogenous,fagiolo2020}. This can lead to ineffective estimates of model behaviour, with low precision and poor statistical confidence. While irrelevant for ``thought experiments'', these aspects deserve more attention when different policies are compared in counter-factual simulation experiments, or multiple parameter configurations are explored to discriminate among emerging behaviours. \cite{Secchi2017} conducted a study on 55 ABMs published between 2010 and 2013 in high-quality management and organizational science journals. Their study showed that - in most cases - simulation exercises did not offer acceptable statistical quality\footnote{The authors analyzed the power of t-tests in simulations on different model parametrizations. }, casting doubt on the results and their implications. The main cause of low statistical accuracy turned out to be an insufficient number ($n$) of simulations performed. Similarly, a poor handling of transient behaviours can distort results. As we will show in Section~\ref{sec:predmarket}, discarding ``\emph{the initial $w$ periods from each simulation to focus on the stationary behaviour}''~\citep[see, e.g.,][]{kets2014} without a proper justification for the choice of $w$ can lead to misleading conclusions about steady state properties. Furthermore, as we illustrate in Section~\ref{sec:nonergodic}, ergodicity tests are necessary in order to establish whether performing a steady state analysis makes sense at all. In our opinion, these problems are due to the fact that the simulation-based analysis of ABMs (i.e., the inspection of models' simulations) is often \emph{handcrafted}, resulting in a time-consuming and error-prone process \citep[see also][]{lee2015complexities}. The simulation, operations research, and computer science communities have substantially advanced the engineering of such tasks, developing automatic techniques equipped with statistical guarantees \citep[see, e.g.,][ ]{10.5555/554952}. While cross-disciplines fertilisation has recently increased \citep{dahlke2020juice}, these developments are often overlooked by the so-called ACE (agent-based computational economics) community. In Section~\ref{sec:outputanalysis}, we use the model by \cite{grazzini2012analysis} to illustrate an example concerning the identification of transient dynamics. In this article we introduce a novel fully-automated and engineered approach to ABMs inspection. We borrow the statistical model checking approach from computer science \citep{Agha18,LLTYSG19} to efficiently analyse stochastic simulation models and equip results with statistical guarantees. In particular, we propose novel, streamlined, parallelized and automated algorithms to carry out both \textit{transient analysis} (estimating the average dynamics of the model at specific time points and characterizing the associated uncertainty) and \textit{steady state analysis} (estimating the average dynamics of the model \emph{on the long run} by estimating and removing the transient period) -- and show that such algorithms are computationally efficient. We also equip our steady state analysis with a methodology for \textit{ergodicity diagnostics}, which provides indications on whether the model behaves ergodically, and thus on the the reliability of the steady state analysis itself. Our work contributes to two strands of the ACE literature. First, it complements many recent proposals for the validation of simulated models \citep[see the surveys in][]{fagiolo2019validation, lux2018empirical}. For example, the method proposed by \cite{guerini2017method} for macro ABMs requires the model to be in a steady state as well as the removal of all observations belonging to the transient period, and calibration approaches based on simulated moments \citep{winker2007, franke2012structural, grazzini2015estimation}, as well as recent Bayesian techniques \citep[e.g.][]{Grazzini2017}, typically apply to ergodic models. From a different perspective, our transient analysis can evaluate multiple features at each time step -- including the probabilities of observing certain patterns -- and thus can support the use of validation metrics recently proposed in the literature \citep[e.g.][]{barde2016direct, lamperti2018empirical, lamperti2018information}. Second, we contribute to the analysis of the complexities of ABMs' output \citep{lee2015complexities, mandes2017complexity, kuka2020} by providing fast and practical tools to inspect models with statistical guarantees \citep{Secchi2017}, and by complementing the proposals in \cite{seri2017} for determining the adequate number of simulation runs to use. Finally, we offer an automated environment to carry out tests across experiments that are typical in the macro ABM literature \cite[see e.g.][]{Dosi15}. We validate our approach on two models from the literature.~\footnote{Material for replicating the experiments presented in this paper is available at \url{https://github.com/andrea-vandin/MultiVeStA/wiki}} In Section~\ref{sec:macro} we replicate and enrich the transient analysis from~\cite{caiani2016agent} on a large scale benchmark stock flow consistent macro ABM. We optimize the number of simulations to reach a given (user-defined) level of statistical precision for each time point of interest. We show how this is necessary to establish, in a statistically sound manner, differences across model configurations -- thereby facilitating counter-factual policy analysis. In Section~\ref{sec:predmarket} we perform a steady state analysis of the prediction market model of \cite{kets2014}. This model has been chosen because of its analytical tractability, which provides an effective ground truth against which we test our framework \footnote{The model has been analytically studied in~\cite{bottazzigiachini2019b}, proving asymptotic results about agents' wealth and market price.}. We show that an erroneous identification of the transient period led to misleading qualitative and quantitative results in the original simulation-based analysis by~\cite{kets2014}; the number of long-run surviving agents and the relationships among market price and other model parameters were incorrectly characterized, and the agents' relative wealths were miscomputed. Instead, our framework allows us to correctly detect the transient period and correctly characterize the (analytically known) steady state properties by \cite{bottazzigiachini2019b}. In Section~\ref{sec:nonergodic} we also apply our methodology for ergodicity analysis to (non-ergodic) variants of this prediction market model, showing how it can be used to further increase the reliability of a steady state analysis. Finally, we highlight how the distributed nature of our algorithms allows us to automatically parallelise simulations in the cores of a computer without modifying the original (purely sequential) model. This affords, e.g., a 20x speed-up on a machine with 20 physical cores -- in the case of the macro ABM model, this resulted in a decrease of analysis run-time from 15 days to about 16 hours. From a technical perspective, our framework builds on MultiVeStA\xspace~\citep{SebastioV13,GilmoreRV17}, a statistical model checker that can be integrated with existing simulators to perform automated and distributed statistical analysis. MultiVeStA\xspace{} has been successfully applied in a wide range of domains including, e.g., highly-configurable systems \citep{BeekLLV20,DBLP:journals/corr/BeekLLV15}, public transportation systems \citep{gilmore2014analysis,ciancia2016tool,GilmoreRV17}, biological systems~\citep{GilmoreRV17}, robotic scenarios with planning capabilities~\citep{belzner2015onplan,belzner2014reasoning}, and crowd steering scenarios~\citep{DBLP:conf/hpcs/PianiniSV14}. However, it has never been applied to the ABM domain. Further, its main focus so far was on transient analysis (without support for counter-factual analysis). Here we extend it to fully support the above mentioned tasks. \footnote{ MultiVeStA\xspace{} supports Java, R, C++, and Python simulators. The extension regards support for statistical tests (and their power) to compare different model parametrizations, and ex-novo development of steady state analysis. Furthermore, by applying it to two known ABM models, we also contribute to increasing the accessibility of ABMs and to the replicability of their results. MultiVeStA\xspace is maintained by one of the authors. } The reminder of this article is organized as follows. Section~\ref{sec:outputanalysis} discusses the analysis of simulation output. Section~\ref{sec:algorithms} and~\ref{sec:methodologyergodicity} present our algorithms and methodology, respectively, and Section~\ref{sec:mv} introduces MultiVeStA\xspace. Sections~\ref{sec:macro} and~\ref{sec:predmarket} illustrate our transient and steady state analysis techniques using two ABM models from the literature. Section~\ref{sec:nonergodic} showcases our methodology for ergodicity analysis. Section~\ref{sec:parallelizationstudy} demonstrates the run-time gains afforded by MultiVeStA\xspace{}'s parallelization capabilities, and Section~\ref{sec:conclusions} provides some conclusions. \section{ Analysis of simulation output }\label{sec:outputanalysis} ABM analysis typically employs stochastic simulations, relying on Monte Carlo methods, to derive reliable estimates of the true model characteristics \citep{richiardi2006common, lee2015complexities, fagiolo2019validation}. Without loss of generality, one can represent an ABM as a mapping $\textit{map}: I \rightarrow O$ from a set of input parameters $I$ into an output set $O$. $I$ is usually a multidimensional space spanned by the support of each parameter. $O$ is typically larger and more complex, as it comprises time-series realizations of a very large number of micro- and macro-level variables. In most cases we can think of the output of an ABM as a discrete-time stochastic process $(\mathbf{Y}_t)_{t>0}$ describing the longitudinal evolution of a vector of variables of interest (e.g., the wealth of an agent, the GDP of a country, etc.). For simplicity, here we focus on the case in which $(\mathbf{Y}_t)_{t>0}$ contains only one time series of interest $(Y_t)_{t>0}$. However, our framework straightforwadly covers the concurrent analysis of multiple time series. Figure~\ref{fig:nmsimsAnalysis}(a) depicts $n$ independent simulations of $Y_t$ (one per row) each comprising $t=1,\ldots, m$ steps (one per column) \footnote{By {\em independent simulations} we mean runs obtained from different random seeds that have been used for each replication, with the simulator status reset to an initial configuration at the beginning of each replication.}. The outcome of a simulation $i$ is therefore a sequence $\{y_{i,1},\ldots,y_{i,m}\}$ denoting a realization of length $m$. Clearly, the observations within the same row $i$ are not independent, while those in the same column $t$ are independent and identically distributed (IID). \begin{figure}[t] \centering \subfloat[Simulations]{\includegraphics[scale=0.5]{figures/outputAnalysis/nmsims2.pdf}} \hfill \subfloat[Transient analysis]{\includegraphics[scale=0.5]{figures/outputAnalysis/transient.pdf}} \hfill \subfloat[Steady state analysis by \emph{Replication and Deletion} (RD)]{\includegraphics[scale=0.5]{figures/outputAnalysis/rd2.pdf}} \caption{Transient and steady state analysis using \emph{n} simulations of \emph{m} steps each} \label{fig:nmsimsAnalysis} \end{figure} Here we focus on two typical classes of properties: \begin{itemize} \item \emph{Transient properties} concerning $E[Y_t]$; what is the expected value of a model's property at a given time $t$ (or within a time range, or at the occurrence of a specific event)? \item \emph{Steady state properties} concerning $E[Y]\!=\!\lim_{t\to\infty} E[Y_t]$; what is the expected value of a model's property at steady state i.e. when the system has reached a statistical equilibrium, or after the initial warm-up period)? \end{itemize} An example of transient property is given in Section~\ref{sec:macro}: \emph{what is the expected unemployment rate in each of the first 400 quarters of a macro ABM?} In this example a transient analysis is particularly important because the model has been designed to study fluctuations in the quarters following a given initial condition. In contrast, an example of steady state property is given in Sections~\ref{sec:predmarket} and~\ref{sec:nonergodic}: \emph{given a market with repeated sessions, what is the expected wealth of each agent at steady state?} In this example a steady state analysis is particularly important because the model has been designed to study problems of market selection and informative efficiency. Obviously a steady state analysis is meaningful only ``around'' a statistical equilibrium. This requires that $\lim_{t\to\infty} E[Y_t]$ exists and is finite. We first present two complementary techniques for steady state analysis that rely on such assumption, and then (in Section~\ref{sec:methodologyergodicity}) combine them into a methodology for ergodicity diagnostics; that is, for assessing whether the assumption is reasonable or clearly violated \footnote{We leave to future work extensions of our framework that would allow us to detect the number and nature of the statistical equilibria of a simulation model.} Figures ~\ref{fig:nmsimsAnalysis}(b) and (c) depict how to compute statistical estimates for $E[Y_t]$ and $E[Y]$. Such estimates can and should be accompanied by appropriate measure of uncertainty, e.g., computing ``$\alpha$-$\delta$ confidence intervals'' (CI) around them. Given two user-specified parameters $\alpha \in (0,1)$ and $\delta \in \mathbb{R}^{+}$, we will show how to guarantee with statistical confidence $(1-\alpha)\cdot 100\%$ that the actual expected value belongs to the interval of width $\delta$ centred at its estimate, and how to optimize the number of runs needed to obtain such guarantee. These steps, which are sometimes overlooked in the ABM community, can make the statistical analysis of any stochastic simulation model sounder and more informative for policy analysis. We now provide more details on our proposals for transient and steady state analyses. \paragraph{Transient analysis} Procedures for transient analysis are well-established and relatively simple. As shown in Figure~\ref{fig:nmsimsAnalysis}(b), for a given time of interest $t$ (a column) we obtain a natural (unbiased) estimator for $E[Y_t]$ by computing the \emph{vertical} mean $\overline{Y}_t$ of the observations at $t$ (across the rows). Since these observations are IID, we can use standard statistical techniques based on the law of large numbers to build CIs as follows (see Chapter 9 of~\citealp{10.5555/554952}): \begin{equation}\label{eq:ci} \overline{Y}_t \pm \mathbf{t}_{n-1,1-\frac{\alpha}{2}}\cdot\sqrt{\frac{s^2_t}{n}}\text{,} \end{equation} where $n$ is the number of simulations, $s^2_t$ is the sample variance of $Y_t$, and the multiplier $\mathbf{t}_{n-1,1-\frac{\alpha}{2}}$ is obtained from the tabulation of the Student's T distribution with $n-1$ degrees of freedom (the area under the density function integrated from minus infinity to $\mathbf{t}_{n-1,1-\frac{\alpha}{2}}$ is equal $1-\frac{\alpha}{2}$). For any fixed confidence level $\alpha$, the width of the CI decreases as $n$ increases. Therefore, in an automated procedure for computing an $\alpha$-$\delta$ CI, we can continue performing new simulations until the width becomes smaller than the desired $\delta$ (the target width can also be expressed as a fraction of the mean value; $\delta$\% of $\overline{Y}_t$ ). Note that the CI width shrinks slowly, at the rate of the square root of $n$. Therefore, it is important to perform the \emph{correct} number of simulations to guarantee the target width without performing unnecessary computations. MultiVeStA\xspace offers an automated procedure for doing so. Furthermore, since in many cases different times $t$ might have different variances $s^2_t$, we account for the fact that different number of simulations might be required at each $t$ to get CIs of homogeneous width across times. As we will se in Section~\ref{sec:counterfactual}, this is particularly important for counter-factual analysis. A common exercise that builds upon transient analysis is to compare estimates obtained for different model configurations (typically corresponding to different sets of input parameter values) -- as to assess whether the configurations differ significantly in terms of the output variable(s) under consideration. Given the outcomes of the transient analyses for the two configurations and a user-defined significance level $a_w$, our tool-box performs a \emph{Welch's t-test} of means' equality~\citep{welch1947} for every $t$ of interest. MultiVeStA\xspace also computes the power of such test~\citep{chow2002} in detecting a difference of at least a given (precision) $\varepsilon$ (see Section \ref{sssec:eqtest_power})~\footnote{ In Section~\ref{sec:counterfactual} we show that a reasonable choice is to set $\varepsilon=\delta$.}. \paragraph{Steady state analysis} As depicted in Figure~\ref{fig:nmsimsAnalysis}(c), a steady state analysis can be performed similarly to a transient analysis by adding a pre-processing step. We first compute the \emph{horizontal} mean $\overline{Y}_i(w)$ within each simulation $i$, ignoring a given number of initial observations $w$. Since all these means are IID, we can compute their \emph{vertical} mean $\overline{Y}(w)$ and build a CI around it as in Equation~\eqref{eq:ci}. Unfortunately, this approach has intricacies that hinder its automatic implementation and can lead to relevant analysis errors. Depending on the chosen number $w$ of initial observations to discard, the estimator $\overline{Y}(w)$ of $E[Y]$ might carry a bias due to the transient behavior of the system, and not give us reliable information on its steady state (see Section~\ref{manual} for a notable example from the literature). In order to avoid this issue, we need to identify the \emph{correct} $w$ the system needs to exit its transient (or \emph{warmup}) period, and discard the initial $w$ observations from each simulation. Such procedure is known as \emph{Replication and Deletion}~\citep[RD, ][]{10.5555/554952}. Effectively identifying the length of the warmup period is a difficult problem. The most popular approaches in the ABM community are rooted in the Welch's method~\citep{welch1983statistical}: \begin{enumerate} \item Perform $n$ simulations of given length $m$ and compute averages $\overline{Y}_t$, $t=1,\ldots,m$ as in Figure~\ref{fig:nmsimsAnalysis}(b); \label{point1} \item Plot $\overline{Y}_t$, $t=1,\ldots,m$ \label{pointplot}\footnote{In point~(\ref{pointplot}) one might smooth the plot, e.g., employing moving-windows averages, where one is in effect further averaging each $\overline{Y}_t$ with a few neighbouring steps.}; \item Choose the time $w$ after which the plot \emph{seems to converge}. If no such time exists, iterate the procedure from point~(\ref{point1}), performing a new batch of $n$ simulations of length $m$, and computing averages over all simulations. \end{enumerate} Being only semi-automated and based on a visual assessment, this procedure is time consuming, error-prone, and not backed by a strong statistical justification. It also critically depends on choosing a large enough ``time horizon'' $m$ -- of course progressively larger $m$ can be tried, adding to the computational burden. More recently, \cite{grazzini2012analysis} presented an alternative approach where a single simulation of length $m$ is performed and divided into \emph{windows} of length $\mathit{wi}$ ($m$ and $\mathit{wi}$ are arbitrarily chosen). If the distribution of the means computed within each window passes a randomness test~\citep[in particular the Runs Test by][]{doi:10.1002/bimj.4710280806,10.2307/2235872}, then the author concludes that the system is in steady state. The use of statistical tests rather than visual assessments makes the approach more reliable, fostering its use in the ABM literature~\citep[e.g.,][]{guerini2017method, lamperti2020climate}. However, the approach is still not fully automated -- and relies on the arbitrary choice of $m$ and $\mathit{wi}$; quoting from the author ``\emph{with appropriate settings the tests can detect non-stationarity}''~\citep{grazzini2012analysis}. In the next Section we introduce a fully automated statistical procedure for estimating the end of the warmup period. \section{Automated simulation-based analysis with statistical guarantees}\label{sec:algorithms} Our approach to transient and steady state analysis is fully automated, in that all parameters are computed automatically or have default values. The user specifies the properties to be studied, the $\alpha$ and $\delta$ parameters to be employed in the CI construction, and an optional maximum number of allowed simulations (if this number is reached before satisfying the CI constraints, the analysis terminates with the currently computed CIs). As in Section~\ref{sec:outputanalysis}, we focus the description on a single variable $Y_t$, but our treatment applies straightforwardly to the analysis of multiple model characteristics (indeed, MultiVeStA\xspace implements multi-variable analyses). \subsection{Transient analysis}\label{subsec:transient} Section~\ref{sec:mean_ci} describes how to estimate transient properties expressed as expected values, $E[Y_t]$, and how to build CIs around them. After this, Section~\ref{sssec:eqtest_power} describes how to statistically compare estimates from different experiments. \subsubsection{ Mean estimation and CI computation}\label{sec:mean_ci} Algorithm~\ref{algorithm:autotransient} illustrates \texttt{autoIR}\xspace, a simple automated algorithm for transient analysis that takes in input $\mathit{bl}$ (discussed later), a time of interest $t$, and $\alpha$ and $\delta$, and produces in output an estimate of $E[Y_t]$ and a corresponding CI. The algorithm determines automatically the number $n$ of simulations required to guarantee that the $(1-\alpha) \times 100\%$ CI centred at the estimate has width at most $\delta$. \llines{tr1}{tr3} set $t$ as time horizon $m$, and initialize the counter $n$ of computed simulations and the list $\mu$ to store the observations at step $t$ from each simulation (the $y_{i,t}$ in Figure~\ref{fig:nmsimsAnalysis}(b)). \llines{for1}{forend} perform a \emph{block} of $\mathit{bl}$ simulations (by default $20$~\citep{10.5555/554952}), populating $\mu$. In \lline{draw}, $y$ is a list of size $m$ containing a value $y_{i,t}$ for each time point $t$ from $1$ to $m$ for the current simulation $i$, but only the value for $t=m$ is used, adding it to $\mu$. After performing $\mathit{bl}$ simulations, \transient computes the mean $\overline{\mu}$ and variance $s^2$ of $\mu$, used to compute the width $d$ of the current CI. If $d$ is greater than $\delta$, \footnote{For the sake of presentation, all algorithms in the paper consider $\delta$ given as absolute values. The case of $\delta$ given in percentage terms relatively to the studied means is trivially obtained by changing the comparisons $d>\delta$ in ${d}/{\overline{\mu}}>\delta$.} \transient performs another block of $\textit{bl}$ simulations, otherwise it returns the current CI. The implementation of \transient in MultiVeStA\xspace allows one to concurrently estimate $E[Y_t]$ for different time points $t$ (e.g. average bankruptcies in each $t$ from $1$ to $400$ in Section~\ref{sec:macro}). This is done by computing, at each iteration, mean, variance and CI only for the elements of $y$ (\lline{draw}) that correspond to time points whose current CI width is still above $\delta$. At each iteration of a block of $\mathit{bl}$ simulations, the time horizon $m$ is updated with the largest $t$ still to be processed. \subsubsection{Test for equality of means and power computation} \label{sssec:eqtest_power} MultiVeStA\xspace{} allows one to compare, in a statistically meaningful and reliable way, expected values corresponding to different settings or parametrizations of a model. Given that the compared means might come from experiments with different sample sizes and variances, we use the Welch's t-test~\citep{welch1947}, whose \emph{power} can be computed as in \cite{chow2002}. \begin{figure}[t] \centering \scalebox{0.83}{ \begin{minipage}{.53\linewidth} \begin{algorithm}[H] \caption{\label{algorithm:autotransient} \texttt{autoIR}\xspace: \emph{Transient analysis}} \begin{algorithmic}[1] \Require {\small $\mathit{bl}$, $\alpha$, $\delta$, $t$ (default: 20, 0.05, 0.1, NA)} \State //\emph{Set $t$ as time horizon $m$, and initialize data structures}\label{tr0} \State $\mathit{m} \leftarrow \mathit{t}$\label{tr1} \State $n \leftarrow 0$\label{tr2} \State $\mu \leftarrow \text{empty list}$\label{tr3} \Repeat \label{repeat1} \For{$i \in \{1,\ldots, bl\}$}\label{for1} \State $y \leftarrow \texttt{drawIndependentSimulation}(m)$\label{draw} \State //\emph{Add $y_{i,t}$ to $\mu$ \State $\mu.\texttt{add}(y[m])$\label{trym} \State $n \leftarrow n+1$ \EndFor\label{forend} \State $(\overline{\mu},s^2) \leftarrow \texttt{computeMeanAndVariance}(\mu)$\label{mean} \State $d \leftarrow \texttt{computeCIWidth}(\overline{\mu},s^2,n,\alpha)$\label{ci} \Until{$d > \delta$}\label{repeatend} \State \Return $(1-\alpha)\cdot100\%$ CI $[\overline{\mu} - \frac{d}{2},\overline{\mu} + \frac{d}{2}]$ of width at most $\delta$ \end{algorithmic} \end{algorithm} \end{minipage} } \hfill \scalebox{0.83}{ \begin{minipage}{.615\linewidth} \begin{algorithm}[H] \caption{\label{algorithm:autord} \texttt{autoRD}\xspace: \emph{Steady state analysis by Replication and Deletion}} \begin{algorithmic}[1] \Require {\small $B$, $b$, $\mathit{bs}$, $\mathit{minVar}$, $\mathit{bl}$, $\alpha$, $\delta$ (default: 128, 4, 16, 1E-7, 20, 0.05, 0.1)} \State $\mathit{w} \leftarrow \texttt{autoWarmup}\xspace(B,b,\mathit{bs},\mathit{minVar})$ \label{autord1} \State $\mathit{m} \leftarrow \mathit{w}\cdot 2$\label{autord2} \State $n \leftarrow 0$ \State $\mu \leftarrow \text{empty list}$\label{autord3} \Repeat \For{$i \in \{1,\ldots, bl\}$} \State $y \leftarrow \texttt{drawIndependentSimulation}(m)$ \State $y' \leftarrow (y_{w+1},\ldots, y_{m})$ \label{rdw} \State $\mu.\texttt{add}(\texttt{computeMean}(y'))$\label{rdmean} \State $n \leftarrow n+1$ \EndFor \State $(\overline{\mu},s^2) \leftarrow \texttt{computeMeanAndVariance}(\mu)$ \State $d \leftarrow \texttt{computeCIWidth}(\overline{\mu},s^2,n)$ \Until{$d > \delta$} \State \Return $(1-\alpha)\cdot100\%$ CI $[\overline{\mu} - \frac{d}{2},\overline{\mu} + \frac{d}{2}]$ of width at most $\delta$ \end{algorithmic} \end{algorithm} \end{minipage} } \end{figure} \paragraph*{The Welch's t-test} Given estimates from two transient analyses for a set of time points $T$, our tool performs a test for equality of means for each $t\in T$ using \citep{welch1947}. In symbols, given two experiments $\{j,k\}$, define the set of triplets $\mathcal{D}=\{(\overline{Y}_{i,t},s^2_{i,t},n_{i,t})\mid i\in \{j,k\}, t\in T\}$, each containing the mean, the sample variance, and number of simulations for time $t$ in experiment $i$. MultiVeStA\xspace{} takes $\mathcal{D}$ as input and, for each $t$, computes \begin{equation} \tau_t=\dfrac{\overline{Y}_{j,t}-\overline{Y}_{k,t}}{\sqrt{f_{j,t}+f_{k,t}}} \ \ , \label{eq:Welchtt} \end{equation} where $f_{i,t}={s^2_{i,t}}/{n_{i,t}}$, $i \in \{j,k\}$. Following \cite{welch1947}, under the null hypothesis that the difference between the two means is zero, each $\tau_t$ follows a Student's t-distribution with degrees of freedom approximated as in \cite{satterthwaite1946}: \begin{equation*} \nu_t\approx\dfrac{(f_{j,t}+f_{k,t})^2} {{f_{j,t}^2}/{(n_{j,t}-1)} + {f_{k,t}^2}/{(n_{k,t}-1)}} \ \ . \end{equation*} Therefore, given a statistical significance $a_w$, MultiVeStA\xspace{} uses $\tau_t$ to perform the test of no difference between the two means producing $1$ if $\tau_t\in[-\mathbf{t}_{\nu_t,1-\frac{ a_w}{2}},\mathbf{t}_{\nu_t,1-\frac{ a_w}{2}}]$ (the null hypothesis of equal means is not rejected) and $0$ otherwise. The significance $a_w$ is user-specified, and can be set to be equal to the $\alpha$ used for the transient analysis. \paragraph*{Power of the test} Following \cite{chow2002}, MultiVeStA\xspace{} estimates the power $1-\beta_t$ of Welch's t-test in detecting a difference of at least a given precision $\varepsilon$ between the two means at time $t$. This is \begin{equation}\label{eq:power} \beta_t=\mathcal{T}_{\nu_t}\left(\mathbf{t}_{\nu_t,1-\frac{a_w}{2}}\Bigg{|}\frac{|\varepsilon|}{\sqrt{f_{j,t}+f_{k,t}}}\right) \ \ , \end{equation} where $\mathcal{T}_{\nu_t}(x \,|\, \theta)$ is the cumulative distribution function of a non-central t-distribution with $\nu_t$ degrees of freedom and non-centrality parameter $\theta$, evaluated at point $x$. Calculating the power of Welch's t-test requires specifying the minimum difference $\varepsilon$ \citep{chow2002}. As a rule of thumb, we suggest setting $\varepsilon\geq\delta$, the parameter used in the transient analysis, which expresses a precision for the estimated mean. In Section~\ref{sec:macro}, setting $\varepsilon=\delta$ leads to very good power for the considered macro ABM. \subsection{Steady state analysis}\label{subsec:steadystate} A statistically sound analysis of steady state properties poses challenges that have been thoroughly investigated by the simulation community -- at the boundary of computer science and operations research. Two main approaches have emerged~\citep{alexopoulos2004batch,whitt1991efficiency,10.5555/554952}: those based on {\em Replication and Deletion} (RD; see Section~\ref{sec:outputanalysis}), and those based on \emph{batch means} (BM) \citep{Conway1963,Alexopoulos1996,steiger2005asap3}. Unlike RD, which computes \emph{many short} simulations, BM computes \emph{one long} run which is evenly divided into adjacent non-overlapping subsamples labelled as \emph{batches}. Intuitively, if certain statistical properties hold, each batch can be used as a simulation in RD -- as depicted in Figure~\ref{fig:steadyBM}. This can be seen as a generalized version of the proposal by \cite{grazzini2012analysis}, which allows one to estimate the end of the warmup period rather than to check whether a given time is subsequent to such end\footnote{More precisely, \cite{grazzini2012analysis} appears to employ a non-automated version of BM. Yet the first automated version of BM was published in 1979~\citep{doi:10.1287/opre.27.5.1011}. This is a clear signal of the potential (and often overlooked) complementaries between the simulation community and the ABM community in economics. }. \begin{figure}[t] \centering \includegraphics[scale=0.5 {figures/outputAnalysis/bm2.pdf} \caption{\small Steady state analysis by \emph{Batch Means} (BM) using one long simulation: (i) We split the simulation into batches (consecutive steps) of size $b$, and we compute the mean within each batch (the batch means $\overline{B}_i$); (ii) We compute the mean of such means, the \emph{grand mean}, ignoring the first $l$ batches where it is assumed to terminate the warmup. We obtain $\overline{B}(l)$, an estimator for $E[Y]$. } \label{fig:steadyBM} \end{figure} There is no \emph{best} approach between RD and BM~\citep{alexopoulos2004batch,whitt1991efficiency,DBLP:journals/ior/KeltonL84}. They are complementary, and therefore have complementary (dis)advantages. RD, which uses many short simulations, suffers from biases due to initial conditions. BM, which uses many short batches from one long simulation, is less affected by initialisation bias but suffers from correlations among batch means. While some automated BM-based procedures have been proposed \citep[e.g.,][]{steiger2005asap3,tafazzoli2011performance,GilmoreRV17}, to the best of our knowledge, little attention has been paid to RD. Interestingly, \cite{lada2013ard} tried to combine the two approaches exploiting their respective strengths: they use BM for warmup analysis, and automate the use of RD by discarding the estimated transient behaviour from each simulation. Following a similar approach, we extract and condense the warmup analysis capabilities inspired by BM into a simple self-standing procedure for warmup estimation (\texttt{autoWarmup}\xspace), and we introduce automated RD- and BM-based algorithms (\texttt{autoRD}\xspace and \texttt{autoBM}\xspace, respectively) which use \texttt{autoWarmup}\xspace. In all algorithms (see Figure \ref{fig:algorithms}) we favour simplicity and accessibility. \subsubsection{Steady state analysis by replication and deletion}\label{sec:steadystaterd} Algorithm~\ref{algorithm:autord} illustrates \texttt{autoRD}\xspace. The \emph{difficult part} in automating RD is the warmup analysis. However, in our setting we can easily do this by invoking \texttt{autoWarmup}\xspace (\lline{autord1}; see Section~\ref{sec:steadystatewu} below). For now it is sufficient to know that $w$ is the last step of the estimated warmup period. Once $w$ has been determined, we have to set a \emph{substantially larger} time horizon~\citep{10.5555/554952}. We can do this using a (small) multiplier. In \lline{autord2} the default multiplier for $w$ is $2$. The code of \texttt{autoRD}\xspace presents also a second modification with respect to that of \transient: we replaced \lline{trym} of Algorithm~\ref{algorithm:autotransient} with \llines{rdw}{rdmean} of Algorithm~\ref{algorithm:autord} to discard the first $w$ observations from $y$, and add the mean of the remaining values of $y$ (the horizontal mean in Figure~\ref{fig:nmsimsAnalysis}(b)) to $\mu$. \subsubsection{Warmup estimation }\label{sec:steadystatewu} Algorithm~\ref{algorithm:autow} provides pseudo-code for our automatic warmup estimation, inspired by existing BM-based approaches for steady state analysis~\citep{steiger2005asap3,GilmoreRV17,tafazzoli2011performance}. Indeed, such algorithms include a form of warmup analysis that we extract and refine into a simple self-standing procedure. \llines{w1}{w2} perform a simulation of $m=B \times bs$ steps (by default, $B=128$ and $\mathit{bs}=16$). The simulation is divided in $B$ adjacent non-overlapping \emph{batches}, each containing $bs$ steps. After this, the array $\mu$ stores the mean of each batch (therefore the name \emph{batch means}): each entry $\mu[i]$ stores the corresponding $\overline{B}_i$ (see Figure~\ref{fig:steadyBM}). The algorithm then proceeds iteratively by performing statistical tests to check whether $m$ is large enough to cover the warmup period, doubling the number of performed steps while keeping the number of batches fixed (doubling the steps $\mathit{bs}$ in each batch) until all tests are passed. The key point is that if the process satisfies properties required for steady state analysis (\cite{doi:10.1287/opre.27.5.1011,doi:10.1287/ijoc.13.4.277.9737}; see also Section~\ref{sec:methodologyergodicity}), then such iterative procedure will lead to \emph{approximately} IID normally distributed batch means $\mu$ for a sufficiently large value of $\mathit{bs}$. \begin{figure}[t] \centering \scalebox{0.83}{ \begin{minipage}{.47\linewidth} \begin{algorithm}[H] \caption{\label{algorithm:autow} \texttt{autoWarmup}\xspace: \emph{Warmup estimation}} \begin{algorithmic}[1] \Require {\small $B$, $b$, $\mathit{bs}$, $\mathit{minVar}$, (default: 128, 4, 16, 1E-7)} \State //\emph{Draw the first $B\cdot \mathit{bs}$ steps}\label{w1} \State $\mu \leftarrow \texttt{array}(\mathit{B})$ \For{$i \in \{1,\ldots, B\}$}\label{wf1} \State $\mu[i] \leftarrow \texttt{drawBatchAndComputeMean}(\mathit{bs})$ \EndFor \label{w2} \State $(a, \rho) \leftarrow \texttt{goodnessOfFitTests}(\mu,b,\textit{minVar})$\label{wt1} \State //\emph{Keep doubling $\mathit{bs}$ and time horizon until tests pass} \While{$a > a^* \texttt{ or } \rho > \rho^*$} \label{wwhile1} \For{$i \in \{1,\ldots, B/2\}$}\label{wsqueeze1} \State $\mu[i] \leftarrow (\mu[2\cdot i] + \mu[2\cdot i+1]) / 2$ \EndFor\label{wsqueeze2} \State $\mathit{bs} \leftarrow 2\cdot \mathit{bs}$ \For{$i \in \{B/2+1,\ldots, B\}$}\label{wsecondhalf1} \State $\mu[i] \leftarrow \texttt{drawBatchAndComputeMean}(\mathit{bs})$ \EndFor\label{wsecondhalf2} \State $(a, \rho) \leftarrow \texttt{goodnessOfFitTests}(\mu,b,\textit{minVar})$ \EndWhile\label{wwhile2} \State \Return Warmup period estimated to terminated after $\mathit{B}\cdot\mathit{bs}$ steps \end{algorithmic} \end{algorithm} \begin{algorithm}[H] \caption{\label{algorithm:goodnessOfFitTests}\texttt{goodnessOfFitTests}} \begin{algorithmic}[1] \Require {\small $\mu$, $b$, $\emph{minVar}$} \State $\mu' \leftarrow (\mu_{b+1},\ldots, \mu_B)$\label{wmp} \State $(\overline{\mu},s^2) \leftarrow \texttt{computeMeanAndVariance}(\mu')$\label{wvar} \State $(\alpha,\rho) \leftarrow (0,0)$ \If{$s^2 > \mathit{minVar}$}\label{wvarc} \State $a \leftarrow \texttt{AndersonDarlingNormalityTest}(\mu',\overline{\mu},s^2)$\label{wnorm} \State $\rho \leftarrow \texttt{lag1Autocorrelation}(\mu',\overline{\mu},s^2)$\label{wautocorr} \EndIf \State \Return $(a, \rho)$; \end{algorithmic} \end{algorithm} \vspace{0.0cm} \end{minipage} } \hfill \scalebox{0.83}{ \begin{minipage}{.65\linewidth} \vspace{-0.05cm} \begin{algorithm}[H] \caption{\label{algorithm:autobm} \texttt{autoBM}\xspace: \emph{Steady state analysis by Batch Means}} \begin{algorithmic}[1] \Require {\small$B$, $b$, $\mathit{bs}$, $\mathit{minVar}$, $\alpha$, $\delta$ (default: 128, 4, 16, 1E-7, 0.05, 0.1)} \State $\texttt{autoWarmup}\xspace(B,b,\mathit{bs},\mathit{minVar})\ $ //\emph{Fast-forward simulation after warmup}\label{alg:autobm1} \State $\mu \leftarrow \texttt{array}(\mathit{B})$\label{alg:autobm3} \For{$i \in \{1,\ldots, B\}$} \State $\mu[i] \leftarrow \texttt{drawBatchAndComputeMean}(\mathit{bs})$ \EndFor \State $(a, \rho, \overline{\mu},d) \leftarrow \texttt{goodnessOfFitTestsAndCI}(\mu,b,\textit{minVar},\alpha)$ \State //\emph{Keep doubling $\mathit{bs}$ and time horizon until tests pass} \While{$a > a^* \texttt{ or } \rho > \rho^* \texttt{ or } d > \delta$} \For{$i \in \{1,\ldots, B/2\}$} \State $\mu[i] \leftarrow (\mu[2\cdot i] + \mu[2\cdot i+1]) / 2$ \EndFor \State $\mathit{bs} \leftarrow 2\cdot \mathit{bs}$ \For{$i \in \{B/2+1,\ldots, B\}$} \State $\mu[i] \leftarrow \texttt{drawBatchAndComputeMean}(\mathit{bs})$ \EndFor \State $(a, \rho, \overline{\mu},d) \leftarrow \texttt{goodnessOfFitTestsAndCI}(\mu,b,\textit{minVar},\alpha)$ \EndWhile \State \Return $(1-\alpha)\cdot100\%$ confidence interval $[\overline{\mu} - \frac{d}{2},\overline{\mu} + \frac{d}{2}]$ of width at most $\delta$, adjusted for keeping into account residual correlation \end{algorithmic} \end{algorithm} \begin{algorithm}[H] \caption{\label{algorithm:goodnessOfFitTestsAndCI}\texttt{goodnessOfFitTestsAndCI}} \begin{algorithmic}[1] \Require {\small $\mu$, $b$, $\emph{minVar}$, $\alpha$} \State $\mu' \leftarrow (\mu_{b+1},\ldots, \mu_B)$ \State $(\overline{\mu},s^2) \leftarrow \texttt{computeMeanAndVariance}(\mu')$ \State $(\alpha,\rho,d,n) \leftarrow (0,0,0,B-b)$ \If{$s^2 > \mathit{minVar}$} \State $a \leftarrow \texttt{AndersonDarlingNormalityTest}(\mu',\overline{\mu},s^2)$ \State $\rho \leftarrow \texttt{lag1Autocorrelation}(\mu',\overline{\mu},s^2)$ \State $d \leftarrow \texttt{computeCIWidth}(\overline{\mu},s^2,n,\alpha,\rho)$ \EndIf \State \Return $(a, \rho, \overline{\mu},d)$; \end{algorithmic} \end{algorithm} \end{minipage} } \caption{BM-based algorithms for estimating the initial warmup period (left), and for studying steady state properties (right).} \label{fig:algorithms} \end{figure} BM-based approaches perform different statistical tests on $\mu$ to check whether $m$ is large enough for completing the warmup period: \cite{tafazzoli2011performance} use the \cite{neumann} randomness test, while \cite{steiger2005asap3} use a test for stationary multivariate normality on groups of 4 consecutive batches followed by a check for low correlation among consecutive batch means (i.e., the lag-1 autocorrelation of $\mu$). \cite{GilmoreRV17} apply the Anderson-Darling test for normality on $\mu$, followed by a check for low lag-1 autocorrelation of $\mu$. In all cases, a few (typically 4) initial batches are ignored as they are likely the most affected ones by the initial transient. We follow the latter approach, as specified in the subprocedure \texttt{goodnessOfFitTests} of Algorithm~\ref{algorithm:goodnessOfFitTests}: \lline{wmp} skips $b$ (by default 4) initial batches, obtaining $\mu'$, then \lline{wvar} computes the variance of the batch means, used in \lline{wvarc} to decide whether the statistical tests are necessary or pass by default. The rationale is that if the variance among the batch means is below a minimum threshold (parameter $\mathit{minVar}$ with default value 1E-7), then the process is likely converging to a deterministic fixed point, therefore we can safely assume that the intial warmup period has terminated. Concerning normality, \lline{wnorm} uses the Anderson-Darling test implemented in the SSJ library~\citep{iLEC16j,sLEC02a} to check whether it is statistically plausible that $\mu'$ has been sampled from a normal distribution specified by its mean and variance, and obtain a p-value $a$. \lline{wautocorr} stores $\rho$, the lag1-autocorrelation of $\mu'$. The subprocedure thus returns $a$ and $\rho$, which are used in \lline{wwhile1} of \texttt{autoWarmup}\xspace to decide whether the tests are passed -- using minimum thresholds $a^*$ and $\rho^*$ based on prior publications~\citep{GilmoreRV17,steiger2005asap3} ~\footnote{In particular, the significance level for the normality test is set to $a^*=1\%$ while the lag-1 autocorrelation threshold is set to $\rho^*= \sin(0.927-\frac{q}{\sqrt{\mathit{size}(\mu)}})$, where $q$ is the 99\% quantile of the standard normal distribution. See~\citep{steiger2005asap3} for more details.}. If any of the tests fail, then an iteration of the {\em while} loop in \llines{wwhile1}{wwhile2} is performed to double the number of steps $m$ by doubling the current batch size $\mathit{bs}$. We note that the current $B$ batch means are \emph{squeezed} in the first half of $\mu$, (\llines{wsqueeze1}{wsqueeze2}), and $m$ new steps are performed to create the new batch means in the second half of $\mu$ (\llines{wsecondhalf1}{wsecondhalf2}). The statistical tests are performed on the new batch means, and new iterations of the loop are performed until both statistical tests are passes. The algorithm terminates returning the final value of $m=B \times \mathit{bs}$ as the estimated end of the warmup period. \subsubsection{Steady state analysis by batch means}\label{sec:steadystatebm} Algorithm~\ref{algorithm:autobm} illustrates our automatic BM-based procedure for steady state analysis. \lline{alg:autobm1} invokes \texttt{autoWarmup}\xspace, which \emph{moves} the simulator to the end of the estimated warmup period. No other information from \texttt{autoWarmup}\xspace is used. The algorithm then proceeds similarly to \texttt{autoWarmup}\xspace, the only difference being that we add a third statistical test: we also compute the width $d$ of the CI according to the current batch means. This is obtained by invoking \texttt{goodnessOfFitTestsAndCI} from Algorithm~\ref{algorithm:goodnessOfFitTestsAndCI} rather than \texttt{goodnessOfFitTests} Since the tests for normality and absence of correlation were already passed during \texttt{autoWarmup}\xspace, one might expect that they are no longer necessary. We note however that the tests passed for the last value of $\mathit{bs}$ used in \texttt{autoWarmup}\xspace, so they could potentially fail for initial small values of $\mathit{bs}$. When all statistical tests are passed, we return the computed $(1-\alpha)100\%$ CI of width at most $\delta$, adjusted by the computed residual correlation among the batch means. This is done similarly to \cite{steiger2005asap3}, using an inverse Cornish-Fisher expansion~\citep{stuart} based on a standard normal density~\footnote{See Section~2 of~\citep{steiger2005asap3} for the exact formula.}. \subsubsection{ Some remarks on \emph{\texttt{autoBM}\xspace} and \emph{\texttt{autoRD}\xspace}}\label{sec:bmvsrd} We note that both \texttt{autoBM}\xspace and \texttt{autoRD}\xspace proceed by iterations, during which new samples are drawn and new statistical tests are performed. In \texttt{autoBM}\xspace, new simulation steps are added onto the same long simulation (the number of simulations $n$ is constant, the time horizon $m$ grows). In \texttt{autoRD}\xspace, new simulations of fixed length are added ($n$ grows, $m$ is constant). In some sense, the computational burden of \texttt{autoRD}\xspace is higher, as $w$ steps from each newly performed simulation are ignored. However, the simulations performed in each iteration of \texttt{autoRD}\xspace can be trivially parallelized -- so the additional computation can be efficiently handled. Rather, which approach to prefer depends on the model at hand and on the available hardware: \begin{itemize} \item The longer the initial warmup period, the more advantageous is \texttt{autoBM}\xspace relative to \texttt{autoRD}\xspace. \item The larger is the degree of parallelism supported by the hardware, the more advantageous is \texttt{autoRD}\xspace relative to \texttt{autoBM}\xspace. \end{itemize} The ABM community favours the RD approach due to its simplicity, but its \emph{trivially parallelizable} nature is not always exploited due to limited computer engineering skills. Notably, some studies have shown that the BM approach might provide more accurate results in specific cases~\citep{whitt1991efficiency,alexopoulos2004batch}. The implementation of both algorithms in MultiVeStA\xspace enables modelers to freely choose between the two and to exploit the distributed nature of the tool-box to parallelize simulations. The next section shows how the RD and BM can be combined to obtain a methodology for ergodicity diagnosis. \section{ Ergodicity diagnostics and detection of multiple stationary points using \texttt{autoRD}\xspace and \texttt{autoBM}\xspace} \label{sec:methodologyergodicity} \begin{figure}[t] \centering \includegraphics[width=1.0\linewidth]{figures/ergodicity/methodology2.pdf} \caption{ Procedure for ergodicity diagnostics based on \texttt{autoRD}\xspace and \texttt{autoBM}\xspace to asses the reliability of a steady state analysis} \label{fig:ergo} \end{figure} Consistency and unbiasedness of the estimates produced by \autobm and \autord rely on the underlying process possessing the {\em strong mixing} property~\footnote{The strong mixing property guarantees that two sufficiently distant observations in $(\mathbf{Y}_t)_{t>0}$ are approximately independent. There are various definitions of the property; we utilize the $\phi$-mixing definition provided in \cite{doi:10.1287/ijoc.13.4.277.9737} }. Indeed, once normality of batch means in \autow is well approximated and autocorrelation is low, we can be confident that future observations will not have initialization bias \citep{steiger2005asap3}. If at a certain point in time the batch means resemble a sample of IID observations from the same Gaussian population, then the non-random effects of initial conditions must have disappeared. Further, the strong mixing assumption ensures that such a point in time can eventually be reached by increasing the batch size \citep{doi:10.1287/opre.27.5.1011,doi:10.1287/ijoc.13.4.277.9737}. Here we describe a procedure that combines \autord and \autobm to assess whether this assumption is met. The procedure, depicted in Figure~\ref{fig:ergo}, is fully implemented in MultiVeStA\xspace and is validated in Section~\ref{sec:nonergodic} on variants of a prediction market model. We start performing both \autobm and \autord for given $\alpha$ and $\delta$ (step 1). If any of the two fails to converge in due time (step 2), we have evidence that the process is eventually non-stationary (or fails to reach its stationary phase within the allotted computational time/resources). In such cases, performing any steady state analysis could be misleading and should be avoided (step 3). If both \autobm and \autord successfully terminate, we can be confident that the process possesses \emph{ergodic properties}~\citep{gray2009,billingsley1995} -- meaning, intuitively, that the horizontal means of its realisations (i.e., the means across simulations as in Fig.~\ref{fig:nmsimsAnalysis}(c)) indeed converge asymptotically to a finite number. However, there could be potentially different limits for different simulations. In these cases, a natural check for ergodicity is to compare the results of \autobm and \autord (step 4). This is in line with previous approaches to ergodicity analysis from the literature \citep[e.g.,][]{grazzini2012analysis}, where BM-like means across one long simulation are compared with RD-like means across several simulations. The difference is that our BM and RD results are obtained using automated algorithms (\texttt{autoBM}\xspace and \texttt{autoRD}\xspace), rather then from arbitrarily parametrized experiments. Our test, performed in step 4, checks whether the difference between BM and RD estimates is larger in absolute value than the $\delta$ used for CI implementation. If this is the case, we have evidence of non-ergodicity and therefore of violation of the strong mixing assumption (step 6). For example, this could be due to the presence of multiple stationary points in the process: \autobm would end up exploring only one of such stationary points, while \autord would provide averaged information on the possible realizations. If the difference between BM and RD estimates is small, we have no evidence that the assumption is violated and we proceed with a second test on \texttt{autoRD}\xspace's horizontal means (step 5). Indeed, under the null hypothesis that the process is strongly mixing and that the initial warmup phase has been effectively discarded, the central limit theorem for weakly correlated variables states that the horizontal means should be approximately normally distributed. In particular, we perform an Anderson-Darling normality test (with significance level 1\%) on the sample of horizontal means. If the null hypothesis is not rejected we again have no evidence of violation of the strong mixing assumption, and we therefore return the values computed by either of the two algorithms (step 7). \section{Operationalizing the framework: Statistical Model Checking and MultiVeStA\xspace }\label{sec:mv} This section discusses how we operationalise our approach. In particular, we frame our approach to ABM analysis in the context of Statistical Model Checking and show how we integrate it into MultiVeStA\xspace, a model-agnostic statistical model checker that can be integrated with existing simulators. \subsection{Statistical Model Checking} Statistical Model-Checking (SMC)~\citep{Agha18,LLTYSG19} is a successful simulation-based verification approach from computer science. SMC allows to study quantitative properties of large-scale models through completely automated analysis procedures equipped with statistical guarantees. Following the principle of \emph{separation of concerns}, the idea is to offer a simple external language to express properties of interest that can be \emph{queried} on the model using predefined analysis procedures. The goal of SMC is therefore that of offering a \emph{one-click-analysis} experience to the modeler which is freed from the burden of modifying the model to generate large CSV files every time a new analysis is required, and then analyzing such CSV files in an error-prone semi-automated manner. This guarantees that the analysis procedures are written once and then extensively tested, decreasing the possibility of errors. Making a parallel with databases, we do not have to explicitly manipulate the internal representation of the data every time a new query is needed, rather we define the data to be selected using compact languages (e.g. SQL). Several statistical model checkers exist, most of which require to implement models into proprietary languages. We consider \emph{black-box} SMC~\citep{sen2004statistical,younes2005probabilistic}, where the idea is to offer a model-independent analysis framework that can be easily attached to existing simulation models, effectively enriching them with automated statistical analysis techniques. In particular, we use MultiVeStA\xspace~\citep{SebastioV13,GilmoreRV17}, redesigned and extended here with the techniques from the previous sections, tailored for ABM community. \subsection{Simulator integration}\label{sec:integration} MultiVeStA\xspace{} only needs to interact with a simulator by triggering 3 basic actions: $(i)$ \texttt{reset(seed)}, to reset the simulator to its ``initial state'', and update the random seed used to generate pseudo-random numbers. This is necessary to reset the model before performing a new simulation; $(ii)$ \texttt{next}, to perform one step of simulation; $(iii)$ \texttt{eval(obs)}, to evaluate an observation in the current simulation state, where an observation (\texttt{obs}) can be any feature of the aggregate model or of any group of agents. A new model can be integrated with MultiVeStA\xspace by implementing an \emph{adaptor} between MultiVeStA\xspace{} and the considered simulator, obtained by instantiating MultiVeStA\xspace's (Java) interface. As a consequence, it natively supports Java-based simulators, but it has been also integrated with C- and Python-based simulators, and it has been recently extended to support R-based ones. For the ABM macro model from Section~\ref{sec:macro} we are interested in two aggregate features of the model: the number of bankruptcies and the unemployment rate in a given step. Therefore, the model has been integrated such that these can be obtained using \texttt{eval("bankruptcy")}, and \texttt{eval("unemploymentRate")}, respectively. Instead, the prediction market models from Sections~\ref{sec:predmarket} and~\ref{sec:nonergodic} have been integrated such that \texttt{eval(i)} gives a particular feature of agent $i$ (its current wealth), and \texttt{eval("price")} gives a certain aggregate feature of the model (the prevailing price). \subsection{MultiVeStA\xspace query language and supported analysis}\label{sec:queries} MultiVeStA\xspace offers a powerful and flexible \emph{property specification language}, MultiQuaTEx, which allows to express transient and steady state properties, including warmup analysis. \paragraph{Transient properties} Intuitively, a MultiQuaTEx query might describe a random variable (e.g., the number of bankruptcies in an ABM macro model at a certain point in time during a simulation). Following the discussion in Section~\ref{sec:outputanalysis}, the expected value of a MultiQuaTEx query is estimated as the mean $\overline{x}$ of~$n$ samples (taken from $n$ simulations), with $n$ large enough (but minimal) to guarantee that the $(1-\alpha) \cdot 100\%$ CI centred on $\overline{x}$ has size at most $\delta$, for given $\alpha$ and $\delta$. MultiQuaTEx actually allows to express more random variables in one query, all analysed independently reusing the same simulations. Listing~\ref{ls:examplePropertyTr} depicts a MultiQuaTEx\xspace{} query used in Section~\ref{sec:macro} to study the evolution of the number of bankruptcies and of the unemployment rate in an ABM macro model. \lstset{caption=A transient MultiQuaTEx query, label=ls:examplePropertyTr} \begin{lstlisting}[float=b,mathescape,morekeywords={next,autoIR,parametric,eval,E,if,fi,then,else,s,eval,evalME,evalOnceME},numbers=left,belowskip=-8pt] obsAtStep(t,obs) = if (s.eval("steps") == t)!\label{ls:if}! !\label{ls:examplePropertyTrif}!!\label{ls:rval}! then s.eval(obs) !\label{ls:rval2}! else next(obsAtStep(t,obs))!\label{ls:examplePropertyTrNext}! fi ;!\label{ls:examplePropertyTrfi}! eval autoIR(E[ obsAtStep(t,"bankruptcy") ],E[ obsAtStep(t,"unemploymentRate") ],t,1,1,400) ;!\label{ls:examplePropertyTrParametric}! \end{lstlisting} Coming to the structure of a MultiQuaTEx query, it contains a list of \emph{parametric operators} that can be used in an \texttt{eval} \texttt{autoIR}\xspace command to specify the properties to be estimated. \llines{ls:examplePropertyTrif}{ls:examplePropertyTrfi} of Listing~\ref{ls:examplePropertyTr} define the parametric operator \texttt{obsAtStep} having two parameters, \texttt{t} and \texttt{obs}, respectively the step and observation of interest. Such operator is evaluated, in every simulation, as the value of \texttt{obs} at time point \texttt{t}. Before discussing the \emph{body} of the operator, we note that \lline{ls:examplePropertyTrParametric} uses it twice for observations the number of bankruptcies and the unemployment rate for each step from 1 to 400 (with increment 1). Therefore 800 properties will be studied (400 for each observation), all evaluated using the same simulations and with their own CI. The body of an operator (\llines{ls:rval}{ls:examplePropertyTrfi}) might contain: \begin{enumerate} \item conditional statements (the \texttt{if}-\texttt{then}-\texttt{else}-\texttt{fi}); \item real-valued observations on the current simulation state (the \texttt{s.eval} in \lline{ls:rval} and \lline{ls:rval2}); \item a \texttt{next} operator that triggers the execution of a simulation step (\lline{ls:examplePropertyTrNext}); \item recursion, used in \lline{ls:examplePropertyTrNext} to evaluate \texttt{obsAtStep(t,obs)} in the next simulation step; \item arithmetic expressions. \end{enumerate} This is general enough to express a wide family of properties at varying of time. In the case of Listing~\ref{ls:examplePropertyTr}, we check whether we have reached the step of interest (\lline{ls:if}), in which case we return the required observation (\lline{ls:rval2}). Otherwise, we perform a step of simulation (\lline{ls:examplePropertyTrNext}), and evaluate recursively the operator in the next simulation state. \paragraph{Steady state properties and warmup analysis} MultiQuaTEx\xspace{} has been extented to support MultiVeStA\xspace{}'s extension with steady state and warmup analysis capabilities discussed in Section~\ref{subsec:steadystate}. Listing~\ref{ls:examplePropertySS} provides a \emph{steady state} MultiQuaTEx query used in Section~\ref{sec:predmarket} to study the average value at steady state of the wealth of three agents (0, 1, and 2), and of the price in our test-bed market selection model. The query is simple, as in this case the operator \texttt{obs} just returns the observation of interest, while \llines{ls:ssan1}{ls:ssan3} show how to run the three types of supported analysis. \lstset{caption=A steady state MultiQuaTEx query. Only one of the three eval commands should be used at a time., label=ls:examplePropertySS} \begin{lstlisting}[float=t,mathescape,morekeywords={warmup,autoRD,autoBM,parametric,eval,E,if,fi,then,else,s,rval,evalME,evalOnceME},numbers=left,belowskip=-8pt] obs(o) = s.eval(o) ; eval warmup(E[ obs(0) ],E[ obs(1) ],E[ obs(2) ],E[ obs("price") ]) ;!\label{ls:ssan1}! eval autoBM(E[ obs(0) ],E[ obs(1) ],E[ obs(2) ],E[ obs("price") ]) ;!\label{ls:ssan2}! eval autoRD(E[ obs(0) ],E[ obs(1) ],E[ obs(2) ],E[ obs("price") ]) ;!\label{ls:ssan3}! \end{lstlisting} In particular, a steady state query is composed of two parts: A list of \texttt{next}-free operators, and one of the three \texttt{eval} commands in Listing~\ref{ls:examplePropertySS}, provided with a list of operators to study. Intuitively, a steady state MultiQuaTEx\xspace query defines observations on single simulation states, implicitly studied at steady state. In particular, \texttt{warmup} performs the warmup estimation procedure (Section~\ref{sec:steadystatewu}) for each of the listed properties. Indeed, every random variable defined on a process might have a different warmup period. We will see examples of this in Section~\ref{sec:predmarket}. Instead, \texttt{autoBM} performs a warmup estimation on each property, and, begins computing the batch means procedure (Section~\ref{sec:steadystatebm}) on each of them as soon as the property completes its warmup period. The command \texttt{autoRD}\xspace is similar, but it first completes the warmup analysis for all considered properties, and then feeds this information to the replication deletion procedure from Section~\ref{sec:steadystaterd}. In all cases, the default values described in Section~\ref{sec:algorithms} will be used if not otherwise specified by the user when running the analysis. MultiQuaTEx\xspace supports two further \texttt{eval} commands: \texttt{manualBM}\xspace and \texttt{manualRD}\xspace. These behave the same as \texttt{autoBM}\xspace and \texttt{autoRD}\xspace, respectively, but skip the warmup analysis phase and required as input an estimation of the warmup period. These might be useful in case one has this information due to previous analyses. In Section~\ref{sec:predmarket} we use them to replicate erroneous steady state analyses from the literature based on a wrong estimation of the warmup period. \begin{figure}[t] \centering \includegraphics[width=0.55\linewidth]{figures/architecture/architecture3.pdf} \vspace{-0.3cm} \caption{MultiVeStA\xspace's client-server architecture enabling parallelization of simulations. } \label{fig:cs} \end{figure} \subsection{MultiVeStA\xspace's distributed architecture}\label{mvarch} MultiVeStA\xspace{} has a client-server architecture as sketched in Figure~\ref{fig:cs}. This is a classic software architecture for distributing tasks in the cores of a machine or in the nodes of a network. We distribute the simulations of \texttt{autoIR}\xspace and \texttt{autoRD}\xspace. In the figure, arrows denote visibility/control/activation of the source component on the target one: \begin{itemize} \item A user runs the client specifying the model, query, CI, and the parallelism degree $N$. Transparently to the user, the client will trigger, distribute, and handle the necessary simulations providing to the user the results. \item The client creates $N$ servers among whom distributes the analysis tasks. \item Each server runs independently, therefore in parallel, the required simulations. Each server creates its own instance of the simulator, and controls it through the adaptor to perform the simulations. \end{itemize} \begin{figure}[t] \centering \includegraphics[width=0.6\linewidth]{figures/architecture/clientarchitecturenew3.pdf} \caption{\label{fig:clientarchitecture}The novel architecture of the MultiVeStA\xspace{} client} \end{figure} As discussed, we extended MultiVeStA\xspace{} with a number of analysis techniques. In particular, we mainly extended the client, where the analysis logic is localized. The new architecture of the client is depicted in Figure~\ref{fig:clientarchitecture}. It consists of a number of modules, the central ones regarding steady state and transient analysis. Further modules regard: post-processing of analysis computed by MultiVeStA\xspace like t-tests and power computation to compare results obtained for different model configurations (Section~\ref{sssec:eqtest_power}), or the methodology for ergodicity analysis (Section~\ref{sec:methodologyergodicity}); support for the creation and parsing of MultiQuaTEx\xspace{} queries, offered by a novel compiler for MultiQuaTEx\xspace{} queries; visualization of the analysis results through a plotter and of a CSV file creator. \section{Application: Transient analysis of a large macro ABM}\label{sec:macro} We apply the transient analysis from Section \ref{subsec:transient} to the large-scale macro-financial ABM of \cite{caiani2016agent}. \subsection{The macro ABM of \cite{caiani2016agent} } The model has been developed to bridge the stock flow consistent approach (SFC; \cite{godley2006}) with the macroeconomic agent based literature \citep[see, e.g.,][]{gatti2005new, cincotti2010credit, dosi2010, dawid2012eurace, popoyan2020winter}.\footnote{A rather detailed overview of the macro ABM literature can be found in \cite{fagiolo2017macroeconomic} and \cite{dosi2019more}.} It depicts an economy composed of households selling their labor to firms in exchange for wages, consuming, and saving into deposits at (commercial) banks. Households own shares of firms and banks in proportion to their wealth, and receive a share of firms' and banks' profits as dividends; they also pay taxes as set by the Government, which runs fiscal policy. There are two categories of firms. Consumption firms produce a homogeneous good using labor and the capital goods manufactured by the other class of firms: capital firms. Firms may apply for loans in order to finance production and investment. Retained profits enter the financial system as banks’ deposits. Banks provide credit to firms, buy bonds issued by the Government and need to satisfy mandatory capital and liquidity ratios. Finally, a Central Bank holds banks’ reserve accounts and the government account, accommodates banks’ demand for cash advances at a fixed discount rate, and possibly buy government bonds that have not been purchased by banks. Here we focus on two key indicators of economic activity: the unemployment rate, and the bankruptcy rate of business firms. They have been chosen because of: (i) the relative large fluctuations they exhibit during the transient dynamics \citep[see Figure 2 in][]{caiani2016agent}, which we aim at reproducing and testing and (ii) their well known role as proxies of an economy's health at macro e micro level, respectively. We sketch how these two quantities are modelled by Caiani and co-authors while leaving the additional details about the model to the original paper.\footnote{Of course, all variables present in the original model could be analysed using the very same procedure; we selected two for illustrative purposes.} The labour market is composed of workers, firms, and the public sector. Firms in the capital good sector (indexed by $k$) demand workers based on their desired level of production $y^D_{xt}$ and the productivity of labor ($\mu_N$), which is assumed to be constant and exogenous: \begin{equation} N^{D}_{kt}=\frac{y^D_{xt}}{\mu_N}. \end{equation} Differently, the request of workers by consumption good firms (indexed by $c$) is given by \begin{equation} N^D_{ct}=u_{ct}^D\frac{\kappa_{ct}}{l_{k}}, \end{equation} where $\kappa_{ct}$ is the capital stock, $l_{k}$ is a constant expressing the capital-to-labor ratio and $u_{ct}$ is the utilization capacity needed to obtain the desired production. Workers can be fired under two circumstances: workers in excess of production needs are randomly sampled from the pool of firm employees and fired, and workers can loose their job because of an exogenous positive employee turnover (a fixed share of workers is fired in every period). Finally, a constant share of households are employed by the public sector and public servants are also subject to an exogenous turnover. After having planned production, firms and the government interact with unemployed households on the labor market. Workers follow an adaptive heuristic to set the wage they ask for: if over the year (i.e., four periods), they have been unemployed for more than two quarters, they lower the asked wage by a stochastic amount. In the opposite case, they increase their asked wage. The share of workers that is not employed at the end of each session of interaction in the labour market represents the prevailing unemployment rate. After production, firms sell their products and need to compensate for the inputs they received. Firms may default when they run out of liquidity to pay wages or to honour the debt service. Defaulted firms are bailed-in by households (who are the owners of firms and banks and receive dividends) and depositors, as the authors seek to maintain the number of firms constant. Hence, the bankruptcy rate emerges as the ratio between defaulted firms before the bailing-in event and the total number of firms in the economy. As the defaulted firms create non-performing loans that might trigger vicious cycles and - ultimately - a financial crisis, they offer key information on the turbulence and riskiness of the business cycle. \subsection{Transient analysis with \emph{\transient}: automatic computation of confidence intervals} The model is run in its baseline configuration considered in Section 5.1 of \cite{caiani2016agent}. The artificial time series show the model first experiences a sequence of expansionary and recession regimes, then converging, in most cases, to a relatively stable behaviour where aggregate variables (including the unemployment and the bankruptcy rates) fluctuate around particular values, and nominal aggregates grow at similar rates. Our focus is centred on the first part of such process. \begin{figure}[t] \centering \includegraphics[scale=0.35]{figures/unemploymentRate.pdf} \hfill \includegraphics[scale=0.35]{figures/bankruptcy.pdf} \caption{Unemployment rate and bankruptcy over time. The dashed lines are the computed 97.5\% CI of size $\delta$ at most $0.005$ and $0.5$, respectively.} \label{fig:analysisMacroABM} \end{figure} As a first exercise, we reproduce the behaviour of the economic indicators we selected in the first 400 steps of the simulation, and construct CIs around their mean according to Equation \eqref{eq:ci} (Figure \ref{fig:analysisMacroABM}). In particular, we choose $\alpha=0.025$ and set $\delta$ at the maximal allowed width of the confidence intervals around our central estimates (i.e. $\delta_U=0.005$ for the unemployment rates and $\delta_B=0.5$ for the average bankruptcies) and let \transient automatically decide the number of simulations needed to obtain the desired confidence intervals. We stress that MultiVeStA\xspace automatically determines the number of runs required to obtain the desired CI for each point in time and for whatever variable of interest. As shown in the top of Figure~\ref{fig:analysisMacroABM_CI}, this required at most 378 simulations for both properties. As a concept-proof of our approach, the inspection of Figure \ref{fig:analysisMacroABM} confirms that our algorithms do not modify the model and deliver the same dynamics (see Figure 2 of \citealp{caiani2016agent}).\footnote{We highlight that the artificial time series we generate are somehow comparable to Figure 2 of \cite{caiani2016agent}; however, Caiani et al. apply a bandpass filter over their series and just show the emerging trend component. Contrarily, we show the ``raw'' series that the model generates. We notice that the latter is the prevailing practice in the literature \citep[see for example the models reviewed in][]{fagiolo2017macroeconomic}.} However, \cite{caiani2016agent} performed 100 simulations for all the 400 time steps, without providing information on the obtained confidence intervals. \begin{figure}[t] \includegraphics[scale=0.275]{figures/unemploymentRateCI.pdf} \hfill \includegraphics[width=0.485\linewidth]{figures/bankruptcyCI.pdf} \\ \includegraphics[scale=0.275]{figures/unemploymentRateCICaiani.pdf} \hspace{0.216cm} % \includegraphics[width=0.475\linewidth]{figures/bankruptcyCICaiani.pdf} \caption{ Top: Intermediate widths of the 97.5\% CI for bankruptcy and unemployment rate computed by MultiVeStA\xspace{} (top); Bottom: Comparison among CI widths computed by MultiVeStA\xspace{} and by setting 100 simulations for all properties and $t$ as in \cite{caiani2016agent} (obtained using \transient and setting both $bl$ and the maximum number of simulations performed to \np{100}). } \label{fig:analysisMacroABM_CI} \end{figure} The ability to specify the precision of the confidence intervals comes with a number of advantages. First, it is a flexible requirement that can be expressed either in absolute or relative terms (see Section \ref{sec:algorithms}), leaving the chance to statistically compare the expected behaviour of the model to a certain target (say, an employment rate not higher that $5\%$ or an inflation rate of $2\%$) or to its mean (e.g. allowing one to compute for each period the probability to observe bankruptcy rates $10\%$ higher than the average). Second, and more relevantly, it allows evaluating the robustness (and the uncertainty) of the dynamics simulated by the model. In particular, Figure~\ref{fig:analysisMacroABM_CI} shows how the width of the confidence intervals vary, for each time point and property, across the simulation span for various number of simulations. The top of the figure shows the intermediate CI widths obtained after every iteration of the blocks of simulations performed by MultiVeStA\xspace (see the discussion in Section~\ref{sec:mean_ci} - we use $bl=42$). We note that the widths decrease at every iteration, and that some time points (from 100 to 200) require more simulations than the others to get the desired CI width. Instead, the bottom of the figure compares the CIs obtained by MultiVeStA\xspace (in green) against those obtained using the setting of the original paper (i.e. 100 simulations for all time steps, in red). We note that, apart for the first time points which present very low variance, the CIs computed by MultiVeStA\xspace tend to be homogeneous and close to the required $\delta$, demonstrating that the minimum number of simulations are computed for the given $\delta$. Instead, the setting used by \cite{caiani2016agent} might lead to CIs of different widths which follow the trend of the computed means. This is particularly evident for the case of firms' bankruptcies, cf. Figure \ref{fig:analysisMacroABM_CI} (bottom-right), while the same does not happen for unemployment rates (bottom-left of the figure). The figure suggests that each property and time point should be studied using its \emph{own best} number of simulations, confirming that a trade-off between an insufficient and an excessively large number of simulations exists. When this is too low the across-runs variability might not be adequately washed-out and the representation of (stochastic) uncertainty could depend on the level of the relevant variable; conversely, when the number of simulations is too large, simulations are redundant and the same representation of uncertainty can be effectively offered saving computational time. Finally, in line with \cite{Secchi2017}, the right-hand panels of both figures confirm that the arbitrary choice of $n=100$, which is common in the literature (see the discussion in Sections \ref{sec:intro} and \ref{sec:outputanalysis}), is unjustified by the properties of the model itself. \subsection{Automatic experiment comparison and statistical testing}\label{sec:counterfactual} The second exercise we perform uses the confidence intervals previously computed (and the means, variances and number of samples returned by MultiVeStA\xspace) to automatize a series of tests that identify statistical differences across model configurations discussed in Section \ref{sssec:eqtest_power}. Indeed, one of the most common approaches in the macro ABM literature is to focus on key parameters or mechanisms of interest - often reflecting either behavioural attitudes or policy strength - and test how the dynamics of the model respond to changes. Just to make few examples, \cite{Dosi15} compare a series of rules for monetary and fiscal policy, \cite{lamperti2020climate} explore feed-in tariffs and R\&D subsidies, and \cite{caiani2019does} extend the model analysed in this section to study various progressive tax schemes and their effects on growth and inequality. The difference across experiments is tested comparing the value of some statistic of interest (e.g. the growth rate of output) - usually averaged over the entire time span - by means of t-tests \citep[e.g. in][]{Dosi15, popoyan2020winter}. Obviously, the ability of the test to discern across experiments and to validate the counter-factual policy intervention is affected by the choice of $n$, as an insufficient number or runs is likely to make model configurations (i.e. experiments) difficult to distinguish. Even further, it is not infrequent that statistical tests about differences across experiments are completely missing \citep[e.g.][]{cincotti2010credit, caiani2019does}, which weakens the potential of the paper and the eventual policy recommendations. \begin{figure} \centering \subfloat[CIs width for $\alpha=0.025$ and $N=100$ simulations]{\includegraphics[width=0.47\linewidth]{figures/macro/test_risk_aversion/100sims_exp2riskAversionCCIbankruptcy.png} } \hfill \subfloat[CIs width for $\alpha=0.025$ and $\delta=0.5$]{\includegraphics[width=0.47\linewidth]{figures/macro/test_risk_aversion/576sims_exp2riskAversionCCIbankruptcy} } \\ \subfloat[T-test are means in (a) point-wise equal? - significance $a_w\!=\!0.025$]{\includegraphics[width=0.47\linewidth]{figures/macro/test_risk_aversion/Bankruptcy_TTest_100sims.png}} \hfill \subfloat[T-test are means in (b) point-wise equal? - significance $a_w\!=\!0.025$]{\includegraphics[width=0.47\linewidth]{figures/macro/test_risk_aversion/Bankruptcy_TTest_576sims.png}} \\ \subfloat[Power of t-test in (c) for difference $\varepsilon=0.5$]{\includegraphics[width=0.47\linewidth]{figures/macro/test_risk_aversion/Bankruptcy_Power_100sims.png}} \hfill \subfloat[Power of t-test in (d) for difference $\varepsilon=0.5$]{\includegraphics[width=0.47\linewidth]{figures/macro/test_risk_aversion/Bankruptcy_Power_576sims.png}} \caption Evolution of bankruptcies for different risk aversions for consumption firms: are they point-wise equal? Red dots denote initial steps with variances so small to get intermediate results below the numerical tolerance of our implementation of the test (1E-15). } \label{fig:behaviouralWithPower} \end{figure} \begin{figure} \centering \subfloat[CIs width for $\alpha=0.025$ and $N=100$ simulations]{\includegraphics[width=0.47\linewidth]{figures/macro/test_risk_aversion/unemploymentRate/100sims_exp2riskAversionCCIUnemploymentRate.png} } \hfill \subfloat[CIs width for $\alpha=0.025$ and $\delta=0.005$]{\includegraphics[width=0.47\linewidth]{figures/macro/test_risk_aversion/unemploymentRate/576sims_exp2riskAversionCCIUnemploymentRate} } \\ \subfloat[T-test are means in (a) point-wise equal? - significance $a_w\!=\!0.025$]{\includegraphics[width=0.47\linewidth]{figures/macro/test_risk_aversion/unemploymentRate/UnemploymentRate_TTest_100sims.png}} \hfill \subfloat[T-test are means in (b) point-wise equal? - significance $a_w\!=\!0.025$]{\includegraphics[width=0.47\linewidth]{figures/macro/test_risk_aversion/unemploymentRate/UnemploymentRate_TTest_576sims.png}} \\ \subfloat[Power of t-test in (c) for difference $\varepsilon=0.005$]{\includegraphics[width=0.47\linewidth]{figures/macro/test_risk_aversion/unemploymentRate/UnemploymentRate_Power_100sims.png}} \hfill \subfloat[Power of t-test in (d) for difference $\varepsilon=0.005$]{\includegraphics[width=0.47\linewidth]{figures/macro/test_risk_aversion/unemploymentRate/UnemploymentRate_Power_576sims.png}} \caption Evolution of unemployment rate for different risk aversions for consumption firms: are they point-wise equal? Red dots denote initial steps with variances so small to get intermediate results below the numerical tolerance of our implementation of the test (1E-15). } \label{fig:behaviouralWithPower_unemplRate} \end{figure} Our tool-box provides an automatic series of t-tests across experiments, where the expected value of any variable of interest in any pre-determined set of experiments is tested against a baseline configuration for each step of the transient period. As discussed in Section~\ref{sssec:eqtest_power}, tests are run post-mortem and consist in Welch's t-tests (Equation~\eqref{eq:Welchtt}), whose power can be computed with respect to a minimum distance $\varepsilon$ between the means that the test is expected to detect (Equation~\eqref{eq:power}). Figure \ref{fig:behaviouralWithPower} shows the results in our test-bed macro ABM. Among different possible experiments, we evaluate the effects that changes in the degree of agents' risk aversion ($C$) produces on the number of bankruptcies and the unemployment rate. As showed by Caiani and co-authors, when risk aversion of the agents increases, the economy tends to completely avoid the recession phase experienced in the baseline configuration. While they did not offer a statistical analysis of these differences, our approach automatically embeds it. In particular, we contrast model behaviours across the baseline value of $C$ and a 50\% increase of the latter. Figure \ref{fig:behaviouralWithPower} shows the results of our tests comparing the set-up of the original analysis (i.e. with $n=100$ for all properties and time points, left column) to our approach ($n$ automatically determined for each property and time point, right column). While increasing risk aversion delays the peak of bankruptcy rates, we show that no statistical difference between the two experiments is found but for the central part of the simulation, that is when the economy first experiences a deep crisis and then recovers \citep[see Figure 2 in][]{caiani2016agent}. This is evident in both set-ups and suggests that doubling risk-aversion modifies the shape of the crisis (smoother surge of bankruptcies and slower decline) but not its existence nor duration, which is further confirmed by the behaviour of the unemployment rate (see Figure \ref{fig:behaviouralWithPower_unemplRate}).\footnote{We also highlight that our approach identifies a statistically significant difference between the two experiments for the slight increase in business insolvencies between period 200 and 250.} Though using $n=100$ or our approach makes little difference in terms of type 1 errors, a key advantage is evident when comparing powers. Indeed, our setup guarantees a much higher power of the tests, thereby reducing dramatically the chance of not rejecting the null hypothesis of equality across experiments when it is actually false \citep[see also][]{Secchi2017}. We notice that the same holds for the unemployment rate (see Figure \ref{fig:behaviouralWithPower_unemplRate}), though the discrepancy is less marked. Further, our approach delivers - for given significance $a_w$ and setting $\varepsilon$ equal to the $\delta$ used for the transient analysis - a \emph{good} and stable power across the simulation horizon, i.e. above $0.8$, which is usually considered an acceptable threshold in the applied statistics literature \citep[see e.g.][]{Secchi2017,cohen1992,lehr1992}. This comes by the fact that for each property and time point MultiVeStA\xspace had to run the \emph{correct} number of samples to obtain a constant width of the CI embedded in the choice of $\delta$ (and by the assumption that the minimum difference we want to detect -- $\varepsilon$ -- is equal to $\delta$). Indeed, it is interesting to note how the t-test for bankruptcies obtained for the setting with 100 simulations (Figure~\ref{fig:behaviouralWithPower} bottom-left) has a low power which appears to decrease specularly to how the corresponding CI width increases in Figure~\ref{fig:analysisMacroABM_CI} (bottom-right). Hence, we can derive a rule of thumb to support the modeller's choice of the two free parameters in a set-up that compares different experiments: first of all, $a_w$ can be set equal to the $\alpha$ used for the transient analysis, from $5\%$ to $1\%$, whose extrema are the most diffused levels of statistical significance in the social sciences. Then, by setting $\delta$ in the transient analysis equal to the $\varepsilon$ of interest, we expect to obtain t-tests with good power. If this is not the case, one can perform the transient analysis for smaller values of $\delta$ while keeping constant $\varepsilon$. In case the maximum budget of simulations that have been originally chosen does not allow to meet such conditions, a trade-off exists in accepting an higher chance of type II error (not detection of false negatives) and the computational resources at disposal of the modeller. However, we stress that while increasing the size of the simulation exercise might come at the expenses of computational time, the proposed tool automatically parallelise model's runs to speed-up the analysis. Section \ref{sec:parallelizationstudy} shows the efficiency of our approach. Finally, we remark that when using the original code and simulation environment (JMAB) of the Caiani et al. paper alone, it is not possible to perform any form of statistical analysis automatically, requiring to process CSV files created by the framework. Our integration of MultiVeStA\xspace{} provides JMAB with analysis capabilities described so far, encompassing both the transient and the steady state analysis, while leaving the simulation environment unaltered. \section{Application: Steady state analysis in a model of market selection}\label{sec:predmarket} Here we use MultiVeStA\xspace{} to perform a statistical analysis of the steady state expected value of wealth shares and market price in a simple repeated prediction market model. The model we consider has been extensively studied in the literature \citep{beygelzimer2012,kets2014,bottazzigiachini2017,bottazzigiachini2019b} and offers a perfect testbed for our procedures for automated steady state analysis. In particular, its steady state properties have been numerically investigated by \cite{kets2014} and, later on, studied analytically in \cite{bottazzigiachini2019b} showing that the numerical results of \cite{kets2014} were inaccurate both qualitatively and quantitatively. As briefly reported by \cite{bottazzigiachini2019b} and as we shall see, the source of inaccuracy can be traced back to the strong autocorrelation and initial condition bias that process possesses. The \emph{post-mortem} nature of the numerical analysis carried on by \cite{kets2014} is unable to properly deal with those issues. Our approach, instead, uses statistical tests and procedures able to manage both autocorrelation and the initial condition bias in an automated way. Thus, in what follows, we first introduce the model, then we repeat the numerical analyses of \cite{kets2014} showing how and why the inaccuracies emerge, and finally we use \texttt{autoRD}\xspace and \texttt{autoBM}\xspace to accurately perform the steady state analyses. In fact, we match the correct analytical results from~\cite{bottazzigiachini2019b}. \subsection{The prediction market model by \cite{kets2014} } The model consists in a pure exchange economy in discrete time, indexed by $t \in \mathbb{N}$, where $N$ agents repeatedly bet on the occurrence of a binary event. That is, in every $t$ two contracts are available for wagering: the first pays 1 dollar if the event occurs and zero otherwise, while the second pays 1 dollar if the event does not occur and zero otherwise. We model the event by means of a Bernoulli random variable $s_t$, such that $s_t=1$ means that the event at time $t$ has occurred, and $s_t=0$ otherwise. The probability of observing $s_t=1$ is a constant $\pi^*\in(0,1)$. Every agent $i\in\{1,2,\ldots,N\}$ assigns a subjective probability $\pi^i$ to the realization of the event at any time $t$. Agent $i$ has initial wealth equal to $w^i_0$ and at the end of every betting round it evolves in $w^i_t$ depending on the results of her betting. The total initial wealth in the market is normalized to 1, such that, since wealth is only redistributed by the betting system, it is $\sum_{i=1}^N w^i_t=1$ for all $t$.\footnote{Hence, one can indifferently refer to $w^i_t$ as both the wealth and the wealth share of agent $i$ at time $t$.} Every agent $i$ bets on the occurrence of the event at time $t$ a fraction $\alpha^i_t$ of her wealth $w^i_{t-1}$, while $1-\alpha^i_t$ is the fraction bet against the occurrence. As in \cite{kets2014,bottazzigiachini2017,bottazzigiachini2019b}, we focus on the so-called fractional Kelly rule, that is $\forall i,t$ \begin{equation} \alpha^i_t=c\pi^i+(1-c)p_t\,, \label{eq:alpha} \end{equation} with $c\in(0,1]$. In every period, the agents exchange contracts in the competitive market, thus contracts' prices are fixed by means of market clearing conditions. Without loss of generality, we assume that contracts are in unitary supply. Hence, calling $p_{1,t}$ and $p_{2,t}$ the price of the first and second contract, respectively, we have $\forall t$ \begin{equation} 1=\sum\limits_{i=1}^N \dfrac{\alpha^i_t}{p_{1,t}}w^i_{t-1}\quad\text{and}\quad 1=\sum\limits_{i=1}^N \dfrac{1-\alpha^i_t}{p_{2,t}}w^i_{t-1}\,. \nonumber \end{equation} Since wealth sums up to 1 in every period, one has $p_{1,t}+p_{2,t}=1$, hence we call $p_{1,t}=p_t$ and $p_{2,t}=1-p_t$. Substituting with Equation \eqref{eq:alpha} and applying simple algebraic manipulations, one obtains \begin{equation} p_t=\sum\limits_{i=1}^N\pi^i w^i_{t-1}\quad\forall t\,. \label{eq:price} \end{equation} After the market round, the outcome of the binary event is revealed and the wealth of agent $i$ evolves according to \begin{equation} w^i_{t}= \begin{cases} \dfrac{\alpha^i_t}{p_t}w^i_{t-1}\,=\,\left(1-c+c\,\dfrac{\pi^i}{p_t}\right)w^i_{t-1} & \text{if }s_t=1\,,\\[0.35cm] \dfrac{1-\alpha^i_t}{1-p_t}w^i_{t-1}\,=\,\left(1-c+c\,\dfrac{1-\pi^i}{1-p_t}\right)w^i_{t-1} & \text{if }s_t=0\,. \end{cases} \label{eq:wealth} \end{equation} In this setting, \cite{kets2014}\footnote{Notice that the mathematical specification of the model may appear different from the one presented in \cite{kets2014}. However, as explained in \cite{bottazzigiachini2019b}, the two specifications are indeed equivalent.} want to explore the selection dynamics of the model and are particularly interested in the asymptotic (steady state) value of expected wealth shares and price for $c\to0$. Indeed, they conjecture that in such a limit the steady state expectation of $p_t$ matches $\pi^*$ and use the case $c=0.01$ as a proxy. In Section~\ref{manual}, we replicate exactly the analysis of \cite{kets2014}, reproducing their Figures 3(c) and 3(d). Thus, we follow the procedure proposed in~\cite{kets2014} to estimate steady state expected wealth shares and price for several values of $\pi^*$ under the parametrization in Table~\ref{tab:params}. In doing that, we highlight some issues related to initial condition bias and strong autocorrelation. Indeed, the warmup period appears not correctly determined, and the autocorrelation within the observations of each performed simulation not correctly accounted for. This is due to the procedure for computing CIs used in~\cite{kets2014} and has the result of producing extremely wide CIs. \begin{table}[t] \center \begin{tabular}{c c ccc ccc} \toprule &\multicolumn{3}{c}{\emph{Beliefs}} & \multicolumn{3}{c}{\emph{Wealth}} \\ \cmidrule(r){3-5} \cmidrule(r){6-8} $N$ & $c$ & \ $\pi^1$ & \ $\pi^2$ & \ $\pi^3$ & $w^1_0$ & $w^2_0$ & $w^3_0$\\%[0.4cm] $3$ & $0.01$ & $0.3$ & $0.5$ & $0.8$ & $0.33$ & $0.33$ & $0.34$ \\ \bottomrule \end{tabular} \caption{Parameters used for the prediction market model. } \label{tab:params} \end{table} After this, in Section~\ref{sec:automatic}, we perform the steady state analyses using our approach. We show that, thanks to the provided automatic procedures, our estimates (and the corresponding confidence intervals) of steady state expected wealth shares and price are correctly determined. Our conclusions differ not just quantitatively, but also qualitatively from those in~\cite{kets2014}, and match those from~\cite{bottazzigiachini2019b}. Overall, our analysis shows the importance of using an automated procedure provided with statistical guarantees. \subsection{Steady state analysis with \emph{\texttt{manualRD}\xspace} using original wrong warmup estimation}\label{manual} As discussed in Section~\ref{sec:queries}, by using \texttt{manualRD}\xspace MultiVeStA\xspace{} allows one to manually set an \emph{a-priori} estimate of the warm-up period. MultiVeStA\xspace{} also allows one to fix the maximum number of simulations used in an analysis based on independent replication. In general it is always advisable to do not fix such parameters \emph{a-priori}, but to use the offered automated procedures so to avoid bias in the estimates and excessively large CIs. In this section we exemplify these issues by fixing a priori the erroneous warmup estimate and number of simulations used in~\cite{kets2014}, and discuss the problems this introduced in the obtained results. \cite{kets2014} performed an RD-based steady state analysis of the agents' wealth $(w^1_t,w^2_t,w^3_t)$ and market price $p_t$ using the parametrization of Table~\ref{tab:params}. The authors arbitrarily estimated the end of the warmup period after \np{90000} steps, and fixed the time horizon of each simulation to \np{100000} steps and the number of performed simulations to \np{1000}. This means that estimates were computed averaging the last \np{10000} observations in each simulation (the horizontal means of Figure~\ref{fig:nmsimsAnalysis}(c)) and then further averaging the so-computed means from each simulation (the vertical means). We shall see how this led to estimates highly biased by the initial conditions. Regarding computations of confidence intervals, \cite{kets2014} did not follow the standard approach relying on the central limit theorem used by MultiVeStA\xspace. Rather, \cite{kets2014} considered how the above discussed \np{1000} averages built for each simulation distribute. In particular, the 5-th and 95-th percentiles of such distribution are taken as the bounds of confidence intervals with 10\% statistical significance. The problem with this approach is that, differently from the approach used by MultiVeStA\xspace, it is based on the assumption that each of the considered \np{1000} averages has the same distribution of an average across independent replications computed at a time $t$ large enough to have reached steady state. This is not correct because, as well as the initial condition bias, the process is characterized by strong autocorrelation. We shall discuss how this led to erroneous interpretation of the results. \begin{figure}[t] \centering \includegraphics[width=0.49\linewidth]{figures/FigWrong-pi39.jpg}~ \includegraphics[width=0.49\linewidth]{figures/FigWrongPrice-pi39.jpg} \caption{\small Steady state analysis of expected agents' wealth and market price according to the manual warm-up and simulation length settings of \cite{kets2014}. We obtain these results by using \texttt{manualRD}\xspace setting the end of the warmup periods to \np{90000}, and the time horizons to \np{100000}. By setting both $\mathit{bl}$ (the number of simulations in a block) and the maximum number of simulations performed to \np{1000}, we use precisely \np{1000} simulations to estimate each property, perfectly matching the setting used in \cite{kets2014}. We consider 39 equally spaced values for $\pi^*$, from $0.025$ to $0.975$, each requiring a separate MultiVeStA\xspace{} analysis on a correspondingly parameterized instance of the model (we automated this process using an external Octave script). Confidence intervals computed by MultiVeStA\xspace for agents' wealth, not reported in the left panel, are such that the maximum recorded width for a statistical confidence of 90\% is below 0.0025. Confidence intervals for the market price are reported in the right panel, with maximum recorded width below 0.00065 for statistical confidence of 90\%.} \label{fig:wrong} \end{figure} \paragraph{Agents' wealth} In Figure \ref{fig:wrong} we report the outcomes of the exercise replicating those from Figures 3(c) and 3(d) in \cite{kets2014} considering model variants for 39 different values of $\pi^*$. Looking at the left panel one should conclude that there exist model configurations in which all agents have strictly positive expected wealth share in steady state. This is, however, in contrast with the analytical analysis from Proposition 4.1 of \cite{bottazzigiachini2019b}, which proves that no more than two agents can have asymptotic positive wealth share. Thus, the fact that \cite{kets2014} incorrectly suggest that more than two traders can have positive expected wealth in steady state is an artifact of the initial condition bias that affects their analysis. Notice that the convergence to zero of the wealth share of at least one trader is asymptotic, thus wealth shares show a bias for any $t$. However, such bias decreases with $t$ and can be made negligible choosing a sufficiently long warm-up and simulation length. What we observe is that discarding the first \np{90000} observation of every run is simply not enough. \begin{figure}[t] \centering \includegraphics[width=0.49\linewidth]{figures/FigWrongPriceKetsetalCI.jpg} \includegraphics[width=0.49\linewidth]{figures/FigWrongPrice.jpg} \caption{\small Estimates of steady state difference between the expected price and $\pi^*$ using the settings from Figure~\ref{fig:wrong}. We consider 49 equally spaced values for $\pi^*$, from $0.31$ to $0.79$. The dashed lines are CIs built on the same samples using two different procedures. Left: CIs are erroneously computed (using an external Octave script) according to the procedure in \cite{kets2014}. Right: CIs as computed by MultiVeStA\xspace using the approach based on the central limit theorem. } \label{fig:wrongpriceCI} \end{figure} \paragraph{Market price} The right panel of Figure \ref{fig:wrong} shows the average price and should support one of the main results of \cite{kets2014}: the expected market price matches $\pi^*$ when $c=0.01$ and $\pi^*$ is strictly between the lowest and the highest of agents' beliefs. \cite{bottazzigiachini2019b} suggest that such a conclusion is not correct and the source of inaccuracy should be found in the way in which CIs are built by \cite{kets2014}. In order to better understand this aspect, we create a new plot in Figure~\ref{fig:wrongpriceCI} focusing on the difference between market price and $\pi^*$. In the left panel of the figure we report the CIs (dashed lines) obtained by applying the procedure of \cite{kets2014}, while in the right panel we show those obtained by MultiVeStA\xspace{}. As one can notice, the procedure of \cite{kets2014} produces large CIs, backing the claim of the authors. Instead, the CIs obtained by MultiVeStA\xspace{} using the approach based on the central limit theorem are much tighter and disprove the claim of the authors. To understand the source of disagreement between the two approaches, consider the following argument: if the \np{10000} observations of $p_t$ from each simulation used to compute the average price of every replication were independent and at steady state, then we would not have spotted any significant difference. Indeed, according to the Central Limit Theorem, we have that each time average is (approximately) distributed as a normal random variable with mean the steady state expectation of the price and variance the steady state variance of price over $\sqrt{\np{10000}}$. The initial condition bias lets the expected time average be different from the steady state expectation. The strong autocorrelation in the price process \citep{bottazzigiachini2019b} lets confidence intervals be too wide. While the \texttt{manualRD} procedure used here can do nothing about the initial condition bias, with respect to confidence intervals MultiVeStA\xspace{} does not assume anything about the distribution of time averages, simply relies on the Central Limit Theorem. Indeed, the average across \np{1000} independent replications of the \np{10000}-period time averages is (approximately) distributed as a normal random variable with variance the time averages' variance over $\sqrt{\np{1000}}$. This exercise shows the importance of correctly building confidence intervals when testing hypothesis on steady state quantities from simulated models. We proceed showing that setting the required statistical significance ($\alpha$) and confidence interval width ($\delta$) instead of the total number of independent replicas is a much more reliable and efficient procedure to test hypotheses on steady state expectations. \begin{figure}[t] \centering \includegraphics[width=0.33\linewidth]{figures/FigWrongPrice-d002.jpg} \includegraphics[width=0.33\linewidth]{figures/FigWrongPrice-d001.jpg} \includegraphics[width=0.33\linewidth]{figures/FigWrongPrice-d0005.jpg} \caption{\small Estimates of steady state difference between the expected price and $\pi^*$ using the settings from Figure~\ref{fig:wrong} for warmup estimation and time horizon. The number of simulations is automatically chosen by MultiVeStA\xspace{} according to the used values of $\delta$, for $\alpha=0.025$. As in Figure~\ref{fig:wrongpriceCI}, we consider 49 equally spaced values for $\pi^*$, from $0.31$ to $0.79$. Left: $\delta=0.002$, the number of simulations varies between \np{60} and \np{120}. Center: $\delta=0.001$, the number of simulations varies between \np{120} and \np{360}. Right: $\delta=0.0005$, the number of simulations varies between \np{420} and \np{1440}.} \label{fig:wrongprice} \end{figure} \paragraph{Market price for different $\alpha$-$\delta$} In Figure \ref{fig:wrongprice}, we test the hypothesis from \cite{kets2014} that no difference between the average price and $\pi^*$ exists under the parametrization in Table \ref{tab:params}. We use again \texttt{manualRD}\xspace keeping the same settings for warmup estimation and time horizon discussed in advance, while the number of simulations is automatically chosen by MultiVeStA\xspace{} according to different values of $\delta$ ({0.002}, {0.001}, and {0.0005}), for $\alpha=0.025$ (i.e. a statistical confidence of 97.5\%). If the hypothesis from \cite{kets2014} were correct, the difference should be almost never significantly different from zero for any $\delta$ considered. Instead, we notice that $\delta$ plays an important role in assessing the hypothesis testing outcome. Indeed, while with $\delta=0.002$ the computed CIs for the difference among market price includes $0$ for almost all $\pi^*$, with $\delta=0.001$ the CIs almost never includes $0$. This confirms the point of \cite{bottazzigiachini2019b} and the results we have obtained in Figure \ref{fig:wrongpriceCI} right panel: the hypothesis of no difference between the average price and $\pi^*$ is generically rejected. Focusing on $\delta=0.0005$ and looking at the number of required simulations, one notices that there exist cases in which the hypothesis that no difference between the average price and $\pi^*$ exist can be rejected with less than \np{1000} simulations\footnote{This is typically the case at the extrema, indeed {0.31} and {0.79} require, respectively, 420 and 480 replicas.}. In other cases, instead, \np{1000} independent replications are not enough and one may risk to get to the wrong conclusion simply because of an insufficient number of replicas.\footnote{This may occur for $\pi^*$ around {0.55}, where MultiVeStA\xspace{} needs \np{1440} simulations to reach the required interval width.} Notice, however, that due to the arbitrary choice of the end of the warmup period, all the estimates are biased by the initial conditions. We next use MultiVeStA\xspace{}'s automated steady state analysis (\texttt{autoRD}\xspace and \texttt{autoBM}\xspace) to accurately estimate steady state expectations and to finally assess on such obtained results the hypothesis of \cite{kets2014}. \subsection{Steady state analysis with \emph{\autord} and \emph{\autobm} using automatic warmup estimation}\label{sec:automatic} \begin{figure}[t] \centering \includegraphics[width=0.49\linewidth]{figures/Fig7RD2at6-pi39.jpg}~ \includegraphics[width=0.49\linewidth]{figures/Fig7BM2at6-pi39.jpg} \caption{\small Steady state levels of average wealth shares. Left: Replication-Deletion. Right: Batch Means. We set $\alpha=0.025$ and $\delta=0.001$, while we consider 39 equally spaced values for $\pi^*$, from $0.025$ to $0.975$, each one of these points requires a separate MultiVeStA\xspace{} query that has been invoked and aggregated with the others by means of an external Octave script.} \label{fig:wealth} \end{figure} Now we repeat the exercises using the automated tools for steady state analysis provided by MultiVeStA\xspace{}, starting by estimating expected wealth shares. \paragraph{Agents' wealth} Our results are displayed in Figure \ref{fig:wealth}. In the left panel we use the Replication-Deletion approach (\texttt{autoRD}\xspace) while on the right we use the Batch Means approach (\texttt{autoBM}\xspace). As one can notice: $i)$ our results comply with the theoretical and numerical ones of \cite[][cf. Figure 7]{bottazzigiachini2019b} and $ii)$ no significant difference can be spotted between the two pictures. Hence, our automated procedures allow one to avoid (or, at least, reduce) biases generated by initial conditions. As a practical example, let us consider the statistical analysis of steady state expectations for $\pi^*=0.6$. The \texttt{manualRD}\xspace procedure, using the settings from Section~\ref{manual}, estimates the expected wealth share of agents 1, 2, and 3 to, respectively, \np{0.089}, \np{0.519}, and \np{0.392}. Instead, \autord and \autobm estimate the expected wealth shares to, respectively, 0, \np{0.668}, and \np{0.332}, in agreement with the results from~\cite{bottazzigiachini2019b}. Looking at the estimated warm-up end, our automated tools propose values higher than \np{4000000} for every expected wealth share. This confirms how manually setting the warm-up end to \np{90000} generates a large initial condition bias in the estimation of steady state expectations of agents' wealth. Our analysis, other than correctly estimating steady state expected wealth shares, clearly highlights the source of inaccuracy in the exercise of \cite{kets2014}, and stresses the importance of using a reliable automated procedure to pursue steady state analyses. \begin{figure}[t] \centering \includegraphics[width=0.49\linewidth]{figures/FigPSSRD-d0005.jpg}~ \includegraphics[width=0.49\linewidth]{figures/FigPSSBM-d0005.jpg} \caption{\small Steady state levels of average price. Left: Replication-Deletion. Right: Batch Means. We set $\alpha=0.025$ and $\delta=0.0005$, while we consider 49 equally spaced values for $\pi^*$, from $0.31$ to $0.79$, each one of these points requires a separate MultiVeStA\xspace{} query that has been invoked and aggregated with the others by means of an external Octave script.} \label{fig:price} \end{figure} While there are no significant differences between the estimates generated by \autord and autoBM, the time required for producing the results changes. Indeed, the analysis runtime of \autord (using parallelism degree 3) is about 3 times larger than the one of \autobm. As discussed in Section~\ref{sec:bmvsrd}, cases like this with large warmup periods tend to favour \texttt{autoBM}\xspace. \paragraph{Market price} Next, we estimate the expected value in steady state of the market price. As we did in Figures~\ref{fig:wrongpriceCI} and~\ref{fig:wrongprice}, in order to magnify confidence bands in Figure~\ref{fig:price} we show our estimates of the difference between the expected price and $\pi^*$ for different values of $\pi^*\in(0.3,0.8)$. In the left and right panels we show the \autord and \autobm results, respectively. We notice that, for any value of $\pi^*$ considered, the estimated difference between the expected price and $\pi^*$ does not change in a significant manner between the two plots. The emerging expected difference presents a clear pattern: it is larger (in absolute value) when $\pi^*$ is close to the belief of one of the agents. Moreover, the expected difference appears to be negative when $\pi^*$ is closer to the belief of the agent whose belief is, relatively, the smallest (i.e. among the surviving ones) while it tends to be positive when it is the other way round. These features are in line with the results obtained by \cite{bottazzigiachini2019b} in Figure 4. Hence, the reliability of the steady state analysis performed by MultiVeStA\xspace{} is confirmed. Moreover, we can conclude that, contrary to what \cite{kets2014} argue, the steady state value of the average price does not generally match $\pi^*$ when $c=0.01$. The analysis presented in Section~\ref{sec:automatic} satisfies all tests of the methodology for ergodicity diagnosis from Section~\ref{sec:methodologyergodicity}, confirming the reliability of the analyses. We show in the next section examples of analysis where this does not hold. \section{Application: Ergodicity diagnosis in a CRRA prediction market model with noise} \label{sec:nonergodic} We apply our methodology for ergodicity diagnosis to variants of the prediction market model. For all analyses we set $\alpha=0.05$ and $\delta=0.01$. \subsection{Three variants of the prediction market with 2 CRRA traders: IID noise, AR noise, ergodic} Here we modify the model studied in the previous section to allow violations of the ergodicity assumption. Following \cite{BottazziGiachini2019a}, it is enough to assume that in the market there are $N=2$ traders who bet maximizing their next-period CRRA utility to obtain non-ergodic price and wealth dynamics. Such a different behavioral assumption changes the betting rules. Indeed, we keep the assumption that agents 1 and 2 have heterogeneous beliefs ($\pi^1$ and $\pi^2$, respectively, with $\pi^1<\pi^2$) and we add risk preferences, assuming that the relative risk aversion coefficient of agent $i$ is $\gamma^i>0$, with $i=1,2$. Thus, we replace eq. \eqref{eq:alpha} with \begin{equation} \alpha^1_t= (1-b^1_{t})p_t\quad\text{and}\quad\alpha^2_t=(1-b^2_{t})p_t+b^2_t\,,\quad\text{where} \label{eq:alpha1} \end{equation} \begin{equation} b^1_t=\dfrac{\left(p_t(1-\pi^1)\right)^{\frac{1}{\gamma^1}}-\left(\pi^1(1-p_t)\right)^{\frac{1}{\gamma^1}}} {\left(p_t(1-\pi^1)\right)^{\frac{1}{\gamma^1}}+p_t\left(\pi^1\right)^{\frac{1}{\gamma^1}}(1-p_t)^{\frac{1-\gamma^1}{\gamma^1}}} \quad\text{and}\quad b^2_t=\dfrac{\left(\pi^2(1-p_t)\right)^{\frac{1}{\gamma^2}}-\left(p_t(1-\pi^2\right)^{\frac{1}{\gamma^2}}} {\left(\pi^2(1-p_t)\right)^{\frac{1}{\gamma^2}}+(1-p_t)\left(1-\pi^2\right)^{\frac{1}{\gamma^2}}(p_t)^{\frac{1-\gamma^2}{\gamma^2}}}\,. \label{eq:b} \end{equation} \cite{BottazziGiachini2019a} show that, depending on the parameters values -- in particular $\gamma^1$ and $\gamma^2$ -- several long-run selection scenarios are possible. Indeed, one can generically have that: $i)$ one of the two agent has asymptotic unitary wealth share, $ii)$ both agents maintain positive wealth share asymptotically, $iii)$ path dependent scenarios in which either agent 1 obtains unitary wealth share asymptotically while agent 2 loses everything or vice-versa. Focusing on the market price $p_t$, in case $i)$ $p_t$ converges to $\pi^i$ (with $i$ the dominating agent), in case $ii)$ $p_t$ fluctuates in the interval $(\pi^1,\pi^2)$, and in case $iii)$ $p_t$ either converges to $\pi^1$ or to $\pi^2$ depending on the particular sequence of events realized. Case $iii)$ is the one we are interested in: in such a case the ergodicity assumption is violated. However, the asymptotic convergence of the price to one out of two points makes quite easy to spot the lack of ergodicity and the presence of the two possible long-run price values. Hence, we complicate the setting assuming that there exists a third agent in the model who does not trade nor interacts in any way with agents 1 and 2. He simply observes the price and reports it. Such report is, however, noisy. Defining $\tilde{p}_t$ the price such external agent reports, we assume $\tilde{p}_t=p_t+v_t$ with $v_t=\theta v_{t-1}+u_t$ and $u_t$ a uniformly distributed random variable: $u_t\sim \mathcal{U}(-\eta,\eta)$, $\eta>0$. Such price reports are not taken into account by agents 1 and 2, hence all the properties of $p_t$ deriving from the analysis of \cite{BottazziGiachini2019a} remain unaffected. Moreover, $v_t$ is an autoregressive process of order 1 with zero mean. Hence, assuming $|\theta|<1$, we have that in the long-run $\tilde{p}_t$ fluctuates around either $\pi^1$ or $\pi^2$ depending on the sequence of realized events. Thus, the lack of ergodicity $\tilde{p}_t$ shows is somehow ``well-behaved''. That is, if one isolates the sequences in which $p_t$ converges to a given $\pi^i$, one will obtain that the time averages (i.e. horizontal means) of the relative observations of $\tilde{p}_t$, for $t$ large enough, are approximately normally distributed with mean $\pi^i$. Hence, we can say that $\tilde{p}_t$ presents two stationary points. At the same time, studying ergodicity of $\tilde{p}_t$ is much more complicated than performing the same tasks on $p_t$. In what follows, we set $\eta=0.5$ and consider two scenarios for $\theta$. In the first one, we consider $\theta=0$. We refer to it as ``IID noise'' scenario, since we have that, in the long-run, the fluctuation described by $\tilde{p}_t$ around either $\pi^1$ or $\pi^2$ are IID. In the second scenario, instead, we consider the opposite case: setting $\theta=0.9$ we analyze the performance of our methodology when the noise is highly autocorrelated. We refer to it as the ``AR noise'' scenario. Finally, as a robustness check, we apply our methodology to a case in which ergodicity should be ensured. We choose a scenario belonging to case $ii)$: long-run survival of both agents. This makes $p_t$ fluctuate in the interval $(\pi^1,\pi^2)$ indefinitely. Moreover, we set $\theta=0.9$ as in AR noise. These two assumptions, even if not affecting the ergodic properties of $\tilde{p}_t$, should make relatively harder for our methodology to work. We refer to this case as ``Ergodic''. Table~\ref{tab:paramsCRRA} summarizes the parametrization used in our analyses. While the setting for \textit{IID noise} and \textit{AR noise} scenarios ensure the emergence of multiple stationary points, leading to a non-ergodic scenario, the assumptions for the \textit{Ergodic} scenario guarantee the persistent fluctuation of $p_t$ \citep{BottazziGiachini2019a}. \begin{table}[t] \center \begin{tabular}{c c c cc cccc cc cc} \toprule \emph{Scenario} & & &\multicolumn{2}{c}{\emph{Beliefs}} &\multicolumn{4}{c}{\emph{Risk Aversion}} & \multicolumn{2}{c}{\emph{Wealth}}& \multicolumn{2}{c}{\emph{Noise}} \\ \cmidrule(r){4-5} \cmidrule(r){6-9} \cmidrule(r){10-11} \cmidrule(r){12-13} & \ $N$ & \ $\pi^*$ & \ $\pi^1$ & $\pi^2$ & \ & $\gamma^1$ & \ $\gamma^2$ & \ & $w^1_0$ & $w^2_0$ & \ $\eta$ & $\theta$ \\%[0.4cm] \cmidrule(r){1-13} IID noise & $2$ & $0.45$ & $0.2$ & $0.5$ & & $2$ & $0.5$ & & $0.5$ & $0.5$ & $0.5$ & $0$ \\ AR noise & $2$ & $0.45$ & $0.2$ & $0.5$ & & $2$ & $0.5$ & & $0.5$ & $0.5$ & $0.5$ & $0.9$ \\ Ergodic & $2$ & $0.45$ & $0.2$ & $0.8$ & & $2$ & $2$ & & $0.5$ & $0.5$ & $0.5$ & $0.9$ \\ \bottomrule \end{tabular} \caption{Parameters used for the prediction market model with CRRA traders and noisy price reporting. } \label{tab:paramsCRRA} \end{table} \subsection{Application of the methodology for ergodicity analysis} \paragraph{IID noise} We start our analysis by applying \autobm and \autord to the IID noise case. The former requires $\np{33792}$ steps of simulation. It signals that the warmup ends after the first batch of \np{1024} steps, and estimates the steady state mean as $0.498$. Instead, \autord signals that the warmup ends after \np{1032} steps. After \np{2604} independent replications, it estimates the steady state mean as $0.426$. With reference to our methodology for ergodicity analysis in Figure~\ref{fig:ergo}, we performed step 1, and passed the termination check of step 2. After that, step 4 requires to compare the results of \texttt{autoBM}\xspace and \texttt{autoRD}\xspace. The difference among the two results is larger than $\delta$, suggesting an ergodicity problem. According to our method, we already have an indication of non-ergodicity. However, for illustrative reasons we also performed the Anderson-Darling normality test on the horizontal means computed by \texttt{autoRD}\xspace (step 5), obtaining a p-value equal to 6.092E-251, which allows us to reject the null hypothesis that the horizontal means are normally distributed. Hence, our methodology is able to correctly spot that the IID noisy price lacks ergodicity. \paragraph{AR noise} We consider now the AR noise case starting with \texttt{autoBM}\xspace. The algorithm estimates the warmup to end in \np{1024} steps, and the steady state mean as $0.499$. Instead, by performing \autord we obtain that the warmup is estimated to end after \np{1032} steps. The total number of independent replications needed by \autord to reach the IC width is \np{2709}, obtaining as result $0.426$. Therefore, the two algorithms provide significantly different results for the used $\delta$, suggesting an ergodicity problem (step 4). This is confirmed by the Anderson-Darling normality test of step 5 which computes a p-value of $1.458$E-136, rejecting the normality assumption. Therefore, our methodology is able to correctly spot that also the AR noisy price lacks ergodicity. \paragraph{Ergodic} Finally, we perform a robustness check on our methodology by applying it to the Ergodic scenario. Using \texttt{autoBM}\xspace, the warmup is estimated to end after \np{1024} steps producing as result $0.4027$. Using \autord, one gets that the warmup is estimated to end after \np{1032} steps. The number of independent replications needed for reaching CIs of width $\delta$ is \np{210}, obtaining as result $0.4035$. Thus, the two algorithms give results within the tolerance of $\delta$ (step 4). The normality test from step 5 cannot reject the null hypothesis of normality, as we get a p-value of $0.691$. Therefore, our methodology correctly suggests that no violation of ergodicity is observed. \section{Parallelization study}\label{sec:parallelizationstudy} \begin{figure}[t] \centering \includegraphics[scale=0.35]{figures/Parallelizationstudy.pdf} \hfill \includegraphics[scale=0.35]{figures/Parallelizationstudy15_60.pdf} \caption{Analysis of the runtime speed-ups on a machine with 20 physical cores.} \label{fig:speedup} \end{figure} One of the key issues in the analysis of ABMs in social sciences concerns computational time; while some approaches have recently proposed to take advantage of machine learning surrogates \citep{lamperti2018agent, van2019}, the most direct approach to speed-up simulation is an efficient parallelisation of the experiments. In this section we discuss how MultiVeStA\xspace can efficiently and automatically parallelize the various runs. Notably, we demonstrate the potential analysis speedups showing an analysis that requires about 15 days when performed in sequential, and about 16 hours when parallelizing it on a machine with 20 cores. In particular, we show the actual runtime gains obtained on the analysis of our case studies when using different degrees of parallelism on a machine with 1 CPU Intel Xeon Gold 6252 (20 physical cores) and 94GB of RAM. This machine allows to perform up to 20 processes in parallel, but \emph{hyperthreading} further allows for limited speedups also with parallelism degrees higher than 20. Figure~\ref{fig:speedup} (left) shows the results of our study considering the sequential case and parallelism degrees $N$ multiple of $5$ up to $60$. Intuitively, in the ideal case an analysis using parallelism degree $N$ should take $\frac{1}{N}$ of the time required by a sequential analysis (i.e. with $N=1$). For this reason, the red dashed line provides the optimal obtainable speed-ups: 1 (no speed up) for the sequential case, and $\frac{1}{N}$ for all considered $N$. The blue and yellow dots, instead, show the actual speedups obtained for our two case studies. In particular, in order to compare with the optimal speedup, for each value of $N$ we provide the ratio among the runtime obtained with parallelism degree $N$ over the one of the sequential case. For the prediction market model, we consider the \texttt{autoRD}\xspace analysis from Figure~\ref{fig:wealth} (left) for $\pi^*=0.45$, while for the macro model we consider the analysis from Figure~\ref{fig:analysisMacroABM}. Notably, the analysis of the macro model took about 15 days when executed sequentially, while it goes down to about 18 hours for $N=20$, and 16 hours for $N=25$. The analysis failed for higher values of $N$ due to the high memory requirements of the model. Instead, the analysis of the prediction market model requires about 14 minutes in sequential and about $50$ seconds for $N=20$. The analysis could be performed for all considered $N$, with a minimum runtime of about $38$ seconds for $N=40$. Overall, for both case studies we note speedups very close to the optimal ones up to $N=20$, while they tend to deteriorate for higher values of $N$. Figure~\ref{fig:speedup} (right) focuses on the values of $N$ from $15$ onwards. We see that the speedups obtained for the macro model tend to be closer to the optimal ones. This is because simulations are computationally intensive, taking more than 1 hour. Therefore, the \emph{overhead} (i.e. the extra computations) introduced by the communications among the MultiVeStA\xspace{} client and servers has almost no impact on the overall runtime. Instead, the prediction market model is not particularly computationally expensive, making the extra communications influence more the overall runtime. In particular, the figure shows that relatively limited speedups are obtained for $N$ greater than $25$. This is expected, as discussed. Interestingly, increasing $N$ further than $40$ actually worsens the performances, as the processor is not anyway able to perform more than 20 processes in parallel while the overhead costs increase. \section{Conclusion}\label{sec:conclusions} In this article we presented a fully automated framework for the statistical analysis of simulation models and, in particular, agent-based models (ABM). The framework, implemented through the statistical analyzer MultiVeStA\xspace, provides a novel toolkit to the ABM community. These tools range from transient analysis, with statistical tests to compare results for different model configurations, to warmup estimation and the exploration of steady state properties, including a procedure for diagnosing ergodicity -- and hence the reliability of any steady state analysis. Our approach can be easily applied to simulators written in Java, Python, R or C++, and we also added native support in JMAB, a framework for building macro stock-flow consistent ABMs. Our tools allow modellers to automate their explorations, save time and avoid mistakes originating from semi-automated and error-prone tasks. Importantly, this facilitates reproducibility of experiments and promotes the use of a minimal set of \emph{default} analyses that should be performed when proposing or studying a model. We validated our approach on two models from the literature: a large scale macro financial ABM and a small scale prediction market ABM (and variants thereof). We obtained new insights on these models, identifying and fixing erroneous results from prior analyses. Our framework also allows one to easily parallelize simulations within the cores of a machine or in a computer network. For instance, we reduced the analysis runtime for the macro ABM from 15 days to 16 hours on a machine with a CPU with 20 cores. Indeed, our toolkit enables modellers to run extensive tests in a unique environment (i.e. without the need of exporting data) and optimizing computational time (which is often precious; see also the discussion in \citealp{lamperti2018agent}). Our approach is rooted in results from the simulation, computer science and operations research communities, which we aim to make available to the ABM community. Connecting these communities is critical to leverage the most effective techniques and approaches across fields. For example, the stationarity analysis proposed by \cite{grazzini2012analysis} mentioned in Section~\ref{sec:outputanalysis} can be viewed as a non-automated version of the batch means approach by~\cite{Conway1963} and \cite{doi:10.1287/opre.27.5.1011}. In the near future, we plan to integrate MultiVeStA\xspace{} with other popular platforms used to build and analyse simulation models -- including the LSD environment for ABMs~\citep{valente2008} and the JASMINE environment for discrete-event simulations \citep{richiardi2017jas}. We see this article as a first step in bringing practices from the statistical model checking (SMC) tool-set to the ABM computational economics community. Of particular interest in this respect are SMC techniques developed to mitigate two classic problems of Monte Carlo methods: dealing with models that present rare events~\citep{DBLP:conf/rp/LegayST16}, and using machine learning techniques to reduce the number of simulations~\citep{DBLP:conf/rv/BortolussiMS15}. Finally, we will expand the family of automated analysis techniques offered in MultiVeStA\xspace. For instance, we will extend and refine our ergodicity diagnostics procedure, e.g. tackling the problem of identifying multiple stationary points (assuming they are finitely many) by means of clustering algorithms. We also plan to further improve our proposals for the analysis of simulation output, e.g., by introducing corrections for multiple testing across the time domain, and move beyond it, e.g., by considering sensitivity analysis and parameter calibration, which are prominent in the ABM community. \singlespacing \bibliographystyle{chicago}
\section{Introduction} In the numerical computations of compressible flows, simulations cannot proceed when negative density or squared speed of sound appears because the system of equations becomes ill-posed. This problem is more pronounced for extreme applications such as those in astrophysics where strong shocks, rarefactions, or blast waves may exist in the simulations. While one can have successful simulations with some robust (or even positivity-preserving) first or second order shock-capturing schemes~\cite{einfeldt1991godunov,linde1997robust,batten1997choice,liou1996sequel, gressier1999positivity}, these schemes are numerically very dissipative and are inefficient for scale-resolving simulations, such as large eddy simulations (LESs) or direct numerical simulations (DNSs). Over the decades, many high-order accurate shock-capturing schemes with more localized numerical dissipation and higher resolution were developed for scale-resolving simulations ~\cite{shu1988efficient,jiang1996efficient,deng2000developing,borges2008improved,kawai2010assessment,hu2010adaptive,johnsen2010assessment,fu2016family,wong2017high,subramaniam2019high}. While these high-order shock-capturing schemes have a certain degree of robustness for problems involving shocks and other kinds of discontinuities, there is still no guarantee of having successful simulations for severe problems using those schemes. Replacing the negative density or squared sound speed with positive ones is not conservative and may trigger other numerical issues such as spurious oscillations. In recent years, many positivity-preserving limiters~\cite{zhang2010positivity,zhang2011positivity,zhang2012positivity,hu2013positivity} have been developed for high-order shock-capturing schemes. These limiters can preserve positivity of density and squared speed of sound for compressible flows. Motivated by the positivity-preserving technique in~\citet{perthame1996positivity}, \citet{zhang2010positivity} developed positivity-preserving high-order discontinuous Galerkin (DG) schemes for Euler equations. The method was later extended to Euler equations with source terms~\cite{zhang2011positivity}. Positivity-preserving limiters specifically designed for high-order finite difference schemes didn't appear until the works by~\citet{zhang2012positivity} and \citet{hu2013positivity} where extreme problems could be successfully simulated with the finite difference weighted essentially non-oscillatory (WENO) schemes using positivity-preserving limiters. These methods are conservative as the limiters are applied to the fluxes directly in the conservation form. All of the positivity-preserving limiters aforementioned were designed for compressible single-phase flows. The appearance of non-physical states also happens in compressible multi-phase simulations. In general it is more likely for non-physical states to appear due to higher density gradients across material interfaces in the related applications such as supersonic combustion, cavitation erosion, break-up of high-speed liquid jets, water-based acoustic suppression systems, etc. In addition to having negative density and squared speed of sound, the solutions are also considered non-physical if mass fractions or volume fractions are not bounded between zero and one. In order to address the numerical issues, some boundedness-preserving diffuse interface methods~\cite{shen2017maximum,jain2020conservative} in the Eulerian framework have been proposed. \Citet{shen2017maximum} adopted the maximum-principle-satisfying limiter by~\citet{zhang2010maximum} for a space-time conservation element and solution element (CE/SE) scheme. The scheme can ensure the boundedness of volume fractions in the five-equation model by~\citet{allaire2002five} for multi-phase flows. Another thermodynamics-consistent boundedness-preserving scheme by~\citet{jain2020conservative} for the same flow model was developed with the use of interface-regularization terms. Although both methods can preserve boundedness of volume fractions, non-physical states can still appear in the multi-phase simulations since partial densities or squared sound speed can still become negative. A positivity-preserving high-order method by~\citet{cheng2014positivity} was proposed for multi-phase simulations in the Lagrangian framework. Compared to Eulerian diffuse interface methods, Lagrangian methods can be more accurate at material interfaces since the computational mesh moves with the fluids. On the other hand, diffuse interface methods in the Eulerian framework is more attractive for flows involving large deformations as the degree of deformations is limited by mesh distortions in Lagrangian methods~\cite{saurel2018diffuse}. Motivated by the need for the simulations of water sound suppression systems in rocket launch environments that involve interactions between strong shocks and complex air-water interfaces, we propose a high-order positivity-preserving diffuse interface method in the Eulerian framework targeting gas-liquid two-phase flows with large deformations, where the gas and liquid are described by the ideal gas and stiffened gas equation of states respectively. Unlike the previous works~\cite{housman2009time1,housman2009time2} that are based on the homogeneous relaxation model, the flows in this work are described by the five-equation model by~\citet{allaire2002five}. Under a necessary but generally valid assumption that the ratio of specific heat of the gas is smaller than that of the liquid, the numerical method can ensure physically admissible states with positive partial density of each phase, positive squared sound speed, and bounded volume fractions and mass fractions. The high-order shock-capturing scheme used in this work is based on the explicit finite difference formulation of weighted compact nonlinear schemes (WCNSs)~\cite{deng2000developing,nonomura2007increasing,zhang2008development,nonomura2009effects,deng2011new,nonomura2013robust,wong2017high} and the nonlinear weighting technique of the incremental-stencil WENO (WENO-IS) scheme~\cite{wang2018incremental}. The use of WCNS as a diffuse interface method for the five-equation model~\cite{allaire2002five} has already been demonstrated by~\citet{wong2017high} but it is only applied for single-phase flows with mixture of ideal gases. The WENO-IS scheme was originally designed as a finite volume scheme by~\citet{wang2018incremental} for compressible multi-phase flows with shocks and material interfaces using the same five-equation model. Although the robustness of the scheme was demonstrated in that paper, the finite volume approach is computationally more expensive than the finite difference WCNS for multi-dimensional problems, while the orders of accuracy are similar~\cite{sebastian2003multidomain}. The WCNS with the WENO-IS nonlinear weighting technique, WCNS-IS, presented in this work is more efficient and has similar robustness in minimizing spurious oscillations in simulations. In this work, we first show the convexity of the physically admissible set of solution states, under the mild assumption on the relative magnitude between the ratios of specific heats of the ideal gas and the liquid. We then prove the positivity-preserving and boundedness-preserving properties of the first order Harten–Lax–van Leer contact (HLLC) flux for gas-liquid flows with our choice of the advection velocity of the material interface using the convexity of the admissible set. Based on the positivity- and boundedness-preserving properties of the first order HLLC flux, we propose a limiter to blend a flux from any Cartesian conservative high-order shock-capturing schemes with the HLLC flux. The flux limiter together with a limiter for WENO interpolation can ensure the positivity-preserving and boundedness-preserving properties of the overall scheme. The fifth order accurate WCNS-IS formulation presented in this work is also proved mathematically and shown numerically to be high-order accurate in smooth advection problems, while robust because of the use of lower order interpolation near discontinuities such as shocks or material interfaces. We have demonstrated that the WCNS-IS scheme with the positivity- and boundedness-preserving limiters, PP-WCNS-IS, can successfully simulate very intense one-dimensional (1D) and two-dimensional (2D) air-water problems such as Mach 10 shock-water column interaction and Mach 100 water jet problems. The results also show that smaller errors are produced at shocks and material interfaces, and fine-scale flow features such as vortices are better captured with the high-order scheme compared to the first order HLLC scheme due to more localized numerical dissipation and higher resolution of the former method. All of the numerical tests highlight the robustness of the overall positivity- and boundedness-preserving finite difference scheme, and demonstrate the method as a highly accurate diffuse interface method for scale-resolving compressible gas-liquid simulations. \section{Governing equations} The five-equation single-velocity, single-pressure model proposed by~\citet{allaire2002five} for compressible two-phase flows is considered in this work. The flow model has the following form: \begin{align} \partial_t \left( \alpha_1 \rho_1 \right) + \nabla \cdot \left( \alpha_1 \rho_1 \bm{u} \right) &= 0 , \\ \partial_t \left( \alpha_2 \rho_2 \right) + \nabla \cdot \left( \alpha_2 \rho_2 \bm{u} \right) &= 0 , \\ \partial_t \left( \rho \bm{u} \right) + \nabla \cdot \left( \rho \bm{u} \otimes \bm{u} \right) + \nabla p &= 0 , \\ \partial_t E + \nabla \cdot \left[ \left( E + p \right) \bm{u} \right] &= 0 , \\ \partial_t {\alpha_1} + \bm{u} \cdot \nabla \alpha_1 &= 0 , \end{align} where $\bm{u}$ is the velocity vector and $p$ is the mixture pressure. $\bm{u} = u$ and $\bm{u} = ( u \ v )^{T}$ for 1D and 2D cases respectively (similar extension for the three-dimensional case). $\alpha_k$ and $\rho_k$ are respectively the volume fraction and phasic density of phase $k$, where $k=1,2$. $\alpha_k \rho_k = \rho Y_k$ is called partial density of phase $k$, where $\rho = \alpha_1 \rho_1 + \alpha_2 \rho_2$ is the mixture density and $Y_k$ is mass fraction of phase $k$. $E = \rho ( e + \lvert \bm{u} \rvert^2 / 2 )$ is the mixture total energy per unit volume, where $e$ is the mixture specific internal energy. Also, $\alpha_1 + \alpha_2 = 1$ and $\rho e = \alpha_1 \rho_1 e_1 + \alpha_2 \rho_2 e_2$, where $e_k$ is the phasic specific internal energy of phase $k$. The system is closed by the mechanical equilibrium and equation of state of each phase\footnote{In this work, each phase consists of one species.}. The stiffened gas equation of state is chosen in this work because of its popularity for gases and liquids. The equation of state was first proposed by~\citet{harlow1971fluid}. The stiffened gas equation of state of each phase is given by: \begin{equation} \frac{p_k}{\gamma_k - 1} + \frac{\gamma_k p_k^\infty}{\gamma_k - 1} = \rho_k e_k, \label{eq:phase_EOS} \end{equation} where $\gamma_k$ and $p_k^\infty$ are fitting parameters for each of the fluids. $\gamma_k$ is the ratio of specific heats that is greater than one and $p_k^\infty$ is non-negative. The stiffened gas equation of state is reduced to the ideal gas equation of state if $p_k^\infty = 0$. With the mechanical equilibrium assumption, i.e.\ $p_1 = p_2 = p$, we can obtain the mixture equation of state by multiplying equation~\eqref{eq:phase_EOS} by $\alpha_k$ for each phase and then summing over all the phases: \begin{equation} \frac{p}{\overline{\gamma} - 1} + \frac{\overline{\gamma} ~ \overline{p^\infty}}{\overline{\gamma} - 1} = \rho e, \end{equation} where $\overline{\gamma}$ and $\overline{p^\infty}$ are properties of the mixture. They can be defined by the following relations: \begin{align} \frac{1}{\overline{\gamma} - 1} &= \frac{\alpha_1}{\gamma_1 - 1} + \frac{\alpha_2}{\gamma_2 - 1} , \\ \frac{\overline{\gamma} ~ \overline{p^\infty}}{\overline{\gamma} - 1} &= \frac{\alpha_1\gamma_1 p_1^\infty}{\gamma_1 - 1} + \frac{\alpha_2\gamma_2 p_2^\infty}{\gamma_2 - 1} . \end{align} We define the conservative variable vector as $\mathbf{W} = \left( \rho_1 \alpha_1 \ \rho_2 \alpha_2 \ \rho \bm{u} \ E \ \alpha_1 \right)^T$\footnote{Strictly speaking, $\alpha_1$ is not a conservative variable.}. In this work, we also define the set of \emph{admissible states} as, \begin{equation} G = \left\{\left.\mathbf{W} = \begin{pmatrix} \alpha_1 \rho_1 \\ \alpha_2 \rho_2 \\ \rho \bm{u} \\ E \\ \alpha_1 \end{pmatrix} \ \right| \ 0 \leq \alpha_1 \leq 1, \ \alpha_1 \rho_1 \geq 0, \ \alpha_2 \rho_2 \geq 0, \ \rho c^2 > 0 \right\}. \end{equation} This requires boundedness of the volume fractions, positivity of the partial densities, and positivity of the squared speed of sound $c^2$. The positive squared speed of sound implies that the system of equations remains hyperbolic with real wave speeds. Note that the positive partial densities also mean that all mass fractions $Y_k$ are bounded between zero and one. The flow model has a mixture speed of sound $c$ given by~\cite{allaire2002five}: \begin{equation} \begin{split} \rho c^2 &= \overline{\gamma} \left(p + \overline{ p^\infty} \right) \\ &= \overline{\gamma} (\overline{\gamma} - 1)\left(\rho e - \overline{p^\infty} \right) = \overline{\gamma} (\overline{\gamma} - 1) \left( E - \frac{1}{2} \frac{\lvert \rho \bm{u} \rvert ^2}{\rho} - \overline{p^\infty} \right) . \end{split} \end{equation} Both $\overline{\gamma}$ and $\overline{p^\infty}$ only depend on $\alpha_1$ in $\mathbf{W}$. It is obvious that $\alpha_k$ and $\alpha_k \rho_k$ are both concave functions of the conserved variables $\mathbf{W}$. Since all $\gamma_k$ are greater than one, $\overline{\gamma} > 1$ if $0 \leq \alpha_1 \leq 1$. Therefore, an equivalent physically admissible set is, \begin{equation} G = \left\{\left.\mathbf{W} = \begin{pmatrix} \alpha_1 \rho_1 \\ \alpha_2 \rho_2 \\ \rho \bm{u} \\ E \\ \alpha_1 \end{pmatrix} \ \right| \ 0 \leq \alpha_1 \leq 1, \ \alpha_1 \rho_1 \geq 0, \ \alpha_2 \rho_2 \geq 0, \ \rho e - \overline p^\infty > 0 \right\}. \end{equation} \begin{mylemma} If $p_2^\infty=0$ ($p_1^\infty=0$), $\gamma_1 \geq \gamma_2$ ($\gamma_2 \geq \gamma_1$) and $0 \leq \alpha_1 \leq 1$, the function $\rho e - \overline p^\infty$ is a concave function of the conserved variables $\mathbf{W}$. \label{lem:concave} \end{mylemma} \begin{proof} The non-zero eigenvalues of the Hessian matrix of the function are: \begin{equation} \left\{-\frac{1}{\alpha_1\rho_1+\alpha_2\rho_2}, \ -\frac{2\lvert \rho \bm{u} \rvert ^2 + (\alpha_1\rho_1+\alpha_2\rho_2)^2} {(\alpha_1\rho_1 + \alpha_2 \rho_2)^3}, \ -\frac{\partial^2 \overline p^\infty}{\partial \alpha_1^2} \right\} . \end{equation} The first non-zero eigenvalue does not exist for the 1D case. If the last non-zero eigenvalue is non-positive, then the lemma is proved since all eigenvalues are non-positive. Here, we consider the $p_2^\infty=0$ case and the other case is symmetric. For $p_2^\infty=0$ we have, \begin{equation} \frac{\partial^2 \overline p^\infty}{\partial \alpha_1^2} = 2\frac{\gamma_1 p_1^\infty}{\gamma_1-1} \frac{\frac{1}{\gamma_1-1}-\frac{1}{\gamma_2-1}}{\left(\frac{\alpha_1}{\gamma_1-1}+\frac{\alpha_2}{\gamma_2-1}+1\right)^2} \left[ \frac{\alpha_1\left(\frac{1}{\gamma_1-1}-\frac{1}{\gamma_2-1}\right)}{\left(\frac{\alpha_1}{\gamma_1-1}+\frac{\alpha_2}{\gamma_2-1}+1\right)}-1 \right], \end{equation} and it is clear that if $\gamma_1 \geq \gamma_2$, the last eigenvalue is less than or equal to zero. Note that if $\gamma_2 > \gamma_1$, the function cannot be concave. In this work, we assume that one of the phases is an ideal gas with $p_k^\infty=0$. \end{proof} \begin{mythm} The set $G$ is a convex set. \end{mythm} \begin{proof} This is an immediate consequence of Lemma~\ref{lem:concave} and Jensen's inequality. \end{proof} The proof of convexity of $G$ relies on the assumption that the ratio of specific heats of the liquid ($p_k^\infty > 0$) is larger than that of the ideal gas ($p_k^\infty = 0$). However, this is a very mild assumption based on most gas-liquid test problems found in previous literature. The ideal gases considered in the previous works are usually either monatomic gases or air, where the ratios of specific heats are around 1.67 and 1.4 respectively. When the stiffened gas equation of state is chosen for the liquid in tests, the most popular liquid used is water, where the ratio of specific heats mostly ranges between 4--7~\cite{saurel1999simple,shyue1999fluid,coralic2014finite,wang2018incremental,perigaud2005compressible}. A rare but justified choice of $\gamma = 1.932$ is utilized in~\cite{chang2007robust} but that ratio of specific heats is still larger than those of monatomic gases or air. Other liquids commonly found in the literature include ethanol~\cite{perigaud2005compressible} with $\gamma = 2.1$ and mercury~\cite{takahira2008numerical} with $\gamma = 8.2$. Both liquids also have larger specific heat ratios than the ideal gases considered. In the following sections, we make the assumption that ratio of specific heats of liquid is larger than that of ideal gas and formulate our numerical method by taking advantage of the convexity of $G$ such that the solution update is a convex combination of states already in $G$, thus is also in $G$. \section{First order positivity- and boundedness-preserving scheme with HLLC Riemann solver} The flux given by the HLLC Riemann solver is illustrated in this section. For simplicity, a 2D case with domain $[x_a, x_b]\times[y_a, y_b]$ is considered with the following equation in compact form: \begin{equation} \partial_t \mathbf{W} + \partial_x \mathbf{F}^x \left( \mathbf{W} \right) + \partial_y \mathbf{F}^y \left( \mathbf{W} \right) + \mathbf{\Sigma} \left( \mathbf{W}, \nabla \mathbf{W} \right) = \mathbf{0}, \label{eq:W_F_eqn} \end{equation} where \begin{equation} \begin{split} \mathbf{W} &= \begin{pmatrix} \alpha_1 \rho_1 \\ \alpha_2 \rho_2 \\ \rho u \\ \rho v \\ E \\ \alpha_1 \end{pmatrix}, \quad \mathbf{F}^x \left( \mathbf{W} \right) = \begin{pmatrix} \alpha_1 \rho_1 u \\ \alpha_2 \rho_2 u \\ \rho u^2 + p \\ \rho v u \\ \left( E + p \right) u \\ 0 \end{pmatrix}, \quad \mathbf{F}^y \left( \mathbf{W} \right) = \begin{pmatrix} \alpha_1 \rho_1 v \\ \alpha_2 \rho_2 v \\ \rho u v \\ \rho v^2 + p \\ \left( E + p \right) v \\ 0 \end{pmatrix}, \\ \mathbf{\Sigma} \left( \mathbf{W}, \nabla \mathbf{W} \right) &= \begin{pmatrix} 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ \bm{u} \cdot \nabla \alpha_1 \end{pmatrix} . \end{split} \end{equation} If the domain is discretized uniformly into a Cartesian grid with $N_x \times N_y$ grid points, we have the domain covered by cells $I_{i,j}=\left[x_{i-1/2},\ x_{i+1/2}\right]\times\left[y_{j-1/2},\ y_{j+1/2}\right]$ for $1 \leq i \leq N_x$, $1 \leq j \leq N_y$, where the grid midpoints are given by: \begin{equation} x_{i+\frac{1}{2}} = x_a + i \Delta x, \quad y_{j+\frac{1}{2}} = y_a + j \Delta y \end{equation} \noindent and \begin{equation} \Delta x = \frac{x_b - x_a}{N_x}, \quad \Delta y = \frac{y_b - y_a}{N_y} . \end{equation} To obtain the numerical scheme with an exact or approximate Riemann solver, the numerical discretizations in different directions are treated independently. The flux in $y$ direction has similar formulation. Therefore, only the numerical discretization in $x$ direction is discussed in details in this section. \subsection{Approximate solutions} The discretization in $x$ direction is conducted by considering a generalized Riemann problem with a planar discontinuity initially at each grid midpoint in the $x$ direction, as shown in figure~\ref{fig:Riemann_problems}. The generalized Riemann problem is reduced to a quasi-1D problem due to assumed homogeneity in other directions. The reduced quasi-1D generalized Riemann problem at midpoint $x = x_{i+1/2}$ between grid cells located at $(x_i, y_j)$ and $(x_{i+1}, y_j)$ is hence formulated as: \begin{equation} \left\{ \begin{array}{ll} \partial_t \mathbf{W} + \partial_x \mathbf{F} \left( \mathbf{W} \right) + \mathbf{\Sigma} \left( \mathbf{W}, \partial_x \mathbf{W} \right) = 0, \\ \mathbf{W} \left(x, \ t=0 \right) = \begin{cases} \mathbf{W}_{L}, &\mbox{$x_{i+\frac{1}{2}} < 0$}, \\ \mathbf{W}_{R}, &\mbox{$x_{i+\frac{1}{2}} \geq 0$}. \\ \end{cases} \end{array}\right . \label{eq:Riemann_problem} \end{equation} where superscript ``$x$" in $\mathbf{F}^x$ and index ``$j$" are dropped for convenience. For first order accurate spatial approximation, $\mathbf{W}_{L} = \mathbf{W}_{i}$ and $\mathbf{W}_{R} = \mathbf{W}_{i+1}$. Higher order spatial approximation can be obtained from high-order interpolation to construct a high-order scheme which will be discussed in another section. The first order solution of Riemann problem given by equation~\eqref{eq:Riemann_problem} is self-similar: $\mathbf{W} \left(x, \ t \right) = R \left( x/t, \ \mathbf{W}_{i}, \ \mathbf{W}_{i+1} \right)$. The exact solution to the generalized Riemann problem is computationally expensive and challenging to obtain. Approximate Riemann solvers can be used to provide approximate solutions in a less expensive way in Godunov-type schemes. Assuming the approximate waves generated at the two midpoints $x_{i \pm 1/2}$ do not interact under suitable Courant–Friedrichs–Lewy (CFL) condition as shown in figure~\ref{fig:approximated_soln_cell}, the approximate numerical solution at grid cell $i$ is the cell-averaged value: \begin{equation} \begin{split} \mathbf{W}_i^{n+1} &= \frac{1}{\Delta x} \int_{x_{i-\frac{1}{2}}}^{x_{i}} R\left( \frac{x - x_{i-\frac{1}{2}}}{\Delta t}, \mathbf{W}_{i-1}^{n}, \mathbf{W}_i^{n} \right) dx \\ &\quad + \frac{1}{\Delta x} \int_{x_{i}}^{x_{i+\frac{1}{2}}}R\left(\frac{x - x_{i+\frac{1}{2}}}{\Delta t}, \mathbf{W}_{i}^{n}, \mathbf{W}_{i+1}^{n} \right) dx . \end{split} \label{eq:soln_convex_averaging} \end{equation} Specifically since the last equation is an advection equation, the approximate solution of the volume fraction is given by: \begin{align} \begin{split} {\alpha_1}_i^{n+1} &= \left[ \frac{1}{2} {\alpha_1}_i^n - \frac{u_{+,i-\frac{1}{2}} \Delta t}{\Delta x}\left({\alpha_1}^n_i - {\alpha_1}^n_{i-1}\right) \right] \\ &\quad + \left[ \frac{1}{2} {\alpha_1}_i^n - \frac{u_{-,i+\frac{1}{2}} \Delta t}{\Delta x}\left({\alpha_1}^n_{i+1} - {\alpha_1}^n_i\right) \right] \end{split} \\ {\alpha_1}_i^{n+1} &= {\alpha_1}_i^n - \frac{u_{+,i-\frac{1}{2}} \Delta t}{\Delta x}\left({\alpha_1}^n_i - {\alpha_1}^n_{i-1}\right) - \frac{u_{-,i+\frac{1}{2}} \Delta t}{\Delta x}\left({\alpha_1}^n_{i+1} - {\alpha_1}^n_i\right) , \label{eq:1st_order_HLLC_advection} \end{align} where $u_{+,i-1/2} = \max\{0,u_{*,i-1/2}\}$ and $u_{-,i+1/2} = \min\{0,u_{*,i+1/2}\}$. $u_{*, i \pm 1/2}$ are the approximate material wave speeds at edges $x_{i \pm 1/2}$ for the advection equation. \begin{figure}[hbt] \centering \begin{tikzpicture} \useasboundingbox (0cm,-1cm) rectangle (12cm,3cm); \draw[very thick] (0cm,0cm) -- (12cm,0cm); \begin{scope}[xshift=-2cm] \foreach \x in {1,...,3} \draw[] (4*\x,0cm) -- (4*\x,2cm); \foreach \x in {1.5,...,2.5} \draw[dashed] (4*\x,0cm) -- (4*\x,2cm); \draw[red,thick] (4cm,0cm) -- (3.3cm,2.0cm); \draw[color=SkyBlue,thick] (4cm,0cm) -- (4.2cm,2.0cm); \draw[red,thick] (4cm,0cm) -- (4.7cm,2.0cm); \draw[] (4cm,-0.3cm) node{$x_{i-\frac{1}{2}}$}; \draw[red,thick] (8cm,0cm) -- (7.2cm,2.0cm); \draw[color=SkyBlue,thick] (8cm,0cm) -- (7.7cm,2.0cm); \draw[red,thick] (8cm,0cm) -- (8.9cm,2.0cm); \draw[] (8cm,-0.3cm) node{$x_{i+\frac{1}{2}}$}; \draw[red,thick] (12cm,0cm) -- (12.2cm,2.0cm); \draw[color=SkyBlue,thick] (12cm,0cm) -- (12.7cm,2.0cm); \draw[red,thick] (12cm,0cm) -- (13.9cm,2.0cm); \draw[] (12cm,-0.3cm) node{$x_{i+\frac{3}{2}}$}; % \draw[] (6cm,-0.3cm) node{$x_i$}; \draw[] (10cm,-0.3cm) node{$x_{i+1}$}; % \end{scope} \draw[very thick] (0cm,2cm) -- (12cm,2cm); \draw[] (-0.4cm,0cm) node[]{$t^n$}; \draw[] (-0.4cm,2cm) node[]{$t^{n+1}$}; \draw[-{Straight Barb[angle'=60,scale=2]}] (-2.2cm,-0.7cm) -- (-1.35cm,-0.7cm); \node[text width=3cm] at (0.25cm,-0.8cm) {$x$}; \draw[-{Straight Barb[angle'=60,scale=2]}] (-2.25cm,-0.5cm) -- (-2.25cm,0.15cm); \node[text width=1cm] at (-1.75cm,0.45cm) {$t$}; \end{tikzpicture} \caption{Illustration of a scheme with an approximate Riemann solver. Waves are generated from discontinuities initially located at grid midpoints.} \label{fig:Riemann_problems} \end{figure} \begin{figure}[hbt] \centering \begin{tikzpicture} \useasboundingbox (0cm,-1cm) rectangle (12cm,3cm); \draw[very thick] (3cm,0cm) -- (3cm,3cm); \draw[very thick] (9cm,0cm) -- (9cm,3cm); \draw[] (3cm,-0.3cm) node[]{$x_{i-\frac{1}{2}}$}; \draw[] (6cm,-0.3cm) node[]{$x_{i}$}; \draw[] (9cm,-0.3cm) node[]{$x_{i+\frac{1}{2}}$}; \draw[draw=none,fill=MacFolderBlue!60] (3cm, 0.0cm) rectangle (6cm,3cm); \draw[draw=none,fill=PaleYellow!80] (6cm, 0.0cm) rectangle (9cm,3cm); \draw[very thick] (0cm,0cm) -- (12cm,0cm); \draw[very thick] (0cm,3cm) -- (12cm,3cm); \draw[thick,dashed] (6cm,0cm) -- (6cm,3cm); \draw[thick,red] (3cm,0cm) -- (4.2cm,3cm); \draw[thick,dashed,color=ForestGreen] (3cm,0cm) -- (3.8cm,3cm); \draw[thick,red] (3cm,0cm) -- (2.2cm,3cm); \draw[thick,red] (9cm,0cm) -- (8.2cm,3cm); \draw[thick,dashed,color=ForestGreen] (9cm,0cm) -- (8.8cm,3cm); \draw[thick,red] (9cm,0cm) -- (10.2cm,3cm); \draw[] (-0.4cm,0cm) node[]{$t^n$}; \draw[] (-0.4cm,3cm) node[]{$t^{n+1}$}; \draw[-{Straight Barb[angle'=60,scale=2]}] (-2.2cm,-0.7cm) -- (-1.35cm,-0.7cm); \node[text width=3cm] at (0.25cm,-0.8cm) {$x$}; \draw[-{Straight Barb[angle'=60,scale=2]}] (-2.25cm,-0.5cm) -- (-2.25cm,0.15cm); \node[text width=1cm] at (-1.75cm,0.45cm) {$t$}; \end{tikzpicture} \caption{Approximate waves generated at the left and right edges of a cell $I_i = \left[ x_{i-1/2}, \ x_{i+1/2} \right]$. The red solid lines and green dotted lines represent the locations of the approximate acoustic waves and contact waves respectively.} \label{fig:approximated_soln_cell} \end{figure} The HLLC discretization in a particular direction for a multi-dimensional problem can be approximated by the solutions of a quasi-1D generalized Riemann problem in that direction. The approximate solutions, $\mathbf{W}^{\mathrm{HLLC}}$, of a quasi-1D generalized Riemann problem in $x$ direction with an initial planar discontinuity, is illustrated in figure~\ref{fig:HLLC_wave_diagram}. The approximate solution to the generalized Riemann problem contains three discontinuities: one contact wave and two acoustic waves. The speed of the contact wave is denoted by $s_{*}$ while the smallest and largest acoustic wave speeds are represented by $s_{L}$ and $s_{R}$ respectively. The material wave speed for the advection equation is chosen as the contact wave speed $u_{*} = s_{*}$. The HLLC approximate solutions in the four different regions separated by the three discontinuities are given by: \begin{equation} \mathbf{W}^{\mathrm{HLLC}} = \left\{ \begin{array}{ll} \mathbf{W}_L, & \text{if } s_L > 0,\\ \mathbf{W}_{*,L}, & \text{if } s_L \leq 0 < s_*, \\ \mathbf{W}_{*,R}, & \text{if } s_* \leq 0 \leq s_R,\\ \mathbf{W}_R, & \text{if } s_R < 0 , \end{array}\right . \end{equation} where $L$ and $R$ are the left and right states respectively at a midpoint. With $K = L$ or $R$, the star state for the five-equation model for a 2D problem is given by: \begin{equation} \mathbf{W}_{*,K} = \begin{pmatrix} \chi_{*,K} \left(\alpha_1 \rho_1\right)_K \\ \chi_{*,K} \left(\alpha_2 \rho_2\right)_K \\ \chi_{*,K} \rho_K s_* \\ \chi_{*,K} \rho_K v_K \\ \chi_{*,K}\left[ E_K + (s_*-u_K)\left(\rho_K s_* + \frac{p_K}{s_K-u_K}\right) \right] \\ \alpha_{1,K} \end{pmatrix} \end{equation} \noindent $\chi_{*K}$ is defined as: \begin{equation} \chi_{*K} = \frac{s_K - u_K}{s_K - s_*}. \end{equation} \noindent We use the wave speeds suggested by~\citet{einfeldt1991godunov}: \begin{equation} s_{L} = \min{\left( \bar{u} - \bar{c}, u_L - c_L \right)}, \quad s_{R} = \max{\left( \bar{u} + \bar{c}, u_R + c_R \right)}, \end{equation} where $\bar{u}$ and $\bar{c}$ are the arithmetic averages from the left and right states. For instance, $\bar{c}$ is the average of $c_L$ and $c_R$. Following~\citet{batten1997choice}, the wave speed in the star region is given by: \begin{equation} s_{*} = \frac{p_R - p_L + \rho_L u_L \left( s_L - u_L \right) - \rho_R u_R \left( s_R - u_R \right)}{\rho_L \left( s_L - u_L \right) - \rho_R \left( s_R - u_R \right) } . \label{eq:s_star_definition} \end{equation} \begin{figure}[hbt] \centering \begin{tikzpicture} \useasboundingbox (1.0cm,-1cm) rectangle (12cm,4cm); \draw[thick, dashed] (3.6cm, 0.0cm) rectangle (9.6cm,3cm); \draw[very thick] (6cm,0cm) -- (6cm,3cm); \draw[very thick] (3cm,0cm) -- (10cm,0cm); \draw[very thick] (3cm,3cm) -- (10cm,3cm); \draw[thick,red] (6cm,0cm) -- (9.6cm,3cm); \draw[thick,dashed,color=ForestGreen] (6cm,0cm) -- (7.4cm,3cm); \draw[thick,red] (6cm,0cm) -- (3.6cm,3cm); \draw[{Straight Barb[angle'=60,scale=2]}-{Straight Barb[angle'=60,scale=2]}] (3.6cm,-0.3cm) -- (5.9cm,-0.3cm); \draw[{Straight Barb[angle'=60,scale=2]}-{Straight Barb[angle'=60,scale=2]}] (6.1cm,-0.3cm) -- (9.6cm,-0.3cm); \draw[] (6.0cm,-0.9cm) node[]{$x_{i+\frac{1}{2}}$}; \draw[] (4.8cm,-0.7cm) node[]{$x_L$}; \draw[] (8.0cm,-0.7cm) node[]{$x_R$}; \draw[] (4.8cm,0.5cm) node[]{$W_L$}; \draw[] (8.0cm,0.5cm) node[]{$W_R$}; \draw[{Straight Barb[angle'=60,scale=2]}-{Straight Barb[angle'=60,scale=2]}] (4.6cm,2.0cm) -- (6.8cm,2.0cm); \draw[{Straight Barb[angle'=60,scale=2]}-{Straight Barb[angle'=60,scale=2]}] (7.1cm,2.0cm) -- (8.2cm,2.0cm); \draw[] (5.3cm,2.3cm) node[]{$W_{*,L}$}; \draw[] (7.7cm,2.3cm) node[]{$W_{*,R}$}; \draw[red] (3.6cm,3.3cm) node[]{$s_{L}$}; \draw[red] (9.6cm,3.3cm) node[]{$s_{R}$}; \draw[color=ForestGreen] (7.4cm,3.3cm) node[]{$s_{*}$}; \draw[] (2.5cm,0cm) node[]{$t^n$}; \draw[] (2.5cm,3cm) node[]{$t^{n+1}$}; \draw[-{Straight Barb[angle'=60,scale=2]}] (0.8cm,-0.7cm) -- (1.65cm,-0.7cm); \node[text width=3cm] at (3.25cm,-0.8cm) {$x$}; \draw[-{Straight Barb[angle'=60,scale=2]}] (0.75cm,-0.5cm) -- (0.75cm,0.15cm); \node[text width=1cm] at (1.25cm,0.45cm) {$t$}; \end{tikzpicture} \caption{HLLC wave diagram at interface $x_{i+1/2}$. The red solid lines represent the locations of the approximate acoustic waves and the green dotted line represent the location of the contact wave.} \label{fig:HLLC_wave_diagram} \end{figure} \subsection{Approximate fluxes} We now introduce a flux-source form that is convenient for the derivation of the flux-based numerical discretization for the non-conservative system of equations and also the extension for high-order methods. The equation given by \eqref{eq:W_F_eqn} can be rewritten as: \begin{equation} \partial_t \mathbf{W} + \partial_x \mathbf{G}^x \left( \mathbf{W} \right) + \partial_y \mathbf{G}^y \left( \mathbf{W} \right) = \mathbf{S} \left( \mathbf{W}, \nabla \mathbf{W} \right), \label{eq:W_G_eqn} \end{equation} where \begin{equation} \begin{split} \mathbf{G}^x \left( \mathbf{W} \right) = \begin{pmatrix} \alpha_1 \rho_1 u \\ \alpha_2 \rho_2 u \\ \rho u^2 + p \\ \rho v u \\ \left( E + p \right) u \\ \alpha_1 u \end{pmatrix}, \quad \mathbf{G}^y \left( \mathbf{W} \right) = \begin{pmatrix} \alpha_1 \rho_1 v \\ \alpha_2 \rho_2 v \\ \rho u v \\ \rho v^2 + p \\ \left( E + p \right) v \\ \alpha_1 v \end{pmatrix}, \quad \mathbf{S} \left( \mathbf{W}, \nabla \mathbf{W} \right) = \begin{pmatrix} 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ \alpha_1 \nabla \cdot \bm{u} \end{pmatrix} . \end{split} \end{equation} The relation between fluxes $\mathbf{F}^x$ and $\mathbf{G}^x$ and that between fluxes $\mathbf{F}^y$ and $\mathbf{G}^y$ are given by: \begin{align} \mathbf{G}^x &= \mathbf{F}^x + \left( 0\ 0\ 0\ 0\ 0\ f^x_{\alpha} \right)^T, \\ \mathbf{G}^y &= \mathbf{F}^y + \left( 0\ 0\ 0\ 0\ 0\ f^y_{\alpha} \right)^T, \end{align} where $f^x_{\alpha} = \alpha_1 u$ and $f^y_{\alpha} = \alpha_1 v$. The fully discretized form of equation~\eqref{eq:W_G_eqn} with first order accurate forward Euler time integration is given by: \begin{equation} \frac{\mathbf{W}^{n+1}_{i,j} - \mathbf{W}^{n}_{i,j}}{\Delta t} + \frac{\hat{\mathbf{G}}^x_{i+\frac{1}{2},j} - \hat{\mathbf{G}}^x_{i-\frac{1}{2},j}}{\Delta x} + \frac{\hat{\mathbf{G}}^y_{i,j+\frac{1}{2}} - \hat{\mathbf{G}}^y_{i,j-\frac{1}{2}}}{\Delta y} = \hat{\mathbf{S}}_{i,j} , \label{eq:fully_discretized_W_G_eqn} \end{equation} where \begin{equation} \hat{\mathbf{S}}_{i,j} = \begin{pmatrix} 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ \alpha_{1,i,j}^n \left( \frac{\hat{u}_{i+\frac{1}{2},j} - \hat{u}_{i-\frac{1}{2},j}}{\Delta x} + \frac{\hat{v}_{i,j+\frac{1}{2}} - \hat{v}_{i,j-\frac{1}{2}}}{\Delta y} \right) \end{pmatrix} . \label{eq:discretized_S} \end{equation} Only numerical approximation in $x$ direction is discussed in the following part as discretization in $y$ direction is similar. The first order accurate approximation of $\hat{\mathbf{G}}^{x}_{i\pm\frac{1}{2},j}$ with the HLLC solutions is given by: \begin{align} \begin{split} \hat{\mathbf{G}}^x_{i-\frac{1}{2},j} &= \mathbf{G}^{x,\mathrm{HLLC}}_{i-\frac{1}{2},j} \left( \mathbf{W}_{i-1,j}, \mathbf{W}_{i,j} \right) \\ &= \mathbf{F}^{x,\mathrm{HLLC}}_{i-\frac{1}{2},j} \left(\mathbf{W}_{i-1,j}, \mathbf{W}_{i,j}\right) + ( 0 \ 0 \ 0 \ 0 \ 0 \ f^{x, \mathrm{HLLC}}_{\alpha,i-\frac{1}{2},j} \left( \mathbf{W}_{i-1,j}, \mathbf{W}_{i,j} \right) )^T , \end{split} \\ \begin{split} \hat{\mathbf{G}}^x_{i+\frac{1}{2},j} &= \mathbf{G}^{x,\mathrm{HLLC}}_{i+\frac{1}{2},j} \left( \mathbf{W}_{i,j}, \mathbf{W}_{i+1,j} \right) \\ &= \mathbf{F}^{x,\mathrm{HLLC}}_{i+\frac{1}{2},j} \left(\mathbf{W}_{i,j}, \mathbf{W}_{i+1,j}\right) + ( 0 \ 0 \ 0 \ 0 \ 0 \ f^{x, \mathrm{HLLC}}_{\alpha,i+\frac{1}{2},j} \left( \mathbf{W}_{i,j}, \mathbf{W}_{i+1,j} \right) )^T , \end{split} \end{align} where \begin{align} \mathbf{F}^{x,\mathrm{HLLC}}_{i-\frac{1}{2},j} \left(\mathbf{W}_{i-1,j}, \mathbf{W}_{i,j}\right) &= \mathbf{F}^{x,\mathrm{HLLC}} \left(R^{\mathrm{HLLC}}\left(0, \mathbf{W}_{i-1,j}, \mathbf{W}_{i,j}\right)\right) , \\ \mathbf{F}^{x,\mathrm{HLLC}}_{i+\frac{1}{2},j} \left(\mathbf{W}_{i,j}, \mathbf{W}_{i+1,j}\right) &= \mathbf{F}^{x,\mathrm{HLLC}} \left(R^{\mathrm{HLLC}}\left(0, \mathbf{W}_{i,j}, \mathbf{W}_{i+1,j}\right)\right) . \end{align} The conservative HLLC fluxes $\mathbf{F}^{x,\mathrm{HLLC}}_{i\pm\frac{1}{2},j}$ can be obtained with the divergence theorem~\cite{batten1997choice}: \begin{equation} \begin{split} & \mathbf{F}^{x,\mathrm{HLLC}}\left(R^{\mathrm{HLLC}}\left(0, \mathbf{W}_L, \mathbf{W}_R\right)\right) = \\ &\quad \frac{1+\sign(s_*)}{2}\left(\mathbf{F}_L + s_-\left(\mathbf{W}_{*,L}-\mathbf{W}_L\right)\right) + \frac{1-\sign(s_*)}{2}\left(\mathbf{F}_R + s_+\left(\mathbf{W}_{*,R}-\mathbf{W}_R\right)\right) , \end{split} \end{equation} where \begin{equation} s_{-} = \min{\left( 0, s_L \right)}, \quad s_{+} = \max{\left( 0, s_R \right)} . \end{equation} Note that the last component of $\mathbf{F}^{x,\mathrm{HLLC}}$ for the advection equation is zero. The discretization of the advection equation is contributed by $\hat{u}_{i\pm\frac{1}{2},j}$ and $f^{x, \mathrm{HLLC}}_{\alpha,i\pm\frac{1}{2},j}$ which are given by the first order accurate approximations as: \begin{align} \hat{u}_{i-\frac{1}{2},j} &= u_{*,i-\frac{1}{2},j} = u^{\mathrm{HLLC}}_{*} \left( \mathbf{W}_{i-1,j}, \mathbf{W}_{i,j} \right) = s_{*} \left( \mathbf{W}_{i-1,j}, \mathbf{W}_{i,j} \right) , \\ \hat{u}_{i+\frac{1}{2},j} &= u_{*,i+\frac{1}{2},j} = u^{\mathrm{HLLC}}_{*} \left( \mathbf{W}_{i,j}, \mathbf{W}_{i+1,j} \right) = s_{*} \left( \mathbf{W}_{i,j}, \mathbf{W}_{i+1,j} \right) , \end{align} and \begin{align} \begin{split} f^{x,\mathrm{HLLC}}_{\alpha,i-\frac{1}{2},j} \left( \mathbf{W}_{i-1,j}, \mathbf{W}_{i,j} \right) &= \frac{1+\sign(s_{*,i-\frac{1}{2},j})}{2}(\alpha_{1,i-1,j} s_{*,i-\frac{1}{2},j}) \\ &\quad + \frac{1-\sign(s_{*,i-\frac{1}{2},j})}{2}(\alpha_{1,i,j} s_{*,i-\frac{1}{2},j}) , \end{split} \\ \begin{split} f^{x,\mathrm{HLLC}}_{\alpha,i+\frac{1}{2},j} \left( \mathbf{W}_{i,j}, \mathbf{W}_{i+1,j} \right) &= \frac{1+\sign(s_{*,i+\frac{1}{2},j})}{2}(\alpha_{1,i,j} s_{*,i+\frac{1}{2},j}) \\ &\quad + \frac{1-\sign(s_{*,i+\frac{1}{2},j})}{2}(\alpha_{1,i+1,j} s_{*,i+\frac{1}{2},j}) . \end{split} \end{align} The expressions given above form the first order accurate solution of volume fraction given by equation~\eqref{eq:1st_order_HLLC_advection}. Finally, the non-conservative flux $\hat{\mathbf{G}}^{x,\pm}_{i\mp\frac{1}{2},j}$ (similarly for $\hat{\mathbf{G}}^{y,\pm}_{i,j\mp\frac{1}{2}}$) is introduced: \begin{equation} \hat{\mathbf{G}}^{x,\pm}_{i\mp\frac{1}{2},j} = \hat{\mathbf{G}}^x_{i\mp\frac{1}{2},j} - \alpha_{1,i,j} \ (0\ 0\ 0\ 0\ 0\ \hat{u}_{i\mp\frac{1}{2},j} )^T , \label{eq:G_pm} \end{equation} where equation~\eqref{eq:fully_discretized_W_G_eqn} can be simplified to: \begin{equation} \frac{\mathbf{W}^{n+1}_{i,j} - \mathbf{W}^{n}_{i,j}}{\Delta t} + \frac{\hat{\mathbf{G}}^{x,-}_{i+\frac{1}{2},j} - \hat{\mathbf{G}}^{x,+}_{i-\frac{1}{2},j}}{\Delta x} + \frac{\hat{\mathbf{G}}^{y,-}_{i,j+\frac{1}{2}} - \hat{\mathbf{G}}^{y,+}_{i,j-\frac{1}{2}}}{\Delta y} = \mathbf{0} . \label{eq:fully_discretized_W_G_pm_eqn} \end{equation} Note that the components of $\hat{\mathbf{G}}^{x,\pm}_{i\mp\frac{1}{2},j}$ (or $\hat{\mathbf{G}}^{x,\mathrm{HLLC},\pm}_{i\mp\frac{1}{2},j}$ more precisely) for all conservative equations, except the last advection equation, are conservative numerical fluxes and are equivalent to the corresponding components of $\mathbf{F}^{x,\mathrm{HLLC}}_{i\mp\frac{1}{2},j}$. \subsection{Proof of positivity- and bounded-preserving preservation of first order HLLC solver} For a quasi-1D problem, it is shown in equation~\eqref{eq:soln_convex_averaging} that the solution update is the convex averaging of the exact or approximate solutions to the generalized Riemann problem. Therefore, the HLLC Riemann solver gives physically admissible solution if all states generated are physically admissible using Jensen's inequality for integral equations. Here, the left star state is considered and the right star state can be proved to be physically admissible by symmetry. With the definition of $s_{*}$ given by equation~\eqref{eq:s_star_definition}, it can be shown that $s_L < s_*$~\cite{batten1997choice}. Also, since $s_L = \min{\left( \bar{u} - \bar{c}, u_L - c_L \right)}$, $s_L < u_L$. As a result, the partial densities in the star state are positive: \begin{align} \left( \alpha_1 \rho_1 \right)_{*,L} &= \frac{s_L-u_L}{s_L-s_*} \left( \alpha_1 \rho_1 \right)_L \geq 0, \\ \left( \alpha_2 \rho_2 \right)_{*,L} &= \frac{s_L-u_L}{s_L-s_*} \left( \alpha_2 \rho_2 \right)_L \geq 0. \end{align} Since $\rho_{*,L} = \left( \alpha_1 \rho_1 \right)_{*,L} + \left( \alpha_2 \rho_2 \right)_{*,L}$, \begin{equation} \rho_{*,L} = \frac{s_L-u_L}{s_L-s_*}\rho_L \geq 0 . \end{equation} The positivity of mixture and partial densities implies all mass fractions are bounded between zero and one. As for the volume fraction, since $\alpha_{1,*,L} = \alpha_{1,L}$, \begin{equation} 0 \leq \alpha_{1,*,L} \leq 1 . \end{equation} The only remaining requirement is $(\rho e)_{*,L} > \overline p^\infty_L$ for positive squared speed of sound. From the definition of $(\rho e)_{*,L}$: \begin{align} \left( \rho e \right)_{*,L} &= E_{*,L} - \frac{1}{2} \frac{\lvert \rho \bm{u}_{*,L} \rvert^2}{\rho_{*,L}} = E_{*,L} - \frac{1}{2} \frac{ \left(\rho u \right)_{*,L}^2 + \left( \rho v \right)_{*,L}^2}{\rho_{*,L}} \\ \begin{split} \left( \rho e \right)_{*,L} &= \frac{s_L-u_L}{s_L-s_*}E_L + \frac{s_L-u_L}{s_L-s_*}(s_*-u_L)\left(\rho_L s_* + \frac{p_L}{s_L-u_L}\right) \\ &\quad - \frac{1}{2} \frac{s_L-u_L}{s_L-s_*}\rho_L \left( s_*^2 + v_L^2 \right) . \end{split} \end{align} Therefore, we require the following inequality: \begin{align} \begin{split} &\frac{s_L - u_L}{s_L - s_*}E_L + \frac{s_L - u_L}{s_L - s_*}(s_* - u_L) \left( \rho_L s_* + \frac{p_L}{s_L - u_L} \right) - \frac{1}{2} \frac{s_L - u_L}{s_L - s_*}\rho_L \left( s_*^2 + v_L^2 \right) \\ &\qquad > \overline p^\infty_L \end{split} \\ \begin{split} &E_L + (s_* - u_L) \left(\rho_L s_* + \frac{p_L}{s_L - u_L}\right) - \frac{1}{2} \rho_L \left( s_*^2 + v_L^2 \right) \\ &\qquad > \overline p^\infty_L \frac{(s_L - u_L - s_* + u_L)}{(s_L - u_L)} \end{split} \\ \begin{split} &(\rho e)_L + \frac{1}{2} \rho_L \left( u_L^2 + v_L^2 \right) + (s_* - u_L) \left( \rho_L s_* + \frac{p_L}{s_L - u_L} \right) - \frac{1}{2} \rho_L \left( s_*^2 + v_L^2 \right) \\ &\qquad > \overline p^\infty_L \frac{(s_L - u_L - s_* + u_L)}{(s_L - u_L)} \end{split} \\ &\frac{1}{2} \rho_L(s_* - u_L)^2 - \frac{p_L + \overline p^\infty_L}{u_L - s_L}(s_* - u_L) + (\rho_L e_L - \overline p^\infty_L) > 0 . \end{align} Let $\beta = s_* - u_L$, then the inequality above is a quadratic function of $\beta$. We can show that this quadratic has no real roots by ensuring the discriminant is negative. That is, \begin{equation} \left(\frac{p_L + \overline p^\infty_L}{u_L-s_L}\right)^2 - 2\rho_L(\rho_L e_L - \overline p^\infty_L) < 0. \end{equation} This implies that we require: \begin{equation} s_L < u_L - \frac{p_L + \overline p^\infty_L}{\sqrt{2 \rho_L\left(\rho_L e_L - \overline p^\infty_L\right)}} . \label{eq:s_L_ineqaulity_constraint} \end{equation} It should be noted that: \begin{align*} \frac{p_L + \overline p^\infty_L}{\sqrt{2 \rho_L\left(\rho_L e_L - \overline p^\infty_L\right)}} &= \sqrt{\frac{(\overline \gamma_L - 1)(p_L + \overline p^\infty_L)}{2 \rho_L}} \\ &< \sqrt{\frac{\overline \gamma_L (p_L + \overline p^\infty_L)}{\rho_L}} \\ &= c_L. \end{align*} Since $s_L = \min{(\bar{u} - \bar{c}, u_L - c_L )}$, the constraint on $s_L$ given by equation~\eqref{eq:s_L_ineqaulity_constraint} is already satisfied and we have proved the solutions given by the left star state have positive partial densities and squared speed of sound. Besides, the volume fractions are bounded. Thus, the HLLC Riemann solver is positivity- and boundedness-preserving. Equation~\eqref{eq:fully_discretized_W_G_pm_eqn} can be re-written as: \begin{equation} \begin{split} \mathbf{W}_{i,j}^{n+1} &= \sigma_x \left[ \mathbf{W}_{i,j}^{n} + \lambda_x \left( \hat{\mathbf{G}}^{x,+}_{i-\frac{1}{2},j} - \hat{\mathbf{G}}^{x,-}_{i+\frac{1}{2},j} \right) \right] \\ &\quad + \sigma_y \left[ \mathbf{W}_{i,j}^{n} + \lambda_y \left( \hat{\mathbf{G}}^{y,+}_{i,j-\frac{1}{2}} - \hat{\mathbf{G}}^{y,-}_{i,j+\frac{1}{2}} \right) \right] , \end{split} \label{eq:convex_split_2D} \end{equation} where $\lambda_x = \Delta t/ (\Delta x \sigma_x)$ and $\lambda_y = \Delta t/ (\Delta y \sigma_y)$. $\sigma_x$ and $\sigma_y$ are partitions of the contribution in the $x$ and $y$ directions respectively where $\sigma_x + \sigma_y = 1$. They can be defined as~\cite{hu2013positivity}: \begin{equation} \sigma_x = \frac{\tau_x}{\tau_x + \tau_y}, \quad \sigma_y = \frac{\tau_y}{\tau_x + \tau_y}, \quad \tau_x = \frac{\left( \left| u \right| + c \right)_{\mathrm{max}}}{\Delta x}, \quad \tau_y = \frac{\left( \left| v \right| + c \right)_{\mathrm{max}}}{\Delta y} , \end{equation} such that $0 < \sigma_x < 1$ and $0 < \sigma_y < 1$. If the time-step size $\Delta t$ is given by a chosen CFL number, $CFL$, with the following equation: \begin{equation} \Delta t = \frac{CFL}{\tau_x + \tau_y}, \end{equation} one has the relations for the equivalent 1D time step sizes in different directions, $\Delta t^x$ and $\Delta t^y$: \begin{align} \lambda_x &= \frac{CFL}{\left( \left| u \right| + c \right)_{\mathrm{max}}} = \frac{\Delta t^x}{\Delta x} , \\ \lambda_y &= \frac{CFL}{\left( \left| v \right| + c \right)_{\mathrm{max}}} = \frac{\Delta t^y}{\Delta y} . \end{align} We can define: \begin{align} \mathbf{W}_{i,j}^{x} &= \mathbf{W}_{i,j}^{n} + \lambda_x \left( \hat{\mathbf{G}}^{x,+}_{i-\frac{1}{2},j} - \hat{\mathbf{G}}^{x,-}_{i+\frac{1}{2},j} \right) , \\ \mathbf{W}_{i,j}^{y} &= \mathbf{W}_{i,j}^{n} + \lambda_y \left( \hat{\mathbf{G}}^{y,+}_{i,j-\frac{1}{2}} - \hat{\mathbf{G}}^{y,-}_{i,j+\frac{1}{2}} \right) . \end{align} Since $\hat{\mathbf{G}}^{x,\pm}_{i\mp\frac{1}{2},j}$ are obtained from the quasi-1D HLLC solutions in the $x$ direction, the approximate waves from the edges at $x_{i\pm\frac{1}{2}}$ do not interact if the CFL condition, $CFL \leq 0.5$, is satisfied (same for $\hat{\mathbf{G}}^{y,\pm}_{i,j\mp\frac{1}{2}}$ in the $y$ direction). Thus, equation~\eqref{eq:soln_convex_averaging} is satisfied for $\mathbf{W}_{i,j}^{x}$ (similar for $\mathbf{W}_{i,j}^{y}$ in $y$ direction). The first part of the RHS of equation~\eqref{eq:soln_convex_averaging} is the solution in the half cell from $x_{i-\frac{1}{2}}$ to $x_i$ at $t+\Delta t^x$ and the second part is the solution in another half cell. Using the finite volume approach on the left and right half cells, we will get: \begin{align} \frac{1}{\Delta x} \int_{x_{i-\frac{1}{2}}}^{x_{i}} R \left( \frac{x - x_{i-\frac{1}{2}}}{\Delta t^x}, \mathbf{W}_{i-1,j}^{n}, \mathbf{W}_{i,j}^{n} \right) dx &= \frac{1}{2} \left[ \mathbf{W}_{i,j}^{n} + 2 \lambda_x \left( \hat{\mathbf{G}}^{x,+}_{i-\frac{1}{2},j} - \mathbf{F}^x_{i,j} \right) \right] , \\ \frac{1}{\Delta x} \int_{x_{i}}^{x_{i+\frac{1}{2}}} R\left(\frac{x - x_{i+\frac{1}{2}}}{\Delta t^x}, \mathbf{W}_{i,j}^{n}, \mathbf{W}_{i+1,j}^{n} \right) dx &= \frac{1}{2} \left[ \mathbf{W}_{i,j}^{n} - 2 \lambda_x \left( \hat{\mathbf{G}}^{x,-}_{i+\frac{1}{2},j} - \mathbf{F}^x_{i,j} \right) \right] . \end{align} If we define: \begin{align} \mathbf{W}_{i,j}^{x,-} &= \frac{2}{\Delta x} \int_{x_{i-\frac{1}{2}}}^{x_{i}} R \left( \frac{x - x_{i-\frac{1}{2}}}{\Delta t}, \mathbf{W}_{i-1,j}^{n}, \mathbf{W}_{i,j}^{n} \right) dx , \\ \mathbf{W}_{i,j}^{x,+} &= \frac{2}{\Delta x} \int_{x_{i}}^{x_{i+\frac{1}{2}}} R\left(\frac{x - x_{i+\frac{1}{2}}}{\Delta t}, \mathbf{W}_{i,j}^{n}, \mathbf{W}_{i+1,j}^{n} \right) dx , \end{align} we will get: \begin{equation} \mathbf{W}_{i,j}^{x} = \frac{1}{2} \mathbf{W}_{i,j}^{x,-} + \frac{1}{2} \mathbf{W}_{i,j}^{x,+} . \end{equation} $\mathbf{W}_{i,j}^{x,\pm}$ are at physically admissible states since they are convex averaging of the approximate HLLC solutions. This also means $\mathbf{W}_{i,j}^{x}$ is also physically admissible. Equation~\eqref{eq:convex_split_2D} becomes: \begin{equation} \mathbf{W}_{i,j}^{n+1} = \sigma_x \mathbf{W}_{i,j}^{x} + \sigma_y \mathbf{W}_{i,j}^{y} . \end{equation} Therefore, $\mathbf{W}_{i,j}^{n+1}$ is also physically admissible since it is a convex combination of $\mathbf{W}_{i,j}^{x}$ and $\mathbf{W}_{i,j}^{y}$. \section{Incremental-stencil WCNS} In this section, a high-order finite difference scheme for discretizing equation~\eqref{eq:W_G_eqn} is introduced. The high-order scheme belongs to the family of weighted compact nonlinear schemes (WCNSs) which is a variant of the WENO schemes for discontinuity-capturing. It was first proposed by~\citet{deng2000developing} in which compact (spatially implicit) finite difference schemes are combined with WENO interpolation. Since then, WCNSs are extended to higher order of accuracy~\cite{nonomura2007increasing,zhang2008development}. In principle, WCNSs can be used with both explicit or compact finite difference schemes. \citet{nonomura2009effects} suggested that explicit finite difference schemes are more efficient and later also proposed a family of robust explicit midpoint-and-node-to-node finite difference schemes~\cite{nonomura2013robust}. In this section, an explicit WCNS with the explicit hybrid cell-midpoint and cell-node finite difference scheme~\cite{deng2011new,yan2016new} and nonlinear interpolation adapted from incremental-stencil reconstruction~\cite{wang2018incremental} for finite volume WENO scheme is presented. The semi-discretized finite difference form of equation~\eqref{eq:W_G_eqn} is given by: \begin{equation} \frac{\partial \mathbf{W}}{\partial t} \bigg|_{i,j} + \widehat{ \frac{\partial \mathbf{G}^x}{\partial x} } \bigg|_{i,j} + \widehat{ \frac{\partial \mathbf{G}^y}{\partial y} } \bigg|_{i,j} = \hat{\mathbf{S}}_{i,j} , \label{eq:semi_W_G_eqn} \end{equation} where $\hat{\mathbf{S}}_{i,j}$ is given by: \begin{equation} \hat{\mathbf{S}}_{i,j} = \begin{pmatrix} 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ \alpha_{1,i,j} \left( \left. \widehat{ \frac{\partial u}{\partial x} } \right|_{i,j} + \left. \widehat{ \frac{\partial v}{\partial y} } \right|_{i,j} \right) \end{pmatrix} . \end{equation} A high-order discretization is considered consistent (and conservative for any conservative equation) if: \begin{alignat}{2} \widehat{ \frac{\partial \mathbf{G}^{x}}{\partial x} } \bigg|_{i,j} &= \frac{\hat{\mathbf{G}}^x_{i+\frac{1}{2},j} - \hat{\mathbf{G}}^x_{i-\frac{1}{2},j}}{\Delta x} , \quad &\widehat{ \frac{\partial \mathbf{G}^{y}}{\partial y} } \bigg|_{i,j} &= \frac{\hat{\mathbf{G}}^y_{i,j+\frac{1}{2}} - \hat{\mathbf{G}}^y_{i,j-\frac{1}{2}}}{\Delta y}, \label{eq:flux_diff_form} \\ \widehat{ \frac{\partial u}{\partial x} } \bigg|_{i,j} &= \frac{\hat{u}_{i+\frac{1}{2},j} - \hat{u}_{i-\frac{1}{2},j}}{\Delta x}, \quad &\widehat{ \frac{\partial v}{\partial y} } \bigg|_{i,j} &= \frac{\hat{v}_{i,j+\frac{1}{2}} - \hat{v}_{i,j-\frac{1}{2}}}{\Delta y} . \end{alignat} Therefore, equation~\eqref{eq:semi_W_G_eqn} becomes: \begin{equation} \frac{\partial \mathbf{W}}{\partial t} \bigg|_{i,j} + \frac{\hat{\mathbf{G}}^x_{i+\frac{1}{2},j} - \hat{\mathbf{G}}^x_{i-\frac{1}{2},j}}{\Delta x} + \frac{\hat{\mathbf{G}}^y_{i,j+\frac{1}{2}} - \hat{\mathbf{G}}^y_{i,j-\frac{1}{2}}}{\Delta y} = \hat{\mathbf{S}}_{i,j} , \label{eq:semi_W_G_eqn_cons} \end{equation} Equation~\eqref{eq:semi_W_G_eqn_cons} looks as same as equation~\eqref{eq:fully_discretized_W_G_eqn} if it is further discretized in time with forward Euler method but $\hat{\mathbf{G}}^x_{i\pm\frac{1}{2},j}$, $\hat{\mathbf{G}}^y_{i,j\pm\frac{1}{2}}$ and $\hat{\mathbf{S}}_{i,j}$ (composed of $\hat{u}_{i\pm\frac{1}{2},j}$ and $\hat{v}_{i,j\pm\frac{1}{2}}$) are in high-order accurate approximations and are given by the WCNS introduced in this section. It should be noted that equation~\eqref{eq:semi_W_G_eqn_cons} is a conservative discretization for all conservative equations, except the last advection equation that is given by: \begin{equation} \begin{split} \frac{\partial \alpha_1}{\partial t} \bigg|_{i,j} + \frac{\hat{f}^{x}_{\alpha,i+\frac{1}{2},j} - \hat{f}^{x}_{\alpha,i-\frac{1}{2},j}}{\Delta x} + \frac{\hat{f}^{y}_{\alpha,i,j+\frac{1}{2}} - \hat{f}^{y}_{\alpha,i,j-\frac{1}{2}}}{\Delta y} = \\ \alpha_{1,i,j} \left( \frac{\hat{u}_{i+\frac{1}{2},j} - \hat{u}_{i-\frac{1}{2},j}}{\Delta x} + \frac{\hat{v}_{i,j+\frac{1}{2}} - \hat{v}_{i,j-\frac{1}{2}}}{\Delta y} \right) . \end{split} \end{equation} \subsection{Explicit hybrid cell-midpoint and cell-node scheme} The sixth order accurate explicit scheme from the hybrid cell-midpoint and cell-node compact scheme (HCS)~\cite{deng2011new} family is used for the approximation of the first order derivatives $\partial \mathbf{G}^x / \partial x |_{i,j}$ and $\partial \mathbf{G}^y / \partial y |_{i,j}$. The sixth order explicit HCS formulation is given by: \begin{equation} \begin{split} \frac{\partial \mathbf{G}^x}{\partial x} \bigg|_{i,j} &\approx \widehat{ \frac{\partial \mathbf{G}^x}{\partial x} } \bigg|_{i,j} \\ &= \frac{1}{\Delta x} \left[ \psi \left(\tilde{\mathbf{G}}^x_{i+\frac{1}{2},j} - \tilde{\mathbf{G}}^x_{i-\frac{1}{2},j} \right) - \frac{175 \psi - 192}{256} \left(\mathbf{G}^x_{i+1,j} - \mathbf{G}^x_{i-1,j} \right) \right. \\ &\quad \left. + \frac{35 \psi - 48}{320} \left(\mathbf{G}^x_{i+2,j} - \mathbf{G}^x_{i-2,j} \right) - \frac{45 \psi - 64}{3840} \left(\mathbf{G}^x_{i+3,j} - \mathbf{G}^x_{i-3,j} \right) \right]. \label{eq:HCS6} \end{split} \end{equation} If we replace $\tilde{\mathbf{G}}^x_{i \pm \frac{1}{2},j}$ with the exact fluxes, \begin{equation} \begin{split} \widehat{ \frac{\partial \mathbf{G}^x}{\partial x} } \bigg|_{i,j} &= \frac{\partial \mathbf{G}^x}{\partial x} \bigg|_{i,j} - \left( \frac{5 \psi}{1024} - \frac{1}{140} \right) \frac{\partial^7 \mathbf{G}^x}{\partial x^7} \bigg|_{i,j} \Delta x^6 \\ &\quad - \left( \frac{95 \psi}{98304} - \frac{1}{720} \right) \frac{\partial^9 \mathbf{G}^x}{\partial x^9} \bigg|_{i,j} \Delta x^8 + \mathcal{O} \left( \Delta x^{10} \right) . \label{eq:HCS6_Taylor_expand} \end{split} \end{equation} If $\psi = 256/175$, the scheme becomes eighth order accurate: \begin{equation} \widehat{ \frac{\partial \mathbf{G}^x}{\partial x} } \bigg|_{i,j} = \frac{\partial \mathbf{G}^x}{\partial x} \bigg|_{i,j} - \frac{1}{40320} \frac{\partial^9 \mathbf{G}^x}{\partial x^9} \bigg|_{i,j} \Delta x^8 + \mathcal{O} \left( \Delta x^{10} \right) . \label{eq:HCS6_Taylor_expand_8th_order} \end{equation} $\psi = 256/175$ is adopted in this work. Any central explicit or compact finite difference scheme can be rewritten into the flux-difference forms given by equation~\eqref{eq:flux_diff_form} and it is derived in~\cite{subramaniam2019high}. Following that work, the HCS given by equation~\eqref{eq:HCS6} has implied reconstructed flux $\hat{\mathbf{G}}^x_{i+1/2,j}$ given by: \begin{equation} \begin{split} \hat{\mathbf{G}}^x_{i+\frac{1}{2},j} &= \psi \tilde{\mathbf{G}}^x_{i+\frac{1}{2},j} - \left( \frac{75 \psi}{128} - \frac{37}{60} \right) \left( \mathbf{G}^x_{i,j} + \mathbf{G}^x_{i+1,j} \right) \\ &\quad + \left( \frac{25 \psi}{256} - \frac{2}{15} \right) \left( \mathbf{G}^x_{i-1,j} + \mathbf{G}^x_{i+2,j} \right) - \left( \frac{3 \psi}{256} - \frac{1}{60} \right) \left( \mathbf{G}^x_{i-2,j} + \mathbf{G}^x_{i+3,j} \right) \label{eq:reconstructed_G}. \end{split} \end{equation} Note that the equation above is also used for reconstructing the flux $\hat{f}^{x}_{\alpha,i+\frac{1}{2},j}$ in the advection equation. High-order finite difference approximations of the velocity components are also required for $\hat{\mathbf{S}}_{i,j}$. Following the idea of \cite{wong2017high}, the numerical derivatives of the velocity components are also given by the same finite difference scheme as the flux derivatives: \begin{equation} \begin{split} \frac{\partial u}{\partial x} \bigg|_{i,j} \approx \widehat{ \frac{\partial u}{\partial x} } \bigg|_{i,j} &= \frac{1}{\Delta x} \left[ \psi \left(\tilde{u}_{i+\frac{1}{2},j} - \tilde{u}_{i-\frac{1}{2},j} \right) - \frac{175 \psi - 192}{256} \left(u_{i+1,j} - u_{i-1,j} \right) \right. \\ &\quad \left. + \frac{35 \psi - 48}{320} \left(u_{i+2,j} - u_{i-2,j} \right) - \frac{45 \psi - 64}{3840} \left(u_{i+3,j} - u_{i-3,j} \right) \right]. \end{split} \end{equation} The implied reconstructed velocity component $\hat{u}_{i+1/2,j}$ is given by: \begin{equation} \begin{split} \hat{u}_{i+\frac{1}{2},j} &= \psi \tilde{u}_{i+\frac{1}{2},j} - \left( \frac{75 \psi}{128} - \frac{37}{60} \right) \left( u_{i,j} + u_{i+1,j} \right) + \left( \frac{25 \psi}{256} - \frac{2}{15} \right) \left( u_{i-1,j} + u_{i+2,j} \right) \\ &\quad - \left( \frac{3 \psi}{256} - \frac{1}{60} \right) \left( u_{i-2,j} + u_{i+3,j} \right) \label{eq:reconstructed_vel} . \end{split} \end{equation} The discretizations for flux and velocity component derivatives in $y$ direction are similar. High-order accurate approximations are required for $\tilde{\mathbf{G}}^x_{i+1/2,j}$ and $\tilde{u}_{i+1/2,j}$ to form high-order discretization for equation~\eqref{eq:semi_W_G_eqn_cons}, which are discussed in the following sections. Finally, by using equation~\eqref{eq:G_pm}, equation~\eqref{eq:semi_W_G_eqn} can be rewritten as: \begin{equation} \frac{\partial \mathbf{W}}{\partial t} \bigg|_{i} + \frac{\hat{\mathbf{G}}^{x,-}_{i+\frac{1}{2},j} - \hat{\mathbf{G}}^{x,+}_{i-\frac{1}{2},j}}{\Delta x} + \frac{\hat{\mathbf{G}}^{y,-}_{i,j+\frac{1}{2}} - \hat{\mathbf{G}}^{y,+}_{i,j-\frac{1}{2}}}{\Delta y} = \mathbf{0} . \label{eq:semi_W_G_pm_eqn} \end{equation} \subsection{Methodology of WCNS} In WCNSs, the fluxes at the midpoints are obtained with aid of explicit nonlinear interpolations, which can also be interpreted as nonlinear filtering processes to avoid spurious oscillations near shocks and other discontinuities. For simplicity, the implementation details of a WCNS is explained with a 1D version of equation~\eqref{eq:semi_W_G_pm_eqn} in this and the following sub-section. Thus, superscript ``$x$" in $\mathbf{G}^x$ is dropped for convenience. For the 1D five-equation model, the algorithm to obtain the high-order fluxes $\hat{\mathbf{G}}^{\pm}_{i+1/2}$ with the WCNS approach is given below: \begin{enumerate} \item Convert all $\mathbf{W}_{i}$ in the stencils of left-biased and right-biased nonlinear WENO interpolations to primitive variable vectors $\mathbf{V}_{i}$. \item Perform characteristic decomposition by transforming all $\mathbf{V}_{i}$ in the stencils of interpolations to characteristic variable vectors $\mathbf{U}_{i}$ with the projection matrix $\mathbf{R}^{-1}_{i+1/2}$: $\mathbf{U}_{i} = \mathbf{R}^{-1}_{i+1/2} \mathbf{V}_{i}$. \item Compute $\tilde{\mathbf{U}}_L$ and $\tilde{\mathbf{U}}_R$ at each midpoint with $\mathbf{U}_{i}$ using left-biased and right-biased nonlinear WENO interpolations respectively. \item Transform $\tilde{\mathbf{U}}_L$ and $\tilde{\mathbf{U}}_R$ to $\tilde{\mathbf{V}}_L$ and $\tilde{\mathbf{V}}_R$ with the projection matrix $\mathbf{R}_{i+1/2}$: $\tilde{\mathbf{V}}_L = \mathbf{R}_{i+1/2} \tilde{\mathbf{U}}_L$, and $\tilde{\mathbf{V}}_R = \mathbf{R}_{i+1/2} \tilde{\mathbf{U}}_R$. \item Convert $\tilde{\mathbf{V}}_L$ and $\tilde{\mathbf{V}}_R$ to $\tilde{\mathbf{W}}_L$ and $\tilde{\mathbf{W}}_R$. \item Compute the high-order flux and velocity at each midpoint with the Riemann solver. If the HLLC Riemann solver is used: $\tilde{\mathbf{G}}_{i+\frac{1}{2}} = \mathbf{G}^{\mathrm{HLLC}} \left (\tilde{\mathbf{W}}_L,\tilde{\mathbf{W}}_R \right)$ and $\tilde{u}_{i+\frac{1}{2}} = u^{\mathrm{HLLC}}_{*} \left( \tilde{\mathbf{W}}_L, \tilde{\mathbf{W}}_R \right)$. \item Compute the flux and velocity at the nodes: $\mathbf{G}_{i} = \mathbf{G}(\mathbf{W}_i)$ and $u_{i} = u(\mathbf{W}_i)$. \item Reconstruct the flux $\hat{\mathbf{G}}_{i+\frac{1}{2}}$ and velocity $\hat{u}_{i+\frac{1}{2}}$ at the midpoints using the flux differencing approach (equations~\eqref{eq:reconstructed_G} and \eqref{eq:reconstructed_vel} in this work). \item Compute $\hat{\mathbf{G}}^{\pm}_{i+1/2}$ using equation~\eqref{eq:G_pm}: \begin{alignat*}{2} \hat{\mathbf{G}}^{-}_{i+\frac{1}{2}} &= \hat{\mathbf{G}}_{i+\frac{1}{2}} - \alpha_{1,i} \ &(0\ 0\ 0\ 0\ \hat{u}_{i+\frac{1}{2}} )^T , \\ \hat{\mathbf{G}}^{+}_{i+\frac{1}{2}} &= \hat{\mathbf{G}}_{i+\frac{1}{2}} - \alpha_{1,i+1} \ &(0\ 0\ 0\ 0\ \hat{u}_{i+\frac{1}{2}} )^T . \end{alignat*} \end{enumerate} In this work, only the incremental-stencil WENO interpolation of left-biased midpoint values is presented. The interpolation of right-biased midpoint values is similar due to symmetry and can be obtained by flipping the stencils and corresponding coefficients. The projection matrices for transformation between primitive variables and characteristic variables can be found in \ref{appendix:char_decomp}. The projection matrices $\mathbf{R}_{i+1/2}$ are computed at midpoints $x_{i+1/2}$ with the arithmetic averages of partial densities, mixture density and speed of sound at $x_{i}$ and $x_{i+1}$. \subsection{Incremental-stencil WENO interpolation} The finite volume WENO scheme with the incremental-stencil reconstruction (WENO-IS) was proposed by~\citet{wang2018incremental}. The finite volume WENO-IS is robust for compressible multi-phase problems with shocks and is also accurate for those problems due to high-order WENO reconstruction with the use of HLLC Riemann solver, which is well-known for its accuracy in capturing material interfaces. However, in general a finite volume WENO scheme is more expensive compared with finite difference WCNS and WENO schemes with similar orders of accuracy for multi-dimensional simulations. This is due to the fact that a finite volume scheme requires multi-dimensional reconstructions to obtain point values at many Gaussian points on the cell boundaries from cell averages when one desires third or high order of accuracy~\cite{shu2003high,titarev2004finite,coralic2014finite}. Generally, finite difference WENO schemes or WCNSs in explicit forms are four times cheaper in 2D and nine times cheaper in 3D compared to finite volume WENO schemes since multi-dimensional reconstructions are not required for the former schemes~\cite{sebastian2003multidomain}. While the costs of WENO reconstruction in finite difference WENO schemes and WENO interpolation in finite difference WCNS methods are similar, a finite difference WENO scheme can only be used with flux-vector splitting methods, such as Lax--Friedrichs flux splitting, when high-order of accuracy is desired. The use of flux-difference splitting methods such as Riemann solvers in a finite difference WENO scheme for multi-dimensional simulations degenerates to only second order but a WCNS can still maintain high order of accuracy when used with a Riemann solver. Therefore, in this work we propose a WCNS with a WENO interpolation adapted from the robust incremental-stencil WENO reconstruction such that the HLLC Riemann solver can be applied for upwinding while the overall scheme is still high-order accurate and efficient. The incremental-stencil (IS) interpolation approximates the midpoint values by nonlinear combination of linearly interpolated values from four different sub-stencils, $S_0$--$S_3$ (shown in figure~\ref{fig:stencil_WCNS}). The interpolated values at the midpoints $\tilde{u}_{j+\frac{1}{2}}$ from the four different sub-stencils are given by: \begin{align} S_0: \quad \tilde{u}_{i+\frac{1}{2}}^{0} =& \frac{1}{2}\left(u_i + u_{i+1} \right), \label{eq:interpolation_stencil_0} \\ S_1: \quad \tilde{u}_{i+\frac{1}{2}}^{1} =& \frac{1}{2}\left(-u_{i-1} + 3u_{i} \right), \label{eq:interpolation_stencil_1} \\ S_2: \quad \tilde{u}_{i+\frac{1}{2}}^{2} =& \frac{1}{8}\left(3u_{i} + 6u_{i+1} - u_{i+2} \right), \label{eq:interpolation_stencil_2} \\ S_3: \quad \tilde{u}_{i+\frac{1}{2}}^{3} =& \frac{1}{8}\left(3u_{i-2} - 10u_{i-1} + 15u_{i} \right). \label{eq:interpolation_stencil_3} \end{align} \noindent The interpolated values from stencils $S_0$ and $S_1$ are second order accurate and those from stencils $S_2$ and $S_3$ are third order accurate. The variable $u$ can either be fluxes, conservative variables, primitive variables or variables that are projected to the characteristic fields. In this work, the primitive variables projected to the characteristic fields are employed in the interpolation process. \begin{figure}[hbt] \centering \begin{tikzpicture} \useasboundingbox ( 0.0cm,-1cm) rectangle (12cm,4.5cm); \draw[thin] ( 0.0cm,3.0cm) -- (12.0cm,3.0cm); \draw[very thick] ( 6.0cm,2.7cm) -- ( 6.0cm,3.3cm) node[above=0.1cm]{\large $\bm{i+\frac{1}{2}}$}; \draw[thin] ( 2.0cm,2.7cm) -- ( 2.0cm,3.3cm) node[above=0.1cm]{\large $i-\frac{3}{2}$}; \draw[thin] ( 4.0cm,2.7cm) -- ( 4.0cm,3.3cm) node[above=0.1cm]{\large $i-\frac{1}{2}$}; \draw[thin] ( 8.0cm,2.7cm) -- ( 8.0cm,3.3cm) node[above=0.1cm]{\large $i+\frac{3}{2}$}; \draw[thin] (10.0cm,2.7cm) -- (10.0cm,3.3cm) node[above=0.1cm]{\large $i+\frac{5}{2}$}; \fill ( 1.0cm,3.0cm) circle(2.0pt) node[below=0.2cm]{\large $i-2$}; \fill ( 3.0cm,3.0cm) circle(2.0pt) node[below=0.2cm]{\large $i-1$}; \fill ( 5.0cm,3.0cm) circle(2.0pt) node[below=0.2cm]{\large $i$}; \fill ( 7.0cm,3.0cm) circle(2.0pt) node[below=0.2cm]{\large $i+1$}; \fill ( 9.0cm,3.0cm) circle(2.0pt) node[below=0.2cm]{\large $i+2$}; \fill (11.0cm,3.0cm) circle(2.0pt) node[below=0.2cm]{\large $i+3$}; \draw[thin] (5.0cm,2.0cm) node[left]{\large $S_{0}$} -- (7.0cm,2.0cm); \draw[black,fill=white] (6.0cm,2.0cm) circle(2.0pt); \fill (5.0cm,2.0cm) circle(2.0pt); \fill (7.0cm,2.0cm) circle(2.0pt); \draw[thin] (3.0cm,1.5cm) node[left]{\large $S_{1}$} -- (6.0cm,1.5cm); \draw[black,fill=white] (6.0cm,1.5cm) circle(2.0pt); \fill (3.0cm,1.5cm) circle(2.0pt); \fill (5.0cm,1.5cm) circle(2.0pt); \draw[thin] (5.0cm,1.0cm) node[left]{\large $S_{2}$} -- (9.0cm,1.0cm); \draw[black,fill=white] (6.0cm,1.0cm) circle(2.0pt); \fill (5.0cm,1.0cm) circle(2.0pt); \fill (7.0cm,1.0cm) circle(2.0pt); \fill (9.0cm,1.0cm) circle(2.0pt); \draw[thin] (1.0cm,0.5cm) node[left]{\large $S_{3}$} -- (6.0cm,0.5cm); \draw[black,fill=white] (6.0cm,0.5cm) circle(2.0pt); \fill (1.0cm,0.5cm) circle(2.0pt); \fill (3.0cm,0.5cm) circle(2.0pt); \fill (5.0cm,0.5cm) circle(2.0pt); \draw[thin] (1.0cm,0.0cm) node[left]{\large $S_{5}$} -- (9.0cm,0.0cm); \draw[black,fill=white] (6.0cm,0.0cm) circle(2.0pt); \fill (1.0cm,0.0cm) circle(2.0pt); \fill (3.0cm,0.0cm) circle(2.0pt); \fill (5.0cm,0.0cm) circle(2.0pt); \fill (7.0cm,0.0cm) circle(2.0pt); \fill (9.0cm,0.0cm) circle(2.0pt); \draw[gray,thin] (3.0cm,-0.5cm) node[left]{\large $S_{01}$} -- (7.0cm,-0.5cm); \draw[gray,fill=white] (6.0cm,-0.5cm) circle(2.0pt); \draw[gray,fill] (3.0cm,-0.5cm) circle(2.0pt); \draw[gray,fill] (5.0cm,-0.5cm) circle(2.0pt); \draw[gray,fill] (7.0cm,-0.5cm) circle(2.0pt); \end{tikzpicture} \caption{Sub-stencils of incremental-stencil WENO interpolation. The solid circles represent nodes used in the interpolation stencils, while empty circles represent the midpoint for the interpolated values. The stencil $S_{01}$ is in grey since it is not considered in the actual interpolation.} \label{fig:stencil_WCNS} \end{figure} A fifth order 5-point linear interpolation from $S_5$ can be obtained from linear combination of the lower order interpolations: \begin{equation} S_5: \quad \tilde{u}_{i+\frac{1}{2}}^{5} = \sum_{k=0}^{3} d_k \tilde{u}_{i+\frac{1}{2}}^{k}, \label{eq:WCNS_stencil_5} \end{equation} where the linear weights are given by: \begin{equation} d_0 = \frac{15}{32}, \quad d_1 = \frac{5}{32}, \quad d_2 = \frac{5}{16}, \quad d_3 = \frac{1}{16}. \end{equation} \noindent The expanded form of the linear interpolation is given by: \begin{equation} S_5: \quad \tilde{u}_{i+\frac{1}{2}}^{5} = \frac{1}{128} \left(3u_{i-2} - 20u_{i-1} + 90u_i + 60u_{i+1} - 5u_{i+2} \right) . \label{eq:WCNS_stencil_5_epxanded} \end{equation} The 5-point linear interpolation scheme may generate spurious oscillations due to Gibbs phenomenon or is even unstable near shocks or discontinuities. To improve robustness, a nonlinear WENO interpolation is suggested in this work by replacing the linear weights with the incremental-stencil (IS) nonlinear weights~\cite{wang2018incremental}. The nonlinear weights have the following form: \begin{equation} \tilde{u}_{i+\frac{1}{2}} = \sum_{k=0}^{3} \omega_k \tilde{u}_{i+\frac{1}{2}}^{k} . \label{eq:WENO_nonlinear_interpolation} \end{equation} \noindent The IS nonlinear weights are given by~\cite{wang2018incremental}: \begin{align} \omega_k &= \frac{\eta_k}{\sum_{s=0}^{3} \eta_s}, \\ \eta_k &= \left\{ \begin{array}{ll} d_k \left( 1 + \frac{\tau_5}{\beta_k + \epsilon} \cdot \frac{\tau_5}{\beta_{01} + \epsilon} \right), & \text{if } k<2, \\ d_k \left( 1 + \frac{\tau_5}{\beta_k + \epsilon} \right), & \text{otherwise} . \end{array}\right. \end{align} \noindent The smoothness indicators are defined by: \begin{equation} \beta_k = \left\{ \begin{array}{ll} \int^{x_{i+\frac{1}{2}}}_{x_{i-\frac{1}{2}}} \Delta x \left( \frac{\partial}{\partial x} \tilde{u}^{k}(x) \right)^2 dx, & k = 0, 1, \\ \sum^{2}_{l=1} \int^{x_{i+\frac{1}{2}}}_{x_{i-\frac{1}{2}}} \Delta x^{2l-1} \left( \frac{\partial^{l}}{\partial x^l} \tilde{u}^{k}(x) \right)^2 dx, & \text{otherwise (including $k=01$)}, \end{array} \right. \end{equation} where $\tilde{u}^{k}(x)$ are the Lagrange interpolating polynomials from stencils $S_k$. The nonlinear weights require smoothness indicator computed with the Lagrange interpolation polynomial from stencil $S_{01}$ besides those from $S_0$--$S_3$. The integrated forms of smoothness indicators are given by: \begin{align} \beta_0 &= \left( u_{i} - u_{i+1} \right)^2, \label{eq:beta_0_IS} \\ \beta_1 &= \left( u_{i-1} - u_{i} \right)^2, \label{eq:beta_1_IS} \\ \beta_{01} &= \frac{13}{12} \left( u_{i-1} - 2u_{i} + u_{i+1} \right)^2 + \frac{1}{4} \left( u_{i-1} - u_{i+1} \right)^2, \label{eq:beta_01_IS} \\ \beta_2 &= \frac{13}{12} \left( u_{i} - 2u_{i+1} + u_{i+2} \right)^2 + \frac{1}{4} \left( 3u_{i} - 4u_{i+1} + u_{i+2} \right)^2, \label{eq:beta_2_IS} \\ \beta_3 &= \frac{13}{12} \left( u_{i-2} - 2u_{i-1} + u_{i} \right)^2 + \frac{1}{4} \left( u_{i-2} - 4u_{i-1} + 3u_{i} \right)^2 . \label{eq:beta_3_IS} \end{align} \noindent The reference smoothness indicator, $\tau_5$, is defined by~\cite{fu2016family}: \begin{equation} \tau_5 = \sum^{4}_{l=3} \int^{x_{i+\frac{1}{2}}}_{x_{i-\frac{1}{2}}} \Delta x^{2l-1} \left( \frac{\partial^{l}}{\partial x^l} \tilde{u}^{5}(x) \right)^2 dx \end{equation} where $\tilde{u}^{5}(x)$ is the Lagrange interpolating polynomial from stencil $S_5$. The integrated form of the reference smoothness indicator is given by: \begin{equation} \begin{split} \tau_5 &= \frac{13}{12} \left( u_{i+2} - 4u_{i+1} + 6u_{i} - 4u_{i-1} + u_{i-2} \right)^2 \\ &\quad + \frac{1}{4} \left( u_{i+2} - 2u_{i+1} + 2u_{i-1} - u_{i-2} \right)^2 . \label{eq:tau_5_IS} \end{split} \end{equation} The robustness of incremental-stencil WENO interpolation presented above is as high as the WENO incremental-stencil reconstruction, as both of them can choose one of the 2-point stencils when there are closely located discontinuities, as explained in~\cite{wang2018incremental}. In \ref{appendix:convergence}, it is proved that the IS nonlinear interpolation with the HCS finite differencing is fifth order accurate for a 1D scalar hyperbolic conservation law with perfect upwinding, provided not at critical points. This WCNS is termed WCNS-IS in this work. \section{Positivity- and boundedness-preserving limiting procedures} Similar to the finite volume WENO-IS, the finite difference WCNS-IS is generally robust in capturing shocks and material interfaces in multi-phase flow simulations. However, it cannot be guaranteed that these high-order schemes are free from numerical failures due to negative squared speed of sound, partial densities (hence also out-of-bounds mass fractions), and out-of-bounds volume fractions. In this section, positivity- and boundedness-preserving limiting procedures are introduced to improve the robustness of the WCNS-IS. The procedures are conservative for the corresponding equations in the system that are conservative, i.e. except the volume fraction advection equation. In the algorithm of WCNS, there are two stages where positivity and boundedness can be violated. The first stage is the WENO interpolation step for the left-biased and right-biased interpolated conservative variable vectors ($\tilde{\mathbf{W}}_L$ and $\tilde{\mathbf{W}}_R$), where the interpolated conservative variables may not be physically admissible. Another stage is the flux reconstruction step of $\hat{\mathbf{G}}^{\pm}_{i+1/2}$ using the Riemann solver and the high-order HCS finite difference scheme. The positivity- and boundedness-preserving interpolation limiter and flux limiter are introduced in this section to respectively deal with the two issues mentioned. \subsection{Positivity- and boundedness-preserving interpolation limiter} The incremental-stencil WENO interpolation is robust but it is still not positivity-preserving for partial densities and squared speed of sound. It is also not boundedness-preserving for volume fractions. However, the first order interpolation with the left and right node values are in the admissible state set and are positivity-preserving and boundedness-preserving. Therefore, the high-order WENO interpolation can be limited with a convex combination of itself and the first order interpolation. For simplicity, this sub-section only discusses the limiting procedures for the left-biased WENO interpolation in the $x$ direction for the governing equations. Hence, the subscripts ``$L$" and ``$j$" are omitted. The first stage of the interpolation limiting procedures is to obtain a limited conservative variable vector with positive partial densities at each midpoint, $\tilde{\mathbf{W}}_{i+\frac{1}{2}}^{*}$. As described in algorithm~\ref{alg:interp_limit_densities}, $\tilde{\mathbf{W}}_{i+\frac{1}{2}}^{*}$ is first initialized as the WENO interpolated conservative variable vector. It is then limited for positive partial densities through repeated convex combination of $\tilde{\mathbf{W}}_{i+\frac{1}{2}}^{*}$ with the first order interpolated conservative variable vector for each phase using a user-defined small tolerance $\epsilon_{\alpha_k \rho_k}$. In the next stage, limiting procedure on the volume fractions can be applied similarly through another set of successive convex combinations given by algorithm~\ref{alg:interp_limit_vol_frac} with another user-defined small threshold $\epsilon_{\alpha_k}$. After this stage, the limited vector $\tilde{\mathbf{W}}_{i+\frac{1}{2}}^{**}$ should have all partial densities (including mixture density) positive and all volume fractions bounded between $\epsilon_{\alpha_k}$ and $1 - \epsilon_{\alpha_k}$. This also means that all mass fractions are bounded between 0 and 1. The remaining quantity to limit is the squared speed of sound. We can define a helper variable $\tilde{c}$ where $\tilde{c}^2 = ( \rho e - \overline p^\infty) / \rho$ such that squared sound speed and $\tilde{c}$ are related through $c^2 = \overline{\gamma} \left( \overline{\gamma} - 1 \right) \tilde{c}^2$. As the final stage of the limiting procedures, $\tilde{\mathbf{W}}_{i+\frac{1}{2}}^{***}$ with positive $\rho \tilde{c}^2$ can be obtained using algorithm~\ref{alg:interp_limit_sound}. This is carried out through convex combination of $\tilde{\mathbf{W}}_{i+\frac{1}{2}}^{**}$ and the first order interpolated conservative variable vector with tolerance $\epsilon_{\rho \tilde{c}^2}$ by utilizing the convexity of the admissible set proved with the Jensen's inequality. The squared speed of sound of the final limited conservative variable vector, $\tilde{\mathbf{W}}_{i+\frac{1}{2}}^{***}$, is also positive as $c^2 = \overline \gamma(\overline \gamma -1) (\rho \tilde{c}^2) / \rho$. Note that $\overline \gamma$ is larger than 1 since volume fractions of $\tilde{\mathbf{W}}_{i+\frac{1}{2}}^{**}$ are already bounded between 0 and 1. The positivity and boundedness limiting procedures for the right-biased WENO interpolation in the $x$ direction can be performed with $\mathbf{W}_{i+1}$ instead of $\mathbf{W}_i$ in a similar way. We have chosen the tolerances for the limiting procedures as $\epsilon_{\alpha_k \rho_k} = 1.0\mathrm{e}{-10}$, $\epsilon_{\alpha_k} = 1.0\mathrm{e}{-10}$, and $\epsilon_{\rho \tilde{c}^2} = 1.0\mathrm{e}{-8}$. Note that in practice, user should make sure the tolerances are chosen to be smaller than the minimum values of the corresponding initial fields. Due to numerical round-off, the $\tilde{\mathbf{W}}_{i+\frac{1}{2}}^{***}$ may still have negative partial densities, negative squared speed of sound, or out-of-bounds volume fractions. Therefore, a hard switch is suggested by setting $\tilde{\mathbf{W}}_{i+\frac{1}{2}}^{***} = \mathbf{W}_i$ when $\alpha_k \rho_k \left( \tilde{\mathbf{W}}_{i+\frac{1}{2}}^{***} \right) < \epsilon^{\mathrm{HS}}_{\alpha_k \rho_k}$, $\alpha_k \left( \tilde{\mathbf{W}}_{i+\frac{1}{2}}^{***} \right) < \epsilon^{\mathrm{HS}}_{\alpha_k}$, or $\rho \tilde{c}^2 \left( \tilde{\mathbf{W}}_{i+\frac{1}{2}}^{***} \right) < \epsilon^{\mathrm{HS}}_{\rho \tilde{c}^2 }$. The tolerances of the hard switch are chosen as $\epsilon^{\mathrm{HS}}_{\alpha_k \rho_k} = 1.0\mathrm{e}{-11}$, $\epsilon^{\mathrm{HS}}_{\alpha_k} = 1.0\mathrm{e}{-11}$, and $\epsilon^{\mathrm{HS}}_{\rho \tilde{c}^2 } = 1.0\mathrm{e}{-9}$. \begin{algorithm}[!ht] \SetAlgoLined Set $\tilde{\mathbf{W}}_{i+\frac{1}{2}}^{*} = \tilde{\mathbf{W}}_{i+\frac{1}{2}}$\; \For{$k = 1,2$}{ \For{all midpoints }{ \uIf{$\alpha_k \rho_k \left( \mathbf{W}_i \right) < \epsilon_{\alpha_k \rho_k}$}{ $\theta_{i+\frac{1}{2}}=0$\; } \uElseIf{$\alpha_k \rho_k \left( \tilde{\mathbf{W}}_{i+\frac{1}{2}}^{*} \right) < \epsilon_{\alpha_k \rho_k}$}{ Solve $\theta_{i+\frac{1}{2}}$ from the formula: \begin{equation*} \left( 1 - \theta_{i+\frac{1}{2}} \right) \alpha_k \rho_k \left( \mathbf{W}_i \right) + \theta_{i+\frac{1}{2}} \alpha_k \rho_k \left( \tilde{\mathbf{W}}_{i+\frac{1}{2}}^{*} \right) = \epsilon_{\alpha_k \rho_k}; \end{equation*} } \Else{ $\theta_{i+\frac{1}{2}} = 1$\; } Perform convex combination: \begin{equation*} \tilde{\mathbf{W}}_{i+\frac{1}{2}}^{*} = \left( 1 - \theta_{i+\frac{1}{2}} \right) \mathbf{W}_i + \theta_{i+\frac{1}{2}} \tilde{\mathbf{W}}_{i+\frac{1}{2}}^{*} ; \end{equation*} } } \caption{Left-biased interpolation limiting procedure for positive partial densities.} \label{alg:interp_limit_densities} \end{algorithm} \begin{algorithm}[!hbt] \SetAlgoLined Set $\tilde{\mathbf{W}}_{i+\frac{1}{2}}^{**} = \tilde{\mathbf{W}}_{i+\frac{1}{2}}^{*}$\; \For{$k = 1,2$}{ \For{all midpoints }{ \uIf{$\alpha_k \left( \mathbf{W}_i \right) < \epsilon_{\alpha_k}$}{ $\theta_{i+\frac{1}{2}}=0$\; } \uElseIf{$\alpha_k \left( \tilde{\mathbf{W}}_{i+\frac{1}{2}}^{**} \right) < \epsilon_{\alpha_k}$}{ Solve $\theta_{i+\frac{1}{2}}$ from the formula: \begin{equation*} \left( 1 - \theta_{i+\frac{1}{2}} \right) \alpha_k \left( \mathbf{W}_i \right) + \theta_{i+\frac{1}{2}} \alpha_k \left( \tilde{\mathbf{W}}_{i+\frac{1}{2}}^{**} \right) = \epsilon_{\alpha_k}; \end{equation*} } \Else{ $\theta_{i+\frac{1}{2}} = 1$\; } Perform convex combination: \begin{equation*} \tilde{\mathbf{W}}_{i+\frac{1}{2}}^{**} = \left( 1 - \theta_{i+\frac{1}{2}} \right) \mathbf{W}_i + \theta_{i+\frac{1}{2}} \tilde{\mathbf{W}}_{i+\frac{1}{2}}^{**} ; \end{equation*} } } \caption{Left-biased interpolation limiting procedure for bounded volume fractions.} \label{alg:interp_limit_vol_frac} \end{algorithm} \begin{algorithm}[!hbt] \SetAlgoLined \For{all midpoints }{ \uIf{$\rho \tilde{c}^2 \left( \mathbf{W}_i \right) < \epsilon_{\rho \tilde{c}^2 }$ }{ $\theta_{i+\frac{1}{2}}=0$\; } \uElseIf{$\rho \tilde{c}^2 \left( \tilde{\mathbf{W}}_{i+\frac{1}{2}}^{**} \right) < \epsilon_{\rho \tilde{c}^2 }$}{ Solve $\theta_{i+\frac{1}{2}}$ from the formula: \begin{equation*} \left( 1 - \theta_{i+\frac{1}{2}} \right) \rho \tilde{c}^2 \left( \mathbf{W}_i \right) + \theta_{i+\frac{1}{2}} \rho \tilde{c}^2 \left( \tilde{\mathbf{W}}_{i+\frac{1}{2}}^{**} \right) = \epsilon_{\rho \tilde{c}^2}; \end{equation*} } \Else{ $\theta_{i+\frac{1}{2}} = 1$\; } Perform convex combination (applying Jensen's inequality): \begin{equation*} \tilde{\mathbf{W}}_{i+\frac{1}{2}}^{***} = \left( 1 - \theta_{i+\frac{1}{2}} \right) \mathbf{W}_i + \theta_{i+\frac{1}{2}} \tilde{\mathbf{W}}_{i+\frac{1}{2}}^{**} ; \end{equation*} } \caption{Left-biased interpolation limiting procedure for positive $\rho \tilde{c}^2$.} \label{alg:interp_limit_sound} \end{algorithm} \subsection{Positivity- and boundedness-preserving flux limiter} The high-order flux reconstruction step of $\hat{\mathbf{G}}^{\pm}_{i+1/2}$ using a Riemann solver and the HCS finite difference scheme is not positivity- and boundedness-preserving in general and may cause numerical failures. Therefore, a flux limiter is critical to make sure that the flux used for time stepping gives physically admissible state. Following the same splitting idea introduced in the section of HLLC Riemann solver, if first order forward Euler time stepping is used for the WCNS, equation~\eqref{eq:semi_W_G_pm_eqn} can be rewritten as: \begin{equation} \mathbf{W}_{i,j}^{n+1} = \sigma_x \underbrace{ \left( \frac{1}{2} \mathbf{W}_{i,j}^{x,-} + \frac{1}{2} \mathbf{W}_{i,j}^{x,+} \right) }_{\mathbf{W}_{i,j}^{x}} + \sigma_y \underbrace{ \left( \frac{1}{2} \mathbf{W}_{i,j}^{y,-} + \frac{1}{2} \mathbf{W}_{i,j}^{y,+} \right) }_{\mathbf{W}_{i,j}^{y}} , \end{equation} where \begin{align} \mathbf{W}_{i,j}^{x,\mp} &= \mathbf{W}_{i,j}^{n} \pm 2 \lambda_x \left( \hat{\mathbf{G}}^{x,\pm}_{i\mp\frac{1}{2},j} - \mathbf{F}^x_{i,j} \right) , \\ \mathbf{W}_{i,j}^{y,\mp} &= \mathbf{W}_{i,j}^{n} \pm 2 \lambda_y \left( \hat{\mathbf{G}}^{y,\pm}_{i,j\mp\frac{1}{2}} - \mathbf{F}^y_{i,j} \right) . \end{align} Note that $\hat{\mathbf{G}}^{x,\pm}_{i\mp\frac{1}{2},j}$ and $\hat{\mathbf{G}}^{y,\pm}_{i,j\mp\frac{1}{2}}$ here are the high-order reconstructed fluxes in contrast to the first order HLLC fluxes, $\hat{\mathbf{G}}^{x,\mathrm{HLLC},\pm}_{i\mp\frac{1}{2},j}$ and $\hat{\mathbf{G}}^{y,\mathrm{HLLC},\pm}_{i,j\mp\frac{1}{2}}$. Since both $\sigma_x$ and $\sigma_y$ are positive and $\sigma_x + \sigma_y = 1$, $\mathbf{W}_{i,j}^{n+1}$ is a convex combination of $\mathbf{W}_{i,j}^{x,\pm}$ and $\mathbf{W}_{i,j}^{y,\pm}$. If all four conservative variable vectors are in the physically admissible set, $\mathbf{W}_{i,j}^{n+1}$ is also in the physically admissible set. For simplicity, only positivity- and boundedness-preserving flux limiting in $x$ direction for $\mathbf{W}_{i,j}^{x,\pm}$ is discussed here and hence ``$x$" superscript and ``$j$" subscript are dropped in the following part. If the first order flux from the approximate Riemann solver is positively preserving such that all intermediate states given by the approximate Riemann solutions are in the admissible state set, such as the HLLC Riemann solver presented in this work, we can first construct the positivity flux limiting procedure for partial densities through the convex combination of the high-order solution $\mathbf{W}_i^{\pm}$ and the first order solution $\mathbf{W}_i^{\mathrm{HLLC}, \pm}$. This first stage of the flux limiting procedures to obtain the limited flux $\hat{\mathbf{G}}_{i+\frac{1}{2}}^{*,\pm}$ is detailed in algorithm~\ref{alg:flux_limit_densities} with tolerance $\epsilon_{\alpha_k \rho_k}$. After this stage, both solutions $\mathbf{W}_i^{*, \pm}$ time-advanced with the limited fluxes have all partial densities (including mixture density) positive, where \begin{equation} \mathbf{W}_{i}^{*,\mp} = \mathbf{W}_{i}^{n} \pm 2 \lambda \left( \hat{\mathbf{G}}^{*,\pm}_{i\mp\frac{1}{2}} - \mathbf{F}_{i} \right) . \end{equation} Note that in the last step of the algorithm, the intention is to hybridize $( \hat{\mathbf{G}}_{i + \frac{1}{2}}^{*,\pm} - \mathbf{F}_i )$ with $( \hat{\mathbf{G}}_{i + \frac{1}{2}}^{\mathrm{HLLC},\pm} - \mathbf{F}_i )$ but the $\mathbf{F}_i$ on both sides of the equation cancel each other. Also, the flux limiting process is conservative for all equations except the last advection equation of volume fraction. In the next stage, we can apply the boundedness flux limiting for volume fractions similarly to obtain the limited flux $\hat{\mathbf{G}}_{i+\frac{1}{2}}^{**,\pm}$, which is given in algorithm~\ref{alg:flux_limit_vol_frac} with threshold $\epsilon_{\alpha_k}$. After this step, the limited solutions $\mathbf{W}_i^{**, \pm}$ should have all volume fractions bounded in addition to positive partial densities (including mixture density), where \begin{equation} \mathbf{W}_{i}^{**,\mp} = \mathbf{W}_{i}^{n} \pm 2 \lambda \left( \hat{\mathbf{G}}^{**,\pm}_{i\mp\frac{1}{2}} - \mathbf{F}_{i} \right) . \end{equation} Finally, the positivity flux limiting for squared sound speed is conducted through the helper variable $\rho \tilde{c}^2$ similarly with the previous sub-section. This step is described in algorithm~\ref{alg:flux_limit_sound} with tolerance $\epsilon_{\rho \tilde{c}^2}$ and makes use of the fact that the admissible set of the conservative variable vector is convex to obtain the final limited flux $\hat{\mathbf{G}}_{i+\frac{1}{2}}^{***,\pm}$. The squared speeds of sound $c^2$ of $\mathbf{W}_{i}^{***,\pm}$, where \begin{equation} \mathbf{W}_{i}^{***,\mp} = \mathbf{W}_{i}^{n} \pm 2 \lambda \left( \hat{\mathbf{G}}^{***,\pm}_{i\mp\frac{1}{2}} - \mathbf{F}_{i} \right) , \end{equation} are limited to be positive since $c^2 = \overline \gamma(\overline \gamma -1) (\rho \tilde{c}^2) / \rho$. Note that the tolerance values ($\epsilon_{\alpha_k \rho_k}$, $\epsilon_{\alpha_k}$, and $\epsilon_{\rho \tilde{c}^2 }$) are as same as those used in the positivity- and boundedness-preserving interpolation limiter. Similar to the interpolation limiter, a hard switch is used by setting $\hat{\mathbf{G}}_{i+\frac{1}{2}}^{***,\pm} = \hat{\mathbf{G}}_{i+\frac{1}{2}}^{\mathrm{HLLC,\pm}}$ if either $\mathbf{W}_{i}^{***,+}$ or $\mathbf{W}_{i+1}^{***,-}$ are at states that are not bounded by smaller tolerances ($\epsilon^{\mathrm{HS}}_{\alpha_k \rho_k} = 1.0\mathrm{e}{-11}$, $\epsilon^{\mathrm{HS}}_{\alpha_k} = 1.0\mathrm{e}{-11}$, and $\epsilon^{\mathrm{HS}}_{\rho \tilde{c}^2 } = 1.0\mathrm{e}{-9}$). \begin{algorithm}[!ht] \SetAlgoLined Set $\hat{\mathbf{G}}_{i+\frac{1}{2}}^{*,\pm} = \hat{\mathbf{G}}_{i+\frac{1}{2}}^{\pm}$ ($\mathbf{W}_i^{*, +} = \mathbf{W}_i^{+}$, $\mathbf{W}_{i+1}^{*, -} = \mathbf{W}_{i+1}^{-}$)\; \For{$k = 1,2$}{ \For{all midpoints }{ \uIf{$\alpha_k \rho_k \left( \mathbf{W}_i^{\mathrm{HLLC}, +} \right) < \epsilon_{\alpha_k \rho_k}$}{ $\theta_{i+\frac{1}{2}}^{+}=0$\; } \uElseIf{$\alpha_k \rho_k \left( \mathbf{W}_i^{*, +} \right) < \epsilon_{\alpha_k \rho_k}$}{ Solve $\theta_{i+\frac{1}{2}}^{+}$ from the formula: \begin{equation*} \left( 1 - \theta_{i+\frac{1}{2}}^{+} \right) \alpha_k \rho_k \left( \mathbf{W}_i^{\mathrm{HLLC}, +} \right) + \theta_{i+\frac{1}{2}}^{+} \alpha_k \rho_k \left( \mathbf{W}_i^{*, +} \right) = \epsilon_{\alpha_k \rho_k}; \end{equation*} } \Else{ $\theta_{i+\frac{1}{2}}^{+}=1$\; } \uIf{$\alpha_k \rho_k \left( \mathbf{W}_{i+1}^{\mathrm{HLLC}, -} \right) < \epsilon_{\alpha_k \rho_k}$}{ $\theta_{i+\frac{1}{2}}^{-}=0$\; } \uElseIf{$\alpha_k \rho_k \left( \mathbf{W}_{i+1}^{*, -} \right) < \epsilon_{\alpha_k \rho_k}$}{ Solve $\theta_{i+\frac{1}{2}}^{-}$ from the formula: \begin{equation*} \left( 1 - \theta_{i+\frac{1}{2}}^{-} \right) \alpha_k \rho_k \left( \mathbf{W}_{i+1}^{\mathrm{HLLC}, -} \right) + \theta_{i+\frac{1}{2}}^{-} \alpha_k \rho_k \left( \mathbf{W}_{i+1}^{*, -} \right) = \epsilon_{\alpha_k \rho_k}; \end{equation*} } \Else{ $\theta_{i+\frac{1}{2}}^{-}=1$\; } Set $\theta_{i+\frac{1}{2}}=\min\left( \theta_{i+\frac{1}{2}}^{+}, \theta_{i+\frac{1}{2}}^{-} \right)$\; Perform convex combination: \begin{align*} \hat{\mathbf{G}}_{i+\frac{1}{2}}^{*,+} = \left( 1 - \theta_{i+\frac{1}{2}} \right) \hat{\mathbf{G}}_{i+\frac{1}{2}}^{\mathrm{HLLC,+}} + \theta_{i+\frac{1}{2}} \hat{\mathbf{G}}_{i+\frac{1}{2}}^{*,+}; \\ \hat{\mathbf{G}}_{i+\frac{1}{2}}^{*,-} = \left( 1 - \theta_{i+\frac{1}{2}} \right) \hat{\mathbf{G}}_{i+\frac{1}{2}}^{\mathrm{HLLC,-}} + \theta_{i+\frac{1}{2}} \hat{\mathbf{G}}_{i+\frac{1}{2}}^{*,-}; \end{align*} } } \caption{Flux limiting procedure for positive partial densities.} \label{alg:flux_limit_densities} \end{algorithm} \begin{algorithm}[!ht] \SetAlgoLined Set $\hat{\mathbf{G}}_{i+\frac{1}{2}}^{**,\pm} = \hat{\mathbf{G}}_{i+\frac{1}{2}}^{*,\pm}$ ($\mathbf{W}_i^{**, +} = \mathbf{W}_i^{*, +}$, $\mathbf{W}_{i+1}^{**, -} = \mathbf{W}_{i+1}^{*, -}$)\; \For{$k = 1,2$}{ \For{all midpoints }{ \uIf{$\alpha_k \left( \mathbf{W}_i^{\mathrm{HLLC}, +} \right) < \epsilon_{\alpha_k}$}{ $\theta_{i+\frac{1}{2}}^{+}=0$\; } \uElseIf{$\alpha_k \left( \mathbf{W}_i^{**, +} \right) < \epsilon_{\alpha_k}$}{ Solve $\theta_{i+\frac{1}{2}}^{+}$ from the formula: \begin{equation*} \left( 1 - \theta_{i+\frac{1}{2}}^{+} \right) \alpha_k \left( \mathbf{W}_i^{\mathrm{HLLC}, +} \right) + \theta_{i+\frac{1}{2}}^{+} \alpha_k \left( \mathbf{W}_i^{**, +} \right) = \epsilon_{\alpha_k}; \end{equation*} } \Else{ $\theta_{i+\frac{1}{2}}^{+}=1$\; } \uIf{$\alpha_k \left( \mathbf{W}_{i+1}^{\mathrm{HLLC}, -} \right) < \epsilon_{\alpha_k}$}{ $\theta_{i+\frac{1}{2}}^{-}=0$\; } \uElseIf{$\alpha_k \left( \mathbf{W}_{i+1}^{**, -} \right) < \epsilon_{\alpha_k}$}{ Solve $\theta_{i+\frac{1}{2}}^{-}$ from the formula: \begin{equation*} \left( 1 - \theta_{i+\frac{1}{2}}^{-} \right) \alpha_k \left( \mathbf{W}_{i+1}^{\mathrm{HLLC}, -} \right) + \theta_{i+\frac{1}{2}}^{-} \alpha_k \left( \mathbf{W}_{i+1}^{**, -} \right) = \epsilon_{\alpha_k}; \end{equation*} } \Else{ $\theta_{i+\frac{1}{2}}^{-}=1$\; } Set $\theta_{i+\frac{1}{2}}=\min\left( \theta_{i+\frac{1}{2}}^{+}, \theta_{i+\frac{1}{2}}^{-} \right)$\; Perform convex combination: \begin{align*} \hat{\mathbf{G}}_{i+\frac{1}{2}}^{**,+} = \left( 1 - \theta_{i+\frac{1}{2}} \right) \hat{\mathbf{G}}_{i+\frac{1}{2}}^{\mathrm{HLLC,+}} + \theta_{i+\frac{1}{2}} \hat{\mathbf{G}}_{i+\frac{1}{2}}^{**,+}; \\ \hat{\mathbf{G}}_{i+\frac{1}{2}}^{**,-} = \left( 1 - \theta_{i+\frac{1}{2}} \right) \hat{\mathbf{G}}_{i+\frac{1}{2}}^{\mathrm{HLLC,-}} + \theta_{i+\frac{1}{2}} \hat{\mathbf{G}}_{i+\frac{1}{2}}^{**,-}; \end{align*} } } \caption{Flux limiting procedure for bounded volume fractions.} \label{alg:flux_limit_vol_frac} \end{algorithm} \begin{algorithm}[!ht] \SetAlgoLined \For{all midpoints }{ \uIf{$\rho \tilde{c}^2 \left( \mathbf{W}_i^{\mathrm{HLLC}, +} \right) < \epsilon_{\rho \tilde{c}^2 }$}{ $\theta_{i+\frac{1}{2}}^{+}=0$\; } \uElseIf{$\rho \tilde{c}^2 \left( \mathbf{W}_i^{**, +} \right) < \epsilon_{\rho \tilde{c}^2 }$}{ Solve $\theta_{i+\frac{1}{2}}^{+}$ from the formula: \begin{equation*} \left( 1 - \theta_{i+\frac{1}{2}}^{+} \right) \rho \tilde{c}^2 \left( \mathbf{W}_i^{\mathrm{HLLC}, +} \right) + \theta_{i+\frac{1}{2}}^{+} \rho \tilde{c}^2 \left( \mathbf{W}_i^{**, +} \right) = \epsilon_{\rho \tilde{c}^2 }; \end{equation*} } \Else{ $\theta_{i+\frac{1}{2}}^{+}=1$\; } \uIf{$\rho \tilde{c}^2 \left( \mathbf{W}_{i+1}^{\mathrm{HLLC}, -} \right) < \epsilon_{\rho \tilde{c}^2 }$}{ $\theta_{i+\frac{1}{2}}^{-}=0$\; } \uElseIf{$\rho \tilde{c}^2 \left( \mathbf{W}_{i+1}^{**, -} \right) < \epsilon_{\rho \tilde{c}^2 }$}{ Solve $\theta_{i+\frac{1}{2}}^{-}$ from the formula: \begin{equation*} \left( 1 - \theta_{i+\frac{1}{2}}^{-} \right) \rho \tilde{c}^2 \left( \mathbf{W}_{i+1}^{\mathrm{HLLC}, -} \right) + \theta_{i+\frac{1}{2}}^{-} \rho \tilde{c}^2 \left( \mathbf{W}_{i+1}^{**, -} \right) = \epsilon_{\rho \tilde{c}^2 }; \end{equation*} } \Else{ $\theta_{i+\frac{1}{2}}^{-}=1$\; } Set $\theta_{i+\frac{1}{2}}=\min\left( \theta_{i+\frac{1}{2}}^{+}, \theta_{i+\frac{1}{2}}^{-} \right)$\; Perform convex combination (applying Jensen's inequality): \begin{align*} \hat{\mathbf{G}}_{i+\frac{1}{2}}^{***,+} &= \left( 1 - \theta_{i+\frac{1}{2}} \right) \hat{\mathbf{G}}_{i+\frac{1}{2}}^{\mathrm{HLLC,+}} + \theta_{i+\frac{1}{2}} \hat{\mathbf{G}}_{i+\frac{1}{2}}^{**,+}; \\ \hat{\mathbf{G}}_{i+\frac{1}{2}}^{***,-} &= \left( 1 - \theta_{i+\frac{1}{2}} \right) \hat{\mathbf{G}}_{i+\frac{1}{2}}^{\mathrm{HLLC,-}} + \theta_{i+\frac{1}{2}} \hat{\mathbf{G}}_{i+\frac{1}{2}}^{**,-}; \end{align*} } \caption{Flux limiting procedure for positive $\rho \tilde{c}^2$.} \label{alg:flux_limit_sound} \end{algorithm} \subsection{Extension to strong stability preserving Runge--Kutta time stepping scheme} The extension of positivity- and boundedness-preserving limiters for high-order flux with the high-order strong stability preserving Runge--Kutta (SSPRK) time stepping methods~\cite{shu1988total,gottlieb2009high,gottlieb2001strong} is trivial since SSPRK time stepping schemes are convex combinations of Euler forward steps. However, the upper limit of CFL number is still constrained by 0.5. \section{Test problems} 1D and 2D test problems are conducted with the first order HLLC scheme and the high-order WCNS-IS with the positivity- and boundedness-preserving limiters. The two schemes are termed HLLC and PP-WCNS-IS respectively in this work. All tests involve liquid water and air as an ideal gas. The properties of the fluids are given in table~\ref{table:fluid_properties}. Note that the fluids satisfy the requirement from the positivity- and boundedness-preserving limiters as the ratio of specific heats of water is larger than that of air. The three-stage third order SSPRK scheme (TVDRK3) \cite{shu1988total} is used for time stepping for both schemes. The CFL number is chosen to be 0.5 unless constant time step size is used. When constant time step size is used, the corresponding CFL number is always less than 0.5 until the end of simulations. \begin{table}[!ht] \begin{center} \begin{tabular}{@{}c | ccc@{}}\toprule Fluid & \textnormal{Phase number} & $\gamma$ & \addstackgap{$p_{\infty}\ (\mathrm{Pa})$} \\ \midrule Liquid water & 1 & $6.12$ & $3.43\mathrm{e}{8}$ \\ Air & 2 & $1.40$ & $0$ \\ \bottomrule \end{tabular} \caption{Properties of the fluids.} \label{table:fluid_properties} \end{center} \end{table} \subsection{Convergence study} To verify the formal order of accuracy of each scheme, advection of volume fraction disturbance in a 2D periodic domain $[-1, 1) \ \mathrm{m} \times[-1, 1) \ \mathrm{m}$ is used as the test problem similar to that in~\cite{wong2017high}. The initial conditions are given by table~\ref{table:IC_2D_convergence} and the exact solutions are given by table~\ref{table:exact_2D_convergence}. \begin{table}[!ht] \begin{center} \begin{tabular}{@{}cccccc@{}}\toprule \addstackgap{\stackanchor{$\rho_1$}{$(\mathrm{kg\ m^{-3}})$}} & \stackanchor{$\rho_2$}{$(\mathrm{kg\ m^{-3}})$} & \stackanchor{$u$}{$(\mathrm{m\ s^{-1}})$} & \stackanchor{$v$}{$(\mathrm{m\ s^{-1}})$} & \stackanchor{$p$}{$(\mathrm{Pa})$} & $\alpha_1$ \\ \midrule \addstackgap{1000} & 1 & 10 & 10 & 101325 & $0.5 + 0.25 \sin \left[ \pi (x + y) \right]$ \\\bottomrule \end{tabular} \end{center} \caption{Initial conditions of 2D convergence problem.} \label{table:IC_2D_convergence} \end{table} \begin{table}[!ht] \begin{center} \begin{tabular}{@{}cccccc@{}}\toprule \addstackgap{\stackanchor{$\rho_1$}{$(\mathrm{kg\ m^{-3}})$}} & \stackanchor{$\rho_2$}{$(\mathrm{kg\ m^{-3}})$} & \stackanchor{$u$}{$(\mathrm{m\ s^{-1}})$} & \stackanchor{$v$}{$(\mathrm{m\ s^{-1}})$} & \stackanchor{$p$}{$(\mathrm{Pa})$} & $\alpha_1$ \\ \midrule \addstackgap{1000} & 1 & 10 & 10 & 101325 & $0.5 + 0.25 \sin \left[ \pi (x + y - 20t) \right]$ \\\bottomrule \end{tabular} \end{center} \caption{Exact solutions of 2D convergence problem.} \label{table:exact_2D_convergence} \end{table} \noindent Simulations using different schemes are conducted up to $t = 0.1\ \mathrm{ms}$ with mesh refinements from $N_x = N_y = 8$ to $N_x = N_y = 256$. All simulations are run with very small constant time steps in order to observe the spatial orders of accuracy of different numerical schemes. $\Delta t / \Delta x = 4.0e-5 \ \mathrm{s\ m^{-1}}$ is used. Table~\ref{table:2D_L2_error_and_rate_of_convergence_advection_volume_fraction} shows the $L_2$ errors and the computed rates of convergence of volume fraction $\alpha_1$ respectively by the two schemes at $t = 0.1\ \mathrm{ms}$. The $L_2$ error of volume fraction is computed as: \begin{align} L_2\ \mathrm{error}&= \sqrt{ \sum_{i=0}^{N-1} \sum_{j=0}^{N-1} \Delta x \Delta y \left( {\alpha_1}_{i, j} - {\alpha_1}_{i, j}^{\mathrm{exact}} \right)^2 / \sum_{i=0}^{N-1} \sum_{j=0}^{N-1} \Delta x \Delta y }, \end{align} where ${\alpha_1}_{i, j}^{\mathrm{exact}}$ is the exact solution of volume fraction at the corresponding grid point. It can be seen from the table that all schemes achieve the expected rates of convergence. \begin{table}[!ht] \centering \small \begin{tabular}{@{}c | cccc@{}}\toprule Number of & \multicolumn{2}{c}{HLLC} & \multicolumn{2}{c}{PP-WCNS-IS} \\ \cmidrule(r){2-5} grid points & error & order & error & order \\ \midrule $8^2$ & $4.283\mathrm{e}{-04}$ & & $3.136\mathrm{e}{-05}$ & \\ $16^2$ & $2.170\mathrm{e}{-04}$ & 0.98 & $1.517\mathrm{e}{-07}$ & 7.69 \\ $32^2$ & $1.089\mathrm{e}{-04}$ & 0.99 & $4.855\mathrm{e}{-09}$ & 4.97 \\ $64^2$ & $5.450\mathrm{e}{-05}$ & 1.00 & $1.679\mathrm{e}{-10}$ & 4.85 \\ $128^2$ & $2.726\mathrm{e}{-05}$ & 1.00 & $5.382\mathrm{e}{-12}$ & 4.96 \\ $256^2$ & $1.363\mathrm{e}{-05}$ & 1.00 & $1.714\mathrm{e}{-13}$ & 4.97 \\ \bottomrule \end{tabular} \caption{$L_2$ errors and orders of convergence of volume fraction for the 2D advection problem from different schemes at $t = 0.1\ \mathrm{ms}$.} \label{table:2D_L2_error_and_rate_of_convergence_advection_volume_fraction} \end{table} \subsection{One-dimensional material interface advection} The next multi-phase problem is a 1D problem with the advection of two material interfaces. The settings of this problem are similar to those in \cite{coralic2014finite,wong2017high,aslani2018localized}. The initial conditions are given by table~\ref{table:IC_1D_material_interface_advection}. Periodic conditions are applied at both boundaries. The spatial domain is $x \in \left[0, 1 \right) \ \mathrm{m}$ and the final time is at $t = 0.01 \ \mathrm{s}$. Simulations are evolved with constant time steps $\Delta t = 1.25\mathrm{e}{-6} \ \mathrm{s}$ on a uniform grid with 200 grid points where $\Delta x = 0.005 \ \mathrm{m}$. The two material interfaces have exactly advected one period at the end of the simulations. \begin{table}[!ht] \begin{center} \begin{tabular}{@{}c | ccccc@{}}\toprule & \addstackgap{\stackanchor{$\alpha_1 \rho_1$}{$(\mathrm{kg\ m^{-3}})$}} & \stackanchor{$\alpha_2 \rho_2$}{$(\mathrm{kg\ m^{-3}})$} & \stackanchor{$u$}{$(\mathrm{m\ s^{-1}})$} & \stackanchor{$p$}{$(\mathrm{Pa})$} & $\alpha_1$ \\ \midrule \addstackgap{$0.25 \leq x < 0.75$} & 1000 & $1.0\mathrm{e}{-8}$ & 100 & 101325 & $1 - 1.0\mathrm{e}{-8}$ \\ \addstackgap{otherwise} & $1.0\mathrm{e}{-8}$ & 1.204 & 100 & 101325 & $1.0\mathrm{e}{-8}$ \\ \bottomrule \end{tabular} \end{center} \caption{Initial conditions of 1D material interface advection problem.} \label{table:IC_1D_material_interface_advection} \end{table} The density fields obtained with the two schemes at the final simulation time are compared with the exact solution in figure~\ref{fig:compare_material_interface_advection_rho}. It can be seen that the high-order PP-WCNS-IS can capture the material interfaces with much smaller numerical widths compared to the first order HLLC scheme and no spurious oscillations are observed at the two material interfaces for PP-WCNS-IS. Both the velocity and pressure fields are uniform and constant in this advection problem. In figure~\ref{fig:compare_material_interface_advection_error}, it can be seen that the relative errors in velocity and pressure fields for both schemes are insignificantly small and the uniform and constant fields are maintained well over time. \begin{figure}[!ht] \centering \subfigure[Global density profile]{% \includegraphics[width=0.48\textwidth]{./images/tests/1D_material_interface_advection/material_advection_density_global_N200.pdf} \label{fig:compare_material_interface_advection_rho_global}} \subfigure[Local density profile]{% \includegraphics[width=0.48\textwidth]{./images/tests/1D_material_interface_advection/material_advection_density_local_N200.pdf} \label{fig:compare_material_interface_advection_rho_local}} \caption{Material interface advection problem at $t = 0.01 \ \mathrm{s}$ using different schemes. Black solid line: exact; red circles: HLLC; blue squares: PP-WCNS-IS.} \label{fig:compare_material_interface_advection_rho} \end{figure} \begin{figure}[!ht] \centering \subfigure[Velocity]{% \includegraphics[width=0.48\textwidth]{./images/tests/1D_material_interface_advection/material_advection_velocity_relative_error_global_N200.pdf} \label{fig:compare_material_interface_advection_u_global}} \subfigure[Pressure]{% \includegraphics[width=0.48\textwidth]{./images/tests/1D_material_interface_advection/material_advection_pressure_relative_error_global_N200.pdf} \label{fig:compare_material_interface_advection_p_global}} \caption{Relative errors for the material interface advection problem at $t = 0.01 \ \mathrm{s}$ using different schemes. Red circles: HLLC; blue squares: PP-WCNS-IS.} \label{fig:compare_material_interface_advection_error} \end{figure} \subsection{One-dimensional gas/liquid Sod shock tube problem} This gas/liquid shock tube problem is taken from~\citet{chen2008flow} and \citet{wang2018incremental}. The initial conditions are given by table~\ref{table:IC_1D_gas_liquid_Sod_shock_tube_problem}. Extrapolations are applied at both boundaries. The spatial domain is $x \in \left[0, 1.5 \right] \ \mathrm{m}$ and the final time is at $t = 3\mathrm{e}{-4} \ \mathrm{s}$. Simulations are evolved with constant time steps $\Delta t = 1.25\mathrm{e}{-6} \ \mathrm{s}$ on a uniform grid with 200 grid points. The reference solutions are obtained using PP-WCNS-IS with 4000 grid points. \begin{table}[!ht] \begin{center} \begin{tabular}{@{}c | ccccc@{}}\toprule & \addstackgap{\stackanchor{$\alpha_1 \rho_1$}{$(\mathrm{kg\ m^{-3}})$}} & \stackanchor{$\alpha_2 \rho_2$}{$(\mathrm{kg\ m^{-3}})$} & \stackanchor{$u$}{$(\mathrm{m\ s^{-1}})$} & \stackanchor{$p$}{$(\mathrm{Pa})$} & $\alpha_1$ \\ \midrule \addstackgap{$x < 0.8$} & 1000 & $1.0\mathrm{e}{-8}$ & 0 & $1.0\mathrm{e}{9}$ & $1 - 1.0\mathrm{e}{-8}$ \\ \addstackgap{$x \geq 0.8$} & $1.0\mathrm{e}{-8}$ & 20 & 0 & $1.0\mathrm{e}{5}$ & $1.0\mathrm{e}{-8}$ \\ \bottomrule \end{tabular} \end{center} \caption{Initial conditions of 1D gas/liquid Sod shock tube problem.} \label{table:IC_1D_gas_liquid_Sod_shock_tube_problem} \end{table} Figures~\ref{fig:compare_gas_liquid_Sod} and \ref{fig:compare_gas_liquid_Sod_p} compare the numerical solutions from the two schemes with the reference solutions. In figure~\ref{fig:compare_gas_liquid_Sod_rho_global}, it can be seen that PP-WCNS-IS can capture both the material interface (the left larger density jump) and the shock (the right smaller density jump) with only a few grid points. On the other hand, the first order HLLC scheme is too dissipative that both the material interface and shock are smeared out severely, and hence the two discontinuities cannot be distinguished at this grid resolution. In figures~\ref{fig:compare_gas_liquid_Sod_u_global} and \ref{fig:compare_gas_liquid_Sod_p_global}, it can be seen that PP-WCNS-IS can give more accurate solutions in velocity and pressure fields compared to first order HLLC scheme. However, as seen in figure~\ref{fig:compare_gas_liquid_Sod_p_local}, PP-WCNS-IS produces a slightly larger undershoot and overshoot at the expansion fan. \begin{figure}[!ht] \centering \subfigure[Global density profile]{% \includegraphics[width=0.45\textwidth]{./images/tests/1D_gas_liquid_Sod/gas_liquid_Sod_density_global_N200.pdf} \label{fig:compare_gas_liquid_Sod_rho_global}} \subfigure[Global velocity profile]{% \includegraphics[width=0.45\textwidth]{./images/tests/1D_gas_liquid_Sod/gas_liquid_Sod_velocity_global_N200.pdf} \label{fig:compare_gas_liquid_Sod_u_global}} \caption{Gas/liquid Sod shock tube problem at $t = 3\mathrm{e}{-4} \ \mathrm{s}$ using different schemes. Black solid line: reference; red circles: HLLC; blue squares: PP-WCNS-IS.} \label{fig:compare_gas_liquid_Sod} \end{figure} \begin{figure}[!ht] \centering \subfigure[Global pressure profile]{% \includegraphics[width=0.45\textwidth]{./images/tests/1D_gas_liquid_Sod/gas_liquid_Sod_pressure_global_N200.pdf} \label{fig:compare_gas_liquid_Sod_p_global}} \subfigure[Local pressure profile]{% \includegraphics[width=0.45\textwidth]{./images/tests/1D_gas_liquid_Sod/gas_liquid_Sod_pressure_local_N200.pdf} \label{fig:compare_gas_liquid_Sod_p_local}} \caption{Gas/liquid Sod shock tube problem at $t = 3\mathrm{e}{-4} \ \mathrm{s}$ using different schemes. Black solid line: reference; red circles: HLLC; blue squares: PP-WCNS-IS.} \label{fig:compare_gas_liquid_Sod_p} \end{figure} \subsection{One-dimensional planar multi-material Sedov blast wave problem} This is a multi-material version modified from the well-known single-phase 1D planar Sedov blast wave problem~\cite{sedov1993similarity,zhang2012positivity,hu2013positivity}. Initially there is a singularity of highly pressurized air at the center of the domain filled with very low pressure water. Blast waves are created at the original position of the singularity and propagate towards the domain boundaries. The initial conditions are given by table~\ref{table:IC_1D_multmaterial_Sedov}. Extrapolations are applied at both boundaries. The spatial domain is $x \in \left[0, 4.0 \right] \ \mathrm{m}$ and the final time is at $t = 1\mathrm{e}{-3} \ \mathrm{s}$. Simulations are evolved with constant time steps $\Delta t = 2.5\mathrm{e}{-7} \ \mathrm{s}$ on a uniform grid with 401 grid points. The reference solutions are generated using PP-WCNS-IS with 4001 grid points. \begin{table}[!ht] \begin{center} \begin{tabular}{@{}c | ccccc@{}}\toprule & \addstackgap{\stackanchor{$\alpha_1 \rho_1$}{$(\mathrm{kg\ m^{-3}})$}} & \stackanchor{$\alpha_2 \rho_2$}{$(\mathrm{kg\ m^{-3}})$} & \stackanchor{$u$}{$(\mathrm{m\ s^{-1}})$} & \stackanchor{$p$}{$(\mathrm{Pa})$} & $\alpha_1$ \\ \midrule \addstackgap{\stackanchor{$x < 2 - 0.5 \Delta x$}{or $x > 2 + 0.5 \Delta x$}} & 1000 & $1.0\mathrm{e}{-8}$ & 0 & $-3.0\mathrm{e}{7}$ & $1 - 1.0\mathrm{e}{-8}$ \\ \addstackgap{otherwise} & $1.0\mathrm{e}{-8}$ & 1 & 0 & $1.28\mathrm{e}{6}/\Delta x$ & $1.0\mathrm{e}{-8}$ \\ \bottomrule \end{tabular} \end{center} \caption{Initial conditions of 1D planar multi-material Sedov blast wave problem.} \label{table:IC_1D_multmaterial_Sedov} \end{table} Figures~\ref{fig:compare_multi_material_Sedov_1D_u_global} and \ref{fig:compare_multi_material_Sedov_1D_2} show the density, velocity, pressure and volume fraction profiles respectively obtained using the two schemes at the final simulation time. It can be seen that both schemes can capture the blast waves without spurious oscillations. However, the velocity and pressure profiles computed with PP-WCNS-IS are much sharper at the shock fronts while the shocks captured with first order HLLC are severely smeared out due to excess numerical dissipation. \begin{figure}[!ht] \centering \subfigure[Global density profile]{% \includegraphics[width=0.45\textwidth]{./images/tests/1D_multi_material_Sedov/multi_material_Sedov_1D_density_global_N401.pdf} \label{fig:compare_multi_material_Sedov_1D_rho_global}} \subfigure[Global velocity profile]{% \includegraphics[width=0.45\textwidth]{./images/tests/1D_multi_material_Sedov/multi_material_Sedov_1D_velocity_global_N401.pdf} \label{fig:compare_multi_material_Sedov_1D_u_global}} \caption{1D multi-material Sedov problem at $t = 1\mathrm{e}{-3} \ \mathrm{s}$ using different schemes. Black solid line: reference; red circles: HLLC; blue squares: PP-WCNS-IS.} \label{fig:compare_multi_material_Sedov_1D_1} \end{figure} \begin{figure}[!ht] \centering \subfigure[Global pressure profile]{% \includegraphics[width=0.45\textwidth]{./images/tests/1D_multi_material_Sedov/multi_material_Sedov_1D_pressure_global_N401.pdf} \label{fig:compare_multi_material_Sedov_1D_p_global}} \subfigure[Global water volume fraction profile]{% \includegraphics[width=0.45\textwidth]{./images/tests/1D_multi_material_Sedov/multi_material_Sedov_1D_volume_fraction_water_global_N401.pdf} \label{fig:compare_multi_material_Sedov_1D_Z0_global}} \caption{1D multi-material Sedov problem at $t = 1\mathrm{e}{-3} \ \mathrm{s}$ using different schemes. Black solid line: reference; red circles: HLLC; blue squares: PP-WCNS-IS.} \label{fig:compare_multi_material_Sedov_1D_2} \end{figure} \subsection{Two-dimensional Mach 2.4 shock water cylinder interaction problem by~\citet{sembian2016plane}} The case of a Mach 2.4 planar shock interacting with a water cylinder in the paper by~\citet{sembian2016plane} is simulated. The purpose of this test case is to investigate the reliability of the flow model with the high-order diffuse interface method for simulating two-phase flows with shocks. Figure~\ref{fig:schematic_2D_Mach_2_4_shock_water_cylinder_Sembian} shows the schematic of the initial flow field and domain. The water cylinder is initially placed at location $\left[ 4\ \mathrm{cm}, 0\ \mathrm{cm} \right]$. The initial conditions are given by table~\ref{table:IC_2D_Sembian_shock_water_cylinder}. Constant extrapolation is used at all domain boundaries. The computations is performed with PP-WCNS-IS on a $3072 \times 2048$ mesh. \begin{table}[!ht] \begin{center} \begin{tabular}{@{}c | cccccc@{}}\toprule & \addstackgap{\stackanchor{$\alpha_1 \rho_1$}{$(\mathrm{kg\ m^{-3}})$}} & \stackanchor{$\alpha_2 \rho_2$}{$(\mathrm{kg\ m^{-3}})$} & \stackanchor{$u$}{$(\mathrm{m\ s^{-1}})$} & \stackanchor{$v$}{$(\mathrm{m\ s^{-1}})$} & \stackanchor{$p$}{$(\mathrm{Pa})$} & $\alpha_1$ \\ \midrule \addstackgap{pre-shock air} & $1.0\mathrm{e}{-8}$ & 1.17 & 0 & 0 & $1.01\mathrm{e}{5}$ & $1.0\mathrm{e}{-8}$ \\ \addstackgap{post-shock air} & $1.0\mathrm{e}{-8}$ & 3.7579 & 574.57 & 0 & $6.6189\mathrm{e}{5}$ & $1.0\mathrm{e}{-8}$ \\ \addstackgap{water cylinder} & 1000 & $1.0\mathrm{e}{-8}$ & 0 & 0 & $1.01\mathrm{e}{5}$ & $1 - 1.0\mathrm{e}{-8}$ \\ \bottomrule \end{tabular} \end{center} \caption{Initial conditions of 2D Mach 2.4 shock water cylinder interaction problem~\cite{sembian2016plane}.} \label{table:IC_2D_Sembian_shock_water_cylinder} \end{table} The grey schlieren images from the experiment~\cite{sembian2016plane} are shown in the left column of figure~\ref{fig:compare_2D_Mach_2_4_shock_water_cylinder_Sembian}. At the instance when the incident shock interacts with the water column, a shock is reflected upstream since the acoustic impedance of water is higher than that of air. The reflected shock interacts with the incident shock to generate a triple point where the reflected shock, incident shock and a Mach stem along with its slip line conincide. Meanwhile, there is also a shock transmitted into the water column. The transmitted shock travels faster than the shocks outside the water column and it gets reflected as an expansion wave when the transmitted shock reaches the downstream water-air interface. The reflected expansion wave focuses at a point due to the column's downstream concave geometry, where negative presure is produced due to tensile stresses. The reflected expansion wave forms a ``horse-shoe" structure after focusing and is reflected again at the upstream water-air interface. The expansion wave continues to get reflected inside the water column repeatedly. As the water column is a buff body, the surrounding air separates in the adverse pressure gradient region on the water column surface. Therefore, recirculation regions are created and two counter-rotating vortices are formed downstream of the flow. In the right column of figure~\ref{fig:compare_2D_Mach_2_4_shock_water_cylinder_Sembian}, the density gradients computed with the simulation results using the high-order PP-WCNS-IS scheme at different times are displayed. Compared with the schlieren images from the experiment, it can be seen that most of the wave features, such as the incident, reflected and transmitted shocks, and expansion waves are captured accurately. Also, the two counter-rotating vortices are reproduced in the simulation. \begin{figure}[hbt] \centering \begin{tikzpicture}[thick,scale=0.8, every node/.style={transform shape}] \useasboundingbox (0cm,-1cm) rectangle (8cm,7cm); \draw[black] (-0.5cm,0.0cm) rectangle ++(9cm,6cm); \draw[black] ( 3.4cm,2.9cm) circle (1.2cm); \draw[black, thick] ( 2.2cm,0.0cm) -- (2.2cm,6cm); \node[text width=3cm] at (1.3cm,4.75cm) {Post-shock air}; \node[text width=3cm] at (4.5cm,4.75cm) {Pre-shock air}; \node[text width=3cm] at (4.5cm,3.3cm) {Water}; \draw[{Straight Barb[angle'=60,scale=3]}-{Straight Barb[angle'=60,scale=3]}] ( 7.0cm,0.0cm) -- (7.0cm,6cm); \draw[{Straight Barb[angle'=60,scale=3]}-{Straight Barb[angle'=60,scale=3]}] (-0.5cm,6.5cm) -- (8.5cm,6.5cm); \draw[{Straight Barb[angle'=60,scale=3]}-{Straight Barb[angle'=60,scale=3]}] ( 2.2cm,3.0cm) -- (4.6cm,3.0cm); \node[text width=3cm] at (5.2cm,6.8cm) {$11.1\ \mathrm{cm}$}; \node[text width=3cm] at (8.7cm,3.0cm) {$7.4\ \mathrm{cm}$}; \node[text width=3cm] at (4.5cm,2.7cm) {$2.2\ \mathrm{cm}$}; \draw[-{Straight Barb[angle'=60,scale=3]}] (-0.5cm,-0.5cm) -- (1.0cm,-0.5cm); \node[text width=3cm] at (2.6cm,-0.6cm) {$x$}; \draw[black] (-0.5cm,-0.75cm) -- (-0.5cm,-0.25cm); \draw[-{Straight Barb[angle'=60,scale=3]}] (-1.0cm,3.0cm) -- (-1.0cm,4.5cm); \node[text width=1cm] at (-0.5cm,4.75cm) {$y$}; \draw[black] (-1.25cm,3.0cm) -- (-0.75cm,3.0cm); \end{tikzpicture} \caption{Schematic diagram of 2D Mach 2.4 shock water cylinder interaction problem by~\citet{sembian2016plane}.} \label{fig:schematic_2D_Mach_2_4_shock_water_cylinder_Sembian} \end{figure} \begin{figure}[!ht] \centering \vspace{-1cm} \subfigure[Experiment]{% \includegraphics[trim=0 -1.5cm 0 0,width=0.27\textwidth]{./images/tests/2D_shock_water_cylinder_interaction_Sembian/Sembian_Fig_6b.png} \label{fig:compare_2D_Mach_2_4_shock_water_cylinder_Sembian_t1_experiment}} \subfigure[$t = 4\ \mu\mathrm{s}$, PP-WCNS-IS]{% \includegraphics[width=0.46\textwidth]{./images/tests/2D_shock_water_cylinder_interaction_Sembian/plot_2D_SWDI_3072x2048_WCNS5-IS-PP_density_gradient_t1.png} \label{fig:compare_2D_Mach_2_4_shock_water_cylinder_Sembian_t1_WCNS5_IS_PP}} \newline \subfigure[Experiment]{% \includegraphics[trim=0 -1.5cm 0 0,width=0.27\textwidth]{./images/tests/2D_shock_water_cylinder_interaction_Sembian/Sembian_Fig_6f.png} \label{fig:compare_2D_Mach_2_4_shock_water_cylinder_Sembian_t2_experiment}} \subfigure[$t = 17\ \mu\mathrm{s}$, PP-WCNS-IS]{% \includegraphics[width=0.46\textwidth]{./images/tests/2D_shock_water_cylinder_interaction_Sembian/plot_2D_SWDI_3072x2048_WCNS5-IS-PP_density_gradient_t2.png} \label{fig:compare_2D_Mach_2_4_shock_water_cylinder_Sembian_t2_WCNS5_IS_PP}} \newline \subfigure[Experiment]{% \includegraphics[trim=0 -1.5cm 0 0,width=0.27\textwidth]{./images/tests/2D_shock_water_cylinder_interaction_Sembian/Sembian_Fig_7d.png} \label{fig:compare_2D_Mach_2_4_shock_water_cylinder_Sembian_t3_experiment}} \subfigure[$t = 40\ \mu\mathrm{s}$, PP-WCNS-IS]{% \includegraphics[width=0.46\textwidth]{./images/tests/2D_shock_water_cylinder_interaction_Sembian/plot_2D_SWDI_3072x2048_WCNS5-IS-PP_density_gradient_t3.png} \label{fig:compare_2D_Mach_2_4_shock_water_cylinder_Sembian_t3_WCNS5_IS_PP}} \newline \subfigure[Experiment]{% \includegraphics[trim=0 -1.5cm 0 0,width=0.27\textwidth]{./images/tests/2D_shock_water_cylinder_interaction_Sembian/Sembian_Fig_7f.png} \label{fig:compare_2D_Mach_2_4_shock_water_cylinder_Sembian_t4_experiment}} \subfigure[$t = 67\ \mu\mathrm{s}$, PP-WCNS-IS]{% \includegraphics[width=0.46\textwidth]{./images/tests/2D_shock_water_cylinder_interaction_Sembian/plot_2D_SWDI_3072x2048_WCNS5-IS-PP_density_gradient_t4.png} \label{fig:compare_2D_Mach_2_4_shock_water_cylinder_Sembian_t4_WCNS5_IS_PP}} \newline \caption{Comparision of 2D Mach 2.4 shock water cylinder interaction problem by~\citet{sembian2016plane}. Left: shadowgraph images from~\cite{sembian2016plane}; right: density gradient from simulation with PP-WCNS-IS.} \label{fig:compare_2D_Mach_2_4_shock_water_cylinder_Sembian} \end{figure} \subsection{Two-dimensional Mach 10 shock water cylinder interaction problem} This is the more extreme case of the previous test case. In this problem, a Mach 10 shock wave in air interacts with a water cylinder with diameter of $8L$ in a domain of $\left[ 0, 30L \right] \times \left[ -10L, 10L \right]$, where $L = 1\ \mathrm{mm}$ is chosen. Figure~\ref{fig:schematic_2D_Mach_10_shock_water_cylinder} shows the schematic of the initial flow field and domain. The water cylinder is initially placed at location $\left[ 13L, 0 \right]$. The initial conditions are given by table~\ref{table:IC_2D_Mach_10_shock_water_cylinder}. Constant extraploation is used at all domain boundaries. All computations are performed on a $1152 \times 768$ mesh. \begin{table}[!ht] \begin{center} \begin{tabular}{@{}c | cccccc@{}}\toprule & \addstackgap{\stackanchor{$\alpha_1 \rho_1$}{$(\mathrm{kg\ m^{-3}})$}} & \stackanchor{$\alpha_2 \rho_2$}{$(\mathrm{kg\ m^{-3}})$} & \stackanchor{$u$}{$(\mathrm{m\ s^{-1}})$} & \stackanchor{$v$}{$(\mathrm{m\ s^{-1}})$} & \stackanchor{$p$}{$(\mathrm{Pa})$} & $\alpha_1$ \\ \midrule \addstackgap{pre-shock air} & $1.0\mathrm{e}{-8}$ & 1.2 & 0 & 0 & $1.0\mathrm{e}{5}$ & $1.0\mathrm{e}{-8}$ \\ \addstackgap{post-shock air} & $1.0\mathrm{e}{-8}$ & 6.8571 & $2.8179\mathrm{e}{3}$ & 0 & $1.165\mathrm{e}{7}$ & $1.0\mathrm{e}{-8}$ \\ \addstackgap{water cylinder} & 1000 & $1.0\mathrm{e}{-8}$ & 0 & 0 & $1.0\mathrm{e}{5}$ & $1 - 1.0\mathrm{e}{-8}$ \\ \bottomrule \end{tabular} \end{center} \caption{Initial conditions of 2D Mach 10 shock water cylinder interaction problem.} \label{table:IC_2D_Mach_10_shock_water_cylinder} \end{table} This is a very extreme problem due to the high incident shock Mach number initially. The problem is simulated with the first order HLLC and the high-order PP-WCNS-IS. While the first order scheme has no numerical difficulty in this test case, numerical failure is experienced with WCNS-IS without the positivity- and boundedness-preserving limiters as the speed of sound becomes imaginary. This can happen at the strong incident shock, or at the low pressure regions created by the expansion waves inside the water column and at the counter-rotating vortices. The positivity- and boundedness-preserving limiters are necessary for the WCNS-IS scheme in this problem. Figure~\ref{fig:compare_2D_Mach_10_shock_water_cylinder_schl} shows the comparison of numerical schlieren defined as $\exp{\left( \left| \nabla \rho \right| / \left| \nabla \rho \right|_{\mathrm{max}} \right)}$ between the two schemes. From the figure, we can see that the PP-WCNS-IS has much thinner interface thickness over time compared with first order HLLC scheme and this is consistent with other test problems. Vortical features produced by the hydrodynamic instability due to baroclinic torque are observed at the interface for PP-WCNS-IS as time evolves. However, the first order scheme is too dissipative to produce the roll-up of the interfaces at the chosen grid resolution. The comparison of speed of sound between the two schemes can be seen in figure~\ref{fig:compare_2D_Mach_10_shock_water_cylinder_sos}. Finally, the volume fraction fields of both schemes are shown in figure~\ref{fig:compare_2D_Mach_10_shock_water_cylinder_alpha0}. It should be noted that the volume fraction field is also verified to be always bounded by the corresponding threshold chosen in the positivity- and boundedness-preserving limiters for PP-WCNS-IS. \begin{figure}[hbt] \centering \begin{tikzpicture}[thick,scale=0.8, every node/.style={transform shape}] \useasboundingbox (0cm,-1cm) rectangle (8cm,7cm); \draw[black] (-0.5cm,0.0cm) rectangle ++(9cm,6cm); \draw[black] ( 3.4cm,2.9cm) circle (1.2cm); \draw[black, thick] ( 2.2cm,0.0cm) -- (2.2cm,6cm); \node[text width=3cm] at (1.3cm,4.75cm) {Post-shock air}; \node[text width=3cm] at (4.5cm,4.75cm) {Pre-shock air}; \node[text width=3cm] at (4.5cm,3.3cm) {Water}; \draw[{Straight Barb[angle'=60,scale=3]}-{Straight Barb[angle'=60,scale=3]}] ( 7.5cm,0.0cm) -- (7.5cm,6cm); \draw[{Straight Barb[angle'=60,scale=3]}-{Straight Barb[angle'=60,scale=3]}] (-0.5cm,6.5cm) -- (8.5cm,6.5cm); \draw[{Straight Barb[angle'=60,scale=3]}-{Straight Barb[angle'=60,scale=3]}] ( 2.2cm,3.0cm) -- (4.6cm,3.0cm); \node[text width=3cm] at (5.2cm,6.8cm) {$30L$}; \node[text width=3cm] at (9.2cm,3.0cm) {$20L$}; \node[text width=3cm] at (4.7cm,2.7cm) {$8L$}; \draw[-{Straight Barb[angle'=60,scale=3]}] (-0.5cm,-0.5cm) -- (1.0cm,-0.5cm); \node[text width=3cm] at (2.6cm,-0.6cm) {$x$}; \draw[black] (-0.5cm,-0.75cm) -- (-0.5cm,-0.25cm); \draw[-{Straight Barb[angle'=60,scale=3]}] (-1.0cm,3.0cm) -- (-1.0cm,4.5cm); \node[text width=1cm] at (-0.5cm,4.75cm) {$y$}; \draw[black] (-1.25cm,3.0cm) -- (-0.75cm,3.0cm); \end{tikzpicture} \caption{Schematic diagram of 2D Mach 10 shock water cylinder interaction problem.} \label{fig:schematic_2D_Mach_10_shock_water_cylinder} \end{figure} \begin{figure}[!ht] \centering \subfigure[$t = 1\ \mu\mathrm{s}$, HLLC]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_10_shock_water_cylinder_interaction/plot_2D_SWDI_1152x768_HLLC_schl_t1.png} \label{fig:compare_2D_Mach_10_shock_water_cylinder_schl_t1_HLLC}} \subfigure[$t = 1\ \mu\mathrm{s}$, PP-WCNS-IS]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_10_shock_water_cylinder_interaction/plot_2D_SWDI_1152x768_WCNS5-IS-PP_schl_t1.png} \label{fig:compare_2D_Mach_10_shock_water_cylinder_schl_t1_WCNS5_IS_PP}} \subfigure[$t = 4\ \mu\mathrm{s}$, HLLC]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_10_shock_water_cylinder_interaction/plot_2D_SWDI_1152x768_HLLC_schl_t2.png} \label{fig:compare_2D_Mach_10_shock_water_cylinder_schl_t2_HLLC}} \subfigure[$t = 4\ \mu\mathrm{s}$, PP-WCNS-IS]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_10_shock_water_cylinder_interaction/plot_2D_SWDI_1152x768_WCNS5-IS-PP_schl_t2.png} \label{fig:compare_2D_Mach_10_shock_water_cylinder_schl_t2_WCNS5_IS_PP}} \subfigure[$t = 8\ \mu\mathrm{s}$, HLLC]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_10_shock_water_cylinder_interaction/plot_2D_SWDI_1152x768_HLLC_schl_t3.png} \label{fig:compare_2D_Mach_10_shock_water_cylinder_schl_t3_HLLC}} \subfigure[$t = 8\ \mu\mathrm{s}$, PP-WCNS-IS]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_10_shock_water_cylinder_interaction/plot_2D_SWDI_1152x768_WCNS5-IS-PP_schl_t3.png} \label{fig:compare_2D_Mach_10_shock_water_cylinder_schl_t3_WCNS5_IS_PP}} \subfigure[$t = 16\ \mu\mathrm{s}$, HLLC]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_10_shock_water_cylinder_interaction/plot_2D_SWDI_1152x768_HLLC_schl_t4.png} \label{fig:compare_2D_Mach_10_shock_water_cylinder_schl_t4}} \subfigure[$t = 16\ \mu\mathrm{s}$, PP-WCNS-IS]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_10_shock_water_cylinder_interaction/plot_2D_SWDI_1152x768_WCNS5-IS-PP_schl_t4.png} \label{fig:compare_2D_Mach_10_shock_water_cylinder_schl_t4_WCNS5_IS_PP}} \caption{Numerical schlieren ($\exp{\left( \left| \nabla \rho \right| / \left| \nabla \rho \right|_{\mathrm{max}} \right)}$) of 2D Mach 10 shock water cylinder interaction problem.} \label{fig:compare_2D_Mach_10_shock_water_cylinder_schl} \end{figure} \begin{figure}[!ht] \centering \subfigure[$t = 1\ \mu\mathrm{s}$, HLLC]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_10_shock_water_cylinder_interaction/plot_2D_SWDI_1152x768_HLLC_sos_t1.png} \label{fig:compare_2D_Mach_10_shock_water_cylinder_sos_t1_HLLC}} \subfigure[$t = 1\ \mu\mathrm{s}$, PP-WCNS-IS]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_10_shock_water_cylinder_interaction/plot_2D_SWDI_1152x768_WCNS5-IS-PP_sos_t1.png} \label{fig:compare_2D_Mach_10_shock_water_cylinder_sos_t1_WCNS5_IS_PP}} \subfigure[$t = 4\ \mu\mathrm{s}$, HLLC]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_10_shock_water_cylinder_interaction/plot_2D_SWDI_1152x768_HLLC_sos_t2.png} \label{fig:compare_2D_Mach_10_shock_water_cylinder_sos_t2_HLLC}} \subfigure[$t = 4\ \mu\mathrm{s}$, PP-WCNS-IS]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_10_shock_water_cylinder_interaction/plot_2D_SWDI_1152x768_WCNS5-IS-PP_sos_t2.png} \label{fig:compare_2D_Mach_10_shock_water_cylinder_sos_t2_WCNS5_IS_PP}} \subfigure[$t = 8\ \mu\mathrm{s}$, HLLC]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_10_shock_water_cylinder_interaction/plot_2D_SWDI_1152x768_HLLC_sos_t3.png} \label{fig:compare_2D_Mach_10_shock_water_cylinder_sos_t3_HLLC}} \subfigure[$t = 8\ \mu\mathrm{s}$, PP-WCNS-IS]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_10_shock_water_cylinder_interaction/plot_2D_SWDI_1152x768_WCNS5-IS-PP_sos_t3.png} \label{fig:compare_2D_Mach_10_shock_water_cylinder_sos_t3_WCNS5_IS_PP}} \subfigure[$t = 16\ \mu\mathrm{s}$, HLLC]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_10_shock_water_cylinder_interaction/plot_2D_SWDI_1152x768_HLLC_sos_t4.png} \label{fig:compare_2D_Mach_10_shock_water_cylinder_sos_t4_HLLC}} \subfigure[$t = 16\ \mu\mathrm{s}$, PP-WCNS-IS]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_10_shock_water_cylinder_interaction/plot_2D_SWDI_1152x768_WCNS5-IS-PP_sos_t4.png} \label{fig:compare_2D_Mach_10_shock_water_cylinder_sos_t4_WCNS5_IS_PP}} \caption{Speed of sound of 2D Mach 10 shock water cylinder interaction problem.} \label{fig:compare_2D_Mach_10_shock_water_cylinder_sos} \end{figure} \begin{figure}[!ht] \centering \subfigure[$t = 1\ \mu\mathrm{s}$, HLLC]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_10_shock_water_cylinder_interaction/plot_2D_SWDI_1152x768_HLLC_Z0_t1.png} \label{fig:compare_2D_Mach_10_shock_water_cylinder_alpha0_t1_HLLC}} \subfigure[$t = 1\ \mu\mathrm{s}$, PP-WCNS-IS]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_10_shock_water_cylinder_interaction/plot_2D_SWDI_1152x768_WCNS5-IS-PP_Z0_t1.png} \label{fig:compare_2D_Mach_10_shock_water_cylinder_alpha0_t1_WCNS5_IS_PP}} \subfigure[$t = 4\ \mu\mathrm{s}$, HLLC]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_10_shock_water_cylinder_interaction/plot_2D_SWDI_1152x768_HLLC_Z0_t2.png} \label{fig:compare_2D_Mach_10_shock_water_cylinder_alpha0_t2_HLLC}} \subfigure[$t = 4\ \mu\mathrm{s}$, PP-WCNS-IS]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_10_shock_water_cylinder_interaction/plot_2D_SWDI_1152x768_WCNS5-IS-PP_Z0_t2.png} \label{fig:compare_2D_Mach_10_shock_water_cylinder_alpha0_t2_WCNS5_IS_PP}} \subfigure[$t = 8\ \mu\mathrm{s}$, HLLC]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_10_shock_water_cylinder_interaction/plot_2D_SWDI_1152x768_HLLC_Z0_t3.png} \label{fig:compare_2D_Mach_10_shock_water_cylinder_alpha0_t3_HLLC}} \subfigure[$t = 8\ \mu\mathrm{s}$, PP-WCNS-IS]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_10_shock_water_cylinder_interaction/plot_2D_SWDI_1152x768_WCNS5-IS-PP_Z0_t3.png} \label{fig:compare_2D_Mach_10_shock_water_cylinder_alpha0_t3_WCNS5_IS_PP}} \subfigure[$t = 16\ \mu\mathrm{s}$, HLLC]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_10_shock_water_cylinder_interaction/plot_2D_SWDI_1152x768_HLLC_Z0_t4.png} \label{fig:compare_2D_Mach_10_shock_water_cylinder_alpha0_t4_HLLC}} \subfigure[$t = 16\ \mu\mathrm{s}$, PP-WCNS-IS]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_10_shock_water_cylinder_interaction/plot_2D_SWDI_1152x768_WCNS5-IS-PP_Z0_t4.png} \label{fig:compare_2D_Mach_10_shock_water_cylinder_alpha0_t4_WCNS5_IS_PP}} \caption{Volume fraction of water of 2D Mach 10 shock water cylinder interaction problem.} \label{fig:compare_2D_Mach_10_shock_water_cylinder_alpha0} \end{figure} \subsection{Two-dimensional Mach 100 water jet problem} This test case is a multi-phase version of the popular Mach 2000 jet problem first proposed by~\citet{zhang2010positivity}. In this problem, a Mach 100 water jet enters a domain full of ambient air. The domain size is $\left[ 0, L \right] \times \left[ -0.25L, 0.25L \right]$, where $L = 1\ \mathrm{m}$ is chosen. The initial conditions of the ambient air are given by table~\ref{table:IC_2D_Mach_100_water_jet}. Constant extrapolation is used at top, bottom and right boundaries. The left boundary is described by Dirichlet boundary conditions given by table~\ref{table:BC_2D_Mach_100_water_jet}. The speed of the jet is $1.5\mathrm{e}{5}\ \mathrm{m\ s^{-1}}$, which is around Mach 100 with respect to the sound speed in the water jet. The computations are performed on a $1024 \times 512$ mesh. \begin{table}[!ht] \begin{center} \begin{tabular}{@{}cccccc@{}}\toprule \addstackgap{\stackanchor{$\alpha_1 \rho_1$}{$(\mathrm{kg\ m^{-3}})$}} & \stackanchor{$\alpha_2 \rho_2$}{$(\mathrm{kg\ m^{-3}})$} & \stackanchor{$u$}{$(\mathrm{m\ s^{-1}})$} & \stackanchor{$v$}{$(\mathrm{m\ s^{-1}})$} & \stackanchor{$p$}{$(\mathrm{Pa})$} & $\alpha_1$ \\ \midrule $1.0\mathrm{e}{-8}$ & 1 & 0 & 0 & $1.0\mathrm{e}{5}$ & $1.0\mathrm{e}{-8}$ \\ \bottomrule \end{tabular} \end{center} \caption{Initial conditions of 2D Mach 100 water jet problem.} \label{table:IC_2D_Mach_100_water_jet} \end{table} \begin{table}[!ht] \begin{center} \begin{tabular}{@{}c | cccccc@{}} \toprule & \addstackgap{\stackanchor{$\alpha_1 \rho_1$}{$(\mathrm{kg\ m^{-3}})$}} & \stackanchor{$\alpha_2 \rho_2$}{$(\mathrm{kg\ m^{-3}})$} & \stackanchor{$u$}{$(\mathrm{m\ s^{-1}})$} & \stackanchor{$v$}{$(\mathrm{m\ s^{-1}})$} & \stackanchor{$p$}{$(\mathrm{Pa})$} & $\alpha_1$ \\ \midrule \addstackgap{$y \in \left[ -0.05L, 0.05L \right]$} & 1000 & $1.0\mathrm{e}{-8}$ & $1.5\mathrm{e}{5}$ & 0 & $1.0\mathrm{e}{5}$ & $1 - 1.0\mathrm{e}{-8}$ \\ \addstackgap{otherwise} & $1.0\mathrm{e}{-8}$ & 1 & 0 & 0 & $1.0\mathrm{e}{5}$ & $1.0\mathrm{e}{-8}$ \\ \bottomrule \end{tabular} \end{center} \caption{Left boundary conditions of 2D Mach 100 water jet problem.} \label{table:BC_2D_Mach_100_water_jet} \end{table} The comparison of speed of sound between the two schemes is shown in figure~\ref{fig:compare_2D_Mach_100_water_jet_sos}. Despite the large jump in sound speed across the bow shock ahead of the high speed water jet, none of the schemes fail due to the positivity-preserving properties of both schemes for sound speed. The main difference between the two schemes is at the water jet front where the interface at the water jet front produced by first order HLLC scheme is heavily smeared out while that of PP-WCNS-IS is reasonably captured with only a few grid points. There are also some small but obvious numerical artificts at the bow shock in the solutions computed with the first order scheme. In figure~\ref{fig:compare_2D_Mach_100_water_jet_schl}, the numerical schilren between the two schemes are compared. Since the interface water jet front is seriously diffused, the shape of the water-air interface at the water front cannot be visualized at all. Figure~\ref{fig:compare_2D_Mach_100_water_jet_alpha0} compares the volume fraction field of water at different times. The volume fraction field is verified to be bounded in PP-WCNS-IS. Similar to other fields, volume fraction interface at the water jet front is very diffused for the first order scheme compared to the high-order PP-WCNS-IS. \begin{figure}[!ht] \centering \subfigure[$t = 1\ \mu\mathrm{s}$, HLLC]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_100_water_jet/plot_2D_Mach_100_water_jet_1024x512_HLLC_sos_t1.png} \label{fig:compare_2D_Mach_100_water_jet_sos_t1_HLLC}} \subfigure[$t = 1\ \mu\mathrm{s}$, PP-WCNS-IS]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_100_water_jet/plot_2D_Mach_100_water_jet_1024x512_WCNS5-IS-PP_sos_t1.png} \label{fig:compare_2D_Mach_100_water_jet_sos_t1_WCNS5_IS_PP}} \subfigure[$t = 2\ \mu\mathrm{s}$, HLLC]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_100_water_jet/plot_2D_Mach_100_water_jet_1024x512_HLLC_sos_t2.png} \label{fig:compare_2D_Mach_100_water_jet_sos_t2_HLLC}} \subfigure[$t = 2\ \mu\mathrm{s}$, PP-WCNS-IS]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_100_water_jet/plot_2D_Mach_100_water_jet_1024x512_WCNS5-IS-PP_sos_t2.png} \label{fig:compare_2D_Mach_100_water_jet_sos_t2_WCNS5_IS_PP}} \subfigure[$t = 4\ \mu\mathrm{s}$, HLLC]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_100_water_jet/plot_2D_Mach_100_water_jet_1024x512_HLLC_sos_t3.png} \label{fig:compare_2D_Mach_100_water_jet_sos_t3_HLLC}} \subfigure[$t = 4\ \mu\mathrm{s}$, PP-WCNS-IS]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_100_water_jet/plot_2D_Mach_100_water_jet_1024x512_WCNS5-IS-PP_sos_t3.png} \label{fig:compare_2D_Mach_100_water_jet_sos_t3_WCNS5_IS_PP}} \subfigure[$t = 6\ \mu\mathrm{s}$, HLLC]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_100_water_jet/plot_2D_Mach_100_water_jet_1024x512_HLLC_sos_t4.png} \label{fig:compare_2D_Mach_100_water_jet_sos_t4_HLLC}} \subfigure[$t = 6\ \mu\mathrm{s}$, PP-WCNS-IS]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_100_water_jet/plot_2D_Mach_100_water_jet_1024x512_WCNS5-IS-PP_sos_t4.png} \label{fig:compare_2D_Mach_100_water_jet_sos_t4_WCNS5_IS_PP}} \caption{Speed of sound of 2D Mach 100 water jet problem.} \label{fig:compare_2D_Mach_100_water_jet_sos} \end{figure} \begin{figure}[!ht] \centering \subfigure[$t = 1\ \mu\mathrm{s}$, HLLC]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_100_water_jet/plot_2D_Mach_100_water_jet_1024x512_HLLC_schl_t1.png} \label{fig:compare_2D_Mach_100_water_jet_schl_t1_HLLC}} \subfigure[$t = 1\ \mu\mathrm{s}$, PP-WCNS-IS]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_100_water_jet/plot_2D_Mach_100_water_jet_1024x512_WCNS5-IS-PP_schl_t1.png} \label{fig:compare_2D_Mach_100_water_jet_schl_t1_WCNS5_IS_PP}} \subfigure[$t = 2\ \mu\mathrm{s}$, HLLC]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_100_water_jet/plot_2D_Mach_100_water_jet_1024x512_HLLC_schl_t2.png} \label{fig:compare_2D_Mach_100_water_jet_schl_t2_HLLC}} \subfigure[$t = 2\ \mu\mathrm{s}$, PP-WCNS-IS]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_100_water_jet/plot_2D_Mach_100_water_jet_1024x512_WCNS5-IS-PP_schl_t2.png} \label{fig:compare_2D_Mach_100_water_jet_schl_t2_WCNS5_IS_PP}} \subfigure[$t = 4\ \mu\mathrm{s}$, HLLC]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_100_water_jet/plot_2D_Mach_100_water_jet_1024x512_HLLC_schl_t3.png} \label{fig:compare_2D_Mach_100_water_jet_schl_t3_HLLC}} \subfigure[$t = 4\ \mu\mathrm{s}$, PP-WCNS-IS]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_100_water_jet/plot_2D_Mach_100_water_jet_1024x512_WCNS5-IS-PP_schl_t3.png} \label{fig:compare_2D_Mach_100_water_jet_schl_t3_WCNS5_IS_PP}} \subfigure[$t = 6\ \mu\mathrm{s}$, HLLC]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_100_water_jet/plot_2D_Mach_100_water_jet_1024x512_HLLC_schl_t4.png} \label{fig:compare_2D_Mach_100_water_jet_schl_t4}} \subfigure[$t = 6\ \mu\mathrm{s}$, PP-WCNS-IS]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_100_water_jet/plot_2D_Mach_100_water_jet_1024x512_WCNS5-IS-PP_schl_t4.png} \label{fig:compare_2D_Mach_100_water_jet_schl_t4_WCNS5_IS_PP}} \caption{Numerical schlieren ($\exp{\left( \left| \nabla \rho \right| / \left| \nabla \rho \right|_{\mathrm{max}} \right)}$) of 2D Mach 100 water jet problem.} \label{fig:compare_2D_Mach_100_water_jet_schl} \end{figure} \begin{figure}[!ht] \centering \subfigure[$t = 1\ \mu\mathrm{s}$, HLLC]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_100_water_jet/plot_2D_Mach_100_water_jet_1024x512_HLLC_Z0_t1.png} \label{fig:compare_2D_Mach_100_water_jet_alpha0_t1_HLLC}} \subfigure[$t = 1\ \mu\mathrm{s}$, PP-WCNS-IS]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_100_water_jet/plot_2D_Mach_100_water_jet_1024x512_WCNS5-IS-PP_Z0_t1.png} \label{fig:compare_2D_Mach_100_water_jet_alpha0_t1_WCNS5_IS_PP}} \subfigure[$t = 2\ \mu\mathrm{s}$, HLLC]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_100_water_jet/plot_2D_Mach_100_water_jet_1024x512_HLLC_Z0_t2.png} \label{fig:compare_2D_Mach_100_water_jet_alpha0_t2_HLLC}} \subfigure[$t = 2\ \mu\mathrm{s}$, PP-WCNS-IS]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_100_water_jet/plot_2D_Mach_100_water_jet_1024x512_WCNS5-IS-PP_Z0_t2.png} \label{fig:compare_2D_Mach_100_water_jet_alpha0_t2_WCNS5_IS_PP}} \subfigure[$t = 4\ \mu\mathrm{s}$, HLLC]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_100_water_jet/plot_2D_Mach_100_water_jet_1024x512_HLLC_Z0_t3.png} \label{fig:compare_2D_Mach_100_water_jet_alpha0_t3_HLLC}} \subfigure[$t = 4\ \mu\mathrm{s}$, PP-WCNS-IS]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_100_water_jet/plot_2D_Mach_100_water_jet_1024x512_WCNS5-IS-PP_Z0_t3.png} \label{fig:compare_2D_Mach_100_water_jet_alpha0_t3_WCNS5_IS_PP}} \subfigure[$t = 6\ \mu\mathrm{s}$, HLLC]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_100_water_jet/plot_2D_Mach_100_water_jet_1024x512_HLLC_Z0_t4.png} \label{fig:compare_2D_Mach_100_water_jet_alpha0_t4_HLLC}} \subfigure[$t = 6\ \mu\mathrm{s}$, PP-WCNS-IS]{% \includegraphics[width=0.45\textwidth]{./images/tests/2D_Mach_100_water_jet/plot_2D_Mach_100_water_jet_1024x512_WCNS5-IS-PP_Z0_t4.png} \label{fig:compare_2D_Mach_100_water_jet_alpha0_t4_WCNS5_IS_PP}} \caption{Volume fraction of water of 2D Mach 100 water jet problem.} \label{fig:compare_2D_Mach_100_water_jet_alpha0} \end{figure} \section{Concluding remarks} In this work, limiting procedures were proposed on a high-order finite difference scheme that can preserve the positivity of partial density of each phase and squared speed of sound and also the boundedness of the volume fractions in 1D and multi-dimensional gas-liquid two-phase problems under a mild assumption on the material properties of the gas and liquid. The procedures consist of two stages which limit the WENO interpolation and flux reconstruction respectively in the high-order WCNS-IS algorithm. Discrete conservation of solutions for the conservation equations in the five-equation model is still maintained even with the limiting. The overall positivity- and boundedness-preserving scheme, PP-WCNS-IS, was tested with different severe problems, under suitable CFL conditions. Comparison between the results of the first order HLLC scheme and PP-WCNS-IS showed the low dissipation and high resolution properties of the latter scheme while its robustness is also ensured. The positivity- and boundedness-preserving limiting procedures can also be potentially used with any conservative finite difference and finite volume schemes for gas-liquid two-phase flows. Future work includes generalization of the positivity- and boundedness-preserving limiters to more general equation of states and multi-phase flows with more than two species. There will also be future investigations on the use of the diffuse interface method for simulations of space vehicle launches with water-based sound suppression systems~\cite{vu2013multiphase,kiris2016computational}. \section{Acknowledgments} \noindent This work was partially supported by the NASA Exploration Ground Systems (EGS) program and the NASA Engineering and Safety Center (NESC). Computer time has been provided by the NASA Advanced Supercomputing (NAS) facility at NASA Ames Research Center. We also gratefully acknowledge Dr. Bruce T. Vu, Dr. Jeffrey A. Housman and Dr. Oliver M. Browne for valuable discussions.
\section{Introduction} Large digital repositories of research papers and associated materials are ubiquitous and used on almost a day-to-day basis by many researchers \cite{berry1996digital} \cite{zha2015comparing}. These repositories combine accessibility of information and technology to enable users to instantly and conveniently search and access resources from diverse collections as described by Cherukodan \cite{cherukodan2013using}. As a result, these digital repositories are commonly used by researchers in their standard approach towards literature discovery and to facilitate their reading strategies; however, they present challenges and issues. These repositories frequently use a keyword search to highlight resources that may be of relevance to the user; this method has been widely observed in current interfaces and broadly reported in research \cite{Acm} \cite{GoogleScholar} \cite{Watson} \cite{Springer}. A disadvantage of search methods is their reliance on the users’ expertise and previous knowledge of an area, this causes difficulties when users explore new domains as described by Kotchoubey et al. \cite{Kotchoubey2011P912CA} and Wilson et al. \cite{wilson2010keyword}, for example when they don’t know what to search for, or in the case of concept homonymy (e.g. “neural network” in biology or computer science). Moreover, in these repositories, specific fields of information are quite prominent in the search result (e.g., title and author information) \cite{Acm} \cite{Sciencedirect} \cite{GoogleScholar} \cite{Microsoftacademic}; it is, however, unlikely that, for example, a title can adequately represent the whole content of the source. These disadvantages in current repositories and search methods increase the chance of users exploring irrelevant sources, advocating for a more time-consuming and frustrating trial and error approach, and being stuck at the start of their literature surveys, a situation commonly experienced by researchers. To overcome these issues and challenges, we suggest using a top-down approach as inspired by Wilson et al. \cite{wilson2010keyword}, Padilla et al. \cite{Padilla2014hot} \cite{padilla2014british} \cite{padilla2017understanding} and in Le Bras et al. \cite{le2020visualising} work, where users begin by browsing an overview from a repository. Furthermore, Blei suggests that rather than finding new documents using traditional keyword search approaches, it would be better for users to take a theme-based approach to explore and digest collections \cite{blei2012probabilistic} \cite{blei2003latent}. We believe this behavior is a more natural solution to finding resources as it is common for literature sources to be created from a set of themes organized into a narrative. In this paper, we explore user behaviors using thematic analysis tools along with data visualization techniques to see if we can visualize firstly, theme-based overviews of a paper collection to enable objective browsing and paper selection, and secondly, if visualizing sequences and quantities of themes within individual papers in a paper set aids the generation of a holistic cross-paper reading strategy. We conduct our investigation using a three-phase qualitative study, a set of tools, and a new six-step thematic methodology, as summarized in Figure \ref{fig:f1} inspired by Shneiderman’s Visual Information Seeking Mantra \cite{Shneiderman1996eyes} and Wilson’s et al. \cite{wilson2010keyword} exploration of information work. \begin{figure*}[tbp] \centering \mbox{} \hfill \includegraphics[width=.99\linewidth]{images/HD1.png} \hfill \mbox{} \caption{\label{fig:f1}% Summary of the proposed thematic methodology. We first run an analysis of a large collection of papers (a → b) to generate a theme-based overview. Participants can then explore themes and their relevant papers. Moreover, participants can investigate each of the papers using visual wheels, highlighting sequences and amounts for different themes. Finally, participants can compare selected resources to enable them generate an enhanced cross paper reading strategy (b → c). } \end{figure*} It should be emphasized that our objective is to explore whether taking a thematic approach to browsing and selecting research papers allows users to adopt a holistic approach to these tasks followed by developing a reading strategy. We are not exploring issues with usability and performance of the proposed thematic methodology compared against commonly-used searching techniques in digital repositories as we want to focus on the user behaviors, gathering insights, and suggesting possible add-on enhancements to current methods and tools. \noindent The contributions of this paper, in summary, are: \begin{enumerate} \item We explore visual thematic tools and an associated methodology for the selection of a paper set and generation of a cross-paper reading strategy. \item We report insights on the effect of promoting thematic content, contrasted with the recalled experience of commonly-used title-based approaches and tools. \item We propose, from our results, six design recommendations (R1-R6) for enabling effective browsing and selection capabilities to improve users’ experience and enhance current tools. \end{enumerate} \section{Background and Related Work} In this section, we look at current approaches for browsing and the selection of content from digital research repositories; we then discuss how visualizations can aid those tasks and motivate our proposed methodology. \subsection{Browsing and selecting in digital repositories} There are many different definitions of what is considered a digital repository, otherwise known as digital libraries. Chowdhury and Chowdhury \cite{chowdhury2003introduction} place digital repositories into two major categories based on Borgman’s discussions \cite{borgman1999digital}. These categories firstly look after collecting and organizing literature and secondly focus on accessing and retrieving these digital sources. In this paper, we concentrate on the latter and consider a digital repository to be an online platform that allows users to search and retrieve digital copies of literature sources. These collections of resources are widely available from the publishers themselves \cite{Acm} \cite{Sciencedirect} \cite{Ieeexplore} \cite{Springer}. Additionally, companies such as Google and Microsoft provide search engines reaching multiple repositories \cite{GoogleScholar} \cite{Microsoftacademic}. All of these platforms integrate the same core mechanism for browsing, that is, using keywords as the basis of the search, with the ability to then filter results using facets such as date published, authors, institutions and publication type \cite{Sciencedirect} \cite{xie2016discover}. We believe that Shneiderman's Visual Information Seeking Mantra \cite{Shneiderman1996eyes} proposes another browsing mechanism: first offering an overview of a research area, then allowing the user to focus on particular themes, and finally giving access to the sources. A related approach has been partially implemented (Research Perspectives \cite{Researchperspectives}), its use, however, remains minor in comparison to the keyword search method. As a result, we believe more research is needed to explore the user behaviors to facilitate the use of such complementary approaches to common search mechanism. Additionally, result listings majorly emphasize title and author information, leaving out the explanation for relevance, and in turn the order in which results appear. Beel and Gipp found from reverse engineering techniques that the ranking algorithm by Google Scholar \cite{GoogleScholar} used the number of citations as the highest weighted factor \cite{beel09}. They also found that the occurrence of search terms in the title outweighed their occurrence in the full text, making no difference to the ranking if the search term appeared only once or multiple times, thus presenting a biased representation of the source content \cite{beel2009google}. It also emphasizes difficulties in assessing the relevance of a source, given the prominence of attractive titles \cite{haggan2004research} \cite{russell2016importance}. Modern digital repository platforms have tried to visualize the theme of the papers using word clouds and similar abstractions \cite{Scopussearch} \cite{Watson}; however, the main emphasis of their mechanism still relies upon the search of title keywords to find resources. To our knowledge, there is a lack of research and tools that offers users the ability to see thematic overviews, to explore how much of their search term appears in sources, and that gauges the relevance of these to their interests. Finally, there is some work in the manual annotation of themes, for example using crowdsourcing techniques, ConceptScape allows the annotation of lecture videos to highlight the content of each section, resulting in the facilitation of content discovery \cite{liu2018conceptscape}. Similar results could be achieved with textual content, for example, using analytic hierarchy processes \cite{golden1989analytic} \cite{kato2014using}, or systematic literature reviews \cite{nightingale2009guide} \cite{xiao2019guidance}. These methods are; however, time-consuming. Topic modeling\cite{blei2012probabilistic}, and in particular Latent Dirichlet Allocation (LDA) \cite{blei2003latent}, offers a time-efficient and effective method for uncovering and annotating the thematic structures within documents. Such methods have successfully been applied by Zhao et al. in the context of MOOC video repositories \cite{zhao2018flexible}. \subsection{Facilitating browsing and selection with visualizations} Popular digital repositories, such as Google Scholar \cite{GoogleScholar} or ACM DL \cite{Acm}, are heavily text-based, with limited amounts of imagery. Cognitive style research \cite{blazhenkova2009new} \cite{richardson1977verbalizer} \cite{thomas2010cognitive} suggests that visual users may not be using these text-based environments to their full potential. Therefore, being able to visualize literature sources, with a focus on themes and thematic structures, could better cater to these users preferred style of information presentation. Morris et al. \cite{morris2018understanding} demonstrated this with dyslexic users, where the interviewees reported a preference for interface uncluttered from substantial textual content. Besides, data visualizations and pictorial representations allow for better recall \cite{card1999readings} \cite{Nelson}; this highlight why techniques like icons and logos are used rather than text \cite{norman1995psychopathology}. Notable work has been done to visualize search results rather than using text-based lists. WebSearchViz incorporates a circular interface to show result relevance in terms of how close they are to the center point of the circle \cite{10.1109/TVCG.2006.111}. TileBars shows the length of each result, highlighting the frequency of the search term \cite{hearst1995tilebars}. PubCloud presents a word cloud to summarize each of the listed results \cite{kuo2007tag}. Others, like LineUp, explicitly highlight how a result relates to each facet to explain a ranked list \cite{gratzl2013lineup}. Each of these designs provides suitable solutions to the problem of unexplained ranked lists of titles. Systems such as PivotPaths and PivotSlice aim to allow exploration of information resources to reduce the requirement for user-defined keywords \cite{dork2012pivotpaths} \cite{zhao2013interactive}. MOOCex presents a collection of educational videos using a Voronoi diagram to highlight the similarity between different videos in order to recommend a sequence of coherent videos to watch \cite{zhao2018flexible}. Work has been done incorporating visual representations of topics to enable users to analyze \cite{oelke2014comparative} \cite{dunne2012rapid} \cite{padilla2013intuitive} and compare \cite{diakopoulos2015compare} \cite{alexander2015task} documents in a collections; however, to our knowledge, nobody has focused on using a theme-based approach to give an overview of a large collection of resources, or using this same approach for analyzing and comparing sources to generate a reading strategy. We believe that visual representations of collections and individual sources with a thematic emphasis could allow the users to reflect and recall back to these representations, assisting with their browsing and selection tasks. Additionally, as we will be visualizing sequences of themes to describe the progression of content in a research paper, we have found work has been done on visualization for sequences. MatrixWave \cite{zhao2015matrixwave} visualizes the sequence of clickstream events on a website. Sankey diagrams are also commonly used to visualize sequences of objects \cite{riehmann2005interactive}. We found that although these are novel ways of presenting sequences, we wanted a representation that would allow for no training and intuitive interaction to allow users to find papers with common quantities of their selected themes. \subsection{Summary} There has been substantial work done on providing insights into ranked search results using data visualization techniques, including how similar each resulting item is to one another. To our knowledge, however, none of the existing solutions have entirely focused on using a visual theme-based approach to obtain a interactive visual overview of a large collection of resources, that can be filtered to facilitate comparison and analysis of a paper set, and that assist primarily with the generation of a holistic reading strategy. \begin{figure*}[tbp] \centering \mbox{} \hfill \includegraphics[width=.99\linewidth]{images/HD2.png} \hfill \mbox{} \caption{\label{fig:f2}% The first 3 stages of our thematic methodology. Tool 1 consist of (a) the selection of a large paper collection of information resources, (b) thematic analysis of the paper collection resulting in a theme-based overview of the content, and (c) single theme analysis highlighting the relevant papers based on where that theme appears in the source.} \end{figure*} \begin{figure*}[tbp] \centering \mbox{} \hfill \includegraphics[width=.99\linewidth]{images/HD3.png} \hfill \mbox{} \caption{\label{fig:f3}% The final 3 stages of our thematic methodology. Tool 2 consists of (a) the focused paper set chosen by the user, (b) cross-paper thematic analysis of the paper set using theme wheels to represent sequences of themes from start to finish in each paper and, (c) generation of a cross-paper reading strategy.} \end{figure*} \section{Study Design} Our study aims to explore the following research questions: \noindent \textbf{RQ1:} Does visual thematic analysis as provided by the proposed methodology and associated tools aid paper selection? \noindent \textbf{RQ2:} Does visual thematic analysis as provided by the proposed methodology and associated tools aid generation of cross-paper reading strategies? \noindent \textbf{RQ3:} What are the advantages and disadvantages of the overall proposed visual thematic approach? To that end, we will ensure our participants are experienced with browsing scientific literature and establishing a reading strategy. Given this experience, and to reduce fatigue in the course of the study, we will not ask the participants to complete a keyword search tasks to contrast for performance and usability against theme-based tasks. However, we will ensure that participants are reminded of this approach using pre-study questionnaires, and we gather insight using stimulated recall semi-structured interviews. We designed two user tasks that we ask our participants to carry out to explore and gather insights. Firstly, \textbf{A)}, browse and select a set of research papers using an objective, theme-based overview of a large paper collection. As stated in \textbf{RQ1}, we are interested in analyzing whether taking a theme-based approach, using thematic analysis, aids the selection of papers. This task will also create the basis for investigating \textbf{RQ2}. Secondly, \textbf{B)}, generate a cross-paper reading strategy using a thematic comparison of a selected paper set. We are interested in facilitating the generation of a reading strategy that considers a set of papers rather than individual strategies for each paper (\textbf{RQ2}). In addition to their responses of these two user tasks, we analyze perceptions of a theme-based discovery of literature. Throughout the user tasks, we are interested in observing behavior from our participants interacting with our theme-based approach to evaluate whether it allows for high-level insights into research papers, highlighting its advantages and disadvantages as per \textbf{RQ3}. \subsection{Thematic methodology} Based on these task requirements, we developed a thematic methodology consisting of two associated thematic tools for the presentation of a large paper collection, and the comparison of a paper set to facilitate the generation of a cross-paper, holistic reading strategy. Our methodology can be summarized in six stages (Figures \ref{fig:f2} and \ref{fig:f3}): \begin{enumerate} \item Definition of a large paper collection (Figure \ref{fig:f2}a); \item Thematic analysis of a large paper collection resulting in a visual thematic map (Figure \ref{fig:f2}b); \item Upon selection of an individual theme from the thematic map, the top relevant papers are displayed, including the theme location in their content (Figure \ref{fig:f2}c); \item Six papers are selected by the user on the basis of their interests in investigating these papers further (Figure \ref{fig:f3}a); \item Papers are represented as theme wheels showing the sequences of themes from start to end, allowing for a cross-paper thematic analysis (Figure \ref{fig:f3}b); \item An all-inclusive reading strategy based on all six papers is generated by the user (Figure \ref{fig:f3}c). \end{enumerate} \begin{figure*}[tbp] \centering \mbox{} \hfill \includegraphics[width=.99\linewidth]{images/HD4.png} \hfill \mbox{} \caption{\label{fig:f4}% Thematic map evolving from Tool 1, featuring an overview of the paper collection to Tool 2 that features themes from the selected paper set. In the example above, Tool 1 includes 85 topics from 2,782 papers that filters down to only 35 topics from 6 papers in Tool 2. } \end{figure*} \subsection{Thematic Tool 1: browsing and selection} This tool focuses on Task A, i.e. browsing and selecting within a large paper collection, with the aim to \textbf{cover stages 1-3} of our thematic methodology outlined above (Figure \ref{fig:f2}). An overview of the selected large paper collection is shown using a similarity-based thematic map (Figure \ref{fig:f2}b). This thematic map features clusters of hexagons, each representing a group of similar themes found from the paper collection in a concise, structured and efficient setting. Having these themes rendered as clusters of hexagons allows users to gather insights into the individual themes that are present and investigate which other areas are closely linked and may be of interest. \subsubsection{Interactivity and aesthetics} Clicking on a single theme will display a word-cloud representation of the theme, and a listing of the top ten relevant papers, with an explanation for the ordering of the papers: each paper displays its relevance percentage to the theme, and its theme wheel (Figure \ref{fig:f2}c). These are donut chart visualizing which parts of the paper were used to represent the estimation of each theme giving users information regarding where and by how much a theme occurs in the text allowing for better insights, for example, establishing whether the theme is a minor feature of the background section, or consistently used throughout the paper. We chose this method of visualization instead of other types (e.g. bar charts) as these are more aesthetically pleasing and to reinforce relevant percentages \cite{ware2019information}, also incorporating images instead of only text can facilitate understanding as explored in Robb's et al work \cite{robb2015moodsource} \cite{robb2015crowdsourced} \cite{robb2017image}. Finally, we purposefully removed the paper title from the list to create an objective environment, probe discussion, and insights, and bring focus to the theme rather than the title, as discussed in our motivation for this work. \subsubsection{Implementation} This tool is implemented using data visualization techniques combined with topic modeling algorithms \cite{blei2012probabilistic} \cite{blei2003latent} that use statistical methods to annotate large archives of documents with thematic information, extracting the common themes among the documents \cite{shivam2020} \cite{blei2012probabilistic}. We used Blei et al. Mallet implementation \cite{mccallum2002mallet} with commonly recommended parameters \cite{boyd2014care} to compile the themes for our study. We split the individual papers from the collection into equal test chunks. We then use LDA \cite{blei2003latent} applying Gibbs Sampling \cite{mccallum2002mallet}, to uncover the themes and their distribution in the text chunks. We finally compiled the theme distributions for each paper. We visualize the set of uncovered themes in a similarity-based thematic map, using an agglomerative layout process, as described by Le Bras et al. \cite{le2018improving}. This technique allows to visually cluster themes based on their co-occurrences in the papers (Figure \ref{fig:f2}b). We then use theme wheels to present the distribution of a particular theme (selected by the user) throughout the papers presented in a list of the top ten papers per theme (Figure \ref{fig:f2}c). \subsection{Thematic Tool 2: generation of a reading strategy} This thematic tool focuses on task B, i.e., generating a cross-paper reading strategy using the selected paper set, with the aim to \textbf{cover stages 4-6} of our thematic methodology outlined above (Figure \ref{fig:f3}). This tool allows for a theme-based analysis of the selected paper set, where we produce a truncated thematic map containing only the themes that are relevant to the papers in the selected set \cite{le2018improving} (Figure \ref{fig:f4}). The size of this excerpt map will vary based on the selected paper set. In addition, each paper is represented alongside by its theme wheel representing the structure of papers by visualizing the sequence of themes from start to end (Figure \ref{fig:f3}b). \subsubsection{Interactivity and aesthetics} Upon interacting with either of these layouts (the thematic map or the theme wheels), users are presented with a word-cloud to get a detailed description of the themes, emphasizing the relationship between the elements on the screen \cite{yi2007toward}. This allows users to analyze and compare a set of research papers, permitting an in-depth exploration of the consistency and changes of the themes that the paper authors discuss. The aesthetics of the excerpt map and theme wheels for Tool 2 were designed to emphasize the different theme contributions, distinct themselves from task A (Tool 1), and to make it visually appealing to users. \subsubsection{Implementation} Given the selected paper set by participants, the themes covered by each of the selected papers are noted, and this information is extracted from our thematic map from Tool 1, meaning that the number of extracted themes will fluctuate depending on the papers. This creates a smaller thematic map that contains only the relevant themes for these papers. Each of the themes is then re-evaluated in terms of how similar they are to each other using agglomerative clustering algorithms \cite{ackermann2014analysis} \cite{le2018improving} creating our focused thematic map (Figure \ref{fig:f4}). Each cluster of themes is assigned a different color, allowing for a conceptual link between the clusters and the theme wheels. \subsection{Pre-study pilots} Two pilot studies \cite{turner2005role} were completed to evaluate both tools individually. We evaluated Tool 1’s usability with three participants. This evaluation consisted of a set of tasks followed by the completion of SUS \cite{grier2013system}. The set of tasks comprised of using the tool to explore literature about how users interact with data visualizations, select up to six papers that were believed to be useful in gathering this knowledge and explain reasons for this selection. Tool 1 received an average usability score of 76 across participants, indicating good interface usability. It also helped us identify usability issues which we corrected. We focused on Tool 2’s evaluation on the usability of theme wheels. In particular, we looked at how the donut charts were used to investigate literature sources (lecture notes were used due to accessibility). Five participants were given the task of summarizing a set of lectures, which was repeated twice with the order randomized – once using a theme wheel of the whole course and once using a hard copy of the lecture outline materials. This was followed by informal semi-structured interviews in order to gain insights into how participants felt using the two different resources to complete their tasks. We found that the theme-wheels introduced a pictorial representation of the course, allowing for participants to navigate the lecture materials without opening every document and skim-reading each one individually. It, therefore, supported our premise that theme wheels allow for a broad, intuitive, and objective overview of literature sources. \section{Procedure} In this section, we detail the steps involved in running our study, including how we recruited participants and coded semi-structured interviews. \subsection{Data processing} For our study, we followed the thematic methodology that has been outlined, making use of our two thematic tools. Our large paper collection is made up of five years’ worth of CHI papers, excluding any extended papers, totaling 2,782 papers. Papers were then each split into 30 equal text chunks (83,460 in total) and run through LDA \cite{blei2003latent} (as noted in the implementation of Tool 1) and generated 85 themes. This number was settled after exploration sessions and manual adjustments to get detailed themes whilst keeping this number manageable for participants. Figure 5 shows some examples of uncovered themes. For the second phase, we require the use of Tool 2 which, as described previously, extracts relevant themes based on the selected paper set made by a participant. The size of these excerpt thematic maps varied across participants (n: 10, avg: 28.5, std dev: 7.8, min: 10, max: 37). \begin{figure}[htb] \centering \mbox{} \hfill \includegraphics[width=.99\linewidth]{images/HD5.png} \hfill \mbox{} \caption{\label{fig:f5}% We run thematic analysis on papers from 5 years’ worth of CHI (2,782 papers in total) to give an overview of the research community. A subset of uncovered themes can be seen above.} \vspace{-0.8cm} \end{figure} \subsection{Participants} We recruited 10 experienced participants (P1-P10) in total (5 males; 5 females; aged 18-44) using advertisements throughout our organization, which attracted participants across several departments to take part \cite{cairns2008research} \cite{patton1990qualitative}. None reported to be color blind and there was no confusion distinguishing between the colors and shapes used in the tool interfaces. We noticed saturation in the coding of our results as reported in later sections, validating our sample size of participants. Using a pre-study questionnaire, we verified that all participants are experienced in using digital repositories to browse for literature sources. These experiences ranged from using digital repositories several times per week (7 participants), at least once a week (1 participant) to less than every 1-2 months (2 participants). The stimulated recall \cite{adams2008questionnaires} of experience was also used during the semi-structured interviews to allow participants to contrast between their experience and our theme-based approach. Our study received ethical approval from our institution, and consent was collected from the participants. Every participant was compensated with a \$12 voucher for their time. All the results from this study were anonymized and unlinked. \subsection{Study} We divided our study into three stages with two user tasks, aiming to keep participants motivated by breaking down the study into smaller, manageable tasks \cite{cairns2008research}. These stages follow the tasks we describe above, consisting of: A) browse and select 6 papers using Tool 1, B) generate a reading strategy using Tool 2, and C) report on the perception of theme-based literature discovery during a semi-structured interview. This was accompanied by a scenario within which we asked our participants to place themselves in \cite{jenkins2010putting}, in order to bring focus and context to their tasks and the interview \cite{barter1999use} \cite{jenkins2010putting}. The scenario is as follows: \emph{“You are currently planning an experiment where you will be looking at how people use different websites and what they like and dislike about them. You are interested in using focus groups or interviewing techniques to gather additional insights from your participants. However, you are not sure whether this is the best option for you, so, you want to explore what approaches other similar studies have taken, including how to report on the data gathered.”} This scenario was chosen as it fit into the community of papers that are being displayed and is simple enough that participants are not required to have a background in computing to complete the tasks, allowing for us to reach a more diverse audience \cite{cairns2008research}. Stage 1 (paper selection using Tool 1) consisted of the first user task, (A), that was performed by participants in their own time 1-3 days prior to the rest of the study. This allowed for the task to feel more relaxing and realistic \cite{jenkins2010putting} and gave the investigators enough time to process data before Stage 2. Participants were also given worksheets to complete, in which they communicated their choice and reasonings. Stage 2 (reading strategy generation using Tool 2) consisted of the second user task, (B), where participants were shown their selected 6 papers rendered as theme wheels and were asked to analyze and interact with the visualization in order to draw out a plan as to how they would go about investigating the papers further. In particular, we sought to understand their reading strategy in terms of what order they would read the papers and whether they would read only certain parts within the paper. We then revealed the paper titles to the participants and asked them to describe their impression of the title, compared to their analysis of the theme wheel. (Figure \ref{fig:f6} demonstrates the setup). Finally, Stage 3 (semi-structured interview) sought the participants' opinions and insights about Tool 1 and Tool 2. These interviews lasted no longer than 30 minutes. In particular, we emphasized the interviews towards the participants' usage of the tools, their views on the theme-based approach, their usual procedure with digital repositories, and the contrasts between the two approaches. The interviews were recorded, with the participants' agreement, and transcripts were then produced for coding. \begin{figure}[htb] \centering \mbox{} \hfill \includegraphics[width=.99\linewidth]{images/Image6.png} \hfill \mbox{} \caption{\label{fig:f6}% Representation of part 2 of the study. The setup includes the interactive online tool, hard copies of worksheets, markers, highlighters and an audio recorder.} \vspace{-0.4cm} \end{figure} \subsection{Analysis and coding} Coding was done by the investigator using computer-assisted qualitative data analysis software \cite{silverman2013doing}. An open coding or inductive approach was used to develop the codebook \cite{corbin2014basics} \cite{fagan2010usability}. After selecting a random transcript, an initial codebook was drawn, and then verified and adjusted on a second transcript. The rest of the transcripts were coded accordingly. A second pass through the data was made to ensure consistency. We found saturation, validating our sample size of experience participants for the study. In addition, we are making the transcribed interviews and analyzed data open for future research in this and other areas (\url{strategicfutures.org/publications} (CC-BY)). \begin{figure}[htb] \centering \mbox{} \hfill \includegraphics[width=.99\linewidth]{images/themes.png} \hfill \mbox{} \caption{\label{fig:f7}% The high-level codes from our semi-structured interviews, measured by analyzing the number of coding references made.} \end{figure} \noindent Our codebook comprises of 6 high-level codes (Figure \ref{fig:f7}): \begin{itemize} \item \textbf{Application:} This was the largest topic appearing from our interviews, where participants were asked to think about what they liked and disliked about the tools, how they used the thematic maps and theme wheels, information they thought was missing and how much they interacted with the tools. This brought out any usability issues in terms of features that they did not understand or use; \item \textbf{Digital Repositories:} Participants were asked to think about prior experiences using digital repositories allowing them to gather their thoughts as to what they like and dislike about these systems, including what information they thought would be useful to help them navigate and select appropriate texts; \item \textbf{Digital Repositories vs Application:} While the previous two codes reflected on our thematic tools or digital repositories separately, this category focuses on the participants’ contrasts between the two approaches; \item \textbf{Representation of Paper Titles:} Participants were asked to talk the investigator through each of the paper titles and discuss their reactions to them whilst comparing the title to the themes shown from the theme wheels on Tool 2; \item \textbf{Usual Approach to Browsing:} Discussions around digital libraries brought up how participants usually browse literature, giving insights into what they consider useful information about papers. The main criteria used to select papers was also discussed; \item \textbf{Reflections on Application \& Task:} Participants were asked to reflect upon how they felt completing the tasks, allowing them to consider whether they would change how they approached the tasks given the knowledge that they now have about the tools. \end{itemize} \section{Results and Discussion} The research questions that were posed in the introduction will now be addressed with design recommendations being made for designers to enhance their literature discovery systems like digital repositories. \subsection{Selection of papers} In this section, we discuss RQ1 that focuses on discovering whether a thematic analysis using the proposed theme-based methodology aids paper selection. Analyzing participants worksheets detailing reasons for their paper set, we found that all participants used features of Tool 1 to reason their paper selection. P7 focused on the theme content presented in the thematic map. In addition to this feature, P1, P3, P4, and P10 relied on the calculated theme percentage. P5 combined the theme representation with the theme location within papers. Finally, P2, P6, P8 and P9 made use of all of these features. During interviews, participants were asked to discuss how they used the thematic tools to complete the tasks and contrast this approach to how they would have usually completed similar tasks with digital repositories. Upon reflection of selecting papers using a thematic approach, P8 pointed out that \emph{“at first it takes a little getting used to because it’s a very different way of considering papers, but it does make you focus on the keywords”}. P7 continues on this point by explaining, \emph{“it’s a little more dynamic, your eyes can first go to keywords of relevance, so it removes that metric of where it is in a list of papers”}. P2 describes that \emph{“it might make narrowing down a scope to a few papers from one hundred and, everybody wants to read as few papers as possible”}. All ten participants mentioned benefits of this system and it was noted that a thematic approach was \emph{“better than scrolling through a list of titles”} (P3) and helped \emph{“pick out the main themes a lot better than you would get with a list of titles”} (P5). This prompted participants to begin to reflect upon their usual approach, and how much reliance they place on paper titles to help with the selection process as P9 describes \emph{“whenever I’m looking at papers, I probably put a lot of emphasis into the title than I’ve realized”} and P8 recognizes that \emph{“having titles taken away definitely made you think differently and focus a bit more on keywords of what you’re going to get out of it”}. This highlights problems with titles as participants described them as \emph{“always trying to be catchy, they’re attention-seeking and they don’t necessarily say everything”} (P8) resulting in sometimes selecting papers and feeling like \emph{“this isn’t quite what I expected”} (P2). \noindent \textbf{Design Recommendation (R1):} We found that all participants appreciated the theme-based analysis and the thematic mapping of the paper collection. We found that similarity-based layouts aided fast theme selection. We would recommend (R1) that designers make use of thematic analysis, consider implementing it alongside their normal search methods, and use a visual similarity-based map, allowing users to easily select themes and explore relevant papers. Also as mentioned, participants began to reflect upon their usual approach that involved \emph{“quickly scroll through and see different titles”} (P10) or as P3 mentions \emph{“check the titles which will usually get me to discard a few”}. However, when using a thematic approach, participants noted being able to gauge the volume and location of themes as P8 highlights the usefulness of having papers \emph{“ordered using this percentage”} and not placing emphasis on a title because \emph{“a title can be misleading”}. P2 discusses the value of knowing the locations of themes as the visualization \emph{“tells me where this keyword is in the paper… is it in the introduction, which may not be very relevant to me, I might be looking at methods, so this is very useful!”} P5 also mentions this point as \emph{“you can see the location of different topics, you don’t get that in any digital libraries that I know of really or certainly graphically, so yeah, I like that”}. When contrasting the thematic approach to participants’ common searching approach, two participants weren’t sure if they would have selected papers in their paper set based on titles alone – “I’m not really sure whether any of these would leap out at me as something that I thought that I would need to read for the kind of research I would like to do” (P5). This point is also mentioned by P7: “I have no idea if that would affect the picking of it if I knew that was the title, it might”. \noindent \textbf{Design Recommendation (R2):} Users found that the thematic paper ranking and particularly the graphical, single-theme representation of both the volume and location of a theme within a paper useful. This aided assessment of the relevance and use of the theme within a paper, facilitating the decision to include or not include this paper within the paper set. We recommend that designers provide these meta-data (paper ordering and theme volume), which are often generated by search engines \cite{barter1999use} \cite{beel2009google} but not normally made available to users, as they aid selection. As we have seen, a thematic approach facilitates the selection of research papers, but it also allows for a more objective method to filtering papers that resulted in participants selecting papers that they believe would not have been selected if a traditional approach was being used. This is due to the functionality allowing papers to be filtered by themes, and the ability to show the volume and location of the theme. \subsection{Development of a reading strategy} In this section, we focus on RQ2, that poses whether the thematic methodology and associated tools can aid the generation of a cross-paper reading strategy given a selected paper set. In the second phase of the study, participants were asked to consider the selected paper set and develop a reading strategy. From worksheets that participants described their strategies on, we found that six participants ordered papers for reading based on how much they contained the main themes that the participant was most interested in. P2 describes their answer as \emph{“looking at the color coding and looking at the general themes in the papers”} whereas P3 notes they would \emph{“investigate the purple bits because there are a lot them, there are almost three whole purple donuts!”} Others, such as P5, described their approach to investigating the paper set as \emph{“scrolling along here [the theme wheels] and then seeing which ones [themes from thematic map] light up and how that relates to the papers that I picked”} to find out \emph{“what the predominant color is”}. Participants also used the theme-based overviews to eliminate papers that after having a closer look at, no longer seemed as relevant as noted by P5 – \emph{“Paper 1, I didn’t end up using because I thought it was more specifically for musical learning and it was quite good I realized that, so it wasn’t used”}. P7 summarizes by stating, \emph{“I think the visual aspect is helpful because you can almost kind of quickly quantify what a single paper is about whereas with Google Scholar it’s kind of just a list of links”}. Planning out a reading strategy allows for participants to focus on what they want to get out of each paper to solve a problem. This was highlighted by many participants when they discuss their usual approach to the discovery of literature as being \emph{“very disorganized”} (P5) or \emph{“surfing from paper to paper”} (P8). This highlights the piecemeal approach that is often adopted using common searching techniques, as digital repositories do not allow for a paper set to be considered and evaluated, only individual sources. \noindent \textbf{Design Recommendation (R3):} We found that when given a side by side comparison of the multi-theme representations of sequences of themes within a paper set, participants could formulate a cross-paper reading strategy, ordering paper sections that they plan to read based on the quantity and positions of themes within each individual paper, promoting a coherent approach to investigating the sources. We recommend that designers facilitate the comparison of a paper set using visualizations of each papers’ sequences of themes. It is clear from discussions with participants, that a combination of the thematic map and the theme wheels were used to develop a reading strategy. Due to the clustering in the thematic maps, similar themes were grouped together. Participants mentioned this functionality as it \emph{“provides a link to something that might be worth exploring”} (P2) but three out of the ten participants also commented on having difficulties to \emph{“find the exact keywords that I noted [in the previous tasks]”} (P6). In order to reduce this problem from occurring, we can imagine a closer integration between Tool 1 and Tool 2. This could be done using visual explanations \cite{le2018improving} to animate the evolution of the thematic map from Tool 1 to Tool 2, allowing for users to trace \cite{gregor1999explanations} interesting themes and see how the tools pull out relevant information. \noindent \textbf{Design Recommendation (R4):} Our result show that participants felt they would have benefited from a closer link between the thematic map of the paper collection provided in Tool 1 and the more focused thematic map provided for the selected paper set in Tool 2 (see Figure \ref{fig:f4}). We recommend that the thematic maps of the paper collection and the user’s paper selection are tightly integrated (e.g. the provision of common highlighting, multiple selections or interactive transitions). Based on the evidence presented from the in-depth interviews, we have found that not only does following a thematic approach aid the generation of a reading strategy, but often a strategy that takes into consideration a set of papers as a whole rather than traditional approaches where users adopt a more piecemeal strategy. \subsection{Levels of insight into papers} In this section, we discuss RQ3 that focuses on the advantages and disadvantages of the overall thematic approach that has been proposed. Exploring RQ1 and RQ2, we have seen that a thematic approach to discovery and analysis of literature gives insights into the structure, author keywords and sequence of themes as mentioned by participants whilst discussing advantages and disadvantages of following a thematic approach. P2 describes being able to \emph{“pick out bits of a paper that were on a particular topic that I might want to focus on, so I could see, oh that’s a bit of waffle, so I can skip through that”} while P7 mentions that \emph{“I like how you can see the progress through a paper like that, being able to see how the topics change or don’t change”}. Theme wheels allowed participants to easily identify paper sections (e.g. introduction, background or conclusion), enabling them to map their knowledge and experiences with research papers. With such a focus on themes, six out of ten participants found that they interpreted themes differently to the content, which was brought to light when the titles were uncovered. For example, P7 describes this as \emph{“I just saw privacy and thought data privacy and I don’t know if this is actually what this is on or if it’s more actual physical privacy? But I was thinking more data protection online, so yeah, I was surprised by that”}. Le Bras et al. work recommends interactivity incorporated into the map for increased user confidence and engagement as participants can then interrogate the process and understand the information at their own pace \cite{le2018improving}. Therefore, giving users the ability to change the level of detail being displayed in our thematic maps could lead to a deeper understanding of not only individual themes but also clusters of themes. \noindent \textbf{Design Recommendations (R5):} We found that some participants would have liked to have been able to obtain a deeper understanding of particular themes at both the paper selection and reading strategy generation stages. We recommend that designers explore hierarchical thematic analysis techniques \cite{Griffiths2003hierarchical} to allow users with different levels of knowledge to investigate themes at multiple levels of abstraction. Nine out of our ten participants noted being surprised by at least one paper title when they saw the titles at the end of the tasks. This is emphasized when participants were asked to explain their reactions where P1 mentions that \emph{“the first two, no, I would never ever imagine it was that”} and P3 mentions that a paper was \emph{“meant to be for interviewing techniques since the tags were interview, data, survey but the title is nothing like that”}. P2 found that the titles were \emph{“totally different but still useful”} Whilst P9 reflects on their approach by mentioning \emph{“I used the keywords quite a lot, so the title was quite different, so it was quite surprising”}. Uncovering the titles of the papers right at the end of the study highlights our previous point that titles are only one to two lines long so cannot be expected to reflect the full content. Therefore, by introducing thematic overviews of the content, participants could see the progression of themes from start to finish, giving insights into the tools and techniques used but sometimes lacking in giving context to the research. For example, eight out of our ten participants selected a paper titled, Investigating the Suitability of the Asynchronous, Remote, Community-based Method for Pregnant and New Mothers \cite{prabhakar2017investigating}. This title came as a surprise to all eight of these participants, like P5 who said it \emph{“surprised me a bit. I didn’t see anything in here [the application] that made me think of that”} or P7 who said, \emph{“I definitely had no idea that this was what the paper would be about”}. Our chosen algorithm aims to uncover the most common themes in a whole corpus of text. It is, therefore, not surprising that pregnant and new mothers do not come out as a major theme in HCI community. This did not cause issues to participants for their task, as that paper discusses qualitative methods such as focus groups and interviews, meeting the given scenario and task. If participants had been given the task of understanding the context of papers, it would then be likely that they would have struggled to grasp this information from the theme wheels alone. During the interviews, participants were asked whether they thought a thematic approach could be a replacement of current digital repository systems or if it would be more valuable as an add-on feature. Only two participants thought that our thematic methodology could replace current systems, with the other eight participants believing that this approach would be best as an add-on feature. P9 reasoned this as \emph{“getting used to new systems is quite difficult, so it would be good to have that alongside”} or as P8 suggests, \emph{“people are so stuck in their ways, so I don’t know how open-minded people would be”}. Participants began to describe how they would use current systems with a layer of thematic information added. P2 mentions that \emph{“I would probably start with this [interface] to get me to a place where I think I am ready to look at the text and start looking at the abstracts then and progress from there”} while P1 states, \emph{“I really love this interface, it's perfect for the first screening but then you need something else [such as access to digital repositories]”}. \noindent \textbf{Design Recommendation (R6):} Participants appreciated the integrated thematic approach and its visual representation and interface. However, during the study, the participants clearly expected the title and abstract fields to be also available and would appreciate a combination of approaches. We recommend that designers incorporate visual thematic analysis tools with traditional title-abstract search methods to allow users to seamlessly switch between and combine approaches to get both theme and context information. As we have seen, based on results from our semi-structured interviews, there are advantages and disadvantages to the overall proposed thematic approach. Advantages included the ability to have a visual representation of a large collection of papers, see the sequences of themes from start to finish in a paper and visually compare a paper set in order to aid the generation of a cross-paper reading strategy. The main disadvantages highlighted by participants were not having an integrated environment with traditional information such as titles and abstracts available to them, but they appreciated that this process did allow for them to reflect upon their common approach to the discovery of literature and question their reliance on commonly used information for their reading strategies. \section{Conclusions} In this paper, we present a study exploring the effects of a new visual methodology and complementary toolset that helps users browse, select and develop holistic reading strategies. We principally focus on whether our proposed approach enriches paper selections, facilitates the development of coherent reading strategies, and allows them to develop high-level holistic reading strategies. To explore these aspects, we carried out a three-phase qualitative study using scenario-based, semi-structured interviews that were designed to probe insight into to the use of our methodology and tools. We investigated participants' approaches, user behaviors, and reactions using our thematic methodology and contrasted them to their experiences with common digital repositories. We believe that our results indicate that adopting a visual thematic methodology encourages a more objective approach to browsing and selecting papers. Participants chose papers that they thought they would definitely otherwise would have not selected and, following selection of paper sets, participants used a combination of visual thematic maps and theme wheels to develop theme-based, cross-paper reading strategies. In addition, participants found that the multi-theme paper visualizations gave useful insights into the structure, ordering, frequency and commonality of themes, allowing participants to quickly gain an overview of content, authors’ writing styles and focus. We make six recommendations aimed at assisting designers that wish to enhance or develop visual thematic tools and methodologies that will help users quickly and efficiently explore digital repositories. We certainly believe that such tools should be closely integrated with existing approaches to provide complementary, rather than replacement functionality, in order to encourage a more holistic and objective approach to developing reading strategies. Finally, we hope the insights, visualizations, methodology, tools and recommendations proposed in this paper will encourage discussion in the community and catalyze the development of new visual thematic-based approaches to developing interfaces to a wide variety of digital repositories, including for example storing video, audio, and multimedia data for educational, entertainment and governmental applications. \subsubsection*{Acknowledgments} The authors would like to thank the participants for their time and insightful discussions. The data generated for this study can be accessed on request, please email the authors for further details. Finally, visualisations of corpora, open algorithms and data (CC-BY), similar complementary tools \cite{methven2014research} \cite{padilla2012digital} \cite{methven2015don}, and related work can be access at \url{strategicfutures.org}. \bibliographystyle{eg-alpha-doi}
\section{Introduction} In recent years, magic-angle twisted bilayer graphene~\cite{bistritzer,super1,mott1} (tBG) has emerged as a platform for exploring correlated insulating phases and unconventional superconductivity in compositionally simple systems, owing to the possibility of achieving extremely narrow bandwidths where Coulomb repulsion energies can dominate the kinetic energy of electrons.~\cite{bistritzer, dillonwong, super1, mott1, super2, super3, Young_quantized, zaletel, goldhaber-gordon, mott2, nadj, daixi, stephen2018, Chittari_2018, leconte2019relaxation, wei2019, Fidrysiak, vafek, koshino2, vishwanath,vishwanath2, vishwanath3, lee2019, chichinadze2019nematic, shi2019largearea, PhysRevB.100.155421, ma2019discovery, hesp2019collective, fern2019nematicity, stepanov2019interplay, zhang2019topological, Bernevig_PRL} The pool of moire materials exhibiting such behaviors has rapidly expanded beyond twisted bilayer graphene to include trilayer graphene on hexagonal boron nitride (TLG/BN), ~\cite{chittari, Nat_TLGBN, NatPhys_TLGBN, fengwang2019, yankowitznature, PhysRevB.100.195413, PhysRevLett.122.146802, zhang2019spin, nanolettKIM, 2019ferromagnetism, PhysRevB.99.205150, komsan2019, ulloa2012, bokdam, sanjose3, Wallbank2013, ZHU20181087} or double bilayer graphene~(tDBG)~\cite{tbbg, tbbg1, tbbg2, tbbg3, tbbg4, tbbg5, tbbg6,senthil} as representative systems where the perpendicular electric field can control the flatness of the low-energy moire bands and achieve the narrow bandwidths over a wider range of the twist angles, without requiring high-precision rotation as in tBG. Studies have evaluated the feasibility of engineering moire flat bands in gapped Dirac materials,~\cite{srivani2019,song2019} suggesting TMDC bilayers~\cite{feenstra, 2dheterojunctionTMD1, 2dheterojunctionTMD2, 2dheterojunctionTMD3, song_NanNaTech} as platforms for identifying nearly flat bands where one can benefit from the aforementioned looser constraints on twist angle precision.~\cite{srivani2019, mitmanish, fengcheng, fengcheng2019, tmdctwist1, tmdctwist2, bi2019excitonic, zhang2019moir, wangNSR, sushko2019high, tang2019wse2ws2,FengWang_TMD, an2019interaction} The finite valley Chern number of the moire bands underlie the anomalous Hall effects observed in transport experiments when the degeneracy of the bands are lifted via Coulomb interactions.~\cite{senthil,chittari2019} Charge Hall conductivity signals were observed in twisted bilayer graphene nearly aligned with hexagonal boron nitride (tBG/BN) at 3/4 filling densities,~\cite{goldhaber-gordon,Young_quantized} and closely related traces of quantum anomalous Hall effects were observed in TLG/BN.~\cite{Nat_TLGBN} Contrary to the expectations of a charge Hall conductivity of $\sigma_{xy} = 3 e^2/ h$, which is consistent with the predicted $K$ valley Chern number $C = 3$ of hole bands for TLG/BN,~\cite{chittari2019} the experiments showed a quantized anomalous Hall conductivity of $\sigma_{xy} = 2 e^2/ h$, which is consistent with $C = 2$.~\cite{Nat_TLGBN} In this paper we explore the valley Chern number phase diagram of G/BN, BG/BN, and ABC stacked TLG/BN structures, that can be described using the low-energy $N$-chiral Dirac model subject to moire patterns, in an attempt to identify the system parameter conditions that can alter the valley Chern numbers. The manuscript is structured as follows. In Sec.~II we introduce the model Hamiltonian, in Sec.~III we present the electronic structure results comprising the valley Chern number phase diagrams, and lastly in Sec.~IV we present the summary and discussions. \section{Model Hamiltonian}\label{sec:Hamilton} The low-energy model Hamiltonian of rhombohedral $N$-layer graphene on hexagonal boron nitride at the $K$-valley subject to substrate moire patterns $H_{\xi}^{M}$ is given by \cite{chittari} \begin{equation}\label{eq:H_N} H_N^{\nu,\xi}=\frac{\upsilon_0^N}{(-t_1)^{N-1}}\begin{bmatrix} 0 & \left( \pi^\dagger \right)^N\\ \pi^N & 0 \end{bmatrix} + \Delta\sigma_z + H^{\rm R}_{N} + H_{\xi}^{M} \end{equation} \noindent where $\xi=\pm 1$ distinguishes the two possible (0$^{\circ}$ and 60$^{\circ}$) alignments between the layers of graphene and BN. The first term in equation (\ref{eq:H_N}) describes the low-energy {\it N-}layer graphene $2 \times 2$ Hamiltonian containing the momentum operator $\pi=\nu p_x+i p_y$, where $\nu=1$ is used for the principal valley $K$ of graphene, unless stated otherwise. The second term of equation (\ref{eq:H_N}) introduces the interlayer potential difference proportional to the mass term through $\Delta$. The third term, $H^{\rm R}_{N}$, describes the remote hopping term corrections for the {\it N-}layers. We model the remote hopping term corrections for TLG with $N=3$,~\cite{jjung_unpublished} as shown below: \begin{eqnarray} \label{eq:H_N3} H^{\rm R}_{3, \nu} &=& \left[ \left( \frac{2 \upsilon_0 \upsilon_3 \pi^2}{t_1} + t_2 \right) \sigma_{x} \right] \\ &+& \left[ \frac{2 \upsilon_0 \upsilon_4 \pi^2}{t_1} - \Delta' + \Delta'' \left( 1- \frac{3\upsilon_0^2\pi^2}{t_1^{ 2}} \right) \right] \mathbb{1}. \nonumber \end{eqnarray} The effective hopping parameters for rhombohedral trilayer graphene that fits the local density approximation (LDA) bands are $t_0=-2.62$~eV, $t_1= 0.358$~eV, $t_2=-0.0083$~eV, $t_3=0.293$~eV, and $t_4=-0.144$~eV, where associated velocities are defined as $\upsilon_m = \sqrt{3} a \, | t_m | / 2\hbar$, using $a=2.46\,\AA$ as the lattice constant of graphene, and the constants in the diagonal terms are $\Delta' = 0.0122$~eV and $\Delta'' = 0.0095$~eV. In the case of $N = 2$, the parameters $t_2$ and $ \Delta''$ drop out, and $ \Delta' = 0.015$~eV is used for bands obtained within the LDA~\cite{jjung_bilayer} and the remote hopping terms are captured as \begin{eqnarray} \label{eq:H_N2} H^{\rm R}_{2, \nu} &=& -\upsilon_3 \left(\begin{matrix} 0 & \pi\\ \pi^\dagger & 0 \end{matrix} \right) \nonumber + \frac{ \upsilon_3}{4\sqrt{3}} \left( \begin{matrix} 0 & \pi^{\dagger 2}\\ \pi^2 & 0 \end{matrix}\right)\\ \nonumber &+& \frac{ \upsilon_0}{t_1} \left[\frac{ \Delta^{\prime} \upsilon_0} {t_1} +2\upsilon_4 \right]\left(\begin{matrix} \pi ^\dagger \pi & 0\\ 0 & \pi \pi^\dagger \end{matrix}\right). \nonumber \end{eqnarray} In the case of $N = 1$, all the remote hopping terms drop out and $H^{\rm R}_{1, \nu} = 0$. \par The last term of equation (\ref{eq:H_N}) \begin{equation} H_{\xi}^{M} = H_{\xi}^{V} + H_{\xi}^{A} \end{equation} is the effective moire potential term induced by the hBN layer that consists of the diagonal $H_{\xi}^{V}$ and off-diagonal $H_{\xi}^{A}$ terms. We use the local commensurate stacking vector $\vec{d} = (d_x,d_y)$ between the substrate and the contacting graphene layer, where the stacking vector $\vec{d}$ and the real space position $\vec{r}$ are related through \begin{eqnarray} \vec{d}(\vec{r}) \simeq \varepsilon \vec{r} + \theta \hat{z}\times \vec{r} \end{eqnarray} in the small angle approximation.~\cite{jung2014} Here, $\theta$ is the relative twist and $\epsilon = (a - a_{BN})/a_{BN}$ is the lattice constant mismatch between the graphene and hBN layers, where $a$ and $a_{BN}$ are the lattice constants of graphene and hBN layers respectively. The diagonal term of the Hamiltonian in real space is given by \begin{eqnarray} H_{\xi}^{V} (\vec{r}) = V_{AA/BB}^M(\vec{r})\left[\frac{\mathbb{1}+\xi\sigma_z }{2}\right] \label{diagterm} \end{eqnarray} where the moire potential function is given by \begin{eqnarray} V_{AA/BB}^M(\vec{r}) = 2C_{AA/BB}{\rm Re}\left[ e^{i\phi_{AA/BB}} f^{\xi}(\vec{r}) \right], \label{moirepot} \end{eqnarray} which in turn depends on the auxiliary function \begin{eqnarray} f^{\xi}(\vec{r}) = \sum_{m=1}^{6}e^{i\xi{ {\tilde G_m}}\cdot{\vec r}}\frac{ \left( 1+(-1)^m \right)}{2} \end{eqnarray} expressed using six moire reciprocal lattices $\tilde G_{m=1..6} = \hat R_{2\pi(m-1)/3} {\tilde G_1}$ successively rotated by 60$^{\circ}$. The moire reciprocal lattice vector ${\tilde G_1} \approx \epsilon \vec G_1-\theta \vec z \times \vec G_1$ is related to the following reciprocal lattice vector of graphene $\vec G_1 = [0, 4\pi/(\sqrt{3}a)] $. For the diagonal terms of the moire potentials we use the parametrization of a G/BN interface~\cite{jung2014} projected onto only one of the sublattices.~\cite{chittari} The moire potential in Eq.~(\ref{moirepot}) can be broken down in terms of inversion symmetric and asymmetric patterns, see Refs.~[\onlinecite{Wallbank2013,jung2017}] and appendix A for more details. \par The intersublattice off-diagonal term $H_{\xi}^{A} (\vec{r})$ introduces coherence between the low energy sublattices in the system and could arise in multilayer graphene with BN interfaced systems due to higher order perturbation corrections that couple the diagonal moire pattern terms with interlayer tunngling. This term can be modeled as \begin{eqnarray} H_{\xi}^{A} (\vec{r}) = \vec{A}^\xi(\vec{r})\cdot \sigma^{\xi}_{xy} \label{vecpot} \end{eqnarray} where $\sigma^{\xi}_{xy} = (\sigma_x, \xi\sigma_y)$ is the Pauli matrix vector and the pseudomagnetic vector potential that we model through \begin{eqnarray} \vec{A}^\xi(\vec{r}) = V^M_{AB} \, \vec{ \mathbb{\nabla} }_{\vec{r}} \, {\rm Re} \left[ e^{i\phi_{AB}} f^{\xi}(\vec{r}) \right], \end{eqnarray} where the prefactor \begin{eqnarray} V^M_{AB} = 2C_{AB}\left[\cos(\tilde\theta) \hat{z}\times \frac{\mathbb{1}}{|\tilde G|} - \sin(\tilde\theta)\frac{\mathbb{1}}{|\tilde G|}\right] \end{eqnarray} depends on twist angle and lattice constant mismatch \begin{eqnarray*} \cos({\tilde\theta}) = \frac{\alpha\cos(\theta)-1}{\beta}; ~~ \sin(\tilde\theta) = \frac{\alpha\sin(\theta)}{\beta}\\ \nonumber \beta = \sqrt{\alpha^2-2\alpha\cos(\theta)+1}; ~~\alpha = 1+\epsilon. \end{eqnarray*} We will show that this off-diagonal vector potential $\vec{A}^{\xi}(\vec{r})$ in Eq.~(\ref{vecpot}) can alter the Chern number phase diagram by breaking the rotational symmetry and modify the valley Chern numbers depending on system parameter values. In a previous report~\cite{chittari} on the electronic structure of TLG/BN the moire potentials were modeled to act at the low energy sublattice of the contacting graphene layer and zero direct interlayer coherence between the low energy sites of the top and bottom layers was assumed by using $C_{AB} = 0$ zero off-diagonal term. There the $C = N$ proportionality to layer number was verified to up to three layers for either valence or conduction bands depending on the sign of the electric field and hBN substrate alignment orientation. As a matter of convention, in this work we assume that the $C$ valley Chern number is associated to the $K$ valley of the multilayer graphene layer while a time reversal symmetric counterpart is assumed for the $K'$ counterpart. The zero or finite integer value of the valley Chern number in each band is attributed to the sum of the primary and secondary Chern weights typically concentrated near the gap opening points in the mBZ leading to the total valley Chern number, such that $C^{e/h} = w^{e/h}_P + w^{e/h}_S$. While the primary Chern weight near charge neutrality is set by the interlayer potential difference, the secondary Chern weights near the mBZ boundaries depend on the moire potential parameters that generate the avoided secondary gaps at the mBZ corners. We will show in our analysis that the secondary Chern weights are easily altered based on the choice of the off-diagonal moire potential terms. \begin{figure}[t] \includegraphics[width=8cm,angle=0]{figure1.pdf} \caption{(color online) Band structures, valley Chern numbers, Berry curvatures and the Fermi surfaces at the vHS of the low energy bands in TLG/BN when a finite off-diagonal term as in Eq.~(\ref{vecpot}) is added to the Hamiltonian. (a) Band structures for $\xi = 1$, $N=3$ with $\Delta = 0.01$~eV, for different values of the off-diagonal pseudomagnetic field patterns proportional to $C_{AB} = 0 $ (black), $C_{AB} = 0.007 $~eV (red), and $C_{AB} = 0.01 $~eV (green). For all three cases we use the $\phi_{AB} = 0$ phase term. The respective $K$ valley Chern numbers for the valence bands are for $C_{AB} = 0$, $C = 3$ (black), for $C_{AB} = 0.007$~eV, $C = 0$ (red) and for $C_{AB} = 0.01 $~eV, $C = 2$ (green). The valley Chern number of the conduction bands are in all cases $C = 0$. (b) Topological phase transitions as a function $C_{AB}$, keeping $\phi_{AB} = 0$ for the phase term when $N = 3$ and $N = 2$ for $\xi = 1$ and $\Delta = 0.01$~eV. We note that for $N = 3$ there is a $C = 3 \rightarrow 2$ transition for the valence bands and from $C =0 \rightarrow -2$ for the conduction bands. For $N = 2$ there is a $C = 2 \rightarrow 1$ transition in the valence bands and from $C = 0 \rightarrow -1$ for the conduction bands. (c) The Berry curvatures for the three valence bands giving the different Chern numbers. The closure of the band gap associated with the topological phase transitions can be identified to take place between $\tilde K^{\prime}$ and $\tilde K$. (d) Fermi surface contours at the vHS for the low energy valence and conduction bands where we can observe breaking of triangular rotational symmetry when $C_{\rm AB} \neq 0$. } \label{elect} \end{figure} \begin{figure}[t] \label{schematic} \includegraphics[width=8.5cm,angle=0]{figure2.pdf} \caption{(color online) The local density of states (LDOS, $D({\vec{r}}, E)$) along with the total density of states (DOS, $D(E)$ ) projected vertically to account the LDOS with respect to the inclusion of off-diagonal term in the moire Hamiltonian in TLG/BN. For $\xi =1$ with $\Delta = 0.01$ eV, the LDOS and DOS are obtained for different off-diagonal terms ($C_{AB} = 0, 0.007, 0.01$ eV), that are discussed in Fig.~\ref{elect}. The real space representation of the normalized LDOS ($\tilde{D}({\vec{r}}, E)$) is presented for each Van Hove singularity (vHS) at the valence and conduction bands $C_{AB} = 0$, and for the cases when $C_{AB} \ne 0$ we calculate their differences $\delta\tilde{D}({\vec{r}}, E) = \tilde{D}_{C_{AB} \ne 0}({\vec{r}}, E) -\tilde{D}_{C_{AB} = 0}({\vec{r}}, E)$. The normalized LDOS is defined as $\tilde{D}({\vec{r}}, E) = D({\vec{r}}, E)$/max$[D({\vec{r}}, E)]$ and we have plotted them at the van Hove singularity energies $E = E_{vHS}$.} \label{ldos} \end{figure} \begin{figure*}[t] \label{schematic} \includegraphics[width=18cm,angle=0]{figure3.pdf} \caption{(color online) The valley Chern number phase diagrams for the low energy conduction and valence bands of $N$-layer graphene boron nitride moire superlattices in the parameter space that defines the strength and shape of off-diagonal terms through the parameters ($C_{AB}$ ($0 \sim 0.025$)~eV and $\phi_{AB}$ ($0^{\circ} \sim 180^{\circ}$)) in the moire Hamiltonian. The valley Chern number phase diagrams are obtained for $\xi =1$ (top panels) and $\xi = -1$ (bottom panels) with $N= 3$ (left), $N = 2$ (middle) and $N = 1$ (right).} \label{fig:Chern} \end{figure*} \section{Results and Discussions} Here we present the electronic structure of ABC multilayer graphene on hBN under the effect of an off-diagonal moire pattern term in Eq.~(\ref{vecpot}) by allowing variations of the parameters between $C_{AB} = 0 \sim 0.025$~eV and $\phi_{AB} = 0 \sim \pi$ for $N=1,2,3$ systems. We have verified that changing the diagonal moire parameters alone in a similar range of magnitude and phase did not modify the valley Chern numbers of the low energy bands which are 0 or $N$. In the following we assess the impact of this term in particular in the valley Chern number of the low energy bands for fixed diagonal moire patterns and discuss the real-space anisotropies introduced in the local density of states. \subsection{Topological phase transitions in the low energy bands}\label{sec:Topology} The main finding in this work is that the introduction of an off-diagonal interlayer coherence moire patterm term through a finite $C_{AB} \neq 0$ can switch the valley Chern number of the low energy bands in the system as we illustrate in Fig.~\ref{elect}, where the vector moire potential term $H_{\xi}^{A} (\vec{d})$ defines a pseudospin field on the graphene layer contacting hBN. The inclusion of off-diagonal terms causes significant changes in the electronic structure and triggers topological phase transitions, as shown in Fig.~\ref{elect}(a). The band structures for $N = 3$ (TLG/BN) were obtained with $\xi = 1$ with a constant value of interlayer potential difference $\Delta = 0.01$~eV. The continuous variation of the $C_{AB}$ term with $\phi_{AB} = 0$ leads to a gap closure between the low energy valence band and the higher energy bands between $\tilde{K}$ and $\tilde{K^{\prime}}$ for a value of $C_{AB} = $ 0.007 eV, and the gap reopens for larger values of $C_{AB}$ as shown in Fig.~\ref{elect}(a). Under the electric field, the gap at the primary Dirac point and the avoided gaps at the moire mini-Brillouin-zone (mBZ) boundaries isolate the low-energy bands near charge neutrality. Introduction of a finite $C_{AB}$ parameter also breaks the triangular rotational symmetry of the moire Brillouin zone that can be visualized in the Berry curvature distribution in Fig.~\ref{elect}(b). The Berry curvatures of the low energy $n^{th}$ low-energy bands are calculated through~\cite{rmp_berry} \begin{equation} \Omega_n (\vec{k}) = -2 \sum_{n' \neq n} Im \left[ \langle u_n | \frac{\partial H}{ \partial k_x} | u_{n'} \rangle \langle u_{n'} | \frac{\partial H}{ \partial k_y} | u_{n} \rangle / \left( E_{n'} - E_n \right)^2 \right], \end{equation} \noindent where, for every $k$-point, we obtain sums through all the neighboring $n'$ bands; $| u_n \rangle$ are the moire superlattice Bloch states, and $E_n$ are the eigenvalues. Based on the Berry curvature, the valley Chern number of the $n^{th}$ band is obtained from $C = \int {\rm d^2} \vec{k} \,\, \Omega_{n}(\vec{k})/(2\pi)$ integrated in the moire Brillouin zone. The Berry curvatures for the valence band for three values of $C_{AB}$ (before, after and at the transition) are compared in Fig.~\ref{elect}(b). Band closure between the low energy and higher energy bands is observed between moire Brillouin zone corners $\tilde K^{\prime}_{1} = 2\pi(-\frac{2}{3}, \frac{1}{\sqrt{3}})$ and $\tilde K_{1} = 2\pi(\frac{1}{3}, \frac{1}{\sqrt{3}})$, and is absent between another set of $\tilde K^{\prime}_{2} = 2\pi(\frac{2}{3}, 0)$ and $\tilde K_{2} = 2\pi(\frac{1}{3}, \frac{1}{\sqrt{3}})$ in the mBZ. This asymmetry between the initially equivalent $\tilde{K}_1$ and $\tilde{K}_2$ or $\tilde{K}^{\prime}_1$ and $\tilde{K}^{\prime}_2$ mini-valleys indicates the rotational symmetry breaking introduced by the $C_{AB}$ term. The band closure as a function of $C_{AB}$ indicates a possible topological transition of the bands. Indeed, the valley Chern number $C = 3$ with $C_{AB} = 0$ has changed to $C = 2$ after the band closure and re-opening. We present the low energy bands valley Chern numbers in Fig.~\ref{elect}(c), where the valley Chern number very near the band closure point ($C_{AB}$ = 0.007 eV) is $C = 0$. The conduction band valley Chern number undergoes a transition from $C = 0$ to a non-zero valley Chern number $C = -2$ as shown in Fig.~\ref{elect} (c). For $\xi = 1$ hBN alignment and $N=2$ bilayer graphene (BG/BN) where we allow $C_{AB}$ to change while keeping $\phi_{AB}$ = 0 we see that the valence band exhibits a topological phase transition from $C = 2$ to $C = 1$ as shown in Fig.~\ref{elect}(d). However, for $N =1$ monolayer graphene aligned with hBN (G/BN) the valence band retains the same valley Chern number of $C = 1$ even with increasing values of $C_{AB}$. \subsection{Broken rotational symmetry nematic local density of states}\label{sec:ldos} We had shown in Fig.~\ref{elect} for a particular case of TLG/BN with $\xi = 1$ and $\Delta = 0.01$~eV that the addition of an off-diagonal term in the moire Hamiltonian can trigger a topological phase transition. Here we report calculations of local density of states (LDOS) in order to distinguish how the added off-diagonal terms can modify the LDOS profile $D(\vec{r}, {E})$. In Fig.~\ref{ldos} we show the LDOS and density of states (DOS) for the low energy valence and conduction bands for theree values of $C_{AB}$, namely 0, 0.007, and 0.01~eV. The van Hove singularities in the DOS near the charge neutrality indicate the presence of flat bands. The conduction band has a localization at BA stacking, whereas the valence band has localization at AA stacking. With a finite off diagonal term $C_{AB} \ne 0$ the vHS peak is broadened slightly but the localization remains at the same stacking as illustrated in the LDOS plots. We use the normalized LDOS defined as $\tilde{D}(\vec{r}, E) = D(\vec{r}, E)$/max$[D(\vec{r}, E)]$ in our plots and find the influence of off-diagonal moire $C_{AB}$ term on the LDOS map through the difference $\delta\tilde{D}(\vec{r}, E) = \tilde{D}_{C_{AB} \ne 0}(\vec{r}, E) -\tilde{D}_{C_{AB} = 0}(\vec{r}, E)$. This quantity shows how the inclusion of a finite off-diagonal term leads to anisotropic LDOS profiles and breaks the triangular rotational symmetry of the solutions. \subsection{Pattern shape dependent Chern number phase diagrams}\label{sec:Chern_Phase} The moire pattern shapes that mix inversion symmetric and asymmetric components can be calibrated through the phase parameter $\phi$ that in turn controls the shapes of the triangular moire patterns in the first harmonic expansion, see the appendix for more details. In Fig.~\ref{elect} we had noted the change in the valley Chern numbers with $C_{AB} \neq 0$ and $\phi_{AB} =0$ combinations. However, there could be additional valley Chern number phases when $\phi_{AB}$ is allowed to take a finite value. Indeed, we find this is the case and we have presented in Fig.~\ref{fig:Chern} the valley Chern number phase diagram in the parameter space of $C_{AB} = 0 \sim 0.025$~eV and $\phi_{AB} = 0 \sim \pi$ for TLG/BN, BG/BN and G/BN as concrete examples of $N$-chiral systems up to three layers. The results markedly depend on the orientation of the BN layer and for $\xi = 1$ we generally obtain nonzero valley Chern number equal to $C = N$ while the conduction band is trivial with $C = 0$ for $N = 1, 2, 3$. When we change the orientation of the substrate moire pattern by setting $\xi = -1$ the conduction band becomes non-trivial acquiring an opposite sign valley Chern number $C = -N$, while the valence band acquires $C = 0$. It is noted that the valley Chern number of the valence/conduction bands are sensitive to both the off-diagonal parameters $C_{AB} \ne 0$ and $\phi_{AB} \ne 0$ provided that the former is sufficiently large and allows for additional valley Chern number transitions for both initially trivial and non-trivial bands. In the case of TLG/BN, $N = 3$ with $\xi = 1$, the valley Chern number of the valence (conduction) band is $C = 3 \, (0)$ for $C_{AB}$ = 0. The valley Chern number of the valence (conduction) band changed to $C = 2 \, (-2)$ for sufficiently large $C_{AB}$ with $\phi_{AB}$ = 0. For $\xi = -1$, the valley Chern number of valence (conduction) band is $C = 0 \, (-3)$ for $C_{AB}$ = 0, and changed to $C = 1 \, (-2)$ with increasing value of $C_{AB}$. Similarly, for BG/BN, $N = 2$ with $\xi = 1$ the valence (conduction) band has a phase transition from $C = 2 \, (0)$ to $C = 1\, (-1)$. However, with $\xi = -1$, the valence/conduction band shows a transition from $C = 0\, (-2)$ to $C = -1\, (-1)$. For G/BN, $N = 1$ with $\xi = 1$, the valence/conduction band has a valley Chern number $C = 1\,(0)$. Even though the valley Chern number of the valence band did not change with increasing $C_{AB}$, the conduction band valley Chern number changed to $C = 1$. For the case of $\xi = -1$, the valence band valley Chern number remains unchanged while it does change for the conduction band when we modify $C_{AB}$. \section{Summary and discussion}\label{sec:conclu} We have explored the phase diagram map for the valley Chern numbers of the low energy valence and conduction bands of rhombohedral $N=1,2,3$ layer graphene boron-nitride superlattices for different moire patterns. The intra-sublattice diagonal moire patterns produces low energy bands whose valley Chern number magnitudes are zero or proportional to layer number $N$. The absolute value of the maximum valley Chern number followed the number of graphene layers $N = 1, 2, 3$ for all possible moire patterns within the first harmonic approximation. For zero off-diagonal patterns we find that the valence band has a valley Chern number equal to the number of layers $C = N$ when $\xi = 1$, while the conduction band is $C = -N$ when $\xi = -1$. However, introduction of off-diagonal interlayer coherence moire pattern terms captured through the magnitude $C_{AB}$ and phase $\phi_{AB}$ parameters allows to trigger topological phase transitions giving rise to valley Chern numbers that are smaller than the number of layers, a behavior that can be traced mainly to the variations in the electron-hole secondary Chern weights near the moire Brillouin zone boundaries. Thus, experimentally observed quantum anomalous Hall effects in TLG/BN~\cite{Nat_TLGBN} compatible with $C=2$ rather than the expected $C= 3$ from layer number could result from rotational symmetry breaking interlayer coherence terms introduced by the Coulomb interactions. Our model off-diagonal contributions could also result from higher order corrections of the moire potentials mediated by interlayer tunneling. Broken rotational symmetry in the mBZ upon inclusion of off-diagonal terms in the Hamiltonian is evidenced from the Berry curvature distribution in momentum space and the LDOS maps. In summary, we have presented valley Chern number phase diagrams in the parameter space that defines the off-diagonal moire pattern of the model Hamiltonian of rhombohedral $N$-chiral multilayer graphene subject to moire scalar and vector potentials. The vector potential moire patterns which are often ignored in the low energy Hamiltonian models of $N$-chiral multilayer graphene BN superlattices turned out to play a more prominent role than the scalar potentials for triggering topological transitions to phases with valley Chern numbers that are different to those dictated by layer number. Our results points to the possibility of triggering topological phase transitions by breaking the triangular rotational symmetry through pseudomagnetic field vector potentials generated by moire strain patterns. These can result for example from real strain fields whose bond distortions give rise to unequal electron hopping probabilities to the neighboring atoms, or from virtual effective strains due to high order interlayer electron hopping processes or Coulomb interactions. \begin{acknowledgments} D.A.G.G. acknowledges partial support from the Universidad de Antioquia, Colombia, under initiative CODI ES84180154 \textit{Estrategia de sostenibilidad del Grupo de F\'{\i}sica At\'omica y Molecular} and projects CODI-251594 and 2019-24770. Additionally, the authors are grateful to Professor Dr. Jorge Mahecha from the University of Antioquia for his advice and assistance in this work. We acknowledge financial support from the National Research Foundation of Korea (NRF) through grants NRF-2020R1A2C3009142 for B.L.C., NRF-2020R1A5A1016518 for Y. P., the Zhejiang Provincial Natural Science Foundation of China (Grant No. LY19A040003) for J. H. S., and the Basic study and Urban convergence R\&D research fund of the University of Seoul (2019) for J. J. We acknowledge computational support from KISTI through grant KSC-2020-CRE-0072. \end{acknowledgments} \bibliographystyle{apsrev4-1}
\section{Introduction} After receiving paper reviews, authors may optionally submit a rebuttal to address the reviewers' comments, which will be limited to a {\bf one page} PDF file. Please follow the steps and style guidelines outlined below for submitting your author response. Note that the author rebuttal is optional and, following similar guidelines to previous CVPR conferences, it is meant to provide you with an opportunity to rebut factual errors or to supply additional information requested by the reviewers. It is NOT intended to add new contributions (theorems, algorithms, experiments) that were not included in the original submission. You may optionally add a figure, graph or proof to your rebuttal to better illustrate your answer to the reviewers' comments. Per a passed 2018 PAMI-TC motion, reviewers should not request additional experiments for the rebuttal, or penalize authors for lack of additional experiments. This includes any experiments that involve running code, e.g., to create tables or figures with new results. \textbf{Authors should not include new experimental results in the rebuttal}, and reviewers should discount any such results when making their final recommendation. Authors may include figures with illustrations or comparison tables of results reported in the submission/supplemental material or in other papers. The rebuttal must adhere to the same blind-submission as the original submission and must comply with this rebuttal-formatted template. \subsection{Response length} Author responses must be no longer than 1 page in length including any references and figures. Overlength responses will simply not be reviewed. This includes responses where the margins and formatting are deemed to have been significantly altered from those laid down by this style guide. Note that this \LaTeX\ guide already sets figure captions and references in a smaller font. \section{Formatting your Response} {\bf Make sure to update the paper title and paper ID in the appropriate place in the tex file.} All text must be in a two-column format. The total allowable width of the text area is $6\frac78$ inches (17.5 cm) wide by $8\frac78$ inches (22.54 cm) high. Columns are to be $3\frac14$ inches (8.25 cm) wide, with a $\frac{5}{16}$ inch (0.8 cm) space between them. The top margin should begin 1.0 inch (2.54 cm) from the top edge of the page. The bottom margin should be 1-1/8 inches (2.86 cm) from the bottom edge of the page for $8.5 \times 11$-inch paper; for A4 paper, approximately 1-5/8 inches (4.13 cm) from the bottom edge of the page. Please number all of your sections and any displayed equations. It is important for readers to be able to refer to any particular equation. Wherever Times is specified, Times Roman may also be used. Main text should be in 10-point Times, single-spaced. Section headings should be in 10 or 12 point Times. All paragraphs should be indented 1 pica (approx. 1/6 inch or 0.422 cm). Figure and table captions should be 9-point Roman type as in Figure~\ref{fig:onecol}. List and number all bibliographical references in 9-point Times, single-spaced, at the end of your response. When referenced in the text, enclose the citation number in square brackets, for example~\cite{Authors14}. Where appropriate, include the name(s) of editors of referenced books. \begin{figure}[t] \begin{center} \fbox{\rule{0pt}{1in} \rule{0.9\linewidth}{0pt}} \end{center} \caption{Example of caption. It is set in Roman so that mathematics (always set in Roman: $B \sin A = A \sin B$) may be included without an ugly clash.} \label{fig:long} \label{fig:onecol} \end{figure} \subsection{Illustrations, graphs, and photographs} All graphics should be centered. Please ensure that any point you wish to make is resolvable in a printed copy of the response. Resize fonts in figures to match the font in the body text, and choose line widths which render effectively in print. Many readers (and reviewers), even of an electronic copy, will choose to print your response in order to read it. You cannot insist that they do otherwise, and therefore must not assume that they can zoom in to see tiny details on a graphic. When placing figures in \LaTeX, it's almost always best to use \verb+\includegraphics+, and to specify the figure width as a multiple of the line width as in the example below {\small\begin{verbatim} \usepackage[dvips]{graphicx} ... \includegraphics[width=0.8\linewidth] {myfile.eps} \end{verbatim} } {\small \bibliographystyle{ieee_fullname} \section{Introduction} Robot navigation guided by visual information, namely, simultaneous localization and mapping (SfM), primarily involves estimating and updating the camera trajectory dynamically. {\it Pose graph optimization}, as a fundamental element in SfM, devotes to iteratively fix the erroneous calculation of the camera poses due to the noisy input and misplaced data association. Conventional pose graph optimization techniques are principally fulfilled with bundle adjustment (BA), which refines camera poses by progressively minimizing the point-camera re-projection errors. Fused by state-of-the-art nonlinear programming algorithms, \emph{e.g}\onedot} \def\Eg{\emph{E.g}\onedot, Levenberg-Marquardt method~\cite{Levenberg1944}, Gauss-Newton method, \emph{etc}\onedot} \def\vs{\emph{vs}\onedot, the camera poses and map points are successively optimized according to the sequential input images. Motion averaging has attracted surging research interests in the 3D vision field most recently, especially on structure-from-motion (SfM) related tasks. In contrast with BA-based approaches which mainly leverage point-camera correspondences, global motion averaging aim to recover the camera poses by solving the synchronization problem, \emph{i.e}\onedot} \def\Ie{\emph{I.e}\onedot, to achieve a set of camera orientations and locations which are consistent with the pairwise measurements between them. General motion averaging pipelines involve two steps: the rotation averaging based on the epipolar geometric correlation, followed by the translation averaging where the camera orientations are the solver to the previous step and considered fixed. Translation averaging is well-known to be a convex problem and all the stationary points are thus global optimal solution. However, analogous statements on robustness of existing methods are still lacking in the rotation averaging study. We aim to show that given cycle consistency constraints, \emph{i.e}\onedot} \def\Ie{\emph{I.e}\onedot, progressively the relative rotations on a cycle structure should end with identity, the local iterative method on multiple rotation averaging problem can be initialized in a more robust manner. It is well known that Lie groups are sensitive to perturbations, even small noise on few elements in the rotation matrix can result in completely different rotations. Due to the nature of multiple rotation averaging problem, however, the measurements are normally noisy. In viewgraph of large-scale problems, the measurement noise on some edges can propagate progressively over the entire graph, resulting in unsatisfactory solutions. Moreover, for multiple rotation averaging, there does not exist a canonical direct solver and all iterative solvers rely heavily on a reasonably well initialization, convergence of the iterative solver tends to be excessively slow or eventually fails to converge. In this work, we address all the issues mentioned above by introducing the measurement de-noising (or measurement reweighting), which is conducted before initiating the IRLS solver. Imposing the cycle consistency is essentially conducting single rotation averaging over the cyclic sub-graph. Within each cycle, the deviation of the erroneous edge is constrained by redundant measurements and hereafter diluted by allowing a set of weights on all the edges. These edge weights will then be normalized within the scale of the whole graph and exploited as the initialization in the latter IRLS iterations. Furthermore, we exploit a novel cost function in the IRLS steps such that the penalty on the erroneous measurements changes accordingly. To validate our approach, we conduct experiments on challenging collections of unordered internet photos of various sizes and demonstrate that our proposed scheme yields similar or higher accuracy than state-of-the-art results. In summary, the key contributions of our paper are: \begin{itemize} \item We propose a robust framework to exactly recover a consistent set of camera poses in the presence of a significant amount of noisy measurements and/or outliers in SfM problems. \item We show that with desired connectivity on a graph, the noisy measurements can be guaranteed to yield an error upper bound \item We address the issues arising for existing multiple rotation averaging approaches. In particular, we demonstrate the conditions under which multiple rotation averaging schemes may fail. \end{itemize} \section{Related Work} Camera pose estimation lies in the heart of monocular SfM systems, whereas the camera orientation and translation optimization consist the camera pose refinement process. Compared with conventional BA-based approaches where re-projection errors are iteratively minimized, approaches fused by rotation averaging methods have been recently proven more efficient yielding comparable or higher accuracy which greatly benefit real-time applications with limited computational power. Rotation averaging has been first introduced into 3D vision by~\cite{govindu2001combining} where the authors exploit Lie-algebraic averaging and propose an efficient and robust solver for large-scale rotation averaging problems, and was later studied in~\cite{moakher2002means}. Outperformance with the motion averaging backbone against canonical approaches stimulates numerous SfM frameworks~\cite{cui2015, zhu2018, zhu2017parallel, cui2017hsfm, Li20Hybrid, martinec2007robust, locherprogsfm}, whereas global motion averaging is conducted to simultaneously solve all camera orientations from inter-camera relative motions. In~\cite{cui2017hsfm}, the authors develop a camera clustering algorithm and present a hybrid pipeline applying the parallel-processed local increment into global motion averaging framework. Similarly, in~\cite{zhu2018}, distributed large-scale motion averaging is addressed. In~\cite{Li20Hybrid}, a hybrid camera estimation pipeline is proposed where the dense data association introduces a single rotation averaging scheme into visual SfM. Rotation averaging~\cite{hartley2013rotation} has shown improved robustness compared with canonical BA-based approaches in numerous aspects. For instance, proper initialization plays a vital role in equipping a sufficiently stable monocular system ~\cite{tang2017gslam}, while~\cite{carlone2015initialization} addresses the initialization problem for 3D pose graph optimization and survey 3D rotation estimation techniques, where the proposed initialization demonstrates superior noise resilience. In~\cite{chatterjee2013efficient} and~\cite{chatterjee2018robust} the process is initialized by optimizing a $l_1$ loss function to guarantee a reasonable initial estimate. It has also been shown in 567 that estimating rotations separately and initialize the 2D pose graph with the measurements provide improved accuracy and higher robustness. In\cite{kneip2012finding, kneip2014efficient} it has been exploited that camera rotation can be computed independent of translation given specific epipolar constraints. It is well known that monocular SfM is sensitive to outliers and many robust approaches~\cite{govindu2006robustness, yang2020graduated, enqvist2011non, kahl2008multiple} have thus been designed to better handle the noisy measurements. Moreover, Lagrangian duality has been reconciled in recent literature~\cite{fredriksson2012simultaneous, briales2018certifiably, carlone2015lagrangian} to address the solution optimality. A recent paper~\cite{eriksson2018rotation} shows that certifiably global optimality is obtainable by utilizing Lagrangian duality to handle the quadratic non-convex rotation constrains~\cite{wilson2016rotations} and further derives the analytical error bound in the rotation averaging framework. Recent work~\cite{bustos2019} and~\cite{Li20Hybrid} attempt to rely solely on rotation averaging without BA to handle SfM tasks. In~\cite{Li20Hybrid}, the authors partition the input sequence into blocks according to the pairwise covisibility and the optimization is processed hierarchically with local BA and global single rotation averaging. While~\cite{Li20Hybrid} yields high accuracy, it is demanding to handle the latency between local and global optimization and the system may suffer time overhead progressively. Recent work~\cite{kasten2019algebraic, kasten2019gpsfm, geifman2020averaging} tackle the multiple rotation averaging problem by exploiting rank constraints on the global fundamental matrices. While the factorization-based methods show high accuracy dealing with large-scale datasets, it is much slower and costly than local iterative solver-based approaches. Our proposed approach falls into the latter category. Inspired by recent work~\cite{lerman2019robust} where an algorithm is proposed to solve group synchronization under significant amounts of corruption or noise, we realize that most iterative solvers for general group synchronization relies heavily on the initialization scheme and thus tends to fail in presence of noisy measurements. Analogous to~\cite{lerman2019robust}, our work also focuses on robustifying the the rotation averaging in noisy scenarios. However,~\cite{lerman2019robust} applies message passing scheme to explicitly estimate the underlying noise levels while we propose to implicitly decrease the weights on the noisy edges by enforcing cycle consistency. Other work utilizing cycle consistency includes~\cite{zach2010disambiguating} and~\cite{shen2016graph}, where~\cite{zach2010disambiguating} proposes to detect corrupted measurements by maximizing log likelihood function and~\cite{shen2016graph} classifies the edges as uncorrupted as long as they belong to any cycle-consistent cycle. In this work, instead of detecting or removing erroneous edge explicitly, we propose to implicitly avoid the negativity brought by the noisy measurements, with enforcing the reweighted graph to be cycle consistent. \section{Theory} \label{sec:theory} \subsection{Definitions and Assumptions} \label{sec:notations} Consider a {\it simple directed graph} $\mathcal{G}:=(\mathcal{V}, \mathcal{E})$, where $\mathcal{V}=[n]=\{1, 2, \cdots, n\}$ denotes the set of {\it vertices}, $\mathcal{E}=\{(i,j)|i\neq j, i, j\in \mathcal{V}\}$ denotes the set of directed {\it edges}. We further associate a set of labels $\{\Lambda, \Sigma\}$ with $\mathcal{G}$ such that a new tuple $\mathcal{H}:=(\mathcal{V}, \mathcal{E}, \lambda, \sigma)$ is constructed in a way that $\lambda:\mathcal{V}\rightarrow \Lambda$, $\sigma: \mathcal{E} \rightarrow \Sigma$. Specifically, as we primarily focus on the synchronization with 3-dimensional rotation groups (\emph{i.e}\onedot} \def\Ie{\emph{I.e}\onedot, $\mathbb{SO}(3)$), we assume $\Lambda \subseteq \mathbb{SO}(3)$ and $\Sigma \subseteq \mathbb{SO}(3)$ unless stated otherwise for the rest of the paper. Furthermore, we assume $(j,i)\in \mathcal{E}$ if and only if $(i,j) \in \mathcal{E}$ for all $i\neq j \in \mathcal{V}$ due to the nature of the problem. We thus have $\sigma (i,j) = \sigma (j,i)^\top = \sigma (j,i)^{-1}$. For ease of notation, we henceforth let $\mathcal{E}$ be the set of {\it undirected} edges associated with ordered labeling $\sigma$. With the notations above, we further clarify the problem as follows. Consider an $n$-view scene with $m$ measurements of relative rigid motions between the cameras. Specifically, node $i \in \mathcal{V}$ in $\mathcal{H}$ denotes the $i^{\text th}$ view, $\lambda(i) \in \mathbb{SO}(3)$ denotes the absolute camera rotation at $i$; $(i,j)\in \mathcal{E}$ if there exists relative transformation measurements between the $i^{\text th}$ view and the $j^{\text th}$ view, where $|\mathcal{V}|=n$, $|\mathcal{E}|=m$. Denote $\tilde{\sigma} (i,j)\in \mathbb{SO}(3)$ for the measurement of relative rotation from $i$ to $j$ (and $\tilde{\sigma} (j,i)$ for the opposite direction) and $\bar{\sigma} (i,j)$ for the corresponding ground truth. The {\it edge measurement error} is denoted by $\epsilon (i,j):=d(\tilde{\sigma}(i,j), \bar{\sigma}(i,j))$, where $d:\mathbb{SO}(3) \times \mathbb{SO}(3) \rightarrow \mathbb{R}_{0}^{+}$ denotes some metric. \begin{definition}[graph consistency] \label{def:graphconsistency} Given a labeled graph $\mathcal{H}=(\mathcal{V}, \mathcal{E}, \lambda, \hat{\sigma})$ and some metric $d$ as defined above. For a given $\lambda$, $\mathcal{H}$ is $\lambda$-consistent if and only if \begin{equation} \begin{aligned} \lambda (i) \cdot \hat{\sigma}(i,j) = \lambda (j),\;\; \forall (i,j)\in \mathcal{E}, \end{aligned} \end{equation} which is equivalent with \begin{equation} \label{eq:sum0} \sum_{(i,j)\in \mathcal{E}} d(\lambda (i)\hat{\sigma}(i,j), \lambda _j)=0. \end{equation} \end{definition} The multiple rotation averaging problem studied in this paper can thus be considered as the group synchronization process, where we recover $\lambda$ by imposing graph consistency on $\mathcal{H}$. Since no direct solver for synchronization on $\mathbb{SO}(3)$ exists, it is conventionally formulated as the optimization problem, which can be solved iteratively. Specifically, Eq.~\ref{eq:sum0} is equivalently as \begin{equation} \label{eq:nocost} \argmin_{\lambda} \sum_{(i,j)\in \mathcal{E}} d(\lambda (i)\hat{\sigma}(i,j), \lambda _j), \end{equation} in practice, Eq.~\ref{eq:nocost} is rarely solved in its original form. Instead, a cost function is often applied into the optimization, equivalently as solving \begin{equation} \label{eq:main} \mathbf{\argmin_{\lambda} \sum_{(i,j)\in \mathcal{E}} \rho (d(\hat{\sigma}(i,j), \lambda _i^{-1} \lambda _j ))}, \end{equation} where $\rho(\cdot)$ is some cost function. In the following analysis, we use {\it geodesic distance} for $d(\cdot, \cdot)$ by convention and $l_1$ cost function for measurement correction as the low penalty makes the solver more robust than the counterparts, we use a convex cost function for IRLS as described in \S\ref{sec:irls}. Refer to \S\ref{sec:ablationnorm} for the comparison of the performances with different cost functions. \begin{figure} \setlength{\belowcaptionskip}{-10pt} \centering \includegraphics[width=\linewidth]{groupcases.png} \caption{Common cases of group synchronization in structure from motion tasks. The coordinates represent cameras with different motion, where solid black lines represent there exists measurable relative motion between the two frames, red dashed lines represent that the measurements of relative motion contain high noise though they are measurable. In (a), the pose-graph does not contain cycles so the error compensation based on cycle consistency cannot be conducted. In (b), the pose-graph contains cycles but the measurements are noise-free. In (c), the pose-graph contains cycles but some of the edges are noisy -- in this paper, we focus on group synchronization in this case.} \label{fig:my_label} \end{figure} To solve Eq.~\ref{eq:main}, we want to first make sure that $\hat{\sigma}$ is reliable to some extent as Eq.~\ref{eq:main} is well-known to be sensitive to measurement outliers. Accordingly, We begin the analysis by introducing cycle consistency. \begin{definition}[cycle consistency] \label{def:cycleconsistency} Given an edge-labeled graph $\mathcal{H}=(\mathcal{V}, \mathcal{E}, \sigma)$ as defined above, for $i\in \mathcal{V}$, denote $\mathcal{C}_i:=\{\mathcal{C}_i^1, \mathcal{C}_i^2, \cdots \}$ for the union of all the cycles containing $i$. Then $\mathcal{H}$ is cycle consistent if and only if \begin{equation} \label{eq:zeroconsistency} \begin{aligned} \sigma(i,i_1)\cdot \prod_{j=1}^{m_k -1} &\sigma({i_j}, i_{j+1}) \cdot \sigma(i_{m_k},i)=\mathbb{I}_\sigma \\ &\forall i\in \mathcal{V}, \forall \mathcal{C}_i^k \in \mathcal{C}_i, \end{aligned} \end{equation} where $m_k = |\mathcal{C}_i^k|$, $\mathbb{I}_\sigma$ denotes the identity mapping under $\sigma$. \end{definition} Generally, cycle consistency implicitly infers that all the edge measurements are precise in the graph, which rarely occurs in reality. Indeed, for most computer vision related tasks, input de-noising is one of the most important steps. For example, camera relative motion measurements are essentially computed with pairwise geometric constraints in common SfM pipelines. Since these constraints are normally derived from the photometric information, such as feature matching, the matching outliers can bring significant noise in the measurements and thus result in corrupted, erroneous edge labelling. Most previous work use RANSAC to detect and remove feature outliers and/or edge outliers, the process itself is, however, extremely costly and slow when the graph is sufficiently large. In this work, we propose to reduce the negative effects of noisy edges to robustify the solver, by implicitly enforcing cycle consistency, with reweighting both the vertices and the edges. Given that a non-trivial multiple rotation averaging problem involves at least one cycle in the pose-graph, we relax Definition~\ref{def:cycleconsistency} into the following. \begin{definition}[$\epsilon$-cycle consistency] \label{def:epsconsistency} Let $\mathcal{H}$, $\mathcal{C}_i$ be defined as in Definition~\ref{def:cycleconsistency}, we say $\mathcal{H}$ is $\epsilon$-cycle consistent if \begin{equation} \label{eq:epsconsistency} \max_{\substack{i\in \mathcal{V}\\ \mathcal{C}_i^k \in \mathcal{C}_i}} d(\sigma(i,i_1)\cdot \prod_{j=1}^{m_k -1} \sigma({i_j}, i_{j+1}) \cdot \sigma(i_{m_k},i),\mathbb{I}_\sigma)\leq \epsilon \end{equation} \end{definition} \begin{figure} \centering \includegraphics[width = 0.65\linewidth]{s3png.png} \caption{Illustration of $\epsilon$-cycle consistency of cycle $(i,j,k)$ with respect to $i$ on the unit 3-sphere embedded in $\mathbb{R}^4$. $\lambda (i)$ is an arbitrary rotation, $\hat{\pi}$ denotes the equivalent transformation of $\hat{\sigma}$ on the manifold. $D(\lambda (i), \epsilon _{\pi})$ denotes the disk on $\mathcal{S}^3$ centered at $\lambda(i)$ with geodesic radius $\epsilon _{\pi}$.} \label{fig:s2sphere} \end{figure} To visualize the geometric meaning of Definition~\ref{def:epsconsistency}, let us consider a unit 3-sphere $\mathcal{S}^3$ and a simple cyclic graph with vertices $(i,j,k)$. Given the mutual relative rotation measurements $\hat{\sigma} (i,j),\hat{\sigma} (j,k),\hat{\sigma} (k,i)$, there exists a set of 3-sphere rotations $\hat{\pi} (i,j), \hat{\pi} (j,k), \hat{\pi} (k,i)$, which are isomorphic to its $\mathbb{SO}(3)$ counterparts\footnote{We are using sloppy notations here, formally, there exists a mapping $\pi:\mathcal{S}^3 \rightarrow \mathcal{S}^3$ such that $\pi \cong \mathbb{SO}(3)$}. As we only consider the relative rotations here, without loss of generality, assume an arbitrary $\lambda (i) \in \mathcal{S}^3$. In this case, $\hat{\lambda} (j)=\lambda (i)\hat{\pi}(i,j)$ is on the 3-sphere and so are the following rotations henceforth. After successive rotations, we arrive at that, it is desired to have $\hat{\lambda}(k) \hat{\pi} (k,i) \in \mathcal{D}(\lambda (i),\epsilon) $, where $\mathcal{D}(p,r):=\{q\in \mathcal{S}^3|d(q,p)\leq r\}$. That is, the computed $\hat{\lambda} (i)$ should locate in the $\epsilon$-disk of $\lambda (i)$ on $\mathcal{S}^3$. See Fig.~\ref{fig:s2sphere} for the visualization. Moreover, now we can rewrite Eq.~\ref{eq:epsconsistency} of $(i,j,k)$ in its sphere form, that is \begin{equation} \label{eq:epspi} d_{\pi}(\hat{\pi}(i,j) + \hat{\pi}(j,k) + \hat{\pi}(j,k), \mathbb{I}_\pi ) \leq \epsilon _{\pi}, \end{equation} where $d_{\pi}, \mathbb{I}_{\pi}, \epsilon _{\pi}$ are defined on $\mathcal{S}^3$ in analogous manner with those defined above on $\mathbb{SO}(3)$. More details on the isomorphism can be found in the supplementary materials. The main reason of exploiting the $\mathcal{S}^3$ isomorphism is that, the proper vector field associated with the sphere enables the reweighting scheme, such that the {\it redundant error distribution} over all measurements in cycles can be efficiently propagated. The weighting can also be uniquely projected back to $\mathbb{SO}(3)$ with $(\alpha ^w, \beta ^w, \gamma ^w)$, where $(\alpha, \beta, \gamma)$ denotes the corresponding Euler angles. \begin{assumption}[reweighted $\epsilon$-cycle consistency condition] \label{assump:cycleconsistency} Given $\mathcal{H}$, for all $(i,j)$ where there exists at least one cycle $\mathcal{C}\subseteq \mathcal{H}$ such that $(i,j) \in \mathcal{E}_{\mathcal{C}}$, there exists a set of weights $w_{ij}$ associated with the measurements such that the $\epsilon$-cycle consistency is satisfied for $\mathcal{H}$, for an arbitrary $\epsilon>0$. Formally, \begin{equation} \label{eq:spherereweight} d_{\pi}(\sum_{(i,j)\in \mathcal{C}} w_{ij}\hat{\pi}(i,j),\mathbb{I}_{\pi})\leq \epsilon _{\pi}, \end{equation} equivalently with \begin{equation} \label{eq:rotationreweight} d( \prod_{(i,j)\in \mathcal{C}\setminus (k,i)} \hat{\sigma}^w(i,j) \cdot \hat{\sigma}^w(k,i),\mathbb{I}_\sigma)\leq \epsilon. \end{equation} \end{assumption} \subsection{Theoretical Results} \label{sec:theoreticalresults} In the following analysis, we assume that $\mathcal{H}$ is connected though it may not hold valid in generalized group synchronization problem. In SfM tasks, isolate vertices in pose-graph rarely occur and will be discarded whence they do. Indeed, we further assume there are more than ${m}/{2}$ edges which are contained in at least one cycle, where $m=|\mathcal{E}|$. We summarize the assumptions and have the following proposition. \begin{proposition} \label{prop:weightexistence} Given a connected $\mathcal{H}$ with $|\mathcal{E}|=m$, assume that there are $p(>\frac{m}{2})$ edges which are contained in at least one cycle and denote the set of the edges as $\mathcal{E}_p$. Then if Assumption~\ref{assump:cycleconsistency} holds for given $\epsilon$, there exists $\{w_{ij}\}$ such that \begin{equation} w_{ij} d(\hat{\sigma} (i,j), \lambda _i^{-1}\lambda _j ) < \epsilon, \;\; \forall (i,j) \in \mathcal{E}_p . \end{equation} \end{proposition} \begin{proof} Assume that there does not exist self-consistent corrupted cycle, then for a given edge $(i,j)$, within any cycle $\mathcal{C}\subseteq \mathcal{H}$ that contains $(i,j)$, Assumption~\ref{assump:cycleconsistency} gives that \begin{equation} d( \prod_{(i,j)\in \mathcal{C}\setminus (k,i)} \hat{\sigma}^w(i,j) \cdot \hat{\sigma}^w(k,i),\mathbb{I}_\sigma)\leq \epsilon., \end{equation} equivalent with \begin{equation} d( \lambda (i)\prod_{(i,j)\in \mathcal{C}\setminus (k,i)} \hat{\sigma}^w(i,j) \cdot \hat{\sigma}^w(k,i),\lambda (i))\leq \epsilon. \end{equation} for any $\lambda(i)$ as defined. Denote $\delta _{ij}$ for the deviation error on edge $(i,j)$, then given the error upper bound, the worst case scenario for $\delta _{ij}$ is that $\delta _{rs}=0$ for any other $(r,s)\in \mathcal{C}$, \emph{i.e}\onedot} \def\Ie{\emph{I.e}\onedot , $\hat{\sigma}^w (r,s)=\hat{\sigma} (r,s)=\sigma (r,s)$, where the weights on all other edges are trivial. The inequality above can thus be rewritten into \begin{equation} d(\lambda (j) \hat{\sigma}^w (j,i), \lambda (i)) =w_{ij}d( \hat{\sigma} (j,i), \lambda (i)\lambda (j)^{-1})\leq \epsilon. \end{equation} \end{proof} \begin{lemma} Let $\mathcal{H}$ be as defined in Prop.~\ref{prop:weightexistence}, then the $(m-p)$ `acyclic' edges must belong to some tree with root contained in $\mathcal{V}_p$, where $\mathcal{V}_p:=\{i\in \mathcal{H}|\exists j\in \mathcal{H} \;{\text s.t. }(i,j)\in \mathcal{E}_p\}$. \end{lemma} The lemma above immediately leads to the fact that, only the optimizations conducted on $\mathcal{H}_p$ is effective due to the lack of measurement redundancy in $\mathcal{H}_{n \setminus p}$, \emph{i.e}\onedot} \def\Ie{\emph{I.e}\onedot, the cost function on $\mathcal{H}_{n \setminus p}$ can always be made zero (\emph{i.e}\onedot} \def\Ie{\emph{I.e}\onedot trivial optimization). We summarize the observation into the following lemma. \begin{lemma} Let $\mathcal{H}$ and $\mathcal{E}_p$ be as defined in Prop.~\ref{prop:weightexistence}, then solving Eq.~\ref{eq:main} on $\mathcal{H}$ is equivalent with that on $\mathcal{H}_p:=(\mathcal{V}_p, \mathcal{E}_p, \lambda, \sigma)$. \end{lemma} Combining Prop.~\ref{prop:weightexistence} and the lemmas above, we make the following claim on the convexity of solving Eq.~\ref{eq:main}. \begin{theorem}[local convexity] \label{thm:localconvexity} The multiple rotation averaging problem defined on $\mathcal{H}^w$ is equivalent with that defined on $\mathcal{H}_p^w$, and locally convex everywhere on the domain of some cost function $\rho$ if $p\geq c(1-\epsilon)^q n$, where $c,q>0$ depends on $\rho$, $\mathcal{H}^w$ is the reweighted $\mathcal{H}$ according to Prop.~\ref{prop:weightexistence}, defined as $\mathcal{H}^w:=(\mathcal{V}, \mathcal{E}^w, \hat{\sigma}, \lambda)$. \end{theorem} To avoid the ambiguity in notations, note that $(\mathcal{V}, \mathcal{E}^w, \hat{\sigma})$ is equivalent with $(\mathcal{V}, \mathcal{E}, \hat{\sigma}^w)$ with the weights defined in different subspaces. It has been well proven that the (local) convexity of the rotation averaging problem depends on the graph connectedness and the noise level of the input measurements. Intuitively, it is more difficult to achieve the solver optima with a weakly-connected graph\footnote{Note that the weak-connectedness here means that not sufficiently many vertices are connected, which is not the same with that in general graph theory terms.} and a large number of erroneous measurements. Moreover, consider an edge $(i,j)$ which is present in $k$ cycles in $\mathcal{H}$, then the weighted measurement $\hat{\sigma}^w(i,j)$ essentially gets closer to the noise-free ground truth $\sigma^* (i,j)$ as $k$ increases. Detailed proofs to Thm.~\ref{thm:localconvexity} is provided in the supplementary materials. Given the local convexity given by Thm.~\ref{thm:localconvexity}, it immediately follows that there exists a globally optimal solution to the objective function with some cost function $\rho$, which leads to the following statement. \begin{theorem}[cost function] Consider the optimization problem defined in Eq.~\ref{eq:nocost}, denote $\lambda ^*$ as the optimal solution set. Then there exists a convex, differentiable $\rho :\mathbb{R} \rightarrow \mathbb{R}$ such that Eq.~\ref{eq:main} converges to $\lambda _{\rho}^* \sim \lambda ^*$ with equality up to a global action. \end{theorem} In developing the iteration updates, $l_1$ and $l_2$ cost functions have been prevailing in the previous approaches. Among which $l_1$ shows a stronger robustness in handling the problem of noisy or corrupted nature, but it tends to take significantly long time when dealing with large-scale problems. While $l_2$ cost function shows a superior convergence speed, $l_2$-type cost functions are more sensitive to outliers as the gradient for general $l_2$ cost is unbounded. In our approach, we use $\rho(x) = x \exp(\tau x)$ as the cost function, where $\tau$ represents the penalty parameter. Derivation of the update rules according to conventional IRLS algorithm are given in \S~\ref{sec:irls}. \section{Method} In this section we introduce the optimization scheme we propose to solve the multiple rotation averaging problem with addressing on the measurement correction. Specifically, we first depict the measurement de-noising algorithm owing to the cycle consistency constraints introduced in \S\ref{sec:measurement}, followed by the implementation of the IRLS solver in our proposed scheme, described in \S\ref{sec:irls}. \subsection{Measurement De-noising with Cycle Consistency Constraints} \label{sec:measurement} Recall Assumption~\ref{assump:cycleconsistency} where we presume that $\mathcal{H}$ is equipped with $\epsilon$-cycle consistency in solving Eq.~\ref{eq:main}. By enforcing cycle consistency, the latter solver (\emph{e.g}\onedot} \def\Eg{\emph{E.g}\onedot IRLS, ADMM, \emph{etc}\onedot} \def\vs{\emph{vs}\onedot) benefits significantly for the following reasons. First, Lie groups are well-known to be sensitive to perturbations, \emph{i.e}\onedot} \def\Ie{\emph{I.e}\onedot, even small noise on few elements in the rotation matrix can result in completely different rotations. Due to the nature of the multiple rotation averaging problem, however, the measurements are normally noisy. In viewgraph of large-scale problems, the measurement noise on some edges can propagate progressively over the whole graph, resulting in unsatisfactory solutions. Moreover, for multiple rotation averaging, there does not exist a canonical direct solver and all iterative solvers rely heavily on a reasonably well initialization. With severely noisy measurements and a trivial set of initialization, convergence of the iterative solver tends to be excessively slow or eventually fails to converge. In this work, we address all the issues mentioned above by introducing the measurement de-noising (or measurement reweighting), which is conducted before initiating the IRLS solver. Imposing the cycle consistency is essentially conducting single rotation averaging over the cyclic sub-graph. Within each cycle, the deviation of the erroneous edge is constrained by redundant measurements and hereafter diluted by allowing a set of weights on all the edges. These edge weights will then be normalized within the scale of the whole graph and exploited as the initialization in the latter IRLS iterations. In details, given a graph $\mathcal{H}$ with relative rotation measurements as group ratios, we first conduct cycle detection to find the set of cycles $\mathcal{C}:=\{\mathcal{C}_k|\mathcal{C}_k \subseteq \mathcal{H}\}$. As a cycle might contain a large number of edges and the computation is excessively costly, in practice, we instead randomly pick three vertices for $\lfloor \sqrt{|\mathcal{V}_{\mathcal{C}_k}|} \rfloor$ times. Assume, for example, $i,j,k \in \mathcal{V}_{\mathcal{C}_k}$ are selected in an iteration, then $\hat{\sigma}(i,j) = \prod _{(r,s)\in path_i^j} \hat{\sigma} (r,s)$, where path$_i^j$ denotes the connected edge from $i$ to $j$ and we denote $\hat{\sigma} (j,k)$ and $\hat{\sigma} (k,i)$ in the same manner. With the weights computed as depicted in \S\ref{sec:notations}, we end up with `triangle consistency' with the current vertices. These weights are then propagated along the corresponding path with scale normalization. In the experiments we simply take the path weight average over the degree of the path and achieve a satisfactory weight initialization. In the weight solution, we use $l_1$ norm for the residual computation to further increase the robustness of our proposed scheme. In contrast with edge removal schemes, we implicitly penalize the erroneous measurements by imposing smaller weights on them, as to avoid the high computational costs in edge noise removal. It is common for an edge to appear in multiple cycles, in this case, the final edge weight is calculated with the weighted mean with respect to the according cycle sizes, \emph{i.e}\onedot} \def\Ie{\emph{I.e}\onedot , consider an edge $(i,j)$ such that there is a weight set $\{w_{ij}^k\}$ for $(i,j)$ according to cycle consistency in different $\mathcal{C}_k$'s, then the final weight for $(i,j)$ is \begin{equation} w_{ij} = \sum _k |\mathcal{E}_{\mathcal{C}_k}|w_{ij}^k / \sum _k |\mathcal{E}_{\mathcal{C}_k}|. \end{equation} \subsection{IRLS Optimization} \label{sec:irls} To solve Eq.~\ref{eq:main}, we exploit the conventional IRLS solver with the cost function $\rho(x) = x \exp (\tau x)$. As we mentioned before, it is well-known that the solution accuracy and convergence speed both rely heavily on the initialization. Since we already have a set of reasonable weights owing to enforcing cycle consistency, our solver is significantly more robust than previous work solely with RANSAC filtration. Comparisons with the RANSAC-based initialization schemes are provided in \S\ref{sec:ablationconsistency}. Now we briefly describe the update rule we employ in constructing the IRLS solver, the full derivation is provided in the supplementary materials. The algorithm is provided in Alg.~\ref{alg:MRAIRLS}. \begin{algorithm}[h!] \SetAlgoLined \textbf{Input:} Set of relative transformations measurements $\{\hat{\sigma} (i,j)\}$, threshold $\alpha$\; \textbf{Output:} Set of absolute rotation $\{\lambda _i\}$\; \textbf{Initialization:} Set residual $res =10^8$, iteration number $k=1$, $\tau = 1$, $\{\lambda _i\}$ = identity matrix, $w_{ij}$ from cycle consistency step\; \While{$res>\alpha$}{ 1. $k = k+1$\; 2. $\delta _{ij} = \delta _j^{-1} \lambda _j ^{-1} \sigma (i,j) \lambda _i \delta _i$\; 3. $r_{ij}\leftarrow \delta _{ij} \exp (\tau \delta _{ij})$\; 4. $\phi _{ij} \leftarrow (1+r_{ij})\exp (\tau r_{ij})$\; 5. $h_{ij} \leftarrow (1+\tau ^2 r_{ij}+\tau) \exp (\tau r_{ij})$\; 6. $s \leftarrow \phi ^\top \phi /\|\phi ^\top h \phi\|$\; 7. $w_{ij} \leftarrow s\phi _{ij}$\; 8. $\lambda _i \leftarrow \sum w_{ij} \frac{\log (\lambda _i^{-1} \lambda _j)}{\|\log (\lambda _i ^{-1} \lambda _j)\|}$\; 9. $res = \sum w_{ij} \delta _{ij} \exp (\tau w_{ij} \delta _{ij})$\; 10. $\tau = 1/k$\; } \caption{MRA-Robust IRLS} \label{alg:MRAIRLS} \end{algorithm} Denote $\|\cdot \|$ as the equivalent angle for $d(\cdot, \cdot)$. Recall our objective function Eq.~\ref{eq:main}, assume that we update $\lambda$ with $\delta \lambda$, \emph{i.e}\onedot} \def\Ie{\emph{I.e}\onedot, for $\lambda _i$, the updated $\lambda _i$ is $\lambda _i \delta _i$, where $\delta _i$ denotes the update. Then at one iteration, it is equivalent to solve Eq.~\ref{eq:main} as to minimize the following \begin{equation} \sum_{(i,j)\in \mathcal{E}_p} \rho (\|\delta _j^{-1} \lambda _j ^{-1} \sigma (i,j) \lambda _i \delta _i\|). \end{equation} Then for an edge $(i,j)$, the residual $r_{ij}$ is thus \begin{equation} r_{ij} = \rho(\|\delta _j^{-1} \lambda _j ^{-1} \sigma (i,j) \lambda _i \delta _i\|) = \rho(\delta_{ij}). \end{equation} Denote $\phi _{ij}$ as the gradient, $h_{ij}$ as the hessian of $\rho$ , the step size $s$ is computed as \begin{equation} s = \|\phi\|^2 / \|\phi ^\top h \phi \|. \end{equation} The updated weight $w_{ij}$ and $\lambda _i$ are then \begin{align} w_{ij} &= s \phi _{ij},\\ \lambda _i = \sum_{(i,j)\in \mathcal{E}_p} &w_{ij} \dfrac{\log (\lambda _i^{-1} \lambda _j)}{\|\log (\lambda _i^{-1} \lambda _j)\|}. \end{align} In practice, we observe that with $\tau _k = 1/k$ where $k$ denotes the iteration number, the convergence displays a quadratic convergence and changes to linear at the end. The behavior is expected from the construction of $\rho (x)$, as we desire the penalty to be high at the beginning and subtle by the end of the iterations. \section{Experimental Results} {\it System Configuration} All of our experiments are conducted on a PC with Intel(R) i7-7700 3.6GHz processors, 8 threads and 64GB memory. The bundle adjustment is conducted by applying Ceres library~\cite{ceres-solver}. {\it Methods and Datasets} We compare our proposed approach with recent state-of-the-art approaches including~\cite{chatterjee2018robust, chatterjee2013efficient, lerman2019robust}. The approaches are tested on the Photo Tourism Dataset~\cite{wilson_eccv2014_1dsfm} and the KITTI Odometry~\cite{Geiger2012CVPR}. In our experiments, all the optimization steps are modified from public libraries~\cite{ceres-solver, kummerle2011g, l1magic} in C++. \subsection{Quantitative Results} \begin{table}[th!] \begin{center} \caption{Experiment results on Tourism Dataset~\cite{wilson_eccv2014_1dsfm}. In the table, $\Delta \bar{\text {deg}}$ and $\Delta \hat{\text {deg}}$ denote the mean and median error in degrees, respectively; runtime is in seconds and number of iterations denote the iterations to initialize + iterations for the calculation. Full result in supplementary materials.} \label{table:result} \addtolength{\parskip}{-0.5cm} \resizebox{\linewidth}{!}{% \begin{tabular}{ccccccc} \toprule[0.5mm] & &\textbf{\makecell{IRLS\\ \cite{chatterjee2013efficient}}} & \textbf{\makecell{Robust-IRLS\\ \cite{chatterjee2018robust}}} & \textbf{\makecell{MPLS\\ \cite{lerman2019robust}}} & \textbf{\makecell{Ours-$l_2$}} & \textbf{\makecell{Ours\\}} \\ \midrule[0.3mm] \multirow{4}{*}{\rotatebox{90}{Alamo}} &$\Delta \bar{\text {deg}}$ & 3.64 & 3.67 & 3.44 & 3.54 & \textbf{3.39}\\ & $\Delta \hat{\text {deg}}$ &1.30 & 1.32 & \textbf{1.16} & 1.29 & \textbf{1.16}\\ & runtime & \textbf{14.2} & 15.1 & 20.6 & 16.3 & 14.7\\ & iteration &10+8 & 10+9 & 6+8 & 4+8 & \textbf{4+6}\\ \midrule[0.3mm] \multirow{4}{*}{\rotatebox{90}{Ell. Is.}} &$\Delta \bar{\text {deg}}$ & 3.04 & 2.71 & 2.61 & 2.39 & \textbf{2.25}\\ & $\Delta \hat{\text {deg}}$ &1.06 & 0.93 & 0.88 & 0.82 & \textbf{0.64}\\ & runtime & 3.2 & 2.8 & 4.0 &2.7& \textbf{2.3}\\ & iteration &10+9 & 10+13 & 6+11 & 6+12 & \textbf{5+7}\\\midrule[0.3mm] \multirow{4}{*}{\rotatebox{90}{Mont. N.D}} &$\Delta \bar{\text {deg}}$ & 1.25 & 1.22 & \textbf{1.04} & 1.12 & \textbf{1.04}\\ & $\Delta \hat{\text {deg}}$ &0.58 & 0.57 & 0.51 & 0.51 & \textbf{0.47}\\ & runtime & \textbf{6.5} & 7.3 & 9.3 & 7.6 & 7.1\\ & iteration &10+9 & 10+13 & 6+11 & 6+12 & \textbf{5+7}\\ \midrule[0.3mm] \multirow{4}{*}{\rotatebox{90}{Not. Da.}} &$\Delta \bar{\text {deg}}$ & 2.63 & 2.26 & 2.06 & 2.19 & \textbf{1.98}\\ & $\Delta \hat{\text {deg}}$ &0.78&0.71&0.67&0.71 & \textbf{0.62}\\ & runtime & \textbf{17.2}&22.5 & 31.5 & 24.5 & 21.2\\ & iteration &10+14 & 10+15 & 6+14 & 6+12 & \textbf{5+9}\\ \midrule[0.3mm] \multirow{4}{*}{\rotatebox{90}{Picca.}} &$\Delta \bar{\text {deg}}$ & 5.12 & 5.19 & 3.93 & 4.08 & \textbf{3.82}\\ & $\Delta \hat{\text {deg}}$ &2.02 & 2.34 & 1.81 & 1.83 & \textbf{1.77}\\ & runtime & \textbf{153.5} & 170.2 & 191.9 & 180.6 & 173.4\\ & iteration &10+16 & 10+19 & 6+21 & 6+19 & \textbf{6+16}\\ \midrule[0.3mm] \multirow{4}{*}{\rotatebox{90}{NYC Lib}} &$\Delta \bar{\text {deg}}$ & 2.71 & 2.66 & 2.63 & 2.63 & \textbf{2.56}\\ & $\Delta \hat{\text {deg}}$ &1.37 & 1.30 & 1.24 & 1.20 & \textbf{1.17}\\ & runtime & \textbf{2.5} & 2.6 & 4.5 &4.2 &3.7\\ & iteration &10+14 & 10+15 & 6+14 & 6+11 & \textbf{6+9}\\ \midrule[0.3mm] \multirow{4}{*}{\rotatebox{90}{P.D.P}} &$\Delta \bar{\text {deg}}$ & 4.1 & 3.99 & 3.73 & 3.77 & \textbf{3.64}\\ & $\Delta \hat{\text {deg}}$ &2.07 & 2.09 & 1.93 & 1.85 & \textbf{1.80}\\ & runtime & \textbf{2.8} & 3.1 & 3.5 & 3.1 & 2.9\\ & iteration &10+9 & 10+13 & \textbf{6+3} & 6+7 & 5+6\\ \midrule[0.3mm] \multirow{4}{*}{\rotatebox{90}{Rom. For.}} &$\Delta \bar{\text {deg}}$ & 2.66 & 2.69 & 2.62 & 2.65 & \textbf{2.60}\\ & $\Delta \hat{\text {deg}}$ &1.58 & 1.57 & \textbf{1.37} & 1.44& {1.39}\\ & runtime & \textbf{8.6} & 11.4 & 8.8 & 9.2 & 8.6\\ & iteration &10+9 & 10+17 & 6+8 & 5+9 & \textbf{5+7}\\ \midrule[0.3mm] \multirow{4}{*}{\rotatebox{90}{T.o.L}} &$\Delta \bar{\text {deg}}$ & 3.42 & 3.41 & 3.16 & 3.23 & \textbf{3.03}\\ & $\Delta \hat{\text {deg}}$ &2.52 & 2.50 & 2.20 & 2.12 & \textbf{1.98}\\ & runtime & 2.6 & \textbf{2.4} & 2.7 & 2.5 & \textbf{2.4}\\ & iteration &10+8 & 10+12& 6+7 & 6+7 & \textbf{5+6}\\ \midrule[0.3mm] \multirow{4}{*}{\rotatebox{90}{Uni. Sq.}} &$\Delta \bar{\text {deg}}$ & 6.77 & 6.77 & 6.54 & 6.57 & \textbf{6.24}\\ & $\Delta \hat{\text {deg}}$ &3.66 & 3.85 & \textbf{3.48} & 3.70 & 3.64\\ & runtime & \textbf{5.0} & 5.6 & 5.7 & 5.5 & 5.4\\ & iteration &10+32 & 10+47 & 6+21 & \textbf{6+15} & {5+20}\\ \midrule[0.3mm] \multirow{4}{*}{\rotatebox{90}{Yorkm.}} &$\Delta \bar{\text {deg}}$ & 2.6 & 2.45 & 2.47 & 2.45 & \textbf{2.37}\\ & $\Delta \hat{\text {deg}}$ &1.59 & 1.53 & 1.45 & 1.47 & \textbf{1.33}\\ & runtime & \textbf{2.4} & 3.3 & 3.9 & 3.7 & 3.1\\ & iteration &10+7 & 10+9 & 6+7 & 5+9 & \textbf{5+7}\\ \midrule[0.3mm] \end{tabular}} \end{center} \end{table} We provide the accuracy in mean and median degree, runtime and iteration numbers in Table.~\ref{table:result}, where Ours-$l_2$ denotes the corresponding result using $l_2$ cost function instead of the original $\rho$ in our proposed algorithm. It is shown that our proposed algorithm achieves the superior performance on almost all of the dataset. {\bf Accuracy} We measure the accuracy of the methods using the mean and median degree error by convention. We notice that the result given by that using $l_2$ cost function bares slightly greater error than that with cost function $\rho$ in our original scheme. The reason can be due to the differences on both the weight computation and the influence function. As we mentioned before, the influence function of $l_2$ cost is unbounded such that, during the initialization the penalty on the measurement deviation is too harsh. In that case, some edges might get over-penalized in the sense of the `good' information gets underweighted in the optimization. Moreover, as $\rho$ in our scheme will lower the penalty term as the iteration goes on, the optimization will be better refined when the solve is sufficiently close to the solution set. {\bf Speed} It can be seen that our proposed algorithm is slightly slower than the fastest approach IRLS on most of the datasets. As the plain-version IRLS processes the iteration without robostifier, it involves a lot fewer variables compared to the other approaches. Also it is worth to note that our algorithm takes the fewest iterations on almost all of the datasets, which greatly results from the weight initialization scheme such that IRLS is well intialized at the beginning, which leads to the faster convergence. \begin{figure*}[!ht] \begin{center} \subfloat [Sequence 00] { \includegraphics[width=.33\linewidth]{seq00.pdf} } \subfloat [Sequence 02] { \includegraphics[width=.33\linewidth]{seq02.pdf} } \subfloat [Sequence 05] { \includegraphics[width=0.33\linewidth]{seq05.pdf} } \subfloat [Sequence 09] { \includegraphics[width=0.32\linewidth]{seq09.pdf} } \caption[Comparison with ORB-SfM on Seq.02, 08, 10 from KITTI Odometry.]{Our proposed approach shows a trajectory estimation of comparably high quality in KITTI dataset which contains large scale outdoor scenes. Specifically, our approach displays superior loop-closing capability on Seq.02, where many loops are present. It can be shown that the accumulated drifts are negligible through the trajectory estimation. Results on the rest of the dataset are provided in the supplementary materials.} \label{fig:3seq} \end{center} \end{figure*} \subsection{Qualitative Results} To test the qualitative performance of our algorithm, we run experiments on VIO benchmark KITTI to further demonstrate the robustness of our proposed solver. Different from internet photo dataset like~\cite{wilson_eccv2014_1dsfm}, the pose-graph for KITTI contains a lot more small cycles but not many large-scale cycles. The local connectiviey is higher while the global connectivity is very small. To estimate the camera trajectory, we use standard SfM pipeline where we fix the camera orientation with our outputs to estimate the translation. \subsection{Ablation Study} Figures of the ablation comparisons are provided in the supplementary materials, we state the main observations here. In the comparisons we use IRLS~\cite{chatterjee2018robust} as the baseline. We produce the synthetic data using perturbations from $0^{\circ}$ to $15^{\circ}$ uniformly on ground truth value of ~\cite{wilson_eccv2014_1dsfm}. \subsubsection{Effects on Cost Choice} \label{sec:ablationnorm} We further conduct ablation study on the effects on the cost function choice with baseline as Robust IRLS~\cite{chatterjee2018robust} on synthetic data with perturbations on the measurements. It has been shown that our proposed algorithm with $l_1$, $l_2$ and Huber cost function all show superior accuracy and faster convergence over~\cite{chatterjee2018robust}. \subsubsection{Effects on Cycle Consistency Enforcement} We further test the cycle consistency constraints effect by conducting experiments with our solver with RANSAC, RANSAC+cycle constraints, and solely with the cycle constraints, with baseline~\cite{chatterjee2013efficient}. It has been shown that, it does not show much difference beween with RANSAC+cycle constraints vs solely with cycle constraints. \label{sec:ablationconsistency} \section{Conclusion} In this paper, we propose a robust framework to solve multiple rotation averaging problem, especially in the cases that a significant amount of noisy measurements are present. By introducing the $\epsilon$-cycle consistency term into the solver, we enable the robust initialization scheme to be implemented into the IRLS solver. Instead of conducting the costly edge removal, we implicitly constrain the negative effect of erroneous measurements by weight reducing, such that IRLS failures caused by poor initialization can be effectively avoided. Combined with our novel cost function, our proposed method outperforms state-of-the-art approaches significantly in both accuracy and efficiency. \title{\LARGE{\bf{Supplementary Materials}}} \maketitle In this supplementary work, we will unfold our discussions in the main paper in more details. In the following, we include properties and results of rotation groups and quaternions, along with their representations on the unit 3-sphere (Fig.~\ref{fig:s2sphere} in the main paper) in \S\ref{sec:quat}. We conclude the work by providing the additional results of the experiments, where in \S\ref{sec:expquant} and \S\ref{sec:expqual} we give the quantitative and qualitative results on Photo Tourism~\cite{wilson_eccv2014_1dsfm} and KITTI~\cite{Geiger2012CVPR} respectively, detailed analysis of the ablation study is provided in \S\ref{sec:ablationresult}. \section{Rotations, Quaternions and 3-sphere} \label{sec:quat} To generalize our analysis and make the discussions concise, we will adopt the notations $\{\mathbf{R}_1, \mathbf{R}_2, \cdots \}$ where $\mathbf{R}_i \in \mathbb{SO}(3)$ instead of $\{\lambda (1), \lambda (2), \cdots \}$ in the main paper. Similarly, $\{\mathbf{R}_{ij}\}$ denotes the same transformations as $\sigma (i,j)$. As all rotations can be uniquely (up to a scale) represented by unit quaternions, we further exploit the quaternion representation of $\{\mathbf{R}_i\}$. Specifically, let a unit quaternion $\mathbf{q}_i$ denote the same rotation as $\mathbf{R}_i$. Recall that \begin{equation} \mathbf{q}_i = \mathbf{s}_i + \alpha _i \mathbf{i} + \beta _i \mathbf{j} + \gamma _i \mathbf{k}, \end{equation} where \begin{align} \mathbf{i}^2 = &\mathbf{j}^2 = \mathbf{k}^2 = \mathbf{ijk} = -1,\\ &\mathbf{ij} = \mathbf{-ji} = \mathbf{k},\\ &\mathbf{jk} = \mathbf{-kj} = \mathbf{i},\\ &\mathbf{ki} = \mathbf{-ik} = \mathbf{j},\\ \mathbf{s}_i^2 + &\alpha _i^2 + \beta _i^2 + \gamma _i^2 = 1. \end{align} We will use the concrete notation $\mathbf{q}=[\mathbf{s}, \mathbf{v}]$ henceforth, where $\mathbf{s}$ denotes the real part of $\mathbf{q}$ and $\mathbf{v} = [\alpha, \beta, \gamma]$ denotes the imaginary part. Let $\mathbf{q}_1$ denotes an arbitrary rotation $\mathbf{R}_1 \in \mathbb{SO}(3)$, we have that there exists a set of basis $\{e_1^i\}$ such that $\mathbf{q}_1=\sum a_i e_1^i$ for $a_i \in \mathbb{R}, \forall i$. Then for $\mathbf{q}_{12}$ which represents the relative rotation $\mathbf{R}_{12}$, we thus have $\mathbf{R}_2 = \mathbf{R}_{12}\mathbf{R}_1$ which in quaternionic form is \begin{equation} \label{eq:q2} \mathbf{q}_2 = \mathbf{q}_{12} \mathbf{q}_1 \mathbf{q}_{12}^{-1} = \mathbf{q}_{12} \big(\sum a_i e_1^i \big) \mathbf{q}_{12}^{-1}. \end{equation} While Eq.~\ref{eq:q2} cannot be directly expanded, it suffices to show that $\mathbf{q}_2$ can be spanned with the basis rotated by $\mathbf{q}_{12}$. Let $\{e_{12}^i\}$ denotes the basis of $\mathbf{q}_{12}$, it immediately follows that the rotated basis set from $\{e_{1}^i\}$ is that, $e_2^i = e_{12}^i e_1 (e_{12}^i)^{-1} $. Substituting into Eq.~\ref{eq:q2} \begin{equation} \mathbf{q}_2 =\sum a_i e_{12}^i e_1 (e_{12}^i)^{-1} =\sum a_i e_2^i . \end{equation} The generalized form of the equation above is thus \begin{equation} \label{eq:generalq} \mathbf{q}_n = \sum a_i e_{n-1,n} e_{n-2, n-1} \cdots e_{12}^i e_1 (e_{12}^i)^{-1} \cdots e_{n-2, n-1}^{-1} e_{n-1,n} ^{-1} . \end{equation} Eq.~\ref{eq:generalq} provides the equivalence between the progressive rotation multiplication and the summation with respect to the transformed quaternion basis. Now we can change Def.~\ref{def:epsconsistency} into that with quaternion form, which essentially denotes the geodesic curve length on the surface of unit 3-sphere $\mathcal{S}^3$. Recall that we define the $\epsilon$-cycle consistency as \begin{equation} \label{eq:epsrotation} d(\sigma(i,i_1)\cdot \prod_{j=1}^{m_k -1} \sigma({i_j}, i_{j+1}) \cdot \sigma(i_{m_k},i),\mathbb{I}_\sigma)\leq \epsilon . \end{equation} \begin{lemma} Let $\mathbf{q}_{ij}$ denote the relative rotation as defined in Eq.~\ref{eq:epsrotation}, \emph{i.e}\onedot} \def\Ie{\emph{I.e}\onedot, $\mathbf{q}_{ij} = \sigma (i,j), \forall i,j$. Then given $\mathbf{q}_0$, there exists an angle of rotation $\theta$ such that \begin{equation} d_{\angle}(\mathbf{q}_n, \mathbf{q}_0) \leq \theta, \end{equation} is equivalent with Eq.~\ref{eq:epsrotation}, where $\mathbf{q}_n$ is the quaternion after $n$ rotations from $\mathbf{q}_0$. \end{lemma} The proof follows by realizing that any quaternion can be written into the rotation axis and an rotation angle $\theta$. It immediately follows that the line determined by the rotation axis is invariant under the rotation angle. Assume without loss of generality that $\mathbf{q}_n$ has the same rotation axis with $\mathbf{q}_0$, it then suffices to show that the pure quaternion of $\mathbf{q}_0$ after transformation by progressive $\mathbf{q}_{ij}$ is also a pure quaternion. Consider $\mathbf{q}_j = \mathbf{q}_{ij} \mathbf{q}_i \mathbf{q}_{ij}^{-1}$, we thus have \begin{equation} \begin{aligned} \mathbf{q}_{ij} \mathbf{q}_i \mathbf{q}_{ij}^{-1} &= \mathbf{q}_{ij} (\mathbf{s}_i+\mathbf{v}_i) \mathbf{q}_{ij}^{-1}\\ &= \mathbf{q}_{ij} \mathbf{s}_i\mathbf{q}_{ij}^{-1}+\mathbf{q}_{ij}\mathbf{v}_i \mathbf{q}_{ij}^{-1}\\ &=\mathbf{s}_i + \mathbf{q}_{ij}\mathbf{v}_i \mathbf{q}_{ij}^{-1}, \end{aligned} \end{equation} and the lemma follows. \section{Additional Experimental Results} \label{sec:exp} In this section we first provide additional quantitative results on the Photo Tourism Dataset~\cite{wilson_eccv2014_1dsfm} in \S\ref{sec:expquant}. We have tested our proposed approach with variations, \emph{e.g}\onedot} \def\Eg{\emph{E.g}\onedot, with conventional cost functions and RANSAC preprocessings. We demonstrate the efficiency of our proposed approach by outperforming the state-of-the-arts approaches on both speed and accuracy. We then present the qualitative results on the KITTI dataset~\cite{Geiger2012CVPR}, where the accurate camera trajectories have demonstrated the robustness of our proposed approach in consecutive image sequence, \emph{i.e}\onedot} \def\Ie{\emph{I.e}\onedot, smaller cycles are ubiquitous in the pose-graph while large cycles are normally absent. Furthermore, we conduct ablation studies on the effects of cycle constraints and cost function choices in~\S\ref{sec:ablationresult} to conclude our discussions. \subsection{Full Quantitative Results on~\cite{wilson_eccv2014_1dsfm}} \label{sec:expquant} In Table~\ref{table:fulltable}, we provide the performance on the Photo Tourism Dataset~\cite{wilson_eccv2014_1dsfm}, compared with the original IRLS~\cite{chatterjee2013efficient}, the Robust IRLS~\cite{chatterjee2018robust}, MPLS~\cite{lerman2019robust}. Our proposed approach outperforms the state-of-the-art methods by both speed and accuracy on most of the datasets. We have conducted the experiments with different cost functions and with different initialization schemes. In Table~\ref{table:fulltable}, `Ours-$l_2$', `Ours-$l_1$' and `Ours-$l_{\frac{1}{2}}$' represent our proposed approach with $l_2$, $l_1$ and $l_{\frac{1}{2}}$ cost functions, respectively. It can be shown that though that with $l_{\frac{1}{2}}$ cost function achieves a better accuracy than the other two cost functions, it takes notably longer processing time and more iterations as well. Moreover, on large-scale dataset, the tradeoff is quite inefficient. For example, on the Piccadilly dataset, which contains more than 2000 images, the $l_{\frac{1}{2}}$ takes more than 15\% runtime compared with the $l_2$ optimization scheme while only providing negligible edge on accuracy advantage. Meanwhile out proposed method with exponential cost function runs slightly longer than~\cite{chatterjee2013efficient}, but improves the accuracy tremendously. In addition, we have tested our approach with `RANSAC' only preprocessing and `RANSAC+cycle constraints' and it can be shown that with our proposed cycle constraint on the erroneous relative rotations, the accuracy has been improved substantially. It should be noted that all of the state-of-the-art approaches we are comparing our approach with have implemented RANSAC iterations before the rotation averaging to filter the measurements. It is shown that although `Ours-RANSAC' outperforms the other approaches on a small scale on several datasets, the accuracy is rather low compared with `Ours-R+cycle' and `Ours'. It also should be noted that, without our proposed initialization schemes, the optimization requires more iterations to be successfully initialized. Furthermore, the comparison between `Ours-R+cycle' and `Ours' validates the effects of our proposed enforcement of the cycle constraints. It can be shown that the two mostly perform similarly on most of the datasets. The fact that the additional RANSAC does not improve the accurac demonstrates the robustness of our proposed approach against the measurement outliers. \subsection{Full Qualitative Results on~\cite{Geiger2012CVPR}} \label{sec:expqual} In Fig.~\ref{fig:allkitti}, we provide the camera trajectories given by our proposed approach on the KITTI dataset~\cite{Geiger2012CVPR}. In details, we first solve for the camera rotations and then keep the rotations fixed and compute the camera translation with conventional bundle adjustment~\cite{ceres-solver}. In the experiments it can be observed that, our proposed approach has shown consistent robustness when dealing with consecutive image sequences. As translation estimation includes the approximation of unknown scale parameter, deviation in rotation estimation can be amplified catastrophically. The accurate camera trajectories thus demonstrate the high accuracy delivered by our rotation averaging scheme. Specifically, most of the sequences do not contain large cycles in the viewgraph, in such scenarios the enforcement of cycle consistency tends to yield more loose constraints. However, since there exists abundant smaller cycles in the viewgraph, the constraints will be denser in the subspace, thus demonstrate the practicality and universality of our proposed approach. \subsection{Ablation Study} \label{sec:ablationresult} \begin{figure}[th!] \centering \subfloat [Noise=10\%] { \includegraphics[width=.5\linewidth]{10conv.pdf} } \subfloat [Noise = 20\%] { \includegraphics[width=.5\linewidth]{20conv.pdf} } \subfloat [Noise = 30\%] { \includegraphics[width=0.5\linewidth]{30conv.pdf} } \subfloat [Noise = 40\%] { \includegraphics[width=0.5\linewidth]{40conv.pdf} } \caption{Convergence performances with different cost function under different noise levels.} \label{fig:convfig} \end{figure} In the following experiments, we randomly sample ground truth values of 100 camera rotations from the Piccadilly dataset from~\cite{wilson_eccv2014_1dsfm} and compute the relative rotations with them. We then randomly select 10\%, 20\%, 30\%, 40\% of the relative rotations to add in noise uniformly. We first analyze the convergence performance with different cost functions, followed by the robustness analysis with different measurement filtration schemes. For each experiment, we record the result by repeating the experiment with same setting for 10 times and report the mean values. \subsubsection{Cost Function} With the synthetic data we test the convergence performances of Robust IRLS~\cite{chatterjee2018robust}, Ours-$l_2$, Ours-Huber and Ours with different noise and outlier levels. In all the experiments, we perturb the corresponding proportion of the ground truth relative rotations by $5^{\circ}$. The convergence performances are given in Fig.~\ref{fig:convfig}. It can be observed that as noise level and outliers increase, our propose solver shows strong robustness and displays stable and fast convergence. While our approach with different cost functions show similar convergence property when the noise level is low, as 40\% of the edges have add-in noise, the Huber cost function shows the slowest convergence. In our experiments, that with Huber cost always requires more than 15 iterations to converge when the outliers are relatively high. It also worth to point out that when a high noise level is present, the properties of our cost function can be shown more clearly, that the penalty is high at the beginning of the optimization and slows down near the optimal point. \begin{figure}[th!] \centering \subfloat [Noise=10\%] { \includegraphics[width=.5\linewidth]{10robust.pdf} } \subfloat [Noise = 20\%] { \includegraphics[width=.5\linewidth]{20robust.pdf} } \subfloat [Noise = 30\%] { \includegraphics[width=0.5\linewidth]{30robust.pdf} } \subfloat [Noise = 40\%] { \includegraphics[width=0.5\linewidth]{40robust.pdf} } \caption{Performances with different measurement filtrations under different noise levels.} \label{fig:robustfig} \end{figure} \subsubsection{Cycle Consistency} We also conduct experiments to analyze the erroneous measurements adjustment procedure. In the experiments, we test Robust IRLS~\cite{chatterjee2018robust} with RANSAC (original) and with our cycle consistency instead of RANSAC, Ours with RANSAC only and Ours against increasing noise. In Fig.~\ref{fig:robustfig}, we provide the performances on the optimization accuracy. It can be observed that as for the same outlier percentage, approaches with the implementation of the cycle consistency are more robust to higher level of noise. With the outlier percentage increases, the effects of RANSAC continues to decrease since there are not sufficiently many inliers for RANSAC to function as expected while cycle consistency maintains the advantage. \clearpage \begin{table*}[th!] \begin{center} \caption{Experiment results on the Photo Tourism Dataset~\cite{wilson_eccv2014_1dsfm}. In the table, $\Delta \bar{\text {deg}}$ and $\Delta \hat{\text {deg}}$ denote the mean and median error in degrees, respectively; runtime is in seconds and number of iterations denote the iterations to initialize + iterations for the calculation.} \label{table:fulltable} \addtolength{\parskip}{-0.2cm} \resizebox*{!}{0.9\textheight}{% \begin{tabular}{ccccccccccc} \toprule[0.5mm] & &\textbf{\makecell{IRLS\\ \cite{chatterjee2013efficient}}} & \textbf{\makecell{Robust-IRLS\\ \cite{chatterjee2018robust}}} & \textbf{\makecell{MPLS\\ \cite{lerman2019robust}}} & \textbf{\makecell{Ours-$l_2$}}&\textbf{\makecell{Ours-$l_1$}}&\textbf{\makecell{Ours-$l_{\frac{1}{2}}$}}&\textbf{\makecell{\makecell{Ours\\RANSAC}}}& \textbf{\makecell{Ours\\R+cycle}} & \textbf{\makecell{Ours\\}} \\ \midrule[0.3mm] \multirow{4}{*}{\rotatebox{90}{Alamo}} & $\Delta \bar{\text {deg}}$ & 3.64 & 3.67 & 3.44 & 3.54 & 3.52 & 3.44 & 3.59 & \textbf{3.36}& 3.39\\ & $\Delta \hat{\text {deg}}$ &1.30 & 1.32 & \textbf{1.16} & 1.29 & 1.29 & 1.20 & 1.27 & \textbf{1.16}&\textbf{1.16}\\ & runtime & \textbf{14.2} & 15.1 & 20.6 & 16.3 & 17.2 & 21.6 & 19.8 & 20.4 & 14.7\\ & iteration &10+8 & 10+9 & 6+8 & 4+8 & 4+9 & 4+11 & 6+6 & \textbf{4+6} & \textbf{4+6}\\ \midrule[0.3mm] \multirow{4}{*}{\rotatebox{90}{Ell. Is.}} &$\Delta \bar{\text {deg}}$ & 3.04 & 2.71 & 2.61 & 2.39 &2.28 & \textbf{2.21} &2.47 &2.24 &2.25\\ & $\Delta \hat{\text {deg}}$ &1.06 & 0.93 & 0.88 & 0.82 &0.82& 0.76& 0.90 & 0.67 & \textbf{0.64}\\ & runtime & 3.2 & 2.8 & 4.0 &2.7& 2.8 & 3.5 & 4.1 & 2.5 &\textbf{2.3}\\ & iteration &10+9 & 10+13 & 6+11 & 6+12 & 6+12 &6+12 &6+12 &5+10 & \textbf{5+7}\\ \midrule[0.3mm] \multirow{4}{*}{\rotatebox{90}{Mont. N.D}} &$\Delta \bar{\text {deg}}$ & 1.25 & 1.22 & 1.04 & 1.12 &1.12 &1.07 & 1.18 & \textbf{0.97} & 1.04\\ & $\Delta \hat{\text {deg}}$ &0.58 & 0.57 & 0.51 & 0.51 & 0.50 & 0.50 & 0.56 & \textbf{0.47} & \textbf{0.47}\\ & runtime & \textbf{6.5} & 7.3 & 9.3 & 7.6 &8.1 & 8.5 & 8.6 & 7.9&7.1\\ & iteration &10+9 & 10+13 & 6+11 & 6+12 &6+12 &6+12 &6+12 &5+8 & \textbf{5+7}\\ \midrule[0.3mm] \multirow{4}{*}{\rotatebox{90}{Not. Da.}} &$\Delta \bar{\text {deg}}$ & 2.63 & 2.26 & 2.06 & 2.19 & 2.14& 2.03 &2.35 & \textbf{1.95} & 1.98\\ & $\Delta \hat{\text {deg}}$ &0.78&0.71&0.67&0.71 & 0.70& 0.68 & 0.79 & 0.65 & \textbf{0.62}\\ & runtime & \textbf{17.2}&22.5 & 31.5 & 24.5 & 25.9& 27.5 &27.6 & 23.8 &21.2\\ & iteration &10+14 & 10+15 & 6+14 & 6+12 & 6+12& 6+12 & 6+12 & 5+12 & \textbf{5+9}\\ \midrule[0.3mm] \multirow{4}{*}{\rotatebox{90}{Picca.}} &$\Delta \bar{\text {deg}}$ & 5.12 & 5.19 & 3.93 & 4.08 & 4.00 & 3.92 & 4.87 & \textbf{3.82} &\textbf{3.82}\\ & $\Delta \hat{\text {deg}}$ &2.02 & 2.34 & 1.81 & 1.83 & 1.83& 1.79& 2.07 & 1.79& \textbf{1.77}\\ & runtime & \textbf{153.5} & 170.2 & 191.9 & 180.6 & 183.9&193.5 & 200.6 & 178.7 & 173.4\\ & iteration &10+16 & 10+19 & 6+21 & 6+19 & 6+21& 6+21 & 6+21 & \textbf{6+15} &6+16\\ \midrule[0.3mm] \multirow{4}{*}{\rotatebox{90}{NYC Lib}} &$\Delta \bar{\text {deg}}$ & 2.71 & 2.66 & 2.63 & 2.63 & 2.60& 2.58 & 2.73 & \textbf{2.53} & 2.56\\ & $\Delta \hat{\text {deg}}$ &1.37 & 1.30 & 1.24 & 1.20 & 1.20 & 1.17 & 1.33 & 1.19 &\textbf{1.17}\\ & runtime & \textbf{2.5} & 2.6 & 4.5 &4.2 & 4.5& 5.1& 3.9 & 4.0 &3.7\\ & iteration &10+14 & 10+15 & 6+14 & 6+11 & 6+12& 6+12 & 6+12 & \textbf{6+9} &\textbf{6+9}\\ \midrule[0.3mm] \multirow{4}{*}{\rotatebox{90}{P.D.P}} &$\Delta \bar{\text {deg}}$ & 4.1 & 3.99 & 3.73 & 3.77 & 3.74& 3.69 & 3.94 &\textbf{3.60} &3.64\\ & $\Delta \hat{\text {deg}}$ &2.07 & 2.09 & 1.93 & 1.85 & 1.84&1.85 & 1.98 & 1.83 & \textbf{1.80}\\ & runtime & \textbf{2.8} & 3.1 & 3.5 & 3.1 & 3.4& 3.8 & 4.2 & 3.0 &2.9\\ & iteration &10+9 & 10+13 & \textbf{6+3} & 6+7 & 6+9& 6+12 &6+12 & 5+6 &5+6\\ \midrule[0.3mm] \multirow{4}{*}{\rotatebox{90}{Rom. For.}} &$\Delta \bar{\text {deg}}$ & 2.66 & 2.69 & 2.62 & 2.65 &2.64 &2.64 &2.71 &\textbf{2.57} & {2.60}\\ & $\Delta \hat{\text {deg}}$ &1.58 & 1.57 & \textbf{1.37} & 1.44& 1.44 & 1.42 & 1.54 & 1.39 & {1.39}\\ & runtime & 8.6 & 11.4 & 8.8 & 9.2 & 9.8 & 10.7 & 8.8 & \textbf{8.4} & 8.6\\ & iteration &10+9 & 10+17 & 6+8 & 5+9 &5+12 & 5+12 & 6+12 &5+9 & \textbf{5+7}\\ \midrule[0.3mm] \multirow{4}{*}{\rotatebox{90}{T.o.L}} &$\Delta \bar{\text {deg}}$ & 3.42 & 3.41 & 3.16 & 3.23 & 3.20& 3.14 & 3.32 & \textbf{3.03} &\textbf{3.03}\\ & $\Delta \hat{\text {deg}}$ &2.52 & 2.50 & 2.20 & 2.12 &2.08& 2.04 & 2.20 & 2.00 & \textbf{1.98}\\ & runtime & 2.6 & \textbf{2.4} & 2.7 & 2.5 & 2.5&2.7 & 2.5 & 2.5 &\textbf{2.4}\\ & iteration &10+8 & 10+12& 6+7 & 6+7 & 6+10&6+12 &6+12 &5+8 &\textbf{5+6}\\ \midrule[0.3mm] \multirow{4}{*}{\rotatebox{90}{Uni. Sq.}} &$\Delta \bar{\text {deg}}$ & 6.77 & 6.77 & 6.54 & 6.57 & 6.50& 6.44 & 6.69 & \textbf{6.20} & {6.24}\\ & $\Delta \hat{\text {deg}}$ &3.66 & 3.85 & \textbf{3.48} & 3.70 &3.67 & 3.60 & 3.62 &3.65 &3.64\\ & runtime & \textbf{5.0} & 5.6 & 5.7 & 5.5 & 5.8 & 6.1 & 5.8 & 5.6 & 5.4\\ & iteration &10+32 & 10+47 & 6+21 & \textbf{6+15} &6+19 & 6+21 & 6+21 & 5+20 & {5+20}\\ \midrule[0.3mm] \multirow{4}{*}{\rotatebox{90}{Yorkm.}} &$\Delta \bar{\text {deg}}$ & 2.6 & 2.45 & 2.47 & 2.45 & 2.44& 2.44 & 2.50 & 2.40 &\textbf{2.37}\\ & $\Delta \hat{\text {deg}}$ &1.59 & 1.53 & 1.45 & 1.47 & 1.45 & 1.45& 1.52 & 1.36 & \textbf{1.33}\\ & runtime & \textbf{2.4} & 3.3 & 3.9 & 3.7 &4.0 & 4.1 &3.8 &3.2& 3.1\\ & iteration &10+7 & 10+9 & 6+7 & 5+9 & 5+11& 5+12 & 6+12 & \textbf{5+7} &\textbf{5+7}\\ \midrule[0.3mm] \multirow{4}{*}{\rotatebox{90}{Gend. Mar.}}&$\Delta \bar{\text {deg}}$ & 39.24 & 39.41 & 44.94 & 42.76 & 39.98 & 38.70 & 40.24 & \textbf{35.94} & 36.58\\ & $\Delta \hat{\text {deg}}$& 7.07& 7.12 & 9.87 & 9.55 & 9.26 & 9.12 & 9.93 & \textbf{7.04} & 7.21\\ & runtime &\textbf{6.5} & 7.3 & 17.8 & 14.2 & 14.9 & 16.3 & 12.2 & 15.4 & 15.7\\ & iteration& 10+14 & 10+19 & 6+25 & 6+16 & 6+19 & 6+25 &6+25 & \textbf{6+20} & 6+21\\ \midrule[0.3mm] \multirow{4}{*}{\rotatebox{90}{Mad. Met.}}&$\Delta \bar{\text {deg}}$ & 5.3 & 4.88 & 4.65 & 4.72 & 4.62 & 4.52 & 5.43 & 4.46 & \textbf{4.38}\\ & $\Delta \hat{\text {deg}}$ & 1.78 & 1.88 & 1.26 & 1.28 & 1.19 & 1.14& 1.64 & \textbf{1.02} & 1.07\\ & runtime & 3.8 & \textbf{2.7} & 5.2 & 4.3 & 4.9 & 5.6 & 4.2 & 3.9 & 4.1\\ & iteration& 10+30 & 10+12 & 6+23 & 6+15 & 6+19 & 6+25 & 6+25 & \textbf{5+21} & \textbf{5+21}\\ \midrule[0.3mm] \multirow{4}{*}{\rotatebox{90}{Vien. Cat.}}&$\Delta \bar{\text {deg}}$ & 8.13 & 8.07 & 7.21 & 7.13 & 7.02 & 6.97 & 7.89 & \textbf{6.42} & 6.57\\ & $\Delta \hat{\text {deg}}$& 1.92 & 1.76 & 2.83 & 2.32 & 2.26 & 2.29 & 2.42 & \textbf{1.55} & 1.90 \\ & runtime & 28.3 & \textbf{13.1} & 42.6 & 26.3 & 30.2 & 35.8 & 27.4 & 28.2 & 26.3\\ & iteration& 10+13&10+23 & 6+19 & 6+18 & 6+23 & 6+24 & 6+24 & 5+20 & \textbf{5+19}\\ \midrule[0.3mm] \end{tabular} } \end{center} \end{table*} \begin{figure*}[!ht] \begin{center} \subfloat [Sequence 00] { \includegraphics[width=.33\linewidth]{seq00.pdf} } \subfloat [Sequence 01] { \includegraphics[width=.33\linewidth]{seq01.pdf} } \subfloat [Sequence 02] { \includegraphics[width=.33\linewidth]{seq02.pdf} } \subfloat [Sequence 03] { \includegraphics[width=.33\linewidth]{seq03.pdf} } \subfloat [Sequence 04] { \includegraphics[width=.33\linewidth]{seq04.pdf} } \subfloat [Sequence 05] { \includegraphics[width=0.33\linewidth]{seq05.pdf} } \subfloat [Sequence 06] { \includegraphics[width=.33\linewidth]{seq06.pdf} } \subfloat [Sequence 07] { \includegraphics[width=.33\linewidth]{seq07.pdf} }\subfloat [Sequence 08] { \includegraphics[width=.33\linewidth]{seq08.pdf} } \subfloat [Sequence 09] { \includegraphics[width=0.32\linewidth]{seq09.pdf} } \subfloat [Sequence 10] { \includegraphics[width=.33\linewidth]{seq10.pdf} } \caption{Our proposed approach shows a trajectory estimation of comparably high quality in KITTI dataset which contains large scale outdoor scenes.} \label{fig:allkitti} \end{center} \end{figure*} \clearpage { \bibliographystyle{IEEEtran}
\section{Introduction} One of the most promising and rewarding sources of gravitational waves for low-frequency, space-based gravitational-wave (GW) detectors—such as the future Laser Interferometer Space Antenna(LISA)~\cite{lisa}, Taiji~\cite{hu2017taiji} and Tian-Qin~\cite{luo2016tianqin}—are the so-called extreme-mass-ratio inspirals (EMRIs)~\cite{amaro2007intermediate,babak2017science,berry2019unique}, which are compact objects (COs) such as neutron stars or stellar-mass (or stellar origin) black holes (SOBHs) inspiraling into supermassive black holes (SMBHs) in the mass range $10^5$-$10^7\,{\rm M_\odot}$. The majority of observed EMRI events are expected to be SOBH-SMBH mergers; this is partly due to mass segregation concentrating heavier BHs in the Galactic center and partly because their louder intrinsic amplitude enables them to be detected out to greater distances. The small CO is usually approximated as a test particle, and over the short orbital time scale follows a nearly geodesic trajectory in the background metric of the SMBH. The system radiates GWs at harmonics of the geodesic frequencies, so the GW frequency spectrum encodes details of the instantaneous geodesic trajectory. Though the signals from EMRIs are usually very weak, after one year of observation the signal-to-noise ratio may be enough to be detected ~\cite{amaro2007intermediate}. To detect this kind of long duration signals, the requirement on the accuracy of waveform templates is that the dephasing should be less than a few radians after $10^5$ cycles~\cite{gair2013testing,babak2017science}. Nowadays, there are several kinds of EMRI templates. The first kind uses Teukolsky equations~\cite{Teukolsky} and treats COs as test particles (omitting the mass in their conservation dynamics part) and thus they just extract a snapshot waveform; however, accurate Teukolsky-based waveforms are computationally expensive to generate. Another kind uses the post-Newtonian (PN) fluxes approximation to describe the evolution of orbital parameters with gravitational radiation reaction, in particular the so-called kludge waveforms~\cite{barack2004lisa,babak2007kludge,chua2017augmented}. The third kind considers the correction due to the small mass by using the effective-one-body (EOB) formalism, but does not consider the spin of the small object, such as in circular orbits with PN waveforms~\cite{yunes2010modeling,yunes2011extreme} and the Teukolsky-based waveforms~\cite{han2011constructing,han2014gravitational}. The kludge models can generate the waveforms quickly for three-dimensional (3D) orbits, but they take the COs as test particles in the orbital motion even though they include the radiation reaction. If the time scale of GW radiation is much larger than that of the orbital motion, then at a given instant the properties of motion can be calculated from a conservative equation $\ddot{x}^\mu + ^B\Gamma^\mu_{\rho\sigma}\dot{x}^\mu\dot{x}^\nu = 0 + O(\nu) + O(\nu^2) + \cdots$. Here the label ``B" represents the background field of the massive body. In popular EMRI template models, like AAK~\cite{barack2004lisa}, NK~\cite{babak2007kludge}, AAK~\cite{chua2017augmented}, XSPEG~\cite{xin2019gravitational} etc, the mass-ratio corrections in the conservative dynamics are omitted, i.e., the right-hand side of the equation is exactly zero. This is just the geodesic equation of a test particle around a massive black hole. The test particle–adiabatic approximation (adiabatic model) makes the problem much simpler, but induces errors in the GW simulation. As in Eq.(74) of~Ref.\cite{barack2018self}, the mass ratio expansion to the phase evolution is \begin{equation} \phi(t) = \frac{1}{\nu} [\phi_{(0)}+ \nu \phi_{(1)}+ O(\nu^2)]. \end{equation} An EMRI model that captures the leading-order term $\phi_{(0)}$ is called an adiabatic model. The calculation of $\phi_{(0)}$ requires only the averaged dissipative first-order self-force (in the mass-ratio expansion) that is fully equivalent to the fluxes, and some literature states that in general it may be accurate enough for detecting EMRI signals using LISA~\cite{hughes2018adiabatic}. The next-to-leading-order term, which includes both the dissipative and conservative pieces of the first-order self-force as well as the averaged dissipative piece of the second-order self-force. The post-1 adiabatic phase is required for the parameter estimation of EMRIs~\cite{hughes2018adiabatic}. In the present paper, we mainly focus on the conservation dynamics part of EMRI, and try to analytically solve the equation of motion which includes the first-order mass-ratio corrections. The mass-ratio terms we use may not be enough for final EMRI waveforms, so the aim of this paper is not to construct the waveform template, but rather to demonstrate the method for the analytical solution of orbits. Our method should be useful once there are some more precise self-force corrections. The EOB formalism, by including the mass-ratio corrections up to a certain order in the PN expansion, can well describe the dynamical evolution of binary black holes~\cite{buonanno1999eff,buonanno2000transition}, and is widely used to construct the waveform templates for LIGO~\cite{taracchini2014effective,buonanno2007approaching,purrer2016frequency,husa2016frequency,khan2016frequency,chu2016accuracy,kumar2016accuracy,pan2014inspiral}. Most of these models only consider the circular-orbit cases. An eccentric EOB numerical relativity waveform template for spinning black holes was developed ~\cite{cao2017waveform}, but the orbits were not geometrized and the orbital parameters were not well defined. Recently, an analytically eccentric EOB formalism for Schwarzschild BHs was given~\cite{hinderer2017foundations}. In a previous work~\cite{zc2020}, we present an analytically equatorial-eccentric EOB formalism for spinning cases in the extreme-mass-ratio limit. Note that the EOB formalism’s correction in the extreme-mass-ratio limit has not been guaranteed. However, as stated in~Ref.\cite{albanesi2021effective}, the extreme-mass-ratio limit plays a pivotal role in the EOB development, especially for what concerns waveforms and fluxes, which can be informed by and compared with numerical results ~\cite{Nagar:2006xv,Damour:2007xr,Bernuzzi:2010ty,Bernuzzi:2011bc,Bernuzzi:2010xj,Bernuzzi:2011aj,Harms:2014an,Nagar:2014kha,Harms:2015ixa,Harms:2016ctx,Lukes:2017st,Nagar:2019wrt}. In addition, the EOB formalism with the extreme-mass-ratio limit should be improved due to a lot of works dedicated to analytically calculating gravitational self-force terms and providing comparisons with numerical results ~\cite{Damour:2009sm,Barack:2010ny,Akcay:2012ea,Bini:2014ica,Bini:2015mza,Akcay:2015pjz,Barack:2019agd}. It is well known that the orbits of EMRIs could be highly eccentric~\cite{babak2017science} with orbital inclination (orbital plane procession), and the supermassive black hole in the center should be spinning in general. In the present paper, we extend the previous work by Hinderer and Babak~\cite{hinderer2017foundations} and ourselves ~\cite{zc2020} to the inclined-eccentric orbits in the Kerr background with the extreme-mass-ratio limit. We analytically transfer the original EOB dynamical equations to geometric kinetic motion with the semilatus rectum $p$, eccentricity $e$ and orbital inclination $\iota$ as the orbital parameters, together with three phase variables associated with the spatial geometry of the radial, azimuthal, and polar motion denoted by $(\xi,\phi,\chi)$. Because of the extremely small mass ratio,we omit the spin of the effective small body, and thus the very complicated spin-spin coupling terms disappear but maintain enough accuracy. An important feature of the dynamics of an extrememass-ratio binary system in a bounded inclined-eccentric orbit is that the orbit can be characterized by three frequencies: the radial frequency $\omega_r$ associated with the libration between the apoapsis and periapsis, the polar frequency $\omega_\theta$ associated with the libration between $\theta_{min}$ and $\pi-\theta_{min}$, and the azimuthal rotational frequency $\omega_\phi$. Once these three frequencies and orbital parameters are obtained, the frequency of GWs can be obtained and may be encoded in the Teukolsky equation to get accurate waveforms~\cite{han2010gravitational,han2011constructing,han2014gravitational,han2017excitation,cai2016gravitational,yang2019testing,cheng2019highly}. The organization of this paper is as follows. The basic knowledge of EOB formalism is introduced in the following section. In Sec.~\ref{sec:geometrization}, we reparametrize the original spinning EOB dynamical description to a geometric formalism in the more efficient reparametrized terms of $(p,~e,~\iota,~\xi,~\chi,~\phi)$. We analytically express the fundamental frequencies in three integrals with two parameters: $\xi$ and $\chi$. In particular, we investigate the influence of the mass ratio on the detection of EMRIs. We also give the general forms for the evolution of orbital parameters with gravitational radiation reaction. Finally, the last section contains our conclusions and discussions. Throughout this paper we use geometric units $G = c = 1$, the units of time and length are the mass of system $M$, and the units of linear and angular momentum are $\mu$ and $\mu M$, respectively, where $\mu$ is the reduced mass of the effective body. \section{Effective-one-body Hamiltonian} \label{sec:HEOB} The EOB formalism was originally introduced in Refs.~\cite{buonanno1999eff,buonanno2000transition} to describe the evolution of a binary system. We start by considering an EMRI system with a central Kerr black hole $m_1$ and inspiraling object $m_2$ (we assume that it is nonspinning for simplicity, $m_2 \ll m_1$). For the moment, we neglect the radiation-reaction effects and focus on purely geodesic motion. The conservative orbital dynamics is derived via Hamilton's equations using the EOB Hamiltonian \begin{equation} H_{\rm EOB}=M\sqrt{1+2\nu (\hat{H}_{\rm eff}-1)}\,,\label{eq:HEOB} \end{equation} where $M=m_1+m_2$, $\nu=m_1m_2/M^2$, $\mu=\nu M$ and the reduced effective Hamiltonian $\hat{H}_{\rm eff}=H_{\rm eff}/\mu$. The deformed Kerr metric is given by~\cite{barausse2010improved} \begin{subequations} \begin{eqnarray} \label{def_metric_in} g^{tt} &=& -\frac{\Lambda_t}{\Delta_t\,\Sigma}\,,\\ g^{rr} &=& \frac{\Delta_r}{\Sigma}\,,\\ g^{\theta\theta} &=& \frac{1}{\Sigma}\,,\\ g^{\phi\phi} &=& \frac{1}{\Lambda_t} \left(-\frac{\widetilde{\omega}_{\rm fd}^2}{\Delta_t\,\Sigma}+\frac{\Sigma}{\sin^2\theta}\right)\,,\label{eq:gff}\\ g^{t\phi}&=&-\frac{\widetilde{\omega}_{\rm fd}}{\Delta_t\,\Sigma}\,.\label{def_metric_fin} \end{eqnarray} \end{subequations} The quantities $\Sigma$, $\Delta_t$, $\Delta_r$, $\Lambda_t$, and $\widetilde{\omega}_{\rm fd}$ in Eqs.~(\ref{def_metric_in})-(\ref{def_metric_fin}) are given by \begin{subequations} \begin{eqnarray} \Sigma &=& r^2+a^2 \cos ^2\theta \,, \\ \label{deltat} \Delta_t &=& r^2\, \left [A(u) + \frac{a^2}{M^2}\,u^2 \right ]\,, \\ \label{deltar} \Delta_r &=& \Delta_t\, D^{-1}(u)\,,\\ \Lambda_t &=& \left(r^2+a^2\right)^2-a^2\Delta _{t}\sin ^2\theta \,,\\ \widetilde{\omega}_{\rm fd} &=& 2 a\, M\, r+ \omega_1^{\rm fd}\,\nu\,\frac{a M^3}{r}+ \omega_2^{\rm fd}\,\nu\,\frac{M a^3}{r} \label{eq:omegaTilde}\,, \end{eqnarray} \end{subequations} where $a=|\bm{S}_{\rm{Kerr}}|/M$ is the effective Kerr parameter and $u = M/r$. The values of $\omega_1^{\rm fd}$ and $\omega_2^{\rm fd}$ given by a preliminary comparison of EOB model with numerical relativity results are about $-10$ and $20$~\cite{rezzolla2008final,barausse2009predicting}, and the metric potentials $A$ and $D$ for the EOB model are given as follows. The log-resummed, calibrated A potential is given by the expression from APPENDIX A of Ref.~\cite{steinhoff2016Apotential} \begin{widetext} \begin{eqnarray} A(u)&=&\Delta_u-\frac{a^2}{M^2}u^2,\\ \Delta_u&=&\bar{\Delta}_u \left(\Delta _0 \nu +\nu \log \left(\Delta_5 u^5+\Delta_4 u^4+\Delta_3 u^3+\Delta_2 u^2+\Delta_1 u+1\right)+1\right), \end{eqnarray} with \begin{subequations} \begin{align} \bar{\Delta}_u&=\frac{a^2u^2}{M^2}+\frac{1}{(K \nu -1)^2}+\frac{2u}{K \nu -1},\\ \Delta_5&= (K \nu -1)^2 \bigg[ \frac{64}{5} \log (u) + \left(-\frac{1}{3} a^2 \left(\Delta_1^3-3\Delta_1 \Delta_2+3 \Delta _3\right)\right. \nonumber \\ &-\frac{\Delta_1^5-5\Delta_1^3 \Delta_2+5\Delta_1^2 \Delta_3+5\Delta_1\Delta_2^2-5 \Delta_2 \Delta_3-5\Delta_4\Delta_1}{5 (K \nu -1)^2}\nonumber \\ &\left.+\frac{\Delta_1^4-4 \Delta _1^2\Delta_2+4\Delta_1\Delta_3+2\Delta_2^2-4 \Delta_4}{2 K \nu -2}+\frac{2275 \pi^2}{512}+\frac{128 \gamma }{5}-\frac{4237}{60}+\frac{256 \log (2)}{5}\right) \bigg] , \\ \Delta_4&=\frac{1}{96} \bigg[8 \left(6 a^2 \left(\Delta_1^2-2 \Delta_2\right) (K \nu -1)^2+3 \Delta_1^4+\Delta_1^3 (8-8 K \nu ) \right. \nonumber \\ &\left.-12 \Delta_1^2\Delta_2+12\Delta_1 (2 \Delta_2 K \nu -2 \Delta_2+\Delta_3)\right)\nonumber\\ &+48\Delta_2^2-64 (K \nu -1) (3 \Delta_3-47 K \nu +47)-123 \pi ^2 (K\nu -1)^2\bigg],\\ \Delta_3&=-a^2\Delta_1 (K \nu -1)^2-\frac{\Delta_1^3}{3}+\Delta_1^2 (K \nu -1)+\Delta_1\Delta_2-2 (K \nu -1) (\Delta_2-K \nu +1),\\ \Delta_2 &=\frac{1}{2} \left(\Delta_1 (\Delta_1-4 K \nu +4)-2 a^2\Delta_0 (K \nu -1)^2\right),\\ \Delta_1 &=-2 (\Delta_0+K) (K \nu -1),\\ \Delta_0&=K (K \nu -2), \end{align} where $K$ is a calibration parameter tuned to numerical-relativity simulations whose most recently updated value was determined in Eq.~(4.8) of Ref.~\cite{bohe2017improved} \begin{align} K=267.788 \nu ^3-126.687 \nu ^2+10.2573 \nu +1.7336 \end{align} \end{subequations} \end{widetext} The $D$ potential is \begin{subequations} \begin{align} D^{-1}(u)&=1+\log\left[D_{\rm Taylor}\right]\nonumber\\ D_{\rm Taylor}&=1+6\nu u^2+2 \nu u^3(26-3\nu). \end{align} \end{subequations} \section{Geometrization of the conservative EOB dynamics} \label{sec:geometrization} The EOB Hamiltonian in Eq.~\eqref{eq:HEOB} is canonically transformed and subsequently mapped to an effective Hamiltonian $H_{\rm eff}$ describing a particle of effective mass $\mu$ and effective spin $S_*=a M(m_2/m_1)$, moving in a deformed Kerr metric of mass $M$ and effective spin $S_{\rm Kerr}=a M$, and the effective Hamiltonian is given by~\cite{barausse2010improved,Barausse2011Extending,Taracchini2012Prototype} \begin{equation} H_{\rm eff}=H_{\rm NS}+H_{\rm S}-\frac{\nu}{2r^3} S_*^2 \,,\label{eq:Heff} \end{equation} where the first part is just the Hamiltonian of a nonspinning particle in the deformed-Kerr metric with the mass-ratio correction. When $\nu \rightarrow 0$, this part goes back to the test-particle limit in Kerr spacetime. The forms of $H_s$ and $S_*$ are quite trivial; readers can refer to \cite{Barausse2011Extending} for details. For EMRIs, due to the small mass-ratio $\nu\sim 10^{-7}\sim 10^{-4}$, as we have shown in~\cite{zc2020}, the last two terms in Eq.(\ref{eq:Heff}) can be neglected without loss of accuracy because they are two orders less than the mass ratio. The Hamiltonian equations for the orbital motion are \begin{align} \frac{d \boldsymbol{r}}{d {t}} = \frac{\partial {H}_{\mathrm{EOB}}}{\partial \boldsymbol{P}}\,, \qquad \frac{d \boldsymbol{P}}{d {t}} = -\frac{\partial {H}_{\mathrm{EOB}}}{\partial \boldsymbol{r}} \label{eq:hamilton}\,. \end{align} In form, the above differential equations are coupling each other, especially for radial $r$ and polar $\theta$ equations. Though the numerical integral can give accurate trajectories, analytical ones with geometrized parameters will be valuable for revealing the properties of motion. In the section, we follow the procedure of the test-particle case, decouple the motion in the $r$ and $\theta$ directions, and give a geometrized formalism to replace the dynamical equation(\ref{eq:hamilton}). \subsection{Semi-Carter ``constant" in deformed Kerr spacetime} \label{sec:Carter constant} The effective one-body dynamics was given by a Hamilton-Jacobi equation of the form~\cite{damour2001coalescence} \begin{equation} \label{eq:superhamiltonian} g^{\alpha \beta}P_\alpha P_\beta+\frac{Q_4 M^2 P_r^4}{r^2 \mu^2}+\mu^2=0\,. \end{equation} The function ${Q}_4=2(4-3\nu)\nu $~\cite{damour2000determination} represents a nongeodesic term that appears at 3PN order. We omit this term in the following calculations because it is next-to-leading order in the mass ratio and the above equation cannot be separated if we retain this term. We use the deformed Kerr metric components~\eqref{def_metric_in}-\eqref{def_metric_fin} to bring Eq.~\eqref{eq:superhamiltonian} into the concrete form \begin{widetext} \begin{eqnarray} -\mu ^2\Sigma&=&-\frac{\left(r^2+a^2\right)^2-a^2 \sin ^2\theta (r^2A(u)+a^2)}{r^2A(u)+a^2}P_t^2 -2\frac{\widetilde{\omega}_{\rm fd}}{r^2A(u)+a^2}P_t P_{\phi } + \Delta_r P_r^2 \nonumber\\ &&+P_{\theta }^2+\frac{1}{\left(r^2+a^2\right)^2-a^2 \sin ^2\theta (r^2A(u)+a^2)}\left(\frac{(r^2+a^2 \cos ^2\theta)^2}{\sin ^2\theta }-\frac{{\widetilde{\omega}_{\rm fd}}^2}{r^2A(u)+a^2 }\right)P_{\phi }^2\label{eq: separation1}\,, \end{eqnarray} \end{widetext} where $P_r$, $ P_{\phi }$, and $P_{\theta }$ are the canonical radial, azimuthal, and polar angular momentum. From the symmetries we immediately obtain two constants of motion corresponding to the conservation of energy, $H_{\rm eff}$, and angular momentum about the symmetry axis, $L_{z}$; thus, we have \begin{subequations} \begin{eqnarray} P_t &=&-H_{\rm eff} \,, \label{eq:pt}\\ P_{\phi }&=&L_z\,, \end{eqnarray} \end{subequations} Then, Eq.~\eqref{eq: separation1} becomes \begin{widetext} \begin{eqnarray} -\Sigma&=&-\frac{\left(r^2+a^2\right)^2-a^2 \sin ^2\theta (r^2A(u)+a^2)}{r^2A(u)+a^2}\hat{H}_{\rm eff}^2+2\frac{\widetilde{\omega}_{\rm fd}}{r^2A(u)+a^2}\hat{H}_{\rm eff} \hat{L}_z+ \Delta_r\hat{P_r}^2 \nonumber\\ &&+\hat{P_{\theta }}^2+\frac{1}{\left(r^2+a^2\right)^2-a^2 \sin ^2\theta (r^2A(u)+a^2)}\left(\frac{(r^2+a^2 \cos ^2\theta)^2}{\sin ^2\theta }-\frac{{\widetilde{\omega}_{\rm fd}}^2}{r^2A(u)+a^2 }\right)\hat{L_{z}}^2\label{eq: separation2}\,, \end{eqnarray} where we have defined the reduced momenta $\hat{P}_r=P_r/\mu$, $\hat{P}_\theta=P_\theta/\mu$, and $\hat{L}_z=L_z/\mu$. It is convenient to rewrite this expression as \begin{eqnarray} -\Sigma&=&-\frac{\left(a\hat{L_{z}}-\left(r^2+a^2\right)\hat{H}_{\rm eff}\right)^2}{r^2A(u)+a^2}+\frac{\left(\hat{L_{z}}-a\sin ^2\theta\hat{H}_{\rm eff}\right)^2}{\sin ^2\theta}+ \Delta_r\hat{P_r}^2+\hat{P_{\theta }}^2 \nonumber\\ &&+2\frac{\widetilde{\omega}_{\rm fd}+a r^2\left(A(u)-1\right)}{r^2A(u)+a^2}\hat{H}_{\rm eff}\hat{L_{z}}-\frac{{\widetilde{\omega}_{\rm fd}}^2-a^2r^4\left(A(u)-1\right)^2}{\left(r^2A(u)+a^2\right)\left(\left(r^2+a^2\right)^2-a^2 \sin ^2\theta (r^2A(u)+a^2)\right)}\hat{L_{z}}^2\label{eq: separation3}\,, \end{eqnarray} and solving this equation by separation of variables gives \begin{equation} \label{separation1} \left(\frac{\hat{L_{z}}}{\sin \theta}\!-\!a\hat{H}_{\rm eff}\sin \theta\right)^2\!+\!\hat{P_{\theta }}^2\!+\!a^2\cos^2\theta\!=\!\frac{\left(a\hat{L_{z}}-\left(r^2+a^2\right)\hat{H}_{\rm eff}\right)^2}{r^2A(u)+a^2}-\Delta_r\hat{P_r}^2-r^2-2\frac{\widetilde{\omega}_{\rm fd}+a r^2\left(A(u)-1\right)}{r^2A(u)+a^2}\hat{H}_{\rm eff}\hat{L_{z}}+F(r,\theta)\hat{L_{z}}^2 \,, \end{equation} where \begin{equation} F(r,\theta)=\frac{{\widetilde{\omega}_{\rm fd}}^2-a^2r^4\left(A(u)-1\right)^2}{\left(r^2A(u)+a^2\right)\left(\left(r^2+a^2\right)^2-a^2 \sin ^2\theta (r^2A(u)+a^2)\right)}\,. \end{equation} \end{widetext} In the test-particle limit $\nu \to 0$, $A(u)\to1-2u$, the $r$-$\theta$ coupling function $F(r,\theta)\to0$, and both sides must be equal to a new constant of the motion since their Poisson brackets with the Hamiltonian are equal to zero, and thus we can obtain the reduced Carter constant $\hat{\mathcal{K}}$ expressed in terms of ($\theta$, $\hat{P_{\theta }}$) like Eq.(49) of Ref.~\cite{carter68}, \begin{equation} \label{Kintheta} \hat{\mathcal{K}}=\hat{P_{\theta }}^2+a^2\cos^2\theta+\left(\frac{\hat{L_{z}}}{\sin \theta}\!-\!a\sin \theta\hat{H}_{\rm eff}\right)^2 \,, \end{equation} There is another definition of the Carter constant, $\hat{Q}\equiv\hat{\mathcal{K}}-(\hat{L_{z}}-a \hat{H_{\rm eff}})^2$, which vanishes for equatorial orbits($\theta=\pi/2$). If we consider the cases of the inspirals with nonzero mass ratio, $F(r,\theta)$ should no longer be ignored, then the $r$ and $\theta$ motion cannot be decoupled anymore. Now, let us see if there is an approximation $F(r,\theta) \approx F(r)$. It is convenient to rewrite the function $F(r,\theta)$ as \begin{widetext} \begin{equation} F(r,\theta)=\frac{{\widetilde{\omega}_{\rm fd}}^2-a^2r^4\left(A(u)-1\right)^2}{\left(r^2A(u)+a^2\right)\left(r^2+a^2\right)^2}\times\frac{1}{1-\frac{a^2 \sin ^2\theta \left(r^2A(u)+a^2\right)}{\left(r^2+a^2\right)^2}} \,. \end{equation} \end{widetext} It can be easily noticed that $\frac{a^2 \sin ^2\theta \left(r^2A(u)+a^2\right)}{\left(r^2+a^2\right)^2}$ is a 2PN correction and we abort it first, and thus the first-order Maclaurin series of $F(r,\theta)$ is obtained as \begin{equation} \label{eq:Frthata1} F(r,\theta)\simeq G(r)+\frac{a^2 \sin ^2\theta}{\left(r^2+a^2\right)^4} ({\widetilde{\omega}_{\rm fd}}^2-a^2r^4\left(A(u)-1\right)^2)\,, \end{equation} where \begin{equation} G(r)=\frac{{\widetilde{\omega}_{\rm fd}}^2-a^2r^4\left(A(u)-1\right)^2}{\left(r^2A(u)+a^2\right)\left(r^2+a^2\right)^2} \,, \end{equation} and through 3PN order~\cite{buonanno2000transition,damour2000determination} \begin{equation} A(u)=1-2u+\nu\left( 2u^3+(\frac{94}{3}-\frac{41\pi^2}{32})u^4\right)\,, \end{equation} Inserting it into Eq.~\eqref{eq:Frthata1} [truncated at $\mathcal{O}(\nu)$ term] leads to \begin{widetext} \begin{equation} F(r,\theta)\simeq G(r)+\frac{4 \,\nu \,a^4 M^4 \sin ^2\theta }{\left(r^2+a^2\right)^4}\left(2+\left(\frac{94}{3}-\frac{41 \pi ^2}{32}\right)u+\omega_1^{\rm fd}+ \omega_2^{\rm fd}\frac{a^2}{M^2}\right) \,, \end{equation} where the second term as a function of both $r$ and $\theta$ is just 8PN with a mass ratio and can be safely ignored. We replace $F(r,\theta)$ by G(r) to decouple $r$ and $\theta$ so that Eq.~\eqref{separation1} can be separated. As shown in Fig.~\ref{fig:1}, the error between $F(r,\theta)$ and $G(r)$ mainly depends on the value of $r$ and is maximal when $\theta = \pi/2$ (the equatorial plane). One can see that even very close to the horizon ($\xi \rightarrow 0$ for the orange line), the error is still one order smaller than the mass ratio. Otherwise, the term we aborted is two or more orders less than the mass ratio. We believe that replacing $F(r,\theta)$ with $G(r)$ retains enough accuracy for EMRIs. \begin{figure}[!h] \begin{center} \includegraphics[width=0.8\columnwidth]{1.pdf} \caption{\emph{Error of the approximation of the coupling function $F(r,\theta)$.} The solid line and points represent $\nu =10^{-4}$ and $10^{-6}$ respectively. It is a very close approximation to substitute the r function $G(r)$ for $F(r,\theta)$. Even if we chose the extreme orbital parameters near LSO(for the orange line, $p_s=2.96M$), the error is less than $0.1\nu$.} \label{fig:1} \end{center} \end{figure} Now we can obtain the approximate reduced Carter constant $\hat{\mathcal{K}}$ expressed in terms of ($\theta$, $\hat{P_{\theta }}$) same as Eq.~\eqref{Kintheta} and the other expression in terms of ($r$, $\hat{P_r}$) \begin{equation} \hat{\mathcal{K}}=\frac{\Big[a\hat{L_{z}}\!-\!\left(r^2+a^2\right)\hat{H}_{\rm eff}\Big]^2}{r^2A(u)+a^2}-\Delta_r\hat{P_r}^2-r^2-2\frac{\widetilde{\omega}_{\rm fd}+a r^2\left(A(u)-1\right)}{r^2A(u)+a^2}\hat{H}_{\rm eff}\hat{L_{z}}\!\!+G(r)\hat{L_{z}}^2 \,, \end{equation} \end{widetext} By using these constants of motion, the angular momentum $\hat{P_{\theta}}$ and $\hat{P_r}$ can be expressed as \begin{widetext} \begin{subequations} \begin{eqnarray} &\hat{P_{\theta}}^2=\hat{Q}-\cos ^2\theta \bigg[a^2 \left(1-\hat{H}_{\rm eff}^2\right)+\cfrac{\hat{L_{z}}^2}{\sin^2 \theta}\bigg]\,\label{eq:ptheta},\\ &\hat{P_r}^2=\cfrac{\Big[a\hat{L_{z}}\!-\!(r^2\!+\!a^2)\hat{H_{\rm eff}}\Big]^2\!-\!\left( r^2 A(u)\!+\!a^2\right)\bigg[r^2\!+\!\hat{\mathcal{K}}\!+\!2\cfrac{\widetilde{\omega}_{\rm fd}+a r^2\left(A(u)-1\right)}{r^2A(u)+a^2}\hat{H}_{\rm eff}\hat{L_{z}}\!-\!G(r)\hat{L_{z}}^2\bigg]}{\left( r^2 A(u)\!+\!a^2\right)^2 D^{-1}(u) }\,\label{eq:pr}. \end{eqnarray} \end{subequations} \end{widetext} In Eq.~\eqref{eq:ptheta}, if $\hat{P}_\theta = 0$, the polar motion is at the turning points $\theta = \theta_{\rm min}$ or $\pi-\theta_{\rm min}$. Then we get the relation between the semi-Carter ``constant" and the orbital inclination, \begin{eqnarray} \hat{Q} = \cos ^2\theta_{\rm min} \bigg[a^2 \left(1-\hat{H}_{\rm eff}^2\right)+\cfrac{\hat{L_{z}}^2}{\sin^2 \theta_{\rm min}}\bigg]\,.\label{eq:carter} \end{eqnarray} This semi-Carter constant has the same form as in the test-particle case, but with mass-ratio corrections hidden in $H_{\rm eff}$ and $L_z$, which will be given explicitly later. There is another straightforward way to get $\boldmath{P}$ by numerically solving the Hamiltonian equations (\ref{eq:hamilton}). We then compare the analytical equation Eq.~\eqref{eq:ptheta} and the numerical results (also including the spin terms like as $H_s$) and show the results in Table~\ref{ananlytical numerical}. We find that our analytical approximations are very close to the numerical results, even for a mass ratio as large as 0.01, which proves that our approximation works well for EMRIs or even intermediatemass-ratio inspirals. \begin{widetext} \begin{table}[!h] \begin{center} \caption{Comparison of the maximum $\hat{P_{\theta }}$ ($\hat{P_{\theta }}$ at $\theta=\pi/2$) between the analytical formalism and numerical integration.} \begin{tabular}{|c|c|c|} \hline $\nu=0.01$&analytical max$\hat{P_{\theta }}$&numerical max$\hat{P_{\theta }}$\\ \hline $p=8,e=1/3,a=0.99,\theta_{\rm min}=\pi/4$&$2.2909944716$&$2.2909945165$\\ \hline $p=4,e=1/3,a=0.99,\theta_{\rm min}=\pi/4$&$1.8126129568$&$1.8126323323$\\ \hline $p=8,e=1/3,a=0.1,\theta_{\rm min}=\pi/4$&$2.5258065572$&$2.5258065544$\\ \hline $p=8,e=1/3,a=0.99,\theta_{\rm min}=\pi/10$&$3.2445223467$&$3.2445223751$\\ \hline \end{tabular}\label{ananlytical numerical} \end{center} \end{table} \end{widetext} \subsection{Reparametrization of the energy and angular momentum} \label{sec:constants} Solving Eqs.~\eqref{eq:superhamiltonian} and~\eqref{eq:pt} for ${H}_{\rm eff}$ yields the effective Hamiltonian associated with the deformed Kerr metric \begin{equation}\label{eq:Hns} {H}_{\rm eff} = \frac{g^{t \phi}}{g^{tt}} P_\phi + \frac{1}{\sqrt{-g^{tt}}} \sqrt{\mu^2 + \Bigg[g^{\phi\phi}-\frac{(g^{t \phi})^2}{g^{tt}} \Bigg]P_\phi^2+g^{rr}P_r^2+g^{\theta\theta }P^2_\theta }\,, \end{equation} The energy of the system is given by \begin{equation} E=H_{\rm EOB}, \end{equation} which implies the relation \begin{equation} \hat{H}_{\rm eff}(E)=1+\frac{1}{2\nu}\left(\frac{E^2}{M^2}-1\right). \label{eq:HeffofE} \end{equation} \begin{figure}[!h] \begin{center} \includegraphics[width=0.8\columnwidth]{orbitimage.png} \caption{\emph{Diagram of 3D motion of a CO around a Kerr black hole.} The area encircled by the solid red line is the section of trajectories on the $r$-$\theta$ plane. Here, $r_{\rm max/min}$ is just $r_{1/2}$ in Eq. (\ref{eq:r12}).} \label{fig:orbit3d} \end{center} \end{figure} The constants of motion and the dynamical equations in the last subsection can be written in terms of the geometrized orbital elements: the semilatus rectum $p$, eccentricity $e$, and orbital inclination $\iota$. This will make the description of the system more intuitive. For an eccentric orbit, there exist apastron and periastron points which can be expressed as \begin{equation} r_{1}=\frac{p M}{1-e}, \ \ \ \ \ r_2=\frac{p M}{1+e}, \label{eq:r12} \end{equation} where\;$r_1,r_2$\;are the turning points of the radial motion. $\theta_{\rm min}$ and $\pi-\theta_{\rm min}$ is the turning points of polar motion, and $\iota \equiv \pi/2-\theta_{\rm min}$ defines the so-called orbital inclination (see Fig.~\ref{fig:orbit3d}). These turning points are computed by solving the radial and polar equations of motion for\;$\dot{r}=0, \dot{\theta}=0$. By setting the radial and polar equations of motion equals to zero with $P_r=P_\theta=0$, evaluating Eq.~\eqref{eq:HeffofE} at $(r_1,\theta_{\rm min})$ and $(r_2,\theta_{\rm min})$ leads to \begin{widetext} \begin{subequations} \label{eq:psofep}\begin{align} \hat{L}_z^2\!&=\!\frac{\left(a_1\!-\!a_2\right)^2\left(b_1^2\!+\!b_2^2\right)\!-\!(b_1^2\!-\!b_2^2)(b_1^2c_1\!-\!b_2^2c_2)\!-\!2 (a_1\!-\!a_2)b_1 b_2\sqrt{\left(a_1\!-\!a_2\right)^2\!-\!\left(b_1^2\!-\!b_2^2\right)\left(c_1\!-\!c_2\right)}}{\left[(a_1\!-\!a_2)^2\!-\!\left(b_1^2 c_1\!-\!b_2^2 c_2\right)\right]^2} \\ \frac{ E^2}{M^2}\!&=\!1+2\nu\left(a_1 \hat{L}_z\!+\!\sqrt{\frac{c_1 \hat{L}_z^2\!+\!1}{b_1} } -1\right)\qquad \end{align} \end{subequations} \end{widetext} where the coefficients are \begin{subequations} \label{eq:abc} \begin{eqnarray} a_1&&=\frac{\widetilde{\omega}_{\rm fd1} }{\Lambda _{t1}}\,,\\ a_2&&=\frac{\widetilde{\omega}_{\rm fd2} }{\Lambda _{t2}}\,,\\ b_1&&=\sqrt{\frac{\Sigma _1 \Delta _{t1}}{\Lambda _{t1}}}\,,\\ b_2&&=\sqrt{\frac{\Sigma _2 \Delta _{t2}}{\Lambda _{t2}}}\,,\\ c_1&&=\frac{\Sigma _1}{\left(1-\cos ^2\theta_{\rm min}\right)\Lambda _{t1}}\,,\\ c_2&&=\frac{\Sigma _2}{\left(1-\cos ^2\theta_{\rm min}\right)\Lambda _{t2}}, \end{eqnarray} \end{subequations} in which the subscripts 1 and 2 mean that the function is to be evaluated at $(r_1,\theta_{\rm min})$ and $(r_2,\theta_{\rm min})$, \begin{subequations} \begin{eqnarray} \Sigma _1&&=a^2 \cos ^2\theta_{\rm min}+ r_1^2\,,\\ \Sigma _2&&=a^2 \cos ^2\theta_{\rm min}+ r_2^2\,,\\ \Delta _{t1}&&=a^2+A(r_1) r_1^2\,,\\ \Delta _{t2}&&=a^2+A(r_2) r_2^2\,,\\ \Lambda _{t1}&&=\left(a^2+r_1^2\right)^2-a^2 \sin ^2\theta_{\rm min} \Delta _{t1}\,,\\ \Lambda _{t2}&&=\left(a^2+r_2^2\right)^2-a^2 \sin ^2\theta_{\rm min} \Delta _{t2}\,,\\ \widetilde{\omega}_{\rm fd1}&&=\frac{a^3 \nu \omega _2}{r_1}+\frac{a \nu \omega _1}{r_1}+2 a r_1\,,\\ \widetilde{\omega}_{\rm fd2}&&=\frac{a^3 \nu \omega _2}{r_2}+\frac{a \nu \omega _1}{r_2}+2 a r_2. \end{eqnarray} \end{subequations} The above formalism for a Kerr black hole is much more complicated than the Schwarzschild ones in Ref.~\cite{hinderer2017foundations}. Obviously, for the test-particle limit $\nu \to 0$, the above results will go back to the geodesic motion of a test particle in Kerr spacetime. \subsection{Determination of the fundamental frequencies} \label{sec:frequencies} Since in our approximation the equations of motion in the deformed-Kerr spacetime are separable in the coordinates $r$, $\theta$, and $\phi$, the action variables can be calculated from cyclic integrals over the spatial conjugate momenta in the Boyer-Lindquist coordinate representation: \begin{eqnarray} \label{eq:action_var_r} J_{r} && = \frac{1}{2\pi}\oint P_{r}\,\mathrm{d} r\,, \\ \label{eq:action_var_theta} J_{\theta}&& = \frac{1}{2\pi}\oint P_{\theta}\,\mathrm{d} \theta\,, \\ \label{eq:action_var_phi} J_{\phi} && = \frac{1}{2\pi}\oint P_{\phi}\,\mathrm{d} \phi = L_{z}\,. \end{eqnarray} The standard procedure of determining fundamental frequencies is to find the explicit form of the Hamiltonian in the action-angle representation, $H^{(\mathrm{aa})}$, and calculate the frequencies from the partial derivatives with respect to the radial and polar action variables $J_{k}$~\cite{goldstein1980classical}: \begin{equation} \label{eq:frequency} \mu\omega_{k} = \frac{\partial H}{\partial J_{k}}^{(\mathrm{aa})}\,. \end{equation} Unfortunately, Eqs.~\eqref{eq:action_var_r} and~\eqref{eq:action_var_theta} cannot be solved analytically, and so they do not admit an explicit inversion. However, according to the Schmidt method~\cite{Schmidt2002Celestial}, Eq.~\eqref{eq:frequency} can be solved even without knowing the functional form of the Hamiltonian $H^{(\mathrm{aa})}$ if the theorem on implicit functions is employed. Let $P_{\beta}^{(\mathrm{aa})}=f_{\beta}^{(\mathrm{aa})}(-\mu^{2}/2,H_{\rm eff},L_{z},Q)$ be the momenta given by $P_{0}^{(\mathrm{aa})}=p_{t}=-H_{\rm eff}$ and $P_{k}^{(\mathrm{aa})}=J_{k}$. If we denote the Jacobian matrix of $f$ by $\mathsfsl{D}f$, then, by the theorem on implicit functions, $\mathsfsl{D}f\cdot\mathsfsl{D}(f^{-1})= \mathsfsl{D}f\cdot(\mathsfsl{D}f)^{-1}=\mathsfsl{I}$, provided that $f$ is non-zero and the Jacobian does not vanish~\cite{1979Analysis}. As $-\mu^2/2$ is the invariant value of the Hamiltonian, we can substitute $-\mu^2/2=g^{\alpha \beta}P_\alpha P_\beta/2=H^{(\mathrm{aa})}(-H_{\rm eff},J_{k})$. In addition, two rows of the Jacobian matrix are trivial due to the identities $P_{0}^{(\mathrm{aa})}=-H_{\rm eff}$ and $J_{\phi}=L_{z}$. For simplicity, we use the symbol $H$ to denote the Hamiltonian $H^{(\mathrm{aa})}$ below. Thus, the equation $\mathsfsl{D}f\cdot\mathsfsl{D}(f^{-1})=\mathsfsl{I}$ reads \begin{equation} \left(\begin{array}{llll} 0 & -1 & 0 & 0 \\ \frac{\partial J_{r}}{\partial H} & \frac{\partial J_{r}}{\partial H_{\rm eff}} & \frac{\partial J_{r}}{\partial L_{z}} & \frac{\partial J_{r}}{\partial Q} \\ \frac{\partial J_{\theta}}{\partial H} & \frac{\partial J_{\theta}}{\partial H_{\rm eff}} & \frac{\partial J_{\theta}}{\partial L_{z}} & \frac{\partial J_{\theta}}{\partial Q} \\ 0 & 0 & 1 & 0 \end{array}\right)\cdot \left(\begin{array}{llll} -\frac{\partial H}{\partial H_{\rm eff}} & \frac{\partial H}{\partial J_{r}} & \frac{\partial H}{\partial J_{\theta}} & \frac{\partial H}{\partial J_{\phi}} \\ -1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ -\frac{\partial Q}{\partial H_{\rm eff}} & \frac{\partial Q}{\partial J_{r}} & \frac{\partial Q}{\partial J_{\theta}} & \frac{\partial Q}{\partial J_{\phi}} \\ \end{array}\right) = \mathsfsl{I}. \end{equation} The above matrix equation is valid if and only if the orbit is nonequatorial~\cite{Schmidt2002Celestial}. We have discussed the condition of equatorial orbits in our previous work~\cite{zc2020}. Then, it can be split into four nontrivial sets of linear equations in the eight unknowns $-\frac{\partial H}{\partial H_{\rm eff}}$, $\frac{\partial H}{\partial J_{k}}$, $-\frac{\partial Q}{\partial H_{\rm eff}}$, and $\frac{\partial Q}{\partial J_{k}}$: \begin{eqnarray} -&&\mathsfsl{A}\cdot\frac{\partial}{\partial H_{\rm eff}} \left(\begin{array}{llll} H \\ Q \end{array}\right) = \left(\begin{array}{llll} 2 W(r_{1},r_{2}) \\ 2 a^{2} H_{\rm eff} U(\theta_{\rm min},\pi/2) \end{array}\right) \\ \label{eq:syst_act_r} &&\mathsfsl{A}\cdot\frac{\partial}{\partial J_{r}} \left(\begin{array}{llll} H \\ Q \end{array}\right) = \left(\begin{array}{llll} 2\pi \\ 0 \end{array}\right), \\ &&\mathsfsl{A}\cdot\frac{\partial}{\partial J_{\theta}} \left(\begin{array}{llll} H \\ Q \end{array}\right) = \left(\begin{array}{llll} 0 \\ \pi \end{array}\right), \\ &&\mathsfsl{A}\cdot\frac{\partial}{\partial J_{\phi}} \left(\begin{array}{llll} H \\ Q \end{array}\right) = \left(\begin{array}{llll} 2 Z(r_{1},r_{2}) \\ 2 L_{z} V(\theta_{\rm min},\pi/2) \end{array}\right), \end{eqnarray} with the coefficient matrix \begin{equation} \mathsfsl{A} = \left(\begin{array}{llll} 2\pi \frac{\partial J_{r}}{\partial H} & 2\pi \frac{\partial J_{r}}{\partial Q} \\ \pi \frac{\partial J_{\theta}}{\partial H} & \pi \frac{\partial J_{\theta}}{\partial Q} \end{array}\right)= \left(\begin{array}{llll} 2Y(r_{1},r_{2}) & -X(r_{1},r_{2}) \\ 2 a^{2}U(\theta_{\rm min},\pi/2)& T(\theta_{\rm min},\pi/2) \end{array}\right), \end{equation} where $r_{1}$ and $r_{2}$ are the turning points of radial motion, and $X(r_{1},r_{2})$, $Y(r_{1},r_{2})$,$Z(r_{1},r_{2})$ and $W(r_{1},r_{2})$ are radial integrals defined by \begin{subequations} \begin{eqnarray} X(r_{1},r_{2}) & = &\int_{r_{1}}^{r_{2}}\frac{\mathrm{d} r}{\Delta_r P_r}, \\ Y(r_{1},r_{2}) & = &\int_{r_{1}}^{r_{2}}\frac{r^{2}\,\mathrm{d} r}{\Delta_r P_r}, \\ Z(r_{1},r_{2}) & = -&\int_{r_{1}}^{r_{2}} \frac{\partial P_r}{\partial L_z}\,\mathrm{d} r, \\ W(r_{1},r_{2})& = & \int_{r_{1}}^{r_{2}}\frac{\partial P_r}{\partial H_{\rm eff}}\,\mathrm{d} r, \end{eqnarray} \end{subequations} $T(\theta_{\rm min},\pi/2)$, $U(\theta_{\rm min},\pi/2)$, and $V(\theta_{\rm min},\pi/2)$ are polar integrals defined by \begin{subequations} \begin{eqnarray} T(\theta_{\rm min},\pi/2)& = &\int_{\theta_{\rm min}}^{\pi/2}\frac{\mathrm{d} \theta}{P_\theta}, \\ U(\theta_{\rm min},\pi/2)& = &\int_{\theta_{\rm min}}^{\pi/2}\frac{\cos^{2}\theta}{P_\theta}\,\mathrm{d} \theta, \\ V(\theta_{\rm min},\pi/2)& = &\int_{\theta_{\rm min}}^{\pi/2}\frac{\cot^{2}\theta}{P_\theta}\,\mathrm{d} \theta . \end{eqnarray} \end{subequations} The above radial functions $X,Y,Z,W$ and polar functions $T,U,V$ are not proper integrals because the integrated functions are divergent at the turning points $r_1,r_2$ and $\theta_{\rm min},\pi-\theta_{\rm min}$. Thus, we define $\xi$ by the equation $r=pM/(1+e\cos\xi)$, where $p$ is called the semi-latus rectum and $e$ is the eccentricity of the orbit, and we define $\chi$ with $\cos^2\theta=\cos^2\theta_{\rm min}\cos^2\chi$. As $\xi$ varies from $0$ to $2\pi$ as $r$ goes through a complete cycle, $\chi$ varies from $0$ to $2\pi$ as $\theta$ oscillates through its full range of motion. Then transform $X,Y,X,W$ and $T,U,V$ into well-behaved integrals \begin{subequations} \begin{eqnarray} \label{eq:rad_integr_x} X & = &\int_{0}^{\pi}\frac{ e p\sin \xi}{(1+e \cos \xi)^2 }\frac{\mathrm{d} \xi}{\Delta_r P_r}, \\ \label{eq:rad_integr_y} Y & = &\int_{0}^{\pi}\frac{ e p\sin \xi}{(1+e \cos \xi)^2 }\frac{r^{2}\,\mathrm{d} \xi}{\Delta_r P_r}, \\ \label{eq:rad_integr_z} Z & = -&\int_{0}^{\pi}\frac{ e p\sin \xi}{(1+e \cos \xi)^2 } \frac{\partial P_r}{\partial L_z}\,\mathrm{d} \xi, \\ \label{eq:rad_integr_w} W & = & \int_{0}^{\pi}\frac{ e p\sin \xi}{(1+e \cos \xi)^2 }\frac{\partial P_r}{\partial H_{\rm eff}}\,\mathrm{d} \xi, \end{eqnarray} \end{subequations} which transforming Eq.~\eqref{eq:ptheta} to \begin{equation} \beta^2(z^2-z_+^2)(z^2-z_-^2)=P_{\theta}^2(1-z^2) \label{eq:pthetaz}\,, \end{equation} where $\beta^{2}=a^{2}(\mu^2-{H_{\rm eff}}^{2})$, $z_{\pm}^{2}$ are the two roots of the equation $P_\theta=0$ when substituting $\cos\theta=z$ in $P_\theta$ and given by \begin{eqnarray} z_-&=&\cos\theta_{\rm min}\,, \\ z_+&=&\cfrac{L_z^2+Q+\beta+\sqrt{(L_z^2+Q+\beta)^2-4\beta Q}}{2\beta}\,, \end{eqnarray} by this way, Schmidt derives the following expressions~\cite{Schmidt2002Celestial} for the polar integrals \begin{subequations} \begin{eqnarray} T & = & \frac{1}{\beta z_{+}}K(k)\,, \\ \label{eq:angl_intgr2} U & = & \frac{z_{+}}{\beta}[K(k)-E(k)]\,, \\ \label{eq:angl_intgr3} V & = & \frac{z_{+}}{\beta}[\Pi(z_{-}^{2},k)-K(k)]\,, \end{eqnarray} \end{subequations} where $k=z_{-}^{2}/z_{+}^{2}$, $K(k)$, $E(k)$ and $\Pi(z_{-}^{2},k)$ are, respectively, the complete elliptical integrals of the first, second and third kind, \begin{subequations} \begin{eqnarray} \label{eq:ell_integr_k} K(k) & =&\int_{0}^{\pi/2}\!\frac{\mathrm{d} \chi}{\sqrt{1-k\sin^{2}\chi}}, \\ \label{eq:ell_integr_e} E(k) & =&\int_{0}^{\pi/2}\!\sqrt{1-k\sin^{2}\chi}\,\mathrm{d} \chi, \\ \label{eq:ell_integr_pi} \Pi({z_{-}^{2},k}) & =& \int_{0}^{\pi/2}\!\frac{\mathrm{d}\chi}{\left(1-z_{-}^{2}\sin^{2}\chi\right) \sqrt{1-k\sin^{2}\chi}}, \end{eqnarray} \end{subequations} The solutions of the above systems of equations for $-\frac{\partial H}{\partial H_{\rm eff}}$ and $\frac{\partial H}{\partial J_{k}}$ are given by \begin{eqnarray} \label{eq:h_derv_p0} -&&\frac{\partial H}{\partial H_{\rm eff}} = \frac{K(k)W+ a^{2}z_{+}^{2}E\left[K(k)-E(k)\right]X }{K(k)Y + a^{2}z_{+}^{2}\left[K(k)-E(k)\right]X}, \\ \label{eq:h_derv_jr} &&\frac{\partial H}{\partial J_{r}} = \frac{\pi K(k)}{K(k)Y + a^{2}z_{+}^{2}\left[K(k)-E(k)\right] X}, \\ \label{eq:h_derv_jtheta} &&\frac{\partial H}{\partial J_{\theta}} = \frac{\pi\beta z_{+}X}{2\{K(k)Y + a^{2}z_{+}^{2}\left[K(k)-E(k)\right]X\}}, \\ \label{eq:h_derv_jphi} &&\frac{\partial H}{\partial J_{\phi}} = \frac{K(k)Z + L_{z}[\Pi(z_{-}^{2},k)-K(k)]X }{K(k)Y + a^{2}z_{+}^{2}[K(k)-E(k)]X}. \end{eqnarray} From Eqs.~\eqref{eq:frequency} and~\eqref{eq:h_derv_p0}-\eqref{eq:h_derv_jphi}, the coordinate-time frequencies $\omega _r,\omega _{\theta}$ and $\omega _{\phi}$ are obtained \begin{eqnarray} \omega _r &&=\frac{\pi K(k)}{K(k)W+ a^{2}z_{+}^{2}E\left[K(k)-E(k)\right]X}, \\ \omega _{\theta} &&=\frac{\pi\beta z_{+}X}{2\{K(k)W+ a^{2}z_{+}^{2}E\left[K(k)-E(k)\right]X\}}, \\ \omega _{\phi} &&= \frac{K(k)Z + L_{z}[\Pi(z_{-}^{2},k)-K(k)]X }{K(k)W+a^{2}z_{+}^{2}E\left[K(k)-E(k)\right]X}. \end{eqnarray} \begin{figure}[!h] \begin{center} \includegraphics[width=0.5\columnwidth]{2.pdf} \includegraphics[width=0.5\columnwidth]{3.pdf} \includegraphics[width=0.5\columnwidth]{4.pdf} \caption{\emph{Frequency shifts $\frac{\Delta\omega}{\nu\omega_{0}}$ vs semilatus rectum $p$ in the cases of various $a,~\nu,~ e,~ \theta_{\rm min}$.} The solid line and points represent $\nu =10^{-4}$ and $10^{-6}$ respectively.} \label{fig:omega_p} \end{center} \end{figure} \comment{ \begin{figure}[!h] \begin{center} \includegraphics[width=0.5\columnwidth]{3.pdf} \caption{\emph{Frequency shifts $\frac{\Delta\omega_{\phi}}{\nu\omega_{\phi0}}$ vs semilatus rectum $p$ in the cases of various $a,~\nu,~ e,~ \theta_{\rm min}$.} The solid line and points represent $\nu =10^{-4}$ and $10^{-6}$ respectively.} \label{fig:3} \end{center} \end{figure} \begin{figure}[!h] \begin{center} \includegraphics[width=0.5\columnwidth]{4.pdf} \caption{\emph{Frequency shifts $\frac{\Delta\omega_{\theta}}{\nu\omega_{\theta0}}$ vs semilatus rectum $p$ in the cases of various $a,~\nu,~ e,~ \theta_{\rm min}$.} The solid line and points represent $\nu =10^{-4}$ and $10^{-6}$ respectively.} \label{fig:4} \end{center} \end{figure} } \begin{figure}[!h] \begin{center} \includegraphics[width=0.5\columnwidth]{5.pdf} \includegraphics[width=0.5\columnwidth]{6.pdf} \includegraphics[width=0.5\columnwidth]{7.pdf} \caption{\emph{Frequency shifts $\frac{\Delta\omega}{\nu\omega_{0}}$ vs eccentricity $e$ in the cases of various $a,~\nu,~ p,~ \theta_{\rm min}$.} The solid line and points represent $\nu =10^{-4}$ and $10^{-6}$ respectively.} \label{fig:omega_e} \end{center} \end{figure} \comment{ \begin{figure}[!h] \begin{center} \includegraphics[width=0.5\columnwidth]{6.pdf} \caption{\emph{Frequency shifts $\frac{\Delta\omega_{\phi}}{\nu\omega_{\phi0}}$ vs eccentricity $e$ in the cases of various $a,~\nu,~ p,~ \theta_{\rm min}$.} The solid line and points represent $\nu =10^{-4}$ and $10^{-6}$ respectively.} \label{fig:6} \end{center} \end{figure} \begin{figure}[!h] \begin{center} \includegraphics[width=0.5\columnwidth]{7.pdf} \caption{\emph{Frequency shifts $\frac{\Delta\omega_{\theta}}{\nu\omega_{\theta0}}$ vs eccentricity $e$ in the cases of various $a,~\nu,~ p,~ \theta_{\rm min}$.} The solid line and points represent $\nu =10^{-4}$ and $10^{-6}$ respectively.} \label{fig:7} \end{center} \end{figure} } \begin{figure}[!h] \begin{center} \includegraphics[width=0.5\columnwidth]{8.pdf} \includegraphics[width=0.5\columnwidth]{9.pdf} \includegraphics[width=0.5\columnwidth]{10.pdf} \caption{\emph{Frequency shifts $\frac{\Delta\omega}{\nu\omega_{0}}$ vs the minimal polar angle $\theta_{\rm min}$ in the cases of various $a,~\nu,~ p,~ e$.} The solid line and points represent $\nu =10^{-4}$ and $10^{-6}$ respectively.} \label{fig:omega_i} \end{center} \end{figure} \comment{ \begin{figure}[!h] \begin{center} \includegraphics[width=0.5\columnwidth]{9.pdf} \caption{\emph{Frequency shifts $\frac{\Delta\omega_{\phi}}{\nu\omega_{\phi0}}$ vs the minimal polar angle $\theta_{\rm min}$ in the cases of various $a,~\nu,~ p,~ e$.} The solid line and points represent $\nu =10^{-4}$ and $10^{-6}$ respectively.} \label{fig:9} \end{center} \end{figure} \begin{figure}[!h] \begin{center} \includegraphics[width=0.5\columnwidth]{10.pdf} \caption{\emph{Frequency shifts $\frac{\Delta\omega_{\theta}}{\nu\omega_{\theta0}}$ vs the minimal polar angle $\theta_{\rm min}$ in the cases of various $a,~\nu,~ p,~ e$.} The solid line and points represent $\nu =10^{-4}$ and $10^{-6}$ respectively.} \label{fig:10} \end{center} \end{figure} } \begin{figure}[!h] \begin{center} \includegraphics[width=0.5\columnwidth]{11.pdf} \includegraphics[width=0.5\columnwidth]{12.pdf} \includegraphics[width=0.5\columnwidth]{13.pdf} \caption{\emph{Frequency shifts $\frac{\Delta\omega}{\nu\omega_{0}}$ vs spin $a$ in the cases of various $~\nu, ~ p, ~ e,~ \theta_{\rm min}$.} The solid line and points represent $\nu =10^{-4}$ and $10^{-6}$ respectively.} \label{fig:omega_a} \end{center} \end{figure} \comment{ \begin{figure}[!h] \begin{center} \includegraphics[width=0.5\columnwidth]{12.pdf} \caption{\emph{Frequency shifts $\frac{\Delta\omega_{\phi}}{\nu\omega_{\phi0}}$ vs spin $a$ in the cases of various $~\nu, ~ p, ~ e,~ \theta_{\rm min}$.} The solid line and points represent $\nu =10^{-4}$ and $10^{-6}$ respectively.} \label{fig:12} \end{center} \end{figure} \begin{figure}[!h] \begin{center} \includegraphics[width=0.5\columnwidth]{13.pdf} \caption{\emph{Frequency shifts $\frac{\Delta\omega_{\theta}}{\nu\omega_{\theta0}}$ spin $a$ in the cases of various $~\nu, ~ p, ~ e,~ \theta_{\rm min}$.} The solid line and points represent $\nu =10^{-4}$ and $10^{-6}$ respectively.} \label{fig:13} \end{center} \end{figure} } The above equations have the same forms as the test particle ones given in \cite{Schmidt2002Celestial}. However, the mass-ratio corrections have to be encoded in each variable. To explore the influence of the mass ratio on these frequencies, we demonstrate the relative frequency shift $(\omega(\nu)-\omega_0)/\omega_0$ (where the subscript 0 means the test-particle case $\nu \rightarrow 0$) with varied orbital parameters. In Fig.~\ref{fig:omega_p}, we can see that the three frequency shifts due to the mass ratio corrections are one order larger than the mass-ratio, especially when $p$ approaches $p_s$ (the edge of last stable orbit). The effective spin terms we omitted at the beginning of this section have much smaller magnitudes. This proves again that the approximation we made is reasonable for EMRIs. Fig.~\ref{fig:omega_e} demonstrates the relations of frequency shifts due to mass ratios with eccentricities. Interestingly, the azimuthal and polar frequency shifts increase when the eccentricity grows, but the radial frequency error is not sensitive to the eccentricity [about $O(\nu)$]. When $e$ becomes extreme, the shift decreases. The variation of frequency shifts also depends on the orbital inclination. In Fig.~\ref{fig:omega_i}, for the small semilatus rectum, the frequency errors due to mass ratio grow very fast when the orbital inclination $\iota$ increases (i.e., $\theta_{\rm min} \rightarrow 0$). However, for large $p$, the frequency shifts are not very sensitive to the orbital inclination. Finally, Fig.~\ref{fig:omega_a} shows the frequency shifts vs the effective Kerr parameter $a$ (approachs to the Kerr parameter of the central black hole when $\nu \rightarrow 0$). When $a$ becomes smaller, the last stable orbit (LSO) is farther away from the black hole (i.e., $p_s$ becomes larger). Then for the fixed $p = 6$, the orbit is closer to the LSO as $a$ decreases, so we can see that the frequency shifts increase. When $p = 8$, which is just a little larger than the radius of the innermost stable circular orbit ($r_{\rm isco} = 6$ for a nonspinning BH), the dependence is no longer obvious All of the above results state that the mass-ratio correction has a substantial influence on the orbital frequencies even for the extreme-mass-ratio limit. This means that in the construction of the waveform templates for EMRIs, the mass ratio needs to be included in the orbital calculations. However, as we stated in the Introduction, the frequency shifts in Fig.~\ref{fig:omega_p}-\ref{fig:omega_a} are not guaranteed quantitatively. Comparison of innermost stable circular orbit (ISCO) shifts between the EOB and gravitational self-force (GSF) in~\cite{Isoyama2014} shows obvious deviation, but still hints that the frequency shift is at about the same order of mass ratio, which coincides with our results in Fig.~\ref{fig:omega_p}-\ref{fig:omega_a}. The ISCO shifts in~\cite{Isoyama2014} were calculated based on an earlier version of the EOB potential; we recalculated the ISCO shifts based on the updated potential which is used in this work \cite{steinhoff2016Apotential}, and we found that the results improve a lot (see Fig.~\ref{fig:0}). If the spin of a SMBH is not extreme (below 0.8 based on the Fig.~\ref{fig:0}), the EOB’s ISCO frequency shifts exhibit less than a 5 support our results in Figs.~\ref{fig:omega_p}-\ref{fig:omega_a} which qualitatively state that the influence of the mass ratio on the conservative dynamics of EMRIs cannot be ignored and give qualitative magnitudes. In other words, the test-particle approximation may not be enough for the EMRI waveform simulation, and we expect more accurate self-force corrections. \begin{figure}[!h] \begin{center} \includegraphics[width=0.6\columnwidth]{ISCOshift.pdf} \caption{\emph{Relative difference of ISCO frequency shift $\Delta C_{\Omega}/C_{\Omega}:=1-C^{EOB}_{\Omega}/C_{\Omega}^{GSF}$ between the EOB and GSF methods~\rm{\cite{Isoyama2014}}.}} \label{fig:0} \end{center} \end{figure} \subsection{Orbits of conservative dynamics} \label{sec:orbits} We find evolution equations for $r$, $\phi$, and $\chi$ with the forms \begin{subequations}\label{eomsEOBrphiEL}\begin{align} \dot r&=\frac{\partial E}{\partial P_{r}} \!=\!-\frac{g^{rr} \hat{P_r}}{E/M \left(g^{tt}\hat{H}_{\rm eff}-g^{t \phi}\hat{L}_z\right)}\,, \label{eq:rdot}\\ \dot \phi&=\frac{\partial E}{\partial P_{\phi}} \!=\!\frac{g^{t \phi}-\Big[g^{tt}g^{\phi\phi}-(g^{t \phi})^2 \Big]\frac{\hat{L}_z}{g^{tt} \hat{H}_{\rm eff}-g^{t \phi}\hat{L}_z}}{g^{tt} E/M}\,,\label{eq:phidot}\\ \dot{\theta}\!&=\frac{\partial E}{\partial P_{\theta}} \!=\!-\frac{g^{\theta \theta} \hat{P_{\theta}}}{E/M \left(g^{tt}\hat{H}_{\rm eff}-g^{t \phi}\hat{L}_z\right)}\,\label{eq:thetadot}. \end{align} \end{subequations} where $\hat{P}_r$, $\hat{P}_{\theta}$ have been analytically obtained in Eqs.~\eqref{eq:ptheta}-\eqref{eq:pr}, and $\hat{H}_{\rm eff}$, $\hat{L}_{z}$ have been given in Eq. \eqref{eq:psofep}. The metric components are Eqs.~(\ref{def_metric_in})-(\ref{def_metric_fin}). Due to the definitions of $\xi,~\chi$, all the variables by $r$ and $\theta$ can be transfer to the functions of $\xi,~\chi$. Finally, the above equations can now be expressed in terms of only the variables $(\xi,\chi)$ and orbital parameters $(p,e,\theta_{\rm min})$ or $(p,e,\iota)$, \begin{subequations}\begin{eqnarray} \dot \xi&&=-\frac{(1+e\cos\xi)^2}{epM\sin\xi}\frac{g^{rr} \hat{P_r}}{E/M \left(g^{tt}\hat{H}_{\rm eff}-g^{t \phi}\hat{L}_z\right)} = \Xi(p,e,\iota,\xi,\chi) \,, \label{eq:xidot}\\ \dot{\chi}\!&&=-\frac{g^{\theta \theta} \sqrt{\left(a^2 \left(1-\hat{H}_{\rm eff}^2\right)\right) \left(z_+^2-z_-^2 \cos ^2\chi \right)}}{E/M \left(g^{tt}\hat{H}_{\rm eff}-g^{t \phi}\hat{L}_z\right)} = \Theta(p,e,\iota,\xi,\chi) \,\label{eq:chidot}, \\ \dot \phi&&=\frac{g^{t \phi}-\Big[g^{tt}g^{\phi\phi}-(g^{t \phi})^2 \Big]\frac{\hat{L}_z}{g^{tt} \hat{H}_{\rm eff}-g^{t \phi}\hat{L}_z}}{g^{tt} E/M} = \Phi(p,e,\iota,\xi,\chi) \,.\label{eq:phidot2} \end{eqnarray}\end{subequations} The detailed expressions of $\Xi,\Theta$ and $\Phi$ can be directly obtained, but they are too long to be written here. Solving the above ordinary differential equations by numerical integration, we can get $\xi$, $\chi$, and $\phi$ associated with coordinate time $t$, i.e., the orbital motion. Projecting the Boyer-Lindquist coordinates onto a spherical coordinate grid, we can define the corresponding Cartesian coordinate system, \begin{subequations}\label{sphere} \begin{eqnarray} \tilde{x}&=&\cfrac{p \cos\phi\sqrt{1-z_-^2\cos ^2\chi }}{1+e \cos \xi}\,,\\ \tilde{y}&=&\cfrac{p \sin\phi\sqrt{1-z_-^2\cos ^2\chi }}{1+e \cos \xi}\,,\\ \tilde{z}&=&\cfrac{p z_-\cos\chi}{1+e \cos \xi}\,. \end{eqnarray} \end{subequations} Combining the equations of the motion (\ref{eq:xidot}) - (\ref{eq:phidot2}) we can plot the orbits of conservative dynamics in the Cartesian coordinates (see Fig.~\ref{fig:14}). \begin{figure}[!h] \centering \subfloat[\;$a=0.5~M,\;e=0.2,\;p=5~M,\;p_s=4.99~M$]{ \begin{minipage}[c]{.5\linewidth} \centering \includegraphics[width=\textwidth]{14.pdf} \end{minipage} } \subfloat[\;$a=0.5~M,\;e=0.1,\;p=5~M,\;p_s=4.84~M$]{ \begin{minipage}[c]{.5\linewidth} \centering \includegraphics[width=\textwidth]{15.pdf} \end{minipage} }\\ \subfloat[\;$a=0.6~M,\;e=0.6,\;p=6~M,\;p_s=5.28~M$]{ \begin{minipage}[c]{.5\linewidth} \centering \includegraphics[width=\textwidth]{16.pdf} \end{minipage} } \subfloat[\;$a=0.6~M,\;e=0.1,\;p=6~M,\;p_s=4.51~M$]{ \begin{minipage}[c]{.5\linewidth} \centering \includegraphics[width=\textwidth]{17.pdf} \end{minipage} } \caption{\emph{Four orbits of different initial parameters}. We set $\nu=10^{-4},\theta_{\rm min}=\pi/4$ in the all four orbits and just plot half orbital period from the apastron to the periastron.} \label{fig:14} \end{figure} Like the zoom-whirl orbits \cite{glampedakis2002zoom} in $r$-$\phi$ components, from Fig.~\ref{fig:14} there are similar zoom-whirl phenomena in the $r$-$\theta$ directions. Different orbital parameters with a corresponding prograde separatrix have different polar angular periods. We can imagine that as the orbit gradually approaches the separatrix, the test particle will spend a more considerable amount of its orbital ‘‘life’’ (in both the azimuthal and polar directions) close to the periastron. \comment{ \subsection{The shift of last stable orbits due to mass ratio} \label{sec:lso} In test particle limit $\hat{P}_r=0$ has four distinct real roots, expanding $\Delta^2\hat{P}_r^2$ as \begin{equation} \Delta^2\hat{P}_r^2=(\hat{H}_{\rm eff}^2-1)(r-r_1)(r-r_2)(r-r_3)(r-r_4) \end{equation} where $\Delta=r^2-2Mr+a^2$, then the third root $r_3$ and the fourth root $r_4$ are found to be \begin{eqnarray} r_3=\frac{p^2 \left(1-e^2-p \left(1-\hat{H}_{\rm eff}^2\right)\right)+\sqrt{p^4 \left(1-e^2-p \left(1-\hat{H}_{\rm eff}\right)\right)^2+a^2 p^2 \hat{Q} \left(1-e^2\right)^3\left(1-\hat{H}_{\rm eff}^2\right)}}{p^2 \left(1-e^2\right) \left(1-\hat{H}_{\rm eff}^2\right)}\,\\ r_4=\frac{p^2 \left(1-e^2-p \left(1-\hat{H}_{\rm eff}^2\right)\right)-\sqrt{p^4 \left(1-e^2-p \left(1-\hat{H}_{\rm eff}\right)\right)^2+a^2 p^2 \hat{Q} \left(1-e^2\right)^3\left(1-\hat{H}_{\rm eff}^2\right)}}{p^2 \left(1-e^2\right) \left(1-\hat{H}_{\rm eff}^2\right)} \end{eqnarray} stable bound orbits should satisfy $r_3<r_2$ } \subsection{Evolution of orbital parameters under radiation reaction} \label{sec:evolution} The description of geodesic motion around BHs is based on the semilatus rectum $p$, the eccentricity $e$ and the orbital inclination $\iota$, together with three phase variables associated with the spatial geometry of the radial, azimuthal and polar motion denoted by $(\xi,\phi,\chi)$. $\xi$ was already defined by expressing the radial motion as \begin{equation} r=\frac{p M}{1+e\cos\xi}\,.\\ \label{eq:rofxi} \end{equation} Taking the derivation of Eq.~(\ref{eq:rofxi}), we get the evolution equation for the phase variable $\xi$, \begin{equation} \label{eq:xidotgen1} \dot \xi=\frac{(1+e\cos\xi)^2}{epM\sin\xi}\dot r-\frac{1+e\cos\xi}{ep\sin\xi}\dot p+\frac{\cot\xi}{e}\dot e. \end{equation} For a conservative system, $\dot{p}=\dot{e}=0$. However, if we take the radiation reaction of GWs into account, the rate of change of the energy, the reduced angular momentum, and the Carter constant are given by \begin{subequations} \label{eq:energydot} \begin{align} \frac{dE}{dt}&=\frac{\partial E}{\partial p}\dot p+\frac{\partial E}{\partial e}\dot e+\frac{\partial E}{\partial \iota}\dot \iota\,,\label{eq:energydot1}\\ \frac{d \hat{L}_z}{dt}&=\frac{\partial \hat{L}_z}{\partial p}\dot p+\frac{\partial \hat{L}_z}{\partial e}\dot e+\frac{\partial \hat{L}_z}{\partial \iota}\dot \iota\,,\\ \frac{d\hat{Q}}{dt}&=\frac{\partial \hat{Q}}{\partial p}\dot p+\frac{\partial \hat{Q}}{\partial e}\dot e+\frac{\partial \hat{Q}}{\partial \iota}\dot \iota\,.\label{eq:energydot3} \end{align} \end{subequations} From Eqs.~(\ref{eq:energydot1})-(\ref{eq:energydot3}), we express the evolution of $(p,~e,~\iota)$ using the energy and angular momentum fluxes of gravitational radiation, \begin{widetext} \begin{subequations} \begin{eqnarray} \dot{p}&=c_{(\hat{L}_z,\hat{Q})(e,\iota)}\frac{dE}{dt}+c_{(E,\hat{Q})(\iota,e)}\frac{d\hat{L}_z}{dt}+c_{(E,\hat{L}_z)(e,\iota)}\frac{d\hat{Q}}{dt}\,\label{eq:edot}\\ \dot{e}&=c_{(\hat{L}_z,\hat{Q})(\iota,p)}\frac{dE}{dt}+c_{(E,\hat{Q})(p,\iota)}\frac{d\hat{L}_z}{dt}+c_{(E,\hat{L}_z)(\iota,p)}\frac{d\hat{Q}}{dt}\,\label{eq:pdot}\\ \dot{\iota}&=c_{(\hat{L}_z,\hat{Q})(p,e)}\frac{dE}{dt}+c_{(E,\hat{Q})(e,p)}\frac{d\hat{L}_z}{dt}+c_{(E,\hat{L}_z)(p,e)}\frac{d\hat{Q}}{dt},\label{eq:iotadot} \end{eqnarray} where the coefficients are given by \begin{equation} \label{eq:cAbdef} c_{(C_1,C_2)(o_1,o_2)}=\frac{\Big[\frac{\partial C_1}{\partial o_1}\frac{\partial C_2}{\partial o_2}-\frac{\partial C_1}{\partial o_2}\frac{\partial C_2}{\partial o_1}\Big]}{\Big[\frac{\partial E}{\partial \iota}\frac{\hat{L}_z}{\partial p}-\frac{\partial E}{\partial p}\frac{\partial \hat{L}_z}{\partial \iota}\Big]\frac{\partial \hat{Q}}{\partial e}+\Big[\frac{\partial E}{\partial e}\frac{\hat{L}_z}{\partial\iota}-\frac{\partial E}{\partial \iota}\frac{\partial \hat{L}_z}{\partial e}\Big]\frac{\partial \hat{Q}_\phi}{\partial p}+\Big[\frac{\partial E}{\partial p}\frac{\hat{L}_z}{\partial e}-\frac{\partial E}{\partial e}\frac{\partial \hat{L}_z}{\partial p}\Big]\frac{\partial \hat{Q}_\phi}{\partial \iota}} \,,\\ \end{equation} \end{subequations} \end{widetext} where $C=\{E,\hat{L}_z,\hat{Q}\}$ and $o=\{p,e,\iota\}$, and the derivatives can be computed from the expressions in Eqs.~(\ref{eq:carter}) and (\ref{eq:psofep}). We do not write the complete expressions here because they can be calculated quite directly but are very long. Once we have the GW fluxes $\dot{E},~\dot{L}_z$, and $\dot{Q}$, the orbital evolution can be obtained. We have no plan to introduce the detailed fluxes in the present paper, and thus we do not calculate the specific orbital evolution here. We will leave this task to the next paper on gravitational waveforms. In this work, we just focus on the geometrization of the EOB formalism in extreme-mass-ratio cases. The final set of EOB equations of motion with radiation reaction are Eqs.\eqref{eq:edot}-\eqref{eq:pdot} together with the evolution of the phases described by Eqs.~(\ref{eq:xidotgen1}) and (\ref{eq:iotadot}), and the radius of motion at any arbitrary moment is given by Eq.~(\ref{eq:rdot}). Now all the equations of motion are expressed in terms of only the geometric parameters $(p,e,\iota,\xi,\chi)$ and the effective Kerr parameter $a$. \section{Conclusions and Outlook} \label{sec:conclusion} In the present paper, based on the EOB deformed metric and Hamiltonian, we gave the geometrized formalism of the equations of motion for the inclined-eccentric EMRIs with spinning black holes. The solutions were derived with the geometric parameters $p$, $e$ and $\iota$ instead of the EOB coordinates and momentum. The fundamental properties of the motion due to the mass ratio and black hole spin were discussed. We also gave expressions for three orbital frequencies $\omega_r, ~\omega_\theta, ~\omega_\phi$. With these formalisms in hand, it is convenient to obtain the motion of a compact object around a supermassive black hole with the orbital parameters $p,e,\iota$. Our results show that the influence on the orbital motion due to the small compact object's gravitational self-force on the background of a SMBH cannot be ignored. The analytical formalism in this work makes the inclusion of the mass ratio in the motion much more intuitive. Though we do not give a waveform template in the present work, We believe that our analytical method (not the formalism themselves) should be an useful way to build waveform models in the future for EMRIs to replace the test-particle approximation which is used in popular waveform models. In the present work, a few approximations have been used. As we mentioned before, in the present model we temporarily omitted the effective spin of the small object. In the EOB theory, this spin of the effective test particle is $\sim \mu a /M$ even if the small object does not rotate. The omission of this term will only induce a relative error of the Hamiltonian at least two orders lower than the mass ratio. Furthermore, for decoupling the equations of motion, we used the approximation $F(r,\theta) \approx F(r)$. This usually induces an error at $O(10^{-2})\nu$ order, even at the edge of the LSO, the error still $\lesssim 0.1\nu$. The analysis of these approximations performed here showed that the errors could be ignored for EMRIs due to the very small mass ratio (see Table I). By encoding the mass-ratio correction in the Hamiltonian $H_{\rm NS}$, our expressions may be an improvement compared to the test-particle approximation. However, as stated in the previous sections, the EOB's description at the extreme-mass-ratio limit does not get guarantee. Considering the comparison of the ISCO shifts with the gravitational self-force has obvious deviation for the extreme spin cases, we can only state our detailed results qualitatively reveal the influences of mass-ratio on the conservative dynamics. Fortunately, our analytical technology presented in this paper can be used to any similar deformed Kerr metrics. Once there is an updated version of the EOB resummation approximation, then the EOB corrections at the extreme-mass-ratio limit are improved or guaranteed, our results can be easily updated too by replacing the EOB potentials, and then we can get an accurate analytical formalism with mass-ratio corrections for the EMRIs. One of the scientific targets of EMRIs is to detect the spacetime geometry of a SMBH. For this target, an accurate and efficient waveform template is needed. However, this is still a challenge. The analytical orbital solution including the mass ratio, eccentricity, and orbital inclination given in this paper is more accurate than the test-particle model and more convenient than the original EOB equations for inclined-eccentric orbits over a long-term evolution. Due to the analytical frequencies, a combination with the frequency-domain Teukolsky equation \cite{Teukolsky} will be more convenient and can generate numerical waveforms. In the future, we will use the formalisms in this work to generate the orbital evolution and waveforms for EMRIs. \acknowledgments This work is supported by NSFC No. 11773059, and we also appreciate the anonymous Referee’s suggestions about our work. \bibliographystyle{unsrt}
\subsubsection*{\bibname}} \bibliographystyle{apalike} \usepackage{times} \usepackage{helvet} \usepackage{courier} \usepackage{amssymb} \usepackage{amsmath} \usepackage{amsfonts} \usepackage[bottom]{footmisc} \usepackage{wrapfig} \usepackage{float} \usepackage[ruled]{algorithm} \usepackage{algcompatible} \usepackage{mathtools,nccmath} \usepackage{amsthm} \usepackage{amsfonts} \usepackage{siunitx} \usepackage{array} \usepackage{placeins} \usepackage{hyperref} \usepackage{url} \usepackage{xcolor} \usepackage{multirow} \usepackage{natbib} \usepackage{multicol} \usepackage{booktabs} \usepackage{graphicx} \usepackage{amsmath} \DeclareMathOperator*{\argmin}{arg\,min} \DeclareMathOperator*{\argmax}{arg\,max} \begin{document} \newtheorem{theorem}{Theorem} \newtheorem{definition}{Definition} \newtheorem{problem}{Problem} \newtheorem{myexam}{Example} \newtheorem{assumption}{Assumption} \newtheorem{proposition}{Proposition} \newtheorem{remark}{Remark} \newtheorem{lemma}{Lemma} \newtheorem{corollary}{Corollary} \newenvironment{sproof}{% \renewcommand{\proofname}{Proof Sketch}\proof}{\endproof} \newcommand{\MRW}[1]{{\color{blue}[MW: #1]}} \newcommand{\ap}[1]{{\color{orange}[AP: #1]}} \newcommand{\LL}[1]{{\color{red}[LL: #1]}} \newcommand{\MK}[1]{{\color{green}[MK: #1]}} \newcommand{\ZC}[1]{{\color{pink}[ZC: #1]}} \newcommand{\ZZ}[1]{{\color{purple}[ZZ: #1]}} \iffalse \twocolumn[ \aistatstitle{Bayesian Inference with Certifiable Adversarial Robustness} \aistatsauthor{Matthew Wicker* \\ Department of Computer Science \\ University of Oxford \And Luca Laurenti* \\ Department of Computer Science \\ University of Oxford \And Andrea Patane* \\ Department of Computer Science \\ University of Oxford \AND Zhoutong Chen \\ Deptartment of Computer Science \\ University of California, Santa Barbara \And Zheng Zhang \\ Deptartment of Computer Science \\ University of California, Santa Barbara \And Marta Kwiatkowska \\ Department of Computer Science \\ University of Oxford} ] \fi \twocolumn[ \aistatstitle{Bayesian Inference with Certifiable Adversarial Robustness} \runningauthor{Wicker, Laurenti, Patane, Chen, Zhang, Kwiatkowska} \aistatsauthor{ Matthew Wicker$^*$ \And Luca Laurenti$^*$ \And Andrea Patane$^*$} \aistatsaddress{ Department of Computer Science \\ University of Oxford \And Department of Computer Science \\ University of Oxford \And Department of Computer Science \\ University of Oxford} \aistatsauthor{ Zhoutong Chen \And Zheng Zhang \And Marta Kwiatkowska} \aistatsaddress{Department of ECE \\ Univ. of California, Santa Barbara \And Department of ECE \\ Univ. of California, Santa Barbara \And Department of Computer Science \\ University of Oxford} ] \begin{abstract} We consider adversarial training of deep neural networks through the lens of Bayesian learning, and present a principled framework for adversarial training of Bayesian Neural Networks (BNNs) with certifiable guarantees. We rely on techniques from constraint relaxation of non-convex optimisation problems and modify the standard cross-entropy error model to enforce posterior robustness to worst-case perturbations in $\epsilon$-balls around input points. We illustrate how the resulting framework can be combined with methods commonly employed for approximate inference of BNNs. In an empirical investigation, we demonstrate that the presented approach enables training of certifiably robust models on MNIST, FashionMNIST and CIFAR-10 and can also be beneficial for uncertainty calibration. Our method is the first to directly train certifiable BNNs, thus facilitating their deployment in safety-critical applications. \end{abstract} \section{INTRODUCTION} Although deep neural networks (NNs) have achieved state-of-the-art performance in a range of learning tasks \citep{deepbook}, they have recently been shown to be susceptible to adversarial attacks: small, often imperceptible perturbations to their inputs that can trigger a misclassification \citep{goodfellow6572explaining,biggio2018wild}. While retaining the flexibility of standard (deterministic) NNs, Bayesian neural networks (BNNs), i.e., neural networks with distributions placed over their weights and biases, enable principled quantification of their predictions' uncertainty \citep{neal2012bayesian}. Intuitively, the latter can be used to provide a natural protection against adversarial examples, making BNNs particularly appealing for safety-critical scenarios, in which the safety of the system must be provably guaranteed \citep{mcallister2017concrete}. In fact, not only have BNNs been shown to possess many favorable robustness properties against adversarial attacks \citep{bekasov2018bayesian,carbone2020robustness}, but their uncertainty has also been investigated as a means of flagging out-of-distribution samples and for robust decision making \citep{kahn17}. However, while guarantees for BNNs have been provided for the true Bayesian posterior and under idealised conditions on the training data and network architecture, the necessary assumptions cannot be checked in practice and exact inference for BNNs is generally infeasible. Indeed, it has been shown that BNNs trained with modern approximate inference methods and on real-world datasets can be easily fooled by adversarial attacks \citep{grosse2018limitations,athalye2018obfuscated}. Consequently, BNN methodologies need to be strengthened before they can be deployed in practical safety-critical scenarios. However, to the best of our knowledge, there is no general Bayesian approach targeted at the training of BNNs with certifiable robustness against adversarial attacks. In this paper, we present a principled Bayesian approach for incorporating adversarial robustness in the posterior inference procedure of BNNs. In order to do so, we formulate the robustness requirement as the worst-case prediction over an adversarial input ball of radius $\epsilon \geq 0$ induced by a user-defined probability density function $p_\epsilon$, and extend the standard cross-entropy likelihood model by marginalising the network output over $p_\epsilon$. We refer to the resulting likelihood model as the \textit{robust likelihood}. We show how, for any $\epsilon > 0$, certified lower bounds to the robust likelihood can be computed by employing Interval Bound Propagation (IBP) techniques \citep{ehlers2017formal,mirman2018differentiable,gowal2018effectiveness}. We further demonstrate that, based on a differentiable modification of the likelihood model, the adversarial training procedure we introduce adapts naturally to the main approximate inference techniques employed for training of BNNs, including HMC \citep{neal2011mcmc}, Bayes by Backprop (BBB) \citep{blundell2015weight}, Stochastic Weight Averaging - Gaussian (SWAG) \citep{maddox2019simple}, NoisyAdam (NA) \citep{zhang2018noisy}, and Variational Online Gauss-Newton (VOGN) \citep{osawa2019practical}. We experimentally investigate the suitability of our method for training certifiably robust BNN models on the MNIST, FashionMNIST and CIFAR-10 datasets. We find that training with the robust likelihood enables the first non-trivial adversarial robustness certification on BNNs. In particular, we obtain certified bounds for the robust accuracy of up to $75\%$ on the MNIST test set for $\epsilon = 0.1$, up to $73\%$ on the FashionMNIST test set for $\epsilon = 0.1$, and up to $50\%$ on the CIFAR-10 test set for $\epsilon = 1/255$. We find the maximum certified safe radius when training with the robust likelihood to be double that obtained when training with the standard likelihood model, which suggests that the robust likelihood pushes the BNN posterior distribution toward more robust regions of the parameter space. Furthermore, we analyse the effect that the robust likelihood has on the predictive uncertainty. We qualitatively observe better calibrated uncertainty when predicting out-of-distribution samples compared with standard training In summary, this paper makes the following main contributions: \begin{itemize} \item We introduce a robust likelihood function based on an adversarial generalisation of the cross-entropy error model for the training of certifiably robust BNNs. \item We demonstrate how IBP techniques can be employed to compute a certified lower bound to the robust likelihood for commonly employed approximate Bayesian inference techniques. \item We show how our methods allow us to train, for the first time, certified BNNs on MNIST, FashionMNIST and CIFAR-10 with non-trivial robustness. We empirically find that it also leads to improvements in the calibration of uncertainty.\footnote{All of the source code to reproduce the experiments can be found at https://github.com/matthewwicker/CertifiableBayesianInference. All the experiments were run on a single NVIDIA 2080Ti GPU with a 20-core Intel Core Xeon 6230.} \end{itemize} \paragraph{Related Works} Robustness to adversarial examples has been a central topic for both machine learning theorists and practitioners since the seminal work of \cite{IntruigingProperties}. Since their popularization \citep{biggio2018wild}, many methods have been developed to generate adversarial attacks for neural networks~\citep{goodfellow6572explaining, madry2017pgd,carlini2017cwattack} and also specifically for BNNs~\citep{carbone2020robustness,yuan2020gradient}. In addition to this, several other methods have been proposed for computing guarantees on the absence of adversarial attacks in the neighbourhood of a given test point \citep{katz2017reluplex,boopathy2019cnn}, including works that focus on quantifying the robustness to adversarial perturbations of BNNs \citep{cardelli2019statistical, wicker2020probabilistic} and Gaussian processes \citep{cardelli2018robustness,blaas2019robustness}. Adversarial training, on the other hand, seeks to directly train neural networks that are robust to them \citep{madry2017pgd}. Most of the adversarial training methods have been developed for deterministic (i.e., non-Bayesian) neural networks, where the common approach is that of solving a min-max optimization problem obtained by modifying the loss. Based on a similar approach, \citep{liu2018adv} have developed a method for adversarial training of BNNs trained with Gaussian Variational Inference (VI). However, this method cannot be directly extended to other approximate inference algorithms and relies on gradient-based attacks (i.e., PGD \citep{madry2017pgd}) to approximate worst-case perturbations in the neighbourhood of each data point, which, as we show in Section \ref{sec:experimens}, may fail to generalize to other attacks. Similarly, \cite{ye2018bayesian}, assumes a prior distribution around each data point, which is then used to sample adversarial examples. However, by assuming a distribution over the adversarial examples, the resulting approach is not worst-case. In contrast, the framework presented in this paper is based on a principled Bayesian foundation (i.e., we modify the standard likelihood model to account for adversarial examples). As a consequence, it can be formulated directly for any approximate inference method. Furthermore, by explicitly maximizing a lower bound of the robust likelihood instead of an approximation obtained by employing gradient-based attacks, it allows us to obtain non-trivial certifiable worst-case guarantees for BNNs as illustrated in Section \ref{sec:experimens}. \input{sections/Methods} \input{sections/Experiments} \input{sections/Conclusion} \section{CONCLUSION} We presented a framework for robust training of certifiably robust deep neural networks based on a principled Bayesian foundation. We developed an algorithmic implementation of our framework that employs constraint relaxation and can be integrated with existing approximate inference methods for BNNs. On the MNIST, FashionMNIST and CIFAR-10 datasets we showed that, not only does our framework allow us to train BNNs that are guaranteed to be robust to adversarial examples, it can also have a positive effect on uncertainty calibration. \paragraph{Acknowledgements} This project was funded by the ERC under the European Union’s Horizon 2020 research and innovation programme (FUN2MODEL, grant agreement No.~834115). ZC and ZZ are supported by DOE grant No. DE-SC0021323. \section{EXPERIMENTS}\label{sec:experimens} We conduct an empirical evaluation of our framework considering various approximate inference methods for BNNs, including SWAG \citep{maddox2019simple}, NoisyAdam (NA) \citep{zhang2018noisy}, Variational Online Gauss Newton (VOGN) \citep{khan2018fast}, Bayes by Backprop (BBB) \citep{blundell2015weight}, and Hamiltonian Monte Carlo (HMC) \citep{neal2011mcmc}. We first evaluate the robust accuracy of networks trained with our robust likelihood compared to standard training on the MNIST benchmark \citep{mnist}. We then perform analogous analyses on the CIFAR-10 \citep{cifar} dataset, and, finally, we empirically study the effect of our robust likelihood on the predictive uncertainty. Further, training parameters, including prior distribution and architecture for each of the BNNs, can be found in the Supplementary Material. For HMC, we set the initial weight to be a sample from the prior when performing standard training and set the initial weight to a pre-trained SGD iterate when performing inference with robust likelihood; this is to enforce that the starting point of the algorithm is closer to the target distribution. \paragraph{EVALUATION ON MNIST} We use $p_\epsilon$ introduced in Eqn \eqref{Eqn:discreteDistr} with $\eta = 0.1$ and $\lambda = 0.25$ (an empirical evaluation of the effect of changing these parameters, as well as using different forms for $p_\epsilon$, is reported in the Supplementary Material). We train a single hidden layer BNN with 512 neurons on the full MNIST dataset (further training parameters are given in the Supplementary Material). In Figure~\ref{fig:MNIST} (top row) we analyze how different training methods affect the accuracy, robustness to PGD attacks ($\mathcal{R}_{0.1}^{PGD}$), as well as the certified lower bounds using IBP ($\mathcal{R}_{0.1}^{IBP}$) and LBP ($\mathcal{R}_{0.1}^{LBP}$). We use both IBP as well as the more computationally expensive but tighter LBP in order to study the effect of training with our robust likelihood without the bias of training and evaluating with the same certification method. Moreover, in Figure~\ref{fig:CNN-Cert} we analyze the maximum certifiable radius (via the methodology in \citep{boopathy2019cnn}) in order to further compare the effects of each likelihood. In Figure~\ref{fig:MNIST}, we find that, while all BNNs trained with the standard likelihood (left plot) perform comparably well in terms of accuracy, there is a marked difference in their robustness against PGD. This is in line with what was observed by \cite{carbone2020robustness}, where the more fidelity an inference method has to the true Bayesian posterior, the greater is its robustness to gradient-based attacks. However, the certified robust accuracy obtained using standard likelihood is identically zero, that is, we obtain no certification in these settings. This implies, for example, that although HMC is resistant to PGD attacks, we cannot guarantee that a different, successful attack method does not exist. Similarly, for training with the PGD approximation of the robust likelihood (central plot), we obtain that, while the robustness against PGD of each model is now around $80\%$, the certified robustness is still at $0\%$. Similar behaviour has also been observed for adversarial training with gradient-based attacks for deterministic neural networks \citep{gowal2018effectiveness}. By using IBP during training to lower bound the robust likelihood (right plot in the figure), we find that, not only do we obtain similar levels of accuracy and PGD robustness as before, but we are also able to provide non-trivial certification on the robust accuracy, $\mathcal{R}_\epsilon$, of the networks, that is, against \textit{any} possible adversarial perturbation of magnitude up to $\epsilon = 0.1$. For example, using SWAG we obtain $\mathcal{R}_{0.1} \approx 75\%$, that is, the BNN trained with SWAG with our robust likelihood is provably adversarially robust on $75\%$ of the points included in the MNIST dataset. \paragraph{Evaluation on FashionMNIST} In the center row of Figure~\ref{fig:MNIST}, we use the same networks, $p_{\epsilon}$ distribution (with $\eta = 0.1$ and $\lambda = 0.25$) and evaluation methods stated for MNIST, but applied to the FashionMNIST dataset \citep{xiao2017fashion}. Despite being a harder dataset than MNIST, as evidenced by the reduced accuracy of the approximate posteriors, we find the robustness trends to be qualitatively similar to those on MNIST and CIFAR10. We do note, however, that PGD training was much more effective at increasing the certified bound when the bound is computed with LBP. Our hypothesis about this difference is that because the networks are less accurate they are also potentially less robust to gradient-based attacks (following the logic of \citep{carbone2020robustness}) and thus, PGD is able to find strong adversarial examples which can increase the robustness of the posterior. \begin{figure}[h] \centering \includegraphics[width=0.425\textwidth]{Figures/cert-rad.png} \caption{We plot the average certified radius for images from MNIST (right), and CIFAR-10 (left) using the methods of \cite{boopathy2019cnn}. We observe that robust training with IBP roughly doubles the maximum verifiable radius compared with standard training and that obtained by training on PGD adversarial examples.}\label{fig:CNN-Cert} \end{figure} \begin{figure*}[ht] \centering \includegraphics[width=0.90\textwidth]{Figures/entropies-final.png} \caption{We plot the in-distribution (blue) and out-of-distribution (orange) predictive uncertainty. Each pair of plots corresponds to an inference method where the left plot represents the entropy distribution for standard training and the right plot represents robust IBP training. For both MNIST (top row) and CIFAR-10 (bottom row) we find that robust training improves the uncertainty calibration of the network w.r.t. out-of-distribution samples.}\label{fig:entropy} \end{figure*} \paragraph{EVALUATION ON CIFAR-10} We now evaluate the effect of the robust likelihood on BNNs trained on the CIFAR-10 dataset. The CIFAR-10 is more challenging compared to MNIST, and hence not all the training methods considered for MNIST can be used to train reasonably accurate BNNs on this dataset \citep{blier2018description}. Consequently, for CIFAR-10 we provide results only for SWAG, NA and VOGN. In particular, we train a Bayesian convolutional neural network (CNN) with 2 convolutional layers (each with 32, 4 by 4 filters) followed by a max pooling layer and 2 fully connected layers (one with 512 hidden neurons and the other with 10). For the robust likelihood, we consider Eqn~\eqref{Eqn:discreteDistr} with $\eta = 1/255$ and $\lambda = 0.25$. Finally, we introduce the standard exponential decay on the learning rate to ensure stable convergence (results for additional parameter values are given in the Supplementary Material). We perform a similar evaluation to that discussed for MNIST, the results of which are plotted in the bottom row of Figure \ref{fig:MNIST}. Consistently with what we observed for MNIST, we obtain that BNNs trained by using the standard likelihood (left plot) and PGD attacks (central plot) do not allow for the computation of certified guarantees (the lower bound of the bars is close to zero for all the inference methods). In contrast, for the BNN trained with our robust likelihood and IBP we find that, even for CIFAR-10, we are able to compute non-trivial lower bounds on $\mathcal{R}_{\epsilon}$. For instance, on SWAG we obtain $\mathcal{R}_{\epsilon}^{IBP}\approx 50\%,$ which is comparable to state-of-the-art results with adversarial training of deterministic NNs on CIFAR-10 \citep{boopathy2019cnn}. We analyse the effect that robust training at a specific $\epsilon$ has on the robustness of the network at other values of $\epsilon$. In order to do so, we employ the method developed by \cite{boopathy2019cnn}, which, for each test image, computes the maximal adversarial perturbation, $\epsilon$, such that the image is provably safe in the related $\epsilon-$ball. The results of this analysis are given in Figure~\ref{fig:CNN-Cert}, where we report the average maximum adversarially safe radius over 100 test CIFAR-10 images. We find that, while PGD training does not increase the robustness of the model compared to standard training, our training procedure is able to roughly double the robustness for the three training methods explored here (further results on MNIST are in the Supplementary Material). \paragraph{EVALUATION ON OUT-OF-DISTRIBUTION UNCERTAINTY} One of the main features of BNNs, which distinguishes them from DNNs, is their ability to model their prediction's uncertainty \citep{neal2012bayesian}. We investigate how training with our robust likelihood influences uncertainty calibration when testing on data that are outside of the training data distribution. As is common in the literature \citep{maddox2019simple, lakshminarayanan2017simple}, we evaluate uncertainty on in-distribution and out-of-distribution images using the entropy of the posterior predictive distribution. For $x\in \mathbb{R}^n$ the latter is defined as $\mathbb{E}_{w\sim p(w|\mathcal{D})}[-\sum_{c =1}^C \sigma_c(f^{w}(x)) \log (\sigma_c(f^{w}(x)))]$. In particular, we expect that the maximal class probabilities on out-of-distribution images will have high entropy, reflecting the model’s uncertainty in its predictions, and considerably lower entropy on images that are similar to those on which the network was trained (in-distribution). In the top row of Figure~\ref{fig:entropy}, we plot the entropy of the posterior predictive distributions on in-distribution test samples (in blue) and on FashionMNIST samples (in orange), which are out-of-distribution data for networks trained on the MNIST dataset. For CIFAR-10 (bottom row in the figure) we use the SVHN \citep{goodfellow2013multi} dataset as the source of meaningful, but out-of-distribution, data. We hypothesize that if the robust likelihood introduces meaningful information about invariances in the data, then the uncertainty of the resulting posterior would be improved. On MNIST, we find that, in each case, robust training with IBP significantly improves uncertainty by making more uncertain predictions on out-of-distributions data, while still being confident on in-distribution data. For CIFAR-10, surprisingly, we find that BNNs trained with the standard likelihood are more confident on the out-of-distribution data than on in-distributions data, a behaviour that, with the exception of SWAG, is always reversed by performing robust training with IBP. In all the cases, training with IBP on CIFAR-10 increases the entropy of the predictions, which may be indicative of better calibrated uncertainty compared to the normally inferred models (note that on CIFAR-10 accuracy is of the order of $60\%$, and hence we do not expect the model to be very confident even on in-distribution images). In the Supplementary Materials, to further confirm our empirical results, we evaluate the entropy on adversarial examples and also analyze the likelihood ratio between in-distribution and out-distribution data. \section{BAYESIAN INFERENCE WITH NEURAL NETWORKS}\label{sec:background} We consider a generic neural network (NN) architecture, $f^{w} : \mathbb{R}^n \mapsto \mathbb{R}^C$, parameterised by a vector of weights $w \in \mathbb{R}^{n_w}$, where $C$ is the number of classes.\footnote{We discuss how to generalise to the regression case in Remark \ref{remark:regression}} In a Bayesian setting, one assumes a prior distribution over the weights, $p(w)$, that induces a distribution over the network outputs. Given a dataset $\mathcal{D} = \{(x_i, y_i)\}_{i=1}^{n_{\mathcal{D}}}$ our belief over the weight distribution is updated through Bayes' theorem, so as to obtain the posterior weight distribution as $p(w | \mathcal{D}) \propto p(\mathcal{D} | w) p(w) $. In the latter equation, $p(\mathcal{D} | w) $ is the data \textit{likelihood} and, under the assumption that data in $\mathcal{D}$ are drawn independently from the same distribution, we have $p(\mathcal{D} | w) = \prod_{i=1}^{n_{\mathcal{D}}} p(y_i|x_i,w) $. In the standard classification model, the likelihood for a point $(x_i,y_i)$, i.e., $p(y_i|x_i,w)$, is defined as the multinoulli distribution with the probability for each class given as the softmax of the neural network final logits \citep{bishop1995neural}. In what follows, we will refer to thus defined $p(y_i|x_i,w)$ as the \emph{standard likelihood}. In Section \ref{sec:BayesianAdvTrainingGeneral} we will discuss how the standard likelihood can be modified in order to model adversarial perturbations. Given the posterior, $p(\mathcal{D} | w)$, the predictive distribution over a test point $x^*$ is computed as the expected value over the softmax output. In practice, this is computed via an empirical estimator: \begin{align} \mathbb{E}_{w \sim p(w|\mathcal{D})}&[\sigma(f^{w}(x))] \approx \nonumber\\ &\hat{\mathbb{E}}^N(x) := \frac{1}{N} \sum_{i=1}^N \sigma \left( f^{w_i}(x) \right), \label{eq:predictor} \end{align} \\ where $w_1,\ldots,w_N$ are $N$ random samples from $p(w|\mathcal{D})$ and $\sigma(\cdot)$ is the softmax function. The output class for a test point $x^*$ is then computed as $\argmax_{c\in \{1,\ldots,C \}} \hat{\mathbb{E}}^N(x^*)$. Given the predictor, a local adversarial example for the BNN at a given test point $x^*$ with associated class label $c^*$ is defined as a point $\bar{x}\in\mathbb{R}^n$ such that $|x^*-\bar{x}| \leq \epsilon$ and $ \argmax_{c\in \{1,\ldots,C \}} \hat{\mathbb{E}}^N(\bar{x}) \neq c^* ,$ where $|\cdot|$ is a given norm, that is, a point in the neighborhood of $x^*$ that gets mis-classified by the BNN predictor. Given a set of test points $\{x_i^*\}_{i=1,\ldots,m}$, we define the \textit{robust accuracy} (denoted $\mathcal{R}_\epsilon$) for $\epsilon > 0 $ as the ratio between the number of points $x_i^*$ for which no adversarial example exists within $\epsilon$ radius, and the total number of test points, that is: \begin{align} \nonumber \mathcal{R}_\epsilon = \frac{1}{m} \sum_{i=1}^m \mathbb{I} \bigg[& \forall \bar{x} \; s.t. \; |x^*_i-\bar{x}| \leq \epsilon , \\ & \argmax_{c\in \{1,\ldots,C \}} \hat{\mathbb{E}}^N(\bar{x}) = c^*_i \bigg], \label{eq:robust_accuracy} \end{align} where $\mathbb{I}[\cdot]$ evaluates to $1$ if the expression inside the brackets is true, and to zero otherwise. Note that the computation of the predictive distribution relies on the computation of the posterior distribution over the weights, $p(w|\mathcal{D})$. Exact computation of the latter for BNNs is infeasible and approximate methods are employed for its estimation. In the following, we briefly describe those employed in this paper. \input{sections/ApproximateInference} \section{A BAYESIAN APPROACH FOR ADVERSARIAL TRAINING} \label{sec:BayesianAdvTrainingGeneral} In this section we present a method for the adversarial training of BNNs that relies on embedding adversarial robustness in the standard cross-entropy error model. We first introduce the following notation. Given a data point $(x,y)$, with $x\in \mathbb{R}^n$ and $y$ an associated class label, an $\epsilon>0$, and a fixed weight $w\in \mathbb{R}^{n_w}$, we define ${f}^{w,\epsilon}_{\min}(x)$ to be the vector of logits corresponding to the minimizer of the softmax of class $y$ for any input point in an $\epsilon-$ball around $x$: \begin{align}\label{eq:sigma_min_def} \sigma_{y}({f}^{w,\epsilon}_{\min}(x))= \min_{x':|x-x'|\leq \epsilon} \sigma_y(f^w(x')), \end{align} where $\sigma_{y}(\cdot)$ is the softmax relative to class $y.$ In the robust training scenario we would like the likelihood $p(y|x,w)$ to be influenced not only by the accuracy of the prediction, but also by the robustness of the BNN in the neighbourhood of a point. We model this by assuming that the likelihood of a prediction, given an input point and a weight vector, also depends on the worst-case perturbation in an $\epsilon-$ball around the input point. In particular, we assume that $\epsilon$ is sampled from a non-negative random variable with distribution $p_{\epsilon}$, and for each $\epsilon$ in the support of $p_{\epsilon}$ we consider the softmax likelihood computed for ${f}^{w,\epsilon}_{\min}(x)$. Then, by marginalizing over $p_\epsilon$, we obtain the following likelihood function, which we call \emph{robust likelihood}: \begin{align} \nonumber p(y|x,w) =& \int_{\mathbb{R}_{\geq 0}} \sigma_{y}({f}^{w,\epsilon}_{\min}(x)) p_{\epsilon}(\epsilon) d\epsilon\\ =& \mathbb{E}_{\epsilon \sim p_{\epsilon}}[ \sigma_{y}({f}^{w,\epsilon}_{\min}(x))]. \label{Eqn:likelihood} \end{align} That is, in the robust likelihood for each $\epsilon$ we consider the worst-case of the standard likelihood for all the points in an $\epsilon$-ball around $x$ (note that $\sigma_{y}({f}^{w,\epsilon}_{\min}(x)$ is a monotonically decreasing function of $\epsilon$) and then compute the average with respect to $p_{\epsilon}.$ We should stress that Eqn.~\eqref{Eqn:likelihood} defines a marginal probability, and hence is a well defined probability. Furthermore, we also note that for $p_{\epsilon}=\delta_{0}$, the delta function centered in the origin, we recover the standard cross-entropy likelihood model. In the particular case of deterministic NNs, adversarial training is generally implemented by balancing between adversarial robustness at a fixed $\epsilon > 0$ and accuracy (that is, at $\epsilon=0$) \citep{goodfellow6572explaining, lakshminarayanan2017simple}. For $0\leq \lambda \leq 1$ and $\eta > 0$, this can be obtained in our setting by considering the following discrete distribution for $\epsilon$: \begin{align} p_{\epsilon}(\epsilon)=\begin{cases} \lambda & \quad \text{if } \epsilon=0\\ 1-\lambda & \quad \text{if } \epsilon=\eta \end{cases}. \label{Eqn:discreteDistr} \end{align} This leads to the following form for the robust likelihood: \begin{align*} & p(y|x,w) = \lambda \cdot \sigma_y(f^w(x)) + (1-\lambda) \cdot \sigma_y({f}_{\min}^{w,\eta}(x)), \end{align*} which is a weighted sum of two softmax functions, one given by the standard likelihood and the other accounting for adversarial robustness. By assuming the statistical independence of the training labels given input and weights (which is the standard assumption for classification \citep{bishop1995neural}), we obtain the following negative log-likelihood for our model: \begin{align}\label{eq:error_model_robust} E=-\sum_{i=1}^{n_{\mathcal{D}}} log\big( \mathbb{E}_{\epsilon \sim p_{\epsilon}}[ \sigma_{y^{(i)}}({f}_{\min}^{w,\epsilon}(x^{(i)}))] \big). \end{align} Notice that this has a trivial absolute minimum when $\mathbb{E}_{\epsilon \sim p_{\epsilon}}[ \sigma_{y^{(i)}}({f}_{\min}^{w,\epsilon}(x^{(i)}))] =1$ for all $(x^{(i)},y^{(i)})\in \mathcal{D}$. Hence, the absolute minimum of the negative log-likelihood (which would correspond to the maximum likelihood estimation) is reached for the set of weights $w^*$, if it exists, such that for any $(x^{(i)},y^{(i)})\in \mathcal{D}$ almost surely $f^{w^*}(x^{(i)})$ has no adversarial examples in an $\epsilon-$ball around $x^{(i)}$, for any $\epsilon$ in the support of $p_{\epsilon}$. Therefore, in order to evaluate our robust likelihood model we need to be able to compute $\sigma_{y}({f}^{w,\epsilon}_{\min}(x))$ as defined by Eqn.~\eqref{eq:sigma_min_def}. This is discussed in the next section. First, we briefly discuss the case of regression models. \begin{remark}\label{remark:regression} The above analysis concerns a classification framework. For a regression problem everything follows similarly except that the likelihood is a Gaussian distribution with variance $\Sigma$ \citep{bishop1995neural}. In particular, assuming for simplicity and without lost of generality that $C=1$ -- i.e., single output regression -- call $f^{w,\epsilon}_{\max}(x)=\max_{x' : |x-x'|\leq \epsilon} f^{w}(x')$ and $f^{w,\epsilon}_{\min}(x)=\min_{x' : |x-x'|\leq \epsilon} f^{w}(x')$. That is, $f^{w,\epsilon}_{\max}(x)$ and $f^{w,\epsilon}_{\min}(x)$ are the maximum and minimum of $f^w$ for all the points in an $\epsilon-$ball centered around $x$. Then, in the regression case, for $x \in \mathbb{R}^{n}, y \in \mathbb{R}$ the robust likelihood is: \begin{align*} & p(y|x,w) = \frac{1}{\sqrt{2\pi\Sigma}}exp\big(-\frac{1}{2\Sigma}\max \{\\ &\quad (\mathbb{E}_{\epsilon \sim p_{\epsilon}}[f^{w,\epsilon}_{\max}(x)]-y)^2, (\mathbb{E}_{\epsilon \sim p_{\epsilon}}[f^{w,\epsilon}_{\min}(x)]-y)^2\}\big). \end{align*} \end{remark} \iffalse \begin{remark} Given a constant $\lambda \in [0,1]$ and a fixed $\epsilon>0$ a common approach for robust training of deterministic neural networks presented in \cite{goodfellow6572explaining} and use elsewhere \citep{lakshminarayanan2017simple, gowal2018effectiveness} is to consider a loss function equivalent to the following: \begin{align} \nonumber -\lambda \sum_{i=1}^{n_{\mathcal{D}}}& log\big( \sigma_{y^{(i)}}(f^w(x^{(i))}) \big)\\ &-(1-\lambda)\sum_{i=1}^{n_{\mathcal{D}}} log\big( \sigma_{y^{(i)}}(\bar{f}^{w,\epsilon}(x^{(i)}))\big).\label{EQN:DeterministicLOSS} \end{align} That is, $\lambda$ weights between the standard cross-entropy loss and a correction term, which encodes the robustness for a given $\epsilon$. In a Bayesian interpretation Eqn \eqref{EQN:DeterministicLOSS} would correspond to the following likelihood for $(x^{(i)},y^{(i)})\in \mathcal{D}$: \begin{align} \label{EQN:DeterministicLOSS2} \big(\Pi_{c=1}^{C} \sigma_{y^{(i)}}(f^{w}(x^{(i)}))^{y_c} \big)^{\lambda} \big( \Pi_{c=1}^{C} \sigma_{y^{(i)}}(\bar{f}^{w,\epsilon}(x^{(i)}))^{y_c}\big)^{(1-\lambda)} . \end{align} However, for $\lambda\in (0,1)$ and $\sigma_{y^{(i)}}({f}^{w}(x^{(i)}))\neq \sigma_{y^{(i)}}(\bar{f}^{w,\epsilon}(x^{(i)}))$ we have that Eqn \eqref{EQN:DeterministicLOSS2} is not a well defined probability as it is missing a normalization term dependent on $\lambda, x^{(i)},y^{(i)},$ and $w$, thus it is not a likelihood that is compatible with the Bayesian framework. \end{remark} Expounding on Remark 2, there is some research in the Bayesian literature as to when loss functions can be used in lieu of a standard likelihood \citep{bissiri2016general}. However, doing so is not without fundamental issues of scale between the loss to data (likelihood/loss) and loss to prior (KL divergence). This becomes obvious when one considers the arbitrary scaling factor that is being omitted when using the loss in Remark 2. For this reason, the analogue to the standard self-information defined in Eqn \eqref{Eqn:likelihood} is the principled choice of likelihood under the Bayesian learning framework. A more complete treatment of these issues is given in \cite{bissiri2016general, bernardo2009bayesian}. \fi \section{ADVERSARIAL TRAINING THROUGH INTERVAL BOUND PROPAGATION} \label{sec:IBP} We now describe our implementation of the robust likelihood introduced in Section \ref{sec:BayesianAdvTrainingGeneral}. For a data point $(x,y)$, we need to compute $\sigma_{y}({f}^{w,\epsilon}_{\min}(x)),$ that is, the minimum of the softmax of class $y$ for all the points in an $\epsilon-$ball around $x$. Notice that, the likelihood function, $p(y|x,w)$, is defined over given values of the weight vector $w$ (and input point $x$), so that, even in the Bayesian settings, we need to deal with a single deterministic NN (sampled from the BNN) at a time. Unfortunately still, the computation of this quantity poses an NP-complete problem for deterministic NNs \citep{katz2017reluplex}. In this section, we review how Interval Bound Propagation (IBP) can be used to compute a safe lower bound on $\sigma_{y}({f}^{w,\epsilon}_{\min}(x))$ \citep{ehlers2017formal,mirman2018differentiable,gowal2018effectiveness} and then discuss extensions needed to provide certification for BNN posterior predictions. \paragraph{Interval Bound Propagation} IBP works by propagating bounding boxes through the network's layers. Given a weight vector $w$, the computation through the network layers on an input point $x$ is denoted by: \begin{align*} &f^{w}_{(k)} = W^w_{k-1} \phi^{w}_{(k-1)} + b^w_{k-1} \quad k=1,\ldots,K \\ &\phi^{w}_{(k)} = h(f^{w}_{(k)}) \qquad \qquad \qquad \; k=1,\ldots,K-1, \end{align*} with $\phi^{w}_{0} = x,$ where $K$ is the number of layers, $W^w_{k}$ and $b_k^w$ are the weight matrix and bias vector corresponding to the weight vector $w$ for the $k$th layer of the network, $h$ is the activation function, $f^{w}_{(k)}$ is the $k$th pre-activation and $\phi^{w}_{(k)}$ is the $k$th activation vector. Notice that $f^{w}_{(K)}$ is the network latent vector, whose softmax provides the final output of the network. Following the procedure discussed by \cite{gowal2018effectiveness}, we consider an $\ell_\infty-$ball of radius $\epsilon$ in the input space that we denote as $[\phi^{w,L}_{0},\phi^{w,U}_{0}]$. We then iteratively propagate the latter through each layer, for $k=1,\ldots,K$. This can be done efficiently by the introduction of the auxiliary variables, $\hat{\mu}_{k}, \mu_{k}, \hat{r}_{k}$ and $r_{k}$, as it follows: \begin{align*} &\hat{\mu}_{k} = \dfrac{\phi^{w,U}_{(k-1)} + \phi^{w,L}_{(k-1)}}{2}, \qquad \hat{r}_{k} = \dfrac{\phi^{w,U}_{(k-1)} - \phi^{w,L}_{(k-1)}}{2} \\ &\mu_{k} = W_{k-1}^w \hat{\mu}_{k} + b_{k-1}^w, \qquad r_{k} = | W_{k-1}^w | \hat{r}_{k} \\ & \qquad f^{w,U}_{(k)} = \mu_{k} + r_{k}, \qquad f^{w,L}_{(k)} = \mu_{k} - r_{k} \\ & \qquad \phi^{w,U}_{(k)} = h(f^{w,U}_{(k)}), \qquad \phi^{w,L}_{(k)} = h(f^{w,L}_{(k)}). \end{align*} The resulting latent values for $k=K$, i.e., $f^{w,U,\epsilon} := f^{w,U}_{(K)}$ and $f^{w,L,\epsilon} := f^{w,L}_{(K)}$, yield a valid bounding box for the network output, that is, they are such that $f^w(x) \in [f^{w,L,\epsilon}, f^{w,U,\epsilon} ]$ for every $x$ in the considered $\epsilon-$ball \citep{gowal2018effectiveness}. \paragraph{Bounding the Robust Likelihood} Consider a generic input point $x$ with associated class $y$, and an $\epsilon > 0$ from the support of $p_\epsilon$. Let $f^{w,L,\epsilon}$ and $f^{w,U,\epsilon}$ be the extrema of the bounding box computed by IBP as described in the previous paragraph. For $j=1,\ldots,C$, we define the vector $f^{w,\epsilon}_{LB}(x)$ as follows: \begin{align}\label{eq:ibp_lb_logits} f^{w,\epsilon}_{LB,j}(x) = \begin{cases} f^{w,U,\epsilon}_j \quad \text{if} \; j \neq y \\ f^{w,L,\epsilon}_j \quad \text{if} \; j = y. \end{cases} \end{align} Since the softmax function for the class $y$ is monotonically increasing along the $y$ coordinate and monotonically decreasing along any other direction, we have that $\sigma_{y}(f^{w,\epsilon}_{LB}(x)) \leq \sigma_{y}({f}^{w,\epsilon}_{\min}(x))$. That is, $\sigma_{y}(f^{w,\epsilon}_{LB}(x))$ provides a lower bound for $\sigma_{y}({f}^{w,\epsilon}_{\min}(x))$. By propagating this bound through the computation of the robust likelihood, we obtain the following propositio \begin{proposition}\label{lemma:ibp_likelihood} Consider a point $x$ with class $y$, and a distribution over $\epsilon$, $p_\epsilon$. Given a weight vector $w$ we have that: \begin{align*} p(y|x,w) \geq \mathbb{E}_{\epsilon \sim p_{\epsilon}}[ \sigma_{y}({f}^{w,\epsilon}_{LB}(x))] := p_{\text{IBP}}(y|x,w). \end{align*}\label{prop:IBPLikelhiood} \end{proposition} \vspace{-1em} \begin{sproof} For any $\epsilon$ in the support of $p_\epsilon$ we have, by the construction described above, that $\sigma_{y}({f}^{w,\epsilon}_{\min}(x)) \geq \sigma_{y}(f^{w,\epsilon}_{LB}(x)) $. Hence, since expected values respect inequalities, we have that: \begin{align*} p(y|x,w) &= \mathbb{E}_{\epsilon \sim p_{\epsilon}}[ \sigma_{y}({f}^{w,\epsilon}_{\min}(x))] \geq \mathbb{E}_{\epsilon \sim p_{\epsilon}}[ \sigma_{y}(f^{w,\epsilon}_{LB}(x)) ] \\ &= p_{\text{IBP}}(y|x,w). \end{align*} \end{sproof} Proposition \ref{lemma:ibp_likelihood} guarantees that the robust likelihood function can be lower bounded by using IBP computations. This provides us with a worst-case analysis for adversarial attacks, in the sense that if the network is safe according to IBP then it is necessarily safe (while the converse is not true). In fact, while $p(y|x,w)$ could be approximated by means of adversarial attack methods (e.g., FGSM or PGD), the resulting approximation would not have any guarantees with respect to the actual values of the $p(y|x,w)$. Since $p_{\text{IBP}}(y|x,w)$ is non-negative and a formal lower bound to $p(y|x,w)$, by employing it we obtain a (non-negative) lower bound to Equation \eqref{eq:error_model_robust} as well, so that the property of absence of adversarial examples at the optimal value of $p(y|x,w)$ is maintained by $p_{\text{IBP}}(y|x,w)$. However, the same does not hold for an approximation of $p(y|x,w)$ given by adversarial attacks, similarly to how maximising a lower bound yields guarantees on the final result, whereas nothing can be said about the maximisation of an upper bound. In Section \ref{sec:experimens} we empirically compare IBP with PGD and find these observations to be confirmed in practice. \paragraph{Certification of BNNs} After training, we can employ IBP to compute the certified robust accuracy of the BNN on a test set. In order to do so, instead of performing IBP on the single extracted network from the BNN, we have to propagate the input bounding box through the posterior predictor. To see that, consider a predictor for the BNN output $\hat{\mathbb{E}}^N$ defined as in Eqn.~\eqref{eq:predictor}. Let $w_1,\ldots,w_N$ be the sampled weights related to the latter, consider a given test point $x$ with true label $y$, and let $\epsilon > 0$ be the adversarial perturbation strength that we want to provide certification against. By performing IBP $N$ times we obtain a family of lower bounds such that $\sigma_{y}(f^{w_i,\epsilon}_{LB}(x)) \leq \sigma_{y}({f}^{w_i,\epsilon}_{\min}(x))$, for $i=1,\ldots,N$. By averaging these out we obtain a lower bound on the given empirical predictor for class $y$ in $x$, which we denote as $\hat{\mathbb{E}}^{N,\epsilon}_{y,LB} := \frac{1}{N} \sum \sigma_{y}(f^{w_i,\epsilon}_{LB}(x))$. Similarly, we can proceed to compute an upper bound on the predictor for classes $c' \neq y$. For this purpose we define: \begin{align*} f^{w,\epsilon,c'}_{UB,j}(x) = \begin{cases} f^{w,L,\epsilon}_j \quad \text{if} \; j \neq c' \\ f^{w,U,\epsilon}_j \quad \text{if} \; j = c', \end{cases} \end{align*} which we average out to obtain an upper bound on the predictive probability for class $c'$ as $\hat{\mathbb{E}}^{N,\epsilon}_{c',UB} := \frac{1}{N} \sum \sigma_{c'}(f^{w_i,\epsilon,c'}_{UB}(x))$. By defining the worst-case predictor for the true class $y$ according to IBP for $x$ as the vector $\hat{\mathbb{E}}^N_{IBP,\epsilon}(x) \in \mathbb{R}^C$ such that its $y-$th entry is equal to $ \hat{\mathbb{E}}^{N,\epsilon}_{y,LB} $, while the other entries for $c' \neq y$ are set to $ \hat{\mathbb{E}}^{N,\epsilon}_{c',UB}$, we obtain the following theorem. \begin{theorem}\label{th:certification} Consider a point $x^*$ with associated class $y^*$. Assume that $\argmax_{c \in \{1,\ldots,C\} } \hat{\mathbb{E}}^N_{IBP,\epsilon}(x^*) = y^*$, then: \begin{align*} \argmax_{c \in \{1,\ldots,C\} } \hat{\mathbb{E}}^N(\bar{x}) = y^* \quad \forall \bar{x} \; \; \text{s.t.} \; \; |x^*-\bar{x}| \leq \epsilon. \end{align*} As a consequence, given a set of test points $x_i^*$ with associated class labels $y_i^*$, for $i=1,\ldots,m$, we have the following certified bound for the robust accuracy at $\epsilon > 0$: \begin{align*} \mathcal{R}_\epsilon \geq \frac{1}{m}\sum_{i=1}^m \mathbb{I}\left[ \argmax_{c \in \{1,\ldots,C\} } \hat{\mathbb{E}}^N_{IBP,\epsilon}(x_i^*) = y_i^* \right]:=\mathcal{R}_\epsilon^{IBP}. \end{align*} \end{theorem} \begin{sproof} By construction we have that, $\forall \bar{x} \; \; \text{s.t.} \; \; |x^*-\bar{x}| \leq \epsilon$ it holds that: \begin{align*} \hat{\mathbb{E}}^N_{IBP,\epsilon}(x^*)_{y^*} &\leq \hat{\mathbb{E}}^N_{\epsilon}(\bar{x})_{y^*} , \quad \hat{\mathbb{E}}^N_{IBP,\epsilon}(x^*)_{c} &\geq \hat{\mathbb{E}}^N_{\epsilon}(\bar{x})_{c}, \end{align*} for $c \neq y^*$, $c \in \{1,\ldots,C\}$. Hence, if the $\argmax$ of $\hat{\mathbb{E}}^N_{IBP,\epsilon}(x^*)$ is $y^*$, then necessary the $\argmax$ of $\hat{\mathbb{E}}^N_{\epsilon}(\bar{x})$ will be $y^*$ as well (of course, the converse is not necessarily true). This can be re-stated as: \begin{align*} &\mathbb{I} \bigg[ \forall \bar{x} \; s.t. \; |x^*_i-\bar{x}| \leq \epsilon , \argmax_{c\in \{1,\ldots,C \}} \hat{\mathbb{E}}^N(\bar{x}) = c^*_i \bigg] \\ \geq& \mathbb{I}\left[ \argmax_{c \in \{1,\ldots,C\} } \hat{\mathbb{E}}^N_{IBP,\epsilon}(x_i^*) = y_i^* \right]. \end{align*} The theorem statement then follows by the definitions of $\mathcal{R}_\epsilon $ and $\mathcal{R}_\epsilon^{IBP}$. \end{sproof} Theorem \ref{th:certification} ensures that a lower bound on the certified robust accuracy of the BNN can be computed by employing IBP on a given predictor. Observe that, while the guarantees when computing the likelihood in Proposition \ref{lemma:ibp_likelihood} are given for a single weight realisation, so that robust training has the effect of penalising at inference time the weights which are not robust, the certified robust accuracy is computed for an empirical average of predictions over weights sampled from the posterior. We remark that, while in this paper we only considered training with IBP, linear bound propagation techniques (LBP) \citep{zhang2018efficient} could be similarly employed. LBP could potentially yield better bounds at the price of a less efficient training process. \begin{remark} The certified bounds are provided for a given empirical predictor, and as shown in Theorem \ref{th:certification}, if the empirical predictor is known, the bounds are exact. In the case in which the set of weights $w_1, \ldots, w_N$ changes at every prediction, one can rely on standard concentration inequalities, such as Chernoff's bound, to obtain confidence intervals over the certified behaviour \citep{vapnik2013nature}. \end{remark} \begin{figure*}[ht] \centering \includegraphics[width=0.92\textwidth]{Figures/RobustnessEvalAccepted_Full.png} \caption{ Accuracy (plotted as star points), an empirical estimation of $\mathcal{R}_{\epsilon}$ obtained using PGD (upper bound of each bar), $\mathcal{R}_{\epsilon}^{LBP}$ (lower bound of each bar), and $\mathcal{R}_{\epsilon}^{IBP}$ (shaded lower bound of each bar) obtained for $\epsilon = 0.1$ on the MNIST dataset (top row) and FMNIST (middle row) as well as for $\epsilon = 1/255$ on the CIFAR-10 dataset (bottom row). Each bar refers to a different approximate Bayesian inference technique. \textbf{Left Column:} results for the standard likelihood. \textbf{Centre Column:} results for approximation of robust likelihood using PGD. \textbf{Right Column:} results for training with formal IBP lower bound of robust likelihood (Eq~\eqref{eq:error_model_robust}). With our method we obtain up to $75\%$ certified robust accuracy on MNIST and up to $50\%$ on CIFAR-10. }\label{fig:MNIST} \end{figure*} \subsection{APPROXIMATE INFERENCE WITH IBP} As mentioned in Section \ref{sec:background}, unfortunately, training BNNs is an intractable problem, and remains so when the robust likelihood is used, so that the exact posterior cannot be computed. Hence, even if a model that perfectly minimises Equation \eqref{eq:error_model_robust} were to exist, we would not be guaranteed to find it (similarly to why no optimality can be claimed when training with the standard likelihood). Crucially, however, the likelihood bound computed by IBP is differentiable. This allows us to adapt commonly used approximate Bayesian inference methods to the robust likelihood settings. We now give the details for selected variational and Monte Carlo methods. We remark that, when computing the certified robust accuracy, we assume that the model has already been trained, so that the inference method does not introduce any error in the certification that we provide. \paragraph{ROBUST VI} In Algorithm~\ref{alg:RobustVI} we highlight the changes needed for the implementation of the robust likelihood in the case of natural gradient variational inference. We maintain the standard form of VI \citep{lin2020handling}, except for lines 6-9, highlighted in red, that emphasize the changes needed in the case in which $p_{\epsilon}$ takes the form of Eqn.~\eqref{Eqn:discreteDistr}. The case of a general $p_{\epsilon}$ can be tackled by iteratively sampling from the distribution (i.e., by adding a for loop around lines 6-9), the cost of this will, however, be an increased computational time. Notice, that since the IBP bound is differentiable, so is $l$ defined in line 9 of the algorithm. We remark that, by changing the parameter update on line 10 with approximations to the Hessian, computing the gradient wrt $\mu, s$, or by introducing momentum parameters, this algorithm can be converted to any of the gradient and natural gradient variational inference methods which have been proposed in recent years, including those of \cite{graves2011practical, blundell2015weight, khan2018fast} and \cite{osawa2019practical}. \begin{algorithm}[H]\normalsize \caption{Robust Natural Grad. Variational Inference}\label{alg:RobustVI} \textbf{Input:} Prior mean and precision: $\mu_{\text{prior}}, s_{\text{prior}}$, NN architecture: $f$, Dataset: $\mathcal{D}$, Learning rate: $\alpha$, Iterations: $T$, Mini-batch Size: $m$, $\epsilon$ and $\lambda$ parameters of $p_\epsilon$.\\ \textbf{Output:} Mean and precision of Gaussian approximate posterior.\\ \vspace*{-0.35cm} \begin{algorithmic}[1] \STATE $s \gets s_{\text{prior}}$; $\mu \gets \mu_{\text{prior}}$ \FOR{$t = 1,\ldots,T$} \STATE $\{X, Y\} \gets \{x_i, y_i\}_{i=0}^{m}$ \Comment{Sample Batch} \STATE $w = \mu + ((n_{\mathcal{D} } s)^{-1/2} \mathcal{N}(0,I))$ \STATE ${Y}_{\text{clean}} \gets \sigma(f^w(X))$ \STATE \textcolor{red}{$f^{w,L,\epsilon}(X), f^{w,U,\epsilon}(X) \gets \text{IBP}(f, w, X)$} \STATE \textcolor{red}{$f^{w,\epsilon}_{LB}(x) \gets$ Eqn.~\eqref{eq:ibp_lb_logits} for $f^{w,L,\epsilon}(X), f^{w,U,\epsilon}(X) $ } \STATE \textcolor{red}{$Y_{\text{worst}} \gets \sigma(f^{w,\epsilon}_{LB}(x))$} \STATE \textcolor{red}{ $l \gets - Y log (\lambda Y_{\text{clean}} + (1-\lambda)Y_{\text{worst}})$} \Statex \qquad \qquad \qquad \textcolor{red}{ $+ \mathbb{D}_{\text{KL}}(\mathcal{N}(\mu_{\text{prior}},1/s_{\text{prior}}) \; | \; \mathcal{N}(\mu, 1/s))$ } \STATE $s \gets (1-\alpha) s + \alpha \nabla_{w}^2 l$;\quad $\mu \gets \mu - \alpha s^{-1} \nabla_{w} l $ \ENDFOR \STATE return $(\mu, s)$ \end{algorithmic} \end{algorithm} \paragraph{ROBUST HMC} A similar modification needs to be made in the case of Hamiltonian Monte Carlo inference. When computing the potential energy function the same procedure outlined in lines 6-9 is employed. Namely, we have $U(w) = - log(p(w)) - log(\lambda {Y_{\text{clean}}} + (1-\lambda){Y_{\text{worst}}})$, where the vectors ${Y_{\text{clean}}}$ and ${Y_{\text{worst}}}$ are defined as in Algorithm~\ref{alg:RobustVI}. Observe that the kinetic function given in Section \ref{sec:background} remains unaltered, as it is not related to the weight distribution. \iffalse \begin{align*} &K(v) = \sum_{i=0}^{n_{w}-1}\dfrac{v_i^2}{2m_i} \\ &U(w) = - log(p(w)) - log(\lambda {Y_{\text{clean}}} + (1-\lambda){Y_{\text{worst}}}) \end{align*} \fi \section{APPROXIMATE INFERENCE PARAMETERS} In this section of the Supplementary Material, we list the training parameters that we used for the training of each of the networks discussed in the main text. \subsection{MNIST and FashionMNIST Parameters} \begin{table}[ht] \centering \begin{tabular}{@{}|l|l|l|l|l|l|@{}} \toprule & SWAG & NoisyAdam & VOGN & BBB & HMC \\ \midrule Learning Rate & 0.1 & 0.001 & 0.35 & 0.45 & 0.075 \\ Prior Scaling & N/A & 10 & 10 & 20 & 500 \\ Batch Size & 128 & 128 & 128 & 128 & 60k \\ Epochs/Samples & 20/250 & 20/(N/A) & 20/(N/A) & 20/(N/A) & (N/A)/25 \\ PGD Iterations & 10 & 10 & 10 & 10 & 10 \\ \bottomrule \end{tabular} \end{table} Each network trained on MNIST is a single hidden layer fully-connected architecture with 512 neurons in the hidden layer. The parameters used for the 5 training methods are listed in the table above. Prior scaling refers to a multiplicative constant w.r.t.\ the initialisation parameters described in \cite{sutskever2013importance}. In fact, we often find the initial variance described in the later to be too small for retrieving good uncertainty estimates, and, thus, we further multiply it by the values reported in the table. Further parameters that are specific to HMC, and not included in the table, are: 3 iterations of burn-in, with 20 steps of the leapfrog numerical integrator followed by the reported 25 samples from the posterior each which explore the chain for 25 steps with the leapfrog integrator. We again note that when we perform approximate inference with HMC and the robust likelihood that we choose the initial network parameters to be the result of 10 epochs of stochastic gradient descent rather than the full-data gradient descent used during normal burn-in. Finally, we note that we follow the empirically optimal procedure stated by \cite{gowal2018effectiveness}. In particular, we train with an $\eta$ linearly increasing to its target value at every epoch. Again as in \cite{gowal2018effectiveness}, we set the target $\eta$ value 10\% larger than the `desired' robustness value. \subsection{CIFAR10 Parameters} \begin{table}[ht] \centering \begin{tabular}{@{}|l|l|l|l|@{}} \toprule & SWAG & NoisyAdam & VOGN \\ \midrule Learning Rate & 0.015 & 0.00025 & 0.25 \\ LR Decay & 0.0 & 0.025 & 0.025 \\ Prior Scaling & N/A & 5 & 5 \\ Batch Size & 128 & 128 & 128 \\ Epochs/Samples & 45/500 & 45/(N/A) & 45/(N/A) \\ PGD Iterations & 10 & 10 & 10 \\ \bottomrule \end{tabular} \end{table} For CIFAR10, prior to inference we perform data augmentation which involves horizontal flipping as well as random translations by up to 4 pixels. We randomly select an image from the train set with uniform probability and then select a transformation (translation or horizontal flipping) until we have augmented the data size from 60k to 100k images Finally, the network architecture is made of two convolutional layers, respectively with 16 and 32 four by four filters, followed by a 2 by 2 max pooling layer, and a fully connected layer with 100 hidden neurons. \iffalse \section{FASHION MNIST RESULTS} \begin{figure*}[ht] \vspace{-1em} \centering \includegraphics[width=1.0\textwidth]{Figures/FMNIST-Supp.png} \caption{We follow an identical training and evaluation procedure as reported for MNIST, but on the FashionMNIST dataset. We find that, save minor difference, the qualitative behavior of our robust inference on FashionMNIST is the same as on MNIST. In this figure: \textbf{Left Column:} results for the standard likelihood. \textbf{Centre Column:} results for approximation of robust likelihood using PGD. \textbf{Right Column:} results for formal IBP-based lower bound of robust likelihood.}\label{fig:fashion} \end{figure*} In Figure~\ref{fig:fashion} we give an identical robustness evaluation to the one performed for MNIST and CIFAR10 in the main text. In particular, we use the same discrete $p_{\epsilon}$ distribution with $\eta = 0.1$ and $\lambda = 0.25$. Despite being a harder dataset than MNIST, as evidenced by the reduced accuracy of the approximate posteriors, we find the robustness trends to be qualitatively similar to those on MNIST and CIFAR10. We do note, however, that PGD training was much more effective at increasing the certified bound when the bound is computed with LBP. Our hypothesis about this difference is that because the networks are less accurate they are also potentially less robust to gradient-based attacks (following the logic of \citep{carbone2020robustness}) and thus, PGD is able to find strong adversarial examples which can increase the robustness of the posterior. \fi \section{CERTIFIED ROBUST RADIUS RESULTS} \begin{figure*}[ht] \vspace{-1em} \centering \includegraphics[width=1.0\textwidth]{Figures/saferad-h.png} \caption{We plot the average certified radius for images from MNIST (left), FashionMNIST (center), and CIFAR10 (right) using the methods of \cite{boopathy2019cnn}. We re-report the MNIST and CIFAR10 results here for ease of comparison. We observe that robust training with IBP roughly doubles the maximum verifiable radius of compared with standard training and that obtained by training on PGD adversarial examples. }\label{fig:saferad} \end{figure*} Consistent with the analysis in the main text, we consider analyzing the robustness of the trained posteriors at varying values of $\epsilon$ (reported in Figure~\ref{fig:saferad}). In particular, we estimate the maximal $\epsilon$ radius for which each image is robust. To estimate this value, we follow the methodology of \cite{boopathy2019cnn}: a binary search over the values of $\epsilon$. We stress that during this procedure, we use linear propagation methods: CROWN for MNIST and FMNIST networks and CNN-Cert for CIFAR10 Networks. This is to reduce the bias of the evaluation of IBP trained networks. That is, IBP trained networks intuitively should evaluate well against IBP but it is important to see if tighter methods still show large improvements. As reported in the paper, we find that training with PGD does not tend to increase the certifiable radius in a significant way, while training with IBP allows one to double the certifiable radius. \section{ADVERSARIAL TRAINING PARAMETER STUDY} \begin{figure*}[ht] \centering \includegraphics[width=\textwidth]{Figures/eps-effect-PGD.png} \includegraphics[width=\textwidth]{Figures/eps-effect-IBP.png} \caption{\textbf{Left to Right:} Effect of varying (increasing) values of $\eta$ on the robustness profile of resulting approximate posteriors. \textbf{Top Row:} Robustness profiles of networks using the robust likelihood with PGD as an approximate worst-case adversary. \textbf{Bottom Row:} Robustness profiles of networks using the robust likelihood with IBP as an approximate worst-case adversary. Accuracy (plotted as star points), an empirical estimation of $\mathcal{R}_{\epsilon}$ obtained using PGD (upper bound of each bar), and $\mathcal{R}_{\epsilon}^{IBP}$ (lower bound of each bar), obtained for $\epsilon = 0.1$ on the MNIST dataset.}\label{fig:eta} \end{figure*} \begin{figure*}[ht] \centering \includegraphics[width=\textwidth]{Figures/lam-effect-PGD.png} \includegraphics[width=\textwidth]{Figures/lam-effect-IBP.png} \caption{ \textbf{Left to Right:} Effect of varying (decreasing) values of $\lambda$ on the robustness profile of resulting approximate posteriors. \textbf{Top Row:} Robustness profiles of networks using the robust likelihood with PGD as an approximate worst-case adversary. \textbf{Bottom Row:} Robustness profiles of networks using the robust likelihood with IBP as an approximate worst-case adversary. Accuracy (plotted as star points), an empirical estimation of $\mathcal{R}_{\epsilon}$ obtained using PGD (upper bound of each bar), and $\mathcal{R}_{\epsilon}^{IBP}$ (lower bound of each bar), obtained for $\epsilon = 0.1$ on the MNIST dataset.}\label{fig:lambda} \end{figure*} In this section we analyse the choice of $p_\epsilon$, that is, the distribution that controls the adversarial perturbation strength at training time. Recall that the distribution used in the main text follows related work on training of deterministic neural networks: \begin{align} p_{\epsilon}(\epsilon)=\begin{cases} \lambda & \quad \text{if } \epsilon=0\\ 1-\lambda & \quad \text{if } \epsilon=\eta \end{cases}. \label{Eqn:discreteDistr} \end{align} In particular, we first study the affect of changing the $\lambda$ parameter in Eqn~\eqref{Eqn:discreteDistr} which parameterizes the relative penalty between accuracy and robustness during inference. Next, we study the effect of changing $\eta$ in Eqn~\eqref{Eqn:discreteDistr} which sets a the maximum allowable manipulation magnitude during inference. Finally, we study the effect of changing the form of the $\epsilon$ probability density function to two different continuous, non-negative distribution. In each figure, we maintain the plotting conventions used in Figure 1 of the main text. For each posterior: accuracy is plotted as a star point, an empirical estimation of $\mathcal{R}_{\epsilon}$ obtained using PGD (upper bound of each bar), and $\mathcal{R}_{\epsilon}^{IBP}$ (lower bound of each bar), obtained for $\epsilon = 0.1$ on the MNIST dataset. For the following analysis we only report the lower-bound based on IBP. \subsection{The Effect of Adversarial Magnitude During Inference} When approximating the robust likelihood with PGD during inference, we find that the shift in magnitude of $\eta$ on the resulting robustness estimates is largely dependant on the method of approximate inference. Interestingly, we find that for SWAG and BBB, that training with $\eta = 0.15$ becomes problematic as it seems that with the current training parameters (reported in the previous section), the 1 layer, 512 neuron network may not have had enough capacity to accurately capture good adversarial robustness. The connection between robustness of (gradient-based) adversarial trained deterministic networks and capacity is discussed at length in \cite{madry2017pgd}. We find that NA and HMC are relatively unaffected by small changes to the $\eta$ magnitude and enjoy similar heightened robustness for each observed value. The effect of $\eta$ is much more pronounced when we perform inference with the IBP robust likelihood. We see that having an $\eta$ smaller than $\epsilon$ (in $\mathcal{R}_{\epsilon}$) results in worse lower-bound potentially indicating a less robust posterior. For parameter and natural gradient VI, we also find that having an $\eta$ that is much larger than $\epsilon$ can be detrimental as too strong of an adversary can be problematic for learning. \subsection{The Effect of Trading Accuracy and Robustness} In Eqn~\eqref{Eqn:discreteDistr} the parameter $\lambda$ effectively controls the relative weighting of accuracy-error and robust-error during the inference procedure. Specifically, we note the cases $\lambda = 1.0$ which results in the standard likelihood (a.k.a.\ the categorical cross-entropy in the case of classification), and $\lambda = 0.0$ results in a framework in which give importance solely to robustness. In Figure~\ref{fig:lambda} we report the change in robustness profiles for $\lambda \in \{0.75, 0.5, 0.25\}$ for training with the worst-case approximated by PGD (top row) and IBP (bottom row). When approximating the robust likelihood with PGD, we find that HMC and natural gradient methods (VOGN, NA) are not strongly affected by the choice of $\lambda$, whereas we see the most pronounced difference with SWAG which is greatly affected by choice of $\lambda$. In particular we highlight roughly a $20\%$ raw increase in the robustness to gradient based attacks for each 0.25 decrease in $\lambda$. On the other hand, when training with IBP there is large shift in the resulting robustness profiles for parameter and natural gradient VI methods (BBB, VOGN, NA). Notably, we see a large (50\% raw) increase in the lower-bound for BBB as the value for $\lambda$ varies between 0.75 and 0.25. \subsection{On the Choice of Density Function for Adversarial Magnitude} \begin{figure*}[ht] \centering \includegraphics[width=\textwidth]{Figures/Ray-dist.png} \caption{ \textbf{Left:} Effect of varying the scale $\eta$ of the Rayleigh distribution on the density $p_\epsilon$ when training we use $\eta = 0.1$. \textbf{Right, Top Row:} Robustness profiles of networks using the robust likelihood with PGD as an approximate worst-case adversary. \textbf{Right, Bottom Row:} Robustness profiles of networks using the robust likelihood with IBP as an approximate worst-case adversary. Accuracy (plotted as star points), an empirical estimation of $\mathcal{R}_{\epsilon}$ obtained using PGD (upper bound of each bar), and $\mathcal{R}_{\epsilon}^{IBP}$ (lower bound of each bar), obtained for $\epsilon = 0.1$ on the MNIST dataset.}\label{fig:pepsdist-ray} \end{figure*} \begin{figure*}[ht] \centering \includegraphics[width=\textwidth]{Figures/Exp-dist.png} \caption{\textbf{Left:} Effect of varying the scale $\eta$ of the exponential distribution on the density $p_\epsilon$ when training we use $\eta = 0.1$. \textbf{Right, Top Row:} Robustness profiles of networks using the robust likelihood with PGD as an approximate worst-case adversary. \textbf{Right, Bottom Row:} Robustness profiles of networks using the robust likelihood with IBP as an approximate worst-case adversary. Accuracy (plotted as star points), an empirical estimation of $\mathcal{R}_{\epsilon}$ obtained using PGD (upper bound of each bar), and $\mathcal{R}_{\epsilon}^{IBP}$ (lower bound of each bar), obtained for $\epsilon = 0.1$ on the MNIST dataset.}\label{fig:pepsdist-exp} \end{figure*} In Figure~\ref{fig:pepsdist-ray} and Figure~\ref{fig:pepsdist-exp}, we study changing the form of $p_\epsilon$ from the density given in Eqn~\eqref{Eqn:discreteDistr} to a Rayleigh distribution and an Exponential distribution, respectively. We have chosen these distributions in particular because they have non-negative support and a single controlling variable. In principle, however, any distribution (with a positive support) can be chosen for the form of $p_\epsilon$. As noted in the main text, during the computation of the loss function, one must marginalize over the selected $p_\epsilon$ distribution, which in this case is done via Monte Carlo with only 10 samples from $p_\epsilon$ per batch. Consistent with the study presented in the main text, we evaluate robustness profiles with $\epsilon$ set to 0.1. \subsubsection{Using a Rayleigh Distribution} In Figure~\ref{fig:pepsdist-ray}, we plot the case in which training is done by using an Rayleigh distribution with the scale set to $\eta$ for $p_\epsilon$ as follows: \begin{align} p_{\epsilon}(\epsilon) = \dfrac{\epsilon}{\eta^2} \text{exp}\bigg(\dfrac{-\epsilon^2}{2\eta^2}\bigg) \end{align} In our experiments, we find that using a Rayleigh distribution for $p_\epsilon$ does marginally improve the robustness ($\mathcal{R}_{\epsilon}$) when training against a PGD adversary ($\approx 4\%$ on average). We also find that when using the altered pdf, the main result stated in the paper, that training with robust likelihood is the only method that gives non-trivial lower bounds on robustness, still holds. However, we find that the use of the Rayleigh distribution has an adverse affect on the overall robustness profile compared to training with Eqn~\eqref{Eqn:discreteDistr}. \subsubsection{Using an Exponential Distribution} In Figure~\ref{fig:pepsdist-exp}, we give the results when $p_\epsilon$ is selected as an exponential distribution with the rate set to $\eta^{-1}$: \begin{align} p_{\epsilon}(\epsilon) = \dfrac{1}{\eta}\text{exp}\left(\dfrac{-\epsilon}{\eta}\right) \end{align} When training against a PGD adversary, we found that an using an exponential distribution for $p_\epsilon$ also leads to small increases in robustness against adversarial attacks, with an average increase of $\approx 5\%$. Consistent with the results for the Rayleigh distribution, the main result stated in the paper, that training with the robust likelihood is the only method that gives non-trivial lower bounds on robustness. However, we continue to find that the use of the exponential distribution when training with IBP, consistent with the Rayleigh distribution, has an adverse affect on the overall robustness profile compared to training with Eqn~\eqref{Eqn:discreteDistr}. \begin{figure*}[ht] \centering \includegraphics[width=0.55\textwidth]{Figures/llr.png} \caption{Likelihood Ratios using FashionMNIST as out-of-distribution samples for posteriors inferred on the MNIST datset. A likelihood ratio of 1.0 represents predictions which are equally confident in and out of distribution. Conversely, a low likelihood ratio represents less certain predictions on out-of-distribution points. }\label{fig:llr} \end{figure*} \begin{figure*}[ht] \centering \includegraphics[width=\textwidth]{Figures/EntropySupp.png} \caption{We plot the in-distribution (blue) and out-of-distribution (orange) predictive uncertainty. Each pair of figures corresponds to an inference method where the left figure represents the entropy distributions for standard training and the right figure represents robust IBP training. We find that robust training improves the uncertainty calibration of the network w.r.t. out-of-distribution samples.}\label{fig:ent} \end{figure*} \section{Likelihood Ratios} Expanding briefly on the evaluation of uncertainty on out-of-distribution points, we also observe the affect of training with robust likelihood on the `likelihood ratio' of in and out-of-distribution (OOD) points. Similarly to how we evaluate OOD points in the main text, we use FashionMNIST dataset as out-of-distribution points for networks trained on MNIST. The likelihood ratio is calculated as the average softmax probability coming from out-of-distribution points divided by the average predictive probability of in-distribution points. Thus, a likelihood ratio of 1.0 represents predictions which are equally confident in and out of distribution. Conversely, a low likelihood ratio represents less certain predictions on out-of-distribution points. We show that for our method of training, consistently with the often used entropy measure reported in the main text, IBP training consistently improves the calibration of uncertainty on out-of-distribution points compared with normal training. \subsection{Extended Out-of-Distribution Entropy Plots} In Figure~\ref{fig:ent} we extend the out of distribution MNIST plots given in the main text to the other approximate inference techniques and find that the same result that is discussed in the main text holds for HMC and NA as well.
\section{Problem Statement} In many problems of science and engineering intractable integrals must be approximated. Let us denote an integral of interest \begin{equation} I(f)=E_{\widetilde \pi}[f({\bf x})]= \int f({\bf x})\widetilde{\pi}({\bf x}) d{\bf x}, \label{eq_integral} \end{equation} where $f:\mathbb{R}^{d_x}\rightarrow \mathbb{R}$, and $\widetilde \pi({\bf x})$ is a distribution of the r.v. ${\bf X} \in \mathbb{R}^{d_x}$.\footnote{For the sake of easing the notation, from now on we use the same notation for denoting a random variable or one realization of a random variable.} Note that although Eq.~\eqref{eq_integral} involves a distribution, more generic integrals could be targeted with the techniques described below. The integrals of this form appear often in the Bayesian framework, where a set of observations are available in ${\bf y} \in \mathbb{R}^{d_y}$, and the goal is in inferring some hidden parameters and/or latent variables ${\bf x} \in \mathbb{R}^{d_y}$ that are connected to the observations through a probabilistic model \cite{WileyLee14}. The information provided by the observations is compacted in the likelihood function $\ell({\bf y}|{\bf x})$ and the prior knowledge on ${\bf x}$ is encoded in the prior distribution $p_0({\bf x})$. Both sources of information are fused to create \textcolor{black}{through} the simple Bayes' rule the posterior probability density function (pdf), also called target distribution, given by \begin{equation} \widetilde{\pi}({\bf x})= p({\bf x}| {\bf y})= \frac{\ell({\bf y}|{\bf x}) p_0({\bf x})}{Z({\bf y})}, \label{eq:posterior} \end{equation} where $Z({\bf y})=\int \ell({\bf y}|{\bf x}) p_0({\bf x}) d{\bf x} $ is the marginal likelihood (a.k.a., partition function, Bayesian evidence, model evidence, or normalizing constant) \cite{Bernardo94,Robert07}. In most models of \textcolor{black}{interest} $Z({\bf y})$ is unknown and in many applications it must be approximated \cite{Bernardo94,Box73,Robert07}. But even when its approximation is not needed, the unavailability of $Z({\bf y})$ implies that the posterior can be evaluated only up to that (unknown) constant, i.e., we can only evaluate \begin{equation} \pi({\bf x})=\ell({\bf y}|{\bf x}) p_0({\bf x}), \label{eq:target} \end{equation} that we denote as unnormalized target distribution.\footnote{From now on, we drop ${\bf y}$ to ease the notation, \textcolor{black}{e.g., $Z \equiv Z({\bf y})$.}} Table \ref{tab:notation} summarizes the notation of this article. \begin{table}[!t] \centering \caption{Summary of the notation.} \vspace{0.1cm} \begin{tabular}{|c|l||c|l|} \hline \cellcolor{MYCOLOR0} $d_x$ & \multicolumn{3}{l|}{dimension of the inference problem, ${\bf x}\in\mathbb{R}^d_x$} \\ \cellcolor{MYCOLOR0} $d_y$ & \multicolumn{3}{l|}{dimension of the observed data, ${\bf y}\in\mathbb{R}^d_y$} \\ \hline \hline \cellcolor{MYCOLOR0}${\bf x}$ &\multicolumn{3}{l|}{r.v. of interest; parameter to be inferred}\\ \cellcolor{MYCOLOR0}${\bf y}$ &\multicolumn{3}{l|}{observed data} \\ \hline \hline \cellcolor{MYCOLOR0} $\ell({\bf y}|{\bf x})$ & \multicolumn{3}{l|}{likelihood function} \\ \cellcolor{MYCOLOR0} $p_0({\bf x})$ & \multicolumn{3}{l|}{prior pdf} \\ \cellcolor{MYCOLOR0} $\widetilde{\pi}({\bf x})$ & \multicolumn{3}{l|}{posterior pdf (target), $\widetilde{\pi}({\bf x})\equiv p({\bf x}| {\bf y})$} \\ \cellcolor{MYCOLOR0} $\pi({\bf x})$ & \multicolumn{3}{l|}{posterior density function (unnormalized target) , $\pi({\bf x}) \equiv \ell({\bf y}|{\bf x}) g({\bf x})\propto {\bar \pi}({\bf x})$} \\ \cellcolor{MYCOLOR0} $q({\bf x})$ & \multicolumn{3}{l|}{ {proposal density}} \\ \cellcolor{MYCOLOR0} $Z$ & \multicolumn{3}{l|}{ {normalizing constant or marginal likelihood, $Z \equiv Z({\bf y})$}} \\ \cellcolor{MYCOLOR0} $I(f)$ & \multicolumn{3}{l|}{integral to be approximated, $I(f)\equiv E_{\widetilde \pi}[f({\bf x})]$.} \\ \hline \end{tabular} \label{tab:notation} \end{table} The integral $I(f)$ cannot be computed in a closed form in many practical scenarios and hence must be approximated. The approximation methods can be \textcolor{black}{divided into} either deterministic or stochastic. While \textcolor{black}{many} deterministic numerical methods are available in the literature \cite{Acton90,WileyAusin14_2,Burden00,Kythe04,Plybon92}, it is in general accepted that they tend to become less efficient than stochastic approximations when the problem dimension $d_x$ grows. \subsection{Standard Monte Carlo integration} The Monte Carlo approach consists in approximating the integral $I(f)$ in Eq. \eqref{eq_integral} with random samples \citep{Dunn2011,Jaeckel02,Gentle04,Kroese11,Liu04b,WileyMedova08,Robert04}. In the standard Monte Carlo solution (often called instinctively vanilla/raw/classical/direct Monte Carlo), $N$ samples ${\bf x}_n$ are independently simulated from $\widetilde \pi({\bf x})$. The standard Monte Carlo estimator is built as \begin{equation} \label{IdealMC} {\overline I}^N(f)=\frac{1}{N} \sum_{t=1}^N f({\bf x}_n). \end{equation} First, note that ${\overline I}^N(f)$ is unbiased since $E_{\widetilde \pi}[ {\overline I}^N(f)]=I(f)$. Moreover, due to the weak law of large \textcolor{black}{numbers}, it can be shown that ${\overline I}_N$ is consistent and then converges in probability to the true value $I$, i.e., ${\overline I}^N(f) \overset{p}{\longrightarrow}I(f)$, which is equivalent to \textcolor{black}{stating} that, for any positive number $\epsilon>0$, we have $\lim\nolimits_{N\rightarrow \infty}\mbox{Pr}( |{\overline I}^N(f)-I(f) |> \epsilon)=0$. The variance of $ {\overline I}^N(f)$ is simply $\overline \sigma^2 = \frac{1}{N}\left(I(f^2) - I(f)^2 \right)$. If the second moment is finite, $I(f^2)<\infty$, then the central limit theorem (CLT) applies and the estimator converges in distribution to a well-defined Gaussian when $N$ grows to infinity i.e., \begin{equation} \sqrt{N} \left( {\overline I}^N(f) - I(f) \right) \overset{d}{\longrightarrow} \mathcal{N}(0,\overline \sigma^2). \end{equation} There exist multiple families of Monte Carlo methods \cite{Robert04,robert2014m,taimre2019monte}. We address the interested reader to the articles in Markov chain Monte Carlo (including Metropolis-Hastings \cite{robert2015,martino2014metropolis} and Gibbs sampling \cite{christen2014g}) and previous articles in importance sampling \cite{wang2014importance,kong2014importance}. \section{Importance sampling} \subsection{Origins} The first use of the importance sampling (IS) methodology dates from 1950 for rare event estimation in statistical physics, in particular for the approximation of the probability of nuclear particles penetrating shields \cite{kahn1950random}. IS was later used as a variance reduction technique when standard Monte Carlo integration was not possible and/or not efficient {\cite{Hesterberg95}}. The \textcolor{black}{renewed} interest in IS has run in parallel with the hectic activity in the community of Bayesian analysis and its ever increasing computational demands. In most cases, the posterior in \eqref{eq:posterior} is not available due to the intractability of the normalizing constant. See \cite{tokdar2010importance} for a previous review in IS. \subsection{Basics} Let us start defining the proposal pdf, $q({\bf x})$, used to simulate the samples. It is widely accepted that the proposal is supposed to have heavier tails than the target, i.e., the target $\widetilde \pi({\bf x})$ decays faster than $q({\bf x})$ when ${\bf x}$ is \emph{far} from the region where most of the probability mass is concentrated. However, this usual restriction is too vague and it will be clarified below. Here, we simply stick to the restriction that $q({\bf x})>0$ for all ${\bf x}$ where $\widetilde \pi({\bf x})f({\bf x}) \neq 0$. IS is constituted of two simple steps: \begin{enumerate} \item \textbf{Sampling}: $N$ samples are simulated as \begin{equation} {\bf x}_n \sim q(x),\qquad n=1,...,N. \label{sampling_static} \end{equation} \item \textbf{Weighting}: Each sample receives an associated importance weight given by \begin{equation} w_n= \frac{\pi({\bf x}_n)}{{q({\bf x}_n)}}, {\quad n=1,\ldots,N.} \label{weighting_static} \end{equation} \end{enumerate} The importance weights \textcolor{black}{describe} how representative the samples simulated from $q({\bf x})$ are when one is interested in computing integrals w.r.t. $\widetilde \pi({\bf x})$. The set of $N$ weighted samples can be used to approximate the generic integral $I(f)$ of Eq. \eqref{eq_integral} by the two following IS estimators: \begin{itemize} \item Unnormalized (or nonnormalized) IS (UIS) estimator: \begin{equation} \widehat{I}^N(f) = \frac{1}{NZ} \sum_{n=1}^N w_n f({\bf x}_n). \label{eq_UIS} \end{equation} Note that the UIS estimator can be used only when $Z$ is known. \item Self-normalized IS (SNIS) estimator: \begin{equation} \widetilde{I}^N(f) = \sum_{n=1}^N \overline w_n f({\bf x}_n), \label{eq_SNIS} \end{equation} where \begin{equation} \overline w_n = \frac{w_n}{\sum_{j=1}^N w_j} \label{eq_SNIS} \end{equation} are the normalized weights. \end{itemize} The derivation of the SNIS estimator departs from the UIS estimator of Eq. \eqref{eq_UIS}, substituting $Z$ by its unbiased estimator \cite{Robert04} \begin{equation} \widehat{Z}=\frac{1}{N}\sum_{n=1}^N w_n. \label{eq_Z_estimator} \end{equation} \textcolor{black}{After a few manipulations, one recovers} Eq. \eqref{eq_SNIS}. The normalized weights also allow to approximate the target distribution by \begin{eqnarray} \widetilde{\pi}^N({\bf x}) &=& \sum_{n=1}^N \overline{w}_n\delta({\bf x}-{\bf x}_n), \label{approximation} \end{eqnarray} where $\delta$ represents the Dirac measure. \subsection{Theoretical analysis} The UIS estimator is unbiased since it can be easily proven that $\mathrm{E}_q[\widehat{I}^N(f)] = I(f)$. Its variance $\mathrm{E}_q[\widehat{I}^N(f)] = \frac{\sigma_q^2}{N}$ is given by \begin{equation} \sigma_q^2 = \int \frac{\left( f({\bf x})\widetilde \pi({\bf x}) - I(f)q({\bf x}) \right)^2}{q({\bf x})}d{\bf x}, \label{eq_onesample_IS_variance} \end{equation} if $q({\bf x})>0$ for all ${\bf x}$ where $\widetilde \pi({\bf x})f({\bf x}) \neq 0$, as we have stated above \cite{owen2013monte}. We remark that it is not strictly necessary to have a proposal with \textcolor{black}{heavier tails} than the target distribution as long as $\sigma_q^2<\infty$. One counter example is a case where $f({\bf x})$ decays fast enough to compensate the heavier tails of the target distribution. Another counter example is a case where $f({\bf x})$ takes non-zero and finite values only in a bounded set. Note that $q({\bf x})$ is chosen by the practitioner and a good choice is critical for the efficiency of IS. Let us first suppose that $\text{sign}\left(f({\bf x})\right)$ is constant for all ${\bf x}$ and $I(f)\neq0$. Let us also suppose that it is possible to simulate from \begin{equation} q^*({\bf x}) = \frac{f({\bf x})\widetilde \pi({\bf x})}{\int f({\bf z})\widetilde \pi({\bf z})d{\bf z}}. \label{eq_opt_proposal} \end{equation} Then, the UIS estimator, \textcolor{black}{for any $N\geq 1$ number of samples}, yields a zero-variance unbiased estimator, since the numerator in \eqref{eq_onesample_IS_variance} is zero, and hence $\sigma_q^2=0$. However, it is very unlikely to have access to the proposal of \eqref{eq_opt_proposal}. The main reason is that its normalizing constant is exactly the intractable integral we are trying to approximate, $I(f)$. However, $q^*({\bf x})$ gives the useful intuition that the proposal should have mass proportional to the targeted integrand in Eq. \eqref{eq_integral}. More precisely, inspecting \eqref{eq_onesample_IS_variance}, we see that the efficiency is penalized with the mismatch of $f({\bf x})\widetilde \pi({\bf x})$ and $q({\bf x})$, with this penalization amplified inversely proportional to the density $q({\bf x})$. This explains the usual safe practice of over-spreading the proposal. The case where $\text{sign}\left(f(x)\right)$ alternates can be easily modified by splitting the function as $f(x) = f_+(x)+f_-(x)$, where $f_+(x)$ is non-negative and $f_-(x)$ is non-positive. It is easy to show that with the use of two proposals and $N=2$, a zero-variance estimator is possible (see \cite[Section 9.13]{owen2013monte}). % In summary, the UIS estimator, $ \widehat{I}^N(f)$ is unbiased, while the $ \widetilde{I}^N(f)$ is only asymptotically unbiased, i.e., with a bias that goes to $0$ when $N$ grows to infinity. Both UIS and SNIS are consistent estimators of $I$ with a variance that depends on the discrepancy between $\pi({\bf x})|f({\bf x})|$ and $q({\bf x})$, although the variance of the SNIS is more difficult to evaluate and its bias place also a central role when $N$ is not large enough \cite{owen2013monte}. When several different moments $f$ of the target must {be} estimated, a common strategy in IS is to decrease the mismatch between the proposal $q({\bf x})$ and the target $\widetilde \pi({\bf x})$ \cite{doucet2009tutorial}. This is equivalent to minimizing the variance of the weights and consequently the variance of the estimator $\widehat{Z}$, and it is closely linked to the diagnostics of Section \ref{sec_diagnostics}. \subsection{Diagnostics} \label{sec_diagnostics} It is a legitimate question to wonder \textcolor{black}{about} the efficiency of the set of simulated weighted samples in the task of approximating the target distribution and/or moments of it. Usual metrics of efficiency involve the computation of the variance of the IS estimators. However, the computation of those variances is intractable, and even more, their approximation is usually a harder problem than computing Eq. \eqref{eq_integral} (see \cite[Chapter 9.3]{owen2013monte} for a discussion). A classic diagnostic metric in the IS literature \cite{Kong92} is \begin{equation} \widehat{\text{ESS}} = \frac{1}{\sum_{n=1}^N \bar w_n^2}. \label{eq_rule_of_thumb} \end{equation} Note that $1 \leq \widehat{\text{ESS}}\leq N$, taking the value $\widehat{\text{ESS}} = 1$, when one $w_j=1$ and hence $w_i=0$, for all $i\neq j$. Therefore, $\widehat{\text{ESS}} = N$ only when $w_j = 1/N$ for all $j=1,...,N$. Hence $\widehat{\text{ESS}}$ measures the discrepancy among normalized weights. This diagnostic is commonly called \emph{effective sample size}, although it is an approximation of \textcolor{black}{the} more reasonable but intractable diagnostic given by \cite{elvira2018rethinking} \begin{equation} \text{ESS}^* = N\frac{\mathrm{Var}[\overline I^N]}{\text{MSE}[\widetilde I^N]}. \label{eq_ess_mse} \end{equation} Then, $\text{ESS}^*$ can be interpreted as the number of standard Monte Carlo that are necessary to obtain the same performance (in terms of MSE) as with the SNIS estimator with $N$ samples. The interested reader can find the derivation from $\text{ESS}^*$ to $\widehat{\text{ESS}}$ through a series of approximations and assumptions that rarely hold (see \cite{elvira2018rethinking} for a thorough analysis). In practice, a low $\widehat{\text{ESS}}$ is a symptom of malfunctioning, but a high $\widehat{\text{ESS}}$ does not necessarily \textcolor{black}{imply good behavior} of the IS method. New ESS-like methods have been proposed in the last years. In \cite{martino2017effective,martino2016alternative}, novel discrepancy measures with similar properties to $\widehat{\text{ESS}}$ are proposed and discussed, mitigating some of the deficiencies of the original diagnostic. For instance, an alternative to $\text{ESS}^*$ is \textcolor{black}{using $1/\max(\bar w_n)$ instead}, which preserves some of those properties (e.g., it takes values between $1$ and $N$, being $1$ if all the normalized weights are zero except one, and $N$ if all weights are the same). Another metric in the same spirit has been recently proposed in \cite{huggins2019sequential}. \textcolor{black}{Finally, the use of the importance trick within quadrature schemes has been recently proposed \cite{elvira2019gauss,elvira2020importance}. Note that these \emph{importance quadrature} schemes are not stochastic but strongly inspired in IS and its variants.} \subsection{Other IS \textcolor{black}{schemes}} The research in IS methods has been very active in the last decade not only in the development of novel methodology but also for increasing the understanding and the theoretical behavior of IS-based methods. For instance, \cite{agapiou2017importance} unifies different perspectives about how many samples are necessary in IS for a given proposal and target densities, a problem that is usually related to some notion of distance (more precisely divergence) between the two densities. With a similar aim, in \cite{chatterjee2018sample} it is shown that in a fairly general setting, IS requires a number of samples proportional to the exponential of the KL divergence between the target and the proposal densities. The notion of divergences between both densities is also explored in \cite{ryu2014adaptive} through the R\'enyi generalized divergence, and in \cite{miguez2017performance} in terms of the Pearson $\chi^2$ divergence. Both divergences are connected with the variance of the $\widehat{Z}$ estimator in Eq. \eqref{eq_Z_estimator}. \subsubsection{Transformation of the importance weights} \label{sec_crop} As described in Section \ref{sec_diagnostics}, a large variability in the importance weights is \textcolor{black}{usually responsible for a} large variance in the IS estimators. One alternative is adapting the proposals in order to diminish the mismatch with the target, as we describe in Section \ref{sec_ais}. However, this usually means throwing away past weighted samples (or stick to large variance estimators from the early iterations). Another alternative is the nonlinear transformation of the IS weights. The first work in this line is the \emph{truncated importance sampling} \cite{ionides2008truncated} where the standard unnormalized weights $w_n$ are truncated as $w_n' = \min(w_n,\tau)$, where $\tau$ is a maximum value allowed for the transformed/truncated weights. The consistency of the method and a central limit theorem of the modified estimator are proved. This transformation of the weights was also proposed in \cite{koblents2015population}, and called \emph{nonlinear importance sampling} within an adaptive IS scheme (N-PMC algorithm). The convergence of this method is analyzed in \cite{koblents2015population,miguez2017performance,miguez2018analysis}. The underlying problem that those methods fight is the right \textcolor{black}{heavy tail} in the distribution of the importance weights when the proposal is not well fit. In \cite{vehtari2015pareto}, the authors go a step beyond by characterizing the distribution of the importance weights with generalized Pareto distribution that fits the upper tail. Based on this fitting, a method is proposed for the stabilization of the importance weights. The authors provide proofs for consistency, finite variance, and asymptotic normality. See \cite{martino2018comparison} for a review of the clipping methodologies. \subsubsection{Particle filtering (sequential Monte Carlo)} Particle filtering (also known as sequential Monte Carlo) is an \textcolor{black}{IS-based} methodology for performing approximate Bayesian inference on a hidden state that evolves over the time in state-space models, a class of probabilistic Markovian models. Due to the structure of the Bayesian network, it is possible to process sequentially and efficiently the observations related to the hidden state for building the sequence of filtering distributions (i.e., the posterior distribution of a given hidden state conditioned to all available observations). Particle filters (PFs) are based on importance sampling, incorporating in most cases a resampling step that helps to increase the diversity of the particle approximation \cite{Douc05,li2015resampling}. Since the publication of the seminal paper \cite{Gordon93} where the bootstrap PF is developed (BPF), a plethora of PFs have been proposed in the literature \cite{doucet2000rao,Pitt01,Kotecha03a,djuric2007multiple,elvira2018search}. Advanced MIS and AIS techniques are often implicit in those algorithms, but they are rarely explicit. In \cite{elvira2019elucidating}, a novel perspective of BPF and auxiliary PF (APF) based on MIS is introduced. \textcolor{black}{In these state-space models, the ESS and its approximations are also used as diagnostics metrics for PF (see Section \ref{sec_diagnostics}). Moreover, since the observations are dependent in these models, other metrics have been recently developed, mostly based on the predictive distribution of the observations \cite{Lee15,Bhadra16,elvira2017adapting,elvira2019new}.} \section{Multiple importance sampling (MIS)} The IS methodology can be easily extended when the samples are simulated from $M$ proposals, $\{q_m({\bf x})\}_{m=1}^M$, instead of only one. In a generic setting, one can consider that $n_m$ samples are simulated from each proposal ($\sum_{j=1}^m n_j = 1$) and weighted appropriately. This extension is usually called multiple importance sampling (MIS), and it has strong connections with the case of standard IS with a single mixture proposal with components that are distributions, which is sometimes called mixture IS. Here we consider mixture IS as a subset of MIS methods when $n_m$ are not deterministic number of samples but r.v.'s instead. \subsection{Generalized MIS} \label{sec_gen_mis} A unifying framework of MIS has been recently proposed in \cite{elvira2019generalized}. \textcolor{black}{The framework} encompasses most of existing IS methods with multiple proposals, proposes new schemes, and \textcolor{black}{compares} them in terms of variance. For the sake of clarity, the framework is described in the case where (a) no prior information about the adequateness of the proposals is available; and (b) $M=N$ proposals are available (i.e., exactly the same number of proposals than samples to be simulated). However, straightforward extensions are possible to more generic settings. According to this framework, a MIS is proper if it fulfills two conditions related to the sampling and weighting processes. A valid sampling scheme for the simulation of $N$ samples, $\{{\bf x}_n \}_{n=1}^N$, can be agnostic to the dependence of those samples but must fulfill the following statistically property: a sample ${\bf x}$ randomly picked from the whole set of $N$ simulated samples must be distributed as the mixture of proposals $\psi({\bf x}) = \frac{1}{N}\sum_{n=1}^N q_n({\bf x})$. A valid weighting scheme must yield an unbiased and consistent UIS estimator, $\widehat I^N$. \textcolor{black}{These properness conditions extend the standard properness in IS established by \cite{Liu04b}, and have been also used to assign proper importance weights to resampled particles \cite{martino2016weighting}.} The paper analyzes and ranks several resulting MIS schemes (different combination of valid sampling and weighting procedures) in terms of variance. Due to space restrictions, here we show only two MIS schemes commonly used in the literature. Let us simulate exactly one sample per proposal (sampling scheme $\mathcal{S}_3$ in \cite{elvira2019generalized}) as \begin{equation} {\bf x}_n \sim q_n({\bf x}),\qquad n=1,...,N. \label{eq_sampling_mis} \end{equation} The next two weighting schemes are possible (among many others): \begin{itemize} \medskip \item \textbf{Option 1}: Standard MIS (s-MIS, also called $\texttt{N1}$ scheme): \begin{equation} w_n= \frac{\pi({\bf x}_n)}{{q_n({\bf x}_n)}}, \quad n=1,\ldots, N. \label{weights_SIS} \end{equation} \medskip \item \textbf{Option 2}: Deterministic mixture MIS (DM-MIS, also called $\Nc$ scheme): \begin{equation} w_n=\frac{\pi({\bf x}_n)}{\psi({\bf x}_n)}=\frac{\pi({\bf x}_n)}{\frac{1}{N}\sum_{j=1}^{N}q_j({\bf x}_n)}, \quad n=1,\ldots, N.\nonumber \label{f_dm_weights_static} \end{equation} \end{itemize} In both cases, it is possible to build the UIS and SNIS estimators. In \cite{elvira2019generalized}, it is shown that $$\mathrm{Var}[\widetilde I_{\Nc}^N]\leq \mathrm{Var}[\widetilde I_{\texttt{N1}}^N],$$ i.e., that using the second weighting option with the whole mixture in the denominator is always better than using just the proposal that simulated the sample (the equality in the variance relation happens only when all the proposals are the same). The result is relevant since ${\texttt{N1}}$ is widely used in the literature but it should be avoided whenever possible. Note that both $\texttt{N1}$ and $\Nc$ require just one target evaluation per sample. However, $\Nc$ requires $N$ proposal evaluations per sample, while $\texttt{N1}$ just one. \textcolor{black}{For a small number of proposals}, or when the target evaluation is very expensive (and hence the bottleneck), this extra complexity in $\Nc$ may be not relevant, but it can become cumbersome otherwise. Several MIS strategies have been proposed in the literature to alleviate this problem. In \cite{elvira2015efficient}, a partition of the proposals is done a priori, and then the $\Nc$ scheme is applied within each cluster (i.e., small mixtures appear in the denominator of the weights). This method is called \emph{partial deterministic mixture} and in some examples is able a similar variance reduction as in the $\Nc$ method, while reducing drastically the number of proposal evaluations (see \cite[Fig. 1]{elvira2015efficient}). The \emph{overlapped partial deterministic mixture} method \cite{elvira2016overlapping} extends the framework to the case where the proposals can belong to more than one cluster. However, the way the proposals are clustered remains an open problem and few attempts have been done for optimizing the clustering (see \cite{elvira2016heretical} where the clusters are done after the sampling, using the information of the samples, and hence biasing the estimators). When the selection of the proposals is also random, unlike in the sampling in \eqref{eq_sampling_mis}, there exist options to evaluate only the proposals that have been used for sampling (scheme $\texttt{R2}$ in \cite{elvira2019generalized}) instead of using all of them in the numerator (scheme $\texttt{R3}$ in \cite{elvira2019generalized}). A recent paper explores the $\texttt{R2}$ scheme and some of its statistical properties \cite{medina2019revisiting}. \subsubsection{MIS with different number of samples per proposal} Since the seminal works of \cite{Veach95,Hesterberg95} in the computer graphics community, several works have addressed the case where the number of samples (also called counts) per proposal (also called techniques) can be different (see also \cite{Owen00} where the authors introduce control variates in MIS). In particular, the so-called \emph{balance heuristic} estimator, proposed in \cite{Veach95} and very related to the scheme $\Nc$ in Section \eqref{sec_gen_mis} has attracted attention due to its high performance. The UIS balance heuristic estimator is given by \begin{equation} \widehat I^N(f) = \sum_{j=1}^M \sum_{i=1}^{n_j} \frac{f({\bf x}_{j,i}) \bar{\pi}({\bf x}_{j,i})}{\sum_{k=1}^M n_k q_k({\bf x}_{j,i})}, \label{eq_balance_heuristic} \end{equation} where again $\{q_m({\bf x})\}_{m=1}^M$ is the set of available proposals, $\{n_m\}_{m=1}^M$ is the number of samples associated to each proposal, $N = \sum_{k=1}^{M}n_k$ is the total number of samples, and ${\bf x}_{j,i} \sim q_j({\bf x})$, for $i=1,...,n_j$, and for $j=1,...,M$. Regarding the denominator in \eqref{eq_balance_heuristic}, it can be interpreted that the $N$ samples are simulated from the mixture $\sum_{k=1}^M n_k q_k({\bf x})$ via stratified sampling (a similar interpretation can be done in the aforementioned $\Nc$ scheme). In \cite{sbert2018multiple}, this estimator is re-visited and novel bounds are obtained. In \cite{sbert2019generalizing}, the balance heuristic estimator of Eq. \eqref{eq_balance_heuristic} is generalized, introducing more degrees of freedom that detach the sampling and the denominator of the importance weights, being able to obtain unbiased estimators that reduce the variance with respect to the standard balance heuristic. In \cite{he2014optimal}, control variates are introduced in an IS scheme with a mixture proposal (similarly to \cite{Owen00}), and all parameters (including the mixture weights) are optimized to minimize the variance of the UIS estimator (which is jointly convex w.r.t. the mixture probabilities and the control variate regression coefficients). \textcolor{black}{More works with a variable number of samples per proposal (either fixed or optimized) include \cite{sbert2016variance,sbert2017adaptive,sbert2019optimal}.} \subsection{Rare event estimation} Importance sampling is often considered as a variance reduction technique, not only in the case when sampling from $\widetilde \pi$ is not possible, but also when it is possible but not efficient. A classical example is the case of Eq. \eqref{eq_integral} when $f({\bf x}) = \mathbb{I}_{\mathcal{S}}$, where $\mathbb{I}$ is the indicator function taking value 1 for all ${\bf x}\in\mathcal{S}$, and 0 otherwise. In rare event estimation, $\mathcal{S}$ is usually a set where the target $\widetilde \pi$ has few probability mass, and hence $I$ is a small positive number. It is then not practical to simulate from the target, since most of the samples will not contribute to the estimator due to their evaluation in $\mathbb{I}_{\mathcal{S}}({\bf x})$ being zero. IS allows for sampling from a different distribution that will increase the efficiency of the method when $q({\bf x})$ is close to $\mathbb{I}_{\mathcal{S}}$. A recent MIS method called ALOE (``At least one sample'') is able to simulate from a mixture of proposals ensuring that all of them are in the integration region $\mathcal{S}$ in the case where $\widetilde \pi({\bf x})$ is Gaussian and $\mathcal{S}$ is the union of half-spaces defined by a set of hyperplanes (linear constraints) \cite{owen2019importance}. As an example, the authors show successful results in a problem with $5772$ constraints, in a $326$-dimensional problem with a probability of $I \approx 10^{-22}$, with just $N=10^4$ samples. ALOE has been recently applied for characterizing wireless communications systems through the estimation of the symbol error rate \cite{elvira2019efficient,elvira2019multiple}. \subsection{Compressed and distributed IS} In the last years, several works have \textcolor{black}{focused on} alleviating the computational complexity, communication, or storage in intensive IS methods. This computational burden appears often when the inferential problem is challenging and requires a \textcolor{black}{large} amount of simulated samples. \textcolor{black}{This can happen because the adaptive schemes} may require many iterations, because of the high-dimensional nature of the tackled problem, and/or because a high precision (low variance) \textcolor{black}{is required} in the estimate. In \cite{martino2018group}, several compressing schemes are proposed and theoretically analyzed for assigned importance weights to groups of samples for distributed or decentralized Bayesian inference. The framework is extended in \cite{martino2018compressed}, where a stronger theoretical support is given, and new deterministic and random rules for compression are given. The approach in \cite{koppel2019approximate,bedi2019compressed} considers the case of a single node that keeps simulating samples and assigning them an importance weight. The bottleneck here is the storage of the samples so one needs to decide at each time if the sample is stored or discarded. A compression algorithm is introduced for building a dictionary based on greedy subspace projections and a kernel density estimator of the targeted distribution with a limited number of samples. It is shown that asymptotic bias of this method is a tunable constant depending on the kernel bandwidth parameter and a compression parameter. \textcolor{black}{Finally, some works have studied the combination of IS estimators in the distributed setting. For instance, in \cite[Section 4]{Douc07b}, independent estimators are linearly combined with the combination weights being the inverse of the variance of each estimator. A similar approach is followed in \cite{nguyen2014improving}, using the $\widehat{\text{ESS}}$ instead of the variance of the estimator (which is unknown in most practical problems). A Bayesian combination of Monte Carlo estimators is considered in \cite{luengo2015bias,luengo2018efficient}. Note that the MIS approach is, due to its own nature, an implicit linear combination of multiple estimators (each of them using samples from one or several proposals). This perspective is exploited for instance in \cite{havran2014optimal,sbert2018multiple_b}.} \section{Adaptive importance sampling (AIS)} \label{sec_ais} Since choosing a good proposal (or set of proposals) in advance is in general impossible, a common approach is the use of adaptive importance sampling (AIS) \cite{bugallo2017adaptive}. AIS algorithms are iterative methods for a gradual learning of one or multiple proposals that aim at approximating the target pdf. Algorithm \ref{alg: standard_AIS_alg} describes a generic AIS algorithm through three basic steps: the simulation of samples from a one or several proposals (sampling), the computation of the importance weight of each sample (weighting), and the update of the parameters that characterize the proposal(s) for repeating the previous steps in the next iteration (adaptation). Most existing algorithms can be described in this framework that we describe with more detail. The generic AIS algorithm initializes $N$ proposals $\{q_n({\bf x}|\bm{\theta}_{n,1}) \}_{n=1}^N$, parametrized each of them by a vector $\bm{\theta}_{n,1}$. Then, $K$ samples are simulated from each proposals, {${\bf x}_{n,1}^{(k)},\;\; n=1,\ldots,N, k=1,\ldots,K$, and weighted properly. Here again many ways of sampling and weighting are possible, as it is described in Section \ref{sec_gen_mis}. At the end of the weighting step, it is possible to approximate the integral of Eq. \eqref{eq_integral} with either UIS and SNIS, and the target distribution with a discrete random measure, by using the set of weighted samples $\{{\bf x}_{n,1}^{(k)},{w}_{n,1}^{(k)}\},\;\; n=1,\ldots,N, k=1,\ldots,K$. Finally, the parameters of the $n$-th proposals are updated from $\bm{\theta}_{n,1}$ to $\bm{\theta}_{n,2}$. \textcolor{black}{This three-step process} is repeated until an iteration stoppage criterion is met (e.g., a maximum number of iterations, $J$, is reached). Note that at the end, \textcolor{black}{the estimators can either use} all weighted samples from iterations $1$ to $J$, or only the samples from the last iteration. \begin{algorithm}[H] \caption{Generic AIS algorithm} \label{alg: standard_AIS_alg} {\small \begin{algorithmic}[1] \STATE \textbf{Input:} Choose $K$, $N$, $J$, and $\{ \bm{\theta}_{n,1} \}_{n=1}^N$ \FOR{$i=1,\ldots,T$} \STATE \textbf{Sampling:} Draw {$K$} samples from each of the $N$ proposal pdfs, $\{ q_{n,j}({\bf x}|\bm{\theta}_{n,j}) \}_{n=1}^N$, ${\bf x}_{n,j}^{(k)}, k=1,\ldots,K,\; n=1,\ldots,N$ \STATE \textbf{Weighting:} Calculate the weights, $w_{n,j}^{(k)},$ for each of the generated $KN$ samples. \STATE \textbf{Adaptation:} Update the proposal parameters $\{\bm{\theta}_{n,j} \}_{n=1}^N \longrightarrow \{\bm{\theta}_{n,j+1} \}_{n=1}^N$. \ENDFOR \STATE \textbf{Output:} Return the $KNJ$ pairs $\{{\bf x}_{n,j}^{(k)},w_{n,j}^{(k)}\}$ for all $k=1,\ldots,K$, $n=1,\ldots,N$, $j=1,\ldots,J$. \end{algorithmic} } \end{algorithm} The literature is vast in AIS methods and a detailed description of all of them goes beyond the scope of this paper (see \cite{bugallo2017adaptive} for a thorough review). Most of the AIS algorithms can be classified within three categories, depending on how the proposals are adapted. Figure \ref{figure_adaptive_families} shows graphically the three families of AIS algorithms, describing the dependencies for the adaptation of the proposal parameters and the simulation of the samples. Each subplot corresponds to each family, whose description and corresponding AIS algorithms of the literature are given below. \begin{itemize} \item[a)] The proposal parameters are adapted using the last set of drawn samples (e.g., \textcolor{black}{standard} PMC \cite{Cappe04}, DM-PMC \cite{elvira2017improving,elvira2017population}, N-PMC \cite{koblents2015population}, M-PMC \cite{Cappe08}, APIS \cite{APIS15}). \item[b)] The proposal parameters are adapted using all drawn samples up to the latest iteration (e.g., AMIS \cite{CORNUET12}, CAIS \cite{el2018robust}, Daisee \cite{lu2018exploration}, EAMIS \cite{el2019efficient}, RS-CAIS \cite{el2019recursive}). \item[c)] The proposal parameters are adapted using an independent process from the samples (LAIS \cite{martino2017layered,martino2017anti}, GAPIS \cite{elvira2015gradient}, GIS \cite{schuster2015gradient}, IMIS \cite{fasiolo2018langevin}, SL-PMC \cite{elvira2019langevin}). \end{itemize} {} \begin{figure*}[h!] \centering \subfigure[The proposal parameters are adapted using the last set of drawn samples (Standard PMC, DM-PMC, N-PMC, M-PMC, APIS).]{ \includegraphics[scale=0.31]{a1} } \quad \subfigure[The proposal parameters are adapted using all drawn samples up to the latest iteration (AMIS, CAIS, Daisee, EAMIS, RS-CAIS).]{ \includegraphics[scale=0.31]{a2} } \quad \subfigure[The proposal parameters are adapted using an independent process from the samples (LAIS, GAPIS, GIS, IMIS, SL-PMC).]{ \includegraphics[scale=0.31]{a3} } \caption{{Graphical description of three possible dependencies between the adaptation of the proposal parameters $\bm{\theta}_{n,t}$ and the samples. Note that $q_{n,t} \equiv q_{n,t}({\bf x}|\bm{\theta}_{n,t})$.}} \label{figure_adaptive_families} \end{figure*} In Table \ref{table_alternative}, we describe some relevant AIS algorithms according to different features: the number of proposals; the weighting scheme (\emph{nonlinear} corresponds to the clipping strategies of Section \ref{sec_crop}, \emph{standard} is equivalent to Option 1 in Section \ref{sec_gen_mis}, \emph{spatial mixture} corresponds to Option 2 with $\psi({\bf x}) = \sum_{i=1}^N q_{i,j}({\bf x}|\bm{\theta}_{i,j})$, \emph{temporal mixture} corresponds to \textcolor{black}{Option 2 with} $\psi({\bf x}) = \sum_{\tau=1}^j q_{n,\tau}({\bf x}|\bm{\theta}_{n,\tau})$); and the parameters that are adapted (either location and scale, or only location). In Table \ref{table_computational}, we describe the computational complexity of the same algorithms according to number of target evaluations, proposal evaluations, target evaluations per proposal, and proposal evaluations per proposal. In some AIS algorithms, the proposals converge with the number of iterations $J$, although proving this convergence \textcolor{black}{(and the associated convergence rates)} is in general a tough problem (see a recent result in \cite{akyildiz2019convergence}). For many other AIS algorithms (e.g., DM-PMC, LAIS, APIS), the proposals do not converge to any \textcolor{black}{limiting} distribution. \textcolor{black}{Converge rates have been established only for simple classes of AIS algorithms which are based on optimized parametric proposals \cite{akyildiz2019convergence}. Note that AIS-based algorithms have been also used for optimization purposes \cite{del2006sequential,akyildiz2017adaptive}.} \begin{table}[!h] \begin{center} \captionof{table}{{Comparison of various AIS algorithms according to different features.}} {\footnotesize \begin{tabular}{|c|c|c|c|c|} \hline \bf{{Algorithm}} & \bf{\# proposals} & \bf{Weighting} & {\bf{Adaptation strategy}} & \bf{Parameters {adapted}} \\ \hline\hline Standard PMC & $N>1$ & standard & resampling & location\\ \hline M-PMC & $N>1$ & spatial mixture & resampling & location\\ \hline N-PMC & either & nonlinear & {moment} estimation & {location/scale}\\ \hline LAIS & $N>1$ & {generic mixture} & {MCMC} & location\\ \hline DM-PMC & $N>1$ & spatial mixture & resampling & location\\ \hline AMIS & $N=1$ & temporal mixture& moment estimation & {location/scale}\\ \hline GAPIS & $N>1$ & spatial mixture & {gradient process} & {location/scale}\\ \hline APIS & $N>1$ & spatial mixture & moment estimation & location \\ \hline \end{tabular}} \label{table_alternative} \end{center} \end{table} \begin{table}[!h] \centering \begin{center} \captionof{table}{{Comparison of various AIS algorithms according to the computational complexity.}} {\footnotesize \begin{tabular}{|c|c|c|c|c|} \hline \bf{{Algorithm}} & \bf{\# target eval} & \bf{\# proposal eval} & \bf{\# target eval/sample} & \bf{\# proposal eval/sample} \\ \hline\hline Standard PMC & $NJ$ & $NJ$ & $1$ & $1$ \\ \hline N-PMC & $NJ$ & $NJ$ & $1$ & $1$ \\ \hline M-PMC & $KJ$ & $KNJ$ & $1$ & $N$ \\ \hline LAIS & $K(N+1)J$ & $KN^2J$ & $1+1/N$ & $N$ \\ \hline DM-PMC & $KNJ$ & $KN^2J$ & $1$ & $N$ \\ \hline AMIS & $KJ$ & $KJ^2$ & $1$ & $J$ \\ \hline GAPIS & $KNJ$ & $KN^2J$ & $1$ & $N$ \\ \hline APIS & $KNJ$ & $KN^2J$ & $1$ & $N$\\ \hline \end{tabular} } \label{table_computational} \end{center} \end{table} \section*{Acknowledgements} V.E. acknowledges support from the \emph{Agence Nationale de la Recherche} of France under PISCES project (ANR-17-CE40-0031-01). \bibliographystyle{abbrvnat}
\section{Introduction} \label{sect1} Gamma-ray bursts \citep[GRBs,][]{klebesadel} are typically divided into {\it short}, coming from double neutron star (NS-NS) or NS-black hole (BH) mergers \citep{nakar07,berger11}, and {\it long} ones, whose progenitors are the collapse of massive stars, e.g. Wolf-Rayet or blue supergiants \citep{woosley06,cano17}. The division between the two classes is primarily based on the bimodal distribution of $T_{90}$ \citep[time during which 90\% of the GRB's fluence is accumulated;][]{kouveliotou93}, and the threshold is at $T_{90}\simeq 2\,{\rm s}$ (but cf. \citealt{bromberg13,tarnopolski15a}). GRBs exhibit a rich variety of light curve (LC) shapes \citep{fishman94}, which implies complicated mechanisms governing their radiation. The LCs usually exhibit a power law (PL; $P(f)\propto 1/f^\beta$) power spectral density (PSD), with or without a break, and on rare occasions a sign of a quasiperiodic oscillation (QPO) was noted. The first confirmed QPO in a GRB was found in the 5 March 1979 event \citep{barat79,terrell80}, in which an unambiguous $\sim$8~s periodicity (lasting for $\sim$20 cycles) followed a 0.2~s outburst. However, subsequent analyses \citep{norris91,fenimore96} suggested that this transient was actually a soft gamma repeater (SGR). Shortly later, a 4.2~s periodicity was reported in a 29 October 1977 event during about 30~s of its duration \citep{wood81}, while \citet{kouveliotou88} identified 7 cycles of a 2.2~s quasiperiodicity in a long (43~s), hard (extending to 100\,MeV) GRB observed on 5 August 1984. \citet{schaefer88} examined the significance of periods (in the range 2--18~s) claimed for 16 GRBs at that time. They confirmed only the $\sim$8~s periodicity in the 5 March 1979 event. Subsequently, a period of 2.2~s was identified in an 11 May 1988 event \citep{owens90}. GRB 090709A gained attention when a QPO with a period of $\sim$8~s was reported based on Swift, Konus, Suzaku, and INTEGRAL observations \citep{markwardt09,golenetskii09,gotz09,ohno09}. However, subsequent analyses of the Swift and INTEGRAL \citep{deluca10}, and Swift and Suzaku data \citep{cenko10} did not confirm it on a 3$\sigma$ significance level, but another reanalysis of the Suzaku LC revealed a 3$\sigma$-significant QPO \citep{iwakiri10}. Likewise it was found that the Swift LC actually exhibits a 3.5$\sigma$ significance for the QPO \citep{ziaeepour11}. Again, like in the 5 March 1979 event, such a periodicity might hint at an SGR nature of the source, however in this case all other properties ensure its GRB origin. The presumed QPO was speculated to be caused by magnetorotational instabilities (MRI) in a hyperaccreting disk \citep{masada07}, or originate due to a precessing magnetic field \citep{ziaeepour11}. While an unambiguous conclusion about this QPO has apparently not been reached, the possibility of such modulations in the prompt emission of GRBs is fascinating. Moreover, \citet{beskin10} discovered the first periodic pulsations in the optical prompt emission of GRB 080319B, at a period of 8.1~s. The presumed (quasi)periodic nature ought to be taken with caution, though, since the detected period corresponds to only four peaks in the LC. First searches for high-frequency QPOs were unsuccesful \citep{deng97,kruger02}, but \citet{zhilyaev09} employed a wavelet-based approach to short BATSE GRBs, which yielded a QPO with a leading period of 5.5~ms in one case (trigger number 207), and a few chirping signals as well. NS-BH mergers are indeed expected to give rise to jet precession triggering the QPO modulation \citep{stone13}. However, a subsequent canonical search for QPO features in PSDs detected no significant signals \citep{dichiara13b}. When it comes to the overall shape of the PSD, \citet{belli92} observed PL ($1\lesssim\beta\lesssim 2$) or Lorentzian (i.e., indicative of an autoregressive process of order 1, i.e. AR(1)) forms in case of 5 long Konus GRBs. \citet{giblin98} examined 100 GRBs by computing their PSDs and fitting a PL. They obtained a wide range of $\beta$, extending up to $\beta\approx 7$, with 65\% of the cases exceeding the red noise value, i.e. $\beta>2$. \citet{beloborodov98}, in turn, constructed the average PSD of 214 certainly long GRBs ($T_{90}>20\,{\rm s}$), hence considered the LCs as random realizations of the same underlying stochastic process, and concluded that the obtained $\beta\simeq\nicefrac{5}{3}$ is consistent with a fully developed turbulence\footnote{Through Parseval's theorem, the energy at frequency $f$ can be expressed as the Fourier transform of the signal, and the wavenumber $k\propto f$. Hence it follows that for turbulence the PSD has an exponent of $\nicefrac{5}{3}$ \citep[cf.][]{moraghan15}.}, arising in the internal shock model that likely governs the observed variability. A subsequent analysis with a bigger sample of 514 GRBs confirmed the Kolmogorov's $\nicefrac{5}{3}$ law for the average PSD \citep{beloborodov2000}, and showed that dim bursts exhibit steeper PSDs \citep[cf.][]{ryde03,rong03}. Also, in lower energy chanels the PSDs are steeper than at higher energies. \citet{panaitescu99}, on the other hand, modeled the PSD based on the internal shock model, and found that the $\nicefrac{5}{3}$ law can be explained by invoking modulation of the relativistic winds instead of turbulence. \citet{pozanenko2000} computed the average PSD of 815 long GRBs and fitted it with a PL and an exponential PL with $\beta\in(\nicefrac{4}{3},\nicefrac{5}{3})$, again roughly indicative of the Kolmogorov law. \citet{chang2000} simulated GRB LCs as a sum of fast-rise-exponential-decay (FRED) pulses, and demonstrated that by adjusting the sampling, rise and decay time scales, the $\nicefrac{5}{3}$ law can be recovered. With a Swift sample of GRBs with redshifts, \citet{guidorzi12} found that the $\nicefrac{5}{3}$ law holds in the rest frame as well (roughly, as $\beta\lesssim 2$ depending on the subsample---for higher redshifts the PSD becomes shallower), and identified a break in the smoothly broken PL at time scales $\sim$30~s. \citet{dichiara13a} arrived at similar results for GRBs observed with BeppoSAX and Fermi, with a break at $\sim 15-25$~s, depending on the energy channel. The consistency and persistence of the average PSD index of $\nicefrac{5}{3}$ among different data sets, corresponding to different energy bands, instrument sensitivities etc., strongly suggest that indeed the collection of GRBs shall be treated as an ensemble, and that each LC is a stochastic realization of the same underlying emission mechanism (though possibly generated by values of parameters different from burst to burst, owing to, e.g., different magnetization degrees). \citet{guidorzi16} analyzed the individual PSDs of Swift GRBs, finding that they can be divided into two classes: with and without a break. The overall span of the PL index fell into $1.2\lesssim\beta\lesssim 4$, while the break time scales spanned the range $\sim 1-180$~s, with a logarithmic average of 25~s. They also found marginal evidence (barely touching the 3$\sigma$ level) for QPOs in three cases. Finally, \citet{dichiara16} found a statistically significant anticorrelation between the rest-frame peak energy, $E_{\rm peak}^{\rm rest}$, and the PSD index $\beta$, adding to the long list of correlations between various parameters of the prompt and afterglow phases \citep{shahmoradi15,dainotti17,dainotti18a,dainotti18b}. The $E_{\rm peak}^{\rm rest}-\beta$ relation was discussed on grounds of a few prompt emission models, explaining the overall anticorrelation by invoking the bulk Lorentz factor, $\Gamma$, as the key observable connecting the two quantities. The distribution of the break time scales spanned the range $\sim 1-140$~s, with a logarithmic mean of 20~s. \citet{boci18} suggested that the $E_{\rm peak}^{\rm rest}-\beta$ relation might be a consequence of the peak energy--luminosity and duration--luminosity relations. \citet{zhang14} simulated several LCs within the Internal-Collision-induced MAgnetic Reconnection and Turbulence (ICMART) model, with moderately high magnetization of the ejected shells. It was found that for various reasonable parameter values, the resulting PSDs were generally consistent with the PL forms of Swift GRBs. In particular, $1\lesssim\beta\lesssim 2$ for the assumed range of ratio of the mini-jets and $\Gamma$ factors (although for some particular parameters, occasionally steeper PSDs were also arrived at). Additionally, spikier LCs (more variable on shorter time scales) yielded shallower PSDs. The Hurst exponent, $H$ (a measure of persistence, or self-similarity of a time series), was shown to be able to differentiate between short and long GRBs \citep{maclachlan13}, especially when coupled with other characteristics, like duration $T_{90}$ and minimum variability time scale \citep[MVTS;][]{tarnopolski15c}. $H$ is constrained to the interval $(0,1)$, and is applicable to both stationary and nonstationary time series, hence is able to provide a universal classification of GRBs. Such a classification, based predominantly on their LCs, was notoriously difficult due to the diverse morphology. Recently, \citet{jespersen20} applied a machine learning dimensionality reduction algorithm, t-distributed stochastic neighborhood embedding (t-SNE) to Swift GRBs. t-SNE groups similar LCs close together, based on which it was demonstrated that as a result two prominent clusters emerged, each corresponding to the short and long subclasses, respectively. This appears to resolve the issue whether there are two or three main GRB types \citep{horvath02,horvath08,tarnopolski16a,horvath19,toth19,tarnopolski19a,tarnopolski19b,tarnopolski19c}. The goal of this paper is a possibly comprehensive analysis of PSDs of a big sample of GRBs from the Swift catalog, with a particular aim to identify QPOs. In addition, the LCs are investigated directly in the time domain with the Hurst exponent, and the recently developed $\mathcal{A}-\mathcal{T}$ plane, which was proven to be capable to classify blazar subtypes based solely on the LCs \citep{tarnopolski20b}. In Sect.~\ref{sect2} the description of the utilized GRB sample is given, and the outline of the employed analysis methods is provided. In Sect.~\ref{sect3} the results are presented, and Sect.~\ref{sect4} is devoted to discussion. Concluding remarks are gathered in Sect.~\ref{sect5}. \section{Data and methods} \label{sect2} Description of the sample is given first. The employed methods are then briefly described. For a more detailed explanation, as well as the results of a comprehensive benchmark testing of each method, we refer the reader to \citet{tarnopolski20b}. \subsection{Sample} \label{sect2.1} The mask-weighted, background-subtracted LCs, in a 64-ms binning and covering the total energy range $15-350$~keV, were downloaded from the Swift/BAT catalog\footnote{\url{https://swift.gsfc.nasa.gov/results/batgrbcat/}} \citep{lien16}. The portions of the LCs within respetive $T_{100}$ intervals were extracted. We focus on long GRBs with sufficient number of points to conduct a meaningful time series and PSD analysis. We therefore utilized LCs with more than 50 points\footnote{This is a requirement of the software \textsc{wavepal} used for the wavelet scalograms; cf. Sect.~\ref{sect2.3}.}, i.e. with $T_{100} > 3.2\,{\rm s}$. We excluded confirmed short GRBs with extended emission.\footnote{\url{https://swift.gsfc.nasa.gov/results/batgrbcat/summary_cflux/summary_GRBlist/GRBlist_short_GRB_with_EE.txt}} We ended with 1160 GRBs in our sample. \subsection{PSDs} \label{sect2.2} \subsubsection{Lomb-Scargle periodogram} To calculate the PSD of a time series $\{x_k(t_k)\}_{k=1}^n$ with a constant time interval between consecutive observations, $\delta t = t_{k+1} - t_k \equiv 64\,{\rm ms}$, the Lomb-Scargle periodogram \citep[LSP; ][]{lomb,scargle,vanderplas18} is computed in the standard way as \begin{equation} \begin{split} P_{LS}(\omega) = \frac{1}{2\sigma^2} &\left[ \frac{\left(\sum\limits_{k=1}^n (x_k-\bar{x}) \cos[\omega(t_k-\mathscr{T})]\right)^2}{\sum\limits_{k=1}^n \cos^2[\omega(t_k-\mathscr{T})]} \right. \\ +& \left. \frac{\left(\sum\limits_{k=1}^n (x_k-\bar{x}) \sin[\omega(t_k-\mathscr{T})]\right)^2}{\sum\limits_{k=1}^n \sin^2[\omega(t_k-\mathscr{T})]} \right], \end{split} \label{eq1} \end{equation} where $\omega = 2\pi f$ is the angular frequency, $\mathscr{T}\equiv\mathscr{T}(\omega)$ is \begin{equation} \mathscr{T}(\omega)=\frac{1}{2\omega} \arctan \left[ \frac{\sum\limits_{k=1}^n\sin(2\omega t_k)}{\sum\limits_{k=1}^n\cos(2\omega t_k)} \right], \label{eq2} \end{equation} and $\bar{x}$ and $\sigma^2$ are the sample mean and variance. The lower limit for the sampled frequencies is $f_{\rm min} = 1/(t_{\rm max}-t_{\rm min})$, corresponding to the length of the time series. Since we are dealing with uniformly sampled data, the upper limit is the Nyquist frequency, $f_{\rm max}\equiv f_{\rm Nyq} = \frac{1}{2\delta t}$. The total number of sampled frequencies is \begin{equation} N_P = n_0\frac{f_{\rm max}}{f_{\rm min}}, \label{eq3} \end{equation} and we employ $n_0 = 100$ hereinafter. \subsubsection{Binning and fitting} For fitting in the log-log space, binning is applied. The values of $\log f$ are binned into approximately equal-width bins, with at least two points in a bin, and the representative frequencies are computed as the geometric mean in each bin. The PSD value in a bin is taken as the arithmetic mean of the logarithms of the PSD \citep{papadakis93,isobe15}. We require the binned PSDs to consist of at least seven points for the fitting, which left us with 1150 GRBs suitable for the PSD analysis. The following models were fitted to the binned LSPs: \begin{enumerate} \item pure power law (PL): \begin{equation} P(f) = P_{\rm norm}f^{-\beta}, \label{eq4} \end{equation} \item PL plus Poisson noise (PLC): \begin{equation} P(f) = P_{\rm norm}f^{-\beta} + C, \label{eq5} \end{equation} \item smoothly broken PL \citep[SBPL;][]{mchardy2004} plus Poisson noise: \begin{equation} P(f) = \frac{P_{\rm norm}f^{-\beta_1}}{1 + \left( \frac{f}{f_{\rm break}}\right)^{\beta_2-\beta_1}} + C, \label{eq6} \end{equation} \item SBPL plus Poisson noise, with a fixed $\beta_1=0$:\footnote{When $\beta_2=2$, this is a Lorentzian (plus Poisson noise), i.e. a PSD of an AR(1) process. } \begin{equation} P(f) = \frac{P_{\rm norm}}{1 + \left( \frac{f}{f_{\rm break}}\right)^{\beta_2}} + C, \label{eq6a} \end{equation} \end{enumerate} where the parameter $C$ is an estimate of the Poisson noise level coming from the uncertainties of individual measurements (see further in this Section), $\beta$ is the PL index, $f_{\rm break}$ is the break frequency (from which the break time scale is calculated as $T_{\rm break}=1/f_{\rm break}$), and $\beta_1,\,\beta_2$ are the low- and high-frequency indices, respectively. PL is a case of PLC with $C=0$. The reason for considering them separately is that the PLC model degenerates when $\beta_{PLC}\rightarrow 0$, since $P(f)\rightarrow P_{\rm norm}+C=\rm{const.}$ then, and hence fitting a pure PL diminishes the parameter uncertainties (cf. \citealt{zywucka20}). Similarly, SBPL was found to often take advantage of the degree of freedom provided by the possibility to vary $\beta_1$, and led to overfitting, hence the two variants of the SBPL were considered separately as well. For completeness, an SBPL with $\beta_1=\beta_2$ reduces to a PLC. Fits of different models were compared using the small sample Akaike information criterion ($AIC_c$) given by \begin{equation} AIC_c=2p-2\mathcal{L}+\frac{2(p+1)(p+2)}{N-p-2}, \label{} \end{equation} where $\mathcal{L}$ is the log-likelihood, $p$ is the number of parameters, and $N$ is the number of points fitted to \citep{akaike74,hurvich89,burnham04}. For a regression problem, \begin{equation} \mathcal{L} = -\frac{1}{2}N\ln\frac{{\rm RSS}}{N}, \label{} \end{equation} where RSS is the residual sum of squares; $p$ is an implicit variable in $\mathcal{L}$. A preferred model is one that minimizes $AIC_c$. This criterion is a trade-off between the goodness of fit and the complexity of the model, expressed via the number of parameters $p$. What is essential in assesing the relative goodness of a fit in the $AIC_c$ method is the difference, $\Delta_i=AIC_{c,i}-AIC_{c,\rm min}$, between the $AIC_c$ of the $i$th model and the one with the minimal $AIC_c$. If $\Delta_i<2$, then there is substantial support for the $i$th model (or the evidence against it is worth only a bare mention), and the proposition that it is a proper description is highly probable. If $2<\Delta_i<4$, then there is strong support for the $i$th model. When $4<\Delta_i<7$, there is considerably less support, and models with $\Delta_i>10$ have essentially no support. The MVTS, $\tau$, is defined herein as the time scale (corresponding to a frequency $f_0 = 1/\tau$) at which the Poisson noise level dominates over the PL/SBPL component. E.g., for the PLC case it is obtained by solving the equation $P_{\rm norm}f_0^{-\beta} = C$, and similarly for the SBPL case (which, however, does not yield a closed-form solution, hence is obtained numerically). The standard errors of $f_0$ are estimated via bootstrapping: 1000 random realizations of the best-fit PSD were generated by varying the parameters within their uncertainties, and the standard deviation of the resulting sample was calculated. We record only cases with $\Delta\tau<\tau$. The Poisson noise level, coming from the statistical noise due to uncertainties in the LC's observations, $\Delta x_k$, is the mean squared error, with a normalization suitable for LSP: \begin{equation} P_{\rm Poisson} = \frac{1}{2\sigma^2 n} \sum\limits_{k=1}^n \Delta x_k^2. \label{eq6b} \end{equation} \subsection{QPOs} \label{sect2.3} To search for QPOs, we employ the wavelet scalogram. A wavelet $\psi(t)$ is a wave packet, i.e. its location and instantaneous frequency are well constrained. We use the Morlet wavelet hereinafter, \begin{equation} \psi(t) = \frac{1}{\pi^{1/4}} \left[\exp{\left( \textrm{i}\omega_0 t \right)} - \exp{\left( -\frac{\omega_0^2}{2} \right)}\right] \exp{\left(-\frac{t^2}{2}\right)}, \label{eqMorlet} \end{equation} with $\omega_0=10-20$ to ensure a good frequency resolution. The mother wavelet gives rise to the dictionary, or child wavelets, $\psi_{s,l}(t)$, into which the analyzed signal is decomposed: $x(t)=\sum_{s,l}W(s,l)\psi_{s,l}(t)$. The coefficients of such a decomposition, $W(s,l)$, depend on the location, $l\in\mathbb{R}$, and the scale, $s\in\mathbb{R}_+$. The scalogram therefore allows not only to identify the frequency, but localize it within the time series in the temporal domain as well, and visualize it in the time-frequency space. For this purpose, we utilize the method implemented in the package \textsc{wavepal}\footnote{\url{https://github.com/guillaumelenoir/WAVEPAL}} \citep{lenoir18a,lenoir18b}. To test the significance of the detected features, they are tested against a continuous-time autoregressive moving average (CARMA) stochastic model \citep{kelly14}. This is a more general family of noise than the easily tested white noise, or commonly considered colored noise. We aim to detect QPOs at the level of at least $3\sigma$ (99.73\% confidence level). \subsection{Hurst exponents} \label{sect2.4} The Hurst exponent $H$ measures the statistical self-similarity of a time series $x(t)$. It is said that $x(t)$ is self-similar (or self-affine) if it satisfies \begin{equation} x(t)\stackrel{\textbf{\textrm{.}}}{=}\lambda^{-H}x(\lambda t), \label{eq7} \end{equation} where $\lambda>0$ and $\stackrel{\textbf{\textrm{.}}}{=}$ denotes equality in distribution. The meaning of $H$ can be understood as follows: for a persistent stochastic process, if some measured quantity grows on average (over some time periods), the system prefers to maintain their growth. The process is, however, probabilistic, and hence at some point the observed quantity will eventually start to decrease (on average). But the process still has long-term memory (which is a global feature), therefore it prefers to decrease for some time until the transition occurs randomly again. In other words, the process prefers to sustain its most recent behavior (in a statistical sense). In case of $H<0.5$, the process is anti-persistent, and it possesses short-term memory, meaning that the observed values frequently switch from relatively high to relatively low (with respect to a stationary mean), and there is no preference among the increments. This is a so-called mean-reverting process. A PSD in form of a PL is indicative of a self-similar process. There is a (piecewise) linear relation between $H$ and the index $\beta$ of a PL PSD: $H=(\beta + 1)/2$ for $\beta\in(-1,1)$, and $H=(\beta - 1)/2$ for $\beta\in(1,3)$, with $\beta=0$ (white noise) and $\beta=2$ (red noise) both yielding $H=0.5$. The case $\beta=1$ (pink noise) is at the border, with no precise $H$ value assigned. We utilize three algorithms\footnote{The \textsc{Mathematica} implementations are available at \url{https://github.com/mariusz-tarnopolski/Hurst-exponent-and-A-T-plane}.} for extracting $H$: the detrended fluctuation analysis (DFA), and two wavelet-based methods: the discrete wavelet transform (DWT) with the Haar wavelet as the basis, and the averaged wavelet coefficient (AWC) method. \subsubsection{Detrended fluctuation analysis---DFA} \label{sect2.4.1} In the DFA algorithm \citep{peng94,peng95} one starts with calculating the accumulative sum \begin{equation} X(t) = \sum\limits_{k=1}^t \big( x_k-\bar{x} \big), \label{eq8} \end{equation} which is next partitioned into non-overlapping segments of length $\varsigma$ each. In each segment, the corresponding part of the time series $X(t)$ is replaced with its linear fit, resulting in a piecewise-linear approximation of the whole $X(t)$, denoted by $X_{\rm lin}(t;\varsigma)$. The fluctuation as a function of the segment length $\varsigma$ is defined as \begin{equation} F(\varsigma) = \left[\frac{1}{N}\sum\limits_{t=1}^N \left(X(t)-X_{\rm lin}(t;\varsigma)\right)^2\right]^{\nicefrac{1}{2}}. \label{eq9} \end{equation} The slope $a$ of the linear regression of $\log F(\varsigma)$ versus $\log\varsigma$ is an estimate for $H$: $H=a$ if $a\in(0,1)$, and $H=a-1$ if $a\in(1,2)$. \subsubsection{Averaged wavelet coefficient---AWC} \label{sect2.4.2} The AWC method \citep{simonsen98} relies directly on the scaling in Eq.~(\ref{eq7}) and employs the continuous wavelet transform, which leads to \begin{equation} W(\lambda s, \lambda l) = \lambda^{H+1/2} W(s,l). \label{eq10} \end{equation} The AWC is defined as the standard arithmetic mean over the locations $l$ at a given scale $s$: \begin{equation} W(s) = \braket{\left| W(s,l) \right|}_l. \label{eq11} \end{equation} By a linear regression of $\log W(s)$ vs. $\log s$, an estimate of $H$ can be obtained from the slope $a$ via $H=a-\nicefrac{1}{2}$ if $a\in(\nicefrac{1}{2},\nicefrac{3}{2})$, and $H=a+\nicefrac{1}{2}$ if $a\in(-\nicefrac{1}{2},\nicefrac{1}{2})$. \subsubsection{Discrete wavelet transform---DWT} \label{sect2.4.3} $H$ can be obtained with the DWT using, e.g., the Haar wavelet as the basis \citep{veitch99,knight17}. The relation between the variance of the wavelet transform coefficients $d_{j,k}$ (where $2^j$ corresponds to the scale $s$, and $k\cdot 2^j$ to the location $l$) and the scale $j$ can be written as \begin{equation} \log_2 {\rm var}(d_{j,k})=a\cdot j+{\rm const.} \label{eq12} \end{equation} The slope $a$ is obtained by fitting a line to the linear part of the $\log_2 {\rm var}(d_{j,k})$ vs. $j$ relation, and $H$ is obtained as $H=(a-1)/2$ when $a\in (1,3)$, and $H=(a+1)/2$ when $a\in (-1,1)$. \subsection{The $\mathcal{A}-\mathcal{T}$ plane} \label{sect2.5} The $\mathcal{A-T}$ plane was initially designed to provide a fast and simple estimate of the Hurst exponent \citep{tarnopolski16d}. It is also well suited to differentiate between types of colored noise, Eq.~(\ref{eq4}), characterized by different PL indices $\beta$ \citep{zunino17}, and to discriminate between regular and chaotic dynamics \citep{zhao18}. It comprises of the fraction of turning points, $\mathcal{T}$, and the Abbe value, $\mathcal{A}$. \subsubsection{Turning points} Consider three consecutive data points, $x_{k-1},x_k,x_{k+1}$. They can be arranged in six ways; in four of them, they will create a peak or a trough, i.e., a turning point \citep{kendall,brockwell}. The probability of finding a turning point in such a subset is hence $\nicefrac{2}{3}$. Let $\mathcal{T}$ denote the fraction of turning points in a time series comprised of $n$ points. Therefore $\mathcal{T}\in[0,1]$, and is asymptotically equal to $\nicefrac{2}{3}$ for a purely uncorrelated time series (white noise). A process with $\mathcal{T}>\nicefrac{2}{3}$ (i.e., with raggedness exceeding that of a white noise) will be more noisy than white noise. Similarly, a process with $\mathcal{T}<\nicefrac{2}{3}$ will be ragged less than white noise. All of these cases can be realized for various stochastic processes (e.g., PL or autoregressive moving average) as well as real-world instances \citep{bandt07,tarnopolski19d}. \subsubsection{Abbe value} The Abbe value is defined as half the ratio of the mean-square successive difference to the variance \citep{neumann,neumann2,kendall1971}: \begin{equation} \mathcal{A} = \frac{\frac{1}{n-1}\sum\limits_{i=1}^{n-1}\left( x_{i+1}-x_i \right)^2}{\frac{2}{n}\sum\limits_{i=1}^n\left( x_i-\bar{x} \right)^2}\equiv \frac{1}{2} \frac{{\rm var}\left( dX \right)}{{\rm var}\left( X \right)}, \label{eq13} \end{equation} where $dX$ denotes the increments (consecutive differences) of process $X$. $\mathcal{A}$ quantifies the smoothness (raggedness) of a time series by comparing the sum of the squared differences between two successive measurements (the variance of the differenced process $dX$) with the variance of the whole time series $X$. It approaches zero for time series displaying a high degree of smoothness, while the normalization factor ensures that $\mathcal{A}$ tends to unity for a white noise process \citep{williams}. In astronomy it has been rarely utilized, with some recent, nonextensive examples (\citealt{Shin09,mowlavi,sokolovsky16,perez17}; but see also \citealt{lafler65}). In particular, it was demonstrated that blazar subclasses, observed in $\gamma$-rays, are separated in the $\mathcal{A}-\mathcal{T}$ plane \citep{tarnopolski20b}, as are optically observed blazar candidates \citep{zywucka20} behind the Magellanic Clouds \citep{zywucka18}. In Figure~\ref{fig_AT} the locations in the $\mathcal{A}-\mathcal{T}$ plane of PL processes are shown, as well as PLC ones. In effect of introducing Poisson noise $C$, the location $(\mathcal{A},\mathcal{T})$ of the otherwise PL-type signal is being dragged closer to the point $(1,\nicefrac{2}{3})$ corresponding to white noise. Therefore, the region of availability of time series with PSDs of the PLC type is two-dimensional (bounded from below by the PL limit, and from above by the line $\mathcal{T}=\nicefrac{2}{3}$), allowing for nontrivial relations between $\mathcal{A}$ and $\mathcal{T}$. \begin{figure} \centering \includegraphics[width=\columnwidth]{ThePlot3.pdf} \caption{Locations in the $\mathcal{A-T}$ plane of the PL plus Poisson noise PSDs of the form $P(f)\propto 1/f^\beta+C$, with $\beta\in\{0,0.1,\ldots,3\}$. For each PSD, 100 realizations of the time series were generated, and the displayed points are the mean locations of them. The error bars depict the standard deviation of $\mathcal{A}$ and $\mathcal{T}$ over these 100 realizations. The case $\beta=0$ is a pure white noise, with $(\mathcal{A},\mathcal{T})=(1,\nicefrac{2}{3})$. The generic PL case ($C=0$) is the lowest curve (red); with an increasing level of the Poisson noise $C$, the curves are raised and shortened, as the white noise component starts to dominate over the PL part.} \label{fig_AT} \end{figure} \subsubsection{Coarse graining} The so-called coarse-grained sequences are calculated according to \citet{zunino17}. They are obtained by dividing the set $\{x_k\}$ into nonoverlapping segments of length $d$, and each segment is averaged, resulting in smoothed sequences $\{y_j^d\}$: \begin{equation} y_j^d = \sum\limits_{k=(j-1)d + 1}^{jd} x_k \label{eq60} \end{equation} for $j\in\{1,\ldots,\lfloor n/d\rfloor \}$. The $\mathcal{A}-\mathcal{T}$ plane, constructed as a function of the temporal scale factor $d$, allows to investigate various temporal resolutions given only one realization of the process, i.e., an LC in only one binning (preferably a small one). This approach was applied to a periodically driven thermostat \citep{zhao18}, and shown to successfully differentiate between regular, chaotic and stochastic realizations of time series. However, very long time series, with $n=200,000$, were utilized to demonstrate such phenomenon. \section{Results} \label{sect3} The results are discussed in the following Sections. Table~\ref{tbl1} describes the contents of the accompanying online-only file containing all results. \begin{table*} \caption{Contents of the table with time series and PSD properties of the GRBs.} \label{tbl1} \centering \begin{tabular}{clll} \hline\hline Column & Column name & Symbol & Description \\ \hline 1 & \texttt{Number} & Number & Consecutive number of the GRB in the sample (reverse chronological order) \\ 2 & \texttt{GRB} & GRB name & Identifying name of the GRB, according to the Swift catalog \\ 3 & \texttt{T90} & $T_{90}$ & Duration of the GRB, in seconds \\ 4 & \texttt{betaPL} & $\beta_{PL}$ & Exponent $\beta$ of the pure PL fit \\ 5 & \texttt{e\_betaPL} & $\Delta\beta_{PL}$ & Uncertainty of the exponent $\beta$ of the pure PL fit \\ 6 & \texttt{betaPLC} & $\beta_{PLC}$ & Exponent $\beta$ of the PL plus Poisson noise (PLC) fit \\ 7 & \texttt{e\_betaPLC} & $\Delta\beta_{PLC}$ & Uncertainty of the exponent $\beta$ of the PL plus Poisson noise (PLC) fit \\ 8 & \texttt{beta1SBPL} & $\beta_{1}$ & Low-frequency exponent $\beta_1$ of the SBPL fit \\ 9 & \texttt{e\_beta1SBPL} & $\Delta\beta_{1}$ & Uncertainty of the low-frequency exponent $\beta_1$ of the SBPL fit \\ 10 & \texttt{beta2SBPL} & $\beta_{2}$ & High-frequency exponent $\beta_2$ of the SBPL fit \\ 11 & \texttt{e\_beta2SBPL} & $\Delta\beta_{2}$ & Uncertainty of the high-frequency exponent $\beta_2$ of the SBPL fit \\ 12 & \texttt{Tbreak} & $T_{\rm break}$ & Break time scale of the SBPL fit, in seconds \\ 13 & \texttt{e\_Tbreak} & $\Delta T_{\rm break}$ & Uncertainty of the break time scale of the SBPL fit, in seconds \\ 14 & \texttt{MVTS} & $\tau$ & Minimum variability time scale, in seconds \\ 15 & \texttt{e\_MVTS} & $\Delta\tau$ & Uncertainty of the minimum variability time scale, in seconds \\ 16 & \texttt{H} & $H$ & Hurst exponent \\ 17 & \texttt{e\_H} & $\Delta H$ & Uncertainty of the Hurst exponent \\ 18 & \texttt{HPL} & $H_{PL}$ & Hurst exponent inferred from the index $\beta_{PL}$ \\ 19 & \texttt{e\_HPL} & $\Delta H_{PL}$ & Uncertainty of the Hurst exponent inferred from the index $\beta_{PL}$ \\ 20 & \texttt{z} & $z$ & Redshift \\ 21 & \texttt{Epeak} & $E_{\rm peak}$ & Peak energy of the spectral model, in keV \\ 22 & \texttt{e\_Epeak} & $\Delta E_{\rm peak}$ & Uncertainty of the peak energy of the spectral model, in keV \\ 23 & \texttt{logLiso} & $\log L_{\rm iso}$ & Logarithm of the peak isotropic luminosity ( $L_{\rm iso}$ in ${\rm erg}\,{\rm s}^{-1}$)\\ 24 & \texttt{e\_logLiso} & $\Delta\log L_{\rm iso}$ & Uncertainty of the logarithm of the peak isotropic luminosity\\ \hline \end{tabular} \tablecomments{This table is available in its entirety in machine-readable form.} \end{table*} \subsection{PSDs} \label{sect3.1} We were able to obtain meaningful fits of Eqs.~(\ref{eq4})--(\ref{eq6a}) to the PSDs of 1132 GRBs. The best fit was chosen based on the $AIC_c$. As a result, 207 PSDs were modeled best by a pure PL, 548 by a PLC, and 377 yielded SBPL (among which 277 had fixed $\beta_1=0$). 831 MVTS with $\Delta\tau<\tau$ were recorded among the PLC and SBPL cases. Exemplary fits are shown in Fig.~\ref{fig0}. The distributions of the $\beta$, $\beta_1$, $\beta_2$ indices, time scales $\tau$ and $T_{\rm break}$, as well as the scatter plots illustrating the relations between the SBPL parameters, are displayed in Fig.~\ref{fig1}. When the PL model is considered, many GRBs exhibit flat PSDs, $|\beta_{PL}|\lesssim 0.5$, i.e. closely resembling white noise (Fig.~\ref{fig1}(a)), owing to the weakness of the burst and significant Poisson noise contamination. The values extend to $\beta_{PL}\sim 2$, while $\beta_{PLC}$ concentrates around $\beta_{PLC}\sim 2$, with the bulk of it spanning the range $\sim$1--6 (Fig.~\ref{fig1}(b)). In the SBPL model, the indices mostly concentrate around $\beta_{1}\sim 0$ and $\beta_{2}\sim 3$, although there are heavy tails in both distributions, extending to $\beta_{1}<-2$ and $\beta_{2}>8$ (Fig.~\ref{fig1}(d) and (e)). Very steep PSDs (i.e., with high value of $\beta_{2}$) essentially imply no variability on the associated timescales, because the power drops drastically from the conventional PL at lower frequencies to the Poisson noise level at higher frequencies. This means that in these instances there is a sharp cut-off at $T_{\rm break}$ below which variability on shorter timescales is wiped out (excluding the region of Poisson noise domination). A prominent turnover (i.e., $\beta_{1}$ being very negative) sometimes leads to QPO-like features as in Fig.~\ref{fig0}(d). Often it is a break incorporating just a handful of points in the binned PSD, though. The break time scale $T_{\rm break}$ falls mostly in the range 1--100~s, about an order of magnitude greater than the MVTS (Fig.~\ref{fig1}(c) and (f)). There are moderate or weak correlations between the parameters of the SBPL model (i.e., $\beta_{1}$, $\beta_{2}$, and $T_{\rm break}$; Fig.~\ref{fig1}(g)--(k)). \begin{figure*} \centering \includegraphics[width=0.49\textwidth]{544.pdf} \includegraphics[width=0.49\textwidth]{701.pdf}\\ \includegraphics[width=0.49\textwidth]{1141.pdf} \includegraphics[width=0.49\textwidth]{34.pdf} \caption{Representative PSD forms. (a) GRB 130907A exhibits a pure PL; (b) GRB 120116A---PLC; (c) GRB 070318---SBPL; (d) GRB 190821A---a PSD dominated by a QPO shape. The horizontal gray dashed lines mark the Poisson noise levels inferred from the measurements' errors. The vertical solid lines denote $f_0$: blue---PLC; red---SBPL; black---SBPL with fixed $\beta_1=0$. Vertical dashed lines mark $f_{\rm break}$ of: red---SBPL; black---SBPL with fixed $\beta_1=0$. Widths of the shaded regions symbolize the standard errors of $f_0$ and $f_{\rm break}$. } \label{fig0} \end{figure*} \begin{figure*} \centering \includegraphics[width=\textwidth]{hist_beta.pdf} \caption{Histograms of the $\beta$ indices of the (a) PL and (b) PLC, (c) the MVTS ($>64\,{\rm ms}$) of all applicable cases, the (d) low- and (e) high-frequency indices of the SBPL model, and (f) the break time scales of the SBPL model. The relations between SBPL parameters: (g) $\beta_1-\beta_2$, and $T_{\rm break}$ vs. (h) $\beta_1$ and (i) $\beta_2$. Vertical dashed lines in panels (g) and (h) highlight the regions within which correlation coefficients were calculated; (j) and (k) are the magnifications of the indicated regions. The correlation coefficients and 95\% confidence intervals (CIs) within the regions are (i) $r=-0.26$ (95\% CI: $(-0.35,-0.16)$), (j) $r=0.48$ (95\% CI: $(0.26,0.65)$), and (k) $r=0.12$ (95\% CI: $(-0.13,0.36)$).} \label{fig1} \end{figure*} It should be emphasized that the Poisson noise levels $C$ obtained by fitting Eqs.~(\ref{eq5})--(\ref{eq6a}) are extremely well correlated ($r=0.98$; 95\% CI: $(0.977,0.982)$) with the estimates inferred from the LC uncertainties via Eq.~(\ref{eq6b}). This means that the statistical fluctuations are the predominant origin of MVTS in the Swift sample, and hence it does not carry physical interpretation regarding the GRB progenitors. In other words, MVTS is the time scale above which the actual signal present in the GRB breaks above the (background or instrumental) noise level. \subsection{QPOs} \label{sect3.2} We searched for QPOs with leading periods $T<T_{100}/3$, i.e. with at least three cycles within the LC. A significance $>3\sigma$ was required, and a visual inspection of the LCs was also done to check for spurious modulations and to ascertain the persistence of the detected phenomenon. We identified 24 QPO candidates with at least one well defined leading period, summarized in Table~\ref{tbl2}. Additionally, in 10 cases we observed a chirping signal, i.e. the leading period evolving in time. In cases when the frequency increases (period decreases) it is called an up-chirp. Similarly, when the frequency decreases (period increases) one encounters a down-chirp. \begin{deluxetable*}{clcl} \tabletypesize{\footnotesize} \tablecolumns{4} \tablewidth{0pt} \tablecaption{ Identified QPOs. \label{tbl2}} \tablehead{ \colhead{Number} & \colhead{GRB name} & \colhead{Period (sec)} & \colhead{Comment} } \startdata 6 & GRB200107B & $7.49\pm 1.16$; $11.40\pm 1.57$ & harmonics, $2:3$ \\ 34 & GRB190821A & $8.20\rightarrow 5.28$ & up-chirp \\ 75 & GRB190103B & $5.17\pm 0.76$ & constant \\ 102 & GRB180823A & $19.12\pm 3.19$ & constant \\ 122 & GRB180626A & $4.58\pm 0.33$; $5.70\pm 0.54$ & harmonics, $4:5$ \\ 190 & GRB170823A & $2.96\rightarrow 11.58$ & down-chirp \\ 212 & GRB170524B & $2.1\rightarrow 2.8$ & down-chirp \\ 232 & GRB170205A & $6.86\pm 0.80$ & constant \\ 250 & GRB161202A & $24.27\rightarrow 16.25$ & up-chirp \\ 251 & GRB161129A & $3.83\rightarrow 6.95$ & up-chirp \\ 252 & GRB161117B & $3.82\pm 0.52$ & constant \\ 272 & GRB160824A & $3.05\pm 0.56$; $5.37\pm 0.81$; $9.43\pm 1.51$ & harmonics, $4:7:12^*$ \\ 455 & GRB140730A & $12.32\pm 1.95$ & constant \\ 462 & GRB140709B & $20.90\pm 2.00$; $41.54\pm 4.30$ & harmonics, $1:2$ \\ 470 & GRB140619A & $8.87\pm 0.99$; $13.10\pm 1.85$; $32.34\pm 3.86$ & harmonics, $6:15:22^*$ \\ 496 & GRB140323A & $5.49\pm 0.98$; $21.31\pm 2.91$ & harmonics, $1:4$ \\ 551 & GRB130812A & $2.26\pm 0.40$ & constant \\ 618 & GRB121209A & $9.89\rightarrow 7.57$ & up-chirp \\ 622 & GRB121125A & $4.29\pm 0.73$; $8.48\pm 1.00$ & harmonics, $1:2$ \\ 632 & GRB121014A & $16.70\pm 1.87$ & constant \\ 701 & GRB120116A & $8.16\pm 0.96$ & constant \\ 756 & GRB110422A & $5.46\rightarrow 3.89$ & up-chirp \\ 777 & GRB110207A & $6.26\pm 0.74$ & constant \\ 783 & GRB110107A & $5.48\rightarrow 3.46$ & up-chirp \\ 805 & GRB100924A & $20.18\rightarrow 5.14$ & up-chirp \\ 914 & GRB090709A & $8.02\pm 0.67$; $9.80\pm 0.91$ & harmonics, $4:5$ \\ 945 & GRB090404 & $10.94\pm 0.86$ & constant \\ 963 & GRB090102 & $7.64\pm 1.07$ & constant \\ 1007 & GRB080810 & $6.70\pm 0.60$; $9.15\pm 0.85$; $12.67\pm 0.81$ & harmonics, $2:3:4$ \\ 1098 & GRB070911 & $4.97\pm 0.75$; $16.50\pm 2.08$ & harmonics, $3:10$ \\ 1127 & GRB070508 & $2.14\pm 0.26$; $4.43\pm 0.87$ & harmonics, $1:2$ \\ 1185 & GRB060906 & $4.77\pm 0.68$ & constant \\ 1324 & GRB050418 & $14.70\rightarrow 4.76$ & up-chirp \\ 1335 & GRB050306 & $27.97\pm 3.93$ & constant \\ \enddata \tablecomments{Approximately constant leading periods are given with corresponding uncertainties (indicated with the '$\pm$' sign). Period ranges of the chirping signals are indicated with arrows, '$\rightarrow$', showing the direction of period evolution. For the harmonics, the closest integer ratios are provided. \\$^*$These high-order ratios might as well be spurious, or be obscured due to uncertainties.} \end{deluxetable*} There are 13 GRBs with one, prominent QPO with a constant leading period; 8 GRBs with two coexisting QPOs; and 3 GRBs with three coexisting QPOs. In the latter two cases we refer to them as 'harmonics'. The periods range from 2.14 to 41.54~s. In Table~\ref{tbl2}, closest integer ratios (resonances) of the detected periods are also proposed. Most of the double-QPO cases are of low or moderate orders (except for GRB 070911, which has a $3:10$ ratio), with the $1:2$ ratio occurring in three instances. Triple-QPOs seem to exhibit high-order, likely spurious ratios, except for GRB 080810, which yields the second lowest possible ratio of $2:3:4$. Among the chirping signals, 8 are up-chirps and only 2 are down-chirps. Fig.~\ref{scalogram914}(a) shows the scalogram for GRB 090709A, a source with an 8~s quasiperiodicity, overlaid on a FRED-like pulse, already ambiguously reported \citep{markwardt09,deluca10,cenko10}. Despite being speculated to be an SGR, it is almost surely a GRB. We confirm this QPO on a 3$\sigma$ significance level, and obtain a leading period of 8.02~s, persistently spanning almost 100~s of the LC. Moreover, the scalogram reveals another QPO, with a slightly higher period of $\sim$9.8~s, lasting for about 70~s, and contemporary with the 8~s QPO. The ratio of the periods is close to a $4:5$ (or $5:6$) resonance---a moderate order. \citet{ziaeepour11} showed that invoking a precession of a strong external magnetic field (present in case of stars believed to be progenitors of long GRBs) might lead to an oscillating behavior in the prompt LC. The overall nature of the two QPOs present in this GRB is unclear, though. We obtained a very similar picture for GRB 120116A, which has the same overall FRED-like shape with an 8\,s QPO overlaid (Fig.~\ref{scalogram914}(b)). The QPOs in both GRBs are thence likely to be a result of the same mechanism and conditions at the emission site. \begin{figure*} \centering \includegraphics[width=0.8\textwidth]{914_scalogram.pdf}\\ \includegraphics[width=0.8\textwidth]{701_scalogram.pdf} \caption{ (a) Wavelet scalogram of GRB 090709A. There is a significant (>3$\sigma$) QPO, with a leading period $\sim 8$~sec, persistent through most of the LC. Another, slightly shorter component is visible at a period $\sim 9.8$~sec. (b) GRB 120116A exhibits very similar features. } \label{scalogram914} \end{figure*} Fig.~\ref{scalograms_examples} shows examples of novel detections of a slightly chirping signal (Fig.~\ref{scalograms_examples}(a)), another constant leading period (Fig.~\ref{scalograms_examples}(b)), and a case of harmonics remaining in an apparent $2:3:4$ resonance (Fig.~\ref{scalograms_examples}(c)). \begin{figure*} \centering \includegraphics[width=0.8\textwidth]{618_scalogram.pdf}\\ \includegraphics[width=0.8\textwidth]{963_scalogram.pdf}\\ \includegraphics[width=0.8\textwidth]{1007_scalogram.pdf} \caption{ Exemplary wavelet scalograms of (a) an up-chirp in GRB 121209A, (b) a constant leading period in GRB 090102, and (c) a $2:3:4$ resonance in GRB 080810. } \label{scalograms_examples} \end{figure*} \subsection{Hurst exponents} \label{sect3.3} To estimate $H$, the algorithms from Sect.~\ref{sect2.4} (DFA, DWT, AWC) were utilized. To obtain robust estimates, first were selected only those GRBs for which all three $H$ estimates were consistent with each other, within the standard errors. Next, a time evolution of the three $H$ values were investigated, and only cases with no sudden jumps between $H\sim 0$ and $H\sim 1$ were kept. Given a time series with length $n$, it was divided into sliding windows of size $\floor*{n/2}$, resulting in $\ceil*{n/2}$ such chunks. To each, the three algorithms were applied, and hence provided the time evolution of $H$. Examples of this procedure are shown in Fig.~\ref{fig4}(a) and (b). This eventually led to 335 estimates of $H$, whose distributions are displayed in Fig.~\ref{fig4}(f). Over 90\% of GRBs are characterized by $H>0.5$, meaning they possess long-term memory. This is highly consistent with the overall shape of most LCs, which are comprised of one or more FRED-like pulses. Overall, a pulse by itself is persistent: the initial rise lasts for a prolonged period of time (longer than the sampling time step), and is followed by a prolonged decay, i.e. a trend is present in an LC, leading to $H>0.5$. Therefore, when on the rising side of the pulse, one can expect that the rise will continue, and when on the decaying part, one shall expect it to further continue its decay. A low signal-to-noise ratio can, however, allow the statistical fluctuations in form of white or otherwise anticorrelated noise to dominate, hence leading to $H<0.5$ (short-term memory). On the other hand, some of the few cases yielding $H<0.5$ also exhibit pronounced pulses. $H$ can be applied to both stationary and nonstationary processes, and both types can exhibit short- and long-term memory. In many GRBs the variability is clearly nonstationary, but the governing process may as well be antipersistent (i.e., be characterized by $H<0.5$). It therefore follows that the distinction $H\lessgtr 0.5$ is not trivially connected merely with the shape of the pulses or the signal-to-noise ratio of the LCs. \begin{figure*} \centering \includegraphics[width=\textwidth]{histogram_Hurst.pdf} \caption{ (a)--(b) Time evolution of $H$. (a) The estimates for GRB 191001B are consistent with each other. The global value of $H=0.74$ is indicated with a horizontal black line, and the gray region around it marks the uncertainty of $\Delta H=0.11$. (b) For GRB 180111A no unambiguous estimate can be obtained. (c)--(f) Distributions of the Hurst exponents: (c)--(e) obtained with different methods (DFA, DWT, AWC, respectively), and (f) the final values, $H$, being the mean of the three. Vertical red lines denote $H=0.5$, and the percentage of cases $H>0.5$ is indicated in each panel. (g) Distribution of the Hurst exponents obtained directly from the values of $\beta_{PL}$. (h) Relation between the $H$ obtained with other methods, and $H_{PL}$ obtained from the values of $\beta_{PL}$. Diagonal dashed line marks the identity relation. (i)--(j) Hurst exponents obtained directly from the PL indices in case of a pure PL and PLC, respectively. Inclined dashed lines depict the theoretical relations. In (i), the overall correlation is $r=0.9$ (along the theoretical line when considered continuous; 95\% CI: $(0.84,0.94)$), while in (j) $r=-0.18$ (95\% CI: $(-0.33,-0.02)$), and does not follow well the predicted values. } \label{fig4} \end{figure*} Additionally, since there is a theoretical linear relation between $H$ and the PL index $\beta_{PL}$, for the 187 GRBs with a PL PSD the $H$ were extracted directly from the $\beta_{PL}$ values. Their distribution is displayed in Fig.~\ref{fig4}(g), while Fig.~\ref{fig4}(h) demonstrates that these values are consistent with the $H$ obtained with the other three algorithms. Indeed, these latter $H$ exhibit a very high correlation with $\beta_{PL}$, in perfect agreement with the theoretical predictions ($r=0.94$, 95\% CI: $(0.92,0.96)$; Fig.~\ref{fig4}(i)). This is, however, not the case when similar inference is performed using the indices $\beta_{PLC}$ from the PLC model (Fig.~\ref{fig4}(j)): there is a weak anticorrelation between the two, and the obtained $H$ values do not follow the theoretical predictions at all. This seems to be the fault of the Poisson noise contaminating the signal, as the $H$ extraction algorithms (DFA, DWT, AWC) treat the time series as a whole, so the random fluctuations obscure the self-affinity that the algorithms rely on. A meaningful inference of $H$ from any signal is hence a subtle matter. Finally, we note there is nearly no correlation between $H$ and the parameters of the SBPL model ($\beta_1,\,\beta_2,\,T_{\rm break}$). Recall that no conditions were imposed on the signal-to-noise ratio of the GRBs; we aimed to analyze as much of the Swift catalog as was technically possible. \subsection{The $\mathcal{A}-\mathcal{T}$ plane} \label{sect3.4} The $\mathcal{A}-\mathcal{T}$ plane is linked with the Hurst exponents, as well as the PSD form. In Fig.~\ref{fig_AT_results}(a) displayed are the $(\mathcal{A},\mathcal{T})$ locations of the 1150 GRBs in the 64\,ms binning. The gray area in the background is the region of availability of the PLC, i.e. above the pure PL line (red points in Fig.~\ref{fig_AT}) and below the line $\mathcal{T}=\nicefrac{2}{3}$ (highlighted with a gray dashed line in Fig.~\ref{fig_AT_results}(a)). The size of the point is proportional to the logarithm of the number of measurements $n$ in the LC. There is essentially no prominent correlation between $n$ and both $\mathcal{A}$ and $\mathcal{T}$. \begin{figure*} \centering \includegraphics[width=\textwidth]{AT_plane_results.pdf} \caption{ The $\mathcal{A}-\mathcal{T}$ plane. The mean errors are represented in the upper parts of the plots. (a) The point size is proportional to the logarithms of the length of the time series, and indicated in the lower right corner. The gray area is the region of availability for PLC type of PSDs (cf. Fig.~\ref{fig_AT}). (b)--(d) The sizes of the points indicate the values of index $\beta$, as indicated in the lower right corner of each panel. (e)--(h) The $(\mathcal{A},\mathcal{T})$ locations of the LCs binned according to the MVTS values. In panel (e) locations of all such binned LCs are represented, while in (f), (g), and (h) displayed are binned LCs with at least 50, 100, and 200 points, respectively. } \label{fig_AT_results} \end{figure*} Figures~\ref{fig_AT_results}(b)--(d) display the $\mathcal{A}-\mathcal{T}$ plane as well, but with the size of the points indicating the index $\beta$ of the best-fit PSD. In case of pure PL (Fig.~\ref{fig_AT_results}(b)) the relation is consistent with Fig.~\ref{fig_AT}, i.e. steeper PSDs are located at lower values of $\mathcal{A}$ and---to some extent---lower values of $\mathcal{T}$ as well. However, in case of PLC and SBPL models (Fig.~\ref{fig_AT_results}(c) and (d), respectively) the situation seems to be reverted, with the steepest PSDs crowding near the white noise point $(1,\nicefrac{2}{3})$. Note that very steep PSDs (i.e., with $\beta\gtrsim 4-5$) imply virtually no, or very little, variability on the associated time scales (cf. Sect.~\ref{sect3.1}). The Poisson noise dominates such PLC cases, and a combination of white noises at two different power levels (at time scales $\mathrel{\mathpalette\lagA{<>}} T_{\rm break}$, since $T_{\rm break}\approx\tau$ in such instances) occurs in SBPL, especially when $\beta_{1}\approx 0$. After excluding these extremely steep instances, there is no correlation between $\beta$ and both $\mathcal{A}$ and $\mathcal{T}$. Finally, there are strong anticorrelations between $\mathcal{A}$ and $\log f_0$ ($r=-0.77$ for PLC; 95\% CI: $(-0.80,-0.73)$, and $r=-0.76$ for SBPL; 95\% CI: $(-0.80,-0.71)$), confirming that the level of Poisson noise contaminating the LCs primarily determines their locations in the $\mathcal{A}-\mathcal{T}$ plane. To circumvent this, the LCs were binned according to the MVTS (effectively smoothing the LCs), and the resulting $(\mathcal{A},\mathcal{T})$ locations are shown in Fig.~\ref{fig_AT_results}(e). This picture is completely random, since many binned LCs turned out to contain only a handful of points. Therefore, in Figs.~\ref{fig_AT_results}(f)--(h) are shown only those binned LCs with at least 50, 100, and 200 points, respectively. The longer the binned LCs, the more consistent their locations are with the region of availability of PLC models. It is therefore crucial to highlight the importance of sufficient length of a time series for calculating its location in the $\mathcal{A}-\mathcal{T}$ plane robustly. While the values of $(\mathcal{A},\mathcal{T})$ in principal can be computed and used to characterize any experimental time series (even extremely short ones), when dealing with stochastic processes, very short realizations will give essentially a random outcome. Consider, e.g., a realization of white noise with $n$ values. It has an expected number of turning points $\mu_T = \nicefrac{2}{3}(n-2)$, and standard deviation $\sigma_T=\sqrt{(16n-29)/90}$ \citep{kendall}. The distribution of $T$ (for a fixed $n$) will tend to a Gaussian parametrized by $(\mu_T,\sigma_T)$. For $n\in\{6,25,50,1000\}$, these are (rounded to the nearest integer): $(\mu_T,\sigma_T)\in\{(3,1), (15,2), (32,3), (665,13)\}$. Translating to $\mu_\mathcal{T}=\mu_T/n$, $\sigma_\mathcal{T}=\sigma_T/n$, one gets $\{(0.5, 0.17), (0.6, 0.08), (0.64, 0.06), (0.665, 0.013)\}$. In other words, the expected value of $\mathcal{T}$ and its standard deviation are asymptotically equal to $\nicefrac{2}{3}$ and zero, respectively, but for short time series $\sigma_T$ (or $\sigma_\mathcal{T}$) can constitute a substantial fraction of $\mu_T$ (or $\mu_\mathcal{T}$). For instance, a time series with only $n=6$ will have 33\%, 42\%, and 17\% chance of yielding $T=2,3,4$, respectively. Such trend is indeed observed in Figs.~\ref{fig_AT_results}(e)--(h): the longer the binned LCs, the more constrained to the region of availability they are. Therefore, the Poisson noise is a serious obstacle in analyzing the variability of astronomical time series, GRBs in particular. Recall that, according to Sect.~\ref{sect3.1}, the MVTS does not bear any physical meaning (at least for the Swift sample investigated herein), as it very strongly depends on the Poisson noise level inferred from the individual measurements' uncertainties. Finally, given all the above considerations, the $\mathcal{A}-\mathcal{T}$ plane, while potentially useful in classifying LCs \citep[cf. ][]{zywucka20,tarnopolski20b}, does not hint at any clustering of long GRBs into more than one group (other than an overconcentration of flat PSDs at $(1,\nicefrac{2}{3})$, likely owing to low signal-to-noise ratio), consistent with the findings of \citet{jespersen20}. Finally, the coarse graining (Eq.~(\ref{eq60})) was applied to the 64\,ms binned LCs, using $d\in\{1,\ldots,20\}$, with the intent to possibly obtain separated clusters for some particular value of $d$. Such an approach was successful in case of economic and physiological data \citep{zunino17} with small values of $d$. For the GRBs herein, though, we mostly observe variations of Fig.~\ref{fig_AT_results}(a) for small $d$, and higher $d$ (leading to relatively short coarse-grained sequences) resembling Fig.~\ref{fig_AT_results}(e) when the resulting time series are too short. We therefore again do not obtain any clustering of long GRBs in the $\mathcal{A}-\mathcal{T}$ plane. \subsection{The $E_{\rm peak}^{\rm rest}-\beta$ relation} \label{sect3.5} \citet{dichiara16} studied 123 GRBs observed by various instruments. They found a statistically significant anticorrelation ($r=-0.54$, 95\% CI: $(-0.65,-0.41)$, using their published data) between the rest-frame peak energy ($\log E_{\rm peak}^{\rm rest}$) and the PL index (denoted by them with $\alpha$; we continue using the symbol $\beta$ hereinafter). We gathered the $E_{\rm peak}$ values of the \textsc{Band}, \textsc{Comp}, and \textsc{Sbpl}\footnote{Note this \textsc{Sbpl} is in a different context than the PSD from Eq.~(\ref{eq6}).} spectral fits \citep{kaneko06,gruber} from the Fermi/GBM catalog\footnote{\url{https://heasarc.gsfc.nasa.gov/W3Browse/fermi/fermigbrst.html}} \citep{gruber,kienlin,kienlin20,bhat} by cross-matching the spatio-temporal localizations of the Swift and Fermi GRBs, and complemented them with redshift measurements when available. The specific $E_{\rm peak}$ values for the common GRBs were chosen based on the \texttt{flnc\_best\_fitting\_model} entry from the Fermi catalog. We consider $\beta_{PL}$, $\beta_{PLC}$, and $\beta_{2}$. Eventually, we end with 12, 22, and 20 entries, respectively. They are displayed in Fig.~\ref{fig5.3}. \begin{figure} \centering \includegraphics[width=\columnwidth]{Epeak-beta_correlation.pdf} \caption{ The relation between $E_{\rm peak}^{\rm rest}$ and the $\beta$ indices obtained from PL (blue circles), PLC (red squares), and SBPL models (green triangles), and correlation coefficients highlighted with respective colors, where purple refers to the joint set $\beta = \beta_{PL} \cup \beta_{PLC}$, dirty yellow to $\beta = \beta_{PLC} \cup \beta_{2}$, and black to $\beta = \beta_{PL} \cup \beta_{PLC} \cup \beta_{2}$. } \label{fig5.3} \end{figure} An overall anti-correlation between the $\log E_{\rm peak}^{\rm rest}$ and $\beta$ values can be seen. It is strongest in case of the PLC fits, $r=-0.63$ (95\% CI: $(-0.83,-0.28)$)---even stronger than in \citet{dichiara16}. It is weaker for the pure PL case ($r=-0.41$; 95\% CI: $(-0.80,0.21)$---consistent with a lack of correlation), and similar when the set $\beta_{PL} \cup \beta_{PLC}$ is considered ($r=-0.38$, 95\% CI: $(-0.67,-0.05)$). The weakest correlation ($r=-0.21$, 95\% CI: $(-0.60,0.26)$---consistent with a lack of correlation) is attained for $\beta_{2}$, and for the whole set of $\beta$ it is a moderate $r=-0.26$ (95\% CI: $(-0.49,0.01)$---barely consistent with a lack of correlation). We note, however, that (i) our sample is $\sim$2.5 times smaller than that of \citet{dichiara16}, and (ii) we did not impose any conditions on the signal-to-noise ratio, contrary to \citet{dichiara16}. Therefore, in our sample of 54 GRBs with $E_{\rm peak}^{\rm rest}$ values there are GRBs significantly contaminated by the Poisson noise component as well, which likely affects the $\log E_{\rm peak}^{\rm rest}-\beta$ relation. Since the 95\% CIs for $r$ contain (at least marginally) the value describing the sample of \citet{dichiara16}, we do not reject the existence of such correlation (although some subsamples of our $\beta$ allow a lack of correlation, too); however, a bigger sample is definitely required to constrain the relation further, which is outside the scope of this paper. \subsection{The $L_{\rm iso} - f_0$ relation } \label{sect3.6} The peak isotropic luminosity is computed as \citep{schaefer07} \begin{equation} L_{\rm iso} = 4\pi d_L^2(z) \mathcal{P} \frac{ \int_{E_1/(1+z)}^{E_2/(1+z)} EN(E)dE }{\int_{E_{\rm min}}^{E_{\rm max}} EN(E)dE}, \label{eq14} \end{equation} where $d_L(z)$ is the luminosity distance to a source at redshift $z$, calculated using the latest cosmological parameters within a flat $\Lambda$CDM model \citep{Planck2018}: $H_0=67.4\,{\rm km}\,{\rm s}^{-1}\,{\rm Mpc}^{-1}$, $\Omega_m=0.315$, $\Omega_\Lambda=0.685$; $\mathcal{P}$ is the energy flux (in units of ${\rm erg}\,{\rm cm}^{-2}\,{\rm s}^{-1}$) over the time range of the peak flux of the GRB\footnote{The \texttt{pflx\_xxxx\_ergflux} entries from the Fermi/GBM catalog were employed, where \texttt{xxxx} stands for \textsc{Band}, \textsc{Comp}, \textsc{PLaw}, or \textsc{Sbpl}. }; and $N(E)$ is the spectral model over the time range of the peak flux (expressed in units of $\rm{ph}\,\rm{cm}^{-2}\,\rm{s}^{-1}\,\rm{keV}^{-1}$): \textsc{Plaw}, \textsc{Band}, \textsc{Comp}, or \textsc{Sbpl}, chosen for each GRB according to the \texttt{pflx\_best\_fitting\_model} entry from the Fermi/GBM catalog, and with parameters from therein \citep{kaneko06,gruber}. The integration limits are set using $\{E_1,E_2\}=\{1,10^4\}\,{\rm keV}$, and $\{E_{\rm min},E_{\rm max}\}=\{10,10^3\}\,{\rm keV}$ is the observing bandwidth of Fermi/GBM (cf. Sect.~\ref{sect3.5}). The uncertainties of $\log L_{\rm iso}$ are obtained by bootstrapping the parameters of $N(E)$ \citep{ukwatta10}. We obtain 81 GRBs with $L_{\rm iso}$ estimates. Hereinafter we employ 25 GRBs that have PSDs best fitted by a PLC, and 26 with an SBPL form. We compare our results (Fig.~\ref{fig5.4}) with those of \citet{ukwatta11} regarding the relation between redshift-corrected characteristic frequency, $(1+z)f_0$, and $L_{\rm iso}$. Our sample yields $r=0.36$ (95\% CI: $(-0.04,0.66)$) and $r=0.32$ (95\% CI: $(0.05,0.55)$) for the PLC and all 51 cases, respectively, while \citet{ukwatta11} obtained $r=0.77$ (95\% CI: $(0.64,0.86)$) with a sample of 58 GRBs. Our correlation is marginally significant, although weaker and slightly inconsistent with that of \citet{ukwatta11}. \begin{figure} \centering \includegraphics[width=\columnwidth]{Liso_f0_correlation.pdf} \caption{ The relation between $L_{\rm iso}$ and the redshift-corrected frequency $(1+z)f_0$. Red squares denote the 25 GRBs whose PSDs are best fitted with a PLC; green triangles correspond to the remaining 26 SBPL fits. The corresponding correlation coefficients $r$ are indicated with respective colors. } \label{fig5.4} \end{figure} The discrepancy lies in (i) different models employed: \citet{ukwatta11} fitted the PSDs with a piecewise linear function, with a nonzero slope for $f<f_0$, and a constant level for $f>f_0$, while Eq.~(\ref{eq5}) describes a smooth transition. Therefore, our $f_0$ has a slightly different meaning than the $f_0$ of \citet{ukwatta11}. Moreover, (ii) we did not impose any constraints on the initial sample, as we aimed to analyze the whole Swift catalog, so that more noisy GRBs might be adding variance to the $L_{\rm iso} - f_0$ relation. Note that our sample is about he same size (51 vs. 58) as that of \citet{ukwatta11}. \section{Discussion} \label{sect4} \subsection{PSDs} The PSDs of Swift GRBs examined herein come in three shapes: a pure PL, a PL with Poisson noise, and an SBPL. The PL case includes flat PSDs, i.e. white noise, which are quite abundant in our sample. They are characteristic of GRBs which are dim, i.e. have a low signal-to-noise ratio, and hence are dominated by the Poisson statistics. The PSDs which are colored noise have indices $\beta\lesssim 2$, so are generally flatter than red noise. When the Poisson noise component becomes significant, the $\beta$ indices in the PLC case rise as well, falling in the range $1\lesssim\beta\lesssim 3$. There is also a non-negligible fraction of steeper PSDs, with $4\lesssim\beta\lesssim 6$, and a few instances of $\beta>6$. The latter basically implies no variability on the corresponding time scales, since it means that for every decade in frequency there is a $>6$ orders of magnitude change in the power. Such steep PLC models ought to be considered artifacts, unless proven otherwise, since we observed they occur when the binned PSD exhibits just one or two points at low frequencies (reflecting the length of the LC), greatly above the Poisson noise level, and hence the fitting results become severely biased. The mode of the $\beta$ distribution in the PLC model is at 1.8, somewhat close to the value $\nicefrac{5}{3}$ expected in the turbulence model. Finally, the SBPL model has its low-frequency index $\beta_1$ gathered around zero, and not exceeding 2, while the high-frequency index $\beta_2$ mostly falls in the range $2\lesssim\beta_2\lesssim 6$. Such steepness is more reliable than in the PLC case, since it occurs at time scales located between the region of low-frequency PL part (well above the Poisson noise level, so detected confidently), and the high-frequency region of Poisson noise dominance. This shows that there is a characteristic time scale, locating the break $T_{\rm break}$between the two PL parts with $\beta_1$ and $\beta_2$, on the order of $1-100$~s, and hence implies there are either two dominant processes working in the progenitors at the emission sight, or---when $\beta_2$ is very steep---the variability at the intermediate time scales is essentially wiped out. The latter can be indicative of a sharp cut-off corresponding to, e.g., the inner edge of the accretion disk. \subsection{QPOs} Another feature that was uncovered in some number of GRBs are QPOs---either with an approximately constant leading period, or in the form of up- or down-chirps. As noted in Sect.~\ref{sect1}, there have not been many reports on QPOs in GRBs, hence the instances gathered in Table~\ref{tbl2} are remarkably numerous. The already proposed generation mechanisms (MRI \citep{masada07}; precessing magnetic field \citep{ziaeepour11}) can be complemented with some models employed for active galactic nuclei (AGNs), since both GRBs and AGNs often exhibit striking similarities \citep{wang14,wu16,deng16}. In the simplest scenario, association of the break time scale with the viscous time scale of an accretion disk, coupled with the Keplerian motion on a circular orbit around the newly forming BH \citep{mohan14,zywucka20} can explain the PSD breaks in GRBs as well. Since a relativistic two-body problem (in both Schwarzschild and Kerr metrics) allows for an inspiral (which is impossible in the Newtonian framework), occuring in a finite time \citep{levin08}, a fragmented accretion disk could result in QPOs, lasting several cycles, and possibly chirping signals as well. The orbital period at the innermost stable circular orbit (ISCO) is $T_{\rm ISCO}=12\pi\sqrt{6}GM_{\bullet}/c^3\approx 4.5\cdot 10^{-4}M_{\bullet}/M_{\odot}\,{\rm [s]}$ \citep{hartle}, giving for a typical stellar-mass BH with $M_{\bullet}=10M_{\odot}$ a period of $T_{\rm ISCO}=4.5\,{\rm ms}$---an order of magnitude smaller than the employed binning (64~ms), and smaller than the detected QPO time scales.\footnote{For a Kerr BH with dimensionless spin $a>0$, $T_{\rm ISCO}$ is even smaller \citep{bardeen72}, up to a factor of $3\sqrt{6}$ for a maximally rotating BH.}\textsuperscript{,}\footnote{However, a period on the order of miliseconds is comparable to the QPO discovered in a short BATSE GRB \citep{zhilyaev09}, hence an inspiral inside the ISCO might, at least in some cases, lead to a QPO.} The accretion disk might actually be truncated, with an inner edge at a radius $r=kr_{\rm ISCO}$ ($k\geqslant 1$), in case of which the period $T=k^{\nicefrac{3}{2}}T_{\rm ISCO}$. E.g., $k=20$ changes the 4.5~ms period to 0.4~s---still a few times shorter than the shortest QPO reported in Table~\ref{tbl2}, which would require $k\approx 61$. A plausible range of the cut-off can extend up to $k\sim 100$, giving $T=4.5\,{\rm s}$, consistent with some of the QPOs in Table~\ref{tbl2}. While some QPOs might therefore be indeed due to a truncated disk, it seems unlikely to be a universal explanation. Several more sophisticated orbital models (oscillatory modes in accretion disks, both thin and thick; relativistic precession; tidal disruption (TD) models; warped disk; etc.) were considered in the context of X-ray binaries and microquasars \citep[][and references therein]{torok11,kotrlova20}, and predict the existence of resonant QPOs of a wide range of frequency ratios (cf. fig.~3 in \citealt{kotrlova20}). However, since $\frac{M_{\bullet}}{M_\odot}\frac{f_U}{10^3\,{\rm Hz}}\gtrsim 1$ (cf. fig.~2 in \citealt{kotrlova20}), where $f_U$ is the higher frequency forming the resonant ratio $f_U/f_L>1$, and the ratios in Table~\ref{tbl2} are of the order of unity, the time scales of the QPOs are of the order of 0.01~s. The TD model, in turn, predicts that inhomogeneities with density $\rho$ in the disk will be stretched and disrupted at the Roche limit, and eventually lead to modulation with a period $T_{TD}\sim (G\rho)^{-\nicefrac{1}{2}}$ \citep{cadez08,kostic09,torok11}. Assuming rocky material (planetary/cometary debris) with $\rho=5500\,{\rm kg}\,{\rm m}^{-3}$ (Earth's density), $T_{TD}=1650\,{\rm s}$. Lower $\rho$ gives higher $T_{TD}$. To match the 10~s QPO period, $\rho\sim 10^8\,{\rm kg}\,{\rm m}^{-3}$, which is an unlikely possibility. The relativistic motion around Kerr BHs can lead to even more complicated, three dimensional orbits, giving rise to breaks as well as QPOs \citep{rana19,rana20b}. The low-frequency QPOs, with time scales $1-10\,{\rm s}$, in fact arise naturally in this setup, hence appear to be a probable description for the QPOs in GRBs (cf. table~10 in \citealt{rana20b}), and account for resonant QPOs as well. Finally, the Lense-Thirring precession leads to frequencies matching the QPOs when the disk is truncated at $k\gtrsim 30$ (cf. fig.~5 in \citealt{ingram09}), an order of magnitude smaller than in the above orbital models. A detailed picture was painted with the use of magnetohydrodynamical simulations of a forced perturbance within a magnetized accretion disk \citep{petri05}. This scenario seems plausible, since among the 10 chirps we identified, 8 are up-chirps, i.e. with a decreasing period. The two down-chirps would require a different mechanism, though. An appealing one might be due to a helical jet, which when applied to AGNs, results in down-chirps \citep{mohan15}. On the other hand, accretion flows in which MRI dominates do not exhibit QPOs, since MRI turbulence destroys coherence, hence nullifies QPOs, while in a magnetically choked accretion flow (with an accumulated magnetic flux), there appear QPOs with periods $\sim 70GM_{\bullet}/c^3\approx 0.004\,{\rm s}$ for $M_{\bullet}=10M_\odot$ (see \citealt{mckinney12} for details), i.e. again too low to match the QPOs detected in GRBs. Finally, oscillations of the shock front can give rise to QPOs with Hz and sub-Hz frequencies, i.e. could possibly explain some of the QPOs in GRBs as well \citep[][and references therein]{iyer15,palit19}. GRB emission is of synchrotron nature \citep{burgess20,ghisellini20}, and comes from the shocks in relativistic jets. We discussed possibilities of generating QPOs of appropriate periods in the surrounding disk (except for the shock front oscillations), assuming they transfer with a one-to-one correspondence to the jet via disk-jet coupling. This might not be entirely true, and/or the observed QPOs might as well arise due to a combination of more than one effect. \subsection{Persistence} A conservative methodology used to estimate the Hurst exponents revealed that 93\% of GRBs are characterized by $H>0.5$, meaning they exhibit long-term memory, or persistence. Recall that the value of $H$ can be attributed to both stationary (e.g., colored noise with $\beta<1$ or fractional Gaussian noise) and nonstationary (e.g., PL with $\beta>1$ or fractional Brownian motion), and hence the notion of smoothness it quantifies is broader that (non)stationarity. We therefore showed that the autocorrelations in the GRBs' variability persist throughout the LCs, hence---so to speak---the random component embedded in the $\gamma$-ray signal is structured on a fundamental level. \subsection{$\mathcal{A}-\mathcal{T}$ plane} We attempted also to classify the GRB prompt LCs in the recently developed $\mathcal{A}-\mathcal{T}$ plane. We considered here only long GRBs, with $T_{100}>3.2\,{\rm sec}$, and since the dichotomy between short and long GRBs is well established, we expected to verify with yet another approach the existence of the presumed third, intermediate class of GRBs. We indeed observed hints of clustering in two regions of the $\mathcal{A}-\mathcal{T}$ plane. However, one of the groups tends to gather around the point $(1,\nicefrac{2}{3})$, i.e. the location of white noise processes. When examined in dependence on the $\beta$ indices of the PSDs, it turned out that area is occupied by PLC and SBPL models with very high values of $\beta$---i.e., those GRBs predominantly exhibitng white noise PSDs. As noted above, such cases are either due to the objects being dim, spurious fits, or a nontrivial coexistence of two white noise processes represented by components with different powers. We therefore conclude there are no unambiguous signs of a sub-classification of long GRBs' LCs. While this is not a definite proof of the non-existence of the third class on its own, it is consistent with other works tackling this issue more directly \citep{tarnopolski16a,tarnopolski19a,tarnopolski19c,jespersen20}. \subsection{Correlations} Finally, we critically revisited the $E_{\rm peak}^{\rm rest}-\beta$ and $L_{\rm iso} - f_0$ relations, confirming their existence in the whole Swift catalog. Comparing with the corresponding results of \citet{dichiara16} and \citet{ukwatta11}, we obtained slightly stronger and significantly weaker, respectively, correlations in the appropriate relations. In case of the $L_{\rm iso} - f_0$ relation, the overall positive correlation might in fact be a simple luminosity effect: the brighter the source, the higher its signal-to-noise ratio, hence the lower the contamination of the signal with Poisson noise. This then implies that the location of the critical frequency, $f_0$, is shifted to higher frequencies, making the white noise component less significant. This is backed up also by a very strong correlation ($r=0.98$) between the Poisson noise levels obtained from fits and directly from the uncertainties of the LC measurements. The $E_{\rm peak}^{\rm rest}-\beta$ relation, in turn, connects the spectral energetic properties of a GRB with a characteristic of an LC. An anticorrelation between the two might be a sign of a common, physical parameter governing the values of $E_{\rm peak}^{\rm rest}$ and $\beta$, e.g. the $\Gamma$ factor. \section{Summary} \label{sect5} \begin{enumerate} \item The PSDs with PL and PLC shapes are broadly consistent with the $\nicefrac{5}{3}$ Kolmogorov law expected in a fully developed turbulence. Several cases of an SBPL model were also obtained, with break time scales on the order of 1--100~s. \item We reported on QPOs detected in the wavelet scalograms of 34 GRBs: 10 chirping signals (8 up-chirps and 2 down-chirps), and 24 QPOs with constant leading periods (13 with a single QPO, 8 with two coexisting QPOs, and 3 triple QPOs). In particular, we confirmed a persistent QPO with an $\sim$8~s period in GRB 090709A. We identify non-planar orbits around Kerr BHs, the Lense-Thirring effect, and shock oscillations as plausible mechanisms for the QPO generation. \item 93\% of GRBs are characterized by $H>0.5$, i.e. they express long-term memory in the prompt LCs, not connected trivially with the PSD features. \item The $\mathcal{A}-\mathcal{T}$ plane did not reveal any meaningful separation of long GRBs into subclasses. \item The $E_{\rm peak}^{\rm rest}-\beta$ and $L_{\rm iso} - f_0$ relations were confirmed, though the latter seems to be a straightforward result of the luminosity effect. \end{enumerate} \acknowledgments We thank Agnieszka Janiuk for useful comments on the draft, and the anonymous reviewer for helpful suggestions. M.T. acknowledges support by the Polish National Science Center (NSC) through the OPUS grant 2017/25/B/ST9/01208. V.M. was supported by the NSC grant 2016/22/E/ST9/00061. \software{\textsc{Mathematica} \citep[v10.4; ][]{Mathematica}, \textsc{SciPy} \citep[v1.1.0; ][]{scipy}, \textsc{wavepal} \citep{lenoir18a,lenoir18b}}.
\section{Introduction} Most of the computer vision methods are biased towards highly clean and sanitised dataset, which is hardly the scenario in most practical settings. The data on which these methods are trained lack substantially in adverse aspects such as low lighting conditions and unwanted noise, which demand immediate attention if the methods are to be utilised in real-time. Moreover, the methods which are being developed do not include any distinctive mechanism to deal with such complications, hence supplementing the underlying problem. Amongst many adverse problems, low light conditions in aerial imagery is a prominent one. Low light is an inevitable part of aerial images, since they may be captured with insufficient light due to extreme weather constraints, night time, poor capturing techniques, low contrast conditions, inept position of ground objects etc. This makes it very difficult to accommodate key UAV applications such as remote sensing and urban surveillance, problems which cannot endure poor prediction results and demand robust solutions. \begin{figure}[t] \includegraphics[scale=0.300]{images/low-light-ex.jpg} \caption{Low light aerial dataset generation. Left-original image; Middle-low light image generated using GANs; Right-enhanced low light image using light enhancement module. (Magnify for minor details in the images)} \label{fig:ll-exm} \end{figure} In this study, we propose a novel network capable of performing simultaneous low light enhancement coupled with instance segmentation on the aerial images. The entire architecture is an end-to-end trainable CNN and delivers an increased quality of predictions. The overall contributions of this study are: (1) We propose a self-supervised light enhancement network capable of performing instance segmentation on low light aerial images. (2) We generate a new low light aerial image dataset having annotations for instance segmentation. (3) We demonstrate the effectiveness of our proposed network on the low light aerial dataset both qualitatively and quantitatively, thus laying the groundwork for future research. \section{Dataset Generation} To the best of our knowledge, no dataset provides low light aerial images along with annotations for instance segmentation. To validate our proposed method, we generate a low light aerial image dataset using iSAID \cite{waqas2019isaid}, LOw-Light dataset (LOL) \cite{Chen2018DeepRetinex} and GANs. The iSAID (outdoor, aerial) and LOL (indoor, terrestrial) datasets belong to different domains and lack one-to-one mapping between them. In order to efficiently translate the low light attribute from LOL to iSAID, we train them on the CycleGAN \cite{zhu2017unpaired} architecture, which is based on cycle consistency loss. We generate 18528 low light aerial images for the training set. All generated images are superior in quality and match with real-time low light conditions (Figure~\ref{fig:ll-exm}). \begin{figure}[t] \includegraphics[width=\columnwidth]{images/ll-network.png} \caption{The architectural representation of the proposed method. (Magnify for minor details in the images)} \label{fig:ll-net} \end{figure} \section{Proposed Method} The network is a two-phase architecture. The first phase deals with the brightness reconstruction of the image in a self-supervised manner, whereas the second phase is associated with the computer vision task of segmentation and detection. \textbf{1. Self-Supervised Low Light Enhancement.} A self-supervised CNN module is used in this phase to eliminate the need of ground truth clear images or paired training data. This reduces the computational complexity of the network and makes the training process more generalisable. The method utilises the approach proposed by Zhang et al. \cite{zhang2020self} based on the Maximum Entropy-based Retinex Model. The light enhancement task is based on the assumption that the histogram distribution of the maximum channel of the enhanced image should validate and follow the histogram distribution of the maximum channel of the low light image after it has been histogram equalised. This attribute eliminates the requirement of paired examples, and thus, the loss is constructed using low light image tensors only. The following equation (Eq. \ref{eq1}) generalises the aforementioned concept. \begin{dmath} Z = \lVert S - R \cdot I \rVert + \lambda_1 \Big\lVert \smash{\displaystyle\max_{c \in R,G,B}} R^c - F( \smash{\displaystyle\max_{c \in R,G,B}} S^c ) \Big\rVert \\ + \lambda_2 \lVert \Delta\ I \cdot \lambda exp(-\lambda_3 \Delta R) \rVert + \lambda_4 \lVert \Delta R \rVert \label{eq1} \end{dmath} where S represents the low light image, R and I represent the reflectance and illuminance of the image, and $\lambda_i$ are the weight parameters. This composite equation can be solved by a deep learning network which can fragment the given image into illuminance and reflectance and employ this equation as its loss function. The deep learning network utilised is shown in Figure~\ref{fig:ll-net}, which is a very elementary CNN structure apt for our usage, since it is fast, efficient and lightweight (2 MB). In the network, the upsampling and downsampling convolutions help in reducing noise but make the image tensors blurry. This flaw can be rectified by using extra convolutions post the sampling operations that can aid in the correct reconstruction of the target image. \textbf{2. Instance Segmentation Network.} To perform instance segmentation on the enhanced image, we utilise Hybrid Task Cascade \cite{chen2019hybrid} along with some novel improvements that boost the prediction accuracy. We implement residual connection in the mask pipeline of HTC, which allows an efficient flow of the computed mask features in the pipeline. These connections help in retaining the mask features of tiny objects (which are abundant in aerial images) deduced in the initial stages throughout the final stages as well. The light enhancement module and HTC complement each other during the end-to-end training process, and losses from both phases contribute to the global loss of the joint network. We train the network for 11 epochs on the train set of the low light aerial dataset and obtain good results (Table~\ref{tab:arch-AP}) on the val set. Addition of a low light enhancing module considerably boosts the prediction scores of the instance segmentation network. \begin{table}[t] \def1.4{1.4} \resizebox{\columnwidth}{!}{ {\begin{tabular}{c|c|c c c|c c } \hline \textbf{Method} & \textbf{Type} & \textbf{AP} & \textbf{AP\textsubscript{50}} & \textbf{AP\textsubscript{75}} & \textbf{AP\textsubscript{S}} & \textbf{AP\textsubscript{M}} \\ \hline \hline \multirow{2}{*}{Original HTC} & Box & 38 & 55.9 & 42.1 & 21.1 & 45.9 \\ \cline{2-7} & Segm & 31.3 & 51.9 & 32.7 & 16.1 & 37.8 \\ \hline \multirow{2}{*}{\textbf{Proposed Method}} & Box & 38.9 & 57.5 & 43.1 & 21.7 & 47.2 \\ \cline{2-7} & Segm & 32.2 & 53.8 & 33.9 & 17 & 39.2 \\ \hline \end{tabular}}\quad } \caption{Performance on the val set of the low light aerial dataset.} \label{tab:arch-AP} \end{table} \section{Conclusion} In this abstract, we propose a new method for robust feature extraction from low light aerial images. Our method efficiently restores the brightness in the image and then performs instance segmentation on the enhanced image. The light enhancement module, adept in brightness reconstruction, is self-supervised and incurs a very minor computational cost. The instance segmentation algorithm is further improved by using residual connections, which aid in dense information flow in the network. In addition, we also generate a synthetic dataset consisting of low light aerial images and annotations for performing instance segmentation in adverse conditions. \section{Supplementary Material} \subsection{Training Configuration} We train the method for 11 epochs at a batch size of 1 and a learning rate of 0.0031. The momentum and weight decay values are set to 0.9 and 0.0001 respectively. The learning rate is decayed by 10 times at epochs 4, 8 and 10. We adopt multi-scaled training approach where the shorter edge is randomly sampled from six different scales of 1200,1000,800,600 and 400. The network is trained on an NVIDIA Tesla V100 GPU, 32 GB memory. Following are the training trajectories for the (1) complete network (Fig~\ref{fig:loss}), and (2) the light enhancement module (Fig~\ref{fig:loss-ill}). \begin{figure}[t] \centering \includegraphics[width=\columnwidth]{images/loss.jpg} \caption{Training Loss for the complete network} \label{fig:loss} \end{figure} \begin{figure}[t] \centering \includegraphics[width=\columnwidth]{images/loss_ill.jpg} \caption{Low light loss} \label{fig:loss-ill} \end{figure} \subsection{Additional Quantitative Results} Apart from the main results mentioned in the paper, we made some more fine observations that uphold the fact that low light conditions can hinder the performance of computer vision techniques substantially. We use HTC as our principal instance segmentation network and compare its performance on the val set of low light aerial dataset with two variants: (1) when it is trained with only normal images and (2) when it is trained with low light aerial images. It is evident from Table~\ref{tab:dataper} that the performance on low light images by the first approach is very poor and goes to as low as 17.5 and 15.2 APs in box and mask criteria. However, the performance of the second approach is quite exceptional, and the results obtained are almost double of those obtained in the first approach. This clearly shows that networks which are trained on clean and sanitised data do not perform well in adverse low light conditions. \begin{table}[t] \renewcommand{1.4}{1.4} \resizebox{\columnwidth}{!}{ {\begin{tabular}{c|c|c c c|c c } \hline \textbf{Method} & \textbf{Type} & \textbf{AP} & \textbf{AP\textsubscript{50}} & \textbf{AP\textsubscript{75}} & \textbf{AP\textsubscript{S}} & \textbf{AP\textsubscript{M}} \\ \hline \hline \multirow{2}{*}{HTC trained normally} & Box & 17.5 & 25.5 & 19.8 & 8.7 & 22.8 \\ \cline{2-7} & Segm & 15.2 & 24.7 & 15.9 & 6.9 & 19.9 \\ \hline \multirow{2}{*}{\textbf{HTC trained in low light}} & Box & 38 & 55.9 & 42.1 & 21.1 & 45.9 \\ \cline{2-7} & Segm & 31.3 & 51.9 & 32.7 & 16.1 & 37.8 \\ \hline \end{tabular}}\quad } \caption{Performance of HTC on the val set of the low light aerial dataset. In the first case, HTC is trained with normal images whereas it is trained with low light images in the second case.} \label{tab:dataper} \end{table} \begin{table}[t] \renewcommand{1.4}{1.4} \resizebox{\columnwidth}{!}{ {\begin{tabular}{c|c|c c c|c c } \hline \textbf{Method} & \textbf{Type} & \textbf{AP} & \textbf{AP\textsubscript{50}} & \textbf{AP\textsubscript{75}} & \textbf{AP\textsubscript{S}} & \textbf{AP\textsubscript{M}} \\ \hline \hline \multirow{2}{*}{HTC trained in low light} & Box & 41.7 & 61.8 & 46 & 25.2 & 49.3 \\ \cline{2-7} & Segm & 34.3 & 57.6 & 35.8 & 19.4 & 41.1 \\ \hline \end{tabular}}\quad } \caption{Performance of HTC on the val set of iSAID dataset, when it is trained with low light images} \label{tab:arch-AP} \end{table} We also evaluate the performance of the second variant of HTC on clear aerial images. Table~\ref{tab:arch-AP} clearly demonstrates that even though HTC was trained on low light aerial images, it maintains good generalisation and performs significantly well on clear normal images too. This observation indicates that training networks with dataset having adverse conditions provides them a good generalising power, whereas not doing so may lead to poor performance in disadvantageous scenarios. \subsection{Dataset Generation: Additional Details} We generate a new low light aerial image dataset, consisting of mask and box annotations for instance segmentation using a GAN based approach. We generate this by transferring the low light attribute from the LOL dataset to iSAID, which is an aerial dataset consisting of annotations in COCO format. We use a CycleGAN for this purpose and train it for 100 epochs at a learning rate of 0.0001. The GAN mode is set to 'lsgan' configuration whereas the discriminator mode is configured with a 'basic' setting. We set the crop size to 600 during the training process in order to maximize the field view of the GAN model. Fig~\ref{fig:ll-data} represents some examples of the low light images generated. It is clear that the generated images successfully capture the low light property and retain the core feature representation of the original image. \subsection{Testing the Low Light Enhancement Module} We train and validate the performance of the self-supervised low light enhancement module separately from the main method proposed in our work. We train the CNN module for 85 epochs on the low light aerial dataset at a learning rate of 0.0001. At the end of the training, we test the performance of the trained module on some dark test images. Fig~\ref{fig:llrecov} illustrates that the light enhancement module is proficient in restoring the brightness of the image. All the core features in the image have been retained and the image has been enhanced which facilitates good performance of the computer vision techniques. \begin{figure*}[t] \centering \includegraphics[scale=0.7]{images/LowLightData.jpg} \caption{Low light dataset generated from iSAID and LOL using CycleGAN. Images on the left correspond to the iSAID dataset, images on the right are synthetically generated.} \label{fig:ll-data} \end{figure*} \begin{figure*}[t] \centering \includegraphics[scale=0.8]{images/LightEnhancement.jpg} \caption{Enhancement of low light images using the self-supervised light enhancement module.} \label{fig:llrecov} \end{figure*} \section{Acknowledgements} This work is supported by BITS Additional Competitive Research Grant (PLN/AD/2018-19/5). \small{
\section{Introduction}\label{sec:introduction} \indent Bone age differs from the chronological age and often varies with the gender and ethnicity~\cite{boneagereview}. Bone age assessment (BAA) is typically used to estimate the skeletal maturity and diagnose the growth problem of children. There are two widely employed methods for BAA using hand radiographs in clinical practice: the Greulich-Pyle (GP) method~\cite{todd1950radiographic} and the scoring methods (e.g., the Tanner-Whitehouse method~\cite{tanner1975prediction}). In the GP method, bone age is estimated by referring the entire hand radiographs to the atlas. In the scoring methods, doctors analyze and score the region of interests (e.g., the joints) of the hands individually, and use the weighted sum of these scores to estimate the bone age. It was verified that the scoring methods were more accurate and reliable than the GP method~\cite{boneagereview}.\\ \indent Recently, various automatic BAA methods were proposed~\cite{bonet,superpixel,zhang2019deep,ARCNN}. Similar to the processing of the GP method, most of these models predicted bone ages by capturing the features of the entire hand, which benefited from the capability of deep learning models. Larson et al.~\cite{larson2018performance} built a classifier to predict bone ages, using ResNet50~\cite{he2016deep} as the backbone. Iglovikov et al.~\cite{iglovikov2018paediatric} trained several end-to-end regression models and predicted bone ages using the model ensemble strategy. In~\cite{van2018automated}, the Gaussian process regression was employed to increase the sensibility to the hand pose. Wang et al.~\cite{wang2018bone} followed the structure of Faster-RCNN to predict bone ages. Besides, attention methods were utilized in~\cite{superpixel,ARCNN} to highlight the essential parts of the hands. A relation computing module was introduced in~\cite{PRSNet} to better deal with the important parts of the hands. A new annotation for the Central Positions of Anatomical ROIs (CPAR) to the Radiological Society of North America BAA (RSNA-BAA) dataset was published~\cite{bonet}, which provided the ground truth central positions of the anatomical region of interests (ROIs). Using the CPAR annotations, BoNet~\cite{bonet} promoted the performance of the challenge champion methods. Although these methods could obtain good performance in BAA, they used features of the entire hands and incurred poor interpretability. Following the scoring methods, TW-AI~\cite{yitu} predicted bone ages based on the scores of ROIs, and thus promoted interpretability. However, training TW-AI required full supervision of the ground truth ROI scores, which was uneconomical and hard to popularize.\\ \indent Motivated by the ROI-dependent classification method with weak supervision in \cite{kazi2017automatic}, in this paper we propose a novel deep learning framework, called Doctor Imitator (DI), for predicting ROI scores and bone ages using hand radiographs with only bone age supervision. DI is designed by imitating the diagnostic logistics of doctors and the processing of the scoring methods, and obtains excellent and interpretable results with extremely low model complexity. Specifically, we propose an Anatomy-based Group Convolution (AG-Conv) to predict ROI scores using the local features of ROIs and sum up the ROI scores for the bone age prediction. In clinical practice, an experienced doctor may assign the ROI scores with the consideration of some patient-specific characteristics of the bones. Motivated by this, we develop a novel Dual Graph-based Attention Module (DGAM) to assist ROI score prediction, which consists of two new graph-based convolution (GConv) blocks. These two GConv blocks compute a patient-specific attention map for the ROI features and a context attention map for ROI scores, respectively. Different from the previous graph-based convolution (GConv) methods, our new GConv constructs two graphs on one radiograph and updates the features of nodes according to these two graphs simultaneously. Experiments on the RSNA-BAA dataset and a private dataset verify that our DI framework achieves good performance on bone age prediction and ROI score prediction with only bone age supervision.\\ \indent There are three main contributions in this work. \textbf{(A)} We propose a novel deep learning model to predict bone ages and ROI scores, following the diagnostic logistics of doctors and the scoring methods. \textbf{(B)} We introduce a novel dual graph-based attention module to compute patient-specific attention and context attention, updating the node features with two graphs simultaneously. \textbf{(C)} Experiments show that our DI framework can predict ROI scores with only bone age supervision, and thus increase the interpretability of the model.\\ \begin{figure}[tb] \centering \includegraphics[width=\textwidth]{figures/realdoctor_framework.pdf} \caption{Illustrating our two-stage Doctor Imitator framework. The first stage (\textit{Hand Pose Estimation}), framed in the blue box, predicts the central positions of ROIs. In the second stage, the local features of ROIs are extracted to predict ROI scores, which are summed up for bone age prediction. A Dual Graph-based Attention Module (DGAM) computes two attention maps to help ROI score prediction. The feature sizes are marked above the feature maps.} \label{fig:framework} \end{figure} \section{Doctor Imitator Architecture} \indent When estimating bone ages using the scoring methods, doctors often analyze the local characteristics of anatomical ROIs (e.g., some joints), and assign a score to every ROI according to the criteria. When assigning scores, experienced doctors also consider some common characteristics of the patient's bones. Finally, the ROI scores are summed up for bone age prediction. Imitating this process, we design a two-stage Doctor Imitator (DI) framework for bone age prediction, as illustrated in Fig.~\ref{fig:framework}. In the first stage, a {\it Hand Pose Estimation} model is trained to predict the central positions of ROIs. Since the first stage is not the focus of this work, we use just the {\it Hand Pose Estimation} model of BoNet~\cite{bonet} by re-implementing it. In the second stage, we train a model to predict ROI scores and bone ages. We take the modified SSN~\cite{SSN} as the backbone, called Improved SSN (ImSSN), to extract the features of hand radiographs. Then we extract the feature pillars (the local features) of the predicted ROIs and perform an Anatomy-based Group Convolution (AG-Conv) module on the ROI feature pillars to predict the ROI scores. During the score prediction, a novel Dual Graph-based Attention Module (DGAM) is utilized to compute patient-specific attention for ROI features and context attention for ROI scores. Finally, we sum up the weighted ROI scores (the weights are provided by context attention) as the predicted bone age. We train the second stage of DI using $L_1$ loss. In our DI framework, there are 17 ROIs (see Fig.~\ref{fig:Anatomy}), since we train the first stage ({\it Hand Pose Estimation}) using the CPAR ground truth data~\cite{bonet}.\\ \indent In what follows, we describe the backbone and feature pillar extraction in Sec.~\ref{sec:featurepillar}, the AG-Conv module for ROI score prediction in Sec.~\ref{sec:AGConv}, and the DGAM for attention computing in Sec.~\ref{sec:dgam}. \subsection{Backbone and Feature Pillar Extraction} \label{sec:featurepillar} \indent In clinical practice, doctors assign ROI scores based on ROI local features. We use SSN~\cite{SSN} with some modification as the backbone, called improved SSN (ImSSN), which is a network similar to U-Net and extracts multi-scaled features. We add a $3 \times 3$ average pooling layer on the top-most layer of SSN, and preserve only the $8\times$ and $16\times$ down-sampled branches and output a $16\times$ down-sampled feature map.\\ \indent We use ImSSN to process a hand radiograph and obtain a feature map $F_m \in \mathbb{R}^{C \times H/16 \times W/16}$, where $(H, W)$ is the size of an input hand radiograph, and $C$ is the number of feature channels. To obtain the local features of the ROIs, we project the predicted ROI central positions onto the feature map $F_m$, and take the features on the projected positions as the local features of ROIs. This position projection can be formulated by: \begin{equation}\label{eq:position} (i,j) = (\lfloor\frac{I}{s}\rfloor, \lfloor\frac{J}{s}\rfloor) \end{equation} where $(I, J)$ indicates the original central position of an ROI, $(i, j)$ is the corresponding position on the feature map, and $s$ is the down-sampling rate of ImSSN ($s=16$ in this work). As a convolution captures features by fusing the features around, the feature pillars on the projected positions can represent the features of different ROIs. We extract the feature pillars as: \begin{equation} F_p = F_m[:, i, j] \end{equation} where $F_p \in \mathbb{R}^{C \times 1 \times 1}$ is the feature pillar of an ROI. Besides, since the gender and ROI central positions are helpful to ROI score prediction, we add a binary value representing the gender and the original ROI central position to the corresponding feature pillar, thus $F_p \in \mathbb{R}^{(C+2+1) \times 1 \times 1}$, as illustrated in Fig.~\ref{fig:framework}.\\ \subsection{Anatomy-based Group Convolution Module} \label{sec:AGConv} \indent In the scoring methods (e.g., the TW methods), the ROIs with similar anatomy usually use similar scoring criteria. In Fig.~\ref{fig:Anatomy}, the ROIs marked with the same letters (e.g, $\text{A}_1, \text{A}_2, \text{A}_3, \text{A}_4, \text{A}_5$) are anatomically similar, and the ROIs can be divided into four \textit{anatomy groups}: A, B, C, and D. Following this, we propose an Anatomy-based Group Convolution (AG-Conv) module with four convolution blocks corresponding to the four \textit{anatomy groups}. For the ROIs in an \textit{anatomy group}, one convolution block is used to process the feature pillars and predict the scores. These convolution blocks can be implemented by one-by-one convolutions with batch normalization and ReLU activation, and thus the AG-Conv module shall be very light.\\ \begin{figure}[tb] \centering \includegraphics[width=6.3cm]{figures/similar2.pdf} \caption{Illustrating the ROI central positions and the receptive fields on different graphs (see Sec.~\ref{sec:dgam}). The receptive field of $\text{B}_3$ on graph $\mathcal{G}_1$ is in the green curve region shown in the left sub-figure. The receptive field of $\text{C}_2$ on graph $\mathcal{G}_2$ is shown in the red curve region in the right sub-figure.}\label{fig:Anatomy} \end{figure} \subsection{Dual Graph-based Attention Module} \label{sec:dgam} \indent When assigning scores to ROIs, an experienced doctor not only focuses on the local characteristics of bones but also pays attention to some patient-specific characteristics. Besides, the ROI scores are weighted and summed up for bone age prediction in the scoring methods. Following this process, we propose a Dual Graph-based Attention Module (DGAM) with two graph-based Convolution blocks to compute patient-specific attention maps for ROI feature pillars and a context attention map for ROI scores, which are different from the self-attention style in the known graph-based attention methods (e.g., GAT~\cite{GAT}).\\ \textbf{Graph Construction.}\indent Different from the previous graph-based methods, we construct two undirected graphs $\mathcal{G}_1=(\mathcal{V},\mathcal{E}_1)$ and $\mathcal{G}_2=(\mathcal{V}, \mathcal{E}_2)$ on one hand radiograph with $N$ ROIs. The node set $\mathcal{V}=\{v_i \in \mathbb{R}^{f}\}$ includes all the ROIs presented with the corresponding feature pillars, for $i=1,2,\ldots,N$ and the feature dimension\footnote[1]{For simplicity, the last two dimensions ($1 \times 1$) of the feature pillar $F_p \in \mathbb{R}^{(C+3) \times 1 \times 1}$ are discarded.} $f=C+3$. Graphs $\mathcal{G}_1, \mathcal{G}_2$ have the same node set $\mathcal{V}$, but their edge sets $\mathcal{E}_1$ and $\mathcal{E}_2$ are different. The edge set $\mathcal{E}_1$ contains the natural connections of joints (ROIs), and $\mathcal{E}_2$ contains the full connections among the ROIs in the same {\it anatomy group}. For example, in Fig.~\ref{fig:Anatomy}, the nodes connected with $B_3$ are $A_3$ and $C_3$ in graph $\mathcal{G}_1$, while in graph $\mathcal{G}_2$, nodes $\text{B}_1, \text{B}_2, \text{B}_3, \text{B}_4, \text{B}_5$ (in the same {\it anatomy group}) are connected to one another. Besides, self-connections are also available to all the nodes in both $\mathcal{G}_1$ and $\mathcal{G}_2$. Since the relation among the ROIs in an {\it anatomy group} and the relation among the naturally connected ROIs (joints) are different, constructing two graphs is helpful to model these relations.\\ \textbf{GConv Blocks.}\indent DGAM consists of two GConv blocks (see Fig.~\ref{fig:framework}), one for patient-specific attention computing, called Patient-specific Attention Block (PAB), and the other for context attention computing, called Context Attention Block (CAB). Both blocks are implemented in a spatial graph-based convolution manner~\cite{wu2019comprehensive} to make the model light. To feed the nodes (ROIs) presented by feature pillars to a GConv, we reformat the ROI feature pillars on a radiograph into a matrix $X_{(N \times f)}$, where $f$ is the feature dimension and $N$ is the number of ROIs (nodes). Given the graphs $\mathcal{G}_1, \mathcal{G}_2$, the GConv operation can be defined by: \begin{equation}\label{eq:gconv} X_{(N \times f_{i+1})} = \frac{1}{2} \sum_{j=\{1,2\}} L_{(N \times N)}^{(j)} X_{(N\times f_i)} W^{(j)}_{(f_i \times f_{i+1})} \end{equation} where $j$ indexes the graphs $\mathcal{G}_j$ $(j\in \{1,2\})$. $W^{(j)}$ is a learnable weight matrix for node feature updating and can be implemented by a one-dimensional convolution. The subscripts of the matrices indicate the matrix sizes. $f_i, f_{i+1}$ indicate the feature dimensions before and after feature updating, respectively. $L^{(j)}=[D^{(j)}]^{-\frac{1}{2}} (A^{(j)}+I) [D^{(j)}]^{\frac{1}{2}}$ is the normalized Signless Laplacian matrix on $\mathcal{G}_j$, and $A^{(j)}, D^{(j)}$ are the first order adjacency matrix and the degree matrix, respectively. By Eq.~(\ref{eq:gconv}), the node features are updated by aggregating the features from the neighboring nodes based on the two graphs. Both PAB and CAB are implemented by sequentially stacking the GConvs (as in Eq.~(\ref{eq:gconv})), with different output channel dimensions. Specifically, PAB outputs a feature map in the same size as the input node features as $Att^X \in \mathbb{R}^{N \times f}$, and CAB outputs a feature map $Att^S \in \mathbb{R}^{N \times 1}$.\\ \textbf{Attention Computing.}\indent The patient-specific attention presents the importance of the feature channels. Thus, we apply the node-wise average to compute the patient-specific attention map $\overline{Att}^X_{(N \times f)}$ by: \begin{equation} \overline{att}^X = \frac{1}{N} \sum^N_{n=1} att^X_{n} \end{equation} where $[att^X_1, att^X_2, \ldots, att^X_N]=Att^X_{(N \times f)}$ and $\overline{Att}^X_{(N \times f)}=[\overline{att}^X, \overline{att}^X, \ldots, \overline{att}^X]$. $att^X_{n}$ and $\overline{att}^X$ are feature vectors of size $f$. In the scoring methods, the weights of ROIs are the same for every patient of the same gender. Hence, in training, we use the exponential moving average (EMA) to compute the general context attention map conditioned by the gender, with the updating parameter $\theta=0.01$, as specified in Eq.~(\ref{eq:average}). In testing, we just used the attention maps learned in training stage. \begin{equation}\label{eq:average} \overline{Att}^S_{g} \leftarrow (1-\theta) \overline{Att}^S_{g} + \theta Att^S_{g \mid B} \end{equation} where $\overline{Att}^S_{g}$ indicates the general context attention map of the gender $g$ while $Att^S_{g\mid B}$ indicates the average of the predicted context attention of gender $g$ in the batch $B$. $\overline{Att}^S_{g}$ is initialized as $Att^S_{g\mid B=1}$. Then the attention maps are applied to the feature pillars $X_{(N \times f)}$ and the ROI scores $S_{(N \times 1)}$ of one radiograph by: \begin{equation} \left\{\begin{aligned} & X^*_{(N \times f)} = \overline{Att}^X_{(N \times f)} \odot X_{(N \times f)}\\ & S^*_{(N \times 1)} = \overline{Att}^S_{(N \times 1)} \odot S_{(N \times 1)} \end{aligned} \right. \end{equation} where $\odot$ denotes the Hadamard production, and $X^*_{(N \times f)}$ and $S^*_{(N \times 1)}$ are the feature pillars and ROI scores updated by the attention maps.\\ \section{Experiments} \textbf{Dataset.}\indent We evaluate Doctor Imitator (DI) on the RSNA-BAA dataset \cite{bonet,halabi2019rsna} and RHPE dateset \cite{bonet}. RSNA-BAA contains 12,611 hand radiographs in the training set, 1,425 radiographs in the validation set, and 200 radiographs in the test set. The ground truth bone ages are from 0 to 18 years. RHPE is composed of 5,492 hand radiographs in the training set, 715 radiographs in the validation set, and 80 radiographs in the test set. The ground truth bone ages of RHPE vary from 0 to 20 years. Before processing by DI, all the radiographs are resized to $512 \times 512$. Besides, we use the CPAR ground truth in~\cite{bonet} to guide the ROI central position prediction by the {\it Hand Pose Estimation} models~\cite{bonet}. Similar to the previous work, we report the Mean Absolute Difference (MAD) between the predicted bone ages and the corresponding ground truth bone ages.\\ \textbf{Experimental Setup.}\indent We implement DI by PyTorch 1.3. We train the second stage of DI with 200 epochs. The batch size is 48. The initial learning rate is $10^{-3}$, and is reduced by $10 \times$ after 60 epochs and is reduced by $10 \times$ again after 120 epochs. The optimizer is Adam~\cite{Adam}. We employ random flip, rotation ($-5^{\circ}\sim 5^{\circ}$), and the Gaussian blur Operation for data augmentation.\\ \textbf{Performance and Complexity Comparisons.}\indent We compare DI with the state-of-the-art BoNet~\cite{bonet} on the MAD and model complexity. As the ground truth annotations of the RHPE test set are not available and the evaluation server~\cite{bonet} is not stable, we compare DI and BoNet on the validation set of RHPE. The performances of BoNet reported on the RHPE validation set are obtained by running the open source codes\footnote[1]{\url{https://github.com/BCV-Uniandes/Bonet}}. As shown in Table \ref{table:comparison}, our DI outperforms BoNet on the RSNA and RHPE with various percentages (10\%, 20\%, 40\%, 100\%) of the training samples available. Comparing to the public implemented version of BoNet~\cite{bonet}, the bone age prediction part of DI is over $12 \times$ smaller in model size than the bone age prediction part of BoNet. Also, evaluated on the number of floating-point multiplication-adds (FLOPs) on our GPU, DI outperforms BoNet by a clear margin. In inference, DI is $\sim 3\times$ faster than BoNet, handling 98.2 bone age radiograph frames per second (fps). Experiments show that DI is very efficient, attains good performance, and has low model complexity.\\ \begin{table}[tb] \begin{tabular}{c|cccccccc|ccc} \hline \multirow{2}{*}{Model} & \multicolumn{2}{c}{10\%} & \multicolumn{2}{c}{20\%} & \multicolumn{2}{c}{40\%} & \multicolumn{2}{c|}{100\%} & \multirow{2}{*}{Model Size} & \multirow{2}{*}{FLOPs} & \multirow{2}{*}{fps} \\ \cline{2-9} & RH & RS & RH & RS & RH & RS & RH & RS & & & \\ \hline BoNet~\cite{bonet} & 12.65* & 6.78 & 11.73* & 6.18 & 10.14* & 5.31 & 8.19* & 4.37 & 123.2 M & 17.8 & 39 \\ DI(ours) & \textbf{12.28} & \textbf{6.42} & \textbf{11.36} & \textbf{6.04} & \textbf{10.12} & \textbf{5.26} & \textbf{8.15} & \textbf{4.30} & \textbf{9.8 M} & \textbf{13.1} & \textbf{98.2}\\ \hline \end{tabular} \caption{Comparison on the performances and the model complexity with the state-of-the-art BoNet~\cite{bonet}. The percentages in the parentheses indicate what percentage of the training samples are used in training. ``RH'' indicates ``RHPE'' and ``RS'' indicates ``RSNA''. ``*'' marks the results of BoNet obtained from the open source codes we run.}\label{table:comparison} \end{table} \textbf{Doctor Imitating Improvement Study.} \indent DI is designed by imitating the diagnostic logistics of doctors. The experimental results on RSNA-BAA dataset in Table~\ref{table:ablation} verify that imitating doctors obtains improvements. To show the capability of AG-Conv, we compare it with the Random Group Convolution (RG-Conv). In performing RG-Conv, we group the ROIs into four groups randomly and process the ROIs in the groups with the same convolution module. One can see that it is helpful by using the same convolutions on the anatomically similar ROIs. Comparing Exp.4, Exp.5, and Exp.6 in Table~\ref{table:ablation}, it is evident that both of the patient-specific attention and context attention are helpful.\\ \begin{table}[tb] \begin{tabular}{c|ccccc|c} \hline Exp. & ImSSN & AG-Conv & RG-Conv & PA & CA & MAD \\ \hline 1 & \checkmark & & & & & 5.38 \\ 2 & \checkmark & \checkmark & & & & 4.86 \\ 3 & \checkmark & & \checkmark & & & 4.99 \\ 4 & \checkmark & \checkmark & & \checkmark & & 4.57 \\ 5 & \checkmark & \checkmark& & & \checkmark & 4.51 \\ 6 & \checkmark & \checkmark & & \checkmark & \checkmark & 4.30\\ \hline \end{tabular} \caption{Ablation study on the proposed modules of DI. ``PA'' denotes the patient-specific attention and ``CA'' denotes the context attention.} \label{table:ablation} \end{table} \begin{figure}[tb] \centering \includegraphics[width=0.85\textwidth]{figures/score_prediction.pdf} \caption{Illustrating the ROI scores (blue points) and the ground truth ROI scores (yellow points). The $x$-axis indexes the patients, while the left $y$-axis shows the ground truth ROI scores and the right $y$-axis shows the predicted ROI scores. The points are connected to better show the consistence of the ground truth scores and the predicted scores.} \label{fig:inter} \end{figure} \textbf{Interpretability and Standard ROI Score Prediction.} \indent To evaluate the interpretability of DI, we test DI on a private dataset that includes 38 hand radiographs with 11 ROI scores annotated following the Chinese-CHN method. DI is first trained on the RSNA-BAA dataset and then fine-turned on the private dataset. As shown in Fig.~\ref{fig:inter}, one can see that the predicted ROI scores highly coincide with the ground truth ROI scores. In practice, the predicted ROI scores can be translated to the standard scores of the scoring methods by a mapping function (similar to the inverse mapping from ROI scores to bone ages in the scoring methods, which is used in many scoring methods). \section{Conclusions} \indent In this paper, we proposed an automatic bone age assessment model, Doctor Imitator (DI), by imitating the diagnostic logistics of doctors using the scoring methods. An Anatomy-based Group Convolution was proposed to predict the ROI scores by processing the local features of ROIs. Besides, a novel Dual Graph-based Attention Module was introduced to compute the patient-specific attention and context attention for ROI score prediction. As far as we know, DI is the first BAA framework following the processing of the scoring methods with only bone age supervision. Compared with the state-of-the-art, DI achieves good performance with low model complexity and excellent interpretability.\\ \section{Acknowledgements} The research of Real Doctor AI Research Centre was partially supported by the Zhejiang University Education Foundation under grants No.K18-511120-004, No.K17-511120-017, and No.K17-518051-021, the National Natural Science Foundation of China under grant No.61672453, the National key R\&D program sub project ``large scale cross-modality medical knowledge management'' under grant No.2018AAA0102100, the Zhejiang public welfare technology research project under grant No.LGF20F020013, the National Key R\&D Program Project of ``Software Testing Evaluation Method Research and its Database Development on Artificial Intelligence Medical Information System'' under the Fifth Electronics Research Institute of the Ministry of Industry and Information Technology (No.2019YFC0118802), and The National Key R\&D Program Project of ``Full Life Cycle Detection Platform and Application Demonstration of Medical Artificial Intelligence Product'' under the National Institutes for Food and Drug Control (No.2019YFB1404802), and the Key Laboratory of Medical Neurobiology of Zhejiang Province. The research of D.Z. Chen was partially supported by NSF Grant CCF-1617735.\\ \bibliographystyle{splncs04}
\section{Conclusions} We have presented an approach towards tangible cultural heritage experiences. Our method allows interactive and collaborative VR-based object inspection and annotation based on high-quality 3D models with accurate reflectance characteristics, while additionally providing haptic feedback regarding the object shape features based on a 3D printed replica. As demonstrated by our user study, the additional haptic feedback enriches VR-based interaction, assessment and experience of the considered objects, which, in turn, indicates the potential of our approach. While the navigation speed is on par with alternative VR-based interaction methods, providing haptic feedback regarding the object shape enhances the overall experience. In future work, we would also see the possibility to circumvent the use of a hardware tracking device, e.g. based on printing patterns used for tracking into the geometry. \subsection{Limitations} Despite the benefits of allowing an improved, \emph{tangible} remote object experience with particularly better capabilities regarding interactive object inspection and object assessment, our approach also faces limitations. One major limitation is the resolution of current VR-HMDs, which is an issue that will hopefully be resolved in the near future by the next generations of HMDs. On the other end, higher display resolutions also demand for higher resolution of the used OctreeBTF, which, in turn, requires for more powerful GPUs with more video memory, and better compression techniques for real-time streaming. Also, the used 3D printing process has some limiting factors. The use of an FDM-printer, which prints objects layer by layer, causes these layers to be perceivable when touching the object and probably impact the haptic feedback regarding fine geometrical features of the object. A solution would be to use a SLA-printer, which can produce much thinner layers and thus can better preserve small structures of the object. However, we only expect a small impact on the perception in the scenarios shown in the scope of our evaluation, as the respective object features were easy to perceive, and that the overall tendency of an improved tangible object experience will only be slightly improved. Furthermore, most 3D printers are limited to one material which is usually plastic, but also wood like materials are possible. Some printers have multiple extruders, which allow for multi-material prints, but these materials are all of the same kind, e.g. one cannot mix plastic and wood-materials. We hope that in the future, these issues can be resolved by more advanced printing technology, and, hence, do not consider them to be permanent limitations of our overall approach towards creating tangible object experiences. \section{Experimental Results} To demonstrate the potential of our approach, we provide a perceptual evaluation obtained in terms of a user study as well as evaluations regarding visual quality and performance. In addition, we compare our enhanced VR system to a purely 2D screen-based application with the same features. \subsection{User Study} \label{sec:study} To verify whether the combination of VR-based object visualization as well as haptic feedback actually enriches the experience of inspecting cultural artifacts, we performed a user study where the participants had to inspect an object and perform certain tasks, such as annotating spots or describing materials or reflectance behavior of the respectively considered object. All participants were naive to the goals of the experiment, provided informed consent, reported normal or corrected-to normal visual and hearing acuity. During the experiment, the participants had to perform the given tasks in three different modes: \begin{itemize} \item In the first mode $M_1$, the 2D application was used where the user can manipulate the object displayed on a standard screen based on mouse/keyboard interactions. \item In the second mode $M_2$, users could interact with our novel VR-based application without haptic feedback (i.e. the virtual model was attached to the second controller of the VR-system instead). \item In the third mode $M_3$, users were able to interact with the objects based on our VR-application and the printed model to allow for an additional haptic feedback. \end{itemize} To avoid biases, we varied the order of these modes for individual participants, i.e. the participants started with different modes. For each condition, the participants were asked to provide ratings on a 7-point Likert scale regarding aspects such as visual quality, adequacy for inspection, quality of object experience and ease of interacting with the object, performing annotations or controlling view and light conditions. The results shown in figure \ref{fig:study_results} demonstrate that the approaches $M_2$ and $M_3$ outperform the 2D application $M_1$ in terms of the ease of inspecting the object and controlling light conditions and, hence, result in a better overall experience and intuitiveness regarding the interactions, which may be a result of the higher intuitiveness of hand-based interactions with objects. The latter represent a kind of canonical approach for us humans to access real 3D objects in our daily lifes. In comparison to the depiction of objects on a screen and keyboard/mouse based interactions ($M_1$), users particularly acknowledged the easiness of controlling the viewpoint based on VR-based systems $M_2$ and $M_3$. Furthermore, users seemed to benefit from additionally using a printed replica ($M_3$) regarding the view control. Mode $M_3$ additionally also received the best ratings regarding the quality of object assessment and object experience which were likely to also result in the best overall ease of assessment. However, the resolution of the 2D application $M_1$ was rated higher than for the VR modes $M_2$ and $M_3$, which is a result of the limited resolution of the used HMD. Finally, we expect the lower scores regarding the annotations observed for Modes $M_2$ and $M_3$ in comparison to $M_1$ to be the result of the absence of a standard keyboard for entering text. Here, the use of a virtual keyboard, where a laser-pointer is used to target each letter individually would have to be exchanged by a respective speech recognition system to rapidly allow adequate text annotations. However, as this aspect does not touch the main insights to be gained in the scope of this investigation -- that the use of haptic feedback within a VR-based object exploration improves the object experience -- we leave it for future work. \begin{figure*} \centering \includegraphics[width=\linewidth, keepaspectratio]{images/study_results.png} \caption{Statistical results of our user study. Statistics regarding ratings obtained for mode $M_1$ are colored in red, the ones for mode $M_2$ in green and the ones for mode $M_3$ in blue. The illustration includes lower and upper fence (dashed line), interquartile range (colored bar), median (marked with a vertical bar), outliers (marked with $\bullet$) as well as the average value (marked with $\times$). For most aspects, the VR-based modes $M_2$ and $M_3$ outperform the 2D application ($M_1$) with keyboard-mouse controls. The additional use of haptic feedback of the object geometry further improves the quality of object experience and assessment as well as view control and leads to the best overall ratings.} \label{fig:study_results} \end{figure*} \subsection{Intuitiveness of Interaction} In a further experiment, we focused on the analysis whether the improved intuitiveness of interaction reported in our previous study can also be seen in the times required for users to perform certain tasks, that involve an interaction with the object such as rotating it. To further evaluate if providing the exact geometry for haptic feedback benefits the interaction, we also provided a simple geometry in terms of a 3D printed cube which was mounted on the tracker (denoted as $M_4$). In this experiment, the participants were first asked to highlight a fixed series of spots on the object by clicking on the object and placing an annotation. To separate the impact of the object interaction from the textual annotation, we only focused on the times to mark the respective surface points and discarded the entering of text information for this experiment. Each participant performed this task in all the modes $M_1$, $M_2$, $M_3$ described in Section~\ref{sec:study} as well as the new mode $M_4$, starting with alternating modes to eliminate biases. We constructed several series of points the users had to annotate, and alternated the series between the modes and participants to eliminate learning effects. The series of spots were defined in such a way, that the object has to be rotated in order to annotate the next spot, and when done, the participants were asked to rotate the object back to its original position. In addition, we let the users draw strokes along characteristic object features (neck, face and legs of the Buddha figurine) in all four modes. The respectively required interaction times are displayed in Figure~\ref{fig:study_results2} and indicate that providing any form of immersive presentation is beneficial for navigation when the object has to be rotated in order to perform a certain task. Further providing haptic feedback regarding the object shape gives an additional small benefit, that can be seen in the variance of the interaction times. \begin{figure*} \centering \includegraphics[width=\linewidth,keepaspectratio]{images/study_results3.png} \caption{Comparison of interaction times for marking a fixed series of spots on an object as well as drawing strokes along characteristic object features. Interaction times for 2D application ($M_1$) are shown in red, times for $M_2$ are given in green, values for the VR mode with haptic feedback ($M_3$) are given in red the new mode $M_4$ is printed in yellow.} \label{fig:study_results2} \end{figure*} \subsection{Visual Quality} As we considered a reflectance representation in terms of OctreeBTFs~\cite{Krumpen:2017}, there are no seams and distortions that affect the visual quality in comparison to the use of conventional BTFs parameterized over the 2D object surface. However, we had to turn off the spatial filtering of OctreeBTFs in the VR mode to meet the performance requirements for interactive VR-based visualization. Despite this, the limited OctreeBTF resolution only becomes visible when the object is held very close to the HMD. In Figure \ref{fig:screen_label}, we show a set of screenshots from the 2D version of the application, where different objects are placed in different environment lighting and some surface points have additionally been annotated by a user. Furthermore, the dependence of object appearance under varying illumination conditions (in this example, the light source is moved) is shown in Figure \ref{fig:lighting}. \begin{figure*} \centering \includegraphics[width=\linewidth, keepaspectratio]{images/Screenshots/screen_2x2_smaller.png} \caption{Screenshots of the 2D application where two objects are lit by different environments with the user-controlled light being disabled. In the right images some object parts have been annotated by the user. Please note that the textsize has been increased while capturing the screenshots for better readability. In the real application, the texts are much smaller.} \label{fig:screen_label} \end{figure*} \begin{figure*} \centering \includegraphics[width=\linewidth]{images/Screenshots/lighting.png} \caption{A series of screenshots of the 2D application where the environment lighting is disabled and the user-controlled light is moved on an arc above the object, showing how the reflectance changes according to the light position.} \label{fig:lighting} \end{figure*} \subsection{Performance analysis} To analyze the performance of our approach, we measured the average frametimes over a period of about 30 seconds during a typical interaction scenario as seen in Figure \ref{fig:interact}, both using the 2D application and the VR version. When rendering an OctreeBTF, or BTFs in general, the main bottleneck is the amount of data that has to be read from the VRAM each frame, which means that rendering is mainly bandwidth limited. The amount of data mainly depends on the number of screen pixels covered by the object, which determines how much of the spatial BTF data has to be fetched from the VRAM, and the number of light sources used to approximate the illumination as we need to sample the angular data for each light source. To get insights regarding how much the additional lights used to represent the environment (in our experiments, we approximated environments using eight light sources) affect the performance, we performed the measurement once without considering environment lighting and once with the respective environment. When interacting with the objects, we additionally took typical distances for close-range inspection into account to provide a realistic scenario, which means that a large fraction of the screen pixels of the virtual camera of the 2D application or, in the VR case, the HMD are covered. As shown in Table \ref{table:framerates}, frametimes are as expected higher when rendering in VR, even exceeding 28ms, leading to 35 frames per second, i.e. a slight stuttering of the rendering, due to the increased resolution and the fact that we have to render the scene twice to allow the stereo impression. However, interestingly, this aspect was not perceived to be disturbing by the participants during the user study (see Section~\ref{sec:study}). We further noticed that after the BTF is fully streamed, and the last octree level has been uploaded to the GPU, the frametimes increase significantly. This is due to the fact that at this point there is an increase in the amount of data the GPU has to fetch from the VRAM for each pixel. In addition, we observed that the frametimes decrease again when the object is really close to the camera. This happens when one voxel of the octree covers more than one screen pixel, which means that the overall number of visible voxels decreases as well as the amount of data the GPU needs to fetch from the VRAM. Then, the data can be cached between shader invocations that process the same voxel. But for this effect to occur, the object must be held really close to the camera, especially in VR, and the spatial resolution of the BTF becomes visible. \begin{table} \caption{Average frametimes {[}ms{]} and frames per second {[}Hz{]} for both the 2D application and the VR applications. The values were measured during a typical interaction scenario.} \label{table:framerates} \begin{tabular}{lcc} \toprule & \textbf{2D} & \textbf{VR} \\ \midrule With environment & 18.18 / 55 & 28.50 / 35 \\ Without environment & 14.28 / 70 & 18.18 / 55 \\ \bottomrule \end{tabular} \end{table} \section{Introduction} The potential of the rapidly emerging VR/AR technology lead to a new paradigm of presenting cultural heritage contents to the public and opens new opportunities regarding their analysis by expert and non-expert users. Instead of an inspection and analysis solely based on depictions in static images, presenting digitized CH artifacts in terms of fully immersive and interactive experiences comes into reach. The ability of creating an immersive experience of digitized artifacts is particularly relevant for the less stressful analysis/inspection of highly fragile objects, that may easily take damage during inspection, analysis or transport. Furthermore, several artifacts are susceptible to certain environment conditions such as temperature, humidity or illumination conditions. Hence, it is difficult or even impossible to include them in public exhibitions and complicates their use for scientific or educational purposes. Instead, using accurately digitized virtual counterparts allows avoiding the use of the real artifact during inspection, analysis and transport and, additionally, opens new possibilities for simultaneous artifact inspection such as required for virtual museum experiences or collaborative analysis by experts situated at different physical locations. However, the realization of such a virtual, optionally collaborative, object analysis and annotation depends on several crucial factors that have to be met to allow a pleasing experience while preserving as much of the aura of CH contents \cite{Benjamin:1935} as possible. These challenges include the accurate object/scene digitization and representation, where both geometric object details as well as characteristic details of material appearance like reflectance behavior at scratches, engravings, etc. have to be captured, as well as intuitive interaction metaphors. State-of-the-art reflectance representations based on memory-consuming bidirectional texture functions (BTFs)~\cite{Schwartz:2011,Schwartz:2014,Krumpen:2017,rainer2019neural,rainer2020neural} allow for an accurate virtual model of an object, but require powerful hardware for real-time rendering, whereas analytical reflectance models come at less computational effort and faster rendering. This comes at the cost of often not sufficiently capturing relevant reflectance characteristics such as light exchange at fine structural details or local subsurface scattering. Furthermore, the presentation of digitized contents on VR/AR devices imposes severe constraints regarding real-time rendering at framerates beyond 60 Hz on the visualization devices, instant/high-speed data exchange and interaction mechanisms to achieve a realistic impression for the joint analysis and interaction with the object or scene. Despite this progress on representing and visualizing digitized objects, their visualization on screens or VR/AR glasses is impacted by the interaction devices (i.e. mouse, keyboard, controller, etc.) that limit the experience regarding the intuitive canonical interaction in terms of touching and rotating an object in your hands. In this paper, we focus on enhancing the perceived aura of the digitized objects by augmenting the user experience with sensual information beyond purely sight-related data and providing additional haptic feedback regarding the object shape. For this purpose, we present a practical tool for collaborative remote object analysis and annotation involving both the accurate depiction of the digitized artifacts at interactive framerates within VR devices and haptic feedback based on a 3D printed replicate to improve the inspection experience. Using current VR devices, several experts located at possibly different physical places access and interact with high-quality virtual counterparts of real artifacts, where the reflectance data and the object geometry are stored on a central server and streamed to the remote clients as needed. Our evaluation demonstrates that providing haptic feedback regarding the object shape enhances VR-based interaction, assessment and experience of the considered objects. In summary, the main contributions of this work are: \begin{itemize} \item We present a framework uniting the concepts of digital material appearance, VR technology and 3D printing that is designed for the needs of enhanced remote collaborative inspection of cultural heritage contents. \item Our interactive multi-client inspection and annotation tool allows multiple users at different physical places to collaboratively analyze objects based on various interaction metaphors for annotation and illuminating the object. \item We demonstrate the potential of our approach in the scope of a user study. \end{itemize} \section{Methodology} \begin{figure*}[t] \centering \includegraphics[width=\textwidth]{images/pipeline3.pdf} \caption{Overview of our approach towards sharing tangible cultural heritage experiences. The initial digitization outputs the object geometry, the reflectance characteristics in terms of an OctreeBTF \cite{Krumpen:2017}. Then, a pre-processing step (upper center) computes a version of the geometry suitable for 3D printing and converts the BTF data into a streamable version which is loaded by a server (bottom center). The server then streams the compressed OctreeBTF to remote clients that can interactively inspect the object in VR, enhanced by haptic feedback provided by the 3D printed replica of the object.} \label{fig:streaming_pipeline} \end{figure*} Our approach for the joint immersive, tangible experience of CH contents by multiple users at possibly different physical locations relies on a a client-server model as illustrated in Figure~\ref{fig:streaming_pipeline}. Inputs in terms of the geometric model as well as the reflectance characteristics (for the purpose of an accurate object representation, we use the OctreeBTF representation~\cite{Krumpen:2017}) of the considered models have to be obtained from a prior digitization process or a model repository. In an initial step, we perform a pre-processing of these data by computing a 3D printable version of the 3D shape and transform the OctreeBTF into a more compressed representation that allows for progressive streaming over a network. The resulting object representation (i.e. in terms of geometry and reflectance) is stored on the server and streamed to each remote client which renders the object on a HMD and allows for interactive inspection enhanced with haptic feedback from a 3D printed replica. In the following sections, we discuss the involved components in more detail. As we address the generation of highly immersive experiences of cultural heritage objects, the objects need to be accurately captured so that characteristic details that determine the object appearance remain preserved in the digital model. State-of-the-art capture techniques~\cite{Weyrich:2009,Haindl:2013,weinmann-2016-EGCourse} rely on an initial 3D scanning of the object geometry using laser scanners or structured light systems. Subsequently, spatial variations of local surface appearance are captured under different viewing and lighting conditions. Depending on the surface material characteristics, the dependence of the local reflectance behavior $f(\mathbf{x},\boldsymbol{\omega}_v,\boldsymbol{\omega}_l)$ at a surface point $\mathbf{x}$, the viewing direction $\boldsymbol{\omega}_v$ and the lighting direction $\boldsymbol{\omega}_l$ can be represented using Spatially Varying Bidirectional Reflectance Distribution Functions (SVBRDFs)~\cite{nicodemus1977geometrical} or Bidirectional Texture Functions (BTFs)~\cite{Dana:1997}. Our framework is not restricted to one particular representation. SVBRDFs as captured in several other investigations~\cite{Lensch:2003,Palma:2012,hawkins2001photometric,hawkins2005dual,holroyd2010coaxial,kohler2013full,noll2013faithful,noll2015fully,santos2014cultlab3d,nam2018practical,ladefoged2019spatially} could also be integrated. However, to demonstrate the efficiency of our approach, we conduct our experiments with the computationally more demanding OctreeBTF representation~\cite{Krumpen:2017} since it delivers the best visual quality of the representations mentioned above. The OctreeBTF representation relies on parameterizing the reflectance representation in a volumetric manner instead of a 2D parameterization over the surface which ameliorates seam artifacts and texture distortions. We use datasets captured with a camera array~\cite{Schwartz:2011,Schwartz:2013} for which surface geometry has been reconstructed using a structured light system~\cite{Weinmann:2011} and Octree-BTF representations have been provided by the authors of~\cite{Krumpen:2017}. In addition to the reflectance characteristics, the capturing process also outputs the detailed geometry of the object. \subsection{Pre-processing for Streaming} \label{ssec:streaming} In a first step, the captured 3D geometry is converted to a version that is suited for 3D printing. In particular, if the capturing process does not output a closed mesh, possibly occurring holes in the geometry have to be filled. Afterwards, the model is scaled to a size that fits on the tracker-object (see Figure~\ref{fig:printed_objects}), that is part of the VR system and used to track the printed object pose. Optionally, if the object does not have a flat bottom surface or the surface does not cover the extends of the tracker, a socket can be added in order to mount the object on the tracker, as can be seen in Figure~\ref{fig:printed_objects}. Furthermore, we have to consider the fact that the typical capturing process outputs the OctreeBTF in a way which is well-suited for real-time rendering, but does not allow for (progressive) streaming over a network due to data size and data layout. Hence, before we store the OctreeBTF on the server, it has to be further compressed and converted to a representation that both allows for progressive streaming and real-time rendering. Therefore, the BTF representation is split into parts that solely depend on the spatial position $\mathbf{x}$ and the light- and view-directions $(\boldsymbol{\omega}_v,\boldsymbol{\omega}_l)$ respectively. These parts are further divided into \textit{chunks} that represent different levels of the octree corresponding to levels of detail of the reconstruction. The resulting data chunks as well as the geometry are compressed by using Zstandard~\cite{Collet:2017:zstd} and ordered in a scheme that allows the client to start rendering when the first few chunks have been transmitted, and to progressively refine the rendering as more chunks arrive. For a more detail on the BTF compression, how the data is divided into the spatial and angular parts and how the chunks are ordered, we refer to the supplemental material. \subsection{Server Component} Initially, the server loads the compressed BTF data chunks and the geometry and then waits for clients to connect. Each new client first receives general information about the object, followed by the geometry and the BTF data chunks in the order discussed in the supplemental material. The server keeps track of the chunks transmitted to each client, allowing multiple clients to connect at different times. Whenever a client places an annotation on the object, the annotation is forwarded to all other clients, and is also stored on the server, so that clients connecting at a later time also receive all annotations already present. \subsection{Remote Client Application} At the client side, we use an off-the-shelf VR-system consisting of a HMD, two controllers and an additional tracker (see Figure \ref{fig:printed_objects} right), that can be attached to an object to include said object into the virtual world. To allow insights on how the haptics-enriched VR experience improves on a purely screen-based experience, we also created a Non-VR version of the application (in the following denoted as the "`2D version"'), where the object and the light are controlled by moving the mouse. \paragraph{Tracking} The VR-System is set up in such way that we can use a simple tracker for the object, which is held in one hand, and a controller for the light and menu interactions held in the other hand. The tracker features a standard 3/4 inch mount used for cameras that we use to fix the printed object on the tracker, which has the benefit of allowing to quickly exchange the objects. We utilize the trackpad of the controller to control the light intensity and the object scale. Each rendered frame, the tracker, the controller and the HMD send their positions and orientations to the application, which then adapts the scene to match the positions in the real world. \paragraph{Rendering and Streaming} When the client has connected to the server, a placeholder geometry is rendered until the real geometry has been received and decompressed. In general, decompression is performed in separate thread on the CPU, and the uncompressed data is transferred to the GPU in an asynchronous manner, allowing for seamless updates of geometry and reflectance information without stuttering, which is specifically important when rendering on VR-headsets. When a chunk has been uploaded to the GPU, the render-thread is signaled to update the rendering according to the now loaded data. Due to the iterative streaming of BTF data, the user can already view the object and place annotations on it, while the rendering is refined as more data arrives. \subsection{3D Printing for Haptic Feedback} \label{ssec:3Dprinting} To provide the user with haptic feedback, we chose to print the model using an off-the-shelf 3D-printer. This printer uses the Fused filament fabrication (FFF, also known as fused deposition modeling, FDM) technique, where a thermoplastic material is heated to the point where it melts, and deposited by a moving printhead in a per-layer fashion. The advantage of that technique is, that over the last years, printers have become more and more affordable and easy to use, while the quality of the printed objects increased. As we want to attach the objects to the tracker, we add a baseplate to the object with a hole for a screw. Printed objects are shown in Figure~\ref{fig:printed_objects}. Furthermore, the objects have to be scaled down to fit the tracker, since a large object would occlude the tracker too much, thereby decreasing the tracking accuracy. \begin{figure}[t] \centering \includegraphics[width = 0.8\linewidth, height = 0.5\textheight, keepaspectratio]{images/printed_objects.jpg} \caption{Left and middle: Printed objects, right: Object mounted on the tracker.} \label{fig:printed_objects} \end{figure} \section{BTF compression} BTF measurements can be stored in terms of huge matrices, columns contain the reflectance values for a particular surface point $\mathbf{x}$ under various view-light configurations $(\omega_l, \omega_v)$. Depending on the resolution of the measurement setup, even when stored with half-precision floating point values, this matrix can exceed hundreds of gigabytes, and thus, needs to be compressed in order to meet the demands for real-time rendering and streaming. For this, the Decorrelated Full Matrix Factorization (DFMF)~\cite{mueller-2009-dissertation}, has been demonstrated to achieve good compression ratios, while preserving visual quality. In a first step, the BTF color values are converted into the YUV colorspace, which separates brightness from color information. Subsequently, the color channels are decorrelated by taking the logarithm of the Y-channel, and dividing the U- and V-channel by the Y-channel. Then, for each of these matrices, a SVD $A = \mathbf{U} \times \mathbf{\Sigma} \times \mathbf{V}^T$ is computed to separate spatial information stored in $\mathbf{V}$ from the light- and view-dependent information in $\mathbf{U}$. More precisely, a column $u_c(\omega_l, \omega_v)$ of $\mathbf{U}$ stores the \emph{Eigen-ABRDF}, whereas a row $v_c(\mathbf{x})$ of $\mathbf{V}$ holds the \emph{Eigen-Texture} of the BTF component $c$. As the SVD orders the rows $\mathbf{V}$ and the columns of $\mathbf{U}$ with respect to their importance, we can compress the BTF by keeping the first $k$ rows of $\mathbf{V}$ and the first $k$ columns of $\mathbf{U}$. \[ \rho_{BTF}(\mathbf{x},\boldsymbol{\omega}_l,\boldsymbol{\omega}_v) \approx \sum_{0 \leq c < k}{u_c(\boldsymbol{\omega}_l,\boldsymbol{\omega}_v) \cdot \boldsymbol{\sigma}_c \cdot v_c(\mathbf{x})} \] The resulting matrices $\widetilde{\mathbf{U}}$, $\widetilde{\mathbf{\Sigma}}$ and $\widetilde{\mathbf{V}}$ for each color channel are then stored, where $\widetilde{\mathbf{\Sigma}}$ and $\widetilde{\mathbf{V}}$ are pre-multiplied for simplicity. Using this compression, the BTF data size is reduced to a few gigabytes, which fit into the memory of current GPUs. Furthermore, the use of the YUV colorspace allows to compress the color channels U and V even further by keeping less components, as most reflectance information is about changes in brightness and the human eye is more sensitive to these than to changes in color. In our experiments, we observed the use of eight BTF components for the U- and V-channel to be a good compromise between data size and visual quality when rendering. While for the Y-channel a maximum of 100 components is sufficient for nearly all objects and for objects with less details, one can also take less components. When rendering, four components are grouped together so the number of components $k$ is chosen to be a multiple of four, an RGBA-array-texture with $k / 4$ layers can be used for rendering. Applying the above, we end up with $k_Y = 72$ and $k_{UV} = 8$. This algorithm can be applied to both conventional, texture-based BTFs as well as OctreeBTFs. The difference is, that for OctreeBTFs, the compression is done for the highest octree-level $d$, and the compressed BTF data for the lower levels is computed as a post-processing step by averaging the BTF data over all child nodes in a top-down manner, starting with level $d-1$ down to $d_{min}$ as described by Krumpen et~al.\ ~\cite{Krumpen:2017}. \section{BTF data layout} Even when compressed, transmitting a BTF to a client over the network still takes some time, which makes it feasible to split the BTF into smaller chunks of data and transmit these chunks independently to a remote client. This enables the client to start rendering the BTF with a lower quality as soon as the first chunks are received and to refine the rendering as more data-chunks arrive. An approach for streaming BTFs over the internet has been presented yb Schwartz et al.~\cite{Schwartz:2013}, however, since the data-layout of the spatial matrices $\mathbf{\widetilde{\Sigma}} \times \mathbf{\widetilde{V}}$ of the OctreeBTF differs from a conventional BTF, this approach cannot be applied to stream OctreesBTFs. The four-dimensional angular data from $\mathbf{\widetilde{U}}$ is stored as a nested parabolic map converted to an RGBA-array-texture for both BTF representations and the layers of these textures can be streamed independently. The difference when streaming lies in the handling of spatial data: For conventional, texture-based BTFs, the spatial data can be stored as an RGBA-array texture for each color channel, where each layer of a texture stores the BTF components $c_i \ldots c_{i+3}$ for all surface points $\mathbf{X}$. The individual texture-layers can then be streamed independent from each other, which means that the client can start rendering as soon as the first texture-layer for all three color channels is received. For OctreeBTFs however, the data is stored per voxel, where one voxel corresponds to one point $\mathbf{x}$, i.e. first all components $c_1^0 \ldots c_k^0$ for the first voxel are stored, then components $c_1^1 \ldots c_k^1$ for the second voxel, etc. This data layout leads to a better cache-efficiency on the GPU during rendering, as described by Krumpen et al.~\cite{Krumpen:2017}, but has the disadvantage that it is no longer possible (at least not without significant, costly re-arrangement of the data) to stream one component for all voxels as one data-chunk. Thus, we have to treat all components for all voxels for one octree levels as one data-chunk, and the client can only start rendering if the whole chunk (again for all color channels) has been received. Finally, rendering the OctreeBTF needs information about the octree itself and the normal and tangent vectors for each voxel, leading of an additional chunk of voxel-data per octree level. We construct the OctreeBTF similar to Krumpen et al.~\cite{Krumpen:2017}, where the first octree levels are forced to be complete, thus we have $l = d_{max} - d_{min}$ octree levels. Considering the number of texture-layers for the angular data for all three color channels, we end up with \begin{itemize} \item $l$ chunks of voxel data, storing the octree structure. \item $l \times 3$ chunks of spatial BTF data, which cannot be split into components. \item $k_Y/4 + 2\times k_{UV}/4$ chunks of angular BTF data, i.e.\ texture-layers, which are independent from the octree structure. \end{itemize} All chunks are further compressed using the Zstandard library~\cite{Collet:2017:zstd} and are stored in the main memory of the server, together with the also compressed geometry. \section{OctreeBTF streaming} \label{ssec:streaming} For streaming, we need to determine an order in which the chunks are transmitted, such that the client can start rendering as early as possible. First, the geometry is transmitted, which is followed by the voxel and spatial data for the octree level $d_{min}$ and the first four components of angular data (i.e.\ texture-layer) for each color channel. The remaining angular texture layers are distributed evenly among the remaining octree-levels. The biggest chunk is the last spatial chunk for the Y-channel due to the large number of voxels with $k_Y$ components for each. The complete algorithm is provided in Algorithm \ref{algo:load_order}. \begin{algorithm} \caption{Build the load order for BTF data chunks} \label{algo:load_order} \begin{algorithmic}[5] \STATE Add voxel data for level $j_0$ \STATE Add spatial data for level $j_0$ and channels YUV \STATE Add first angular-layer for channels YUV \STATE layers\_per\_lvl\_Y = max(layers\_total\_Y / $l$, 1) \STATE layers\_per\_lvl\_UV = max(layers\_total\_UV / $l$, 1) \STATE layers\_added\_Y = 1 \STATE layers\_added\_UV = 1 \FOR{$i=1$ to $l$} \STATE Add voxel data for level $j_i$ \STATE Add spatial data for level $j_i$ and channel Y \FOR {$g = 1$ to layers\_per\_lvl\_Y} \IF {layers\_added\_Y < layers\_total\_Y} \STATE Add angular-layer[layers\_added\_Y] \ENDIF \STATE {layers\_added\_Y+=1} \ENDFOR \STATE Add spatial data for level $j_i$ and channel U \STATE Add spatial data for level $j_i$ and channel V \FOR {$g = 1$ to layers\_per\_lvl\_UV} \IF {layers\_added\_UV < layers\_total\_UV} \STATE Add angular-layer[layers\_added\_UV] \STATE Add angular-layer[layers\_added\_UV] \ENDIF \STATE layers\_added\_UV+=1 \ENDFOR \ENDFOR \end{algorithmic} \end{algorithm} \section{Related Work} \paragraph{Immersive Content Presentation} Facilitating the access to CH contents by digital representations has been approached in various forms. As the most obvious form given by still images or videos limits the user experience to pre-specified viewpoints and environment conditions (including the lighting conditions), the full aura of CH content is not preserved. Instead, digitizing the 3D geometry based on laser scanning or structured light scanning and additionally capturing a digital representation of the reflectance behavior allows the manipulation of the environment and lighting conditions. Beyond interactive screen-based visualizations, a higher degree of immersion is achieved based on interactive 3D experiences of the CH objects/scenes. The range from real-world representations/environments to completely virtual representations/environments has been discussed under the notion of reality-virtuality continuum~\cite{milgram1994taxonomy}. For a detailed discussion of respective developments in the area of cultural heritage, we refer to the survey of by Bekele et~al.\ ~\cite{Bekele:2018}. In VR settings, users are completely immersed into synthetic or pre-captured worlds that differ from the actual surrounding~\cite{carmigniani2011augmented,zhao2009survey}. Among the major applications for experiencing, exploring and manipulating CH contents are virtual museums and education. Augmented Virtuality aims at augmenting such completely virtual worlds with live real-world contents. In contrast, Augmented Reality (AR) enriches the actual real-world surrounding with synthetic contents as used for exhibition enhancement, education or exploration. For all these approaches, interactions with the scene and its objects are realized based on the interplay between visual depictions and the control devices of VR/AR equipment. However, these interfaces based on conventional VR/AR controllers, gamepads or gloves do not transport tactile feedback when interacting with objects. Seminal work on tangible interfaces has been presented in terms of the Tooteko framework~\cite{dagnano2015tooteko} where facade reliefs were also presented to users as 3D printed objects lying on a table to allow haptic experience. Touching different surface parts was coupled to respective audio feedback. In contrast, our work extends VR-based 3D object inspection by additional haptic feedback based on a 3D-printed replica. \paragraph{Physical Interactions in VR} Early studies have demonstrated humans' ability to gauge movements of their own hands relative to their own bodies. This \emph{proprioceptive sense}~\cite{Mine:1997} has been explored in terms of body-relative interaction types including the direct manipulation of objects as if these were in the user's hands, physical mnemonics (i.e. 3D body-relative widgets) and gesture commands. Further work focused on providing a feedback to the user based on the shape of physical objects. In such \emph{passive haptics} approaches~\cite{lindeman1999hand}, physical objects are aligned with objects in virtual environments which has been shown to enhance user experience of virtual environments~\cite{joyce2017passive}. In contrast to providing a passive haptic feedback for static phenomena in the scene like ascending/descending stairs~\cite{Nagao:2018}, the interaction with dynamic objects relies on carefully tracking the respective real-world counterparts. This can be achieved based on special gloves~\cite{Pierce:1999} as well as attaching tracking modules to physical objects~\cite{Franzluebbers:2018,hanus2019collaborative}. Our approach also exploits passive haptics in terms of a 3D printed virtual counterpart of the object of interest, which is attached to a tracking module of typical VR equipment. In contrast to previous work, our work focuses on both the accurate visual reproduction of objects within the virtual environments and the haptic feedback regarding the object's shapes. \paragraph{Appearance Modeling} Object appearance, i.e. the observed colors and textures, results from the complexity of light exchange at the surface depending on surface geometry, material reflectance characteristics and the surrounding illumination conditions. As both the human visual system and acquisition devices are only capable of observing material appearance depending on the coupling of these three modalities, appearance modeling inevitably requires a decoupling of the respective modalities. Respective acquisition strategies have been intensively discussed in literature~\cite{Weyrich:2009,Haindl:2013,weinmann-2016-EGCourse}. While the geometric structure can be accurately recovered for a wide range of materials (i.e. diffuse to moderately specular surfaces) using structured light techniques or laser scanners~\cite{weinmann-2016-EGCourse}, the separation of reflectance and illumination properties remains challenging. High-quality object digitization of smaller figurines is therefore mostly carried out in lab environments/using setups with controllable illumination such as gonioreflectometers~\cite{Holroyd:2010,filip2013brdf} or camera arrays~\cite{hawkins2001photometric,hawkins2005dual,Schwartz:2011,tunwattanapong2013acquiring,Schwartz:2014,kohler2013full,noll2013faithful,noll2015fully,havran2017lightdrum}. Exploiting controllable illumination allows to accurately model reflectance in terms of parametric spatially varying bidirectional reflectance distribution (SVBRDF) models~\cite{nicodemus1977geometrical,Lensch:2003,Palma:2012,hawkins2001photometric,hawkins2005dual,holroyd2010coaxial,filip2013brdf,kohler2013full,noll2013faithful,noll2015fully,santos2014cultlab3d,nam2018practical,ladefoged2019spatially} or data-driven bidirectional texture functions~\cite{Dana:1997,Schwartz:2011,Schwartz:2014,havran2017lightdrum,Krumpen:2017} that both represent spatially varying surface reflectance depending on view and illumination conditions. SVBRDFs are parameterized over the exact 2D surface of the object geometry and usually the local surface reflectance behavior is represented in terms of an analytical function. This makes them particularly suitable for specular materials, where the highlights may be lost with a tabulated representation. However, as the accuracy of the scanned geometry is still limited regarding fine structural details, the light exchange may not be accurately reproduced in such cases. In contrast, BTFs are parameterized over an approximate object surface. Hence, subtle effects of light exchange including interreflections, self-shadowing and self-occlusions induced by finer structures not preserved in the reconstruction as well as local subsurface scattering are directly stored in terms of a data-driven image-based representation. The latter results in significantly increasing computational and memory requirements in comparison to parametric representations. Whereas standard BTFs are parameterized over 2D surface domains which suffers from distortions or seam artifacts, the 3D parameterization of OctreeBTFs~\cite{Krumpen:2017} avoids distortions and significantly reduces the number of seam artifacts. While our framework is not restricted to a particular representation, we employ the data-intensive OctreeBTF representation~\cite{Krumpen:2017} to demonstrate that even such expensive representations can be used for interactive object inspection and annotation. In addition to a purely visual (in our case VR-based) experience, we provide additional haptic feedback to enhance the user experience. Further digitization methods in the context of cultural heritage are based on reflectance transformation imaging (RTI)~\cite{Malzbender:2001,Mudge:2006,Mudge:2008,Earl:2010,Ponchio:2018,giachetti2018novel,dulecha2020neural}. However, these techniques usually capture the lighting-dependent reflectance of an object only from a single view. Hence, RTI techniques are not adequate for in-hand object inspection scenarios, where the view-dependent object appearance has to be taken into account as well. \paragraph{Rendering and Streaming of Appearance Data} Collaborative object inspection by users at different phyiscal locations relies on efficient model representations, fast data streaming as well as rendering. Storing raw BTF measurements comes at huge memory requirements of several tens to hundreds of gigabytes. These can be compressed based on the combination of fitting a mixture of several SVBRDFs to the BTF data and residual apparent BRDFs (ABRDFs)~\cite{wu2011sparse}. The latter are required to take non-local effects of the light transport in the material into account as otherwise the quality of the reproduced reflectance behavior may be severely impacted. As an alternative, several compression techniques rely on interpreting the BTF as a tensor for which a low-rank approximation can be found via factorization. Respective techniques include Full Matrix Factorization (FMF) \cite{koudelka2003acquisition}, Decorrelated-FMF (DFMF)~\cite{Schwartz:2013} and K-SVD based compression~\cite{ruiters2009btf}, that are capable of preserving details of material appearance and allowing real-time rendering. However, the K-SVD approach outperforms the FMF-based approaches by a compression factor of about 3 to 4 for comparable quality. Furthermore, investigations on perceptually-inspired BTF compression leveraged the observation that lower downsampled levels of details sufficiently approximate some of the factorized data, thereby reducing the memory requirements on the GPU wich led to compression factors of about 500. Further BTF compression schemes rely on the use of neural networks~\cite{rainer2019neural,rainer2020neural}, where the compression and decompression are achieved based on an autoencoder approach, or on statistical approaches~\cite{haindl2007extreme}, that allow extreme compression at the cost of loosing the capability to accurately reproduce fine characteristics of reflectance behavior, as well as vector-quantization-based approaches~\cite{havran2010bidirectional} or the use of multivariate radial basis functions~\cite{tsai2010modeling}, that both reach compression rates similar to FMF-based compression. Aside from BTF compression to allow for real-time rendering, scenarios where BTFs have to be streamed over the internet also should allow for a progressive refinement of the rendering. This can be achieved by leveraging the fact that the used DFMF-compression orders the BTF data with respect to its importance to stream a BTF over the internet and progressively refine the rendering when more data arrives~\cite{Schwartz:2013}. Further work has shown that the spatial data parts of a 2D-parameterized BTF can be split into smaller tiles that can be streamed to the GPU independent of each other~\cite{Schwartz:2013_2}, which enables only loading the BTF data for the object regions that are currently visible on the screen. In turn, this enables rendering scenes containing of multiple BTFs in real-time, which would otherwise exceed the amount of VRAM available if each BTF would have to be loaded completely without streaming. In our system, we combine these ideas~\cite{Schwartz:2013,Schwartz:2013_2} to allow for a progressive refinement of the rendering of OctreeBTFs~\cite{Krumpen:2017}, while streaming the most important data, i.e.\ the data that contributes most to the final result first. \section{Interaction Tools for Remote Inspection} The major challenge for the design and development of interaction metaphors are given by the specification of desirable interaction possibilities with objects as well as their intuitive realization based on hardware equipment. To allow an immersive object visualization, we leverage the potential of current VR devices and extend the interaction possibilities by adding haptic object experience. In the following, we provide details regarding the used control mechanisms for handling the object of interest as well as changing illumination conditions as well as adding annotations. The respective controls can easily be adapted for right-handed and left-handed persons (in the following, we will only describe the typical setting for right-handed persons). \paragraph{Controls for Object Handling} As mentioned in Section~\ref{ssec:3Dprinting}, we create a haptic feedback during object exploration in VR by 3D printing the respective object geometry and attaching it on a VR tracking device (we use the HTC Vive tracker, to which the printed object is attached). To allow a comparison regarding how haptic feedback from the printed object enhances the user experience, we also implemented a second mode where the digital object is (virtually) attached to one of the standard controllers, i.e. this interaction is solely determined by how the VR controller is moved and does not provide any haptic feedback. The application is implemented in a way so that we can switch between these two modes at any time directly within the application. In addition, we allow the object to be scaled in the virtual environment based on the trackpad of the controller assigned to the right hand. \paragraph{Light Controls} An important aspect for object exploration is given by the respective illumination conditions. Besides showing how an object will look like within a certain environment, which we address by environment lighting~\cite{debevec2006_course}, our viewer also supports the direct lighting of an object via a user-controlled light source during its inspection. When using the direct lighting mode, the controller in the right hand is used to control the main light source that can be either a point light, or a spotlight to simulate a flashlight as commonly used to inspect objects. The intensity of the light source can be changed via the controller. In case of environment lighting, we use a spherical environment map to define the incoming light from every direction. However, as correct image-based lighting is not possible for BTFs in real-time, we approximate the environment map by a series of eight directional light sources. \begin{figure}[t] \centering \includegraphics[width = 0.8\linewidth, height = 0.5\textheight, keepaspectratio]{images/person_interacting.jpg} \caption{View on a person operating the system.} \label{fig:interact} \end{figure} \paragraph{Annotation Tools} During artifact inspection, users often need to annotate respective object parts. For this purpose, our client application allows users to place annotations on the object by moving the second controller (i.e. the one where the object is not attached to) over a spot on the object, and pressing a button on the controller. Users can thereby annotate the object either by placing a simple marker highlighting a spot to direct other (possibly remotely connected) users to inspect this in more detail, or, if more information is needed, a short and descriptive text can be added to the annotation using a virtual keyboard. Annotated points on the object are displayed as small spheres and the color of the spheres reflects the type of annotation, i.e. whether its purpose is the highlighting of that particular location or region to other users or whether additional text information is stored at the respective location. The latter texts are only visible to a user if she moves the controller over or next to the sphere to avoid continuously occluding the object by the text. All added annotations are sent to the server, which, in turn, forwards them to other connected clients. The display of annotations can be activated or deactivated at any time.\\ As a further functionality, we allow the user to draw on the object by continuosly placing points on the object surface while a certain controller button is pressed. This could be used for marking larger features on the object.
\section{Introduction} The study of final outcomes of gravitational collapse is an interesting topic that explores the formation of various compact objects such as white dwarfs, neutron stars, naked singularities and black holes (BHs). The collapse end-state is a widely accepted research field from many perspectives, both theoretical and observational. The classical general relativity faces some major scientific issues precisely related to the paradoxical characteristics of BHs and naked singularities. An astronomical substance hypothesized as a substitute for the BH is a gravastar (gravitational vacuum star) based on the idea of Mazur's and Motola's theory \cite{1,2}. The basic idea is to prevent the formation of event horizons and singularities by stopping the collapse of matter at or near the position of event horizon. A gravastar appears similar to a black hole but does not contain event horizon and singularity. Gravastars are of purely theoretical interest and can be described in three different regions with the specific equation of state (EoS). The first region is referred to as an interior ($0\leq r<r_1$), second is the intermediate ($r_1< r<r_2$) and third is denoted as an exterior region ($r_2<r$). In the first region, the isotropic pressure ($p=-\sigma$, where $\sigma$ represents the energy density) produces a repulsive force on the intermediate thin-shell. It is assumed that the intermediate thin-shell is protected by ultrarelativistic plasma and fluid pressure ($p=\sigma$). The exterior region has zero pressure ($p=0=\sigma$) and can be supported by the vacuum solution of the field equations. It contains a stable thermodynamic solution and maximum entropy for small fluctuations. Visser's cut and paste method provides a general formalism for the construction of thin-shell from the joining of two different spacetimes at hypersurface \cite{2a}. Mazur and Mottola \cite{2} considered this approach to construct thin-shell gravastar from the matching of exterior Schwarzschild BH with interior de Sitter (DS) spacetime. This approach is very useful to avoid the presence of event horizon as well as central singularity in the geometry of gravastars. The matter surface at thin-shell creates a sufficient amount of pressure to overcome the force of gravity effects that help to maintain its stable configuration. For the description of Mazur-Mottola scenario, Visser and Wiltshire \cite{3} introduced the simplest model from the matching of exterior and interior geometries through the cut and paste approach. They also analyzed stable configuration of the developed structure for suitable choice of EoS for the transition layers. Carter \cite{4} extended this concept by the joining of interior DS spacetime and exterior Reissner-Nordstr\"om (RN) BH. They examined the effects of EoS on the modeling of thin-shell gravastars. Horvat et al. \cite{5} presented theoretical model of gravastars with electromagnetic field and studied the role of charge on the stable configuration of gravastars. Rahaman et al. \cite{6} studied physical features like proper length, entropy and energy contents of charged and charged free thin-shell gravastars in the background of (2+1)-dimensional spacetime. They claimed that the presented solutions are non-singular and physically viable as an alternative to BH. Banerjee et al. \cite{7} investigated the braneworld thin-shell gravastars developed by using braneworld BH as an exterior manifold through cut and paste technique. Rocha and his collaborators \cite{8} discussed stable configuration of thin-shell gravastars with perfect fluid distribution in Vaidya exterior spacetime. They proposed a dynamical model of prototype gravastars filled with phantom energy. It is found that the developed structure can be a BH, stable, unstable or ``bounded excursion" gravastar for various matter distributions at thin-shell. Horvat et al. \cite{9} studied the geometry of gravastars with continuous pressure by using the conventional Chandrasekhar approach and derived EoS for the static case. Lobo and Garattini \cite{10} investigated the stability of noncommutative thin-shell gravastar and found that stable regions must exist near the expected position of the event horizon. \"{O}vg\"{u}n et al. \cite{11} developed thin-shell gravastar model from the matching of exterior charged noncommutative BH with interior DS manifold. They found that the developed structure follows the null energy condition and shows stable behavior for some suitable values of physical parameter near the expected event horizon. Recently, we have developed regular thin-shell gravastars in the background of Bardeen/Bardeen DS BHs as exterior manifolds through cut and paste method \cite{12}. The stable configuration of the developed structure is explored through radial perturbation. It is found that stable regions decrease for large values of charge and increase for higher values of the cosmological constant. The theoretical modeling of gravastar could be helpful for the better understanding of dark energy role in the accelerated expanding behavior of the universe. Ghosh et al. \cite{13} examined physical characteristics of gravastar model with Kuchowicz metric potential. They claimed that this model overcomes the singularity problems that occurred for the geometry of BH in general relativity. Shamir and Ahmad \cite{14} investigated physical features of gravastar model in the background of $f(G,T)$ gravity. Yousaf et al. \cite{16} explored stable configuration of charged gravastar filled with isotropic fluid in $f(R,T)$ gravity. They found linear relation among the physical features and thickness of the shell. Sharif and Waseem \cite{17} discussed charged gravastars with conformal motion in $f(R,T)$ gravity. There is a large body of literature \cite{18}-\cite{31a} that explore the stable as well as dynamical configuration of thin-shell wormholes constructed from the matching various BHs with different EoS. This paper presents the formalism of charged Kiselev thin-shell gravastars to explore stable configuration with different EoS. The paper has the following format. Section \textbf{2} explains the formalism of thin-shell gravastars in the background of charged Kiselev BH. In section \textbf{3}, we study the effects of barotropic and variable EoS on the stable configuration of the developed structure through radial perturbation. Finally, we summarize our results in the last section. \section{Gravastars Formalism} This section explores the geometrical construction of thin-shell gravstars from the joining of lower ($\Upsilon^-$) and upper ($\Upsilon^+$) manifolds through cut and paste technique. For this purpose, we consider DS spacetime as a lower manifold and charged BH surrounded by the quintessence matter as an upper manifold. The motivation behind the consideration of this model can be explained as follows. The matter with negative pressure can be characterized for the current evolutionary phase of the universe with cosmological constant and quintessence \cite{31b}. The mathematical representation of quintessence matter distribution that linear relates energy density ($\sigma_q$) and pressure ($p_q$) is $p_q=w\sigma_q$, where $\omega$ denotes the quintessence parameter. This parameter explains that the universe is in the phase of accelerated expansion if $-1<\omega<-1/3$, decelerates if $\omega>-1/3$ and shows inertial behavior (constant expansion rate) if $\omega=-1/3$. This means that observers must have future horizons in all accelerated models \cite{31c}. In an accelerated expanding universe, two objects separated with a relative fixed distance $r$ must achieve relative speed to the speed of light after some time and will no longer communicate. For the case of decelerated expansion, the breakdown of such a communication does not happen whereas it becomes less relativistic with time. However, the speed of relative moving observers must be constant for the case of $\omega=-1/3$. They can communicate but cannot maintain this forever as they recede away from each other. Kiselev \cite{32} introduced uncharged and charged BH surrounded by the quintessence matter distribution as a static spherically symmetric solution of the field equations. The line element of charged Kiselev BH is given as \begin{equation}\label{1} ds^2_+=-\Psi(r_+)dt^{2}+\Psi(r_+)^{-1}dr^{2}_++r^2_+d\theta^2_++ r^2_+\sin^2\theta_+ d\phi^2_+, \end{equation} where \begin{equation}\nonumber \Psi(r_+)=1-\frac{2m}{r_+}-\frac{\alpha} {r^{3\omega+1}_+}+\frac{Q^2}{r^2_+}, \end{equation} $m$ is the mass of BH, $Q$ denotes the charge of BH, $\alpha$ stands for the Kiselev parameter and $\omega$ is the quintessence parameter with $-1<\omega<-1/3$. The boundary values of EoS parameter recover the case of cosmological constant (extraordinary quintessence) for $\omega=-1$ and $\omega=0$ is referred to as the dust fluid. If $Q=0$, then it reduces to Kiselev BH and RN BH is recovered when Kiselev parameter vanishes. The charged Kiselev BH reduces to Schwarzschild BH in the absence of both charge and Kiselev parameter. The corresponding metric function of Kiselev BH has the following form \begin{equation}\nonumber \Psi(r_+)=1-\frac{2m}{r_+}-\frac{\alpha} {r^{3\omega+1}_+}. \end{equation} Extreme BHs are expected to have both stable and unstable properties, this makes their analysis very interesting and challenging. We consider $\omega=-2/3\in(-1,-1/3)$ to observe the event horizon of Kiselev BH. The corresponding event horizons are given as \begin{equation}\nonumber r_h=\frac{1\pm\sqrt{1-8 \alpha m}}{2 \alpha }. \end{equation} It is found that \begin{itemize} \item for $\alpha=1/8m$, it denotes extreme Kiselev BH, \item for $\alpha<1/8m$, it represents the non-extreme Kiselev BH, \item for $\alpha>1/8m$, it shows naked singularity. \end{itemize} Since the charged Kiselev BH metric function is much complicated than RN and Kiselev BH, so its event horizon for $\omega=-2/3$ has much complicated expression. Thus we only discuss values of the parameter for which it shows different geometrical structure. It follows that \begin{itemize} \item for $Q^2=\frac{2}{27\alpha^2}\left(-2+18m\alpha-2(1-6m\alpha)^{3/2}\right)$, it denotes extreme charged Kiselev BH, \item for $Q^2>\frac{2}{27\alpha^2}\left(-2+18m\alpha-2(1-6m\alpha)^{3/2}\right)$, it represents the non-extreme charged Kiselev BH, \item for $Q^2<\frac{2}{27\alpha^2}\left(-2+18m\alpha-2(1-6m\alpha)^{3/2}\right)$, it shows naked singularity. \end{itemize} The line element of DS geometry is given as \begin{equation}\label{2} ds^2_{-}=-\Phi(r_{-})dt_{-}^2+\Phi^{-1}(r_{-})dr_{-}^2 +r_{-}^2d\theta_{-}^2+r_{-}^2\sin^2\theta_{-} d\phi_{-}^2, \end{equation} where $\Phi(r_{-})=1-r^2_-/\beta^2$ and $\beta$ is a nonzero positive constant. We use cut and paste method to obtain the geometry of thin-shell gravastars from the matching of two distinct spacetimes $\Upsilon^-$ and $\Upsilon^+$. These manifolds have the metric functions defined by $g^{\pm}_{\mu\nu}(x_{\pm}^\mu)$ with independent coordinates $x_{\pm}^\mu$ and bounded by the hypersurfaces $\partial\Upsilon^{\pm}$ with induced metrics $h_{ij}^{\pm}$, respectively. According to the Darmoise junction conditions, the induced metrics are isometric and follow the relation $h_{ij}^{+}(\xi^i)=h_{ij}(\xi^i) =h_{ij}^{-}(\xi^i)$, where $\xi^i$ represents the coordinates of $\partial\Upsilon^{\pm}$. These geometries are glued at the hypersurface to obtain the single manifold $\Upsilon=\Upsilon^+\cup\Upsilon^-$ with boundary $\partial\Upsilon=\partial\Upsilon^+=\partial\Upsilon^-$. Mathematically, these spacetimes can be described as \begin{equation}\nonumber \Upsilon^\pm=\{x_{\pm}^\mu|t_{\pm}\geq T_{\pm}(\tau) \quad\text{and}\quad r\geq b(\tau)\}, \end{equation} where $\tau$ and $b(\tau)$ denote the proper time and radius of thin-shell. The corresponding hypersurface that linked these geometries can be parameterized as \begin{equation}\nonumber \partial\Upsilon=\{\xi^i|t_{\pm}\geq T_{\pm}(\tau) \quad\text{and}\quad r=b(\tau)\}. \end{equation} The induced 3D metric at hypersurface $(h_{ij})$ can be expressed as \begin{equation}\nonumber ds^2_{\partial\Upsilon}=h_{ij}d\xi^id\xi^j=-d\tau^2+b(\tau)^2d \theta^2+b(\tau)^2 \sin^2\theta d\phi^2, \end{equation} where $\xi^{i}=(\tau,\theta,\phi)$. The normal vector components of $g_{\mu\nu}$ on the $\partial\Upsilon$ are defined as \begin{equation}\nonumber n^{\mu}=\frac{f(r,b(\tau))_{,\mu}}{|f(r,b(\tau))_{,\nu} f(r,b(\tau))^{,\nu}|^{1/2}}, \end{equation} where $f(r,b(\tau))=r-b(\tau)=0$ represents the function of $\partial\Upsilon$ and $b(\tau)=b$ denotes the shell's radius. The components of normal vectors corresponding to upper and lower spacetimes are \begin{eqnarray}\label{3} n_{+}^{\mu}&=&\left(\frac{\dot{b}}{1-\frac{2m}{b}-\frac{\alpha} {b^{3\omega+1}}+\frac{Q^2}{b^2}},\sqrt{1-\frac{2m}{b}-\frac{\alpha} {b^{3\omega+1}}+\frac{Q^2}{b^2} +\dot{b}^2},0,0\right),\\\label{4} n_{-}^{\mu}&=&\left(\frac{\dot{b}}{1-\frac{b^2}{\beta^2}},\sqrt{1-\frac{b^2}{\beta^2} +\dot{b}^2},0,0\right), \end{eqnarray} respectively. Here, dot represents derivative with respect to $\tau$. The normal vector satisfies the condition $n^\mu n_\mu=1$ for spherical symmetric manifolds. The discontinuity in the second fundamental form (extrinsic curvature) exist due to the presence of matter surface at $\partial\Upsilon$. The extrinsic curvature components for both geometries are \begin{eqnarray}\label{5} K_{\tau}^{\tau+}&=&\frac{\alpha(3 \omega +1) b^{1-3 \omega }+2 b m-2 Q^2+2\ddot{b}b^3}{b^3\sqrt{1-\frac{2m}{b}-\frac{\alpha} {b^{3\omega+1}}+\frac{Q^2}{b^2}+\dot{b}^2}},\\\label{6} K_{\theta}^{\theta+}&=& \frac{1}{b}\sqrt{1-\frac{2m}{b}-\frac{\alpha} {b^{3\omega+1}}+\frac{Q^2}{b^2}+\dot{b}^2},\\\label{7} K_{\tau}^{\tau-}&=&\frac{-\frac{2 b}{\beta ^2}+2\ddot{b}} {\sqrt{1-\frac{b^2}{\beta^2}+\dot{b}^2}},\\\label{8} K_{\theta}^{\theta-}&=& \frac{1}{b}\sqrt{ 1-\frac{b^2}{\beta^2}+\dot{b}^2},\\\label{9} K^{\phi\pm}_{\phi}&=&\sin^2\theta K_{\theta}^{\theta\pm}, \end{eqnarray} The matter surface at thin-shell produces discontinuity in the extrinsic curvatures of both spacetimes. If $K_{ij}^{+}-K_{ij}^{-}\neq0$, then it represents the presence of matter thin layer on $\partial\Upsilon$. The components of energy-momentum tensor ($S^{i}_{j}$) of such a matter surface are determined by the Lanczos equations. Mathematically, it can be expressed as \begin{equation}\label{10} S^{i}_{j}=-\frac{1}{8\pi}\{[K^{i}_{j}]-\delta^{i}_{j}K\}, \end{equation} where $[K^{i}_{j}]=K^{+i}_{j}-K^{-i}_{j}$ and $K=tr[K_{ij}]=[K^{i}_{j}]$. The above equation in terms of perfect fluid distribution becomes \begin{equation}\label{11} S^{i}_{j}=v^i v_j\left(p+\sigma\right)+p\delta^{i}_{j}, \end{equation} here $v_i$ denotes thin-shell velocity components. By considering Eqs.(\ref{5})-(\ref{11}), we obtain $\sigma$ and $p$ in the following form \begin{eqnarray}\label{12} \sigma&=&-\frac{1}{4\pi b}\left\{\sqrt{1-\frac{2m}{b}-\frac{\alpha} {b^{3\omega+1}}+\frac{Q^2}{b^2}+\dot{b}^2}-\sqrt{1-\frac{b^2}{\beta^2}+\dot{b}^2}\right\}, \\\label{13} p&=&\frac{2\dot{b}^2+2b\ddot{b}+\frac{\alpha (3 \omega -1) b^{-3 \omega }-2 m}{b}+2}{8\pi b\sqrt{1-\frac{2m}{b}-\frac{\alpha} {b^{3\omega+1}}+\frac{Q^2}{b^2}+\dot{b}^2}}-\frac{2\dot{b}^2+2b\ddot{b} +2-\frac{4 b^2}{\beta ^2}}{8\pi b\sqrt{1-\frac{b^2}{\beta^2}+\dot{b}^2}}. \end{eqnarray} Here, we assume that $\dot{b}_{0}=\ddot{b}_{0}=0$, where $b_0$ is the position of equilibrium shell's radius. This shows that shell's motion along the radial direction vanishes at $b=b_0$. The respective expressions for surface stresses at $b=b_0$ yield \begin{eqnarray}\label{14} \sigma(b_0)=\sigma_0&=&-\frac{1}{4\pi b_0}\left\{\sqrt{1-\frac{2m}{b_0}-\frac{\alpha} {b_0^{3\omega+1}}+\frac{Q^2}{b_0^2}}-\sqrt{1-\frac{b^2_0}{\beta^2}}\right\}, \\\label{15} p(b_0)=p_0&=&\frac{1}{8\pi b_0}\left\{\frac{\alpha (3 \omega -1) b_0^{-3 \omega }-2 m+2b_0} {b_0\sqrt{1-\frac{2m}{b_0}-\frac{\alpha} {b^{3\omega+1}_0}+\frac{Q^2}{b^2_0}}}-\frac{2\beta ^2-4 b_0^2}{\beta ^2\sqrt{1-\frac{b^2_0}{\beta^2}}}\right\}. \end{eqnarray} The continuity of perfect fluid gives the relationship between the surface stresses of thin-shell gravastars as \begin{eqnarray}\label{16} 4\pi\frac{d}{d\tau}( b^2 \sigma)+4\pi p\frac{d b^2}{d\tau}=0, \end{eqnarray} which can be expressed as \begin{eqnarray}\label{17} \frac{d\sigma}{db}=-\frac{2}{b}(\sigma+p). \end{eqnarray} The second order derivative of $\sigma$ with respect to $b$ yields \begin{equation}\label{18} \frac{d^2\sigma}{db^2}=\frac{2(p+\sigma)}{b^2}\left(3+2\varsigma^2\right), \end{equation} where $\varsigma^2=dp/d\sigma$ denotes the EoS parameter. Equations (\ref{16})-(\ref{18}) are very useful to explore the dynamics and stable configurations of constructed geometry with different types of matter distribution. For the physical viability of a geometrical structure, some constraints must be imposed known as energy conditions. The well-known energy conditions are null: $\sigma_0+p_0>0$; weak: $\sigma_0>0$, $\sigma_0+p_0>0$; strong: $\sigma_0+3p_0>0$, $\sigma_0+p_0>0$; dominant: $\sigma_0>0$, $\sigma_0\pm p_0>0$. If these energy conditions are verified then the developed model is physically viable. Here, we are interested to check the null energy condition that ensure the presence of normal or exotic matter at thin-shell. It is interesting to mention here that the violation of the null energy condition leads to the violation of remaining conditions. We see that thin-shell gravastars follow the null energy condition for different values of charge and mass of BH as shown in Figure \ref{f1}. These values of physical parameters have frequently been used in literature that examine the stable as well as dynamical behavior of thin-shell constructed from different singular and non-singular BHs \cite{20}-\cite{31a}. Thus we use them to determine the effects of charge and mass on the energy conditions, physical features as well as stability of thin-shell gravastars (see Appendix \textbf{A}). \begin{figure}\centering \epsfig{file=ec1.eps,width=0.5\linewidth}\epsfig{file=ec2.eps,width=0.5\linewidth} \caption{Plots of the null energy condition for charged Kiselev thin-shell gravatars. We examine graphical behavior of $\sigma+p$ at $b=b_0$ verses $(b_0,Q)$ (left plot) and $(b_0,m)$ (right plot) for $\omega=-2/3$, $\alpha=0.2$ and $\beta=0.5$.}\label{f1} \end{figure} \section{Stability Analysis} This section studies stability of thin-shell gravastars using linear perturbation in the radial direction at $b=b_0$ with different variable EoS. The stable and unstable configurations of thin-shell gravastars can be analyzed through the behavior of effective potential of thin-shell. The equation of motion of thin-shell that explains the stable as well as dynamical characteristics of respective geometry is obtained directly from Eq.(\ref{12}) as \begin{equation}\label{26} \dot{b}^2+\Omega(b)=0, \end{equation} here $\Omega(b)$ denotes the potential function of thin-shell gravastar as \begin{equation}\label{27} \Omega(b)=-\frac {\xi(b)^2}{64 \pi ^2 b^2 \sigma ^2}+\frac{1}{2}\zeta(b)-4 \pi ^2 b^2\sigma ^2, \end{equation} where \begin{equation}\nonumber \xi(b)=\frac{\alpha b^{1-3 \omega }-\frac{b^4}{\beta ^2}+2 b m-Q^2}{b^2}, \quad \zeta(b)=2+\frac{-\alpha b^{1-3 \omega }-\frac{b^4}{\beta ^2}-2 b m+Q^2}{b^2}. \end{equation} The stable behavior of thin-shell gravastars is studied by using second derivative of the effective potential at $b=b_0$. The basic conditions for the stable behavior can be written as $\Omega(b_0)=0=\Omega'(b_0)$ and $\Omega''(b_0)>0$. If $\Omega''(b_{0})<0$, then it shows unstable behavior and it is unpredictable if $\Omega''(b_{0})=0$ \cite{27}. To check the stability through radial perturbation, we linearize the potential function using Taylor series expansion around equilibrium radius $b_0$ as follows \begin{equation}\nonumber \Omega(b)=\Omega(b_{0})+\Omega'(b_{0})(b-b_{0})+\frac{1}{2} \Omega''(b_{0})(b-b_{0})^2+O[(b-b_{0})^3]. \end{equation} We examine that $\Omega(b_0)=0=\Omega'(b_0)$, hence it reduces to \begin{equation}\label{28} \Omega(b)=\frac{1}{2}(b-b_{0})^2\Omega''(b_{0}). \end{equation} The corresponding second derivative of $\Omega(b)$ at $b=b_0$ becomes \begin{eqnarray}\nonumber \Omega''(b_0)&=&\frac{2 M(b_0) M'(b_0)}{b^3_0}-\frac{b_0^2 \xi(b_0)\xi''(b_0)}{2M(b_0)^2} +\frac{2 b_0^2 \xi(b_0) M'(b_0) \xi'(b_0)} {M(b_0)^3} \\\nonumber&-&\frac{M'(b_0)^2} {2b_0^2}-\frac{b_0^2 \xi'(b_0)^2}{2M(b_0)^2}-\frac{3 b_0^2 \xi(b_0)^2 M'(b_0)^2}{2M(b_0)^4}-\frac{2 b_0 \xi(b_0) \xi'(b_0)} {M(b_0)^2}\\\nonumber&+&\frac{\zeta''(b_0)}{2}-\frac{3 M(b_0)^2}{2b_0^4}+\frac{ b_0^2 \xi(b_0)^2 M''(b_0)} {2M(b_0)^3}-\frac{M(b_0) M''(b_0)}{2b_0^2} \\\label{29}& -&\frac{\xi(b_0)^2}{2M(b_0)^2}+\frac{2 b_0 \xi(b_0)^2 M'(b_0)}{M(b_0)^3}, \end{eqnarray} where $M(b_0)=4\pi b_0^2 \sigma_0$ denotes the total mass distribution at equilibrium shell's radius. The corresponding first and second derivatives of the total mass with respect to $b$ at $b=b_0$ become \begin{eqnarray}\nonumber M'(b_0)=-8\pi b_0 p_0,\quad M''(b_0)=-8\pi p_0+16\pi \varsigma_0^2 (\sigma_0+p_0), \end{eqnarray} and $\varsigma_0^2=dp/d\sigma|_{b=b_0}$. Firstly, we begin with barotropic EoS to discuss the stability of the developed geometry. It gives linear relation between the surface stresses of thin-shell as $p=\gamma \sigma$ with real constant $\gamma$. Consequently, the solution of conservation equation (\ref{17}) for barotropic EoS is given as \begin{equation}\label{30} \sigma=\left(b_{0}b^{-1}\right)^{2(1+\gamma)}\sigma_{0}. \end{equation} The corresponding potential function becomes \begin{equation}\label{31} \Omega(b)=\frac{\zeta(b)}{2}-\frac{\xi(b)^2 \left(\frac{b_0}{b}\right)^{-4 (\gamma+1)}}{64 \pi ^2 b^2 \sigma_0^2}-4 \pi ^2 b^2 \sigma_0^2 \left(\frac{b_0}{b}\right)^{4 (\gamma+1)}, \end{equation} which turns out to be zero at throat radius $b=b_0$. The corresponding first derivative of $\Omega(b)$ yields \begin{equation}\label{32} \Omega'(b_0)=\frac{\zeta'(b_0)}{2}-\frac{\xi(b_0) \left(2 \gamma \xi(b_0)+b_0 \xi'(b_0)+\xi(b_0)\right)}{32 \pi ^2 \sigma_0^2 b_0^3}+8 \pi ^2 \sigma_0^2 (2 \gamma+1) b_0, \end{equation} which vanishes only if \begin{equation}\label{33} \gamma=\frac{-256 \pi ^4 \sigma_0^4 b_0^4-16 \pi ^2 \sigma_0^2 b_0^3 \zeta'(b_0)+b_0 \xi(b_0)\xi'(b_0)+\xi(b_0)^2}{2 \left(256 \pi ^4 \sigma_0^4 b_0^4-\xi(b_0)^2\right)}. \end{equation} The second derivative of $\Omega(b)$ at $b=b_0$ yields \begin{eqnarray}\nonumber \Omega''(b_0)&=&\frac{\zeta''(b_0)}{2}-\frac{1}{32 \pi ^2 \sigma_0^2 b_0^4}\left\{b_0 \xi(b_0) \left((8 \gamma+4) \xi'(b_0)+b_0\xi''(b_0)\right)\right.\\\nonumber&+&\left.\left(8 \gamma^2+6 \gamma+1\right) \xi(b_0)^2+b_0^2 \xi'(b_0)^2\right\}\\\label{34}&-&8 \pi ^2 \sigma_0^2 (2 \gamma+1) (4 \gamma+3), \end{eqnarray} This equation explains stable and unstable configurations of thin-shell gravastars for barotropic EoS. Due to complexity of this expression, we use numerical approach to observe the effects of physical parameters on the stability of developed structure. We study the graphical behavior of $\Omega''(b_{0})$ by using Eqs.(\ref{33}) and (\ref{14}). It is found that stable structure of thin-shell is greatly affected by the presence of quintessence EoS parameter. We examine that thin-shell expresses unstable behavior for every values of $Q$, $m$, $\alpha$ and $\beta$ with $\omega=-2/3$ as shown in the left plot of Figure \ref{f2}. We obtain unstable configuration for every choice of $\omega$ except for extraordinary quintessence parameter $\omega=-1$ (right plot of Figure \ref{f2}). Hence, the barotropic type fluid distribution at thin-shell shows stable behavior only for $\omega=-1$ otherwise gives unstable solutions. \begin{figure}\centering \epsfig{file=b1.eps,width=.5\linewidth}\epsfig{file=b2.eps,width=.5\linewidth} \caption{Stability of thin-shell gravastars with barotropic EoS for $\beta=0.5=m=Q$ with different values of $\omega$. The left plot shows unstable behavior and right plot expresses the stable structure.}\label{f2} \end{figure} Current observational data seem to point towards an accelerated expansion of the universe \cite{32a}. If general relativity is assumed to be correct theory of gravity describing the large-scale behavior of the universe, then its energy density and pressure should violate the strong energy condition. Several models for the matter leading to such a situation have been proposed \cite{32b}. One of them is the Chaplygin gas \cite{32c}, a perfect fluid satisfying the EoS $p \sigma= \eta$, where $\eta<0$. A remarkable property of the Chaplygin gas is that the squared sound velocity $v_s^2=\eta/\sigma^2$ is always positive even in the case of exotic matter. Varela \cite{18} considered the EoS of the type $p=p(\sigma,b)$ to discuss the stability of thin-shell wormhole developed from two equivalent copies of the Schwarzschild BH. Such type of EoS is known as variable EoS. The generalized form of the Chaplygin gas presents the mathematical formulation in which surface pressure depends on the radius of the shell. Therefore, we consider general form of Chaplygin EoS ($p=p(\sigma,b)$) to study the stable behavior of the respective geometry, i.e., $p=\frac{1}{b^n}\frac{\eta}{\sigma}$ with real constants $\eta<0$ and $n$ \cite{18}. It is observed that the Chaplygin gas model is recovered for $n=0$ \cite{33}. The respective solution of conservation equation for such a model can be written as \begin{equation}\label{35} \sigma^2=\frac{(n-4)\sigma_{0}^2b_{0}^{n+4}b^n+4\eta b^4b_{0}^n-4\eta b^nb_{0}^4}{b^{n+4}b_{0}^{n}(n-4)}. \end{equation} The effective potential for this model turns out to be \begin{eqnarray}\nonumber \Omega(b)&=&-\frac{4 \pi ^2 b^{-n-2} b_0^{-n} \left(b_0^4 b^n \left((n-4) \sigma_{0}^2 b_0^n-4 \eta\right)+4 b^4 \eta b_0^n\right)}{n-4}+\frac{\zeta(b)}{2}\\\label{36}&-&\frac{(n-4) b^{n+2} \xi(b)^2 b_0^n}{64 \pi ^2 \left(b_0^4 b^n \left((n-4) \sigma_{0}^2 b_0^n-4 \eta\right)+4 b^4 \eta b_0^n\right)}. \end{eqnarray} It is observed that $\Omega(b_0)=0$ and $\Omega'(b_0)$ becomes \begin{eqnarray}\nonumber \Omega'(b_0)&=&-\frac{\eta b_0^{-n-3} \xi(b_0)^2}{16 \pi ^2 \sigma_{0}^4}+16 \pi ^2 \eta b_0^{1-n}-\frac{\xi(b_0) \xi'(b_0)}{32 \pi ^2 \sigma_{0}^2 b_0^2}-\frac{\xi(b_0)^2}{32 \pi ^2 \sigma_{0}^2 b_0^3}\\\nonumber&+&8 \pi ^2 \sigma_{0}^2 b_0+\frac{\zeta'(b_0)}{2}. \end{eqnarray} For $\Omega'(b_0)=0$, we have \begin{equation}\label{37} \eta=-\frac{\sigma_{0}^2 b_0^n \left(256 \pi ^4 \sigma_{0}^4 b_0^4+16 \pi ^2 \sigma_{0}^2 b_0^3 \zeta'(b_0)-b_0 \xi(b_0) \xi'(b_0)-\xi(b_0)^2\right)}{2 \left(256 \pi ^4 \sigma_{0}^4 b_0^4-\xi(b_0)^2\right)}. \end{equation} Consequently, $\Omega''(b_0)$ has the following form \begin{eqnarray}\nonumber \Omega''(b_0)&=&-\frac{\eta^2 b_0^{-2 (n+2)} \xi(b_0)^2}{2 \pi ^2 \sigma_{0}^6}-\frac{\eta b_0^{n-2 (n+2)+1} \xi(b_0) \xi'(b_0)}{4 \pi ^2 \sigma_{0}^4}+\frac{\eta n b_0^{n-2 (n+2)} \xi(b_0)^2}{16 \pi ^2 \sigma_{0}^4}\\\nonumber&-&\frac{7 \eta b_0^{n-2 (n+2)} \xi(b_0)^2}{16 \pi ^2 \sigma_{0}^4}-16 \pi ^2 \eta b_0^{n-2 (n+2)+4}-16 \pi ^2 \eta n b_0^{n-2 (n+2)+4}\\\nonumber&-&\frac{b_0^{2 n-2 (n+2)+2} \xi(b_0) \xi''(b_0)}{32 \pi ^2 \sigma_{0}^2}-\frac{b_0^{2 n-2 (n+2)+1} \xi(b_0) \xi'(b_0)}{8 \pi ^2 \sigma_{0}^2}\\\nonumber&-&\frac{b_0^{2 n-2 (n+2)+2} \xi'(b_0)^2}{32 \pi ^2 \sigma_{0}^2}-\frac{b_0^{2 n-2 (n+2)} \xi(b_0)^2}{32 \pi ^2 \sigma_{0}^2}-24 \pi ^2 \sigma_{0}^2 b_0^{2 n-2 (n+2)+4}\\\label{38}&+&\frac{1}{2} b_0^{2 n-2 (n+2)+4} \zeta''(b_0). \end{eqnarray} Now, we observe the effects of the generalized Chaplygin gas EoS on the stability of developed geometry. In this regard, we observe the graphical behavior of $\Omega''(b_0)$ for this model. It is found that thin-shell expresses stable behavior for every choice of the physical parameters except $\omega=-1$ when $n=0$ (Figure \ref{f3}). This shows that thin-shell becomes stable for the choice of Chaplygin gas model ($n=0$) and represents unstable behavior only for $\omega=-1$ (left plot of Figure \ref{f4}). It is also analyzed that the general case of Chaplygen EoS ($n\neq0$) shows stable behavior for every choice of $\omega$ with $n=1$ (right plot of Figure \ref{f4}). We see that stable behavior ($\Omega''(b_0)>0$) increases for higher values of $n$ as shown in Figure \ref{f5}. \begin{figure}\centering \epsfig{file=cn1.eps,width=.5\linewidth}\epsfig{file=cn2.eps,width=.5\linewidth} \caption{Stable behavior of thin-shell gravastars with Chaplygin gas model ($n=0$) for $\beta=0.5=m=Q$ with different values of $\omega$.} \label{f3} \end{figure} \begin{figure}\centering \epsfig{file=cn3.eps,width=.5\linewidth}\epsfig{file=cn4.eps,width=.5\linewidth} \caption{Stability of thin-shell gravastars with generalized Chaplygin gas EoS with different values of $n$. For $\omega=-1$, the left plot shows unstable behavior for $n=0$ and right plot expresses the stable structure for $n=1$.}\label{f4} \epsfig{file=cn5.eps,width=.5\linewidth}\epsfig{file=cn6.eps,width=.5\linewidth} \caption{Stable behavior of thin-shell gravastars for different values of $n$. The stability of developed structure is enhanced for large values of $n$.}\label{f5} \end{figure} Finally, we study the effects of generalized phantomlike variable EoS on the stability of thin-shell \cite{18} whose EoS is $p=\frac{\Theta\sigma}{b^n}$ with real constants $\Theta$ and $n$. The phantomlike EoS is recovered if $n=0$ \cite{34}. By using this expression in Eq.(17), we have \begin{equation}\label{39} \sigma=b_{0}^2b^{-2}\sigma_{0}e^{\frac{ \Theta\left(b_0^{-n}-b^{-n}\right)}{n}}, \end{equation} and it follows that \begin{equation}\label{40} \Omega(b)=-\frac{b^2 \xi(b)^2 e^{\frac{2 \Theta \left(b_0^{-n}-b^{-n}\right)}{n}}}{64 \pi ^2 \sigma_{0} b_0^4}-\frac{4 \pi ^2 \sigma_{0} b_0^4 e^{\frac{2 \Theta \left(b^{-n}-b_0^{-n}\right)}{n}}}{b^2}+\frac{\zeta(b)}{2}. \end{equation} It is noted that $\Omega(b_0)=0$ and by considering $\Omega'(b_0)=0$, we obtain \begin{equation}\label{41a} \Theta=-\frac{b_0^n \left(256 \pi ^4 \sigma_{0}^2 b_0^4+16 \pi ^2 \sigma_{0} b_0^3 \zeta'(b_0)-b_0 \xi(b_0) \xi'(b_0)-\xi(b_0)^2\right)}{256 \pi ^4 \sigma_{0}^2 b_0^4-\xi(b_0)^2}, \end{equation} and hence \begin{eqnarray}\nonumber \Omega''(b_0)&=& -\frac{\Theta^2 b_0^{-2 n-4} \xi(b_0)^2}{16 \pi ^2 \sigma_{0}}-16 \pi ^2 \Theta^2 \sigma_{0} b_0^{-2 n}-\frac{\Theta b_0^{-n-3} \xi(b_0) \xi'(b_0)}{8 \pi ^2 \sigma_{0}}\\\nonumber&-&\frac{\Theta b_0^{-n-4} \xi(b_0)^2}{16 \pi ^2 \sigma_{0}}-\frac{\Theta (1-n) b_0^{-n-4} \xi(b_0)^2}{32 \pi ^2 \sigma_{0}}-16 \pi ^2 \Theta \sigma_{0} b_0^{-n}\\\nonumber&+&8 \pi ^2 \Theta (-n-3) \sigma_{0} b_0^{-n}-\frac{\xi(b_0) \xi''(b_0)}{32 \pi ^2 \sigma_{0}b_0^2}-\frac{\xi(b_0) \xi'(b_0)}{8 \pi ^2 \sigma_{0} b_0^3}-\frac{\xi'(b_0)^2}{32 \pi ^2 \sigma_{0} b_0^2}\\\label{41}&-&\frac{\xi(b_0)^2}{32 \pi ^2 \sigma_{0} b_0^4}-24 \pi ^2 \sigma_{0}+\frac{\zeta''(b_0)}{2}. \end{eqnarray} For the general form of phantomlike EoS, we see that thin-shell shows initially stable behavior then expresses unstable configuration for every choice of physical parameters (Figures \ref{f6} and \ref{f7}). We conclude that the constructed geometry is neither stable nor unstable completely for the choice of both phantomlike and general form of phantomlike EoS. \begin{figure}\centering \epsfig{file=pn1.eps,width=.5\linewidth}\epsfig{file=pn2.eps,width=.5\linewidth} \caption{Stable and unstable behavior of thin-shell gravastars with phantomlike EoS ($n=0$) for different values of $\omega$. It shows stable behavior initially then expresses unstable configuration for every choice of $\omega$.}\label{f6} \epsfig{file=pn3.eps,width=.5\linewidth}\epsfig{file=pn4.eps,width=.5\linewidth} \caption{Stable and unstable behavior of thin-shell gravastars for generalized phantomlike EoS with different values of $\omega$.}\label{f7} \end{figure} \section{Final Remarks} This paper investigates the construction of thin-shell gravastars from the matching of two different spacetimes, i.e., DS as a lower spacetime and charged Kiselev BH as an upper manifold. These geometries are connected through the well-known cut and paste method. We match these manifolds at $r=b$ with $b>r_h$ to avoid the presence of event horizon ($r_h$) and singularity in the developed structure. The presence of matter thin layer at the joining surface produces discontinuity in the extrinsic curvature. It is found that the null energy condition is verified for the developed structure (Figure \ref{f1}). We have studied stable characteristics of thin-shell gravastars with barotropic type fluid distribution and two variable EoS, i.e., generalized Chaplygin gas and phantomlike EoS. For barotropic model, we have obtained stable solution for the choice of $\omega=-1$ and unstable solution for any other choice of $\omega$ (Figure \ref{f2}). It is interesting to mention here that this model mostly indicates unstable behavior for thin-shell WHs in several spacetimes \cite{18,19,31,31a}. These results express that the stable solution can be obtained through barotropic model for some suitable choice of physical parameters. The stable structure is obtained for Chaplygin gas model ($n=0$) for every choice of $\omega$ other than extraordinary quintessence parameter $\omega=-1$. For generalized Chaplygin gas EoS, we have obtained stable solution for every values of physical parameter and found more stable structure for higher values of $n$ (Figures \ref{f3}, \ref{f4} and \ref{f5}. Finally, for generalized phantomlike EoS, thin-shell shows initially stable behavior and then expresses unstable configuration for every choice of the physical parameters (Figures \ref{f6} and \ref{f7}). We conclude that charged Kiselev thin-shell gravastars are more stable for the choice of generalized Chaplygin gas model. It is worthwhile to mention here that this model is more stable with considered EoS than thin-shell WHs in the background of various BHs \cite{18,19,31,31a}. This shows completely stable structure of thin-shell gravastar with extraordinary quintessence parameter for both barotropic and generalized Chaplygin gas model. \section*{Appendix A} We also explore some physical features of the developed structure, i.e., proper length, entropy and energy contents within the shell's region. Since the constructed geometry is the matching of two different spacetimes, so the stiff perfect fluid moves along these spacetimes through the shell region. The lower and upper boundaries of the shell are $r=b$ and $r=b+\epsilon$, respectively. The proper thickness of the shell is denoted by $\varepsilon$ which is a very small positive real number ($0<\varepsilon\ll1$). The proper thickness of such a region that connects lower and upper spacetimes can be obtained as \cite{13} \begin{equation}\label{19} l=\int_{b}^{b+\epsilon}\sqrt{\Psi^{-1}(r)}dr=\int_{b}^{b+\epsilon} \frac{dr}{\sqrt{1-\frac{2m}{r}-\frac{\alpha} {r^{3\omega+1}}+\frac{Q^2}{r^2}}}. \end{equation} This integral cannot be solved analytically due to the complicated expression of $\Psi(r)$. Therefore, we solve it by assuming $\sqrt{\Psi^{-1}_{+}(r)}=\frac{dj(r)}{dr}$ as \begin{equation}\label{20} l=\int_{b}^{b+\epsilon}\frac{dj(r)}{dr}dr=j(b+\epsilon)-j(b)\approx \epsilon \frac{dj(r)}{dr}|_{r=b}=\epsilon\sqrt{\Psi^{-1}_{+}(b)}, \end{equation} where $\epsilon\ll1$ so that its square and higher powers can be neglected. The corresponding expression for proper length becomes \begin{equation}\label{21} l=\epsilon\left[1-\frac{2m}{b}-\frac{\alpha} {b^{3\omega+1}}+\frac{Q^2}{b^2}\right]^{-\frac{1}{2}}. \end{equation} It is noted that the proper length of the shell clearly depends on the charge as well as the mass of the BH. Equation (\ref{21}) shows that the proper length and thickness of the shell are proportional. It is found that the length of the shell decreases by an increasing charge of the geometry and increases by increasing the mass of the BH. Entropy is related to the measure of disorderness or disturbance in a geometrical structure. We study the entropy of thin-shell gravastars that explains the disorderness in the geometry of gravastar. According to the theory of Mazur and Mottola, charged gravastar has zero entropy density for the interior region. Using the concept of Mazur and Mottola, we evaluate the entropy of thin-shell gravastar through the expression \cite{13} \begin{equation}\label{22} S=\int_{b}^{b+\epsilon}4\pi r^2 h(r) \sqrt{\Psi^{-1}(r)}dr. \end{equation} The entropy density for local temperature can be expressed as \begin{equation}\label{23} h(r)=\frac{\vartheta K_B}{\hbar}\sqrt{\frac{p(r)}{2\pi}}, \end{equation} where $\vartheta$ is a dimensionless parameter. Here, we take Planck units $(K_B = 1 = \hbar)$ so that the shell's entropy becomes \cite{13} \begin{figure}\centering \epsfig{file=s1.eps,width=.5\linewidth}\epsfig{file=s2.eps,width=.5\linewidth} \caption{Behavior of entropy versus thickness of the shell with $\beta=0.5$ and $b_0=1$.}\label{f8} \end{figure} \begin{equation}\label{24} S=\epsilon \vartheta b^2\sqrt{8\pi p(b)\Psi^{-1}(b)}. \end{equation} It is shown that entropy of the shell's region is also proportional to the shell's thickness. We use this equation to examine the contribution of charge and mass of BH on the entropy of shell graphically. Figure \ref{f8} shows the linear relation between entropy and thickness for different values of the physical parameter. It is found that the entropy of shell region increases by increasing $Q$ and decreases for large values of $m$. The interior region of gravastars obeys the EoS $p=-\sigma$ which represents negative energy zone with non-attractive force. The energy distribution in the shell's region can be determined as \cite{13} \begin{equation}\label{25} \varepsilon=\int_{b}^{b+\epsilon}4\pi r^2 \sigma(r)dr\approx4\epsilon\pi b^2 \sigma(b). \end{equation} The energy contents depend on the thickness of the shell, mass and charge of the geometry. We see that energy within the shell decreases for large values of charge and increases for large values of mass as shown in Figure \ref{f9}. It is concluded that these features are proportional to the thickness of the shell and are greatly affected by the charge and mass of the BH which is consistent with the literature \cite{13}-\cite{16}. \begin{figure}\centering \epsfig{file=e1.eps,width=.5\linewidth}\epsfig{file=e2.eps,width=.5\linewidth} \caption{Behavior of the energy within the shell verses thickness of the shell with $\beta=0.5$ and $b_0=1$.}\label{f9} \end{figure} \section*{Acknowledgement} One of us (FJ) would like to thank the Higher Education Commission, Islamabad, for its financial support through \emph{6748/Punjab/NRPU/RD/HEC/2016}.
\section{Introduction and main results} In this section, we briefly explain the main theme of this paper. The precise definitions and notations are given in the next section. Roughly speaking, Hofer-Zehnder conjecture states that any Hamiltonian diffeomorphism on any closed symplectic manifold has infinitely many simple periodic orbits if it has more than "homologically necessary" number of simple periodic orbits (\cite{HZ} p. 263). We have to clarify the meaning of "homologically necessary periodic orbits". Floer homology group of contractible periodic orbits is generated by contractible periodic orbits and it is isomorphic to the singular homology of the underlying manifold. So, homologically necessary number of contractible periodic orbits is the sum of the Betti numbers. On the other hand, Floer homology group of non-contractible periodic orbits is zero. This implies that homologically necessary number of non-contractible periodic orbits is zero. In summary, Hofer-Zehnder conjecture is stated in the following form. \begin{Conjecture}[Hofer-Zehnder conjecture] \begin{enumerate} \item Let ${\phi\in \textrm{Ham}(M,\omega)}$ be a Hamiltonian diffeomorphism with simple contractible periodic orbits more than the sum of Betti numbers. Then, ${\phi}$ has infinitely many simple contractible periodic orbits. \item Let ${\phi\in \textrm{Ham}(M,\omega)}$ be a Hamiltonian diffeomorphism which has at least one non-contractible periodic orbit. Then $\phi$ has infinitely many simple non-contractible periodic orbits. \end{enumerate} \end{Conjecture} This Conjecture 1 (1) is a generalization of Frank's theorem \cite{Fr,Fr2}, which states that any area preserving homeomorphism on ${S^2}$ with more than two fixed points has infinitely many periodic points. Shelukhin proved Conjecture 1 (1) for spherically monotone symplectic manifolds with semi-simple quantum cohomology ring (\cite{Sh}). Readers may consider the relationship between Conley conjecture and Hofer-Zehnder conjecture. Roughly speaking, Conjecture 1 ${(1)}$ states any Hamiltonian diffeomorphism with finitely many contractible periodic orbits is so-called pseudo-rotation. Pseudo-rotation is a Hamiltonian diffeomorphism with minimum number of contractible periodic orbits. Conley conjecture and Hofer-Zehnder conjecture imply that it is important to know the necessary and sufficient conditions that a symplectic manifold has a pseudo-rotation. Conley conjecture implies a symplectic manifold with pseudo-rotation is very rare. In \cite{CGG,CGG2,GG6,GG7,Sh2,Sh3}, the importance of the existence of non-trivial pseudo-holomorphic curve was pointed out. They proved that the quantum Steenrod square is deformed if the symplectic manifold is monotone and has a pseudo-rotation. This is a strong evidence of McDuff-Chance conjecture which states that Conley conjecture holds if some Gromov-Witten invariants are vanishing or quantum cohomology ring is undeformed (\cite{GG3,GG4}). Compared to the contractible periodic orbits case, very little is known about the existence of non-contractible periodic orbits. The main reason of this is that non-contractible periodic orbits may be empty and Floer homology of non-contractible periodic orbits is always trivial. So, it is very difficult to know information of non-contractible periodic orbits from Floer homology theory. However, G\"{u}rel, Ginzburg-G\"{u}rel and Orita proved that non-contractible Floer homology theory is partially applicable and they proved Conjecture 1 ${(2)}$ for some cases \cite{G,GG8,O,O2}. In this paper, we apply equivariant Floer theory \cite{Se,SZ} and prove Conjecture 1 ${(2)}$ for very wide classes of symplectic manifolds. The statement of our main result is stated as follows. A symplectic manifold ${(M,\omega)}$ is called weakly monotone symplectic manifold if it satisfies one of the following conditions. We explain the precise meaning of terminologies in the next section. \begin{enumerate} \item ${(M,\omega)}$ is monotone \item ${c_1(A)=0}$ for every ${A\in \pi_2(M)}$ \item The minimum Chern number ${N>0}$ is greater than or equal to ${n-2}$ \end{enumerate} Note that weakly monotone symplectic manifolds cover wide classes of symplectic manifolds. For example, every symplectic manifold whose dimension is less than or equal to $6$ is a weakly monotone symplectic manifold. We prove the following result. \begin{Thm} Let ${(M,\omega)}$ be a closed and weakly monotone symplectic manifold. Let ${\phi \in \textrm{Ham}(M,\omega)}$ be a Hamiltonian diffeomorphism such that ${1}$-periodic orbit in the class ${\gamma \neq 0 \in H_1(M:\mathbb{Z})/\textrm{Tor}}$ is finite, not empty and at least local Floer homology ${HF^{loc}(\phi, x)}$ of at least one of them is not zero. Then, for sufficiently large prime $p$, ${\phi}$ has $p$-periodic or $p'$-periodic simple orbit in the class ${p\cdot \gamma}$. Here $p'$ is the first prime number greater than $p$. In particular, there are infinitely many simple periodic orbits of $\phi$ in the class ${\mathbb{N}\cdot \gamma}$. \end{Thm} The assumption "weakly monotone" is a purely technical assumption. Our proof is based on the ${\mathbb{Z}_p}$-equivariant Floer homology theory and we need ${\mathbb{Z}_p}$-coefficient Floer theory. For general closed symplectic manifolds, we need so-called virtual technique to define Floer theory (\cite{FO2,LT}), but virtual technique works on $\mathbb{Q}$-coefficient in general (see also \cite{FO}). We are not sure we can construct an equivariant theory on general closed symplectic manifolds. \section*{Acknowledgement} This work was carried out during my stay as a research fellow in National Center for Theoretical Sciences. The author thanks NCTS for a great research atmosphere and many supports. He also gratefully acknowledges his teacher Kaoru Ono for continuous supports. \section{Preliminaries} In this section, we explain notations and terminologies used in this paper. \subsection{Elementary notations} Let ${(M,\omega)}$ be a symplectic manifold, so $M$ is a finite dimensional $C^{\infty}$-manifold and ${\omega \in \Omega^2(M)}$ is a symplectic form on $M$. In this paper, we always assume that $M$ is a closed manifold. For any $C^{\infty}$-function $H\in C^{\infty}(M)$, we define the Hamiltonian vector field ${X_H}$ by the following relation. \begin{equation*} \omega(X_H, \cdot)=-dH \end{equation*} We can also consider ${S^1}$-dependent ($=$$1$-periodic) Hamiltonian function $H$ and Hamiltonian vector field $X_H$ in the same formula. The time $1$ flow of $X_H$ is called a Hamiltonian diffeomorphism generated by $H$. We denote this flow by $\phi_H$. The set of all Hamiltonian diffeoomorphisms is called Hamiltonian diffeomorphism group and we denote the Hamiltonian diffeomorphism group of ${(M,\omega)}$ by ${\textrm{Ham}(M,\omega)}$. \begin{equation*} \textrm{Ham}(M,\omega)=\{\phi_H \ | \ H\in C^{\infty}(S^1\times M)\} \end{equation*} We also consider "iterations" of $H$ and ${\phi_H}$. For any integer ${k\in \mathbb{N}}$, we define ${H^{(k)}}$ as follows. \begin{equation*} H^{(k)}=kH(kt, x) \end{equation*} It is straightforward to see that ${\phi_{H^{(k)}}=(\phi_H)^k}$. Let ${P^l(H)}$ be the space of $l$-periodic periodic orbits of $X_H$. \begin{gather*} P^l(H)=\{x:S_l^1\rightarrow M \ | \ \dot{x}(t)=X_{H_t}(x(t)) \} \\ S_l^1=\mathbb{R}/l\cdot \mathbb{Z} \end{gather*} It is also straightforward to see that there is one to one correspondence between ${P^k(H)}$ and ${P^1(H^{(k)})}$. We abbreviate ${P^1(H)}$ to ${P(H)}$. A $l$-periodic orbits ${x\in P^l(H)}$ is called simple if there is no $l'$-periodic orbits ${y\in P^{l'}(H)}$ which satisfies the following conditions. \begin{gather*} l=l'\cdot m \ \ \ \ (l', m\in \mathbb{N}) \\ x(t)=y(\pi_{l,l'}(t)) \end{gather*} Here ${\pi_{l,l'}:S_l\rightarrow S_{l'}}$ is the natural projection. So a periodic orbit is simple if and only if it is not iterated periodic orbit of lower period. Next, we explain the definition of the minimum Chern number $N$. A symplectic manifold ${(M,\omega)}$ becomes an almost complex manifold, and its tangent bundle has a natural first Chern class ${c_1(TM)\in H^2(M:\mathbb{Z})}$. The minimum Chern number $N\in \mathbb{N}\cup \{+\infty\}$ is the positive generator of ${c_1(TM)|_{\pi_2(M)}}$. Note that if the image is zero, ${N}$ is defined by ${N=+\infty}$. A symplectic manifold ${(M,\omega)}$ is called monotone if the cohomology class of the symplectic form ${[\omega]}$ over ${\pi_2(M)}$ is a non-negative multiple of the first Chern class. In other words, there is a constant ${\lambda \ge 0}$ such that \begin{equation*} \int_{S^2}v^*\omega=\lambda\int_{S^2}v^*c_1 \end{equation*} holds for any ${v:S^2\rightarrow M}$. As we mentioned in the previous section, a weakly monotone symplectic manifold is defined as follows. \begin{Def}[weakly monotone symplectic manifold] A symplectic manifold ${(M,\omega)}$ is called weakly monotone if and only if it satisfies one of the following conditions. \begin{enumerate} \item $(M,\omega)$ is a monotone symplectic manifold. \item $c_1(A)=0$ holds for any ${A\in \pi_2(M)}$. \item The minimum Chern number $N$ is greater than or equal to ${n-2}.$ \end{enumerate} \end{Def} \subsection{Floer homology theory} In this subsection, we explain Floer homology for non-contractible periodic orbits. Essentially, there is nothing new in the non-contractible case, but in this paper we need non-contractible Floer chain complex over the universal Novikov ring. Let ${\mathbb{K}}$ be the ground field (In this pape, we consider the case of ${\mathbb{K}=\mathbb{F}_p}$ where ${\mathbb{F}_p}$ is a field of characteristic $p$.). We also assume that ${(M,\omega)}$ is a weakly monotone symplectic manifold. The universal Novikov ring ${\Lambda}$ is defined as follows. \begin{equation*} \Lambda=\bigg\{\sum_{i=1}^{l}a_i\cdot T^{\lambda_i} \ \bigg| \ a_i\in \mathbb{K},\lambda_i\in \mathbb{R}, \lambda_i\to +\infty \ (\textrm{if \ }l=+\infty) \bigg\} \end{equation*} We need the subring ${\Lambda_0\subset \Lambda}$ as follows. \begin{equation*} \Lambda_0=\bigg\{\sum a_i\cdot T^{\lambda_i}\in \Lambda \ \bigg| \ \lambda_i\ge 0 \bigg\} \end{equation*} We need non-contractible Floer theory over ${\Lambda}$ and ${\Lambda_0}$. We fix ${\gamma\neq0\in H_1(M:\mathbb{Z})/\textrm{Tor}}$ and we denote the set of $1$-periodic orbit of ${H\in C^{\infty}(S^1\times M)}$ in ${\gamma}$ by ${P(H,\gamma)}$. \begin{equation*} P(H,\gamma)=\{x\in P(H) \ | \ [x]=\gamma \} \end{equation*} Floer chain complex over ${\Lambda}$ and ${\Lambda_0}$ is defined as follows. We assume that any periodic orbit in ${P(H,\gamma)}$ is non-degenerate. \begin{gather*} CF(H,\gamma:\Lambda)=\bigoplus_{x\in P(H,\gamma)}\Lambda \cdot x \\ CF(H,\gamma:\Lambda_0)=\bigoplus_{x\in P(H,\gamma)}\Lambda_0 \cdot x \end{gather*} Note that above ${CF(H,\gamma:\Lambda)}$ and ${CF(H,\gamma:\Lambda_0)}$ are not graded over ${\mathbb{Z}}$ (It is possible to give a grading over ${\mathbb{Z}_2}$.). The differential operator ${d_F}$ is defined as follows. \begin{equation*} d_F(x)=\sum_{y\in P(H,\gamma),\lambda\ge 0}n_{\lambda}(x,y)T^{\lambda}\cdot y \end{equation*} ${n_{\lambda}(x,y)\in \mathbb{K}}$ is the number of the solutions of the following Floer equation modulo the natural ${\mathbb{R}}$-action. \begin{gather*} u:\mathbb{R}\times S^1\longrightarrow M \\ \partial_su(s,t)+J_t(u(s,t))(\partial_tu(s,t)-X_{H_t}(u(s,t)))=0 \\ \lim_{s\to -\infty}u(s,t)=x(t), \lim_{s\to +\infty}u(s,t)=y(t) \\ \lambda=\int_{\mathbb{R}\times S^1}u^*\omega+\int_0^1H(t,x(t))-H(t,y(t))dt \end{gather*} Floer homology ${HF(H,\gamma:\Lambda)}$ is the homology of ${(CF(H,\gamma:\Lambda),d_F)}$ and ${HF(H,\gamma:\Lambda_0)}$ is the homology of ${(CF(H,\gamma:\Lambda_0),d_F)}$. It is straightforward to see that ${HF(H,\gamma:\Lambda)}$ does not depend on the Hamiltonian function ${H}$ and it always equals to zero. However, ${HF(H,\gamma:\Lambda_0)}$ does not equal to zero in general. So, there is a sequence ${0<\beta_1\le \cdots \le \beta_k}$ such that \begin{equation*} HF(H,\gamma:\Lambda_0)\cong \bigoplus_{i=1}^k \Lambda_0/T^{\beta_i}\cdot\Lambda_0 \end{equation*} holds. We have the following filtration on ${(CF(H,\gamma:\Lambda),d_F)}$. For any ${c\in \mathbb{R}}$, we have the following subcomplex of ${(CF(H,\gamma:\Lambda),d_F)}$. \begin{equation*} CF^c(H,\gamma:\Lambda)=\bigg\{ \sum_{x\in P(H:\gamma)}\Big(\sum_{\lambda_i\ge c}a_i\cdot T^{\lambda_i}\Big)\cdot x \in CF(H,\gamma:\Lambda) \bigg\} \end{equation*} Then for any ${c<d}$, we can define the Floer homology with action window ${[c,d)}$ as follows. \begin{equation*} HF^{[c,d)}(H,\gamma:\Lambda)=H((CF^c(H,\gamma:\Lambda)/CF^d(H,\gamma:\Lambda),d_F)) \end{equation*} \subsection{Local Floer homology} We need local theory of Floer homology theory, so-called local Floer homology (see \cite{GG5}). Let ${x\in P(H,\gamma)}$ be an isolated periodic orbit of a Hamiltonian function ${H\in C^{\infty}(S^1\times M)}$. In this subsection, we explain the local Floer homology ${HF^{loc}(H,x)}$. Note that $x$ is not necessarily non-degenerate periodic orbit. Let ${\mathcal{U}\subset S^1\times M}$ be a sufficiently small open neighborhood of the embedded circle ${(t,x(t))\subset S^1\times M}$ and let ${\widetilde{H}}$ be a non-degenerate ${C^{\infty}}$-small perturbation of $H$. Then ${x}$ splits into non-degenerate periodic orbits ${\{x_i,\cdots,x_k\}}$ of ${\widetilde{H}}$ in ${\mathcal{U}}$. The local Floer chain complex ${CF^{loc}(H,x)}$ is generated by these perturbed periodic orbits. \begin{gather*} CF^{loc}(H,x)=\bigoplus_{i=1}^k \mathbb{K}\cdot x_i \end{gather*} The boundary operator ${d_F^{loc}}$ on ${CF^{loc}(H,x)}$ is defined by counting solutions of the Floer equation in ${\mathcal{U}}$. So, ${d_F^{loc}}$ can be written by ${d_F^{loc}(x_i)=\sum n(x_i,x_j)x_j}$ where coefficient ${n(x_i,x_j)\in \mathbb{K}}$ is determined by the number of solutions of the following equation modulo the natural ${\mathbb{R}}$-action. \begin{gather*} u:\mathbb{R}\times S^1\longrightarrow M \\ \partial_su(s,t)+J_t(u(s,t))(\partial_tu(s,t)-X_{\widetilde{H}_t}(u(s,t)))=0 \\ \lim_{s\to -\infty}u(s,t)=x_i(t), \lim_{s\to +\infty}u(s,t)=x_j(t) \\ (t,u(s,t))\in \mathcal{U} \end{gather*} The local Floer homology ${HF^{loc}(H,x)}$ is the homology of the chain complex ${(CF^{loc}(H),d_F^{loc})}$. The following properties hold (see \cite{GG5}). \begin{enumerate} \item If $x$ is non-degenerate periodic orbit of ${H}$, then ${HF^{loc}(H,x)\cong \mathbb{K}}$ holds. \item ${HF^{loc}(H,x)}$ does not depend on the choice of the perturbation ${\widetilde{H}}$. \item Let ${\{\beta_1,\cdots,\beta_l\}\subset S^1\setminus \{1\}}$ be the set of eigenvalues of the differential map \begin{equation*} d\phi_H:T_{x(0)}M\longrightarrow T_{x(0)}M \end{equation*} on ${S^1\setminus \{1\}\subset \mathbb{C}}$. An integer ${k\in \mathbb{N}}$ is called admissible if ${\beta_i^k\neq 1}$ holds for any ${1\le k \le l}$. If $k$ is admissible, the local Floer homology of ${(H,x)}$ and ${(H^{(k)}, x^{(k)})}$ are isomorphic. In other words, \begin{equation*} HF^{loc}(H^{(k)},x^{(k)})\cong HF^{loc}(H,x) \end{equation*} holds. \end{enumerate} Note that the local Floer chain complex ${(CF^{loc}(H,x),d_F^{loc})}$ is a chain complex over a finite dimensional vector space over ${\mathbb{K}}$ (not over $\Lambda$ nor $\Lambda_0$). \section{$\mathbb{Z}_p$-equivariant Floer theory} Our proof of Theorem 1.1 is an application of the ${\mathbb{Z}_p}$-equivariant Floer homology. In this section, we briefly review constructions and basic properties of the equivariant theory which we will use in our proof of Theorem 1.1. The readers can find the detailed constructions of the equivariant Floer theory in \cite{SZ} (see also \cite{Se}). The first attempt to this direction is due to Seidel in \cite{Se}, where he constructed ${\mathbb{Z}_2}$-equivariant Floer theory. After that, Seidel's construction was generalized to ${\mathbb{Z}_p}$-equivariant Floer theory by Shelukhin-Zhao and Shelukhin in \cite{SZ,Sh}. In these papers, they gave a various applications of the equivariant Floer homology. In particular, the equivariant Floer theory is very useful when we study the relationship between ${HF(\phi)}$ and iterated Floer homology ${HF(\phi^p)}$. We will focus on the behavior of the torsion of ${HF(\phi^p)}$ as $p$ becomes bigger and bigger. We fix a prime number $p$ and we assume that ${H\in C^{\infty}(S^1\times M)}$ is a Hamiltonian function such that ${H^{(p)}}$ is non-degenerate. In this section, we assume that ${(M,\omega)}$ is a monotone symplectic manifold. We will give a construction of the equivariant theory for weakly monotone symplectic manifolds in the last section, where we explain what is the technical difficulty in the weakly monotone case and how we can overcome this problem. The equivariant Floer homology is a mixture of Floer theory on ${(M,\omega)}$ and Morse theory on the classifying space. Let ${\mathbb{C}^{\infty}}$ be the infinite-dimensional complex vector space \begin{equation*} \mathbb{C}^{\infty}=\{z=\{z_k\}_{k\in \mathbb{Z}_{\ge 0}} \ | \ z_k\in \mathbb{C}, z_k=0 \textrm{ \ for\ sufficiently\ large\ }k\} \end{equation*} and let ${S^{\infty}\subset \mathbb{C}^{\infty}}$ be the infinite-dimensional sphere defined by \begin{equation*} S^{\infty}=\{z\in \mathbb{C}^{\infty} \ | \ \sum|z_k|^2=1\}. \end{equation*} There is a natural ${\mathbb{Z}_p}$-action and a shift operator ${\tau}$ on ${S^{\infty}}$ as follows. \begin{gather*} \{m\cdot z\}_k=\exp \bigg\{\frac{2\pi im}{p}\bigg\}\cdot z_k \ \ (m\in \mathbb{Z}_p) \end{gather*} \begin{gather*} \{\tau(z)\}_k=\begin{cases} 0 \ \ \ \ (k=0) \\ z_{k-1} \ \ \ \ (k\ge 1) \end{cases} \end{gather*} Let ${f:S^{\infty}\rightarrow \mathbb{R}}$ be the following Bott-Morse function. \begin{equation*} f(z)=\sum_{k=0}^{\infty}k|z_k|^2 \end{equation*} This $f$ satisfies ${\tau^*f=f+1}$ and ${f(z)=f(m\cdot z)}$ for (${m\in \mathbb{Z}_p}$). The critical submanifolds are ${S_l^1=\{z\in S^{\infty} \ | \ |z_k|=1\}}$ and their index are ${2l}$. Next, we perturb $f$ to a Morse function with above properties. For example, we can use the following explicit perturbation (see \cite{SZ}). \begin{equation*} \widetilde{F}=f(z)+\epsilon \cdot \sum_k\textrm{Re}(z_k^p) \end{equation*} Then ${\widetilde{F}}$ is a Mose function and ${S_l^1}$ splits into critical points ${\{Z_{2l}^0,\cdots,Z_{2l}^{p-1}\}}$ and ${\{Z_{2l+1}^0,\cdots,Z_{2l+1}^{p-1}\}}$. The Morse index of ${Z_j^m}$ is $j$. It is straightforward to see that ${\tau^*\widetilde{F}=\widetilde{F}+1}$ and ${\widetilde{F}}(z)=\widetilde{F}(m\cdot z)$ hold. We also fix a Riemannian metric ${\widetilde{g}}$ such that ${\widetilde{g}}$ is invariant under ${\mathbb{Z}_p}$-action and $\tau$ and ${(\widetilde{F},\widetilde{g})}$ is a Morse-Smale pair. Mose boundary operator ${d_M}$ can be written in the following form. \begin{gather*} d_M(Z_{2l}^0)=Z_{2l+1}^0-Z_{2l+1}^1 \\ d_M(Z_{2l+1}^0)=Z_{2l+2}^0+Z_{2l+2}^1+\cdots +Z_{2l+2}^{p-1} \end{gather*} This ${d_M}$ is equivariant under the ${\mathbb{Z}_p}$ action ${m\cdot Z_i^j=Z_i^{j+m(\textrm{mod} p)}}$. Let ${(H^{(p)}, J_t)}$ be a pair of Hamiltonian function ${H^{(p)}}$ and ${S^1}$-dependent almost complex structure on ${(M,\omega)}$. We want to extend ${J_t}$ to a family of ${S^1}$-dependent almost complex structures parametrized by ${w\in S^{\infty}}$. So, we consider a family of almost complex structures ${\{J_{w,t}\}_{w\in S^{\infty},t\in S^1}}$ which satisfies the following conditions. \begin{itemize} \item (local constant at critical points) In a small neighborhood of ${Z_i^m}$, \begin{equation*} J_{w,t}=J_{t-\frac{m}{p}} \end{equation*} holds. \item (${\mathbb{Z}_p}$-equivariance) ${J_{m\cdot w,t}=J_{w,t-\frac{m}{p}}}$ holds for any ${m\in \mathbb{Z}_p}$ and ${w\in S^{\infty}}$. \item (invariance under the shift ${\tau}$) ${J_{\tau(w),t}=J_{z,t}}$ holds. \end{itemize} We consider the following equation, which is a mixture of the Floer equation and the Morse equation for ${x,y\in P(H^{(p)})}$, ${m\in \mathbb{Z}_p}$, ${\lambda \ge 0}$, ${\alpha \in \{0,1\}}$, ${i\in \mathbb{Z}_{\ge 0}}$. \begin{gather*} (u,v)\in C^{\infty}(\mathbb{R}\times S^1, M)\times C^{\infty}(\mathbb{R}, S^{\infty}) \\ \partial _su(s,t)+J_{v(s),t}(u(s,t))(\partial_tu(s,t)-X_{H^{(p)}}(u(s,t)))=0 \\ \frac{d}{ds}v(s)-\textrm{grad}\widetilde{F}=0 \\ \lim_{s\to -\infty}v(s)=Z_{\alpha}^0, \lim_{s\to +\infty}v(s)=Z_i^m, \lim_{s\to -\infty}u(s,t)=x(t), \lim_{s\to +\infty}u(s,t)=y(t-\frac{m}{p}) \\ \int_{\mathbb{R}\times S^1}u^*\omega+\int_0^1H^{(p)}(t,x(t))-H^{(p)}(t,y(t))dt=\lambda \end{gather*} We denote the space of solutions of this equation by ${\mathcal{M}_{\alpha,i,m}^{\lambda}(x,y)}$. \begin{equation*} \mathcal{M}_{\alpha,i,m}^{\lambda}(x,y)=\{(u,v) \ | \ (u,v) \ \textrm{satisfies\ the\ above\ equation}\}/\sim \end{equation*} The equivalence relation ${\sim}$ is given by the natural ${\mathbb{R}}$-action on the solution space. We define ${d_{\alpha}^{i,m}}$ (${\alpha \in \{0,1\}}$, ${i\in \mathbb{Z}_{\ge 0}}$, ${m\in \mathbb{Z}_p}$) as follows. \begin{gather*} d_{\alpha}^{i,m}:CF(H^{(p)},\gamma:\Lambda^0)\longrightarrow CF(H^{(p)},\gamma:\Lambda^0) \\ x\mapsto \sum_{ x\in P(H^{(p)}), \lambda \ge 0}\sharp \mathcal{M}_{\alpha,i,m}^{\lambda}(x,y)\cdot T^{\lambda}y \end{gather*} Let ${d_{\alpha}^i}$ be the sum ${d_{\alpha}^i=\sum_{m\in \mathbb{Z}_p}d_{\alpha}^{i,m}}$. Note that ${d_0^0=d_1^1=d_F}$ holds. We define the ${\mathbb{Z}_p}$-equivariant Floer chain complex as follows. \begin{equation*} CF_{\mathbb{Z}_p}(H^{(p)},\gamma)=CF(H^{(p)},\gamma:\Lambda_0)\otimes \Lambda_0[u^{-1},u]]\langle \theta\rangle \end{equation*} Here, ${\langle \theta \rangle}$ is the exterior algebra on the formal variable ${\theta}$ and ${\Lambda_0[u^{-1},u]]}$ is the ring of Laurant polynomials of formal variable ${u}$. So any element of ${CF_{\mathbb{Z}_p}(H^{(p)},\gamma)}$ is written in the following form for some ${k\in \mathbb{Z}}$. \begin{equation*} (x_k+y_k\theta)u^k+\sum_{i=k+1}^{\infty}(x_i+y_i\theta)u^i \ \ \ (x_j,y_j\in CF(H^{(p)},\gamma:\Lambda_0)) \end{equation*} The equivariant Floer boundary operator ${d_{eq}}$ is a ${\Lambda_0[u^{-1},u]]}$-linear map and defined in the following formula. \begin{gather*} d_{eq}(x\otimes 1)=\sum_{i=0}^{\infty}d_0^{2i}(x)\otimes u^i+\sum_{i=0}^{\infty}d_0^{2i+1}(x)\otimes u^i\theta \\ d_{eq}(x\otimes \theta)=\sum_{i=0}^{\infty}d_1^{2i+1}(x)\otimes u^i\theta+\sum_{i=1}^{\infty}d_1^{2i}(x)\otimes u^i \end{gather*} ${d_0^0=d_1^1=d_F}$ implies that ${d_{eq}}$ is a sum of ${d_F}$ and higher terms. The ${\mathbb{Z}_p}$-equivariant Floer homology ${HF_{\mathbb{Z}_p}(H^{(p)},\gamma)}$ is defined by \begin{equation*} HF_{\mathbb{Z}_p}(H^{(p)},\gamma)=H((CF_{\mathbb{Z}_p}(H^{(p)},\gamma),d_{eq})). \end{equation*} \begin{Rem} ${d_{eq}}$ is defined on Laurant polynomial ring ${\Lambda_0[u^{-1},u]]}$, but we can define ${d_{eq}}$ over the formal power series ${\Lambda_0[[u]]}$. We defined ${d_{eq}}$ over Laurant polynomial ring because the ${\mathbb{Z}_p}$-equivariant pair of pants product gives a local isomorphism between local Floer homology and local equivariant Floer homology over ${\Lambda_0[u^{-1},u]]}$ (see \cite{Se, SZ}). We will explain this in the latter sections and we apply this local isomorphism. \end{Rem} \section{Local (equivariant) Floer homology and homological perturbation theory} In the proof of Theorem 1.1, we have to treat Hamiltonian diffeomorphism with finite periodic orbits, but not necessarily non-degenerate. One natural way to overcome this difficulty is to just perturb the original Hamiltonian diffeomorphsm ${\phi}$ to a non-degenerate Hamiltonian diffeomorphism ${\widetilde{\phi}}$ and consider ${HF(\widetilde{\phi}:\Lambda_0)}$ instead of ${HF(\phi:\Lambda_0)}$. However, it is not sufficient because the structure of ${HF(\widetilde{\phi}:\Lambda_0)}$ does depend on the perturbation ${\widetilde{\phi}}$. We have to construct a chain complex and a homology theory in a homologically canonical way. In this section, we explain a construction of Floer thoery for not necessarily non-degenerate Hamiltonian diffeomorphism (see also \cite{Sh}). This is an application of the perturbation theory in \cite{M}. Assume that ${H}$ is not necessarily non-degenerate Hamiltonian function and ${P(H,\gamma)}$ is finite for ${\gamma \neq 0\in H_1(M:\mathbb{Z})/\textrm{Tor}}$. Let ${\widetilde{H}}$ be a small perturbation of ${H}$ so that ${\phi_{\widetilde{H}}}$ is non-degenerate. Then every element ${x_i\in P(H,\gamma)}$ splits into a finite non-degenerate periodic orbits ${\{x_i^{1},\cdots,x_i^{l_i}\}\subset P(\widetilde{H},\gamma)}$. First, we deform the complex ${(CF(\widetilde{H},\gamma:\Lambda_0),d_F)}$ in a canonical way. For any ${x_i\in P(H,\gamma)}$ and ${x_i^j\in P(\widetilde{H},\gamma)}$, we fix a sufficiently small connecting cylinder between ${x_i}$ and ${x_i^j}$ as follows. \begin{gather*} v_i^j:[0,1]\times S^1\longrightarrow M \\ v_i^j(0,t)=x_i(t), v_i^j(1,t)=x_i^j(t) \end{gather*} The "gap" of the action functional \begin{equation*} c(x_i,x_i^j)=\int_{[0,1]\times S^1}(v_i^j)^*\omega+\int_0^1H(t,x_i(t))-\widetilde{H}(t,x_i^j(t))dt \end{equation*} does not depend on the choice of ${v_i^j}$. We define a correction map ${\tau}$ as follows. \begin{gather*} \tau: CF(\widetilde{H},\gamma:\Lambda)\rightarrow CF(\widetilde{H},\gamma:\Lambda) \\ x_i^j\mapsto T^{c(x_i,x_i^j)}\cdot x_i^j \end{gather*} Note that ${\tau}$ is defined over ${\Lambda}$ (not over ${\Lambda_0}$). Then we can define the modified differential operator ${\widetilde{d_F}}$ by ${\widetilde{d_F}=\tau^{-1}\circ d_F\circ \tau}$. It is easy to see that ${\widetilde{d_F}}$ is also defined over ${\Lambda_0}$. Note that ${\tau}$ gives an isomorphism between Floer chain complexes over ${\Lambda}$ (but not over ${\Lambda_0}$) as follows. \begin{gather*} \tau_{\widetilde{H}}: (CF(\widetilde{H},\gamma:\Lambda), \widetilde{d_F}) \longrightarrow (CF(\widetilde{H},\gamma:\Lambda), d_F) \\ x\mapsto \tau(x) \end{gather*} Let ${\widetilde{H}'}$ be another non-degenerate perturbation of ${H}$ and we also denote the modified differential operator on ${CF(\widetilde{H}',\gamma:\Lambda)}$ by ${\widetilde{d_F}}$. It is straightforward to see that the natural continuation map between Floer chain complexes \begin{equation*} \Phi: (CF(\widetilde{H},\gamma:\Lambda),d_F)\longrightarrow (CF(\widetilde{H}',\gamma:\Lambda),d_F) \end{equation*} descends to a continuation map over ${\Lambda_0}$ (not only over ${\Lambda}$) as follows. \begin{gather*} \widetilde{\Phi}: (CF(\widetilde{H},\gamma:\Lambda_0),\widetilde{d_F})\longrightarrow (CF(\widetilde{H}',\gamma:\Lambda_0),\widetilde{d_F}) \\ x\mapsto (\tau_{\widetilde{H}'})^{-1}\circ \Phi \circ \tau_{\widetilde{H}} \end{gather*} The continuation map of the inverse direction \begin{gather*} \Psi: (CF(\widetilde{H}',\gamma:\Lambda),d_F)\longrightarrow (CF(\widetilde{H},\gamma:\Lambda),d_F) \end{gather*} also descends to a continuation map \begin{equation*} \widetilde{\Psi}: (CF(\widetilde{H}',\gamma:\Lambda_0),\widetilde{d_F})\longrightarrow (CF(\widetilde{H},\gamma:\Lambda_0),\widetilde{d_F}) \end{equation*} in the same way. The chain homotopy maps between the identity and ${\Psi \circ \Phi}$, ${\Phi \circ \Psi}$ also descend to chain homotopy maps between the identity and ${\widetilde{\Psi}\circ \widetilde{\Phi}}$, ${\widetilde{\Phi}\circ \widetilde{\Psi}}$. This implies that the perturbed and modified Floer chain complex ${(CF(\widetilde{H},\gamma:\Lambda_0),\widetilde{d_F})}$ is unique up to chain homotopy equivalence. So we can define the Floer homology of ${H}$ by the homology of this chain complex and this is well defined. \begin{equation*} HF(H,\gamma:\Lambda_0)=H(CF(\widetilde{H},\gamma:\Lambda_0),\widetilde{d_F}) \end{equation*} However, this construction is not sufficient for our purpose. The chain complex ${(CF(\widetilde{H},\gamma:\Lambda_0),\widetilde{d_F})}$ is not strict in the following sense. "Strict" means that for any ${z\in CF(\widetilde{H},\gamma:\Lambda_0)}$, there is ${\epsilon>0}$ such that \begin{equation*} \widetilde{d_F}(z)\in CF^{\epsilon}(\widetilde{H},\gamma:\Lambda_0) \end{equation*} holds. Note that we can identify ${CF(\widetilde{H},\gamma:\Lambda_0)}$ and ${\bigoplus_{x\in P(H,\gamma)}CF^{loc}(H,x)\otimes \Lambda_0}$. Then ${\widetilde{d_F}}$ can be decomposed into the sum of ${\widetilde{d_F}=d_F^{loc}+D}$ where ${D}$ is a higher term. \begin{equation*} D(CF(\widetilde{H},\gamma:\Lambda_0))\subset CF^{\epsilon}(\widetilde{H},\gamma:\Lambda_0) \ \ \ \ (\epsilon>0) \end{equation*} So ${(CF(\widetilde{H},\gamma:\Lambda_0),\widetilde{d_F})}$ is strict if and only if ${d_F^{loc}=0}$ holds. Our aim of the rest of this section is to construct a homologically canonical boundary operator on ${\bigoplus_{x\in P(H,\gamma)}HF^{loc}(H,x)\otimes \Lambda_0}$ instead on ${\bigoplus_{x\in P(H,\gamma)}CF^{loc}(H,x)\otimes \Lambda_0}$ and prove that the chain complex is chain homotopy equivalent to the original chain complex. We defined the Floer chain complex of $H$ by \begin{equation*} CF(H,\gamma:\Lambda_0)=\bigoplus_{x\in P(H,\gamma)}HF^{loc}(H,x)\otimes \Lambda_0 . \end{equation*} We choose a basis $\{X_i^a,Y_i^b,Z_i^c\}$ of ${CF^{loc}(H,x_i)=\bigoplus \mathbb{F}_p\cdot x_i^j}$ which satisfies the following relations. \begin{gather*} d_F^{loc}(X_i^a)=0 \ \ \ (1\le a\le \textrm{dim}_{\mathbb{F}_p}HF^{loc}(H,x_i)) \\ d_F^{loc}(Y_i^b)=0 \ \ \ (1\le b\le \frac{1}{2}(l_i-\textrm{dim}_{\mathbb{F}_p}HF^{loc}(H,x_i))) \\ d_F^{loc}(Z_i^c)=Y_i^c \ \ \ (1\le c\le \frac{1}{2}(l_i-\textrm{dim}_{\mathbb{F}_p}HF^{loc}(H,x_i))) \end{gather*} Then ${HF^{loc}(H,x_i)}$ can be identified with ${\textrm{span}_{\mathbb{F}_p}\langle X_i^1,\cdots,X_i^{\textrm{dim}_{\mathbb{F}_p}HF^{loc}(H,x_i)}\rangle}$. We define two operators ${\Pi_i}$ and ${\Theta_i}$ on ${CF^{loc}(H,x_i)}$ as follows. \begin{gather*} \Pi_i(\sum \alpha_aX_i^a+\sum \beta_bY_i^b+\sum \gamma_cZ_i^c)=\sum \alpha_aX_i^a\\ \Theta_i(\sum \alpha_aX_i^a+\sum \beta_bY_i^b+\sum \gamma_cZ_i^c)=\sum \beta_cZ_i^c \end{gather*} Let ${\Pi=\sum \Pi_i}$ and ${\Theta=\sum \Theta_i}$ be the sums of the above operators. Next, we apply the perturbation theory in \cite{M}. First we explain what is the perturbation theory and how we can apply it to our case. Let ${M=(M,d_M)}$ be a chain complex with a decreasing filtration ${\{F^pM\}_{p\in \mathbb{Z}_{\ge 0}}}$. \begin{equation*} M=F^0M\subset F^1M\subset F^2M\subset \cdots \end{equation*} We assume that this filtration is complete. In other words, $M$ is complete with respect to the ${F^p}$-adic topology and a infinite sum ${\sum_{p} m_p}$ such that ${m_p\in F^pM}$ holds converges uniquely to an element of $M$. Let ${(N,d_N)}$ be another chain complex with a complete and decreasing filtration ${\{F^pN\}}$. Morphisms between filtered chain complexes are maps that preserve filtrations. Let ${f:M\rightarrow N}$ be a morphism. Another morphism ${g:M\rightarrow N}$ is called a perturbations of $f$ if \begin{equation*} (f-g)F^pM\subset F^{p+1}N \end{equation*} holds for any ${p\in \mathbb{Z}_{\ge 0}}$. Perturbations of boundary operators $d_M$ and ${d_N}$ are defined in the same way. In \cite{M}, Markl studied the following problem. Let \begin{gather*} F:(M,d_M)\longrightarrow (N,d_N) \\ G:(N,d_N)\longrightarrow (M,d_M) \end{gather*} be chain maps that preserve filtrations and assume that we also have chain homotopies between the identity and ${GF}$, ${FG}$ as follows. \begin{gather*} H:M\rightarrow M, \ L:N\rightarrow N \\ GF-\textrm{Id}_M=d_MH+Hd_M \\ FG-\textrm{Id}_N=d_NL+Ld_N \end{gather*} Next, we perturb the original boundary operator ${d_M}$ to a new boundary operator ${\widetilde{d_M}=d_M+D_M}$ (${D_M(F^pM)\subset F^{p+1}M}$ holds for any $p$). Then, can we perturb ${d_N}$, ${F}$,${G}$,${H}$ and ${L}$ so that the above equations hold? Markl gave a complete answer to this problem. It is always possible if the "obstruction class" vanishes (Ideal perturbation lemma). However, we do not need the full generality of Markl's theorem. We only treat the simplest case of this perturbation problems. We treat the case that ${(N,d_N)}$ is the strong deformation retract of ${(M,d_M)}$. Let ${(M,d_M)}$ and ${(N,d_N)}$ be two chain complexes with complete and decreasing filtrations. Assume that chain maps \begin{gather*} F:(M,d_M)\longrightarrow (N,d_N) \\ G:(N,d_N)\longrightarrow (M,d_M) \end{gather*} preserve filtrations and there is a morphism ${H:M\longrightarrow N}$ which satisfies the following conditions. \begin{gather*} GF-\textrm{Id}_M=d_MH+Hd_M \\ FG=\textrm{Id}_N \\ HH=0, HG=0, FH=0 \ \ (\textrm{annihilation \ properties}) \end{gather*} Let ${\widetilde{d_M}=d_M+D_M}$ be a perturbation of ${d_M}$. Then Basic perturbation lemma (\cite{M}) states that there are perturbations ${\widetilde{d_N}}$, $\widetilde{F}$, $\widetilde{G}$ and ${\widetilde{H}}$ which satisfy the following conditions. \begin{gather*} \widetilde{G}\widetilde{F}-\textrm{Id}_M=\widetilde{d_M}\widetilde{H}+\widetilde{H}\widetilde{d_M} \\ \widetilde{F}\widetilde{G}=\textrm{Id}_N \end{gather*} So we can perturb ${(N,d_N)}$ so that ${(M,\widetilde{d_M})}$ and ${(N,\widetilde{d_N})}$ are also chain homotopy equivalent. We also have explicit formulas for these perturbations as follows. \begin{gather*} \widetilde{d_N}=d_N+F\sum_{l\ge 0}(D_MH)^lD_MG \\ \widetilde{F}=F\sum_{l\ge 0}(D_MH)^l \\ \widetilde{G}=\sum_{l\ge 0}(HD_M)^lG \\ \widetilde{H}=H\sum_{l\ge 0}(D_MH)^l \end{gather*} Next, we apply this basic perturbation lemma to construct a strict Floer chain complex of $H$. In our case, ${(M,d_M)}$, ${(N,d_N)}$ and ${\widetilde{d_M}}$ correspond to the following things. \begin{gather*} (M,d_M)=(\bigoplus_{s\in P(H,\gamma)}CF^{loc}(H,x)\otimes \Lambda_0, d_F^{loc}) \\ (N,d_N)=(\bigoplus_{s\in P(H,\gamma)}HF^{loc}(H,x)\otimes \Lambda_0, 0) \\ \widetilde{d_M}=\widetilde{d_F}=d_F^{loc}+D \\ F=\Pi, H=\Theta, \end{gather*} The "inclusion" \begin{equation*} G:N\longrightarrow M \end{equation*} is defined as follows. \begin{gather*} HF^{loc}(H,x_i)\longrightarrow CF^{loc}(H,x_i) \\ \bigg[\sum{\alpha_aX_i^a}\bigg]\mapsto \sum{\alpha_aX_i^a} \end{gather*} Then according to the basic perturbation lemma and the explicit construction of ${\widetilde{d_N}}$, we can define the boundary operator ${d_F:CF(H,\gamma:\Lambda_0)\rightarrow CF(H,\gamma:\Lambda_0)}$ by the following formula. \begin{equation*} d_F=\Pi\circ \sum_{l=0}^\infty (D\Theta)^l D \end{equation*} Note that we identify ${HF^{loc}(H,x_i)}$ with ${\textrm{span}_{\mathbb{F}_p}\langle X_i^1,\cdots,X_i^{\textrm{dim}_{\mathbb{F}_p}HF^{loc}(H,x_i)}\rangle}$ in this formula. Then, ${(CF(H,\gamma:\Lambda_0),d_F)}$ is a strict chain complex which is also chain homotopy equivalent to the original chain complex ${(CF(\widetilde{H},\gamma:\Lambda_0),\widetilde{d_F})}$. So we defined the Floer chain complex ${(CF(H,\gamma:\Lambda_0),d_F)}$ in a homologically canonical way. Next, assume that ${P(H^{(p)},\gamma)}$ is finite. Then, we can construct a strict boundary operator ${d_{eq}}$ on the ${\mathbb{Z}_p}$-equivariant Floer chain complex \begin{equation*} CF_{\mathbb{Z}_p}(H^{(p)},\gamma)=\bigoplus_{x\in P(H^{(p)},\gamma)}HF_{\mathbb{Z}_p}^{loc}(H^{(p)},x)\otimes \Lambda_0 \end{equation*} by the same formula as in the definition of ${(CF(H,\gamma:\Lambda_0),d_F)}$. So we can also define the ${\mathbb{Z}_p}$-equivariant Floer chain complex for not necessarily non-degenerate Hamiltonian diffeomorphisms. \section{Hofer-Zehnder conjecture for non-contractible periodic orbits} In this section, we prove Theorem 1.1. We divide the proof in two parts, monotone case and weakly monotone case. The reason of this is that we have not constructed ${\mathbb{Z}_p}$-equivariant Floer theory for weakly monotone symplectic manifolds yet. As we mentioned before, we have to overcome some technical difficulties in weakly monotone case. Once we establish ${\mathbb{Z}_p}$-equivariant Floer theory on weakly monotone symplectic manifolds, the rest of the proof is almost the same as in the monotone case. So essential part of our proof is given in the monotone case. \subsection{Monotone case} In this subsection, we prove Theorem 1.1 for monotone symplectic manifolds. Let ${(M,\omega)}$ be a closed monotone symplectic manifold. We fix ${H\in C^{\infty}(S^1\times M)}$ and ${\gamma \neq 0\in H_1(M:\mathbb{Z})/\textrm{Tor}}$. We also assume that ${P(H,\gamma)=\{x_1,\cdots,x_k\}}$ and ${P(H^{(p)},p\gamma)=\{y_1,\cdots,y_k\}}$ and ${y_i=x_i^{(p)}}$ holds. In other words, every $p$-periodic orbits of $H$ in ${p\gamma}$ is not simple. Our purpose is to prove that there is a simple ${p'}$-periodic orbit in ${p\gamma}$. In the previous section, we defined the ${\mathbb{Z}_p}$-equivariant Floer chain complex ${(CF(H^{(p)},p\gamma), d_{eq})}$ and the ${\mathbb{Z}_p}$-equivariant Floer homology ${HF_{\mathbb{Z}_p}(H^{(p)},p\gamma)}$. Recall that we applied the perturbation theory to make ${(CF(H^{(p)},p\gamma), d_{eq})}$ a strict differential complex. Let ${\widetilde{H}}$ be a perturbation of ${H}$ such that ${\widetilde{H}^{(p)}}$ is non-degenerate. In the definition of ${d_{eq}}$, we have seen that ${d_{eq}}$ is written as ${d_F+\textrm{higer\ terms}}$ if ${H^{(p)}}$ is non-degenerate and we do not have to apply perturbation lemma. Next we prove that this is also true when ${H^{(p)}}$ is not non-degenerate and we apply perturbation lemma. In this case, each ${y_i\in P(H^{(p)},p\gamma)}$ splits into non-degenerate periodic orbits ${\{y_i^1,\cdots,y_i^{l_i}\}\subset P(\widetilde{H}^{(p)},p\gamma)}$. We prove the following lemma. \begin{Lem} We can choose a basis ${\{\widetilde{X}_i^a, \widetilde{Y}_i^b, \widetilde{Z}_i^c, \widetilde{X}_{i,\theta}^a, \widetilde{Y}_{i,\theta}^b, \widetilde{Z}_{i,\theta}^c\}}$ of \begin{gather*} CF_{\mathbb{Z}_p}^{loc}(H^{(p)}, y_i)=CF^{loc}(H^{(p)},y_i)\otimes \mathbb{F}_p[u^{-1},u]]\langle \theta \rangle \end{gather*} over ${\mathbb{F}_p[u^{-1},u]]}$ and a basis ${\{X_i^a,Y_i^b,Z_i^c\}}$ of ${CF^{loc}(H^{(p)},y_i)}$ which satisfies the following conditions. \begin{gather*} \widetilde{X}_i^a=X_i^a\otimes 1+(a_1^{(a)}\otimes \theta+\sum_{k=1}^{\infty}\sum_{k'=0,1}a_{2k+k'}^{(a)}\otimes u^k\theta^{k'}) \\ \widetilde{Y}_i^b=Y_i^b\otimes 1+(b_1^{(b)}\otimes \theta+\sum_{k=1}^{\infty}\sum_{k'=0,1}b_{2k+k'}^{(b)}\otimes u^k\theta^{k'}) \\ \widetilde{Z}_i^c=Z_i^c\otimes 1+(c_1^{(c)}\otimes \theta+\sum_{k=1}^{\infty}\sum_{k'=0,1}c_{2k+k'}^{(c)}\otimes u^k\theta^{k'}) \\ \widetilde{X}_{i,\theta}^a=X_i^a\otimes\theta+\sum_{k=1}^{\infty}\sum_{k'=0,1}d_{2k+k'}^{(a)}\otimes u^k\theta^{k'} \\ \widetilde{Y}_{i,\theta}^b=Y_i^b\otimes\theta+\sum_{k=1}^{\infty}\sum_{k'=0,1}e_{2k+k'}^{(b)}\otimes u^k\theta^{k'} \\ \widetilde{Z}_{i,\theta}^c=Z_i^c\otimes\theta+\sum_{k=1}^{\infty}\sum_{k'=0,1}f_{2k+k'}^{(c)}\otimes u^k\theta^{k'} \\ d_F^{loc}(X_i^a)=d_F^{loc}(Y_i^b)=0, \ d_F^{loc}(Z_i^c)=Y_i^c, \ d_{eq}^{loc}(\widetilde{X}_i^a)=d_{eq}^{loc}(\widetilde{Y}_i^b)=0, \ d_{eq}^{loc}( \widetilde{Z}_i^c)=\widetilde{Y}_i^c \\ d_{eq}^{loc}(\widetilde{X}_{i,\theta}^a)=d_{eq}^{loc}(\widetilde{Y}_{i,\theta}^b)=0, \ d_{eq}^{loc}( \widetilde{Z}_{i,\theta}^c)=\widetilde{Y}_{i,\theta}^c \\ 1\le a\le \textrm{dim}_{\mathbb{F}_p}HF^{loc}(H^{(p)},y_i), \ 1\le b,c \le \frac{1}{2}(l_i-\textrm{dim}_{\mathbb{F}_p}HF^{loc}(H^{(p)},y_i)) \\ \{a_*^{(a)},b_*^{(b)},c_*^{(c)}, d_*^{(a)},e_*^{(b)},f_*^{(c)}\}\subset CF^{loc}(H^{(p)},y_i) \end{gather*} \end{Lem} Note that ${CF^{loc}(H^{(p)},y_i)=\oplus_j \mathbb{F}_p\cdot y_i^j}$ holds. The existence of a basis ${\{X_i^a,Y_i^b,Z_i^c\}}$ is trivial and we can define ${ \widetilde{Y}_i^b, \widetilde{Z}_i^c, \widetilde{Y}_{i,\theta}^b,\widetilde{Z}_{i,\theta}^c}$ by ${\widetilde{Z}_i^c=Z_i^c\otimes 1}$, ${\widetilde{Z}_{i,\theta}^c=,Z_i^c\otimes \theta}$, ${\widetilde{Y}_i^b=d_{eq}^{loc}(\widetilde{Z}_i^b)}$ and ${\widetilde{Y}_{i,\theta}^b=d_{eq}^{loc}(\widetilde{Z}_{i,\theta}^b)}$. So what we have to prove is the existence of ${\widetilde{X}_i^a}$ and ${\widetilde{X}_{i,\theta}^a}$. Let ${\mathcal{C}}$ be the set of all cycles in ${(CF_{\mathbb{Z}_p}^{loc}(H^{(p)},y_i),d_{eq}^{loc})}$. We consider two projections \begin{equation*} \pi_1,\pi_2:\mathcal{C} \longrightarrow \textrm{span} \langle X_i^1,\cdots,X_i^{d}\rangle \ \ \ \ (d=\textrm{dim}_{\mathbb{F}_p}HF^{loc}(H^{(p)},y_i)) . \end{equation*} For ${z=(a_k\otimes 1+b_k\otimes \theta)u^k+\sum_{l=k+1}(a_l\otimes 1+b_l\otimes \theta)u^l}$, we define ${\pi_1(z)}$ and ${\pi_2(z)}$ by the following formula. Let ${\Pi_i:CF(H^{(p)},y_i)\rightarrow \textrm{span} \langle X_i^1,\cdots,X_i^{d}\rangle}$ be the projection as before. \begin{gather*} \pi_1(z)=\Pi_i(a_k) \\ \pi_2(z)=\begin{cases} \Pi_i(b_k) & a_k=0 \\ 0& a_k\neq 0 \end{cases} \end{gather*} Assume that ${\textrm{Im}(\pi_1)}$ is generated by ${\widetilde{V_j}}$ and ${\textrm{Im}(\pi_2)}$ is generated by ${\widetilde{W_j}}$. \begin{gather*} \textrm{Im}(\pi_1)=\textrm{span}_{\mathbb{F}_p}\langle \widetilde{V_1},\cdots,\widetilde{V_{\alpha}}\rangle \\ \textrm{Im}(\pi_2)=\textrm{span}_{\mathbb{F}_p}\langle \widetilde{W_1},\cdots,\widetilde{W_{\beta}}\rangle \end{gather*} We choose ${\{V_1,\cdots,V_{\alpha},W_1,\cdots,W_{\beta}\}\subset \mathcal{C}}$ so that ${\pi_1(V_j)=\widetilde{V_j}}$ and ${\pi_2(W_j)=\widetilde{W_j}}$ hold. Then it straightforward to see that ${\{V_1,\cdots,V_{\alpha},W_1,\cdots,W_{\beta}\}\subset \mathcal{C}}$ generates ${HF_{\mathbb{Z}_p}^{loc}(H^{(p)},y_i)}$ over ${\mathbb{F}_p[u^{-1},u]]}$. Note that there is an isomoprhism between local Floer homology and local $\mathbb{Z}_p $-equivariant Floer homology (\cite{SZ}). \begin{equation*} HF_{\mathbb{Z}_p}^{loc}(H^{(p)},y_i)\cong HF^{loc}(H^{(p)},y_i)\otimes \mathbb{F}_p[u^{-1},u]]\langle \theta \rangle \end{equation*} Here we use the fact that $p$ is admissible and ${HF^{loc}(H^{(p)},y_i)\cong HF^{loc}(H,x_i)}$ holds. This implies that ${\alpha=\beta=\textrm{dim}_{\mathbb{F}_p}HF^{loc}(H^{(p)},y_i)}$ and ${\textrm{Im}(\pi_i)=\textrm{span}_{\mathbb{F}_p}\langle X_1,\cdots,X_d\rangle}$. So we can choose ${\widetilde{X}_i^a}$ and ${\widetilde{X}_{i,\theta}^a}$ and we proved Lemma 5.1. \begin{flushright} $\Box$ \end{flushright} Our next purpose is to calculate ${HF_{\mathbb{Z}_p}(H^{(p)},p\gamma)}$. For this purpose, we introduce ${\mathbb{Z}_p}$-equivariant Tate homology for ${(H,\gamma)}$ (see \cite{SZ}). The ${\mathbb{Z}_p}$-equivariant Tate chain complex is defined as follows. \begin{equation*} C_{Tate}(\mathbb{Z}_p,CF(H,\gamma:\Lambda_0)^{\otimes p})=CF(H,\gamma:\Lambda_0)^{\otimes p}\otimes \Lambda_0[u^{-1},u]]\langle \theta \rangle \end{equation*} The Floer differential ${d_F}$ on ${CF(H,\gamma:\Lambda_0)}$ naturally extends to a differential ${d_F^{(p)}}$ on ${CF(H,\gamma:\Lambda_0)^{\otimes p}}$. There is a natural ${\mathbb{Z}_p}$ action $\tau$ on ${CF(H,\gamma:\Lambda_0)^{\otimes p}}$. \begin{equation*} \tau(x_0\otimes x_1\otimes \cdots \otimes x_{p-1})=(-1)^{|x_{p-1}|(|x_{0}|+\cdots+|x_{p-2}|)}x_{p-1}\otimes x_0\otimes \cdots x_{p-2} \end{equation*} and let ${N}$ be the sum ${N=1+\tau+\tau^2\cdots +\tau^{p-1}}$. Then the Tate differential ${d_{Tate}}$ is a ${\Lambda_0[u^{-1},u]]}$-linear map and defined as follows. \begin{gather*} d_{Tate}(x\otimes 1)=d_F^{(p)}(x)\otimes 1+(1-\tau)(x)\otimes \theta \\ d_{Tate}(x\otimes \theta)=d_F^{(p)}(x)\otimes \theta+N(x)\otimes u\theta \end{gather*} The Tate homology is defined by the homology of this complex. \begin{equation*} H_{Tate}(\mathbb{Z}_p,CF(H,\gamma:\Lambda_0)^{\otimes p})=H(C_{Tate}(\mathbb{Z}_p,CF(H,\gamma:\Lambda_0)^{\otimes p}),d_{Tate}) \end{equation*} ${H_{Tate}(\mathbb{Z}_p,CF(H,\gamma:\Lambda_0)^{\otimes p})}$ is determined by ${HF(H,\gamma:\Lambda_0)}$ from the following lemma. \begin{Lem}[Lemma 17 in \cite{Sh}] There is so-called quasi-Frobenius isomorphism as follows. \begin{equation*} r_p^*HF(H,\gamma:\Lambda_0)\otimes \Lambda_0[u^{-1},u]]\langle \theta \rangle \cong H_{Tate}(\mathbb{Z}_p,CF(H,\gamma:\Lambda_0)^{\otimes p}) \end{equation*} Here, ${r_p:\Lambda_0\rightarrow \Lambda_0}$ is a map induced by ${T\rightarrow T^{\frac{1}{p}}}$. \end{Lem} Assume that there is an isomorphism \begin{equation*} HF(H,\gamma:\Lambda_0)\cong \bigoplus_{i=1}^m\Lambda_0/T^{\beta_j}\Lambda_0 \ \ \ (\beta_j>0). \end{equation*} Then, Lemma 5.2 implies that there is the following isomoprhism. \begin{equation*} H_{Tate}(\mathbb{Z}_p,CF(H,\gamma:\Lambda_0)^{\otimes p})\cong \Big(\bigoplus_{i=1}^m\Lambda_0/T^{p\beta_j}\Lambda_0\Big)\otimes \Lambda_0[u^{-1},u]]\langle \theta \rangle \end{equation*} So, the module structure of the Tate homology is completely determined by ${HF(H,\gamma:\Lambda_0)}$. We also have one more important operation, so-called ${\mathbb{Z}_p}$-equivariant pair of pants product. \begin{equation*} \mathcal{P}:H_{Tate}(\mathbb{Z}_p,CF(H,\gamma:\Lambda_0)^{\otimes p})\longrightarrow HF_{\mathbb{Z}_p}(H^{(p)},p\gamma) \end{equation*} The construction of ${\mathcal{P}}$ is just counting the solutions of Floer equations on $p$-branched cover of the cylinder ${\mathbb{R}\times S^1}$ ($p$-legged pants) parametrized by ${S^{\infty}}$ (see section $8$ in \cite{SZ}, see also \cite{Se} for ${\mathbb{Z}_2}$-equivariant case). The detailed construction of ${\mathcal{P}}$ is not needed here. The important point is that ${\mathcal{P}}$ gives a local isomorphism between their local homologies in the following sense (\cite{SZ}). We define an action filtration on ${C_{Tate}(\mathbb{Z}_p,CF(H,\gamma:\Lambda_0)^{\otimes p})}$ and ${CF_{\mathbb{Z}_p}(H^{(p)},p\gamma)}$. We fix a sufficiently small positive real number ${\epsilon>0}$. We define the filtration ${F^qC_{Tate}(\mathbb{Z}_p,CF(H,\gamma:\Lambda_0)^{\otimes p})}$ and ${F^qCF_{\mathbb{Z}_p}(H^{(p)},p\gamma)}$ ${(q\in \mathbb{Z}_{\ge 0})}$ as follows. \begin{gather*} F^qC_{Tate}(\mathbb{Z}_p,CF(H,\gamma:\Lambda_0)^{\otimes p})=T^{q\epsilon}C_{Tate}(\mathbb{Z}_p,CF(H,\gamma:\Lambda_0)^{\otimes p}) \\ F^qCF_{\mathbb{Z}_p}(H^{(p)},p\gamma)=T^{q\epsilon}CF_{\mathbb{Z}_p}(H^{(p)},p\gamma) \end{gather*} If we divide ${d_{Tate}}$ into ${d_{Tate}^{loc}+D_{Tate}}$, \begin{equation*} D_{Tate}(F^qC_{Tate}(\mathbb{Z}_p,CF(H,\gamma:\Lambda_0)^{\otimes p}))\subset F^{q+1}C_{Tate}(\mathbb{Z}_p,CF(H,\gamma:\Lambda_0)^{\otimes p}) \end{equation*} holds for any ${q\in \mathbb{Z}_{\ge 0}}$. So ${E_1}$-term of the associated spectral sequences of ${F^qC_{Tate}}$ and ${F^qCF_{\mathbb{Z}_p}}$ are given by local homologies. This fact and local isomorphism theorem of ${\mathcal{P}}$ implies that $\mathcal{P}$ gives an isomorphism between their ${E_1}$-pages of spectral sequences. So, in order to prove that ${\mathcal{P}}$ is an isomoprhism, it suffices to prove the following strong convergences of each spectral sequences (Theorem 3.2 in Chapter 14 in \cite{CE}). \begin{Lem}[strong convergence] Let ${(A,d)}$ be a filtered differential module so that ${(A,d)=(C_{Tate},d_{Tate})}$ or ${(A,d)=(CF_{\mathbb{Z}_p},d_{eq})}$ holds. \begin{enumerate} \item (weakly convergence) For each ${q\in \mathbb{Z}_{\ge 0}}$, the intersection of the images of the homomorphisms \begin{gather*} H(F^qA/F^{q+r}A)\longrightarrow H(F^{q+1}A) \ \ \ r\ge 1 \\ [z]\mapsto [dz] \end{gather*} is zero. \item The natural map \begin{equation*} u:H(A)\longrightarrow \varprojlim H(A)/F^qH(A) \end{equation*} is an isomorphism. Here, ${F^qH(A)}$ is the image of \begin{equation*} H(F^qA)\longrightarrow H(A). \end{equation*} \end{enumerate} \end{Lem} \textbf{Proof} (Lemma 5.3) \\ ${(1)}$ Let $K$ be another Hamiltonian function and let ${(B,d)}$ be either the Tate chain complex ${(C_{Tate}(\mathbb{Z}_p,CF(K,\gamma:\Lambda_0)^{\otimes p},d_{Tate})}$ or ${CF_{\mathbb{Z}_p}(K^{(p)},p\gamma:\Lambda_0)}$ respectively. Then, there is a continuation homomorphism over ${\Lambda}$ \begin{gather*} F:(A\otimes \Lambda,d)\longrightarrow (B\otimes \Lambda, d) \\ G:(B\otimes \Lambda,d)\longrightarrow (A\otimes \Lambda, d) \end{gather*} and a chain homotopy ${\mathcal{H}}$ between ${\textrm{Id}}$ and ${GF}$ as follows. Let ${D}$ be the constant \begin{equation*} D=p\times ||H-K||=p\times \int_0^1\Big\{ \max (H_t-K_t)-\min (H_t-K_t)\Big\}dt . \end{equation*} Then, ${\mathcal{H}(A^{\alpha})\subset A^{\alpha -D}}$ holds for any ${\alpha \in \mathbb{R}}$ (${A^{\alpha}=T^{\alpha}A}$). If $K$ is a ${C^{\infty}}$-small function, ${P(K,\gamma)=P(K^{(p)},p\gamma)=\emptyset}$ and ${(B,d)=(0,0)}$ hold. This implies that there is a map \begin{equation*} \mathcal{L}:A\otimes \Lambda \rightarrow A\otimes \Lambda \end{equation*} such that \begin{gather*} Id_{A\otimes \Lambda}=d\mathcal{L}+\mathcal{L}d \\ \mathcal{L}(A^{\alpha})\subset A^{\alpha-p||H||} \end{gather*} This implies that for ${r>\frac{p||H||}{\epsilon}+1}$ and any cycle ${C\in F^{q+r}A}$, ${C'=\mathcal{L}(C)}$ satisfies ${C'\in F^{q+1}A}$ and ${d(C')=C}$. So the map \begin{gather*} H(F^qA/F^{q+r}A)\longrightarrow H(F^{q+1}A) \\ [z]\mapsto [dz] \end{gather*} is zero in this case. So we proved ${(1)}$. \\ ${(2)}$ The above arguments imply that ${F^qH(A)}$ is zero for ${q>\frac{p||H||}{\epsilon}}$. So, ${u}$ is an injection. It suffices to prove that $u$ is a surjection. We fix an element \begin{equation*} \{[a_q]\}_{q\ge 0}\in \varprojlim H(A)/F^qH(A) \end{equation*} where ${a_q\in A}$ are cycles and we construct a cycle ${b}$ in ${A}$ such that ${u([b])=\{[a_q]\}}$ holds. For this purpose, we construct a sequence ${\{b_q\}_{q\in \mathbb{Z}_{\ge 0}}\subset A}$ such that \begin{gather*} db_q=0 \\ b_{q+1}\equiv b_q \ \ \ \textrm{mod} \ F^qA \\ [b_q]=[a_q] \ \ \ \textrm{in} \ \ H(A)/F^qH(A) \end{gather*} hold. Assume that we have constructed ${b_0,\cdots,b_l}$. Then \begin{equation*} [b_l]=[a_l]=[a_{l+1}] \ \ \ \textrm{in} \ \ H(A)/F^lH(A) \end{equation*} holds. So, there is a cycle ${\gamma_l\in F^lA}$ such that ${[b_l+\gamma_l]=[a_{l+1}]}$ holds in ${H(A)}$. We define ${b_{l+1}}$ by ${b_{l+1}=b_l+\gamma_l}$. Then ${b_{l+1}}$ satisfies \begin{gather*} b_{l+1}\equiv b_l \ \ \ \textrm{mod} \ F^lA \\ [b_{l+1}]=[a_{l+1}] \ \ \ \textrm{in} \ \ H(A)/F^{l+1}H(A). \end{gather*} So we can extend to ${b_{l+1}}$ and hence we can construct a sequence ${\{b_q\}}$. This sequence satisfies ${b_q-b_{q+r}\in F^qA}$ ${(r>0)}$ and satisfies Cauchy condition. This sequence converges to a cycle ${b\in A}$. ${b-b_q\in F^qA}$ implies that ${u(b)=\{[a_q]\}}$ holds. So we proved ${(2)}$. \begin{flushright} $\Box$ \end{flushright} So we proved that \begin{equation*} r_p^*HF(H,\gamma:\Lambda_0)\otimes \Lambda_0[u^{-1},u]]\langle \theta\rangle \cong H_{Tate}(\mathbb{Z}_p,CF(H,\gamma:\Lambda_0)^{\otimes p})\cong HF_{\mathbb{Z}_p}(H^{(p)},p\gamma) \end{equation*} holds. \begin{Rem} In the above proof, we do not need to assume that every periodic orbit in ${P(H^{(p)},p\gamma)}$ is an iteration of an periodic orbit in ${P(H,\gamma)}$. We only need to assume that ${P(H,\gamma)}$ and ${P(H^{(p)},p\gamma)}$ are finite. \end{Rem} Next, we prove the following lemma (see also section 3.2 in \cite{CGG3}). \begin{Lem} Assume that there is an isomorphism \begin{gather*} HF(H,\gamma:\Lambda_0)\cong \bigoplus_{j=1}^m\Lambda_0/T^{\beta_j}\Lambda_0 \\ 0<\beta_1\le \beta_2 \cdots \le \beta_m \end{gather*} and there is an isomorphism \begin{gather*} HF(H^{(p)},p\gamma:\Lambda_0)\cong \bigoplus_{j=1}^{m'}\Lambda_0/T^{\delta_j}\Lambda_0 \\ 0<\delta_1\le \delta_2 \cdots \le \delta_{m'} . \end{gather*} Then, ${\delta_1\ge p\beta_1}$ holds. \end{Lem} \textbf{Proof} (Lemma 5.4) \\ The above isomorphism implies that the following isomorphism holds. \begin{equation*} HF_{\mathbb{Z}_p}(H^{(p)},p\gamma)\cong (\bigoplus _{j=1}^m\Lambda_0/T^{p\beta_j}\Lambda_0)\otimes \Lambda_0[u^{-1},u]]\langle \theta \rangle \end{equation*} We define spectral number ${\sigma(z)}$ and ${\tau(z)}$ for ${z\in CF(H^{(p)},p\gamma:\Lambda_0)}$ as follows. \begin{gather*} \sigma(z)=\sup \{\alpha \in \mathbb{R} \ | \ z\in T^{\alpha}CF(H^{(p)},p\gamma:\Lambda_0) \} \\ \tau(z)=\sigma(d_F(z))-\sigma(z) \end{gather*} We also define ${\sigma_{eq}(z)}$ and ${\tau_{eq}(z)}$ for ${z\in CF_{\mathbb{Z}_p}(H^{(p)},p\gamma)}$ as follows. \begin{gather*} \sigma_{eq}(z)=\sup \{\alpha \in \mathbb{R} \ | \ z\in T^{\alpha}CF_{\mathbb{Z}_p}(H^{(p)},p\gamma) \} \\ \tau_{eq}(z)=\sigma_{eq}(d_{eq}(z))-\sigma_{eq}(z) \end{gather*} First, we prove the following claim. \begin{Claim} Let ${\beta_1}$ and ${\delta_1}$ be positive real numbers defined in the statement of Lemma 5.4. Then the following equalities hold. \begin{gather*} \delta_1=\inf \{\tau(z) \ | \ z\in CF(H^{(p)},p\gamma:\Lambda_0)\} \\ p\beta_1=\inf \{\tau_{eq}(z) \ | \ CF_{\mathbb{Z}_p}(H^{(p)},p\gamma)\} \end{gather*} \end{Claim} We prove only the first equality (the proof for the second equality is the same). We can choose a cycle ${z\in CF(H^{(p)},p\gamma:\Lambda_0)}$ such that ${\sigma(z)=0}$ holds and ${T^{\delta_1}z}$ is a boundary. So we can choose ${w\in CF(H^{(p)},p\gamma:\Lambda_0)}$ so that ${d_F(w)=T^{\delta_1}z}$ holds. This implies that ${\tau(w)\le \delta_1}$ and \begin{equation*} \delta_1\ge \inf \{\tau(z) \ | \ z\in CF(H^{(p)},p\gamma:\Lambda_0)\} \end{equation*} holds. Assume that ${\delta_1>\textrm{RHS}}$ holds. Then there is ${z\in CF(H^{(p)},p\gamma:\Lambda_0) }$ such that \begin{gather*} \sigma(z)=0, \ \ \alpha=\tau(z)=\sigma(d_F(z))<\delta_1 \end{gather*} holds. So, ${w=T^{-\alpha}d_F(z)}$ satisfies ${\sigma(w)=0}$ and ${T^{\alpha}w=d_F(z)}$ is a boundary. Let ${\{C_1,\cdots,C_{m'}\}}$ be the generators of \begin{equation*} HF(H^{(p)},p\gamma:\Lambda_0) \cong \bigoplus_{j=1}^{m'}\Lambda_0/T^{\delta_j}\Lambda_0 . \end{equation*} ${[T^{\alpha}w]=0\in HF(H^{(p)},p\gamma:\Lambda_0) }$ implies that ${[w]\in HF(H^{(p)},p\gamma:\Lambda_0) }$ is written in the following form. \begin{equation*} [w]=\sum_{\delta_1-\alpha\le \lambda_{1,j}<\delta_1}a_{1,\lambda_{1,j}}T^{\lambda_{1,j}}[C_1]+\cdots +\sum_{\delta_{m'}-\alpha\le \lambda_{m',j}<\delta_{m'}}a_{m',\lambda_{m',j}}T^{\lambda_{m',j}}[C_{m'}] \end{equation*} Note that ${[w]\neq 0}$ holds because our chain complex is strict and any boundary ${b\in CF(H^{(p)},p\gamma:\Lambda_0) }$ satisfies ${\sigma(b)>0}$. We choose a chain ${v\in CF(H^{(p)},p\gamma:\Lambda_0)}$ so that \begin{gather*} C=\sum_{\delta_1-\alpha\le \lambda_{1,j}<\delta_1}a_{1,\lambda_{1,j}}T^{\lambda_{1,j}}C_1+\cdots +\sum_{\delta_{m'}-\alpha\le \lambda_{m',j}<\delta_{m'}}a_{m',\lambda_{m',j}}T^{\lambda_{m',j}}C_{m'} \\ C=w+dv \end{gather*} holds. However ${\sigma(dv)>0}$ implies that \begin{equation*} 0<\delta_1-\alpha \le \sigma(C)=\sigma(w+dv)=\sigma(w)=0 \end{equation*} holds. This is a contradiction and we proved Claim 5.1. In Lemma 5.1 we proved the existence of "nice" basises for the local equivariant Floer homology and Floer homology. This implies that \begin{equation*} d_{eq}(x\otimes 1)=d_F(x)\otimes 1+x_1\otimes \theta+\sum_{k=1}\sum_{k'=0,1}x_{2k+k'}\otimes u^k\theta^{k'} \end{equation*} holds for ${x\in CF(H^{(p)},p\gamma:\Lambda_0)}$. This implies that ${\sigma(d_F(x))\ge \sigma_{eq}(d_{eq}(x\otimes 1))}$ and ${\tau(x)\ge \tau_{eq}(x\otimes 1)}$ hold. So \begin{gather*} \delta_1=\inf\{\tau(x) \ | \ x\in CF(H^{(p)},p\gamma:\Lambda_0)\}\ge \inf\{\tau_{eq}(z) \ | \ z\in CF_{\mathbb{Z}_p}(H^{(p)},p\gamma)\}=p\beta_1 \end{gather*} holds and we finished the proof of Lemma 5.4. \begin{flushright} $\Box$ \end{flushright} Next we apply Lemma 5.4 to prove Theorem 1.1. Recall that we assumed \begin{gather*} P(H,\gamma)=\{x_1,\cdots, x_k\} \\ P(H^{(p)},p\gamma)=\{x_1^{(p)},\cdots, x_k^{(p)}\} \end{gather*} holds and ${p}$ is admissible in the beginning of this subsection. Our purpose is to prove there is a simple ${p'}$ periodic orbit in ${p\gamma}$. This is equivalent to prove that ${P(H^{(p')},p\gamma)\neq \emptyset}$ because any periodic orbit in ${P(H^{(p')},p\gamma)}$ is simple if $p$ (hence $p'$) is sufficiently large. We fix ${C>0}$ independent of $p$ so that \begin{gather*} HF(H,\gamma:\Lambda_0^{\mathbb{F}_p})\cong \bigoplus_{j=1}^m\Lambda_0^{\mathbb{F}_p}/T^{\beta_{p,j}}\Lambda_0^{\mathbb{F}_p} \ \ \ (0<\beta_{p,1}\le \cdots \le \beta_{p,m}) \\ C<\frac{1}{2}\beta_{p,1} \end{gather*} holds. Here ${\Lambda^{\mathbb{F}_p}}$ is the universal Novikov ring of ground field ${\mathbb{F}_p}$. This is always possible because ${\beta_{p,1}}$ is greater than the minimum energy of the solution of Floer equation (=positive constant independent of ${p}$ ). Lemma 5.4 implies that \begin{equation*} \tau(z)\ge p\beta_{p,1}\ge 2pC \end{equation*} holds for any ${z\in CF(H^{(p)},p\gamma:\Lambda_0^{\mathbb{F}_p})}$. This implies that any element ${x\neq 0\in HF^{loc}(H^{(p)},x_i^{(p)})}$ determines a cycle in ${CF^{[-pC,\epsilon)}(H^{(p)},p\gamma:\Lambda^{\mathbb{F}_p})}$ and ${CF^{[-\epsilon,pC)}(H^{(p)},p\gamma:\Lambda^{\mathbb{F}_p})}$ and they are not boundaries (${\epsilon>0}$ is sufficiently small) because ${\tau(z)\ge 2pC}$ holds for any $z$. This implies that the natural homomorphism \begin{equation*} \iota:HF^{[-\epsilon,pC)}(H^{(p)},p\gamma:\Lambda^{\mathbb{F}_p})\longrightarrow HF^{[-pC,\epsilon)}(H^{(p)},p\gamma:\Lambda^{\mathbb{F}_p}) \end{equation*} is not zero (${\iota([x])\neq 0}$). Let ${p'}$ be the first prime number greater than ${p}$. We assume $p$ is sufficiently large prime so that \begin{equation*} 2(p'-p)||H||<pC \end{equation*} holds. This is possible because ${p'-p=o(p)}$ holds (see \cite{BHP}). We have two continuation homomorphism as follows. \begin{gather*} F:HF^{[-\epsilon,pC)}(H^{(p)},p\gamma:\Lambda^{\mathbb{F}_p})\longrightarrow HF^{[-\epsilon-(p'-p)||H||,pC-(p'-p)||H||)}(H^{(p')},p\gamma:\Lambda^{\mathbb{F}_p}) \\ G:HF^{[-\epsilon-(p'-p)||H||,pC-(p'-p)||H||)}(H^{(p')},p\gamma:\Lambda^{\mathbb{F}_p})\longrightarrow HF^{[-pC,\epsilon)}(H^{(p)},p\gamma:\Lambda^{\mathbb{F}_p}) \end{gather*} The composition of $F$ and $G$ satisfies ${GF=\iota\neq 0}$. So, ${P(H^{(p')},p\gamma)\neq \emptyset}$ holds and we proved the theorem. \subsection{Weakly monotone case} In this subsection, we prove Theorem 1.1 for weakly monotone symplectic manifolds. The difference between monotone case and weakly monotone case is that we have not constructed ${\mathbb{Z}_p}$-equivariant Floer homology and ${\mathbb{Z}_p}$-equivariant pair of pants product in weakly monotone case. So in order to prove Theorem 1.1 for weakly monotone case, it suffices to construct these theories. The rest of the proof is totally the same as in the monotone case. In the monotone case, we can exclude sphere bubble easily because Maslov index of a holomorphic sphere is greater than or equal to $2$. In weakly monotone case, we have to exclude sphere bubbles much more carefully. Recall the construction of Floer homology theory for weakly monotone symplectic manifolds \cite{HS,On}. For generic choice of almost complex structure $J$, there is no holomorphic spheres with negative Chern numbers. Let ${H}$ be a Hamiltonian function. The pair ${(H,J)}$ is not necessary Floer regular pair. However we can perturb $H$ to $\widetilde{H}$ so that ${(\widetilde{H},J)}$ is Floer regular and sphere bubbles do not appear in the definition of the Floer boundary operator ${d_F}$. Recall that in the definition of ${\mathbb{Z}_p}$-equivariant Floer homology for monotone symplectic manifolds, we considered a family of almost complex structures ${\{J_{w,t}\}}$ parametrized by ${S^{\infty}}$ and ${S^1}$ while fixing a Hamiltonian function ${H^{(p)}}$. So one possible modification for the weakly monotone case is to consider a family of Hamiltonian function parametrized by ${S^{\infty}}$ and ${S^1}$ while fixing an almost complex structure ${J}$. Let ${K\in C^{\infty}(S^1\times M)}$ be a perturbation of ${H^{(p)}}$ so that ${(K,J)}$ is a Floer regular pair. Note that ${K}$ is not necessarily ${\frac{1}{p}}$-periodic Hamiltonian function. We also consider a family of Hamiltonian functions ${\mathcal{K}_{w,t}}$ parametrized by ${(w,t)\in S^{\infty}\times S^1}$ which satisfies the following conditions (compare it to the definition of ${J_{w,t}}$ in section 3). \begin{itemize} \item (local constant at critical points) In a small neighborhood of ${Z_i^m\in S^{\infty}}$, \begin{equation*} \mathcal{K}_{w,t}=K_{t-\frac{m}{p}} \end{equation*} holds. \item ($\mathbb{Z}_p$-equivariance) ${\mathcal{K}_{m\cdot w,t}=\mathcal{K}_{w,t-\frac{m}{p}}}$ holds for any ${m\in \mathbb{Z}_p}$ and ${w\in S^{\infty}}$. \item (invariance under the shift $\tau$) ${\mathcal{K}_{\tau(w),t}=\mathcal{K}_{w,t}}$ holds. \end{itemize} We consider the following equation for ${x,y\in P(K)}$, ${m\in \mathbb{Z}_p}$ and ${i\in \mathbb{Z}}$. \begin{gather*} (u,v)\in C^{\infty}(\mathbb{R}\times S^1,M)\times C^{\infty}(\mathbb{R},S^{\infty}) \\ \partial_su(s,t)+J(u(s,t))(\partial_tu(s,t)-X_{\mathcal{K}_{v(s),t}}(u(s,t)))=0 \\ \frac{d}{ds}v(s)-\textrm{grad}\widetilde{F}=0 \\ \lim_{s\to -\infty}v(s)=Z_{\alpha}^0, \lim_{s\to +\infty}v(s)=Z_i^m, \lim_{s\to -\infty}u(s,t)=x(t), \lim_{s\to +\infty}u(s,t)=y(t-\frac{m}{p}) \end{gather*} One might try to define \begin{equation*} d_{\alpha}^{i,m}:CF(K,\gamma:\Lambda_0)\longrightarrow CF(K,\gamma:\Lambda_0) \end{equation*} by counting above solutions and define $d_{eq}$. However, this attempt contains the following difficulty. The action gap of the solution ${(u,v)}$ of the above equation \begin{equation*} \int_{\mathbb{R}\times S^1}u^*\omega+\int_0^1K(t,x(t))-K(t,y(t))dt \end{equation*} is not necessarily non-negative. This problem happens when ${i\in \mathbb{Z}}$ becomes sufficiently large. As $i$ becomes bigger and bigger, the effect of the perturbation ${H_t^{(p)}\to \mathcal{K}_{w,t}}$ becomes bigger and we cannot define a differential operator ${d_{eq}}$ over ${\Lambda_0}$. What we can do is to fix some ${N\in \mathbb{Z}}$ and define a finite operators ${\{d_{\alpha}^{i,m}\}}$ for ${i\le N}$. This difficulty is very similar to the difficulty in \cite{FOOO}. In \cite{FOOO}, Fukaya, Oh, Ohta and Ono constructed an ${A_{\infty}}$-algebra associated to a Lagrangian submanifold in a symplectic manifold. They constructed ${A_{\infty}}$-operators ${\{m_k\}_{k\in \mathbb{Z}_{\ge0}}}$ by using moduli spaces of holomorphic discs bounding the Lagrangian submanifold. In order to determine ${\{m_k\}_{k\in \mathbb{Z}_{\ge0}}}$, they had to achieve transversality of infinitely many interrelated moduli spaces by perturbing multisections of Kuranishi structures. Unfortunately, this is impossible because perturbations of lower order operators infuluence perturbations of higher order operators and the higher perturbations becomes bigger and bigger. So what they could do is to construct finite operators ${\{m_{0,0},\cdots,m_{n,K}\}}$ (${A_{n,K}}$-algebra) by one perturbation. They constructed ${A_{\infty}}$-operators ${\{m_k\}_{k\in \mathbb{Z}_{\ge0}}}$ by "gluing" infinitely many ${A_{n,K}}$-algebras (${(n,K)\to (+\infty,+\infty)}$) by applying homological algebra developed in \cite{FOOO}. Our situation is much more simpler because we do not have to consider higher algebraic operators (we only need differential operator) and we do not have to consider the space of infinitely many singular chains. So we can mimic the construction of Lagrangian ${A_{\infty}}$-algebra by applying algebraic machineries developed in \cite{FOOO}. In the rest of this subsection, we explain how we can apply \cite{FOOO} in our cases. We consider the following situation. Let $C$ be a ${\Lambda_0}$-module. We want to construct a family of operators ${\{d_i:C\rightarrow C\}_{i\in \mathbb{Z}_{\ge 0}}}$ so that ${\sum_{i+j=k}d_id_j=0}$ holds for any ${k\in \mathbb{Z}_{\ge 0}}$. Then the infinite sum \begin{equation*} d=d_0+d_1u+d_2u^2+d_3u^3\cdots \end{equation*} becomes a differential on ${C\otimes \Lambda_0[u^{-1},u]]}$ as follows. \begin{gather*} d:C\otimes \Lambda_0[u^{-1},u]]\longrightarrow C\otimes \Lambda_0[u^{-1},u]] \\ x\otimes u^m \mapsto \sum_{i\ge 0}d_i(x)\otimes u^{m+i} \end{gather*} Assume that a family of operators ${\{d_i:C\rightarrow C\}_{i=0}^k}$ satisfies ${\sum_{i+j=m}d_id_j=0}$ for ${0\le m\le k}$. In this section, we call ${(C,\{d_i\}_{i=0}^k)}$ a ${X_k}$-module (note that this is a temporary terminology used only in this paper). Let ${(D,\{\delta_i\}_{i=0}^k)}$ be another ${X_k}$-module. We call a family of homomorphisms ${\{f_i=C\rightarrow D\}_{i=0}^k}$ ${X_k}$-homomorphism if it satisfies the following relations. \begin{equation*} \sum_{i+j=m}\delta_if_j=\sum_{i'+j'=m}f_{i'}d_{j'} \ \ \ (0\le m\le k) \end{equation*} Note that this is equivalent to that \begin{equation*} (\sum_{i=0}^k\delta_iu^i)(\sum_{j=0}^kf_ju^j)\equiv (\sum_{i'=0}^kf_{i'}u^{i'})(\sum_{j'=0}^kd_{j'}u^{j'}) \ \ \ \textrm{mod}(u^{k+1}) \end{equation*} is satisfied and ${f=\sum_{i=0}^kf_iu^i}$ is a "chain map modulo ${u^{k+1}}$". Let ${\{f_i\}_{i=0}^k}$ and ${\{g_i\}_{i=0}^k}$ be two ${X_k}$-homomorphisms from ${(C,\{d_i\}_{i=0}^k)}$ to ${(D,\{\delta_i\}_{i=0}^k)}$. We say ${\{f_i\}_{i=0}^k}$ and ${\{g_i\}_{i=0}^k}$ are ${X_k}$-homotopic if there is a family of operators ${\{\mathcal{H}_i:C\rightarrow D\}_{i=0}^k}$ which satisfies the following relations. \begin{equation*} f_m-g_m=\sum_{i+j=m}\mathcal{H}_id_j+\sum_{i'+j'=m}\delta_{i'}\mathcal{H}_{j'} \end{equation*} A composition of two ${X_k}$-homomorphism ${\{f_i:C\rightarrow D\}}$ and ${\{g_j:D\rightarrow E\}}$ is defined by ${(f\circ g)_i=\sum_{j+l=i}f_jg_l}$. We call a ${X_k}$-homomorphism ${F:C\rightarrow D}$ ${X_k}$-homotopy equivalence if there is a ${X_k}$-homomorphism ${G:D\rightarrow C}$ such that ${FG}$ and ${GF}$ are ${X_k}$-homotopic to the identity. Let ${(C,\{d_i\}_{i=0}^k)}$ be a ${X_k}$-module and ${(C,\{d_i'\}_{i=0}^{\infty})}$ be a ${X_{\infty}}$-module. We say ${(C,\{d_i'\}_{i=0}^{\infty})}$ is a promotion of ${(C,\{d_i\}_{i=0}^k)}$ if ${d_i'=d_i}$ holds for ${0\le i\le k}$. A promotion of ${X_k}$-homomorphism is defined in the same manner (see Definition 7.2.182 in \cite{FOOO}). We treat the following situation. Let ${\{(C,\{d^{(k)}_i\}_{i=0}^k)\}_{k\in \mathbb{Z}}}$ and ${\{(D,\{\delta^{(k)}_i\}_{i=0}^k)\}_{k\in \mathbb{Z}}}$ be families of ${X_k}$-modules (${k=0,1,2,\cdots}$) and \begin{gather*} I_k:(C_k,\{d^{(k)}_i\}_{i=0}^k)\longrightarrow (C_{k+1},\{d^{(k+1)}_i\}_{i=0}^{k+1}) \\ I_k':(D_k,\{\delta^{(k)}_i\}_{i=0}^k)\longrightarrow (D_{k+1},\{\delta^{(k+1)}_i\}_{i=0}^{k+1}) \end{gather*} be families of ${X_k}$-homomorphisms which gives ${X_k}$-homotopy equivalence between them. Let \begin{equation*} F_k:(C_k,\{d^{(k)}_i\}_{i=0}^k)\longrightarrow (D_k,\{\delta^{(k)}_i\}_{i=0}^k) \end{equation*} be a family of ${X_k}$-morphisms such that ${I_{k}'F_k}$ and ${F_{k+1}'I_k}$ are ${X_k}$-homotopic. So we have the following diagram. $$ \begin{CD} @>I_{k-1}>> (C_k,\{d^{(k)}_i\}_{i=0}^k) @>I_k>> (C_{k+1},\{d^{(k+1)}_i\}_{i=0}^{k+1}) @>I_{k+1}>> (C_{k+2},\{d^{(k+2)}_i\}_{i=0}^{k+2}) @>I_{k+2}>> \\ @. @VF_kVV @VF_{k+1}VV @VF_{k+2}VV \\ @>I_{k-1}'>> (D_k,\{\delta^{(k)}_i\}_{i=0}^k) @>I_k'>> (D_{k+1},\{\delta^{(k+1)}_i\}_{i=0}^{k+1}) @>I_{k+1}'>> (D_{k+2},\{\delta^{(k+2)}_i\}_{i=0}^{k+2}) @>I_{k+2}'>> \end{CD} $$ We have the following Claim. \begin{Lem}[Lemma 7.2.184 in \cite{FOOO}] Let ${\{(C_k,\{d^{(k)}_i\}_{i=0}^k)\}}$, ${\{(D_k,\{\delta^{(k)}_i\}_{i=0}^k)\}}$, ${\{I_k\}}$, ${\{I_k'\}}$ and ${\{F_k\}}$ be a directed system as above. \begin{enumerate} \item We can promote each ${C_k}$ and ${D_k}$ to ${X_{\infty}}$-modules and promote ${I_k}$ and ${I_k'}$ to ${X_{\infty}}$-homomorphism which give ${X_{\infty}}$-homotopy equivalences. \item We can promote each ${F_k}$ to ${X_{\infty}}$-homomorphisms between promoted ${C_k}$ and ${D_k}$ so that the above diagram is commutative up to ${X_{\infty}}$-homotopy. \end{enumerate} \end{Lem} So we can construct ${X_{\infty}}$-modules and ${X_{\infty}}$-homomorphisms from directed systems of ${X_k}$-modules and ${X_k}$-homomorphisms. We apply these machineries to the following situation. Let ${\{H_k\in C^{\infty}(S^1\times M)\}_{k=1}^{\infty}}$ be a family of Hamiltonian functions which satisfies the following conditions. \begin{itemize} \item ${H_k\longrightarrow H}$ in ${C^{\infty}}$-topology \item ${(H_k,J)}$ is a Floer regular pair \end{itemize} Assume that ${P(H,\gamma)}$ is a finite set ${\{x_1,\cdots,x_l\}}$. For fixed ${1\le i\le l}$, $x_i$ splits into ${\{x_i^1,\cdots,x_i^{l_i}\}\subset P(H_k,\gamma)}$. As in section 4, we slightly modify the Floer differential operator of ${(H_k,J)}$ as follows. Let ${v_i^j:[0,1]\times S^1\rightarrow M}$ be a small cylinder connecting ${v_i^j(0,t)=x_i(t)}$ and ${v_i^j(1,t)=x_i^j(t)}$. Let ${c(x_i,x_i^j)\in \mathbb{R}}$ be the action gap \begin{equation*} c(x_i,x_i^j)=\int_{[0,1]\times S^1}(v_i^j)^*\omega+\int_0^1H(t,x_i(t))-H_k(t,x_i^j(t))dt . \end{equation*} and let $\tau$ be a correction map defined as follows. \begin{gather*} \tau :CH(H_k,\gamma:\Lambda)\longrightarrow CH(H_k,\gamma:\Lambda) \\ x_i^j\mapsto T^{c(x_i,x_i^j)}x_i^j \end{gather*} The modified differential operator ${\widetilde{d_F}}$ was defined by \begin{equation*} \widetilde{d_F}=\tau^{-1}d_F\tau \end{equation*} By using the modified Floer differential ${\widetilde{d_F}}$, we can define a modified Tate differential \begin{equation*} \widetilde{d_{Tate}}:CF(H_k,\gamma:\Lambda_0)^{\otimes p}\otimes \Lambda_0[u^{-1},u]]\langle \theta \rangle \longrightarrow CF(H_k,\gamma:\Lambda_0)^{\otimes p}\otimes \Lambda_0[u^{-1},u]]\langle \theta \rangle \end{equation*} as follows. \begin{gather*} \widetilde{d_{Tate}}(x\otimes 1)=\widetilde{d_F}(x)\otimes 1+(1-\tau)\otimes \theta \\ \widetilde{d_{Tate}}(x\otimes \theta)=\widetilde{d_F}(x)\otimes \theta +N(x)\otimes u\theta \end{gather*} Then ${\widetilde{d_{Tate}}}$ determines a ${X_{\infty}}$-module structure on \begin{equation*} C_k=CF(H_k,\gamma:\Lambda_0)^{\otimes p}\otimes \Lambda_0\langle \theta \rangle . \end{equation*} Note that ${(C_{Tate}(\mathbb{Z}_p, CF(H_k,\gamma:\Lambda_0)),\widetilde{d_{Tate}})}$ and ${(C_{Tate}(\mathbb{Z}_p, CF(H_{k'},\gamma:\Lambda_0)),\widetilde{d_{Tate}})}$ are chain homotopy equivalence (hence ${X_{\infty}}$-homotopy equivalence) for any ${k}$ and ${k'}$. Next we consider a directed system for ${\mathbb{Z}_p}$-equivariant Floer homology. Let ${\{G_k\}_{k=1}^{\infty}}$ be a family of Hamiltonian functions in ${C^{\infty}(S^1\times M)}$ which satisfies the following conditions. \begin{itemize} \item ${G_k\rightarrow H^{(p)}}$ in ${C^{\infty}}$-topology \item ${(G_k,J)}$ is Floer regular \end{itemize} Let ${\mathcal{G}^{(k)}_{w,t}}$ be a family of Hamiltonian functions parametrized by ${(w,t)\in S^{2k+1}\otimes S^1\subset S^{\infty}\otimes S^1}$ which satisfies the following conditions. \begin{itemize} \item (local constant at critical points) In a small neighborhood of ${Z_i^m\in S^{2k+1}}$, \begin{equation*} \mathcal{G}_{w,t}^{(k)}=G_{t-\frac{m}{p}} \end{equation*} holds. \item ($\mathbb{Z}_p$-equivariance) ${\mathcal{G}_{m\cdot w,t}=\mathcal{G}_{w,t-\frac{m}{p}}}$ \item (invariance under the shift $\tau$) ${\mathcal{G}_{\tau(w),t}=\mathcal{G}_{w,t}}$ holds. \end{itemize} As in the definition of the ${\mathbb{Z}_p}$-equivariant Floer differential operator for monotone symplectic manifolds, we consider the following equation for ${x,y\in P(G_k,p\gamma)}$, ${m\in \mathbb{Z}_p}$, ${\lambda\ge 0}$, ${\alpha \in \{0,1\}}$ and ${0\le i\le 2k+1}$. Assume that ${\widetilde{x}, \widetilde{y}\in P(H^{(p)},p\gamma)}$ are periodic orbits which split into ${\{x,\cdots\}\subset P(G_k,p\gamma)}$ and ${\{y,\cdots\}\subset P(G_k,p\gamma)}$. \begin{gather*} (u,v)\in C^{\infty}(\mathbb{R}\times S^1,M)\times C^{\infty}(\mathbb{R},S^{2k+1}) \\ \partial _su(s,t)+J(u(s,t))(\partial_tu(s,t)-X_{\mathcal{G}_{v(s),t}})=0 \\ \frac{d}{ds}v(s)-\textrm{grad}(\widetilde{F})=0 \\ \lim_{s\to -\infty}v(s)=Z_{\alpha}^0, \lim_{s\to +\infty}v(s)=Z_i^m, \lim_{s\to -\infty}u(s,t)=x(t), \lim_{s\to +\infty}u(s,t)=y(t-\frac{m}{p}) \\ \int_{\mathbb{R}\times S^1}u^*\omega+\int_0^1H^{(p)}(t,\widetilde{x}(t))-H^{(p)}(t,\widetilde{y}(t))dt =\lambda \end{gather*} We denote the space of solutions by ${\mathcal{N}_{\alpha,i,m}^{\lambda,(k)}(x,y)}$. We define ${d_{\alpha}^{i,m,(k)}}$ as follows. \begin{gather*} d_{\alpha}^{i,m,(k)}:CF(G_k,p\gamma:\Lambda_0)\longrightarrow CF(G_k,p\gamma:\Lambda_0) \\ x\mapsto \sum_{\lambda \ge 0, x\in P(G_k)}\sharp \mathcal{N}_{\alpha,i,m}^{\lambda,(k)}(x,y)\cdot T^{\lambda}y \end{gather*} Let ${d_{\alpha}^{i,(k)}}$ be the sum ${d_{\alpha}^{i,(k)}=\sum_{m\in \mathbb{Z}_p}d_{\alpha}^{i,m,(k)}}$. We define ${X_{k}}$-module structure on \begin{equation*} D_k=CF(G_k,p\gamma:\Lambda_0)\otimes \Lambda_0\langle \theta \rangle . \end{equation*} We determine ${\{\delta_i^{(k)}:D_k\rightarrow D_k\}_{i=0}^k}$ as follows. \begin{gather*} \delta_i^{(k)}(x\otimes 1)=d_0^{2i,(k)}(x)\otimes 1+d_0^{2i+1,(k)}(x)\otimes \theta \\ \delta_i^{(k)}(x\otimes \theta)=d_1^{2i,(k)}(x)\otimes 1+d_1^{2i+1,(k)}(x)\otimes \theta \end{gather*} There is a natural connecting ${X_k}$-homomorphism between ${(D_k,\{\delta_i^{(k)}\})}$ and ${(D_{k+1}, \{\delta_i^{(k+1)}\})}$. \begin{equation*} I_k':(D_k,\{\delta_i^{(k)}\})\longrightarrow (D_{k+1}, \{\delta_i^{(k+1)}\}) \end{equation*} ${I_k'}$ is a ${X_k}$-homotopy equivalence. We can modify naturally the ${\mathbb{Z}_p}$-equivariant pair of pants equation to define ${X_k}$-homomorphism between ${(C_k,\{d_i^{(k)}\})}$ and ${(D_k,\{\delta_i^{(k)}\})}$ in a natural manner. We denote this ${\mathbb{Z}_p}$-equivariant pair of pants product up to order ${k}$ by ${\mathcal{P}_k}$. So we have the following diagram. $$ \begin{CD} @>I_{k-1}>> (C_k,\{d^{(k)}_i\}_{i=0}^k) @>I_k>> (C_{k+1},\{d^{(k+1)}_i\}_{i=0}^{k+1}) @>I_{k+1}>> \\ @. @V\mathcal{P}_kVV @V\mathcal{P}_{k+1}VV \\ @>I_{k-1}'>> (D_k,\{\delta^{(k)}_i\}_{i=0}^k) @>I_k'>> (D_{k+1},\{\delta^{(k+1)}_i\}_{i=0}^{k+1}) @>I_{k+1}'>> \end{CD} $$ This diagram is commutative up to ${X_k}$-homotopy. By applying Lemma 5.5, we can promote each ${(C_k,\{d_i^{(k)}\})}$ and ${(D,\{\delta_i^{(k)}\})}$ to ${X_{\infty}}$-modules and promote each ${\mathcal{P}_k}$ to ${X_{\infty}}$-homomorphisms so that the above diagram is commutative up to ${X_{\infty}}$-homotopy. So we can define ${\mathbb{Z}_p}$-equivariant chain complex (not necessarily strict) and also ${\mathbb{Z}_p}$-equivariant pair of pants product between Tate complex and ${\mathbb{Z}_p}$-equivariant Floer chain complex. The uniqueness of the above promotions up to ${X_{\infty}}$-homotopies also follows from homotopy of homotopy theory (see section 7.2.12 and section 7.2.13 in \cite{FOOO}). So we constructed ${\mathbb{Z}_p}$-equivariant Floer homology and ${\mathbb{Z}_p}$-equivariant pair of pants product in a homologically canonical way. Note that $\mathbb{Z}_p$-equivariant pair of pants product gives an isomorphism of ${E_1}$-pages of the associated spectral sequences as in the monotone case because for sufficiently large $k$, the promotions of ${\mathcal{P}_k}$ and ${(D_k, \{\delta_i^{(k)}\})}$ does not influence the local theory in the following sense (of course this also follows from the above homotopy of homotopy theory). Let ${\{\mathcal{P}_{k,i}\}_{i=0}^{\infty}}$ and ${(D_k, \{\delta_i\}_{i=0}^{\infty})}$ be promotions of ${\mathcal{P}_k}$ and ${(D_k, \{\delta_i^{(k)}\})}$. \begin{gather*} \delta_i^{(k)}:D_k\longrightarrow D_k \\ \mathcal{P}_{k,i}:C_k\longrightarrow D_k \end{gather*} Assume that ${k}$ is sufficiently large and ${\epsilon>0}$ is sufficiently small, \begin{gather*} \delta_j^{(k)}(D_k)\subset T^{\epsilon} D_k \\ \mathcal{P}_{k,j}(C_k)\subset T^{\epsilon}D_k \end{gather*} hold for ${j>k}$ by degree reasons (locally we can define a grading of periodic orbits and local equivariant Floer differential and local equivariant pair of pants product are finite sums). So our promotions does not influence local theories and the local isomorphism theorem of ${\mathbb{Z}_p}$-equivariant pair of pants product (\cite{SZ}) also holds in our case. This implies that the promoted ${\mathbb{Z}_p}$-pair of pants product also gives an isomorphism of ${E_1}$-pages of associated spectral sequences. The rest of the proof of Theorem 1.1 for weakly monotone case is the same as in the monotone case. \begin{flushright} $\Box$ \end{flushright}
\section{Introduction} Lying at the intersection of geometry and number theory, one finds $p$-adic geometry. A paramount part of this theory is the study of $p$-adic analytic varieties, first defined by Tate in~\cite{Tate} (see also \cite{FP04}). They have played a key role in many developments of number theory (\emph{e.g.} $p$-adic cohomologies~\cite{LS07}, $p$-adic modular forms~\cite{Go88}). The main algebraic objects upon which Tate's geometry is built are Tate algebras and their ideals, formed of convergent multivariate power series over a complete discrete valuation field~$K$ (\emph{e.g.} $K = \Q_p$). In earlier papers~\cite{CVV, CVV2}, the authors showed that it is possible to define and compute Gröbner bases of Tate ideals with coefficients in $\mathbb Z_{p}$ or $\mathbb Q_{p}$, and that the definitions are compatible with the usual theory on polynomials over the residue field $\mathbb{F}_{p}$ or over the coefficient ring. A major limitation of the algorithms is the increasing cost of reductions as the precision grows. Our previous paper~\cite{CVV2} addresses the case of expensive reductions to zero, through the use of signature algorithms, but computing the result of non-trivial reductions remains expensive. Another question left open was whether it is possible to exploit overconvergence properties, namely the knowledge that the series we are working with satisfy a stronger convergence condition. In the present paper, we adapt the classical FGLM algorithm to the case of Tate series, and we show that it gives answers to both questions, in the case of zero-dimensional ideals. Precisely, we prove the following theorem. \begin{theo} \label{theo:intro} Let $\KX[\r]$\footnote{Here $K$ denotes the base field and $\r$ encodes the radii of convergence of our series; we refer to \S \ref{subsec:Tate_alg} for the precise definitions.} and $\KX[\u]$ be two Tate algebras with $\KX[\r] \subset \KX[\u]$. There exists an algorithm that takes as input a reduced Gröbner basis $G$ of a $0$-dimensional ideal $I$ of $\KX[\r]$ with respect to a given monomial ordering and output a Gröbner basis of the ideal $I{\cdot}\KX[\u]$ of $\KX[\u]$ for another given monomial ordering. Moreover, if $n$ denotes the number of variables, if $\delta$ is the dimension of the quotient $\KX[\r]/I$ and if $\prec$ is the precision at which the result is output, the complexity of this algorithm is: \begin{itemize} \item $O\tilde{~}(n \delta^3 \prec)$ operations in the base field $K$ for a general $K$, \item $O\tilde{~}(n \delta^3 \prec \cdot \log p)$ bit operations when $K = \Q_p$. \end{itemize} \end{theo} We underline that, although the classical FGLM algorithm only concerns change of ordering, our version also permits to change the radii of convergence of the underlying Tate algebra (namely the parameters $\r$ and $\u$), and then provides efficient tools for dealing with the aforementioned overconvergence situation. In the extreme case where $\r$ is infinite, it makes effective the bridge between polynomials and Tate series, that is between classical algebraic geometry and rigid geometry. On a different note, being able to perform such a change of ordering opens up algorithmic strategies for overconvergent series, by giving freedom in the choice of the convergence radii. An additional important outcome of our algorithm is that it can be slightly modified in order to accept certain nonreduced Gröbner bases as input. Hence, in many cases, calling it with the same radii of convergence and the same ordering as input and output, already performs a nontrivial operation: the interreduction of the input Gröbner basis. Moreover, it has a controlled complexity and performs actually very well in practice (contrarily to the naive reduction algorithm). Since the intermediate interreduction of Gröbner bases is often the bottleneck in Buchberger and signature algorithms in the Tate setting, using our FGLM algorithm (or an adaptation of it) at this step could lead to a significant speed-up. \subsubsection*{Strategy and ingredients} In the classical setting, the key step of the FGLM algorithm is to convert back and forth between Gröbner bases and the so-called multiplication matrices, which are defined as the multiplication maps by the variables in the quotient space. Performing the change of ordering on those multiplication matrices then reduces to basic linear algebra. Still in the classical case, thanks to the structure of normal forms, it can be shown that all steps can be done in sub-cubic time in the number of solutions. In the Tate setting, Gröbner bases are defined using a term ordering, taking into account both a monomial ordering in the usual sense and a weight taking into account the degree of the monomials, the valuation of the coefficient and the convergence radius of the series in the algebra. It is the reason why we will eventually be able to change all these parameters at the same time. However, this feature also implies new difficulties. Firstly, in the construction of the multiplication matrices, the structure of the normal forms does not allow us to read the values in one pass. Instead, we prove that an iterative process converges to the correct value of the matrices, and we show how this process can be done in different ways, including, for some particular base fields, the option of using relaxed arithmetic~\cite{vdH:1997,BvdHL:2011}, which eventually leads to a significant improvement of the efficiency. Secondly, if the change of ordering incurs a change of convergence radii, the size of the quotient algebra might change. We show that it is possible to recover multiplication matrices over the correct quotient by separating eigenspaces depending on the valuation of the eigenvalues. The reconstruction of the final Gröbner basis is finally achieved using the classical strategy in the residue field, and then lifting the basis. \subsubsection*{Organization of the article} In Section~\ref{sec:setting}, we introduce the notations and discuss some primitives of linear algebras over nonarchimedian fields which will be used repeatedly later on. The computation of multiplication matrices is addressed in Section~\ref{sec:mult_mat_for_Tate_alg}. In Section~\ref{sec:FGLM_for_Tate_alg}, we consider the question of changing radii of convergence and design our final algorithm. \section{Setting and preliminaries} \label{sec:setting} Throughout this article, we consider a field $K$ equipped with a discrete valuation $\mathrm{val}$ for which it is complete. We denote its ring of integers by $K^\circ$ and fix a uniformizer $\pi$ of $K$. The quotient $K^\circ/\pi$ is called the residue field of $K$ and will be denoted by $\bar K$ in what follows. Classical examples of such fields are $K = \mathbb{Q}_p$ (equipped with the $p$-adic valuation) and $k(\!(T)\!)$ (equipped with the $T$-adic valuation) for any base field $k$. The complexity statements are given with the usual asymptotic notations $O(f)$ and $O\tilde{~}(f) = O(f \log(f)^{n})$ for some $n$. We will consider two different models of complexity: arithmetic complexity, counting operations in $K$ or $K^\circ$, and base complexity, taking into account the precision. In the case of equal characteristic (\emph{i.e.} $\text{char } K = \text{char } \bar K$), such as $k(\!(T)\!)$, the base complexity counts operations in the residue field, and the correspondence between both models satistfies: \begin{equation} \label{eq:4} \text{(Arithmetic complexity)} = O\tilde{~}\big(\text{(Base complexity)} \cdot \prec\big). \end{equation} where $\text{prec}$ stands for the working precision. On the contrary, in the case of mixed characteristic, such as $\mathbb Q_{p}$, the base complexity counts bit operations. When the residue field is finite, the correspondence between both models satisfies: \begin{equation} \label{eq:5} \text{(Arithmetic complexity)} = O\tilde{~}\big(\text{(Base complexity)} \cdot \prec \cdot \log |\bar K|\big). \end{equation} \subsection{Tate algebras and ideals} \label{subsec:Tate_alg} In order to fix notations, we briefly recall the definition of Tate algebras and the theory of Gröbner bases over them. Let $\r = (r_{1},\dots,r_{n}) \in \mathbb Q^{n}$. The \emph{Tate algebra} $\KX[\r]$ is defined by: \begin{equation} \label{eq:1} \KX[\r] := \left\{ \sum_{\mathbf{i} \in \mathbb N^{n}} a_{\mathbf{i}}\mathbf{X}^{\mathbf{i}} \text{ s.t. } a_{\mathbf{i}}\in K \text{ and } \mathrm{val}(a_\i) - \r{\cdot}\i \xrightarrow[|\i| \rightarrow +\infty]{} +\infty \right\} \end{equation} The tuple $\mathbf{r}$ is called the convergence log-radii of the Tate algebra. We define the Gauss valuation of a term $a_{\mathbf{i}}\mathbf{X}^{\mathbf{i}}$ as $\mathrm{val}(a_{\mathbf{i}}\mathbf{X}^{\mathbf{i}}) = \mathrm{val}(a_\i) - \r{\cdot}\i$, and the Gauss valuation of $\sum a_{\mathbf{i}}\mathbf{X}^{\mathbf{i}} \in \KX[\r]$ as the minimum of the Gauss valuations of its terms. The integral Tate algebra ring $\KzX[\r]$ is the subring of $\KX[\r]$ consisting of elements with nonnegative valuation. In what follows, when $\r = (0, \ldots, 0)$, we will simply write $\KX$ instead of $\KX[(0,\ldots,0)]$. We fix a classical \emph{monomial order} $\leq_m$ on the set of monomials $\mathbf{X}^{\mathbf{i}}$. Given two terms $a \mathbf{X}^\i$ and $b \mathbf{X}^{\mathbf{j}}$ (with $a,b \in K^\times$), we write $a \mathbf{X}^\i < b \mathbf{X}^{\mathbf{j}}$ if $\mathrm{val}(a\mathbf{X}^\i) > \mathrm{val}(b\mathbf{X}^{\mathbf{j}})$, or $\mathrm{val}(a\mathbf{X}^\i) = \mathrm{val}(b\mathbf{X}^{\mathbf{j}})$ and $\mathbf{X}^{\mathbf{i}} <_m \mathbf{X}^{\mathbf{j}}$. The leading term of a Tate series $\sum a_{\mathbf{i}}\mathbf{X}^{\mathbf{i}} \in \KX[\r]$ is, by definition, its maximal term. A Gröbner basis of an ideal $I$ of $\KX[\r]$ is, by definition, a family $(g_1, \ldots, g_s)$ of elements of $I$ with the property that for all $f \in I$, there exists an index $i \in \{1, \ldots, s\}$ such that $\LT(g_i)$ divides $\LT(f)$. A Gröbner basis $(g_1, \ldots, g_s)$ is \emph{reduced} if given a term $t$ of $g_i$ which is not the leading term, $t$ is not divisible by any $\LT(g_j)$. The following theorem is proved in~\cite{CVV}. \begin{theo} \label{theo:GB} \begin{enumerate} \item Any ideal of $\KX[\r]$ admits a Gröbner basis. \item If $\r = (0, \ldots, 0)$ and $I$ is an ideal of $\KX$, a family $G = (g_1, \ldots, g_s)$ consisting of elements of $\KX$ with Gauss valuation~$0$ is a Gröbner basis of $I$ if and only if its reduction modulo~$\pi$ is a classical Gröbner basis of the quotient ideal $(I \cap \KzX[\r]) / \pi(I \cap \KzX[\r])$ of $\bar K[\mathbf{X}]$ for $\leq_m$. \end{enumerate} \end{theo} In the present article, we will be particularly interested in $0$-dimensional ideals. By definition, $I$ is such an ideal if the quotient $\KX[\r]/I$ is a finite dimensional $K$-vector space. If $I$ is a $0$-dimen\-sional ideal, the set: $$B = \big\{\, \mathbf{X}^{\mathbf i} \text{ with } i \in \mathbb N^n \text{ and } \mathbf{X}^{\mathbf i} \not\in \LT(I) \, \big\}$$ is finite and forms a $K$-basis of $\KX[\r]/I$. It is called the \emph{staircase} of $G$. Moreover, if we are given a Gröbner basis $(g_1, \ldots, g_s)$ of $I$, the staircase $B$ consists of all monomials $\mathbf{X}^{\mathbf i}$ which are not divisible by any $\LT(g_j)$ for $j$ varying in $\{1, \ldots, s\}$. This observation implies in particular that any \emph{reduced} Gröbner basis of a $0$-dimensional ideal $I$ consists only of polynomials. \subsection{Linear algebra} \label{ssec:linalg} It is an understatement to say that the FGLM strategy relies heavily on linear algebra. In the Tate setting, this assertion is even more true and new basic operations in linear algebra, which are specific to non-archimedean base fields, will be needed. The aim of this subsection is to review briefly these operations. \subsubsection*{Slope decomposition.} Let $V$ be a finite $K$-dimensional vector space and let $f : V \to V$ be a $K$-linear mapping. Let $\chi_f$ be the characteristic polynomial of $f$. Given an auxiliary real number $s$, one can factor $\chi_f$ as a product $\chi_f = \chi_{\textup{Big},s, f} \times \chi_{\textup{Small},s, f}$ where $\chi_{\textup{Big},s, f}$ (resp. $\chi_{\textup{Small},s,f}$) is the factor corresponding to all roots (in an algebraic closure) of valuation $<s$ (resp. valuation $\geq s$). Moreover, both $\chi_{\textup{Big},s, M}$ and $\chi_{\textup{Small},s, M}$ have coefficients in $K$. Letting $\textup{Big}_s(f)$ denote the kernel of $\chi_{\textup{Big},s, f}(f)$ and $\textup{Small}_s(f)$ denote that of $\chi_{\textup{Small},s, f}(f)$, the above factorization corresponds to a decomposition of $V$ as a direct sum $V = \textup{Big}_s(f) \oplus \textup{Small}_s(f)$. Computing efficiently this decomposition is a basic task in linear algebra over non-archimedean fields. In this article, we assume that we are given a routine \texttt{Big} which takes as input $(f,s)$ and outputs (a basis of) the subspace $\textup{Big}_s(f)$. A naive implementation of the procedure \texttt{Big} is reported in Algorithm~\ref{algo:big}. It has cubic complexity in the dimension of $V$ (which will be enough for our applications) but has the advantage of being numerically stable. \begin{algorithm}[t] \caption{\texttt{Big}$(f,s)$} \label{algo:big} \Input{$f \in K^{ \delta \times \delta}$, $s \in \mathbb R.$} \Output{A basis $S$ of $\textup{Big}_s(f)$.} $\chi_f \leftarrow \texttt{charpoly}(f)$% \tcp*{use \cite{KV:2004} or \cite{CRV:2017}} Write $\chi_f = \chi_{\textup{Small},s, f} \chi_{\textup{Big},s,f}$% \tcp*{use \cite{CRV:2016}} $g \leftarrow \chi_{\textup{Big},s, f}(f)$% \tcp*{use \cite{PS:1973}} $S \leftarrow \ker g$% \tcp*{use pnumerical kernel from \cite[\S 2.2.1]{KV:2020}} \Return{$S$} \end{algorithm} \subsubsection*{$K^\circ$-modules and saturation.} As before, we let $V$ be a finite dimensional $K$-vector space. We recall basic facts about sub-$K^\circ$-modules of $V$ and their algorithmic. If $V$ is equipped with a distinguished basis, one can represent a finitely generated sub-$K^\circ$-module of $V$ by the matrix $M$ whose columns are the generators of $L$. Performing column reduction, one can always assume that $M$ is under Hermite normal form. With this additional assumption, it is uniquely determined by $L$. Let $L_1$ and $L_2$ be sub-$K^\circ$-modules of $V$, represented by the square matrices $M_1$ and $M_2$ respectively. The sum $L = L_1 + L_2$ is then generated by the columns of the block matrix: $$M = \left( \begin{array}{@{\hspace{0.5ex}}c@{\hspace{0.5ex}}c@{\hspace{0.5ex}}c@{\hspace{0.5ex}}} M_1 & | & M_2 \end{array} \right)$$ Computing the Hermite normal form of $M$, one obtains a canonical matrix representating $L$. The cost of this computation is cubic in the dimension of $V$ with a naive algorithm. We now assume that we are given a sub-$K^\circ$-module $L \subset V$ together with a $K$-linear endomorphism $f : V \to V$. The \emph{saturation} of $L$ with respect to $f$ is the sub-$K^\circ$-module of $V$ defined by: $$\textup{Sat}_f(L) = L + f(L) + f^2(L) + \cdots + f^n(L) + \cdots$$ \begin{lem} \label{lem:saturate} We assume that $V = \textup{Small}_0(f)$. Then: $$\textup{Sat}_f(L) = L + f(L) + f^2(L) + \cdots + f^{\dim V-1}(L).$$ In particular, if $L$ is finitely generated, then $\textup{Sat}_f(L)$ is also. \end{lem} \begin{proof} The assumption on $f$ implies that the coefficients of $\chi_f$ are all in $K^\circ$. From Cayley-Hamilton theorem, we deduce that $f^\delta$ is a linear combination with coefficients in $K^\circ$ of the $f^i$'s with $i < \delta$. The lemma follows. \end{proof} The routine \texttt{Saturate} presented in Algorithm~\ref{algo:saturate} computes $\textup{Sat}_f(L)$ under the assumption that $L$ is finitely generated and $V = \textup{Small}_0(f)$. Indeed, one checks by induction that after the $k$-th iteration of the loop, one has $g = f^{2^k}$ and: $$S = L + f(L) + f^2(L) + \cdots + f^{2^k-1}(L).$$ Therefore, when $2^k \geq \delta$, we find $S = \textup{Sat}_f(L)$. The complexity of Algorithm~\ref{algo:saturate} is equal to the cost of $O(\log \delta)$ Hermite reductions. If we use the naive algorithm for this task, we obtain an algorithm of arithmetic complexity $O\tilde{~}(\delta^3)$. \begin{algorithm}[t] \caption{\texttt{Saturate}$(f, L)$} \label{algo:saturate} \Input{a $K$-linear map $f : V \to V$ s.t. $V = \textup{Small}_0(f)$,\\ a finitely generated $K^\circ$-module $L \subset V$} \Output{$\textup{Sat}_f(L)$} $S \leftarrow L$;\, $g \leftarrow f$\; $w \leftarrow \lceil \log_2 \dim V \rceil$\; \For{$k \in \llbracket 1, w \rrbracket$} { \label{algo:line:power_it_5} $S \leftarrow S + g(S)$\; $g \leftarrow g^2$\; } \Return{ $S$ } \end{algorithm} \begin{rem} For a general $K$-linear mapping $f$, one always has: $$\textup{Sat}_f(L) = \textup{Big}_0(f) + L + f(L) + f^2(L) + \cdots + f^{\dim V -1}(L)$$ provided that $L$ spans $V$ as a $K$-vector space. Under this assumption, one can then combine Algorithms~\ref{algo:big} and~\ref{algo:saturate} to compute the saturation of $L$ with respect to $f$ even when $\textup{Small}_0(f) \subsetneq V$. \end{rem} \section{Multiplication matrices} \label{sec:mult_mat_for_Tate_alg} Throughout this section, we fix a tuple $\r = (r_1, \ldots, r_n)$ and consider the Tate algebra $\KX[\r]$. We consider in addition a $0$-dimensional ideal $I$ of $\KX[\r]$ and assume that we are given a Gröbner basis $G = (g_1, \ldots, g_s)$ of $I$. The first step in the FGLM algorithm is the computation of the matrices of multiplication by the variables on the quotient $\KX[\r]/I$ (which has finite dimension by assumption). We recall that a $K$-basis of $\KX[\r]/I$ is given by the staircase $B$, which consists of all monomials $m$ with $m \not\in \LT(I)$. We let $T_i$ be the matrix of the multiplication by $X_{i}$ with respect to this basis. Observe that the $(\mu, m)$-entry of $T_i$ has valuation at least: $$v_{\mu, m} = \mathrm{val}(mX_i) - \mathrm{val}(\mu) = \mathrm{val}(m) - r_i - \mathrm{val}(\mu).$$ Our goal is to design an algorithm for computing the $T_i$'s. In order to express our complexity estimates, we introduce two important parameters. This first one is the degree of the ideal $\delta = |B| = \dim \KX[\r]/I$. The second one, denoted by $\epsilon$, is the size of the boundary of the staircase defined as $\bar B \setminus B$ with $$\bar{B} = \big\{\,X_{i} m \, :\, i \in \{1,\dots,n\}, m \in B\,\big\}.$$ Obviously the cardinality of $\bar B$ is at most $n\delta$; thus $\epsilon \leq n \delta$ as well. The theorem we are going to prove is the following (we refer to the beginning of Section~\ref{sec:setting} for the definition of the arithmetic and base complexity). \begin{theo} There exists an algorithm that takes as input a reduced Gröbner basis of $G$ and outputs the multiplication matrices $T_i$ with $(\mu,m)$-entry known at precision $O(\pi^{\text{\rm prec} + v_{\mu,m}})$ for a cost of $O(\epsilon \delta^2 \text{\rm prec})$ arithmetic operations. Besides, if the base field $K$ is either a Laurent series field or $\Q_p$, the above complexity can be lowered to $O\tilde{~}(\epsilon \delta^2 \text{\rm prec})$ base operations. \end{theo} We will also present an algorithm accepting as input certain nonreduced Gröbner basis. This variant is interesting because, in some cases, it will eventually provide a fast algorithm for interreducing Gröbner basis. \subsection{Iterative algorithm} \label{sec:computation-ala-fglm} Throughout this subsection, we assume that $G = (g_1, \ldots, g_s)$ is \emph{reduced} and $\r = (0, \ldots, 0)$. We will explain later on how these assumptions can be relaxed. For simplicity, we assume in addition that the $g_i$'s are all monic (\emph{i.e.} the coefficients of their leading terms are $1$). This hypothesis is of course harmless since renormalizing the $g_i$'s and making them monic does not affect the fact that $G$ is a Gröbner basis. Computing the $T_i$'s amounts to computing the normal forms of $m$ modulo $I$ for all $m$ in $\bar B$. In a classical setting, this can be done iteratively with linear algebra, by considering the monomials following the monomial order. Indeed, for $m$ in $B$ and $i \in \{1,\dots,n\}$, if $X_{i}m \notin B$, either $X_{i}m$ is a leading monomial in $G$, or there exists $\mu \notin B$ such that $X_{i}m = X_{j}\mu$, and then $\NF(X_{i}m) = X_{j}\NF(\mu)$. In the classical setting, the normal form of a monomial $\mu$ only involves monomials in $B$ strictly smaller than $\mu$, so $X_{j}\NF(\mu)$ only involves monomials in $\bar{B}$ strictly smaller than $X_{i}m$. This allows to write $\NF(X_{i}m)$ as a linear combination of already computed normal forms. In the case of Tate term orderings, similarly to what was observed for example for tropical orderings~\cite{IVY20}, the normal form of a monomial $\mu$ can involve all monomials of $B$, and computing the wanted normal forms \emph{a priori} requires solving a large nonlinear system of equations. However, because Tate Gröbner basis are just classical Gröbner basis when they are reduced modulo $\pi$ (Theorem~\ref{theo:GB}), the above strategy allows to recover the value of the multiplication matrices modulo $\pi$. Following the same computations again lifts the multiplication matrices to coefficients in $K^\circ/\pi^{2}$, and so on and so forth. \newcommand{\vvect}[1]{[#1]} The algorithm formalizing this idea is described in Algorithm~\ref{algo:mult_mat_from_TateGB}. \begin{algorithm}[t] \caption{\texttt{MulMat\_iter}$(G, \text{prec})$} \label{algo:mult_mat_from_TateGB} \Input{a reduced Gröbner basis $G$ of the ideal $I \subset \KX$,\\ an integer $\prec$ such that all elements of $G$\\ are known at precision $\prec$} \Output{$T_1,\dots,T_n$, the multiplication matrices over $\KX/I$ (w.r.t the basis $B$) modulo $\pi^{\prec}$} $B \leftarrow \{m \text{ monomials not divisible by any } \LT(g), g \in G \}$\; $T_{i} = (c_{i,m,m'}) \leftarrow$ zero matrices of size $\delta \times \delta$, with rows and columns indexed by $B$, for all $i \in \llbracket 1,n \rrbracket$\; \For{$k$ from $0$ to $\prec$\label{algo:line:beg-T}}{ \For{$i \in \llbracket 1,n \rrbracket$, $m \in B$ in increasing order of $X_{i}m$ }{ \uIf{$X_{i}m \in B$}{ $T_{i} \cdot \vvect{m} \leftarrow \vvect{X_{i}m}$\label{algo:eq-simple}\; } \uElseIf{$X_{i}m = \LT(g)$ for some $g \in G$}{ $T_{i} \cdot \vvect{m} \leftarrow \vvect{g - \LT(g)}$\label{algo:eq-gb}\; } \Else{ Write $m = X_{j}m'$ for some $m' \notin B$\; $T_{i} \cdot \vvect{m} \leftarrow T_{j}\cdot (T_{i} \cdot \vvect{m'})$\label{algo:eq-quadratic}\; } }} \Return{$T_{1},\dots,T_{n}$} \end{algorithm} For $P \in K[\mathbf{X}]$ with support contained in $B$, the notation $\vvect{P}$ represents the vector of coefficients of $P$ in the basis $B$. With that notation, given a monomial $m \in B$ and a matrix $M$ with rows and columns indexed by $B$, $M \cdot \vvect{m}$ is the column of $M$ corresponding to $m$. For $i \in \{1,\dots,n\}, \mu, m\in B$, we denote by $c_{i,\mu,m}$ the value at row $\mu$ and column $m$ in the multiplication matrix $T_{i}$. The following theorem states the correctness and the complexity of the algorithm. \begin{theo} \label{prop:termin-r0} Algorithm~\ref{algo:mult_mat_from_TateGB} is correct. More precisely, at the end of the $k$-th run of the loop, the matrices $(T_{i})$ are correct modulo $\pi^{k}$. Furthermore, each run through the loop requires $O(\delta^{2}\epsilon)$ operations in $K^\circ$. \end{theo} The proof uses the following observation, which is the translation to the Tate setting of the structure of the normal forms of the staircase in the classical setting. \begin{lem} \label{prop:structure-r0} If $X_{i}m \in B$, then $\mathrm{val}(c_{i,\mu,m}) > 0$ if $\mu \neq X_{i}m$. Otherwise, if $X_{i}m \leq \mu$, then $\mathrm{val}(c_{i,\mu,m}) > 0$. \end{lem} \begin{proof} By definition, the column indexed by $m$ in the multiplication matrix $M_{i}$ is the vector of the coordinates of the normal form $N$ of $X_{i}m$ modulo $G$, in the basis $B$. If $X_{i}m \in B$, then $N = X_{i}m$ and the result is clear. Otherwise, if $c_{i,\mu,m} \mu$ is a term of $N$, then $c_{i,\mu,m}\mu < X_{i}m$, which, by definition of the Tate term ordering, means that either $\mu < X_{i}m$ or $\mathrm{val}(c_{i,\mu,m}) > 0$. \end{proof} \begin{proof}[Proof of the theorem] We prove the result by induction on $k \geq 0$, and, for each value of $k$, by induction on $X_{i}m$, $i \in \{1,\dots,n\}$, $m \in B$. The initial case $k=0$ is empty. Let $k>0$, $i \in \{1,\dots,n\}$ and $m \in B$, and assume by induction that we know the coefficient $c_{j,\mu',m'}$ with precision $k$ if $X_{j}m' < X_{i}m$, and with precision $k-1$ otherwise. If $X_{i}m \in B$, then there is nothing to prove, because the coefficients are 0 or 1. If $X_{i}m = \LT(g)$ for some $g \in G$, there is also nothing to prove, since all the coefficients of $M_{i}\cdot \vvect{m}$ are known to precision $\prec \geq k$. In the remaining case, for each $\mu \in B$, the algorithm performs the substitution \begin{equation} \label{eq:7} c_{i,\mu,m} \leftarrow \sum_{\mu' \in B} c_{j,\mu,\mu'} c_{i,\mu',m'}. \end{equation} Since $X_{j}m' = m$, $m' < m$ and $X_{i}m' < X_{i}m$ and so the induction hypothesis applies. Let $\mu' \in B . Note that $X_{j}\mu' \neq X_{i}m$: otherwise, $X_{j}\mu' = X_{i}X_{j}m'$ so $\mu' = X_{i}m'$, which cannot lie in $B$. If $X_{j}\mu' < X_{i}m $, then both $c_{j,\mu,\mu'}$ and $c_{i,\mu',m'}$ are known up to precision $k$ (induction on $X_{i}m$), so the product is known to precision $k$. And if $X_{j}\mu' > X_{i}m$, then $c_{j,\mu,\mu'}$ is known up to precision $k-1$ (induction on $k$) and $c_{i,\mu',m'}$ is known up to precision $k$ (induction on $X_{i}m$) and divisible by $\pi$ (by Lemma~\ref{prop:structure-r0}), so the product is known up to precision $k$. For the number of operations, observe that there are less than $\epsilon$ pairs $(i,m)$ such that the alsorithm needs to perform the computation at line~\ref{algo:eq-quadratic}; each computation involves $\delta$ coefficients of the matrix, and for each of them, $\delta$ products in $K^\circ$. \end{proof} \subsection{Nonreduced Gröbner bases} \label{sec:nonreduced-grobner} An interesting feature of the algorithm above is that contrary to the usual case, it has to handle monomials which are larger than the current monomial $X_{i}m$. This removes the main reason for the requirement that the input Gröbner basis is reduced, and with slight modifications, it can handle any Gröbner basis as long as it is reduced modulo $\pi$. Precisely, this is achieved by replacing line~\ref{algo:eq-gb} with the following. \bgroup \let\@latex@error\@gobble \begin{algorithm}[H] \renewcommand{\theAlgoLine}{\thealgocf.8\alph{AlgoLine}} \addtocounter{algocf}{-1} \renewcommand{\thealgocf}{\arabic{algocf}a} \caption{Update the matrices using a nonreduced basis element} \label{algo:nonreduced} \renewcommand{\thealgocf}{\arabic{algocf}} \For{$a\mu$ in the support of $g - \LT(g)$}{ \uIf{$\mu < X_{i}m$}{ $T_{i}\cdot \vvect{m}\leftarrow T_{i}\cdot\vvect{m} + a [\mu]$ } \Else{ Pick $m' \in B$ such that $\mu = X_{1}^{\alpha_{1}}\cdots X_{n}^{\alpha_{n}}m'$\;\label{algo:line:decom-nonred} $T_{i}\cdot \vvect{m} \leftarrow T_{i}\cdot \vvect{m} + aT_{1}^{\alpha_{1}}\cdots T_{n}^{\alpha_{n}} \cdot \vvect{m'}$\; } } \end{algorithm} \egroup Unless the staircase is trivial, \emph{i.e.} as long as the ideal is proper, it is always possible to find a suitable $m'$ at line~\ref{algo:line:decom-nonred}, by picking the monomial $1 \in B$. Nonetheless, to avoid computing large powers of matrices, it is more efficient to find $m'$ as large as possible. It is still true that any monomial $\mu > X_{i}m$ appearing in the process necessarily carries a coefficient with valuation $\geq 1$, and thus the loop invariant that the coefficients are known to precision $k$ still holds. The complexity of the computation is no longer bounded merely in terms of $\delta$, $\epsilon$ and $\prec$, but also depends on the degree of the nonreduced terms in the basis, and on the choices of the monomials $m'$. \subsection{Recursive algorithm} \label{sec:recursive-algorithm} As described above, the computations can be done in increasing order of the monomials $X_{i}m$, ensuring that all the necessary coefficients are known with the necessary precision for the next step. Another way to proceed is by dynamic programming, computing the necessary coefficients recursively if they are not known yet. The recursive definition, using the matrices $T_{i}$ as a cache, is described in Algorithm~\ref{algo:mult_mat_rec}, and is very similar to that described in Algorithm~\ref{algo:mult_mat_from_TateGB}. It can then be called, for all values of $i,\mu,m$ and $k=\prec$, instead of lines \ref{algo:line:beg-T}--\ref{algo:eq-quadratic} in Algorithm~\ref{algo:mult_mat_from_TateGB}. The main difference is that the algorithm does not need to specify in which order the coefficients are computed: the recursive definition queries the missing coefficients as needed. The decision on which precision is needed depends on the valuation of the coefficient: the idea is that if $a$ is known with precision $k$ and has valuation $v$, and $b$ is known with precision $l$ and has valuation $w$, then $a\cdot b$ is known with precision $\min(k+w,l+v)$. Note that it also works if we only know a lower bound on the valuation, typically if all the digits we know are $0$. The proof that the recursive algorithm terminates is the existence of such an order, as demonstrated in Theorem~\ref{prop:termin-r0}. And the proof of complexity is also immediate: there are $\epsilon$ coefficients for which the calculation is non-trivial, and for each of them, after $\delta$ multiplications, we gain one digit of precision. The total complexity is then $O(\epsilon \delta^2 \text{prec})$ operations in $K^\circ$ as in the iterative case. The advantage of the recursive presentation is twofold. Firstly, it will allow in Section~\ref{sec:other-log-radii} to generalize the construction, the proof of termination, and the complexity bounds, to arbitrary log-radii. Secondly, it offers a way to immediately improve the performance of the algorithms, on coefficient rings such as $\mathbb Z_{p}$ or $k(\!(T)\!)$ where fast arithmetic is available. This works by using a lazy representation of the number, that is, a representation where each number is the data of its first digits, as well as a function allowing to compute the next digit. Algorithm~\ref{algo:mult_mat_rec} gives us precisely such a function, and as such, the process can be viewed as a recursive definition of lazy numbers (the function definition) together with a delayed evaluation (the function call for all values). For many coefficient rings, it is possible to do better by using the so-called relaxed, or on-line, arithmetic. Such arithmetics are available for formal power series rings~\cite{vdH:1997} and $p$-adic numbers~\cite{BvdHL:2011,BL:2012}. In that case, the cost of the computation of each new digit (of each variable) is polynomial in $\log(\text{prec})$ if we are counting base operations (in the sense of Section~\ref{sec:setting}). Here, this allows us to compute the matrices with base complexity in $O\tilde{~}(\epsilon \delta^{2} \prec)$. \begin{algorithm}[t] \caption{\texttt{MulMat\_rec}$(G, B, i, \mu, m, k)$} \label{algo:mult_mat_rec} \SetKwInOut{Global}{Global} \Input{$G$ as in Algo.~\ref{algo:mult_mat_from_TateGB}, $B$ the staircase of $G$,\\ $i \in \llbracket 1,n \rrbracket,\,\mu \in B, \, m \in B, \, k \in \mathbb Z, k \leq \prec$} \Global{$(T_{i}) = (c_{i,\mu,m})_{\mu,m \in B})_{i \in \llbracket 1,n \rrbracket}$} \Output{$T_{i}$ is such that $c_{i,\mu,m}$ is known to precision $k$ } \uIf{$c_{i,\mu,m}$ is known to precision $k$ in $T_{i}$}{ \textbf{do nothing} } \uElseIf{$k \leq 0$}{ $c_{i,\mu,m}\leftarrow O(1)$ } \uElseIf{$X_{i}m \in B$}{ $c_{i,\mu,m}\leftarrow$ 1 \textbf{if} $\mu = X_{i}m$ \textbf{else} 0} \uElseIf{$X_{i}m = \LT(g)$ for $g \in G$}{ $c_{i,\mu,m}\leftarrow$ the coordinate of $\mu$ in the support of $g - \LT(g)$ } \Else{ Write $m = X_{j}m'$ for some $m' \notin B$\; $c \leftarrow 0$\; \For{$\mu' \in B$}{ $v \leftarrow \mathrm{val}(c_{j,\mu,\mu'})$; $w \leftarrow \mathrm{val}(c_{i,\mu',m'})$\; $\texttt{MulMat\_rec}(G, B, j,\mu,\mu',k{-}w)$\; $\texttt{MulMat\_rec}(G, B, i,\mu',m',k{-}v)$\; $c \leftarrow c + c_{j,\mu,\mu'}c_{i,\mu',m'}$\; \label{line:add} } $c_{i,\mu,m} \leftarrow c + O(\pi^{k+1})$\; } \end{algorithm} \begin{rem} For simplicity and for the complexity bounds, we only presented the procedure in the case where the Gröbner basis is reduced, but given that the recursive definition is equivalent to the loop presented in Algorithm~\ref{algo:mult_mat_from_TateGB}, the case where the Gröbner basis is not reduced can be dealt with in exactly the same way. \end{rem} \subsection{General log-radii} \label{sec:other-log-radii} We now consider the case of arbitrary log-radii $\mathbf{r} \in \mathbb Q^{n}$. We will prove that the algorithm presented above still works in that case, by using abstract changes of variables and base ring to justify the existence of a suitable execution order. Crucially, the algorithm works without performing those transformations, and the complexity is the same. We only need to be more careful about the handling of the precision and of the valuation. Namely, given $\mathbf{r} \in \mathbb Q^{n}$, we will assume that the input basis $G$ is normalized, in the sense that $0 \leq \mathrm{val}(\LT(g)) < 1$ for all $g \in G$. We will further require that for each $g \in G$, and for each $t$ in the support of $G$, $t$ is known to precision $\prec + \floor{\mathrm{val}(t)}$, and we will ensure that we compute the matrices with similar precision by ensuring that $c_{i,\mu,m}$ is correct up to precision $k+\floor{v_{\mu,m} $. Recall that $\NF(X_{i}m) = \sum_{\mu \in B} c_{i,\mu,m} \mu$ with, for all $\mu$, $c_{i,\mu,m} \mu < X_{i}m$. So by definition of the Tate term ordering, $\mathrm{val}(c_{i,\mu,m}) \geq \mathrm{val}(X_{i}m) - \mathrm{val}(\mu) = v_{\mu,m}$, and the requirement on the precision is merely adjusting the number of digits we require beyond those we already know to be 0. The only difference is that each term is initialized with the zero digits and the precision which we already know: \vspace{0.5cm} \bgroup \let\@latex@error\@gobble \begin{algorithm}[H] \addtocounter{algocf}{-1} \renewcommand{\thealgocf}{\arabic{algocf}a} \caption{Base case with non-zero log-radii} \label{algo:rec-log-radii} \renewcommand{\thealgocf}{\arabic{algocf}} \setcounter{AlgoLine}{2} \renewcommand{\theAlgoLine}{\thealgocf.\arabic{AlgoLine}} \uElseIf{$k \leq \lfloor\mathrm{val}(X_{i}m) - \mathrm{val}(\mu)\rfloor$}{ $c_{i,\mu,m}\leftarrow O(\pi^{\lfloor\mathrm{val}(X_{i}m) - \mathrm{val}(\mu)\rfloor})$\; } \end{algorithm} \egroup \vspace{0.5cm} \begin{theo} Let $\mathbf{r} \in \mathbb Q^{n}$ be a system of log-radii. Algorithm~\ref{algo:mult_mat_from_TateGB}, with input a reduced Gröbner basis of an ideal in $\KzX[\mathbf{r}]$, and modified to compute the matrices using Algorithm~\ref{algo:mult_mat_rec}, computes the multiplication matrices in $O(\epsilon \delta^{2}\prec)$ multiplications in $K^\circ$. \end{theo} \begin{proof} Let $\Gamma(G)$ be the dependency graph of the recurrence relation defined in Algorithm~\ref{algo:mult_mat_rec} with the modifications of Algorithm~\ref{algo:rec-log-radii}: namely, $\Gamma(G)$ is a directed graph whose vertices are tuples $(i,\mu,m,k)$, and there is a directed edge $(i,\mu,m,k) \rightarrow (j,\mu',m',l)$ if and only if the computation of $c_{i,\mu,m}$ to precision $k$ queries the coefficient $c_{j,\mu',m'}$ to precision $l$. Note that the vertices with no outgoing edge correspond to coefficients which are immediately known to precision $\prec$. The recursive computation terminates if and only if the graph is cycle-free, namely, if every path through the graph eventually reaches a vertex with no outgoing edge. In the case of trivial log-radii $\mathbf{r} = (0,\dots,0)$, the proof of that fact is Theorem~\ref{prop:termin-r0}. Assume that $\mathbf{r} \in \mathbb Q^{n}$. % Let $D$ be the common denominator of the log-radii, so that $\mathbf{r} = (r_{1}/D, \dots, r_{n}/D)$. Without loss of generality, we may assume that $G$ is minimal: elements of $G$ which can be removed will not take part in the computation. Consider the field extension $L = K[\eta]$ with $\eta^{D} = \pi$, and perform the change of variables $X_{i} \leftarrow \eta^{r_{i}}Y_{i}$. This change of variables transforms $G$ into a Gröbner basis $G'$ of an ideal in $L^\circ\{\mathbf{Y}\}$. In this case, the algorithm terminates, so the graph $G'$ is cycle-free. If $G$ is minimal, so is $G'$, and by \cite[Prop.~3.10]{CVV}, the elements of this basis lie in $K^\circ\{\mathbf{Y}\} \subset L^\circ\{\mathbf{Y}\}$. In particular, all throughout the algorithm, the coefficients of the matrices are in $K^\circ$. The graph $\Gamma(G)$ is isomorphic to a subgraph of $\Gamma(G')$, the inclusion being given by $(i,\mu,m,k + \floor{v_{m,\mu}} \rightarrow (i,\mu,m,k)$. Since $\Gamma(G')$ is cycle-free, so is $\Gamma(G)$ and the algorithm terminates. The bound on the number of operations can be obtained with a similar argument as before, or read on the graph: the complexity is bounded by $2 \delta$ times the number of vertices of $\Gamma(G)$ since computing each new vertex has a cost of $2 \delta$ operations in $K$ (the additions and multiplications on line~\ref{line:add}). Since $\Gamma(G)$ has at most $\epsilon\delta{\cdot}\prec$ vertices, the bound $O(\epsilon \delta^2 \prec)$ follows. \end{proof} \section{Change of log-radii and ordering} \label{sec:FGLM_for_Tate_alg} The next step in the FGLM algorithm consists in going in the opposite direction: starting from multiplication matrices and a term ordering, we aim at reconstructing the underlying Gröbner basis. Moreover, in our setting where we want to be able to handle in addition changes of log-radii, a preliminary step is needed. Indeed, the multiplication matrices are usually affected by a modification of the log-radii. For example, the ideal generated by $2x^2- y^2$ and $y^3-x^2$ in $\mathbb Q_2[x,y]$ has staircase $\{1, y, x, y^2, xy, xy^2\}$ (for lex) while it spans an ideal over $\mathbb Q_2 \{x,y \}$ with staircase $\{1,y\}$ (still using lex). We study this phenomenon in full generality in Section~\ref{subsec:from_poly_to_tate_alg}. A toy implementation of the algorithms of this Section is available on \url{https://gist.github.com/TristanVaccon}. \subsection{New multiplication matrices} \label{subsec:from_poly_to_tate_alg} \subsubsection*{Theoretical results} Let $\r$ and $\u$ be two $n$-tuples such that $r_i \geq u_i$ for all~$i$.\footnote{The results of this section can be extended without difficulty to $r_i=+\infty,$ \textit{i.e.} to $K[\mathbf{X}]$.} Under this assumption the Tate algebra $\KX[\r]$ is included in $\KX[\u]$ and, given an ideal $I$ in $\KX[\r]$, it makes sense to consider the ideal $J = I \cdot \KX[\u]$ of $\KX[\u]$. In what follows, we always assume that $I$ is $0$-dimensional. The quotient $\KX[\r]$ is then, by definition, a finite dimensional $K$-vector space; we will denote it by $V$. Similarly, we set $W = \KX[\u]/J$. The inclusion $\KX[\r] \hookrightarrow \KX[\u]$ induces a $K$-linear mapping $\Phi : V \to W$. In order to study $\Phi$, we use topological arguments. We let $\Vert\cdot\Vert_\u$ be the norm on $\KX[\u]$ associated to the Gauss valuation $\mathrm{val}_\u$ and equip $\KX[\u]$ with the topology associated to this norm. \begin{lem} \label{lem:closure} The ideal $J$ is the closure of $I$ in $\KX[\u]$. \end{lem} \begin{proof} The polynomial ring $K[\mathbf X]$ is dense in $\KX[\u]$ for the norm $\Vert\cdot\Vert_u$. Therefore, $\KX[\r]$ is dense as well, implying that $I$ is dense in $J$. The fact that $J$ is closed follows from~\cite[Chap.~2, Cor.~8]{bosch}. \end{proof} The norm $\Vert\cdot\Vert_\u$ induces by restriction a norm on $\KX[\r]$ (which is, of course, different from the standard norm $\Vert\cdot\Vert_\r$ on this space) and a mapping $\Vert \cdot \Vert_V : V \to \mathbb R^+$ defined by: $$\Vert x \Vert_V = \inf_{\hat x} \Vert \hat x \Vert_\u$$ where the infinum runs over all $\hat x \in \KX[\r]$ lifting~$x$. In general, $\Vert \cdot \Vert_V$ is not a norm but only a semi-norm, meaning that there might exist elements $x \in V$ for which $\Vert x \Vert_V = 0$. By definition, the \emph{kernel} of $\Vert \cdot \Vert_V$ is the set of such elements; we denote it by $N$. It is easily seen that $N$ is a sub-$K$-vector space of $V$. \begin{prop} \label{prop:Phi} The map $\Phi$ is surjective and its kernel is~$N$. \end{prop} \begin{proof} We notice that $\KX[\u]$ is the completion of $\KX[\r]$ for the norm $\Vert \cdot \Vert_u$. Combining this observation with Lemma~\ref{lem:closure}, we deduce that $W$ appears as the completion of $V$ with respect to the semi-norm $\Vert \cdot \Vert_V$, which is also the completion of $V/N$. But, since $V/N$ is finite dimensional, it is already complete. As a conclusion, $W \simeq V/N$ and the proposition is proved. \end{proof} We now assume that we are given the multiplication matrices $T_1, \ldots, T_n$ over $V$. We want to relate them to $W$, or equivalently to~$N$. This is the content of the following proposition. \begin{prop} \label{prop:N_in_the_bigTi} With the above notations, we have: \[ N = \sum_{i=1}^n \textup{Big}_{u_i}(T_i) \] (where we recall that the notation $\textup{Big}_{u_i}$ was defined in \S \ref{ssec:linalg}). \end{prop} \begin{proof} First of all, we observe that, up to replacing $K$ by $K[\pi^{1/D}]$ for a well-chosen integer $D$, we can assume without loss of generality that $\u$ is in $\mathbb Z^n$. Replacing $T_i$ by $\pi^{-u_i} T_i$ and $\r$ by $\r{-}\u$, we may further suppose that $\u = (0, \ldots, 0)$. Let $i \in \{1, \ldots, n\}$ and let $x \in \textup{Big}_0(T_i)$. By definition, $x$ is killed by $\chi_{\textup{Big},0,T_i}(T_i)$. In other words, if $f \in \KX[\r]$ is a lifting of $x$, the product $\chi_{\textup{Big},0,T_i}(X_i) \cdot f$ lies in $I$. Now, we claim that $\chi_{\textup{Big}, 0, T_i}(X_i)$ is invertible in $\KX$ because it is a product of factors of the form $a^{-1} (1-aX_i)$ with $\mathrm{val}(a) > 0$. Consequently, $f$ must be an element of $J$. By Proposition~\ref{prop:Phi}, we derive $x \in N$, which proves the inclusion $\textup{Big}_0(T_i) \subset N$. Since this holds for any $i$, the $\supset$ part of the Proposition is proved. Set $N' = \sum_{i=1}^n \textup{Big}_0(T_i)$ and $W' = V/N'$. From what we have done so far, we deduce that the semi-norm $\Vert \cdot \Vert_V$ on $V$ induces a semi-norm on $W'$. The proposition will follow if we can prove that $\Vert \cdot \Vert_V$ is indeed a norm (\emph{i.e.} with trivial kernel) on $W'$. In order to do so, we consider the unit ball of $W'$, namely: $$D' = \big\{\, x \in W' \,\, \text{s.t.} \,\, \Vert x \Vert_V \leq 1\,\big\}.$$ We want to prove that $D'$ does not contain any $K$-line. For this, we remember that the unit ball of $\KX$ is exactly the $K^\circ$-module generated by the monomials $\mathbf{X}^{\mathbf i}$ for $\mathbf i$ varying in $\mathbb N^n$. Therefore, $D'$ is the smallest $K^\circ$-module stable under the $T_i$'s and containing the image of $1 \in \KX$ in $W'$. Keeping in mind in addition that the $T_i$'s commute pairwise, we get $D' = \textup{Sat}_{T_1} \textup{Sat}_{T_2} \cdots \textup{Sat}_{T_n} (L_0)$ where $L_0$ is the sub-$K^\circ$-module of $W'$ generated by the image of~$1$. Besides, on $W'$, all the eigenvalues of all the $T_i$'s have nonnegative valuation since we have quotiented out all the $\textup{Big}_0(T_i)$'s. Consequently Lemma~\ref{lem:saturate} applies and shows that $D'$ is finitely generated. In particular, it contains no $K$-line, as wanted. \end{proof} \subsubsection*{Explicit computations} \begin{algorithm}[t] \caption{\texttt{NewMulMat}$(T_1, \ldots, T_n, v)$} \label{algo:new_mult_mat} \Input{$T_1,\dots,T_n$ the multiplication matrices over $V$,\\ $v$ the image of $1 \in \KX[\r]$ in $V$, $\u \in \mathbb Z^n$} \Output{$U_1,\dots,U_n$ the multiplication matrices over the unit ball of $W$,\\ $w$ the image of $1 \in \KX[\r]$ in $W$} $N \leftarrow \{0\}$\; \For{$i \in \llbracket 1,n \rrbracket$} { $N \leftarrow N + \texttt{Big}_0(T_i)$\; } $W \leftarrow V/N$\; $L \leftarrow v K^\circ$\; \For{$i \in \llbracket 1,n \rrbracket$} { $L \leftarrow \texttt{Saturate}(T_i,\, L)$\; } \textbf{return} $T_{1|L},\dots, T_{n|L}, v \mod N$\; \end{algorithm} It is straightforward to turn the previous theoretical analysis into an actual algorithm that computes the space $W \simeq V/N$ and the multiplication matrices acting on it. In fact, for later use, it will not be enough to express these matrices in any $K$-basis of $W$, but we shall really need a $K^\circ$-basis of the unit ball of~$W$ (for the norm $\Vert \cdot \Vert_V$ introduced before). When $\u = (0, \ldots, 0)$, Algorithm~\ref{algo:new_mult_mat} does the job. In the description of this algorithm, we have implicitely assumed that all $K$-vector spaces and $K^\circ$-modules are equipped with distinguished bases, and consequently used the same notation for a matrix and the endomophism it represents. All operations on $K^\circ$-modules can be handled using Hermite normal forms as recalled in \S \ref{ssec:linalg}; similarly, operations on $K$-vectors spaces can be done using Smith normal forms, which permits to keep better numerical stability. If $\delta$ denotes the dimension of $V = \KX[\r]/I$ (which is also the size of the matrices $T_i$'s), Algorithm~\ref{algo:new_mult_mat} requires at most $O\tilde{~}(n \delta^3)$ operations in the base field~$K$. \subsection{Reconstruction of the Gröbner basis} \label{subsec:FGLM_for_Tate_alg} The final step in the FGLM algorithm is the computation of a Gröbner basis from the datum of the multiplication matrices. \subsubsection*{Trivial log-radii} We first address the case where $\u = (0, \ldots, 0)$, which is covered by Algorithm~\ref{algo:tate_fglm} (page \pageref{algo:tate_fglm}). This algorithm uses a routine \texttt{FGLMField} which takes as input a set of $n$ multiplication matrices over a field (together with the vector representing the monomial~$1$) and a term ordering and returns the corresponding Gröbner basis. A description of such an algorithm performing this task can be found in many places in the litterature, for example in the original article by Faugère \emph{et al.}~\cite{Faugere:1993}. \begin{algorithm}[t] \caption{\texttt{GB}$(U_1, \ldots, U_n, w, \leq)$} \label{algo:tate_fglm} \Input{$U_1,\dots,U_n$ the multiplication matrices over the unit ball of $W$,\\ $w$ the image of $1 \in \KX[\r]$ in $W$,\\ $\leq$ a monomial ordering} \Output{A Gröbner basis $G$ of the ideal $J \subset \KX[\u]$} $\bar G \leftarrow \texttt{FGLMField}(U_1 \mod \pi, \ldots, U_n \mod \pi, w \mod \pi, \leq)$\; $B \leftarrow \{m \text{ monomials not divisible by any } \LM(g), g \in \bar G\}$ $M = (M_{\star,\mu})_{\star \in \mathcal B, \mu \in B} \leftarrow \text{zero matrix}$\; \tcp{$\mathcal B$ denotes the distinguished basis of $W$ we are working with} $M_{\star, 1} \leftarrow w$\; \For{$\mu \in B \backslash \{1\}$ by increasing order for $\leq$} { write $\mu = X_i \mu'$ with $i \in \{1, \ldots, n\}$, $\mu' \in B$\; $M_{\star,\mu} \leftarrow U_i \cdot M_{\star,\mu'}$% \tcp*{product matrix-vector} } $N = (N_{\star,m})_{\star \in \mathcal B, m \in \LM(\bar G)} \leftarrow \text{zero matrix}$\; \For{$m \in \LM(\bar G)$} { write $m = X_i \mu$ with $i \in \{1, \ldots, n\}$, $\mu \in B$\; $N_{\star,m} \leftarrow U_i \cdot M_{\star,\mu} \tcp*{product matrix-vector} } $Q\leftarrow M^{-1}N$\;\label{algo:line:fglm-3} $G \leftarrow \left( m - \sum_{\mu \in B} Q_{\mu,m} \mu \right)_{m \in \LM(\bar G)}$\; \Return{$G$} \end{algorithm} \begin{prop} Algorithm \ref{algo:tate_fglm} is correct and runs in $O(n \delta^3)$ arithmetic operations where $\delta$ denotes the dimension of $W$. \end{prop} \begin{proof} We recall that we assume $\u = (0, \ldots, 0)$. Let $J = I{\cdot}\KX$ be as in Section~\ref{subsec:from_poly_to_tate_alg}. We recall that $W = \KX/J$ by definition. Let $D$ denote the unit ball of $W$. From the facts that the unit ball of $\KX$ is $\KzX$ and the norm on $W \simeq \KX/J$ is the quotient norm, we deduce that $D \simeq \KzX/ J^\circ$ with $J^\circ = J \cap \KzX$. The reductions modulo $\pi$ of the $U_i$'s are then the multiplication matrices on the quotient $\bar J = J^\circ/\pi J^\circ$. The call to \texttt{FGLMField} then returns a Gröbner basis of the ideal $\bar J$. From Theorem~\ref{theo:GB}.(2), we derive that the leading terms of a Gröbner basis of $J$ are formed by the monomials in $\LM(\bar G)$. It follows from this that $B$ is the staircase of the ideal $J$. In particular, its cardinality is the dimension of $W$, showing that the matrix $M$ is a square matrix. After the loops, the columns of $M$ (resp. of $N$) contain the coordinates of the $\mu$'s (resp. the $m$'s) in the distinguished basis $\mathcal B$ for $\mu$ varying in~$B$ (resp. for $m$ varying in~$\LT(G)$). The matrix $Q = M^{-1} N$ then contains the expression of the $m$'s in terms of linear combination of the $\mu$'s. This shows the correctness of the algorithm. The fact that the complexity is in $O(n \delta^3)$ arithmetic operations is easily checked. \end{proof} \subsubsection*{General log-radii} We now consider the general case where $\u = (u_1, \ldots, u_n) \in \mathbb Q^n$. We take $D \in \mathbb Z_{>0}$ to be a common denominator of the coordinates of $\u$ (consequently $D \cdot \u \in \mathbb Z^n$). We define the field extension $L=K[\eta]$ such that $\eta^D=\pi$ and perform the change of variables $\tilde X_i = \eta^{D u_i} X_i$. The Tate algebra $L \otimes_K \KX[\u]$ becomes isomorphic to $L\{\mathbf{\tilde X}\}$ and we can then apply all what precedes with $L \otimes_K \KX[\u]$. Inside $L\{\mathbf{\tilde X}\} \simeq L \otimes_K \KX[\u]$ sits the subset $\eta^\mathbb Z \KX[\u]$ consisting of series of the form $\eta^v f$ with $v \in \mathbb Z$ and $f \in \KX[\u]$. Let $I_L$, $J_L$, $V_L$ and $W_L$ denote the spaces deduces by $I$, $J$, $V$ and $W$ respectively by extending scalars from $K$ to $L$. Inside them, we can similarly define $\eta^\mathbb Z I$, $\eta^\mathbb Z J$, $\eta^\mathbb Z V$ and $\eta^\mathbb Z W$. We claim that then Algorithms~\ref{algo:new_mult_mat} and~\ref{algo:tate_fglm} can be adapted so that they only have to manipulate vectors lying in these subsets. Indeed: \begin{itemize}[leftmargin=3ex] \item the $\textup{Big}_0(\tilde T_i)$'s can be computed without passing to~$L$ because they are equal to the $\textup{Big}_{u_i}(T_i)$'s which are defined over $K$; \item similarly the quotient $V/N$ is defined over $K$ and then does not create any trouble; \item one checks that the Hermite normal form of a matrix whose column vectors are in $\eta^\mathbb Z V$, remains of this form; \item the column vectors of the matrices $M$ and $N$ of Algorithm~\eqref{algo:tate_fglm} all come from monomials and so have the required shape. \end{itemize} \noindent Proceeding this way, we avoid the time penalty due to scalar extension from $K$ to $L$ and keep a complexity of $O(n \delta^3)$ arithmetic operations. At the end of the day, the output of Algorithm~\ref{algo:tate_fglm} is then a Gröbner basis $G$ of $J_L$ consisting of series in $\eta^\mathbb Z \KX[\u]$. Still staying in the same subset, we can normalize these series so that they all have Gauss valuation~$0$. In this case, $G$ is not only a Gröbner basis of $J_L$ but also a Gröbner basis on the ideal $J_L^\circ = L \otimes_K J^\circ = J_L \cap \KzX[\u]$. From~\cite[Proposition 3.10]{CVV}, we deduce that $G \cap \KX[\u]$ remains a Gröbner basis of $J^\circ$ and hence of $J$. \subsubsection*{Conclusion} Combining Algorithms~\ref{algo:mult_mat_from_TateGB} (or \ref{algo:mult_mat_rec}), \ref{algo:new_mult_mat} and~\ref{algo:tate_fglm} and the above discussion for covering the case of arbitrary log-radii, we finally end up with a complete FGLM algorithm as announced in Theorem~\ref{theo:intro} in the introduction. Plugging Algorithm~\ref{algo:nonreduced} into the machine, we notice that our algorithm can also accept Gröbner bases which are nonreduced as soon as they are reduced modulo the maximal ideal. However, in this case, the complexity may grow up rapidly, depending on the shape of the input Gröbner basis. \bibliographystyle{plain}
\section{Introduction} \IEEEPARstart{M}{any} modern applications require estimating the range between two devices with very high accuracy. These applications include navigation, medical care, location-aware networks, video gaming, and virtual reality, to name a few. Consequently, range estimation has been studied, using different approaches, based on ultrasound, radio, infrared or laser signals \cite{hightower2001survey, whitehouse2007practical, yuzbacsiouglu2005improved, amann2001laser}.\par Although algorithms based on infrared or lasers have high accuracy, they are complicated and expensive \cite{rasshofer2005automotive}. Likewise, radio-signal-based range estimation approaches utilizing the received signal strength (RSS) of a Wi-Fi or a Bluetooth signal require pre-calibration and provide low accuracy \cite{cypriani2009open}. While radio-based ranging methods, through time of flight (TOF) estimation, do not require pre-calibration \cite{lee2002ranging}, they still need an accurate synchronization. In fact, owing to the high speed of light, small timing errors result in large ranging errors. Therefore, approaches based on ultra-wideband radio signals have typically a 10-20 cm accuracy \cite{narayanan2000doppler}. In contrast, ultrasound-based methods are of low cost and have high accuracy in estimating the signal TOF, thanks to the low propagation speed of ultrasound signals \cite{kushwaha2005sensor}. Indeed, one of the widely used commercial UWB positioning systems is Pozyx \cite{Pozyx} which claims up to 10 cm positioning accuracy. On the other hand, the commercially available ultrasound-based positioning system, Marvel Mind \cite{Marvel}, claims a positioning accuracy of 2 cm. Consequently, this paper considers ultrasound-based ranging. \par Despite the type of the utilized technology, ranging waveforms can be categorized into two general classes: continuous wave (CW) and pulsed. Despite that CW ranging is more susceptible to multipaths and echos, still it has many advantages over pulsed ranging. The main advantage of the CW ranging is that it maximizes the total transmitted power, because the transmitter is continuously transmitting. Moreover, the CW ranging can provide a much higher update rate, i.e. number of range estimates per second, as compared to pulsed ranging. Therefore, in this paper we are focusing on continuous range estimation \cite{skolnik1980introduction}.\par In addition to the aforementioned ranging technologies, various range estimation methods have been proposed in the literature. Although RSS-based ranging algorithms are generally simple compared to other algorithms, they suffer from low accuracy \cite{medina2012feasibility}. Conversely, phase-shift-based ranging using a single frequency signal has high accuracy. However, its application is limited to distances less than one wavelength of the signal carrier \cite{figueroa1991ultrasonic}. Using multiple frequencies allows the estimation of longer distances by calculating phase differences between the various frequencies. The authors in \cite{huang1999multiple} use a narrowband multi-frequency continuous wave (MFCW) ultrasound signal for range estimation. Nevertheless, the difference between the multiple frequencies, $\Delta f$, in the MFCW restricts the estimated range to $c/\Delta f$ where $c$ is the speed of sound. Furthermore, range estimation based on narrowband signals is very sensitive to noise, multipath, and interference. As a result, a number of range estimation systems utilizing wideband signals have been proposed to diminish the limitations of narrowband signals in TOF estimation.\par In basic TOF-based ranging systems, the peak location of the cross-correlation between the transmitted and the received signals provides an estimate of the TOF, assuming that the transmitter and the receiver are synchronized. Indeed, perfect synchronization can be achieved by sharing the same clock between the transmitter and the receiver. After that, multiplying the TOF by the propagation speed of the signal determines the range between the transmitter and the receiver. Hence, the correlation properties of the transmitted signal highly affect the accuracy of the estimated TOF. Due to their good correlation properties, Zadoff-Chu sequences are widely used for synchronization purposes. In our previous work \cite{alsharif2017zadoff}, a high accuracy TOF-based ranging system has been implemented utilizing a Zadoff-Chu-coded ultrasound signal. However, with a moving transmitter or receiver, Doppler shifts were found to severely degrade the range estimation accuracy, especially for high-speed moving devices and/or long transmitted signal.\par Range estimation of a moving target can be achieved by transmiting sine waves at multiple frequencies, followed by a frequency modulated continuous waves (FMCW) \cite{mao2016cat}. The authors in \cite{mao2016cat}, use the Fast Fourier transform (FFT) of the sine waves and the FMCW to determine the velocity and range of the moving target, respectively. The downside of this approach is the assumption of a constant velocity over the duration of the transmitted signal, which limits its application to targets with low acceleration.\par Under a low-acceleration assumption, joint maximum likelihood (ML) estimation of the target's velocity and range achieves very high accuracy \cite{kay2013fundamentals}. However, the ML approach requires a two-dimensional search which has high computational complexity \cite{closas2007maximum}, as will be shown in this paper. Furthermore, if the target has a high acceleration, an additional search dimension is required to consider the acceleration of the target.\par Another low-complexity solution to remove Doppler is to differentially encode the transmitted signal. Applying differential decoding at the receiver side removes Doppler. In \cite{han2017frequency}, the authors propose differential polyphase codes to resolve the frequency ambiguity. Another implementation of differential encoding/ decoding is demonstrated in \cite{jo2019acquisition}. In this paper, we propose a new signal design based on the idea of differential encoding.\par The main contributions of the paper are as follows. \begin{itemize} \item We propose a novel signal design, which we name Differential Zadoff-Chu, and we study its properties. \item We derive the maximum likelihood (ML) estimator and use it to estimate the TOF and Doppler shift. \item We propose a low-complexity ranging algorithm, utilizing Differential Zadoff-Chu sequences, and show that, under Doppler, it outperforms the benchmark ranging algorithms, namely the regular Zadoff-Chu ML-based, the FMCW short-time Fourier transform (STFT)-based \cite{mao2016cat}, multiple signal classification (MUSIC)-based line spectral estimation (LSE) \cite{reinhard2016general} and super-resolution radar, via $\ell_1$ minimization program \cite{reinhard2016super}. \item We experimentally evaluate the proposed ranging system in a typical indoor environment using low-cost ultrasound hardware. \end{itemize} \section{Problem Formulation} Zadoff-Chu (ZC) sequences are polyphase complex valued sequences, named after Solomon A. Zadoff and D.C. Chu \cite{frank1962phase},\cite{chu1972polyphase}. These sequences have the constant amplitude and zero auto-correlation (CAZAC) property, which allows them to provide high accuracy TOF-based range estimation of a static target, using cross-correlation \cite{alsharif2017zadoff}. However, random Doppler shifts tend to break the CAZAC property of the ZC sequences, especially for long sequences and/or high-velocity moving targets as will be shown in this section.\par Under Doppler, a wide-band signal encounters time scaling (compression and/ or expansion) proportional to the relative speed between the transmitter and the receiver. Therefore, the passband received ultrasound signal can be modeled as \cite{sharif2000computationally} \begin{align} y(t) &= \alpha(t)x\big((1+\Delta)(t-\kappa)\big)e^{i(\theta)} + n(t), \pgfkeysvalueof{/tikz/dsp/label}}{wideband} \end{align} where $x(t)$ is the passband transmitted signal, $\alpha(t)$ is the attenuation incurred by propagation, $\Delta$ is the relative Doppler shift defined as the ratio of the relative velocity $v(t)$ to the speed of sound $c$, $\kappa$ is the TOF, $\theta$ is the overall phase shift encountered by the carrier and $n(t)$ is an additive Gaussian noise, with zero mean and variance $\sigma^2$.\par The time scaling of the received signal is due to the fact that Doppler translates each frequency component by a different amount \cite{sharif2000computationally}. We propose two ranging algorithms in this paper, one is based on maximum likelihood (ML) estimation and the other is a low-complexity ranging algorithm. In the ML-based ranging, we use the baseband version of the wideband received signal model given by Equation (\ref{wideband}). Whereas in the low-complexity ranging algorithm, we approximate the received signal model using the narrowband time-delayed and Doppler shifted signal model \cite{diamant2012choosing}. To compensate for the error due to the narrowband approximation, we apply a phase shift refinement algorithm using the wideband model (\ref{wideband}). Therefore , the narrowband approximation of the received signal can be written as \begin{align*} y(t) &= \alpha(t)x(t-\kappa) e^{i(\theta + 2 \pi \nu(t) t)} + n(t), \pgfkeysvalueof{/tikz/dsp/label}}{sys_model} \end{align*} where $\nu(t)$ is the Doppler shift at time $t$. The complex envelope, $y_e(t)$, of the received signal can be obtained using an IQ demodulator. Moreover, the discrete-time version of the complex envelope of the received signal, obtained by sampling $y_e(t)$, at sampling period $T_s$, is given by \begin{align} y_e[k] &= h[k] x_e[k-\tau] + n[k] \\ &= \alpha[k]x_e[k-\tau] e^{i(\theta + 2 \pi \nu[k] k)} + n[k], \nonumber \pgfkeysvalueof{/tikz/dsp/label}}{sys_model} \end{align} where $h[k] = \alpha[k] e^{i 2 \pi \nu[k] k} $ is the channel response at discrete-time $k$ under Doppler, $x_e[k]$ is the discrete-time complex envelope of the transmitted signal, $\tau$ is the TOF normalized by $T_s$ and rounded to the nearest integer, $\nu[k]$ is the discrete-time normalized Doppler shift and $n[k]$ is a discrete-time complex additive Gaussian noise with zero mean and variance $\sigma^2$. In addition, the transmitted signal is composed of repetitions of a sequence of length $N$, where we assume that the symbols of the sequence are transmitted according to the sampling rate $f_s = 1/T_s$. Therefore, the transmitted signal is periodic and this periodicity condition is required in our ranging algorithms as will be illustrated in section \ref{ranging_algorithm}. If the target displacement over the sequence duration is less than several meters, then the change in the attenuation factor $\alpha[k]$ over the sequence duration is negligible \cite{zagzebski1996essentials}. This assumption is met in the case of this paper. Therefore, it can be assumed that $\alpha[k] = \alpha_B $ for $k = 0, 1, ..., N-1$.\par Let the complex envelope of the transmitted signal $x_e[k]$ be a ZC sequence of length $N$ which is given by \begin{equation} x_e[k] = e^{i\phi_{R}[k]}, \pgfkeysvalueof{/tikz/dsp/label}}{phase_eq_zc} \end{equation} where $\phi_{R}[k]$ is given by \begin{equation} \phi_{R}[k] = \begin{cases*} \frac{M\pi}{N}k(k+1), & if $N$ \text{is odd}, \\ \frac{M\pi k^2}{N}, & if $N$ \text{is even}, \end{cases*} \pgfkeysvalueof{/tikz/dsp/label}}{zc} \end{equation} and $M$, $0<M<N$ is coprime with $N$. It can be shown that in the noiseless case, and under a fixed (i.e. constant over the duration of the ZC sequence) Doppler shift $\nu$, the magnitude of the cross-correlation $r[n]$ between the complex envelope of the transmitted and received signal is given by \cite{alsharif2017zadoff} \begin{align} \tiny |r[n]| &\triangleq |\sum_{k=0}^{N-1}x_e^*[k]y_e[k+n]| \nonumber\\ &= |\alpha_B| \Big| \frac{e^{-i 2 \pi M(\tau-n - \frac{N \nu}{M})} - 1}{e^{-i 2 \pi \frac{M}{N}(\tau-n- \frac{N \nu}{M})} - 1}\Big| \nonumber\\ & = |\alpha_B| \Big|\frac{\sin\big(\pi M(\tau-n - \frac{N \nu}{M})\big)}{\sin\big(\pi \frac{M}{N}(\tau-n- \frac{N \nu}{M})\big)}\Big|, \;\; n = 0, 1, ..., N-1. \pgfkeysvalueof{/tikz/dsp/label}}{cc_zc_doppler} \end{align} This implies that the magnitude of the cross-correlation function has a peak whenever both the numerator and denominator are zeros, which depends on both the TOF $\tau$ and the Doppler shift $\nu$. Therefore, the location of this peak does not give the true TOF $\tau$ except when $\nu$ is zero. Actually, when $\nu$ is not zero, the location of the cross-correlation peak is shifted proportionally to the value of $\nu$. As a result, the out of phase value of the magnitude of the cross-correlation is nonzero, i.e. the Doppler shift breaks the CAZAC property of the ZC sequences. \section{Differential Zadoff-Chu Sequence and Its Properties} \pgfkeysvalueof{/tikz/dsp/label}}{DZC_CRLB_DiffCorr} To mitigate Doppler shifts and improve range estimation accuracy, we propose a new code $a[k]$, called Differential ZC (DZC), given by \begin{align} a[k] = e^{i\phi_{D}[k]},\;\; k = 0, 1, ..., N-1, \pgfkeysvalueof{/tikz/dsp/label}}{diff_zc_all} \end{align} where \begin{equation} \phi_{D}[k] = \begin{cases*} \frac{\pi M}{3 N} k (k + 1)(k - 1), & for odd $N$,\\ \frac{\pi M}{3 N}k(k-\frac{1}{2})(k-1), & for even $N$, \end{cases*} \pgfkeysvalueof{/tikz/dsp/label}}{phase_eq_dzc} \end{equation} and $M$, $0<M<N$, is coprime with $N$. The proposed sequences are named Differential Zadoff-Chu sequences because they are derived based on differential sliding correlation defined in section (\ref{Robustness}). As we show in Appendix \ref{App_Period}, Differential ZC sequences are periodic, with period $N$ if $N$ is odd and not divisible by 3, $3N$ if $N$ is odd and divisible by 3, $4N$ if $N$ is even and either $(2N - 1)$ or $(N-1)$ is divisible by 3, and $12 N$ otherwise.\par We claim that under the assumption of a high symbol rate, i.e. number of symbols per second, DZC sequences almost preserve the CAZAC property even in the presence of random Doppler shifts. Moreover, we claim that for any sequence length, $N$, using coherent detection, DZC sequences provide better range estimation accuracy compared to the regular ZC sequences.\par To prove the first claim, we utilize a differential sliding correlation approach and show that, under a high symbol rate, DZC sequences almost preserve the CAZAC property, even if there are random Doppler shifts. To prove the second claim, we evaluate the mean square error (MSE) for estimating the range and velocity of a moving target for regular and differential ZC sequences, both by simulation and real experiments. \subsection{Robustness to Doppler} \pgfkeysvalueof{/tikz/dsp/label}}{Robustness} In this subsection, we will show that DZC codes maintain the CAZAC property even under random Doppler shifts by using a differential sliding correlation, defined as \begin{align} r_D[n,m] &= \sum_{k = 0}^{N - 1} x_e^*[k]x_e[k+m] y_e[k + n]y_e^*[k + m + n], \pgfkeysvalueof{/tikz/dsp/label}}{diff_slide_corr} \end{align} for $n = 0, 1, ..., N-1$, where $m$ is the differential correlation step. DZC sequences are designed such that for any differential correlation step $m$, the product $x_e^*[k]x_e[k+m]$ is a regular ZC sequence. Therefore, we end up correlating the differentially received samples with a regular ZC sequence. Here we are applying circular differential sliding correlation where $y_e[k+n+N]y_e^*[k+m+n+N] = y_e[k+n]y_e^*[k+m+n]$. The complex envelope of the received signal is cut into frames each of length $N$. The differentially decoded frame at instant $k$ is obtained by multiplying the frame at instant $k$ with the conjugate of the frame that starts at $k + m$.\par Now, consider an odd-length DZC. In the noiseless case and with $m = 1$, using (\ref{sys_model}) and (\ref{phase_eq_dzc}) we can rewrite the equation above as \begin{align*} r_D[n,m=1] &= \sum_{k = 0}^{N - 1} h^*[k]h[k+1] e^{-i\frac{\pi M}{N}(k-\tau+n)(k-\tau+n+1)} \nonumber \\ & e^{i\frac{\pi M}{N}k(k+1)}. \end{align*} Under a high symbol rate with respect to Doppler spread, it can be assumed that $h[k] \approx h[k+1]$, since for practical Doppler shifts, the channel will not change too much between two consecutive samples and hence $h^*[k]h[k+1] \approx \alpha_B^2, \;\;\text{for any integer }k$. As an example, in our setup the symbol duration is around $0.26$ msec. Therefore, even with an acceleration of $10$ m/$\text{s}^2$, the change in velocity over one symbol duration will be $2.6$ mm/s. This velocity change will shift a $20$ kHz signal by around $0.15$ Hz which is negligible. Consequently, choosing $m = 1$ removes the highest amount of Doppler residual.\\ Considering the noiseless case to simplify the analysis, the differential sliding correlation becomes \begin{align} r_D[n,m=1] &\approx \sum_{k = 0}^{N - 1} \alpha_B^2 e^{i\frac{\pi M}{N}k(k+1)} e^{-i\frac{\pi M}{N}(k-\tau+n)(k-\tau+n+1) }\\ &= \alpha_B^2 e^{-i \frac{\pi M}{N} (\tau-n)(\tau-n+1)}\sum_{k = 0}^{N - 1} e^{i\frac{\pi M}{N}2k(\tau-n)} \\ &= \alpha_B^2 e^{-i \frac{\pi M}{N} (\tau-n)(\tau-n+1)}\frac{e^{i2\pi M(\tau-n)}-1}{e^{i2\pi \frac{M}{N} (\tau-n)}-1} \pgfkeysvalueof{/tikz/dsp/label}}{diff_slide_corr_even} \end{align} Taking the absolute value finally yields the desired result \begin{align} \tiny |r_D[n,m=1]| &= \begin{cases*} 0, & if $ n \neq \tau $,\\ |\alpha_B|^2N, & if $ n = \tau$. \end{cases*} \pgfkeysvalueof{/tikz/dsp/label}}{Diff_cc} \end{align} Similarly, we can show that an even-length DZC sequence has a differential sliding correlation also given by (\ref{Diff_cc}). This shows that the out of phase value of the magnitude of the differential sliding correlation is zero, hence the proposed DZC sequence maintains the CAZAC property, even under random Doppler shifts. Lastly, we would like to highlight that applying the differential sliding correlation to ZC sequences, with odd or even length $N$, will give a constant magnitude for all lags, i.e. $|r_D[n,m=1]| = N \; \text{for all }n$. Therefore, applying differential correlation to ZC sequences does not provide a way to estimate the range of the target. \par Finally, we would like to illustrate the ability of the proposed DZC codes and differential correlation to estimate the ranges to multiple targets. To do so, each target transmits a unique DZC code of the same length (a DZC code with the same $N$ but different value of $M$). We address three situations where we have three transmitters placed at three different distances. Therefore, the received signal coming from each transmitter is delayed by a different TOF ($\tau_1 = 200$, $\tau_2 = 190$ and $\tau_3 = 210$). In the first situation, the three transmitters transmit the same DZC code. In Figure \ref{corr_prop_DZC_ZC} (a), the received signal is composed of three similar DZC codes ($M_1 = M_2 = M_3 = 1$) and we notice that the differential correlation gives three peaks located at the respective TOFs. This means that the three transmitted signals are very correlated, as expected, since they have the same DZC code. In the second situation, each transmitter transmits a DZC code with the same $N$ but different value of $M$. Figure \ref{corr_prop_DZC_ZC} (b) shows the correlation between a DZC code with $M=1$ and the received signal which is composed of three different DZC codes ($M_1 = 1$, $M_2 = 5$, and $M_3 = 9$). Due to the orthogonality between the codes, the correlation vector has a single peak located at the TOF of the DZC code with $M_1 = 1$. In the last situation, one transmitter transmits a DZC code and the other two transmitters transmit a ZC code. Figure \ref{corr_prop_DZC_ZC} (c) shows the correlation vector between a DZC code with $M=1$ the received signal which is composed of a DZC code with $M_1 = 1$ and two ZC codes with $M_2 = 5$ and $M_3 = 9$. Again, due to orthogonality, the correlation vector has a single peak located at the TOF of the first DZC code. Therefore, there is orthogonality between different DZC codes and between a DZC code and a ZC code. Consequently, by assigning each user a unique DZC code, we can perform multi-target range estimation. \begin{figure}[h!] \centering \begin{subfigure}[t]{0.50\textwidth} \centering \includegraphics[width=8cm, height = 3 cm]{same_code_v2.eps} \caption{Three DZC codes with $M_1 = 1$, $M_2 = 1$ and $M_3 = 1$} \end{subfigure}% \hfill \begin{subfigure}[t]{0.50\textwidth} \centering \includegraphics[width=8cm, height = 3 cm]{different_code_v2.eps} \caption{Three DZC codes with $M_1 = 1$, $M_2 = 5$ and $M_3 = 9$} \end{subfigure} \hfill \begin{subfigure}[t]{0.50\textwidth} \centering \includegraphics[width=8cm, height = 3 cm]{ZC_DZC_v3.eps} \caption{One DZC code with $M_1 = 1$ and two ZC codes with $M_2 = 5$ and $M_3 = 9$} \end{subfigure} \caption{Differential correlation between a DZC with $M=1$ and the received signal Rx composed of addition of three codes delayed by $\tau_1 = 200$, $\tau_2 = 190$ and $\tau_3 = 210$} \pgfkeysvalueof{/tikz/dsp/label}}{corr_prop_DZC_ZC} \end{figure} \section{Range Estimation Algorithms} \pgfkeysvalueof{/tikz/dsp/label}}{ranging_algorithm} We will derive the maximum likelihood (ML) estimator, for both ZC and DZC sequences, in section A, which gives us a benchmark. We will then derive a low-complexity algorithm based on DZC in section B. While it has inferior performance to the ML applied on the DZC, it still outperforms the ML estimator applied on the ZC. Moreover, the low complexity ranging algorithm accurately estimates the range even under random Doppler shifts, while the ML-based ranging requires a fixed Doppler shift over the duration of the transmitted sequence.\par Finally, we will propose a refinement algorithm, based on phase shift estimation, to compensate for the loss with respect to the performance of the ML estimator. \subsection{Maximum Likelihood Estimator} Under a fixed Doppler shift over the duration of the transmitted sequence, the complex envelope of the received signal can be written as \begin{equation} y_e(t)=x_e\big((1+\Delta)(t-\kappa)\big) e^{i(\theta + 2 \pi \nu t)} + n(t), \pgfkeysvalueof{/tikz/dsp/label}}{rx_aprox} \end{equation} where $\nu = \frac{f_c v}{c}$ is the carrier frequency offset, $f_c$ is the carrier frequency of the transmitted signal and $v$ is the velocity of the target over the duration of the transmitted signal. The probability of the received sequence, whether regular or differential ZC, is given by \begin{align} p(\mathbf{y}| \tau,\theta,\nu) &= \prod_{k=0}^{N-1} p(y_e[k]| \tau,\theta,\nu) \nonumber \\ &= \frac{1}{(\pi \sigma^2)^N} \exp\big\{-\frac{1}{\sigma^2} \sum_{k=0}^{N-1}|y_e[k] \nonumber \\ &- x_e[(1+\Delta)(k-\tau)] e^{j(\theta + 2 \pi \nu k)} |^2\big\}. \pgfkeysvalueof{/tikz/dsp/label}}{likelihood_fcn} \end{align}\par The phase $\theta$ changes too much from one measurement to the other and generally a precise \textit{priori} knowledge about it cannot be obtained or even processed easily. The best way is to assume the worst case scenario of a totally unknown phase with a uniform distribution over $ [0,2\pi)$. Averaging over $\theta$ will enable us to focus on $\tau$ and $\nu$, on which conditioning remains after averaging. Therefore, the PDF in (\ref{likelihood_fcn}) becomes \vspace{-0.05 cm} \begin{small} \begin{align} p(\mathbf{y}| \tau, \nu) &= \int_{0}^{2 \pi} p(\mathbf{y}| \tau,\theta,\nu) p(\theta) d\theta \nonumber \\ &= \int_{0}^{2 \pi}\!\!\!\!\!\! \frac{1}{2 \pi( \pi \sigma^2)^{N}} \exp\{ \frac{-1}{\sigma^2} \sum_{k=0}^{N-1} |y_e[k] - x_e[(1+\Delta)(k-\tau)] \nonumber\\ & e^{j \theta} e^{j 2 \pi \nu k}|^2 \} d \theta. \pgfkeysvalueof{/tikz/dsp/label}}{intg} \end{align} \end{small} By expanding the term inside the summation in Equation (\ref{intg}), the likelihood function can be written as \begin{small} \begin{align} p(\mathbf{y}|\tau,\nu) &= \frac{1}{2\pi( \pi \sigma^2)^N} \exp \{ \frac{-1}{\sigma^2} \sum_{k=0}^{N-1} |y_e[k]|^2 + |x_e[(1+\Delta)(k-\tau)]|^2 \} \nonumber \\ &\int_{0}^{2 \pi} \exp\{ \frac{1}{\sigma^2} \sum_{k=0}^{N-1} 2 \Re \{ y_e^*[k] x_e[(1+\Delta)(k-\tau)] e^{j \theta} e^{j 2 \pi \nu k} \} d \theta \nonumber \\ &= c_{\pi} e^{\eta(\tau)}\mkern-10mu \int_{0}^{2 \pi}\mkern-18mu \exp \{ \frac{1}{\sigma^2}(\xi(\tau,\nu)e^{j \theta}\mkern-7mu+ \xi^*(\tau,\nu)e^{-j \theta}) \} d\theta, \pgfkeysvalueof{/tikz/dsp/label}}{pdf_2} \end{align} \end{small} where \begin{align} c_{\pi} &= \frac{1}{2 \pi( \pi \sigma^2)^N} \\ \xi (\tau,\nu) &= \sum_{k=0}^{N-1} y_e^*[k] x_e[(1+\Delta)(k-\tau)]e^{j 2 \pi \nu k}\\ \eta(\tau) &= -\frac{1}{ \sigma^2} \sum_{k=0}^{N-1} \big(|y_e[k]|^2 + |x_e[(1+\Delta)(k-\tau)]|^2\big). \end{align} Alternatively, we can write (\ref{pdf_2}) as \begin{small} \begin{align} p(\mathbf{y}|\tau,\nu) &= c_{\pi} e^{\eta(\tau)}\mkern-10mu \int_{0}^{2 \pi} \mkern-18mu \exp \{ \frac{2}{\sigma^2}(|\xi(\tau,\nu)| \cos(\theta + \angle \xi(\tau,\nu)) \} d\theta \\ &= c_{\pi} e^{\eta(\tau)} \int_{0}^{2 \pi} \exp \{ \frac{2}{\sigma^2}(|\xi(\tau,\nu)| \cos(\theta) \} d\theta \pgfkeysvalueof{/tikz/dsp/label}}{cos_reduc} \\ &= 2 \pi c_{\pi} e^{\eta(\tau)} I_0 \Big(\frac{2|\xi(\tau,\nu)|}{\sigma^2} \Big), \end{align} \end{small} where (\ref{cos_reduc}) follows from the fact that the added angle $\angle \xi(\tau,\nu)$ has no effect on the integration of the cosine over its period. Here, $I_0 (.)$ is the modified Bessel function of the first kind and zero order. The modified Bessel function can be approximated as \cite{abramowitz1965handbook} \begin{equation} I_0(z) \approx \frac{e^z}{\sqrt{2 \pi z}}, \; \text{for large $z$}. \end{equation} Therefore, under a high SNR scenario, the likelihood function can be approximated as \begin{equation} p(\mathbf{y}|\tau,\nu) \approx 2 \pi c_{\pi} e^{\eta(\tau)} \frac{\exp \{\frac{2|\xi(\tau,\nu)|}{\sigma^2} \}}{\sqrt{\frac{4 \pi |\xi(\tau,\nu)|}{\sigma^2}}}, \end{equation}\par Maximizing the likelihood function is equivalent to maximizing the log-likelihood function which, up to a constant, is given by \begin{align} \ln p(\mathbf{y}|\tau,\nu) &\approx \frac{-1}{\sigma^2} \sum_{k=0}^{N-1} \big( |y_e[k]|^2 + |x_e[(1+\Delta)(k-\tau)]|^2 \big) \nonumber \\ & + \frac{2}{\sigma^2} |\sum_{k=0}^{N-1} y_e^*[k] x_e[(1+\Delta)(k-\tau)]e^{j 2 \pi \nu k}| \nonumber \\ & - \frac{1}{2}\ln(\frac{ |\sum_{k=0}^{N-1} y_e^*[k] x_e[(1+\Delta)(k-\tau)]e^{j 2 \pi \nu k}|}{\sigma^2}), \pgfkeysvalueof{/tikz/dsp/label}}{log_like} \end{align} where we replaced $c_{\pi}$, $\eta(\tau)$, $\xi(\tau,\nu)$ by their expressions. In the high SNR scenario, the last term in Equation (\ref{log_like}) is negligible and the log-likelihood function reduces to \begin{align} \ln p(\mathbf{y}|\tau,\nu) &\approx \frac{-1}{\sigma^2} \sum_{k=0}^{N-1} \big( |y_e[k]|^2 + |x_e[(1+\Delta)(k-\tau)]|^2 \big) \nonumber \\ &+ \frac{2}{\sigma^2} |\sum_{k=0}^{N-1} y_e^*[k] x_e[(1+\Delta)(k-\tau)]e^{j 2 \pi \nu k}|. \pgfkeysvalueof{/tikz/dsp/label}}{log_like_simple} \end{align} The first term can be ignored since the signal itself has a constant amplitude and does not affect the maximization. Therefore, maximizing the log-likelihood function can be achieved by maximizing the following metric \begin{align} (\hat{\tau}_{\text{ML}}, \hat{\nu}_{\text{ML}}) &= \text{arg}\mkern-3mu\max_{(\widetilde{\tau}, \widetilde{\nu})} M_{\widetilde{\tau}, \widetilde{\nu}} \\ M_{\widetilde{\tau}, \widetilde{\nu}} &= |\sum^{N-1}_{k=0} y_e[k] x_e^*[(1+\widetilde{\Delta})(k-\widetilde{\tau})]e^{-j 2\pi \widetilde{\nu}k}|, \pgfkeysvalueof{/tikz/dsp/label}}{metric} \end{align} where $x_e[(1+\widetilde{\Delta})(k-\widetilde{\tau})]$ is obtained by re-sampling $x_e[k-\widetilde{\tau}]$ to the new sampling frequency $f'_s = (1+\widetilde{\Delta}) f_s$, with $\widetilde{\Delta} = \widetilde{v}/c$. \par The argument of the module in (\ref{metric}) is known in pulsed radar and sonar signal processing as the ambiguity function, because it might have several maxima which causes ambiguity in estimating $\tau$ and $\nu$. To illustrate this ambiguity, consider a transmitted odd-length ZC sequence and let us focus on the noiseless case {with a negligible time scaling, i.e. $\Delta \ll 1$}. Then, using (\ref{sys_model}) and (\ref{zc}), the metric (\ref{metric}) becomes \begin{align} M_{\widetilde{\tau},\widetilde{\nu}} &= |e^{j\pi\frac{M}{N}(\tau^2+\tau-\widetilde{\tau}^2-\widetilde{\tau})}|\big|\sum_{k=0}^{N-1}e^{j2\pi\frac{M}{N}k(\widetilde{\tau} - \tau + N \frac{\nu - \widetilde{\nu}}{M})}\big| \nonumber \\ &= \big| \frac{e^{j 2\pi M ( \widetilde{\tau} - \tau + N \frac{\nu-\widetilde{\nu}}{M})}-1}{e^{j 2\pi \frac{M}{N} ( \widetilde{\tau} - \tau + N \frac{\nu - \widetilde{\nu}}{M})}-1} \big|, \pgfkeysvalueof{/tikz/dsp/label}}{metric_ambig} \end{align} where $\tau$ and $\nu$ are the true TOF and true Doppler shift, respectively. The metric in (\ref{metric_ambig}) has a maximum whenever the quantity $(\widetilde{\tau} - \tau + N \frac{\nu - \widetilde{\nu}}{M})$ is an integer multiple of $N$, which causes ambiguity in determining the TOF. Figure \ref{ambig_diff_zc} (a) shows the ambiguity function which has several maxima. To avoid this ambiguity we limit our search over $\tau$ and $\nu$ to a window that includes a single maximum. Since the TOF hypothesis $\widetilde{\tau}$ is in $[0,N-1]$, the difference between the TOF hypothesis and the true TOF cannot exceed $N-1$. For this reason we estimate the Doppler shift at time $i$ over a window centered at the previous Doppler shift estimate $\hat{\nu}_{i-1}$ and has a width equal to $M$, i.e. $\widetilde{\nu} \in (\hat{\nu}_{i-1} - \frac{M}{2}:\nu_s:\hat{\nu}_{i-1} + \frac{M}{2})$, where the search step $\nu_s$ is chosen small enough to detect the Doppler shift with high accuracy. For this estimation to be accurate, we need to know the initial Doppler shift $\nu_0$. Also, the current true Doppler shift $\nu_i$ should not differ from the previous Doppler shift $\nu_{i-1}$ by more than $\frac{M}{2}$. Assuming the target is static initially, makes the initial Doppler shift, $\nu_0$, equals to zero. To guarantee that the difference between the current and the previous Doppler shift is less than $\frac{M}{2}$, we utilize the periodicity of ZC codes as will be shown next.\par Unlike regular ZC, using the proposed DZC sequences removes the ambiguity in estimating the TOF and Doppler shift. To illustrate this, consider an odd-length DZC sequence and let's focus again on the noiseless case, then using Equations (\ref{sys_model}), and (\ref{phase_eq_dzc}) the metric (\ref{metric}) becomes \begin{align} M_{\widetilde{\tau},\widetilde{\nu}} &= \big|\sum_{k=1}^{N}e^{j\pi\frac{M}{N}k\big((\widetilde{\tau} - \tau)k + (\tau^2 - \widetilde{\tau}^2) + \frac{2N(\nu - \widetilde{\nu})}{M}\big)}\big|. \pgfkeysvalueof{/tikz/dsp/label}}{metric_ambig_Diff} \end{align} This metric has maxima that occurs at $\tau = \widetilde{\tau}$ and $(\nu - \widetilde{\nu})$ an integer. Therefore, the ambiguity is removed over $\tau$ and there will be no need for the assumption of known initial Doppler shift to unambiguously estimate the TOF. Figure \ref{ambig_diff_zc} shows the ambiguity functions for the regular ZC and DZC sequence. \begin{figure}[h!] \centering \begin{subfigure}{0.245\textwidth} \centering \includegraphics[width = 1.7in, height=1.7in]{amb_zc_v5_2D_colorbar} \caption{Regular Zadoff-Chu} \end{subfigure}% \begin{subfigure}{0.245\textwidth} \centering \includegraphics[width = 1.7in, height=1.7in]{amb_dzc_v5_2D_colorbar} \caption{Differential Zadoff-Chu} \end{subfigure} \caption{Ambiguity function with $N = 101$, $\widetilde{\tau} = 50$ symbols, $M = 1$, and $\widetilde{\nu} = 0.01$} \pgfkeysvalueof{/tikz/dsp/label}}{ambig_diff_zc} \end{figure} \par \subsection{Reduced complexity ranging algorithm} The ML estimator has the lowest variance for all possible values of the estimation parameters, but it is computationally expensive. Therefore, we propose a reduced complexity range estimation algorithm that makes use of the CAZAC property by utilizing the proposed DZC sequences.\par For repetitive and periodic transmission, the DZC sequence is repeated $P$ times. The received signal is processed using a sliding window with width $N$ to estimate the TOF and the Doppler shift. The step $w_s$ by which we move the window determines the update rate of the system, $f_u$, which is the number of estimates per second. Setting $w_s = 1$ gives the highest possible update rate. Figure \ref{Proc_cicrular} illustrates the processing of the received sequences, where the sliding window is applied with a step of one symbol. \begin{figure}[h!] \centering \includegraphics[width = 3.5in, height=2.2in]{p_ill4.pdf} \caption{Processing the received sequences} \pgfkeysvalueof{/tikz/dsp/label}}{Proc_cicrular} \end{figure} \par Consider the $(i+1)^{\text{th}}$ window of the complex envelope of the received signal, applying differential sliding correlation gives \begin{small} \begin{align} r_D[n,m] &= \sum_{k = 0}^{N - 1} x_e^*[k]_i x_e[k+m]_i y_e[k + n+i]y_e^*[k + m + n + i], \end{align} \end{small} where $x_e[k]_i$ is a circularly shifted version of the transmitted DZC sequence with a phase function $\phi_D[k]_i = \phi_D[k+i \;(\text{mod}\;N)]$, $y_e[k]$ is the received sequence, and $N$ is the period of the sequence. The index $i+1$, where $i \in [0,PN-1]$ is the index of the range estimate, and $PN$ is the total number of range estimates . Therefore, with the circular shift differential sliding correlation, each DZC sequence of length $N$ gives us $N$ TOF estimates. As was shown in (\ref{diff_slide_corr})-(\ref{diff_slide_corr_even}), taking the absolute value of the differential sliding correlation gives \begin{align} \tiny |r_D[n,1]| &= \begin{cases*} 0, & if $ n \neq \tau $\\ |\alpha_B|^2N, & if $ n = \tau$. \end{cases*} \end{align} Therefore, the location of the maximum of $|r_D[n]|$ gives $\hat{\tau}_{\text{corr}}$, which we call the initial TOF estimate. Multiplying the initial TOF estimate by the speed of sound gives the initial range estimate $\hat{d}_{\text{corr}}$. The initial range estimates are accurate up to a sample resolution. If the true range is not an integer multiple of the sample resolution, then the fractional range will be rounded to the nearest sample. This rounding process causes errors in estimating the range. Therefore, in order to achieve sub-sample resolution and to improve the ranging immunity to noise, we estimate the phase shift between the transmitted and received DZC sequence and use it to refine the initial range estimates. However, in order to do that we need first to estimate and compensate for Doppler. \par \subsubsection{Doppler Estimation and Compensation} To estimate Doppler, we need to estimate the velocity over segments of the received sequence. The segment length, $N_s$, which is a factor of the sequence length, $N$, is chosen such that the change in velocity is negligible over the duration of the segment. The number of range estimates per segment is given by $L = \frac{N}{N_s}$. Differentiating these $L$ range estimates gives $L$ instantaneous velocity estimates per segment. Averaging the velocity estimates and dividing by the speed of sound $c$ gives the relative Doppler shift $\hat{\Delta}$ of that segment.\par The frequency offset, caused by the Doppler, translates into time scaling (compression or expansion) of the signal waveform \cite{sharif2000computationally}, such that \begin{equation} y(k T_s) = x(k(1 + \Delta)T_s), \end{equation} where $x(t)$ and $y(t)$ are the transmitted and the received signal respectively. Inverse time scaling the received signal, using the estimated relative Doppler shift $\hat{\Delta}$, compresses or expands the signal, and therefore removes the frequency offset. This is equivalent to re-sampling the bandpass signal by $1 + \hat{\Delta}$, leading to \begin{equation} x(k T_s) = y\big((\frac{k}{1 + \hat{\Delta}})T_s\big). \end{equation}\par The frequency offset estimation and compensation algorithm is implemented in two steps, as shown in Figure \ref{dopp_est_com}; first we estimate the relative Doppler shift, $\Delta$, using the initial range estimates. Then, we re-sample the segments of the received signal to the new sampling frequency $f'_s = (1 + \hat{\Delta}) f_s$. Figure \ref{before_after_dop} shows the transmitted and the received signals spectra before and after frequency offset compensation. \begin{figure}[h!] \center \begin{tikzpicture}[thin,scale=0.8, every node/.style={scale=0.8}] \matrix[row sep=3mm, column sep=7mm] { \node[coordinate] (m00){}; & \node[dspnodeopen,dsp/label=left] (m01){$\hat{d}_{\text{cross}}(.)$}; & \node[dspsquare] (m02){$\frac{d(.)}{dt}$}; & \node[dspsquare] (m03){$\frac{v+c}{c}$}; & \node[coordinate] (m05){}; \\ \node[coordinate] (m10){}; & \node[coordinate] (m11){}; & \node[coordinate] (m12){}; & \node[coordinate] (m13){}; & \node[coordinate] (m14){}; \\ \node[coordinate] (m20){}; & \node[coordinate] (m21){}; & \node[dspnodeopen,dsp/label=left] (m22){$y(kT_s)$}; & \node[dspsquare] (m23){re-sampler}; & \node[dspnodeopen,dsp/label=right] (m24){$y(\frac{k}{1 + \hat{\Delta}}T_s)$};\\ }; \draw[dspconn] (m01) -- (m02); \draw[dspconn] (m02) -- node[midway,above] {$v(.)$} (m03); \draw[dspconn] (m03) -- node[midway,right] {$\hat{\Delta}$}(m23); \draw[dspconn] (m22) -- (m23) ; \draw[dspconn] (m23) -- (m24); \end{tikzpicture} \caption{Frequency offset estimation and compensation method} \pgfkeysvalueof{/tikz/dsp/label}}{dopp_est_com} \end{figure} \begin{figure}[h!] \centering \begin{subfigure}[t]{0.50\textwidth} \centering \includegraphics[width=9cm, height = 5 cm]{Doppler_no_com_b_414_seq_64_v4.eps} \caption{} \end{subfigure}% \hfill \begin{subfigure}[t]{0.50\textwidth} \centering \includegraphics[width=9cm, height = 5 cm]{Doppler_com_b_414_seq_64_v4.eps} \caption{} \end{subfigure} \caption{The transmitted and the received signals spectra (a) before and (b) after Frequency Offset Compensation} \pgfkeysvalueof{/tikz/dsp/label}}{before_after_dop} \end{figure} \subsubsection{Phase Shift Estimation} After correcting the frequency offset of the received signal, we can refine the initial range estimates $\hat{d}_{\text{corr}}$ to a sub-sample resolution by estimating the phase shift between the transmitted and the corrected received signal.\par Let the discrete-time version of the received signal after Doppler compensation be \begin{equation} y[k] = x[ k - \nint{\frac{d}{c}}] + n[k], \pgfkeysvalueof{/tikz/dsp/label}}{ph_1} \end{equation} where $\nint{.}$ denotes the operation of rounding to the nearest integer. The circularly shifted version of the transmitted signal with a circular shift of $\nint{\frac{\hat{d}_{\text{corr}}}{c}}$ is given by \begin{equation} z[k] = x[ k - \nint{\frac{\hat{d}_{\text{corr}}}{c}}]. \pgfkeysvalueof{/tikz/dsp/label}}{ph_2} \end{equation} The phase shift between $y[k]$ and $z[k]$ at the $m^{\text{th}}$ frequency bin $\omega_m$ is given by \cite{saad2011robust} \begin{align} \hat{\phi}_m &= \text{ang}\Big(Z(\omega_m) Y^*(\omega_m)\Big) \\ &= \omega_m \tau_\phi + \epsilon_m, \pgfkeysvalueof{/tikz/dsp/label}}{ph_3} \end{align} where $Z(\omega)$ and $Y(\omega)$ are the discrete Fourier transforms of $z[k]$ and $y[k]$ respectively, $*$ denotes the complex conjugation operation, $\tau_\phi$ is the sub-sample delay, and $\epsilon_m$ is the error in the estimated phase due to noise. Dividing the estimated phase shift $\hat{\phi}_m$ by the associated frequency bin $\omega_m$ and multiplying it by the speed of sound $c$ gives the estimated range refinement $\hat{\Delta}d_m$.\par Since the DZC sequences have frequencies that vary with time, it is required to estimate the phase shift associated with each of these frequencies. Therefore, we determine the valid frequency bins of the received signal based on a particular threshold value. This value is decided experimentally to be 0.5 of the maximum of $Z(\omega)$. All frequency bins that have components higher than this threshold are considered valid frequencies. The estimated range refinement $\hat{\Delta}d$ is the average of $\hat{\Delta}d_m$ for all valid frequency bins \begin{equation} \hat{\Delta}d = \frac{\Sigma^{M-1}_{m=0} \hat{\Delta}d_m}{M}, \pgfkeysvalueof{/tikz/dsp/label}}{ph_4} \end{equation} where $M$ is the number of the valid frequency bins. Finally, the refined range is given by \begin{equation} \hat{d} = \hat{d}_{\text{corr}} + \hat{\Delta} d. \pgfkeysvalueof{/tikz/dsp/label}}{ph_5} \end{equation} \par \subsubsection{Minimum Refinement Variance Search} Since the phase information is limited to $\pm \pi$, the range refinement $\Delta d$ is confined to one wavelength of the transmitted signal. Therefore, the phase shift algorithm fails when the absolute value of the error is larger than $\lambda_{\text{max}}/2$, where $\lambda_{\text{max}}$ is the maximum wavelength of the signal, which might happen in low SNR scenarios. To correct the initial range estimates to within one wavelength, a minimum refinement variance search algorithm is applied. This algorithm calculates the variance in the estimated refinement $\hat{\Delta}d_m$ over the valid frequency bins, at different range candidates. \par Let $z_i[k]$ be the circularly shifted version of $z[k]$ where the index $i$ represents the amount by which we shift $z[k]$. Each circular shift of $z[k]$ represents a range candidate, where the range candidate associated with zero cyclic shift is $\hat{d}_\text{corr}$. Using $z_i[k]$ instead of $z[k]$ in (\ref{ph_1})-(\ref{ph_4}) gives the estimated range refinement $\hat{\Delta}d_i$ for each range candidate. The refinement variance $V_i$ associated with the $i^{\text{th}}$ range candidate is given by \begin{equation} V_i = \frac{\Sigma^{M-1}_{m = 0}(\hat{\Delta} d_i - \hat{\Delta} d_m )^2}{M}. \pgfkeysvalueof{/tikz/dsp/label}}{var_1} \end{equation} When the absolute difference $|d-\hat{d}_{\text{corr}}|$ is less than $\lambda_{\text{max}}/2$, the estimated range refinements $\hat{\Delta} d_m$ will be consistent over all the valid frequency bins which results in low variance $V_i$. In contrast, when the difference $|d-\hat{d}_{\text{corr}}|$ is larger than $\lambda_{\text{max}}/2$, the estimated range refinements $\hat{\Delta}d_m$ will fluctuate over the valid frequency bins which produces high variance $V_i$. The proposed method estimates the refinement variance $V_i$ at different range candidates. The range candidate that has the minimum refinement variance over the valid frequency bins is chosen as the correct range estimate. Figure \ref{var_phase2} shows refinement variance $V_i$ for a window of 200 range candidates before and after compensating for the frequency offsets under low SNR (-10 dB). The initial range estimate $\hat{d}_{\text{corr}}$ has an error of 6 samples,hence the location of the minimum variance is at -6. Therefore, the minimum variance search algorithm enables us to correct the initial range to within one wavelength of the signal. \begin{figure}[h!] \centering \begin{subfigure}[t]{0.50\textwidth} \centering \includegraphics[width=9cm, height = 4.0 cm]{var_cand_bef_v3.eps} \caption{Before Doppler compensation} \end{subfigure}% \qquad \begin{subfigure}[t]{0.50\textwidth} \centering \includegraphics[width=9cm, height = 4.0 cm]{var_cand_min_10db_v3.eps} \caption{After Doppler compensation} \end{subfigure}% \caption{Refinement variance $V$ for 200 range candidates where the true value is at -6} \pgfkeysvalueof{/tikz/dsp/label}}{var_phase2} \end{figure} Whether we use the full fledged ML receiver or its high SNR equivalent correlation, the proposed algorithm has a much lower complexity compared. While the performance of the proposed algorithm is slightly degraded compared to the DZC ML estimator, it still outperforms the ZC ML estimator. \section{Experimental Setup} This section describes the experimental setup and the hardware used to test and evaluate the proposed system. We utilized IQ modulation to transmit the complex signals. In IQ modulation, the real part of the signal is modulated using a cosine wave and the imaginary part is modulated using a sine wave. The transmitter (Tx) used in this setup is a Pioneer TS-T110 tweeter which has a bandwidth of $7$ kHz with a central frequency of $20$ kHz Figure \ref{tx_rx}(a). The receiver (Rx) is a microphone on a Printed Circuit Board (PCB) Figure \ref{tx_rx}(b). XLR connectors link the transmitter and the receiver to the PC through a sound card (E44 Express) that provides a sampling rate up to $192$ kHz. The data is recorded as .wav files during experiments and saved in the PC to be processed off-line. The experiments are implemented in a typical indoor environment with dimensions $1000$ cm X $800$ cm X $400$ cm. The speed of sound is assumed to be constant during the experiments ($345.664$ m/s) due to the negligible changes in temperature and humidity. \begin{figure}[h!] \centering \begin{subfigure}[t]{0.20\textwidth} \centering \includegraphics[width=3.5cm, height = 3.5 cm]{tx.pdf} \caption{Pioneer TS-T110 tweeter} \end{subfigure}% ~ \begin{subfigure}[t]{0.20\textwidth} \centering \includegraphics[width=4.5cm, height = 3.5cm]{rx_kit_3.pdf} \caption{Microphones array on a PCB} \end{subfigure} \caption{Tx and Rx} \pgfkeysvalueof{/tikz/dsp/label}}{tx_rx} \end{figure} An infrared tracking system (OptiTrack), which gives the ground truth with $0.1$ mm 3D accuracy and a maximum update rate of $250$ Hz \cite{OPTR}, provides a benchmark for evaluating the performance of the proposed system . It uses a set of infrared cameras (up to sixteen cameras) to keep track of small spheres coated with retro-reflective film, thus providing accurate 3D location and orientation. Figure \ref{ir_target} shows the target that is tracked by the IR cameras with the transmitter attached to it. Figure \ref{exp_set} shows the experimental setup. \begin{figure}[h!] \center \includegraphics[width=7.5cm, height = 4 cm]{spheres.pdf} \caption{The transmitter attached to the target object} \pgfkeysvalueof{/tikz/dsp/label}}{ir_target} \end{figure} \begin{figure}[h!] \center \begin{subfigure}[t]{0.50\textwidth} \centering \includegraphics[width=7.0cm, height = 4 cm]{exp_setup_jeff.pdf} \caption{Actual Setup} \end{subfigure}% \vspace{0.5cm} \hfill \begin{subfigure}[t]{0.5\textwidth} \centering \includegraphics[width=7.0cm, height = 4 cm]{exp_schem.jpg} \caption{Schematic View} \end{subfigure} \caption{The experimental setup} \pgfkeysvalueof{/tikz/dsp/label}}{exp_set} \end{figure} \section{Results} \subsection{Simulation Results} In this section, we compare different TOF estimation algorithms of a moving target using the same DZC sequence. All simulations were performed using MATLAB. The simulation results in this section were obtained from $10000$ samples, unless stated otherwise. We compare the MSEs in estimating the TOF under a constant Doppler shift using MUSIC-based LSE algorithm \cite{reinhard2016general} and the super-resolution radar, via solving $\ell_1$ minimization program \cite{reinhard2016super} against the maximum likelihood estimator (MLE) and the proposed reduced-complexity algorithm. The MSEs in estimating the TOF under different SNR scenarios (with $N = 21$, $\widetilde{\tau} = 10$ symbols, $M = 1$, and $\widetilde{\nu} = 1$) are shown in Figure \ref{lse_comp}. \begin{figure} \includegraphics[width = 8 cm, height=8 cm]{compare_lse_ml_rc_no_CRLB_v2.eps} \caption{TOF estimation using MLE, LSE, and reduced-complexity algorithm with $N = 21$, $\widetilde{\tau} = 10$ symbols, $M = 1$, and $\widetilde{\nu} = 1$} \pgfkeysvalueof{/tikz/dsp/label}}{lse_comp} \end{figure} The MLE outperforms all the other algorithms at both low and high SNR scenarios. At a high SNR scenario, the proposed reduced-compelxity ranging algorithm outperforms both the MUSIC-based LSE algorithm \cite{reinhard2016general} and the super-resolution radar estimation algorithm \cite{reinhard2016super}. In addition, the proposed reduced-complexity algorithm requires much less computational cost compared to the MUSIC-based LSE and the super-resolution radar algorithms, as shown in Table (\ref{comp_comp_run_LSE}). Because of the high computational complexity of the super-resolution radar algorithm and the MUSIC-based LSE, we chose $N=21$ in this comparison. \begin{table}[h!] \begin{tabular}{| c | c | c | c | c | c | c |} \hline {Tx duration} & \multicolumn{2}{|c|}{MUSIC-based LSE \cite{reinhard2016general}} & {Super-res radar \cite{reinhard2016super}}& {Diff Corr} \\\hhline{~~~~~} {(ms)}& \multicolumn{2}{|c|}{(DZC)} & {(DZC)}& {(DZC)} \\\hline {$6$} & \multicolumn{2}{|c|}{$1573$} & {$4781$}& {$3.99$} \\\hline \end{tabular} \vspace{-0.1cm} \caption{Running time (ms) for one iteration of the range estimation algorithm} \pgfkeysvalueof{/tikz/dsp/label}}{comp_comp_run_LSE} \end{table}\par Next, we compare the performance of the differential sliding correlation-based ranging algorithm, using DZC sequences, against three other algorithms; short-time Fourier transform (STFT) on FMCW \cite{mao2016cat}, the ML estimator using regular ZC sequences, and the ML estimator using DZC sequences, derived in section IV. For each of the four algorithms, a signal with a duration of 120 ms is generated. A moving target with a velocity of 1 m/s is simulated using MATLAB. The received signal is composed of the delayed, Doppler shifted transmitted signal with additive white Gaussian noise (AWGN) and a random phase shift. The mean square error (MSE) of the estimated TOF using the four algorithms are shown in Figure \ref{sim_compare}. In this simulation we are using a sampling frequency of $192$ kHz which makes each sample represents around 1.78 mm. Figure \ref{sim_compare} shows that the MSE for the ML estimation using the DZC sequences is lower than the MSE for the regular ZC sequences, which means that ML estimation using DZC sequences can achieve higher accuracy compared to its accuracy when using regular ZC sequences.\par Moreover, differential sliding correlation of the DZC sequences outperforms the ML estimation using regular ZC sequences under high SNR scenarios. Under low SNR scenarios, ML estimation has the best performance among the four algorithms. Furthermore, the differential sliding correlation ranging, using DZC sequences, outperforms the FMCW ranging algorithm \cite{mao2016cat}. Table (\ref{comp_comp}) shows the running time for each of the four algorithms to estimate the range. From the table we can see that the differential sliding correlation has the lowest computational complexity among the four algorithms. \begin{figure}[h!] \includegraphics[width = 8cm, height = 8cm]{sim_compare_no_CRLB_v3.eps} \caption{Simulation results: MSE (in (samples)$^2$ for the normalized TOF $\tau$) versus SNR for a signal duration of 120 ms, TOF $\tau = 60$ms.} \pgfkeysvalueof{/tikz/dsp/label}}{sim_compare} \end{figure} \begin{table}[h!] \begin{tabular}{| c | c | c | c | c | c | c |} \hline {Tx duration} & \multicolumn{2}{|c|}{Maximum Likelihood} & {STFT }& {Diff Corr} \\\hhline{~~~~~} {(ms)}& \multicolumn{2}{|c|}{(Diff or regular ZC)} & {(FMCW)}& {(Diff ZC)} \\\hline {$120$} & \multicolumn{2}{|c|}{$1022$} & {$595$}& {$54$} \\\hline \end{tabular} \vspace{-0.1cm} \caption{Running time (ms) of the four ranging algorithms} \pgfkeysvalueof{/tikz/dsp/label}}{comp_comp} \end{table} \par We run simulations to evaluate the performance of the proposed algorithm for different sequence lengths. Table \ref{N_vs_snr} shows the root mean square error (RMSE) of the proposed algorithm for different sequence lengths under different SNR values and a fixed velocity of $0.1$ m/s. The results are obtained from $10000$ observations. Short sequences, e.g. with $N = 15$ and $N = 31$, have lower energy and therefore are less immune to noise as compared to longer sequences, $N = 255$ and $N = 511$. \begin{table}[h!] \centering \begin{tabular}{| c | c | c | c | c |} \hline & {SNR = 20 dB} & {10 dB }& {0 dB} & {-10 dB}\\\hhline{~----} {Length} & {RMSE} & {RMSE}& {RMSE} & {RMSE}\\\hhline{~~~~~} {(symbols)} & {(mm)} & {(mm)}& {(mm)} & {(mm)} \\\hline {$15$} & {$1.654$} & {$1.654$} & {$3.104$} & {$6.926$} \\\hline {$31$} & {$0.743$} & {$0.923$} & {$1.958$} & {$6.576$} \\\hline {$63$} & {$0.489$} & {$0.489$} & {$1.508$} & {$4.175$} \\\hline {$255$} & {$0.480$} & {$0.558$} & {$0.651$} & {$2.050$} \\\hline {$511$} & {$0.282$} & {$0.282$} & {$0.282$} & {$0.916$} \\\hline \end{tabular} \vspace{-0.1cm} \caption{RMSE for different lengths with a fixed velocity $0.1$ m/s} \pgfkeysvalueof{/tikz/dsp/label}}{N_vs_snr} \end{table} \par Then, we evaluate the performance of our algorithm under various velocities and for different bandwidths (from $10000$ samples with fixed SNR $= 5$dB). Table \ref{V_vs_BW} shows the RMSE for the differential correlation ranging algorithm using a 511-symbol DZC sequence, with different bandwidths and target velocities. As expected, the RMSE increases with velocity. Moreover, we notice that the RMSE increases with higher BW. The increase in the RMSE is due to the narrowband approximation of the received signal when using differential correlation as in Equation (\ref{sys_model}) (i.e. lower bandwidth means our approximation is more accurate). \begin{table}[h!] \centering \begin{tabular}{| c | c | c | c |} \hline & {BW = 19.2 kHz} & {6.4 kHz} & {4.8 kHz}\\\hhline{~---} {Velocity} & {RMSE} & {RMSE}& {RMSE}\\\hhline{~~~~} {(m/s)} & {(mm)}& {(mm)} & {(mm)} \\\hline {$0.51$} & {$3.339$} & {$1.992$} & {$0.759$} \\\hline {$1.01$} & {$6.960$} & {$4.875$} & {$3.623$} \\\hline {$1.51$} & {$10.629$} & {$9.437$} & {$7.619$} \\\hline {$2.01$} & {$14.943$} & {$14.976$} & {$12.542$} \\\hline \end{tabular} \vspace{-0.1cm} \caption{RMSE of differential correlation ranging for different velocities and different bandwidths ($N=511$ symbols)} \pgfkeysvalueof{/tikz/dsp/label}}{V_vs_BW} \end{table} \par Next, we evaluate the performance of different codes under various velocities with a fixed bandwidth of $6.4$ kHz and fixed SNR of $20$ dB. The proposed algorithm outperforms the benchmark algorithms under various velocities as can be seen in Figure \ref{sim_compare_new}. \begin{figure}[h!] \includegraphics[width = 8cm, height = 8cm]{MSE_vs_V_v3.eps} \caption{MSE for different velocities with SNR = $20$ dB and BW = $6.4$ kHz} \pgfkeysvalueof{/tikz/dsp/label}}{sim_compare_new} \end{figure} \subsection{Experimental Results} This section presents the experimental results as an evaluation of the proposed system. An ultrasound receiver on a printed circuit board (PCB) is fixed in a specific location, while an ultrasound transmitter is moving. A set of infrared cameras provides the location of the moving transmitter with sub-millimeter accuracy. The motion ground truth is found by converting the positions of both the transmitter and the receiver into ranges. A repetition of each of the four different signals was transmitted with a total duration of around 30 seconds, while the transmitter was stationary in the first few seconds, then moving forward and backward before stopping at a certain distance for the last few seconds. \par The first experiment demonstrates the limitations of the regular ZC cross-correlation-based ranging, where a set of 511-symbol ZC sequence is used to track the moving transmitter. The estimated range is accurate when the transmitter is stationary. However, during the movement, the ranging accuracy significantly degrades due to Doppler. Figure \ref{diff_zc_511} (a) shows the estimated range using the regular ZC sequence where the accuracy degradation due to Doppler is clear on the plot. The second experiment validates the ability of the proposed DZC to combat Doppler effect. In this experiment, a set of 511-symbol DZC sequence is utilized to track the moving transmitter with a similar velocity as in the first experiment. The speeds at the two experiments are very similar but not the same because we are dealing with human motion, which makes it not possible to maintain the exact same speed at all experiments, unlike when using robots. Figure \ref{diff_zc_511} (b) illustrates the ability of the DZC sequence to track movements without being affected by Doppler. Figure \ref{diff_zc_511} (c) shows the velocity of the moving target during the experiments. The results in Figures \ref{diff_zc_511} are obtained using $41600$ samples. Table \ref{rmse_var_1} shows the mean square error (MSE) of the estimated range in those two experiments. \begin{figure}[h!] \centering \begin{subfigure}[t]{0.50\textwidth} \centering \includegraphics[width=9cm, height = 4 cm]{ZC_73_Est_Vs_GT_v4.eps} \caption{} \end{subfigure}% \hfill \begin{subfigure}[t]{0.50\textwidth} \centering \includegraphics[width=9cm, height = 4 cm]{plot_all_66_v6.eps} \caption{} \end{subfigure} \hfill \begin{subfigure}[t]{0.50\textwidth} \centering \includegraphics[width=9cm, height = 4 cm]{v_plot_all_66_v6.eps} \caption{} \end{subfigure} \caption{Cross-correlation-based range estimation using (a) 511-Zadoff-Chu sequence (b) 511-Differential Zadoff-Chu sequence (c) velocity of the moving target} \pgfkeysvalueof{/tikz/dsp/label}}{diff_zc_511} \end{figure} \begin{table}[h!] \begin{tabular}{| c | c | c |} \hline {Sequence Length} & {ZC Correlation-based} & {Reduced-complexity} \\\hhline{~--} {(symbols)}& {\textbf{MSE} }& {\textbf{MSE} }\\ &{($mm^2$)} &{($mm^2$)} \\\hline {$511$} & {$102380$}& {$0.5754$} \\\hline \end{tabular} \vspace{-0.1cm} \caption{Estimated range MSE for a moving transmitter} \pgfkeysvalueof{/tikz/dsp/label}}{rmse_var_1} \end{table} \vspace{-0.0cm} The recorded data is processed under different SNR values, by adding white Gaussian noise to the data in the MATLAB, to validate the minimum refinement variance search algorithm. Figure \ref{percent_corr} shows the percentage of range estimates that are correct up to half the wavelength of the maximum frequency (around 7.5 mm). As the SNR goes lower, the accuracy of the ranges estimated without using the minimum refinement variance search degrades, while the estimates obtained using the minimum variance search maintain high accuracy. Figures \ref{cum_error_min_var} (a), (b), (c), and (d) show the cumulative error with and without using the minimum refinement variance search algorithm under different SNR values. Using the minimum refinement variance search algorithm always improves the accuracy of the estimated range. \begin{figure}[h!] \includegraphics[width = 9 cm, height = 5 cm]{Error_Less_Lambda_by_2_v6.eps} \caption{Percentage of estimates correct up to $\lambda_\text{min}/2$} \pgfkeysvalueof{/tikz/dsp/label}}{percent_corr} \end{figure} \begin{figure}[h!] \centering \begin{subfigure}[t]{0.220\textwidth} \centering \includegraphics[width=4.0cm, height = 4.0 cm]{comm_error_snr_20_v6.eps} \caption{} \end{subfigure}% \begin{subfigure}[t]{0.220\textwidth} \centering \includegraphics[width=4.0cm, height = 4.0 cm]{comm_error_snr_10_v6.eps} \caption{} \end{subfigure} \hfill \begin{subfigure}[t]{0.220\textwidth} \centering \includegraphics[width=4.0cm, height = 4.0 cm]{comm_error_snr_0_v6.eps} \caption{} \end{subfigure} \begin{subfigure}[t]{0.220\textwidth} \centering \includegraphics[width=4.0cm, height = 4.0 cm]{comm_error_snr_min_10_v6.eps} \caption{} \end{subfigure} \caption{Cumulative error in range estimates at (a) 20 dB (b) 10 dB (c) 0 dB and (d) -10 dB SNR using 511-symbol sequence} \pgfkeysvalueof{/tikz/dsp/label}}{cum_error_min_var} \end{figure} Table \ref{rmse_var_snr} shows the MSE of the estimated ranges under different SNR values using differential correlation only, and using the reduced-complexity ranging algorithm. The reduced-complexity algorithm utilizes the differential correlation with the minimum refinement variance search and phase shift compensation, to reach sub-sample accuracy. The phase refinement improves the initial range estimates to very high accuracy even under low SNR scenario. \begin{table}[h!] \centering \begin{tabular}{| c | c | c |} \hline {SNR} & {diff-correlation only} & {Reduced-complexity Algorithm}\\\hhline{~--} {(dB)}& {\textbf{MSE}} & {\textbf{MSE}}\\ &{($mm^2$)} &{($mm^2$)} \\\hline {$20$} & {$4.5827$} & {$0.5576$} \\\hline {$10$} & {$4.7900$} & {$0.5753$} \\\hline {$0$} & {$5.6499$} & {$0.6074$} \\\hline {$-10$}& {$13.0517$} & {$0.7114$} \\\hline \end{tabular} \vspace{-0.1cm} \caption{ MSE of range estimates for a moving transmitter using a 511-symbol sequence} \pgfkeysvalueof{/tikz/dsp/label}}{rmse_var_snr} \end{table} Figure \ref{exp_compare} shows the MSE of the TOF estimation, using the three types of signals, under different SNR scenarios with a maximum velocity of $0.5$ m/s. The TOF estimation accuracy is dictated by the hardware bandwidth and sampling rate, which control the ranging resolution of the system. The ranging resolution of our experimental setup is around $1.78$ mm/sample. Therefore, any movement that is equivalent to a fraction of a sample is rounded to the nearest integer multiple of the sampling resolution. The phase refinement algorithm compensates for this fractional TOF, which improves the ranging accuracy compared to the other methods. Moreover, the minimum variance search shows the robustness of the reduced-complexity algorithm under low SNR scenarios compared to the other algorithms. Finally, we would like to highlight that the experimental performance of the DZC ML-based ranging accuracy can be improved if we make our grid search with a sub-sample resolution. However, this has a very high computational cost, hence is difficult to implement. We would like to highlight that the slight degradation in the performance of the proposed algorithm under low SNR scenario, as compared to the other algorithms, is due to the nature of the proposed differential decoding. By applying the differential decoding we double the noise, and therefore, under extremely low SNR values the accuracy degrades. \par \begin{figure}[h!] \includegraphics[width = 8cm, height = 8cm]{exp_compare_v4.eps} \caption{Experimental results: MSE (in (samples)$^2$ for the normalized TOF $\tau$) versus SNR for a signal duration of 120 ms.} \pgfkeysvalueof{/tikz/dsp/label}}{exp_compare} \end{figure} \par We evaluate the performance of the proposed algorithm using different sequence lengths under different SNR values. Table \ref{exp_N_vs_snr} shows the RMSE for the proposed algorithm which is evaluated experimentally under different lengths. The results in Table \ref{exp_N_vs_snr} are obtained from around $41600$ samples and under different velocities with a maximum velocity of $0.53$ m/s. The velocity of the moving target is shown at Fig. \ref{diff_zc_511} (c) . The experimental results show that with increasing sequence length, the algorithm becomes more robust to noise. \begin{table}[h!] \centering \begin{tabular}{| c | c | c | c | c |} \hline & {SNR = 20 dB} & {10 dB }& {0 dB} & {-10 dB}\\\hhline{~----} {Length} & {RMSE} & {RMSE}& {RMSE} & {RMSE}\\\hhline{~~~~~} {(symbols)} & {(mm)} & {(mm)}& {(mm)} & {(mm)} \\\hline {$15$} & {$0.943$} & {$0.944$} & {$59.32$} & {$494.9$} \\\hline {$31$} & {$1.394$} & {$1.393$} & {$40.13$} & {$871.4$} \\\hline {$63$} & {$0.8728$} & {$0.8786$} & {$9.212$} & {$21.63$} \\\hline {$255$} & {$0.8593$} & {$0.8557$} & {$0.8521$} & {$10.03$} \\\hline {$511$} & {$0.7466$} & {$0.7583$} & {$0.7791$} & {$0.8432$} \\\hline \end{tabular} \vspace{-0.1cm} \caption{Experimental: RMSE for the reduced-complexity algorithm using different lengths under different SNR values} \pgfkeysvalueof{/tikz/dsp/label}}{exp_N_vs_snr} \end{table} \par Finally, we evaluate the proposed code and algorithm against the benchmark algorithms for different velocities under fixed SNR value ($10$ dB). At each experiment, the velocity of the moving target is varying with time. Table \ref{exp_v_vs_alg} shows the RMSE for the proposed and benchmark algorithms under different velocities. The proposed DZC sequences and ranging algorithms outperform the benchmark ranging algorithms. The degradation in the ZC-based ML ranging algorithm is due to the ambiguity in the joint estimation of the TOF and Doppler shift. Figure \ref{fast_exp} shows the estimated range and velocity of a moving target, using the proposed ML-based DZC ranging algorithm, in two experiments. In Figure \ref{fast_exp} (a) and (b) the maximum velocity of the moving target is $1.115$ m/s, and in Figure \ref{fast_exp} (c) and (d) the maximum velocity is $1.911$ m/s . This figure shows that the proposed algorithm and signal design provides high ranging accuracy even under high velocities. \begin{table}[h!] \centering \begin{tabular}{| c | c | c | c | c |} \hline & {ML ZC} & {CWLFM \cite{mao2016cat}}& {Diff DZC} & {ML DZC}\\\hhline{~----} {Max Velocity} & {RMSE} & {RMSE}& {RMSE} & {RMSE}\\\hhline{~~~~~} {(m/s)} & {(mm)} & {(mm)}& {(mm)} & {(mm)} \\\hline {$0.915$} & {$73.95$} & {$61.51$} & {$9.520$} & {$4.547$} \\\hline {$1.115$} & {$566.8$} & {$111.1$} & {$16.39$} & {$7.627$} \\\hline {$1.911$} & {$335.8$} & {$665.6$} & {$24.02$} & {$7.696$} \\\hline \end{tabular} \vspace{-0.1cm} \caption{Experimental: RMSE for the proposed and benchmark algorithms under different velocities} \pgfkeysvalueof{/tikz/dsp/label}}{exp_v_vs_alg} \end{table} \begin{figure}[h!] \centering \begin{subfigure}[t]{0.50\textwidth} \centering \includegraphics[width=8.0cm, height = 4.0 cm]{Exp_4_range.eps} \caption{} \end{subfigure}% \hfill \begin{subfigure}[t]{0.50\textwidth} \centering \includegraphics[width=8.0cm, height = 4.0 cm]{Exp_4_velocity.eps} \caption{} \end{subfigure} \hfill \begin{subfigure}[t]{0.50\textwidth} \centering \includegraphics[width=8.0cm, height = 4.0 cm]{Exp_6_range.eps} \caption{} \end{subfigure}% \hfill \begin{subfigure}[t]{0.50\textwidth} \centering \includegraphics[width=8.0cm, height = 4.0 cm]{Exp_6_velocity.eps} \caption{} \end{subfigure} \caption{ML-based DZC estimated range and velocity with max velocity $1.115$ m/s in (a) and (b) and $1.911$ m/s in (c) and (d) } \pgfkeysvalueof{/tikz/dsp/label}}{fast_exp} \end{figure} \section{Conclusion} In this paper, a novel signal design based on the differential coding of ZC sequences is presented to estimate the range of a moving transmitter. The proposed DZC design and ranging algorithms were evaluated, both in simulation and using experimental setup in a typical indoor environment. The proposed DZC outperforms the regular ZC sequences in estimating the TOF and Doppler shift of a moving target, as shown using both simulations and real experiments. Moreover, the simulation results show that the proposed differential sliding correlation, using a DZC sequence, outperforms the benchmark algorithms, namely STFT-based range estimation, using a FMCW and ML range estimation, using a regular ZC sequence. The differential sliding correlation has the lowest computational complexity in estimating the range of a moving target compared to the benchmark algorithms.\par The experimental results show that while the long typical ZC sequence fails to estimate the range of a moving transmitter using cross-correlation, the proposed DZC sequence is able to combat Doppler, by utilizing differential sliding correlation. The minimum refinement variance search algorithm is able to correct range estimates up to half the wavelength of the signal carriers even in low SNR scenarios, which provides robustness to the system. At low SNR (-12 dB), the minimum refinement variance search algorithm has 98\% of the range estimates correct up to half wavelength of the signal carriers, compared to 92\% when not using the algorithm.\par The proposed low-complexity ranging algorithm, using a DZC sequence of 511 symbols, has a MSE of $0.56$ $\text{mm}^2$ under SNR of $20$ dB, and a MSE of $0.71$ $\text{mm}^2$ under SNR of $-10 $ dB, which shows the ability of the proposed system to achieve sub-sample resolution, even in low SNR scenarios. Moreover, the experimental results show that the low-complexity ranging and ML-based ranging algorithm, using DZC, outperforms the ML-based ZC ranging and the FMCW STFT-based ranging as expected. \par \subsection*{Future Work} The proposed ranging system can be utilized in various applications that require estimating the position of a moving target. One such a system that requires high positioning accuracy is a robotic surgical system. Another widely used ranging-based application is indoor localization which requires estimating the distances between a receiver (known as the mobile device) and multiple transmitters (known as base-stations). These base-stations need to be synchronized. We can achieve synchronization by transmitting an RF signal with the ultrasound signal. After determining the distance between each base-station and the target, we can use a trilateration algorithm to find the position of the target. In indoor navigation applications, we can extend our current work to localize multiple users by giving each user a unique DZC code (i.e. a DZC code with a unique DZC exponent $M$). Each DZC code has a good auto-correlation property and poor cross-correlation with the other DZC codes which provides orthogonality between the various users. Moreover, the proposed ranging algorithm can be used in systems of low sampling rate where the ranging resolution is dictated by the sampling frequency, so the phase refinement can significantly improve the resolution of the system. \appendices \section{Analytical Derivation of Differential Zadoff-Chu Sequence Design } The differential decoding of a Differential ZC sequence $a[k]$ gives a ZC $s[k]$ sequence which has a phase as a quadratic function of time. Therefor, the Differential ZC sequence has a phase as a cubic function of time \renewcommand{\theequation}{\thesection.\arabic{equation}} \begin{equation} a^*[k]a[k+1] = s[k] \pgfkeysvalueof{/tikz/dsp/label}}{appen_1} \end{equation} where $a[k] = e^{j(\alpha_3 k^3 + \alpha_2 k^2 + \alpha_1 k + \alpha_0)}$. For an even length ZC sequence, (\ref{appen_1}) gives \begin{equation*} \begin{split} &-(\alpha_3 k^3 + \alpha_2 k^2 + \alpha_1 k + \alpha_0) + (\alpha_3 (k+1)^3 + \alpha_2 (k+1)^2 \\ &+ \alpha_1 (k+1) + \alpha_0) = \frac{M\pi k^2}{N}\\ &\alpha_3 (3k^2 + 3k + 1) + \alpha_2 (2k + 1) + \alpha_1 = \frac{M\pi k^2}{N} \end{split} \end{equation*} $\alpha_3 = \frac{M\pi}{3N}$, $\alpha_2 = \frac{-M\pi}{2N}$, $\alpha_1 = \frac{M\pi}{6N}$, and $\alpha_0$ is an arbitrary constant which is set to zero for simplicity. The phase of the differential ZC $\phi[k]$ becomes \begin{align*} \phi[k] &= \alpha_3 k^3 + \alpha_2 k^2 + \alpha_1 k + \alpha_0 \\ &= \frac{M\pi}{3N} k^3 - \frac{M\pi}{2N} k^2 + \frac{M\pi}{6N} k\\ &= \frac{M\pi}{3N} k(k - \frac{1}{2})(k -1) . \end{align*} For an odd length ZC sequence, (\ref{appen_1}) gives \begin{equation*} \alpha_3 (3k^2 + 3k + 1) + \alpha_2 (2k + 1) + \alpha_1 = \frac{M\pi (k^2 + k)}{N} \end{equation*} $\alpha_3 = \frac{M\pi}{3N}$, $\alpha_2 = 0$, $\alpha_1 = -\frac{M\pi}{3N}$, and $\alpha_0$ is an arbitrary constant which is set to zero for simplicity. The phase of the differential ZC $\phi[k]$ becomes \begin{align*} \phi[k] &= \alpha_3 k^3 + \alpha_2 k^2 + \alpha_1 k + \alpha_0 \\ &= \frac{M\pi}{3N} k^3 - \frac{M\pi}{3N} k \\ &= \frac{M\pi}{3N} k(k-1)(k+1). \end{align*} \section{Periodicity of Differential Zadoff-Chu Codes} \pgfkeysvalueof{/tikz/dsp/label}}{App_Period} For repetitive and periodic transmission, each sequence is repeated $P$ times, where $P$ is an integer and each single sequence is referred to as a block. It is important to determine the period of the Differential ZC sequence to perform the periodic transmission.\par For an even length Differential ZC sequence, with all the phases to be understood modulo $2\pi$, taking a shift of $N$ symbols in time gives \begin{equation*} \pgfkeysvalueof{/tikz/dsp/label}}{eq1} \begin{split} \phi_{k+N} &= \frac{\pi M}{3 N} (k + N)(k + N - 1)(k + N - \frac{1}{2})\\ &= \frac{\pi M}{3 N}k(k-1)(k-\frac{1}{2}) + \pi M \underbrace{k (k + (N-1))}_{\text{even for even $N$}}\\ & + \frac{\pi M}{3} (N -1)(N - \frac{1}{2})\\ &= \phi_k + \frac{\pi M}{3} (N - \frac{1}{2})(N -1) \end{split} \end{equation*} Therefore, shifting $a[k]$ by $N$ results in the same sequence $a[k]$ but with a phase change of $\frac{\pi M}{6} (2N - 1)(N -1)$ up to an additive phase shift. If $N$ is even and either $(2N - 1)$ or $(N - 1)$ is a multiple of 3, then the period of the sequence is $4N$. Otherwise, the period is $12N$.\par Similarly considering an odd length Differential ZC sequence, with all the phases to be understood modulo $2\pi$ gives \begin{equation*} \pgfkeysvalueof{/tikz/dsp/label}}{eq1} \begin{split} \phi_{k+N} &= \frac{\pi M}{3 N} (k + N)(k + N - 1)(k + N + 1)\\ &= \frac{\pi M}{3 N} k(k-1)(k+1) + \pi M \underbrace{k(k + N)}_{\text{even for odd $N$}}\\ & + \frac{\pi M}{3} (N^2 - 1)\\ &= \phi_k + \frac{\pi M}{3}(N + 1)(N - 1) \end{split} \end{equation*} Therefore, shifting $a[k]$ by $N$ results in the same sequence as $a[k]$ but with a phase change of $ \frac{\pi M}{3} (N + 1)(N - 1) $ up to an additive constant phase shift. If $N$ is odd and not divisible by 3, then either $(N-1)$ or $(N+1)$ is even and divisible by 3, hence the sequence period is $N$. Otherwise, if $N$ is odd and divisible by 3 then the sequence period is $3N$, which can be seen as follows \begin{equation} \pgfkeysvalueof{/tikz/dsp/label}}{eq1} \begin{split} \phi_{k+ 3N} &= \phi_{k+ 2N} + \frac{\pi M}{3} (N^2 - 1)\\ &= \phi_{k+ N} + \frac{\pi M}{3} (N^2 - 1) + \frac{\pi M}{3} (N^2 - 1)\\ &= \phi_k + \pi M (N^2 - 1) \end{split} \end{equation} Since $N$ is odd, the term ($N^2 - 1$) is even, taking modulo $2 \pi$ gives \begin{equation} \phi_{k+ 3N} = \phi_k \end{equation} To sum up, the Differential ZC sequence is given by \begin{equation} a[k] = e^{i\phi[k]} \pgfkeysvalueof{/tikz/dsp/label}}{diff_zc1} \end{equation} where \begin{equation} \begin{footnotesize} \phi[k] = \begin{cases*} \frac{\pi M}{3 N}k(k-\frac{1}{2})(k-1), &$k = 1, 2, ..., 2N(2 + a_1 a_2),$ for even $N$,\\ \frac{\pi M}{3 N} k (k + 1)(k - 1), & $k = 1, 2, ..., |3N - 2(N $ modulo $ 3)|,$ for odd $N$. \end{cases*} \end{footnotesize} \pgfkeysvalueof{/tikz/dsp/label}}{phase_eq} \end{equation} and $a_1 = ((2N-1) $ modulo $ 3)$, and $ a_2 = ((N-1) $ modulo $ 3)$. \ifCLASSOPTIONcaptionsoff \newpage \fi \bibliographystyle{IEEEtran} \section{Introduction} \subsection{About} Circui\TikZ\ was initiated by Massimo Redaelli in 2007, who was working as a research assistant at the Polytechnic University of Milan, Italy, and needed a tool for creating exercises and exams. After he left University in 2010 the development of Circui\TikZ\ slowed down, since \LaTeX\ is mainly established in the academic world. In 2015 Stefan Lindner and Stefan Erhardt, both working as research assistants at the University of Erlangen-Nürnberg, Germany, joined the team and now maintain the project together with the initial author. The use of Circui\TikZ\ is, of course, not limited to academic teaching. The package gets widely used by engineers for typesetting electronic circuits for articles and publications all over the world. \medskip This documentation is somewhat scant. Hopefully the authors will find the leisure to improve it some day. \subsection{Loading the package} \begin{table}[h] \centering \begin{tabular}{ll}\toprule \LaTeX & Con\TeX t\footnotemark \\ \midrule \verb!\usepackage{circuitikz}! & \verb!\usemodule[circuitikz]!\\ \bottomrule \end{tabular} \end{table} \footnotetext{Con\TeX t\ support was added mostly thanks to Mojca Miklavec and Aditya Mahajan.} \noindent Ti\emph{k}Z\ will be automatically loaded. \noindent CircuiTi\emph{k}Z\ commands are just Ti\emph{k}Z\ commands, so a minimum usage example would be: \begin{LTXexample}[varwidth=true] \tikz \draw (0,0) to[R=$R_1$] (2,0); \end{LTXexample} \subsection{Requirements} \begin{itemize} \item \texttt{tikz}, version $\ge 3$; \item \texttt{xstring}, not older than 2009/03/13; \item \texttt{siunitx}, if using \texttt{siunitx} option. \end{itemize} \subsection{Incompatible packages} Ti\emph{k}Z's own \texttt{circuit} library, which is based on Circui\TikZ, (re?)defines several styles used by this library. In order to have them work together you can use the \texttt{compatibility} package option, which basically prefixes the names of all Circui\TikZ\ \texttt{to[]} styles with an asterisk. So, if loaded with said option, one must write \verb!(0,0) to[*R] (2,0)! and, for transistors on a path, \verb!(0,0) to[*Tnmos] (2,0)!, and so on (but \verb!(0,0) node[nmos] {}!). See example at page~\pageref{ex:compatibility}. \subsection{License} Copyright \copyright\ 2007--2017 Massimo Redaelli. This package is author-maintained. Permission is granted to copy, distribute and/or modify this software under the terms of the \LaTeX\ Project Public License, version 1.3.1, or the GNU Public License. This software is provided ‘as is’, without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. \subsection{Feedback} The easiest way to contact the authors is via the official Github repository: \url{https://github.com/circuitikz/circuitikz/issues} \section{Incompabilities between version} Here, we will provide a list of incompabilitys between different version of circuitikz. We will try to hold this list short, but sometimes it is easier to break with old syntax than including a lot of switches and compatibility layers. You can check the used version at your local installation using the macro \verb!0.8.3{}!. \begin{itemize} \item Since v0.8.2: voltage and current label directions(v<= / i<=) do NOT change the orientation of the drawn source shape anymore. Use the "invert" option to rotate the shape of the source. Furthermore, from this version on, the current label(i=) at current sources can be used independent of the regular label(l=). \item Since v0.7?: The label behaviour at mirrored bipoles has changes, this fixes the voltage drawing, but perhaps you have to adjust your label positions. \item Since v0.5.1: The parts pfet,pigfete,pigfetebulk and pigfetd are now mirrored by default. Please adjust your yscale-option to correct this. \item Since v0.5: New voltage counting direction, here exists an option to use the old behaviour \end{itemize} For older projects, you can use an older version locally using the git-version and picking the correct commit from the repository (branch gh-pages). \section{Package options} \noindent Circuit people are very opinionated about their symbols. In order to meet the individual gusto you can set a bunch of package options. The standard options are what the authors like, for example you get this: \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R=2<\Omega>, i=?, v=84<\rm{V}>] (2,0) -- (2,2) to[V<=84<\rm{V}>] (0,2) -- (0,0); \end{circuitikz} \end{LTXexample} Feel free to load the package with your own cultural options: \begin{center} \begin{tabular}{ll}\toprule \LaTeX & Con\TeX t \\ \midrule \verb!\usepackage[american]{circuitikz}! & \verb!\usemodule[circuitikz][american]!\\ \bottomrule \end{tabular} \end{center} \begin{LTXexample}[varwidth=true,linerange={1-1,3-6}] \begin{circuitikz} [circuitikz/voltage=american, circuitikz/resistor=american] \draw (0,0) to[R=2<\Omega>, i=?, v=84<\rm{V}>] (2,0) -- (2,2) to[V<=84<\rm{V}>] (0,2) -- (0,0); \end{circuitikz} \end{LTXexample} \medskip{} \noindent Here is the list of all the options: \begin{itemize} \item \texttt{europeanvoltages}: uses arrows to define voltages, and uses european-style voltage sources; \item \texttt{straightvoltages}: uses arrows to define voltages, and and uses straight voltage arrows; \item \texttt{americanvoltages}: uses $-$ and $+$ to define voltages, and uses american-style voltage sources; \item \texttt{europeancurrents}: uses european-style current sources; \item \texttt{americancurrents}: uses american-style current sources; \item \texttt{europeanresistors}: uses rectangular empty shape for resistors, as per european standards; \item \texttt{americanresistors}: uses zig-zag shape for resistors, as per american standards; \item \texttt{europeaninductors}: uses rectangular filled shape for inductors, as per european standards; \item \texttt{americaninductors}: uses "4-bumps" shape for inductors, as per american standards; \item \texttt{cuteinductors}: uses my personal favorite, "pig-tailed" shape for inductors; \item \texttt{americanports}: uses triangular logic ports, as per american standards; \item \texttt{europeanports}: uses rectangular logic ports, as per european standards; \item \texttt{americangfsurgearrester}: uses round gas filled surge arresters, as per american standards; \item \texttt{europeangfsurgearrester}: uses rectangular gas filled surge arresters, as per european standards; \item \texttt{european}: equivalent to \texttt{europeancurrents}, \texttt{europeanvoltages}, \texttt{europeanresistors}, \texttt{europeaninductors}, \texttt{europeanports}, \texttt{europeangfsurgearrester}; \item \texttt{american}: equivalent to \texttt{americancurrents}, \texttt{americanvoltages}, \texttt{americanresistors}, \texttt{americaninductors}, \texttt{americanports}, \texttt{americangfsurgearrester}; \item \texttt{siunitx}: integrates with \texttt{SIunitx} package. If labels, currents or voltages are of the form \verb!#1<#2>! then what is shown is actually \verb!\SI{#1}{#2}!; \item \texttt{nosiunitx}: labels are not interpreted as above; \item \texttt{fulldiode}: the various diodes are drawn \emph{and} filled by default, i.e. when using styles such as \texttt{diode}, \texttt{D}, \texttt{sD}, \ldots Other diode styles can always be forced with e.g. \texttt{Do}, \texttt{D-}, \ldots \item \texttt{strokediode}: the various diodes are drawn \emph{and} stroke by default, i.e. when using styles such as \texttt{diode}, \texttt{D}, \texttt{sD}, \ldots Other diode styles can always be forced with e.g. \texttt{Do}, \texttt{D*}, \ldots \item \texttt{emptydiode}: the various diodes are drawn \emph{but not} filled by default, i.e. when using styles such as \texttt{D}, \texttt{sD}, \ldots Other diode styles can always be forced with e.g. \texttt{Do}, \texttt{D-}, \ldots \item \texttt{arrowmos}: pmos and nmos have arrows analogous to those of pnp and npn transistors; \item \texttt{noarrowmos}: pmos and nmos do not have arrows analogous to those of pnp and npn transistors; \item \texttt{fetbodydiode}: draw the body diode of a FET; \item \texttt{nofetbodydiode}: do not draw the body diode of a FET; \item \texttt{fetsolderdot}: draw solderdot at bulk-source junction of some transistors; \item \texttt{nofetsolderdot}: do not draw solderdot at bulk-source junction of some transistors; \item \texttt{emptypmoscircle}: the circle at the gate of a pmos transistor gets not filled; \item \texttt{lazymos}: draws lazy nmos and pmos transistors. Chip designers with huge circuits prefer this notation; \item \texttt{straightlabels}: labels on bipoles are always printed straight up, i.e.~with horizontal baseline; \item \texttt{rotatelabels}: labels on bipoles are always printed aligned along the bipole; \item \texttt{smartlabels}: labels on bipoles are rotated along the bipoles, unless the rotation is very close to multiples of 90°; \item \texttt{compatibility}: makes it possibile to load Circui\TikZ\ and Ti\emph{k}Z\ circuit library together. \item \texttt{oldvoltagedirection}: Use old(erronous) way of voltage direction having a difference between european and american direction \item \texttt{betterproportions}\footnote{May change in the future!}: nicer proportions of transistors in comparision to resistors; \end{itemize} The old options in the singular (like \texttt{american voltage}) are still available for compatibility, but are discouraged. \medskip Loading the package with no options is equivalent to my own personal liking, that is to the following options:\\ \texttt{[nofetsolderdot,nooldvoltagedirection,europeancurrents,europeanvoltages,americanports,americanresistors,cuteinductors,europeangfsurgearrester,nosiunitx,noarrowmos,smartlabels,nocompatibility]}. \medskip In Con\TeX t\ the options are similarly specified: \texttt{current=european|american}, \texttt{voltage=european|american}, \texttt{resistor=american|european}, \texttt{inductor=cute|american|european}, \texttt{logic=american|european}, \texttt{siunitx=true|false}, \texttt{arrowmos=false|true}. \section{The components} Here follows the list of all the shapes defined by CircuiTi\emph{k}Z. These are all \texttt{pgf} nodes, so they are usable in both \texttt{pgf} and Ti\emph{k}Z. \subsubsection*{Drawing normal components} Normal components (monopoles, multipoles) can be drawn at a specified point with this syntax, where \verb!#1! is the name of the component: \begin{verbatim} \begin{center}\begin{circuitikz} \draw (0,0) node[#1,#2] (#3) {#4} ; \end{circuitikz} \end{center} \end{verbatim} \noindent Explanation of the parameters:\\ \texttt{\#1}: component name\footnote{For using bipoles as nodes, the name of the node is \texttt{\#1shape}.} (mandatory)\\ \texttt{\#2}: list of comma separated options (optional)\\ \texttt{\#3}: name of an anchor (optional)\\ \texttt{\#4}: text written to the text anchor of the component (optional)\\ \begin{framed} \noindent \textbf{Note for Ti\emph{k}Z\ newbies:} Nodes must have curly brackets at the end, even when empty. An optional anchor (\texttt{\#3}) can be defined within round brackets to be addressed again later on. And please don't forget the semicolon to terminate the \texttt{\textbackslash draw} command. \end{framed} \subsubsection*{Drawing bipoles/two-ports} Bipoles/Two-ports (plus some special components) can be drawn between two points using the following command: \begin{verbatim} \begin{center}\begin{circuitikz} \draw (0,0) to[#1,#2] (2,0) ; \end{circuitikz} \end{center} \end{verbatim} \noindent Explanation of the parameters:\\ \texttt{\#1}: component name (mandatory)\\ \texttt{\#2}: list of comma separated options (optional)\\ \noindent Transistors and some other components can also be placed using the syntax for bipoles. See section~\ref{sec:transasbip}. \begin{framed} If using the \verb!\tikzexternalize! feature, as of Ti\emph{k}z 2.1 all pictures must end with \verb!\end{tikzpicture}!. Thus you \emph{cannot} use the \verb!circuitikz! environment. Which is ok: just use the environment \verb!tikzpicture!: everything will work there just fine. \end{framed} \subsection{Monopoles} \begin{itemize} \circuititem{ground}{Ground}{} \circuititem{rground}{Reference ground}{} \circuititem{sground}{Signal ground}{} \circuititem{tground}{Thicker ground}{} \circuititem{nground}{Noiseless ground}{} \circuititem{pground}{Protective ground}{} \circuititem{cground}{Chassis ground\footnote{These last three were contributed by Luigi «Liverpool»)}}{} \circuititem{antenna}{Antenna}{} \circuititem{rxantenna}{Receiving antenna}{} \circuititem{txantenna}{Transmitting antenna}{} \circuititem{tlinestub}{Transmission line stub}{} \circuititem{vcc}{VCC/VDD}{} \circuititem{vee}{VEE/VSS}{} \circuititem{match}{match}{} \end{itemize} \subsection{Bipoles} \subsubsection{Instruments} \begin{itemize} \circuititembip{ammeter}{Ammeter}{} \circuititembip{voltmeter}{Voltmeter}{} \circuititembip{ohmmeter}{Ohmmeter}{} \end{itemize} \subsubsection{Basic resistive bipoles} \begin{itemize} \circuititembip{short}{Short circuit}{} \circuititembip{open}{Open circuit}{} \circuititembip{lamp}{Lamp}{} \circuititembip{generic}{Generic (symmetric) bipole}{} \circuititembip{tgeneric}{Tunable generic bipole}{} \circuititembip{ageneric}{Generic asymmetric bipole}{} \circuititembip{fullgeneric}{Generic asymmetric bipole (full)}{} \circuititembip{tfullgeneric}{Tunable generic bipole (full)}{} \circuititembip{memristor}{Memristor}{Mr} \end{itemize} \subsubsection{Resistors and the like} If (default behaviour) \texttt{americanresistors} option is active (or the style \texttt{[american resistors]} is used), the resistor is displayed as follows: \begin{itemize} \ctikzset{resistor=american} \circuititembip{R}{Resistor}{american resistor} \circuititembip{vR}{Variable resistor}{variable american resistor} \circuititembip{pR}{Potentiometer}{american potentiometer} \end{itemize} If instead \texttt{europeanresistors} option is active (or the style \texttt{[european resistors]} is used), the resistors, variable resistors and potentiometers are displayed as follows: \begin{itemize} \ctikzset{resistor=european} \circuititembip{R}{Resistor}{european resistor} \circuititembip{vR}{Variable resistor}{european variable resistor} \circuititembip{pR}{Potentiometer}{european potentiometer} \ctikzset{resistor=american} \end{itemize} Other miscellaneous resistor-like devices: \begin{itemize} \circuititembip{varistor}{Varistor}{} \circuititembip{phR}{Photoresistor}{photoresistor} \circuititembip{thermocouple}{Thermocouple}{} \circuititembip{thR}{Thermistor}{thermistor} \circuititembip{thRp}{PTC thermistor}{thermistor ptc} \circuititembip{thRn}{NTC thermistor}{thermistor ntc} \circuititembip{fuse}{Fuse}{} \circuititembip{afuse}{Asymmetric fuse}{asymmetric fuse} \end{itemize} \subsubsection{Diodes and such} \begin{itemize} \circuititembip{empty diode}{Empty diode}{Do} \circuititembip{empty Schottky diode}{Empty Schottky diode}{sDo} \circuititembip{empty Zener diode}{Empty Zener diode}{zDo} \circuititembip{empty ZZener diode}{Empty ZZener diode}{zzDo} \circuititembip{empty tunnel diode}{Empty tunnel diode}{tDo} \circuititembip{empty photodiode}{Empty photodiode}{pDo} \circuititembip{empty led}{Empty led}{leDo} \circuititembip{empty varcap}{Empty varcap}{VCo} \circuititembip{full diode}{Full diode}{D*} \circuititembip{full Schottky diode}{Full Schottky diode}{sD*} \circuititembip{full Zener diode}{Full Zener diode}{zD*} \circuititembip{full ZZener diode}{Full ZZener diode}{zzD*} \circuititembip{full tunnel diode}{Full tunnel diode}{tD*} \circuititembip{full photodiode}{Full photodiode}{pD*} \circuititembip{full led}{Full led}{leD*} \circuititembip{full varcap}{Full varcap}{VC*} \circuititembip{stroke diode}{Stroke diode}{D-} \circuititembip{stroke Schottky diode}{Stroke Schottky diode}{sD-} \circuititembip{stroke Zener diode}{Stroke Zener diode}{zD-} \circuititembip{stroke ZZener diode}{Stroke ZZener diode}{zzD-} \circuititembip{stroke tunnel diode}{Stroke tunnel diode}{tD-} \circuititembip{stroke photodiode}{Stroke photodiode}{pD-} \circuititembip{stroke led}{Stroke led}{leD-} \circuititembip{stroke varcap}{Stroke varcap}{VC-} \end{itemize} \subsubsection{Other tripole-like diodes}\pgfkeysvalueof{/tikz/dsp/label}}{sec:othertrip} The following tripoles are entered with the usual command of the form \begin{itemize} \circuititembip{triac}{Standard triac (shape depends on package option)}{Tr} \circuititembip{empty triac}{Empty triac}{Tro} \circuititembip{full triac}{Full triac}{Tr*} \circuititembip{thyristor}{Standard thyristor (shape depends on package option)}{Ty} \circuititembip{empty thyristor}{Empty thyristor}{Tyo} \circuititembip{full thyristor}{Full thyristor}{Ty*} \circuititembip{stroke thyristor}{Stroke thyristor}{Ty-} \end{itemize} See chapter \ref{bipole-naming} for information how access the third connector \begin{framed} The package options \texttt{fulldiode}, \texttt{strokediode}, and \texttt{emptydiode} (and the styles \texttt{[full diodes]}, \texttt{[stroke diodes]}, and \texttt{[empty diodes]}) define which shape will be used by abbreviated commands such that \texttt{D}, \texttt{sD}, \texttt{zD}, \texttt{zzD}, \texttt{tD}, \texttt{pD}, \texttt{leD}, \texttt{VC}, \texttt{Ty},\texttt{Tr}(no stroke symbol available!). \end{framed} \begin{itemize} \circuititembip{squid}{Squid}{} \circuititembip{barrier}{Barrier}{} \end{itemize} \begin{itemize} \circuititembip{european gas filled surge arrester}{European gas filled surge arrester}{} \circuititembip{american gas filled surge arrester}{American gas filled surge arrester}{} \end{itemize} \begin{framed} If (default behaviour) \texttt{europeangfsurgearrester} option is active (or the style \texttt{[european gas filled surge arrester]} is used), the shorthands \texttt{gas filled surge arrester} and \texttt{gf surge arrester} are equivalent to the european version of the component. If otherwise \texttt{americangfsurgearrester} option is active (or the style \texttt{[american gas filled surge arrester]} is used), the shorthands the shorthands \texttt{gas filled surge arrester} and \texttt{gf surge arrester} are equivalent to the american version of the component. \end{framed} \subsubsection{Basic dynamical bipoles} \begin{itemize} \circuititembip{capacitor}{Capacitor}{C} \circuititembip{polar capacitor}{Polar capacitor}{pC} \circuititembip{ecapacitor}{Electrolytic capacitor}{eC,elko} \circuititembip{variable capacitor}{Variable capacitor}{vC} \circuititembip{piezoelectric}{Piezoelectric Element}{PZ} \end{itemize} If (default behaviour) \texttt{cuteinductors} option is active (or the style \texttt{[cute inductors]} is used), the inductors are displayed as follows: \begin{itemize} \ctikzset{inductor=cute} \circuititembip{L}{Inductor}{cute inductor} \circuititembip{vL}{Variable inductor}{variable cute inductor} \end{itemize} If \texttt{americaninductors} option is active (or the style \texttt{[american inductors]} is used), the inductors are displayed as follows: \begin{itemize} \ctikzset{inductor=american} \circuititembip{L}{Inductor}{american inductor} \circuititembip{vL}{Variable inductor}{variable american inductor} \end{itemize} Finally, if \texttt{europeaninductors} option is active (or the style \texttt{[european inductors]} is used), the inductors are displayed as follows: \begin{itemize} \ctikzset{inductor=european} \circuititembip{L}{Inductor}{european inductor} \circuititembip{vL}{Variable inductor}{variable european inductor} \end{itemize} There is also a transmission line: \begin{itemize} \circuititembip{TL}{Transmission line}{transmission line, tline} \end{itemize} \subsubsection{Stationary sources} \begin{itemize} \circuititembip{battery}{Battery}{} \circuititembip{battery1}{Single battery cell}{} \circuititembip{battery2}{Single battery cell}{} \circuititembip{european voltage source}{Voltage source (european style)}{} \circuititembip{american voltage source}{Voltage source (american style)}{} \circuititembip{european current source}{Current source (european style)}{} \circuititembip{american current source}{Current source (american style)}{} \end{itemize} \begin{framed} If (default behaviour) \texttt{europeancurrents} option is active (or the style \texttt{[european currents]} is used), the shorthands \texttt{current source}, \texttt{isource}, and \texttt{I} are equivalent to \texttt{european current source}. Otherwise, if \texttt{americancurrents} option is active (or the style \texttt{[american currents]} is used) they are equivalent to \texttt{american current source}. Similarly, if (default behaviour) \texttt{europeanvoltages} option is active (or the style \texttt{[european voltages]} is used), the shorthands \texttt{voltage source}, \texttt{vsource}, and \texttt{V} are equivalent to \texttt{european voltage source}. Otherwise, if \texttt{americanvoltages} option is active (or the style \texttt{[american voltages]} is used) they are equivalent to \texttt{american voltage source}. \end{framed} \subsubsection{Sinusoidal sources} Here because I was asked for them. But how do you distinguish one from the other?! \begin{itemize} \circuititembip{sinusoidal voltage source}{Sinusoidal voltage source}{vsourcesin, sV} \circuititembip{sinusoidal current source}{Sinusoidal current source}{isourcesin, sI} \end{itemize} \subsubsection{Special sources} \begin{itemize} \circuititembip{square voltage source}{Square voltage source}{vsourcesquare, sqV} \circuititembip{vsourcetri}{Triangle voltage source}{tV} \circuititembip{esource}{Empty voltage source}{} \circuititembip{pvsource}{Photovoltaic-voltage source}{} \circuititembip{ioosource}{Double Zero style current source}{} \circuititembip{voosource}{Double Zero style voltage source}{} \end{itemize} \subsubsection{DC sources} \begin{itemize} \circuititembip{dcvsource}{DC voltage source}{} \circuititembip{dcisource}{DC current source}{} \end{itemize} \subsubsection{Mechanical Analogy} \begin{itemize} \circuititembip{damper}{Mechanical Damping}{} \circuititembip{spring}{Mechanical Stiffness}{} \circuititembip{mass}{Mechanical Mass}{} \end{itemize} \subsubsection{Switch} \begin{itemize} \circuititembip{switch}{Switch}{spst} \circuititembip{closing switch}{Closing switch}{cspst} \circuititembip{opening switch}{Opening switch}{ospst} \circuititembip{normal open switch}{Normally open switch}{nos} \circuititembip{normal closed switch}{Normally closed switch}{ncs} \circuititembip{push button}{Push button}{} \end{itemize} \subsubsection{Block diagram components} \noindent Contributed by Stefan Erhardt. \begin{itemize} \circuititembip{twoport}{generic two port\footnote{To specify text to be put in the component: \texttt{twoport[t=text]}): \tikz \draw[scale=.5, transform shape] (0,0) to[twoport,>,t=text] (2,0); }}{} \circuititembip{vco}{vco}{} \circuititembip{bandpass}{bandpass}{} \circuititembip{bandstop}{bandstop}{} \circuititembip{highpass}{highpass}{} \circuititembip{lowpass}{lowpass}{} \circuititembip{adc}{A/D converter}{} \circuititembip{dac}{D/A converter}{} \circuititembip{dsp}{DSP}{} \circuititembip{fft}{FFT}{} \circuititembip{amp}{amplifier}{} \circuititembip{vamp}{VGA}{} \circuititembip{piattenuator}{$\pi$ attenuator}{} \circuititembip{vpiattenuator}{var. $\pi$ attenuator}{} \circuititembip{tattenuator}{T attenuator}{} \circuititembip{vtattenuator}{var.\ T attenuator}{} \circuititembip{phaseshifter}{phase shifter}{} \circuititembip{vphaseshifter}{var.\ phase shifter}{} \circuititembip{detector}{detector}{} \end{itemize} \subsection{Tripoles} \subsubsection{Controlled sources} Admittedly, graphically they are bipoles. But I couldn't\ldots \begin{itemize} \circuititembip{european controlled voltage source}{Controlled voltage source (european style)}{} \circuititembip{american controlled voltage source}{Controlled voltage source (american style)}{} \circuititembip{european controlled current source}{Controlled current source (european style)}{} \circuititembip{american controlled current source}{Controlled current source (american style)}{} \end{itemize} \begin{framed} If (default behaviour) \texttt{europeancurrents} option is active (or the style \texttt{[european currents]} is used), the shorthands \texttt{controlled current source}, \texttt{cisource}, and \texttt{cI} are equivalent to \texttt{european controlled current source}. Otherwise, if \texttt{americancurrents} option is active (or the style \texttt{[american currents]} is used) they are equivalent to \texttt{american controlled current source}. Similarly, if (default behaviour) \texttt{europeanvoltages} option is active (or the style \texttt{[european voltages]} is used), the shorthands \texttt{controlled voltage source}, \texttt{cvsource}, and \texttt{cV} are equivalent to \texttt{european controlled voltage source}. Otherwise, if \texttt{americanvoltages} option is active (or the style \texttt{[american voltages]} is used) they are equivalent to \texttt{american controlled voltage source}. \end{framed} \begin{itemize} \circuititembip{controlled sinusoidal voltage source}{Controlled sinusoidal voltage source}{controlled vsourcesin, cvsourcesin, csV} \circuititembip{controlled sinusoidal current source}{Controlled sinusoidal current source}{controlled isourcesin, cisourcesin, csI} \end{itemize} \subsubsection{Transistors} \begin{itemize} \circuititem{nmos}{\scshape nmos}{} \circuititem{pmos}{\scshape pmos}{} \circuititem{npn}{\scshape npn}{} \circuititem{pnp}{\scshape pnp}{} \circuititem{npn,photo}{\scshape npn}{} \circuititem{pnp,photo}{\scshape pnp}{} \circuititem{nigbt}{\scshape nigbt}{} \circuititem{pigbt}{\scshape pigbt}{} \circuititem{Lnigbt}{\scshape Lnigbt}{} \circuititem{Lpigbt}{\scshape Lpigbt}{} \end{itemize} For all transistors a bodydiode(or freewheeling diode) can automatically be drawn. Just use the global option bodydiode, or for single transistors, the tikz-option bodydiode: \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) node[npn,bodydiode](npn){}++(2,0)node[pnp,bodydiode](npn){}; \draw (0,-2) node[nigbt,bodydiode](npn){}++(2,0)node[pigbt,bodydiode](npn){}; \draw (0,-4) node[nfet,bodydiode](npn){}++(2,0)node[pfet,bodydiode](npn){}; \end{circuitikz} \end{LTXexample} The Base/Gate connection of all transistors can be disable by using the options \textit{nogate} or \textit{nobase}, respectively. The Base/Gate anchors are floating, but there an additional anchor "nogate"/"nobase", which can be used to point to the unconnected base: \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (2,0) node[npn,nobase](npn){}; \draw (npn.E) node[below]{E}; \draw (npn.C) node[above]{C}; \draw (npn.B) node[circ]{} node[left]{B}; \draw[dashed,red,-latex] (1,0.5)--(npn.nobase); \end{circuitikz} \end{LTXexample} If the option \texttt{arrowmos} is used (or after the command \verb!\ctikzset{tripoles/mos style/arrows}! is given), this is the output: \ctikzset{tripoles/mos style/arrows} \begin{itemize} \circuititem{nmos}{\scshape nmos}{} \circuititem{pmos}{\scshape pmos}{} \end{itemize} \ctikzset{tripoles/mos style/no arrows} To draw the PMOS circle non-solid, use the option \texttt{emptycircle} or the command \verb!\ctikzset{tripoles/pmos style/emptycircle}!. \begin{itemize} \circuititem{pmos,emptycircle}{\scshape pmos}{} \end{itemize} \textsc{nfet}s and \textsc{pfet}s have been incorporated based on code provided by Clemens Helfmeier and Theodor Borsche. Use the package options \texttt{fetsolderdot}/\texttt{nofetsolderdot} to enable/disable solderdot at some fet-transistors. Additionally, the solderdot option can be enabled/disabled for single transistors with the option "solderdot" and "nosolderdot", respectively. \begin{itemize} \circuititem{nfet}{\scshape nfet}{} \circuititem{nigfete}{\scshape nigfete}{} \circuititem{nigfete,solderdot}{\scshape nigfete}{} \circuititem{nigfetebulk}{\scshape nigfetebulk}{} \circuititem{nigfetd}{\scshape nigfetd}{} \circuititem{pfet}{\scshape pfet}{} \circuititem{pigfete}{\scshape pigfete}{} \circuititem{pigfetebulk}{\scshape pigfetebulk}{} \circuititem{pigfetd}{\scshape pigfetd}{} \end{itemize} \textsc{njfet} and \textsc{pjfet} have been incorporated based on code provided by Danilo Piazzalunga: \begin{itemize} \circuititem{njfet}{\scshape njfet}{} \circuititem{pjfet}{\scshape pjfet}{} \end{itemize} \textsc{isfet} \begin{itemize} \circuititem{isfet}{\scshape isfet}{} \end{itemize} \subsubsection{Electronic Tubes} \begin{itemize} \circuititem{magnetron}{Magnetron}{} \end{itemize} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,-2)node[rground](gnd){} to[voltage source,v<={HV}]++(0,3)--++(1,0)to[V,n=DC]++(2,0); \draw (2,-1) node[magnetron,scale=1](magn){}; \draw (DC.left)++(-0.2,0)to [short,*-] ++(0,-1) to [short] (magn.cathode1); \draw (DC.right)++(0.2,0)to [short,*-] ++(0,-1) to [short] (magn.cathode2); \draw (magn.anode) to [short] (magn.anode|-gnd) node[rground]{}; \draw (magn.cathode1)node[above]{$1$}; \draw (magn.cathode2)node[above]{$2$}; \draw[->](magn.east) --++(1,0)node[right]{$RF_{out}$}; \end{circuitikz} \end{LTXexample} \subsubsection{Block diagram} These come from Stefan Erhardt's contribution of block diagram components. Add a box around them with the option \texttt{box}. \begin{itemize} \circuititem{mixer}{\scshape mixer}{} \circuititem{adder}{\scshape adder}{} \circuititem{oscillator}{\scshape oscillator}{} \circuititem{circulator}{\scshape circulator}{} \circuititem{wilkinson}{\scshape wilkinson divider}{} \end{itemize} \subsubsection{Switch} \begin{itemize} \circuititem{spdt}{\scshape spdt}{} \circuititembip{toggle switch}{Toggle switch}{} \end{itemize} \subsubsection{Electro-Mechanical Devices} \begin{itemize} \circuititem{elmech}{\scshape Motor}{M} \circuititem{elmech}{\scshape Generator}{G} \end{itemize} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (2,0) node[elmech](motor){M}; \draw (motor.north) |-(0,2) to [R] ++(0,-2) to[dcvsource]++(0,-2) -| (motor.bottom); \draw[thick,->>](motor.right)--++(1,0)node[midway,above]{$\omega$}; \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (2,0) node[elmech](motor){}; \draw (motor.north) |-(0,2) to [R] ++(0,-2) to[dcvsource]++(0,-2) -| (motor.bottom); \draw[thick,->>](motor.center)--++(1.5,0)node[midway,above]{$\omega$}; \end{circuitikz} \end{LTXexample} The symbols can also be used along a path, using the transistor-path-syntax(T in front of the shape name, see section \ref{sec:transasbip}). Don´t forget to use parameter $n$ to name the node and get acces to the anchors: \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to [Telmech=M,n=motor] ++(0,-3) to [Telmech=M] ++(3,0) to [Telmech=G,n=generator] ++(0,3) to [R] (0,0); \draw[thick,->>](motor.left)--(generator.left)node[midway,above]{$\omega$}; \end{circuitikz} \end{LTXexample} \subsection{Double bipoles} Transformers automatically use the inductor shape currently selected. These are the three possibilities: \begin{itemize} \ctikzset{inductor=cute} \circuititem{transformer}{Transformer (cute inductor)}{} \ctikzset{inductor=american} \circuititem{transformer}{Transformer (american inductor)}{} \ctikzset{inductor=european} \circuititem{transformer}{Transformer (european inductor)}{} \end{itemize} Transformers with core are also available: \begin{itemize} \ctikzset{inductor=cute} \circuititem{transformer core}{Transformer core (cute inductor)}{} \ctikzset{inductor=american} \circuititem{transformer core}{Transformer core (american inductor)}{} \ctikzset{inductor=european} \circuititem{transformer core}{Transformer core (european inductor)}{} \ctikzset{inductor=cute} \end{itemize} \begin{itemize} \circuititem{gyrator}{Gyrator}{} \circuititem{coupler}{Coupler}{} \circuititem{coupler2}{Coupler, 2}{} \end{itemize} \subsection{Logic gates} \subsubsection{American Logic gates} \begin{itemize} \circuititem{american and port}{American \textsc{and} port}{} \circuititem{american or port}{American \textsc{or} port}{} \circuititem{american not port}{American \textsc{not} port}{} \circuititem{american nand port}{American \textsc{nand} port}{} \circuititem{american nor port}{American \textsc{nor} port}{} \circuititem{american xor port}{American \textsc{xor} port}{} \circuititem{american xnor port}{American \textsc{xnor} port}{} \end{itemize} \subsubsection{European Logic gates} \begin{itemize} \circuititem{european and port}{European \textsc{and} port}{} \circuititem{european or port}{European \textsc{or} port}{} \circuititem{european not port}{European \textsc{not} port}{} \circuititem{european nand port}{European \textsc{nand} port}{} \circuititem{european nor port}{European \textsc{nor} port}{} \circuititem{european xor port}{European \textsc{xor} port}{} \circuititem{european xnor port}{European \textsc{xnor} port}{} \end{itemize} \begin{framed} If (default behaviour) \texttt{americanports} option is active (or the style \texttt{[american ports]} is used), the shorthands \texttt{and port}, \texttt{or port}, \texttt{not port}, \texttt{nand port}, \texttt{not port}, \texttt{xor port}, and \texttt{xnor port} are equivalent to the american version of the respective logic port. If otherwise \texttt{europeanports} option is active (or the style \texttt{[european ports]} is used), the shorthands \texttt{and port}, \texttt{or port}, \texttt{not port}, \texttt{nand port}, \texttt{not port}, \texttt{xor port}, and \texttt{xnor port} are equivalent to the european version of the respective logic port. \end{framed} \begin{itemize} \circuititem{schmitt}{Non-Inverting \textsc{Schmitttrigger}}{} \circuititem{invschmitt}{Inverting \textsc{Schmitttrigger}}{} \end{itemize} \subsection{Amplifiers} \begin{itemize} \circuititem{op amp}{Operational amplifier}{} \circuititem{en amp}{Operational amplifier compliant to DIN/EN 60617 standard}{} \circuititem{fd op amp}{Fully differential operational amplifier\footnote{Contributed by Kristofer M. Monisit.}}{} \circuititem{gm amp}{transconductance amplifier}{} \circuititem{plain amp}{Plain amplifier}{} \circuititem{buffer}{Buffer}{} \end{itemize} \subsection{Support shapes} \begin{itemize} \circuititem{currarrow}{Arrows (current and voltage)}{} \circuititem{inputarrow}{Arrow to draw at its tip, useful for block diagrams.}{} \circuititem{circ}{Connected terminal}{} \circuititem{ocirc}{Unconnected terminal}{} \circuititem{diamondpole}{Diamond-style terminal}{} \end{itemize} \section{Usage} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R, l=$R_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R=$R_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R, i=$i_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R, v=$v_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R=$R_1$, i=$i_1$, v=$v_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R=$R_1$, i=$i_1$, v=$v_1$] (2,0); \end{circuitikz} \end{LTXexample} Long names/styles for the bipoles can be used: \begin{LTXexample}[varwidth=true] \begin{circuitikz}\draw (0,0) to[resistor=1<\rm{k}\Omega>] (2,0) ;\end{circuitikz} \end{LTXexample} \subsection{Labels and Annotations} Since Version 0.7, beside the original label (l) option, there is a new option to place a second label, called annotation (a) at each bipole. Up to now this is a beta-test and there can be problems. For example, up to now this option is not compatible with the concurrent use of voltage labels. The position of (a) and (l) labels can be adjusted with \_ and \^, respectively. \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R, l=$R_1$,a=1<\rm{k}\Omega>] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R, l_=$R_1$,a^=1<\rm{k}\Omega>] (2,0); \end{circuitikz} \end{LTXexample} \noindent The default orientation of labels is controlled by the options \texttt{smartlabels}, \texttt{rotatelabels} and \texttt{straightlabels} (or the corresponding \texttt{label/align} keys). Here are examples to see the differences: \begin{LTXexample}[varwidth=true] \begin{circuitikz} \ctikzset{label/align = straight} \def0,45,90,135,180,-90,-45,-135{0,45,90,135,180,-90,-45,-135} \foreach \i in 0,45,90,135,180,-90,-45,-135 { \draw (0,0) to[R=\i, *-o] (\i:2.5); } \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \ctikzset{label/align = rotate} \def0,45,90,135,180,-90,-45,-135{0,45,90,135,180,-90,-45,-135} \foreach \i in 0,45,90,135,180,-90,-45,-135 { \draw (0,0) to[R=\i, *-o] (\i:2.5); } \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \ctikzset{label/align = smart} \def0,45,90,135,180,-90,-45,-135{0,45,90,135,180,-90,-45,-135} \foreach \i in 0,45,90,135,180,-90,-45,-135 { \draw (0,0) to[R=\i, *-o] (\i:2.5); } \end{circuitikz} \end{LTXexample} \subsection{Currents}\pgfkeysvalueof{/tikz/dsp/label}}{currents} The counting direction of currents and voltages have changed with version 0.5, for compability reasons there is a option to use the olddirections(see options). For the new scheme, the following rules apply: \begin{itemize} \item \textbf{Normal bipoles:} currents and voltages are counted positiv in drawing direction. \item \textbf{Current Sources:} current is counted positiv in drawing direction, voltage in opposite direction \item \textbf{Voltage Sources:} voltage is counted positiv in drawing direction, current in opposite direction \end{itemize} With this convention, the power at loads is positive and negative at sources. \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R, i^>=$i_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R, i_>=$i_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R, i^<=$i_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R, i_<=$i_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R, i>^=$i_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R, i>_=$i_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R, i<^=$i_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R, i<_=$i_1$] (2,0); \end{circuitikz} \end{LTXexample} Also \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R, i<=$i_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R, i>=$i_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R, i^=$i_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R, i_=$i_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[V=10V, i_=$i_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[V<=10V, i_=$i_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz}[american] \draw (0,0) to[V=10V, i_=$i_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz}[american] \draw (0,0) to[V=10V,invert, i_=$i_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz}[american] \draw (0,0) to[dcisource=1A, i_=$i_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz}[american] \draw (0,0) to[dcisource=1A,invert, i_=$i_1$] (2,0); \end{circuitikz} \end{LTXexample} \subsection{Flows}\pgfkeysvalueof{/tikz/dsp/label}}{flows} As an alternative for the current arrows, you can also use the following flows. They can also be used to indicate thermal or power flows. The syntax is pretty the same as for currents. \textit{This is a new beta feature since version 0.8.3, therefore, please provide bugreports or hints to optimize this feature regarding placement and appearance! This means, that the appearance may change in the future!} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R, f=$i_1$] (3,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R, f<=$i_1$] (3,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R, f_=$i_1$] (3,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R, f_>=$i_1$] (3,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R, f<^=$i_1$] (3,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R, f<_=$i_1$] (3,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R, f>_=$i_1$] (3,0); \end{circuitikz} \end{LTXexample} \subsection{Voltages} See introduction note at Currents (chapter \ref{currents}, page \pageref{currents})! \subsubsection{European style} The default, with arrows. Use option \texttt{europeanvoltage} or style \verb![european voltages]!. \begin{LTXexample}[varwidth=true] \begin{circuitikz}[european voltages] \draw (0,0) to[R, v^>=$v_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz}[european voltages] \draw (0,0) to[R, v^<=$v_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz}[european voltages] \draw (0,0) to[R, v_>=$v_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz}[european voltages] \draw (0,0) to[R, v_<=$v_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[V=10V, i_=$i_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[V<=10V, i_=$i_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[I=1A, v_=$u_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[I<=1A, v_=$u_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[I=$~$,l=1A, v_=$u_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[I,l=1A, v_=$u_1$] (2,0); \end{circuitikz} \end{LTXexample} \subsubsection{American style} For those who like it (not me). Use option \texttt{americanvoltage} or set \verb![american voltages]!. \begin{LTXexample}[varwidth=true] \begin{circuitikz}[american voltages] \draw (0,0) to[R, v^>=$v_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz}[american voltages] \draw (0,0) to[R, v^<=$v_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz}[american voltages] \draw (0,0) to[R, v_>=$v_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz}[american voltages] \draw (0,0) to[R, v_<=$v_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz}[american] \draw (0,0) to[I=1A, v_=$u_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz}[american] \draw (0,0) to[I<=1A, v_=$i_1$] (2,0); \end{circuitikz} \end{LTXexample} \subsection{Nodes} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R, o-o] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R, -o] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R, o-] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R, *-*] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R, -*] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R, *-] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R, d-d] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R, -d] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R, d-] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R, o-*] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R, *-o] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R, o-d] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R, d-o] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R, *-d] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R, d-*] (2,0); \end{circuitikz} \end{LTXexample} \subsection{Special components} For some components label, current and voltage behave as one would expect: \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[I=$a_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[I, i=$a_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[cI=$k\cdot a_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[sI=$a_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[csI=$k\cdot a_1$] (2,0); \end{circuitikz} \end{LTXexample} The following results from using the option \texttt{americancurrent} or using the style \verb![american currents]!. \begin{LTXexample}[varwidth=true] \begin{circuitikz}[american currents] \draw (0,0) to[I=$a_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz}[american currents] \draw (0,0) to[I, i=$a_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz}[american currents] \draw (0,0) to[cI=$k\cdot a_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz}[american currents] \draw (0,0) to[sI=$a_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz}[american currents] \draw (0,0) to[csI=$k\cdot a_1$] (2,0); \end{circuitikz} \end{LTXexample} The same holds for voltage sources: \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[V=$a_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[V, v=$a_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[cV=$k\cdot a_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[sV=$a_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[csV=$k\cdot a_1$] (2,0); \end{circuitikz} \end{LTXexample} The following results from using the option \texttt{americanvoltage} or the style \verb![american voltages]!. \begin{LTXexample}[varwidth=true] \begin{circuitikz}[american voltages] \draw (0,0) to[V=$a_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz}[american voltages] \draw (0,0) to[V, v=$a_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz}[american voltages] \draw (0,0) to[cV=$k v_e$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz}[american voltages] \draw (0,0) to[sV=$a_1$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz}[american voltages] \draw (0,0) to[csV=$k v_e$] (2,0); \end{circuitikz} \end{LTXexample} \subsection{Integration with {\ttfamily siunitx}} If the option {\ttfamily siunitx} is active (and \emph{not} in Con\TeX t), then the following are equivalent: \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R, l=1<\rm{k}\Omega>] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R, l=$\SI{1}{\rm{k}\Omega}$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R, i=1<\rm{m}\rm{A}>] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R, i=$\SI{1}{\rm{m}\rm{A}}$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R, v=1<\rm{V}>] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R, v=$\SI{1}{\rm{V}}$] (2,0); \end{circuitikz} \end{LTXexample} \subsection{Mirroring and Inverting} Bipole paths can also mirrored and inverted (or reverted) to change the drawing direction. \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[pD] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[pD, mirror] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[pD, invert] (2,0); \end{circuitikz} \end{LTXexample} Placing labels, currents and voltages works also, please note, that mirroring and inverting does not incfluence the positioning of labels and voltages. Labels are by default above/right of the bipole and voltages below/left, respectively. \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[ospst=T, i=$i_1$, v=$v$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[ospst=T, mirror, i=$i_1$, v=$v$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[ospst=T, invert, i=$i_1$, v=$v$] (2,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[ospst=T,mirror,invert, i=$i_1$, v=$v$] (2,0); \end{circuitikz} \end{LTXexample} \subsection{Putting them together} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[R=1<\rm{k}\Omega>, i>_=1<\rm{m}\rm{A}>, o-*] (3,0); \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[D*, v=$v_D$, i=1<\rm{m}\rm{A}>, o-*] (3,0); \end{circuitikz} \end{LTXexample} \subsection{Line joins between Path Components} Line joins should be calculated correctly, if the were on the same path and if the path is not closed. For example, the following path is not closed correctly(\textit{--cycle} does not work here!): \begin{LTXexample}[varwidth=true] \begin{tikzpicture}[line width=3pt,european] \draw (0,0) to[R]++(2,0)to[R]++(0,2) --++(-2,0)to[R]++(0,-2); \draw[red,line width=1pt] circle(2mm); \end{tikzpicture} \end{LTXexample} To correct the line ending, there are support shapes to fill the missing rectangle. They can be used like the support shapes(*,o,d) using a dot (.) on one or both ends of a component(have a look at the last resistor in this example: \begin{LTXexample}[varwidth=true] \begin{tikzpicture}[line width=3pt,european] \draw (0,0) to[R]++(2,0)to[R]++(0,2) --++(-2,0)to[R,-.]++(0,-2); \draw[red,line width=1pt] circle(2mm); \end{tikzpicture} \end{LTXexample} \section{Not only bipoles} Since only bipoles (but see section~\ref{sec:transasbip}) can be placed "along a line", components with more than two terminals are placed as nodes: \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) node[npn](npn) at (0,0) {}; \draw (npn.C) --++(0,0.5) node[vcc]{+5\,\textnormal{V}}; \draw (npn.E) --++(0,-0.5) node[vee]{-5\,\textnormal{V}}; \end{circuitikz} \end{LTXexample} \subsection{Anchors} In order to allow connections with other components, all components define anchors. \subsubsection{Logical ports} All logical ports, except \textsc{not}, have two inputs and one output. They are called respectively \texttt{in 1}, \texttt{in 2}, \texttt{out}: \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) node[and port] (myand) {} (myand.in 1) node[anchor=east] {1} (myand.in 2) node[anchor=east] {2} (myand.out) node[anchor=west] {3} ;\end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,2) node[and port] (myand1) {} (0,0) node[and port] (myand2) {} (2,1) node[xnor port] (myxnor) {} (myand1.out) -| (myxnor.in 1) (myand2.out) -| (myxnor.in 2) ;\end{circuitikz} \end{LTXexample} In the case of \textsc{not}, there are only \texttt{in} and \texttt{out} (although for compatibility reasons \texttt{in 1} is still defined and equal to \texttt{in}): \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (1,0) node[not port] (not1) {} (3,0) node[not port] (not2) {} (0,0) -- (not1.in) (not2.in) -- (not1.out) ++(0,-1) node[ground] {} to[C] (not1.out) (not2.out) -| (4,1) -| (0,0) ;\end{circuitikz} \end{LTXexample} \subsubsection{Transistors} For \textsc{nmos}, \textsc{pmos}, \textsc{nfet}, \textsc{nigfete}, \textsc{nigfetd}, \textsc{pfet}, \textsc{pigfete}, and \textsc{pigfetd} transistors one has \texttt{base}, \texttt{gate}, \texttt{source} and \texttt{drain} anchors (which can be abbreviated with \texttt{B}, \texttt{G}, \texttt{S} and \texttt{D}): \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) node[nmos] (mos) {} (mos.gate) node[anchor=east] {G} (mos.drain) node[anchor=south] {D} (mos.source) node[anchor=north] {S} ;\end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) node[pigfete] (pigfete) {} (pigfete.G) node[anchor=east] {G} (pigfete.D) node[anchor=north] {D} (pigfete.S) node[anchor=south] {S} (pigfete.bulk) node[anchor=west] {Bulk} ;\end{circuitikz} \end{LTXexample} Similarly \textsc{njfet} and \textsc{pjfet} have \texttt{gate}, \texttt{source} and \texttt{drain} anchors (which can be abbreviated with \texttt{G}, \texttt{S} and \texttt{D}): \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) node[pjfet] (pjfet) {} (pjfet.G) node[anchor=east] {G} (pjfet.D) node[anchor=north] {D} (pjfet.S) node[anchor=south] {S} ;\end{circuitikz} \end{LTXexample} For \textsc{npn}, \textsc{pnp}, \textsc{nigbt}, and \textsc{pigbt} transistors the anchors are \texttt{base}, \texttt{emitter} and \texttt{collector} anchors (which can be abbreviated with \texttt{B}, \texttt{E} and \texttt{C}): \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) node[npn] (npn) {} (npn.base) node[anchor=east] {B} (npn.collector) node[anchor=south] {C} (npn.emitter) node[anchor=north] {E} ;\end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) node[pigbt] (pigbt) {} (pigbt.B) node[anchor=east] {B} (pigbt.C) node[anchor=north] {C} (pigbt.E) node[anchor=south] {E} ;\end{circuitikz} \end{LTXexample} Here is one composite example (please notice that the \texttt{xscale=-1} style would also reflect the label of the transistors, so here a new node is added and its text is used, instead of that of \texttt{pnp1}): \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) node[pnp] (pnp2) {2} (pnp2.B) node[pnp, xscale=-1, anchor=B] (pnp1) {} (pnp1) node {1} (pnp1.C) node[npn, anchor=C] (npn1) {} (pnp2.C) node[npn, xscale=-1, anchor=C] (npn2) {} (pnp1.E) -- (pnp2.E) (npn1.E) -- (npn2.E) (pnp1.B) node[circ] {} |- (pnp2.C) node[circ] {} ;\end{circuitikz} \end{LTXexample} Similarly, transistors and other components can be reflected vertically: \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) node[pigfete, yscale=-1] (pigfete) {} (pigfete.bulk) node[anchor=west] {Bulk} (pigfete.G) node[anchor=east] {G} (pigfete.D) node[anchor=south] {D} (pigfete.S) node[anchor=north] {S} ;\end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,2) node[rground, yscale=-1] {} to[R=$R_1$] (0,0) node[sground] {}; \end{circuitikz} \end{LTXexample} \subsubsection{Other tripoles} When inserting a thrystor, a triac or a potentiometer, one needs to refer to the third node--gate (\texttt{gate} or \texttt{G}) for the former two; wiper (\texttt{wiper} or \texttt{W}) for the latter one. This is done by giving a name to the bipole: \pgfkeysvalueof{/tikz/dsp/label}}{bipole-naming} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[Tr, n=TRI] (2,0) to[pR, n=POT] (4,0); \draw[dashed] (TRI.G) -| (POT.wiper) ;\end{circuitikz} \end{LTXexample} As for the switches: \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) node[spdt] (Sw) {} (Sw.in) node[left] {in} (Sw.out 1) node[right] {out 1} (Sw.out 2) node[right] {out 2} ;\end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[C] (1,0) to[toggle switch , n=Sw] (2.5,0) -- (2.5,-1) to[battery1] (1.5,-1) to[R] (0,-1) -| (0,0) (Sw.out 2) -| (2.5, 1) to[R] (0,1) -- (0,0) ;\end{circuitikz} \end{LTXexample} The ports of the mixer and adder can be addressed with numbers or \texttt{west}/\texttt{south}/\texttt{east}/\texttt{north}: \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) node[mixer] (mix) {} (mix.1) node[left] {1} (mix.2) node[below] {2} (mix.3) node[right] {3} (mix.4) node[above] {4} ;\end{circuitikz} \end{LTXexample} The Wilkinson divider has: \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) node[wilkinson] (w) {\SI{3}{dB}} (w.in) to[short,-o] ++(-0.5,0) (w.out1) to[short,-o] ++(0.5,0) (w.out2) to[short,-o] ++(0.5,0) (w.in) node[below left] {\texttt{in}} (w.out1) node[below right] {\texttt{out1}} (w.out2) node[above right] {\texttt{out2}} ; \end{circuitikz} \end{LTXexample} \subsubsection{Operational amplifier} The op amp defines the inverting input (\texttt{-}), the non-inverting input (\texttt{+}) and the output (\texttt{out}) anchors: \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) node[op amp] (opamp) {} (opamp.+) node[left] {$v_+$} (opamp.-) node[left] {$v_-$} (opamp.out) node[right] {$v_o$} (opamp.up) --++(0,0.5) node[vcc]{5\,\textnormal{V}} (opamp.down) --++(0,-0.5) node[vee]{-5\,\textnormal{V}} ;\end{circuitikz} \end{LTXexample} There are also two more anchors defined, \texttt{up} and \texttt{down}, for the power supplies: \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) node[op amp] (opamp) {} (opamp.+) node[left] {$v_+$} (opamp.-) node[left] {$v_-$} (opamp.out) node[right] {$v_o$} (opamp.down) node[ground] {} (opamp.up) ++ (0,.5) node[above] {\SI{12}{\rm{V}}} -- (opamp.up) ;\end{circuitikz} \end{LTXexample} The fully differential op amp defines two outputs: \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) node[fd op amp] (opamp) {} (opamp.+) node[left] {$v_+$} (opamp.-) node[left] {$v_-$} (opamp.out +) node[right] {out +} (opamp.out -) node[right] {out -} (opamp.down) node[ground] {} ;\end{circuitikz} \end{LTXexample} \subsubsection{Double bipoles} All the (few, actually) double bipoles/quadrupoles have the four anchors, two for each port. The first port, to the left, is port \texttt{A}, having the anchors \texttt{A1} (up) and \texttt{A2} (down); same for port \texttt{B}. They also expose the \texttt{base} anchor, for labelling: \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) node[transformer] (T) {} (T.A1) node[anchor=east] {A1} (T.A2) node[anchor=east] {A2} (T.B1) node[anchor=west] {B1} (T.B2) node[anchor=west] {B2} (T.base) node{K} ;\end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) node[gyrator] (G) {} (G.A1) node[anchor=east] {A1} (G.A2) node[anchor=east] {A2} (G.B1) node[anchor=west] {B1} (G.B2) node[anchor=west] {B2} (G.base) node{K} ;\end{circuitikz} \end{LTXexample} However: \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) node[coupler] (c) {\SI{10}{dB}} (c.1) to[short,-o] ++(-0.5,0) (c.2) to[short,-o] ++(0.5,0) (c.3) to[short,-o] ++(0.5,0) (c.4) to[short,-o] ++(-0.5,0) (c.1) node[below left] {\texttt{1}} (c.2) node[below right] {\texttt{2}} (c.3) node[above right] {\texttt{3}} (c.4) node[above left] {\texttt{4}} ; \end{circuitikz} \end{LTXexample} \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) node[coupler2] (c) {\SI{3}{dB}} (c.1) to[short,-o] ++(-0.5,0) (c.2) to[short,-o] ++(0.5,0) (c.3) to[short,-o] ++(0.5,0) (c.4) to[short,-o] ++(-0.5,0) (c.1) node[below left] {\texttt{1}} (c.2) node[below right] {\texttt{2}} (c.3) node[above right] {\texttt{3}} (c.4) node[above left] {\texttt{4}} ; \end{circuitikz} \end{LTXexample} \subsection{Input arrows} \subsubsection*{Two ports} With the option \texttt{>} you can draw an arrow to the input of the block diagram symbols. \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[short,o-] ++(0.3,0) to[lowpass,>] ++(2,0) to[adc,>] ++(2,0) to[short,-o] ++(0.3,0); \end{circuitikz} \end{LTXexample} \subsubsection*{Multi ports} Since inputs and outputs can vary, input arrows can be placed as nodes. Note that you have to rotate the arrow on your own: \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) node[mixer] (m) {} (m.1) to[short,-o] ++(-1,0) (m.2) to[short,-o] ++(0,-1) (m.3) to[short,-o] ++(1,0) (m.1) node[inputarrow] {} (m.2) node[inputarrow,rotate=90] {}; \end{circuitikz} \end{LTXexample} \subsection{Labels and custom twoport boxes} Some twoports have the option to place a normal label (\texttt{l=}) and a inner label (\texttt{t=}). \begin{LTXexample}[varwidth=true] \begin{circuitikz} \ctikzset{bipoles/amp/width=0.9} \draw (0,0) to[amp,t=LNA,l_=$F{=}0.9\,$dB,o-o] ++(3,0); \end{circuitikz} \end{LTXexample} \subsection{Box option} Some devices have the possibility to add a box around them. The inner symbol scales down to fit inside the box. \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) node[mixer,box,anchor=east] (m) {} to[amp,box,>,-o] ++(2.5,0) (m.west) node[inputarrow] {} to[short,-o] ++(-0.8,0) (m.south) node[inputarrow,rotate=90] {} -- ++(0,-0.7) node[oscillator,box,anchor=north] {}; \end{circuitikz} \end{LTXexample} \subsection{Dash optional parts} To show that a device is optional, you can dash it. The inner symbol will be kept with solid lines. \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[amp,l=\SI{10}{dB}] ++(2.5,0); \draw[dashed] (2.5,0) to[lowpass,l=opt.] ++(2.5,0); \end{circuitikz} \end{LTXexample} \subsection{Transistor paths}\pgfkeysvalueof{/tikz/dsp/label}}{sec:transasbip} For syntactical convenience transistors can be placed using the normal path notation used for bipoles. The transitor type can be specified by simply adding a ``T'' (for transistor) in front of the node name of the transistor. It will be placed with the base/gate orthogonal to the direction of the path: \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) node[njfet] {1} (-1,2) to[Tnjfet=2] (1,2) to[Tnjfet=3, mirror] (3,2); ;\end{circuitikz} \end{LTXexample} Access to the gate and/or base nodes can be gained by naming the transistors with the \texttt{n} or \texttt{name} path style: \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw[yscale=1.1, xscale=.8] (2,4.5) -- (0,4.5) to[Tpmos, n=p1] (0,3) to[Tnmos, n=n1] (0,1.5) to[Tnmos, n=n2] (0,0) node[ground] {} (2,4.5) to[Tpmos,n=p2] (2,3) to[short, -*] (0,3) (p1.G) -- (n1.G) to[short, *-o] ($(n1.G)+(3,0)$) (n2.G) ++(2,0) node[circ] {} -| (p2.G) (n2.G) to[short, -o] ($(n2.G)+(3,0)$) (0,3) to[short, -o] (-1,3) ;\end{circuitikz} \end{LTXexample} The \texttt{name} property is available also for bipoles, although this is useful mostly for triac, potentiometer and thyristor (see~\ref{sec:othertrip}). \section{Customization} \subsection{Parameters} Pretty much all CircuiTi\emph{k}Z\ relies heavily on \texttt{pgfkeys} for value handling and configuration. Indeed, at the beginning of \texttt{circuitikz.sty} a series of key definitions can be found that modify all the graphical characteristics of the package. All can be varied using the \verb!\ctikzset! command, anywhere in the code. \paragraph{Shape of the components} (on a per-component-class basis) \begin{LTXexample}[varwidth=true] \tikz \draw (0,0) to[R=1<\Omega>] (2,0); \par \ctikzset{bipoles/resistor/height=.6} \tikz \draw (0,0) to[R=1<\Omega>] (2,0); \end{LTXexample} \begin{LTXexample}[varwidth=true] \tikz \draw (0,0) node[nand port] {}; \par \ctikzset{tripoles/american nand port/input height=.2} \ctikzset{tripoles/american nand port/port width=.2} \tikz \draw (0,0) node[nand port] {}; \end{LTXexample} \paragraph{Thickness of the lines} (globally) \begin{LTXexample}[varwidth=true] \tikz \draw (0,0) to[C=1<\rm{F}>] (2,0); \par \ctikzset{bipoles/thickness=1} \tikz \draw (0,0) to[C=1<\rm{F}>] (2,0); \end{LTXexample} \paragraph{Global properties} Of voltage and current \begin{LTXexample}[varwidth=true] \tikz \draw (0,0) to[R, v=1<\rm{V}>] (2,0); \par \ctikzset{voltage/distance from node=.1} \tikz \draw (0,0) to[R, v=1<\rm{V}>] (2,0); \end{LTXexample} \begin{LTXexample}[varwidth=true] \tikz \draw (0,0) to[C, i=$\imath$] (2,0); \par \ctikzset{current/distance = .2} \tikz \draw (0,0) to[C, i=$\imath$] (2,0); \end{LTXexample} \noindent However, you can override the properties \verb!voltage/distance from node!\footnote{That is, how distant from the initial and final points of the path the arrow starts and ends.}, \verb!voltage/bump b!\footnote{Controlling how high the bump of the arrow is --- how curved it is.} and \verb!voltage/european label distance!\footnote{Controlling how distant from the bipole the voltage label will be.} on a per-component basis, in order to fine-tune the voltages: \begin{LTXexample}[varwidth=true] \tikz \draw (0,0) to[R, v=1<\rm{V}>] (1.5,0) to[C, v=2<\rm{V}>] (3,0); \par \ctikzset{bipoles/capacitor/voltage/% distance from node/.initial=.7} \tikz \draw (0,0) to[R, v=1<\rm{V}>] (1.5,0) to[C, v=2<\rm{V}>] (3,0); \par \end{LTXexample} \noindent Admittedly, not all graphical properties have understandable names, but for the time it will have to do: \begin{LTXexample}[varwidth=true] \tikz \draw (0,0) node[xnor port] {}; \ctikzset{tripoles/american xnor port/aaa=.2} \ctikzset{tripoles/american xnor port/bbb=.6} \tikz \draw (0,0) node[xnor port] {}; \end{LTXexample} \subsection{Components size} Perhaps the most important parameter is \verb!/tikz/circuitikz/bipoles/length!, which can be interpreted as the length of a resistor (including reasonable connections): all other lenghts are relative to this value. For instance: \begin{LTXexample}[pos=t,varwidth=true] \ctikzset{bipoles/length=1.4cm} \begin{circuitikz}[scale=1.2]\draw (0,0) node[anchor=east] {B} to[short, o-*] (1,0) to[R=20<\Omega>, *-*] (1,2) to[R=10<\Omega>, v=$v_x$] (3,2) -- (4,2) to[cI=$\frac{\si{\rm{S}}}{5} v_x$, *-*] (4,0) -- (3,0) to[R=5<\Omega>, *-*] (3,2) (3,0) -- (1,0) (1,2) to[short, -o] (0,2) node[anchor=east]{A} ;\end{circuitikz} \end{LTXexample} \begin{LTXexample}[pos=t,varwidth=true] \ctikzset{bipoles/length=.8cm} \begin{circuitikz}[scale=1.2]\draw (0,0) node[anchor=east] {B} to[short, o-*] (1,0) to[R=20<\Omega>, *-*] (1,2) to[R=10<\Omega>, v=$v_x$] (3,2) -- (4,2) to[cI=$\frac{\rm{S}}{5} v_x$, *-*] (4,0) -- (3,0) to[R=5<\Omega>, *-*] (3,2) (3,0) -- (1,0) (1,2) to[short, -o] (0,2) node[anchor=east]{A} ;\end{circuitikz} \end{LTXexample} \subsection{Colors} The color of the components is stored in the key \verb!/tikz/circuitikz/color!. CircuiTi\emph{k}Z\ tries to follow the color set in Ti\emph{k}Z, although sometimes it fails. If you change color in the picture, please do not use just the color name as a style, like \verb![red]!, but rather assign the style \verb![color=red]!. Compare for instance \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw[red] (0,2) node[and port] (myand1) {} (0,0) node[and port] (myand2) {} (2,1) node[xnor port] (myxnor) {} (myand1.out) -| (myxnor.in 1) (myand2.out) -| (myxnor.in 2) ;\end{circuitikz} \end{LTXexample} and \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw[color=red] (0,2) node[and port] (myand1) {} (0,0) node[and port] (myand2) {} (2,1) node[xnor port] (myxnor) {} (myand1.out) -| (myxnor.in 1) (myand2.out) -| (myxnor.in 2) ;\end{circuitikz} \end{LTXexample} One can of course change the color \emph{in medias res}: \begin{LTXexample}[pos=t, varwidth=true] \begin{circuitikz} \draw (0,0) node[pnp, color=blue] (pnp2) {} (pnp2.B) node[pnp, xscale=-1, anchor=B, color=brown] (pnp1) {} (pnp1.C) node[npn, anchor=C, color=green] (npn1) {} (pnp2.C) node[npn, xscale=-1, anchor=C, color=magenta] (npn2) {} (pnp1.E) -- (pnp2.E) (npn1.E) -- (npn2.E) (pnp1.B) node[circ] {} |- (pnp2.C) node[circ] {} ;\end{circuitikz} \end{LTXexample} The all-in-one stream of bipoles poses some challanges, as only the actual body of the bipole, and not the connecting lines, will be rendered in the specified color. Also, please notice the curly braces around the \texttt{to}: \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0) to[V=1<\rm{V}>] (0,2) { to[R=1<\Omega>, color=red] (2,2) } to[C=1<\rm{F}>] (2,0) -- (0,0) ;\end{circuitikz} \end{LTXexample} Which, for some bipoles, can be frustrating: \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw (0,0){to[V=1<\rm{V}>, color=red] (0,2) } to[R=1<\Omega>] (2,2) to[C=1<\rm{F}>] (2,0) -- (0,0) ;\end{circuitikz} \end{LTXexample} The only way out is to specify different paths: \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw[color=red] (0,0) to[V=1<\rm{V}>, color=red] (0,2); \draw (0,2) to[R=1<\Omega>] (2,2) to[C=1<\rm{F}>] (2,0) -- (0,0) ;\end{circuitikz} \end{LTXexample} And yes: this is a bug and \emph{not} a feature\ldots \section{FAQ} \noindent Q: When using \verb!\tikzexternalize! I get the following error: \begin{verbatim} ! Emergency stop. \end{verbatim} \noindent A: The Ti\emph{k}Z\ manual states: \begin{quotation} Furthermore, the library assumes that all \LaTeX\ pictures are ended with \verb!\end{tikzpicture}!. \end{quotation} Just substitute every occurrence of the environment \verb!circuitikz! with \verb!tikzpicture!. They are actually pretty much the same. \bigskip \noindent Q: How do I draw the voltage between two nodes? \noindent A: Between any two nodes there is an open circuit! \begin{LTXexample}[varwidth=true] \begin{circuitikz} \draw node[ocirc] (A) at (0,0) {} node[ocirc] (B) at (2,1) {} (A) to[open, v=$v$] (B) ;\end{circuitikz} \end{LTXexample} \bigskip \noindent Q: I cannot write \verb!to[R = $R_1=12V$]! nor \verb!to[ospst = open, 3s]!: I get errors. \noindent A: It is a limitation of the Ti\emph{k}Z\ parser. Use \verb!to[R = $R_1{=}12V$]! and \verb!to[ospst = open{,} 3s]! instead. \section{Examples} \begin{LTXexample}[pos=t,varwidth=true] \begin{circuitikz}[scale=1.4]\draw (0,0) to[C, l=10<\mu\rm{F}>] (0,2) -- (0,3) to[R, l=2.2<\rm{k}\Omega>] (4,3) -- (4,2) to[L, l=12<\rm{m}\rm{H}>, i=$i_1$,v=b] (4,0) -- (0,0) (4,2) { to[D*, *-*, color=red] (2,0) } (0,2) to[R, l=1<\rm{k}\Omega>, *-] (2,2) to[cV, i=1,v=$\SI{.3}{\rm{k}\Omega} i_1$] (4,2) (2,0) to[I, i=1<\rm{m}\rm{A}>, -*] (2,2) ;\end{circuitikz} \end{LTXexample} \begin{LTXexample}[pos=t,varwidth=true] \begin{circuitikz}[scale=1.2]\draw (0,0) node[ground] {} to[V=$e(t)$, *-*] (0,2) to[C=4<\rm{n}\rm{F}>] (2,2) to[R, l_=.25<\rm{k}\Omega>, *-*] (2,0) (2,2) to[R=1<\rm{k}\Omega>] (4,2) to[C, l_=2<\rm{n}\rm{F}>, *-*] (4,0) (5,0) to[I, i_=$a(t)$, -*] (5,2) -- (4,2) (0,0) -- (5,0) (0,2) -- (0,3) to[L, l=2<\rm{m}\rm{H}>] (5,3) -- (5,2) {[anchor=south east] (0,2) node {1} (2,2) node {2} (4,2) node {3}} ;\end{circuitikz} \end{LTXexample} \begin{LTXexample}[pos=t,varwidth=true] \begin{circuitikz}[scale=1.2]\draw (0,0) node[anchor=east] {B} to[short, o-*] (1,0) to[R=20<\Omega>, *-*] (1,2) to[R=10<\Omega>, v=$v_x$] (3,2) -- (4,2) to[cI=$\frac{\rm{S}}{5} v_x$, *-*] (4,0) -- (3,0) to[R=5<\Omega>, *-*] (3,2) (3,0) -- (1,0) (1,2) to[short, -o] (0,2) node[anchor=east]{A} ;\end{circuitikz} \end{LTXexample} \begin{LTXexample}[pos=t,varwidth=true] \begin{circuitikz}[scale=1]\draw (0,0) node[transformer] (T) {} (T.B2) to[pD] ($(T.B2)+(2,0)$) -| (3.5, -1) (T.B1) to[pD] ($(T.B1)+(2,0)$) -| (3.5, -1) ;\end{circuitikz} \end{LTXexample} \begin{LTXexample}[pos=t,varwidth=true] \begin{circuitikz}[scale=1]\draw (5,.5) node [op amp] (opamp) {} (0,0) node [left] {$U_{we}$} to [R, l=$R_d$, o-*] (2,0) to [R, l=$R_d$, *-*] (opamp.+) to [C, l_=$C_{d2}$, *-] ($(opamp.+)+(0,-2)$) node [ground] {} (opamp.out) |- (3.5,2) to [C, l_=$C_{d1}$, *-] (2,2) to [short] (2,0) (opamp.-) -| (3.5,2) (opamp.out) to [short, *-o] (7,.5) node [right] {$U_{wy}$} ;\end{circuitikz} \end{LTXexample} \begin{LTXexample}[pos=t,varwidth=true] \begin{circuitikz}[scale=1.2, american]\draw (0,2) to[I=1<\rm{m}\rm{A}>] (2,2) to[R, l_=2<\rm{k}\Omega>, *-*] (0,0) to[R, l_=2<\rm{k}\Omega>] (2,0) to[V, v_=2<\rm{V}>] (2,2) to[cspst, l=$t_0$] (4,2) -- (4,1.5) to [generic, i=$i_1$, v=$v_1$] (4,-.5) -- (4,-1.5) (0,2) -- (0,-1.5) to[V, v_=4<\rm{V}>] (2,-1.5) to [R, l=1<\rm{k}\Omega>] (4,-1.5); \begin{scope}[xshift=6.5cm, yshift=.5cm] \draw [->] (-2,0) -- (2.5,0) node[anchor=west] {$v_1/\rm{V}$}; \draw [->] (0,-2) -- (0,2) node[anchor=west] {$i_1/\SI{}{\rm{m}\rm{A}}$} ; \draw (-1,0) node[anchor=north] {-2} (1,0) node[anchor=south] {2} (0,1) node[anchor=west] {4} (0,-1) node[anchor=east] {-4} (2,0) node[anchor=north west] {4} (-1.5,0) node[anchor=south east] {-3}; \draw [thick] (-2,-1) -- (-1,1) -- (1,-1) -- (2,0) -- (2.5,.5); \draw [dotted] (-1,1) -- (-1,0) (1,-1) -- (1,0) (-1,1) -- (0,1) (1,-1) -- (0,-1); \end{scope} \end{circuitikz} \end{LTXexample} \begin{LTXexample}[pos=t,varwidth=true] \begin{circuitikz}[scale=1] \ctikzset{bipoles/detector/width=.35} \ctikzset{quadpoles/coupler/width=1} \ctikzset{quadpoles/coupler/height=1} \ctikzset{tripoles/wilkinson/width=1} \ctikzset{tripoles/wilkinson/height=1} \draw (-2,0) node[wilkinson](w1){} (2,0) node[coupler] (c1) {} (0,2) node[coupler,rotate=90] (c2) {} (0,-2) node[coupler,rotate=90] (c3) {} (w1.out1) .. controls ++(0.8,0) and ++(0,0.8) .. (c3.3) (w1.out2) .. controls ++(0.8,0) and ++(0,-0.8) .. (c2.4) (c1.1) .. controls ++(-0.8,0) and ++(0,0.8) .. (c3.2) (c1.4) .. controls ++(-0.8,0) and ++(0,-0.8) .. (c2.1) (w1.in) to[short,-o] ++(-1,0) (w1.in) node[left=30] {LO} (c1.2) node[match,yscale=1] {} (c1.3) to[short,-o] ++(1,0) (c1.3) node[right=30] {RF} (c2.3) to[detector,-o] ++(0,1.5) (c2.2) to[detector,-o] ++(0,1.5) (c3.1) to[detector,-o] ++(0,-1.5) (c3.4) to[detector,-o] ++(0,-1.5) ; \end{circuitikz} \end{LTXexample} \begin{tabular}{l}\pgfkeysvalueof{/tikz/dsp/label}}{ex:compatibility} \IfFileExists{compatibility.pdf} {\fbox{\includegraphics{compatibility.pdf}}} \\ \begin{lstlisting} \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{circuits.ee.IEC} \usetikzlibrary{positioning} \usepackage[compatibility]{circuitikz} \ctikzset{bipoles/length=.9cm} \begin{document} \begin{tikzpicture}[circuit ee IEC] \draw (0,0) to [resistor={name=R}] (0,2) to[diode={name=D}] (3,2); \draw (0,0) to[*R=$R_1$] (1.5,0) to[*Tnpn] (3,0) to[*D](3,2); \end{tikzpicture} \end{document} \end{lstlisting} \end{tabular} \section{Changelog} \IfFileExists{changelog.tex} {\input{changelog.tex}} {The file changelog.tex was not found, run 'make changelog' at toplevel to generate it with pandoc from CHANGELOG.md} \printindex \end{document}
\section{Tree-structured Parzen Estimator}\label{sec:appendix_tpe} The tree-structured Parzen estimator \cite{bergstra2011algorithms, bergstra2013making} (TPE) is a sequential model-based optimization algorithm that uses Gaussian mixture models to approximate a black-box function $f$ and the Expected Improvement \cite{schonlau1998global} acquisition function to select the next sample. At a high level, TPE splits the evaluated points into two sets: good points and bad points (as determined by the objective function). It then creates two distributions, one for each set, and finds the next point to evaluate which has a high probability in the distribution over the good points and low probability in the distribution over the bad points. We next formally define the algorithm. Initially, $n_{\text{init}}$ samples are selected uniformally at random from the search space $\mathcal{X}$, and subsequently a model is used to guide the selection to the optimal location. TPE models each dimension of the search space independently using univariate Parzen window density estimation (or kernel density estimation) \cite{silverman1986density}. Assume for now that the search space is one-dimensional, i.e., $\mathcal{X} = [a, b]\subset \mathbb{R}$. Rather than model the posterior probability $p(y\mid x)$ directly, TPE exploits Bayes' rule, $p(y\mid x) \propto p(x\mid y)p(y)$, and models the likelihood $p(x\mid y)$ and the prior $p(y)$. To model the likelihood $p(x\mid y)$, the observations $D_t = \{(x_i , y_i = f(x_i))\}_{i=1}^t$ are first split into two sets, $D_t^g$ and $D_t^b$, based on their quality under $f$: $D_t^g$ contains the $\gamma-$quantile highest quality points, and $D_t^b$ contains the remaining points. Next, density functions $g(x)$ and $b(x)$ are created from the samples in $D_t^g$ and $D_t^b$ respectively. For each point $x\in D_t^g$, a Gaussian distribution is fit with mean $x$ and standard deviation set to the greater of the distances to its left and right neighbor. $g(x)$ is a uniform mixture of these distributions. The same process is performed to create the distribution $b(x)$ from the points in $D_t^b$. Formally, for a minimization problem, we have the likelihood $$p(x\mid y) = \begin{cases} g(x) & \text{ if } y < y^* \\ b(x) & \text{ if } y \ge y^* \end{cases}$$ where $y^*$ is the $\gamma-$quantile of the observed values The prior probability is $p(y<y^*)=\gamma$. TPE uses the prior and likelihood models to derive the Expected Improvement \cite{schonlau1998global} (EI) acquisition function. As the name suggests, EI involves computing how much improvement the objective function is expected to achieve over some threshold $y^*$ by sampling a given point. Formally, EI under some model $M$ of $f$ is defined as \begin{equation}\label{ei} EI_{y^*}(x)=\int_{-\infty}^{\infty}\max\{y^*-y, 0\}p_M(y\mid x)dy. \end{equation} For TPE, it follows from Equation~\ref{ei} that \begin{equation} EI_{y^*}(x)\propto \left(\gamma+\frac{b(x)}{g(x)}(1-\gamma)\right)^{-1} \end{equation} the proof of which can be found in \cite{bergstra2011algorithms}. This means that a point with high probability in $g(x)$ and low probability in $b(x)$ will maximize the EI. To find the next point to evaluate, TPE samples $n_{EI}$ candidate points from $g(x)$. Each of these points is evaluated by $g(x)/b(x)$, and the point with the highest value is suggested as the next point to be evaluated by $f$. For a $d-$dimensional search space, $d > 1$, TPE is performed independently for each dimension on each iteration. The full TPE algorithm is given in Algorithm~\ref{algo:tpe}. \begin{algorithm}[t] \caption{Tree-structured Parzen Estimator} \label{algo:tpe} \DontPrintSemicolon \SetKwInOut{Initialize}{Initialize} \SetAlgoLined \KwIn{$f, \mathcal{X}, n_{\text{init}}, n_{\text{iter}}, n_{EI}, \gamma$} \KwOut{The best performing point found by TPE} \textbf{Initialize:} Select $n_{\text{init}}$ points uniformally at random from $\mathcal{X}$, and create $D_{n_{\text{init}}} = \{(\textbf{x}_i , f(\textbf{x}_i))\}_{i=1}^{n_{\text{init}}}$\; \For{$t\leftarrow n_{\text{init}}$ \KwTo $n_{\text{iter}}$}{ Determine the $\gamma$-quantile point, $y^*$\; Split $D_t$ into $D_t^g$ and $D_t^b$ based on $y^*$\; \For{$i\leftarrow 1$ \KwTo $d$}{ Estimate $g(x)$ on the i$th$ dimension of $D_t^g$\; Estimate $b(x)$ on the i$th$ dimension of $D_t^b$\; Sample $n_{EI}$ points from $g(x)$\; Find the sampled point $x_{t + 1}^i$ with highest $g(x)/b(x)$\; } Update $D_{t+1} \leftarrow D_t\cup\{(\textbf{x}_{t + 1}, f(\textbf{x}_{t + 1}))\}$ } \KwRet{$(\textbf{x}, y)\in D_{n_{\text{iter}}}$ with the best objective function value} \; \end{algorithm} \section{\textsf{BOExplain}\xspace with Skewed Data}\label{sec:appendix_skew} In this section, we evaluate \textsf{BOExplain}\xspace in the presence of skewed data using the Adult Census Income dataset~\cite{Dua:2019}. This dataset contains 32,561 rows and 15 human variables from a 1994 census, and we use a random forest classifier to predict whether a person makes over \$50K a year. The ML pipeline is visualized in Figure~\ref{fig:pipeline_adult}, where the green box indicates that an explanation is derived from the training data. We split the data into 80\% for training and 20\% for inference. To define the ground truth corrupted data, we flipped the labels of training data tuples that satisfy the predicate $8\le\texttt{Education-Num}\le10 \wedge 30\le\texttt{Age}\le40$, which affects 16\% of the training data. On the inference data, we query the average predicted value for the group Male. To assess whether \textsf{BOExplain}\xspace can accurately remove the corrupted data, we define the objective function to minimize the distance between the query result on the passed data and the query result if executed on the data after filtering out the corrupted tuples. We use the two numerical search variables Education-Num and Age which have domains $[1, 16]$ and $[17, 90]$, respectively, to derive an explanation. \begin{figure} \centering \includegraphics[width=0.48\textwidth]{figs/pipelines_adult.pdf} \caption{ML Pipeline for the Adult dataset. In this experiment, an explanation is derived from the training data.} \label{fig:pipeline_adult} \end{figure} \begin{figure*}[!htbp] \centering \includegraphics[width=\textwidth]{figs/adult_results.pdf} \caption{Adult: best objective function value, F-score, precision, and recall found at each 5 second increment, averaged over 10 runs. The goal is to minimize the objective function.} \label{fig:adult_result} \end{figure*} The distribution of the search variable Education-Num is given in Figure~\ref{fig:edu_num_dist}, and as we can see, some values occur much more frequently than others. Next, we will investigate whether \textit{similar} predicates define sets of tuples with similar size. Define a predicate $[w, x]$ to be similar to a predicate $[y, z]$ if $w=y$ and $x=z+1$, or $w=y+1$ and $x=z$. For each pair of similar predicates, we compute the absolute value of the difference between the number of tuples that satisfy each predicate. The distribution is plotted in Figure~\ref{fig:diff_dist}. As there is a large representation close to zero, similar predicates usually define a similar set of tuples. However, sometimes this is not the case. For example, predicate $7 \le \text{Education-Num} \le 9$ satisfies 10,501 more tuples than predicate $7 \le \text{Education-Num} \le 8$. We ran \textsf{BOExplain}\xspace and random search for 200 seconds, and the results are shown in Figure~\ref{fig:adult_result}. \textsf{BOExplain}\xspace on average achieves an objective function result lower than Random before 45 seconds compared to Random's result at 200 seconds. \textsf{BOExplain}\xspace also outperforms Random in terms of F-score and precision. These results show that \textsf{BOExplain}\xspace can still perform well in the presence of skewed data. \begin{figure} \centering \begin{minipage}[t]{.22\textwidth} \centering \includegraphics[width=.99\linewidth]{figs/eduction_num_distribution.pdf} \captionof{figure}{Distribution of Education-Num} \label{fig:edu_num_dist} \end{minipage} \quad \begin{minipage}[t]{.22\textwidth} \centering \includegraphics[width=.99\linewidth]{figs/difference_in_size_distribution.pdf} \captionof{figure}{Distribution of the difference in the size of sets of tuples defined by similar predicates} \label{fig:diff_dist} \end{minipage} \end{figure} \section{The \textsf{BOExplain}\xspace Framework}\label{sec:background} This section introduces Bayesian optimization (BO) and presents the \textsf{BOExplain}\xspace framework. \subsection{Background}\label{tpe} Black-box optimization aims to find the global minima (or maxima) of a black-box function $f$ over a search space~$\mathcal{X}$, $$x^*=\min_{x\in\mathcal{X}}f(x).$$ BO is a sequential model-based optimization strategy to solve the problem, where \emph{sequential} means that BO is an iterative algorithm and \emph{model-based} means that BO builds surrogate models to estimate the behavior of $f$. \iffalse BO is a class of ML algorithms focused on finding the global minimizer (or maximizer) of a black-box function $f$ over a search space~$\mathcal{X}$, $$x^*=\min_{x\in\mathcal{X}}f(x).$$ In particular, BO is a sequential model-based optimization strategy; \textit{sequential} since it is an iterative algorithm, and \textit{model-based} since $f$ is approximated with a \emph{surrogate model} which is used to guide the optimization process. There are two components to BO: the surrogate model of $f$, and an \emph{acquisition function} which is used to select the point to evaluate on each iteration. At a high level, the algorithm is as follows: \begin{enumerate} \item Select the point $x$ that optimizes the acquisition function \item Evaluate $y=f(x)$ \item Update the surrogate model, and return to step (1) \end{enumerate} The algorithm repeats until the budget is exhausted. \fi \iffalse \begin{figure} \begin{subfigure}[t]{.23\textwidth} \centering \includegraphics[width=0.95\linewidth, keepaspectratio]{figs/tpe_ex_32.pdf} \caption{An example function with sampled points split into good and bad groups.} \label{fig:tpe_intro_pts} \end{subfigure}% \begin{subfigure}[t]{.23\textwidth} \centering \includegraphics[width=0.95\linewidth, height=110pt]{figs/tpe_ex_dists_32.pdf} \caption{Good and bad distributions.} \label{fig:tpe_intro_dists} \end{subfigure} \caption{The main idea of TPE.} \label{fig:tpe_intro} \end{figure} \fi \stitle{Tree-structured Parzen Estimator (TPE)}. TPE~\cite{bergstra2011algorithms, bergstra2013making} is a popular BO algorithm. It first initializes by evaluating $f$ on random samples from the search space. Then, it iteratively selects $x$ from the search space using an \emph{acquisition function} and evaluates $f(x)$. Let $D = \{(x_1, f(x_1)), (x_2, f(x_2)), \cdots, (x_t, f(x_t))\}$ denote the set of samples evaluated in previous iterations. TPE chooses the next sample as follows: \begin{enumerate}[leftmargin=*] \item Partition $D$ into sets $D^g$ and $D^b$, where $D^g$ consists of the set of $\gamma$-percentile points with the lowest $f(x)$ values in $D$, and $D^b$ consists of the remaining points ($\gamma$ is a user-definable parameter). Since the goal is minimize $f(x)$, $D^g$ is called the \emph{good-point set} and $D^b$ is called the \emph{bad-point set}. Intuitively, good points lead to smaller objective values than bad points. \item Use Parzen estimators (a.k.a kernel density estimators) to build a density model $g(x)$ and $b(x)$ over $D^g$ and $D^b$, respectively. Intuitively, given an unseen $x^*$ in the search space, the density models $g(x^*)$ and $b(x^*)$ can return the probability of $x^*$ being a good and bad point, respectively. Note that separate density models $g(x)$ and $b(x)$ are constructed for each dimension of $\mathcal{X}$. \item Construct an acquisition function $g(x)/b(x)$ and select $x$ with the maximum $g(x)/b(x)$ to evaluate in the next iteration. Intuitively, TPE selects a point that is more likely to appear in the good-point set and less likely to appear in the bad-point set. \end{enumerate} \begin{figure}[t] \centering \includegraphics[width=1\linewidth]{figs/tpe.pdf} \caption{Suppose TPE has observed six points $D =\{(-5, 25), (-3, 9), (-1, 1), (2, 4), (3, 9), (3.5, 9.25)\}.$ This figure illustrates how TPE finds the next point to evaluate ($\gamma = 35\%$). } \label{fig:tpe-example} \end{figure} \begin{table}[t] \centering\small \begin{tabular}{|c|c|c|c|c|c|} \hline {\bf Age} & {\bf Sex} & {\bf City} & {\bf State} & {\bf Occupation} & {\bf M.predict($I$)} \\ \hline 48 & F & Mesa & AZ & Athlete & repeat \\ 45 & F & Miami & FL & Artist & repeat \\ 46 & M & Mesa & AZ & Writer & one-time \\ 40 & M & Miami & FL & Athlete & repeat \\ 42 & F & Miami & FL & Athlete & repeat \\ \hline \end{tabular} \caption{An illustration of parameter creation.} \label{tab:inference} \end{table} \smallskip\noindent Figure~\ref{fig:tpe-example} illustrates the three steps. A complete introduction to TPE is given in Appendix~\ref{sec:appendix_tpe}. \stitle{Categorical Variables.} TPE models categorical variables by using categorical distributions rather than kernel density estimation. Consider a categorical variable with four distinct values: \texttt{Website} $\in$ \{$w_1$, $w_2$, $w_3$, $w_4$\}. To build $g(\texttt{Website})$, TPE estimates the probability of $w_i$ based on the fraction of its occurrences in $D^g$; the distribution is smoothed by adding $1$ to the count of occurrences for each value. For instance, if the occurrences are 2, 0, 1, 0, then the distribution $g(\texttt{Website})$ will be $\{P(w_1), P(w_3), P(w_3), P(w_4)\} = \{3/7, 1/7, 2/7, 1/7\}$. \iffalse \begin{figure} \begin{subfigure}[t]{.23\textwidth} \centering \includegraphics[width=0.95\linewidth, keepaspectratio]{figs/tpe_ex_32.pdf} \caption{An example function with sampled points split into good and bad groups.} \label{fig:tpe_intro_pts} \end{subfigure}% \begin{subfigure}[t]{.23\textwidth} \centering \includegraphics[width=0.95\linewidth, height=110pt]{figs/tpe_ex_dists_32.pdf} \caption{Good and bad distributions.} \label{fig:tpe_intro_dists} \end{subfigure} \caption{The main idea of TPE.} \label{fig:tpe_intro} \end{figure} \begin{figure} \begin{subfigure}{.23\textwidth} \centering \includegraphics[width=0.99\linewidth, keepaspectratio]{figs/tpe_example_dists.pdf} \caption{The distributions $l(x)$, $g(x)$.} \label{fig:tpe_ex_dists} \end{subfigure}% \begin{subfigure}{.23\textwidth} \centering \includegraphics[width=0.92\linewidth, height=110pt]{figs/tpe_example_ei.pdf} \caption{The function $l(x)/g(x)$.} \label{fig:tpe_ex_ei} \end{subfigure} \caption{Figures for Example~\ref{ex:tpe_ex}.} \label{fig:test} \end{figure} \fi \iffalse Initially, $n_{\text{init}}$ samples are selected uniformally at random from $\mathcal{X}$, and subsequently a model is used to guide the selection to the optimal location. TPE models each dimension of the search space independently using univariate Parzen window density estimation (or kernel density estimation) \cite{silverman1986density}. Assume for now that the search space is one-dimensional, i.e., $\mathcal{X} = [a, b]\subset \mathbb{R}$. Rather than model the posterior probability $p(y\mid x)$ directly, TPE exploits Bayes' rule, $p(y\mid x) \propto p(x\mid y)p(y)$, and models the likelihood $p(x\mid y)$ and the prior $p(y)$. To model the likelihood $p(x\mid y)$, the observations $D_t$ are first split into two sets, $D_t^l$ and $D_t^g$, based on their quality under $f$: $D_t^l$ contains the $\gamma-$quantile highest quality points, and $D_t^g$ contains the remaining points. Next, density functions $l(x)$ and $g(x)$ are created from the samples in $D_t^l$ and $D_t^g$ respectively. For each point $x\in D_t^l$, a Gaussian distribution is fit with mean $x$ and standard deviation set to the greater of the distances to its left and right neighbor. $l(x)$ is a uniform mixture of these distributions. The same process is performed to create the distribution $g(x)$ from the points in $D_t^g$. Intuitively, $l(x)$ can be interpreted as the region where $f$ attains high-quality results, and similarly, $g(x)$ can be interpreted as the region where it attains low-quality results. Formally, for a minimization problem, we have the likelihood $$p(x\mid y) = \begin{cases} l(x) & \text{ if } y < y^* \\ g(x) & \text{ if } y \ge y^* \end{cases}$$ where $y^*$ is the $\gamma-$quantile of the observed values The prior probability is $p(y<y^*)=\gamma$. TPE uses the prior and likelihood models to derive the EI acquisition function. It follows from Equation~\ref{ei} that \begin{equation} EI_{y^*}(x)\propto \left(\gamma+\frac{g(x)}{l(x)}(1-\gamma)\right)^{-1} \end{equation} the proof of which can be found in \cite{bergstra2011algorithms}. This means that a point with high probability in $l(x)$ and low probability in $g(x)$ will maximize the EI, as desired. To find the next point to evaluate, TPE samples $n_{EI}$ candidate points from $l(x)$. Each of these points is evaluated by $l(x)/g(x)$, and the point with the highest value is suggested as the next point to be evaluated by $f$. \fi \iffalse \example\label{ex:tpe_ex} \jn{Revise this example to make it self-contained.} Consider the optimization problem $$\min_{-10\le x\le10} x^2.$$ Suppose $n_{\text{init}}=6$, and the first sampled points are $-5, -3, -1, 2, 3, 3.5$. We have $D_6=\{(-5, 25), (-3, 9), (-1, 1), (2, 4), (3, 9), (3.5, 9.25)\}$. Suppose $\gamma=0.35$, so up to $35\%$ of the highest quality points are in $D_6^l$ and the rest in $D_6^g$. We have $D_6^l=\{(-1, 1), (2, 4)\}$, and $D_6^g=\{(-5, 25), (-3, 9), (3, 9), (3.5, 9.25)\}$. From these sets, the distributions $l(x)=0.5(\mathcal{N}(-1, 3) + \mathcal{N}(2, 3))$ and $g(x)=0.25(\mathcal{N}(-5, 2) + \mathcal{N}(-3, 6) + \mathcal{N}(3, 6) + \mathcal{N}(3.5, 0.5))$ are created, where recall the means are the sampled points and the standard deviations are the greater of distance between each point and its left and right neighbors. These distributions are plotted in Figure~\ref{fig:tpe_ex_dists}. Next, $n_{\text{EI}}$ points are sampled from $l(x)$. Suppose $n_{\text{EI}}=2$, and we sample $0.5, -4$. Finally, we evaluate $l(0.5)/g(0.5)=3.86$ and $l(-4)/g(-4)=0.72$; since $0.5$ has a larger EI value, $0.5$ is the next point to be evaluated by $f$. Figure~\ref{fig:tpe_ex_ei} shows $l(x)/g(x)$, and clearly the EI is maximized near $0$, as desired. \begin{figure} \begin{subfigure}{.23\textwidth} \centering \includegraphics[width=0.99\linewidth, keepaspectratio]{figs/tpe_example_dists.pdf} \caption{The distributions $l(x)$, $g(x)$.} \label{fig:tpe_ex_dists} \end{subfigure}% \begin{subfigure}{.23\textwidth} \centering \includegraphics[width=0.92\linewidth, height=110pt]{figs/tpe_example_ei.pdf} \caption{The function $l(x)/g(x)$.} \label{fig:tpe_ex_ei} \end{subfigure} \caption{Figures for Example~\ref{ex:tpe_ex}.} \label{fig:test} \end{figure} \subsubsection{Categorical Parameters}\label{tpe:cat} TPE models categorical parameters by using categorical distributions rather than GMMs. As with numerical parameters, the observation set $D_t$ is split into two sets $D_t^l$ and $D_t^g$ based on the objective function values. Next, categorical distributions $l(x)$ and $g(x)$ are created for the sets $D_t^l$ and $D_t^g$ respectively by setting the probability of occurrence for each value proportional to its occurrence in the respective set. There is also a prior of 1 added to $l(x)$ and $g(x)$ so each value has a non-zero probability of being selected. As before, the EI acquisition function works by sampling from $l(x)$ and evaluating $l(x)/g(x)$ to find the most promising point. \fi \section{Conclusion} In this paper, we proposed \textsf{BOExplain}\xspace, a novel framework for explaining inference\xspace queries using BO. This framework treats the inference\xspace query along with an ML pipeline as a black-box which enables explanations to be derived from complex pipelines with UDFs. We considered predicates as explanations, and treated the predicate constraints as parameters to be tuned. TPE was used to tune the parameters, and we proposed a novel individual contribution encoding and warm start heuristic to improve the performance of categorical variables. We performed experiments showing that a) \textsf{BOExplain}\xspace can even outperform Scorpion and Macrobase for explaining SQL-only queries in certain situations, b) the proposed IC and warm start techniques were effective, c) \textsf{BOExplain}\xspace significantly outperformed random search for explaining inference queries, and d) \textsf{BOExplain}\xspace generated useful explanations for real corrupted datasets. \section{Experiments}\label{exp} \begin{figure*}[!htbp] \centering \includegraphics[width=\textwidth]{figs/scorpion_obj_func.pdf} \caption{Performance comparison with Scorpion and MacroBase. The goal is to maximize the objective function.} \label{fig:scorpion} \end{figure*} Our experiments seek to answer the following questions. (1) How does \textsf{BOExplain}\xspace compare to current state-of-the-art query explanation engines for numerical variables? (2) Are the IC encoding and warm start heuristics effective? (3) How effective is \textsf{BOExplain}\xspace at deriving explanations from source and training data? (4) Can \textsf{BOExplain}\xspace generate useful explanations for real corrupted datasets? \subsection{Experimental Settings} \subsubsection{Baselines} For SQL-only queries, we compare \textsf{BOExplain}\xspace with the explanation engines Scorpion \cite{wu13} and MacroBase \cite{abuzaid2020diff, bailis2017macrobase} which return predicates as explanations. For inference\xspace queries, no predicate-based explanation engines exist, so we compare with a random search baseline~\cite{bergstra2012random} and Hyperband~\cite{li2017hyperband}. \stitle{Scorpion \cite{wu13}} is a framework for explaining group-by aggregate queries. The authors define a function to measure the quality of a predicate, which can be implemented as \textsf{BOExplain}\xspace's objective function. Each continuous variable’s domain is split into 15 equi-sized ranges as set in the original paper. We use the author's open-source code\footnote{\url{https://github.com/sirrice/scorpion}} to run the Scorpion experiments. \stitle{MacroBase \cite{bailis2017macrobase} } (later, the DIFF operator \cite{abuzaid2020diff}) is an explanation engine that considers combinations of variable-values pairs, similar to a \texttt{CUBE} query \cite{gray1997data}, as candidate explanations. In Section 2.3 of \cite{abuzaid2020diff}, the authors describe how to use the DIFF operator with Scorpion's objective function. We implemented it using the author's open-source code\footnote{\url{https://github.com/stanford-futuredata/macrobase}}. The user needs to discretize numerical variables; we tuned the bin size from 2 to 15 and report the best result. In \cite{abuzaid2020diff}, MacroBase was shown to outperform other explanation engines including Data X-ray \cite{wang2015data} and Roy and Suciu \cite{roy15}, and so we do not compare with these approaches. \stitle{Random} search is a competitive method for hyperparameter tuning \cite{bergstra2012random}. The parameters are chosen independently and uniformly at random from the domains described in Section~\ref{framework}. \stitle{Hyperband}~\cite{li2017hyperband} is an exploration-based optimization strategy that speeds up random search through adaptive resource allocation and early-stopping. \subsubsection{Real-world Datasets and ML Pipelines} The following lists the five real-world datasets used in our experiments. We visualize the pipelines for House and Credit in Figure~\ref{fig:pipeline}, and put a green box around the data where an explanation is derived in each pipeline. For House and Credit we inject synthetic errors. For Credit and Amazon, an explanation is derived from source data, for House, and German, an explanation is derived from training data, and for NYC, an explanation is derived from inference data. \iffalse \stitle{Adult} income dataset \cite{Dua:2019}. This dataset contains 32,561 rows and 15 human variables from a 1994 census. A random forest classifier is then used to predict whether a person makes over \$50K a year. We split the data into 80\% for training and 20\% for inference. \fi \stitle{House} price prediction \cite{de2011ames}. This dataset was published already split into training (1460 rows) and inference (1459 rows) tables. It contains 79 variables of a house which are used to train a support vector regression model to predict the house price. The pipeline denoting how to prepare the data for modelling is given in Figure~\ref{fig:pipeline}(a). \stitle{Credit} card approval prediction\footnote{\url{https://www.kaggle.com/rikdifos/credit-card-approval-prediction}}. The source data consists of two tables: \texttt{application\_record} (438,557 rows, 18 variables), which contains information about previous applicants, and \texttt{credit\_record} (1,048,575 rows, 3 variables), which stores the applicants' credit history. The pipeline to prepare the data for modelling is given in Figure~\ref{fig:pipeline}(b), and a decision tree classifier is trained to predict whether a customer will default on their credit card payment. We set aside 20\% of the data to use for the inference\xspace query, and 80\% for training. \stitle{Amazon} product reviews~\cite{Ramirez2019}. This dataset contains 6928 reviews of Amazon products with ground truth and crowdsourced binary labels. 80\% of the reviews are used for training with labels formed from the majority vote of the crowdsourced labels, and 20\% for testing with the ground truth labels. We encode the reviews using Count Vectorization and train a support vector classifier. \stitle{German} credit risk~\cite{Dua:2019}. This dataset contains 19 variables of 1000 bank customers with each customer labelled as having good or bad credit risk. We one-hot encode the categorical variables, do an 80-20 train-test split, and train an XGBoost classifier. \stitle{NYC} yellow taxi dataset\footnote{\url{https://www1.nyc.gov/site/tlc/about/tlc-trip-record-data.page}}. This dataset contains taxi trip information for every yellow taxi trip in New York City. Following the setup in \cite{baier2020handling}, we predict the hourly demand by region for the 20 most frequent regions, and use the features weekday, region, demand of previous 24 hours, and cosine/sine features to encode that hours are cyclical. We train an XGBoost regressor on data from January and February, 2020, and perform inference on data from March 2020. \begin{figure}[tb] \centering \includegraphics[width=0.45\textwidth]{figs/pipelines_v2.pdf} \caption{ML Pipelines for House and Credit. The green box indicates where an explanation is generated from.} \label{fig:pipeline} \end{figure} \subsubsection{Metrics} To measure the quality of an explanation, we plot the best objective function value achieved by each time point $t$. For Scorpion and MacroBase we plot, the objective function value corresponding to their output predicate as a line that begins when the system finishes. To evaluate the effectiveness at identifying data errors, we measure the F-score, precision, and recall in the experiments on the House and Credit datasets. We synthetically corrupt data defined by a predicate, and use that data as ground truth. Precision is the number of selected corrupted tuples divided by the total number of selected tuples. Recall is the number of selected corrupted tuples divided by the total number of corrupted tuples. F-score is the harmonic mean of precision and recall. For \textsf{BOExplain}\xspace, Random, and Hyperband, each result is averaged over 10 runs. \subsubsection{Implementation} \textsf{BOExplain}\xspace was implemented in Python 3.9. The code is open sourced at \url{https://github.com/sfu-db/BOExplain}. We modify the TPE algorithm in the Optuna library~\cite{akiba2019optuna} with our optimization for categorical variables. The ML models in Section~\ref{exp:real_world} are created with sklearn. The experiments were run single-threaded on a MacBook Air (OS Big Sur, 8GB RAM). In the TPE algorithm, we set $n_{init}=10$, $n_{ei}=24$, and $\gamma=0.1$ for all experiments. \subsection{Explaining SQL-Only Queries}\label{exp:comparison} \sloppy To compare \textsf{BOExplain}\xspace, Scorpion, and MacroBase, we replicate the experiment from Section 8.3 of Scorpion's paper~\cite{wu13}, using the same datasets, query, and objective function. Note that MacroBase explicitly aims to optimize Scorpion's objective function, as described in Section 2.2 of ~\cite{abuzaid2020diff}. The dataset consists of a single \textit{group by} variable $A_d$, an aggregate variable $A_v$, and search variables $A_1, \dots, A_n$ with $\text{domain}(A_i) = [0, 100]\subset \mathbb{R}$, $i\in[n]$. $A_d$ contains $10$ unique values (or $10$ groups) each corresponding to $2000$ tuples randomly distributed in the $n$ dimensions. $5$ groups are outlier groups and the other $5$ are holdout groups. Each $A_v$ value in a holdout group is drawn from $\mathcal{N}(10, 10)$. Outlier groups are created with two $n$ dimensional hyper-cubes over the $n$ variables, where one is nested inside the other. The inner cube contains $25\%$ of the tuples and $A_v\sim\mathcal{N}(\mu, 10)$, and the outer cube contains $25\%$ of the tuples in the group and $A_v\sim\mathcal{N}(\frac{\mu + 10}{2}, 10)$, else $A_v\sim\mathcal{N}(10, 10)$. $\mu$ is set to $80$ for the ``easy'' setting (the outliers are more pronounced), and $30$ for the ``hard'' setting (the outliers are less pronounced). The query is $\text{SELECT SUM}(A_v) \text{ FROM synthetic GROUP BY } A_d$. The arithmetic expression over the SQL query is defined in Section $3$ of \cite{wu13} that forms an objective function to be maximized. The penalty $c=0.2$ was used to penalize the number of tuples removed as described in Section 7 of \cite{wu13}. We used $n=2$ and $n=3$ since $3$ is the maximum number of variables supported by MacroBase. \fussy The results are shown in Figure~\ref{fig:scorpion}. \textsf{BOExplain}\xspace outperforms Scorpion and MacroBase in terms of optimizing the objective function in each experiment. This is because \textsf{BOExplain}\xspace can refine the constraint values of the range predicate which enables it to outperform Scorpion and MacroBase which discretize the range. The results are the same in the easy and hard settings. MacroBase performs poorly because the predicates formed by discretizing the variable domains into equi-sized bins, and computing the cube, do not optimize this objective function. This exemplifies a known limitation of MacroBase that binning continuous variables is difficult \cite{abuzaid2020diff}. \textsf{BOExplain}\xspace also outperforms Scorpion in terms of running time. \textsf{BOExplain}\xspace achieves Scorpion's objective function value in around half the time on each experiment. \stitle{Note.} The focus of this paper is \emph{not} on SQL-only queries, thus we did not conduct a comprehensive comparison with Scorpion and MacroBase. This experiment aims to show that a black-box approach (\textsf{BOExplain}\xspace) can even outperform white-box approaches (Scorpion and MacroBase) for SQL-only queries in some situations. \subsection{Explaining Inference Queries}\label{exp:real_world} In this section, we evaluate \textsf{BOExplain}\xspace's efficacy at explaining inference\xspace queries from source and training data. In Section~\ref{exp:house}, we investigate \textsf{BOExplain}\xspace's approach for categorical variables on House, and in Section~\ref{exp:credit}, we evaluate \textsf{BOExplain}\xspace in a complex ML pipeline on Credit, where an explanation is derived from source data. \iffalse \subsubsection{\bf Explanation From Training Data}\label{exp:adult} In this experiment, we flip the training labels on Adult where $8\le\texttt{Education-Num}\le10 \wedge 30\le\texttt{Age}\le40$ which affects 16\% of the training data. On the inference data, we query the average predicted value for the group Male. To asses whether \textsf{BOExplain}\xspace can accurately remove the corrupted data, we define the objective function to minimize the distance between the query result on the passed data and the query result if executed on the data after filtering out the corrupted tuples. We use the two numerical search variables Education-Num and Age which have domains $[1, 16]$ and $[17, 90]$, respectively, and the size of the search space is $1.4 \times 10^6$. Each method is run for 200 seconds, and the results are shown in Figure~\ref{fig:adult_result}. \textsf{BOExplain}\xspace on average achieves an objective function result lower than Random before 45 seconds compared to Random's result at 200 seconds. This shows that it is effective for \textsf{BOExplain}\xspace to exploit promising regions, whereas random search that just explores the space cannot find a good predicate as quickly. \textsf{BOExplain}\xspace also outperforms Random in terms of F-score and precision. The recall is high for both approaches since it is likely that a predicate is produced with large ranges that cover all of the corrupted tuples. On average, \textsf{BOExplain}\xspace (Random) completed 348.9 (295.6) iterations. \textsf{BOExplain}\xspace performed more iterations because as it exploited the promising region, it removed more training data than a random predicate, and so the model took less time to retrain. \fi \begin{figure}[tb] \centering \includegraphics[width=0.5\textwidth]{figs/house_results.pdf} \caption{House: best objective function value, F-score, precision, and, and recall, found at each 5 second increment averaged over 10 runs. The goal is to minimize the objective function. (IC = Individual Contribution Encoding, WS = Warm Start)} \label{fig:house_results} \end{figure} \begin{figure*}[tb] \centering \includegraphics[width=\textwidth]{figs/credit_results.pdf} \caption{Credit: best objective function value, F-score, precision, and recall found at each 5 second increment, averaged over 10 runs. The goal is to maximize the objective function; larger values are better.} \label{fig:credit_results} \end{figure*} \subsubsection{\bf Supporting Categorical Variables} \label{exp:house} \sloppy In this experiment, we assess \textsf{BOExplain}\xspace's method for handling categorical variables on House. The data is corrupted by setting the tuples satisfying \texttt{Neighbourhood}=\texttt{`CollgCr'} $\wedge $ \texttt{Exterior1st}=\texttt{`VinylSd'} $\wedge$ $2000 \le \texttt{YearBuilt} \le 2010$ to have their sale price multiplied by $10$, affecting 6.16\% of the data. We query the average predicted house price and seek an explanation for why it is high. To assess \textsf{BOExplain}\xspace's efficacy at removing the corrupted tuples, we define the objective function to minimize the distance between the queried result on the passed data and the result of the query issued on the data with the corrupted tuples removed. We use two categorical search variables Neighbourhood and Exterior1st which have 25 and 15 distinct values respectively, and one numerical search variable YearBuilt which has domain [1872, 2010]. The search space size is $7.25\times 10^6$. \fussy In this experiment, we compare three strategies for dealing with categorical variables. The first, \textsf{BOExplain}\xspace, is our algorithm with both of the IC encoding and warm-start (WS) optimizations proposed in Section~\ref{sec:cat_enc}. To determine whether encoding categorical values to integers based on IC and using a numerical distribution is effective, we consider a second approach, BOExplain (w/o IC), which uses the warm start optimization from Section~\ref{warm_start}, but uses the TPE categorical distribution to model the variables rather than encoding. The third, BOExplain (w/o IC and WS), is \textsf{BOExplain}\xspace without any optimizations. Each method is run for 200 seconds, and the results are shown in Figure \ref{fig:house_results}. The benefit of the warm start is apparent since \textsf{BOExplain}\xspace and \textsf{BOExplain}\xspace (w/o IC) outperform the other baselines much sooner. Also, \textsf{BOExplain}\xspace significantly outperforms \textsf{BOExplain}\xspace (w/o IC) which shows that encoding the categorical values, and using a numerical distribution to model the parameter, leads to BO learning the good region which can optimize the objective function when exploited. The F-score, precision, and recall also demonstrate how \textsf{BOExplain}\xspace can significantly outperform the baselines. In this experiment, \textsf{BOExplain}\xspace completed on average 274.3 iterations, whereas random completed 1148.4 iterations. \stitle{Hyperband Experiment.} To evaluate our choice of using TPE, we also compare with a Hyperband implementation. For Hyperband, we use the data sample size as the resource for successive halving. To compare fairly with TPE, we run Hyperband for 200 seconds. We start with a random sample of 12.5\% of the data and randomly select predicates to evaluate by the objective function. Next, we select the 50\% best performing predicates, and evaluate their quality on a sample size of 25\%. This repeats until we evaluate the best predicates on 100\% of the data, and finally output the best predicate. The objective function value of the best found predicate averaged over 10 runs is $7666.03$, whereas for the TPE-based implementation it is $90.74$. Since the goal is to minimize the objective function, TPE performed better. The reason is that TPE with our proposed optimizations for categorical variables prioritized promising predicates early on in the search, whereas Hyperband's exploration-based search strategy could not find good quality predicates as quickly. \subsubsection{\bf Explanation From Source Data}\label{exp:credit} In the last experiment, we derive an explanation from source data on Credit. We corrupt the source data by setting all applicant records satisfying $-23000\le\texttt{DAYS\_BIRTH}\le-17000 \wedge 2\le\texttt{CNT\_FAM\_MEMBERS}\le3$ to have a ``bad'' credit status, which affects $20.1\%$ of the data. Corrupting the data decreases the accuracy of the model, and we define the objective function to increase the model accuracy. We derive an explanation from the source data table \texttt{application\_record} with the variables DAYS\_BIRTH and CNT\_FAM\_MEMBERS which have domains [-25201, -7489] and [1, 15], respectively, and the size of the search space is $7.06\times 10^{10}$. The experiment is run for 200 seconds, and the results are shown in Figure~\ref{fig:credit_results}. On average, \textsf{BOExplain}\xspace completes 246.8 iterations and random search completes 319.6 iterations during the 200 seconds. \textsf{BOExplain}\xspace significantly outperforms Random at optimizing the objective function, as \textsf{BOExplain}\xspace on average attains an objective function value at 51 seconds that is higher than the average value Random attains at 200 seconds. This shows that exploiting promising regions can lead to better explanations, and that \textsf{BOExplain}\xspace is effective at deriving explanations from source data that passes through an ML pipeline. Although random search can find an explanation with high precision, \textsf{BOExplain}\xspace significantly outperforms Random in terms of F-score. \subsection{Case Studies}\label{sec:case_studies} To understand how \textsf{BOExplain}\xspace performs on real workloads, we present three case studies in this section. These case studies use \textsf{BOExplain}\xspace to derive an explanation from three real-world datasets under realistic settings. The derived explanations are insightful, which show \textsf{BOExplain}\xspace's effectiveness in real-world applications. \stitle{Crowdsourced Mislabels.} With the Amazon dataset, the inference accuracy is 93.75\%. To investigate whether mislabelled reviews decrease the accuracy, we define the objective function to increase the accuracy. We derive a predicate over the variables Country and TextWordCount (the number of words in the review) in the source dataset. After running \textsf{BOExplain}\xspace for 60 seconds, the output predicate is $\texttt{Country} = \text{"Turkey"} \wedge 101 \le \texttt{TextWordCount} \le 221$, which increases the test accuracy to 95\%. Upon further inspection, we found that the labelling accuracy of the training data is $93\%$, but the labelling accuracy of the tuples satisfying the returned predicate is $90\%$. Hence, \textsf{BOExplain}\xspace identified that labellers from Turkey were more likely to mislabel long reviews, which degraded the model. \stitle{Bias.} With the German credit dataset, the predicted rate of good credit risk for individuals 25 years old or older is $76\%$, and for individuals under 25 years old it is $57\%$, hence this dataset is biased. We define the objective function to minimize the predicted rate of good credit risk between those over and under 25 years old, and derive a predicate from the training data with the search variables Purpose and DurationInMonths (duration of the loan). We ran \textsf{BOExplain}\xspace for 60 seconds, and the returned predicate is $\texttt{Purpose} = \text{"car (new)"} \wedge 20 \le \texttt{DurationInMonths} \le 50$. After removing the tuples satisfying this predicate, the predicted rate of having good credit risk is 74\% and 68\% for people over and under 25, respectively, which is significantly less biased. Moreover, in the training data, the overall good credit risk rate is 71\% and 60\% for people over and under 25, respectively, however for the tuples satisfying the predicates, the rates are 57\% and 17\%. Therefore, \textsf{BOExplain}\xspace identified that long-term loans for new cars are greatly biased in favour of people over 25 years old. \stitle{Data Drift.} With the NYC dataset, the mean-squared error (MSE) of taxi trip durations is 1801.03 on the training data and 10658.49 on the inference data. The objective function is to minimize the MSE on the inference data, and we search for an explanation over the inference data with the search variables Region and PickUpDateTime. After running \textsf{BOExplain}\xspace for 30 seconds, the returned predicate is $\texttt{Region} = \text{"230"} \wedge \text{2020-03-12 21:00:00} \le \texttt{PickUpDatetime} \le \text{2020-03-31 23:00:00}$. When the tuples that satisfy this predicate are removed, the MSE on the inference data is 8706.13. In fact the MSE of the tuples satisfying the predicate is 18151.93, which is much higher than the overall MSE of the inference data (10658.49). Thus, \textsf{BOExplain}\xspace identified a region and time period that underwent significant drift as a result of the COVID-19 pandemic. \subsection{Our Framework}\label{framework} In this section, we describe the \textsf{BOExplain}\xspace framework. \stitle{Parameter Creation.} Given a predicate space, we need to map it to a parameter search space (the parameters and their domains). Suppose a predicate space is defined over variables $A_1, A_2, \cdots, A_n$. If $A_i$ is numerical (e.g., age, date), two parameters are created that serve as bounds on the range constraint. Specifically, the parameters $A_{i_{\text{min}}}$ and $A_{i_{\text{length}}}$ define the lower bound and the length of the range constraint, respectively. $A_{i_{\text{min}}}$ and $A_{i_{\text{length}}}$ have interval domains $[\min(A_i), \max(A_i)]$ and $[0, \max(A_i) - \min(A_i)]$, respectively. If $A_i$ is categorical (e.g., sex, website), one categorical parameter is created with a domain consisting of all unique values in $A_i$. \example\label{param_domain}{\it Suppose the user defines a predicate space over \texttt{State} and \texttt{Age} in Table~\ref{tab:inference}. \textsf{BOExplain}\xspace creates three parameters: one categorical parameter for \texttt{State} with domain \{AZ, FL\}, and two numerical parameters for \texttt{Age} with domains $[40, 48]$ and $[0, 8]$, respectively. } \stitle{\textsf{BOExplain}\xspace Framework.} \Cref{fig:boexplain} walks through the \textsf{BOExplain}\xspace framework. In step \circled{0}, the user provides an objective function $obj$, a relation $S$, and predicate variables $A_1, \dots, A_n$ (\Cref{fig:workflow}(b), line 10). Step \circled{1} creates the parameters and their domains. Step \circled{2} runs one iteration of TPE, starting with the parameters from step \circled{1}, and outputs a predicate. Steps \circled{3} and \circled{4} evaluate the predicate by removing those tuples from the input dataset, and evaluating $obj$ on the filtered data. The result is passed to TPE for the next iteration, and possibly yielded to the user as an intermediate or final predicate explanation. Consider the example code in Figure~\ref{fig:workflow}(b). Once it is executed, \textsf{BOExplain}\xspace first creates three parameters: $\texttt{Date}_{{\text{min}}}$, $\texttt{Date}_{{\text{length}}}$, and $\texttt{Website}$ along with the corresponding domains. Then, it iteratively calls TPE to propose predicates (e.g., ``$12/01/2020 \leq \texttt{Date} \leq 12/02/2020$ \texttt{AND} $\texttt{Website} = w$''). \textsf{BOExplain}\xspace obtains S\_filtered by removing the tuples that satisfy this predicate from $S$. Next, it applies $\texttt{obj}(\cdot)$ to S\_filtered which will rerun the pipeline (\Cref{fig:workflow}(a)) to compute the updated repeat buyer rate. The predicate and the updated rate are passed to TPE to use when selecting the predicate on the next iteration. This iterative process will repeat until the time budget is reached. When the user stops \textsf{BOExplain}\xspace, or when the optimization has converged, the predicate with the lowest repeat buyer rate is returned. \begin{figure} \centering \includegraphics[width=0.48\textwidth]{figs/boexplain_fw.pdf} \caption{The \textsf{BOExplain}\xspace framework.} \label{fig:boexplain} \end{figure} \stitle{Why Is TPE Suitable For Query Explanation?} Recent work~\cite{bergstra2012random,li2020random,mania2018simple} has suggested that random search is a competitive strategy for hyperparameter tuning across a variety of challenging machine learning tasks. However, we find that TPE is more effective for query explanation because it is designed for problems where similar parameter values tend to have similar objective values (e.g., model accuracy). TPE can leverage this property to prune poor regions of the search space. As a trivial example, suppose a hyperparameter controls the number of trees in a random forest. If values $10, 12, 14$ have resulted in a poor objective value, then TPE will down-weigh similar values (e.g., $9, 16$). This property tends to hold in query explanation, because similar predicates tend to have similar objective values. For instance, we would expect that the predicate $\texttt{age} \in [10, 20]$ will exhibit a similar objective to $\texttt{age} \in [10, 19]$ and $\texttt{age} \in [10, 21]$; when the former has a poor objective value, the latter two may be pruned. When this property does not hold, \textsf{BOExplain}\xspace can still find the optimal predicate via the \textit{exploration} component of BO. BO balances two components for selecting a point to evaluate: 1) \textit{exploration} of the search space, and 2) \textit{exploitation} of points similar to previously well-performing points. \textit{Exploitation} may be ineffective if similar predicates do not perform similarly under the objective function, but \textit{exploration} will still test unpromising predicates, thus eventually leading BO to the optimal predicate. \iffalse \begin{figure}[!btp] \centering \includegraphics[width=0.5\textwidth]{figs/network_issue_fig.pdf} \caption{Predicate endpoints and that can learn the bounds on the network issue.} \label{fig:why_bo_ex} \end{figure} \fi \iffalse \stitle{API Design.} In this section, we describe the API design of our Python implementation of \textsf{BOExplain}\xspace, which is inspired by HT libraries. The API consists of two functions, \texttt{fmin} and \texttt{fmax}, which are respectively used to minimize and maximize the objective function. The user defines an objective function in Python which is passed to \texttt{fmin} (or \texttt{fmax}) along with a pandas DataFrame, search variable names, and evaluation budget. A filtered DataFrame is returned where the tuples satisfying the best found predicate have been removed. The objective function takes a pandas DataFrame as input and returns a number. \example{We show how the \textsf{BOExplain}\xspace API can be used in the context of our running example. Figure~\ref{fig:boexplain_api_source} shows the objective function which is used to derive an explanation from source data. Inside the objective function, the training data is constructed, the model is trained, the inference data is augmented with the model predictions, and finally the repeat buyer rate is returned. Since the data scientist found the repeat buyer rate to be unexpectedly high, she calls the \textsf{BOExplain}\xspace function \texttt{fmin} and passes the objective function, source data $R$, variables Date and Website over which to produce a predicate, and the evaluation budget of $100$ iterations as parameters. To derive an explanation from training or inference data, the input data to the objective function simply needs to be changed. Figures \ref{fig:boexplain_api_train} and \ref{fig:boexplain_api_inference} show how to derive an explanation from training and inference data respectively. } Although the design of \textsf{BOExplain}\xspace is inspired by HT libraries, we made two significant changes to make it more user friendly in the query explanation setting. Figure~\ref{fig:skopt_api} shows an example HT problem using the API of the Python library Scikit-Optimize \cite{tim_head_2018_1207017}. Similar to \texttt{fmin}, the function \texttt{gp\_minimize} takes an objective function as input with the goal of minimizing it. However, the objective function takes parameter assignments as input rather than a DataFrame, and \texttt{gp\_minimize} takes the bounds on the parameters rather than a DataFrame and variable names. We decided that \textsf{BOExplain}\xspace should define the parameters and domains rather than the user since creating them is a well defined process from the DataFrame variables. And if the objective function took a parameter assignment as input, the user would need to filter the DataFrame to consist of all tuples that do not satisfy the predicate which could be difficult. Therefore, \textsf{BOExplain}\xspace passes the filtered DataFrame to the objective function rather than a parameter assignment like Scikit-Optimize. \begin{figure} \centering \begin{minted}[autogobble, linenos]{python} from skopt import gp_minimize def f(x): # input x is a parameter assignment return (x[0] + x[1]) ** 2 gp_minimize( func=f, # function to minimize dimensions=[(0, 1), (0, 1)], # bounds on each dimension of x n_calls=100) # number of evaluations of f \end{minted} \caption{An example of the scikit-optimize (skopt) API.} \label{fig:skopt_api} \end{figure} \begin{figure}[b] \centering \begin{subfigure}{.22\textwidth} \centering \begin{minted}[autogobble]{python} fmin( f=f, data=R, variables=["Date", "Website"], n_iters=100) \end{minted} \caption{\textsf{BOExplain}\xspace API used to minimize the objective function.} \label{fig:boexplain_api_fmin} \end{subfigure} \quad \begin{subfigure}{.22\textwidth} \centering \begin{minted}[autogobble]{python} def f(R): T = make_training(R) M = train(T) I = predict(M, I) return repeat_buyer_rate(I) \end{minted} \caption{Derive an explanation from source data, R.} \label{fig:boexplain_api_source} \end{subfigure} \quad \begin{subfigure}{.22\textwidth} \centering \begin{minted}[autogobble]{python} T = make_training(R) def f(T): M = train(T) I = predict(M, I) return repeat_buyer_rate(I) \end{minted} \caption{Derive an explanation from training data, T.} \label{fig:boexplain_api_train} \end{subfigure} \begin{subfigure}{.22\textwidth} \centering \begin{minted}[autogobble]{python} T = make_training(R) M = train(T) I = predict(M, I) def f(I): return repeat_buyer_rate(I) \end{minted} \caption{Derive an explanation from inference data, I.} \label{fig:boexplain_api_inference} \end{subfigure} \caption[short]{\textsf{BOExplain}\xspace Python API} \label{fig:boexplain_ex_api} \end{figure} \fi \section{Introduction}\label{sec:intro} Data scientists often need to execute aggregate SQL queries on \emph{inference data} to inspect a machine learning (ML) model’s performance. We call such queries \emph{inference queries}, which can be seen as an SQL query whose expressions may perform model inference. Consider an inference dataset with four variables \textsf{(customer\_id, age, sex, M.predict(I))}, where \textsf{M.predict(I)} represents a variable where each value denotes whether the model $M$ predicts the customer will be a repeat buyer or not. Running the following inference\xspace query will return the number of female (predicted) repeat buyers: \begin{alltt} SELECT COUNT(*) FROM InferenceData as I WHERE sex = 'female' and M.predict(I) = 'repeat buyer' \end{alltt} If the query result is surprising, e.g., the number of repeat buyers is higher than expected, the data scientist may seek an explanation. One popular explanation method is to find a subset of the input data such that when this subset is removed, and the query is re-executed, the unexpected result no longer manifests~\cite{wu13, roy14}. This method is known as a \textit{provenance} or \textit{intervention}-based explanation \cite{miao2019going}. \begin{table}[t]\vspace{1em} \centering \small \begin{tabular}{|c||c|c|c|} \hline \multirow{2}{*}{} & {\bf SQL Explain} & \multicolumn{2}{c|}{{\bf Inference Query Explain}} \\ \cline{3-4} & {\bf \cite{wu13, roy14, roy15, abuzaid2020diff}} & {\bf Rain~\cite{wu2020complaint}} & {\bf BOExplain} \\ \hline \hline {\bf Inference Data} & Supported & Supported & Supported \\ \hline {\bf Training Data} & Not Supported & Supported & Supported \\ \hline {\bf Source Data} & Not Supported & Not Supported & Supported \\ \hline {\bf Explanation Type} & Coarse-grained & Fine-grained & Coarse-grained \\ \hline \hline {\bf Methodology} & White-box & White-box & Black-box \\ \hline \end{tabular} \caption{Comparison of \textsf{BOExplain}\xspace and existing approaches.} \label{tab:compare} \end{table} Specifically, there are two types of explanations in the intervention-based setting: fine-grained (a set of tuples) and coarse-grained (a predicate) \cite{melioututorial}. In this paper, we focus on coarse-grained explanation. Predicates, unlike sets of tuples, provide a comprehensible explanation and identify common properties of the input tuples that cause the unexpected result. For the above example, it may return a predicate like $\texttt{sex} = \texttt{`female'} \texttt{ AND } 20 \le \texttt{age} \le 25$ which suggests that if removing the young female customers from the inference data, the query result would look normal. Then, the data scientist can look into these customers more closely and conduct further investigation. Generating an explanation from inference data can certainly help to understand the answer to an inference\xspace query. However, an ML pipeline does not only contain inference data but also training and source data. The following example illustrates a scenario where an explanation should be generated from source data. \begin{figure*}[!ht] \centering \includegraphics[width=\textwidth]{figs/running-example-v2.pdf} \caption{An illustration of using BOExplain to generate an explanation from source data in an ML pipeline.} \label{fig:workflow} \end{figure*} \begin{example}\label{exa:explain-source}\it CompanyX creates an ML pipeline (\Cref{fig:workflow}(a)) to predict repeat customers for a promotional event. CompanyX receives transaction records from several websites that sell their products and aggregates them into a \textit{source} data table $S$. Next, the user defined function (UDF) \textsf{make\_training($\cdot$)} extracts and transforms features into the \textit{training} dataset $T$. Finally, a random forest model is fit to the training data, and the model is applied to the inference dataset $I$ which updates it with a prediction variable, $M.predict(I)$. For validation purposes, the data scientist writes a query to compute the percentage of repeat buyers. The rate is higher than expected, but she wants to double check that the result is not due to a data error. In fact, it turns out that the source data $S$ contains errors during $\texttt{Date} \in [t_1, t_2]$, when the website $w$ had network issues; customers confirmed their transactions multiple times, which led to duplicate records in $S$. The training data extraction UDF was coded to label customers with multiple purchases as repeat buyers, and labelled {\it all} of the $w$ customers during the network issue as repeats. The model erroneously predicts every website $w$ customer as a repeat buyer, and thus leads to the high query result. Ideally, the data scientist could ask whether the source data contains an error, and an explanation system would generate a predicate ($t_1 \le \texttt{Date} \le t_2 \texttt{ AND } \texttt{Website}=w$). \end{example} Unfortunately, existing SQL explanation approaches~\cite{wu13, roy14, roy15, abuzaid2020diff} are ill-equipped to address this setting (\Cref{tab:compare}) because they are based on analysis of the query provenance. Although they can generate a predicate explanation over the inference data, the provenance analysis does not extend across model training nor UDFs, which are prevalent in data science workflows. The recent system Rain~\cite{wu2020complaint} generates fine-grained explanations for inference\xspace queries. It relaxes the inference\xspace query into a differentiable function over the model's prediction probabilities, and leverages influence analysis~\cite{koh2017understanding} to estimate the query result's sensitivity to a training record. However, Rain returns training records rather than predicates, and estimating the model prediction sensitivity to group-wise changes to the training data remains an open problem. Further, Rain does not currently support UDFs and uses a white-box approach that is less amenable to data science programs (\Cref{fig:workflow}(b)) that heavily incorporate UDFs. As a first approach towards addressing the above limitations, and to diverge from existing white-box explanation approaches~\cite{wu13, roy14, roy15, abuzaid2020diff, wu2020complaint}, this paper explores a black-box approach towards inference\xspace query explanation. \textsf{BOExplain}\xspace models inference\xspace query explanation as a hyperparameter tuning problem and adopts Bayesian Optimization (BO) to solve it. In ML, hyperparameters (e.g., the number of trees, learning rate) control the training process and are tuned in an ``outer-loop'' that surrounds the model training process. Hyperparameter tuning seeks to find the best hyperparameters that maximizes some model quality measure (e.g., validation score). \textsf{BOExplain}\xspace treats predicate constraints (e.g., $t_1, t_2, w$ in Example~\ref{exa:explain-source}) as hyperparameters, and the goal is to assign the optimal value to each constraint. By defining a metric that evaluates a candidate explanation's quality, (e.g., the decrease of the repeat buyer rate), \textsf{BOExplain}\xspace finds the constraint values that correspond to the highest quality predicate. A black-box approach offers many advantages for inference\xspace query explanation. In terms of \textbf{usability}, a data scientist can derive a predicate from any data involved in an ML pipeline rather than inference data only. Furthermore, its concise API design is similar to popular hyperparameter tuning libraries, such as scikit-optimize \cite{tim_head_2018_1207017} and Hyperopt \cite{bergstra2013hyperopt}, that many data scientists are already very familiar with. Figure~\ref{fig:workflow}(b) shows an example using \textsf{BOExplain}\xspace's API to solve \Cref{exa:explain-source}. The data scientist wraps the portion of the program in an objective function \textsf{obj} whose input is the dataset to generate predicates for, and whose output is the repeat buyer rate that should be minimized. She also provides hints to focus on the \textsf{Date} and \textsf{Website} variables. See Section~\ref{framework} for more details. In terms of \textbf{adaptability}, a black-box approach can potentially be used to generate explanations for any data science workflow beyond inference\xspace queries. The current ML and analytics ecosystem is rapidly evolving. In contrast to white-box approaches, which must be carefully designed for specific programs, \textsf{BOExplain}\xspace can more readily evolve with API, library, model, and ecosystem changes. In terms of \textbf{effectiveness}, \textsf{BOExplain}\xspace builds on the considerable advances in BO by the ML community~\cite{shahriari2015taking}, to quickly generate high quality explanations. A secondary benefit is that BO is a progressive optimization algorithm, which lets \textsf{BOExplain}\xspace quickly propose an initial explanation, and improve it over time. The key technical challenge is that existing BO approaches~\cite{bergstra2011algorithms,hutter2011sequential,snoek2013bayesian} cannot be naively adapted to explanation generation. In the hyperparameter tuning setting, categorical variables typically have very low cardinality (e.g., with 2-3 distinct values~\cite{nguyen2020bayesian}). In the query explanation setting, however, a categorical variable can have many more distinct values. To address this, we propose a categorical encoding method to map a categorical variable into a numerical variable. This lets \textsf{BOExplain}\xspace estimate the quality of the categorical values that have not been evaluated. We further propose a warm start approach so that \textsf{BOExplain}\xspace can prioritize predicates with more promising categorical values. \smallskip\noindent In summary, this paper makes the following contributions: \begin{itemize}[leftmargin=*] \item We are the first to generate coarse-grained explanations from the training and source data to an inference\xspace query. We argue for a black-box approach to inference\xspace query explanation and discuss its advantages over a white-box approach. \item We propose \textsf{BOExplain}\xspace, a novel query explanation framework that derives explanations for inference\xspace queries using BO. We develop two techniques (categorical encoding and warm start) to improve \textsf{BOExplain}\xspace's performance on categorical variables. \item We show that \textsf{BOExplain}\xspace can generate comparable or higher quality explanations than state-of-the-art SQL explanation engines (Scorpion~\cite{wu13} and MacroBase~\cite{abuzaid2020diff}) on SQL-only queries. We evaluate \textsf{BOExplain}\xspace using inference\xspace queries on real-world datasets showing that \textsf{BOExplain}\xspace can generate explanations for different input datasets with a higher degree of explanation than random search. \end{itemize} \iffalse To evaluate \textsf{BOExplain}\xspace, we perform experiments on synthetic and real-world datasets. We show that \textsf{BOExplain}\xspace outperforms the state-of-the-art explanation engines Scorpion \cite{wu13} and MacroBase \cite{abuzaid2020diff} by refining the bounds on range constraints. Also, we perform experiments that show \textsf{BOExplain}\xspace is effective at deriving explanations from source and training data. Specifically, our contributions are: \begin{itemize} \item To the best of our knowledge, we are the first to use BO to solve the SQL explanation problem. The advantages of using BO include treating the query as a black-box function thus enabling the explanation of complex, ML-embedded queries, and the ability to handle range constraints. \item We propose \textsf{BOExplain}\xspace, a novel query explanation framework that transforms the query explanation problem into a BO problem. We demonstrate the \textsf{BOExplain}\xspace API and how it can be used in Python. \item We propose a categorical encoding method to enable explanations over categorical variables with many distinct values. After encoding, \textsf{BOExplain}\xspace can infer how untested categorical values will perform, and thus more rapidly converge to the optimal predicate. \item We evaluate \textsf{BOExplain}\xspace on both synthetic and real-world datasets. The results show that \textsf{BOExplain}\xspace can outperform current state-of-the-art explanation engines by finding more accurate range predicates. Also, we derive explanations for ML-embedded queries from source and training data on real-world datasets where \textsf{BOExplain}\xspace significantly outperforms the baseline. \end{itemize} \fi \section{Problem Definition} In this section, we first define the framework of SQL explanations, and subsequently describe the extension to inference\xspace explanations. \subsection{SQL Explanation} In this paper, explanations are derived from a single relation $R$; the extension to multiple relations has been formalized in \cite{roy14}. A \textit{numerical query} $Q=E(q_1,\dots,q_k)$ is an arithmetic expression $E$ over queries $q_1, \dots, q_k$ of the form \begin{align*} q_i= & \textbf{\textsf{ SELECT}} \text{ agg}(\dots) \textbf{\textsf{ FROM }} R \\ & \textbf{\textsf{ WHERE }} C_1 \textbf{\textsf{ AND/OR }}\dots\textbf{\textsf{ AND/OR }} C_m \end{align*} where agg is an aggregation operation and $C_j$ is a filter condition. The user defines a direction $dir\in\{low, high\}$ indicating how $Q$ should change; $dir=low$ ($high$) means that $Q$ is too high (low). This formulation is used in \cite{roy14}. \example{Returning to the motivating example in Section~\ref{sec:intro}, the data scientist found that the predicted repeat buyer rate was unexpectedly high. This can be expressed as the numerical query $Q=q_1/q_2$ where \begin{align*} q_1 &= \text{SELECT COUNT * FROM I WHERE M.predict(I)="repeat buyer";} \\ q_2 &= \text{SELECT COUNT * FROM I;} \\ \end{align*} Since $Q$ is unexpectedly high, the user sets $dir=low$ to indicate that $Q$ should be minimized.} An \textit{explanation} for $Q$ is a predicate over a subset of the attributes from $R$. For a numerical attribute $N$, the clause is a range constraint of the form $l\le N\le u$, where $l, u \in [\min(N), \max(N)]$, and $l \le u$. For a categorical attribute $C$, the clause is an equality constraint $C=c$ where $c\in$ domain$(C)$. The final predicate is a conjunction of such clauses, and is formally defined below. \definition[Explanation]{Given numerical attributes $N_1, \dots, N_n$ and categorical attributes $C_1, \dots, C_m$, an explanation is a predicate $p$ of the form $$p=l_1\le N_1\le u_1\wedge\dots\wedge l_n\le N_n\le u_n\wedge C_1=c_1\wedge\dots\wedge C_m=c_m.$$ The set of all such predicates forms the \textit{predicate space} $S$.} \example{The source data in Figure~\ref{fig:workflow} contains the attributes Date and Website. An example explanation over these attributes is $$12/01/2020 \le \text{Date} \le 12/10/2020 \wedge \text{Website}=w.$$} For a predicate $p$, let $\sigma_{\neg p}(R)$ represent $R$ filtered to contain all tuples that do not satisfy $p$. We next formally define SQL explanation. \begin{definition}[SQL Explanation] Given a relation $R$, query $Q$, direction $dir$, and predicate space $S$, find the predicate $p\in S$ such that when queries $q_1, \dots, q_k$ are executed on $\sigma_{\neg p}(R)$, $Q$ is minimized if $dir=low$ and maximized if $dir=high$. \end{definition} \subsection{inference\xspace Explanation} The difference between SQL and inference\xspace explanation is the data over which the explanation is derived. For SQL explanation, the predicate is over the queried relation $R$. However, in the inference\xspace setting, an explanation may need to be derived from source, training or inference data, which are defined as follows: \begin{enumerate} \item \textbf{Source data} is data that is in a state not yet ready for feeding into an ML algorithm. \item \textbf{Training data} is data that is ready for applying an ML algorithm. \item \textbf{Inference data} is data augmented with the model's prediction. \end{enumerate} Source data passes through an ML pipeline $\mathcal{P}$ which transforms and featurizes the data to create the training data. An ML model is fit to the training data, and the ML model predictions are added to the inference data. The queries $q_1, \dots, q_k$ are executed on the inference data. \begin{figure} \centering $$f := \begin{cases} f(R, p, \mathcal{P}, M, Q) & \text{if $R$ is source data} \\ f(R, p, M, Q) & \text{if $R$ is training data} \\ f(R, p, Q) & \text{if $R$ is inference data} \\ \end{cases}$$ \caption{The objective function $f$ with different parameters depending on the data state to derive an explanation} \label{fig:obj_func} \end{figure} To support a more general query explanation framework, we abstract the numerical query $Q$ into an objective function $f$. The components of the objective function are different depending on the data state from which the explanation is derived. The possible objective functions with corresponding data states are given in Figure~\ref{fig:obj_func}. For each state, the objective function takes as input one relation $R$, a predicate $p$, and a query $Q$. Inside the objective function, $R$ is filtered to consist of all tuples that do not satisfy $p$; let $\sigma_{\neg p }(R)$ represent this relation. Next, if $R$ is source data, $\sigma_{\neg p }(R)$ passes through an ML pipeline $\mathcal{P}$ where it is transformed into training data. Subsequently, a model $M$ is trained, and the query $Q$ is executed on the inference data augmented with the model's predictions. If $R$ is training data, $\sigma_{\neg p }(R)$ is used to train a model $M$, and the query $Q$ is executed on the inference data augmented with the model's predictions. If $R$ is inference data, the query is executed directly on $\sigma_{\neg p }(R)$. The form of $f$ will be clear in the context of the problem. All of $R, \mathcal{P}, M$, and $Q$ are defined by the user (only predicate $p$ is determined by \textsf{BOExplain}\xspace), and so we use $f(p)$ as shorthand notation. The objective function is optimized in the direction specified by the user. Our query explanation problem is presented formally below. \begin{definition}[Query Explanation Problem] Given a predicate space $S$ and objective function $f$, find the predicate that optimizes the objective function: $$\min_{p\in S}f(p).$$ Use $-f$ if $f$ should be maximized. \end{definition} \section{Problem Definition} \label{sec:prob_def} In this section, we first define the SQL explanation problem, and subsequently describe the extension to inference query explanation. \subsection{Background: SQL Explanation} \stitle{Query.} We first define the supported queries. In this work, we focus on aggregation queries over a single table (the extension to multiple tables has been formalized in \cite{roy14}). An \textit{explainable query} is an arithmetic expression over a collection of SQL query results, as formally defined in Definition~\ref{def:query}. \begin{definition}[Supported Queries] \label{def:query} Given a relation $R$, an \textit{explainable query} $Q=E(q_1,\dots,q_k)$ is an arithmetic expression $E$ over queries $q_1, \dots, q_k$ of the form \begin{align*} \small q_i= & \textbf{\textsf{ SELECT}} \text{ agg}(\dots) \textbf{\textsf{ FROM }} R \\ & \textbf{\textsf{ WHERE }} C_1 \textbf{\textsf{ AND/OR }}\dots\textbf{\textsf{ AND/OR }} C_m \end{align*} where agg is an aggregation operation and $C_j$ is a filter condition. \end{definition} \begin{example}\label{ex:query_ex}\it Returning to the running example in Section~\ref{sec:intro}, the user queries the predicted repeat buyer rate. This can be expressed as $Q=q_1/q_2$, an arithmetic expression over $q_1$ and $q_2$ where \begin{align*}\small q_1 &= \text{SELECT COUNT(*) FROM I WHERE M.predict(I)=`repeat buyer';} \\ q_2 &= \text{SELECT COUNT(*) FROM I;} \end{align*} \end{example} \stitle{Complaint.} After the user executes a query, she may find that the result is unexpected and \textit{complain} about its value. In this work, the user can complain about the result being too high or too low, as done in ~\cite{roy14}. We use the notation $dir=low$ ($dir=high)$ to indicate that $Q$ is unexpectedly high (low). \begin{example} In our running example, the user found the repeat buyer rate too high. Thus along with the query $Q$ from Example~\ref{ex:query_ex}, the user specifies $dir=low$ to indicate that $Q$ should be lower. \end{example} \stitle{Explanation.} After the user complains about a query result, \textsf{BOExplain}\xspace will return an explanation for the complaint. In this work, we define an explanation as a predicate over given variables. \begin{definition}[Explanation] \label{def:explanation} Given numerical variables $N_1, \dots, N_n$ and categorical variables $C_1, \dots, C_m$, an explanation is a predicate $p$ of the form $$p=l_1\le N_1\le u_1\wedge\dots\wedge l_n\le N_n\le u_n\wedge C_1=c_1\wedge\dots\wedge C_m=c_m.$$ The set of all such predicates forms the \textit{predicate space} $S$. \end{definition} \begin{example} \it The source data in Figure~\ref{fig:workflow} contains the variables Date and Website. An example explanation over these variables is $$12/01/2020 \le \text{Date} \le 12/10/2020 \wedge \text{Website}=w.$$ \end{example} \stitle{Objective Function.} Next we define our objective function. The goal of our system is to find the best explanation for the user's complaint. Hence, we need to measure the quality of an explanation. For a predicate $p$, let $\sigma_{\neg p}(R)$ represent $R$ filtered to contain all tuples that do not satisfy $p$. We apply the query to $\sigma_{\neg p}(R)$ and get the new query result. If the user specifies $dir=low$, then the smaller the new query result is, the better the explanation is. Hence, we use the new query result as a measure of explanation quality. The objective function is formally defined in Definition~\ref{def:obj}. \begin{definition}[Objective Function] \label{def:obj} Given a predicate $p$, relation $R$, and query $Q=E(q_1,\dots,q_k)$, the objective function $obj(p, R, Q) \rightarrow \mathbb{R}$ applies $Q$ on the relation $\sigma_{\neg p}(R)$. \end{definition} With the definition of objective function, the problem of searching for the best explanation is equivalent to finding a predicate that minimizes or maximizes the objective function. \begin{definition}[SQL Explanation Problem] \label{def:problem} Given a relation $R$, query $Q=E(q_1,\dots,q_k)$, direction $dir$, and predicate space $S$, find the predicate \emph{$p^*=\operatorname*{arg\,min}_{p\in S}obj(p, R, Q)$} if $dir=low$ (use $\operatorname*{arg\,max}$ if $dir=high$). \end{definition} It may appear that minimizing the above objective function runs the risk of overfitting to the user's complaint (perhaps with an overly complex predicate). However, a regularization term can be placed within the objective function---for instance, SQL explanation typically regularizes using the number of tuples that satisfy the predicate~\cite{wu13}. Since $Q$ is an arithmetic expression over multiple queries, one of those queries may simply be the regularization term. \subsection{Extension to Inference Query Explanation} For inference query explanation, we focus on three input datasets that the user can generate explanations from: source, training, and inference\footnote{In general, any intermediate dataset is acceptable, however we focus on these three due to their prevalence and to simplify the paper.}. The query processing pipeline is as follows (Figure~\ref{fig:workflow}(a)): \begin{enumerate}[leftmargin=*] \item Transform and featurize the source data into the training data. \item Train an ML model over the training data. \item Use the model to predict a variable from the inference dataset. \item Issue a query over the inference dataset. \end{enumerate} \smallskip\noindent From the above workflow, we can find that there are two differences between SQL and inference query explanations: 1) the query for inference query explanation is evaluated on the inference data with model predictions, and 2) in inference query explanation, the user may want an explanation for the input dataset at any step of the workflow (e.g., the source, training, or inference dataset), while SQL explanation only consider the query's direct input. We next formally define the scope of the errors that we seek to explain in Definition 5. \begin{definition}[Scope of Errors] This paper focuses on errors in the form of systematically mislabelled tuples that can be described using a predicate as defined in Definition~\ref{def:explanation}. \end{definition} We next extend the objective function from SQL explanation to inference query explanation. Let $Q$ be the query issued by the user over the updated inference data, with the same form as in Definition~\ref{def:query}. Let $R$ be the data that we want to derive an explanation from (it can be source, training, or inference data) and $p$ be an explanation (i.e., predicate) over $R$. We measure the quality of $p$ like in SQL explanation: filter the data by $p$, then get the new query result. Note that for inference query explanation, the query is issued over the updated inference data. Hence, we define $\mathcal{P}$ as the subset of the ML pipeline that takes as input the dataset $R$ that we wish to generate an explanation from, and that outputs the updated inference data which is used as input to the SQL query. The extended objective function is defined in Definition~\ref{def:obj-sqlml}. \begin{definition}[Objective Function] \label{def:obj-sqlml} Given a subset of an ML pipeline $\mathcal{P}$, a predicate $p$, relation $R$, and query $Q$, the objective function $obj(p, R, \mathcal{P}, Q) \rightarrow \mathbb{R}$ feeds $\sigma_{\neg p}(R)$ through $\mathcal{P}$, and then applies $Q$ on the inference data. \end{definition} Finally, we define the inference query explanation problem. \begin{definition}[Inference Query Explanation Problem] \label{def:problem-sql-ml} Given a relation $R$, query $Q$, direction $dir$, pipeline $\mathcal{P}$, and predicate space $S$, find the predicate \emph{$p^*=\operatorname*{arg\,min}_{p\in S}obj(p, R, Q, \mathcal{P})$} if $dir=low$ (use $\operatorname*{arg\,max}$ if $dir=high$). \end{definition} We assume that an explanation in the form of Definition~\ref{def:explanation} that performs well under the objective function in Definition~\ref{def:problem-sql-ml} is meaningful to the user. Hence, if $dir=low$ ($high$), the predicate $p^*$ that minimizes (maximizes) the objective function is considered optimal. \section{Related Work}\label{sec:related_work} Our work is mainly related to query explanation, ML pipeline debugging, and Bayesian optimization. \stitle{Query Explanation. } \textsf{BOExplain}\xspace is most closely related to Scorpion~\cite{wu13} and the work of Roy and Suciu~\cite{roy14}. Both approaches define explanations as predicates. Scorpion uses a space partitioning and merging process to find the predicates, while Roy and Suciu~\cite{roy14} use a data cube approach. Both systems make assumptions about the aggregation query's structure in order to benefit from their white-box optimizations. In contrast, \textsf{BOExplain}\xspace supports complex queries, model training, and user defined functions. Further, \textsf{BOExplain}\xspace is a progressive algorithm that improves the explanation over time. Variations of these ideas include the DIFF operator~\cite{abuzaid2020diff}, explanation-ready databases~\cite{roy15}, and counterbalances~\cite{miao2019going}. Finally, a number of specialized systems focus on explaining specific scenarios, such as streaming data~\cite{bailis2017macrobase}, map-reduce jobs~\cite{khoussainova2012perfxplain}, online transaction processing workloads \cite{yoon2016dbsherlock}, cloud services~\cite{roy2015perfaugur}, and range-radius queries~\cite{savva2018explaining}. Another related concept is the online analytical processing (OLAP) data cube \cite{gray1997data} which is used to explore and discover insights about subsets of multidimensional queries. Much previous work has been dedicated to providing the user with more meaningful and efficient exploration of the data cube \cite{sarawagi1998discovery, sathe2001intelligent, sarawagi2000i3}. Other work has used the \textit{data cube} concept to further understand the results of ML models \cite{chen2005prediction, chung2019slice, pastor2021looking}. However, \textsf{BOExplain}\xspace is different from the cube-based approaches in two aspects. First, \textsf{BOExplain}\xspace can generate explanations from not only inference data but also training and source data. Second, \textsf{BOExplain}\xspace does not need to discretize numerical variables. \stitle{ML Pipeline Debugging.} Rain~\cite{wu2020complaint} is designed to resolve a user's complaint about the result of an inference\xspace query by removing a set of tuples that highly influence the query result. In contrast, \textsf{BOExplain}\xspace removes sets of tuples satisfying a predicate, which can be easier for a user to understand. In addition, \textsf{BOExplain}\xspace is more expressive, and supports UDFs, data science workflows, and pre-processing functions. Data X-Ray \cite{wang2015data} focuses on explaining systematic errors in a data generative process. Other systems debug the configuration of a computational pipeline \cite{lourencco2020bugdoc, krishna2020cadet, artho2011iterative, zhang2014encore}. \stitle{Optimization Algorithms.} Bayesian optimization (BO) is used to optimize expensive black box functions (see \cite{frazier2018tutorial,shahriari2015taking,brochu2010tutorial,lizotte2008practical} for overviews). BO consists of a surrogate model to estimate the expensive, derivative-free objective function, and an acquisition function to determine the next best point. The most common surrogate models are Gaussian processes~\cite{schonlau1998global} (GP) and tree-structured Parzen estimators~\cite{bergstra2011algorithms,bergstra2013making} (TPE). We selected TPE since it scales linearly in the size of the set of evaluated points, whereas a GP scales cubically~\cite{bergstra2011algorithms}. Other surrogate models include random forests~\cite{hutter2011sequential} and neural networks~\cite{snoek2015scalable}. Expected improvement~\cite{schonlau1998global} is the most common acquisition function. Hyperband~\cite{li2017hyperband} is a bandit-based approach for hyperparameter tuning that uses adaptive resource allocation and early-stopping to speed up random search. We did not choose Hyperband as the optimization approach since a time budget needs to be specified before running the algorithm (whereas TPE can run progressively), and our categorical variable optimizations in Section~\ref{sec:cat_enc} are designed for a sequential optimization algorithm, which Hyperband is not. \stitle{Categorical Bayesian Optimization.} Categorical variables in BO are often handled by one-hot encoded \cite{golovin2017google, garrido2020dealing, feurer2019hyperparameter}. However, this approach does not scale well to variables with many distinct values~\cite{ru2020bayesian}. BO may use tree-based surrogate models (e.g., random forests~\cite{hutter2011sequential}, TPE~\cite{bergstra2011algorithms}) to handle categorical variables, however their predictive accuracy is empirically poor~\cite{garrido2020dealing,nguyen2020bayesian}. Other work optimizes a combinatorial search space \cite{baptista2018bayesian, deshwal2020scalable, oh2019combinatorial}, and categorical/category-specific continuous variables \cite{nguyen2020bayesian}. These works only consider categorical variables or focus on categorical variables with few distinct values, which is unsuitable for query explanation. \section{How to handle invalid predicates}\label{sec:inv_pred} One problem with modelling variables individually and independently is the possibility of producing predicates that are not satisfied by any tuples, hereafter called \textit{invalid predicates} (conversely, \textit{valid predicates} are predicates that satisfy at least one tuple). For example, consider using \textsf{BOExplain}\xspace to find a predicate over categorical variables \texttt{City} and \texttt{State}. Since the value for each parameter is chosen independently, a possible predicate is \texttt{City = ``Miami'' $\wedge$ State = ``CA''}, which no tuples satisfy. Invalid predicates are a problem because the objective function cannot be evaluated, and so the BO models cannot determine the efficacy of the parameter values. Since a predicate may need to be produced from multiple categorical variables with many distinct values, invalid predicates can manifest frequently. {\color{gray} For example, in Experiment~\ref{exp:house} we derive an explanation from one numerical and two categorical variables, and $80\%$ of the possible predicates are invalid.} \jn{Let's do some calculation or show some exp numbers to support this argument (invalidate predicates are frequent).} We found that previous research in constrained optimization is insufficient for this setting (see Related Work for more), {\color{gray} A simple approach for handling invalid predicates is to return a penalty value from the objective function that is at least as bad as the worst possible objective value \cite{feurer2019hyperparameter}. This does not work in our scenario because when the frequency of invalid predicates is high BO may rarely see a valid predicate, and so the quality of the valid regions of the search space cannot be modelled accurately. There are other methods but they are not applicable (see \hyperref[sec:related_work]{Related Work}) .} \jn{Let's describe the simple approach to handle it (i.e., set it to the minimum value for fmax), and explain why it does not work. Then, say there are other ways but they are not applicable (see Related Work). } therefore, we propose an extension to the TPE algorithm to prevent \textsf{BOExplain}\xspace from producing invalid predicates. Recall to optimize the EI acquisition function, TPE samples from the distribution $l(x)$ (the best performing points) and then computes their EI (lines 7 and 8 in Algorithm~\ref{algo:tpe}). \jn{Algorithm~\ref{algo:tpe}?} Rather than form a predicate from the points that attain the largest EI for each individual parameter, our ideas it to find the combination of parameter values that lead to the largest multiplicative EI score for a valid predicate. Specifically, for each dimension $j$ in the parameter space, we will find the top $k$ best EI candidates $\{(z_i, EI(z_i))\}_{i=1}^k$. Next, we normalize the EI scores for each parameter $S_{ei}^j=\{(z_i, EI(z_i)/\sum_{l=1}^kEI(z_l))\}_{i=1}^k=\{(z_i, EI'(z_i))\}_{i=1}^k$. Finally, we compute the $d-$ary Cartesian product $S=S_{ei}^1\times\dots\times S_{ei}^d =\{((z_{i_1},\dots,z_{i_d}), EI'(z_{i_1})\cdot\ldots\cdot EI'(z_{i_d})) \mid i_j \in \{1, 2, \dots, k\} \}$ giving a combined EI value for each predicate which serves as a heuristic for finding high-quality valid predicates. The predicate with the highest score is the next point evaluated by the objective function, $s_1\in\{s_1 \mid (s_1, s_2) \in S, s_2 = \max(\{s_2 \mid (s_1, s_2) \in S\})\}$. If all candidate predicates are invalid, \textsf{BOExplain}\xspace selects a valid predicate at random {\color{gray} by randomly selecting values for each constraint until a valid predicate is found}. \jn{How to select a valid predicate at random?} \bl{Can we remove this sentence "If all candidate predicates are invalid, \textsf{BOExplain}\xspace selects a valid predicate at random"? This never occurs in our experiments, and I think it might be more of an engineering detail to make sure the system doesn't fail} There is a two step process for determining if a candidate predicate is valid. First, the combination of categorical values is checked in a cached set of all valid combinations of categorical values, which is an $O(1)$ operation. For example, given the predicate \texttt{City = ``Miami'' $\wedge$ State = ``CA'' $\wedge$ $42 \le $ Age $ \le 47$}, the combination \texttt{City = ``Miami'' $\wedge$ State = ``CA''} is searched for existence in the cached set. Second, if the categorical constraints are valid, and the predicate contains numerical variables, a data scan is performed to determine if the predicate is valid. That is, for predicate \texttt{City = ``Miami'' $\wedge$ State = ``FL'' $\wedge$ $42 \le $ Age $ \le 47$}, since tuples satisfy \texttt{City = ``Miami'' $\wedge$ State = ``FL''}, a data scan is performed to determine if any tuples satisfy the full predicate. \example{Suppose we have two categorical variables \texttt{State} and \texttt{City}, where domain$(\texttt{State}) = \{\text{AZ, CA, FL}\}$ and domain$(\texttt{City}) = \{\text{Mesa, Napa, Miami}\}$. Let $n_{EI}=k=2$. Suppose CA and AZ are sampled for variable \texttt{State} with EI scores $2$ and $1$ respectively, giving the set $S_{EI}^{\texttt{State}}=\{(CA, 2), (AZ, 1)\}$. Similarly, suppose for the variable \texttt{City} we have $S_{EI}^{\texttt{City}}=\{(Mesa, 3), (Napa, 1)\}$. Next, we normalize the EI scores giving $S_{EI}^{\texttt{State}}=\{(CA, 2/3), (AZ, 1/3)\}$ and $S_{EI}^{\texttt{City}}=\{(Mesa, 3/4), (Napa, 1/4)\}$. We compute $S_{EI}^{\texttt{State}} \times S_{EI}^{\texttt{City}} = \{((CA, Mesa), 1/2), ((CA, Napa), 1/6), ((AZ, Mesa), 1/4), \\ ((AZ, Napa), 1/12)\}$. Finally, since $((AZ, Mesa), 1/4)$ is the valid predicate with the highest EI score, \textsf{BOExplain}\xspace returns the predicate \texttt{City = ``Mesa'' $\wedge$ State = ``AZ''}.} \fi \section{Supporting categorical variables} \label{sec:cat_enc} In this section, we present our techniques to enable \textsf{BOExplain}\xspace to support categorical variables more effectively. \iffalse A major challenge in adapting TPE to query explanation is that it scales poorly for high cardinality categorical variables, which are common in databases (though may not be as common in ML model tuning). This is because all of the distinct values cannot be tested during a run of BO in a reasonable amount of time \ewu{I don't understand this part, because the solution evaluates every distinct value. Are you saying that doing this in EVERY ITERATION is bad, or that we will do some offline preprocessing?}, and the quality of untested values cannot be accurately predicted. For instance, there may be hundreds of \texttt{City} values in our running example, and evaluating the objective for \texttt{Miami} does not help assess the objective for \texttt{Mesa}. To address this issue, we propose a categorical encoding technique, called individual contribution (IC), that enables the quality of untested points to be predicted. We also present a ``warm start'' heuristic that can more quickly lead TPE to find good predicate spaces. \fi \subsection{Individual Contribution Encoding }\label{sec:indiv_cont_enc} Recall that in Section~\ref{tpe}, TPE models numerical and categorical variables using kernel density estimation and categorical distribution, respectively. The advantage of kernel density estimation over a categorical distribution is that it can estimate the quality of unseen points based on the points that are close to them. To benefit from this advantage, we map a categorical variable to a numerical variable. We call this idea \emph{categorical encoding}. In the following, we present our categorical encoding approach, called individual contribution (IC) encoding. A good encoding method should put \emph{similar} categorical values close to each other. Intuitively, two categorical values are similar if they have a similar contribution to the objective function value. Based on this intuition, we rank the categorical values by their individual contribution to the objective function value. Specifically, consider a categorical variable $C$ with domain$(C)=\{c_1,\dots,c_n\}$. For each value $c_i$, we obtain the filtered dataset $\sigma_{C\ne c_i}(S)$ w.r.t. the predicate $C=c_i$. Next, the objective function is evaluated on the relation $\sigma_{C\ne c_i}(S)$ which returns a number. This number can be interpreted as the contribution of the categorical value on the objective function. After repeating for all values $c_i$, the categorical values are mapped to consecutive integers in order of their IC. \textsf{BOExplain}\xspace will then use a numerical rather than categorical variable to model $C$. \example\label{ex:indiv_cont}{\it Suppose we would like an explanation from the inference data in Table~\ref{tab:inference}. Suppose the objective function value is the repeat buyer rate and the predicate space is defined over the Occupation variable. Note that the Occupation variable has the domain \{Athlete, Artist, Writer\}. The IC of Athlete is determined by removing the tuples where Occupation=``Athlete'' and computing the objective function on the filtered dataset, which gives $0.5$ (since only one of the two tuples in the filtered dataset is a repeat buyer). Similarly, the ICs of Artist and Writer are $0.75$ and $1$ respectively. Finally, we sort the categorical values by their objective function value and encode the values as integers: Athlete $\rightarrow1$, Artist $\rightarrow2$, Writer $\rightarrow3$.} \subsection{Warm Start}\label{warm_start} We next propose a warm-start approach to further enhance \textsf{BOExplain}\xspace's performance for categorical variables. Since an IC score has been computed for each categorical value, we can prioritize predicates that are composed of well performing individual categorical values. Rather than selecting $n_{\text{init}}$ points at random to initialize the TPE algorithm, we select the $n_{\text{init}}$ combinations of categorical values with the best combined score. More precisely, for a variable $C_i$, we consider the tuple pairs (variable value, IC) as computed in Section~\ref{sec:indiv_cont_enc}, $S_{IC}^i=\{(c_j, IC(c_j))\}_{j=1}^{n_i}$, where $n_i$ is the number of unique values in variable $C_i$. Next, we compute the d$-$ary Cartesian product and add the ICs for each combination $S_{IC}=S_{IC}^1\times\dots\times S_{IC}^d =\{((c_{i_1},\dots,c_{i_d}), IC(c_{i_1})+\dots+ IC(c_{i_d})) \mid i_j \in \{1,\dots,n_j\} \}$. \begin{example}\label{ex:ic} The IC for values in the Occupation variable were computed in Example \ref{ex:indiv_cont}, $S_{ic}^{\text{Occupation}}=\{(\text{Athlete}, 0.5), (\text{Artist}, 0.75),\\ (\text{Writer}, 1)\}$, and for Sex we have $S_{ic}^{\text{Sex}}=\{(\text{F}, 0.5), (\text{M}, 1)\}$. Next we compute the combined IC score for each combination of predicates $S_{IC} = \{((\text{Athlete, F}), 1), \dots, ((\text{Writer, M}), 2)\}$. \end{example} To see why adding ICs can be useful for prioritizing good predicates, suppose we want to minimize the objective function, and that $C_1=c_1$ and $C_2=c_2$ have small ICs. Then it is likely that $C_1=c_1 \wedge C_2=c_2$ has a small value. So we choose to sum the IC values as it encodes this property. Finally, we select $n_{\text{init}}$ valid predicates with the best combined IC score. Recall the user defines the direction that the objective function should be optimized. Therefore, we select the predicates with the smallest (largest) IC score if the objective function should be minimized (maximized). If the predicate also contains numerical variables, values are selected at random to initialize the range constraint parameters. \begin{example} Continuing with Example~\ref{ex:ic}, recall that we want to minimize the objective function, so the smaller the combined IC score the better. Suppose $n_{\text{init}}=2$, then on the first and second iterations of BO, we evaluate the predicates $\texttt{Occupation}=\text{``Athlete''} \wedge \texttt{Sex}=\text{``F''}$ and $\texttt{Occupation}=\text{``Artist''} \wedge \texttt{Sex}=\text{``F''}$ respectively. Note that $\texttt{Occupation}=\text{``Athlete''} \wedge \texttt{Sex}=\text{``F''}$ is the best predicate, so adding IC scores can prioritize good explanations. \end{example} \subsection{Putting Everything Together} We lastly present the full \textsf{BOExplain}\xspace algorithm in Algorithm~\ref{algo:boexplain}. First, the ICs for the categorical variables are computed in lines 1-3. Next, the parameters and domains are created in line 4. In line 5, the IC values are used to prioritize predicted high quality predicates, and in line 6 TPE is initialized for $n_{\text{init}}$ iterations with the predicted high quality predicates. Starting from line 7, we use a model to select the next points. In line 8, the previously evaluated points are split into good and bad groups based on $\gamma$. Next, from line 9, a value is selected for each parameter. In lines 10 and 11, distributions of the good and bad groups are modelled, respectively. In line 12, points are sampled from the good distribution, and the sampled point with the largest expected improvement is selected as the next parameter value (line 13). In line 15, the objective function is evaluated based on the parameter assignment, and the set of observation-value pairs is updated. \begin{algorithm}[t] \caption{\textsf{BOExplain}\xspace} \label{algo:boexplain} \DontPrintSemicolon \SetKwInOut{Initialize}{Initialize} \SetAlgoLined \KwIn{Objective function $obj$, data $S$, variables $A_1,\dots,A_n$} \KwOut{A predicate and the corresponding objective value} \ForEach{categorical variable $C$}{ Compute the IC of all unique values in $C$\; } \textbf{Create} the parameters and domains\; Compute the predicted high quality combinations based on IC for the warm start\; \textbf{Initialize TPE:} Perform $n_{\text{init}}$ iterations using a warm start to create \tikzmark{right} $D_{n_{\text{init}}} = \{(\textbf{x}_i , obj(\sigma_{\neg\textbf{x}_i}(S))\}_{i=1}^{n_{\text{init}}}$.\; \For{$t\leftarrow n_{\text{init}}$ \KwTo $n_{\text{iter}}$}{ Split $D_t$ into $D_t^g$ and $D_t^b$ based on $\gamma$\; \For{$i\leftarrow 1$ \KwTo $d$}{ Estimate $g(x)$ on the i$th$ dimension of $D_t^g$\; Estimate $b(x)$ on the i$th$ dimension of $D_t^b$\; Sample $n_{EI}$ points from $g(x)$\; Find the sample $x_{t+1}$ with the highest $g(x)/b(x)$\; } Update $D_{t+1} \leftarrow D_t\cup\{(\textbf{x}_{t + 1}, obj(\sigma_{\neg\textbf{x}_{t+1}}(S)))\}$ } \KwRet{$(\textbf{x}, obj(\sigma_{\neg\textbf{x}}(S)))\in D_{n_{\text{iter}}}$ with the best objective value} \end{algorithm}
\section{Introduction} Population dynamics theory is important to a proper understanding of living populations at all levels. This is a well developed branch of mathematical biology, which has a history of more than two hundred years. The book \cite{Ba} contains a short history of applications of mathematics to solving various problems in population dynamics. For background and motivations of the theory of population dynamics see \cite{AR}-\cite{Varro.book.2015}. In this paper we consider a bisexual population which consists females partitioned into types indexed by $\{1,2,\dots,n\}$ and the males partitioned into types indexed by $\{1,2,\dots,\nu \}$ (see \cite{Lyubich.book.1992}, \cite{Rpd}, \cite{Rozikov.book.2011} for details). Let $\gamma_{ik,j}^{(f)}$ and $\gamma_{ik,l}^{(m)}$ be inheritance coefficients defined as the probability that a female offspring is type $j$ and, respectively, that a male offspring is of type $l$, when the parental pair is $ik$ $(i,j=1,\dots,n$; and $k,l=1,\dots,\nu)$. These quantities satisfy the following \begin{equation}\label{kp}\begin{array}{ll} \gamma_{ik,j}^{(f)}\geq 0, \ \ \gamma_{ik,l}^{(m)}\geq 0,\\[3mm] \sum_{j=1}^n\gamma_{ik,j}^{(f)}+\sum_{l=1}^\nu \gamma_{ik,l}^{(m)}=1, \ \ \mbox{for all} \ \ i,k,j,l. \end{array} \end{equation} Define $(n+\nu-1)-$dimensional simplex: $$S^{n+\nu-1}=\left\{s=(x_1, \dots, x_n, y_1,\dots,y_\nu)\in \mathbb R^{n+\nu}: x_i\geq 0, y_j\geq 0, \sum_{i=1}^nx_i+\sum_{j=1}^\nu y_j=1\right\}.$$ Denote $${\mathcal O}=\left\{s\in S^{n+\nu-1}: (x_1,\dots,x_n)=(0,\dots,0) \, \mbox{or} \, (y_1,\dots,y_\nu)=(0,\dots,0)\right\}.$$ $${\mathcal S}^{n,\nu}=S^{n+\nu-1}\setminus {\mathcal O}.$$ Following \cite{Rozikov.book.2016} define an evolution operator $V: {\mathcal S}^{n,\nu}\to {\mathcal S}^{n,\nu}$ (which is called normalized gonosomal operator) as \begin{equation}\label{v3n} V:\left\{ \begin{array}{ll} x'_{j}\;=\;\dfrac{\sum_{i,k=1}^{n,\nu}\gamma_{ik,j}^{(f)}x_{i}y_{k}}{\Bigl(\sum_{i=1}^{n}x_{i}\Bigr)\left(\sum_{j=1}^{\nu}y_{j}\right)}, & j=1,\dots,n\medskip\\[3mm] y'_{l}\;=\;\dfrac{\sum_{i,k=1}^{n,\nu}\gamma_{ik,l}^{(m)}x_{i}y_{k}}{\Bigl(\sum_{i=1}^{n}x_{i}\Bigr)\left(\sum_{j=1}^{\nu}y_{j}\right)}, & l=1,\dots,\nu. \end{array}\right. \end{equation} {\bf The main problem:} For given operator $V$ and initial point $z^{(0)}\in {\mathcal S}^{n,\nu}$ what ultimately happens with the trajectory $z^{(m)}=V(z^{(m-1)}), \ \ m=1,2,\dots$? Does the limit $\lim_{m\to\infty} z^{(m)}$ exist? If not what is the set of limit points of the sequence? In general, this is very difficult problem. In book \cite{Rpd} several recently obtained results related to this main problem are given. In this paper we consider the special case: $n=\nu=2$ and the following coefficients: \begin{equation}\label{kk} \begin{array}{cccc} \gamma_{11,1}^{(f)}=a &\gamma_{11,2}^{(f)}=0& \gamma_{11,1}^{(m)}=b&\gamma_{11,2}^{(m)}=0\\[3mm] \gamma_{12,1}^{(f)}=0 &\gamma_{12,2}^{(f)}=\sigma_1& \gamma_{12,1}^{(m)}=\sigma_2&\gamma_{12,2}^{(m)}=0\\[3mm] \gamma_{21,1}^{(f)}=0 &\gamma_{21,2}^{(f)}=a& \gamma_{21,1}^{(m)}=b&\gamma_{21,2}^{(m)}=0\\[3mm] \gamma_{22,1}^{(f)}=0 &\gamma_{22,2}^{(f)}=a& \gamma_{22,1}^{(m)}=0&\gamma_{22,2}^{(m)}=b. \end{array} \end{equation} Then corresponding evolution operator $W:S^{2,2}\rightarrow{S^{2,2}}$ is \begin{equation}\label{A1} W: \left\{ \begin{array}{ll} \begin{aligned} & x' &= \quad &\frac{axu}{(x+y)(u+v)} \\[2mm] & y' &= \quad &\frac{\sigma_1xv+ayu+ayv}{(x+y)(u+v)} \\[2mm] & u' &= \quad &\frac{\sigma_2xv+bxu+byu}{(x+y)(u+v)}\\[2mm] & v' &= \quad &\frac{byv}{(x+y)(u+v)}, \end{aligned} \end{array} \right. \end{equation} where coefficients satisfy $$a+b=\sigma_1+\sigma_2=1, \ \ a, b, \sigma_1, \sigma_2>0.$$ \begin{rk} From the probabilities (\ref{kk}) one can notice that type $1$ of females (resp. type $2$ of males) can be born only if both parents have type $1$ (resp. 2). Type $2$ of females (resp. type $1$ of males) can \emph{not} be born if both parents have type $1$ (resp. $2$). \end{rk} For this operator $W$ and arbitrarily initial point $s^{(0)}\in S^{2,2}$, we will study the trajectory $\{s^{(m)}\}_{m=0}^{\infty}$, where $$s^{(m)}=W^{m}(s^{(0)})= \underbrace {W(W(...W}_{m}(s^{(0)}))...).$$ \section{Fixed points} \noindent A point $s$ is called a fixed point of the operator $W$ if $s=W(s)$. The set of all fixed points denoted by Fix$(W)$. Let us find all the fixed points of $W$ given by \eqref{A1}, i.e.~we solve the following system of equations for $(x,y,u,v)$: \begin{equation}\label{F} \left\{ \begin{array}{ll} x(x+y)(u+v)=axu,\vspace{1,5mm} \cr y(x+y)(u+v)=\sigma_1xv+ayu+ayv,\vspace{1,5mm} \cr u(x+y)(u+v)=\sigma_2xv+bxu+byu,\vspace{1,5mm} \cr v(x+y)(u+v)=byv. \end{array} \right. \end{equation} If $x=0$ then $y\neq0$ and from the second equation of the system \eqref{F} we get $y=a$. In addition, the third and the fourth equations of the system \eqref{F} give $u+v=b$. If $v=0$ then $u\neq0$ and from the third equation of the system \eqref{F} we get $u=b$. The second and the third equations of the system \eqref{F} give $x+y=a$. If $xv\neq0$ then we come to \begin{equation}\label{I.par} \left\{ \begin{array}{ll} (x+y)(u+v)=au,\vspace{1,5mm} \cr y(x+y)(u+v)=\sigma_1xv+ayu+ayv,\vspace{1,5mm} \cr u(x+y)(u+v)=\sigma_2xv+bxu+byu,\vspace{1,5mm} \cr (x+y)(u+v)=by. \end{array} \right. \end{equation} The first and the second equations of the system \eqref{I.par} give $$\sigma_1x+ay=0.$$ At the same time the third and the fourth equations of the system \eqref{I.par} give $$\sigma_2v+bu=0.$$ Since $a,b,\sigma_1,\sigma_2>0$ then when we solve the last two equations we obtain $x=y=u=v=0$, however this point is not in the space $S^{2,2}$. Thus the set of all fixed points of operator \eqref{A1} is Fix$(W)=F_{11}\cup F_{12}$, where $$F_{11}=\Big\{(0,a,u,v): \quad u+v=b, \quad u, \, v \in[0,b] \Big\}$$ and $$F_{12}=\Big\{(x,y,b,0):\quad x+y=a, \quad x,\,y\in[0,a]\Big\}.$$ \begin{defn} A fixed point $s$ of the operator $W$ is called hyperbolic if its Jacobian $J$ at $s$ has no eigenvalues on the unit circle. \end{defn} \begin{defn} A hyperbolic fixed point $s$ is called: i) attracting if all the eigenvalues of the Jacobi matrix $J(s)$ are less than 1 in absolute value; ii) repelling if all the eigenvalues of the Jacobi matrix $J(s)$ are greater than 1 in absolute value; iii) a saddle otherwise. \end{defn} It is not hard to see that $\lambda_1=0$, $\lambda_2=1$, $\lambda_3=1-\frac{v}{b}$ and $\lambda_1=0$, $\lambda_2=1$, $\lambda_3=1-\frac{x}{a}$ are eigenvalues of the fixed points of the forms $F_{11}$ and $F_{12}$ respectively. By these definitions we see that all fixed points of the operator \eqref{A1} are nonhyperbolic fixed points. \section{Limit set} Denote $${\partial{S^{2,2}}}=\{t=(x,y,u,v)\in S^{2,2}: xyuv=0\}.$$ Take any initial point $t=(x,y,u,v)\in{\partial{S^{2,2}}}$. Consider the following subsets of ${\partial{S^{2,2}}}$. \begin{center} $E_1=\big\{(x,y,u,v)\in{\partial{S^{2,2}}}: x=0 \big\}$, \\ $E_2=\big\{(x,y,u,v)\in{\partial{S^{2,2}}}: y=0 \big\}$,\\ $E_3=\big\{(x,y,u,v)\in{\partial{S^{2,2}}}: u=0 \big\}$,\\ $E_4=\big\{(x,y,u,v)\in{\partial{S^{2,2}}}: v=0 \big\}$. \end{center} If $t=(x,y,u,v)\in{E_1}$ then $W(t)\in{F_{11}}$. If $t=(x,y,u,v)\in{E_4}$ then $W(t)\in{F_{12}}$. \\When $t=(x,y,u,v)\in{E_2}$ then $W(t)\in{E_4}$ and $W^{2}(t)\in{F_{12}}$. \\When $t=(x,y,u,v)\in{E_3}$ then $W(t)\in{E_1}$ and $W^{2}(t)\in{F_{11}}$. Now we take any initial point $t=(x,y,u,v)\in{S^{2,2}}\backslash{\partial{S^{2,2}}}$. Introduce the following notations \begin{equation}\label{A9} \alpha=\frac{x}{x+y}, \quad \beta=\frac{v}{u+v}, \quad \alpha'=\frac{x'}{x'+y'}, \quad \beta'=\frac{v'}{u'+v'}, \end{equation} which yields the nonlinear dynamical system \begin{equation}\label{A10} V: \begin{cases} \displaystyle \alpha'=\frac{\alpha(1-\beta)}{1+(p_1-1)\alpha\beta}, \\[2ex] \displaystyle \beta'=\frac{\beta(1-\alpha)}{1+(p_2-1)\alpha\beta} \end{cases} \end{equation} with the initial point $(\alpha^{(0)}, \beta^{(0)})\in\Delta$, where \begin{equation} \Delta:=\{(\alpha,\beta)\in{\mathbb{R}^{2}}: 0\leq\alpha\leq1,\,\, 0\leq\beta\leq1\}=[0,1]^2, \end{equation} and $$p_1=\frac{\sigma_1}{a}, \quad \quad p_2=\frac{\sigma_2}{b}. $$ There are three cases for $p_1$, $p_2$. \begin{equation}\label{cases} \begin{aligned} & 1. \quad p_1=p_2=1, \\ & 2. \quad p_1>1>p_2>0, \\ & 3. \quad p_2>1>p_1>0. \end{aligned} \end{equation} In order to find the fixed points of the operator \eqref{A10} we solve the following system of equations for $(\alpha,\beta)$ \begin{equation}\label{A11} \left\{ \begin{array}{ll} \alpha(1+(p_1-1)\alpha\beta)=\alpha(1-\beta), \\[2ex] \beta(1+(p_2-1)\alpha\beta)=\beta(1-\alpha). \end{array} \right. \end{equation} This system of equations gives us $\alpha\cdot\beta=0$, that is $s_1=(\alpha,0)$ and $s_2=(0,\beta)$ are fixed points for the operator \eqref{A10} where $\alpha\geq0$, $\beta\geq0$. Using the system of equations \eqref{A10} we obtain \begin{equation}\label{A12} \begin{aligned} \alpha^{(m+1)}=\frac{\alpha^{(m)}(1-\beta^{(m)})}{1+(p_1-1) \alpha^{(m)}\beta^{(m)}}, \\[2ex] \displaystyle \beta^{(m+1)}=\frac{\beta^{(m)}(1-\alpha^{(m)})}{1+(p_2-1) \alpha^{(m)}\beta^{(m)}}. \end{aligned} \end{equation} \begin{lemma}\label{cs} For any initial point $(\alpha,\beta)\in[0,1]^2$ it holds that $$0\leq\alpha^{(m+1)}\leq\alpha^{(m)}, \quad 0\leq\beta^{(m+1)}\leq\beta^{(m)}.$$ In particular, the sequences $\alpha^{(m)}=\frac{x^{(m)}}{x^{(m)}+y^{(m)}}, \ \ m\geq1$ and $\beta^{(m)}=\frac{v^{(m)}}{u^{(m)}+v^{(m)}}, \ \ m\geq1$ are convergent. \end{lemma} \begin{proof} Since $V:[0,1]^2\rightarrow[0,1]^2$ and for any $m\in \mathbb{N}$ \begin{center} $1+(p_1-1)\alpha^{(m)}\in[\min\{1,p_1\}; \max\{1,p_1\}]$, \\ $1+(p_2-1)\beta^{(m)}\in[\min\{1,p_2\}; \max\{1,p_2\}]$, \\ $1+(p_1-1)\alpha^{(m)}\beta^{(m)}\in[\min\{1,p_1\}; \max\{1,p_1\}]$, \\ $1+(p_2-1)\alpha^{(m)}\beta^{(m)}\in[\min\{1,p_2\}; \max\{1,p_2\}]$ \end{center} then it holds that $$\alpha^{(m+1)}-\alpha^{(m)}=\frac{-\alpha^{(m)}\beta^{(m)}(1+(p_1-1)\alpha^{(m)})}{1+(p_1-1)\alpha^{(m)}\beta^{(m)}}\leq0,$$ and that $$\beta^{(m+1)}-\beta^{(m)}=\frac{-\alpha^{(m)}\beta^{(m)}(1+(p_2-1)\beta^{(m)})}{1+(p_2-1)\alpha^{(m)}\beta^{(m)}}\leq0.$$ This completes the proof. \end{proof} \begin{thm}\label{ta} For any initial point $(x,y,u,v)\in{S^{2,2}}$ the sequence $$W^m(x,y,u,v)=(x^{(m)},y^{(m)},u^{(m)},v^{(m)})$$ is convergent and $$\lim\limits_{m\rightarrow\infty}x^{(m)}\cdot{v^{(m)}}=0.$$ \end{thm} \begin{proof} By Lemma \ref{cs} all trajectories of the operator \eqref{A10} have a limit point and since the operator is continuous, each trajectory converges to a fixed point $s_1=(\alpha,0)$ or $s_2=(0,\beta)$. Therefore we have always $$\alpha^{(m)}\cdot\beta^{(m)}\rightarrow{0}, \ \ \mbox{as} \ \ m\rightarrow\infty.$$ In a view of \eqref{A1} and \eqref{A9} we get \begin{equation}\label{A13} \left\{ \begin{array}{ll} \begin{aligned} & x^{(m+1)} &= \, &\frac{ax^{(m)}u^{(m)} }{(x^{(m)}+y^{(m)}) (u^{(m)}+v^{(m)})} &=&a\alpha^{(m)}(1-\beta^{(m)}), \\[2mm] & y^{(m+1)} &= \, &\frac{\sigma_1x^{(m)}v^{(m)}+ay^{(m)}u^{(m)}+ ay^{(m)}v^{(m)}}{(x^{(m)}+y^{(m)})(u^{(m)}+v^{(m)})} &=& \sigma_1 \alpha^{(m)}\beta^{(m)}+a(1-\alpha^{(m)}), \\[2mm] & u^{(m+1)} &= \, &\frac{\sigma_2x^{(m)}v^{(m)}+bx^{(m)}u^{(m)}+ by^{(m)}u^{(m)}}{(x^{(m)}+y^{(m)})(u^{(m)}+v^{(m)})} &=& \sigma_2 \alpha^{(m)}\beta^{(m)}+b(1-\beta^{(m)}), \\[2mm] & v^{(m+1)} &= \, &\frac{by^{(m)}v^{(m)}}{(x^{(m)}+y^{(m)}) (u^{(m)}+v^{(m)})} &=& b\beta^{(m)}(1-\alpha^{(m)}). \end{aligned} \end{array} \right. \end{equation} This completes the proof. \end{proof} Define the following sets: \begin{align*} T_0 &= \Big\{(x,y,u,v)\in{S^{2,2}}: \, \lim\limits_ {m\rightarrow\infty}x^{(m)}=\lim\limits_ {m\rightarrow\infty}v^{(m)}=0\ \Big\}, \\ T_1 &= \Big\{(x,y,u,v)\in{S^{2,2}}: \, \lim\limits_ {m\rightarrow\infty}v^{(m)}=0, \quad \lim\limits_ {m\rightarrow\infty}x^{(m)}\in(0,a] \Big\}, \\ T_2 &= \Big\{(x,y,u,v)\in{S^{2,2}}: \, \lim\limits_ {m\rightarrow\infty}x^{(m)}=0, \quad \lim\limits_ {m\rightarrow\infty}v^{(m)}\in(0,b] \Big\}. \end{align*} If $t=(x,y,u,v)\in{T_0}$, then \begin{equation} \lim\limits_{m\rightarrow\infty}\beta^{(m)}=\lim\limits_{m\rightarrow\infty} \alpha^{(m)}=0. \end{equation} and \eqref{A13} shows that for any initial point $t=(x,y,u,v)\in{T_0}$ for the trajectories of the operator \eqref{A1} we have $$W_1^{m}=(x^{(m)},y^{(m)},u^{(m)},v^{(m)})\rightarrow {(0,a,b,0)} \quad \mbox{as} \, \, m \, \,\mbox{tends \, to} \, \, \infty.$$ If $t=(x,y,u,v)\in{T_1}$, then \begin{equation} \lim\limits_{m\rightarrow\infty}\beta^{(m)}=0 \ \ \mbox{and} \ \ \lim\limits_{m\rightarrow\infty} \alpha^{(m)}=\alpha_0\in(0,1]. \end{equation} System of equations \eqref{A13} shows that for any initial point $t=(x,y,u,v)\in{T_1}$ for the trajectories of the operator \eqref{A1} we have $$W_1^{m}=(x^{(m)},y^{(m)},u^{(m)},v^{(m)})\rightarrow {\Big(a\alpha_0, a(1-\alpha_0),b,0\Big)}\in{F_{12}} \quad \mbox{as} \, \, m \, \,\mbox{tends \, to} \, \, \infty.$$ If $t=(x,y,u,v)\in{T_2}$, then \begin{equation} \lim\limits_{m\rightarrow\infty}\alpha^{(m)}=0 \ \ \mbox{and} \ \ \lim\limits_{m\rightarrow\infty} \beta^{(m)}=\beta_0\in(0,1]. \end{equation} System of equations \eqref{A13} shows that for any initial point $t=(x,y,u,v)\in{T_2}$ for the trajectories of the operator \eqref{A1} we have $$W_1^{m}=(x^{(m)},y^{(m)},u^{(m)},v^{(m)})\rightarrow {\Big(0,a,b(1-\beta_0),b\beta_0\Big)}\in{F_{11}} \quad \mbox{as} \, \, m \, \,\mbox{tends \, to} \, \, \infty.$$ Therefore we have the following \begin{cor} For any initial point $t=(x,y,u,v)\in{S^{2,2}}$ the $\omega$-limit set $\omega(t)$ of the operator \eqref{A1} consists a single point and \begin{equation} \omega(t)\in\left\{\begin{array}{ll} \{(0,a,b,0)\} \ \ \mbox{if} \ \ t=(x,y,u,v)\in{T_0},\\[2mm] {F_{12}} \ \ \mbox{if} \ \ t=(x,y,u,v)\in{T_1},\\[2mm] {F_{11}} \ \ \mbox{if} \ \ t=(x,y,u,v)\in{T_2}. \end{array}\right. \end{equation} \end{cor} \begin{defn} An operator $W$ is called regular if for any initial point $s^{(0)} \in S^{2,2}$, the limit \[\lim_{m\to \infty}W^m(s^{(0)}) \] exists. \end{defn} The following is a corollary of Theorem \ref{ta}. \begin{cor} The operator \eqref{A1} is regular. \end{cor} We would like to describe the sets $T_0$, $T_1$ and $T_2$ implicitly. \subsection{Case 1} Let we have $$p_1=p_2=1.$$ Then operator \eqref{A10} looks like: \begin{equation}\label{V1} V_1:\left\{\begin{array}{ll} \alpha'=\alpha-\alpha\beta\\[2mm] \beta'=\beta-\alpha\beta \end{array}\right. \end{equation} where $(\alpha;\beta)\in\Delta$. $s_1=(\alpha,0)$ and $s_2=(0,\beta)$ are non-hyperbolic fixed points of \eqref{V1} with the eigenvalues $\lambda_1=1$, $\lambda_2=1-\alpha\in[0,1]$ and $\lambda_1=1$, $\lambda_2=1-\beta\in[0,1]$ respectively. We say the set $E$ is invariant respect to the operator $V$ if $V(E)\subset{E}$. \begin{lemma}The following sets $$M_0=\big\{(\alpha,\beta)\in[0,1]^2: \quad \beta=\alpha\big\}$$ $$M_1=\big\{(\alpha,\beta)\in[0,1]^2: \quad \beta<\alpha\big\}$$ and $$M_2=\big\{(\alpha,\beta) \in[0,1]^2: \quad \beta>\alpha\big\}$$ are invariant sets respect to the operator \eqref{V1}. \end{lemma} \begin{proof} Straightforward. \end{proof} We look for the invariant curves of the operator \eqref{V1}. Let $\beta=g(\alpha)$ be an invariant curve then $\beta'=g(\alpha')$ and to find invariant curve leads to solve the following iterative functional equation \begin{equation}\label{iterative f.e.1} f(\alpha)\big(\alpha-f(\alpha)\big)(1-\alpha) =\alpha\big(f(\alpha)-f(f(\alpha))\big) \end{equation} where $f(\alpha)=\alpha\big(1-g(\alpha)\big)$ which is not identically zero. We solve \eqref{iterative f.e.1} in the space $C^\infty{[0,1]}$. The equation \eqref{iterative f.e.1} gives $f(0)=0$. Moreover from $f\in{C^\infty{[0,1]}}$ we get \begin{equation}\label{f} f(\alpha)=\sum_{k=1}^{\infty}c_k\alpha^k \end{equation} and \begin{equation}\label{ff} f(f(\alpha))=\sum_{k=1}^{\infty}c_kf^k(\alpha)= \sum_{k=1}^{\infty}d_k\alpha^k \end{equation} where $$d_k=\sum_{l=1}^ {k}c_l\big(\sum_{i_1+i_2+...+i_l=k}c_{i_1}\cdot{c_{i_2}}\cdot... \cdot{c_{i_l}}\big).$$ \begin{thm} The solutions of the functional equation \eqref{iterative f.e.1} are $$ f(\alpha)=\alpha \ \ \mbox{and} \ \ f(\alpha)=\theta\alpha-\alpha^2 $$ where $\theta$ is an arbitrary constant. In particular $$g(\alpha)=0 \ \ \mbox{and} \ \ g(\alpha)= \alpha+1-\theta$$ are the only invariant curves of the operator \eqref{V1}. \end{thm} \begin{proof} Substituting \eqref{f} and \eqref{ff} to the \eqref{iterative f.e.1} we obtain \begin{equation}\label{identity} \sum_{k=1}^{\infty}a_k\alpha^k\equiv\sum_{k=1}^{\infty}b_k\alpha^k, \end{equation} which is equivalently to \begin{equation}\label{a_k=b_k} a_k=b_k \ \ \mbox{for all} \ \ k=1,2,... \end{equation} where $$b_k=\sum_{l=1}^{k}c_{l+1}\big(\sum_{i_1+i_2+...+i_l=k}c_{i_1} \cdot{c_{i_2}}\cdot...\cdot{c_{i_l}}\big)$$ and \begin{equation}\label{a_k} a_k=\left\{ \begin{array}{ll} -1-c_2+c_1 \ \ \mbox{if} \ \ k=1,\vspace{1,5mm} \cr c_{k+1}-c_k \ \ \mbox{if} \ \ k=2,3,...\vspace{1,5mm} \cr \end{array} \right. \end{equation} From identity of \eqref{identity} for $k=1$ it holds that $$(1-c_1)(1+c_2)=0.$$ For $k=2$ we see that $$c_3(1-c_1^2)=c_2(1+c_2).$$ For $k=3$ we see that $$c_4(1-c_1^3)=c_3(1+c_2+2c_1c_2).$$ These last three equations imply that $$c_1=1, \, c_2=0, \, c_3=0 \,\, \mbox{or} \,\, c_1 \,\, \mbox{is arbitrary}, \, c_2=-1, \, c_3=0.$$ Now we show by induction that $c_k=0$ for all $k=3,4,...$. Suppose $c_k=0$ for all $k=3,4,...n$. Then putting $k=n$, $k=n+1$ and $k=n+2$ in \eqref{a_k=b_k} we get $$c_{n+1}-c_{n}=\sum_{l=1}^{n}c_{l+1}\big(\sum_ {i_1+i_2+...+i_l=n}c_{i_1}\cdot{c_{i_2}}\cdot...\cdot {c_{i_l}}\big)$$ $$c_{n+2}-c_{n+1}= \sum_{l=1}^{n+1}c_{l+1}\big(\sum_{i_1+i_2+...+i_l=n+1} c_{i_1}\cdot{c_{i_2}}\cdot...\cdot{c_{i_l}}\big)$$ and $$c_{n+3}-c_{n+2}= \sum_{l=1}^{n+2}c_{l+1}\big(\sum_{i_1+i_2+...+i_l=n+2} c_{i_1}\cdot{c_{i_2}}\cdot...\cdot{c_{i_l}}\big).$$ These last three equations equivalent to \begin{equation}\label{c_1} c_{n+1}=c_{n+1}c_1^n \end{equation} \begin{equation}\label{c_2} c_{n+2}(1-c_1^{n+1})=c_{n+1}(1+c_2+nc_2c_1^{n-1}) \end{equation} and \begin{equation}\label{c_3} c_{n+3}(1-c_1^{n+2})=c_{n+2}+c_2c_{n+2}+\frac{n!}{2!}c_{n+1}c_2^2c_1^{n-2}+(n+1)c_{n+2}c_2c_1^{n} \end{equation} If $c_1\neq\pm1$ or $c_1=-1$ and $n$ is odd then \eqref{c_1} gives $c_{n+1}=0$. If $c_1=1$ then \eqref{c_2} gives $c_{n+1}=0$, otherwise if $c_1=-1$ and $n$ is even then from \eqref{c_2} and \eqref{c_3} we come to \begin{equation*} c_{n+1}[(1+(1-n)c_2)(1+(n+2)c_2)+n!c_2^2]=0 \end{equation*} which shows again that $c_{n+1}=0$. Thus for all $k=3,4,...$ we have $c_k=0$. That is $$f(\alpha)=\alpha \ \ \mbox{and} \ \ f(\alpha)=\theta\alpha-\alpha^2$$ are solutions of the iterative functional equation \eqref{iterative f.e.1}, where $\theta$ is an arbitrary constant. This completes the proof. \end{proof} So, we have proved that $$\gamma_\theta=\big\{(\alpha,\beta)\in[0,1]^2: \beta=g(\alpha)=\alpha+1-\theta\}, \ \ \theta\in[0,2]$$ is one-parametric family of invariant curves. Note that $$ \bigcup_{\theta\in[0,1)}\gamma_\theta=M_2, \quad \bigcup_{\theta\in(1,2]}\gamma_\theta=M_1, \quad \gamma_1=M_0$$ and $$\gamma_{\theta_1}\cap\gamma_{\theta_2}=\emptyset \ \ \mbox{for} \ \ \mbox{any} \ \ \theta_1\neq\theta_2.$$ Thus it suffices to study the dynamical system on each invariant curve $\gamma_\theta$. We have the following result (See Figure \ref{p1}). \begin{thm}\label{als} The following assertions hold \begin{itemize} \item[(i)] If $\theta=1$ then for any initial point $t=(\alpha,\beta)\in{M_0}$, (i.e. $\alpha=\beta$) we have $$\lim\limits_{m\rightarrow\infty}V_1^{(m)}(\alpha,\beta)= \lim\limits_{m\rightarrow\infty}(\alpha^{(m)},\beta^{(m)})=(0;0).$$ \item[(ii)] If $\theta\in(1,2]$ then for any initial point $t=(\alpha,\beta)\in{\gamma_\theta}$ we have $$\lim\limits_{m\rightarrow\infty}V_1^{(m)}(\alpha,\beta)= \lim\limits_{m\rightarrow\infty}(\alpha^{(m)},\beta^{(m)})=(\theta-1;0).$$ \item[(iii)] If $\theta\in[0,1)$ then for any initial point $t=(\alpha,\beta)\in{\gamma_\theta}$ we have $$\lim\limits_{m\rightarrow\infty}V_1^{(m)}(\alpha,\beta)= \lim\limits_{m\rightarrow\infty}(\alpha^{(m)},\beta^{(m)})=(0;1-\theta).$$ \end{itemize} \end{thm} \begin{figure}[h] \centering \includegraphics[width=6 cm]{zebra.jpg}\\ \caption{Dynamics of the operator \eqref{V1} on the invariant lines $\gamma_\theta$. The trajectory converges to the fixed point on the intersection of the line and the axes $O\alpha$ or $O\beta$.}\label{p1} \end{figure} Going back to the old variables $(x,y,u,v)$, when $p_1=p_2=1$ we obtain $\sigma_1=a$, $\sigma_2=b$ and $$\Omega_\theta=\big\{(x,y,u,v)\in{S^{2,2}}: \quad \frac{v}{u+v}=\frac{x}{x+y}+1-\theta\big\}$$ is an invariant surface respect to the operator \eqref{A1} and it holds that $$ \bigcup_{\theta\in[0,1)}\Omega_\theta=T_2= \Big\{(x,y,u,v)\in{S^{2,2}}: yv>xu \Big\},$$ $$\bigcup_{\theta\in(1,2]}\Omega_\theta=T_1= \Big\{(x,y,u,v)\in{S^{2,2}}: yv<xu \Big\},$$ $$\Omega_1=T_0=\Big\{(x,y,u,v)\in{S^{2,2}}: yv=xu \Big\}$$ and $$\Omega_{\theta_1}\cap\Omega_{\theta_2}=\emptyset \ \ \mbox{for any} \ \ \theta_1\neq\theta_2.$$ Thus it suffices to study the dynamical system on each invariant surfaces $\Omega_\theta$. As a corollary of Theorem \ref{als} we have the following \begin{thm}\label{au} The following assertions hold \begin{itemize} \item[(i)] For any initial point $t=(x,y,u,v)\in{T_0}$, we have $$\lim\limits_{m\rightarrow\infty}W^{(m)}(x,y,u,v)= \lim\limits_{m\rightarrow\infty}(x^{(m)},y^{(m)},u^{(m)},v^{(m)})=(0;a;b;0).$$ \item[(ii)] If $\theta\in(1,2]$ then for any initial point $t=(x,y,u,v)\in \Omega_\theta$ the following holds $$\lim\limits_{m\rightarrow\infty}W^{(m)}(x,y,u,v)= \lim\limits_{m\rightarrow\infty}(x^{(m)},y^{(m)},u^{(m)},v^{(m)})=(a(\theta-1);a(2-\theta);b;0).$$ \item[(iii)] If $\theta\in[0,1)$ then for any initial point $t=(x,y,u,v)\in \Omega_\theta$ the following holds $$\lim\limits_{m\rightarrow\infty}W^{(m)}(x,y,u,v)= \lim\limits_{m\rightarrow\infty}(x^{(m)},y^{(m)},u^{(m)},v^{(m)})=(0;a;b\theta;b(1-\theta)).$$ \end{itemize} \end{thm} \begin{cor} The operator \eqref{A1} has infinitely many fixed points and for each such fixed point there is nonintersecting trajectories which converge to the fixed points. \end{cor} \subsection{Case 2} Let we have $$p_1>1>p_2>0,$$ or $$p_2>1>p_1>0.$$ \begin{lemma}\label{A15} The set $$M_1=\big\{(\alpha,\beta)\in\Delta: \quad \beta\geq\alpha\big\}$$ is an invariant set respect to the operator \eqref{A10} when $p_1>1>p_2>0$. The set $$M_2=\big\{(\alpha,\beta)\in\Delta: \quad \beta\leq\alpha\big\}$$ is an invariant set respect to the operator \eqref{A10} when $p_2>1>p_1>0$. \end{lemma} \begin{proof} Straightforward. \end{proof} In this case to find invariant curves for the operator \eqref{A10} leads to solve the following iterative functional equation \begin{equation}\label{iterative f.e.2} \begin{aligned} &f(\alpha)\big(\alpha-f(\alpha)\big)(1-\alpha)[1+(p_1-1)f(f(\alpha))] =\\ &\alpha\big(f(\alpha)-f(f(\alpha))\big)[1+(p_2-1)\alpha+(p_1-p_2)f(\alpha)] \end{aligned} \end{equation} where $f(\alpha)={\alpha\big(1-g(\alpha)\big)}\setminus{[1+(p_1-1)\alpha{g(\alpha)}]}$ which is not identically zero. As above when we search the solution of the last functional equation in the space $C^\infty{[0,1]}$ we get \begin{equation}\label{identity 2} \sum_{k=1}^{\infty}a_k\alpha^k\equiv\sum_{k=1}^{\infty}b_k\alpha^k, \end{equation} which is equivalently to \begin{equation}\label{a_k=b_k 2} a_k=b_k \ \ \mbox{for all} \ \ k=1,2,... \end{equation} where $$a_k=\sum_{j=0}^{k}e_jq_{k-j}, \quad b_k=\sum_{j=0}^{k}n_jm_{k-j}$$ and \begin{equation}\label{e_j} e_j=\left\{ \begin{array}{ll} 1-c_1 \ \ \mbox{if} \ \ j=0, \vspace{1,5mm} \cr -\sum_{l=1}^{j}c_{l+1}\big(\sum_{i_1+i_2+...+i_l=j}c_{i_1} \cdot{c_{i_2}}\cdot...\cdot{c_{i_l}}\big) \ \ \mbox{if} \ \ j=1,2,...,k. \vspace{1,5mm} \cr \end{array} \right. \end{equation} \begin{equation}\label{q_j} q_j=\left\{ \begin{array}{ll} 1 \ \ \mbox{if} \ \ j=0, \vspace{1,5mm} \cr (p_2-1)+(p_1-p_2)c_1 \ \ \mbox{if} \ \ j=1, \vspace{1,5mm} \cr (p_1-p_2)c_j \ \ \mbox{if} \ \ j=2,3,...,k. \vspace{1,5mm} \cr \end{array} \right. \end{equation} \begin{equation}\label{n_j} n_j=\left\{ \begin{array}{ll} 1 \ \ \mbox{if} \ \ j=0, \vspace{1,5mm} \cr (p_1-1)\sum_{l=1}^{j}c_{l}\big(\sum_{i_1+i_2+...+i_l=j}c_{i_1} \cdot{c_{i_2}}\cdot...\cdot{c_{i_l}}\big) \ \ \mbox{if} \ \ j=1,2,...,k. \vspace{1,5mm} \cr \end{array} \right. \end{equation} \begin{equation}\label{m_j} m_j=\left\{ \begin{array}{ll} 1-c_1 \ \ \mbox{if} \ \ j=0, \vspace{1,5mm} \cr -1+c_1-c_2 \ \ \mbox{if} \ \ j=1, \vspace{1,5mm} \cr c_j-c_{j+1} \ \ \mbox{if} \ \ j=2,3,...,k. \vspace{1,5mm} \cr \end{array} \right. \end{equation} Substituting \eqref{e_j}, \eqref{q_j}, \eqref{n_j}, \eqref{m_j} to the \eqref{a_k=b_k 2} then when $k\geq3$ we attain recurrence formula for $c_k$ \begin{equation} \begin{aligned} &c_{k}(1-c_{1}^{k-1})=\sum_{j=1}^{k-2}\big[(c_{k-j-1}-c_{k-j})(p_1-1)d_j+(p_1-p_2)c_{k-j}d'_j\big] \\ &+c_{k-1}-(p_1-1)d_{k-2}+(1-c_1)(p_1-1)d_{k-1}(1-c_1)(p_1-p_2)c_k\\ &+(p_2-1)d'_{k-2}-\sum_{l=1}^{k-1}c_{l+1}\big(\sum_{i_1+i_2+...+i_l=k}c_{i_1}\cdot{c_{i_2}}\cdot... \cdot{c_{i_l}}\big) \end{aligned} \end{equation} where $c_k$ is the coefficient at \eqref{f} and $$d_j=\sum_{l=1}^ {j}c_l\big(\sum_{i_1+i_2+...+i_l=j}c_{i_1}\cdot{c_{i_2}}\cdot... \cdot{c_{i_l}}\big), \quad d'_j=\sum_{l=1}^ {j}c_{l+1}\big(\sum_{i_1+i_2+...+i_l=j}c_{i_1}\cdot{c_{i_2}}\cdot... \cdot{c_{i_l}}\big).$$ We were not able to solve these systems for the coefficients. Therefore the following is an open problem: {\bf Open problem.} Describe all solutions of the functional equation (\ref{iterative f.e.2}).\\ Numerical analysis shows that (see at the Figure \ref{p2} and Figure \ref{p3}) in the cases $p_1>1>p_2>0$ (resp. in the case $p_2>1>p_1>0$) there are nonintersecting concave (resp. convex) invariant curves and the trajectory started on an invariant curve converges to the intersecting point of the invariant curve and the axes $O\alpha$ or $O\beta$. \begin{figure} \centering \includegraphics[width=13 cm]{rasm.jpg}\\ \caption{Dynamics of the operator \eqref{A10} on invariant concave curves for the case $p_1>1>p_2>0$. The trajectory converges to the fixed point on the intersection of the invariant curve and the axes $O\alpha$ or $O\beta$.}\label{p2} \end{figure} \begin{figure} \centering \includegraphics[width=13 cm]{rasm2.jpg}\\ \caption{Dynamics of the operator \eqref{A10} on invariant convex curves for the case $p_2>1>p_1>0$. The trajectory converges to the fixed point on the intersection of the invariant curve and the axes $O\alpha$ or $O\beta$.}\label{p3} \end{figure} These numerical analysis and the above considered particular cases allowed us to make the following {\bf Conjecture.} If $p_1>1>p_2>0$ (or $p_2>1>p_1>0$) then for each fixed point $p\in {\rm Fix}(W)$ there exists unique invariant surface $\Gamma_p\subset S^{2,2}$, such that for any initial point $s^{(0)}\in \Gamma_p$ the limit of its trajectory (under operator (\ref{A1})) converges to the fixed point $p$. Moreover, $$\bigcup_{p\in {\rm Fix}(W)}\Gamma_p=S^{2,2}.$$ \section{Conclusion} Let $s^{(0)} = (x, y, u, v)\in S^{2,2}$ be an initial state, i.e. the probability distribution on the set of female and male types. The following are interpretations of our results: \begin{itemize} \item The set of all fixed points is subset of the boundary of $S^{2,2}$ means that at least one type of female or male in future of population will surely disappear. \item The existence of invariant curves (in particular lines) means that if states of the population initially satisfied a relation (described the invariant set) then the future of the population remains in the same relation. \item Regularity of the operator means that for any initial state of the population we can explicitly determine its limit (final) state. \item For any $s^{(0)}\in T_0$ as time goes to infinity the type 1 of female and type 2 of males will disappear (die). \item For any $s^{(0)}\in T_1$ as time goes to infinity the type 2 of males will disappear. \item For any $s^{(0)}\in T_2$ as time goes to infinity the type 1 of females will disappear. \end{itemize}
\section{Introduction} It is of paramount importance to understand how the masses of hadrons undergo changes in nuclear medium, since it is deeply rooted in the restoration of chiral symmetry and even the quark confinement in quantum chromodynamics (QCD)~\cite{Drukarev:1991fs, Birse:1994cz, Brown:1995qt, Saito:2005rv}. As discussed in Ref.~\cite{Drukarev:1991fs}, the chiral condensate is known to be modified in nuclear matter, which reveals the mechanism as to how the spontaneous broken chiral symmetry is restored as the nuclear density increases. This also implies the changes of hadron masses in it, since the dynamical quark mass arises as a consequence of the spontaneous breakdown of chiral symmetry. Thus, understanding the medium modification of the nucleon mass has been one of the most significant issues well over decades~\cite{Serot:1984ey}. Experimental data also indicate that the nucleon is modified in nuclei~\cite{Aubert:1983xm, Strauch:2002wu, Agakishiev:2014moo, Malace:2014uea, Eskola:2016oht, Kolar:2020mvb}. This means that other baryons may also undergo changes in nuclear medium~\cite{Osterfeld:1991ii, Lenske:2018bgr, Knorren:1995ds, Papazoglou:1997uw,Wang:2001hw, Lattimer:2012nd, Vidana:2018bdi}. When one considers the medium modification of baryons, one should keep in mind that nuclear matter itself is also affected self-consistently by the changes of baryons. However, it is very difficult to relate the medium modification of baryons to nuclear medium consistently, even in the isolated case of normal nuclear matter. In the present work, we investigate the medium modification of the low-lying SU(3) baryons in symmetric matter, asymmetric matter, neutron matter, and strange baryonic matter consistently, based on a pion mean-field approach~\cite{Diakonov:1987ty}. The general idea is based on the seminal paper by E. \,Witten~\cite{Witten:1979kh, Witten:1983}. In the large $N_c$ (the number of colors) limit, the nucleon can be viewed as a state of $N_c$ valence quarks bound by the meson mean fields that is produced self-consistently by the presence of the $N_c$ valence quarks, since the mesonic quantum fluctuations are suppressed by the $1/N_c$ factor. This approach has been successfully applied for describing the various properties of both light and singly heavy baryons in a unifying manner~\cite{Yang:2010id, Yang:2010fm, Yang:2015era, Yang:2016qdz, Kim:2017jpx,Kim:2017khv, Yang:2018idi, Yang:2018uoj, Yang:2019tst, Yang:2020klp}. The main idea of the pion mean-field approach is not to compute dynamical parameters within the chiral quark-soliton model~\cite{Diakonov:1987ty, Christov:1995vm}, which realizes the pion mean-field approach explicitly, but to fix all relevant dynamical parameters by using the experimental data. For example, the masses of the baryon decuplet can be predicted by using the experimental data on those of the baryon octet and the mass of the $\Omega$ baryon~\cite{Yang:2010fm}. Actually, this method was already used in the Skyrme model long time ago~\cite{Adkins:1984cf}. The pion mean-field approach can be also extended to the description of light and singly heavy baryons in nuclear medium. However, since the model is based on the quark degrees of freedom, one should consider the quark chemical potential~\cite{Berger:1996hc}, which means that it is rather difficult to connect the results from this approach directly to the properties of the baryons in nuclear matter. Thus, we will follow a variational approach that was adopted in the medium modified Skyrme models~\cite{Rakhimov:1996vq, Yakhshiev:2010kf}. In these modified Skyrme models various properties of the nucleon and $\Delta$ isobar have been described in nuclear matter~\cite{Yakhshiev:2010kf, Kim:2012ts,Jung:2013bya,Hong:2018sqa}, and in finite nuclei~\cite{Yakhshiev:2001ht,Yakhshiev:2004ui,Meissner:2008mr}. The model enables one also to investigate nuclear matter properties~\cite{Jung:2012sy,Yakhshiev:2013eya,Yakhshiev:2015noa}. Thus, we will show in this work how the pion mean-field approach can be extended to the investigation of the SU(3) baryon properties in both nuclear and strange baryonic environments. This can be achieved by introducing the density-dependent functionals as variational parameters. The density functionals will be parametrized and fitted completely in the SU(2) sector by taking into account available experimental and empirical data, the linear-response approximation being emphasized. This enables us to describe the strange baryonic matter and properties of baryons in different media (isospin symmetric, asymmetric and strange baryonic matter). The present paper is organized as follows. In Section~\ref{sec:2}, we briefly review the pion mean-field approach, discussing the collective Hamiltonian and SU(3) baryon states in free space. Then we will proceed to consider a possible modification of the model in order to take into account the influence of the surrounding baryon environment on the properties of a single baryon in medium. In Section~\ref{sec:3}, we discuss the results for the binding energy in symmetric matter and determine the variational parameters. The discussion of the properties of baryons in nuclear and strange nuclear matter will be followed in Section~\ref{sec:4}. We will also show how to fit the remaining part of the parameters. Then, we are able to discuss the properties of an arbitrary baryonic matter and the numerical results for the medium modifications of SU(3) baryons. The final Section\,\ref{sec:5} is devoted to the summary and conclusion of the present work and will give an outlook for future investigations. Some details of the model are compiled in Appendix~\ref{app:A}. \section{General formalism} \label{sec:2} In the pion mean-field approach, the dynamics of the valence and sea quarks generates the chiral-quark soliton with hedgehog symmetry~\cite{Pauli:1942kwa, Skyrme:1962vh, Witten:1983, Diakonov:1997sj}. Hedgehog symmetry can be regarded as the minimal generalization of spherical symmetry, which can keep the pion mean fields effectively~\cite{Diakonov:1997sj}. We are able to derive the effective collective Hamiltonian by considering the zero-mode quantization with hedgehog symmetry, taking into account the rotational $1/N_c$ corrections and the strange current-quark corrections from the explicit breaking of flavor SU(3) symmetry. Note that in the present approach the presence of $N_c$ valence quarks constrains the right hypercharge $Y'=N_c/3$, which picks up safely the lowest allowed representations such as the baryon octet ($\bm{8}$) and decuplet ($\bm{10}$). On the other hand, $Y'$ is constrained by the Wess-Zumino-Witten term in the SU(3) Skyrme model~\cite{Guadagnini:1983uv, Mazur:1984yf, Jain:1984gp}. In this section, we will directly start from the collective Hamiltonian. For a detailed derivation, we refer to Ref.~\cite{Blotz:1992pw} (see also a review~\cite{Christov:1995vm}). \subsection{Collective Hamiltonian and SU(3) baryon state} If we consider both the explicit breakdowns of flavor SU(3) symmetry and isospin symmetry, we have four different contributions to the collective Hamiltonian, given as follows: \label{subsec:CH} \begin{align} H = M_{{\rm cl}} \;+\;H_{\mathrm{rot}} \;+\;H_{\mathrm{sb}} + \; H_{\mathrm{em}}, \label{eq:collH} \end{align} where $M_{\mathrm{cl}}$, $H_{\mathrm{rot}}$, and $H_{\mathrm{sb}}$ denote respectively the classical soliton mass, the $1/N_{c}$ rotational and symmetry-breaking corrections including the effects of isospin and flavor $\mathrm{SU(3)_{f}}$ symmetry breakings~\cite{Blotz:1994pc, Yang:2010fm}. The last term $H_{\mathrm{em}}$ stands for the term arising from the isospin symmetry breaking caused by the electromagnetic self-energies~\cite{Yang:2010id}. We can neglect the modification of the electromagnetic self-energies in nuclear matter~\cite{Meissner:2008mr}. The classical energy arises from the $N_c$ valence quarks in the pion mean fields and the sea quarks coming from the vacuum polarization in the presence of the $N_c$ valence quarks: $E_{\mathrm{cl}}=N_c E_{\mathrm{val}} + E_{\mathrm{sea}}$. By minimizing $E_{\mathrm{cl}}$ with respect to the pion fields, we get the pion mean-field solution self-consistently, which yields the classical soliton mass $M_{\mathrm{cl}}$. The rotational $1/N_c$ corrections, i.e., $H_{\mathrm{rot}}$, can be derived by the zero-mode collective quantization, since the zero modes are not at all small, one should take into account them completely. Regarding the angular velocities of the chiral soliton as small parameters, we can expand the quark propagator perturbatively in terms of the angular velocities, we find the rotational $1/N_c$ term $H_{\mathrm{rot}}$ as \begin{align} H_{\mathrm{rot}} & = \frac{1}{2I_{1}}\sum_{i=1}^{3}\hat{J}_{i}^{2} \;+\;\frac{1}{2I_{2}}\sum_{p=4}^{7}\hat{J}_{p}^{2}. \label{eq:rotH} \end{align} This Hamiltonian depends on two moments of inertia $I_{1,2}$ and expressed in terms of the operators $\hat J_i$ corresponding to the generators of the SU(3) group. $I_{1}$ and $I_{2}$ give the splitting between different representations of the SU(3) group. The symmetry breaking part of the Hamiltonian has the following form \begin{align} H_{\mathrm{sb}} & = \left(m_{\mathrm{d}}-m_{\mathrm{u}}\right) \left(\frac{\sqrt{3}}{2}\,\alpha\,D_{38}^{(8)}(\mathcal{A}) \;\right.\cr &\left.+\;\beta\,\hat{T_{3}}\;+\;\frac{1}{2} \,\gamma\sum_{i=1}^{3}D_{3i}^{(8)}(\mathcal{A}) \,\hat{J}_{i}\right) \cr & +\;\left(m_{\mathrm{s}}-\bar{m}\right) \left(\alpha\,D_{88}^{(8)}(\mathcal{A}) \;+\;\beta\,\hat{Y}\right.\cr &\left.+\;\frac{1}{\sqrt{3}} \,\gamma\sum_{i=1}^{3}D_{8i}^{(8)}(\mathcal{A}) \,\hat{J}_{i}\right), \label{eq:Hsb} \end{align} where $\alpha$, $\beta$, and $\gamma$ depend on the moments of inertia that are expressed as \begin{align} \alpha &=-\left(\frac{2}{3} \frac{\Sigma_{\pi N}}{m_{\mathrm{u}}+m_{\mathrm{d}}} -\frac{K_{2}}{I_{2}}\right),\cr \beta&=-\frac{K_{2}}{I_{2}},\;\;\;\; \gamma=2\left(\frac{K_{1}}{I_{1}}-\frac{K_{2}}{I_{2}}\right). \label{eq:abg} \end{align} Here $K_{1,2}$ represent the anomalous moments of inertia of the soliton. $m_{\mathrm{u}}$, $m_{\mathrm{d}}$, and $m_{\mathrm{s}}$ denote the current-quark masses of the up, down, and strange quarks, respectively. The $\bar{m}$ designates the average current-quark mass of the up and down quarks. The $D_{ab}^{(\mathcal{R})}(\mathcal{A})$ indicate the SU(3) Wigner $D$ functions in the representation $\mathcal{R}$. The $\hat{Y}$ and $\hat{T_{3}}$ are the operators of the hypercharge and the third component of the isospin, respectively. In the representation $(p,\,q)$ of the SU(3) group, the sum of the generators can be expressed in terms of $p$ and $q$ \begin{align} \sum_{i=1}^{8}J_{i}^{2} =\frac{1}{3}\left[p^{2}\;+\;q^{2}\;+\;p\;q\;+\;3(p+q)\right], \label{eq:Jsquare} \end{align} which yields the eigenvalues of the rotational collective Hamiltonian $H_{\mathrm{rot}}$ in Eq.~(\ref{eq:rotH}) as follows: \begin{align} E_{(p,\,q),\,J} & = \frac{1}{2} \left(\frac{1}{I_{1}}\,-\,\frac{1}{I_{2}}\right)J(J+1)-\frac{3}{8I_{2}} \cr & +\frac{1}{6I_{2}}\left[p^{2}\,+\,q^{2}\,+\,3(p\,+\,q)+\,p\,q\right] \label{eq:EpqJ} \end{align} A corresponding eigenfunction is called the collective wave function for a SU(3) baryon with the quantum numbers of flavor $\mathcal{F}=(Y,T,T_{3})$ and spin $\mathcal{S}=(Y^{\prime},J,J_{3})$ \begin{align} \psi_{_{B}}^{\left(\mathcal{R}\right)}\left(\mathcal{A}\right) & = \sqrt{\mathrm{dim}\left(\mathcal{R}\right)} \left(-1\right)^{J_{3}+Y^{\prime}/2} D_{\mathcal{FS}}^{\left(\mathcal{R}\right)\ast}(\mathcal{A}), \label{eq:psi} \end{align} where $D_{\mathcal{FS}}^{\left(\mathcal{R}\right)\ast}$ are again the Wigner $D$ functions in a representation $\mathcal{R}$ and $\mathrm{dim}\left(\mathcal{R}\right)$ designates the corresponding dimension of the representation $\mathcal{R}$. Knowing the eigenvalues and eigenfunctions of the SU(3) baryon states, we can get their masses of which the explicit forms are presented in Appendix~\ref{app:A}. For a detailed formalism relating to the collective Hamiltonian and baryon states, we refer the reader to Ref.~\cite{Yang:2010fm}, where all dynamical parameters such as $I_1$, $I_2$, $K_1$, $K_2$, $\alpha$, $\beta$, and $\gamma$ are determined by using the experimental data in a ``\emph{model-independent way}'', so that we can avoid a specific dynamics of the chiral soliton models. We now turn to how the model can be extended to nuclear medium. \subsection{Solitons in nuclear matter} \label{subsec:NM} Since we have determined all the dynamical parameters by incorporating experimental information, we will follow the same strategy also in nuclear matter. We will fix the density-dependent variational parameters by using the experimental and empirical data on the properties of nuclear matter. So, we start from the average energy $E^{\ast}$ per baryon in a baryonic system\footnote{Asterisks ``$\ast$'' in the superscripts denote in-medium modified quantities.} \begin{align} \frac{E^{\ast}}{A} & = \frac{ZM_{p}^{\ast}+NM_{n}^{\ast}+\sum_{s=1}^{3}N_sM_{s}^{\ast}}{A}\,, \label{eq:EstarA} \end{align} where $Z$ and $N$ are the numbers of protons and neutrons, respectively, and $N_s$ is the corresponding number of the strange baryons with the corresponding strangeness $S$, $s=|S|$. $A$ stands for the total number of the baryons $A=Z+N+N_1+N_2+N_3$. Having carried out a simple manipulation, we can rewrite $E^*/A$ as \begin{align} \frac{E^{\ast}}{A} = M_{N}^{\ast}\left(1-\sum_{s=1}^{3}\delta_{s}\right) +\frac{1}{2}\delta M_{np}^{\ast} +\sum_{s=1}^{3}\delta_{s}M_{s}^{\ast}, \label{eq:EstarA1} \end{align} where $M_{N}^{\ast}=(M_p^{\ast}+M_n^{\ast})/2$ denotes the average mass of nucleons, $M_{np}^{\ast}\;=\;M_{n}^{\ast}-M_{p}^{\ast}$ designates the mass differene of the neutron and the proton in medium. In addition, we introduce the parameter for isospin asymmetry $\delta=\left(N- Z\right)/A$. $\delta_{s}=N_{s}/A$ represents the parameter for the strangeness fraction with the corresponding value of subscript $s$. We can take $s=1$, $2$ or $3$, depending on the hyperons with strangeness $S$ we put. The binding energy per baryon in a baryonic matter can be defined as the difference of the medium average energy per baryon $E^*/A$ and the energy per baryon $E/A$ for the noninteracting baryonic system. If one takes the number of the baryons to be infinity, which we can call it the infinite baryon-matter approximation, we express the binding energy per baryon in terms of the following external parameters: a normalized baryonic density $\lambda=\rho/\rho_{0}$, the isospin asymmetry parameter $\delta$, and the strangeness fraction parameter $\delta_{s}$ with given $s$. Consequently, the binding energy is then written as \begin{align} \varepsilon(\lambda,\delta,&\,\delta_{1}, \delta_{2},\delta_{3}) = \frac{E^{\ast}\left(\lambda,\delta,\delta_{1}, \delta_{2},\delta_{3}\right)-E}{A}\cr &= \Delta M_{N}\left(\lambda,\delta,\delta_{1}, \delta_{2},\delta_{3}\right) \left(1-\sum_{s=1}^{3}\delta_{s}\right) \cr &+\frac{1}{2}\delta\,\Delta M_{np} \left(\lambda,\delta,\delta_{1}, \delta_{2},\delta_{3}\right) \cr &+\sum_{s=1}^{3}\delta_{s}\Delta M_{s}\left(\lambda, \delta,\delta_{1},\delta_{2},\delta_{3}\right), \label{eq:BE} \end{align} where $\Delta M_{N}=M_{N}^{\ast}-M_{N}$ denotes the isoscalar mass change whereas $\Delta M_{np}=M_{np}^{\ast}-M_{np}$ stands for the neutron-proton mass change in nuclear medium. They are explicitly expressed in terms of the in-medium modified functionals of the chiral soliton \begin{align} \Delta M_{N}&= M_{\mathrm{cl}}^{\ast}-M_{\mathrm{cl}} +E_{(1,1)1/2}^*- E_{(1,1)1/2}\cr &-D_{1}^*- D_{2}^*+D_{1}+D_{2}\,,\\ \Delta M_{np} &=d_{1}^*-d_{2}^*-d_{1}+d_{2}\,, \end{align} where the explicit expressions for $D_{1,2}$ and $d_{1,2}$ in free space are given in Appendix~\ref{app:A} (see Eqs.\,(\ref{eq:d1})-(\ref{eq:cD2})). $D_{1,2}$ represent the linear $m_s$ corrections of flavor SU(3) symmetry breaking whereas $d_{1,2}$ denote the effects of isospin symmetry breaking. They are related to the model functionals to be discussed below through $\alpha$, $\beta$ and $\gamma$ defined in Eq.~(\ref{eq:abg}). Note that for the mass differences of the hyperons $\Delta M_s=M_s^{\ast}-M_s$ ($s=1,2,3$) we have the different expressions for the baryon octet and decuplet. For the moment, let us concentrate on the strange baryonic medium made of the hyperons in the baryon octet as in the case of the nonstrange baryons. Thus, we adopt the following expressions for $\Delta M_s$ \begin{align} \Delta M_{1}&=\frac{M_{\Lambda}^*+M_{\Sigma}^*}{2}- \frac{M_{\Lambda}+M_{\Sigma}}{2}\cr &=M_{\mathrm{cl}}^{\ast}-M_{cl}+ E_{(1,1)1/2}^*-E_{(1,1)1/2}\,,\\ \Delta M_{2}&= M_{\Xi}^*-M_{\Xi}\cr &=M_{\mathrm{cl}}^{\ast}- M_{cl}+E_{(1,1)1/2}^*-E_{(1,1)1/2}\cr &+ D_{2}^*-D_2\,,\\ \Delta M_{3}&= 0\,. \end{align} We now discuss how we can modify the dynamical parameters of the pion mean-field approach in nuclear medium. We follow the strategy presented in Refs.~\cite{Yakhshiev:2013eya,Yakhshiev:2015noa} and assume that the dynamical parameters discussed in Subsection\,\ref{subsec:CH}, {\em i.e.} $M_{\mathrm{cl}}$, $I_{1,2}$ and $K_{1,2}/I_{1,2}$, will be modified as follows: \begin{align} M_{\mathrm{cl}}&\rightarrow M_{\mathrm{cl}}^{\ast} = M_{\mathrm{cl}}f_{\mathrm{cl}}(\lambda,\delta,\delta_1,\delta_2,\delta_3), \\ I_{\mathrm{1}}&\rightarrow I_{\mathrm{1}}^{\ast} = I_{\mathrm{1}}f_1(\lambda,\delta,\delta_1,\delta_2,\delta_3),\\ I_{\mathrm{2}}&\rightarrow I_{\mathrm{2}}^{\ast}= I_{\mathrm{2}}f_2(\lambda,\delta,\delta_1,\delta_2,\delta_3),\\ \left(m_{\mathrm{d}}-m_{\mathrm{u}}\right)& \frac{K_{1,2}}{I_{1,2}}\rightarrow E_{\mathrm{iso}}^{\ast} = \left(m_{\mathrm{d}}-m_{\mathrm{u}}\right)\cr &\times\frac{K_{1,2}}{I_{1,2}}f_0(\lambda,\delta,\delta_1,\delta_2,\delta_3), \label{eq:isosm} \\ \left(m_{\mathrm{s}}-\bar{m}\right)& \frac{K_{1,2}}{I_{1,2}}\rightarrow E_{\mathrm{str}}^{\ast} = \left(m_{\mathrm{s}}-\bar{m}\right)\cr &\times\frac{K_{1,2}}{I_{1,2}}f_{\mathrm{s}}(\lambda,\delta,\delta_1,\delta_2,\delta_3), \label{eq:strm} \end{align} where $f_{\mathrm{cl}}$, $f_{0,1,2}$, and $f_{\mathrm{s}}$ represent the functions of nuclear densities for nuclear medium. We will parametrize them based on information about nuclear matter in the next section. One should keep in mind that in general one can consider density dependencies in a different manner, depending on the isospin splitting and the mass splittings in different representations (see Eqs.\,(\ref{eq:isosm}) and\,(\ref{eq:strm})). As mentioned previously, we assume that the electromagnetic corrections to the neutron-proton mass difference is only weakly affected by nuclear medium. So, we will not consider them in the present work. We ignore also the effects of isospin symmetry breaking coming from baryons on the binding energy except for the nucleons, assuming the small strangeness fraction up to normal nuclear matter densities. \section{Nuclear phenomenology} \label{sec:3} In the present section, we will discuss the results related to symmetric nuclear matter, isospin asymmetric nuclear matter, and more general baryonic matter, one by one. We first start with ordinary symmetric nuclear matter. \subsection{Symmetric nuclear matter} \label{subsec:OSM} We first consider isospin symmetric and non-strange ordinary nuclear matter with the external parameters $\delta=0$ and $\delta_{s}=0$. Then we can parametrize the density functions such as $f_{\mathrm{cl}}$, $f_1$ and $f_2$. In consequence, we are able to determine the values of the corresponding parameters phenomenologically. For example, they are related to the properties of isospin-symmetric nuclear matter near the saturation point, i.e., at the normal nuclear matter density $\rho_0\sim(0.16-0.17)\,{\rm fm}^{-3}$. We remind that in the case of isospin-symmetric nuclear matter the binding energy per unit volume is given by \begin{align} \mathcal{E} \equiv \varepsilon_{V}\left(\rho\right)\frac{A}{V} \;=\; \rho_{0}\lambda\,\varepsilon_{V}\left(\lambda\right). \label{eq:BEsym} \end{align} Following the ideas presented in Refs~\cite{Yakhshiev:2013eya,Yakhshiev:2015noa}, we choose the parametrization of the three medium functions $f_{\mathrm{cl}}$, $f_1$, and $f_2$, which are independent of the asymmetry parameter $\delta$ and the strangeness fraction parameters $\delta_s$. Furthermore, we will parametrize them for simplicity in a linear density-dependent form \begin{align} f_{\mathrm{cl}}(\lambda)=\left(1+C_{\mathrm{cl}}\lambda\right), \quad f_{1,2}(\lambda)=\left(1+C_{1,2}\lambda\right). \label{eq:den_ftn001} \end{align} It is enough to employ this linear-density approximation, since the equations of state (EoS) for nuclear matter are well explained. However, if the density of nuclear matter becomes larger than the normal nuclear matter density, one may need to consider higher-order corrections to the parametrization we use. Nevertheless, we will compute the baryon properties as functions of the nuclear matter density up to $3\rho_0$ to see how far the linear-density approximation works well. The properties of symmetric nuclear matter near the saturation point can be related to the isoscalar nucleon mass change in the nuclear medium \begin{align} \varepsilon_V(\lambda)= \epsilon(\lambda,0,0,0,0)= \Delta M_N(\lambda)\,. \end{align} This implies that $\alpha$, $\beta$ and $\gamma$ will not be changed in symmetric nuclear medium. We will see that they will come into play when we consider asymmetric nuclear and strange baryonic matter. Then we can easily obtain the following formula for the density dependence of the volume energy \begin{align} \varepsilon_V(\lambda) = \mathcal{M}_{\mathrm{cl}}C_{\mathrm{cl}}\lambda -\frac{3C_1\lambda}{8I_1(1+C_{1}\lambda)} -\frac{3C_{2}\lambda}{4I_2\left(1+C_{2}\lambda\right)}. \label{eq:den_ftn002} \end{align} We now proceed to calculate the properties of nuclear matter near the saturation point $\lambda=1$ by expanding the volume energy with respect to the nuclear density. The expansion coefficients have clear physical meanings related to the properties of nuclear matter at the saturation point. They are given as follows: \begin{align} a_V & = \varepsilon_{V}(1),\qquad P_{0} = \rho_{0}\lambda^{2} \left.\frac{\partial\mathcal{\varepsilon}_{V}(\lambda)}{\partial \lambda}\right|_{\lambda=1}\,,\cr K_{0}& = 9\lambda^{2}\left.\frac{\partial^{2}\mathcal{\varepsilon}_{V} (\lambda)}{\partial\lambda^{2}}\right|_{\lambda=1}\,, \label{eq:EPK} \end{align} where $a_V$ denotes the value of the volume energy, $P_0$ stands for that of the pressure, and $K_0$ represents the compressibility of nuclear matter at the saturation point. The value of the coefficient of the volume term $a_V$ is well known from the analysis of atomic nuclei according to the semi-empirical Bethe-Weizs\"{a}ker formula\,\cite{Bethe:1936zz,Weizscker:1935zz}. So, we choose the well-known value $a_{V}=-16\;\mathrm{MeV}$. The stability of nuclear matter requires the zero value of the pressure $P_0=0$ at the saturation point. The compressibility of nuclear matter within various approaches is found to be $K_0\sim (290\pm70)$\,MeV~\cite{Sharma:1988zza, Shlomo:1993zz, Ma:1997zzb, Vretenar:2003qm, TerHaar:1986ii, Brockmann:1990cn}. Based on a comprehensive reanalysis of recent data on the energies of the giant monopole resonance (GMR) in even-even ${}^{112-124}$Sn and ${}^{106,100-116}$Cd and earlier data on $58\le A \le 208$ nuclei in Ref.\,\cite{Stone:2014wza}, the value of the compressibility can be taken to be $K_0\sim (240\pm 20)$\,MeV~\cite{Shlomo2006}. Following this analysis, we choose $K_{0}=240\,\mathrm{MeV}$ in the present work. Thus, the three parameters in the density functions given in Eq.~\eqref{eq:den_ftn001} can be fitted to be \begin{align} C_{\mathrm{cl}} = -0.0561, \;\; C_{1} = 0.6434, \;\; C_{2} = -0.1218. \label{eq:CclC1C2} \end{align} Now we can predict the skewness of symmetric nuclear matter, which is defined from the fourth coefficient in the series of the volume energy: \begin{align} Q&=27\lambda^{3}\left. \frac{\partial^{3} \varepsilon_{V} (\lambda)}{\partial \lambda^{3}}\right|_{\lambda=1}\cr &=-\frac{117}2\left(\frac{C_{1}^{3}}{(1+C_{1})^{4}I_{1}}-\frac{2 C_{2}^{3}}{(1+C_{2})^{4}I_{2}}\right)\cr &=-182\ \mathrm{MeV}\,. \end{align} The result is consistent with those from other model calculations. For example, one can find similar results from the Hartree-Fock approach based on the Skyrme interactions~\cite{Chabanat:1997qh} and the isospin- and momentum-dependent interaction (MDI) model~\cite{Das:2002fr}. We want to emphasize that these coefficients in the expansion of the volume energy can be used for understanding the properties of symmetric nuclear matter. \subsection{Asymmetric nuclear matter} \label{subsec:ANM} Since the asymmetric nuclear matter arises from the isospin symmetry breaking, Eq.~\eqref{eq:isosm} plays the key role in describing the asymmetric nuclear matter. Following the strategy taken from Refs.~\cite{Yakhshiev:2013eya, Yakhshiev:2015noa}, we find that the density function $f_0$ can be defined as a function of the normalized density $\lambda$ and isospin asymmetry parameter $\delta$ in the following form \begin{align} f_0(\lambda,\delta) =1+\frac{C_{\mathrm{num}}\lambda\,\delta}{1+C_{\mathrm{den}} \lambda}\,, \label{eq:f0} \end{align} where $C_{\mathrm{num}}$ and $C_{\mathrm{den}}$ can be determined phenomenologically. This parametrization is also chosen under the simple assumption: that is, if $\delta$ is zero or $\rho$ is zero, then the value of $f_0$ is equal to 1. Moreover, using the parametrized form given in Eq.~\eqref{eq:f0}, one can see that various properties of asymmetric nuclear matter are well described, e.g., the binding energy of asymmetric nuclear matter will be given as a quadratic form with respect to the asymmetry parameter $\delta$.\footnote{Note that there is another $\delta$ factor in Eq.\,~(\ref{eq:BE}).} The nuclear symmetry energy is defined as the second derivative of the binding energy with respect to $\delta$: \begin{align} \varepsilon_{\mathrm{sym}}\left(\lambda\right) & = \frac{1}{2!} \left.\frac{\partial^{2}\varepsilon \left(\lambda,\delta,0,0,0\right)}{\partial\delta^{2}} \right|_{\delta=0} . \label{eq:symen} \end{align} As in the case of the volume energy, we can expand $\varepsilon_{\mathrm{sym}}$ around the saturation point $\lambda=1$ as follows \begin{align} \varepsilon_{\mathrm{sym}}\left(\lambda\right) & = a_{\mathrm{sym}}+\frac{L_{\mathrm{sym}}}{3}\left(\lambda-1\right)\cr &+K_{\mathrm{sym}}\frac{\left(\lambda-1\right)^{2}}{18} +\cdots, \label{eq:symE} \end{align} from which we obtain the value of the nuclear symmetry energy at saturation point $a_{\mathrm{sym}}$, that of its slope parameter $L_{\mathrm{sym}}$, and the asymmetric part of the compressibility $K_{\mathrm{sym}}$. They are explicitly written as \begin{align} a_{\mathrm{sym}} & = -\frac{9}{20}\frac{C_{\mathrm{num}}\left(b-7r/18\right)} {\left(1+C_{\mathrm{den}}\right)},\\ L_{\mathrm{sym}} &= -\frac{27}{20}\frac{C_{\mathrm{num}}\left(b-7r/18\right)} {\left(1+C_{\mathrm{den}}\right)^{2}},\\ K_{\mathrm{sym}}&=\frac{81C_{\mathrm{den}} C_{\mathrm{num}}(b-7r/18)}{10(1+C_{\mathrm{den}})^{3}}, \label{eq:al} \end{align} where $b= (m_{\mathrm{d}}-m_{\mathrm{u}})\beta$ and $r=(m_{\mathrm{d}}-m_{\mathrm{u}})\gamma$. The value of the nuclear symmetry energy at the saturation point is known to be in the range $\varepsilon_{\rm sym}(1)\sim 30-34$ MeV. So, we can take the average value $a_{\mathrm{sym}}=32$\,MeV. The correlation between the value of the symmetry energy at the saturation density and that of its slop parameter taken from the neutron skip thickness experiments of $^{68}$Ni, $^{120}$Sn, and $^{208}$Pb indicates the tendency that heavier the nucleus yields larger the value of $L_{\mathrm{sym}} $, which corresponds to that of $a_{\mathrm{sym}}$~\cite{Roca-Maza:2015eza}. As a result, one can choose $L_{\mathrm{sym}}=60$\,MeV for the asymmetric nuclear matter. We mainly use these values of $a_{\mathrm{sym}}$ and $L_{\mathrm{sym}}$ in the course of the present calculation, if it is not specified otherwise.\footnote{We will not use any other input data in the strangeness sector.} The empirical values of these two quantities will adjust those of $C_{\rm num}$ and $C_{\rm den}$, respectively. In order to check the stability of the present results for to neutron matter ($\delta=1$), however, we have analyzed the different choices for the $a_{\rm sym}$ and $L_{\rm sym}$ with small variations. Note that the results are very insensitive to $a_{\mathrm{sym}}$ in the range of its values discussed above. Thus, we will only show the variations of $L_{\mathrm{sym}}$ and the possible two choices of $L_{\mathrm{sym}}$ in this work are listed in Table~\ref{tab:1}. \begin{table}[hbt] \caption{Possible sets of the parameters for the symmetry energy.} \label{tab:1} \begin{tabular}{lcccc}\hline \hline & $a_{\rm sym}$ [ MeV] & $L_{\rm sym}$ [MeV] & $C_{\rm num}$ & $C_{\rm den}$ \\ \hline Set I & 32 & 60 & 65.60 & 0.60\\ Set II & 32 & 50 & 78.72 & 0.92\\ \hline\hline \end{tabular} \end{table} All the parameters are actually fitted in this way in relation to nuclear matter properties at the saturation density, so the present model can be regarded as a simple model of nuclear matter with five parameters. Using the values of the parameters for the symmetry energy listed in Table~\ref{tab:1}, we are able to discuss the EoS for asymmetric nuclear matter, extrapolating to the low and high density regions, and to predict various properties of nuclear matter. In particular, employing Set~I, we can calculate the third coefficient in the expansion of the symmetry energy, which leads to $K_{\mathrm{sym}}=-135\ \mathrm{MeV}$. The following quantities, which are related to $K_{\mathrm{sym}}$, can be also determined as \begin{align} &K_{\tau}= K_{\mathrm{sym}}-6L_{\mathrm{sym}} = -495\ \mathrm{MeV}, \cr &K_{(0,2)}=K_{\tau}-\frac{Q}{K_{0}}L_{s}=-450\ \mathrm{MeV}. \end{align} The calculated values of $K_\tau$ and $K_{0,2}$ are in good agreement with the results from other approaches. As an example, we can compare the range of $K_{0,2}$ value with that from the phenomenological momentum-independent model $-477\,\mathrm{MeV} \le K_{0,2}\le -241\,\mathrm{MeV}$\,\cite{Chen:2009qc}. \begin{figure}[hbt] \centering \includegraphics[scale=0.2]{fig1.pdf} \caption{Binding energy per nucleon $\varepsilon(\lambda,\delta)\equiv \varepsilon(\lambda,\delta,0,0,0)$ as a function of the normalized nuclear matter density $\lambda=\rho/\rho_{0}$ in unit of MeV. The blue solid curve depicts the symmetric matter $\delta=0$ whereas the red solid and green dashed curves illustrate those of neutron matter $\delta=1$ for the possible two sets of symmetry energy parameters, respectively. The present results are compared with those given in APR predictions~\cite{Akmal:1998cf} that are given by the yellow circles and boxes, respectively.} \label{fig:1} \end{figure} Figure~\ref{fig:1} draws illustratively the density dependence of binding energy per nucleon, given the different values of the asymmetry parameter $\delta$. We find that the results are rather stable to the change of values of the parameters $a_{\rm sym}$ and $L_{\rm sym}$. In particular, the present results change only slightly as the values of $L_{\rm sym}$ are varied from 50 to 60\,MeV. It is natural that the neutron matter gets less bound relatively to the symmetric matter, as already shown in Fig.~\ref{fig:1}. The density dependence of the binding energy per nucleon in symmetric matter and neutron matter are in agreement with those from other models and phenomenological ones. In particular, it is consistent with Akmal-Pandharipande-Ravenhall (APR) predictions~\cite{Akmal:1998cf} in the range of $\lambda$, where the simple linear-density approximation is justified for the medium modification of the corresponding soliton functionals in nuclear matter. As $\lambda$ increases, the present EoS becomes stiffer such that one can get the larger masses of neutron stars than the solar mass. However, as the density becomes higher than $\lambda=2$, the linear density approximation may not be enough, which requires one to introduce higher-order nonlinear terms. \begin{figure}[htp] \centering \includegraphics[scale=0.2]{fig2.pdf} \caption{Nuclear symmetry energy $\varepsilon_{\mathrm{sym}} (\lambda)$ as a function of the normalized nuclear density $\lambda=\rho/\rho_{0}$ in unit of $\mathrm{MeV}$. The results with the possible two sets of parameters for the symmetry energy are represented by the red solid and green dashed curves, respectively. The results are compared with those from Ref.~\citep{Akmal:1998cf}, which are marked by the blue circles and those from the IAS constraints\,\cite{Danielewicz:2013upa} shown by the shaded region.} \label{fig:2} \end{figure} The nuclear symmetry energy plays a very important role in understanding the EoS of nuclear matter and, in particular, of the neutron matter. Figure~\ref{fig:2} exhibits how the nuclear symmetry energy depends on $\lambda$. We present the results with the two sets of the parameters $a_{\rm sym}$ and $L_{\rm sym}$ listed in Table~\ref{tab:1}. When the value of the slop parameter $L_{\mathrm{sym}}$ gets smaller, the symmetry energy becomes slightly larger than that obtained by using the larger value of $L_{\mathrm{sym}}$ till the normal nuclear matter density ($\lambda=1$), then it becomes smaller than that with $L_{\mathrm{sym}}=60$ MeV. Note that, however, the present results are quite stable as the parameters vary, and are consistent with those obtained from other approaches and extracted data. In particular, the results are in good agreement with APR predictions till the density reaches $\lambda =2$. At large nuclear matter densities the results of the symmetry energy become smaller than the values of the APR symmetry energy. The present results are also in good agreement with the bounded values of the symmetry energy, obtained from the analysis of isobaric states (IAS)\,\cite{Danielewicz:2013upa}, which is represented by the shaded region in Fig.~\ref{fig:2}. \begin{figure}[htp] \centering \includegraphics[scale=0.2]{fig3a.pdf}\hspace{0.5cm} \includegraphics[scale=0.2]{fig3b.pdf} \caption{Numerical results for the pressure $P(\lambda,\,\delta,\,0,\,0,\,0)$. In the upper (a) panel, the results are drawn for the symmetric nuclear matter ($\delta = 0$), compared with the data taken from GMR\,\citep{Youngblood:1999zza,Lynch:2009vc}, flow\,\citep{Danielewicz:2002pu}, flow$+20 \%$\,\citep{Steiner:2012xt,Dutra:2014qga}, and kaon\,\citep{Fuchs:2005zg,Lynch:2009vc} experiments, whereas in the lower (b) panel those for the neutron matter ($\delta = 1$) are depicted, compared with the data from Pb experiment\,\citep{Tsang:2012se}, NS $95 \%$\,\citep{Steiner:2012xt}, NS $68 \%$\,\citep{Steiner:2012xt}, and Quantum Monte-Carlo calculations\,\citep{Tsang:2012se,Gandolfi:2011xu,Steiner:2011ft}. In the neutron matter, the present results are obtained for the two sets of the parameters: red solid and green dashed curves draw the results with Set I and Set II, respectively.} \label{fig:3} \end{figure} For completeness, we present in the upper (a) and lower (b) panels of Fig.~\ref{fig:3} the density dependence of the pressure in the symmetric nuclear matter and and in the neutron matter, respectively. The present results for the pressure are in good agreement with those obtained from other approaches and the extracted data, in particular, in the range of $\rho\in[0,3\rho_0]$. For example, in the upper (a) panel of Fig.~\ref{fig:3} the result of this work for the pressure $P(\lambda,0,0,0,0)$ in the symmetric matter $(\delta = 0)$, which is drawn in the blue solid curve, is compared with the data extracted from various experiments. In particular, the present result is in good agreement with the data in the range of $1.2 \leq \lambda \leq 1.7$ extracted from the GMR experiments\,\citep{Youngblood:1999zza,Lynch:2009vc} for heavy nuclei, which are shown by the dashed curve. On the other hand, in Ref.\,\citep{Danielewicz:2002pu} the flow experimental data on ${}^{197}\mathrm{Au}$ nuclei collision are analyzed, which are illustrated by the red-shaded region and correspond to the zero-temperature equation of state for the symmetric nuclear matter. Additional studies are presented in Refs.~\citep{Steiner:2012xt,Dutra:2014qga}, which were extended to the range of the validity taking into account the mass-radius relation of neutron stars from observational data. In the upper panel of Fig.~\ref{fig:3} data in the extended region are denoted as "$\mathrm{Flow}+20\%$". One can see that our equations of state are consistent with the newly predicted range. The EoS for the symmetric nuclear matter in the range of $1.2 \leq \lambda \leq 2.2$ can also be constrained by the kaon production data from high-energy nucleus-nucleus collision\,\citep{Fuchs:2005zg,Lynch:2009vc}. They are shown in the green-colored region. The present results lie also within that region and, in general, are consistent with all the data extracted from different methods. In the lower (b) panel of Fig.~\ref{fig:3}, the results for the pressure are presented in the neutron matter ($\delta = 1$). We again depict the results for $P(\lambda,1,0,0,0)$ with the two sets of the parameters $a_{\rm sym}$ and $L_{\rm sym}$. They are represented by the red solid and green dashed curves, respectively in the lower panel of Fig.~\ref{fig:3}. One can see that EoS obtained in the present work are quite stable with the varying parameters that define the symmetric energy. We compare the results with those extracted from the several experiments. For example, the weighted average of the experimental data on the neutron skin thickness in ${}^{208}\mathrm{Pb}$ is indicated by the red-colored star at subnuclear density\,\citep{Tsang:2012se}. The studies in Ref.\,\citep{Steiner:2012xt} provide a constraint for the pressure values of neutron star matter from astrophysical observation data. In the lower panel of Fig.~\ref{fig:3}, this constraint is labeled as "$\mathrm{NS}\,95\%$" and "$\mathrm{NS}\,68\%$" for the two different confidence limits. There are also results at the low-density region from the quantum Monte Carlo calculation (QMC)\,\citep{Tsang:2012se,Gandolfi:2011xu,Steiner:2011ft}. They are denoted by the gray-shaded region. One can see that our results are in an excellent agreement with all extracted data in the different ways in all density regions presented in the figure. In short summary, this simple five-parametric model for nuclear matter within the framework of the model-independent chiral soliton approach describes the isospin-symmetric and neutron matter properties very well. This implies that the meson mean-field approach quite successful not only for explaining various properties of light and singly-heavy baryons in free space\,\cite{Yang:2010fm} but also for describing phenomenologically nuclear matter properties, based on minimal phenomenological information in the nonstrange sector. \subsection{Baryonic matter} \label{subsec:BM} We now proceed to baryonic matter properties in a more general case taking into account also the strange baryons. So far, we have concentrated on the nonstrange sector and fitted our parameters according to the nuclear phenomenology in non-strange sector. We have also parametrized the influence of surrounding nuclear matter to the in-medium nucleon properties in such a way that the binding energy per nucleon appears as a quadratic term in the isospin asymmetry parameter $\delta$. Following the strategy used in the nonstrange sector we can parametrize the influence of baryonic matter with the strangeness content. In doing that, we will consider the simplicity as a guiding principle. Therefore, as a first step we will not introduce any new parameter and try to describe the strangeness-mixed baryonic matter. For that purpose, we expand the binding energy per baryon into the series in the region with the small values of the isospin-asymmetry parameter $\delta$ and strangeness-mixing parameters $\delta_s$. Consequently, the series of the binding energy per nucleon at the small values of isospin asymmetry and hyperon mixture parameters $\delta$ and $\delta_{s}$ ($i=1,2,3$) given in Eq.(\ref{eq:BE}) can be written as \begin{align} \varepsilon(\lambda,\delta,&\delta_{1},\dots) = \varepsilon_{V}\left(\lambda\right) +\varepsilon_{\mathrm{sym}}\left(\lambda\right)\delta^{2}\cr &+\sum_{s=1}^3 \left.\frac{\partial\,\varepsilon \left(\lambda,\,\delta,\,\delta_{1},\dots\right)}{ \partial\,\delta_{s}}\right|_{\delta =\delta_{1}=\dots=0}\delta_{s}\cr &+ \frac{1}{2}\sum_{s,p=1}^3\left.\frac{\partial^{2}\, \varepsilon\left(\lambda,\,\delta,\,\delta_{1},\dots\right)}{ \partial\,\delta_{s}\partial\delta_{p}}\right|_{\delta=\delta_{1}=\dots=0} \delta_{s}\delta_{p}\cr &+\cdots, \label{eq:Eddi} \end{align} where, for convenience of discussion, the terms of the standard volume and symmetry energies for ordinary nuclear matter are explicitly separated as the first and the second ones. It is obvious that the linear terms in $\delta$ are absent due to the quadratic dependence of the binding energy per baryon on it. Next, assuming that the contributions of higher-order terms in $\delta_s$ are negligible, we can choose $f_s$'s similar to $f_0$ (see Eq.\,(\ref{eq:f0})) as a linear form in $\delta_s$.\footnote{Note that this is also the simplest choice.} Furthermore, we parametrize $f_s$ in such a way that there is no $\delta$ dependence. These parametrization will keep all our discussions in the nonstrange sector intact. Then we have the following forms of the remaining density functions \begin{align} f_s\left(\lambda,\,\delta,\,\delta_{1},\dots\right) =1+ g_s(\lambda)\delta_s\,. \end{align} We also assume that the third term in Eq.\,(\ref{eq:Eddi}) is equals to zero. This leads to the following form of $g_s$ \begin{align} g_s(\lambda) &= sg(\lambda),\cr g(\lambda)&=-\frac{5(M_{\mathrm{cl}}^{\ast}-M_{cl}+ E_{(1,1)1/2}^*-E_{(1,1)1/2})}{3(m_s-\hat m)}\cr &\times\left(6\frac{K_2}{I_2}+\frac{K_1}{I_1}\right)^{-1}\,. \label{eq:gs} \end{align} This final expression is a reasonable one, because the strangeness content of nuclei is negligible and $g_s$ at small densities in Eq.\,(\ref{eq:gs}) maximizes the energy for $\delta_s=0$. This choice is advantageous, since it allows one to fit all parameters in the SU(2) sector. As a result, we have no internal density parameters in the SU(3) sector and we do not need to relate this approach to the strange matter phenomenology. All results in the strangeness sector can be considered as predictions in this simplified work. In the medium-modified SU(3) sector, we have only one external free parameter, which is the fraction of strange matter. In order not to distinguish the species of strange matter, we introduce the strangeness-mixing parameter $\chi$ defining it as the following simple and reasonable way: $\delta_s=s\chi$. So, we can discuss the strangeness effects by considering nonzero values of the free parameter $\chi$. \begin{figure}[htb] \centering \includegraphics[scale=0.2]{fig4.pdf} \caption{Binding energy per nucleon $\varepsilon(\lambda,\delta,\chi)$ as a function of the normalized nuclear matter density $\lambda=\rho/\rho_{0}$. The results are drawn for the ordinary isospin symmetric matter in the blue solid curve, the strangeness mixed isospin-symmetric matter in the red dashed one, the pure neutron matter in the green dotted one and the strangeness-mixed isospin-asymmetric matter in the gray space-dashed one, respectively. The parameters of the symmetry energy are taken from Set I in Table~\ref{tab:1}.} \label{fig:4} \end{figure} The strangeness effects due to the surrounding environment may come from the different combinations, e.g. the isospin-symmetric matter with the strangeness-mixing or the isopin-asymmetric matter with the strangeness mixing. The binding energies per nucleon for different nuclear matters are presented in Fig.~\ref{fig:4}, which shows clearly how the binding energy undergoes modification as the strangeness content varies together with $\delta$ changed. For comparison, we again depict the binding energy for symmetric matter in the blue solid curve, for the isospin-asymmetric matter in the red-dashed one, for the strangeness-mixed isospin-symmetric matter in the green-dotted curve and the strangeness-mixed isospin-asymmetric matter in the gray space-dashed curve, respectively. One can see that the strangeness mixing leads to the less bound system at subnuclear matter densities while the binding energy per nucleon varies rather slowly as $\lambda$ increases, so that its magnitude becomes even larger than those in both iso-symmetric and iso-asymmetric nuclear matter at supranuclear matter densities, i.e. compare the blue solid curve and the green dotted one or the red dashed and grey dashed ones, respectively. At large densities the strange matter may be a more favorable system so that strange quark stars are allowed to exist with a smaller mass due to the softening EoS in comparison with neutron stars. In general, the effect from the isospin asymmetric environment is much stronger than that from strangeness mixing. The results are consistent with those from other approaches and model calculations. For example, see a recent review~\cite{Lenske:2018bgr} about theoretical approaches to the production of hyperons, baryon resonance and hyperon matter in heavy-ion collision. \begin{figure} \centering \includegraphics[scale=0.2]{fig5.pdf} \caption{Pressure $P(\lambda,\delta,\chi)$ as a function of the normalized nuclear matter density $\lambda=\rho/\rho_{0}$. Notations and parameters are the same as in Fig.\,\ref{fig:4}.} \label{fig:5} \end{figure} These results also can be seen from the density dependence of the pressure shown in Fig.~\ref{fig:5}, where we draw the results for the dependence of the pressure on $\lambda$ for possible four different cases, as discussed in the case of binding energy dependence on normalized nuclear matter density. One can see that the strangeness mixing will bring about the softening of EoS, comparing the blue solid curve with the green dotted ones or the red dashed and grey dashed ones. \section{Baryons masses in different baryon environments} \label{sec:4} We are now in a position to discuss how the masses of the SU(3) baryons undergo the changes in ordinary and strangeness-mixed nuclear matter. Since all the medium functions have been already fixed, we can study the modification of the baryon masses in different nuclear media. While we have considered only the baryon octet in formulating the nuclear matter, we will investigate the medium modifications of both the baryon octet and decuplet in nuclear matter. The contributions from the surrounding baryon environment can be divided into two parts: the change of the classical soliton mass $\Delta M_{\rm cl}=M_{\rm cl}^*-M_{\rm cl}$ (see Eq.\,(\ref{eq:collH})) and that of quantum fluctuations $\Delta M_{\rm qf}=\Delta M_B-\Delta M_{\rm cl}$, where $\Delta M_B=M_B^*-M_B$ denotes the shift in the baryon mass. From the values of the parameters in Eq.\,(\ref{eq:CclC1C2}), one can see that the classical soliton mass is homogeneously dropped in nuclear matter. The soliton mass in free space in the present work is $737.6$~MeV. Its change in the medium at the normal nuclear matter density ($\lambda=1$) is given as $-41.38$~MeV. In the case of quantum fluctuations the situations is not at all trivial, because different parts of the quantum fluctuations may behave in a different way depending on the content of the surrounding baryon environment. The masses of octet and decuplet member baryons in the different baryon environments at normal nuclear matter $\lambda=1$ density are predicted and are listed in Table\,\ref{tab:2}. \begin{table*} [hbt] \caption{Masses of the baryon octet and decuplet both in free space and in the different baryon environments at normal nuclear matter density $\lambda=1$. The parameters for the symmetry energy are taken from Set\,I in Table\,\ref{tab:1}. All the masses are given in units of MeV.} \label{tab:2} \begin{center} \begin{tabular}{c|cccccc} \hline \hline Baryon & Exp & Free space & $\delta=0$, $\chi=0$ & $\delta=1$, $\chi=0$ & $\delta=0$, $\chi=0.1$ & $\delta=0.4$, $\chi=0.1$ \\ \hline $ p $ & 938.76 & 938.01 & 921.97 & 889.97 & 918.23 & 905.43 \\ $ n $ & 940.27 & 939.52 & 922.47 & 955.47 & 919.73 & 932.53 \\ $ \Lambda $ & 1109.61 & 1108.86 &1092.82 & 1092.82 & 1092.77 & 1092.77 \\ $ \Sigma^{+} $ & 1188.75 & 1188.00 & 1171.96 & 1106.74& 1172.01 & 1145.92 \\ $ \Sigma^{0} $ & 1190.20 & 1189.45 & 1173.41 & 1173.41 & 1173.46 & 1173.46 \\ $ \Sigma^{-} $ & 1195.48 & 1194.73 & 1178.69 & 1243.91 & 1178.74 & 1204.83 \\ $ \Xi^{0} $ & 1319.30 & 1318.55 & 1302.51 & 1269.29 & 1306.21 & 1292.92 \\ $ \Xi^{-} $ &1321.31 & 1323.78 & 1307.74 & 1340.96 & 1311.40 &1324.72 \\ $ \Delta^{++} $ \ & 1230.55 & 1247.79 & 1137.60 & 1041.30 & 1133.94 & 1095.42\\ $ \Delta^{+} $ & 1234.90 & 1248.61 & 1138.42 & 1106.31 & 1134.75 & 1121.91 \\ $ \Delta^{0} $ & 1231.3& 1250.79& 1140.59 & 1172.70& 1136.93 & 1149.77 \\ $ \Delta^{-} $ & 1230 to 1234 & 1254.33 & 1144.14 & 1240.44 & 1140.48 & 1179.00 \\ $ \Sigma^{*+} $ & 1382.80 & 1387.73 & 1277.54 & 1213.34 & 1277.54 & 1251.86 \\ $ \Sigma^{*0} $ & 1383.70 & 1389.91 & 1279.72 & 1279.72& 1279.72 & 1279.72 \\ $ \Sigma^{*-} $ \ & 1394.20 & 1393.46 & 1283.27 & 1374.47 & 1283.27 & 1308.95 \\ $ \Xi^{*0} $ & 1531.80 & 1529.03 & 1418.84 &1386.74 & 1422.50 & 1409.66 \\ $ \Xi^{*-} $ & 1535.0 & 1532.58 & 1422.39 & 1454.49 & 1426.05 & 1438.89 \\ $ \Omega^{-} $ & 1672.45 & 1671.70 & 1561.51 & 1561.51 & 1568.84 & 1568.84 \\ \hline \hline \end{tabular} \end{center} \end{table*} One can see that the change of quantum fluctuations and, consequently, the changes of baryons masses in the different environments are different. In the symmetric ordinary nuclear matter ($\lambda=1$ and $\delta=0$) the masses of the baryon octet and decuplet decrease as $\lambda$ increases (compare third and fourth columns in Table~\ref{tab:2}). Figure~\ref{fig:6} illustrates the density dependence of the mass shifts of the nucleon and $\Delta$ isobar in the isospin symmetric nuclear matter. \begin{figure}[htp] \centering \includegraphics[scale=0.2]{fig6.pdf} \caption{The result for the mass shift $\Delta M_B=M^*_B-M_B$ of the nucleon $B=N$ in the isospin symmetric nuclear matter is drawn in a solid curve, whereas that of the $B=\Delta$ isobar is depicted in a dashed one.} \label{fig:6} \end{figure} As shown in Fig.~\ref{fig:6}, the mass shift of the nucleon decreases very slowly as $\lambda$ increases. However, it is almost saturated in the vicinity of the normal nuclear matter density and then starts to increase very slightly. On the other hand, the mass shift of the $\Delta$ isobar falls off monotonically as $\lambda$ increases. Since the mass difference of the nucleon and $\Delta$ comes from the zero-mode quantization of the chiral soliton, the medium modification of the zero-mode quantum fluctuation for the $\Delta$ comes into essential play. This fact makes the mass shift of $\Delta$ turn out to be very different from that of the nucleon. We find the very similar results for the other members of the baryon octet and decuplet. However, the situation is changed in isospin-asymmetric matter. The mass shift of the SU(3) baryons in the isospin asymmetric environment depends on the third component of baryons isospin. Thus, the mass shifts of the baryons are more pronounced, in particular, for the baryon with negative $T_3$. For example, the mass shift of the proton in pure neutron matter ($\delta=1$) at normal nuclear matter density ($\lambda=1$) is obtained to be $-48.79$\,MeV, while that of the neutron becomes positive, i.e. $+15.20$\,MeV (see also Table~\ref{tab:2}). This implies that the up and down quarks may undergo changes in a different manner. \begin{figure}[htp] \centering \includegraphics[scale=0.2]{fig7a.pdf}\hspace{0.5cm} \includegraphics[scale=0.2]{fig7b.pdf} \caption{Results for the mass shifts $\Delta M_B$ of the baryon octet and the decuplet in the pure neutron matter ($\delta=1$) are drawn in the upper (a) and lower panels (b), respectively. The parameters for the symmetry energy are taken from Set\,I in Table\,\ref{tab:1}.} \label{fig:7} \end{figure} The results for the mass shifts of the baryon octet and decuplet in the pure neutron matter are shown in the upper and lower panels of Fig.~\ref{fig:7}, respectively. First of all, one can explicitly see that the effects of the isospin mass splitting are clearly shown in the isospin-asymmetric nuclear environment. Depending on the charges of the baryon octet, we can see that their mass shifts behave in a very different way. As shown in the upper panel of Fig.~\ref{fig:7}, the neutron mass increases as $\lambda$ increases, whereas the proton mass drops off as $\lambda$ increases. In general, the masses of the members in the baryon octet with the negative values of $T_3$ rises in the neutron matter as $\lambda$ increases. On the other hand, the masses of the octet baryons with the positive values of $T_3$ drop off as $\lambda$ decreases. However, while the mass of $\Xi^0$ is identical to that of the proton, those of $\Sigma^0$ and $\Lambda^0$, which are also identical each other, fall off slowly and then are saturated as $\lambda$ increases. This is originated from the fact that the in-medium functionals for the quantum fluctuations near the third component of isospin are quite sensitive to the medium effects and they are identical for the baryons that have the same isospin components. The general tendency and the effects of the isopin factor can be seen also in the case of decuplet baryons, which are given in the lower (b) panel of Fig.~\ref{fig:7}, but the mass shifts are larger than those of the baryon octet. For example, the mass shift in the isospin averaged $\Delta$ in normal nuclear matter is around two times smaller than the $\Delta^{++}$ mass shift in neutron matter at normal nuclear matter density $\lambda=1$. For example, one can see this by comparing the red dashed curve in Fig.~\ref{fig:6} with the black solid one in the lower panel of Fig.~\ref{fig:7}. The isospin component factor is similar to the octet case and some baryons masses such as $\Xi^{*0}$ and $\Delta^+$ have the identical dependence on $\lambda$. Due to the isospin factor, the $\Delta^{-}$ mass in neutron matter remains almost constant which is seen from the red dashed curve in the lower panel of Fig.~\ref{fig:7}. The present results are in qualitative agreement with those from Ref.~\cite{Savage:1995kv}. \begin{figure}[htp] \centering \includegraphics[scale=0.2]{fig8a.pdf}\hspace{0.5cm} \includegraphics[scale=0.2]{fig8b.pdf} \caption{Mass shifts $M^*_B-M_B$ of the nucleon (upper (a) panel) and $\Delta$ isobar (lower (b) panel) in the strangeness mixed isospin-asymmetric matter. } \label{fig:8} \end{figure} For completeness, we show also the mass changes of the baryons in the strangeness-mixed asymmetric environment. In Fig.~\ref{fig:8}, the results for the mass shifts of the nucleon and $\Delta$ in strangeness-mixed asymmetric matter are presented as functions of $\lambda$, which we choose them as the representatives of the baryon octet and decuplet, respectively. For the sake of the illustration, we include the changes of isospin-averaged masses of the nucleon and $\Delta$ by the black solid curves in the upper and lower panels, respectively. Figure~\ref{fig:8} explicitly shows the isospin factor in nuclear matter, which are explained above. It also depicts how the strength of the mass are changed due to the environment content. Comparing the Fig.~\ref{fig:7} with Fig.~\ref{fig:8}, one can conclude that the changes in neutron matter are stronger than those in strange matter. In general, the results in strangeness-mixed matter are rather similar to those in pure neutron matter. \section{Summary and outlook} \label{sec:5} In the present work, we have investigated the various baryonic matters such as the symmetric nuclear matter, pure neutron matter, and strangeness-mixed baryonic matter, based on the meson mean-field approach or the generalized SU(3) chiral soliton model. All the dynamical parameters for the baryon masses in the model were determined by using the experimental data in free space and then we have introduced the parametrizations for the density-dependent parameters. As a starting point, we took a "\emph{model-independent approach}" for the SU(3) baryon properties in free space, which described successfully the baryon masses of the baryon decuplet and other properties of baryons in free space~\cite{Yang:2010fm, Yang:2015era}. In the present work, the medium modifications of the model functionals were carried out by employing the linear density-dependent forms. Having determined the parameters for the medium modification by using the empirical data related to nuclear matter such as the binding energy per nucleon, the compressibility, and the symmetry energy, we were able to describe the equation of states for various nuclear environments including the nonstrange sector. We found that the present results were in good agreement with the data extracted from the phenomenology and experiments and with the results from other approaches. We also discussed the properties of the strangeness-mixed matter and they also were in agreement with the phenomenology. Finally, we predicted the mass shifts of the baryon octet and decuplet in various baryonic environments with different content of the isospin asymmetry and strangeness. We scrutinized the changes of the masses of the baryons with different values of the third components of isospin and found that the masses of the baryons with negative charges show very different dependence on the nuclear matter density from those with positive and null charges. Since we have formulated the equations of states for isospin-asymmetric and strangeness-mixing baryonic matter, one can directly apply the present model to investigate properties of neutron stars. The corresponding investigation is under way. \section*{Acknowledgments} The present work was supported by Basic Science Research Program through the National Research Foundation (NRF) of Korea funded by the Korean government (Ministry of Education, Science and Technology, MEST), Grant Numbers 2019R1A2C1010443 (Gh.-S. Y.), 2018R1A2B2001752 and 2018R1A5A1025563 (H.-Ch.K.), 2020R1F1A1067876 (U. Y.).